summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdjunpack.bat52
-rw-r--r--include/COPYING340
-rw-r--r--include/ChangeLog2001
-rw-r--r--include/MAINTAINERS1
-rw-r--r--include/alloca-conf.h24
-rw-r--r--include/ansidecl.h232
-rw-r--r--include/aout/ChangeLog192
-rw-r--r--include/aout/adobe.h297
-rw-r--r--include/aout/aout64.h495
-rw-r--r--include/aout/ar.h36
-rw-r--r--include/aout/dynix3.h71
-rw-r--r--include/aout/encap.h135
-rw-r--r--include/aout/host.h22
-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.def268
-rw-r--r--include/aout/stab_gnu.h37
-rw-r--r--include/aout/sun4.h219
-rw-r--r--include/bfdlink.h554
-rw-r--r--include/bin-bugs.h3
-rw-r--r--include/bout.h182
-rw-r--r--include/callback.h270
-rw-r--r--include/coff/ChangeLog927
-rw-r--r--include/coff/a29k.h305
-rw-r--r--include/coff/alpha.h362
-rw-r--r--include/coff/apollo.h252
-rw-r--r--include/coff/arm.h303
-rw-r--r--include/coff/aux-coff.h31
-rw-r--r--include/coff/ecoff.h421
-rw-r--r--include/coff/go32exe.h20
-rw-r--r--include/coff/h8300.h204
-rw-r--r--include/coff/h8500.h201
-rw-r--r--include/coff/i386.h228
-rw-r--r--include/coff/i860.h205
-rw-r--r--include/coff/i960.h275
-rw-r--r--include/coff/ia64.h222
-rw-r--r--include/coff/internal.h731
-rw-r--r--include/coff/m68k.h225
-rw-r--r--include/coff/m88k.h219
-rw-r--r--include/coff/mcore.h246
-rw-r--r--include/coff/mips.h369
-rw-r--r--include/coff/mipspe.h223
-rw-r--r--include/coff/pe.h260
-rw-r--r--include/coff/powerpc.h199
-rw-r--r--include/coff/rs6000.h243
-rw-r--r--include/coff/rs6k64.h236
-rw-r--r--include/coff/sh.h310
-rw-r--r--include/coff/sparc.h210
-rw-r--r--include/coff/sym.h484
-rw-r--r--include/coff/symconst.h177
-rw-r--r--include/coff/ti.h434
-rw-r--r--include/coff/tic30.h203
-rw-r--r--include/coff/tic54x.h14
-rw-r--r--include/coff/tic80.h228
-rw-r--r--include/coff/w65.h201
-rw-r--r--include/coff/we32k.h206
-rw-r--r--include/coff/z8k.h201
-rw-r--r--include/demangle.h127
-rw-r--r--include/dis-asm.h278
-rw-r--r--include/dyn-string.h92
-rw-r--r--include/elf/ChangeLog1204
-rw-r--r--include/elf/alpha.h107
-rw-r--r--include/elf/arc.h53
-rw-r--r--include/elf/arm.h129
-rw-r--r--include/elf/avr.h58
-rw-r--r--include/elf/common.h605
-rw-r--r--include/elf/cris.h47
-rw-r--r--include/elf/d10v.h38
-rw-r--r--include/elf/d30v.h42
-rw-r--r--include/elf/dwarf.h320
-rw-r--r--include/elf/dwarf2.h638
-rw-r--r--include/elf/external.h256
-rw-r--r--include/elf/fr30.h42
-rw-r--r--include/elf/hppa.h551
-rw-r--r--include/elf/i370.h46
-rw-r--r--include/elf/i386.h48
-rw-r--r--include/elf/i860.h66
-rw-r--r--include/elf/i960.h37
-rw-r--r--include/elf/ia64.h190
-rw-r--r--include/elf/internal.h313
-rw-r--r--include/elf/m32r.h67
-rw-r--r--include/elf/m68hc11.h42
-rw-r--r--include/elf/m68k.h57
-rw-r--r--include/elf/mcore.h46
-rw-r--r--include/elf/mips.h911
-rw-r--r--include/elf/mn10200.h39
-rw-r--r--include/elf/mn10300.h53
-rw-r--r--include/elf/pj.h44
-rw-r--r--include/elf/ppc.h125
-rw-r--r--include/elf/reloc-macros.h106
-rw-r--r--include/elf/sh.h93
-rw-r--r--include/elf/sparc.h152
-rw-r--r--include/elf/v850.h107
-rw-r--r--include/elf/x86-64.h46
-rw-r--r--include/filenames.h51
-rw-r--r--include/floatformat.h114
-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/gdbm.h91
-rw-r--r--include/getopt.h141
-rw-r--r--include/hashtab.h152
-rw-r--r--include/hp-symtab.h1874
-rw-r--r--include/ieee.h139
-rw-r--r--include/libiberty.h214
-rw-r--r--include/md5.h142
-rw-r--r--include/mpw/ChangeLog61
-rw-r--r--include/mpw/README1
-rw-r--r--include/mpw/dir.h23
-rw-r--r--include/mpw/dirent.h31
-rw-r--r--include/mpw/fcntl.h124
-rw-r--r--include/mpw/grp.h10
-rw-r--r--include/mpw/mpw.h130
-rw-r--r--include/mpw/pwd.h15
-rw-r--r--include/mpw/spin.h64
-rw-r--r--include/mpw/stat.h75
-rw-r--r--include/mpw/sys/file.h1
-rw-r--r--include/mpw/sys/param.h1
-rw-r--r--include/mpw/sys/resource.h9
-rw-r--r--include/mpw/sys/stat.h44
-rw-r--r--include/mpw/sys/time.h13
-rw-r--r--include/mpw/sys/types.h15
-rw-r--r--include/mpw/utime.h7
-rw-r--r--include/mpw/varargs.h9
-rw-r--r--include/nlm/ChangeLog83
-rw-r--r--include/nlm/alpha-ext.h166
-rw-r--r--include/nlm/common.h124
-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.h152
-rw-r--r--include/objalloc.h116
-rw-r--r--include/obstack.h598
-rw-r--r--include/opcode/ChangeLog2348
-rw-r--r--include/opcode/a29k.h285
-rw-r--r--include/opcode/alpha.h238
-rw-r--r--include/opcode/arc.h274
-rw-r--r--include/opcode/arm.h294
-rw-r--r--include/opcode/avr.h256
-rw-r--r--include/opcode/cgen.h1415
-rw-r--r--include/opcode/convex.h1711
-rw-r--r--include/opcode/cris.h298
-rw-r--r--include/opcode/d10v.h199
-rw-r--r--include/opcode/d30v.h286
-rw-r--r--include/opcode/h8300.h604
-rw-r--r--include/opcode/hppa.h854
-rw-r--r--include/opcode/i370.h265
-rw-r--r--include/opcode/i386.h1198
-rw-r--r--include/opcode/i860.h497
-rw-r--r--include/opcode/i960.h509
-rw-r--r--include/opcode/ia64.h391
-rw-r--r--include/opcode/m68hc11.h418
-rw-r--r--include/opcode/m68k.h344
-rw-r--r--include/opcode/m88k.h923
-rw-r--r--include/opcode/mips.h784
-rw-r--r--include/opcode/mn10200.h110
-rw-r--r--include/opcode/mn10300.h161
-rw-r--r--include/opcode/np1.h422
-rw-r--r--include/opcode/ns32k.h491
-rw-r--r--include/opcode/pj.h46
-rw-r--r--include/opcode/pn.h282
-rw-r--r--include/opcode/ppc.h259
-rw-r--r--include/opcode/pyr.h287
-rw-r--r--include/opcode/sparc.h242
-rw-r--r--include/opcode/tahoe.h213
-rw-r--r--include/opcode/tic30.h691
-rw-r--r--include/opcode/tic54x.h167
-rw-r--r--include/opcode/tic80.h277
-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.h81
-rw-r--r--include/progress.h37
-rw-r--r--include/regs/ChangeLog0
-rw-r--r--include/remote-sim.h353
-rw-r--r--include/safe-ctype.h105
-rw-r--r--include/sim-d10v.h103
-rw-r--r--include/sort.h48
-rw-r--r--include/splay-tree.h125
-rw-r--r--include/symcat.h49
-rw-r--r--winsup/CYGWIN_LICENSE46
-rw-r--r--winsup/ChangeLog138
-rw-r--r--winsup/MAINTAINERS28
-rw-r--r--winsup/Makefile.common147
-rw-r--r--winsup/Makefile.in86
-rwxr-xr-xwinsup/configure1333
-rwxr-xr-xwinsup/configure.in82
-rw-r--r--winsup/cygwin/CYGWIN_LICENSE46
-rw-r--r--winsup/cygwin/ChangeLog4066
-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/Makefile.in224
-rw-r--r--winsup/cygwin/ROADMAP129
-rw-r--r--winsup/cygwin/acconfig.h14
-rw-r--r--winsup/cygwin/ansi.sgml59
-rw-r--r--winsup/cygwin/assert.cc52
-rw-r--r--winsup/cygwin/autoload.cc317
-rw-r--r--winsup/cygwin/autoload.h82
-rw-r--r--winsup/cygwin/automode.c26
-rw-r--r--winsup/cygwin/binmode.c19
-rw-r--r--winsup/cygwin/child_info.h110
-rw-r--r--winsup/cygwin/config.h.in38
-rw-r--r--winsup/cygwin/config/i386/longjmp.c51
-rw-r--r--winsup/cygwin/config/i386/makefrag17
-rw-r--r--winsup/cygwin/config/i386/profile.h58
-rw-r--r--winsup/cygwin/config/i386/setjmp.c48
-rwxr-xr-xwinsup/cygwin/configure2341
-rw-r--r--winsup/cygwin/configure.in245
-rw-r--r--winsup/cygwin/cygerrno.h34
-rw-r--r--winsup/cygwin/cygheap.cc371
-rw-r--r--winsup/cygwin/cygheap.h119
-rw-r--r--winsup/cygwin/cygrun.c50
-rw-r--r--winsup/cygwin/cygwin.din1104
-rw-r--r--winsup/cygwin/cygwin_version.h31
-rw-r--r--winsup/cygwin/dcrt0.cc1110
-rw-r--r--winsup/cygwin/debug.cc322
-rw-r--r--winsup/cygwin/debug.h72
-rw-r--r--winsup/cygwin/delqueue.cc102
-rw-r--r--winsup/cygwin/delqueue.h30
-rw-r--r--winsup/cygwin/dir.cc356
-rw-r--r--winsup/cygwin/dlfcn.cc223
-rw-r--r--winsup/cygwin/dll_init.cc404
-rw-r--r--winsup/cygwin/dll_init.h91
-rw-r--r--winsup/cygwin/dll_init.sgml11
-rw-r--r--winsup/cygwin/dtable.cc560
-rw-r--r--winsup/cygwin/dtable.h61
-rw-r--r--winsup/cygwin/dtable.sgml20
-rw-r--r--winsup/cygwin/environ.cc730
-rw-r--r--winsup/cygwin/environ.h40
-rw-r--r--winsup/cygwin/errno.cc675
-rw-r--r--winsup/cygwin/exceptions.cc1142
-rw-r--r--winsup/cygwin/exec.cc208
-rw-r--r--winsup/cygwin/external.cc177
-rw-r--r--winsup/cygwin/external.sgml18
-rw-r--r--winsup/cygwin/fcntl.cc49
-rw-r--r--winsup/cygwin/fhandler.cc1557
-rw-r--r--winsup/cygwin/fhandler.h907
-rw-r--r--winsup/cygwin/fhandler_clipboard.cc95
-rw-r--r--winsup/cygwin/fhandler_console.cc1535
-rw-r--r--winsup/cygwin/fhandler_floppy.cc91
-rw-r--r--winsup/cygwin/fhandler_mem.cc403
-rw-r--r--winsup/cygwin/fhandler_random.cc166
-rw-r--r--winsup/cygwin/fhandler_raw.cc537
-rw-r--r--winsup/cygwin/fhandler_serial.cc888
-rw-r--r--winsup/cygwin/fhandler_socket.cc310
-rw-r--r--winsup/cygwin/fhandler_tape.cc845
-rw-r--r--winsup/cygwin/fhandler_termios.cc300
-rw-r--r--winsup/cygwin/fhandler_tty.cc1074
-rw-r--r--winsup/cygwin/fhandler_windows.cc149
-rw-r--r--winsup/cygwin/fhandler_zero.cc59
-rw-r--r--winsup/cygwin/fork.cc715
-rw-r--r--winsup/cygwin/gcrt0.c41
-rw-r--r--winsup/cygwin/glob.c898
-rw-r--r--winsup/cygwin/gmon.c277
-rw-r--r--winsup/cygwin/gmon.h166
-rw-r--r--winsup/cygwin/grp.cc285
-rw-r--r--winsup/cygwin/heap.cc143
-rw-r--r--winsup/cygwin/heap.h24
-rw-r--r--winsup/cygwin/host_dependent.h30
-rw-r--r--winsup/cygwin/include/a.out.h421
-rw-r--r--winsup/cygwin/include/arpa/ftp.h109
-rw-r--r--winsup/cygwin/include/arpa/inet.h25
-rw-r--r--winsup/cygwin/include/arpa/telnet.h322
-rw-r--r--winsup/cygwin/include/asm/byteorder.h93
-rw-r--r--winsup/cygwin/include/asm/socket.h58
-rw-r--r--winsup/cygwin/include/asm/types.h13
-rw-r--r--winsup/cygwin/include/cygwin/acl.h82
-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/icmp.h1
-rw-r--r--winsup/cygwin/include/cygwin/if.h74
-rw-r--r--winsup/cygwin/include/cygwin/in.h188
-rw-r--r--winsup/cygwin/include/cygwin/in_systm.h34
-rw-r--r--winsup/cygwin/include/cygwin/ip.h1
-rw-r--r--winsup/cygwin/include/cygwin/mtio.h187
-rw-r--r--winsup/cygwin/include/cygwin/rdevio.h30
-rw-r--r--winsup/cygwin/include/cygwin/socket.h149
-rw-r--r--winsup/cygwin/include/cygwin/sockios.h1
-rw-r--r--winsup/cygwin/include/cygwin/types.h1
-rw-r--r--winsup/cygwin/include/cygwin/uio.h1
-rw-r--r--winsup/cygwin/include/cygwin/version.h192
-rw-r--r--winsup/cygwin/include/dlfcn.h41
-rw-r--r--winsup/cygwin/include/exceptions.h120
-rw-r--r--winsup/cygwin/include/fcntl.h7
-rw-r--r--winsup/cygwin/include/features.h1
-rw-r--r--winsup/cygwin/include/getopt.h66
-rw-r--r--winsup/cygwin/include/glob.h111
-rw-r--r--winsup/cygwin/include/icmp.h1
-rw-r--r--winsup/cygwin/include/io.h28
-rw-r--r--winsup/cygwin/include/lastlog.h12
-rw-r--r--winsup/cygwin/include/limits.h144
-rw-r--r--winsup/cygwin/include/mapi.h102
-rw-r--r--winsup/cygwin/include/memory.h7
-rw-r--r--winsup/cygwin/include/mntent.h37
-rw-r--r--winsup/cygwin/include/net/if.h6
-rw-r--r--winsup/cygwin/include/netdb.h168
-rw-r--r--winsup/cygwin/include/netinet/in.h6
-rw-r--r--winsup/cygwin/include/netinet/in_systm.h6
-rw-r--r--winsup/cygwin/include/netinet/ip.h6
-rw-r--r--winsup/cygwin/include/netinet/ip_icmp.h6
-rw-r--r--winsup/cygwin/include/netinet/tcp.h6
-rw-r--r--winsup/cygwin/include/paths.h9
-rw-r--r--winsup/cygwin/include/poll.h1
-rw-r--r--winsup/cygwin/include/pthread.h92
-rw-r--r--winsup/cygwin/include/strings.h6
-rw-r--r--winsup/cygwin/include/sys/acl.h17
-rw-r--r--winsup/cygwin/include/sys/cdefs.h12
-rw-r--r--winsup/cygwin/include/sys/copying.dj41
-rw-r--r--winsup/cygwin/include/sys/cygwin.h233
-rw-r--r--winsup/cygwin/include/sys/file.h31
-rw-r--r--winsup/cygwin/include/sys/ioctl.h20
-rw-r--r--winsup/cygwin/include/sys/mman.h42
-rw-r--r--winsup/cygwin/include/sys/mount.h28
-rw-r--r--winsup/cygwin/include/sys/mtio.h8
-rw-r--r--winsup/cygwin/include/sys/poll.h43
-rw-r--r--winsup/cygwin/include/sys/procfs.h8
-rw-r--r--winsup/cygwin/include/sys/resource.h40
-rw-r--r--winsup/cygwin/include/sys/select.h35
-rw-r--r--winsup/cygwin/include/sys/smallprint.h17
-rw-r--r--winsup/cygwin/include/sys/socket.h43
-rw-r--r--winsup/cygwin/include/sys/strace.h123
-rw-r--r--winsup/cygwin/include/sys/syslog.h73
-rw-r--r--winsup/cygwin/include/sys/sysmacros.h8
-rw-r--r--winsup/cygwin/include/sys/termio.h2
-rw-r--r--winsup/cygwin/include/sys/termios.h295
-rw-r--r--winsup/cygwin/include/sys/ttychars.h1
-rw-r--r--winsup/cygwin/include/sys/uio.h27
-rw-r--r--winsup/cygwin/include/sys/un.h16
-rw-r--r--winsup/cygwin/include/sys/utsname.h23
-rw-r--r--winsup/cygwin/include/sys/vfs.h28
-rw-r--r--winsup/cygwin/include/sys/wait.h63
-rw-r--r--winsup/cygwin/include/sysexits.h118
-rw-r--r--winsup/cygwin/include/syslog.h6
-rw-r--r--winsup/cygwin/include/termio.h6
-rw-r--r--winsup/cygwin/include/tzfile.h9
-rw-r--r--winsup/cygwin/include/wchar.h27
-rw-r--r--winsup/cygwin/init.cc56
-rw-r--r--winsup/cygwin/ioctl.cc47
-rw-r--r--winsup/cygwin/lib/_cygwin_crt0_common.cc99
-rw-r--r--winsup/cygwin/lib/crt0.h22
-rw-r--r--winsup/cygwin/lib/cygwin_attach_dll.c25
-rw-r--r--winsup/cygwin/lib/cygwin_crt0.c34
-rw-r--r--winsup/cygwin/lib/dll_entry.c17
-rw-r--r--winsup/cygwin/lib/dll_main.cc41
-rw-r--r--winsup/cygwin/lib/getopt.c391
-rw-r--r--winsup/cygwin/lib/libcmain.c35
-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/localtime.c2247
-rw-r--r--winsup/cygwin/malloc_wrapper.cc246
-rw-r--r--winsup/cygwin/mcount.c173
-rw-r--r--winsup/cygwin/misc-std.sgml74
-rw-r--r--winsup/cygwin/miscfuncs.cc114
-rwxr-xr-xwinsup/cygwin/mkvers.sh174
-rw-r--r--winsup/cygwin/mmap.cc600
-rw-r--r--winsup/cygwin/net.cc1824
-rw-r--r--winsup/cygwin/ntdll.h151
-rw-r--r--winsup/cygwin/ntea.cc335
-rw-r--r--winsup/cygwin/passwd.cc289
-rw-r--r--winsup/cygwin/path.cc3002
-rw-r--r--winsup/cygwin/path.h156
-rw-r--r--winsup/cygwin/path.sgml205
-rw-r--r--winsup/cygwin/perprocess.h20
-rw-r--r--winsup/cygwin/perthread.h116
-rw-r--r--winsup/cygwin/pinfo.cc469
-rw-r--r--winsup/cygwin/pinfo.h206
-rw-r--r--winsup/cygwin/pipe.cc96
-rw-r--r--winsup/cygwin/poll.cc85
-rw-r--r--winsup/cygwin/posix.sgml98
-rw-r--r--winsup/cygwin/profil.c173
-rw-r--r--winsup/cygwin/profil.h44
-rw-r--r--winsup/cygwin/pthread.cc204
-rw-r--r--winsup/cygwin/regexp/COPYRIGHT22
-rw-r--r--winsup/cygwin/regexp/README84
-rw-r--r--winsup/cygwin/regexp/regerror.c18
-rw-r--r--winsup/cygwin/regexp/regexp.3321
-rw-r--r--winsup/cygwin/regexp/regexp.c1321
-rw-r--r--winsup/cygwin/regexp/regexp.h24
-rw-r--r--winsup/cygwin/regexp/regmagic.h7
-rw-r--r--winsup/cygwin/regexp/regsub.c87
-rw-r--r--winsup/cygwin/registry.cc249
-rw-r--r--winsup/cygwin/registry.h43
-rw-r--r--winsup/cygwin/resource.cc99
-rw-r--r--winsup/cygwin/scandir.cc101
-rw-r--r--winsup/cygwin/security.cc2180
-rw-r--r--winsup/cygwin/security.h40
-rw-r--r--winsup/cygwin/select.cc1428
-rw-r--r--winsup/cygwin/select.h56
-rw-r--r--winsup/cygwin/shared.cc295
-rw-r--r--winsup/cygwin/shared.sgml17
-rw-r--r--winsup/cygwin/shared_info.h157
-rw-r--r--winsup/cygwin/signal.cc372
-rw-r--r--winsup/cygwin/sigproc.cc1324
-rw-r--r--winsup/cygwin/sigproc.h108
-rw-r--r--winsup/cygwin/smallprint.c203
-rw-r--r--winsup/cygwin/spawn.cc1030
-rw-r--r--winsup/cygwin/strace.cc389
-rw-r--r--winsup/cygwin/strsep.cc65
-rw-r--r--winsup/cygwin/sync.cc142
-rw-r--r--winsup/cygwin/sync.h54
-rw-r--r--winsup/cygwin/syscalls.cc2183
-rw-r--r--winsup/cygwin/sysconf.cc100
-rw-r--r--winsup/cygwin/syslog.cc392
-rw-r--r--winsup/cygwin/termios.cc269
-rw-r--r--winsup/cygwin/test.c165
-rw-r--r--winsup/cygwin/textmode.c19
-rw-r--r--winsup/cygwin/thread.cc992
-rw-r--r--winsup/cygwin/thread.h305
-rw-r--r--winsup/cygwin/times.cc546
-rw-r--r--winsup/cygwin/tty.cc426
-rw-r--r--winsup/cygwin/tty.h143
-rw-r--r--winsup/cygwin/tz_posixrules.h48
-rw-r--r--winsup/cygwin/uinfo.cc260
-rw-r--r--winsup/cygwin/uname.cc92
-rw-r--r--winsup/cygwin/wait.cc118
-rw-r--r--winsup/cygwin/window.cc247
-rw-r--r--winsup/cygwin/winsup.h273
-rw-r--r--winsup/cygwin/winver.rc53
-rw-r--r--winsup/doc/ChangeLog39
-rw-r--r--winsup/doc/Makefile.in119
-rw-r--r--winsup/doc/calls.texinfo707
-rw-r--r--winsup/doc/changes.texinfo202
-rwxr-xr-xwinsup/doc/configure1078
-rw-r--r--winsup/doc/configure.in54
-rw-r--r--winsup/doc/copy.texinfo382
-rw-r--r--winsup/doc/cygwin-api.in.sgml68
-rw-r--r--winsup/doc/cygwin-ug-net.in.sgml64
-rw-r--r--winsup/doc/cygwin-ug.in.sgml63
-rw-r--r--winsup/doc/cygwinenv.sgml87
-rw-r--r--winsup/doc/dll.sgml120
-rw-r--r--winsup/doc/doctool.c622
-rw-r--r--winsup/doc/doctool.txt146
-rw-r--r--winsup/doc/faq.texinfo18
-rw-r--r--winsup/doc/fhandler-tut.txt83
-rw-r--r--winsup/doc/filemodes.sgml34
-rw-r--r--winsup/doc/gcc.sgml78
-rw-r--r--winsup/doc/gdb.sgml88
-rw-r--r--winsup/doc/history.texinfo670
-rw-r--r--winsup/doc/how-api.texinfo275
-rw-r--r--winsup/doc/how-programming.texinfo578
-rw-r--r--winsup/doc/how-resources.texinfo115
-rw-r--r--winsup/doc/how-using.texinfo571
-rw-r--r--winsup/doc/how.texinfo6
-rw-r--r--winsup/doc/install.texinfo268
-rw-r--r--winsup/doc/legal.sgml32
-rw-r--r--winsup/doc/ntsec.sgml663
-rw-r--r--winsup/doc/overview.sgml87
-rw-r--r--winsup/doc/overview2.sgml323
-rw-r--r--winsup/doc/pathnames.sgml322
-rw-r--r--winsup/doc/programming.sgml11
-rw-r--r--winsup/doc/readme.texinfo18
-rw-r--r--winsup/doc/relnotes.texinfo23
-rw-r--r--winsup/doc/setup-net.sgml132
-rw-r--r--winsup/doc/setup.sgml47
-rw-r--r--winsup/doc/setup2.sgml279
-rw-r--r--winsup/doc/textbinary.sgml181
-rw-r--r--winsup/doc/using.sgml19
-rw-r--r--winsup/doc/what.texinfo145
-rw-r--r--winsup/doc/who.texinfo74
-rw-r--r--winsup/doc/windres.sgml167
-rw-r--r--winsup/mingw/CRT_noglob.c17
-rw-r--r--winsup/mingw/CRTfmode.c20
-rw-r--r--winsup/mingw/CRTglob.c18
-rw-r--r--winsup/mingw/CRTinit.c32
-rw-r--r--winsup/mingw/ChangeLog540
-rw-r--r--winsup/mingw/Makefile.in367
-rw-r--r--winsup/mingw/README10
-rw-r--r--winsup/mingw/TODO1
-rwxr-xr-xwinsup/mingw/config.guess1342
-rwxr-xr-xwinsup/mingw/config.sub1332
-rwxr-xr-xwinsup/mingw/configure2166
-rw-r--r--winsup/mingw/configure.in140
-rw-r--r--winsup/mingw/crt1.c234
-rw-r--r--winsup/mingw/crtdll.def704
-rw-r--r--winsup/mingw/crtmt.c14
-rw-r--r--winsup/mingw/crtst.c12
-rw-r--r--winsup/mingw/ctype_old.c52
-rw-r--r--winsup/mingw/dirent.c313
-rw-r--r--winsup/mingw/dllcrt1.c89
-rw-r--r--winsup/mingw/dllmain.c33
-rw-r--r--winsup/mingw/gccmain.c85
-rw-r--r--winsup/mingw/include/_mingw.h68
-rw-r--r--winsup/mingw/include/assert.h71
-rw-r--r--winsup/mingw/include/conio.h74
-rw-r--r--winsup/mingw/include/ctype.h153
-rw-r--r--winsup/mingw/include/dir.h26
-rw-r--r--winsup/mingw/include/direct.h95
-rw-r--r--winsup/mingw/include/dirent.h96
-rw-r--r--winsup/mingw/include/dos.h123
-rw-r--r--winsup/mingw/include/errno.h117
-rw-r--r--winsup/mingw/include/excpt.h123
-rw-r--r--winsup/mingw/include/fcntl.h135
-rw-r--r--winsup/mingw/include/float.h219
-rw-r--r--winsup/mingw/include/io.h294
-rw-r--r--winsup/mingw/include/limits.h115
-rw-r--r--winsup/mingw/include/locale.h91
-rw-r--r--winsup/mingw/include/malloc.h78
-rw-r--r--winsup/mingw/include/math.h182
-rw-r--r--winsup/mingw/include/mem.h8
-rw-r--r--winsup/mingw/include/memory.h9
-rw-r--r--winsup/mingw/include/process.h158
-rw-r--r--winsup/mingw/include/setjmp.h72
-rw-r--r--winsup/mingw/include/share.h44
-rw-r--r--winsup/mingw/include/signal.h111
-rw-r--r--winsup/mingw/include/stdarg.h109
-rw-r--r--winsup/mingw/include/stddef.h373
-rw-r--r--winsup/mingw/include/stdio.h380
-rw-r--r--winsup/mingw/include/stdlib.h399
-rw-r--r--winsup/mingw/include/string.h206
-rw-r--r--winsup/mingw/include/sys/fcntl.h8
-rw-r--r--winsup/mingw/include/sys/file.h9
-rw-r--r--winsup/mingw/include/sys/locking.h52
-rw-r--r--winsup/mingw/include/sys/stat.h190
-rw-r--r--winsup/mingw/include/sys/time.h3
-rw-r--r--winsup/mingw/include/sys/timeb.h82
-rw-r--r--winsup/mingw/include/sys/types.h118
-rw-r--r--winsup/mingw/include/sys/unistd.h9
-rw-r--r--winsup/mingw/include/sys/utime.h89
-rw-r--r--winsup/mingw/include/tchar.h355
-rw-r--r--winsup/mingw/include/time.h219
-rw-r--r--winsup/mingw/include/unistd.h10
-rw-r--r--winsup/mingw/include/values.h4
-rw-r--r--winsup/mingw/include/varargs.h98
-rw-r--r--winsup/mingw/include/wchar.h278
-rw-r--r--winsup/mingw/include/wctype.h99
-rw-r--r--winsup/mingw/init.c84
-rwxr-xr-xwinsup/mingw/install-sh253
-rw-r--r--winsup/mingw/jamfile72
-rw-r--r--winsup/mingw/main.c96
-rwxr-xr-xwinsup/mingw/mkinstalldirs36
-rw-r--r--winsup/mingw/moldname-crtdll.def135
-rw-r--r--winsup/mingw/moldname-msvcrt.def139
-rw-r--r--winsup/mingw/moldname.def137
-rw-r--r--winsup/mingw/moldname.def.in139
-rw-r--r--winsup/mingw/msvcrt.def737
-rw-r--r--winsup/mingw/msvcrt20.def719
-rw-r--r--winsup/mingw/msvcrt40.def676
-rw-r--r--winsup/mingw/mthr.c206
-rw-r--r--winsup/mingw/mthr_init.c76
-rw-r--r--winsup/mingw/mthr_stub.c37
-rw-r--r--winsup/mingw/profile/Makefile.in127
-rwxr-xr-xwinsup/mingw/profile/configure1037
-rw-r--r--winsup/mingw/profile/configure.in77
-rw-r--r--winsup/mingw/profile/gcrt0.c52
-rw-r--r--winsup/mingw/profile/gmon.c284
-rw-r--r--winsup/mingw/profile/gmon.h181
-rw-r--r--winsup/mingw/profile/mcount.c180
-rw-r--r--winsup/mingw/profile/profil.c185
-rw-r--r--winsup/mingw/profile/profil.h49
-rw-r--r--winsup/mingw/profile/profile.h63
-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/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.c46
-rw-r--r--winsup/mingw/samples/fmode/jamfile5
-rw-r--r--winsup/mingw/samples/fmode/readme.txt5
-rw-r--r--winsup/mingw/samples/fmode/test.c31
-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/string_old.c47
-rw-r--r--winsup/testsuite/ChangeLog40
-rw-r--r--winsup/testsuite/Makefile.in187
-rw-r--r--winsup/testsuite/README42
-rw-r--r--winsup/testsuite/config/default.exp14
-rw-r--r--winsup/testsuite/configure1193
-rwxr-xr-xwinsup/testsuite/configure.in19
-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.h216
-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.c285
-rw-r--r--winsup/testsuite/libltp/lib/get_high_address.c15
-rw-r--r--winsup/testsuite/libltp/lib/open_flags.c330
-rw-r--r--winsup/testsuite/libltp/lib/parse_opts.c878
-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.c251
-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.c964
-rw-r--r--winsup/testsuite/libltp/lib/tst_sig.c221
-rw-r--r--winsup/testsuite/libltp/lib/tst_tmpdir.c351
-rw-r--r--winsup/testsuite/libltp/lib/write_log.c468
-rw-r--r--winsup/testsuite/winsup.api/crlf.c527
-rw-r--r--winsup/testsuite/winsup.api/devzero.c113
-rw-r--r--winsup/testsuite/winsup.api/iospeed.c115
-rw-r--r--winsup/testsuite/winsup.api/known_bugs.tcl8
-rw-r--r--winsup/testsuite/winsup.api/ltp/access01.c302
-rw-r--r--winsup/testsuite/winsup.api/ltp/access03.c507
-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/asyncio02.c365
-rw-r--r--winsup/testsuite/winsup.api/ltp/chdir02.c220
-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/close08.c241
-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/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.c257
-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/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.c426
-rw-r--r--winsup/testsuite/winsup.api/ltp/fcntl07B.c427
-rw-r--r--winsup/testsuite/winsup.api/ltp/fcntl08.c250
-rw-r--r--winsup/testsuite/winsup.api/ltp/fcntl09.c272
-rw-r--r--winsup/testsuite/winsup.api/ltp/fcntl10.c278
-rw-r--r--winsup/testsuite/winsup.api/ltp/fork01.c317
-rw-r--r--winsup/testsuite/winsup.api/ltp/fork04.c405
-rw-r--r--winsup/testsuite/winsup.api/ltp/fpathconf01.c257
-rw-r--r--winsup/testsuite/winsup.api/ltp/fstat01.c239
-rw-r--r--winsup/testsuite/winsup.api/ltp/fsync01.c248
-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/getgroups01.c315
-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/getpgrp01.c219
-rw-r--r--winsup/testsuite/winsup.api/ltp/getpid01.c217
-rw-r--r--winsup/testsuite/winsup.api/ltp/getppid01.c219
-rw-r--r--winsup/testsuite/winsup.api/ltp/getuid01.c219
-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.c256
-rw-r--r--winsup/testsuite/winsup.api/ltp/lseek02.c243
-rw-r--r--winsup/testsuite/winsup.api/ltp/lseek04.c257
-rw-r--r--winsup/testsuite/winsup.api/ltp/lseek05.c253
-rw-r--r--winsup/testsuite/winsup.api/ltp/lstat02.c253
-rw-r--r--winsup/testsuite/winsup.api/ltp/mkdir01.c271
-rw-r--r--winsup/testsuite/winsup.api/ltp/mkdir08.c236
-rw-r--r--winsup/testsuite/winsup.api/ltp/mknod01.c274
-rw-r--r--winsup/testsuite/winsup.api/ltp/nice05.c220
-rw-r--r--winsup/testsuite/winsup.api/ltp/open03.c243
-rw-r--r--winsup/testsuite/winsup.api/ltp/pathconf01.c246
-rw-r--r--winsup/testsuite/winsup.api/ltp/pause01.c229
-rw-r--r--winsup/testsuite/winsup.api/ltp/readlink02.c244
-rw-r--r--winsup/testsuite/winsup.api/ltp/rename02.c251
-rw-r--r--winsup/testsuite/winsup.api/ltp/rmdir04.c237
-rw-r--r--winsup/testsuite/winsup.api/ltp/select01.c276
-rw-r--r--winsup/testsuite/winsup.api/ltp/setgid01.c219
-rw-r--r--winsup/testsuite/winsup.api/ltp/setgroups01.c229
-rw-r--r--winsup/testsuite/winsup.api/ltp/setpgid01.c240
-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/stat05.c241
-rw-r--r--winsup/testsuite/winsup.api/ltp/symlink01.c2024
-rw-r--r--winsup/testsuite/winsup.api/ltp/symlink02.c245
-rw-r--r--winsup/testsuite/winsup.api/ltp/sync01.c216
-rw-r--r--winsup/testsuite/winsup.api/ltp/time01.c218
-rw-r--r--winsup/testsuite/winsup.api/ltp/times01.c222
-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/uname01.c221
-rw-r--r--winsup/testsuite/winsup.api/ltp/unlink05.c246
-rw-r--r--winsup/testsuite/winsup.api/ltp/unlink06.c255
-rw-r--r--winsup/testsuite/winsup.api/ltp/unlink07.c329
-rw-r--r--winsup/testsuite/winsup.api/ltp/wait02.c230
-rw-r--r--winsup/testsuite/winsup.api/ltp/write01.c250
-rw-r--r--winsup/testsuite/winsup.api/samples/sample-fail.c4
-rw-r--r--winsup/testsuite/winsup.api/samples/sample-miscompile.c1
-rw-r--r--winsup/testsuite/winsup.api/samples/sample-pass.c4
-rw-r--r--winsup/testsuite/winsup.api/sigchld.c20
-rw-r--r--winsup/testsuite/winsup.api/waitpid.c22
-rw-r--r--winsup/testsuite/winsup.api/winsup.exp70
-rw-r--r--winsup/utils/ChangeLog321
-rw-r--r--winsup/utils/Makefile.in171
-rw-r--r--winsup/utils/aclocal.m478
-rwxr-xr-xwinsup/utils/configure1358
-rw-r--r--winsup/utils/configure.in88
-rw-r--r--winsup/utils/cygcheck.cc1095
-rw-r--r--winsup/utils/cygpath.cc377
-rw-r--r--winsup/utils/dumper.cc790
-rw-r--r--winsup/utils/dumper.h131
-rw-r--r--winsup/utils/getfacl.c126
-rw-r--r--winsup/utils/kill.cc129
-rw-r--r--winsup/utils/mkgroup.c475
-rw-r--r--winsup/utils/mkpasswd.c536
-rw-r--r--winsup/utils/module_info.cc114
-rw-r--r--winsup/utils/mount.cc289
-rw-r--r--winsup/utils/parse_pe.cc91
-rw-r--r--winsup/utils/passwd.c353
-rw-r--r--winsup/utils/ps.cc313
-rw-r--r--winsup/utils/regtool.cc524
-rw-r--r--winsup/utils/setfacl.c377
-rw-r--r--winsup/utils/ssp.c802
-rw-r--r--winsup/utils/ssp.txt125
-rw-r--r--winsup/utils/strace.cc645
-rw-r--r--winsup/utils/umount.cc205
-rw-r--r--winsup/utils/utils.sgml676
-rw-r--r--winsup/w32api/CONTRIBUTIONS5
-rw-r--r--winsup/w32api/ChangeLog1320
-rw-r--r--winsup/w32api/Makefile.in126
-rw-r--r--winsup/w32api/README94
-rw-r--r--winsup/w32api/TODO65
-rwxr-xr-xwinsup/w32api/config.guess1302
-rwxr-xr-xwinsup/w32api/config.sub1328
-rwxr-xr-xwinsup/w32api/configure1479
-rw-r--r--winsup/w32api/configure.in49
-rw-r--r--winsup/w32api/include/basetsd.h101
-rw-r--r--winsup/w32api/include/basetyps.h137
-rw-r--r--winsup/w32api/include/cderr.h40
-rw-r--r--winsup/w32api/include/cguid.h78
-rw-r--r--winsup/w32api/include/commctrl.h2059
-rw-r--r--winsup/w32api/include/commdlg.h503
-rw-r--r--winsup/w32api/include/cpl.h54
-rw-r--r--winsup/w32api/include/cplext.h6
-rw-r--r--winsup/w32api/include/custcntl.h98
-rw-r--r--winsup/w32api/include/dbt.h86
-rw-r--r--winsup/w32api/include/dde.h60
-rw-r--r--winsup/w32api/include/ddeml.h241
-rw-r--r--winsup/w32api/include/dlgs.h182
-rw-r--r--winsup/w32api/include/excpt.h17
-rw-r--r--winsup/w32api/include/httpext.h87
-rw-r--r--winsup/w32api/include/imagehlp.h326
-rw-r--r--winsup/w32api/include/imm.h420
-rw-r--r--winsup/w32api/include/initguid.h8
-rw-r--r--winsup/w32api/include/intshcut.h78
-rw-r--r--winsup/w32api/include/ipexport.h22
-rw-r--r--winsup/w32api/include/iphlpapi.h43
-rw-r--r--winsup/w32api/include/ipifcons.h19
-rw-r--r--winsup/w32api/include/iprtrmib.h205
-rw-r--r--winsup/w32api/include/iptypes.h66
-rw-r--r--winsup/w32api/include/isguids.h11
-rw-r--r--winsup/w32api/include/largeint.h109
-rw-r--r--winsup/w32api/include/lm.h24
-rw-r--r--winsup/w32api/include/lmaccess.h605
-rw-r--r--winsup/w32api/include/lmalert.h56
-rw-r--r--winsup/w32api/include/lmapibuf.h14
-rw-r--r--winsup/w32api/include/lmat.h35
-rw-r--r--winsup/w32api/include/lmaudit.h246
-rw-r--r--winsup/w32api/include/lmbrowsr.h70
-rw-r--r--winsup/w32api/include/lmchdev.h57
-rw-r--r--winsup/w32api/include/lmconfig.h17
-rw-r--r--winsup/w32api/include/lmcons.h69
-rw-r--r--winsup/w32api/include/lmerr.h302
-rw-r--r--winsup/w32api/include/lmerrlog.h207
-rw-r--r--winsup/w32api/include/lmmsg.h23
-rw-r--r--winsup/w32api/include/lmremutl.h41
-rw-r--r--winsup/w32api/include/lmrepl.h90
-rw-r--r--winsup/w32api/include/lmserver.h602
-rw-r--r--winsup/w32api/include/lmshare.h143
-rw-r--r--winsup/w32api/include/lmsname.h54
-rw-r--r--winsup/w32api/include/lmstats.h110
-rw-r--r--winsup/w32api/include/lmsvc.h130
-rw-r--r--winsup/w32api/include/lmuse.h56
-rw-r--r--winsup/w32api/include/lmuseflg.h6
-rw-r--r--winsup/w32api/include/lmwksta.h229
-rw-r--r--winsup/w32api/include/lzexpand.h36
-rw-r--r--winsup/w32api/include/mciavi.h21
-rw-r--r--winsup/w32api/include/mcx.h73
-rw-r--r--winsup/w32api/include/mmsystem.h1933
-rw-r--r--winsup/w32api/include/nb30.h182
-rw-r--r--winsup/w32api/include/nddeapi.h127
-rw-r--r--winsup/w32api/include/nspapi.h19
-rw-r--r--winsup/w32api/include/ntdef.h49
-rw-r--r--winsup/w32api/include/ntsecapi.h602
-rw-r--r--winsup/w32api/include/oaidl.h513
-rw-r--r--winsup/w32api/include/objbase.h151
-rw-r--r--winsup/w32api/include/objfwd.h51
-rw-r--r--winsup/w32api/include/objidl.h1660
-rw-r--r--winsup/w32api/include/ocidl.h7
-rw-r--r--winsup/w32api/include/ole.h304
-rw-r--r--winsup/w32api/include/ole2.h106
-rw-r--r--winsup/w32api/include/ole2ver.h5
-rw-r--r--winsup/w32api/include/oleauto.h253
-rw-r--r--winsup/w32api/include/olectl.h721
-rw-r--r--winsup/w32api/include/olectlid.h109
-rw-r--r--winsup/w32api/include/oledlg.h931
-rw-r--r--winsup/w32api/include/oleidl.h320
-rw-r--r--winsup/w32api/include/pbt.h16
-rw-r--r--winsup/w32api/include/poppack.h3
-rw-r--r--winsup/w32api/include/prsht.h244
-rw-r--r--winsup/w32api/include/psapi.h92
-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/rapi.h51
-rw-r--r--winsup/w32api/include/ras.h949
-rw-r--r--winsup/w32api/include/raserror.h206
-rw-r--r--winsup/w32api/include/rassapi.h178
-rw-r--r--winsup/w32api/include/regstr.h763
-rw-r--r--winsup/w32api/include/richedit.h349
-rw-r--r--winsup/w32api/include/richole.h103
-rw-r--r--winsup/w32api/include/rpc.h54
-rw-r--r--winsup/w32api/include/rpcdce.h383
-rw-r--r--winsup/w32api/include/rpcdce2.h52
-rw-r--r--winsup/w32api/include/rpcdcep.h124
-rw-r--r--winsup/w32api/include/rpcndr.h469
-rw-r--r--winsup/w32api/include/rpcnsi.h118
-rw-r--r--winsup/w32api/include/rpcnsip.h21
-rw-r--r--winsup/w32api/include/rpcnterr.h18
-rw-r--r--winsup/w32api/include/rpcproxy.h185
-rw-r--r--winsup/w32api/include/scrnsave.h78
-rw-r--r--winsup/w32api/include/shellapi.h251
-rw-r--r--winsup/w32api/include/shlguid.h73
-rw-r--r--winsup/w32api/include/shlobj.h708
-rw-r--r--winsup/w32api/include/sql.h705
-rw-r--r--winsup/w32api/include/sqlext.h79
-rw-r--r--winsup/w32api/include/sqltypes.h61
-rw-r--r--winsup/w32api/include/subauth.h205
-rw-r--r--winsup/w32api/include/tlhelp32.h136
-rw-r--r--winsup/w32api/include/unknwn.h67
-rw-r--r--winsup/w32api/include/userenv.h53
-rw-r--r--winsup/w32api/include/winbase.h1850
-rw-r--r--winsup/w32api/include/wincon.h203
-rw-r--r--winsup/w32api/include/wincrypt.h185
-rw-r--r--winsup/w32api/include/windef.h225
-rw-r--r--winsup/w32api/include/windows.h151
-rw-r--r--winsup/w32api/include/windowsx.h540
-rw-r--r--winsup/w32api/include/winerror.h1012
-rw-r--r--winsup/w32api/include/wingdi.h2811
-rw-r--r--winsup/w32api/include/wininet.h885
-rw-r--r--winsup/w32api/include/winioctl.h291
-rw-r--r--winsup/w32api/include/winnetwk.h338
-rw-r--r--winsup/w32api/include/winnls.h647
-rw-r--r--winsup/w32api/include/winnt.h2494
-rw-r--r--winsup/w32api/include/winperf.h135
-rw-r--r--winsup/w32api/include/winreg.h155
-rw-r--r--winsup/w32api/include/winresrc.h10
-rw-r--r--winsup/w32api/include/winsock.h523
-rw-r--r--winsup/w32api/include/winsock2.h624
-rw-r--r--winsup/w32api/include/winspool.h778
-rw-r--r--winsup/w32api/include/winsvc.h202
-rw-r--r--winsup/w32api/include/winuser.h3256
-rw-r--r--winsup/w32api/include/winver.h129
-rw-r--r--winsup/w32api/include/wtypes.h160
-rw-r--r--winsup/w32api/include/zmouse.h24
-rwxr-xr-xwinsup/w32api/install-sh251
-rw-r--r--winsup/w32api/lib/Makefile.in221
-rw-r--r--winsup/w32api/lib/advapi32.def350
-rw-r--r--winsup/w32api/lib/cap.def6
-rw-r--r--winsup/w32api/lib/comctl32.def128
-rw-r--r--winsup/w32api/lib/comdlg32.def25
-rw-r--r--winsup/w32api/lib/ctl3d32.def27
-rw-r--r--winsup/w32api/lib/d3dim.def8
-rw-r--r--winsup/w32api/lib/d3drm.def24
-rw-r--r--winsup/w32api/lib/d3dxof.def4
-rw-r--r--winsup/w32api/lib/ddraw.def28
-rw-r--r--winsup/w32api/lib/dinput.c2488
-rw-r--r--winsup/w32api/lib/dinput.def5
-rw-r--r--winsup/w32api/lib/dlcapi.def5
-rw-r--r--winsup/w32api/lib/dplayx.def10
-rw-r--r--winsup/w32api/lib/dsetup.def18
-rw-r--r--winsup/w32api/lib/dsound.def9
-rw-r--r--winsup/w32api/lib/dxguid.c461
-rw-r--r--winsup/w32api/lib/gdi32.def334
-rw-r--r--winsup/w32api/lib/glaux.def173
-rw-r--r--winsup/w32api/lib/glu32.def54
-rw-r--r--winsup/w32api/lib/glut.def116
-rw-r--r--winsup/w32api/lib/glut32.def116
-rw-r--r--winsup/w32api/lib/imagehlp.def114
-rw-r--r--winsup/w32api/lib/imm32.def77
-rw-r--r--winsup/w32api/lib/iphlpapi.def33
-rw-r--r--winsup/w32api/lib/kernel32.def758
-rw-r--r--winsup/w32api/lib/largeint.c118
-rw-r--r--winsup/w32api/lib/lz32.def14
-rw-r--r--winsup/w32api/lib/mapi32.def150
-rw-r--r--winsup/w32api/lib/mfcuia32.def12
-rw-r--r--winsup/w32api/lib/mgmtapi.def12
-rw-r--r--winsup/w32api/lib/mpr.def72
-rw-r--r--winsup/w32api/lib/msacm32.def46
-rw-r--r--winsup/w32api/lib/mswsock.def28
-rw-r--r--winsup/w32api/lib/nddeapi.def30
-rw-r--r--winsup/w32api/lib/netapi32.def247
-rw-r--r--winsup/w32api/lib/odbc32.def62
-rw-r--r--winsup/w32api/lib/ole32.def253
-rw-r--r--winsup/w32api/lib/oleaut32.def146
-rw-r--r--winsup/w32api/lib/olecli32.def57
-rw-r--r--winsup/w32api/lib/oledlg.def25
-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/psapi.def21
-rw-r--r--winsup/w32api/lib/rapi.def84
-rw-r--r--winsup/w32api/lib/rasapi32.def35
-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.def372
-rw-r--r--winsup/w32api/lib/scrnsave.c406
-rw-r--r--winsup/w32api/lib/secur32.def8
-rw-r--r--winsup/w32api/lib/shell32.c51
-rw-r--r--winsup/w32api/lib/shell32.def123
-rw-r--r--winsup/w32api/lib/svrapi.def22
-rw-r--r--winsup/w32api/lib/tapi32.def116
-rw-r--r--winsup/w32api/lib/test.c40
-rw-r--r--winsup/w32api/lib/th32.def14
-rw-r--r--winsup/w32api/lib/thunk32.def68
-rw-r--r--winsup/w32api/lib/url.def9
-rw-r--r--winsup/w32api/lib/user32.def561
-rw-r--r--winsup/w32api/lib/userenv.def11
-rw-r--r--winsup/w32api/lib/uuid.c331
-rw-r--r--winsup/w32api/lib/vdmdbg.def18
-rw-r--r--winsup/w32api/lib/version.def16
-rw-r--r--winsup/w32api/lib/vfw32.def131
-rw-r--r--winsup/w32api/lib/win32spl.def16
-rw-r--r--winsup/w32api/lib/wininet.def159
-rw-r--r--winsup/w32api/lib/winmm.def196
-rw-r--r--winsup/w32api/lib/winspool.def131
-rw-r--r--winsup/w32api/lib/winstrm.def9
-rw-r--r--winsup/w32api/lib/wow32.def19
-rw-r--r--winsup/w32api/lib/ws2_32.def108
-rw-r--r--winsup/w32api/lib/wsock32.def75
-rw-r--r--winsup/w32api/lib/wst.def3
995 files changed, 0 insertions, 256761 deletions
diff --git a/djunpack.bat b/djunpack.bat
deleted file mode 100755
index f09f5ed32..000000000
--- 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 60549be51..000000000
--- 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.
- 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/include/ChangeLog b/include/ChangeLog
deleted file mode 100644
index 1b1af7689..000000000
--- a/include/ChangeLog
+++ /dev/null
@@ -1,2001 +0,0 @@
-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-05 Richard Henderson <rth@redhat.com>
-
- * demangle.h: Change "new_abi" to "v3" everywhere.
-
-2000-11-29 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-08-08 Jason Eckhardt <jle@cygnus.com>
-
- * opcode/i860.h: Small formatting adjustments.
-
-2000-07-29 Nick Clifton <nickc@cygnus.com>
-
- * os9k.h: Add copyright notice.
- Fix formatting.
-
-2000-07-22 Jason Eckhardt <jle@cygnus.com>
-
- * opcode/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.
-
- * elf/i860.h: New file.
- (elf_i860_reloc_type): Defined ELF32 i860 relocations.
-
- * 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-30 DJ Delorie <dj@cygnus.com>
-
- * coff/pe.h: clarify a comment
-
-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.
-
-Fri May 5 16:51:03 2000 Clinton Popetz <cpopetz@cygnus.com>
-
- * coff/rs6k64.h (U802TOC64MAGIC): Change to U803XTOCMAGIC.
-
-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.
-
-Mon Apr 24 15:20:51 2000 Clinton Popetz <cpopetz@cygnus.com>
-
- * include/coff/rs6k64.h: New file.
-
-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.
-
-2000-02-22 Chandra Chavva <cchavva@cygnus.com>
-
- * opcode/d30v.h (FLAG_NOT_WITH_ADDSUBppp): Redefined as operation
- cannot be combined in parallel with ADD/SUBppp.
-
-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.
-
-Mon Nov 30 15:25:58 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * elf/sh.h (elf_sh_reloc_type): Add R_SH_FIRST_INVALID_RELOC,
- R_SH_LAST_INVALID_RELOC, R_SH_SWITCH8 and R_SH_max.
-
-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 May 26 20:57:43 1998 Stan Cox <scox@equinox.cygnus.com>
-
- * elf/sparc.h (EF_SPARC_LEDATA, R_SPARC_32LE): Added.
-
-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 20:24:18 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * coff/sh.h (R_SH_SWITCH8): New.
-
-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 May 13 10:21:14 1997 Nick Clifton <nickc@cygnus.com>
-
- * coff/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.
-
-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>
-
- * coff/pe.h: New file.
- * bfdlink.h (subsytem, stack_heap_parameters): New.
- * coff/i386.h (NT_SECTION_ALIGNMENT, NT_FILE_ALIGNMENT,
- NT_DEF_RESERVE, NT_DEF_COMMIT): New.
- * coff/internal.h (internal_filehdr): New fields for PE.
- (IMAGE_DATA_DIRECTORY): New.
- (internal_aouthdr): New fields for PE.
-
-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)
-
- * aout/aout64.h: Only define QMAGIC if it isn't already defined.
-
- * 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 16:37:14 1993 Stu Grossman (grossman at cygnus.com)
-
- * coff/i386.h: Add Lynx magic number.
-
-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.
-
-Thu Jul 8 09:05:26 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * opcode/h8300.h: Lots of little fixes for the h8/300h.
-
-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.
- * coff/h8300.h: New magic number.
- * coff/internal.h: New relocations.
- * opcode/h8300.h: Lots of new opcodes.
-
-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, opcode/m68k.h, opcode/sparc.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 d59a3bd7f..000000000
--- 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 9c3eea396..000000000
--- 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 e7852c684..000000000
--- a/include/ansidecl.h
+++ /dev/null
@@ -1,232 +0,0 @@
-/* ANSI and traditional C compatability macros
- Copyright 1991, 1992, 1996, 1999 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* ANSI and traditional C compatibility macros
-
- ANSI C is assumed if __STDC__ is #defined.
-
- Macro ANSI C definition Traditional C definition
- ----- ---- - ---------- ----------- - ----------
- PTR `void *' `char *'
- LONG_DOUBLE `long double' `double'
- VOLATILE `volatile' `'
- SIGNED `signed' `'
- PTRCONST `void *const' `char *'
- ANSI_PROTOTYPES 1 not defined
-
- CONST is also defined, but is obsolete. Just use const.
-
- obsolete -- DEFUN (name, arglist, args)
-
- Defines function NAME.
-
- ARGLIST lists the arguments, separated by commas and enclosed in
- parentheses. ARGLIST becomes the argument list in traditional C.
-
- ARGS list the arguments with their types. It becomes a prototype in
- ANSI C, and the type declarations in traditional C. Arguments should
- be separated with `AND'. For functions with a variable number of
- arguments, the last thing listed should be `DOTS'.
-
- obsolete -- DEFUN_VOID (name)
-
- Defines a function NAME, which takes no arguments.
-
- obsolete -- EXFUN (name, (prototype)) -- obsolete.
-
- Replaced by PARAMS. Do not use; will disappear someday soon.
- Was used in external function declarations.
- In ANSI C it is `NAME PROTOTYPE' (so PROTOTYPE should be enclosed in
- parentheses). In traditional C it is `NAME()'.
- For a function that takes no arguments, PROTOTYPE should be `(void)'.
-
- obsolete -- PROTO (type, name, (prototype) -- obsolete.
-
- This one has also been replaced by PARAMS. Do not use.
-
- PARAMS ((args))
-
- We could use the EXFUN macro to handle prototype declarations, but
- the name is misleading and the result is ugly. So we just define a
- simple macro to handle the parameter lists, as in:
-
- static int foo PARAMS ((int, char));
-
- This produces: `static int foo();' or `static int foo (int, char);'
-
- EXFUN would have done it like this:
-
- static int EXFUN (foo, (int, char));
-
- but the function is not external...and it's hard to visually parse
- the function name out of the mess. EXFUN should be considered
- obsolete; new code should be written to use PARAMS.
-
- DOTS is also obsolete.
-
- Examples:
-
- extern int printf PARAMS ((const char *format, ...));
-*/
-
-#ifndef _ANSIDECL_H
-
-#define _ANSIDECL_H 1
-
-
-/* Every source file includes this file,
- so they will all get the switch for lint. */
-/* LINTLIBRARY */
-
-
-#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32)
-/* 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__. */
-
-#define PTR void *
-#define PTRCONST void *CONST
-#define LONG_DOUBLE long double
-
-#ifndef IN_GCC
-#define AND ,
-#define NOARGS void
-#define VOLATILE volatile
-#define SIGNED signed
-#endif /* ! IN_GCC */
-
-#define PARAMS(paramlist) paramlist
-#define ANSI_PROTOTYPES 1
-
-#define VPARAMS(ARGS) ARGS
-#define VA_START(va_list,var) va_start(va_list,var)
-
-/* These are obsolete. Do not use. */
-#ifndef IN_GCC
-#define CONST const
-#define DOTS , ...
-#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)
-#endif /* ! IN_GCC */
-
-#else /* Not ANSI C. */
-
-#define PTR char *
-#define PTRCONST PTR
-#define LONG_DOUBLE double
-
-#ifndef IN_GCC
-#define AND ;
-#define NOARGS
-#define VOLATILE
-#define SIGNED
-#endif /* !IN_GCC */
-
-#ifndef const /* some systems define it in header files for non-ansi mode */
-#define const
-#endif
-
-#define PARAMS(paramlist) ()
-
-#define VPARAMS(ARGS) (va_alist) va_dcl
-#define VA_START(va_list,var) va_start(va_list)
-
-/* These are obsolete. Do not use. */
-#ifndef IN_GCC
-#define CONST
-#define DOTS
-#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()
-#endif /* ! IN_GCC */
-
-#endif /* ANSI C. */
-
-
-/* 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 */
-
-/* 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 (GCC_VERSION >= 2093)
-# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
-# else
-# define ATTRIBUTE_UNUSED_LABEL
-# endif /* GNUC >= 2.93 */
-#endif /* ATTRIBUTE_UNUSED_LABEL */
-
-#ifndef ATTRIBUTE_UNUSED
-#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-#endif /* ATTRIBUTE_UNUSED */
-
-#ifndef ATTRIBUTE_NORETURN
-#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
-#endif /* ATTRIBUTE_NORETURN */
-
-#ifndef ATTRIBUTE_PRINTF
-#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
-#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 */
-
-/* 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 1645a5ac7..000000000
--- a/include/aout/ChangeLog
+++ /dev/null
@@ -1,192 +0,0 @@
-Mon Apr 3 13:29:08 2000 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.
-
-Sun Jun 28 11:33:48 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * stab.def: Add N_ALIAS from SunPro F77.
-
-Mon Mar 11 12:15:52 1996 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.
-
-Fri Oct 27 17:47:16 1995 Niklas Hallqvist <niklas@appli.se>
-
- * aout64.h, host.h, hp300hpux.h, sun4.h: Changed PAGE_SIZE to
- TARGET_PAGE_SIZE.
-
-Tue Sep 12 12:07:02 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * sun4.h (struct internal_sun4_dynamic_link): Change all fields
- from long to unsigned long.
-
-Wed Jul 12 00:15:13 1995 Ken Raeburn <raeburn@kr-pc.cygnus.com>
-
- * sun4.h (PAGE_SIZE): Undefine before defining.
-
-Thu Jun 16 14:22:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * aout64.h (BMAGIC): Define.
-
-Sat Jun 11 16:16:09 1994 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.
-
-Thu Jun 2 17:13:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * sun4.h (EXTERNAL_SUN4_DYNAMIC_DEBUGGER_SIZE): Correct from 28 to
- 24. Fix up ld_got comment.
-
-Wed Mar 30 00:31:49 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * dynix3.h: Cleanup, adapt to current bfd version.
-
-Sat Feb 26 10:25:53 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * aout64.h: Add casts to avoid warnings from SVR4 cc.
-
-Fri Feb 11 12:56:04 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * ar.h (ARMAG, ARMAGB, ARFMAG): Change '\n' to '\012', for greater
- portability.
-
-Fri Jan 21 00:59:06 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * sun4.h: Added information about SunOS shared libraries.
-
-Fri Jan 7 08:20:13 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * aout64.h (N_TXTADDR): Add comment regarding OMAGIC and NMAGIC.
-
-Sat Dec 25 14:55:41 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * aout64.h (N_DATOFF): Don't pad (revert change of 8 Jul 1993).
-
-Tue Nov 16 15:43:46 1993 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.
-
-Thu Nov 4 00:33:48 1993 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.
-
-Wed Nov 3 13:48:27 1993 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.
-
-Fri Oct 29 15:09:52 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * hp300hpux.h (N_SHARED_LIB): Define to be 0.
-
-Mon Sep 13 21:00:56 1993 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.
-
-Mon Aug 16 14:30:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stab_gnu.h: Include aout/stab.def not just stab.def.
-
-Sun Jul 18 21:41:47 1993 Jim Kingdon (kingdon@rtl.cygnus.com)
-
- * dynix3.h: New, for symmetry running dynix.
-
-Thu Jul 8 12:52:22 1993 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.
-
-Fri Jun 18 19:19:38 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stab.def (N_ECOML): Fix comment.
-
-Mon May 31 09:21:30 1993 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.
-
-Mon May 10 05:48:43 1993 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.
-
-Thu Apr 29 12:07:37 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * hp300hpux.h: New file from Glenn Engel, glenne@lsid.hp.com.
-
-Tue Apr 27 05:51:04 1993 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.
-
-Sat Aug 15 04:23:02 1992 John Gilmore (gnu@cygnus.com)
-
- * adobe.h: Add description of a.out.adobe format.
-
-Fri Jul 3 00:36:52 1992 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.
-
-Sun Jun 14 10:53:53 1992 John Gilmore (gnu at cygnus.com)
-
- * stab.def: Update descriptions of Solaris-2 stabs; add N_UNDF.
-
-Thu Jun 11 01:12:07 1992 John Gilmore (gnu at cygnus.com)
-
- * stab.def: Add N_OBJ and N_OPT from Solaris-2.
-
-Thu Jan 30 18:12:44 1992 John Gilmore (gnu at cygnus.com)
-
- * aout/aout64.h: N_TXTSIZE needs some more parentheses.
- I don't trust C precedence.
-
-Wed Dec 18 14:32:01 1991 Per Bothner (bothner at cygnus.com)
-
- * aout/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.
-
-Sat Nov 30 20:34:52 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * ChangeLog, 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 3d2f15c6c..000000000
--- a/include/aout/adobe.h
+++ /dev/null
@@ -1,297 +0,0 @@
-/* `a.out.adobe' differences from standard a.out files */
-
-#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 bec844036..000000000
--- a/include/aout/aout64.h
+++ /dev/null
@@ -1,495 +0,0 @@
-/* `a.out' object-file definitions, including extensions to 64-bit fields */
-
-#ifndef __A_OUT_64_H__
-#define __A_OUT_64_H__
-
-/* 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) ? TARGET_PAGE_SIZE + EXEC_BYTES_SIZE : \
- N_MAGIC(x) != ZMAGIC ? 0 : /* object file or NMAGIC */\
- N_SHARED_LIB(x) ? 0 : \
- N_HEADER_IN_TEXT(x) ? \
- TEXT_START_ADDR + EXEC_BYTES_SIZE : /* no padding */\
- TEXT_START_ADDR /* a page of padding */\
- )
-#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) & ~(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 7b5dcdabd..000000000
--- a/include/aout/ar.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* archive file definition for GNU software */
-
-/* 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 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 efeeebfc4..000000000
--- a/include/aout/dynix3.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * a.out specifics for Sequent Symmetry running Dynix 3.x
- */
-#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], e_g_data[8], 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 b215d49be..000000000
--- a/include/aout/encap.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/* Yet Another Try at encapsulating bsd object files in coff.
- Copyright (C) 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 */
-#define COFF_MAGIC_A29K 0x17A /* Used by asm29k cross-tools */
-
-#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 8e3621271..000000000
--- a/include/aout/host.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Parameters about the a.out format, based on the host system on which
- the program is compiled. */
-
-/* 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 002f49cf4..000000000
--- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 44d519614..000000000
--- a/include/aout/hp300hpux.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/* Special version of <a.out.h> for use under hp-ux.
- Copyright (C) 1988,1993 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) & ~(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 7e185de76..000000000
--- 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 982600514..000000000
--- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 563c552a3..000000000
--- a/include/aout/reloc.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* reloc.h -- Header file for relocation information.
- Copyright 1989-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 9c2d2dd14..000000000
--- a/include/aout/stab.def
+++ /dev/null
@@ -1,268 +0,0 @@
-/* Table of DBX symbol codes for the GNU system.
- Copyright (C) 1988, 91, 92, 93, 94, 95, 96, 1998
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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")
-
-/* 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")
-
-/* 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")
-
-/* 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")
-
-/* 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 | 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 7d18e14a2..000000000
--- a/include/aout/stab_gnu.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#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 f42a0dd45..000000000
--- a/include/aout/sun4.h
+++ /dev/null
@@ -1,219 +0,0 @@
-/* SPARC-specific values for a.out files */
-
-/* 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 ae96323bf..000000000
--- a/include/bfdlink.h
+++ /dev/null
@@ -1,554 +0,0 @@
-/* bfdlink.h -- header file for BFD link routines
- Copyright 1993, 94, 95, 96, 97, 1999 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 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 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_none, /* Don't discard any locals. */
- discard_l, /* Discard local temporary symbols. */
- discard_all /* Discard all locals. */
-};
-
-/* 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. */
-};
-
-/* 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;
-
- /* Undefined and common symbols are kept in a linked list through
- this field. This field is not in the union because that would
- force us to remove entries from the list when we changed their
- type, which would force the list to be doubly linked, which would
- waste more memory. 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;
- /* 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
- {
- bfd *abfd; /* BFD symbol was found in. */
- } undef;
- /* bfd_link_hash_defined, bfd_link_hash_defweak. */
- struct
- {
- bfd_vma value; /* Symbol value. */
- asection *section; /* Symbol section. */
- } def;
- /* bfd_link_hash_indirect, bfd_link_hash_warning. */
- struct
- {
- struct bfd_link_hash_entry *link; /* Real symbol. */
- const char *warning; /* Warning (bfd_link_hash_warning only). */
- } i;
- /* bfd_link_hash_common. */
- struct
- {
- /* 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. */
- bfd_size_type size; /* Common symbol size. */
- struct bfd_link_hash_common_entry
- {
- unsigned int alignment_power; /* Alignment. */
- asection *section; /* Symbol section. */
- } *p;
- } 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;
- /* The back end which created this hash table. This indicates the
- type of the entries in the hash table, which is sometimes
- important information when linking object files of different
- types together. */
- const bfd_target *creator;
- /* 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;
-};
-
-/* 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
- PARAMS ((struct bfd_link_hash_table *, const char *, boolean create,
- boolean copy, 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
- PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean, boolean,
- boolean));
-
-/* Traverse a link hash table. */
-extern void bfd_link_hash_traverse
- PARAMS ((struct bfd_link_hash_table *,
- boolean (*) (struct bfd_link_hash_entry *, PTR),
- PTR));
-
-/* Add an entry to the undefs list. */
-extern void bfd_link_add_undef
- PARAMS ((struct bfd_link_hash_table *, struct bfd_link_hash_entry *));
-
-/* This structure holds all the information needed to communicate
- between BFD and the linker when doing a link. */
-
-struct bfd_link_info
-{
- /* Function callbacks. */
- const struct bfd_link_callbacks *callbacks;
- /* true if BFD should generate a relocateable object file. */
- boolean relocateable;
- /* true if BFD should generate relocation information in the final executable. */
- boolean emitrelocations;
- /* true if BFD should generate a "task linked" object file,
- similar to relocatable but also with globals converted to statics. */
- boolean task_link;
- /* true if BFD should generate a shared object. */
- boolean shared;
- /* true if BFD should pre-bind symbols in a shared object. */
- boolean symbolic;
- /* true if shared objects should be linked directly, not shared. */
- boolean static_link;
- /* 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. */
- boolean traditional_format;
- /* true if we want to produced optimized output files. This might
- need much more time and therefore must be explicitly selected. */
- boolean optimize;
- /* true if BFD should generate errors for undefined symbols
- even if generating a shared object. */
- boolean no_undefined;
- /* true if BFD should allow undefined symbols in shared objects even
- when no_undefined is set to disallow undefined symbols. The net
- result will be that undefined symbols in regular objects will
- still trigger an error, but undefined symbols in shared objects
- will be ignored. The implementation of no_undefined makes the
- assumption that the runtime linker will choke on undefined
- symbols. However there is at least one system (BeOS) where
- undefined symbols in shared libraries is normal since the kernel
- patches them at load time to select which function is most
- appropriate for the current architecture. I.E. dynamically
- select an appropriate memset function. Apparently it is also
- normal for HPPA shared libraries to have undefined symbols. */
- boolean allow_shlib_undefined;
- /* Which symbols to strip. */
- enum bfd_link_strip strip;
- /* Which local symbols to discard. */
- enum bfd_link_discard discard;
- /* true if symbols should be retained in memory, false if they
- should be freed and reread. */
- boolean keep_memory;
- /* The list of input BFD's involved in the link. These are chained
- together via the link_next field. */
- bfd *input_bfds;
- /* 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;
- /* 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;
- /* true if every symbol should be reported back via the notice
- callback. */
- boolean notice_all;
- /* 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;
- /* If a base output file is wanted, then this points to it */
- PTR base_file;
-
- /* If non-zero, specifies that branches which are problematic for the
- MPC860 C0 (or earlier) should be checked for and modified. It gives the
- number of bytes that should be checked at the end of each text page. */
- int mpc860c0;
-
- /* 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;
-
- /* true if the new ELF dynamic tags are enabled. */
- boolean new_dtags;
-
- /* 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;
-};
-
-/* This structures holds a set of callback functions. These are
- called by the BFD linker routines. The first argument to each
- callback function is the bfd_link_info structure being used. Each
- function returns a boolean value. If the function returns false,
- then the BFD function which called it will 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. */
- boolean (*add_archive_element) PARAMS ((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. */
- boolean (*multiple_definition) PARAMS ((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. */
- boolean (*multiple_common) PARAMS ((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 relocateable 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. */
- boolean (*add_to_set) PARAMS ((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
- relocateable file. NAME is the name of the symbol found. ABFD,
- SECTION and VALUE are the value of the symbol. */
- boolean (*constructor) PARAMS ((struct bfd_link_info *,
- 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. */
- boolean (*warning) PARAMS ((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. */
- boolean (*undefined_symbol) PARAMS ((struct bfd_link_info *,
- const char *name, bfd *abfd,
- asection *section,
- bfd_vma address,
- boolean fatal));
- /* A function which is called when a reloc overflow occurs. NAME is
- the name of the 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. */
- boolean (*reloc_overflow) PARAMS ((struct bfd_link_info *,
- 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.
- The canonical example is an a29k IHCONST reloc which does not
- follow an IHIHALF reloc. 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. */
- boolean (*reloc_dangerous) PARAMS ((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. */
- boolean (*unattached_reloc) PARAMS ((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. */
- boolean (*notice) PARAMS ((struct bfd_link_info *, const char *name,
- bfd *abfd, asection *section, bfd_vma address));
-};
-
-/* 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_fill_link_order, /* Fill with a 16 bit constant. */
- 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 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->_raw_size
- must equal the link_order size field. Maybe these
- restrictions should be relaxed someday. */
- asection *section;
- } indirect;
- struct
- {
- /* Value to fill with. */
- unsigned int value;
- } fill;
- struct
- {
- /* Data to put into file. The size field gives the number
- of bytes which this field points to. */
- 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 PARAMS ((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. */
-
-/* Regular expressions for a version. */
-
-struct bfd_elf_version_expr
-{
- /* Next regular expression for this version. */
- struct bfd_elf_version_expr *next;
- /* Regular expression. */
- const char *pattern;
- /* Matching function. */
- int (*match) PARAMS((struct bfd_elf_version_expr *, const char *));
-};
-
-/* 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 *globals;
- /* Regular expressions for local symbols in this version. */
- struct bfd_elf_version_expr *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;
-};
-
-#endif
diff --git a/include/bin-bugs.h b/include/bin-bugs.h
deleted file mode 100644
index cb14a66bf..000000000
--- a/include/bin-bugs.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#ifndef REPORT_BUGS_TO
-#define REPORT_BUGS_TO "bug-gnu-utils@gnu.org"
-#endif
diff --git a/include/bout.h b/include/bout.h
deleted file mode 100644
index 8fc28cc3d..000000000
--- a/include/bout.h
+++ /dev/null
@@ -1,182 +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).
- *
- * 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/callback.h b/include/callback.h
deleted file mode 100644
index 30752842e..000000000
--- a/include/callback.h
+++ /dev/null
@@ -1,270 +0,0 @@
-/* Remote target system call callback support.
- Copyright 1997 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 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 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>
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-
-/* 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 *));
-
- /* 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];
- char fdopen[MAX_CALLBACK_FDS];
- char alwaysopen[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;
-
- /* 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
-
-/* 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));
-
-/* Perform a system call. */
-CB_RC cb_syscall PARAMS ((host_callback *, CB_SYSCALL *));
-
-#endif
diff --git a/include/coff/ChangeLog b/include/coff/ChangeLog
deleted file mode 100644
index d73c51af2..000000000
--- a/include/coff/ChangeLog
+++ /dev/null
@@ -1,927 +0,0 @@
-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-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>
-
- * coff/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>
-
- * coff/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.
-
-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.
-
-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>
-
- * coff/powerpc.h (IMAGE_NT_OPTIONAL_HDR_MAGIC): Added define.
- * coff/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.
-
-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)
-
- * coff/internal.h: Added o_sri, o_inlib and o_vid for Apollos
- as well as R_DIR16.
-
- * coff/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.
-
-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.
-
-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)
-
- * ChangeLog, 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/a29k.h b/include/coff/a29k.h
deleted file mode 100644
index 8c3a646ca..000000000
--- a/include/coff/a29k.h
+++ /dev/null
@@ -1,305 +0,0 @@
-/* COFF spec for AMD 290*0
- Contributed by David Wood @ New York University.
- */
-
-#ifndef AMD
-# define AMD
-#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 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 A29K_MAGIC_BIG SIPFBOMAGIC
-#define A29K_MAGIC_LITTLE SIPRBOMAGIC
-#define A29KBADMAG(x) (((x).f_magic!=A29K_MAGIC_BIG) && \
- ((x).f_magic!=A29K_MAGIC_LITTLE))
-
-#define OMAGIC A29K_MAGIC_BIG
-/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
-
-/*
-** File header flags currently known to us.
-**
-** Am29000 will use the F_AR32WR and F_AR32W flags to indicate
-** the byte ordering in the file.
-*/
-
-/*--------------------------------------------------------------*/
-
-/*
-** 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 Am29000.
-**
-** 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 Am29000
-*/
-
-#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/alpha.h b/include/coff/alpha.h
deleted file mode 100644
index 076cbcbd9..000000000
--- a/include/coff/alpha.h
+++ /dev/null
@@ -1,362 +0,0 @@
-/* ECOFF support on Alpha machines.
- coff/ecoff.h must be included before this file. */
-
-/********************** 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)
-
-/* 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 d1347f1f5..000000000
--- a/include/coff/apollo.h
+++ /dev/null
@@ -1,252 +0,0 @@
-/*** coff information for Apollo M68K */
-
-/********************** 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 */
-};
-
-
-/* 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) )
-
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** 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
-
-
-
-/********************** SECTION HEADER **********************/
-
-struct external_scnhdr {
- /* Apollo allow for larger section names by allowing it to be in
- * the string table.
- */
- char s_name[8];
- 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 */
-};
-
-/* 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)
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#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 */
-
-#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)) */
-
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-
-
-/********************** 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 7ca93299a..000000000
--- a/include/coff/arm.h
+++ /dev/null
@@ -1,303 +0,0 @@
-/* ARM COFF support for BFD.
- Copyright (C) 1998, 1999 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. */
-
-#define COFFARM 1
-
-/********************** 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 */
-};
-
-/* 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)
-
-/* 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 FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** 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 */
-}
-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 */
- 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"
-
-/* We use the .rdata section to hold read only data. */
-#define _LIT ".rdata"
-
-/********************** 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 (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 */
- char x_checksum[4]; /* section COMDAT checksum */
- char x_associated[2]; /* COMDAT associated section index */
- char x_comdat[1]; /* COMDAT selection number */
- } 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
-
-#define _ETEXT "etext"
-
-/********************** 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
diff --git a/include/coff/aux-coff.h b/include/coff/aux-coff.h
deleted file mode 100644
index c89c124d3..000000000
--- a/include/coff/aux-coff.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Modifications of internal.h and m68k.h needed by A/UX
- 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 9e4202e47..000000000
--- a/include/coff/ecoff.h
+++ /dev/null
@@ -1,421 +0,0 @@
-#ifndef ECOFF_H
-#define ECOFF_H
-
-/* Generic ECOFF support.
- This does not include symbol information, found in sym.h and
- symconst.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
-
-/* 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;
- PTR external_dnr; /* struct dnr_ext */
- PTR external_pdr; /* struct pdr_ext */
- PTR external_sym; /* struct sym_ext */
- PTR external_opt; /* struct opt_ext */
- union aux_ext *external_aux;
- char *ss;
- char *ssext;
- PTR external_fdr; /* struct fdr_ext */
- PTR external_rfd; /* struct rfd_ext */
- PTR external_ext; /* struct ext_ext */
-
- /* These fields are used when linking. They may disappear at some
- point. */
- char *ssext_end;
- PTR 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;
-
- /* When relaxing MIPS embedded PIC code, we may need to adjust
- symbol values when they are output. This is a linked list of
- structures indicating how values should be adjusted. There is no
- requirement that the entries be in any order, or that they not
- overlap. This field is normally NULL, in which case no
- adjustments need to be made. */
- struct ecoff_value_adjust *adjust;
-};
-
-/* This structure describes how to adjust symbol values when
- outputting MIPS embedded PIC code. These adjustments only apply to
- the internal symbols, as the external symbol values will come from
- the hash table and have already been adjusted. */
-
-struct ecoff_value_adjust
-{
- /* Next entry on adjustment list. */
- struct ecoff_value_adjust *next;
- /* Starting VMA of adjustment. This is the VMA in the ECOFF file,
- not the offset from the start of the section. Thus it should
- indicate a particular section. */
- bfd_vma start;
- /* Ending VMA of adjustment. */
- bfd_vma end;
- /* Adjustment. This should be added to the value of the symbol, or
- FDR. This is zero for the last entry in the array. */
- long adjust;
-};
-
-/* 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) PARAMS ((bfd *, PTR, HDRR *));
- void (*swap_dnr_in) PARAMS ((bfd *, PTR, DNR *));
- void (*swap_pdr_in) PARAMS ((bfd *, PTR, PDR *));
- void (*swap_sym_in) PARAMS ((bfd *, PTR, SYMR *));
- void (*swap_opt_in) PARAMS ((bfd *, PTR, OPTR *));
- void (*swap_fdr_in) PARAMS ((bfd *, PTR, FDR *));
- void (*swap_rfd_in) PARAMS ((bfd *, PTR, RFDT *));
- void (*swap_ext_in) PARAMS ((bfd *, PTR, EXTR *));
- void (*swap_tir_in) PARAMS ((int, const struct tir_ext *, TIR *));
- void (*swap_rndx_in) PARAMS ((int, const struct rndx_ext *, RNDXR *));
- /* Functions to swap out external symbolic data. */
- void (*swap_hdr_out) PARAMS ((bfd *, const HDRR *, PTR));
- void (*swap_dnr_out) PARAMS ((bfd *, const DNR *, PTR));
- void (*swap_pdr_out) PARAMS ((bfd *, const PDR *, PTR));
- void (*swap_sym_out) PARAMS ((bfd *, const SYMR *, PTR));
- void (*swap_opt_out) PARAMS ((bfd *, const OPTR *, PTR));
- void (*swap_fdr_out) PARAMS ((bfd *, const FDR *, PTR));
- void (*swap_rfd_out) PARAMS ((bfd *, const RFDT *, PTR));
- void (*swap_ext_out) PARAMS ((bfd *, const EXTR *, PTR));
- void (*swap_tir_out) PARAMS ((int, const TIR *, struct tir_ext *));
- void (*swap_rndx_out) PARAMS ((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. */
- boolean (*read_debug_info) PARAMS ((bfd *, asection *,
- struct ecoff_debug_info *));
-};
-
-#endif /* ! defined (ECOFF_H) */
diff --git a/include/coff/go32exe.h b/include/coff/go32exe.h
deleted file mode 100644
index 5bd26c134..000000000
--- a/include/coff/go32exe.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* COFF information for PC running go32. */
-
-#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 9b62394f3..000000000
--- a/include/coff/h8300.h
+++ /dev/null
@@ -1,204 +0,0 @@
-/*** coff information for Hitachi H8/300 and H8/300-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 */
-};
-
-
-
-#define H8300MAGIC 0x8300
-#define H8300HMAGIC 0x8301
-#define H8300SMAGIC 0x8302
-
-#define H8300BADMAG(x) (((x).f_magic!=H8300MAGIC))
-#define H8300HBADMAG(x) (((x).f_magic!=H8300HMAGIC))
-#define H8300SBADMAG(x) (((x).f_magic!=H8300SMAGIC))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** 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 */
-}
-AOUTHDR;
-
-
-#define AOUTHDRSZ 28
-#define AOUTSZ 28
-
-
-
-
-/********************** 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 */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-
-#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[4]; /* line number */
-};
-
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
-
-#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_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
-
-
-
-/********************** 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 0305bf2b7..000000000
--- a/include/coff/h8500.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/*** coff information for Hitachi H8/500 */
-
-/********************** 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 H8500MAGIC 0x8500
-
-
-#define H8500BADMAG(x) ((0xffff && ((x).f_magic)!=H8500MAGIC))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** 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 */
-}
-AOUTHDR;
-
-
-#define AOUTHDRSZ 28
-#define AOUTSZ 28
-
-
-
-
-/********************** 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 */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-
-#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[4]; /* line number */
-};
-
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
-
-#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_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
-
-
-
-/********************** 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 5ebf4a2e0..000000000
--- a/include/coff/i386.h
+++ /dev/null
@@ -1,228 +0,0 @@
-/*** coff information for Intel 386/486. */
-
-
-/********************** 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 */
-};
-
-/* 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
-{
- 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
-
-#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 */
- 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"
-
-/********************** 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 (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 */
- char x_checksum[4]; /* section COMDAT checksum */
- char x_associated[2]; /* COMDAT associated section index */
- char x_comdat[1]; /* COMDAT selection number */
- } 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
-
-
-# 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
-
diff --git a/include/coff/i860.h b/include/coff/i860.h
deleted file mode 100644
index 73686e92b..000000000
--- a/include/coff/i860.h
+++ /dev/null
@@ -1,205 +0,0 @@
-/* This file was hacked from i386.h [dolan@ssd.intel.com] */
-
-/*** coff information for Intel 860. */
-
-
-/********************** 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 */
-};
-
-
-/* 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)
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** 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 */
-}
-AOUTHDR;
-
-
-#define AOUTSZ 28
-#define AOUTHDRSZ 28
-
-/* FIXME: What are the a.out magic numbers? */
-
-/********************** 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"
-
-/********************** 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 (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; /* 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
diff --git a/include/coff/i960.h b/include/coff/i960.h
deleted file mode 100644
index 0935836c1..000000000
--- a/include/coff/i960.h
+++ /dev/null
@@ -1,275 +0,0 @@
-/*** coff information for 80960. Origins: Intel corp, natch. */
-
-/* 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 a1157869c..000000000
--- a/include/coff/ia64.h
+++ /dev/null
@@ -1,222 +0,0 @@
-/*** coff information for HP/Intel IA-64. */
-
-
-/********************** 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 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)
-
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** 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
-
-/********************** 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"
-
-/********************** 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 (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 */
- char x_checksum[4]; /* section COMDAT checksum */
- char x_associated[2]; /* COMDAT associated section index */
- char x_comdat[1]; /* COMDAT selection number */
- } 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
-
-
-# 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
-
diff --git a/include/coff/internal.h b/include/coff/internal.h
deleted file mode 100644
index c6f276036..000000000
--- a/include/coff/internal.h
+++ /dev/null
@@ -1,731 +0,0 @@
-/* Internal format of COFF object file data structures, for GNU BFD.
- This file is part of BFD, the Binary File Descriptor library. */
-
-#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 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
-{
- /* 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 */
- unsigned long 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 */
- unsigned long o_maxstack; /* max stack size allowed. */
- unsigned long 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 */
-
-#define C_WEAKEXT 127 /* weak symbol -- GNU extension */
-
-/* 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
- {
- long l_symndx; /* function name symbol index, iff l_lnno == 0*/
- long 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
- {
- long _n_zeroes; /* new == 0 */
- long _n_offset; /* offset into string table */
- } _n_n;
- char *_n_nptr[2]; /* allows for overlaying */
- } _n;
- long 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 */
- long 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 */
- long 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 */
-};
-
-#define R_DIR16 1
-#define R_DIR32 6
-#define R_IMAGEBASE 7
-#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_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_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 formerlly 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 formerlly 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 formerlly 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 */
-
-/* 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 c9147ed01..000000000
--- a/include/coff/m68k.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/*** coff information for M68K */
-
-#ifndef GNU_COFF_M68K_H
-#define GNU_COFF_M68K_H 1
-
-/********************** 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 */
-};
-
-
-/* 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) */
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** 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 */
-}
-AOUTHDR;
-
-#define AOUTSZ 28
-#define AOUTHDRSZ 28
-
-
-/********************** 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 */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _COMMENT ".comment"
-
-#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)) */
-
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-
-
-/********************** 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 e06eb4165..000000000
--- a/include/coff/m88k.h
+++ /dev/null
@@ -1,219 +0,0 @@
-/*** coff information for 88k bcs */
-
-/********************** 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 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 FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-#define PAGEMAGIC3 0414 /* Split i&d, zero mapped */
-#define PAGEMAGICBCS 0413
-
-
-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 */
-}
-AOUTHDR;
-
-
-/* compute size of a header */
-
-#define AOUTSZ 28
-#define AOUTHDRSZ 28
-
-
-/********************** 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"
-
-/********************** 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[4];
-
-};
-
-#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_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_FCN_LNNOPTR(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *)ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
-#define GET_FCN_ENDNDX(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_endndx)
-#define PUT_FCN_LNNOPTR(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
-#define PUT_FCN_ENDNDX(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_endndx)
-#define GET_LNSZ_SIZE(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_size)
-#define GET_LNSZ_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_lnno)
-#define PUT_LNSZ_LNNO(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_lnno)
-#define PUT_LNSZ_SIZE(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_size)
-#define GET_SCN_SCNLEN(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_scnlen)
-#define GET_SCN_NRELOC(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_nreloc)
-#define GET_SCN_NLINNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_nlinno)
-#define PUT_SCN_SCNLEN(abfd,in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_scn.x_scnlen)
-#define PUT_SCN_NRELOC(abfd,in, ext) bfd_h_put_32(abfd, in, (bfd_byte *)ext->x_scn.x_nreloc)
-#define PUT_SCN_NLINNO(abfd,in, ext) bfd_h_put_32(abfd,in, (bfd_byte *) ext->x_scn.x_nlinno)
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno))
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
-
-
-
-#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/mcore.h b/include/coff/mcore.h
deleted file mode 100644
index 0fa319c97..000000000
--- a/include/coff/mcore.h
+++ /dev/null
@@ -1,246 +0,0 @@
-/* Motorola MCore support for BFD.
- Copyright (C) 1999 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. */
-
-/* This file holds definitions specific to the MCore COFF/PE ABI. */
-
-#ifndef _COFF_MORE_H
-#define _COFF_MORE_H
-
-
-#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
-
-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 */
-}
-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 */
-
-/* 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
-
-#define MCOREMAGIC 0xb00 /* I just made this up */
-
-#define MCOREBADMAG(x) (((x).f_magic!= MCOREMAGIC))
-
-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
-
-
-#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 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 */
- char x_checksum [4]; /* section COMDAT checksum */
- char x_associated [2]; /* COMDAT associated section index */
- char x_comdat [1]; /* COMDAT selection number */
- } 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
-
-/* 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
-
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32 (abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32 (abfd, val, (bfd_byte *) (ext->l_lnno));
-
-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"
-
-
-
-#endif /* __COFF_MCORE_H */
diff --git a/include/coff/mips.h b/include/coff/mips.h
deleted file mode 100644
index d4665b1f3..000000000
--- a/include/coff/mips.h
+++ /dev/null
@@ -1,369 +0,0 @@
-/* ECOFF support on MIPS machines.
- coff/ecoff.h must be included before this file. */
-
-/********************** 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[4]; /* 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 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))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-/********************** 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
-
-/********************** SECTION HEADER **********************/
-
-struct external_scnhdr {
- unsigned char s_name[8]; /* section name */
- unsigned char s_paddr[4]; /* physical address, aliased s_nlib */
- unsigned char s_vaddr[4]; /* virtual address */
- unsigned char s_size[4]; /* section size */
- unsigned char s_scnptr[4]; /* file ptr to raw data for section */
- unsigned char s_relptr[4]; /* file ptr to relocation */
- unsigned char s_lnnoptr[4]; /* 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 40
-
-/********************** 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
-
-/* These reloc types are a Cygnus extension used when generating
- position independent code for embedded systems. The numbers are
- taken from Irix 4, but at least for internal relocs Irix 5 does not
- give them the same meaning. For an internal reloc the symbol index
- of RELHI and RELLO is modified as described below for
- MIPS_R_SWITCH. */
-#define MIPS_R_PCREL16 12
-#define MIPS_R_RELHI 13
-#define MIPS_R_RELLO 14
-
-/* This reloc type is a Cygnus extension used when generating position
- independent code for embedded systems. It is used for an entry in
- a switch table, which looks like this:
- .word $L3-$LS12
- The object file will contain the correct difference, and does not
- require adjustment. However, when the linker is relaxing PC
- relative calls, it is possible for $L3 to move farther away. This
- reloc always appears in the .text section, and is always against
- the .text section. However, the symbol index is not
- RELOC_SECTION_TEXT. It is, instead, the distance between this
- switch table entry and $LS12. Thus, the original value of $L12 is
- vaddr - symndx
- and the original value of $L3 is
- vaddr - symndx + addend
- where addend is the value in the object file. Knowing this, the
- linker can know whether the addend in the object file must be
- adjusted. */
-#define MIPS_R_SWITCH 22
-
-/********************** 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 1927d991d..000000000
--- a/include/coff/mipspe.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*** coff information for Windows CE with MIPS VR4111 */
-
-/********************** 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 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 FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** 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 */
-}
-AOUTHDR;
-
-
-#define AOUTHDRSZ 28
-#define AOUTSZ 28
-
-
-
-
-/* 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 */
- 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 */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-
-#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 GET_LINENO_LNNO(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_16(abfd,val, (bfd_byte *) (ext->l_lnno));
-
-#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 */
- char x_checksum[4]; /* section COMDAT checksum */
- char x_associated[2]; /* COMDAT associated section index */
- char x_comdat[1]; /* COMDAT selection number */
- } 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
-
-
-
-/********************** 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/pe.h b/include/coff/pe.h
deleted file mode 100644
index f2c022ea7..000000000
--- a/include/coff/pe.h
+++ /dev/null
@@ -1,260 +0,0 @@
-/* pe.h - PE COFF header information
-
- Copyright (C) 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_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
-
-#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. */
-
-/* Machine numbers. */
-
-#define IMAGE_FILE_MACHINE_UNKNOWN 0x0
-#define IMAGE_FILE_MACHINE_ALPHA 0x184
-#define IMAGE_FILE_MACHINE_ARM 0x1c0
-#define IMAGE_FILE_MACHINE_ALPHA64 0x284
-#define IMAGE_FILE_MACHINE_I386 0x14c
-#define IMAGE_FILE_MACHINE_IA64 0x200
-#define IMAGE_FILE_MACHINE_M68K 0x268
-#define IMAGE_FILE_MACHINE_MIPS16 0x266
-#define IMAGE_FILE_MACHINE_MIPSFPU 0x366
-#define IMAGE_FILE_MACHINE_MIPSFPU16 0x466
-#define IMAGE_FILE_MACHINE_POWERPC 0x1f0
-#define IMAGE_FILE_MACHINE_R3000 0x162
-#define IMAGE_FILE_MACHINE_R4000 0x166
-#define IMAGE_FILE_MACHINE_R10000 0x168
-#define IMAGE_FILE_MACHINE_SH3 0x1a2
-#define IMAGE_FILE_MACHINE_SH4 0x1a6
-#define IMAGE_FILE_MACHINE_THUMB 0x1c2
-
-#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
-
-/* 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_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
-{
- AOUTHDR standard;
-
- /* 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. */
-} PEP64AOUTHDR;
-#define PEP64AOUTSZ 240
-
-#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
-
-#endif /* _PE_H */
diff --git a/include/coff/powerpc.h b/include/coff/powerpc.h
deleted file mode 100644
index 9552cf9f4..000000000
--- a/include/coff/powerpc.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/* Basic coff information for the PowerPC
- *
- * Based on coff/rs6000.h, coff/i386.h and others.
- *
- * Initial release: Kim Knuttila (krk@cygnus.com)
- */
-
-/********************** 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
-
-/* 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)
-
-/********************** 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 */
-}
-AOUTHDR;
-
-#define AOUTSZ 28
-#define AOUTHDRSZ 28
-
-/********************** 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"
-
-/********************** 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 */
-
-/* Allow the file name length to be overridden in the including file */
-#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];
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-
-#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 */
- char x_checksum[4]; /* section COMDAT checksum */
- char x_associated[2]; /* COMDAT associated section index */
- char x_comdat[1]; /* COMDAT selection number */
- } x_scn;
-};
-
-#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
-
diff --git a/include/coff/rs6000.h b/include/coff/rs6000.h
deleted file mode 100644
index 0def1d95d..000000000
--- a/include/coff/rs6000.h
+++ /dev/null
@@ -1,243 +0,0 @@
-/* IBM RS/6000 "XCOFF" file definitions for BFD.
- Copyright (C) 1990, 1991 Free Software Foundation, Inc.
- FIXME: Can someone provide a transliteration of this name into ASCII?
- Using the following chars caused a compiler warning on HIUX (so I replaced
- them with octal escapes), and isn't useful without an understanding of what
- character set it is.
- Written by Mimi Ph\373\364ng-Th\345o V\365 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
-
-#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 */
-
-
-/********************** 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 */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _PAD ".pad"
-#define _LOADER ".loader"
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ 40
-
-/* 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
-
-/********************** 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
diff --git a/include/coff/rs6k64.h b/include/coff/rs6k64.h
deleted file mode 100644
index 80d8e4c0e..000000000
--- a/include/coff/rs6k64.h
+++ /dev/null
@@ -1,236 +0,0 @@
-/* IBM RS/6000 "XCOFF64" file definitions for BFD.
- Copyright (C) 2000 Free Software Foundation, Inc. */
-
-/********************** 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 /* readonly text segments and TOC, XCOFF64 */
-
-#define BADMAG(x) ((x).f_magic != U803XTOCMAGIC)
-
-#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
-
-#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 */
-
-
-/********************** 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 */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _PAD ".pad"
-#define _LOADER ".loader"
-
-#define SCNHDR struct external_scnhdr
-
-#define SCNHSZ 72
-
-/* 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
-
-/********************** 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[8];/* 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
-{
- union {
- char e_value[8];
- } e;
- 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
diff --git a/include/coff/sh.h b/include/coff/sh.h
deleted file mode 100644
index 2ea0d2625..000000000
--- a/include/coff/sh.h
+++ /dev/null
@@ -1,310 +0,0 @@
-/*** coff information for Hitachi SH */
-
-/********************** 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 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 FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** 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 */
-}
-AOUTHDR;
-
-
-#define AOUTHDRSZ 28
-#define AOUTSZ 28
-
-
-
-/* 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 */
- 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 */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-
-#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;
-#ifdef COFF_WITH_PE
- char l_lnno[2]; /* line number */
-#else
- char l_lnno[4]; /* line number */
-#endif
-};
-
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
-
-#define LINENO struct external_lineno
-#ifdef COFF_WITH_PE
-#define LINESZ 6
-#undef GET_LINENO_LNNO
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *) (ext->l_lnno));
-#undef PUT_LINENO_LNNO
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_16(abfd,val, (bfd_byte *) (ext->l_lnno));
-#else
-#define LINESZ 8
-#endif
-
-
-/********************** 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 */
- char x_checksum[4]; /* section COMDAT checksum */
- char x_associated[2]; /* COMDAT associated section index */
- char x_comdat[1]; /* COMDAT selection number */
- } 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
-
-
-
-/********************** 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 82a24f01e..000000000
--- a/include/coff/sparc.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/*** coff information for Sparc. */
-
-/* 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. */
-
-/********************** 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 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 FILHDR struct external_filehdr
-#define FILHSZ 20
-
-/********************** 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 */
-}
-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 */
-
-/********************** 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 _TV ".tv"
-#define _INIT ".init"
-#define _FINI ".fini"
-#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 {
- char l_symndx[4]; /* fn 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;
-#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 76204af59..000000000
--- 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 f40eef2a3..000000000
--- 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 /* maximun 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 445707ccd..000000000
--- a/include/coff/ti.h
+++ /dev/null
@@ -1,434 +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). */
-#ifndef COFF_TI_H
-#define COFF_TI_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]; /* 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
-
-/* 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 = \
-bfd_h_get_16(abfd, (bfd_byte *)(((FILHDR *)(src))->f_target_id)); \
-} while(0)
-#endif
-
-#ifndef COFF_ADJUST_FILEHDR_OUT_POST
-#define COFF_ADJUST_FILEHDR_OUT_POST(abfd,src,dst) \
-do { bfd_h_put_16(abfd, ((struct internal_filehdr *)(src))->f_target_id, \
- (bfd_byte *)(((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)
-/* 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
- */
-#define GET_SCNHDR_NRELOC(ABFD,PTR) \
-(COFF2_P(ABFD) ? bfd_h_get_32 (ABFD,PTR) : bfd_h_get_16 (ABFD, PTR))
-#define PUT_SCNHDR_NRELOC(ABFD,VAL,PTR) \
-(COFF2_P(ABFD) ? bfd_h_put_32 (ABFD,VAL,PTR) : bfd_h_put_16 (ABFD,VAL,PTR))
-#define GET_SCNHDR_NLNNO(ABFD,PTR) \
-(COFF2_P(ABFD) ? bfd_h_get_32 (ABFD,PTR) : bfd_h_get_16 (ABFD, (PTR)-2))
-#define PUT_SCNHDR_NLNNO(ABFD,VAL,PTR) \
-(COFF2_P(ABFD) ? bfd_h_put_32 (ABFD,VAL,PTR) : bfd_h_put_16 (ABFD,VAL,(PTR)-2))
-#define GET_SCNHDR_FLAGS(ABFD,PTR) \
-(COFF2_P(ABFD) ? bfd_h_get_32 (ABFD,PTR) : bfd_h_get_16 (ABFD, (PTR)-4))
-#define PUT_SCNHDR_FLAGS(ABFD,VAL,PTR) \
-(COFF2_P(ABFD) ? bfd_h_put_32 (ABFD,VAL,PTR) : bfd_h_put_16 (ABFD,VAL,(PTR)-4))
-#define GET_SCNHDR_PAGE(ABFD,PTR) \
-(COFF2_P(ABFD) ? bfd_h_get_16 (ABFD,PTR) : bfd_h_get_8 (ABFD, (PTR)-7))
-/* on output, make sure that the "reserved" field is zero */
-#define PUT_SCNHDR_PAGE(ABFD,VAL,PTR) \
-(COFF2_P(ABFD) ? bfd_h_put_16 (ABFD,VAL,PTR) : \
-bfd_h_put_8 (ABFD,VAL,(PTR)-7), bfd_h_put_8 (ABFD, 0, (PTR)-8))
-
-/* 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) \
-(bfd_h_get_32(ABFD,SZP)*bfd_octets_per_byte(ABFD))
-#define PUT_SCNHDR_SIZE(ABFD,SZ,SZP) \
-bfd_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,(bfd_byte *)((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,\
- (bfd_byte *)((SCNHDR *)(EXT))->s_nlnno); \
-PUT_SCNHDR_NRELOC(ABFD,((struct internal_scnhdr *)(INT))->s_nreloc,\
- (bfd_byte *)((SCNHDR *)(EXT))->s_nreloc); \
-PUT_SCNHDR_FLAGS(ABFD,((struct internal_scnhdr *)(INT))->s_flags, \
- (bfd_byte *)((SCNHDR *)(EXT))->s_flags); \
-PUT_SCNHDR_PAGE(ABFD,((struct internal_scnhdr *)(INT))->s_page, \
- (bfd_byte *)((SCNHDR *)(EXT))->s_page); \
-} while(0)
-
-/* 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 */
-#define PG_PROG 0x0 /* PROG page */
-#define PG_DATA 0x1 /* DATA page */
-
-#define ADDR_MASK 0x00FFFFFF
-#define PG_TO_FLAG(p) (((unsigned long)(p) & 0xFF) << 24)
-#define FLAG_TO_PG(f) (((f) >> 24) & 0xFF)
-
-/*
- * 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) \
-(bfd_h_get_32(ABFD,(bfd_byte *)(EXT)->x_scn.x_scnlen)*bfd_octets_per_byte(ABFD))
-#define PUT_SCN_SCNLEN(ABFD,INT,EXT) \
-bfd_h_put_32(ABFD,(INT)/bfd_octets_per_byte(ABFD),\
- (bfd_byte *)(EXT)->x_scn.x_scnlen)
-
-/* lnsz size is in bits in COFF file, in bytes in BFD */
-#define GET_LNSZ_SIZE(abfd, ext) \
-(bfd_h_get_16(abfd, (bfd_byte *)ext->x_sym.x_misc.x_lnsz.x_size) / \
- (class != C_FIELD ? 8 : 1))
-
-#define PUT_LNSZ_SIZE(abfd, in, ext) \
- bfd_h_put_16(abfd, ((class != C_FIELD) ? (in)*8 : (in)), \
- (bfd_byte*) ext->x_sym.x_misc.x_lnsz.x_size)
-
-/* TI COFF stores offsets for MOS and MOU in bits; BFD expects bytes */
-#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; \
-} 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) \
-bfd_h_put_32(abfd,src->n_value * 8,(bfd_byte *)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 10b026ceb..000000000
--- a/include/coff/tic30.h
+++ /dev/null
@@ -1,203 +0,0 @@
-/*** coff information for Texas Instruments TMS320C3X */
-
-/********************** 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 TIC30MAGIC 0xC000
-
-#define TIC30BADMAG(x) (((x).f_magic!=TIC30MAGIC))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** 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 */
-}
-AOUTHDR;
-
-
-#define AOUTHDRSZ 28
-#define AOUTSZ 28
-
-
-
-
-/********************** 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 */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-
-#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[4]; /* line number */
-};
-
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
-
-#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_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
-
-
-
-/********************** 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/tic54x.h b/include/coff/tic54x.h
deleted file mode 100644
index 433a42a8b..000000000
--- a/include/coff/tic54x.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* TI COFF information for Texas Instruments TMS320C54X. This file customizes
- the settings in coff/ti.h. */
-#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 */
-#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 5d938f7b1..000000000
--- a/include/coff/tic80.h
+++ /dev/null
@@ -1,228 +0,0 @@
-/*** coff information for TI TMS320C80 (MVP) */
-
-/********************** 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
-
-
-/********************** 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 */
-}
-AOUTHDR;
-
-#define TIC80_AOUTHDR_MAGIC 0x108 /* Goes in the optional file header magic number field */
-
-#define AOUTHDRSZ 28
-#define AOUTSZ 28
-
-
-
-
-/********************** 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
-
-
-/********************** 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 GET_LINENO_LNNO(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_16(abfd,val, (bfd_byte *) (ext->l_lnno));
-
-#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)
-
-/* FIXME - need to correlate with TIc80 Code Generation Tools User's Guide, CG:A-25 */
-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
-
-
-
-/********************** 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 3378c2324..000000000
--- a/include/coff/w65.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/*** coff information for WDC 65816 */
-
-/********************** 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 W65MAGIC 0x6500
-
-
-#define W65BADMAG(x) (((x).f_magic!=W65MAGIC))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** 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 */
-}
-AOUTHDR;
-
-
-#define AOUTHDRSZ 28
-#define AOUTSZ 28
-
-
-
-
-/********************** 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 */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-
-#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[4]; /* line number */
-};
-
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
-
-#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_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
-
-
-
-/********************** 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 553fa35cd..000000000
--- a/include/coff/we32k.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/*** coff information for we32k */
-
-/********************** 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 */
-};
-
-
-/* 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))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** 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 */
-}
-AOUTHDR;
-
-#define AOUTSZ 28
-#define AOUTHDRSZ 28
-
-/********************** 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 _TV ".tv"
-#define _INIT ".init"
-#define _FINI ".fini"
-
-/********************** 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 (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; /* 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
-
diff --git a/include/coff/z8k.h b/include/coff/z8k.h
deleted file mode 100644
index 19b846ca2..000000000
--- a/include/coff/z8k.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/*** coff information for Zilog Z800N */
-
-/********************** 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 */
-};
-
-
-/* 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))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** 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 */
-}
-AOUTHDR;
-
-
-#define AOUTHDRSZ 28
-#define AOUTSZ 28
-
-
-
-
-/********************** 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 */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-
-#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[4]; /* line number */
-};
-
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val, (bfd_byte *) (ext->l_lnno));
-
-#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_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
-
-
-
-/********************** 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 7fb625909..000000000
--- a/include/demangle.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Defs for interface to demanglers.
- Copyright 1992, 1995, 1996 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., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-
-#if !defined (DEMANGLE_H)
-#define DEMANGLE_H
-
-#include <ansidecl.h>
-
-/* 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_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
-{
- 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 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 struct demangler_engine
-{
- const char *demangling_style_name;
- enum demangling_styles demangling_style;
- const char *demangling_style_doc;
-} libiberty_demanglers[];
-
-extern char *
-cplus_demangle PARAMS ((const char *mangled, int options));
-
-extern int
-cplus_demangle_opname PARAMS ((const char *opname, char *result, int options));
-
-extern const char *
-cplus_mangle_opname PARAMS ((const char *opname, int options));
-
-/* Note: This sets global state. FIXME if you care about multi-threading. */
-
-extern void
-set_cplus_marker_for_demangling PARAMS ((int ch));
-
-extern enum demangling_styles
-cplus_demangle_set_style PARAMS ((enum demangling_styles style));
-
-extern enum demangling_styles
-cplus_demangle_name_to_style PARAMS ((const char *name));
-
-/* V3 ABI demangling entry point, defined in cp-demangle.c. */
-extern char*
-cplus_demangle_v3 PARAMS ((const char* mangled));
-
-#endif /* DEMANGLE_H */
diff --git a/include/dis-asm.h b/include/dis-asm.h
deleted file mode 100644
index a7bb51a1f..000000000
--- a/include/dis-asm.h
+++ /dev/null
@@ -1,278 +0,0 @@
-/* Interface between the opcode library and its callers.
- 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) PARAMS((PTR, const char*, ...));
-
-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;
- PTR stream;
- PTR 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;
-
- /* 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;
-
- /* 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
- PTR 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)
- PARAMS ((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)
- PARAMS ((int status, bfd_vma memaddr, struct disassemble_info *info));
-
- /* Function called to print ADDR. */
- void (*print_address_func)
- PARAMS ((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)
- PARAMS ((bfd_vma addr, 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;
-
- /* 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 bytes processed. */
-typedef int (*disassembler_ftype)
- PARAMS((bfd_vma, disassemble_info *));
-
-extern int print_insn_big_mips PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_little_mips PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_i386_att PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_i386_intel PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_ia64 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_i370 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_m68hc11 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_m68hc12 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_m68k PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_z8001 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_z8002 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_h8300 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_h8300h PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_h8300s PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_h8500 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_alpha PARAMS ((bfd_vma, disassemble_info*));
-extern disassembler_ftype arc_get_disassembler PARAMS ((int, int));
-extern int print_insn_big_arm PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_little_arm PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_sparc PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_big_a29k PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_little_a29k PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_i860 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_i960 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_sh PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_shl PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_hppa PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_fr30 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_m32r PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_m88k PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_mcore PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_mn10200 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_mn10300 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_ns32k PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_big_powerpc PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_little_powerpc PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_rs6000 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_w65 PARAMS ((bfd_vma, disassemble_info*));
-extern disassembler_ftype cris_get_disassembler PARAMS ((bfd *));
-extern int print_insn_d10v PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_d30v PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_v850 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_tic30 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_vax PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_tic54x PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_tic80 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_pj PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_avr PARAMS ((bfd_vma, disassemble_info*));
-
-extern void print_arm_disassembler_options PARAMS ((FILE *));
-extern void parse_arm_disassembler_option PARAMS ((char *));
-extern int get_arm_regname_num_options PARAMS ((void));
-extern int set_arm_regname_option PARAMS ((int));
-extern int get_arm_regnames PARAMS ((int, const char **, const char **, const char ***));
-
-/* Fetch the disassembler for a given BFD, if that support is available. */
-extern disassembler_ftype disassembler PARAMS ((bfd *));
-
-/* Document any target specific options available from the disassembler. */
-extern void disassembler_usage PARAMS ((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
- PARAMS ((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 PARAMS ((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
- PARAMS ((bfd_vma, struct disassemble_info *));
-
-/* Always true. */
-extern int generic_symbol_at_address
- PARAMS ((bfd_vma, struct disassemble_info *));
-
-/* Macro to initialize a disassemble_info struct. This should be called
- by all applications creating such a struct. */
-#define INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC) \
- (INFO).flavour = bfd_target_unknown_flavour, \
- (INFO).arch = bfd_arch_unknown, \
- (INFO).mach = 0, \
- (INFO).endian = BFD_ENDIAN_UNKNOWN, \
- (INFO).octets_per_byte = 1, \
- INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC)
-
-/* Call this macro to initialize only the internal variables for the
- disassembler. Architecture dependent things such as byte order, or machine
- variant are not touched by this macro. This makes things much easier for
- GDB which must initialize these things separately. */
-
-#define INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC) \
- (INFO).fprintf_func = (fprintf_ftype)(FPRINTF_FUNC), \
- (INFO).stream = (PTR)(STREAM), \
- (INFO).symbols = NULL, \
- (INFO).num_symbols = 0, \
- (INFO).buffer = NULL, \
- (INFO).buffer_vma = 0, \
- (INFO).buffer_length = 0, \
- (INFO).read_memory_func = buffer_read_memory, \
- (INFO).memory_error_func = perror_memory, \
- (INFO).print_address_func = generic_print_address, \
- (INFO).symbol_at_address_func = generic_symbol_at_address, \
- (INFO).flags = 0, \
- (INFO).bytes_per_line = 0, \
- (INFO).bytes_per_chunk = 0, \
- (INFO).display_endian = BFD_ENDIAN_UNKNOWN, \
- (INFO).insn_info_valid = 0
-
-#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 67f7ab7d3..000000000
--- a/include/dyn-string.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* An abstract string datatype.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
- Contributed by Mark Mitchell (mark@markmitchell.com).
-
-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, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, 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))
-
-
-/* dyn_string functions are used in the demangling implementation
- included in the G++ runtime library. To prevent collisions with
- names in user programs, the functions that are used in the
- demangler are given implementation-reserved names. */
-
-#ifdef IN_LIBGCC2
-
-#define dyn_string_init __cxa_dyn_string_init
-#define dyn_string_new __cxa_dyn_string_new
-#define dyn_string_delete __cxa_dyn_string_delete
-#define dyn_string_release __cxa_dyn_string_release
-#define dyn_string_resize __cxa_dyn_string_resize
-#define dyn_string_clear __cxa_dyn_string_clear
-#define dyn_string_copy __cxa_dyn_string_copy
-#define dyn_string_copy_cstr __cxa_dyn_string_copy_cstr
-#define dyn_string_prepend __cxa_dyn_string_prepend
-#define dyn_string_prepend_cstr __cxa_dyn_string_prepend_cstr
-#define dyn_string_insert __cxa_dyn_string_insert
-#define dyn_string_insert_cstr __cxa_dyn_string_insert_cstr
-#define dyn_string_insert_char __cxa_dyn_string_insert_char
-#define dyn_string_append __cxa_dyn_string_append
-#define dyn_string_append_cstr __cxa_dyn_string_append_cstr
-#define dyn_string_append_char __cxa_dyn_string_append_char
-#define dyn_string_substring __cxa_dyn_string_substring
-#define dyn_string_eq __cxa_dyn_string_eq
-
-#endif /* IN_LIBGCC2 */
-
-
-extern int dyn_string_init PARAMS ((struct dyn_string *, int));
-extern dyn_string_t dyn_string_new PARAMS ((int));
-extern void dyn_string_delete PARAMS ((dyn_string_t));
-extern char *dyn_string_release PARAMS ((dyn_string_t));
-extern dyn_string_t dyn_string_resize PARAMS ((dyn_string_t, int));
-extern void dyn_string_clear PARAMS ((dyn_string_t));
-extern int dyn_string_copy PARAMS ((dyn_string_t, dyn_string_t));
-extern int dyn_string_copy_cstr PARAMS ((dyn_string_t, const char *));
-extern int dyn_string_prepend PARAMS ((dyn_string_t, dyn_string_t));
-extern int dyn_string_prepend_cstr PARAMS ((dyn_string_t, const char *));
-extern int dyn_string_insert PARAMS ((dyn_string_t, int,
- dyn_string_t));
-extern int dyn_string_insert_cstr PARAMS ((dyn_string_t, int,
- const char *));
-extern int dyn_string_insert_char PARAMS ((dyn_string_t, int, int));
-extern int dyn_string_append PARAMS ((dyn_string_t, dyn_string_t));
-extern int dyn_string_append_cstr PARAMS ((dyn_string_t, const char *));
-extern int dyn_string_append_char PARAMS ((dyn_string_t, int));
-extern int dyn_string_substring PARAMS ((dyn_string_t,
- dyn_string_t, int, int));
-extern int dyn_string_eq PARAMS ((dyn_string_t, dyn_string_t));
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
deleted file mode 100644
index 31ffd7c38..000000000
--- a/include/elf/ChangeLog
+++ /dev/null
@@ -1,1204 +0,0 @@
-2000-12-12 Nick Clifton <nickc@redhat.com>
-
- * mips.h: Fix formatting.
-
-Mon Dec 11 10:56:58 2000 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>
-
- * elf/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-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.
-
-Fri Apr 21 13:20:53 2000 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.
-
-Wed Apr 5 22:08:59 2000 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.
-
-Thu Feb 17 00:18:33 2000 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>
-
- * elf/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.
-
-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 d3534346c..000000000
--- a/include/elf/alpha.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* ALPHA ELF support for BFD.
- Copyright (C) 1996, 98, 2000 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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
-
-#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 */
-
-/* Inherited these from ECOFF, but they are not particularly useful
- and are depreciated. And not implemented in the BFD, btw. */
- RELOC_NUMBER (R_ALPHA_OP_PUSH, 12) /* OP stack push */
- RELOC_NUMBER (R_ALPHA_OP_STORE, 13) /* OP stack pop and store */
- RELOC_NUMBER (R_ALPHA_OP_PSUB, 14) /* OP stack subtract */
- RELOC_NUMBER (R_ALPHA_OP_PRSHIFT, 15) /* OP stack right shift */
-
- RELOC_NUMBER (R_ALPHA_GPVALUE, 16)
- RELOC_NUMBER (R_ALPHA_GPRELHIGH, 17)
- RELOC_NUMBER (R_ALPHA_GPRELLOW, 18)
- RELOC_NUMBER (R_ALPHA_IMMED_GP_16, 19)
- RELOC_NUMBER (R_ALPHA_IMMED_GP_HI32, 20)
- RELOC_NUMBER (R_ALPHA_IMMED_SCN_HI32, 21)
- RELOC_NUMBER (R_ALPHA_IMMED_BR_HI32, 22)
- RELOC_NUMBER (R_ALPHA_IMMED_LO32, 23)
-
-/* 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 */
-
-END_RELOC_NUMBERS (R_ALPHA_max)
-
-#endif /* _ELF_ALPHA_H */
diff --git a/include/elf/arc.h b/include/elf/arc.h
deleted file mode 100644
index 84483fbb8..000000000
--- a/include/elf/arc.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* ARC ELF support for BFD.
- Copyright (C) 1995, 97, 98, 2000 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_BASE 0x00000000
-#define E_ARC_MACH_UNUSED1 0x00000001
-#define E_ARC_MACH_UNUSED2 0x00000002
-#define E_ARC_MACH_UNUSED4 0x00000003
-
-/* Leave bits 0xf0 alone in case we ever have more than 16 cpu types.
- Highly unlikely, but what the heck. */
-
-/* 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 049925185..000000000
--- a/include/elf/arm.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/* ARM ELF support for BFD.
- Copyright (C) 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_INTERWORK 0x04
-#define EF_APCS_26 0x08
-#define EF_APCS_FLOAT 0x10
-#define EF_PIC 0x20
-#define EF_ALIGN8 0x40 /* 8-bit structure alignment is in use. */
-#define EF_NEW_ABI 0x80
-#define EF_OLD_ABI 0x100
-#define EF_SOFT_FLOAT 0x200
-
-/* Other constants defined in the ARM ELF spec. version A-08. */
-#define EF_ARM_SYMSARESORTED 0x04 /* NB conflicts with EF_INTERWORK */
-#define EF_ARM_EABIMASK 0xFF000000
-
-#define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK)
-#define EF_ARM_EABI_UNKNOWN 0x00000000
-#define EF_ARM_EABI_VER1 0x01000000
-
-/* Local aliases for some flags to match names used by COFF port. */
-#define F_INTERWORK EF_INTERWORK
-#define F_APCS26 EF_APCS_26
-#define F_APCS_FLOAT EF_APCS_FLOAT
-#define F_PIC EF_PIC
-#define F_SOFT_FLOAT EF_SOFT_FLOAT
-
-/* Additional symbol types for Thumb. */
-#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
-#define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
-
-/* 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. */
-
-/* Relocation types. */
-
-START_RELOC_NUMBERS (elf_arm_reloc_type)
- RELOC_NUMBER (R_ARM_NONE, 0)
- RELOC_NUMBER (R_ARM_PC24, 1)
- RELOC_NUMBER (R_ARM_ABS32, 2)
- RELOC_NUMBER (R_ARM_REL32, 3)
-#ifdef OLD_ARM_ABI
- RELOC_NUMBER (R_ARM_ABS8, 4)
- RELOC_NUMBER (R_ARM_ABS16, 5)
- RELOC_NUMBER (R_ARM_ABS12, 6)
- RELOC_NUMBER (R_ARM_THM_ABS5, 7)
- RELOC_NUMBER (R_ARM_THM_PC22, 8)
- RELOC_NUMBER (R_ARM_SBREL32, 9)
- RELOC_NUMBER (R_ARM_AMP_VCALL9, 10)
- RELOC_NUMBER (R_ARM_THM_PC11, 11) /* Cygnus extension to abi: Thumb unconditional branch. */
- RELOC_NUMBER (R_ARM_THM_PC9, 12) /* Cygnus extension to abi: Thumb conditional branch. */
- RELOC_NUMBER (R_ARM_GNU_VTINHERIT, 13)
- RELOC_NUMBER (R_ARM_GNU_VTENTRY, 14)
-#else /* not OLD_ARM_ABI */
- RELOC_NUMBER (R_ARM_PC13, 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_PC22, 10)
- RELOC_NUMBER (R_ARM_THM_PC8, 11)
- RELOC_NUMBER (R_ARM_AMP_VCALL9, 12)
- RELOC_NUMBER (R_ARM_SWI24, 13)
- RELOC_NUMBER (R_ARM_THM_SWI8, 14)
- RELOC_NUMBER (R_ARM_XPC25, 15)
- RELOC_NUMBER (R_ARM_THM_XPC22, 16)
-#endif /* not OLD_ARM_ABI */
- 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_GOTOFF, 24) /* 32 bit offset to GOT. */
- RELOC_NUMBER (R_ARM_GOTPC, 25) /* 32 bit PC relative offset to GOT. */
- RELOC_NUMBER (R_ARM_GOT32, 26) /* 32 bit GOT entry. */
- RELOC_NUMBER (R_ARM_PLT32, 27) /* 32 bit PLT address. */
-#ifdef OLD_ARM_ABI
- FAKE_RELOC (FIRST_INVALID_RELOC, 28)
- FAKE_RELOC (LAST_INVALID_RELOC, 249)
-#else /* not OLD_ARM_ABI */
- FAKE_RELOC (FIRST_INVALID_RELOC1, 28)
- FAKE_RELOC (LAST_INVALID_RELOC1, 99)
- RELOC_NUMBER (R_ARM_GNU_VTENTRY, 100)
- RELOC_NUMBER (R_ARM_GNU_VTINHERIT, 101)
- RELOC_NUMBER (R_ARM_THM_PC11, 102) /* Cygnus extension to abi: Thumb unconditional branch. */
- RELOC_NUMBER (R_ARM_THM_PC9, 103) /* Cygnus extension to abi: Thumb conditional branch. */
- FAKE_RELOC (FIRST_INVALID_RELOC2, 104)
- FAKE_RELOC (LAST_INVALID_RELOC2, 248)
- RELOC_NUMBER (R_ARM_RXPC25, 249)
-#endif /* not OLD_ARM_ABI */
- 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)
-END_RELOC_NUMBERS (R_ARM_max)
-
-#endif /* _ELF_ARM_H */
diff --git a/include/elf/avr.h b/include/elf/avr.h
deleted file mode 100644
index 09cdf7bd6..000000000
--- a/include/elf/avr.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* AVR ELF support for BFD.
- Copyright (C) 1999, 2000 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.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 0xf
-
-#define E_AVR_MACH_AVR1 1
-#define E_AVR_MACH_AVR2 2
-#define E_AVR_MACH_AVR3 3
-#define E_AVR_MACH_AVR4 4
-#define E_AVR_MACH_AVR5 5
-
-/* 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)
-END_RELOC_NUMBERS (R_AVR_max)
-
-#endif /* _ELF_AVR_H */
diff --git a/include/elf/common.h b/include/elf/common.h
deleted file mode 100644
index fc91da2d2..000000000
--- a/include/elf/common.h
+++ /dev/null
@@ -1,605 +0,0 @@
-/* ELF support for BFD.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_STANDALONE 255 /* Standalone (embedded) application */
-#define ELFOSABI_ARM 97 /* ARM */
-
-#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_RS4_BE 10 /* MIPS R4000 big-endian */ /* Depreciated */
-#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian (Oct 4 1999 Draft)*/ /* Depreciated */
-
-#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_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 /* Hitachi SH */
-#define EM_SPARCV9 43 /* SPARC v9 64-bit */
-#define EM_TRICORE 44 /* Siemens Tricore embedded processor */
-#define EM_ARC 45 /* Argonaut RISC Core, Argonaut Technologies Inc. */
-#define EM_H8_300 46 /* Hitachi H8/300 */
-#define EM_H8_300H 47 /* Hitachi H8/300H */
-#define EM_H8S 48 /* Hitachi H8S */
-#define EM_H8_500 49 /* 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_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 */
-
-/* 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. */
-
-#define EM_PJ 99 /* picoJava */
-
-/* Cygnus PowerPC ELF backend. Written in the absence of an ABI. */
-#define EM_CYGNUS_POWERPC 0x9025
-
-/* 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
-
-/* Cygnus ARC ELF backend. Written in the absence of an ABI. */
-#define EM_CYGNUS_ARC 0x9040
-
-/* Cygnus M32R ELF backend. Written in the absence of an ABI. */
-#define EM_CYGNUS_M32R 0x9041
-
-/* Alpha backend magic number. Written in the absence of an ABI. */
-#define EM_ALPHA 0x9026
-
-/* 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
-
-/* V850 backend magic number. Written in the absense of an ABI. */
-#define EM_CYGNUS_V850 0x9080
-
-/* mn10200 and mn10300 backend magic numbers.
- Written in the absense of an ABI. */
-#define EM_CYGNUS_MN10200 0xdead
-#define EM_CYGNUS_MN10300 0xbeef
-
-/* FR30 magic number - no EABI available. */
-#define EM_CYGNUS_FR30 0x3330
-
-/* AVR magic number
- Written in the absense of an ABI. */
-#define EM_AVR 0x1057
-
-/* 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_LOOS 0x60000000 /* OS-specific */
-#define PT_HIOS 0x6fffffff /* OS-specific */
-#define PT_LOPROC 0x70000000 /* Processor-specific */
-#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */
-
-/* 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 */
-
-/* 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_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_PRXFPREG 0x46e62b7f /* Contains a user_xfpregs_struct; */
- /* 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 */
-
-/* Values of note segment descriptor types for object files. */
-/* (Only for hppa right now. Should this be moved elsewhere?) */
-
-#define NT_VERSION 1 /* Contains a version string. */
-
-/* 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 specificy 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_LOOS 10 /* OS-specific semantics */
-#define STT_HIOS 12 /* OS-specific semantics */
-#define STT_LOPROC 13 /* Application-specific semantics */
-#define STT_HIPROC 15 /* Application-specific semantics */
-
-/* Special section indices, which may show up in st_shndx fields, among
- other places. */
-
-#define SHN_UNDEF 0 /* Undefined section reference */
-#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 it held elsewhere */
-#define SHN_HIRESERVE 0xFFFF /* End range of reserved indices */
-
-/* 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) << 32) + (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 0x6fff0000
-#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_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_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)
-
-/* 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 */
-
-#endif /* _ELF_COMMON_H */
diff --git a/include/elf/cris.h b/include/elf/cris.h
deleted file mode 100644
index 957f19448..000000000
--- a/include/elf/cris.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* CRIS ELF support for BFD.
- Copyright (C) 2000 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.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, 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)
- 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)
-
- /* 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
-
-#endif /* _ELF_CRIS_H */
diff --git a/include/elf/d10v.h b/include/elf/d10v.h
deleted file mode 100644
index 96bfaf267..000000000
--- a/include/elf/d10v.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* d10v ELF support for BFD.
- Copyright (C) 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 369aa4b41..000000000
--- a/include/elf/d30v.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* d30v ELF support for BFD.
- Copyright (C) 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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/dwarf.h b/include/elf/dwarf.h
deleted file mode 100644
index 1e72cd70d..000000000
--- a/include/elf/dwarf.h
+++ /dev/null
@@ -1,320 +0,0 @@
-/* Declarations and definitions of codes relating to the DWARF symbolic
- debugging information format.
-
- Written by Ron Guilmette (rfg@ncd.com)
-
-Copyright (C) 1992, 1999 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 0x8000 /* implementation-defined range start */
-#define AT_hi_user 0xffff /* 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
-};
-
-#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_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, _UB_CONST_P, _LB_CONST_P) \
- (((_FUNDAMENTAL_TYPE_P) ? 0 : 4) \
- | ((_UB_CONST_P) ? 0 : 2) \
- | ((_LB_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,
-
- /* GNU extensions */
-
- LANG_CHILL = 0x00009af3, /* random value for GNU Chill */
- LANG_JAVA = 0x00009af4 /* random value + 1 for GNU Java */
-};
-
-#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 1bd4fa6ca..000000000
--- a/include/elf/dwarf2.h
+++ /dev/null
@@ -1,638 +0,0 @@
-/* Declarations and definitions of codes relating to the DWARF symbolic
- debugging information format.
- Copyright (C) 1992, 1993, 1995, 1996, 1999 Free Software Foundation, Inc.
-
- Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
- Office (AJPO), Florida State Unviversity 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 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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. */
-
-#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;
-
-/* Strcuture 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,
- /* SGI/MIPS Extensions */
- DW_TAG_MIPS_loop = 0x4081,
- /* 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++ */
- };
-
-#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_stride_size = 0x2e,
- 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,
- /* 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,
- /* 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
- };
-
-#define DW_AT_lo_user 0x2000 /* implementation-defined range start */
-#define DW_AT_hi_user 0x3ff0 /* 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
- };
-
-#define DW_OP_lo_user 0x80 /* 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
- };
-
-#define DW_ATE_lo_user 0x80
-#define DW_ATE_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
- };
-
-#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
- };
-
-/* descriminant lists */
-enum dwarf_descrim_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
- };
-
-/* 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
- };
-
-/* 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,
- /* SGI/MIPS specific */
- DW_CFA_MIPS_advance_loc8 = 0x1d
- };
-
-#define DW_CIE_ID 0xffffffff
-#define DW_CIE_VERSION 1
-
-#define DW_CFA_extended 0
-#define DW_CFA_low_user 0x1c
-#define DW_CFA_high_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,
- DW_LANG_Java = 0x9af4,
- DW_LANG_Mips_Assembler = 0x8001
- };
-
-
-#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
- };
-
-#endif /* _ELF_DWARF2_H */
diff --git a/include/elf/external.h b/include/elf/external.h
deleted file mode 100644
index 5cab77e55..000000000
--- a/include/elf/external.h
+++ /dev/null
@@ -1,256 +0,0 @@
-/* ELF support for BFD.
- Copyright (C) 1991, 92, 93, 95, 97, 98, 1999 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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
-
-/* 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;
-
-/* 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];
-}
-#ifdef __GNUC__
- __attribute__ ((packed))
-#endif
- Elf_External_Versym;
-
-/* Structure for syminfo section. */
-typedef struct
-{
- unsigned char si_boundto[2];
- unsigned char si_flags[2];
-} Elf_External_Syminfo;
-
-#endif /* _ELF_EXTERNAL_H */
diff --git a/include/elf/fr30.h b/include/elf/fr30.h
deleted file mode 100644
index 54c1ae6f9..000000000
--- a/include/elf/fr30.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* FR30 ELF support for BFD.
- Copyright (C) 1998, 99, 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.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, 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/hppa.h b/include/elf/hppa.h
deleted file mode 100644
index e9ec03aae..000000000
--- a/include/elf/hppa.h
+++ /dev/null
@@ -1,551 +0,0 @@
-/* HPPA ELF support for BFD.
- Copyright (C) 1993, 94, 95, 99, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 0xff00
-
-/* A symbol that has been declared as a common block using the
- huge memory model. */
-#define SHN_PARISC_HUGE_COMMON 0xff01
-
-/* 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
-
-/* 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
-
-
-/* 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_DIR64WR, 81)
-/* 64-bit doubleword RR(symbol, addend) */
-
-RELOC_NUMBER (R_PARISC_DIR64DR, 82)
-/* 64-bit doubleword RR(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)
-
-END_RELOC_NUMBERS (R_PARISC_UNIMPLEMENTED)
-
-#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 PF_PARISC_SBP 0x08000000
-#define PF_HP_PAGE_SIZE 0x00100000
-#define PF_HP_FAR_SHARED 0x00200000
-#define PF_HP_NEAR_SHARED 0x00400000
-#define PF_HP_CODE 0x01000000
-#define PF_HP_MODIFY 0x02000000
-#define PF_HP_LAZYSWAP 0x04000000
-#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)
-
-/* Values for DT_HP_DLD_FLAGS. */
-#define DT_HP_DEBUG_PRIVATE 0x0001 /* Map text private */
-#define DT_HP_DEBUG_CALLBACK 0x0002 /* Callback */
-#define DT_HP_DEBUG_CALLBACK_BOR 0x0004 /* BOR callback */
-#define DT_HP_NO_ENVVAR 0x0008 /* No env var */
-#define DT_HP_BIND_NOW 0x0010 /* Bind now */
-#define DT_HP_BIND_NONFATAL 0x0020 /* Bind non-fatal */
-#define DT_HP_BIND_VERBOSE 0x0040 /* Bind verbose */
-#define DT_HP_BIND_RESTRICTED 0x0080 /* Bind restricted */
-#define DT_HP_BIND_SYMBOLIC 0x0100 /* Bind symbolic */
-#define DT_HP_RPATH_FIRST 0x0200 /* RPATH first */
-#define DT_HP_BIND_DEPTH_FIRST 0x0400 /* Bind depth-first */
-
-/* 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)
-
-/* Additional symbol types. */
-#define STT_HP_OPAQUE (STT_LOOS + 0x1)
-#define STT_HP_STUB (STT_LOOS + 0x2)
-
-#endif /* _ELF_HPPA_H */
diff --git a/include/elf/i370.h b/include/elf/i370.h
deleted file mode 100644
index b4e21aae7..000000000
--- a/include/elf/i370.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* i370 ELF support for BFD.
- Copyright (C) 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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
-
-/* 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. */
-#endif /* _ELF_I370_H */
-
-
diff --git a/include/elf/i386.h b/include/elf/i386.h
deleted file mode 100644
index c91f4bef3..000000000
--- a/include/elf/i386.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* ix86 ELF support for BFD.
- Copyright (C) 1998, 99, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 */
- FAKE_RELOC (FIRST_INVALID_RELOC, 11)
- FAKE_RELOC (LAST_INVALID_RELOC, 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)
- /* 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 08b2ff5bc..000000000
--- a/include/elf/i860.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* i860 ELF support for BFD.
- Copyright (C) 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 cbf67d7fc..000000000
--- a/include/elf/i960.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Intel 960 ELF support for BFD.
- Copyright (C) 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 3b1828835..000000000
--- a/include/elf/ia64.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/* IA-64 ELF support for BFD.
- Copyright (C) 1998, 1999, 2000 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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"
-
-/* 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 */
-
-/* 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 */
-
-/* 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 */
-
-/* Possible values for d_tag in Elf64_Dyn: */
-
-#define DT_IA_64_PLT_RESERVE (DT_LOPROC + 0)
-
-/* 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_TP22, 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 6ca316b25..000000000
--- a/include/elf/internal.h
+++ /dev/null
@@ -1,313 +0,0 @@
-/* ELF support for BFD.
- Copyright (C) 1991, 92, 93, 94, 95, 97, 98, 2000
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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
-
-/* 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 short e_ehsize; /* ELF header size in bytes */
- unsigned short e_phentsize; /* Program header table entry size */
- unsigned short e_phnum; /* Program header table entry count */
- unsigned short e_shentsize; /* Section header table entry size */
- unsigned short e_shnum; /* Section header table entry count */
- unsigned short e_shstrndx; /* Section header string table index */
-} Elf_Internal_Ehdr;
-
-#define elf32_internal_ehdr elf_internal_ehdr
-#define Elf32_Internal_Ehdr Elf_Internal_Ehdr
-#define elf64_internal_ehdr elf_internal_ehdr
-#define Elf64_Internal_Ehdr 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;
-#define elf32_internal_phdr elf_internal_phdr
-#define Elf32_Internal_Phdr Elf_Internal_Phdr
-#define elf64_internal_phdr elf_internal_phdr
-#define Elf64_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 */
- bfd_size_type sh_size; /* Size of section in bytes */
- bfd_size_type sh_entsize; /* Entry size if section holds table */
- unsigned long sh_link; /* Index of another section */
- unsigned long sh_info; /* Additional section information */
- file_ptr sh_offset; /* Section file offset */
- unsigned int sh_addralign; /* Section alignment */
-
- /* The internal rep also has some cached info associated with it. */
- asection * bfd_section; /* Associated BFD section. */
- PTR contents; /* Section contents. */
-} Elf_Internal_Shdr;
-
-#define elf32_internal_shdr elf_internal_shdr
-#define Elf32_Internal_Shdr Elf_Internal_Shdr
-#define elf64_internal_shdr elf_internal_shdr
-#define Elf64_Internal_Shdr 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 short st_shndx; /* Associated section index */
-};
-
-typedef struct elf_internal_sym Elf_Internal_Sym;
-
-#define elf32_internal_sym elf_internal_sym
-#define elf64_internal_sym elf_internal_sym
-#define Elf32_Internal_Sym Elf_Internal_Sym
-#define Elf64_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;
-#define Elf32_Internal_Note Elf_Internal_Note
-#define elf32_internal_note elf_internal_note
-
-/* Relocation Entries */
-
-typedef struct elf_internal_rel {
- bfd_vma r_offset; /* Location at which to apply the action */
- /* This needs to support 64-bit values in elf64. */
- bfd_vma r_info; /* index and type of relocation */
-} Elf_Internal_Rel;
-
-#define elf32_internal_rel elf_internal_rel
-#define Elf32_Internal_Rel Elf_Internal_Rel
-#define elf64_internal_rel elf_internal_rel
-#define Elf64_Internal_Rel Elf_Internal_Rel
-
-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_signed_vma r_addend; /* Constant addend used to compute value */
-} Elf_Internal_Rela;
-
-#define elf32_internal_rela elf_internal_rela
-#define elf64_internal_rela elf_internal_rela
-#define Elf32_Internal_Rela Elf_Internal_Rela
-#define Elf64_Internal_Rela 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;
-
-#define elf32_internal_dyn elf_internal_dyn
-#define elf64_internal_dyn elf_internal_dyn
-#define Elf32_Internal_Dyn Elf_Internal_Dyn
-#define Elf64_Internal_Dyn 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;
-
-
-#define elf32_internal_verdef elf_internal_verdef
-#define elf64_internal_verdef elf_internal_verdef
-#define elf32_internal_verdaux elf_internal_verdaux
-#define elf64_internal_verdaux elf_internal_verdaux
-#define elf32_internal_verneed elf_internal_verneed
-#define elf64_internal_verneed elf_internal_verneed
-#define elf32_internal_vernaux elf_internal_vernaux
-#define elf64_internal_vernaux elf_internal_vernaux
-#define elf32_internal_versym elf_internal_versym
-#define elf64_internal_versym elf_internal_versym
-
-#define Elf32_Internal_Verdef Elf_Internal_Verdef
-#define Elf64_Internal_Verdef Elf_Internal_Verdef
-#define Elf32_Internal_Verdaux Elf_Internal_Verdaux
-#define Elf64_Internal_Verdaux Elf_Internal_Verdaux
-#define Elf32_Internal_Verneed Elf_Internal_Verneed
-#define Elf64_Internal_Verneed Elf_Internal_Verneed
-#define Elf32_Internal_Vernaux Elf_Internal_Vernaux
-#define Elf64_Internal_Vernaux Elf_Internal_Vernaux
-#define Elf32_Internal_Versym Elf_Internal_Versym
-#define Elf64_Internal_Versym Elf_Internal_Versym
-#define Elf32_Internal_Syminfo Elf_Internal_Syminfo
-#define Elf64_Internal_Syminfo Elf_Internal_Syminfo
-
-/* 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;
- /* 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 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];
-};
-
-#endif /* _ELF_INTERNAL_H */
diff --git a/include/elf/m32r.h b/include/elf/m32r.h
deleted file mode 100644
index 9b6c4e9ea..000000000
--- a/include/elf/m32r.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* M32R ELF support for BFD.
- Copyright (C) 1996, 97, 98, 99, 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.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, 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)
- RELOC_NUMBER (R_M32R_16, 1)
- RELOC_NUMBER (R_M32R_32, 2)
- RELOC_NUMBER (R_M32R_24, 3)
- RELOC_NUMBER (R_M32R_10_PCREL, 4)
- RELOC_NUMBER (R_M32R_18_PCREL, 5)
- RELOC_NUMBER (R_M32R_26_PCREL, 6)
- RELOC_NUMBER (R_M32R_HI16_ULO, 7)
- RELOC_NUMBER (R_M32R_HI16_SLO, 8)
- RELOC_NUMBER (R_M32R_LO16, 9)
- RELOC_NUMBER (R_M32R_SDA16, 10)
- RELOC_NUMBER (R_M32R_GNU_VTINHERIT, 11)
- RELOC_NUMBER (R_M32R_GNU_VTENTRY, 12)
-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 0xff00
-
-/* 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
-
-#endif
diff --git a/include/elf/m68hc11.h b/include/elf/m68hc11.h
deleted file mode 100644
index 30e0556a9..000000000
--- a/include/elf/m68hc11.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* m68hc11 & m68hc12 ELF support for BFD.
- Copyright (C) 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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)
-END_RELOC_NUMBERS (R_M68HC11_max)
-
-#endif
diff --git a/include/elf/m68k.h b/include/elf/m68k.h
deleted file mode 100644
index a6aab1082..000000000
--- a/include/elf/m68k.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* MC68k ELF support for BFD.
- Copyright (C) 1998, 99, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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)
-
-#define EF_CPU32 0x00810000
-
-#endif
diff --git a/include/elf/mcore.h b/include/elf/mcore.h
deleted file mode 100644
index f97a6827e..000000000
--- a/include/elf/mcore.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Motorola MCore support for BFD.
- Copyright (C) 1995, 99, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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/mips.h b/include/elf/mips.h
deleted file mode 100644
index 44465128b..000000000
--- a/include/elf/mips.h
+++ /dev/null
@@ -1,911 +0,0 @@
-/* MIPS ELF support for BFD.
- Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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)
- RELOC_NUMBER (R_MIPS_REL32, 3)
- RELOC_NUMBER (R_MIPS_26, 4)
- RELOC_NUMBER (R_MIPS_HI16, 5)
- RELOC_NUMBER (R_MIPS_LO16, 6)
- RELOC_NUMBER (R_MIPS_GPREL16, 7)
- RELOC_NUMBER (R_MIPS_LITERAL, 8)
- RELOC_NUMBER (R_MIPS_GOT16, 9)
- RELOC_NUMBER (R_MIPS_PC16, 10)
- RELOC_NUMBER (R_MIPS_CALL16, 11)
- 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)
- RELOC_NUMBER (R_MIPS_max, 38)
- /* These relocs are used for the mips16. */
- RELOC_NUMBER (R_MIPS16_26, 100)
- RELOC_NUMBER (R_MIPS16_GPREL, 101)
- /* These are GNU extensions to handle embedded-pic. */
- RELOC_NUMBER (R_MIPS_PC32, 248)
- RELOC_NUMBER (R_MIPS_PC64, 249)
- RELOC_NUMBER (R_MIPS_GNU_REL16_S2, 250)
- RELOC_NUMBER (R_MIPS_GNU_REL_LO16, 251)
- RELOC_NUMBER (R_MIPS_GNU_REL_HI16, 252)
- /* 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
-
-/* Code in file uses new ABI (-n32 on Irix 6). */
-#define EF_MIPS_ABI2 0x00000020
-
-/* 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
-
-/* 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_4111 0x00880000
-#define E_MIPS_MACH_MIPS32_4K 0x00890000
-#define E_MIPS_MACH_SB1 0x008a0000
-
-/* 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 0xff00
-
-/* 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 0xff01
-
-/* 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 0xff02
-
-/* Small common symbol. */
-#define SHN_MIPS_SCOMMON 0xff03
-
-/* Small undefined symbol. */
-#define SHN_MIPS_SUNDEFINED 0xff04
-
-/* 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
-
-/* ??? */
-#define SHT_MIPS_DELTASYM 0x7000001b
-
-/* ??? */
-#define SHT_MIPS_DELTAINST 0x7000001c
-
-/* ??? */
-#define SHT_MIPS_DELTACLASS 0x7000001d
-
-/* DWARF debugging section. */
-#define SHT_MIPS_DWARF 0x7000001e
-
-/* ??? */
-#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
-
-/* ??? */
-#define SHT_MIPS_PIXIE 0x70000023
-
-/* ??? */
-#define SHT_MIPS_XLATE 0x70000024
-
-/* ??? */
-#define SHT_MIPS_XLATE_DEBUG 0x70000025
-
-/* ??? */
-#define SHT_MIPS_WHIRL 0x70000026
-
-/* ??? */
-#define SHT_MIPS_EH_REGION 0x70000027
-
-/* ??? */
-#define SHT_MIPS_XLATE_OLD 0x70000028
-
-/* ??? */
-#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
- PARAMS ((bfd *, const Elf32_External_RegInfo *, Elf32_RegInfo *));
-extern void bfd_mips_elf32_swap_reginfo_out
- PARAMS ((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 32 bit addresses. */
-#define SHF_MIPS_ADDR32 0x40000000
-
-/* This section contains 64 bit addresses. */
-#define SHF_MIPS_ADDR64 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
-
-/* 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
-
-/* Options (for what ???). */
-#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
-
-/* ??? */
-#define DT_MIPS_SYMBOL_LIB 0x70000024
-
-/* ??? */
-#define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025
-
-/* ??? */
-#define DT_MIPS_LOCAL_GOTIDX 0x70000026
-
-/* ??? */
-#define DT_MIPS_HIDDEN_GOTIDX 0x70000027
-
-/* ??? */
-#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
-
-/* 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
-
-#define RHF_NO_MOVE 0x00000008
-#define RHF_SGI_ONLY 0x00000010
-#define RHF_GUARANTEE_INIT 0x00000020
-#define RHF_DELTA_C_PLUS_PLUS 0x00000040
-#define RHF_GUARANTEE_START_INIT 0x00000080
-#define RHF_PIXIE 0x00000100
-#define RHF_DEFAULT_DELAY_LOAD 0x00000200
-#define RHF_REQUICKSTART 0x00000400
-#define RHF_REQUICKSTARTED 0x00000800
-#define RHF_CORD 0x00001000
-#define RHF_NO_UNRES_UNDEF 0x00002000
-#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
-
-/* This value is used for a mips16 .text symbol. */
-#define STO_MIPS16 0xf0
-
-/* 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;
-
-/* 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
- PARAMS ((bfd *, const Elf_External_Options *, Elf_Internal_Options *));
-extern void bfd_mips_elf_swap_options_out
- PARAMS ((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
- PARAMS ((bfd *, const Elf64_External_RegInfo *, Elf64_Internal_RegInfo *));
-extern void bfd_mips_elf64_swap_reginfo_out
- PARAMS ((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 floating-point 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 0x01 /* R4000 end-of-page patch. */
-#define OHW_R8KPFETCH 0x02 /* May need R8000 prefetch patch. */
-#define OHW_R5KEOP 0x04 /* R5000 end-of-page patch. */
-#define OHW_R5KCVTL 0x08 /* R5000 cvt.[ds].l bug (clean == 1). */
-
-/* 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
-
-
-#endif /* _ELF_MIPS_H */
diff --git a/include/elf/mn10200.h b/include/elf/mn10200.h
deleted file mode 100644
index 1a14ee7cf..000000000
--- a/include/elf/mn10200.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* MN10200 ELF support for BFD.
- Copyright (C) 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 74f2da8d2..000000000
--- a/include/elf/mn10300.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* MN10300 ELF support for BFD.
- Copyright (C) 1998, 99, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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)
-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
-#endif /* _ELF_MN10300_H */
diff --git a/include/elf/pj.h b/include/elf/pj.h
deleted file mode 100644
index 7690ea6ae..000000000
--- a/include/elf/pj.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* picoJava ELF support for BFD.
- Copyright (C) 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 f53bacd35..000000000
--- a/include/elf/ppc.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* PPC ELF support for BFD.
- Copyright (C) 1995, 96, 98, 2000 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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)
-
-/* 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)
-
- /* 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)
-
-
-/* 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. */
-#endif /* _ELF_PPC_H */
diff --git a/include/elf/reloc-macros.h b/include/elf/reloc-macros.h
deleted file mode 100644
index df5e0e317..000000000
--- a/include/elf/reloc-macros.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* Generic relocation support for BFD.
- Copyright (C) 1998, 99, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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
- };
-
- If RELOC_MACROS_GEN_FUNC *is* defined, then instead the
- following function will be generated:
-
- static const char * foo PARAMS ((unsigned long rtype));
- static const char *
- foo (rtype)
- 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 PARAMS ((unsigned long rtype)); \
-static const char * \
-name (rtype) \
- unsigned long rtype; \
-{ \
- switch (rtype) \
- {
-
-#if defined (__STDC__) || defined (ALMOST_STDC)
-#define RELOC_NUMBER(name, number) case number : return #name ;
-#else
-#define RELOC_NUMBER(name, number) case number : return "name" ;
-#endif
-
-#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/sh.h b/include/elf/sh.h
deleted file mode 100644
index 6a1e5613e..000000000
--- a/include/elf/sh.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* SH ELF support for BFD.
- Copyright (C) 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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_HAS_DSP(flags) ((flags) & 4)
-#define EF_SH_DSP 4
-#define EF_SH3_DSP 5
-#define EF_SH_HAS_FP(flags) ((flags) & 8)
-#define EF_SH3E 8
-#define EF_SH4 9
-
-#define EF_SH_MERGE_MACH(mach1, mach2) \
- (((((mach1) == EF_SH3 || (mach1) == EF_SH_UNKNOWN) && (mach2) == EF_SH_DSP) \
- || ((mach1) == EF_SH_DSP \
- && ((mach2) == EF_SH3 || (mach2) == EF_SH_UNKNOWN))) \
- ? EF_SH3_DSP \
- : (((mach1) < EF_SH3 && (mach2) == EF_SH_UNKNOWN) \
- || ((mach2) < EF_SH3 && (mach1) == EF_SH_UNKNOWN)) \
- ? EF_SH3 \
- : (((mach1) == EF_SH3E && (mach2) == EF_SH_UNKNOWN) \
- || ((mach2) == EF_SH3E && (mach1) == EF_SH_UNKNOWN)) \
- ? EF_SH4 \
- : ((mach1) > (mach2) ? (mach1) : (mach2)))
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-/* Relocations 25ff are GNU extensions.
- 25..33 are used for relaxation and use the same constants as COFF uses. */
-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)
- FAKE_RELOC (R_SH_FIRST_INVALID_RELOC, 10)
- FAKE_RELOC (R_SH_LAST_INVALID_RELOC, 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_SWITCH8, 33)
- RELOC_NUMBER (R_SH_GNU_VTINHERIT, 34)
- RELOC_NUMBER (R_SH_GNU_VTENTRY, 35)
- RELOC_NUMBER (R_SH_LOOP_START, 36)
- RELOC_NUMBER (R_SH_LOOP_END, 37)
- FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_2, 38)
- FAKE_RELOC (R_SH_LAST_INVALID_RELOC_2, 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)
-END_RELOC_NUMBERS (R_SH_max)
-
-#endif
diff --git a/include/elf/sparc.h b/include/elf/sparc.h
deleted file mode 100644
index f4a199e89..000000000
--- a/include/elf/sparc.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/* SPARC ELF support for BFD.
- Copyright (C) 1996, 97, 98, 99, 2000 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 0xff00 /* used with SHF_ORDERED */
-#define SHN_AFTER 0xff01 /* 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
- compatility 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)
-
- /* little endian data relocs */
- RELOC_NUMBER (R_SPARC_REV32, 56)
-
- EMPTY_RELOC (R_SPARC_max_std)
-
- RELOC_NUMBER (R_SPARC_GNU_VTINHERIT, 250)
- RELOC_NUMBER (R_SPARC_GNU_VTENTRY, 251)
-
-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/v850.h b/include/elf/v850.h
deleted file mode 100644
index 7b223408c..000000000
--- a/include/elf/v850.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* V850 ELF support for BFD.
- Copyright (C) 1997, 98, 2000 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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
-
-/* v850ea code. */
-#define E_V850EA_ARCH 0x20000000
-
-
-/* Flags for the st_other field */
-#define V850_OTHER_SDA 0x01 /* symbol had SDA relocations */
-#define V850_OTHER_ZDA 0x02 /* symbol had ZDA relocations */
-#define V850_OTHER_TDA 0x04 /* symbol had TDA relocations */
-#define V850_OTHER_TDA_BYTE 0x08 /* symbol had TDA byte 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_32, 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)
-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 0xff00
-
-/* Tiny data area common symbol. */
-#define SHN_V850_TCOMMON 0xff01
-
-/* Zero data area common symbol. */
-#define SHN_V850_ZCOMMON 0xff02
-
-
-/* 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
-
-
-#endif /* _ELF_V850_H */
diff --git a/include/elf/x86-64.h b/include/elf/x86-64.h
deleted file mode 100644
index a4da0a375..000000000
--- a/include/elf/x86-64.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* x86_64 ELF support for BFD.
- Copyright (C) 2000 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 */
- 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*/
-END_RELOC_NUMBERS (R_X86_64_max)
-
-#endif
diff --git a/include/filenames.h b/include/filenames.h
deleted file mode 100644
index ba933c853..000000000
--- a/include/filenames.h
+++ /dev/null
@@ -1,51 +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 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 FILENAMES_H
-#define FILENAMES_H
-
-#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__)
-
-#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] == ':')))
-#define FILENAME_CMP(s1, s2) strcasecmp(s1, s2)
-
-#else /* not DOSish */
-
-#define IS_DIR_SEPARATOR(c) ((c) == '/')
-#define IS_ABSOLUTE_PATH(f) (IS_DIR_SEPARATOR((f)[0]))
-#define FILENAME_CMP(s1, s2) strcmp(s1, s2)
-
-#endif /* not DOSish */
-
-#endif /* FILENAMES_H */
diff --git a/include/floatformat.h b/include/floatformat.h
deleted file mode 100644
index e4d1d150f..000000000
--- a/include/floatformat.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/* IEEE floating point support declarations, for GDB, the GNU Debugger.
- Copyright (C) 1991, 2000 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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
-
-};
-
-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;
- /* Amount added to "true" exponent. 0x3fff for many IEEE extendeds. */
- unsigned 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;
-};
-
-/* 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 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_arm_ext;
-
-/* Convert from FMT to a double.
- FROM is the address of the extended float.
- Store the double in *TO. */
-
-extern void
-floatformat_to_double PARAMS ((const struct floatformat *, char *, double *));
-
-/* The converse: convert the double *FROM to FMT
- and store where TO points. */
-
-extern void
-floatformat_from_double PARAMS ((const struct floatformat *,
- double *, char *));
-
-#endif /* defined (FLOATFORMAT_H) */
diff --git a/include/fnmatch.h b/include/fnmatch.h
deleted file mode 100644
index d5eb70009..000000000
--- a/include/fnmatch.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Copyright (C) 1991, 1992, 1993 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, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, 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 b868f63d4..000000000
--- 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 0f37529d3..000000000
--- 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 da76b7fb5..000000000
--- 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/gdbm.h b/include/gdbm.h
deleted file mode 100644
index 3ebc26d19..000000000
--- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 bf65c6eda..000000000
--- a/include/getopt.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/* Declarations for getopt.
- Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- 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 defined (__GNU_LIBRARY__) || (defined (HAVE_DECL_GETOPT) && !HAVE_DECL_GETOPT)
-/* Many other libraries have conflicting prototypes for getopt, with
- differences in the consts, in stdlib.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 /* not __GNU_LIBRARY__ */
-# if !defined (HAVE_DECL_GETOPT)
-extern int getopt ();
-# endif
-#endif /* __GNU_LIBRARY__ */
-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 a577c5e2a..000000000
--- a/include/hashtab.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/* An expandable hash tables datatype.
- Copyright (C) 1999, 2000 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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>
-
-/* 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) PARAMS ((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) PARAMS ((const void *, const void *));
-
-/* Cleanup function called whenever a live element is removed from
- the hash table. */
-typedef void (*htab_del) PARAMS ((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) PARAMS ((void **, void *));
-
-/* 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. */
-
-struct htab
-{
- /* 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. */
- PTR *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;
-
- /* This is non-zero if we are allowed to return NULL for function calls
- that allocate memory. */
- int return_allocation_failure;
-};
-
-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 PARAMS ((size_t, htab_hash,
- htab_eq, htab_del));
-
-/* This function is like htab_create, but may return NULL if memory
- allocation fails, and also signals that htab_find_slot_with_hash and
- htab_find_slot are allowed to return NULL when inserting. */
-extern htab_t htab_try_create PARAMS ((size_t, htab_hash,
- htab_eq, htab_del));
-extern void htab_delete PARAMS ((htab_t));
-extern void htab_empty PARAMS ((htab_t));
-
-extern PTR htab_find PARAMS ((htab_t, const void *));
-extern PTR *htab_find_slot PARAMS ((htab_t, const void *,
- enum insert_option));
-extern PTR htab_find_with_hash PARAMS ((htab_t, const void *,
- hashval_t));
-extern PTR *htab_find_slot_with_hash PARAMS ((htab_t, const void *,
- hashval_t,
- enum insert_option));
-extern void htab_clear_slot PARAMS ((htab_t, void **));
-extern void htab_remove_elt PARAMS ((htab_t, void *));
-
-extern void htab_traverse PARAMS ((htab_t, htab_trav, void *));
-
-extern size_t htab_size PARAMS ((htab_t));
-extern size_t htab_elements PARAMS ((htab_t));
-extern double htab_collisions PARAMS ((htab_t));
-
-/* A hash function for pointers. */
-extern htab_hash htab_hash_pointer;
-
-/* An equality function for pointers. */
-extern htab_eq htab_eq_pointer;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __HASHTAB_H */
diff --git a/include/hp-symtab.h b/include/hp-symtab.h
deleted file mode 100644
index cf626c073..000000000
--- a/include/hp-symtab.h
+++ /dev/null
@@ -1,1874 +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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 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 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 0 */
- 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 5ade39d33..000000000
--- a/include/ieee.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/* IEEE Standard 695-1980 "Universal Format for Object Modules" header file
- 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 64d072be3..000000000
--- a/include/libiberty.h
+++ /dev/null
@@ -1,214 +0,0 @@
-/* Function declarations for libiberty.
- 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"
-
-#ifdef ANSI_PROTOTYPES
-/* Get a definition for size_t. */
-#include <stddef.h>
-/* Get a definition for va_list. */
-#include <stdarg.h>
-#endif
-
-/* Build an argument vector from a string. Allocates memory using
- malloc. Use freeargv to free the vector. */
-
-extern char **buildargv PARAMS ((char *)) ATTRIBUTE_MALLOC;
-
-/* Free a vector returned by buildargv. */
-
-extern void freeargv PARAMS ((char **));
-
-/* Duplicate an argument vector. Allocates memory using malloc. Use
- freeargv to free the vector. */
-
-extern char **dupargv PARAMS ((char **)) ATTRIBUTE_MALLOC;
-
-
-/* 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 defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || (defined (HAVE_DECL_BASENAME) && !HAVE_DECL_BASENAME)
-extern char *basename PARAMS ((const char *));
-#else
-# if !defined (HAVE_DECL_BASENAME)
-extern char *basename ();
-# endif
-#endif
-
-/* Concatenate an arbitrary number of strings, up to (char *) NULL.
- Allocates memory using xmalloc. */
-
-extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC;
-
-/* Check whether two file descriptors refer to the same file. */
-
-extern int fdmatch PARAMS ((int fd1, int fd2));
-
-/* Get the working directory. The result is cached, so don't call
- chdir() between calls to getpwd(). */
-
-extern char * getpwd PARAMS ((void));
-
-/* Get the amount of time the process has run, in microseconds. */
-
-extern long get_run_time PARAMS ((void));
-
-/* Choose a temporary directory to use for scratch files. */
-
-extern char *choose_temp_base PARAMS ((void)) ATTRIBUTE_MALLOC;
-
-/* Return a temporary file name or NULL if unable to create one. */
-
-extern char *make_temp_file PARAMS ((const char *)) ATTRIBUTE_MALLOC;
-
-/* Allocate memory filled with spaces. Allocates using malloc. */
-
-extern const char *spaces PARAMS ((int count));
-
-/* Return the maximum error number for which strerror will return a
- string. */
-
-extern int errno_max PARAMS ((void));
-
-/* Return the name of an errno value (e.g., strerrno (EINVAL) returns
- "EINVAL"). */
-
-extern const char *strerrno PARAMS ((int));
-
-/* Given the name of an errno value, return the value. */
-
-extern int strtoerrno PARAMS ((const char *));
-
-/* ANSI's strerror(), but more robust. */
-
-extern char *xstrerror PARAMS ((int));
-
-/* Return the maximum signal number for which strsignal will return a
- string. */
-
-extern int signo_max PARAMS ((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 PARAMS ((int));*/
-
-/* Return the name of a signal number (e.g., strsigno (SIGHUP) returns
- "SIGHUP"). */
-
-extern const char *strsigno PARAMS ((int));
-
-/* Given the name of a signal, return its number. */
-
-extern int strtosigno PARAMS ((const char *));
-
-/* Register a function to be run by xexit. Returns 0 on success. */
-
-extern int xatexit PARAMS ((void (*fn) (void)));
-
-/* Exit, calling all the functions registered with xatexit. */
-
-extern void xexit PARAMS ((int status)) ATTRIBUTE_NORETURN;
-
-/* Set the program name used by xmalloc. */
-
-extern void xmalloc_set_program_name PARAMS ((const char *));
-
-/* Report an allocation failure. */
-extern void xmalloc_failed PARAMS ((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 PTR xmalloc PARAMS ((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 PTR xrealloc PARAMS ((PTR, size_t));
-
-/* Allocate memory without fail and set it to zero. This works like
- xmalloc. */
-
-extern PTR xcalloc PARAMS ((size_t, size_t)) ATTRIBUTE_MALLOC;
-
-/* Copy a string into a memory buffer without fail. */
-
-extern char *xstrdup PARAMS ((const char *)) ATTRIBUTE_MALLOC;
-
-/* Copy an existing memory buffer to a new memory buffer without fail. */
-
-extern PTR xmemdup PARAMS ((const PTR, size_t, size_t)) ATTRIBUTE_MALLOC;
-
-/* hex character manipulation routines */
-
-#define _hex_array_size 256
-#define _hex_bad 99
-extern char _hex_value[_hex_array_size];
-extern void hex_init PARAMS ((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) (_hex_value[(unsigned char) (c)])
-
-/* 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 PARAMS ((const char *, char * const *, const char *,
- const char *, char **, char **, int));
-
-/* Wait for pexecute to finish. */
-
-extern int pwait PARAMS ((int, int *, int));
-
-/* Like sprintf but provides a pointer to malloc'd storage, which must
- be freed by the caller. */
-
-extern int asprintf PARAMS ((char **, const char *, ...)) ATTRIBUTE_PRINTF_2;
-
-/* Like vsprintf but provides a pointer to malloc'd storage, which
- must be freed by the caller. */
-
-extern int vasprintf PARAMS ((char **, const char *, va_list))
- ATTRIBUTE_PRINTF(2,0);
-
-#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* ! defined (LIBIBERTY_H) */
diff --git a/include/md5.h b/include/md5.h
deleted file mode 100644
index 0840b31b4..000000000
--- a/include/md5.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/* md5.h - Declaration of functions and data types used for MD5 sum
- computing library functions.
- Copyright (C) 1995, 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,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef _MD5_H
-#define _MD5_H 1
-
-#include <stdio.h>
-
-#if defined HAVE_LIMITS_H || _LIBC
-# include <limits.h>
-#endif
-
-/* 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;
-#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
-#endif
-
-#undef __P
-#if defined (__STDC__) && __STDC__
-#define __P(x) x
-#else
-#define __P(x) ()
-#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];
-};
-
-/*
- * 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 __P ((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 __P ((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 __P ((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 __P ((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 __P ((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 __P ((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 __P ((const char *buffer, size_t len, void *resblock));
-
-#endif
diff --git a/include/mpw/ChangeLog b/include/mpw/ChangeLog
deleted file mode 100644
index 8dbad87ea..000000000
--- a/include/mpw/ChangeLog
+++ /dev/null
@@ -1,61 +0,0 @@
-Tue Feb 27 12:23:04 1996 Raymond Jou <rjou@mexican.cygnus.com>
-
- * mpw.h (HAVE_VPRINTF): Add and define to have the value 1.
-
-Fri Dec 29 14:40:46 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw.h (HAVE_STDLIB_H, etc): Define to have the value 1.
- (HAVE_FCNTL_H): Define.
-
-Mon Dec 11 15:39:06 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw.h (open, access): Define as mpw_open and mpw_access.
-
-Thu Nov 9 15:38:37 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw.h: Include unix.h if USE_MW_HEADERS, otherwise include
- various original MPW include files (ioctl.h, etc).
- (EIO): Define if not defined.
- * sys/ioctl.h: Remove, not needed.
-
-Wed Oct 25 12:30:44 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw.h: Don't include errno.h or ioctl.h.
- (ENOENT, EACCES, ENOSYS): Define if not defined.
- (fdopen): Declare if __STDC__.
- (R_OK, W_OK, X_OK): Define if not defined.
-
-Tue Sep 26 14:57:21 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw.h: New file, universally useful MPW host definitions.
- Many of these used to live in bfd/hosts/mpw.h.
- * grp.h: Remove RCS comment.
- * sys/ioctl.h: Add a comment line.
-
-Wed Dec 14 13:12:14 1994 Stan Shebs <shebs@andros.cygnus.com>
-
- * spin.h: New file, cursor spinning for progress.
-
-Thu Jun 30 15:32:07 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * fcntl.h (open): Allow optional third arg.
-
-Thu Apr 14 12:54:51 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * dir.h, dirent.h, fcntl.h, grp.h, pwd.h, stat.h: New files.
- * sys/ioctl.h: New file.
-
-Mon Feb 21 09:44:45 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * sys/stat.h (struct stat): New field st_rsize.
- (S_IFMT, etc): Use different bit positions.
- (fstat): Add parameter names to prototype.
-
-Mon Jan 31 19:30:16 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * README: New file.
- * utime.h, varargs.h: New files, simulated Posix.
- * sys/{file,param,resource,stat,time,types}.h: New files, more
- simulated Posix.
-
-
diff --git a/include/mpw/README b/include/mpw/README
deleted file mode 100644
index 10e92de79..000000000
--- a/include/mpw/README
+++ /dev/null
@@ -1 +0,0 @@
-This is a collection of include files that help imitate Posix in MPW.
diff --git a/include/mpw/dir.h b/include/mpw/dir.h
deleted file mode 100644
index e6ccd2d59..000000000
--- a/include/mpw/dir.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* The <dir.h> header gives the layout of a directory. */
-
-#pragma once
-
-#ifndef _DIR_H
-#define _DIR_H
-
-#ifndef _TYPES_H /* not quite right */
-#include <sys/types.h>
-#endif
-
-#define DIRBLKSIZ 512 /* size of directory block */
-
-#ifndef DIRSIZ
-#define DIRSIZ 14
-#endif
-
-struct direct {
- ino_t d_ino;
- char d_name[DIRSIZ];
-};
-
-#endif /* _DIR_H */
diff --git a/include/mpw/dirent.h b/include/mpw/dirent.h
deleted file mode 100644
index 38000b2c5..000000000
--- a/include/mpw/dirent.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef __dirent_h
-#define __dirent_h
-
-#include "sys/dir.h"
-
-struct dirent {
- long d_ino; /* inode number of entry */
- off_t d_off; /* offset of disk directory entry */
- unsigned short d_reclen; /* length of this record */
- char d_name[1]; /* name of file */
-};
-
-/*
-#define DIRENTBASESIZE \
- (((struct dirent *) 0)->d_name - (char *) 0)
-#define DIRENTSIZE(namelen) \
- ((DIRENTBASESIZE + (namelen) + NBPW) & ~(NBPW - 1))
-*/
-
-/* from Mips posix/dirent.h */
-
-/*
-#undef rewinddir
-*/
-
-extern DIR *opendir();
-extern struct dirent *readdir();
-extern void rewinddir();
-extern int closedir();
-
-#endif /* ! __dirent_h */
diff --git a/include/mpw/fcntl.h b/include/mpw/fcntl.h
deleted file mode 100644
index 30999b4b1..000000000
--- a/include/mpw/fcntl.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * FCntl.h -- faccess(), fcntl(), and open() mode flags
- *
- * Portions copyright American Telephone & Telegraph
- * Used with permission, Apple Computer Inc. (1985,1988,1990,1992)
- * All rights reserved.
- */
-
-#ifndef __FCNTL__
-#define __FCNTL__
-
-#ifndef __TYPES__
-#include <Types.h>
-#endif
-
-/*
- * For use by lseek():
- */
-
-#ifndef __STDIO__ /* these defns exactly paralled in StdIO.h for fseek() */
-#define SEEK_CUR 1
-#define SEEK_END 2
-#define SEEK_SET 0
-#endif
-
-/*
- * faccess() commands; for general use
- */
- /* 'd' => "directory" ops */
-#define F_DELETE (('d'<<8)|0x01)
-#define F_RENAME (('d'<<8)|0x02)
-
-/*
- * more faccess() commands; for use only by MPW tools
- */
-
-#define F_OPEN (('d'<<8)|0x00) /* reserved for operating system use */
- /* 'e' => "editor" ops */
-#define F_GTABINFO (('e'<<8)|0x00) /* get tab offset for file */
-#define F_STABINFO (('e'<<8)|0x01) /* set " " " " */
-#define F_GFONTINFO (('e'<<8)|0x02) /* get font number and size for file */
-#define F_SFONTINFO (('e'<<8)|0x03) /* set " " " " " " */
-#define F_GPRINTREC (('e'<<8)|0x04) /* get print record for file */
-#define F_SPRINTREC (('e'<<8)|0x05) /* set " " " " */
-#define F_GSELINFO (('e'<<8)|0x06) /* get selection information for file */
-#define F_SSELINFO (('e'<<8)|0x07) /* set " " " " */
-#define F_GWININFO (('e'<<8)|0x08) /* get current window position */
-#define F_SWININFO (('e'<<8)|0x09) /* set " " " */
-#define F_GSCROLLINFO (('e'<<8)|0x0A) /* get scroll information */
-#define F_SSCROLLINFO (('e'<<8)|0x0B) /* set " " */
-#define F_GMARKER (('e'<<8)|0x0D) /* Get Marker */
-#define F_SMARKER (('e'<<8)|0x0C) /* Set " */
-#define F_GSAVEONCLOSE (('e'<<8)|0x0F) /* Get Save on close */
-#define F_SSAVEONCLOSE (('e'<<8)|0x0E) /* Set " " " */
-
-/*
- * argument structures used by various faccess() commands
- */
-
-struct MarkElement {
- int start; /* start position of mark */
- int end; /* end position */
- unsigned char charCount; /* number of chars in mark name */
- char name[64]; /* mark name */
-} ; /* note: marker names may be up to 64 characters long */
-
-#ifndef __cplusplus
-typedef struct MarkElement MarkElement;
-#endif
-
-struct SelectionRecord {
- long startingPos;
- long endingPos;
- long displayTop;
-};
-
-#ifndef __cplusplus
-typedef struct SelectionRecord SelectionRecord;
-#endif
-
-
-/*
- * Mode values accessible to open()
- */
-#define O_RDONLY 0 /* Bits 0 and 1 are used internally */
-#define O_WRONLY 1 /* Values 0..2 are historical */
-#define O_RDWR 2 /* NOTE: it goes 0, 1, 2, *!* 8, 16, 32, ... */
-#define O_APPEND (1<< 3) /* append (writes guaranteed at the end) */
-#define O_RSRC (1<< 4) /* Open the resource fork */
-#define O_ALIAS (1<< 5) /* Open alias file */
-#define O_CREAT (1<< 8) /* Open with file create */
-#define O_TRUNC (1<< 9) /* Open with truncation */
-#define O_EXCL (1<<10) /* w/ O_CREAT: Exclusive "create-only" */
-#define O_BINARY (1<<11) /* Open as a binary stream */
-#define O_NRESOLVE (1<<14) /* Don't resolve any aliases */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * function prototypes
- */
-int close(int);
-int creat(const char*);
-int dup(int filedes); /* OBSOLETE: fcntl(filedes, F_DUPFD, 0) is preferred */
-int faccess(char*, unsigned int, long*);
-int fcntl(int, unsigned int, int);
-long lseek(int, long, int);
-int open(const char*, int, ...);
-int read(int, char*, unsigned);
-int unlink(char*);
-int write(int, const char*, unsigned);
-
-#ifdef __cplusplus
-}
-#endif
-
-/*
- * fcntl() commands
- */
-#define F_DUPFD 0 /* Duplicate files (file descriptor) */
-
-#endif __FCNTL__
diff --git a/include/mpw/grp.h b/include/mpw/grp.h
deleted file mode 100644
index faf2c6a6b..000000000
--- a/include/mpw/grp.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#pragma once
-
-#include "sys/types.h"
-
-struct group {
- char *gr_name;
- gid_t gr_gid;
- char *gr_passwd;
- char **gr_mem;
-};
diff --git a/include/mpw/mpw.h b/include/mpw/mpw.h
deleted file mode 100644
index 58702e725..000000000
--- a/include/mpw/mpw.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* Mac MPW host-specific definitions. */
-
-#ifndef __INCLUDE_MPW_H
-#define __INCLUDE_MPW_H
-
-#ifndef MPW
-#define MPW
-#endif
-
-/* MPW C is basically ANSI, but doesn't actually enable __STDC__,
- nor does it allow __STDC__ to be #defined. */
-
-#ifndef ALMOST_STDC
-#define ALMOST_STDC
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-#include <errno.h>
-
-#define HAVE_TIME_T_IN_TIME_H 1
-
-#define HAVE_STDLIB_H 1
-
-#define HAVE_ERRNO_H 1
-
-#define HAVE_STDDEF_H 1
-
-#define HAVE_STRING_H 1
-
-#define HAVE_STDARG_H 1
-
-#define HAVE_VPRINTF 1
-
-#ifdef USE_MW_HEADERS
-
-#include <unix.h>
-
-#else
-
-#include <fcntl.h>
-#include <ioctl.h>
-#include <sys/stat.h>
-
-#define HAVE_FCNTL_H 1
-
-#ifndef O_ACCMODE
-#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
-#endif
-
-#ifndef fileno
-#define fileno(fp) ((fp)->_file)
-#endif
-
-/* stdio.h does not define this if __STDC__, so define here. */
-
-#ifdef __STDC__
-FILE *fdopen(int fildes, const char *mode);
-#endif
-
-#endif /* USE_MW_HEADERS */
-
-/* Add ersatz definitions, for systems that lack them. */
-
-#ifndef EIO
-#define EIO 96
-#endif
-#ifndef ENOENT
-#define ENOENT 97
-#endif
-#ifndef EACCES
-#define EACCES 98
-#endif
-#ifndef ENOSYS
-#define ENOSYS 99
-#endif
-
-#ifndef R_OK
-#define R_OK 4
-#define W_OK 2
-#define X_OK 1
-#endif
-
-/* Binary files have different characteristics; for instance, no cr/nl
- translation. */
-
-#define USE_BINARY_FOPEN
-
-#include <spin.h>
-
-#ifdef MPW_C
-#undef __PTR_TO_INT
-#define __PTR_TO_INT(P) ((int)(P))
-#undef __INT_TO_PTR
-#define __INT_TO_PTR(P) ((char *)(P))
-#endif /* MPW_C */
-
-#define NO_FCNTL
-
-int fstat ();
-
-FILE *mpw_fopen ();
-int mpw_fseek ();
-int mpw_fread ();
-int mpw_fwrite ();
-int mpw_access ();
-int mpw_open ();
-int mpw_creat ();
-void mpw_abort (void);
-
-/* Map these standard functions to improved versions in libiberty. */
-
-#define fopen mpw_fopen
-#define fseek mpw_fseek
-#define fread mpw_fread
-#define fwrite mpw_fwrite
-#define open mpw_open
-#define access mpw_access
-#define creat mpw_creat
-#define abort mpw_abort
-
-#define POSIX_UTIME
-
-#define LOSING_TOTALLY
-
-/* Define this so that files will be closed before being unlinked. */
-
-#define CLOSE_BEFORE_UNLINK
-
-#endif /* __INCLUDE_MPW_H */
diff --git a/include/mpw/pwd.h b/include/mpw/pwd.h
deleted file mode 100644
index 2d4fb7040..000000000
--- a/include/mpw/pwd.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef __pwd_h
-#define __pwd_h
-
-#include <sys/types.h>
-
-struct passwd {
- char *pw_name;
- uid_t pw_uid;
- gid_t pw_gid;
- char *pw_dir;
- char *pw_shell;
- char *pw_passwd;
-};
-
-#endif /* ! __pwd_h */
diff --git a/include/mpw/spin.h b/include/mpw/spin.h
deleted file mode 100644
index 867d14502..000000000
--- a/include/mpw/spin.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Progress macros that use SpinCursor in MPW.
- Copyright (C) 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef _SPIN_H
-#define _SPIN_H
-
-/* For MPW, progress macros just need to "spin the cursor" frequently,
- preferably several times per second on a 68K Mac. */
-
-/* In order to determine if we're meeting the goal, define this macro
- and information about frequency of spinning will be collected and
- displayed. */
-
-#define SPIN_MEASUREMENT
-
-#include <CursorCtl.h>
-
-/* Programs use this macro to indicate the start of a lengthy
- activity. STR identifies the particular activity, while N
- indicates the expected duration, in unspecified units. If N is
- zero, then the expected time to completion is unknown. */
-
-#undef START_PROGRESS
-#define START_PROGRESS(STR,N) mpw_start_progress (STR, N, __FILE__, __LINE__);
-
-/* Programs use this macro to indicate that progress has been made on a
- lengthy activity. */
-
-#undef PROGRESS
-#ifdef SPIN_MEASUREMENT
-#define PROGRESS(X) mpw_progress_measured (X, __FILE__, __LINE__);
-#else
-#define PROGRESS(X) mpw_progress (X);
-#endif
-
-/* Programs use this macro to indicate the end of a lengthy activity.
- STR must match a STR passed to START_PROGRESS previously. */
-
-#undef END_PROGRESS
-#define END_PROGRESS(STR) mpw_end_progress (STR, __FILE__, __LINE__);
-
-extern void mpw_start_progress (char *, int, char *, int);
-
-extern void mpw_progress (int);
-
-extern void mpw_progress_measured (int, char *, int);
-
-extern void mpw_end_progress (char *, char *, int);
-
-#endif /* _SPIN_H */
diff --git a/include/mpw/stat.h b/include/mpw/stat.h
deleted file mode 100644
index 057b8d531..000000000
--- a/include/mpw/stat.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* The <sys/stat.h> header defines a struct that is used in the stat() and
- * fstat functions. The information in this struct comes from the i-node of
- * some file. These calls are the only approved way to inspect i-nodes.
- */
-
-#ifndef _STAT_H
-#define _STAT_H
-
-#ifndef _TYPES_H /* not quite right */
-#include <sys/types.h>
-#endif
-
-struct stat {
- dev_t st_dev; /* major/minor device number */
- ino_t st_ino; /* i-node number */
- mode_t st_mode; /* file mode, protection bits, etc. */
- short int st_nlink; /* # links; TEMPORARY HACK: should be nlink_t*/
- uid_t st_uid; /* uid of the file's owner */
- short int st_gid; /* gid; TEMPORARY HACK: should be gid_t */
- dev_t st_rdev;
- off_t st_size; /* file size */
- time_t st_atime; /* time of last access */
- time_t st_mtime; /* time of last data modification */
- time_t st_ctime; /* time of last file status change */
-};
-
-/* Traditional mask definitions for st_mode. */
-#define S_IFMT 0170000 /* type of file */
-#define S_IFREG 0100000 /* regular */
-#define S_IFBLK 0060000 /* block special */
-#define S_IFDIR 0040000 /* directory */
-#define S_IFCHR 0020000 /* character special */
-#define S_IFIFO 0010000 /* this is a FIFO */
-#define S_ISUID 0004000 /* set user id on execution */
-#define S_ISGID 0002000 /* set group id on execution */
- /* next is reserved for future use */
-#define S_ISVTX 01000 /* save swapped text even after use */
-
-/* POSIX masks for st_mode. */
-#define S_IRWXU 00700 /* owner: rwx------ */
-#define S_IRUSR 00400 /* owner: r-------- */
-#define S_IWUSR 00200 /* owner: -w------- */
-#define S_IXUSR 00100 /* owner: --x------ */
-
-#define S_IRWXG 00070 /* group: ---rwx--- */
-#define S_IRGRP 00040 /* group: ---r----- */
-#define S_IWGRP 00020 /* group: ----w---- */
-#define S_IXGRP 00010 /* group: -----x--- */
-
-#define S_IRWXO 00007 /* others: ------rwx */
-#define S_IROTH 00004 /* others: ------r-- */
-#define S_IWOTH 00002 /* others: -------w- */
-#define S_IXOTH 00001 /* others: --------x */
-
-/* The following macros test st_mode (from POSIX Sec. 5.6.1.1. */
-#define S_ISREG(m) ((m & S_IFMT) == S_IFREG) /* is a reg file */
-#define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) /* is a directory */
-#define S_ISCHR(m) ((m & S_IFMT) == S_IFCHR) /* is a char spec */
-#define S_ISBLK(m) ((m & S_IFMT) == S_IFBLK) /* is a block spec */
-#define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO) /* is a pipe/FIFO */
-
-
-/* Function Prototypes. */
-#ifndef _ANSI_H
-#include <ansi.h>
-#endif
-
-_PROTOTYPE( int chmod, (const char *_path, int _mode) );
-_PROTOTYPE( int fstat, (int _fildes, struct stat *_buf) );
-_PROTOTYPE( int mkdir, (const char *_path, int _mode) );
-_PROTOTYPE( int mkfifo, (const char *_path, int _mode) );
-_PROTOTYPE( int stat , (const char *_path, struct stat *_buf) );
-_PROTOTYPE( mode_t umask, (int _cmask) );
-
-#endif /* _STAT_H */
diff --git a/include/mpw/sys/file.h b/include/mpw/sys/file.h
deleted file mode 100644
index 40a8c178f..000000000
--- a/include/mpw/sys/file.h
+++ /dev/null
@@ -1 +0,0 @@
-/* empty */
diff --git a/include/mpw/sys/param.h b/include/mpw/sys/param.h
deleted file mode 100644
index 40a8c178f..000000000
--- a/include/mpw/sys/param.h
+++ /dev/null
@@ -1 +0,0 @@
-/* empty */
diff --git a/include/mpw/sys/resource.h b/include/mpw/sys/resource.h
deleted file mode 100644
index d39439d61..000000000
--- a/include/mpw/sys/resource.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __SYS_RESOURCE_H__
-#define __SYS_RESOURCE_H__
-
-struct rusage {
- struct timeval ru_utime;
- struct timeval ru_stime;
-};
-
-#endif /* __SYS_RESOURCE_H__ */
diff --git a/include/mpw/sys/stat.h b/include/mpw/sys/stat.h
deleted file mode 100644
index b65c72e10..000000000
--- a/include/mpw/sys/stat.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Imitation sys/stat.h. */
-
-#ifndef __SYS_STAT_H__
-#define __SYS_STAT_H__
-
-#include <sys/types.h>
-#include <time.h>
-
-struct stat {
- dev_t st_dev;
- ino_t st_ino;
- mode_t st_mode;
- short st_nlink;
- uid_t st_uid;
- gid_t st_gid;
- dev_t st_rdev;
- off_t st_size;
- off_t st_rsize;
- time_t st_atime;
- int st_spare1;
- time_t st_mtime;
- int st_spare2;
- time_t st_ctime;
- int st_spare3;
- long st_blksize;
- long st_blocks;
- long st_spare4[2];
-};
-
-#define S_IFMT 0170000L
-#define S_IFDIR 0040000L
-#define S_IFREG 0100000L
-#define S_IREAD 0400
-#define S_IWRITE 0200
-#define S_IEXEC 0100
-
-#define S_IFIFO 010000 /* FIFO special */
-#define S_IFCHR 020000 /* character special */
-#define S_IFBLK 030000 /* block special */
-
-int stat (char *path, struct stat *buf);
-int fstat (int fd, struct stat *buf);
-
-#endif /* __SYS_STAT_H___ */
diff --git a/include/mpw/sys/time.h b/include/mpw/sys/time.h
deleted file mode 100644
index f9e485232..000000000
--- a/include/mpw/sys/time.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Imitation sys/time.h. */
-
-#ifndef __SYS_TIME_H__
-#define __SYS_TIME_H__
-
-#include <time.h>
-
-struct timeval {
- long tv_sec;
- long tv_usec;
-};
-
-#endif /* __SYS_TIME_H__ */
diff --git a/include/mpw/sys/types.h b/include/mpw/sys/types.h
deleted file mode 100644
index d7d9c9f44..000000000
--- a/include/mpw/sys/types.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* Imitation sys/types.h. */
-
-#ifndef __SYS_TYPES_H__
-#define __SYS_TYPES_H__
-
-#include <Types.h>
-
-typedef short dev_t;
-typedef short ino_t;
-typedef unsigned short mode_t;
-typedef unsigned short uid_t;
-typedef unsigned short gid_t;
-typedef long off_t;
-
-#endif /* __SYS_TYPES_H__ */
diff --git a/include/mpw/utime.h b/include/mpw/utime.h
deleted file mode 100644
index e8bf66f2b..000000000
--- a/include/mpw/utime.h
+++ /dev/null
@@ -1,7 +0,0 @@
-
-struct utimbuf {
- time_t actime;
- time_t modtime;
-};
-
-int utime (char *, struct utimbuf *);
diff --git a/include/mpw/varargs.h b/include/mpw/varargs.h
deleted file mode 100644
index acb9e4504..000000000
--- a/include/mpw/varargs.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* varargs.h. */
-#ifndef __va_list__
-#define __va_list__
-typedef char *va_list;
-#endif
-#define va_dcl int va_alist;
-#define va_start(list) list = (char *) &va_alist
-#define va_end(list)
-#define va_arg(list,mode) ((mode *)(list += sizeof(mode)))[-1]
diff --git a/include/nlm/ChangeLog b/include/nlm/ChangeLog
deleted file mode 100644
index d9ea3d09e..000000000
--- a/include/nlm/ChangeLog
+++ /dev/null
@@ -1,83 +0,0 @@
-Fri May 6 13:31:04 1994 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.
-
-Fri Apr 22 11:12:39 1994 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.
-
-Thu Apr 21 11:57:09 1994 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.
-
-Wed Apr 20 14:27:43 1994 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.
-
-Mon Feb 7 08:28:40 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * internal.h: Change HOST_64_BIT to BFD_HOST_64_BIT.
-
-Thu Dec 2 14:14:48 1993 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.
-
-Wed Nov 17 17:38:58 1993 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.
-
-Wed Oct 27 11:45:56 1993 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).
-
-Tue Aug 31 13:24:15 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * internal.h: Change length fields of type char to type unsigned
- char.
-
-Sat Jul 31 02:12:14 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * common.h (NLM_HIBIT, NLM_HEADER_VERSION): Define.
-
-Thu Jul 22 16:09:47 1993 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.
-
-Mon Jul 19 22:12:40 1993 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 37199dd1d..000000000
--- a/include/nlm/alpha-ext.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/* Alpha NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 e96550a92..000000000
--- a/include/nlm/common.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/* NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 1993 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-
-/* This file is part of NLM support for BFD, and contains the portions
- that are common to both the internal and external representations. */
-
-/* Semi-portable string concatenation in cpp.
- The NLM_CAT4 hack is to avoid a problem with some strict ANSI C
- preprocessors. The problem is, "32_" or "64_" are not a valid
- preprocessing tokens, and we don't want extra underscores (e.g.,
- "nlm_32_"). The XNLM_CAT2 macro will cause the inner NLM_CAT macros
- to be evaluated first, producing still-valid pp-tokens. Then the
- final concatenation can be done. (Sigh.) */
-
-#ifdef SABER
-# define NLM_CAT(a,b) a##b
-# define NLM_CAT3(a,b,c) a##b##c
-# define NLM_CAT4(a,b,c,d) a##b##c##d
-#else
-# ifdef __STDC__
-# define NLM_CAT(a,b) a##b
-# define NLM_CAT3(a,b,c) a##b##c
-# define XNLM_CAT2(a,b) NLM_CAT(a,b)
-# define NLM_CAT4(a,b,c,d) XNLM_CAT2(NLM_CAT(a,b),NLM_CAT(c,d))
-# else
-# define NLM_CAT(a,b) a/**/b
-# define NLM_CAT3(a,b,c) a/**/b/**/c
-# define NLM_CAT4(a,b,c,d) a/**/b/**/c/**/d
-# endif
-#endif
-
-/* 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
-
-#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 f77a5bb3d..000000000
--- a/include/nlm/external.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/* NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 1993 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 d33ad2da7..000000000
--- a/include/nlm/i386-ext.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/* i386 NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 dd27dc407..000000000
--- a/include/nlm/internal.h
+++ /dev/null
@@ -1,309 +0,0 @@
-/* NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 1993 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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];
- PTR 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 0aae10772..000000000
--- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 0deb2dee9..000000000
--- a/include/nlm/sparc32-ext.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/* SPARC NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 867d25031..000000000
--- a/include/oasys.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/* Oasys object format header file for BFD.
- 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 0b451cdc2..000000000
--- a/include/objalloc.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/* objalloc.h -- routines to allocate memory for objects
- Copyright 1997 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, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, 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;
- PTR chunks;
-};
-
-/* Work out the required alignment. */
-
-struct objalloc_align { char x; double d; };
-
-#if defined (__STDC__) && __STDC__
-#ifndef offsetof
-#include <stddef.h>
-#endif
-#define OBJALLOC_ALIGN \
- ((ptrdiff_t) ((char *) &((struct objalloc_align *) 0)->d - (char *) 0))
-#else
-#define OBJALLOC_ALIGN \
- ((long) ((char *) &((struct objalloc_align *) 0)->d - (char *) 0))
-#endif
-
-/* Create an objalloc structure. Returns NULL if malloc fails. */
-
-extern struct objalloc *objalloc_create PARAMS ((void));
-
-/* Allocate space from an objalloc structure. Returns NULL if malloc
- fails. */
-
-extern PTR _objalloc_alloc PARAMS ((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, \
- (PTR) (__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 PARAMS ((struct objalloc *));
-
-/* Free a block allocated by objalloc_alloc. This also frees all more
- recently allocated blocks. */
-
-extern void objalloc_free_block PARAMS ((struct objalloc *, PTR));
-
-#endif /* OBJALLOC_H */
diff --git a/include/obstack.h b/include/obstack.h
deleted file mode 100644
index 314a27a99..000000000
--- a/include/obstack.h
+++ /dev/null
@@ -1,598 +0,0 @@
-/* obstack.h - object stack macros
- Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998
- 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- 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>
-# if defined __STDC__ && __STDC__
-# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
-# else
-# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N))
-# endif
-#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. */
-#if defined __STDC__ && __STDC__
- /* 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 */
-#else
- struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */
- void (*freefun) (); /* User's function to free a chunk. */
- char *extra_arg; /* first arg for chunk alloc/dealloc funcs */
-#endif
- 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. */
-
-#if defined __STDC__ && __STDC__
-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 *);
-#else
-extern void _obstack_newchunk ();
-extern void _obstack_free ();
-extern int _obstack_begin ();
-extern int _obstack_begin_1 ();
-extern int _obstack_memory_used ();
-#endif
-
-#if defined __STDC__ && __STDC__
-
-/* 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);
-
-#endif /* __STDC__ */
-
-/* Non-ANSI C cannot really support alternative functions for these macros,
- so we do not declare them. */
-
-/* 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. */
-#if defined __STDC__ && __STDC__
-extern void (*obstack_alloc_failed_handler) (void);
-#else
-extern void (*obstack_alloc_failed_handler) ();
-#endif
-
-/* 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. */
-#if defined __STDC__ && __STDC__
-
-# 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))
-
-#else
-
-# define obstack_init(h) \
- _obstack_begin ((h), 0, 0, \
- (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
-
-# define obstack_begin(h, size) \
- _obstack_begin ((h), (size), 0, \
- (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
-
-# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
- _obstack_begin ((h), (size), (alignment), \
- (void *(*) ()) (chunkfun), (void (*) ()) (freefun))
-
-# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
- _obstack_begin_1 ((h), (size), (alignment), \
- (void *(*) ()) (chunkfun), (void (*) ()) (freefun), (arg))
-
-# define obstack_chunkfun(h, newchunkfun) \
- ((h) -> chunkfun = (struct _obstack_chunk *(*)()) (newchunkfun))
-
-# define obstack_freefun(h, newfreefun) \
- ((h) -> freefun = (void (*)()) (newfreefun))
-
-#endif
-
-#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); \
- *(__o->next_free)++ = (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 *)); \
- *((void **)__o->next_free)++ = ((void *)datum); \
- (void) 0; })
-
-# 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)); \
- *((int *)__o->next_free)++ = ((int)datum); \
- (void) 0; })
-
-# define obstack_ptr_grow_fast(h,aptr) (*((void **) (h)->next_free)++ = (void *)aptr)
-# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
-
-# 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); \
- __o->next_free += __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 = (OBJ); \
- if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
- __o->next_free = __o->object_base = __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), \
- (*((h)->next_free)++ = (datum)))
-
-# define obstack_ptr_grow(h,datum) \
-( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
- (*((char **) (((h)->next_free+=sizeof(char *))-sizeof(char *))) = ((char *) datum)))
-
-# define obstack_int_grow(h,datum) \
-( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
- (*((int *) (((h)->next_free+=sizeof(int))-sizeof(int))) = ((int) datum)))
-
-# define obstack_ptr_grow_fast(h,aptr) (*((char **) (h)->next_free)++ = (char *) aptr)
-# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
-
-# define obstack_blank(h,length) \
-( (h)->temp = (length), \
- (((h)->chunk_limit - (h)->next_free < (h)->temp) \
- ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
- ((h)->next_free += (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, \
- __INT_TO_PTR ((h)->temp))
-
-# if defined __STDC__ && __STDC__
-# 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)))
-# else
-# 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)))
-# endif
-
-#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 dc1b204a9..000000000
--- a/include/opcode/ChangeLog
+++ /dev/null
@@ -1,2348 +0,0 @@
-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-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-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 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.
-
-Sat Jan 16 01:29:25 1999 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)
-
- * ../include/opcode/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.
-
-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.
-
-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, ChangeLog: renamed from ../<foo>-opcode.h
-
-
-Local Variables:
-version-control: never
-End:
diff --git a/include/opcode/a29k.h b/include/opcode/a29k.h
deleted file mode 100644
index 002e127d1..000000000
--- a/include/opcode/a29k.h
+++ /dev/null
@@ -1,285 +0,0 @@
-/* Table of opcodes for the AMD 29000 family.
- Copyright 1990, 1991, 1992, 1993 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-struct a29k_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 RA. The register number is in bits 8-15 of the instruction.
- b RB. The register number is in bits 0-7 of the instruction.
- c RC. The register number is in bits 16-23 of the instruction.
- i An immediate operand is in bits 0-7 of the instruction.
- x Bits 0-7 and 16-23 of the instruction are bits 0-7 and 8-15
- (respectively) of the immediate operand.
- h Same as x but the instruction contains bits 16-31 of the
- immediate operand.
- X Same as x but bits 16-31 of the signed immediate operand
- are set to 1 (thus the operand is always negative).
- P,A Bits 0-7 and 16-23 of the instruction are bits 2-9 and 10-17
- (respectively) of the immediate operand.
- P=PC-relative, sign-extended to 32 bits.
- A=Absolute, zero-extended to 32 bits.
- e CE bit (bit 23) for a load/store instruction.
- n Control field (bits 16-22) for a load/store instruction.
- v Immediate operand in bits 16-23 of the instruction.
- (used for trap numbers).
- s SA. Special-purpose register number in bits 8-15
- of the instruction.
- u UI--bit 7 of the instruction.
- r RND--bits 4-6 of the instruction.
- d FD--bits 2-3 of the instruction.
- f FS--bits 0-1 of the instruction.
- I ID--bits 16-17 of the instruction.
-
- Extensions for 29050:
-
- d FMT--bits 2-3 of the instruction (not really new).
- f ACN--bits 0-1 of the instruction (not really new).
- F FUNC--Special function in bits 18-21 of the instruction.
- C ACN--bits 16-17 specifying the accumlator register. */
- char *args;
-};
-
-#ifndef CONST
-#define CONST
-#endif /* CONST */
-
-static CONST struct a29k_opcode a29k_opcodes[] =
-{
-
-{ "add", 0x14000000, "c,a,b" },
-{ "add", 0x15000000, "c,a,i" },
-{ "addc", 0x1c000000, "c,a,b" },
-{ "addc", 0x1d000000, "c,a,i" },
-{ "addcs", 0x18000000, "c,a,b" },
-{ "addcs", 0x19000000, "c,a,i" },
-{ "addcu", 0x1a000000, "c,a,b" },
-{ "addcu", 0x1b000000, "c,a,i" },
-{ "adds", 0x10000000, "c,a,b" },
-{ "adds", 0x11000000, "c,a,i" },
-{ "addu", 0x12000000, "c,a,b" },
-{ "addu", 0x13000000, "c,a,i" },
-{ "and", 0x90000000, "c,a,b" },
-{ "and", 0x91000000, "c,a,i" },
-{ "andn", 0x9c000000, "c,a,b" },
-{ "andn", 0x9d000000, "c,a,i" },
-{ "aseq", 0x70000000, "v,a,b" },
-{ "aseq", 0x71000000, "v,a,i" },
-{ "asge", 0x5c000000, "v,a,b" },
-{ "asge", 0x5d000000, "v,a,i" },
-{ "asgeu", 0x5e000000, "v,a,b" },
-{ "asgeu", 0x5f000000, "v,a,i" },
-{ "asgt", 0x58000000, "v,a,b" },
-{ "asgt", 0x59000000, "v,a,i" },
-{ "asgtu", 0x5a000000, "v,a,b" },
-{ "asgtu", 0x5b000000, "v,a,i" },
-{ "asle", 0x54000000, "v,a,b" },
-{ "asle", 0x55000000, "v,a,i" },
-{ "asleu", 0x56000000, "v,a,b" },
-{ "asleu", 0x57000000, "v,a,i" },
-{ "aslt", 0x50000000, "v,a,b" },
-{ "aslt", 0x51000000, "v,a,i" },
-{ "asltu", 0x52000000, "v,a,b" },
-{ "asltu", 0x53000000, "v,a,i" },
-{ "asneq", 0x72000000, "v,a,b" },
-{ "asneq", 0x73000000, "v,a,i" },
-{ "call", 0xa8000000, "a,P" },
-{ "call", 0xa9000000, "a,A" },
-{ "calli", 0xc8000000, "a,b" },
-{ "class", 0xe6000000, "c,a,f" },
-{ "clz", 0x08000000, "c,b" },
-{ "clz", 0x09000000, "c,i" },
-{ "const", 0x03000000, "a,x" },
-{ "consth", 0x02000000, "a,h" },
-{ "consthz", 0x05000000, "a,h" },
-{ "constn", 0x01000000, "a,X" },
-{ "convert", 0xe4000000, "c,a,u,r,d,f" },
-{ "cpbyte", 0x2e000000, "c,a,b" },
-{ "cpbyte", 0x2f000000, "c,a,i" },
-{ "cpeq", 0x60000000, "c,a,b" },
-{ "cpeq", 0x61000000, "c,a,i" },
-{ "cpge", 0x4c000000, "c,a,b" },
-{ "cpge", 0x4d000000, "c,a,i" },
-{ "cpgeu", 0x4e000000, "c,a,b" },
-{ "cpgeu", 0x4f000000, "c,a,i" },
-{ "cpgt", 0x48000000, "c,a,b" },
-{ "cpgt", 0x49000000, "c,a,i" },
-{ "cpgtu", 0x4a000000, "c,a,b" },
-{ "cpgtu", 0x4b000000, "c,a,i" },
-{ "cple", 0x44000000, "c,a,b" },
-{ "cple", 0x45000000, "c,a,i" },
-{ "cpleu", 0x46000000, "c,a,b" },
-{ "cpleu", 0x47000000, "c,a,i" },
-{ "cplt", 0x40000000, "c,a,b" },
-{ "cplt", 0x41000000, "c,a,i" },
-{ "cpltu", 0x42000000, "c,a,b" },
-{ "cpltu", 0x43000000, "c,a,i" },
-{ "cpneq", 0x62000000, "c,a,b" },
-{ "cpneq", 0x63000000, "c,a,i" },
-{ "dadd", 0xf1000000, "c,a,b" },
-{ "ddiv", 0xf7000000, "c,a,b" },
-{ "deq", 0xeb000000, "c,a,b" },
-{ "dge", 0xef000000, "c,a,b" },
-{ "dgt", 0xed000000, "c,a,b" },
-{ "div", 0x6a000000, "c,a,b" },
-{ "div", 0x6b000000, "c,a,i" },
-{ "div0", 0x68000000, "c,b" },
-{ "div0", 0x69000000, "c,i" },
-{ "divide", 0xe1000000, "c,a,b" },
-{ "dividu", 0xe3000000, "c,a,b" },
-{ "divl", 0x6c000000, "c,a,b" },
-{ "divl", 0x6d000000, "c,a,i" },
-{ "divrem", 0x6e000000, "c,a,b" },
-{ "divrem", 0x6f000000, "c,a,i" },
-{ "dmac", 0xd9000000, "F,C,a,b" },
-{ "dmsm", 0xdb000000, "c,a,b" },
-{ "dmul", 0xf5000000, "c,a,b" },
-{ "dsub", 0xf3000000, "c,a,b" },
-{ "emulate", 0xd7000000, "v,a,b" },
-{ "exbyte", 0x0a000000, "c,a,b" },
-{ "exbyte", 0x0b000000, "c,a,i" },
-{ "exhw", 0x7c000000, "c,a,b" },
-{ "exhw", 0x7d000000, "c,a,i" },
-{ "exhws", 0x7e000000, "c,a" },
-{ "extract", 0x7a000000, "c,a,b" },
-{ "extract", 0x7b000000, "c,a,i" },
-{ "fadd", 0xf0000000, "c,a,b" },
-{ "fdiv", 0xf6000000, "c,a,b" },
-{ "fdmul", 0xf9000000, "c,a,b" },
-{ "feq", 0xea000000, "c,a,b" },
-{ "fge", 0xee000000, "c,a,b" },
-{ "fgt", 0xec000000, "c,a,b" },
-{ "fmac", 0xd8000000, "F,C,a,b" },
-{ "fmsm", 0xda000000, "c,a,b" },
-{ "fmul", 0xf4000000, "c,a,b" },
-{ "fsub", 0xf2000000, "c,a,b" },
-{ "halt", 0x89000000, "" },
-{ "inbyte", 0x0c000000, "c,a,b" },
-{ "inbyte", 0x0d000000, "c,a,i" },
-{ "inhw", 0x78000000, "c,a,b" },
-{ "inhw", 0x79000000, "c,a,i" },
-{ "inv", 0x9f000000, "I" },
-{ "iret", 0x88000000, "" },
-{ "iretinv", 0x8c000000, "I" },
-{ "jmp", 0xa0000000, "P" },
-{ "jmp", 0xa1000000, "A" },
-{ "jmpf", 0xa4000000, "a,P" },
-{ "jmpf", 0xa5000000, "a,A" },
-{ "jmpfdec", 0xb4000000, "a,P" },
-{ "jmpfdec", 0xb5000000, "a,A" },
-{ "jmpfi", 0xc4000000, "a,b" },
-{ "jmpi", 0xc0000000, "b" },
-{ "jmpt", 0xac000000, "a,P" },
-{ "jmpt", 0xad000000, "a,A" },
-{ "jmpti", 0xcc000000, "a,b" },
-{ "load", 0x16000000, "e,n,a,b" },
-{ "load", 0x17000000, "e,n,a,i" },
-{ "loadl", 0x06000000, "e,n,a,b" },
-{ "loadl", 0x07000000, "e,n,a,i" },
-{ "loadm", 0x36000000, "e,n,a,b" },
-{ "loadm", 0x37000000, "e,n,a,i" },
-{ "loadset", 0x26000000, "e,n,a,b" },
-{ "loadset", 0x27000000, "e,n,a,i" },
-{ "mfacc", 0xe9000100, "c,d,f" },
-{ "mfsr", 0xc6000000, "c,s" },
-{ "mftlb", 0xb6000000, "c,a" },
-{ "mtacc", 0xe8010000, "a,d,f" },
-{ "mtsr", 0xce000000, "s,b" },
-{ "mtsrim", 0x04000000, "s,x" },
-{ "mttlb", 0xbe000000, "a,b" },
-{ "mul", 0x64000000, "c,a,b" },
-{ "mul", 0x65000000, "c,a,i" },
-{ "mull", 0x66000000, "c,a,b" },
-{ "mull", 0x67000000, "c,a,i" },
-{ "multiplu", 0xe2000000, "c,a,b" },
-{ "multiply", 0xe0000000, "c,a,b" },
-{ "multm", 0xde000000, "c,a,b" },
-{ "multmu", 0xdf000000, "c,a,b" },
-{ "mulu", 0x74000000, "c,a,b" },
-{ "mulu", 0x75000000, "c,a,i" },
-{ "nand", 0x9a000000, "c,a,b" },
-{ "nand", 0x9b000000, "c,a,i" },
-{ "nop", 0x70400101, "" },
-{ "nor", 0x98000000, "c,a,b" },
-{ "nor", 0x99000000, "c,a,i" },
-{ "or", 0x92000000, "c,a,b" },
-{ "or", 0x93000000, "c,a,i" },
-{ "orn", 0xaa000000, "c,a,b" },
-{ "orn", 0xab000000, "c,a,i" },
-
-/* The description of "setip" in Chapter 8 ("instruction set") of the user's
- manual claims that these are absolute register numbers. But section
- 7.2.1 explains that they are not. The latter is correct, so print
- these normally ("lr0", "lr5", etc.). */
-{ "setip", 0x9e000000, "c,a,b" },
-
-{ "sll", 0x80000000, "c,a,b" },
-{ "sll", 0x81000000, "c,a,i" },
-{ "sqrt", 0xe5000000, "c,a,f" },
-{ "sra", 0x86000000, "c,a,b" },
-{ "sra", 0x87000000, "c,a,i" },
-{ "srl", 0x82000000, "c,a,b" },
-{ "srl", 0x83000000, "c,a,i" },
-{ "store", 0x1e000000, "e,n,a,b" },
-{ "store", 0x1f000000, "e,n,a,i" },
-{ "storel", 0x0e000000, "e,n,a,b" },
-{ "storel", 0x0f000000, "e,n,a,i" },
-{ "storem", 0x3e000000, "e,n,a,b" },
-{ "storem", 0x3f000000, "e,n,a,i" },
-{ "sub", 0x24000000, "c,a,b" },
-{ "sub", 0x25000000, "c,a,i" },
-{ "subc", 0x2c000000, "c,a,b" },
-{ "subc", 0x2d000000, "c,a,i" },
-{ "subcs", 0x28000000, "c,a,b" },
-{ "subcs", 0x29000000, "c,a,i" },
-{ "subcu", 0x2a000000, "c,a,b" },
-{ "subcu", 0x2b000000, "c,a,i" },
-{ "subr", 0x34000000, "c,a,b" },
-{ "subr", 0x35000000, "c,a,i" },
-{ "subrc", 0x3c000000, "c,a,b" },
-{ "subrc", 0x3d000000, "c,a,i" },
-{ "subrcs", 0x38000000, "c,a,b" },
-{ "subrcs", 0x39000000, "c,a,i" },
-{ "subrcu", 0x3a000000, "c,a,b" },
-{ "subrcu", 0x3b000000, "c,a,i" },
-{ "subrs", 0x30000000, "c,a,b" },
-{ "subrs", 0x31000000, "c,a,i" },
-{ "subru", 0x32000000, "c,a,b" },
-{ "subru", 0x33000000, "c,a,i" },
-{ "subs", 0x20000000, "c,a,b" },
-{ "subs", 0x21000000, "c,a,i" },
-{ "subu", 0x22000000, "c,a,b" },
-{ "subu", 0x23000000, "c,a,i" },
-{ "xnor", 0x96000000, "c,a,b" },
-{ "xnor", 0x97000000, "c,a,i" },
-{ "xor", 0x94000000, "c,a,b" },
-{ "xor", 0x95000000, "c,a,i" },
-
-{ "", 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_opcodes = (((sizeof a29k_opcodes) / (sizeof a29k_opcodes[0])) - 1);
diff --git a/include/opcode/alpha.h b/include/opcode/alpha.h
deleted file mode 100644
index 6f31e9ae0..000000000
--- a/include/opcode/alpha.h
+++ /dev/null
@@ -1,238 +0,0 @@
-/* alpha.h -- Header file for Alpha opcode table
- Copyright 1996, 1999 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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. */
- int bits;
-
- /* How far the operand is left shifted in the instruction. */
- int shift;
-
- /* The default relocation type for this operand. */
- int default_reloc;
-
- /* One bit syntax flags. */
- unsigned flags;
-
- /* 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) PARAMS ((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) PARAMS ((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 a1e0ca152..000000000
--- a/include/opcode/arc.h
+++ /dev/null
@@ -1,274 +0,0 @@
-/* Opcode table for the ARC.
- Copyright 1994, 1995, 1997 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, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, 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.
-
- This duplicates bfd_mach_arc_xxx. For now I wish to isolate this from bfd
- and bfd from this. Also note that these numbers are bit values as we want
- to allow for things available on more than one ARC (but not necessarily all
- ARCs). */
-
-/* The `base' cpu must be 0 (table entries are omitted for the base cpu).
- 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_BASE 0
-#define ARC_MACH_UNUSED1 1
-#define ARC_MACH_UNUSED2 2
-#define ARC_MACH_UNUSED4 4
-/* Additional cpu values can be inserted here and ARC_MACH_BIG moved down. */
-#define ARC_MACH_BIG 8
-
-/* Mask of number of bits necessary to record cpu type. */
-#define ARC_MACH_CPU_MASK 7
-/* Mask of number of bits necessary to record cpu type + endianness. */
-#define ARC_MACH_MASK 15
-
-/* 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) << 0)
-/* This insn is a conditional branch. */
-#define ARC_OPCODE_COND_BRANCH (ARC_OPCODE_FLAG_START)
-
- /* 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 instruction to try during assembly. */
- struct arc_opcode *next_dis; /* Next instruction 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)
-};
-
-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_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
-
-/* 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)
-
- /* 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) PARAMS ((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) PARAMS ((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 /*const*/ 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 PARAMS ((int, int));
-/* `arc_opcode_init_tables' must be called before `arc_xxx_supported'. */
-void arc_opcode_init_tables PARAMS ((int));
-void arc_opcode_init_insert PARAMS ((void));
-void arc_opcode_init_extract PARAMS ((void));
-const struct arc_opcode *arc_opcode_lookup_asm PARAMS ((const char *));
-const struct arc_opcode *arc_opcode_lookup_dis PARAMS ((unsigned int));
-int arc_opcode_limm_p PARAMS ((long *));
-const struct arc_operand_value *arc_opcode_lookup_suffix PARAMS ((const struct arc_operand *type, int value));
-int arc_opcode_supported PARAMS ((const struct arc_opcode *));
-int arc_opval_supported PARAMS ((const struct arc_operand_value *));
diff --git a/include/opcode/arm.h b/include/opcode/arm.h
deleted file mode 100644
index c7087eb9e..000000000
--- a/include/opcode/arm.h
+++ /dev/null
@@ -1,294 +0,0 @@
-/* ARM opcode list.
- Copyright (C) 1989, 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* types of instruction (encoded in bits 26 and 27 of the instruction) */
-
-#define TYPE_ARITHMETIC 0
-#define TYPE_LDR_STR 1
-#define TYPE_BLOCK_BRANCH 2
-#define TYPE_SWI 3
-
-/* bit 25 decides whether an instruction is a block move or a branch */
-#define SUBTYPE_BLOCK 0
-#define SUBTYPE_BRANCH 1
-
-/* codes to distinguish the arithmetic instructions */
-
-#define OPCODE_AND 0
-#define OPCODE_EOR 1
-#define OPCODE_SUB 2
-#define OPCODE_RSB 3
-#define OPCODE_ADD 4
-#define OPCODE_ADC 5
-#define OPCODE_SBC 6
-#define OPCODE_RSC 7
-#define OPCODE_TST 8
-#define OPCODE_TEQ 9
-#define OPCODE_CMP 10
-#define OPCODE_CMN 11
-#define OPCODE_ORR 12
-#define OPCODE_MOV 13
-#define OPCODE_BIC 14
-#define OPCODE_MVN 15
-
-/* condition codes */
-
-#define COND_EQ 0
-#define COND_NE 1
-#define COND_CS 2
-#define COND_CC 3
-#define COND_MI 4
-#define COND_PL 5
-#define COND_VS 6
-#define COND_VC 7
-#define COND_HI 8
-#define COND_LS 9
-#define COND_GE 10
-#define COND_LT 11
-#define COND_GT 12
-#define COND_LE 13
-#define COND_AL 14
-#define COND_NV 15
-
-/* Describes the format of an ARM machine instruction */
-
-struct generic_fmt {
- unsigned rest :25; /* the rest of the instruction */
- unsigned subtype :1; /* used to decide between block and branch */
- unsigned type :2; /* one of TYPE_* */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-struct arith_fmt {
- unsigned operand2 :12; /* #nn or rn or rn shift #m or rn shift rm */
- unsigned dest :4; /* place where the answer goes */
- unsigned operand1 :4; /* first operand to instruction */
- unsigned set :1; /* == 1 means set processor flags */
- unsigned opcode :4; /* one of OPCODE_* defined above */
- unsigned immed :1; /* operand2 is an immediate value */
- unsigned type :2; /* == TYPE_ARITHMETIC */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-struct ldr_str_fmt {
- unsigned offset :12; /* #nn or rn or rn shift #m */
- unsigned reg :4; /* destination for LDR, source for STR */
- unsigned base :4; /* base register */
- unsigned is_load :1; /* == 1 for LDR */
- unsigned writeback :1; /* == 1 means write back (base+offset) into base */
- unsigned byte :1; /* == 1 means byte access else word */
- unsigned up :1; /* == 1 means add offset else subtract it */
- unsigned pre_index :1; /* == 1 means [a,b] form else [a],b form */
- unsigned immed :1; /* == 0 means immediate offset */
- unsigned type :2; /* == TYPE_LDR_STR */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-struct block_fmt {
- unsigned mask :16; /* register mask */
- unsigned base :4; /* register used as base of move */
- unsigned is_load :1; /* == 1 for LDM */
- unsigned writeback :1; /* == 1 means update base after move */
- unsigned set :1; /* == 1 means set flags in pc if included in mask */
- unsigned increment :1; /* == 1 means increment base register */
- unsigned before :1; /* == 1 means inc/dec before each move */
- unsigned is_block :1; /* == SUBTYPE_BLOCK */
- unsigned type :2; /* == TYPE_BLOCK_BRANCH */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-struct branch_fmt {
- unsigned dest :24; /* destination of the branch */
- unsigned link :1; /* branch with link (function call) */
- unsigned is_branch :1; /* == SUBTYPE_BRANCH */
- unsigned type :2; /* == TYPE_BLOCK_BRANCH */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-#define ROUND_N 0
-#define ROUND_P 1
-#define ROUND_M 2
-#define ROUND_Z 3
-
-#define FLOAT2_MVF 0
-#define FLOAT2_MNF 1
-#define FLOAT2_ABS 2
-#define FLOAT2_RND 3
-#define FLOAT2_SQT 4
-#define FLOAT2_LOG 5
-#define FLOAT2_LGN 6
-#define FLOAT2_EXP 7
-#define FLOAT2_SIN 8
-#define FLOAT2_COS 9
-#define FLOAT2_TAN 10
-#define FLOAT2_ASN 11
-#define FLOAT2_ACS 12
-#define FLOAT2_ATN 13
-
-#define FLOAT3_ADF 0
-#define FLOAT3_MUF 1
-#define FLOAT3_SUF 2
-#define FLOAT3_RSF 3
-#define FLOAT3_DVF 4
-#define FLOAT3_RDF 5
-#define FLOAT3_POW 6
-#define FLOAT3_RPW 7
-#define FLOAT3_RMF 8
-#define FLOAT3_FML 9
-#define FLOAT3_FDV 10
-#define FLOAT3_FRD 11
-#define FLOAT3_POL 12
-
-struct float2_fmt {
- unsigned operand2 :3; /* second operand */
- unsigned immed :1; /* == 1 if second operand is a constant */
- unsigned pad1 :1; /* == 0 */
- unsigned rounding :2; /* ROUND_* */
- unsigned is_double :1; /* == 1 if precision is double (only if not extended) */
- unsigned pad2 :4; /* == 1 */
- unsigned dest :3; /* destination */
- unsigned is_2_op :1; /* == 1 if 2 operand ins */
- unsigned operand1 :3; /* first operand (only of is_2_op == 0) */
- unsigned is_extended :1; /* == 1 if precision is extended */
- unsigned opcode :4; /* FLOAT2_* or FLOAT3_* depending on is_2_op */
- unsigned must_be_2 :2; /* == 2 */
- unsigned type :2; /* == TYPE_SWI */
- unsigned cond :4; /* COND_* */
-};
-
-struct swi_fmt {
- unsigned argument :24; /* argument to SWI (syscall number) */
- unsigned must_be_3 :2; /* == 3 */
- unsigned type :2; /* == TYPE_SWI */
- unsigned cond :4; /* one of COND_* defined above */
-};
-
-union insn_fmt {
- struct generic_fmt generic;
- struct arith_fmt arith;
- struct ldr_str_fmt ldr_str;
- struct block_fmt block;
- struct branch_fmt branch;
- struct swi_fmt swi;
- unsigned long ins;
-};
-
-struct opcode {
- unsigned long value, mask; /* recognise instruction if (op&mask)==value */
- char *assembler; /* how to disassemble this instruction */
-};
-
-/* format of the assembler string :
-
- %% %
- %<bitfield>d print the bitfield in decimal
- %<bitfield>x print the bitfield in hex
- %<bitfield>r print as an ARM register
- %<bitfield>f print a floating point constant if >7 else an fp register
- %c print condition code (always bits 28-31)
- %P print floating point precision in arithmetic insn
- %Q print floating point precision in ldf/stf insn
- %R print floating point rounding mode
- %<bitnum>'c print specified char iff bit is one
- %<bitnum>`c print specified char iff bit is zero
- %<bitnum>?ab print a if bit is one else print b
- %p print 'p' iff bits 12-15 are 15
- %o print operand2 (immediate or register + shift)
- %a print address for ldr/str instruction
- %b print branch destination
- %A print address for ldc/stc/ldf/stf instruction
- %m print register mask for ldm/stm instruction
-*/
-
-static struct opcode opcodes[] = {
- /* ARM instructions */
- 0x00000090, 0x0fe000f0, "mul%20's %12-15r, %16-19r, %0-3r",
- 0x00200090, 0x0fe000f0, "mla%20's %12-15r, %16-19r, %0-3r, %8-11r",
- 0x00000000, 0x0de00000, "and%c%20's %12-15r, %16-19r, %o",
- 0x00200000, 0x0de00000, "eor%c%20's %12-15r, %16-19r, %o",
- 0x00400000, 0x0de00000, "sub%c%20's %12-15r, %16-19r, %o",
- 0x00600000, 0x0de00000, "rsb%c%20's %12-15r, %16-19r, %o",
- 0x00800000, 0x0de00000, "add%c%20's %12-15r, %16-19r, %o",
- 0x00a00000, 0x0de00000, "adc%c%20's %12-15r, %16-19r, %o",
- 0x00c00000, 0x0de00000, "sbc%c%20's %12-15r, %16-19r, %o",
- 0x00e00000, 0x0de00000, "rsc%c%20's %12-15r, %16-19r, %o",
- 0x01000000, 0x0de00000, "tst%c%p %16-19r, %o",
- 0x01200000, 0x0de00000, "teq%c%p %16-19r, %o",
- 0x01400000, 0x0de00000, "cmp%c%p %16-19r, %o",
- 0x01600000, 0x0de00000, "cmn%c%p %16-19r, %o",
- 0x01800000, 0x0de00000, "orr%c%20's %12-15r, %16-19r, %o",
- 0x01a00000, 0x0de00000, "mov%c%20's %12-15r, %o",
- 0x01c00000, 0x0de00000, "bic%c%20's %12-15r, %16-19r, %o",
- 0x01e00000, 0x0de00000, "mvn%c%20's %12-15r, %o",
- 0x04000000, 0x0c100000, "str%c%22'b %12-15r, %a",
- 0x04100000, 0x0c100000, "ldr%c%22'b %12-15r, %a",
- 0x08000000, 0x0e100000, "stm%c%23?id%24?ba %16-19r%22`!, %m",
- 0x08100000, 0x0e100000, "ldm%c%23?id%24?ba %16-19r%22`!, %m%22'^",
- 0x0a000000, 0x0e000000, "b%c%24'l %b",
- 0x0f000000, 0x0f000000, "swi%c %0-23x",
- /* Floating point coprocessor instructions */
- 0x0e000100, 0x0ff08f10, "adf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e100100, 0x0ff08f10, "muf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e200100, 0x0ff08f10, "suf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e300100, 0x0ff08f10, "rsf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e400100, 0x0ff08f10, "dvf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e500100, 0x0ff08f10, "rdf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e600100, 0x0ff08f10, "pow%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e700100, 0x0ff08f10, "rpw%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e800100, 0x0ff08f10, "rmf%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e900100, 0x0ff08f10, "fml%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0ea00100, 0x0ff08f10, "fdv%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0eb00100, 0x0ff08f10, "frd%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0ec00100, 0x0ff08f10, "pol%c%P%R %12-14f, %16-18f, %0-3f",
- 0x0e008100, 0x0ff08f10, "mvf%c%P%R %12-14f, %0-3f",
- 0x0e108100, 0x0ff08f10, "mnf%c%P%R %12-14f, %0-3f",
- 0x0e208100, 0x0ff08f10, "abs%c%P%R %12-14f, %0-3f",
- 0x0e308100, 0x0ff08f10, "rnd%c%P%R %12-14f, %0-3f",
- 0x0e408100, 0x0ff08f10, "sqt%c%P%R %12-14f, %0-3f",
- 0x0e508100, 0x0ff08f10, "log%c%P%R %12-14f, %0-3f",
- 0x0e608100, 0x0ff08f10, "lgn%c%P%R %12-14f, %0-3f",
- 0x0e708100, 0x0ff08f10, "exp%c%P%R %12-14f, %0-3f",
- 0x0e808100, 0x0ff08f10, "sin%c%P%R %12-14f, %0-3f",
- 0x0e908100, 0x0ff08f10, "cos%c%P%R %12-14f, %0-3f",
- 0x0ea08100, 0x0ff08f10, "tan%c%P%R %12-14f, %0-3f",
- 0x0eb08100, 0x0ff08f10, "asn%c%P%R %12-14f, %0-3f",
- 0x0ec08100, 0x0ff08f10, "acs%c%P%R %12-14f, %0-3f",
- 0x0ed08100, 0x0ff08f10, "atn%c%P%R %12-14f, %0-3f",
- 0x0e000110, 0x0ff00f1f, "flt%c%P%R %16-18f, %12-15r",
- 0x0e100110, 0x0fff0f98, "fix%c%R %12-15r, %0-2f",
- 0x0e200110, 0x0fff0fff, "wfs%c %12-15r",
- 0x0e300110, 0x0fff0fff, "rfs%c %12-15r",
- 0x0e400110, 0x0fff0fff, "wfc%c %12-15r",
- 0x0e500110, 0x0fff0fff, "rfc%c %12-15r",
- 0x0e90f110, 0x0ff8fff0, "cmf%c %16-18f, %0-3f",
- 0x0eb0f110, 0x0ff8fff0, "cnf%c %16-18f, %0-3f",
- 0x0ed0f110, 0x0ff8fff0, "cmfe%c %16-18f, %0-3f",
- 0x0ef0f110, 0x0ff8fff0, "cnfe%c %16-18f, %0-3f",
- 0x0c000100, 0x0e100f00, "stf%c%Q %12-14f, %A",
- 0x0c100100, 0x0e100f00, "ldf%c%Q %12-14f, %A",
- /* Generic coprocessor instructions */
- 0x0e000000, 0x0f000010, "cdp%c %8-11d, %20-23d, cr%12-15d, cr%16-19d, cr%0-3d, {%5-7d}",
- 0x0e000010, 0x0f100010, "mrc%c %8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}",
- 0x0e100010, 0x0f100010, "mcr%c %8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}",
- 0x0c000000, 0x0e100000, "stc%c%22`l %8-11d, cr%12-15d, %A",
- 0x0c100000, 0x0e100000, "ldc%c%22`l %8-11d, cr%12-15d, %A",
- /* the rest */
- 0x00000000, 0x00000000, "undefined instruction %0-31x",
-};
-#define N_OPCODES (sizeof opcodes / sizeof opcodes[0])
diff --git a/include/opcode/avr.h b/include/opcode/avr.h
deleted file mode 100644
index 393ca22d6..000000000
--- a/include/opcode/avr.h
+++ /dev/null
@@ -1,256 +0,0 @@
-/* Opcode table for the Atmel AVR micro controllers.
-
- Copyright 2000 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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, MOVW, ...) */
-#define AVR_ISA_ELPM 0x0080 /* device has >64K program memory (ELPM) */
-#define AVR_ISA_ELPMX 0x0100 /* device has ELPM Rd,Z[+] (none yet) */
-#define AVR_ISA_SPM 0x0200 /* device can program itself */
-#define AVR_ISA_EIND 0x0800 /* device has >128K program memory (none yet) */
-
-#define AVR_ISA_TINY1 (AVR_ISA_1200 | AVR_ISA_LPM)
-#define AVR_ISA_2xxx (AVR_ISA_TINY1 | AVR_ISA_SRAM)
-#define AVR_ISA_M83 (AVR_ISA_2xxx | AVR_ISA_MUL | AVR_ISA_LPMX | AVR_ISA_SPM)
-#define AVR_ISA_M603 (AVR_ISA_2xxx | AVR_ISA_MEGA)
-#define AVR_ISA_M103 (AVR_ISA_M603 | AVR_ISA_ELPM)
-#define AVR_ISA_M161 (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_LPMX | AVR_ISA_SPM)
-#define AVR_ISA_94K (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_LPMX)
-
-#define AVR_ISA_ALL 0xFFFF
-
-#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 (1700 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
- "1001010110x11000" (2) 0x95[9b]8
- "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 (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_MUL, 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/cgen.h b/include/opcode/cgen.h
deleted file mode 100644
index 632545d27..000000000
--- a/include/opcode/cgen.h
+++ /dev/null
@@ -1,1415 +0,0 @@
-/* Header file for targets using CGEN: Cpu tools GENerator.
-
-Copyright (C) 1996, 1997, 1998, 1999, 2000 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_H
-#define CGEN_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_VERSION. */
-
-/* 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 int 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]))
-
-/* Attribute name/value tables.
- These are used to assist parsing of descriptions at run-time. */
-
-typedef struct
-{
- const char * name;
- CGEN_ATTR_VALUE_TYPE 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;
-} 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 PTR for the type here.
- If NULL, BYTES is full of valid data (VALID == -1). */
- PTR 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)
- PARAMS ((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_VERSION
-typedef const char * (cgen_insert_fn)
- PARAMS ((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_VERSION
-typedef int (cgen_extract_fn)
- PARAMS ((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_VERSION
-typedef void (cgen_print_fn)
- PARAMS ((CGEN_CPU_DESC, PTR 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
-};
-
-/* 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_VERSION /* Don't require bfd.h unnecessarily. */
-typedef const char * (cgen_parse_operand_fn)
- PARAMS ((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
- PARAMS ((CGEN_CPU_DESC, cgen_parse_operand_fn));
-
-/* Called before trying to match a table entry with the insn. */
-
-extern void cgen_init_parse_operand PARAMS ((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;
- PTR 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
- PARAMS ((CGEN_CPU_DESC, const char *));
-extern const CGEN_HW_ENTRY * cgen_hw_lookup_by_num
- PARAMS ((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;
-} 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
- PARAMS ((CGEN_KEYWORD *, const char *));
-
-/* Lookup a keyword from its value. */
-
-const CGEN_KEYWORD_ENTRY *cgen_keyword_lookup_value
- PARAMS ((CGEN_KEYWORD *, int));
-
-/* Add a keyword. */
-
-void cgen_keyword_add PARAMS ((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
- PARAMS ((CGEN_KEYWORD *, const char *));
-const CGEN_KEYWORD_ENTRY *cgen_keyword_search_next
- PARAMS ((CGEN_KEYWORD_SEARCH *));
-
-/* Operand value support routines. */
-
-extern const char *cgen_parse_keyword
- PARAMS ((CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *));
-#ifdef BFD_VERSION /* Don't require bfd.h unnecessarily. */
-extern const char *cgen_parse_signed_integer
- PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
-extern const char *cgen_parse_unsigned_integer
- PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
-extern const char *cgen_parse_address
- PARAMS ((CGEN_CPU_DESC, const char **, int, int,
- enum cgen_parse_operand_result *, bfd_vma *));
-extern const char *cgen_validate_signed_integer
- PARAMS ((long, long, long));
-extern const char *cgen_validate_unsigned_integer
- PARAMS ((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
-
-/* 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;
-
-#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
- PARAMS ((CGEN_CPU_DESC, const char *));
-extern const CGEN_OPERAND * cgen_operand_lookup_by_num
- PARAMS ((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_BYTES 40
-
-/* A target may know its own precise maximum. Assert that it falls below
- the above limit. */
-#ifdef CGEN_ACTUAL_MAX_SYNTAX_BYTES
-#if CGEN_ACTUAL_MAX_SYNTAX_BYTES > CGEN_MAX_SYNTAX_BYTES
-#error "CGEN_ACTUAL_MAX_SYNTAX_BYTES too high - enlarge CGEN_MAX_SYNTAX_BYTES"
-#endif
-#endif
-
-
-typedef struct
-{
- unsigned char syntax[CGEN_MAX_SYNTAX_BYTES];
-} CGEN_SYNTAX;
-
-#define CGEN_SYNTAX_STRING(syn) (syn->syntax)
-#define CGEN_SYNTAX_CHAR_P(c) ((c) < 128)
-#define CGEN_SYNTAX_CHAR(c) (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;
-#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))
-} 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;
-};
-
-/* 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 PARAMS ((CGEN_CPU_DESC));
-extern int cgen_macro_insn_count PARAMS ((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) PARAMS ((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
- PARAMS ((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
- PARAMS ((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
- PARAMS ((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).
- ??? Simultaneous multiple isas might not make sense, but it's not (yet)
- precluded. */
- int 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;
-
- /* 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) PARAMS ((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)
- PARAMS ((CGEN_CPU_DESC, int opindex_, const char **,
- CGEN_FIELDS *fields_));
-#ifdef BFD_VERSION
- const char * (*insert_operand)
- PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_,
- CGEN_INSN_BYTES_PTR, bfd_vma pc_));
- int (*extract_operand)
- PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
- CGEN_FIELDS *fields_, bfd_vma pc_));
- void (*print_operand)
- PARAMS ((CGEN_CPU_DESC, int opindex_, PTR 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) PARAMS ((CGEN_FIELDS *fields_, int size_));
-#define CGEN_CPU_SET_FIELDS_BITSIZE(cd) ((cd)->set_fields_bitsize)
-
- /* CGEN_FIELDS accessors. */
- int (*get_int_operand)
- PARAMS ((CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_));
- void (*set_int_operand)
- PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_, int value_));
-#ifdef BFD_VERSION
- bfd_vma (*get_vma_operand)
- PARAMS ((CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_));
- void (*set_vma_operand)
- PARAMS ((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) PARAMS ((const CGEN_INSN *));
-
- /* Assembler hash function. */
- unsigned int (* asm_hash) PARAMS ((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) PARAMS ((const CGEN_INSN *));
-
- /* Disassembler hash function. */
- unsigned int (* dis_hash) PARAMS ((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) PARAMS ((const char *mach_name_,
- enum cgen_endian endian_));
-
-/* Close it. */
-
-extern void CGEN_SYM (cpu_close) PARAMS ((CGEN_CPU_DESC));
-
-/* Initialize the opcode table for use.
- Called by init_asm/init_dis. */
-
-extern void CGEN_SYM (init_opcode_table) PARAMS ((CGEN_CPU_DESC cd_));
-
-/* Initialize the ibld table for use.
- Called by init_asm/init_dis. */
-
-extern void CGEN_SYM (init_ibld_table) PARAMS ((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) PARAMS ((CGEN_CPU_DESC));
-extern void CGEN_SYM (init_dis) PARAMS ((CGEN_CPU_DESC));
-
-/* Initialize the operand instance table for use. */
-
-extern void CGEN_SYM (init_opinst_table) PARAMS ((CGEN_CPU_DESC cd_));
-
-/* Assemble an instruction. */
-
-extern const CGEN_INSN * CGEN_SYM (assemble_insn)
- PARAMS ((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) PARAMS ((const char *));
-
-/* Operand index computation. */
-extern const CGEN_INSN * cgen_lookup_insn
- PARAMS ((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
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN * insn_,
- const CGEN_FIELDS *fields_, int *indices_));
-extern const CGEN_INSN * cgen_lookup_get_insn_operands
- PARAMS ((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
- PARAMS ((CGEN_CPU_DESC, unsigned char *, int));
-extern void cgen_put_insn_value
- PARAMS ((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
- PARAMS ((CGEN_CPU_DESC, const char * filename_));
-
-/* Allow signed overflow of instruction fields. */
-extern void cgen_set_signed_overflow_ok PARAMS ((CGEN_CPU_DESC));
-
-/* Generate an error message if a signed field in an instruction overflows. */
-extern void cgen_clear_signed_overflow_ok PARAMS ((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 PARAMS ((CGEN_CPU_DESC));
-
-#endif /* CGEN_H */
diff --git a/include/opcode/convex.h b/include/opcode/convex.h
deleted file mode 100644
index efaeebb65..000000000
--- a/include/opcode/convex.h
+++ /dev/null
@@ -1,1711 +0,0 @@
-/* Information for instruction disassembly on the Convex.
- Copyright 1989, 1993 Free Software Foundation.
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef CONST
-#define CONST
-#endif /* CONST */
-
-#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/cris.h b/include/opcode/cris.h
deleted file mode 100644
index be02d4aff..000000000
--- a/include/opcode/cris.h
+++ /dev/null
@@ -1,298 +0,0 @@
-/* cris.h -- Header file for CRIS opcode and register tables.
- Copyright (C) 2000 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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,
-
- /* Simulator only (reserved). */
- cris_ver_sim,
-
- /* Only for v0..3 (Etrax 1..4). */
- cris_ver_v0_3,
-
- /* Only for v3 or higher (ETRAX 1..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 v10 or higher (ETRAX 100 LX).
- Of course some or all these of may change to cris_ver_v10p if/when
- there's a new revision. */
- cris_ver_v10p
-};
-
-
-/* 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[];
-
-/* 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)
-
-/* Nop. */
-#define NOP_OPCODE (0x050F)
-#define NOP_Z_BITS (0xFAF0)
-
-/* 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. */
- 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/d10v.h b/include/opcode/d10v.h
deleted file mode 100644
index 0abd9ee8e..000000000
--- a/include/opcode/d10v.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/* d10v.h -- Header file for D10V opcode table
- Copyright 1996, 1997, 1998 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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)
-
-/* 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();
-
-/* 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 f90b7a420..000000000
--- a/include/opcode/d30v.h
+++ /dev/null
@@ -1,286 +0,0 @@
-/* d30v.h -- Header file for D30V opcode table
- Copyright (C) 1997, 2000 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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();
-
-/* 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/h8300.h b/include/opcode/h8300.h
deleted file mode 100644
index 6def73708..000000000
--- a/include/opcode/h8300.h
+++ /dev/null
@@ -1,604 +0,0 @@
-/* Opcode table for the H8-300
- Copyright (C) 1991, 92, 93, 95, 96, 97, 1998 Free Software Foundation.
- 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., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
-
-/* Instructions are stored as a sequence of nibbles.
- If the nibble has value 15 or less then the representation is complete.
- Otherwise, we record what it contains with several flags. */
-
-typedef int op_type;
-
-#define Hex0 0
-#define Hex1 1
-#define Hex2 2
-#define Hex3 3
-#define Hex4 4
-#define Hex5 5
-#define Hex6 6
-#define Hex7 7
-#define Hex8 8
-#define Hex9 9
-#define HexA 10
-#define HexB 11
-#define HexC 12
-#define HexD 13
-#define HexE 14
-#define HexF 15
-
-#define L_8 0x01
-#define L_16 0x02
-#define L_32 0x04
-#define L_P 0x08
-#define L_24 0x10
-#define MEMRELAX 0x20 /* move insn which may relax */
-#define SRC 0x40
-#define DST 0x80
-
-#define REG 0x100
-#define EXR 0x200
-#define MACREG 0x800
-#define SRC_IN_DST 0x400
-#define IMM 0x1000
-#define DISP 0x2000
-#define IND 0x4000
-#define INC 0x8000
-#define DEC 0x10000
-#define L_3 0x20000
-#define KBIT 0x40000
-#define DBIT 0x80000
-#define DISPREG 0x100000
-#define IGNORE 0x200000
-#define E 0x400000 /* FIXME: end of nibble sequence? */
-#define L_2 0x800000
-#define B30 0x1000000 /* bit 3 must be low */
-#define B31 0x2000000 /* bit 3 must be high */
-#define CCR 0x4000000
-#define ABS 0x8000000
-#define ABSJMP 0x10000000
-#define ABS8MEM 0x20000000
-#define PCREL 0x40000000
-#define MEMIND 0x80000000
-
-#define IMM3 IMM|L_3
-#define IMM2 IMM|L_2
-
-#define SIZE (L_2|L_3|L_8|L_16|L_32|L_P|L_24)
-#define MODE (REG|IMM|DISP|IND|INC|DEC|CCR|ABS|MEMIND|EXR)
-
-#define RD8 (DST|L_8|REG)
-#define RD16 (DST|L_16|REG)
-#define RD32 (DST|L_32|REG)
-#define RS8 (SRC|L_8|REG)
-#define RS16 (SRC|L_16|REG)
-#define RS32 (SRC|L_32|REG)
-
-#define RSP (SRC|L_P|REG)
-#define RDP (DST|L_P|REG)
-
-#define IMM8 (IMM|SRC|L_8)
-#define IMM16 (IMM|SRC|L_16)
-#define IMM32 (IMM|SRC|L_32)
-
-#define ABS8SRC (SRC|ABS|L_8|ABS8MEM)
-#define ABS8DST (DST|ABS|L_8|ABS8MEM)
-
-#define DISP8 (PCREL|L_8)
-#define DISP16 (PCREL|L_16)
-
-#define DISP8SRC (DISP|L_8|SRC)
-#define DISP16SRC (DISP|L_16|SRC)
-
-#define DISP8DST (DISP|L_8|DST)
-#define DISP16DST (DISP|L_16|DST)
-
-#define ABS16SRC (SRC|ABS|L_16)
-#define ABS16DST (DST|ABS|L_16)
-#define ABS24SRC (SRC|ABS|L_24)
-#define ABS24DST (DST|ABS|L_24)
-#define ABS32SRC (SRC|ABS|L_32)
-#define ABS32DST (DST|ABS|L_32)
-
-#define RDDEC (DST|DEC)
-#define RSINC (SRC|INC)
-#define RDINC (DST|INC)
-
-#define RDIND (DST|IND)
-#define RSIND (SRC|IND)
-
-#if 1
-#define OR8 RS8 /* ??? OR as in One Register? */
-#define OR16 RS16
-#define OR32 RS32
-#else
-#define OR8 RD8
-#define OR16 RD16
-#define OR32 RD32
-#endif
-
-struct code
-{
- op_type nib[30];
-};
-
-struct arg
-{
- op_type nib[3];
-};
-
-struct h8_opcode
-{
- int how;
- int inbase;
- int time;
- char *name;
- struct arg args;
- struct code data;
- int length;
- int noperands;
- int idx;
- int size;
-};
-
-#ifdef DEFINE_TABLE
-
-#define BITOP(code, imm, name, op00, op01,op10,op11, op20,op21,op30)\
-{ code, 1, 2, name, {{imm,RD8,E}}, {{op00, op01, imm, RD8, E, 0, 0, 0, 0}}, 0, 0, 0, 0},\
-{ code, 1, 6, name, {{imm,RDIND,E}},{{op10, op11, B30|RDIND, 0, op00,op01, imm, 0, E}}, 0, 0, 0, 0},\
-{ code, 1, 6, name, {{imm,ABS8DST,E}},{{op20, op21, ABS8DST, IGNORE, op00,op01, imm, 0,E}}, 0, 0, 0, 0}\
-,{ code, 0, 6, name, {{imm,ABS16DST,E}},{{0x6,0xa,0x1,op30,ABS16DST,IGNORE,IGNORE,IGNORE, op00,op01, imm, 0,E}}, 0, 0, 0, 0},\
-{ code, 0, 6, name, {{imm,ABS32DST,E}},{{0x6,0xa,0x3,op30,ABS32DST,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE, op00,op01, imm, 0,E}}, 0, 0, 0, 0}
-
-
-#define EBITOP(code, imm, name, op00, op01,op10,op11, op20,op21,op30)\
- BITOP(code,imm, name, op00+1, op01, op10,op11, op20,op21,op30),\
- BITOP(code,RS8, name, op00, op01, op10,op11, op20,op21,op30)
-
-#define WTWOP(code,name, op1, op2) \
-{ code, 1, 2, name, {{RS16, RD16, E}}, {{ op1, op2, RS16, RD16, E, 0, 0, 0, 0}}, 0, 0, 0, 0}
-
-#define BRANCH(code, name, op) \
-{ code, 1, 4,name,{{DISP8,E,0}}, {{ 0x4, op, DISP8, IGNORE, E, 0, 0, 0, 0}}, 0, 0, 0, 0}, \
-{ code, 0, 6,name,{{DISP16,E,0}}, {{ 0x5, 0x8, op, 0x0, DISP16, IGNORE, IGNORE, IGNORE, E,0}}, 0, 0, 0, 0}
-
-#define SOP(code, x,name) \
-{code, 1, x, name
-
-#define NEW_SOP(code, in,x,name) \
-{code, in, x, name
-#define EOP ,0,0,0,0 }
-
-#define TWOOP(code, name, op1, op2,op3) \
-{ code,1, 2,name, {{IMM8, RD8, E}}, {{ op1, RD8, IMM8, IGNORE, E, 0, 0, 0, 0}}, 0, 0, 0, 0},\
-{ code, 1, 2,name, {{RS8, RD8, E}}, {{ op2, op3, RS8, RD8, E, 0, 0, 0, 0}}, 0, 0, 0, 0}
-
-#define UNOP(code,name, op1, op2) \
-{ code, 1, 2, name, {{OR8, E, 0}}, {{ op1, op2, 0, OR8, E, 0, 0, 0, 0}}, 0, 0, 0, 0}
-
-#define UNOP3(code, name, op1, op2, op3) \
-{ O(code,SB), 1, 2, name, {{OR8, E, 0}}, {{op1, op2, op3+0, OR8, E, 0, 0, 0, 0}}, 0, 0, 0, 0}, \
-{ O(code,SW), 0, 2, name, {{OR16, E, 0}}, {{op1, op2, op3+1, OR16, E, 0, 0, 0, 0}}, 0, 0, 0, 0}, \
-{ O(code,SL), 0, 2, name, {{OR32, E, 0}}, {{op1, op2, op3+3, OR32|B30, E, 0, 0, 0, 0}}, 0, 0, 0, 0} \
-,{ O(code,SB), 1, 2, name, {{IMM, OR8 | SRC_IN_DST, E}}, {{op1, op2, op3+4, OR8 | SRC_IN_DST, E, 0, 0, 0, 0}}, 0, 0, 0, 0}, \
-{ O(code,SW), 0, 2, name, {{IMM, OR16 | SRC_IN_DST, E}}, {{op1, op2, op3+5, OR16 | SRC_IN_DST, E, 0, 0, 0, 0}}, 0, 0, 0, 0}, \
-{ O(code,SL), 0, 2, name, {{IMM, OR32 | SRC_IN_DST, E}}, {{op1, op2, op3+7, OR32 | SRC_IN_DST|B30 , E, 0, 0, 0, 0}}, 0, 0, 0, 0}
-
-
-#define IMM32LIST IMM32,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define IMM24LIST IMM24,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define IMM16LIST IMM16,IGNORE,IGNORE,IGNORE
-#define A16LIST L_16,IGNORE,IGNORE,IGNORE
-#define DISP24LIST DISP|L_24,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define DISP32LIST DISP|L_32,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define ABS24LIST ABS|L_24,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define ABS32LIST ABS|L_32,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define A24LIST L_24,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define A32LIST L_32,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define PREFIX32 0x0,0x1,0x0,0x0
-#define PREFIXLDC 0x0,0x1,0x4,0x0
-
-
-#define O(op, size) (op*4+size)
-
-#define O_RECOMPILE 0
-#define O_ADD 1
-#define O_ADDX 2
-#define O_AND 3
-#define O_BAND 4
-#define O_BRA 5
-#define O_BRN 6
-#define O_BHI 7
-#define O_BLS 8
-#define O_BCC 9
-#define O_BCS 10
-#define O_BNE 11
-#define O_BVC 12
-#define O_BVS 13
-#define O_BPL 14
-#define O_BMI 15
-#define O_BGE 16
-#define O_BLT 17
-#define O_BGT 18
-#define O_BLE 19
-#define O_ANDC 20
-#define O_BEQ 21
-#define O_BCLR 22
-#define O_BIAND 23
-#define O_BILD 24
-#define O_BIOR 25
-#define O_BIXOR 26
-#define O_BIST 27
-#define O_BLD 28
-#define O_BNOT 29
-#define O_BSET 30
-#define O_BSR 31
-#define O_BXOR 32
-#define O_CMP 33
-#define O_DAA 34
-#define O_DAS 35
-#define O_DEC 36
-#define O_DIVU 37
-#define O_DIVS 38
-#define O_INC 39
-#define O_LDC 40
-#define O_MOV_TO_MEM 41
-#define O_OR 42
-#define O_ROTL 43
-#define O_ROTR 44
-#define O_ROTXL 45
-#define O_ROTXR 46
-#define O_BPT 47
-#define O_SHAL 48
-#define O_SHAR 49
-#define O_SHLL 50
-#define O_SHLR 51
-#define O_SUB 52
-#define O_SUBS 53
-#define O_TRAPA 54
-#define O_XOR 55
-#define O_XORC 56
-#define O_BOR 57
-#define O_BST 58
-#define O_BTST 59
-#define O_EEPMOV 60
-#define O_EXTS 61
-#define O_EXTU 62
-#define O_JMP 63
-#define O_JSR 64
-#define O_MULU 65
-#define O_MULS 66
-#define O_NOP 67
-#define O_NOT 68
-#define O_ORC 69
-#define O_RTE 70
-#define O_STC 71
-#define O_SUBX 72
-#define O_NEG 73
-#define O_RTS 74
-#define O_SLEEP 75
-#define O_ILL 76
-#define O_ADDS 77
-#define O_SYSCALL 78
-#define O_MOV_TO_REG 79
-#define O_TAS 80
-#define O_CLRMAC 82
-#define O_LDMAC 83
-#define O_MAC 84
-#define O_LDM 85
-#define O_STM 86
-#define O_STMAC 87
-#define O_LAST 88
-#define SB 0
-#define SW 1
-#define SL 2
-#define 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[] =
-{
- TWOOP(O(O_ADD,SB),"add.b", 0x8, 0x0,0x8),
-
- NEW_SOP(O(O_ADD,SW),1,2,"add.w"),{{RS16,RD16,E}},{{0x0,0x9,RS16,RD16,E}} EOP,
- NEW_SOP(O(O_ADD,SW),0,4,"add.w"),{{IMM16,RD16,E}},{{0x7,0x9,0x1,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}} EOP,
- NEW_SOP(O(O_ADD,SL),0,2,"add.l"),{{RS32,RD32,E }}, {{0x0,0xA,B31|RS32,B30|RD32,E}} EOP,
- NEW_SOP(O(O_ADD,SL),0,6,"add.l"),{{IMM32,RD32,E }},{{0x7,0xA,0x1,B30|RD32,IMM32LIST,E}} EOP,
- NEW_SOP(O(O_ADDS,SL),1,2,"adds"), {{KBIT,RDP,E}}, {{0x0,0xB,KBIT,RDP,E,0,0,0,0}} EOP,
-
- TWOOP(O(O_ADDX,SB),"addx",0x9,0x0,0xE),
- TWOOP(O(O_AND,SB), "and.b",0xE,0x1,0x6),
-
- NEW_SOP(O(O_AND,SW),0,2,"and.w"),{{RS16,RD16,E }},{{0x6,0x6,RS16,RD16,E}} EOP,
- NEW_SOP(O(O_AND,SW),0,4,"and.w"),{{IMM16,RD16,E }},{{0x7,0x9,0x6,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}} EOP,
-
- NEW_SOP(O(O_AND,SL),0,6,"and.l"),{{IMM32,RD32,E }},{{0x7,0xA,0x6,B30|RD32,IMM32LIST,E}} EOP,
- NEW_SOP(O(O_AND,SL),0,2,"and.l") ,{{RS32,RD32,E }},{{0x0,0x1,0xF,0x0,0x6,0x6,B30|RS32,B30|RD32,E}} EOP,
-
- NEW_SOP(O(O_ANDC,SB),1,2,"andc"), {{IMM8,CCR,E}},{{ 0x0,0x6,IMM8,IGNORE,E,0,0,0,0}} EOP,
- NEW_SOP(O(O_ANDC,SB),1,2,"andc"), {{IMM8,EXR,E}},{{ 0x0,0x1,0x4,0x1,0x0,0x6,IMM8,IGNORE,E,0,0,0,0}} EOP,
-
- BITOP(O(O_BAND,SB), IMM3|B30,"band",0x7,0x6,0x7,0xC,0x7,0xE,0x0),
- BRANCH(O(O_BRA,SB),"bra",0x0),
- 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),
- BITOP(O(O_BIAND,SB),IMM3|B31,"biand",0x7,0x6,0x7,0xC,0x7,0xE,0x0),
- BITOP(O(O_BILD,SB), IMM3|B31,"bild", 0x7,0x7,0x7,0xC,0x7,0xE,0x0),
- BITOP(O(O_BIOR,SB), IMM3|B31,"bior", 0x7,0x4,0x7,0xC,0x7,0xE,0x0),
- BITOP(O(O_BIST,SB), IMM3|B31,"bist", 0x6,0x7,0x7,0xD,0x7,0xF,0x8),
- BITOP(O(O_BIXOR,SB),IMM3|B31,"bixor",0x7,0x5,0x7,0xC,0x7,0xE,0x0),
- BITOP(O(O_BLD,SB), IMM3|B30,"bld", 0x7,0x7,0x7,0xC,0x7,0xE,0x0),
- EBITOP(O(O_BNOT,SB),IMM3|B30,"bnot", 0x6,0x1,0x7,0xD,0x7,0xF,0x8),
- BITOP(O(O_BOR,SB), IMM3|B30,"bor", 0x7,0x4,0x7,0xC,0x7,0xE,0x0),
- EBITOP(O(O_BSET,SB),IMM3|B30,"bset", 0x6,0x0,0x7,0xD,0x7,0xF,0x8),
-
- SOP(O(O_BSR,SB),6,"bsr"),{{DISP8,E,0}},{{ 0x5,0x5,DISP8,IGNORE,E,0,0,0,0}} EOP,
- SOP(O(O_BSR,SB),6,"bsr"),{{DISP16,E,0}},{{ 0x5,0xC,0x0,0x0,DISP16,IGNORE,IGNORE,IGNORE,E,0,0,0,0}} EOP,
- BITOP(O(O_BST,SB), IMM3|B30,"bst",0x6,0x7,0x7,0xD,0x7,0xF,0x8),
- EBITOP(O(O_BTST,SB), IMM3|B30,"btst",0x6,0x3,0x7,0xC,0x7,0xE,0x0),
- BITOP(O(O_BXOR,SB), IMM3|B30,"bxor",0x7,0x5,0x7,0xC,0x7,0xE,0x0),
-
- TWOOP(O(O_CMP,SB), "cmp.b",0xA,0x1,0xC),
- WTWOP(O(O_CMP,SW), "cmp.w",0x1,0xD),
-
- NEW_SOP(O(O_CMP,SW),1,2,"cmp.w"),{{RS16,RD16,E }},{{0x1,0xD,RS16,RD16,E}} EOP,
- NEW_SOP(O(O_CMP,SW),0,4,"cmp.w"),{{IMM16,RD16,E }},{{0x7,0x9,0x2,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}} EOP,
-
- NEW_SOP(O(O_CMP,SL),0,6,"cmp.l"),{{IMM32,RD32,E }},{{0x7,0xA,0x2,B30|RD32,IMM32LIST,E}} EOP,
- NEW_SOP(O(O_CMP,SL),0,2,"cmp.l") ,{{RS32,RD32,E }},{{0x1,0xF,B31|RS32,B30|RD32,E}} EOP,
-
- 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),
-
- NEW_SOP(O(O_DEC, SW),0,2,"dec.w") ,{{DBIT,RD16,E }},{{0x1,0xB,0x5|DBIT,RD16,E}} EOP,
- NEW_SOP(O(O_DEC, SL),0,2,"dec.l") ,{{DBIT,RD32,E }},{{0x1,0xB,0x7|DBIT,RD32|B30,E}} EOP,
-
- NEW_SOP(O(O_DIVU,SB),1,6,"divxu.b"), {{RS8,RD16,E}}, {{0x5,0x1,RS8,RD16,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_DIVU,SW),0,20,"divxu.w"),{{RS16,RD32,E}},{{0x5,0x3,RS16,B30|RD32,E}}EOP,
-
- NEW_SOP(O(O_DIVS,SB),0,20,"divxs.b") ,{{RS8,RD16,E }},{{0x0,0x1,0xD,0x0,0x5,0x1,RS8,RD16,E}} EOP,
- NEW_SOP(O(O_DIVS,SW),0,02,"divxs.w") ,{{RS16,RD32,E }},{{0x0,0x1,0xD,0x0,0x5,0x3,RS16,B30|RD32,E}} EOP,
-
- NEW_SOP(O(O_EEPMOV,SB),1,50,"eepmov.b"),{{E,0,0}},{{0x7,0xB,0x5,0xC,0x5,0x9,0x8,0xF,E}}EOP,
- NEW_SOP(O(O_EEPMOV,SW),0,50,"eepmov.w"),{{E,0,0}},{{0x7,0xB,0xD,0x4,0x5,0x9,0x8,0xF,E}} EOP,
-
- NEW_SOP(O(O_EXTS,SW),0,2,"exts.w"),{{OR16,E,0}},{{0x1,0x7,0xD,OR16,E }}EOP,
- NEW_SOP(O(O_EXTS,SL),0,2,"exts.l"),{{OR32,E,0}},{{0x1,0x7,0xF,OR32|B30,E }}EOP,
-
- NEW_SOP(O(O_EXTU,SW),0,2,"extu.w"),{{OR16,E,0}},{{0x1,0x7,0x5,OR16,E }}EOP,
- NEW_SOP(O(O_EXTU,SL),0,2,"extu.l"),{{OR32,E,0}},{{0x1,0x7,0x7,OR32|B30,E }}EOP,
-
- UNOP(O(O_INC,SB), "inc",0x0,0xA),
-
- NEW_SOP(O(O_INC,SW),0,2,"inc.w") ,{{DBIT,RD16,E }},{{0x0,0xB,0x5|DBIT,RD16,E}} EOP,
- NEW_SOP(O(O_INC,SL),0,2,"inc.l") ,{{DBIT,RD32,E }},{{0x0,0xB,0x7|DBIT,RD32|B30,E}} EOP,
-
- SOP(O(O_JMP,SB),4,"jmp"),{{RSIND,E,0}},{{0x5,0x9,B30|RSIND,0x0,E,0,0,0,0}}EOP,
- SOP(O(O_JMP,SB),6,"jmp"),{{SRC|ABSJMP,E,0}},{{0x5,0xA,SRC|ABSJMP,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_JMP,SB),8,"jmp"),{{SRC|MEMIND,E,0}},{{0x5,0xB,SRC|MEMIND,IGNORE,E,0,0,0,0}}EOP,
-
- SOP(O(O_JSR,SB),6,"jsr"),{{SRC|RSIND,E,0}}, {{0x5,0xD,B30|RSIND,0x0,E,0,0,0,0}}EOP,
- SOP(O(O_JSR,SB),8,"jsr"),{{SRC|ABSJMP,E,0}},{{0x5,0xE,SRC|ABSJMP,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_JSR,SB),8,"jsr"),{{SRC|MEMIND,E,0}},{{0x5,0xF,SRC|MEMIND,IGNORE,E,0,0,0,0}}EOP,
-
- NEW_SOP(O(O_LDC,SB),1,2,"ldc"),{{IMM8,CCR,E}}, {{ 0x0,0x7,IMM8,IGNORE,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_LDC,SB),1,2,"ldc"),{{OR8,CCR,E}}, {{ 0x0,0x3,0x0,OR8,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{ABS16SRC,CCR,E}}, {{PREFIXLDC,0x6,0xB,0x0,0x0,ABS16SRC,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{ABS32SRC,CCR,E}}, {{PREFIXLDC,0x6,0xB,0x2,0x0,SRC|ABS32LIST,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{DISP|SRC|L_16,CCR,E}},{{PREFIXLDC,0x6,0xF,B30|DISPREG,0,DISP|L_16,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{DISP|SRC|L_32,CCR,E}},{{PREFIXLDC,0x7,0x8,B30|DISPREG,0,0x6,0xB,0x2,0x0,SRC|DISP32LIST,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{RSINC,CCR,E}}, {{PREFIXLDC,0x6,0xD,B30|RSINC,0x0,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{RSIND,CCR,E}}, {{PREFIXLDC,0x6,0x9,B30|RDIND,0x0,E}} EOP,
-
- NEW_SOP(O(O_LDC,SB),1,2,"ldc"),{{IMM8,EXR,E}}, {{ 0x0,0x1,0x4,0x1,0x0,0x7,IMM8,IGNORE,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_LDC,SB),1,2,"ldc"),{{OR8,EXR,E}}, {{ 0x0,0x3,0x1,OR8,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{ABS16SRC,EXR,E}}, {{ 0x0,0x1,0x4,0x1,0x6,0xb,0x0,0x0,ABS16SRC,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{ABS32SRC,EXR,E}}, {{ 0x0,0x1,0x4,0x1,0x6,0xb,0x2,0x0,SRC|ABS32LIST,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{DISP|SRC|L_16,EXR,E}},{{ 0x0,0x1,0x4,0x1,0x6,0xf,B30|DISPREG,0,DISP|L_16,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{DISP|SRC|L_32,EXR,E}},{{ 0x0,0x1,0x4,0x1,0x7,0x8,B30|DISPREG,0,0x6,0xB,0x2,0x0,SRC|DISP32LIST,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{RSINC,EXR,E}}, {{ 0x0,0x1,0x4,0x1,0x6,0xd,B30|RSINC,0x0,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{RSIND,EXR,E}}, {{ 0x0,0x1,0x4,0x1,0x6,0x9,B30|RDIND,0x0,E}} EOP,
-
- SOP(O(O_MOV_TO_REG,SB),4,"mov.b"),{{ABS|SRC|L_16|MEMRELAX,RD8,E}}, {{ 0x6,0xA,0x0,RD8,SRC|ABS|MEMRELAX|A16LIST,E}}EOP,
- SOP(O(O_MOV_TO_REG,SB),6,"mov.b"),{{ABS|SRC|L_32|MEMRELAX,RD8,E }}, {{ 0x6,0xA,0x2,RD8,SRC|ABS|MEMRELAX|A32LIST,E }}EOP,
- SOP(O(O_MOV_TO_MEM,SB),4,"mov.b"),{{RS8,ABS|L_16|MEMRELAX|DST,E}}, {{ 0x6,0xA,0x8,RS8,DST|ABS|MEMRELAX|A16LIST,E}}EOP,
- SOP(O(O_MOV_TO_MEM,SB),6,"mov.b"),{{RS8,ABS|DST|L_32|MEMRELAX,E }}, {{ 0x6,0xA,0xA,RS8,DST|ABS|MEMRELAX|A32LIST,E }}EOP,
-
- SOP(O(O_MOV_TO_REG,SB),6,"mov.b"),{{DISP|L_32|SRC,RD8,E}}, {{ 0x7,0x8,B30|DISPREG,0x0,0x6,0xA,0x2,RD8,SRC|DISP32LIST,E}}EOP,
- SOP(O(O_MOV_TO_MEM,SB),6,"mov.b"),{{RS8,DISP|L_32|DST,E}}, {{ 0x7,0x8,B30|DISPREG,0x0,0x6,0xA,0xA,RS8,DST|DISP32LIST,E}}EOP,
-
-
-
- SOP(O(O_MOV_TO_REG,SB),2,"mov.b"),{{RS8,RD8,E}}, {{ 0x0,0xC,RS8,RD8,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SB),2,"mov.b"),{{IMM8,RD8,E}}, {{ 0xF,RD8,IMM8,IGNORE,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SB),4,"mov.b"),{{RSIND,RD8,E}}, {{ 0x6,0x8,B30|RSIND,RD8,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SB),6,"mov.b"),{{DISP16SRC,RD8,E}}, {{ 0x6,0xE,B30|DISPREG,RD8,DISP16SRC,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_MOV_TO_REG,SB),6,"mov.b"),{{RSINC,RD8,E}}, {{ 0x6,0xC,B30|RSINC,RD8,E,0,0,0,0}}EOP,
-
- SOP(O(O_MOV_TO_REG,SB),4,"mov.b"),{{ABS8SRC,RD8,E}}, {{ 0x2,RD8,ABS8SRC,IGNORE,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_MEM,SB),4,"mov.b"),{{RS8,RDIND,E}}, {{ 0x6,0x8,RDIND|B31,RS8,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_MEM,SB),6,"mov.b"),{{RS8,DISP16DST,E}}, {{ 0x6,0xE,DISPREG|B31,RS8,DISP16DST,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_MOV_TO_MEM,SB),6,"mov.b"),{{RS8,RDDEC|B31,E}}, {{ 0x6,0xC,RDDEC|B31,RS8,E,0,0,0,0}}EOP,
-
- SOP(O(O_MOV_TO_MEM,SB),4,"mov.b"),{{RS8,ABS8DST,E}}, {{ 0x3,RS8,ABS8DST,IGNORE,E,0,0,0,0}}EOP,
-
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{{RS16,RDIND,E}}, {{ 0x6,0x9,RDIND|B31,RS16,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{{DISP|L_32|SRC,RD16,E}},{{ 0x7,0x8,B30|DISPREG,0x0,0x6,0xB,0x2,RD16,SRC|DISP32LIST,E}}EOP,
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{{RS16,DISP|L_32|DST,E}},{{ 0x7,0x8,B30|DISPREG,0x0,0x6,0xB,0xA,RS16,DST|DISP32LIST,E}}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{{ABS|L_32|MEMRELAX|SRC,RD16,E }},{{ 0x6,0xB,0x2,RD16,SRC|MEMRELAX|ABS32LIST,E }}EOP,
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{{RS16,ABS|L_32|MEMRELAX|DST,E }},{{ 0x6,0xB,0xA,RS16,DST|MEMRELAX|ABS32LIST,E }}EOP,
- SOP(O(O_MOV_TO_REG,SW),2,"mov.w"),{{RS16,RD16,E}}, {{ 0x0,0xD,RS16, RD16,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SW),4,"mov.w"),{{IMM16,RD16,E}}, {{ 0x7,0x9,0x0,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_MOV_TO_REG,SW),4,"mov.w"),{{RSIND,RD16,E}}, {{ 0x6,0x9,B30|RSIND,RD16,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{{DISP16SRC,RD16,E}}, {{ 0x6,0xF,B30|DISPREG,RD16,DISP16SRC,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{{RSINC,RD16,E}}, {{ 0x6,0xD,B30|RSINC,RD16,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{{ABS16SRC,RD16,E}}, {{ 0x6,0xB,0x0,RD16,ABS16SRC,IGNORE,IGNORE,IGNORE,E}}EOP,
-
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{{RS16,DISP16DST,E}}, {{ 0x6,0xF,DISPREG|B31,RS16,DISP16DST,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{{RS16,RDDEC,E}}, {{ 0x6,0xD,RDDEC|B31,RS16,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{{RS16,ABS16DST,E}}, {{ 0x6,0xB,0x8,RS16,ABS16DST,IGNORE,IGNORE,IGNORE,E}}EOP,
-
- SOP(O(O_MOV_TO_REG,SL),4,"mov.l"),{{IMM32,RD32,E}}, {{ 0x7,0xA,0x0,B30|RD32,IMM32LIST,E}}EOP,
- SOP(O(O_MOV_TO_REG,SL),2,"mov.l"),{{RS32,RD32,E}}, {{ 0x0,0xF,B31|RS32,B30|RD32,E,0,0,0,0}}EOP,
-
- SOP(O(O_MOV_TO_REG,SL),4,"mov.l"),{{RSIND,RD32,E}}, {{ PREFIX32,0x6,0x9,RSIND|B30,B30|RD32,E,0,0,0,0 }}EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{{DISP16SRC,RD32,E}}, {{ PREFIX32,0x6,0xF,DISPREG|B30,B30|RD32,DISP16SRC,IGNORE,IGNORE,IGNORE,E }}EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{{DISP|L_32|SRC,RD32,E}},{{ PREFIX32,0x7,0x8,B30|DISPREG,0x0,0x6,0xB,0x2,B30|RD32,SRC|DISP32LIST,E }}EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{{RSINC,RD32,E}}, {{ PREFIX32,0x6,0xD,B30|RSINC,B30|RD32,E,0,0,0,0 }}EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{{ABS16SRC,RD32,E}}, {{ PREFIX32,0x6,0xB,0x0,B30|RD32,ABS16SRC,IGNORE,IGNORE,IGNORE,E }}EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{{ABS32SRC|MEMRELAX,RD32,E }}, {{ PREFIX32,0x6,0xB,0x2,B30|RD32,SRC|MEMRELAX|ABS32LIST,E }}EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{{RS32,RDIND,E}}, {{ PREFIX32,0x6,0x9,RDIND|B31,B30|RS32,E,0,0,0,0 }}EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{{RS32,DISP16DST,E}}, {{ PREFIX32,0x6,0xF,DISPREG|B31,B30|RS32,DISP16DST,IGNORE,IGNORE,IGNORE,E }}EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{{RS32,DISP|L_32|DST,E}},{{ PREFIX32,0x7,0x8,B31|DISPREG,0x0,0x6,0xB,0xA,B30|RS32,DST|DISP32LIST,E }}EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{{RS32,RDDEC,E}}, {{ PREFIX32,0x6,0xD,RDDEC|B31,B30|RS32,E,0,0,0,0 }}EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{{RS32,ABS16DST,E}}, {{ PREFIX32,0x6,0xB,0x8,B30|RS32,ABS16DST,IGNORE,IGNORE,IGNORE,E }}EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{{RS32,ABS32DST|MEMRELAX,E }}, {{ PREFIX32,0x6,0xB,0xA,B30|RS32,DST|MEMRELAX|ABS32LIST,E }}EOP,
-
- SOP(O(O_MOV_TO_REG,SB),10,"movfpe"),{{ABS16SRC,RD8,E}},{{ 0x6,0xA,0x4,RD8,ABS16SRC,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_MOV_TO_MEM,SB),10,"movtpe"),{{RS8,ABS16DST,E}},{{ 0x6,0xA,0xC,RS8,ABS16DST,IGNORE,IGNORE,IGNORE,E}}EOP,
-
- NEW_SOP(O(O_MULU,SB),1,14,"mulxu.b"),{{RS8,RD16,E}}, {{ 0x5,0x0,RS8,RD16,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_MULU,SW),0,14,"mulxu.w"),{{RS16,RD32,E}},{{ 0x5,0x2,RS16,B30|RD32,E,0,0,0,0}}EOP,
-
- NEW_SOP(O(O_MULS,SB),0,20,"mulxs.b"),{{RS8,RD16,E}}, {{ 0x0,0x1,0xc,0x0,0x5,0x0,RS8,RD16,E}}EOP,
- NEW_SOP(O(O_MULS,SW),0,20,"mulxs.w"),{{RS16,RD32,E}},{{ 0x0,0x1,0xc,0x0,0x5,0x2,RS16,B30|RD32,E}}EOP,
-
- /* ??? This can use UNOP3. */
- NEW_SOP(O(O_NEG,SB),1,2,"neg.b"),{{ OR8,E, 0}},{{ 0x1,0x7,0x8,OR8,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_NEG,SW),0,2,"neg.w"),{{ OR16,E,0}},{{ 0x1,0x7,0x9,OR16,E}}EOP,
- NEW_SOP(O(O_NEG,SL),0,2,"neg.l"),{{ OR32,E,0}},{{ 0x1,0x7,0xB,B30|OR32,E}}EOP,
-
- NEW_SOP(O(O_NOP,SN),1,2,"nop"),{{E,0,0}},{{ 0x0,0x0,0x0,0x0,E,0,0,0,0}}EOP,
-
- /* ??? This can use UNOP3. */
- NEW_SOP(O(O_NOT,SB),1,2,"not.b"),{{ OR8,E, 0}},{{ 0x1,0x7,0x0,OR8,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_NOT,SW),0,2,"not.w"),{{ OR16,E,0}},{{ 0x1,0x7,0x1,OR16,E}}EOP,
- NEW_SOP(O(O_NOT,SL),0,2,"not.l"),{{ OR32,E,0}},{{ 0x1,0x7,0x3,B30|OR32,E}}EOP,
-
- TWOOP(O(O_OR, SB),"or.b",0xC,0x1,0x4),
- NEW_SOP(O(O_OR,SW),0,4,"or.w"),{{IMM16,RD16,E }},{{0x7,0x9,0x4,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}} EOP,
- NEW_SOP(O(O_OR,SW),0,2,"or.w"),{{RS16,RD16,E }},{{0x6,0x4,RS16,RD16,E}} EOP,
-
- NEW_SOP(O(O_OR,SL),0,6,"or.l"),{{IMM32,RD32,E }},{{0x7,0xA,0x4,B30|RD32,IMM32LIST,E}} EOP,
- NEW_SOP(O(O_OR,SL),0,2,"or.l"),{{RS32,RD32,E }},{{0x0,0x1,0xF,0x0,0x6,0x4,B30|RS32,B30|RD32,E}} EOP,
-
- NEW_SOP(O(O_ORC,SB),1,2,"orc"),{{IMM8,CCR,E}},{{ 0x0,0x4,IMM8,IGNORE,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_ORC,SB),1,2,"orc"),{{IMM8,EXR,E}},{{ 0x0,0x1,0x4,0x1,0x0,0x4,IMM8,IGNORE,E,0,0,0,0}}EOP,
-
- NEW_SOP(O(O_MOV_TO_REG,SW),1,6,"pop.w"),{{OR16,E,0}},{{ 0x6,0xD,0x7,OR16,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_MOV_TO_REG,SL),0,6,"pop.l"),{{OR32,E,0}},{{ PREFIX32,0x6,0xD,0x7,OR32|B30,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_MOV_TO_MEM,SW),1,6,"push.w"),{{OR16,E,0}},{{ 0x6,0xD,0xF,OR16,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_MOV_TO_MEM,SL),0,6,"push.l"),{{OR32,E,0}},{{ PREFIX32,0x6,0xD,0xF,OR32|B30,E,0,0,0,0}}EOP,
-
- UNOP3(O_ROTL, "rotl", 0x1,0x2,0x8),
- UNOP3(O_ROTR, "rotr", 0x1,0x3,0x8),
- UNOP3(O_ROTXL, "rotxl",0x1,0x2,0x0),
- UNOP3(O_ROTXR, "rotxr",0x1,0x3,0x0),
-
- SOP(O(O_BPT,SN), 10,"bpt"),{{E,0,0}},{{ 0x7,0xA,0xF,0xF,E,0,0,0,0}}EOP,
- SOP(O(O_RTE,SN), 10,"rte"),{{E,0,0}},{{ 0x5,0x6,0x7,0x0,E,0,0,0,0}}EOP,
- SOP(O(O_RTS,SN), 8,"rts"),{{E,0,0}},{{ 0x5,0x4,0x7,0x0,E,0,0,0,0}}EOP,
-
- UNOP3(O_SHAL, "shal",0x1,0x0,0x8),
- UNOP3(O_SHAR, "shar",0x1,0x1,0x8),
- UNOP3(O_SHLL, "shll",0x1,0x0,0x0),
- UNOP3(O_SHLR, "shlr",0x1,0x1,0x0),
-
- SOP(O(O_SLEEP,SN),2,"sleep"),{{E,0,0}},{{ 0x0,0x1,0x8,0x0,E,0,0,0,0}} EOP,
-
- NEW_SOP(O(O_STC,SB), 1,2,"stc"),{{CCR,RD8,E}},{{ 0x0,0x2,0x0,RD8,E,0,0,0,0}} EOP,
-
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{CCR,RSIND,E}}, {{PREFIXLDC,0x6,0x9,B31|RDIND,0x0,E}} EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{CCR,DISP|DST|L_16,E}},{{PREFIXLDC,0x6,0xF,B31|DISPREG,0,DST|DISP|L_16,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{CCR,DISP|DST|L_32,E}},{{PREFIXLDC,0x7,0x8,B30|DISPREG,0,0x6,0xB,0xA,0x0,DST|DISP32LIST,E}}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{CCR,RDDEC,E}}, {{PREFIXLDC,0x6,0xD,B31|RDDEC,0x0,E}}EOP,
-
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{CCR,ABS16SRC,E}}, {{PREFIXLDC,0x6,0xB,0x8,0x0,ABS16DST,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{CCR,ABS32SRC,E}}, {{PREFIXLDC,0x6,0xB,0xA,0x0,DST|ABS32LIST,E}}EOP,
-
- NEW_SOP(O(O_STC,SB), 1,2,"stc"),{{EXR,RD8,E}},{{ 0x0,0x2,0x1,RD8,E,0,0,0,0}} EOP,
-
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{EXR,RSIND,E}}, {{0x0,0x1,0x4,0x1,0x6,0x9,B31|RDIND,0x0,E}} EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{EXR,DISP|DST|L_16,E}},{{0x0,0x1,0x4,0x1,0x6,0xF,B31|DISPREG,0,DST|DISP|L_16,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{EXR,DISP|DST|L_32,E}},{{0x0,0x1,0x4,0x1,0x7,0x8,B30|DISPREG,0,0x6,0xB,0xA,0x0,DST|DISP32LIST,E}}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{EXR,RDDEC,E}}, {{0x0,0x1,0x4,0x1,0x6,0xD,B31|RDDEC,0x0,E}}EOP,
-
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{EXR,ABS16SRC,E}}, {{0x0,0x1,0x4,0x1,0x6,0xB,0x8,0x0,ABS16DST,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{EXR,ABS32SRC,E}}, {{0x0,0x1,0x4,0x1,0x6,0xB,0xA,0x0,DST|ABS32LIST,E}}EOP,
-
- SOP(O(O_SUB,SB),2,"sub.b"),{{RS8,RD8,E}},{{ 0x1,0x8,RS8,RD8,E,0,0,0,0}}EOP,
-
- NEW_SOP(O(O_SUB,SW),1,2,"sub.w"),{{RS16,RD16,E }}, {{0x1,0x9,RS16,RD16,E}} EOP,
- NEW_SOP(O(O_SUB,SW),0,4,"sub.w"),{{IMM16,RD16,E }}, {{0x7,0x9,0x3,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}} EOP,
- NEW_SOP(O(O_SUB,SL),0,2,"sub.l") ,{{RS32,RD32,E }}, {{0x1,0xA,B31|RS32,B30|RD32,E}} EOP,
- NEW_SOP(O(O_SUB,SL),0,6,"sub.l"), {{IMM32,RD32,E }},{{0x7,0xA,0x3,B30|RD32,IMM32LIST,E}} EOP,
-
- SOP(O(O_SUBS,SL),2,"subs"),{{KBIT,RDP,E}},{{ 0x1,0xB,KBIT,RDP,E,0,0,0,0}}EOP,
- TWOOP(O(O_SUBX,SB),"subx",0xB,0x1,0xE),
-
- NEW_SOP(O(O_TRAPA,SB),0,2,"trapa"),{{ IMM2,E}}, {{0x5,0x7,IMM2,IGNORE,E }}EOP,
- NEW_SOP(O(O_TAS,SB),0,2,"tas"),{{RSIND,E}}, {{0x0,0x1,0xe,0x0,0x7,0xb,B30|RSIND,0xc,E }}EOP,
-
- TWOOP(O(O_XOR, SB),"xor",0xD,0x1,0x5),
-
- NEW_SOP(O(O_XOR,SW),0,4,"xor.w"),{{IMM16,RD16,E }},{{0x7,0x9,0x5,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}} EOP,
- NEW_SOP(O(O_XOR,SW),0,2,"xor.w"),{{RS16,RD16,E }},{{0x6,0x5,RS16,RD16,E}} EOP,
-
- NEW_SOP(O(O_XOR,SL),0,6,"xor.l"),{{IMM32,RD32,E }},{{0x7,0xA,0x5,B30|RD32,IMM32LIST,E}} EOP,
- NEW_SOP(O(O_XOR,SL),0,2,"xor.l") ,{{RS32,RD32,E }},{{0x0,0x1,0xF,0x0,0x6,0x5,B30|RS32,B30|RD32,E}} EOP,
-
- SOP(O(O_XORC,SB),2,"xorc"),{{IMM8,CCR,E}},{{ 0x0,0x5,IMM8,IGNORE,E,0,0,0,0}}EOP,
- SOP(O(O_XORC,SB),2,"xorc"),{{IMM8,EXR,E}},{{ 0x0,0x1,0x4,0x1,0x0,0x5,IMM8,IGNORE,E,0,0,0,0}}EOP,
-
- NEW_SOP(O(O_CLRMAC,SN),1,2,"clrmac"),{{E, 0, 0}},{{0x0,0x1,0xa,0x0,E}} EOP,
- NEW_SOP(O(O_MAC,SL),1,2,"mac"),{{RSINC,RDINC,E}},{{0x0,0x1,0x6,0x0,0x6,0xd,B30|RSINC,B30|RDINC,E}} EOP,
- NEW_SOP(O(O_LDMAC,SL),1,2,"ldmac"),{{RS32,MACREG,E}},{{0x0,0x3,MACREG,RS32,E}} EOP,
- NEW_SOP(O(O_STMAC,SL),1,2,"stmac"),{{MACREG,RD32,E}},{{0x0,0x2,MACREG,RD32,E}} EOP,
- NEW_SOP(O(O_LDM,SL),0,6,"ldm.l"),{{RSINC, RS32, E}},{{ 0x0,0x1,IGNORE,0x0,0x6,0xD,0x7,IGNORE,E}}EOP,
- NEW_SOP(O(O_STM,SL),0,6,"stm.l"),{{RS32, RDDEC, E}},{{0x0,0x1,IGNORE,0x0,0x6,0xD,0xF,IGNORE,E}}EOP,
- { 0 }
-};
-#else
-extern struct h8_opcode h8_opcodes[] ;
-#endif
-
-
-
-
diff --git a/include/opcode/hppa.h b/include/opcode/hppa.h
deleted file mode 100644
index f04403d2e..000000000
--- a/include/opcode/hppa.h
+++ /dev/null
@@ -1,854 +0,0 @@
-/* Table of opcodes for the PA-RISC.
- Copyright (C) 1990, 1991, 1993, 1995, 1999, 2000
- 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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;
-};
-
-/* Enable/disable strict syntax checking. Not currently used, but will
- be necessary for PA2.0 support in the future. */
-#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 64bit 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 14bit offset for single precision FP long load/store.
- # 14bit offset for double precision FP load long/store.
- J Yet another 14bit offset with an unusual encoding.
- K Yet another 14bit offset with an unusual encoding.
- y 16bit offset for single precision FP long load/store (PA2.0 wide).
- & 16bit offset for double precision FP long load/store (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 completer.
- cm short load and store completer.
- cq long load and store completer (like cm, but inserted into a
- different location in the target instruction).
- cs store bytes short completer.
- 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
-
-*/
-
-
-/* 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}";
-
-/* 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 bomb at runtime.
-
- * The disassembler should not care about the order of the opcodes. */
-
-static const struct pa_opcode pa_opcodes[] =
-{
-
-/* Pseudo-instructions. */
-
-{ "ldi", 0x34000000, 0xffe0c000, "j,x", pa10, 0},/* ldo val(r0),r */
-
-{ "call", 0xe800f000, 0xfc1ffffd, "n(b)", pa20, FLAG_STRICT},
-{ "call", 0xe800a000, 0xffe0e000, "nW", pa10, FLAG_STRICT},
-{ "ret", 0xe840d000, 0xfffffffd, "n", pa20, FLAG_STRICT},
-
-{ "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", pa20, 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", pa20, 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", 0x0c0010e0, 0xfc1f33e0, "cocc@(s,b),t", pa20, FLAG_STRICT},
-{ "ldd", 0x0c0010e0, 0xfc1f33e0, "cocc@(b),t", pa20, FLAG_STRICT},
-{ "ldd", 0x0c0000c0, 0xfc0013c0, "cxccx(s,b),t", pa20, FLAG_STRICT},
-{ "ldd", 0x0c0000c0, 0xfc0013c0, "cxccx(b),t", pa20, FLAG_STRICT},
-{ "ldd", 0x0c0010c0, 0xfc0013c0, "cmcc5(s,b),t", pa20, FLAG_STRICT},
-{ "ldd", 0x0c0010c0, 0xfc0013c0, "cmcc5(b),t", pa20, FLAG_STRICT},
-{ "ldd", 0x50000000, 0xfc000002, "cq&(b),x", pa20w, FLAG_STRICT},
-{ "ldd", 0x50000000, 0xfc000002, "cq#(b),x", pa20, FLAG_STRICT},
-{ "ldw", 0x48000000, 0xfc000000, "l(b),x", pa20w, FLAG_STRICT},
-{ "ldw", 0x0c000080, 0xfc0013c0, "cxccx(s,b),t", pa10, FLAG_STRICT},
-{ "ldw", 0x0c000080, 0xfc0013c0, "cxccx(b),t", pa10, FLAG_STRICT},
-{ "ldw", 0x0c0010a0, 0xfc1f33e0, "cocc@(s,b),t", pa20, FLAG_STRICT},
-{ "ldw", 0x0c0010a0, 0xfc1f33e0, "cocc@(b),t", pa20, FLAG_STRICT},
-{ "ldw", 0x0c001080, 0xfc0013c0, "cmcc5(s,b),t", pa10, FLAG_STRICT},
-{ "ldw", 0x0c001080, 0xfc0013c0, "cmcc5(b),t", pa10, FLAG_STRICT},
-{ "ldw", 0x4c000000, 0xfc000000, "ceJ(s,b),x", pa10, FLAG_STRICT},
-{ "ldw", 0x4c000000, 0xfc000000, "ceJ(b),x", pa10, FLAG_STRICT},
-{ "ldw", 0x5c000004, 0xfc000006, "ceK(s,b),x", pa20, FLAG_STRICT},
-{ "ldw", 0x5c000004, 0xfc000006, "ceK(b),x", pa20, FLAG_STRICT},
-{ "ldw", 0x48000000, 0xfc000000, "j(s,b),x", pa10, 0},
-{ "ldw", 0x48000000, 0xfc000000, "j(s,b),x", pa10, 0},
-{ "ldw", 0x48000000, 0xfc000000, "j(b),x", pa10, 0},
-{ "ldh", 0x44000000, 0xfc000000, "l(b),x", pa20w, FLAG_STRICT},
-{ "ldh", 0x0c000040, 0xfc0013c0, "cxccx(s,b),t", pa10, FLAG_STRICT},
-{ "ldh", 0x0c000040, 0xfc0013c0, "cxccx(b),t", pa10, FLAG_STRICT},
-{ "ldh", 0x0c001060, 0xfc1f33e0, "cocc@(s,b),t", pa20, FLAG_STRICT},
-{ "ldh", 0x0c001060, 0xfc1f33e0, "cocc@(b),t", pa20, FLAG_STRICT},
-{ "ldh", 0x0c001040, 0xfc0013c0, "cmcc5(s,b),t", pa10, FLAG_STRICT},
-{ "ldh", 0x0c001040, 0xfc0013c0, "cmcc5(b),t", pa10, FLAG_STRICT},
-{ "ldh", 0x44000000, 0xfc000000, "j(s,b),x", pa10, 0},
-{ "ldh", 0x44000000, 0xfc000000, "j(b),x", pa10, 0},
-{ "ldb", 0x40000000, 0xfc000000, "l(b),x", pa20w, FLAG_STRICT},
-{ "ldb", 0x0c000000, 0xfc0013c0, "cxccx(s,b),t", pa10, FLAG_STRICT},
-{ "ldb", 0x0c000000, 0xfc0013c0, "cxccx(b),t", pa10, FLAG_STRICT},
-{ "ldb", 0x0c001020, 0xfc1f33e0, "cocc@(s,b),t", pa20, FLAG_STRICT},
-{ "ldb", 0x0c001020, 0xfc1f33e0, "cocc@(b),t", pa20, FLAG_STRICT},
-{ "ldb", 0x0c001000, 0xfc0013c0, "cmcc5(s,b),t", pa10, FLAG_STRICT},
-{ "ldb", 0x0c001000, 0xfc0013c0, "cmcc5(b),t", pa10, FLAG_STRICT},
-{ "ldb", 0x40000000, 0xfc000000, "j(s,b),x", pa10, 0},
-{ "ldb", 0x40000000, 0xfc000000, "j(b),x", pa10, 0},
-{ "std", 0x0c0012e0, 0xfc0033ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
-{ "std", 0x0c0012e0, 0xfc0033ff, "cocCx,@(b)", pa20, FLAG_STRICT},
-{ "std", 0x0c0012c0, 0xfc0013c0, "cmcCx,V(s,b)", pa20, FLAG_STRICT},
-{ "std", 0x0c0012c0, 0xfc0013c0, "cmcCx,V(b)", pa20, FLAG_STRICT},
-{ "std", 0x70000000, 0xfc000002, "cqx,&(b)", pa20w, FLAG_STRICT},
-{ "std", 0x70000000, 0xfc000002, "cqx,#(b)", pa20, FLAG_STRICT},
-{ "stw", 0x68000000, 0xfc000000, "x,l(b)", pa20w, FLAG_STRICT},
-{ "stw", 0x0c0012a0, 0xfc0013ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
-{ "stw", 0x0c0012a0, 0xfc0013ff, "cocCx,@(b)", pa20, FLAG_STRICT},
-{ "stw", 0x0c001280, 0xfc0013c0, "cmcCx,V(s,b)", pa10, FLAG_STRICT},
-{ "stw", 0x0c001280, 0xfc0013c0, "cmcCx,V(b)", pa10, FLAG_STRICT},
-{ "stw", 0x6c000000, 0xfc000000, "cex,J(s,b)", pa10, FLAG_STRICT},
-{ "stw", 0x6c000000, 0xfc000000, "cex,J(b)", pa10, FLAG_STRICT},
-{ "stw", 0x7c000004, 0xfc000006, "cex,K(s,b)", pa20, FLAG_STRICT},
-{ "stw", 0x7c000004, 0xfc000006, "cex,K(b)", pa20, FLAG_STRICT},
-{ "stw", 0x68000000, 0xfc000000, "x,j(s,b)", pa10, 0},
-{ "stw", 0x68000000, 0xfc000000, "x,j(b)", pa10, 0},
-{ "sth", 0x64000000, 0xfc000000, "x,l(b)", pa20w, FLAG_STRICT},
-{ "sth", 0x0c001260, 0xfc0033ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
-{ "sth", 0x0c001260, 0xfc0033ff, "cocCx,@(b)", pa20, FLAG_STRICT},
-{ "sth", 0x0c001240, 0xfc0013c0, "cmcCx,V(s,b)", pa10, FLAG_STRICT},
-{ "sth", 0x0c001240, 0xfc0013c0, "cmcCx,V(b)", pa10, FLAG_STRICT},
-{ "sth", 0x64000000, 0xfc000000, "x,j(s,b)", pa10, 0},
-{ "sth", 0x64000000, 0xfc000000, "x,j(b)", pa10, 0},
-{ "stb", 0x60000000, 0xfc000000, "x,l(b)", pa20w, FLAG_STRICT},
-{ "stb", 0x0c001220, 0xfc0033ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
-{ "stb", 0x0c001220, 0xfc0033ff, "cocCx,@(b)", pa20, FLAG_STRICT},
-{ "stb", 0x0c001200, 0xfc0013c0, "cmcCx,V(s,b)", pa10, FLAG_STRICT},
-{ "stb", 0x0c001200, 0xfc0013c0, "cmcCx,V(b)", pa10, FLAG_STRICT},
-{ "stb", 0x60000000, 0xfc000000, "x,j(s,b)", pa10, 0},
-{ "stb", 0x60000000, 0xfc000000, "x,j(b)", pa10, 0},
-{ "ldwm", 0x4c000000, 0xfc000000, "j(s,b),x", pa10, 0},
-{ "ldwm", 0x4c000000, 0xfc000000, "j(b),x", pa10, 0},
-{ "stwm", 0x6c000000, 0xfc000000, "x,j(s,b)", pa10, 0},
-{ "stwm", 0x6c000000, 0xfc000000, "x,j(b)", pa10, 0},
-{ "ldwx", 0x0c000080, 0xfc001fc0, "cxx(s,b),t", pa10, 0},
-{ "ldwx", 0x0c000080, 0xfc001fc0, "cxx(b),t", pa10, 0},
-{ "ldhx", 0x0c000040, 0xfc001fc0, "cxx(s,b),t", pa10, 0},
-{ "ldhx", 0x0c000040, 0xfc001fc0, "cxx(b),t", pa10, 0},
-{ "ldbx", 0x0c000000, 0xfc001fc0, "cxx(s,b),t", pa10, 0},
-{ "ldbx", 0x0c000000, 0xfc001fc0, "cxx(b),t", pa10, 0},
-{ "ldwa", 0x0c000180, 0xfc00d3c0, "cxccx(b),t", pa10, FLAG_STRICT},
-{ "ldwa", 0x0c001180, 0xfc00d3c0, "cmcc5(b),t", pa10, FLAG_STRICT},
-{ "ldcw", 0x0c0001c0, 0xfc0013c0, "cxcdx(s,b),t", pa10, FLAG_STRICT},
-{ "ldcw", 0x0c0001c0, 0xfc0013c0, "cxcdx(b),t", pa10, FLAG_STRICT},
-{ "ldcw", 0x0c0011c0, 0xfc0013c0, "cmcd5(s,b),t", pa10, FLAG_STRICT},
-{ "ldcw", 0x0c0011c0, 0xfc0013c0, "cmcd5(b),t", pa10, FLAG_STRICT},
-{ "stwa", 0x0c0013a0, 0xfc00d3ff, "cocCx,@(b)", pa20, FLAG_STRICT},
-{ "stwa", 0x0c001380, 0xfc00d3c0, "cmcCx,V(b)", pa10, FLAG_STRICT},
-{ "stby", 0x0c001300, 0xfc0013c0, "cscCx,V(s,b)", pa10, FLAG_STRICT},
-{ "stby", 0x0c001300, 0xfc0013c0, "cscCx,V(b)", pa10, FLAG_STRICT},
-{ "ldda", 0x0c000100, 0xfc00d3c0, "cxccx(b),t", pa20, FLAG_STRICT},
-{ "ldda", 0x0c001100, 0xfc00d3c0, "cmcc5(b),t", pa20, FLAG_STRICT},
-{ "ldcd", 0x0c000140, 0xfc0013c0, "cxcdx(s,b),t", pa20, FLAG_STRICT},
-{ "ldcd", 0x0c000140, 0xfc0013c0, "cxcdx(b),t", pa20, FLAG_STRICT},
-{ "ldcd", 0x0c001140, 0xfc0013c0, "cmcd5(s,b),t", pa20, FLAG_STRICT},
-{ "ldcd", 0x0c001140, 0xfc0013c0, "cmcd5(b),t", pa20, FLAG_STRICT},
-{ "stda", 0x0c0013e0, 0xfc0033ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
-{ "stda", 0x0c0013e0, 0xfc0033ff, "cocCx,@(b)", pa20, FLAG_STRICT},
-{ "stda", 0x0c0013c0, 0xfc0013c0, "cmcCx,V(s,b)", pa20, FLAG_STRICT},
-{ "stda", 0x0c0013c0, 0xfc0013c0, "cmcCx,V(b)", pa20, FLAG_STRICT},
-{ "ldwax", 0x0c000180, 0xfc00dfc0, "cxx(b),t", pa10, 0},
-{ "ldcwx", 0x0c0001c0, 0xfc001fc0, "cxx(s,b),t", pa10, 0},
-{ "ldcwx", 0x0c0001c0, 0xfc001fc0, "cxx(b),t", pa10, 0},
-{ "ldws", 0x0c001080, 0xfc001fc0, "cm5(s,b),t", pa10, 0},
-{ "ldws", 0x0c001080, 0xfc001fc0, "cm5(b),t", pa10, 0},
-{ "ldhs", 0x0c001040, 0xfc001fc0, "cm5(s,b),t", pa10, 0},
-{ "ldhs", 0x0c001040, 0xfc001fc0, "cm5(b),t", pa10, 0},
-{ "ldbs", 0x0c001000, 0xfc001fc0, "cm5(s,b),t", pa10, 0},
-{ "ldbs", 0x0c001000, 0xfc001fc0, "cm5(b),t", pa10, 0},
-{ "ldwas", 0x0c001180, 0xfc00dfc0, "cm5(b),t", pa10, 0},
-{ "ldcws", 0x0c0011c0, 0xfc001fc0, "cm5(s,b),t", pa10, 0},
-{ "ldcws", 0x0c0011c0, 0xfc001fc0, "cm5(b),t", pa10, 0},
-{ "stws", 0x0c001280, 0xfc001fc0, "cmx,V(s,b)", pa10, 0},
-{ "stws", 0x0c001280, 0xfc001fc0, "cmx,V(b)", pa10, 0},
-{ "sths", 0x0c001240, 0xfc001fc0, "cmx,V(s,b)", pa10, 0},
-{ "sths", 0x0c001240, 0xfc001fc0, "cmx,V(b)", pa10, 0},
-{ "stbs", 0x0c001200, 0xfc001fc0, "cmx,V(s,b)", pa10, 0},
-{ "stbs", 0x0c001200, 0xfc001fc0, "cmx,V(b)", pa10, 0},
-{ "stwas", 0x0c001380, 0xfc00dfc0, "cmx,V(b)", pa10, 0},
-{ "stdby", 0x0c001340, 0xfc0013c0, "cscCx,V(s,b)", pa20, FLAG_STRICT},
-{ "stdby", 0x0c001340, 0xfc0013c0, "cscCx,V(b)", pa20, FLAG_STRICT},
-{ "stbys", 0x0c001300, 0xfc001fc0, "csx,V(s,b)", pa10, 0},
-{ "stbys", 0x0c001300, 0xfc001fc0, "csx,V(b)", pa10, 0},
-
-/* Immediate instructions. */
-{ "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", 0xc0006000, 0xffe06000, "?Bnx,!,w", pa20, FLAG_STRICT},
-{ "bb", 0xc4004000, 0xfc004000, "?Bnx,B,w", pa20, FLAG_STRICT},
-{ "bb", 0xc0004000, 0xffe06000, "?bnx,!,w", pa10, FLAG_STRICT},
-{ "bb", 0xc4004000, 0xfc004000, "?bnx,Q,w", pa10, 0},
-{ "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, 0xfc1f3fe0, "(s,b),t", pa10, 0},
-{ "ldsid", 0x000010a0, 0xfc1f3fe0, "(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, 0xfc003fa0, "cw(s,b),x,t", pa10, FLAG_STRICT},
-{ "probe", 0x04001180, 0xfc003fa0, "cw(b),x,t", pa10, FLAG_STRICT},
-{ "probei", 0x04003180, 0xfc003fa0, "cw(s,b),R,t", pa10, FLAG_STRICT},
-{ "probei", 0x04003180, 0xfc003fa0, "cw(b),R,t", pa10, FLAG_STRICT},
-{ "prober", 0x04001180, 0xfc003fe0, "(s,b),x,t", pa10, 0},
-{ "prober", 0x04001180, 0xfc003fe0, "(b),x,t", pa10, 0},
-{ "proberi", 0x04003180, 0xfc003fe0, "(s,b),R,t", pa10, 0},
-{ "proberi", 0x04003180, 0xfc003fe0, "(b),R,t", pa10, 0},
-{ "probew", 0x040011c0, 0xfc003fe0, "(s,b),x,t", pa10, 0},
-{ "probew", 0x040011c0, 0xfc003fe0, "(b),x,t", pa10, 0},
-{ "probewi", 0x040031c0, 0xfc003fe0, "(s,b),R,t", pa10, 0},
-{ "probewi", 0x040031c0, 0xfc003fe0, "(b),R,t", pa10, 0},
-{ "lpa", 0x04001340, 0xfc003fc0, "cZx(s,b),t", pa10, 0},
-{ "lpa", 0x04001340, 0xfc003fc0, "cZx(b),t", pa10, 0},
-{ "lha", 0x04001300, 0xfc003fc0, "cZx(s,b),t", pa10, 0},
-{ "lha", 0x04001300, 0xfc003fc0, "cZx(b),t", pa10, 0},
-{ "lci", 0x04001300, 0xfc003fe0, "x(s,b),t", pa10, 0},
-{ "lci", 0x04001300, 0xfc003fe0, "x(b),t", pa10, 0},
-{ "pdtlb", 0x04001600, 0xfc003fdf, "cLcZx(s,b)", pa20, FLAG_STRICT},
-{ "pdtlb", 0x04001600, 0xfc003fdf, "cLcZx(b)", pa20, FLAG_STRICT},
-{ "pdtlb", 0x04001200, 0xfc003fdf, "cZx(s,b)", pa10, 0},
-{ "pdtlb", 0x04001200, 0xfc003fdf, "cZx(b)", pa10, 0},
-{ "pitlb", 0x04000600, 0xfc001fdf, "cLcZx(S,b)", pa20, FLAG_STRICT},
-{ "pitlb", 0x04000600, 0xfc001fdf, "cLcZx(b)", pa20, FLAG_STRICT},
-{ "pitlb", 0x04000200, 0xfc001fdf, "cZx(S,b)", pa10, 0},
-{ "pitlb", 0x04000200, 0xfc001fdf, "cZx(b)", pa10, 0},
-{ "pdtlbe", 0x04001240, 0xfc003fdf, "cZx(s,b)", pa10, 0},
-{ "pdtlbe", 0x04001240, 0xfc003fdf, "cZx(b)", pa10, 0},
-{ "pitlbe", 0x04000240, 0xfc001fdf, "cZx(S,b)", pa10, 0},
-{ "pitlbe", 0x04000240, 0xfc001fdf, "cZx(b)", pa10, 0},
-{ "idtlba", 0x04001040, 0xfc003fff, "x,(s,b)", pa10, 0},
-{ "idtlba", 0x04001040, 0xfc003fff, "x,(b)", pa10, 0},
-{ "iitlba", 0x04000040, 0xfc001fff, "x,(S,b)", pa10, 0},
-{ "iitlba", 0x04000040, 0xfc001fff, "x,(b)", pa10, 0},
-{ "idtlbp", 0x04001000, 0xfc003fff, "x,(s,b)", pa10, 0},
-{ "idtlbp", 0x04001000, 0xfc003fff, "x,(b)", pa10, 0},
-{ "iitlbp", 0x04000000, 0xfc001fff, "x,(S,b)", pa10, 0},
-{ "iitlbp", 0x04000000, 0xfc001fff, "x,(b)", pa10, 0},
-{ "pdc", 0x04001380, 0xfc003fdf, "cZx(s,b)", pa10, 0},
-{ "pdc", 0x04001380, 0xfc003fdf, "cZx(b)", pa10, 0},
-{ "fdc", 0x04001280, 0xfc003fdf, "cZx(s,b)", pa10, 0},
-{ "fdc", 0x04001280, 0xfc003fdf, "cZx(b)", pa10, 0},
-{ "fic", 0x04000280, 0xfc001fdf, "cZx(S,b)", pa10, 0},
-{ "fic", 0x04000280, 0xfc001fdf, "cZx(b)", pa10, 0},
-{ "fdce", 0x040012c0, 0xfc003fdf, "cZx(s,b)", pa10, 0},
-{ "fdce", 0x040012c0, 0xfc003fdf, "cZx(b)", pa10, 0},
-{ "fice", 0x040002c0, 0xfc001fdf, "cZx(S,b)", pa10, 0},
-{ "fice", 0x040002c0, 0xfc001fdf, "cZx(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, 0xfc003fdf, "cZx(s,b)", pa11, 0},
-{ "gfw", 0x04001680, 0xfc003fdf, "cZx(b)", pa11, 0},
-{ "gfr", 0x04001a80, 0xfc003fdf, "cZx(s,b)", pa11, 0},
-{ "gfr", 0x04001a80, 0xfc003fdf, "cZx(b)", pa11, 0},
-
-/* Floating Point Coprocessor Instructions. */
-
-{ "fldw", 0x24001020, 0xfc1f33a0, "cocc@(s,b),fT", pa20, FLAG_STRICT},
-{ "fldw", 0x24001020, 0xfc1f33a0, "cocc@(b),fT", pa20, FLAG_STRICT},
-{ "fldw", 0x24000000, 0xfc001380, "cxccx(s,b),fT", pa10, FLAG_STRICT},
-{ "fldw", 0x24000000, 0xfc001380, "cxccx(b),fT", pa10, FLAG_STRICT},
-{ "fldw", 0x24001000, 0xfc001380, "cmcc5(s,b),fT", pa10, FLAG_STRICT},
-{ "fldw", 0x24001000, 0xfc001380, "cmcc5(b),fT", pa10, FLAG_STRICT},
-{ "fldw", 0x5c000000, 0xfc000004, "y(b),fe", pa20w, FLAG_STRICT},
-{ "fldw", 0x58000000, 0xfc000000, "cJy(b),fe", pa20w, FLAG_STRICT},
-{ "fldw", 0x5c000000, 0xfc000004, "d(b),fe", pa20, FLAG_STRICT},
-{ "fldw", 0x58000000, 0xfc000000, "cJd(b),fe", pa20, FLAG_STRICT},
-{ "fldd", 0x2c001020, 0xfc1f33e0, "cocc@(s,b),ft", pa20, FLAG_STRICT},
-{ "fldd", 0x2c001020, 0xfc1f33e0, "cocc@(b),ft", pa20, FLAG_STRICT},
-{ "fldd", 0x2c000000, 0xfc0013c0, "cxccx(s,b),ft", pa10, FLAG_STRICT},
-{ "fldd", 0x2c000000, 0xfc0013c0, "cxccx(b),ft", pa10, FLAG_STRICT},
-{ "fldd", 0x2c001000, 0xfc0013c0, "cmcc5(s,b),ft", pa10, FLAG_STRICT},
-{ "fldd", 0x2c001000, 0xfc0013c0, "cmcc5(b),ft", pa10, FLAG_STRICT},
-{ "fldd", 0x50000002, 0xfc000002, "cq&(b),fx", pa20w, FLAG_STRICT},
-{ "fldd", 0x50000002, 0xfc000002, "cq#(b),fx", pa20, FLAG_STRICT},
-{ "fstw", 0x24001220, 0xfc1f33a0, "cocCfT,@(s,b)", pa10, FLAG_STRICT},
-{ "fstw", 0x24001220, 0xfc1f33a0, "cocCfT,@(b)", pa10, FLAG_STRICT},
-{ "fstw", 0x24000200, 0xfc001380, "cxcCfT,x(s,b)", pa10, FLAG_STRICT},
-{ "fstw", 0x24000200, 0xfc001380, "cxcCfT,x(b)", pa10, FLAG_STRICT},
-{ "fstw", 0x24001200, 0xfc001380, "cmcCfT,5(s,b)", pa10, FLAG_STRICT},
-{ "fstw", 0x24001200, 0xfc001380, "cmcCfT,5(b)", pa10, FLAG_STRICT},
-{ "fstw", 0x7c000000, 0xfc000004, "fE,y(b)", pa20w, FLAG_STRICT},
-{ "fstw", 0x78000000, 0xfc000000, "cJfe,y(b)", pa20w, FLAG_STRICT},
-{ "fstw", 0x7c000000, 0xfc000004, "fe,d(b)", pa20, FLAG_STRICT},
-{ "fstw", 0x78000000, 0xfc000000, "cJfe,d(b)", pa20, FLAG_STRICT},
-{ "fstd", 0x2c001220, 0xfc1f33e0, "cocCft,@(s,b)", pa10, FLAG_STRICT},
-{ "fstd", 0x2c001220, 0xfc1f33e0, "cocCft,@(b)", pa10, FLAG_STRICT},
-{ "fstd", 0x2c000200, 0xfc0013c0, "cxcCft,x(s,b)", pa10, FLAG_STRICT},
-{ "fstd", 0x2c000200, 0xfc0013c0, "cxcCft,x(b)", pa10, FLAG_STRICT},
-{ "fstd", 0x2c001200, 0xfc0013c0, "cmcCft,5(s,b)", pa10, FLAG_STRICT},
-{ "fstd", 0x2c001200, 0xfc0013c0, "cmcCft,5(b)", pa10, FLAG_STRICT},
-{ "fstd", 0x70000002, 0xfc000002, "cqfx,&(b)", pa20w, FLAG_STRICT},
-{ "fstd", 0x70000002, 0xfc000002, "cqfx,#(b)", pa20, FLAG_STRICT},
-{ "fldwx", 0x24000000, 0xfc001f80, "cxx(s,b),fT", pa10, 0},
-{ "fldwx", 0x24000000, 0xfc001f80, "cxx(b),fT", pa10, 0},
-{ "flddx", 0x2c000000, 0xfc001fc0, "cxx(s,b),ft", pa10, 0},
-{ "flddx", 0x2c000000, 0xfc001fc0, "cxx(b),ft", pa10, 0},
-{ "fstwx", 0x24000200, 0xfc001f80, "cxfT,x(s,b)", pa10, 0},
-{ "fstwx", 0x24000200, 0xfc001f80, "cxfT,x(b)", pa10, 0},
-{ "fstdx", 0x2c000200, 0xfc001fc0, "cxft,x(s,b)", pa10, 0},
-{ "fstdx", 0x2c000200, 0xfc001fc0, "cxft,x(b)", pa10, 0},
-{ "fstqx", 0x3c000200, 0xfc001fc0, "cxft,x(s,b)", pa10, 0},
-{ "fstqx", 0x3c000200, 0xfc001fc0, "cxft,x(b)", pa10, 0},
-{ "fldws", 0x24001000, 0xfc001f80, "cm5(s,b),fT", pa10, 0},
-{ "fldws", 0x24001000, 0xfc001f80, "cm5(b),fT", pa10, 0},
-{ "fldds", 0x2c001000, 0xfc001fc0, "cm5(s,b),ft", pa10, 0},
-{ "fldds", 0x2c001000, 0xfc001fc0, "cm5(b),ft", pa10, 0},
-{ "fstws", 0x24001200, 0xfc001f80, "cmfT,5(s,b)", pa10, 0},
-{ "fstws", 0x24001200, 0xfc001f80, "cmfT,5(b)", pa10, 0},
-{ "fstds", 0x2c001200, 0xfc001fc0, "cmft,5(s,b)", pa10, 0},
-{ "fstds", 0x2c001200, 0xfc001fc0, "cmft,5(b)", pa10, 0},
-{ "fstqs", 0x3c001200, 0xfc001fc0, "cmft,5(s,b)", pa10, 0},
-{ "fstqs", 0x3c001200, 0xfc001fc0, "cmft,5(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, 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, 0xffffffe0, ",=", pa20, FLAG_STRICT},
-{ "ftest", 0x30000420, 0xffff1fff, "m", pa20, FLAG_STRICT},
-{ "ftest", 0x30002420, 0xffffffff, "", pa10, 0},
-{ "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},
-{ "cldwx", 0x24000000, 0xfc001e00, "ucxx(s,b),t", pa10, 0},
-{ "cldwx", 0x24000000, 0xfc001e00, "ucxx(b),t", pa10, 0},
-{ "clddx", 0x2c000000, 0xfc001e00, "ucxx(s,b),t", pa10, 0},
-{ "clddx", 0x2c000000, 0xfc001e00, "ucxx(b),t", pa10, 0},
-{ "cstwx", 0x24000200, 0xfc001e00, "ucxt,x(s,b)", pa10, 0},
-{ "cstwx", 0x24000200, 0xfc001e00, "ucxt,x(b)", pa10, 0},
-{ "cstdx", 0x2c000200, 0xfc001e00, "ucxt,x(s,b)", pa10, 0},
-{ "cstdx", 0x2c000200, 0xfc001e00, "ucxt,x(b)", pa10, 0},
-{ "cldws", 0x24001000, 0xfc001e00, "ucm5(s,b),t", pa10, 0},
-{ "cldws", 0x24001000, 0xfc001e00, "ucm5(b),t", pa10, 0},
-{ "cldds", 0x2c001000, 0xfc001e00, "ucm5(s,b),t", pa10, 0},
-{ "cldds", 0x2c001000, 0xfc001e00, "ucm5(b),t", pa10, 0},
-{ "cstws", 0x24001200, 0xfc001e00, "ucmt,5(s,b)", pa10, 0},
-{ "cstws", 0x24001200, 0xfc001e00, "ucmt,5(b)", pa10, 0},
-{ "cstds", 0x2c001200, 0xfc001e00, "ucmt,5(s,b)", pa10, 0},
-{ "cstds", 0x2c001200, 0xfc001e00, "ucmt,5(b)", pa10, 0},
-{ "cldw", 0x24000000, 0xfc001e00, "ucxx(s,b),t", pa10, FLAG_STRICT},
-{ "cldw", 0x24000000, 0xfc001e00, "ucxx(b),t", pa10, FLAG_STRICT},
-{ "cldw", 0x24001000, 0xfc001e00, "ucm5(s,b),t", pa10, FLAG_STRICT},
-{ "cldw", 0x24001000, 0xfc001e00, "ucm5(b),t", pa10, FLAG_STRICT},
-{ "cldd", 0x2c000000, 0xfc001e00, "ucxx(s,b),t", pa10, FLAG_STRICT},
-{ "cldd", 0x2c000000, 0xfc001e00, "ucxx(b),t", pa10, FLAG_STRICT},
-{ "cldd", 0x2c001000, 0xfc001e00, "ucm5(s,b),t", pa10, FLAG_STRICT},
-{ "cldd", 0x2c001000, 0xfc001e00, "ucm5(b),t", pa20, FLAG_STRICT},
-{ "cstw", 0x24000200, 0xfc001e00, "ucxt,x(s,b)", pa10, FLAG_STRICT},
-{ "cstw", 0x24000200, 0xfc001e00, "ucxt,x(b)", pa10, FLAG_STRICT},
-{ "cstw", 0x24001200, 0xfc001e00, "ucmt,5(s,b)", pa10, FLAG_STRICT},
-{ "cstw", 0x24001200, 0xfc001e00, "ucmt,5(b)", pa10, FLAG_STRICT},
-{ "cstd", 0x2c000200, 0xfc001e00, "ucxt,x(s,b)", pa10, FLAG_STRICT},
-{ "cstd", 0x2c000200, 0xfc001e00, "ucxt,x(b)", pa10, FLAG_STRICT},
-{ "cstd", 0x2c001200, 0xfc001e00, "ucmt,5(s,b)", pa10, FLAG_STRICT},
-{ "cstd", 0x2c001200, 0xfc001e00, "ucmt,5(b)", pa10, 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 f2049e741..000000000
--- a/include/opcode/i370.h
+++ /dev/null
@@ -1,265 +0,0 @@
-/* i370.h -- Header file for S/390 opcode table
- Copyright 1994, 95, 98, 99, 2000 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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) PARAMS ((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) PARAMS ((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 5b13b4af9..000000000
--- a/include/opcode/i386.h
+++ /dev/null
@@ -1,1198 +0,0 @@
-/* opcode/i386.h -- Intel 80386 opcode table
- Copyright 1989, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
- Free Software Foundation.
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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). See FloatDR below.
-
- 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
-
-static const template i386_optab[] = {
-
-#define X None
-#define NoSuf (No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf)
-#define b_Suf (No_wSuf|No_lSuf|No_sSuf|No_xSuf)
-#define w_Suf (No_bSuf|No_lSuf|No_sSuf|No_xSuf)
-#define l_Suf (No_bSuf|No_wSuf|No_sSuf|No_xSuf)
-#define x_Suf (No_bSuf|No_wSuf|No_sSuf|No_lSuf)
-#define bw_Suf (No_lSuf|No_sSuf|No_xSuf)
-#define bl_Suf (No_wSuf|No_sSuf|No_xSuf)
-#define wl_Suf (No_bSuf|No_sSuf|No_xSuf)
-#define sl_Suf (No_bSuf|No_wSuf|No_xSuf)
-#define bwl_Suf (No_sSuf|No_xSuf)
-#define FP (NoSuf|IgnoreSize)
-#define l_FP (l_Suf|IgnoreSize)
-#define x_FP (x_Suf|IgnoreSize)
-#define sl_FP (sl_Suf|IgnoreSize)
-#if SYSV386_COMPAT
-/* Someone forgot that the FloatR bit reverses the operation when not
- equal to the FloatD bit. ie. Changing only FloatD results in the
- destination being swapped *and* the direction being reversed. */
-#define FloatDR FloatD
-#else
-#define FloatDR (FloatD|FloatR)
-#endif
-
-/* Move instructions. */
-#define MOV_AX_DISP32 0xa0
-{ "mov", 2, 0xa0, X, 0, bwl_Suf|D|W, { Disp16|Disp32, Acc, 0 } },
-{ "mov", 2, 0x88, X, 0, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0 } },
-{ "mov", 2, 0xb0, X, 0, bwl_Suf|W|ShortForm, { Imm, Reg, 0 } },
-{ "mov", 2, 0xc6, X, 0, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0 } },
-/* The segment register moves accept WordReg so that a segment register
- can be copied to a 32 bit register, and vice versa, without using a
- size prefix. When moving to a 32 bit register, the upper 16 bits
- are set to an implementation defined value (on the Pentium Pro,
- the implementation defined value is zero). */
-{ "mov", 2, 0x8c, X, 0, wl_Suf|Modrm, { SReg2, WordReg|WordMem, 0 } },
-{ "mov", 2, 0x8c, X, Cpu386, wl_Suf|Modrm, { SReg3, WordReg|WordMem, 0 } },
-{ "mov", 2, 0x8e, X, 0, wl_Suf|Modrm|IgnoreSize, { WordReg|WordMem, SReg2, 0 } },
-{ "mov", 2, 0x8e, X, Cpu386, wl_Suf|Modrm|IgnoreSize, { WordReg|WordMem, SReg3, 0 } },
-/* Move to/from control debug registers. */
-{ "mov", 2, 0x0f20, X, Cpu386, l_Suf|D|Modrm|IgnoreSize, { Control, Reg32|InvMem, 0} },
-{ "mov", 2, 0x0f21, X, Cpu386, l_Suf|D|Modrm|IgnoreSize, { Debug, Reg32|InvMem, 0} },
-{ "mov", 2, 0x0f24, X, Cpu386, l_Suf|D|Modrm|IgnoreSize, { Test, Reg32|InvMem, 0} },
-
-/* Move with sign extend. */
-/* "movsbl" & "movsbw" must not be unified into "movsb" to avoid
- conflict with the "movs" string move instruction. */
-{"movsbl", 2, 0x0fbe, X, Cpu386, NoSuf|Modrm, { Reg8|ByteMem, Reg32, 0} },
-{"movsbw", 2, 0x0fbe, X, Cpu386, NoSuf|Modrm, { Reg8|ByteMem, Reg16, 0} },
-{"movswl", 2, 0x0fbf, X, Cpu386, NoSuf|Modrm, { Reg16|ShortMem, Reg32, 0} },
-/* Intel Syntax next 2 insns */
-{"movsx", 2, 0x0fbe, X, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} },
-{"movsx", 2, 0x0fbf, X, Cpu386, w_Suf|Modrm|IgnoreSize, { Reg16|ShortMem, Reg32, 0} },
-
-/* Move with zero extend. */
-{"movzb", 2, 0x0fb6, X, Cpu386, wl_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} },
-{"movzwl", 2, 0x0fb7, X, Cpu386, NoSuf|Modrm, { Reg16|ShortMem, Reg32, 0} },
-/* Intel Syntax next 2 insns */
-{"movzx", 2, 0x0fb6, X, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} },
-{"movzx", 2, 0x0fb7, X, Cpu386, w_Suf|Modrm|IgnoreSize, { Reg16|ShortMem, Reg32, 0} },
-
-/* Push instructions. */
-{"push", 1, 0x50, X, 0, wl_Suf|ShortForm|DefaultSize, { WordReg, 0, 0 } },
-{"push", 1, 0xff, 6, 0, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem, 0, 0 } },
-{"push", 1, 0x6a, X, Cpu186, wl_Suf|DefaultSize, { Imm8S, 0, 0} },
-{"push", 1, 0x68, X, Cpu186, wl_Suf|DefaultSize, { Imm16|Imm32, 0, 0} },
-{"push", 1, 0x06, X, 0, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
-{"push", 1, 0x0fa0, X, Cpu386, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } },
-{"pusha", 0, 0x60, X, Cpu186, wl_Suf|DefaultSize, { 0, 0, 0 } },
-
-/* Pop instructions. */
-{"pop", 1, 0x58, X, 0, wl_Suf|ShortForm|DefaultSize, { WordReg, 0, 0 } },
-{"pop", 1, 0x8f, 0, 0, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem, 0, 0 } },
-#define POP_SEG_SHORT 0x07
-{"pop", 1, 0x07, X, 0, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
-{"pop", 1, 0x0fa1, X, Cpu386, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } },
-{"popa", 0, 0x61, X, Cpu186, wl_Suf|DefaultSize, { 0, 0, 0 } },
-
-/* Exchange instructions.
- xchg commutes: we allow both operand orders. */
-{"xchg", 2, 0x90, X, 0, wl_Suf|ShortForm, { WordReg, Acc, 0 } },
-{"xchg", 2, 0x90, X, 0, wl_Suf|ShortForm, { Acc, WordReg, 0 } },
-{"xchg", 2, 0x86, X, 0, bwl_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } },
-{"xchg", 2, 0x86, X, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, Reg, 0 } },
-
-/* In/out from ports. */
-{"in", 2, 0xe4, X, 0, bwl_Suf|W, { Imm8, Acc, 0 } },
-{"in", 2, 0xec, X, 0, bwl_Suf|W, { InOutPortReg, Acc, 0 } },
-{"in", 1, 0xe4, X, 0, bwl_Suf|W, { Imm8, 0, 0 } },
-{"in", 1, 0xec, X, 0, bwl_Suf|W, { InOutPortReg, 0, 0 } },
-{"out", 2, 0xe6, X, 0, bwl_Suf|W, { Acc, Imm8, 0 } },
-{"out", 2, 0xee, X, 0, bwl_Suf|W, { Acc, InOutPortReg, 0 } },
-{"out", 1, 0xe6, X, 0, bwl_Suf|W, { Imm8, 0, 0 } },
-{"out", 1, 0xee, X, 0, bwl_Suf|W, { InOutPortReg, 0, 0 } },
-
-/* Load effective address. */
-{"lea", 2, 0x8d, X, 0, wl_Suf|Modrm, { WordMem, WordReg, 0 } },
-
-/* Load segment registers from memory. */
-{"lds", 2, 0xc5, X, 0, wl_Suf|Modrm, { WordMem, WordReg, 0} },
-{"les", 2, 0xc4, X, 0, wl_Suf|Modrm, { WordMem, WordReg, 0} },
-{"lfs", 2, 0x0fb4, X, Cpu386, wl_Suf|Modrm, { WordMem, WordReg, 0} },
-{"lgs", 2, 0x0fb5, X, Cpu386, wl_Suf|Modrm, { WordMem, WordReg, 0} },
-{"lss", 2, 0x0fb2, X, Cpu386, wl_Suf|Modrm, { WordMem, WordReg, 0} },
-
-/* Flags register instructions. */
-{"clc", 0, 0xf8, X, 0, NoSuf, { 0, 0, 0} },
-{"cld", 0, 0xfc, X, 0, NoSuf, { 0, 0, 0} },
-{"cli", 0, 0xfa, X, 0, NoSuf, { 0, 0, 0} },
-{"clts", 0, 0x0f06, X, Cpu286, NoSuf, { 0, 0, 0} },
-{"cmc", 0, 0xf5, X, 0, NoSuf, { 0, 0, 0} },
-{"lahf", 0, 0x9f, X, 0, NoSuf, { 0, 0, 0} },
-{"sahf", 0, 0x9e, X, 0, NoSuf, { 0, 0, 0} },
-{"pushf", 0, 0x9c, X, 0, wl_Suf|DefaultSize, { 0, 0, 0} },
-{"popf", 0, 0x9d, X, 0, wl_Suf|DefaultSize, { 0, 0, 0} },
-{"stc", 0, 0xf9, X, 0, NoSuf, { 0, 0, 0} },
-{"std", 0, 0xfd, X, 0, NoSuf, { 0, 0, 0} },
-{"sti", 0, 0xfb, X, 0, NoSuf, { 0, 0, 0} },
-
-/* Arithmetic. */
-{"add", 2, 0x00, X, 0, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"add", 2, 0x83, 0, 0, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"add", 2, 0x04, X, 0, bwl_Suf|W, { Imm, Acc, 0} },
-{"add", 2, 0x80, 0, 0, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
-
-{"inc", 1, 0x40, X, 0, wl_Suf|ShortForm, { WordReg, 0, 0} },
-{"inc", 1, 0xfe, 0, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"sub", 2, 0x28, X, 0, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"sub", 2, 0x83, 5, 0, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"sub", 2, 0x2c, X, 0, bwl_Suf|W, { Imm, Acc, 0} },
-{"sub", 2, 0x80, 5, 0, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
-
-{"dec", 1, 0x48, X, 0, wl_Suf|ShortForm, { WordReg, 0, 0} },
-{"dec", 1, 0xfe, 1, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"sbb", 2, 0x18, X, 0, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"sbb", 2, 0x83, 3, 0, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"sbb", 2, 0x1c, X, 0, bwl_Suf|W, { Imm, Acc, 0} },
-{"sbb", 2, 0x80, 3, 0, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
-
-{"cmp", 2, 0x38, X, 0, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"cmp", 2, 0x83, 7, 0, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"cmp", 2, 0x3c, X, 0, bwl_Suf|W, { Imm, Acc, 0} },
-{"cmp", 2, 0x80, 7, 0, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
-
-{"test", 2, 0x84, X, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, Reg, 0} },
-{"test", 2, 0x84, X, 0, bwl_Suf|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"test", 2, 0xa8, X, 0, bwl_Suf|W, { Imm, Acc, 0} },
-{"test", 2, 0xf6, 0, 0, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
-
-{"and", 2, 0x20, X, 0, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"and", 2, 0x83, 4, 0, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"and", 2, 0x24, X, 0, bwl_Suf|W, { Imm, Acc, 0} },
-{"and", 2, 0x80, 4, 0, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
-
-{"or", 2, 0x08, X, 0, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"or", 2, 0x83, 1, 0, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"or", 2, 0x0c, X, 0, bwl_Suf|W, { Imm, Acc, 0} },
-{"or", 2, 0x80, 1, 0, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
-
-{"xor", 2, 0x30, X, 0, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"xor", 2, 0x83, 6, 0, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"xor", 2, 0x34, X, 0, bwl_Suf|W, { Imm, Acc, 0} },
-{"xor", 2, 0x80, 6, 0, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
-
-/* clr with 1 operand is really xor with 2 operands. */
-{"clr", 1, 0x30, X, 0, bwl_Suf|W|Modrm|regKludge, { Reg, 0, 0 } },
-
-{"adc", 2, 0x10, X, 0, bwl_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"adc", 2, 0x83, 2, 0, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"adc", 2, 0x14, X, 0, bwl_Suf|W, { Imm, Acc, 0} },
-{"adc", 2, 0x80, 2, 0, bwl_Suf|W|Modrm, { Imm, Reg|AnyMem, 0} },
-
-{"neg", 1, 0xf6, 3, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-{"not", 1, 0xf6, 2, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"aaa", 0, 0x37, X, 0, NoSuf, { 0, 0, 0} },
-{"aas", 0, 0x3f, X, 0, NoSuf, { 0, 0, 0} },
-{"daa", 0, 0x27, X, 0, NoSuf, { 0, 0, 0} },
-{"das", 0, 0x2f, X, 0, NoSuf, { 0, 0, 0} },
-{"aad", 0, 0xd50a, X, 0, NoSuf, { 0, 0, 0} },
-{"aad", 1, 0xd5, X, 0, NoSuf, { Imm8S, 0, 0} },
-{"aam", 0, 0xd40a, X, 0, NoSuf, { 0, 0, 0} },
-{"aam", 1, 0xd4, X, 0, NoSuf, { Imm8S, 0, 0} },
-
-/* Conversion insns. */
-/* Intel naming */
-{"cbw", 0, 0x98, X, 0, NoSuf|Size16, { 0, 0, 0} },
-{"cwde", 0, 0x98, X, 0, NoSuf|Size32, { 0, 0, 0} },
-{"cwd", 0, 0x99, X, 0, NoSuf|Size16, { 0, 0, 0} },
-{"cdq", 0, 0x99, X, 0, NoSuf|Size32, { 0, 0, 0} },
-/* AT&T naming */
-{"cbtw", 0, 0x98, X, 0, NoSuf|Size16, { 0, 0, 0} },
-{"cwtl", 0, 0x98, X, 0, NoSuf|Size32, { 0, 0, 0} },
-{"cwtd", 0, 0x99, X, 0, NoSuf|Size16, { 0, 0, 0} },
-{"cltd", 0, 0x99, X, 0, NoSuf|Size32, { 0, 0, 0} },
-
-/* Warning! the mul/imul (opcode 0xf6) must only have 1 operand! They are
- expanding 64-bit multiplies, and *cannot* be selected to accomplish
- 'imul %ebx, %eax' (opcode 0x0faf must be used in this case)
- These multiplies can only be selected with single operand forms. */
-{"mul", 1, 0xf6, 4, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-{"imul", 1, 0xf6, 5, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-{"imul", 2, 0x0faf, X, Cpu386, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"imul", 3, 0x6b, X, Cpu186, wl_Suf|Modrm, { Imm8S, WordReg|WordMem, WordReg} },
-{"imul", 3, 0x69, X, Cpu186, wl_Suf|Modrm, { Imm16|Imm32, WordReg|WordMem, WordReg} },
-/* imul with 2 operands mimics imul with 3 by putting the register in
- both i.rm.reg & i.rm.regmem fields. regKludge enables this
- transformation. */
-{"imul", 2, 0x6b, X, Cpu186, wl_Suf|Modrm|regKludge,{ Imm8S, WordReg, 0} },
-{"imul", 2, 0x69, X, Cpu186, wl_Suf|Modrm|regKludge,{ Imm16|Imm32, WordReg, 0} },
-
-{"div", 1, 0xf6, 6, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-{"div", 2, 0xf6, 6, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, Acc, 0} },
-{"idiv", 1, 0xf6, 7, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-{"idiv", 2, 0xf6, 7, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, Acc, 0} },
-
-{"rol", 2, 0xd0, 0, 0, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"rol", 2, 0xc0, 0, Cpu186, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"rol", 2, 0xd2, 0, 0, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"rol", 1, 0xd0, 0, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"ror", 2, 0xd0, 1, 0, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"ror", 2, 0xc0, 1, Cpu186, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"ror", 2, 0xd2, 1, 0, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"ror", 1, 0xd0, 1, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"rcl", 2, 0xd0, 2, 0, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"rcl", 2, 0xc0, 2, Cpu186, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"rcl", 2, 0xd2, 2, 0, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"rcl", 1, 0xd0, 2, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"rcr", 2, 0xd0, 3, 0, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"rcr", 2, 0xc0, 3, Cpu186, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"rcr", 2, 0xd2, 3, 0, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"rcr", 1, 0xd0, 3, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"sal", 2, 0xd0, 4, 0, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"sal", 2, 0xc0, 4, Cpu186, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"sal", 2, 0xd2, 4, 0, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"sal", 1, 0xd0, 4, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"shl", 2, 0xd0, 4, 0, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"shl", 2, 0xc0, 4, Cpu186, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"shl", 2, 0xd2, 4, 0, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"shl", 1, 0xd0, 4, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"shr", 2, 0xd0, 5, 0, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"shr", 2, 0xc0, 5, Cpu186, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"shr", 2, 0xd2, 5, 0, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"shr", 1, 0xd0, 5, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"sar", 2, 0xd0, 7, 0, bwl_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"sar", 2, 0xc0, 7, Cpu186, bwl_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"sar", 2, 0xd2, 7, 0, bwl_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"sar", 1, 0xd0, 7, 0, bwl_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"shld", 3, 0x0fa4, X, Cpu386, wl_Suf|Modrm, { Imm8, WordReg, WordReg|WordMem} },
-{"shld", 3, 0x0fa5, X, Cpu386, wl_Suf|Modrm, { ShiftCount, WordReg, WordReg|WordMem} },
-{"shld", 2, 0x0fa5, X, Cpu386, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
-
-{"shrd", 3, 0x0fac, X, Cpu386, wl_Suf|Modrm, { Imm8, WordReg, WordReg|WordMem} },
-{"shrd", 3, 0x0fad, X, Cpu386, wl_Suf|Modrm, { ShiftCount, WordReg, WordReg|WordMem} },
-{"shrd", 2, 0x0fad, X, Cpu386, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
-
-/* Control transfer instructions. */
-{"call", 1, 0xe8, X, 0, wl_Suf|JumpDword|DefaultSize, { Disp16|Disp32, 0, 0} },
-{"call", 1, 0xff, 2, 0, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem|JumpAbsolute, 0, 0} },
-/* Intel Syntax */
-{"call", 2, 0x9a, X, 0, wl_Suf|JumpInterSegment|DefaultSize, { Imm16, Imm16|Imm32, 0} },
-/* Intel Syntax */
-{"call", 1, 0xff, 3, 0, x_Suf|Modrm|DefaultSize, { WordMem, 0, 0} },
-{"lcall", 2, 0x9a, X, 0, wl_Suf|JumpInterSegment|DefaultSize, { Imm16, Imm16|Imm32, 0} },
-{"lcall", 1, 0xff, 3, 0, wl_Suf|Modrm|DefaultSize, { WordMem|JumpAbsolute, 0, 0} },
-
-#define JUMP_PC_RELATIVE 0xeb
-{"jmp", 1, 0xeb, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jmp", 1, 0xff, 4, 0, wl_Suf|Modrm, { WordReg|WordMem|JumpAbsolute, 0, 0} },
-/* Intel Syntax */
-{"jmp", 2, 0xea, X, 0, wl_Suf|JumpInterSegment, { Imm16, Imm16|Imm32, 0} },
-/* Intel Syntax */
-{"jmp", 1, 0xff, 5, 0, x_Suf|Modrm, { WordMem, 0, 0} },
-{"ljmp", 2, 0xea, X, 0, wl_Suf|JumpInterSegment, { Imm16, Imm16|Imm32, 0} },
-{"ljmp", 1, 0xff, 5, 0, wl_Suf|Modrm, { WordMem|JumpAbsolute, 0, 0} },
-
-{"ret", 0, 0xc3, X, 0, wl_Suf|DefaultSize, { 0, 0, 0} },
-{"ret", 1, 0xc2, X, 0, wl_Suf|DefaultSize, { Imm16, 0, 0} },
-{"lret", 0, 0xcb, X, 0, wl_Suf|DefaultSize, { 0, 0, 0} },
-{"lret", 1, 0xca, X, 0, wl_Suf|DefaultSize, { Imm16, 0, 0} },
-{"enter", 2, 0xc8, X, Cpu186, wl_Suf|DefaultSize, { Imm16, Imm8, 0} },
-{"leave", 0, 0xc9, X, Cpu186, wl_Suf|DefaultSize, { 0, 0, 0} },
-
-/* Conditional jumps. */
-{"jo", 1, 0x70, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jno", 1, 0x71, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jb", 1, 0x72, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jc", 1, 0x72, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jnae", 1, 0x72, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jnb", 1, 0x73, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jnc", 1, 0x73, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jae", 1, 0x73, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"je", 1, 0x74, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jz", 1, 0x74, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jne", 1, 0x75, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jnz", 1, 0x75, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jbe", 1, 0x76, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jna", 1, 0x76, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jnbe", 1, 0x77, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"ja", 1, 0x77, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"js", 1, 0x78, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jns", 1, 0x79, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jp", 1, 0x7a, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jpe", 1, 0x7a, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jnp", 1, 0x7b, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jpo", 1, 0x7b, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jl", 1, 0x7c, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jnge", 1, 0x7c, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jnl", 1, 0x7d, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jge", 1, 0x7d, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jle", 1, 0x7e, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jng", 1, 0x7e, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jnle", 1, 0x7f, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jg", 1, 0x7f, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-
-/* jcxz vs. jecxz is chosen on the basis of the address size prefix. */
-{"jcxz", 1, 0xe3, X, 0, NoSuf|JumpByte|Size16, { Disp, 0, 0} },
-{"jecxz", 1, 0xe3, X, 0, NoSuf|JumpByte|Size32, { Disp, 0, 0} },
-
-/* The loop instructions also use the address size prefix to select
- %cx rather than %ecx for the loop count, so the `w' form of these
- instructions emit an address size prefix rather than a data size
- prefix. */
-{"loop", 1, 0xe2, X, 0, wl_Suf|JumpByte, { Disp, 0, 0} },
-{"loopz", 1, 0xe1, X, 0, wl_Suf|JumpByte, { Disp, 0, 0} },
-{"loope", 1, 0xe1, X, 0, wl_Suf|JumpByte, { Disp, 0, 0} },
-{"loopnz", 1, 0xe0, X, 0, wl_Suf|JumpByte, { Disp, 0, 0} },
-{"loopne", 1, 0xe0, X, 0, wl_Suf|JumpByte, { Disp, 0, 0} },
-
-/* Set byte on flag instructions. */
-{"seto", 1, 0x0f90, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setno", 1, 0x0f91, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setb", 1, 0x0f92, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setc", 1, 0x0f92, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnae", 1, 0x0f92, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnb", 1, 0x0f93, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnc", 1, 0x0f93, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setae", 1, 0x0f93, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"sete", 1, 0x0f94, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setz", 1, 0x0f94, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setne", 1, 0x0f95, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnz", 1, 0x0f95, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setbe", 1, 0x0f96, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setna", 1, 0x0f96, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnbe", 1, 0x0f97, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"seta", 1, 0x0f97, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"sets", 1, 0x0f98, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setns", 1, 0x0f99, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setp", 1, 0x0f9a, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setpe", 1, 0x0f9a, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnp", 1, 0x0f9b, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setpo", 1, 0x0f9b, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setl", 1, 0x0f9c, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnge", 1, 0x0f9c, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnl", 1, 0x0f9d, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setge", 1, 0x0f9d, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setle", 1, 0x0f9e, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setng", 1, 0x0f9e, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnle", 1, 0x0f9f, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setg", 1, 0x0f9f, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-
-/* String manipulation. */
-{"cmps", 0, 0xa6, X, 0, bwl_Suf|W|IsString, { 0, 0, 0} },
-{"cmps", 2, 0xa6, X, 0, bwl_Suf|W|IsString, { AnyMem|EsSeg, AnyMem, 0} },
-{"scmp", 0, 0xa6, X, 0, bwl_Suf|W|IsString, { 0, 0, 0} },
-{"scmp", 2, 0xa6, X, 0, bwl_Suf|W|IsString, { AnyMem|EsSeg, AnyMem, 0} },
-{"ins", 0, 0x6c, X, Cpu186, bwl_Suf|W|IsString, { 0, 0, 0} },
-{"ins", 2, 0x6c, X, Cpu186, bwl_Suf|W|IsString, { InOutPortReg, AnyMem|EsSeg, 0} },
-{"outs", 0, 0x6e, X, Cpu186, bwl_Suf|W|IsString, { 0, 0, 0} },
-{"outs", 2, 0x6e, X, Cpu186, bwl_Suf|W|IsString, { AnyMem, InOutPortReg, 0} },
-{"lods", 0, 0xac, X, 0, bwl_Suf|W|IsString, { 0, 0, 0} },
-{"lods", 1, 0xac, X, 0, bwl_Suf|W|IsString, { AnyMem, 0, 0} },
-{"lods", 2, 0xac, X, 0, bwl_Suf|W|IsString, { AnyMem, Acc, 0} },
-{"slod", 0, 0xac, X, 0, bwl_Suf|W|IsString, { 0, 0, 0} },
-{"slod", 1, 0xac, X, 0, bwl_Suf|W|IsString, { AnyMem, 0, 0} },
-{"slod", 2, 0xac, X, 0, bwl_Suf|W|IsString, { AnyMem, Acc, 0} },
-{"movs", 0, 0xa4, X, 0, bwl_Suf|W|IsString, { 0, 0, 0} },
-{"movs", 2, 0xa4, X, 0, bwl_Suf|W|IsString, { AnyMem, AnyMem|EsSeg, 0} },
-{"smov", 0, 0xa4, X, 0, bwl_Suf|W|IsString, { 0, 0, 0} },
-{"smov", 2, 0xa4, X, 0, bwl_Suf|W|IsString, { AnyMem, AnyMem|EsSeg, 0} },
-{"scas", 0, 0xae, X, 0, bwl_Suf|W|IsString, { 0, 0, 0} },
-{"scas", 1, 0xae, X, 0, bwl_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
-{"scas", 2, 0xae, X, 0, bwl_Suf|W|IsString, { AnyMem|EsSeg, Acc, 0} },
-{"ssca", 0, 0xae, X, 0, bwl_Suf|W|IsString, { 0, 0, 0} },
-{"ssca", 1, 0xae, X, 0, bwl_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
-{"ssca", 2, 0xae, X, 0, bwl_Suf|W|IsString, { AnyMem|EsSeg, Acc, 0} },
-{"stos", 0, 0xaa, X, 0, bwl_Suf|W|IsString, { 0, 0, 0} },
-{"stos", 1, 0xaa, X, 0, bwl_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
-{"stos", 2, 0xaa, X, 0, bwl_Suf|W|IsString, { Acc, AnyMem|EsSeg, 0} },
-{"ssto", 0, 0xaa, X, 0, bwl_Suf|W|IsString, { 0, 0, 0} },
-{"ssto", 1, 0xaa, X, 0, bwl_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
-{"ssto", 2, 0xaa, X, 0, bwl_Suf|W|IsString, { Acc, AnyMem|EsSeg, 0} },
-{"xlat", 0, 0xd7, X, 0, b_Suf|IsString, { 0, 0, 0} },
-{"xlat", 1, 0xd7, X, 0, b_Suf|IsString, { AnyMem, 0, 0} },
-
-/* Bit manipulation. */
-{"bsf", 2, 0x0fbc, X, Cpu386, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"bsr", 2, 0x0fbd, X, Cpu386, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"bt", 2, 0x0fa3, X, Cpu386, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
-{"bt", 2, 0x0fba, 4, Cpu386, wl_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
-{"btc", 2, 0x0fbb, X, Cpu386, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
-{"btc", 2, 0x0fba, 7, Cpu386, wl_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
-{"btr", 2, 0x0fb3, X, Cpu386, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
-{"btr", 2, 0x0fba, 6, Cpu386, wl_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
-{"bts", 2, 0x0fab, X, Cpu386, wl_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
-{"bts", 2, 0x0fba, 5, Cpu386, wl_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
-
-/* Interrupts & op. sys insns. */
-/* See gas/config/tc-i386.c for conversion of 'int $3' into the special
- int 3 insn. */
-#define INT_OPCODE 0xcd
-#define INT3_OPCODE 0xcc
-{"int", 1, 0xcd, X, 0, NoSuf, { Imm8, 0, 0} },
-{"int3", 0, 0xcc, X, 0, NoSuf, { 0, 0, 0} },
-{"into", 0, 0xce, X, 0, NoSuf, { 0, 0, 0} },
-{"iret", 0, 0xcf, X, 0, wl_Suf|DefaultSize, { 0, 0, 0} },
-/* i386sl, i486sl, later 486, and Pentium. */
-{"rsm", 0, 0x0faa, X, Cpu386, NoSuf, { 0, 0, 0} },
-
-{"bound", 2, 0x62, X, Cpu186, wl_Suf|Modrm, { WordReg, WordMem, 0} },
-
-{"hlt", 0, 0xf4, X, 0, NoSuf, { 0, 0, 0} },
-/* nop is actually 'xchgl %eax, %eax'. */
-{"nop", 0, 0x90, X, 0, NoSuf, { 0, 0, 0} },
-
-/* Protection control. */
-{"arpl", 2, 0x63, X, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16, Reg16|ShortMem, 0} },
-{"lar", 2, 0x0f02, X, Cpu286, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"lgdt", 1, 0x0f01, 2, Cpu286, wl_Suf|Modrm, { WordMem, 0, 0} },
-{"lidt", 1, 0x0f01, 3, Cpu286, wl_Suf|Modrm, { WordMem, 0, 0} },
-{"lldt", 1, 0x0f00, 2, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
-{"lmsw", 1, 0x0f01, 6, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
-{"lsl", 2, 0x0f03, X, Cpu286, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"ltr", 1, 0x0f00, 3, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
-
-{"sgdt", 1, 0x0f01, 0, Cpu286, wl_Suf|Modrm, { WordMem, 0, 0} },
-{"sidt", 1, 0x0f01, 1, Cpu286, wl_Suf|Modrm, { WordMem, 0, 0} },
-{"sldt", 1, 0x0f00, 0, Cpu286, wl_Suf|Modrm, { WordReg|WordMem, 0, 0} },
-{"smsw", 1, 0x0f01, 4, Cpu286, wl_Suf|Modrm, { WordReg|WordMem, 0, 0} },
-{"str", 1, 0x0f00, 1, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
-
-{"verr", 1, 0x0f00, 4, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
-{"verw", 1, 0x0f00, 5, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
-
-/* Floating point instructions. */
-
-/* load */
-{"fld", 1, 0xd9c0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fld", 1, 0xd9, 0, 0, sl_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fld", 1, 0xd9c0, X, 0, l_FP|ShortForm|Ugh, { FloatReg, 0, 0} },
-/* Intel Syntax */
-{"fld", 1, 0xdb, 5, 0, x_FP|Modrm, { LLongMem, 0, 0} },
-{"fild", 1, 0xdf, 0, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-/* Intel Syntax */
-{"fildd", 1, 0xdf, 5, 0, FP|Modrm, { LLongMem, 0, 0} },
-{"fildq", 1, 0xdf, 5, 0, FP|Modrm, { LLongMem, 0, 0} },
-{"fildll", 1, 0xdf, 5, 0, FP|Modrm, { LLongMem, 0, 0} },
-{"fldt", 1, 0xdb, 5, 0, FP|Modrm, { LLongMem, 0, 0} },
-{"fbld", 1, 0xdf, 4, 0, FP|Modrm, { LLongMem, 0, 0} },
-
-/* store (no pop) */
-{"fst", 1, 0xddd0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fst", 1, 0xd9, 2, 0, sl_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fst", 1, 0xddd0, X, 0, l_FP|ShortForm|Ugh, { FloatReg, 0, 0} },
-{"fist", 1, 0xdf, 2, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-
-/* store (with pop) */
-{"fstp", 1, 0xddd8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fstp", 1, 0xd9, 3, 0, sl_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fstp", 1, 0xddd8, X, 0, l_FP|ShortForm|Ugh, { FloatReg, 0, 0} },
-/* Intel Syntax */
-{"fstp", 1, 0xdb, 7, 0, x_FP|Modrm, { LLongMem, 0, 0} },
-{"fistp", 1, 0xdf, 3, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-/* Intel Syntax */
-{"fistpd", 1, 0xdf, 7, 0, FP|Modrm, { LLongMem, 0, 0} },
-{"fistpq", 1, 0xdf, 7, 0, FP|Modrm, { LLongMem, 0, 0} },
-{"fistpll",1, 0xdf, 7, 0, FP|Modrm, { LLongMem, 0, 0} },
-{"fstpt", 1, 0xdb, 7, 0, FP|Modrm, { LLongMem, 0, 0} },
-{"fbstp", 1, 0xdf, 6, 0, FP|Modrm, { LLongMem, 0, 0} },
-
-/* exchange %st<n> with %st0 */
-{"fxch", 1, 0xd9c8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-/* alias for fxch %st(1) */
-{"fxch", 0, 0xd9c9, X, 0, FP, { 0, 0, 0} },
-
-/* comparison (without pop) */
-{"fcom", 1, 0xd8d0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-/* alias for fcom %st(1) */
-{"fcom", 0, 0xd8d1, X, 0, FP, { 0, 0, 0} },
-{"fcom", 1, 0xd8, 2, 0, sl_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fcom", 1, 0xd8d0, X, 0, l_FP|ShortForm|Ugh, { FloatReg, 0, 0} },
-{"ficom", 1, 0xde, 2, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-
-/* comparison (with pop) */
-{"fcomp", 1, 0xd8d8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-/* alias for fcomp %st(1) */
-{"fcomp", 0, 0xd8d9, X, 0, FP, { 0, 0, 0} },
-{"fcomp", 1, 0xd8, 3, 0, sl_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fcomp", 1, 0xd8d8, X, 0, l_FP|ShortForm|Ugh, { FloatReg, 0, 0} },
-{"ficomp", 1, 0xde, 3, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-{"fcompp", 0, 0xded9, X, 0, FP, { 0, 0, 0} },
-
-/* unordered comparison (with pop) */
-{"fucom", 1, 0xdde0, X, Cpu286, FP|ShortForm, { FloatReg, 0, 0} },
-/* alias for fucom %st(1) */
-{"fucom", 0, 0xdde1, X, Cpu286, FP, { 0, 0, 0} },
-{"fucomp", 1, 0xdde8, X, Cpu286, FP|ShortForm, { FloatReg, 0, 0} },
-/* alias for fucomp %st(1) */
-{"fucomp", 0, 0xdde9, X, Cpu286, FP, { 0, 0, 0} },
-{"fucompp",0, 0xdae9, X, Cpu286, FP, { 0, 0, 0} },
-
-{"ftst", 0, 0xd9e4, X, 0, FP, { 0, 0, 0} },
-{"fxam", 0, 0xd9e5, X, 0, FP, { 0, 0, 0} },
-
-/* load constants into %st0 */
-{"fld1", 0, 0xd9e8, X, 0, FP, { 0, 0, 0} },
-{"fldl2t", 0, 0xd9e9, X, 0, FP, { 0, 0, 0} },
-{"fldl2e", 0, 0xd9ea, X, 0, FP, { 0, 0, 0} },
-{"fldpi", 0, 0xd9eb, X, 0, FP, { 0, 0, 0} },
-{"fldlg2", 0, 0xd9ec, X, 0, FP, { 0, 0, 0} },
-{"fldln2", 0, 0xd9ed, X, 0, FP, { 0, 0, 0} },
-{"fldz", 0, 0xd9ee, X, 0, FP, { 0, 0, 0} },
-
-/* arithmetic */
-
-/* add */
-{"fadd", 2, 0xd8c0, X, 0, FP|ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
-/* alias for fadd %st(i), %st */
-{"fadd", 1, 0xd8c0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-#if SYSV386_COMPAT
-/* alias for faddp */
-{"fadd", 0, 0xdec1, X, 0, FP|Ugh, { 0, 0, 0} },
-#endif
-{"fadd", 1, 0xd8, 0, 0, sl_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fiadd", 1, 0xde, 0, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-
-{"faddp", 2, 0xdec0, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"faddp", 1, 0xdec0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-/* alias for faddp %st, %st(1) */
-{"faddp", 0, 0xdec1, X, 0, FP, { 0, 0, 0} },
-{"faddp", 2, 0xdec0, X, 0, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
-
-/* subtract */
-{"fsub", 2, 0xd8e0, X, 0, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
-{"fsub", 1, 0xd8e0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-#if SYSV386_COMPAT
-/* alias for fsubp */
-{"fsub", 0, 0xdee1, X, 0, FP|Ugh, { 0, 0, 0} },
-#endif
-{"fsub", 1, 0xd8, 4, 0, sl_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fisub", 1, 0xde, 4, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-
-#if SYSV386_COMPAT
-{"fsubp", 2, 0xdee0, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fsubp", 1, 0xdee0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fsubp", 0, 0xdee1, X, 0, FP, { 0, 0, 0} },
-#if OLDGCC_COMPAT
-{"fsubp", 2, 0xdee0, X, 0, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
-#endif
-#else
-{"fsubp", 2, 0xdee8, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fsubp", 1, 0xdee8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fsubp", 0, 0xdee9, X, 0, FP, { 0, 0, 0} },
-#endif
-
-/* subtract reverse */
-{"fsubr", 2, 0xd8e8, X, 0, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
-{"fsubr", 1, 0xd8e8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-#if SYSV386_COMPAT
-/* alias for fsubrp */
-{"fsubr", 0, 0xdee9, X, 0, FP|Ugh, { 0, 0, 0} },
-#endif
-{"fsubr", 1, 0xd8, 5, 0, sl_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fisubr", 1, 0xde, 5, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-
-#if SYSV386_COMPAT
-{"fsubrp", 2, 0xdee8, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fsubrp", 1, 0xdee8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fsubrp", 0, 0xdee9, X, 0, FP, { 0, 0, 0} },
-#if OLDGCC_COMPAT
-{"fsubrp", 2, 0xdee8, X, 0, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
-#endif
-#else
-{"fsubrp", 2, 0xdee0, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fsubrp", 1, 0xdee0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fsubrp", 0, 0xdee1, X, 0, FP, { 0, 0, 0} },
-#endif
-
-/* multiply */
-{"fmul", 2, 0xd8c8, X, 0, FP|ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
-{"fmul", 1, 0xd8c8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-#if SYSV386_COMPAT
-/* alias for fmulp */
-{"fmul", 0, 0xdec9, X, 0, FP|Ugh, { 0, 0, 0} },
-#endif
-{"fmul", 1, 0xd8, 1, 0, sl_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fimul", 1, 0xde, 1, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-
-{"fmulp", 2, 0xdec8, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fmulp", 1, 0xdec8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fmulp", 0, 0xdec9, X, 0, FP, { 0, 0, 0} },
-{"fmulp", 2, 0xdec8, X, 0, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
-
-/* divide */
-{"fdiv", 2, 0xd8f0, X, 0, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
-{"fdiv", 1, 0xd8f0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-#if SYSV386_COMPAT
-/* alias for fdivp */
-{"fdiv", 0, 0xdef1, X, 0, FP|Ugh, { 0, 0, 0} },
-#endif
-{"fdiv", 1, 0xd8, 6, 0, sl_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fidiv", 1, 0xde, 6, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-
-#if SYSV386_COMPAT
-{"fdivp", 2, 0xdef0, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fdivp", 1, 0xdef0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fdivp", 0, 0xdef1, X, 0, FP, { 0, 0, 0} },
-#if OLDGCC_COMPAT
-{"fdivp", 2, 0xdef0, X, 0, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
-#endif
-#else
-{"fdivp", 2, 0xdef8, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fdivp", 1, 0xdef8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fdivp", 0, 0xdef9, X, 0, FP, { 0, 0, 0} },
-#endif
-
-/* divide reverse */
-{"fdivr", 2, 0xd8f8, X, 0, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
-{"fdivr", 1, 0xd8f8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-#if SYSV386_COMPAT
-/* alias for fdivrp */
-{"fdivr", 0, 0xdef9, X, 0, FP|Ugh, { 0, 0, 0} },
-#endif
-{"fdivr", 1, 0xd8, 7, 0, sl_FP|FloatMF|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fidivr", 1, 0xde, 7, 0, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
-
-#if SYSV386_COMPAT
-{"fdivrp", 2, 0xdef8, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fdivrp", 1, 0xdef8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fdivrp", 0, 0xdef9, X, 0, FP, { 0, 0, 0} },
-#if OLDGCC_COMPAT
-{"fdivrp", 2, 0xdef8, X, 0, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
-#endif
-#else
-{"fdivrp", 2, 0xdef0, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fdivrp", 1, 0xdef0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fdivrp", 0, 0xdef1, X, 0, FP, { 0, 0, 0} },
-#endif
-
-{"f2xm1", 0, 0xd9f0, X, 0, FP, { 0, 0, 0} },
-{"fyl2x", 0, 0xd9f1, X, 0, FP, { 0, 0, 0} },
-{"fptan", 0, 0xd9f2, X, 0, FP, { 0, 0, 0} },
-{"fpatan", 0, 0xd9f3, X, 0, FP, { 0, 0, 0} },
-{"fxtract",0, 0xd9f4, X, 0, FP, { 0, 0, 0} },
-{"fprem1", 0, 0xd9f5, X, Cpu286, FP, { 0, 0, 0} },
-{"fdecstp",0, 0xd9f6, X, 0, FP, { 0, 0, 0} },
-{"fincstp",0, 0xd9f7, X, 0, FP, { 0, 0, 0} },
-{"fprem", 0, 0xd9f8, X, 0, FP, { 0, 0, 0} },
-{"fyl2xp1",0, 0xd9f9, X, 0, FP, { 0, 0, 0} },
-{"fsqrt", 0, 0xd9fa, X, 0, FP, { 0, 0, 0} },
-{"fsincos",0, 0xd9fb, X, Cpu286, FP, { 0, 0, 0} },
-{"frndint",0, 0xd9fc, X, 0, FP, { 0, 0, 0} },
-{"fscale", 0, 0xd9fd, X, 0, FP, { 0, 0, 0} },
-{"fsin", 0, 0xd9fe, X, Cpu286, FP, { 0, 0, 0} },
-{"fcos", 0, 0xd9ff, X, Cpu286, FP, { 0, 0, 0} },
-{"fchs", 0, 0xd9e0, X, 0, FP, { 0, 0, 0} },
-{"fabs", 0, 0xd9e1, X, 0, FP, { 0, 0, 0} },
-
-/* processor control */
-{"fninit", 0, 0xdbe3, X, 0, FP, { 0, 0, 0} },
-{"finit", 0, 0xdbe3, X, 0, FP|FWait, { 0, 0, 0} },
-{"fldcw", 1, 0xd9, 5, 0, FP|Modrm, { ShortMem, 0, 0} },
-{"fnstcw", 1, 0xd9, 7, 0, FP|Modrm, { ShortMem, 0, 0} },
-{"fstcw", 1, 0xd9, 7, 0, FP|FWait|Modrm, { ShortMem, 0, 0} },
-{"fnstsw", 1, 0xdfe0, X, 0, FP, { Acc, 0, 0} },
-{"fnstsw", 1, 0xdd, 7, 0, FP|Modrm, { ShortMem, 0, 0} },
-{"fnstsw", 0, 0xdfe0, X, 0, FP, { 0, 0, 0} },
-{"fstsw", 1, 0xdfe0, X, 0, FP|FWait, { Acc, 0, 0} },
-{"fstsw", 1, 0xdd, 7, 0, FP|FWait|Modrm, { ShortMem, 0, 0} },
-{"fstsw", 0, 0xdfe0, X, 0, FP|FWait, { 0, 0, 0} },
-{"fnclex", 0, 0xdbe2, X, 0, FP, { 0, 0, 0} },
-{"fclex", 0, 0xdbe2, X, 0, FP|FWait, { 0, 0, 0} },
-/* Short forms of fldenv, fstenv use data size prefix. */
-{"fnstenv",1, 0xd9, 6, 0, sl_Suf|Modrm, { LLongMem, 0, 0} },
-{"fstenv", 1, 0xd9, 6, 0, sl_Suf|FWait|Modrm, { LLongMem, 0, 0} },
-{"fldenv", 1, 0xd9, 4, 0, sl_Suf|Modrm, { LLongMem, 0, 0} },
-{"fnsave", 1, 0xdd, 6, 0, sl_Suf|Modrm, { LLongMem, 0, 0} },
-{"fsave", 1, 0xdd, 6, 0, sl_Suf|FWait|Modrm, { LLongMem, 0, 0} },
-{"frstor", 1, 0xdd, 4, 0, sl_Suf|Modrm, { LLongMem, 0, 0} },
-
-{"ffree", 1, 0xddc0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-/* P6:free st(i), pop st */
-{"ffreep", 1, 0xdfc0, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} },
-{"fnop", 0, 0xd9d0, X, 0, FP, { 0, 0, 0} },
-#define FWAIT_OPCODE 0x9b
-{"fwait", 0, 0x9b, X, 0, FP, { 0, 0, 0} },
-
-/* Opcode prefixes; we allow them as separate insns too. */
-
-#define ADDR_PREFIX_OPCODE 0x67
-{"addr16", 0, 0x67, X, Cpu386, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"addr32", 0, 0x67, X, Cpu386, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
-{"aword", 0, 0x67, X, Cpu386, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"adword", 0, 0x67, X, Cpu386, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
-#define DATA_PREFIX_OPCODE 0x66
-{"data16", 0, 0x66, X, Cpu386, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"data32", 0, 0x66, X, Cpu386, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
-{"word", 0, 0x66, X, Cpu386, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"dword", 0, 0x66, X, Cpu386, NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
-#define LOCK_PREFIX_OPCODE 0xf0
-{"lock", 0, 0xf0, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-{"wait", 0, 0x9b, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-#define CS_PREFIX_OPCODE 0x2e
-{"cs", 0, 0x2e, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-#define DS_PREFIX_OPCODE 0x3e
-{"ds", 0, 0x3e, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-#define ES_PREFIX_OPCODE 0x26
-{"es", 0, 0x26, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-#define FS_PREFIX_OPCODE 0x64
-{"fs", 0, 0x64, X, Cpu386, NoSuf|IsPrefix, { 0, 0, 0} },
-#define GS_PREFIX_OPCODE 0x65
-{"gs", 0, 0x65, X, Cpu386, NoSuf|IsPrefix, { 0, 0, 0} },
-#define SS_PREFIX_OPCODE 0x36
-{"ss", 0, 0x36, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-#define REPNE_PREFIX_OPCODE 0xf2
-#define REPE_PREFIX_OPCODE 0xf3
-{"rep", 0, 0xf3, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-{"repe", 0, 0xf3, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-{"repz", 0, 0xf3, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-{"repne", 0, 0xf2, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-{"repnz", 0, 0xf2, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-
-/* 486 extensions. */
-
-{"bswap", 1, 0x0fc8, X, Cpu486, l_Suf|ShortForm, { Reg32, 0, 0 } },
-{"xadd", 2, 0x0fc0, X, Cpu486, bwl_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } },
-{"cmpxchg", 2, 0x0fb0, X, Cpu486, bwl_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } },
-{"invd", 0, 0x0f08, X, Cpu486, NoSuf, { 0, 0, 0} },
-{"wbinvd", 0, 0x0f09, X, Cpu486, NoSuf, { 0, 0, 0} },
-{"invlpg", 1, 0x0f01, 7, Cpu486, NoSuf|Modrm, { AnyMem, 0, 0} },
-
-/* 586 and late 486 extensions. */
-{"cpuid", 0, 0x0fa2, X, Cpu486, NoSuf, { 0, 0, 0} },
-
-/* Pentium extensions. */
-{"wrmsr", 0, 0x0f30, X, Cpu586, NoSuf, { 0, 0, 0} },
-{"rdtsc", 0, 0x0f31, X, Cpu586, NoSuf, { 0, 0, 0} },
-{"rdmsr", 0, 0x0f32, X, Cpu586, NoSuf, { 0, 0, 0} },
-{"cmpxchg8b",1,0x0fc7, 1, Cpu586, NoSuf|Modrm, { LLongMem, 0, 0} },
-
-/* Pentium II/Pentium Pro extensions. */
-{"sysenter",0, 0x0f34, X, Cpu686, NoSuf, { 0, 0, 0} },
-{"sysexit", 0, 0x0f35, X, Cpu686, NoSuf, { 0, 0, 0} },
-{"fxsave", 1, 0x0fae, 0, Cpu686, FP|Modrm, { LLongMem, 0, 0} },
-{"fxrstor", 1, 0x0fae, 1, Cpu686, FP|Modrm, { LLongMem, 0, 0} },
-{"rdpmc", 0, 0x0f33, X, Cpu686, NoSuf, { 0, 0, 0} },
-/* official undefined instr. */
-{"ud2", 0, 0x0f0b, X, Cpu686, NoSuf, { 0, 0, 0} },
-/* alias for ud2 */
-{"ud2a", 0, 0x0f0b, X, Cpu686, NoSuf, { 0, 0, 0} },
-/* 2nd. official undefined instr. */
-{"ud2b", 0, 0x0fb9, X, Cpu686, NoSuf, { 0, 0, 0} },
-
-{"cmovo", 2, 0x0f40, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovno", 2, 0x0f41, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovb", 2, 0x0f42, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovc", 2, 0x0f42, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnae", 2, 0x0f42, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovae", 2, 0x0f43, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnc", 2, 0x0f43, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnb", 2, 0x0f43, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmove", 2, 0x0f44, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovz", 2, 0x0f44, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovne", 2, 0x0f45, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnz", 2, 0x0f45, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovbe", 2, 0x0f46, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovna", 2, 0x0f46, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmova", 2, 0x0f47, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnbe", 2, 0x0f47, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovs", 2, 0x0f48, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovns", 2, 0x0f49, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovp", 2, 0x0f4a, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnp", 2, 0x0f4b, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovl", 2, 0x0f4c, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnge", 2, 0x0f4c, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovge", 2, 0x0f4d, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnl", 2, 0x0f4d, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovle", 2, 0x0f4e, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovng", 2, 0x0f4e, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovg", 2, 0x0f4f, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnle", 2, 0x0f4f, X, Cpu686, wl_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-
-{"fcmovb", 2, 0xdac0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovnae",2, 0xdac0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmove", 2, 0xdac8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovbe", 2, 0xdad0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovna", 2, 0xdad0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovu", 2, 0xdad8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovae", 2, 0xdbc0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovnb", 2, 0xdbc0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovne", 2, 0xdbc8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmova", 2, 0xdbd0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovnbe",2, 0xdbd0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovnu", 2, 0xdbd8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-
-{"fcomi", 2, 0xdbf0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcomi", 0, 0xdbf1, X, Cpu686, FP|ShortForm, { 0, 0, 0} },
-{"fcomi", 1, 0xdbf0, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} },
-{"fucomi", 2, 0xdbe8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fucomi", 0, 0xdbe9, X, Cpu686, FP|ShortForm, { 0, 0, 0} },
-{"fucomi", 1, 0xdbe8, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} },
-{"fcomip", 2, 0xdff0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcompi", 2, 0xdff0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcompi", 0, 0xdff1, X, Cpu686, FP|ShortForm, { 0, 0, 0} },
-{"fcompi", 1, 0xdff0, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} },
-{"fucomip", 2, 0xdfe8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fucompi", 2, 0xdfe8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fucompi", 0, 0xdfe9, X, Cpu686, FP|ShortForm, { 0, 0, 0} },
-{"fucompi", 1, 0xdfe8, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} },
-
-/* MMX instructions. */
-
-{"emms", 0, 0x0f77, X, CpuMMX, FP, { 0, 0, 0 } },
-{"movd", 2, 0x0f6e, X, CpuMMX, FP|Modrm, { Reg32|LongMem, RegMMX, 0 } },
-{"movd", 2, 0x0f7e, X, CpuMMX, FP|Modrm, { RegMMX, Reg32|LongMem, 0 } },
-{"movq", 2, 0x0f6f, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"movq", 2, 0x0f7f, X, CpuMMX, FP|Modrm, { RegMMX, RegMMX|LongMem, 0 } },
-{"packssdw", 2, 0x0f6b, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"packsswb", 2, 0x0f63, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"packuswb", 2, 0x0f67, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddb", 2, 0x0ffc, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddw", 2, 0x0ffd, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddd", 2, 0x0ffe, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddsb", 2, 0x0fec, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddsw", 2, 0x0fed, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddusb", 2, 0x0fdc, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddusw", 2, 0x0fdd, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pand", 2, 0x0fdb, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pandn", 2, 0x0fdf, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpeqb", 2, 0x0f74, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpeqw", 2, 0x0f75, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpeqd", 2, 0x0f76, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpgtb", 2, 0x0f64, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpgtw", 2, 0x0f65, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpgtd", 2, 0x0f66, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmaddwd", 2, 0x0ff5, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmulhw", 2, 0x0fe5, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmullw", 2, 0x0fd5, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"por", 2, 0x0feb, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psllw", 2, 0x0ff1, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psllw", 2, 0x0f71, 6, CpuMMX, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"pslld", 2, 0x0ff2, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pslld", 2, 0x0f72, 6, CpuMMX, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psllq", 2, 0x0ff3, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psllq", 2, 0x0f73, 6, CpuMMX, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psraw", 2, 0x0fe1, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psraw", 2, 0x0f71, 4, CpuMMX, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psrad", 2, 0x0fe2, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psrad", 2, 0x0f72, 4, CpuMMX, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psrlw", 2, 0x0fd1, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psrlw", 2, 0x0f71, 2, CpuMMX, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psrld", 2, 0x0fd2, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psrld", 2, 0x0f72, 2, CpuMMX, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psrlq", 2, 0x0fd3, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psrlq", 2, 0x0f73, 2, CpuMMX, FP|Modrm, { Imm8, RegMMX, 0 } },
-{"psubb", 2, 0x0ff8, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubw", 2, 0x0ff9, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubd", 2, 0x0ffa, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubsb", 2, 0x0fe8, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubsw", 2, 0x0fe9, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubusb", 2, 0x0fd8, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubusw", 2, 0x0fd9, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpckhbw",2, 0x0f68, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpckhwd",2, 0x0f69, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpckhdq",2, 0x0f6a, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpcklbw",2, 0x0f60, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpcklwd",2, 0x0f61, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpckldq",2, 0x0f62, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pxor", 2, 0x0fef, X, CpuMMX, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-
-
-/* PIII Katmai New Instructions / SIMD instructions. */
-
-{"addps", 2, 0x0f58, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"addss", 2, 0xf30f58, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"andnps", 2, 0x0f55, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"andps", 2, 0x0f54, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpeqps", 2, 0x0fc2, 0, CpuSSE, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpeqss", 2, 0xf30fc2, 0, CpuSSE, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpleps", 2, 0x0fc2, 2, CpuSSE, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpless", 2, 0xf30fc2, 2, CpuSSE, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpltps", 2, 0x0fc2, 1, CpuSSE, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpltss", 2, 0xf30fc2, 1, CpuSSE, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpneqps", 2, 0x0fc2, 4, CpuSSE, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpneqss", 2, 0xf30fc2, 4, CpuSSE, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpnleps", 2, 0x0fc2, 6, CpuSSE, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpnless", 2, 0xf30fc2, 6, CpuSSE, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpnltps", 2, 0x0fc2, 5, CpuSSE, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpnltss", 2, 0xf30fc2, 5, CpuSSE, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpordps", 2, 0x0fc2, 7, CpuSSE, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpordss", 2, 0xf30fc2, 7, CpuSSE, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpunordps",2, 0x0fc2, 3, CpuSSE, FP|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpunordss",2, 0xf30fc2, 3, CpuSSE, FP|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpps", 3, 0x0fc2, X, CpuSSE, FP|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-{"cmpss", 3, 0xf30fc2, X, CpuSSE, FP|Modrm, { Imm8, RegXMM|WordMem, RegXMM } },
-{"comiss", 2, 0x0f2f, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"cvtpi2ps", 2, 0x0f2a, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegXMM, 0 } },
-{"cvtps2pi", 2, 0x0f2d, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegMMX, 0 } },
-{"cvtsi2ss", 2, 0xf30f2a, X, CpuSSE, FP|Modrm, { Reg32|WordMem, RegXMM, 0 } },
-{"cvtss2si", 2, 0xf30f2d, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, Reg32, 0 } },
-{"cvttps2pi", 2, 0x0f2c, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegMMX, 0 } },
-{"cvttss2si", 2, 0xf30f2c, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, Reg32, 0 } },
-{"divps", 2, 0x0f5e, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"divss", 2, 0xf30f5e, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"ldmxcsr", 1, 0x0fae, 2, CpuSSE, FP|Modrm, { WordMem, 0, 0 } },
-{"maskmovq", 2, 0x0ff7, X, CpuSSE, FP|Modrm, { RegMMX|InvMem, RegMMX, 0 } },
-{"maxps", 2, 0x0f5f, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"maxss", 2, 0xf30f5f, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"minps", 2, 0x0f5d, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"minss", 2, 0xf30f5d, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"movaps", 2, 0x0f28, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movaps", 2, 0x0f29, X, CpuSSE, FP|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
-{"movhlps", 2, 0x0f12, X, CpuSSE, FP|Modrm, { RegXMM|InvMem, RegXMM, 0 } },
-{"movhps", 2, 0x0f16, X, CpuSSE, FP|Modrm, { LLongMem, RegXMM, 0 } },
-{"movhps", 2, 0x0f17, X, CpuSSE, FP|Modrm, { RegXMM, LLongMem, 0 } },
-{"movlhps", 2, 0x0f16, X, CpuSSE, FP|Modrm, { RegXMM|InvMem, RegXMM, 0 } },
-{"movlps", 2, 0x0f12, X, CpuSSE, FP|Modrm, { LLongMem, RegXMM, 0 } },
-{"movlps", 2, 0x0f13, X, CpuSSE, FP|Modrm, { RegXMM, LLongMem, 0 } },
-{"movmskps", 2, 0x0f50, X, CpuSSE, FP|Modrm, { RegXMM|InvMem, Reg32, 0 } },
-{"movntps", 2, 0x0f2b, X, CpuSSE, FP|Modrm, { RegXMM, LLongMem, 0 } },
-{"movntq", 2, 0x0fe7, X, CpuSSE, FP|Modrm, { RegMMX, LLongMem, 0 } },
-{"movss", 2, 0xf30f10, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"movss", 2, 0xf30f11, X, CpuSSE, FP|Modrm, { RegXMM, RegXMM|WordMem, 0 } },
-{"movups", 2, 0x0f10, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movups", 2, 0x0f11, X, CpuSSE, FP|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
-{"mulps", 2, 0x0f59, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"mulss", 2, 0xf30f59, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"orps", 2, 0x0f56, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pavgb", 2, 0x0fe0, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pavgw", 2, 0x0fe3, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pextrw", 3, 0x0fc5, X, CpuSSE, FP|Modrm, { Imm8, RegMMX, Reg32|InvMem } },
-{"pinsrw", 3, 0x0fc4, X, CpuSSE, FP|Modrm, { Imm8, Reg32|ShortMem, RegMMX } },
-{"pmaxsw", 2, 0x0fee, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pmaxub", 2, 0x0fde, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pminsw", 2, 0x0fea, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pminub", 2, 0x0fda, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pmovmskb", 2, 0x0fd7, X, CpuSSE, FP|Modrm, { RegMMX, Reg32|InvMem, 0 } },
-{"pmulhuw", 2, 0x0fe4, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"prefetchnta", 1, 0x0f18, 0, CpuSSE, FP|Modrm, { LLongMem, 0, 0 } },
-{"prefetcht0", 1, 0x0f18, 1, CpuSSE, FP|Modrm, { LLongMem, 0, 0 } },
-{"prefetcht1", 1, 0x0f18, 2, CpuSSE, FP|Modrm, { LLongMem, 0, 0 } },
-{"prefetcht2", 1, 0x0f18, 3, CpuSSE, FP|Modrm, { LLongMem, 0, 0 } },
-{"psadbw", 2, 0x0ff6, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pshufw", 3, 0x0f70, X, CpuSSE, FP|Modrm, { Imm8, RegMMX|LLongMem, RegMMX } },
-{"rcpps", 2, 0x0f53, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"rcpss", 2, 0xf30f53, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"rsqrtps", 2, 0x0f52, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"rsqrtss", 2, 0xf30f52, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"sfence", 0, 0x0faef8, X, CpuSSE, FP, { 0, 0, 0 } },
-{"shufps", 3, 0x0fc6, X, CpuSSE, FP|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-{"sqrtps", 2, 0x0f51, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"sqrtss", 2, 0xf30f51, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"stmxcsr", 1, 0x0fae, 3, CpuSSE, FP|Modrm, { WordMem, 0, 0 } },
-{"subps", 2, 0x0f5c, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"subss", 2, 0xf30f5c, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"ucomiss", 2, 0x0f2e, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"unpckhps", 2, 0x0f15, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"unpcklps", 2, 0x0f14, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"xorps", 2, 0x0f57, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-
-/* AMD 3DNow! instructions. */
-
-{"prefetch", 1, 0x0f0d, 0, Cpu3dnow, FP|Modrm, { ByteMem, 0, 0 } },
-{"prefetchw",1, 0x0f0d, 1, Cpu3dnow, FP|Modrm, { ByteMem, 0, 0 } },
-{"femms", 0, 0x0f0e, X, Cpu3dnow, FP, { 0, 0, 0 } },
-{"pavgusb", 2, 0x0f0f, 0xbf, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pf2id", 2, 0x0f0f, 0x1d, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pf2iw", 2, 0x0f0f, 0x1c, Cpu3dnow|Cpu686, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfacc", 2, 0x0f0f, 0xae, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfadd", 2, 0x0f0f, 0x9e, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfcmpeq", 2, 0x0f0f, 0xb0, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfcmpge", 2, 0x0f0f, 0x90, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfcmpgt", 2, 0x0f0f, 0xa0, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfmax", 2, 0x0f0f, 0xa4, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfmin", 2, 0x0f0f, 0x94, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfmul", 2, 0x0f0f, 0xb4, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfnacc", 2, 0x0f0f, 0x8a, Cpu3dnow|Cpu686, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfpnacc", 2, 0x0f0f, 0x8e, Cpu3dnow|Cpu686, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrcp", 2, 0x0f0f, 0x96, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrcpit1", 2, 0x0f0f, 0xa6, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrcpit2", 2, 0x0f0f, 0xb6, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrsqit1", 2, 0x0f0f, 0xa7, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrsqrt", 2, 0x0f0f, 0x97, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfsub", 2, 0x0f0f, 0x9a, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfsubr", 2, 0x0f0f, 0xaa, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pi2fd", 2, 0x0f0f, 0x0d, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pi2fw", 2, 0x0f0f, 0x0c, Cpu3dnow|Cpu686, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmulhrw", 2, 0x0f0f, 0xb7, Cpu3dnow, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pswapd", 2, 0x0f0f, 0xbb, Cpu3dnow|Cpu686, FP|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-
-/* sentinel */
-{NULL, 0, 0, 0, 0, 0, { 0, 0, 0} }
-};
-#undef X
-#undef NoSuf
-#undef b_Suf
-#undef w_Suf
-#undef l_Suf
-#undef x_Suf
-#undef bw_Suf
-#undef bl_Suf
-#undef wl_Suf
-#undef sl_Suf
-#undef bwl_Suf
-#undef FP
-#undef l_FP
-#undef x_FP
-#undef sl_FP
-
-#define MAX_MNEM_SIZE 16 /* for parsing insn mnemonics from input */
-
-
-/* 386 register table. */
-
-static const reg_entry i386_regtab[] = {
- /* make %st first as we test for it */
- {"st", FloatReg|FloatAcc, 0},
- /* 8 bit regs */
- {"al", Reg8|Acc, 0},
- {"cl", Reg8|ShiftCount, 1},
- {"dl", Reg8, 2},
- {"bl", Reg8, 3},
- {"ah", Reg8, 4},
- {"ch", Reg8, 5},
- {"dh", Reg8, 6},
- {"bh", Reg8, 7},
- /* 16 bit regs */
- {"ax", Reg16|Acc, 0},
- {"cx", Reg16, 1},
- {"dx", Reg16|InOutPortReg, 2},
- {"bx", Reg16|BaseIndex, 3},
- {"sp", Reg16, 4},
- {"bp", Reg16|BaseIndex, 5},
- {"si", Reg16|BaseIndex, 6},
- {"di", Reg16|BaseIndex, 7},
- /* 32 bit regs */
- {"eax", Reg32|BaseIndex|Acc, 0},
- {"ecx", Reg32|BaseIndex, 1},
- {"edx", Reg32|BaseIndex, 2},
- {"ebx", Reg32|BaseIndex, 3},
- {"esp", Reg32, 4},
- {"ebp", Reg32|BaseIndex, 5},
- {"esi", Reg32|BaseIndex, 6},
- {"edi", Reg32|BaseIndex, 7},
- /* segment registers */
- {"es", SReg2, 0},
- {"cs", SReg2, 1},
- {"ss", SReg2, 2},
- {"ds", SReg2, 3},
- {"fs", SReg3, 4},
- {"gs", SReg3, 5},
- /* control registers */
- {"cr0", Control, 0},
- {"cr1", Control, 1},
- {"cr2", Control, 2},
- {"cr3", Control, 3},
- {"cr4", Control, 4},
- {"cr5", Control, 5},
- {"cr6", Control, 6},
- {"cr7", Control, 7},
- /* debug registers */
- {"db0", Debug, 0},
- {"db1", Debug, 1},
- {"db2", Debug, 2},
- {"db3", Debug, 3},
- {"db4", Debug, 4},
- {"db5", Debug, 5},
- {"db6", Debug, 6},
- {"db7", Debug, 7},
- {"dr0", Debug, 0},
- {"dr1", Debug, 1},
- {"dr2", Debug, 2},
- {"dr3", Debug, 3},
- {"dr4", Debug, 4},
- {"dr5", Debug, 5},
- {"dr6", Debug, 6},
- {"dr7", Debug, 7},
- /* test registers */
- {"tr0", Test, 0},
- {"tr1", Test, 1},
- {"tr2", Test, 2},
- {"tr3", Test, 3},
- {"tr4", Test, 4},
- {"tr5", Test, 5},
- {"tr6", Test, 6},
- {"tr7", Test, 7},
- /* mmx and simd registers */
- {"mm0", RegMMX, 0},
- {"mm1", RegMMX, 1},
- {"mm2", RegMMX, 2},
- {"mm3", RegMMX, 3},
- {"mm4", RegMMX, 4},
- {"mm5", RegMMX, 5},
- {"mm6", RegMMX, 6},
- {"mm7", RegMMX, 7},
- {"xmm0", RegXMM, 0},
- {"xmm1", RegXMM, 1},
- {"xmm2", RegXMM, 2},
- {"xmm3", RegXMM, 3},
- {"xmm4", RegXMM, 4},
- {"xmm5", RegXMM, 5},
- {"xmm6", RegXMM, 6},
- {"xmm7", RegXMM, 7}
-};
-
-static const reg_entry i386_float_regtab[] = {
- {"st(0)", FloatReg|FloatAcc, 0},
- {"st(1)", FloatReg, 1},
- {"st(2)", FloatReg, 2},
- {"st(3)", FloatReg, 3},
- {"st(4)", FloatReg, 4},
- {"st(5)", FloatReg, 5},
- {"st(6)", FloatReg, 6},
- {"st(7)", FloatReg, 7}
-};
-
-#define MAX_REG_NAME_SIZE 8 /* for parsing register names from input */
-
-/* segment stuff */
-static const seg_entry cs = { "cs", 0x2e };
-static const seg_entry ds = { "ds", 0x3e };
-static const seg_entry ss = { "ss", 0x36 };
-static const seg_entry es = { "es", 0x26 };
-static const seg_entry fs = { "fs", 0x64 };
-static const seg_entry gs = { "gs", 0x65 };
-
-/* end of opcode/i386.h */
diff --git a/include/opcode/i860.h b/include/opcode/i860.h
deleted file mode 100644
index 7b24d2f09..000000000
--- a/include/opcode/i860.h
+++ /dev/null
@@ -1,497 +0,0 @@
-/* Table of opcodes for the i860.
- Copyright (C) 1989, 2000 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, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, 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
-};
-
-
-/* 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 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 */
-
-{ "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", 0x34000000, 0xc81f0001, "i(2)", E_ADDR }, /* flush #const(isrc2) */
-{ "flush", 0x34000001, 0xc81f0000, "i(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 */
-
-/* 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.ss", 0x48000032, 0xb40005cd, "e,g", 0 }, /* fix.p fsrc1,fdest */
-{ "fix.sd", 0x480000b2, 0xb400054d, "e,g", 0 }, /* fix.p fsrc1,fdest */
-{ "fix.dd", 0x480001b2, 0xb400044d, "e,g", 0 }, /* fix.p fsrc1,fdest */
-{ "pfix.ss", 0x48000432, 0xb40001cd, "e,g", 0 }, /* pfix.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.ss", 0x4800003a, 0xb40005c5, "e,g", 0 }, /* ftrunc.p fsrc1,fdest */
-{ "ftrunc.sd", 0x480000ba, 0xb4000545, "e,g", 0 }, /* ftrunc.p fsrc1,fdest */
-{ "ftrunc.dd", 0x480001ba, 0xb4000445, "e,g", 0 }, /* ftrunc.p fsrc1,fdest */
-{ "pftrunc.ss", 0x4800043a, 0xb40001c5, "e,g", 0 }, /* pftrunc.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", 0x4800015f, 0xb4000420, "e,f,g", 0 }, /* fzchks fsrc1,fsrc2,fdest */
-{ "pfzchks", 0x4800055f, 0xb4000020, "e,f,g", 0 }, /* pfzchks fsrc1,fsrc2,fdest */
-{ "faddp", 0x48000050, 0xb40005af, "e,f,g", 0 }, /* faddp fsrc1,fsrc2,fdest */
-{ "pfaddp", 0x48000450, 0xb40001af, "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", 0x480000b0, 0xb7e0054f, "e,g", 0 }, /* fadd.sd fsrc1,f0,fdest */
-{ "fmov.ds", 0x48000130, 0xb7e004cf, "e,g", 0 }, /* fadd.ds fsrc1,f0,fdest */
-{ "pfmov.ds", 0x48000530, 0xb73000cf, "e,g", 0 }, /* pfadd.ds fsrc1,f0,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 b52fc3387..000000000
--- a/include/opcode/i960.h
+++ /dev/null
@@ -1,509 +0,0 @@
-/* Basic 80960 instruction formats.
- *
- * 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 642330cc1..000000000
--- a/include/opcode/ia64.h
+++ /dev/null
@@ -1,391 +0,0 @@
-/* ia64.h -- Header file for ia64 opcode table
- Copyright (C) 1998, 1999 David Mosberger-Tang <davidm@hpl.hp.com>
-
- See the file HP-COPYRIGHT for additional information. */
-
-#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_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) */
-
- /* 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_MR3, /* memory at addr of third register # */
- 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_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_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_IRR,
- IA64_RS_CR_LRR,
- IA64_RS_CR, /* 3-7,10-15,18,26-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 52a246130..000000000
--- a/include/opcode/m68hc11.h
+++ /dev/null
@@ -1,418 +0,0 @@
-/* m68hc11.h -- Header file for Motorola 68HC11 & 68HC12 opcode table
- Copyright 1999, 2000 Free Software Foundation, Inc.
- Written by Stephane Carrez (stcarrez@worldnet.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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 0x20 /* 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 0x40 /* 5 */
-#define M6811_OC1M4 0x40 /* 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 M6811_OP_MASK 0x0FFFF
-#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
-
-/* CPU identification. */
-#define cpu6811 0x01
-#define cpu6812 0x02
-
-/* 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 3208b77f4..000000000
--- a/include/opcode/m68k.h
+++ /dev/null
@@ -1,344 +0,0 @@
-/* Opcode table header for m680[01234]0/m6888[12]/m68851.
- Copyright 1989, 91, 92, 93, 94, 95, 96, 97, 1999 Free Software Foundation.
-
-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, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
-
-/* These are used as bit flags for the arch field in the m68k_opcode
- structure. */
-#define _m68k_undef 0
-#define m68000 0x001
-#define m68008 m68000 /* synonym for -m68000. otherwise unused. */
-#define m68010 0x002
-#define m68020 0x004
-#define m68030 0x008
-#define m68ec030 m68030 /* similar enough to -m68030 to ignore differences;
- gas will deal with the few differences. */
-#define m68040 0x010
-/* there is no 68050 */
-#define m68060 0x020
-#define m68881 0x040
-#define m68882 m68881 /* synonym for -m68881. otherwise unused. */
-#define m68851 0x080
-#define cpu32 0x100 /* e.g., 68332 */
-#define mcf5200 0x200
-#define mcf5206e 0x400
-#define mcf5307 0x800
-
- /* handy aliases */
-#define m68040up (m68040 | m68060)
-#define m68030up (m68030 | m68040up)
-#define m68020up (m68020 | m68030up)
-#define m68010up (m68010 | cpu32 | m68020up)
-#define m68000up (m68000 | m68010up)
-#define mcf (mcf5200 | mcf5206e | mcf5307)
-
-#define mfloat (m68881 | m68882 | 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 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. */
-
-/* Kinds of operands:
- Characters used: AaBCcDdEFfGHIJkLlMmnOopQqRrSsTtU VvWXYZ0123|*~%;@!&$?/<>#^+-
-
- 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 ACC. No need to store, just as with CCR.
- G the MACSR. No need to store, just as with CCR.
- H the MASK. No need to store, just as with CCR.
-
- 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]
- 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]
- 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]
-
- 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,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)
-*/
-
-/* 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: BbCcDdghijkLlMmNnostWw123456789
-
- 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
- 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
-*/
-
-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 a17fa0361..000000000
--- a/include/opcode/m88k.h
+++ /dev/null
@@ -1,923 +0,0 @@
-/* Table of opcodes for the motorola 88k family.
- Copyright 1989, 1990, 1991, 1992, 1993 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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().
- *
- * Structure Format
- *
- * struct INSTAB {
- * UPINT opcode;
- * char *mnemonic;
- * struct OPSPEC op1,op2,op3;
- * struct SIM_FLAGS flgs;
- * struct INSTAB *next;
- * }
- *
- * struct OPSPEC {
- * UPINT offset:5;
- * UPINT width:6;
- * UPINT type:5;
- * }
- *
- * 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>
-
-
-/*
- * This file contains the structures and constants needed to build the M88000
- * simulator. It is the main include file, containing all the
- * structures, macros and definitions except for the floating point
- * instruction set.
- */
-
-/*
- * The following flag informs the Simulator as to what type of byte ordering
- * will be used. For instance, a BOFLAG = 1 indicates a DEC VAX and IBM type
- * of ordering shall be used.
-*/
-
-/* # define BOFLAG 1 */ /* BYTE ORDERING FLAG */
-
-/* define the number of bits in the primary opcode field of the instruction,
- * the destination field, the source 1 and source 2 fields.
- */
-# define OP 8 /* size of opcode field */
-# define DEST 6 /* size of destination */
-# define SOURCE1 6 /* size of source1 */
-# define SOURCE2 6 /* size of source2 */
-
-# define REGs 32 /* number of registers */
-
-# define WORD long
-# define FLAG unsigned
-# define STATE short
-
-# define TRUE 1
-# define FALSE 0
-
-# define READ 0
-# define WRITE 1
-
-/* 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
-
-# define PINT 0 /* Integer Priority */
-# define PFLT 1 /* Floating Point Priority */
-# define PMEM 2 /* Memory Priority */
-# define NA 3 /* Not Applicable, instruction doesnt write to regs */
-# define HIPRI 3 /* highest of these priorities */
-
-/* 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,
- wb_pri; /* writeback priority */
- unsigned imm_flags:2,/* immediate size */
- 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, /* dest size */
- s1_64:1, /* source 1 size */
- s2_64:1, /* source 2 size */
- scale_flag:1, /* scaled register */
- brk_flg:1;
- };
-
-struct mem_segs {
- struct mem_wrd *seg; /* pointer (returned by calloc) to segment */
- unsigned long baseaddr; /* base load address from file headers */
- unsigned long endaddr; /* Ending address of segment */
- int flags; /* segment control flags (none defined 12/5/86) */
-};
-
-#define MAXSEGS (10) /* max number of segment allowed */
-#define MEMSEGSIZE (sizeof(struct mem_segs))/* size of mem_segs structure */
-
-
-#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 */
-
-
-struct mem_wrd {
- struct IR_FIELDS opcode; /* simulator instruction break down */
- union {
- unsigned long l; /* memory element break down */
- unsigned short s[2];
- unsigned char c[4];
- } mem;
-};
-
-#define MEMWRDSIZE (sizeof(struct mem_wrd)) /* size of each 32 bit memory model */
-
-/* External declarations */
-
-extern struct mem_segs memory[];
-extern struct PROCESSOR m78000;
-
-struct PROCESSOR {
- unsigned WORD
- ip, /* execute instruction pointer */
- vbr, /* vector base register */
- psr; /* processor status register */
-
- WORD S1bus, /* source 1 */
- S2bus, /* source 2 */
- Dbus, /* destination */
- DAbus, /* data address bus */
- ALU,
- Regs[REGs], /* data registers */
- time_left[REGs], /* max clocks before reg is available */
- wb_pri[REGs], /* writeback priority of reg */
- SFU0_regs[REGs], /* integer unit control regs */
- SFU1_regs[REGs], /* floating point control regs */
- Scoreboard[REGs],
- Vbr;
- unsigned WORD scoreboard,
- Psw,
- Tpsw;
- FLAG jump_pending:1; /* waiting for a jump instr. */
- };
-
-# define i26bit 1 /* size of immediate field */
-# define i16bit 2
-# define i10bit 3
-
-/* Definitions for fields in psr */
-
-# define mode 31
-# define rbo 30
-# define ser 29
-# define carry 28
-# define sf7m 11
-# define sf6m 10
-# define sf5m 9
-# define sf4m 8
-# define sf3m 7
-# define sf2m 6
-# define sf1m 5
-# define mam 4
-# define inm 3
-# define exm 2
-# define trm 1
-# define ovfm 0
-
-#define MODEMASK (1<<(mode-1))
-# define SILENT 0 /* simulate without output to crt */
-# define VERBOSE 1 /* simulate in verbose mode */
-# define PR_INSTR 2 /* only print instructions */
-
-# define RESET 16 /* reset phase */
-
-# define PHASE1 0 /* data path phases */
-# define PHASE2 1
-
-/* 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
-
-/* the 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
-
-/* the STORES */
-
-# define STB LDHU+1
-# define STH LDHU+2
-# define ST LDHU+3
-# define STD LDHU+4
-
-/* the exchange */
-
-# define XMEMBU LDHU+5
-# define XMEM LDHU+6
-
-/* the 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
-
-/* the TRAPS */
-# define TB1 BCND+1
-# define TB0 BCND+2
-# define TCND BCND+3
-# define RTE BCND+4
-# define TBND BCND+5
-
-/* the MISC instructions */
-# 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,
- REGSC = 5 /* scaled register */,
- CRREG = 6 /* control register */,
- FCRREG = 7 /* floating point control register */,
- PCREL = 8,
- CONDMASK = 9,
- XREG = 10, /* extended register */
- DEC = 11, /* decimal */
-};
-
-/* Hashing Specification */
-
-#define HASHVAL 79
-
-/* Type definitions */
-
-typedef unsigned int UINT;
-
-/* Structure templates */
-
-#if never
-typedef struct {
- unsigned int offset:5;
- unsigned int width:6;
- unsigned int type:5;
-} OPSPEC;
-#endif
-
-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;
- struct INSTRUCTAB *next;
-} INSTAB;
-
-
-#define NO_OPERAND {0,0,0}
-
-/* Opcode Mnemonic Op 1 Spec Op 2 Spec Op 3 Spec Simflags Next */
-
-static INSTAB instructions[] = {
- {0xf400c800,"jsr ",{0,5,REG} ,NO_OPERAND ,NO_OPERAND , {2,2,NA,JSR , 0,0,1,0,0,0,0,1,0,0,0,0}, NULL },
- {0xf400cc00,"jsr.n ",{0,5,REG} ,NO_OPERAND ,NO_OPERAND , {1,1,NA,JSR , 0,0,1,0,0,0,1,1,0,0,0,0}, NULL },
- {0xf400c000,"jmp ",{0,5,REG} ,NO_OPERAND ,NO_OPERAND , {2,2,NA,JMP , 0,0,1,0,0,0,0,1,0,0,0,0}, NULL },
- {0xf400c400,"jmp.n ",{0,5,REG} ,NO_OPERAND ,NO_OPERAND , {1,1,NA,JMP , 0,0,1,0,0,0,1,1,0,0,0,0}, NULL },
- {0xc8000000,"bsr ",{0,26,PCREL},NO_OPERAND ,NO_OPERAND , {2,2,NA,BSR , i26bit,0,0,0,0,0,0,1,0,0,0,0}, NULL },
- {0xcc000000,"bsr.n ",{0,26,PCREL},NO_OPERAND ,NO_OPERAND , {1,1,NA,BSR , i26bit,0,0,0,0,0,1,1,0,0,0,0}, NULL },
- {0xc0000000,"br ",{0,26,PCREL},NO_OPERAND ,NO_OPERAND , {2,2,NA,BR , i26bit,0,0,0,0,0,0,1,0,0,0,0}, NULL },
- {0xc4000000,"br.n ",{0,26,PCREL},NO_OPERAND ,NO_OPERAND , {1,1,NA,BR , i26bit,0,0,0,0,0,1,1,0,0,0,0}, NULL },
- {0xd0000000,"bb0 ",{21,5,HEX} ,{16,5,REG} ,{0,16,PCREL},{2,2,NA,BB0, i16bit,0,1,0,0,0,0,1,0,0,0,0}, NULL },
- {0xd4000000,"bb0.n ",{21,5,HEX} ,{16,5,REG} ,{0,16,PCREL},{1,1,NA,BB0, i16bit,0,1,0,0,0,1,1,0,0,0,0}, NULL },
- {0xd8000000,"bb1 ",{21,5,HEX},{16,5,REG} ,{0,16,PCREL},{2,2,NA,BB1, i16bit,0,1,0,0,0,0,1,0,0,0,0}, NULL },
- {0xdc000000,"bb1.n ",{21,5,HEX},{16,5,REG} ,{0,16,PCREL},{1,1,NA,BB1, i16bit,0,1,0,0,0,1,1,0,0,0,0}, NULL },
- {0xf000d000,"tb0 ",{21,5,HEX} ,{16,5,REG} ,{0,10,HEX}, {2,2,NA,TB0 , i10bit,0,1,0,0,0,0,1,0,0,0,0}, NULL },
- {0xf000d800,"tb1 ",{21,5,HEX} ,{16,5,REG} ,{0,10,HEX}, {2,2,NA,TB1 , i10bit,0,1,0,0,0,0,1,0,0,0,0}, NULL },
- {0xe8000000,"bcnd ",{21,5,CONDMASK},{16,5,REG},{0,16,PCREL},{2,2,NA,BCND, i16bit,0,1,0,0,0,0,1,0,0,0,0}, NULL },
- {0xec000000,"bcnd.n ",{21,5,CONDMASK},{16,5,REG},{0,16,PCREL},{1,1,NA,BCND, i16bit,0,1,0,0,0,1,1,0,0,0,0}, NULL },
- {0xf000e800,"tcnd ",{21,5,CONDMASK},{16,5,REG},{0,10,HEX}, {2,2,NA,TCND, i10bit,0,1,0,0,0,0,1,0,0,0,0}, NULL },
- {0xf8000000,"tbnd ",{16,5,REG} ,{0,16,HEX} ,NO_OPERAND , {2,2,NA,TBND, i10bit,1,0,0,0,0,0,1,0,0,0,0}, NULL },
- {0xf400f800,"tbnd ",{16,5,REG} ,{0,5,REG} ,NO_OPERAND , {2,2,NA,TBND, 0,1,1,0,0,0,0,1,0,0,0,0}, NULL },
- {0xf400fc00,"rte ",NO_OPERAND ,NO_OPERAND ,NO_OPERAND , {2,2,NA,RTE , 0,0,0,0,0,0,0,1,0,0,0,0}, NULL },
- {0x1c000000,"ld.b ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {3,1,PMEM,LDB ,i16bit,1,0,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4001c00,"ld.b ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,LDB , 0,1,1,1,0,0,0,1,0,0,0,0}, NULL },
- {0x0c000000,"ld.bu ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {3,1,PMEM,LDBU, i16bit,1,0,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4000c00,"ld.bu ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,LDBU ,0,1,1,1,0,0,0,1,0,0,0,0}, NULL },
- {0x18000000,"ld.h ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {3,1,PMEM,LDH ,i16bit,1,0,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4001800,"ld.h ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,LDH ,0,1,1,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4001a00,"ld.h ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{3,1,PMEM,LDH ,0,1,1,1,0,0,0,1,0,0,0,1}, NULL },
- {0x08000000,"ld.hu ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {3,1,PMEM,LDHU, i16bit,1,0,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4000800,"ld.hu ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,LDHU ,0,1,1,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4000a00,"ld.hu ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{3,1,PMEM,LDHU ,0,1,1,1,0,0,0,1,0,0,0,1}, NULL },
- {0x14000000,"ld ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {3,1,PMEM,LD ,i16bit,1,0,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4001400,"ld ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,LD ,0,1,1,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4001600,"ld ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{3,1,PMEM,LD ,0,1,1,1,0,0,0,1,0,0,0,1}, NULL },
- {0x10000000,"ld.d ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {3,1,PMEM,LDD ,i16bit,1,0,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4001000,"ld.d ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,LDD ,0,1,1,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4001200,"ld.d ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{3,1,PMEM,LDD ,0,1,1,1,0,0,0,1,0,0,0,1}, NULL },
- {0xf4001500,"ld.usr ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,LD ,0,1,1,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4001700,"ld.usr ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{3,1,PMEM,LD ,0,1,1,1,0,0,0,1,0,0,0,1}, NULL },
- {0x2c000000,"st.b ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,NA,STB ,i16bit,1,0,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4002c00,"st.b ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,NA,STB ,0,1,1,1,0,0,0,1,0,0,0,0}, NULL },
- {0x28000000,"st.h ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,NA,STH ,i16bit,1,0,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4002800,"st.h ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,NA,STH ,0,1,1,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4002a00,"st.h ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{1,1,NA,STH ,0,1,1,1,0,0,0,1,0,0,0,1}, NULL },
- {0x24000000,"st ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,NA,ST ,i16bit,1,0,1,0,0,0,1,0,0,0,0}, NULL },
- {0xf4002400,"st ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,NA,ST ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0xf4002600,"st ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{1,1,NA,ST ,0,1,1,1,0,0,0,1,0,0,0,1} ,NULL },
- {0x20000000,"st.d ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,NA,STD ,i16bit,0,1,0,0,0,0,1,0,0,0,0} ,NULL },
- {0xf4002000,"st.d ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,NA,STD ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0xf4002200,"st.d ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{1,1,NA,STD ,0,1,1,1,0,0,0,1,0,0,0,1} ,NULL },
- {0xf4002500,"st.usr ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,NA,ST ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0xf4002700,"st.usr ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{1,1,NA,ST ,0,1,1,1,0,0,0,1,0,0,0,1} ,NULL },
-/* m88100 only:
- {0x00000000,"xmem.bu ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {3,1,PMEM,XMEMBU ,i16bit,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- */
- {0xf4000000,"xmem.bu ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,XMEM ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
-/* m88100 only:
- {0x04000000,"xmem ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {3,1,PMEM,XMEM ,i16bit,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- */
- {0xf4000400,"xmem ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,XMEM ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0xf4000600,"xmem ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{3,1,PMEM,XMEM ,0,1,1,1,0,0,0,1,0,0,0,1} ,NULL },
- {0xf4000500,"xmem.usr ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {3,1,PMEM,XMEM ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0xf4000700,"xmem.usr ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{3,1,PMEM,XMEM ,0,1,1,1,0,0,0,1,0,0,0,1} ,NULL },
-/* m88100 only:
- {0xf4003e00,"lda.b ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{1,1,PINT,LDAH, 0,1,1,1,0,0,0,0,0,0,0,1} ,NULL },
- */
- {0xf4003e00,"lda.x ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{1,1,PINT,LDAH, 0,1,1,1,0,0,0,0,0,0,0,1} ,NULL },
- {0xf4003a00,"lda.h ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{1,1,PINT,LDAH, 0,1,1,1,0,0,0,0,0,0,0,1} ,NULL },
- {0xf4003600,"lda ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{1,1,PINT,LDA , 0,1,1,1,0,0,0,0,0,0,0,1} ,NULL },
- {0xf4003200,"lda.d ",{21,5,REG} ,{16,5,REG} ,{0,5,REGSC},{1,1,PINT,LDAD, 0,1,1,1,0,0,0,0,0,0,0,1} ,NULL },
-
- {0x80004000,"ldcr ",{21,5,REG} ,{5,6,CRREG} ,NO_OPERAND ,{1,1,PINT,LDCR, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x80008000,"stcr ",{16,5,REG} ,{5,6,CRREG} ,NO_OPERAND ,{1,1,PINT,STCR, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x8000c000,"xcr ",{21,5,REG} ,{16,5,REG} ,{5,6,CRREG},{1,1,PINT,XCR, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
-
- {0xf4006000,"addu ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,ADDU, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4006200,"addu.ci ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,ADDU, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4006100,"addu.co ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,ADDU, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4006300,"addu.cio ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,ADDU, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4006400,"subu ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,SUBU, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4006600,"subu.ci ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,SUBU, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4006500,"subu.co ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,SUBU, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4006700,"subu.cio ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,SUBU, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4006800,"divu ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {32,32,PINT,DIVU, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4006900,"divu.d ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,}, NULL },
- {0xf4006e00,"muls ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,}, NULL },
- {0xf4006c00,"mulu ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,4,PINT,MUL, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007000,"add ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,ADD , 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007200,"add.ci ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,ADD , 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007100,"add.co ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,ADD , 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007300,"add.cio ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,ADD , 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007400,"sub ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,SUB , 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007600,"sub.ci ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,SUB , 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007500,"sub.co ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,SUB , 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007700,"sub.cio ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,SUB , 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007800,"divs ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {32,32,PINT,DIV , 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4007c00,"cmp ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,CMP, 0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
-
- {0x60000000,"addu ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,ADDU, i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x64000000,"subu ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,SUBU, i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
-
- {0x68000000,"divu ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {32,32,PINT,DIVU, i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x6c000000,"mulu ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {4,1,PINT,MUL, i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x70000000,"add ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,ADD, i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x74000000,"sub ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,SUB, i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x78000000,"divs ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {32,32,PINT,DIV, i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x7c000000,"cmp ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,CMP, i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
-
- {0xf4004000,"and ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,AND_ ,0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4004400,"and.c ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,AND_ ,0,1,1,1,1,0,0,0,0,0,0,0} ,NULL },
- {0xf4005800,"or ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,OR ,0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4005c00,"or.c ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,OR ,0,1,1,1,1,0,0,0,0,0,0,0} ,NULL },
- {0xf4005000,"xor ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,XOR ,0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4005400,"xor.c ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,XOR ,0,1,1,1,1,0,0,0,0,0,0,0} ,NULL },
- {0x40000000,"and ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,AND_ ,i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x44000000,"and.u ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,AND_ ,i16bit,1,0,1,0,1,0,0,0,0,0,0} ,NULL },
- {0x58000000,"or ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,OR ,i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x5c000000,"or.u ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,OR ,i16bit,1,0,1,0,1,0,0,0,0,0,0} ,NULL },
- {0x50000000,"xor ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,XOR ,i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x54000000,"xor.u ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,XOR ,i16bit,1,0,1,0,1,0,0,0,0,0,0} ,NULL },
- {0x48000000,"mask ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,MASK ,i16bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0x4c000000,"mask.u ",{21,5,REG} ,{16,5,REG} ,{0,16,HEX}, {1,1,PINT,MASK ,i16bit,1,0,1,0,1,0,0,0,0,0,0} ,NULL },
- {0xf400ec00,"ff0 ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {1,1,PINT,FF0 ,0,0,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf400e800,"ff1 ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {1,1,PINT,FF1 ,0,0,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf0008000,"clr ",{21,5,REG} ,{16,5,REG} ,{0,10,BF} , {1,1,PINT,CLR ,i10bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf0008800,"set ",{21,5,REG} ,{16,5,REG} ,{0,10,BF} , {1,1,PINT,SET ,i10bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf0009000,"ext ",{21,5,REG} ,{16,5,REG} ,{0,10,BF} , {1,1,PINT,EXT ,i10bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf0009800,"extu ",{21,5,REG} ,{16,5,REG} ,{0,10,BF} , {1,1,PINT,EXTU ,i10bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf000a000,"mak ",{21,5,REG} ,{16,5,REG} ,{0,10,BF} , {1,1,PINT,MAK ,i10bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf000a800,"rot ",{21,5,REG} ,{16,5,REG} ,{0,10,BF} , {1,1,PINT,ROT ,i10bit,1,0,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4008000,"clr ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,CLR ,0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4008800,"set ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,SET ,0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4009000,"ext ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,EXT ,0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf4009800,"extu ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,EXTU ,0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf400a000,"mak ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,MAK ,0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
- {0xf400a800,"rot ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {1,1,PINT,ROT ,0,1,1,1,0,0,0,0,0,0,0,0} ,NULL },
-
- {0x84002800,"fadd.sss ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {5,1,PFLT,FADD ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84002880,"fadd.ssd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FADD ,0,1,1,1,0,0,0,1,0,0,1,0} ,NULL },
- {0x84002a00,"fadd.sds ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FADD ,0,1,1,1,0,0,0,1,0,1,0,0} ,NULL },
- {0x84002a80,"fadd.sdd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FADD ,0,1,1,1,0,0,0,1,0,1,1,0} ,NULL },
- {0x84002820,"fadd.dss ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FADD ,0,1,1,1,0,0,0,1,1,0,0,0} ,NULL },
- {0x840028a0,"fadd.dsd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FADD ,0,1,1,1,0,0,0,1,1,0,1,0} ,NULL },
- {0x84002a20,"fadd.dds ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FADD ,0,1,1,1,0,0,0,1,1,1,0,0} ,NULL },
- {0x84002aa0,"fadd.ddd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FADD ,0,1,1,1,0,0,0,1,1,1,1,0} ,NULL },
- {0x84003000,"fsub.sss ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {5,1,PFLT,FSUB ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84003080,"fsub.ssd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FSUB ,0,1,1,1,0,0,0,1,0,0,1,0} ,NULL },
- {0x84003200,"fsub.sds ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FSUB ,0,1,1,1,0,0,0,1,0,1,0,0} ,NULL },
- {0x84003280,"fsub.sdd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FSUB ,0,1,1,1,0,0,0,1,0,1,1,0} ,NULL },
- {0x84003020,"fsub.dss ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FSUB ,0,1,1,1,0,0,0,1,1,0,0,0} ,NULL },
- {0x840030a0,"fsub.dsd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FSUB ,0,1,1,1,0,0,0,1,1,0,1,0} ,NULL },
- {0x84003220,"fsub.dds ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FSUB ,0,1,1,1,0,0,0,1,1,1,0,0} ,NULL },
- {0x840032a0,"fsub.ddd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,2,PFLT,FSUB ,0,1,1,1,0,0,0,1,1,1,1,0} ,NULL },
- {0x84000000,"fmul.sss ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,1,PFLT,FMUL ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84000080,"fmul.ssd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {9,2,PFLT,FMUL ,0,1,1,1,0,0,0,1,0,0,1,0} ,NULL },
- {0x84000200,"fmul.sds ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {9,2,PFLT,FMUL ,0,1,1,1,0,0,0,1,0,1,0,0} ,NULL },
- {0x84000280,"fmul.sdd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {9,2,PFLT,FMUL ,0,1,1,1,0,0,0,1,0,1,1,0} ,NULL },
- {0x84000020,"fmul.dss ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {9,2,PFLT,FMUL ,0,1,1,1,0,0,0,1,1,0,0,0} ,NULL },
- {0x840000a0,"fmul.dsd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {9,2,PFLT,FMUL ,0,1,1,1,0,0,0,1,1,0,1,0} ,NULL },
- {0x84000220,"fmul.dds ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {9,2,PFLT,FMUL ,0,1,1,1,0,0,0,1,1,1,0,0} ,NULL },
- {0x840002a0,"fmul.ddd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {9,2,PFLT,FMUL ,0,1,1,1,0,0,0,1,1,1,1,0} ,NULL },
- {0x84007000,"fdiv.sss ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {30,30,PFLT,FDIV ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84007080,"fdiv.ssd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {60,60,PFLT,FDIV ,0,1,1,1,0,0,0,1,0,0,1,0} ,NULL },
- {0x84007200,"fdiv.sds ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {60,60,PFLT,FDIV ,0,1,1,1,0,0,0,1,0,1,0,0} ,NULL },
- {0x84007280,"fdiv.sdd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {60,60,PFLT,FDIV ,0,1,1,1,0,0,0,1,0,1,1,0} ,NULL },
- {0x84007020,"fdiv.dss ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {60,60,PFLT,FDIV ,0,1,1,1,0,0,0,1,1,0,0,0} ,NULL },
- {0x840070a0,"fdiv.dsd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {60,60,PFLT,FDIV ,0,1,1,1,0,0,0,1,1,0,1,0} ,NULL },
- {0x84007220,"fdiv.dds ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {60,60,PFLT,FDIV ,0,1,1,1,0,0,0,1,1,1,0,0} ,NULL },
- {0x840072a0,"fdiv.ddd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {60,60,PFLT,FDIV ,0,1,1,1,0,0,0,1,1,1,1,0} ,NULL },
- {0x84007800,"fsqrt.ss ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {5,1,PFLT,FLT ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84007820,"fsqrt.sd ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {5,1,PFLT,FLT ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84007880,"fsqrt.ds ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {5,1,PFLT,FLT ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x840078a0,"fsqrt.dd ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {6,1,PFLT,FLT ,0,0,1,1,0,0,0,1,1,0,0,0} ,NULL },
- {0x84003800,"fcmp.ss ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {5,1,PFLT,FCMP ,0,1,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84003880,"fcmp.sd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,1,PFLT,FCMP ,0,1,1,1,0,0,0,1,0,1,0,0} ,NULL },
- {0x84003a00,"fcmp.ds ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,1,PFLT,FCMP ,0,1,1,1,0,0,0,1,1,0,0,0} ,NULL },
- {0x84003a80,"fcmp.dd ",{21,5,REG} ,{16,5,REG} ,{0,5,REG} , {6,1,PFLT,FCMP ,0,1,1,1,0,0,0,1,1,1,0,0} ,NULL },
- {0x84002000,"flt.s ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {5,1,PFLT,FLT ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84002020,"flt.d ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {6,1,PFLT,FLT ,0,0,1,1,0,0,0,1,1,0,0,0} ,NULL },
- {0x84004800,"int.s ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {5,1,PFLT,INT ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84004880,"int.d ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {6,1,PFLT,INT ,0,0,1,1,0,0,0,1,1,0,0,0} ,NULL },
- {0x84005000,"nint.s ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {5,1,PFLT,INT ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84005080,"nint.d ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {6,1,PFLT,INT ,0,0,1,1,0,0,0,1,1,0,0,0} ,NULL },
- {0x84005800,"trnc.s ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {5,1,PFLT,TRNC ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x84005880,"trnc.d ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND , {6,1,PFLT,TRNC ,0,0,1,1,0,0,0,1,1,0,0,0} ,NULL },
-
- {0x80004800,"fldcr ",{21,5,REG} ,{5,6,FCRREG} ,NO_OPERAND , {1,1,PFLT,FLDC ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x80008800,"fstcr ",{16,5,REG} ,{5,6,FCRREG} ,NO_OPERAND , {1,1,PFLT,FSTC ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
- {0x8000c800,"fxcr ",{21,5,REG} ,{16,5,REG} ,{5,6,FCRREG} , {1,1,PFLT,FXC ,0,0,1,1,0,0,0,1,0,0,0,0} ,NULL },
-
-/* The following are new for the 88110. */
-
- {0x8400aaa0,"fadd.ddd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400aa80,"fadd.dds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400aac0,"fadd.ddx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400aa20,"fadd.dsd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400aa00,"fadd.dss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400aa40,"fadd.dsx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ab20,"fadd.dxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ab00,"fadd.dxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ab40,"fadd.dxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400a8a0,"fadd.sdd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400a880,"fadd.sds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400a8c0,"fadd.sdx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400a820,"fadd.ssd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400a800,"fadd.sss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400a840,"fadd.ssx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400a920,"fadd.sxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400a900,"fadd.sxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400a940,"fadd.sxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400aca0,"fadd.xdd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ac80,"fadd.xds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400acc0,"fadd.xdx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ac20,"fadd.xsd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ac00,"fadd.xss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ac40,"fadd.xsx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ad20,"fadd.xxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ad00,"fadd.xxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ad40,"fadd.xxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400ba80,"fcmp.sdd ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ba00,"fcmp.sds ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400bb00,"fcmp.sdx ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b880,"fcmp.ssd ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b800,"fcmp.sss ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b900,"fcmp.ssx ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400bc80,"fcmp.sxd ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400bc00,"fcmp.sxs ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400bd00,"fcmp.sxx ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400baa0,"fcmpu.sdd ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400ba20,"fcmpu.sds ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400bb20,"fcmpu.sdx ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b8a0,"fcmpu.ssd ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b820,"fcmpu.sss ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b920,"fcmpu.ssx ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400bca0,"fcmpu.sxd ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400bc20,"fcmpu.sxs ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400bd20,"fcmpu.sxx ",{21,5,REG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x84000820,"fcvt.sd ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84000880,"fcvt.ds ",{21,5,REG} ,{0,5,REG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x84008880,"fcvt.ds ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x840088c0,"fcvt.dx ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008820,"fcvt.sd ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008840,"fcvt.sx ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008920,"fcvt.xd ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008900,"fcvt.xs ",{21,5,XREG} ,{0,5,XREG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400f2a0,"fdiv.ddd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f280,"fdiv.dds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f2c0,"fdiv.ddx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f220,"fdiv.dsd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f200,"fdiv.dss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f240,"fdiv.dsx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f320,"fdiv.dxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f300,"fdiv.dxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f340,"fdiv.dxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f0a0,"fdiv.sdd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f080,"fdiv.sds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f0c0,"fdiv.sdx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f020,"fdiv.ssd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f000,"fdiv.sss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f040,"fdiv.ssx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f120,"fdiv.sxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f100,"fdiv.sxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f140,"fdiv.sxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f4a0,"fdiv.xdd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f480,"fdiv.xds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f4c0,"fdiv.xdx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f420,"fdiv.xsd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f400,"fdiv.xss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f440,"fdiv.xsx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f520,"fdiv.xxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f500,"fdiv.xxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f540,"fdiv.xxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x84002220,"flt.ds ",{21,5,XREG} ,{0,5,REG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84002200,"flt.ss ",{21,5,XREG} ,{0,5,REG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84002240,"flt.xs ",{21,5,XREG} ,{0,5,REG} ,NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x840082a0,"fmul.ddd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008280,"fmul.dds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x840082c0,"fmul.ddx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008220,"fmul.dsd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008200,"fmul.dss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008240,"fmul.dsx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008320,"fmul.dxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008300,"fmul.dxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008340,"fmul.dxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x840080a0,"fmul.sdd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008080,"fmul.sds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x840080c0,"fmul.sdx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008020,"fmul.ssd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008000,"fmul.sss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008040,"fmul.ssx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008120,"fmul.sxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008100,"fmul.sxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008140,"fmul.sxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x840084a0,"fmul.xdd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008480,"fmul.xds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x840084c0,"fmul.xdx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008420,"fmul.xsd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008400,"fmul.xss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008440,"fmul.xsx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008520,"fmul.xxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008500,"fmul.xxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84008540,"fmul.xxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400f8a0,"fsqrt.dd ",{21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f880,"fsqrt.ds ",{21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f8c0,"fsqrt.dx ",{21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f820,"fsqrt.sd ",{21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f800,"fsqrt.ss ",{21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f840,"fsqrt.sx ",{21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f920,"fsqrt.xd ",{21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f900,"fsqrt.xs ",{21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400f940,"fsqrt.xx ",{21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400b2a0,"fsub.ddd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b280,"fsub.dds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b2c0,"fsub.ddx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b220,"fsub.dsd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b200,"fsub.dss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b240,"fsub.dsx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b320,"fsub.dxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b300,"fsub.dxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b340,"fsub.dxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b0a0,"fsub.sdd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b080,"fsub.sds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b0c0,"fsub.sdx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b020,"fsub.ssd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b000,"fsub.sss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b040,"fsub.ssx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b120,"fsub.sxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b100,"fsub.sxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b140,"fsub.sxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b4a0,"fsub.xdd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b480,"fsub.xds ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b4c0,"fsub.xdx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b420,"fsub.xsd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b400,"fsub.xss ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b440,"fsub.xsx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b520,"fsub.xxd ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b500,"fsub.xxs ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400b540,"fsub.xxx ",{21,5,XREG} ,{16,5,XREG} ,{0,5,XREG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400fc00,"illop", {0,2,DEC}, NO_OPERAND, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400c800,"int.ss ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400c880,"int.sd ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400c900,"int.sx ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x04000000,"ld ", {21,5,XREG}, {16,5,REG}, {0,16,HEX}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x00000000,"ld.d ", {21,5,XREG}, {16,5,REG}, {0,16,HEX}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x3c000000,"ld.x ", {21,5,XREG}, {16,5,REG}, {0,16,HEX}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0xf0001400,"ld ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001000,"ld.d ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001800,"ld.x ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001500,"ld.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001100,"ld.d.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001900,"ld.x.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0xf0001600,"ld ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001200,"ld.d ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001a00,"ld.x ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001700,"ld.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001300,"ld.d.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0001b00,"ld.x.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400c000,"mov.s ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400c080,"mov.d ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84004200,"mov.s ", {21,5,XREG}, {0,5,REG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x84004280,"mov.d ", {21,5,XREG}, {0,5,REG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400c300,"mov ", {21,5,XREG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0xf4006d00,"mulu.d ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400d080,"nint.sd ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400d000,"nint.ss ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400d100,"nint.sx ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x88002020,"padd.b ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88002040,"padd.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88002060,"padd ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x880021e0,"padds.s ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880021a0,"padds.s.b ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880021c0,"padds.s.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880020e0,"padds.u ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880020a0,"padds.u.b ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880020c0,"padds.u.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88002160,"padds.us ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88002120,"padds.us.b ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88002140,"padds.us.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x88003860,"pcmp ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x88000000,"pmul ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x88006260,"ppack.16 ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88006240,"ppack.16.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88006460,"ppack.32 ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88006420,"ppack.32.b ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88006440,"ppack.32.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88006160,"ppack.8 ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x88007200,"prot ", {21,5,REG}, {16,5,REG}, {5,6,HEX}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88007800,"prot ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x88003020,"psub.b ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88003040,"psub.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88003060,"psub ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x880031e0,"psubs.s ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880031a0,"psubs.s.b ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880031c0,"psubs.s.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880030e0,"psubs.u ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880030a0,"psubs.u.b ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x880030c0,"psubs.u.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88003160,"psubs.us ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88003120,"psubs.us.b ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88003140,"psubs.us.h ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x88006800,"punpk.n ", {21,5,REG}, {16,5,REG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x88006820,"punpk.b ", {21,5,REG}, {16,5,REG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x34000000,"st ", {21,5,XREG}, {16,5,REG}, {0,16,HEX}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x30000000,"st.d ", {21,5,XREG}, {16,5,REG}, {0,16,HEX}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x38000000,"st.x ", {21,5,XREG}, {16,5,REG}, {0,16,HEX}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0xf4002c80,"st.b.wt ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002880,"st.h.wt ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002480,"st.wt ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002080,"st.d.wt ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002d80,"st.b.usr.wt ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002980,"st.h.usr.wt ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002580,"st.usr.wt ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002180,"st.d.usr.wt ", {21,5,REG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0xf0002400,"st ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002000,"st.d ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002100,"st.d.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002180,"st.d.usr.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002080,"st.d.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002500,"st.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002580,"st.usr.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002480,"st.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002800,"st.x ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002900,"st.x.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002980,"st.x.usr.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002880,"st.x.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REG}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0xf4002f80,"st.b.usr.wt ", {21,5,REG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002e80,"st.b.wt ", {21,5,REG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002380,"st.d.usr.wt ", {21,5,REG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002280,"st.d.wt ", {21,5,REG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002b80,"st.h.usr.wt ", {21,5,REG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002a80,"st.h.wt ", {21,5,REG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002780,"st.usr.wt ", {21,5,REG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf4002680,"st.wt ", {21,5,REG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0xf0002600,"st ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002200,"st.d ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002300,"st.d.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002380,"st.d.usr.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002280,"st.d.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002700,"st.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002780,"st.usr.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002680,"st.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002a00,"st.x ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002b00,"st.x.usr ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002b80,"st.x.usr.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0xf0002a80,"st.x.wt ", {21,5,XREG}, {16,5,REG}, {0,5,REGSC}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
- {0x8400d880,"trnc.sd ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400d800,"trnc.ss ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
- {0x8400d900,"trnc.sx ", {21,5,REG}, {0,5,XREG}, NO_OPERAND, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL },
-
-};
-
-/*
- * Local Variables:
- * fill-column: 131
- * End:
- */
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
deleted file mode 100644
index c493d08dc..000000000
--- a/include/opcode/mips.h
+++ /dev/null
@@ -1,784 +0,0 @@
-/* mips.h. Mips opcode list for GDB, the GNU debugger.
- Copyright 1993, 94, 95, 96, 1997 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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
-
-/* 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 bits describing the instruction sets of which this
- instruction or macro is a member. */
- unsigned long membership;
-};
-
-/* These are the characters which may appears 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.
-
- "<" 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)
- "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
-
- 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)
- "P" 5 bit performance-monitor register (OP_*_PERFREG)
- "H" 3 bit sel field (OP_*_SEL)
-
- Macro instructions:
- "A" General 32 bit expression
- "I" 32 bit immediate
- "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
-
- Other:
- "()" parens surrounding optional value
- "," separates operands
-
- Characters used so far, for quick reference when adding more:
- "<>(),"
- "ABCDEFGHIJLMNPRSTUVW"
- "abcdfhijklopqrstuvwxz"
-*/
-
-/* 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
-
-/* Masks used to mark instructions to indicate which MIPS ISA level
- they were introduced in. ISAs, as defined below, are logical
- ORs of these bits, indicatingthat they support the instructions
- defined at the given level. */
-
-#define INSN_ISA1 0x00000010
-#define INSN_ISA2 0x00000020
-#define INSN_ISA3 0x00000040
-#define INSN_ISA4 0x00000080
-#define INSN_ISA5 0x00000100
-#define INSN_ISA32 0x00000200
-#define INSN_ISA64 0x00000400
-
-/* Chip specific instructions. These are bitmasks. */
-
-/* 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
-/* 32-bit code running on a ISA3+ CPU. */
-#define INSN_GP32 0x00100000
-
-/* MIPS ISA defines, use instead of hardcoding ISA level. */
-
-#define ISA_UNKNOWN 0 /* Gas internal use. */
-#define ISA_MIPS1 (INSN_ISA1)
-#define ISA_MIPS2 (ISA_MIPS1 | INSN_ISA2)
-#define ISA_MIPS3 (ISA_MIPS2 | INSN_ISA3)
-#define ISA_MIPS4 (ISA_MIPS3 | INSN_ISA4)
-#define ISA_MIPS5 (ISA_MIPS4 | INSN_ISA5)
-#define ISA_MIPS32 (ISA_MIPS2 | INSN_ISA32)
-#define ISA_MIPS64 (ISA_MIPS5 | INSN_ISA32 | INSN_ISA64)
-
-/* 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_R2000 2000
-#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_R4300 4300
-#define CPU_R4400 4400
-#define CPU_R4600 4600
-#define CPU_R4650 4650
-#define CPU_R5000 5000
-#define CPU_R6000 6000
-#define CPU_R8000 8000
-#define CPU_R10000 10000
-#define CPU_MIPS16 16
-#define CPU_MIPS32 32
-#define CPU_MIPS32_4K 3204113 /* 32, 04, octal 'K'. */
-#define CPU_MIPS5 5
-#define CPU_MIPS64 64
-#define CPU_SB1 12310201 /* octal 'SB', 01. */
-
-/* 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 to test against; and CPU is the CPU specific ISA
- to test, or zero if no CPU specific ISA test is desired.
- The gp32 arg is set when you need to force 32-bit register usage on
- a machine with 64-bit registers; see the documentation under -mgp32
- in the MIPS gas docs. */
-
-#define OPCODE_IS_MEMBER(insn, isa, cpu, gp32) \
- ((((insn)->membership & isa) != 0 \
- && ((insn)->membership & INSN_GP32 ? gp32 : 1)) \
- || (cpu == CPU_R4650 && ((insn)->membership & INSN_4650) != 0) \
- || (cpu == CPU_R4010 && ((insn)->membership & INSN_4010) != 0) \
- || ((cpu == CPU_VR4100 || cpu == CPU_R4111) \
- && ((insn)->membership & INSN_4100) != 0) \
- || (cpu == CPU_R3900 && ((insn)->membership & INSN_3900) != 0))
-
-/* 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_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_DABS,
- M_DADD_I,
- M_DADDU_I,
- M_DDIV_3,
- M_DDIV_3I,
- M_DDIVU_3,
- M_DDIVU_3I,
- M_DIV_3,
- M_DIV_3I,
- M_DIVU_3,
- M_DIVU_3I,
- M_DLA_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_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_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_ROL,
- M_ROL_I,
- M_ROR,
- 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 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.
-
- "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)
- */
-
-/* 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/mn10200.h b/include/opcode/mn10200.h
deleted file mode 100644
index 42fa94b0c..000000000
--- 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 12f03670f..000000000
--- a/include/opcode/mn10300.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/* mn10300.h -- Header file for Matsushita 10300 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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
-
-/* 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
-
-/* Variants of the mn10300 which have additional opcodes. */
-#define MN103 300
-#define AM30 300
-
-#define AM33 330
-
-#endif /* MN10300_H */
diff --git a/include/opcode/np1.h b/include/opcode/np1.h
deleted file mode 100644
index d23adc756..000000000
--- a/include/opcode/np1.h
+++ /dev/null
@@ -1,422 +0,0 @@
-/* Print GOULD NPL instructions for GDB, the GNU debugger.
- Copyright (C) 1986, 1987, 1989 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 42bb8b87a..000000000
--- a/include/opcode/ns32k.h
+++ /dev/null
@@ -1,491 +0,0 @@
-/* ns32k-opcode.h -- Opcode table for National Semi 32k processor
- Copyright (C) 1987 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 {
- char *name;
- unsigned char opcode_id_size; /* not used by the assembler */
- unsigned char opcode_size;
- unsigned long opcode_seed;
- char *operands;
- unsigned char im_size; /* not used by dissassembler */
- 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!) */
- char *args; /* how to compile said opcode */
-};
-
-struct not /* ns32k opcode text */
-{
- 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 },
-};
-
-static const int numopcodes=sizeof(ns32k_opcodes)/sizeof(ns32k_opcodes[0]);
-
-static const struct ns32k_opcode *const endop = ns32k_opcodes+sizeof(ns32k_opcodes)/sizeof(ns32k_opcodes[0]);
-
-#define MAX_ARGS 4
-#define ARG_LEN 50
-
diff --git a/include/opcode/pj.h b/include/opcode/pj.h
deleted file mode 100644
index 8759b627e..000000000
--- a/include/opcode/pj.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Definitions for decoding the picoJava opcode table.
- Copyright (C) 1999 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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
-{
- short opcode;
- short opcode_next;
- char len;
- unsigned char arg[2];
- const char *name;
-} pj_opc_info_t;
diff --git a/include/opcode/pn.h b/include/opcode/pn.h
deleted file mode 100644
index 0f59a2a53..000000000
--- a/include/opcode/pn.h
+++ /dev/null
@@ -1,282 +0,0 @@
-/* Print GOULD PN (PowerNode) instructions for GDB, the GNU debugger.
- Copyright (C) 1986, 1987, 1989 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 246e3c776..000000000
--- a/include/opcode/ppc.h
+++ /dev/null
@@ -1,259 +0,0 @@
-/* ppc.h -- Header file for PowerPC opcode table
- Copyright 1994, 1995 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef PPC_H
-#define PPC_H
-
-/* 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. */
- 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 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 (01)
-
-/* Opcode is defined for the POWER (RS/6000) architecture. */
-#define PPC_OPCODE_POWER (02)
-
-/* Opcode is defined for the POWER2 (Rios 2) architecture. */
-#define PPC_OPCODE_POWER2 (04)
-
-/* Opcode is only defined on 32 bit architectures. */
-#define PPC_OPCODE_32 (010)
-
-/* Opcode is only defined on 64 bit architectures. */
-#define PPC_OPCODE_64 (020)
-
-/* 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 (040)
-
-/* Opcode is supported in both the Power and PowerPC architectures
- (ie, compiler's -mcpu=common or assembler's -mcom). */
-#define PPC_OPCODE_COMMON (0100)
-
-/* 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 (0200)
-
-/* Opcode is supported as part of the 64-bit bridge. */
-#define PPC_OPCODE_64_BRIDGE (0400)
-
-/* Opcode is supported by Altivec Vector Unit */
-#define PPC_OPCODE_ALTIVEC (01000)
-
-/* 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
-{
- /* 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) PARAMS ((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 & PPC_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) PARAMS ((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 powerpc_opcodes table. */
-
-extern const struct powerpc_operand powerpc_operands[];
-
-/* Values defined for the flags field of a struct powerpc_operand. */
-
-/* This operand takes signed values. */
-#define PPC_OPERAND_SIGNED (01)
-
-/* 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 (02)
-
-/* 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 (04)
-
-/* 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 (010)
-
-/* 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 (020)
-
-/* This operand names a register. The disassembler uses this to print
- register names with a leading 'r'. */
-#define PPC_OPERAND_GPR (040)
-
-/* This operand names a floating point register. The disassembler
- prints these with a leading 'f'. */
-#define PPC_OPERAND_FPR (0100)
-
-/* This operand is a relative branch displacement. The disassembler
- prints these symbolically if possible. */
-#define PPC_OPERAND_RELATIVE (0200)
-
-/* This operand is an absolute branch address. The disassembler
- prints these symbolically if possible. */
-#define PPC_OPERAND_ABSOLUTE (0400)
-
-/* This operand is optional, and is zero if omitted. This is used for
- the optional BF and L fields 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 (01000)
-
-/* 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 (02000)
-
-/* 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 (04000)
-
-/* This operand names a vector unit register. The disassembler
- prints these with a leading 'v'. */
-#define PPC_OPERAND_VR (010000)
-
-
-/* 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. */
- 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 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 06632b8d9..000000000
--- a/include/opcode/pyr.h
+++ /dev/null
@@ -1,287 +0,0 @@
-/* pyramid.opcode.h -- gdb initial attempt. */
-
-/* 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/sparc.h b/include/opcode/sparc.h
deleted file mode 100644
index 423cea7b4..000000000
--- a/include/opcode/sparc.h
+++ /dev/null
@@ -1,242 +0,0 @@
-/* Definitions for opcode table for the sparc.
- Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 2000
- 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, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, 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. */
-
-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;
-};
-
-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
- PARAMS ((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. */
-
-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. */
-};
-
-#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 PARAMS ((const char *));
-extern const char *sparc_decode_asi PARAMS ((int));
-extern int sparc_encode_membar PARAMS ((const char *));
-extern const char *sparc_decode_membar PARAMS ((int));
-extern int sparc_encode_prefetch PARAMS ((const char *));
-extern const char *sparc_decode_prefetch PARAMS ((int));
-extern int sparc_encode_sparclet_cpreg PARAMS ((const char *));
-extern const char *sparc_decode_sparclet_cpreg PARAMS ((int));
-
-/*
- * Local Variables:
- * fill-column: 131
- * comment-column: 0
- * End:
- */
-
-/* end of sparc.h */
diff --git a/include/opcode/tahoe.h b/include/opcode/tahoe.h
deleted file mode 100644
index b5cee249e..000000000
--- 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 a70027591..000000000
--- 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, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, 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/tic54x.h b/include/opcode/tic54x.h
deleted file mode 100644
index 09ee8c903..000000000
--- a/include/opcode/tic54x.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/* tic54x.h -- Header file for TI TMS320C54X opcode table
- Copyright 1999, 2000 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, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
-
-#ifndef _TIC54X_H_
-#define _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 */
-
- unsigned short opcode2, mask2; /* some insns have an extended opcode */
-
-} template;
-
-typedef struct _partemplate {
- char *name;
- char *parname;
- unsigned int words; /* length in words */
- int minops, maxops; /* min/max operand count for 2nd part of insn */
- unsigned short opcode;
- unsigned short mask;
- enum optype operand_types[MAX_OPERANDS];
- enum optype paroperand_types[MAX_OPERANDS];
-} partemplate;
-
-extern const template tic54x_unknown_opcode;
-extern const template tic54x_optab[];
-extern const partemplate 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[];
-
-#endif /* TIC54X_H */
diff --git a/include/opcode/tic80.h b/include/opcode/tic80.h
deleted file mode 100644
index b99bc30b8..000000000
--- a/include/opcode/tic80.h
+++ /dev/null
@@ -1,277 +0,0 @@
-/* tic80.h -- Header file for TI TMS320C80 (MV) opcode table
- Copyright 1996, 1997, 1999 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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) PARAMS ((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) PARAMS ((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)
-
-extern const struct predefined_symbol tic80_predefined_symbols[]; /* Translation array */
-extern const int tic80_num_predefined_symbols; /* How many members in the array */
-
-const char *tic80_value_to_symbol PARAMS ((int val, int class)); /* Translate value to symbolic name */
-int tic80_symbol_to_value PARAMS ((char *name, int class)); /* Translate symbolic name to value */
-
-const struct predefined_symbol *
-tic80_next_predefined_symbol PARAMS ((const struct predefined_symbol *));
-
-#endif /* TIC80_H */
diff --git a/include/opcode/v850.h b/include/opcode/v850.h
deleted file mode 100644
index 88916f1b8..000000000
--- a/include/opcode/v850.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/* v850.h -- Header file for NEC V850 opcode table
- Copyright 1996 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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. */
-
-/* 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) PARAMS ((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) PARAMS ((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
-
-/* CYGNUS LOCAL v850e */
-/* 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 f3afebde7..000000000
--- a/include/opcode/vax.h
+++ /dev/null
@@ -1,382 +0,0 @@
-/* Vax opcde list.
- Copyright (C) 1989, 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 df818865c..000000000
--- a/include/os9k.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/* os9k.h - OS-9000 i386 module header definitions
- Copyright (C) 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, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, 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 f49d67a8c..000000000
--- a/include/partition.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* List implentation of a partition of consecutive integers.
- Copyright (C) 2000 Free Software Foundation, Inc.
- Contributed by CodeSourcery, LLC.
-
- 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, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, 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 PARAMS((int));
-extern void partition_delete PARAMS((partition));
-extern int partition_union PARAMS((partition,
- int,
- int));
-extern void partition_print PARAMS((partition,
- FILE*));
-
-/* Returns the canonical element corresponding to the class containing
- ELEMENT__ in PARTITION__. */
-
-#define partition_find(partition__, element__) \
- ((partition__)->elements[(element__)].class_element)
-
-#endif /* _PARTITION_H */
diff --git a/include/progress.h b/include/progress.h
deleted file mode 100644
index f18318a45..000000000
--- a/include/progress.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Default definitions for progress macros.
- Copyright (C) 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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/regs/ChangeLog b/include/regs/ChangeLog
deleted file mode 100644
index e69de29bb..000000000
--- a/include/regs/ChangeLog
+++ /dev/null
diff --git a/include/remote-sim.h b/include/remote-sim.h
deleted file mode 100644
index b32f93fdd..000000000
--- a/include/remote-sim.h
+++ /dev/null
@@ -1,353 +0,0 @@
-/* This file defines the interface between the simulator and gdb.
- Copyright (C) 1993, 1994, 1996, 1997 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#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_UNKNOWN_BREAKPOINT = 2,
- SIM_RC_INSUFFICIENT_RESOURCES = 3,
- SIM_RC_DUPLICATE_BREAKPOINT = 4
-} 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));
-
-/* Call these functions to set and clear breakpoints at ADDR. */
-
-SIM_RC sim_set_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_clear_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_clear_all_breakpoints PARAMS ((SIM_DESC sd));
-
-/* These functions are used to enable and disable breakpoints. */
-
-SIM_RC sim_enable_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_disable_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_enable_all_breakpoints PARAMS ((SIM_DESC sd));
-SIM_RC sim_disable_all_breakpoints PARAMS ((SIM_DESC sd));
-
-
-/* Provide simulator with a default (global) host_callback_struct.
- THIS PROCEDURE IS DEPRECIATED.
- GDB and NRUN do not use this interface.
- This procedure does not take a SIM_DESC argument as it is
- used before sim_open. */
-
-void sim_set_callbacks PARAMS ((struct host_callback_struct *));
-
-
-/* Set the size of the simulator memory array.
- THIS PROCEDURE IS DEPRECIATED.
- GDB and NRUN do not use this interface.
- This procedure does not take a SIM_DESC argument as it is
- used before sim_open. */
-
-void sim_size PARAMS ((int i));
-
-
-/* Single-step simulator with tracing enabled.
- THIS PROCEDURE IS DEPRECIATED.
- THIS PROCEDURE IS EVEN MORE DEPRECATED THAN SIM_SET_TRACE
- GDB and NRUN do not use this interface.
- This procedure returns: ``0'' indicating that the simulator should
- be continued using sim_trace() calls; ``1'' indicating that the
- simulation has finished. */
-
-int sim_trace PARAMS ((SIM_DESC sd));
-
-
-/* Enable tracing.
- THIS PROCEDURE IS DEPRECIATED.
- GDB and NRUN do not use this interface.
- This procedure returns: ``0'' indicating that the simulator should
- be continued using sim_trace() calls; ``1'' indicating that the
- simulation has finished. */
-
-void sim_set_trace PARAMS ((void));
-
-
-/* Configure the size of the profile buffer.
- THIS PROCEDURE IS DEPRECIATED.
- GDB and NRUN do not use this interface.
- This procedure does not take a SIM_DESC argument as it is
- used before sim_open. */
-
-void sim_set_profile_size PARAMS ((int n));
-
-
-/* Kill the running program.
- THIS PROCEDURE IS DEPRECIATED.
- GDB and NRUN do not use this interface.
- This procedure will be replaced as part of the introduction of
- multi-cpu simulators. */
-
-void sim_kill PARAMS ((SIM_DESC sd));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !defined (REMOTE_SIM_H) */
diff --git a/include/safe-ctype.h b/include/safe-ctype.h
deleted file mode 100644
index 977653c75..000000000
--- a/include/safe-ctype.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* <ctype.h> replacement macros.
-
- Copyright (C) 2000 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., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, 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
-
-#ifdef isalpha
- #error "safe-ctype.h and ctype.h may not be used simultaneously"
-#else
-
-/* 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 */
-};
-
-/* This code fundamentally assumes that a byte is 8 bits. Test this
- at compile time. */
-
-extern int a_byte_isnt_eight_bits[(unsigned char)256 == 0 ? 1 : -1];
-
-/* Character classification. */
-extern const unsigned short _sch_istable[256];
-
-#define _sch_test(c, bit) (_sch_istable[(int)(unsigned char)(c)] & (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_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[(int)(unsigned char)(c)]
-#define TOLOWER(c) _sch_tolower[(int)(unsigned char)(c)]
-
-#endif /* no ctype.h */
-#endif /* SAFE_CTYPE_H */
diff --git a/include/sim-d10v.h b/include/sim-d10v.h
deleted file mode 100644
index 84eab2a1a..000000000
--- a/include/sim-d10v.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* This file defines the interface between the d10v simulator and gdb.
- Copyright (C) 1999 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#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,
- unsigned long (*dmap_register) (int reg_nr));
-
-extern unsigned long sim_d10v_translate_imap_addr
- (unsigned long offset,
- int nr_bytes,
- unsigned long *phys,
- unsigned long (*imap_register) (int reg_nr));
-
-extern unsigned long sim_d10v_translate_addr
- (unsigned long vaddr,
- int nr_bytes,
- unsigned long *phys,
- unsigned long (*dmap_register) (int reg_nr),
- unsigned long (*imap_register) (int reg_nr));
-
-
-/* The simulator makes use of the following register information. */
-
-enum
- {
- SIM_D10V_R0_REGNUM = 0,
- SIM_D10V_CR0_REGNUM = 16,
- SIM_D10V_A0_REGNUM = 32,
- SIM_D10V_SPI_REGNUM = 34,
- SIM_D10V_SPU_REGNUM = 35,
- SIM_D10V_IMAP0_REGNUM = 36,
- SIM_D10V_DMAP0_REGNUM = 38,
- SIM_D10V_TS2_DMAP_REGNUM = 40
- };
-
-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/sort.h b/include/sort.h
deleted file mode 100644
index c8e1d5547..000000000
--- a/include/sort.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Sorting algorithms.
- Copyright (C) 2000 Free Software Foundation, Inc.
- Contributed by Mark Mitchell <mark@codesourcery.com>.
-
-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, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, 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 PARAMS ((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 f53f85576..000000000
--- a/include/splay-tree.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* A splay-tree datatype.
- Copyright (C) 1998, 2000 Free Software Foundation, Inc.
- Contributed by Mark Mitchell (mark@markmitchell.com).
-
-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, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, 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>
-
-/* 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 unsigned long int splay_tree_key;
-typedef unsigned long int 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) PARAMS((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) PARAMS((splay_tree_key));
-
-/* The type of a function used to deallocate any resources associated
- with the value. */
-typedef void (*splay_tree_delete_value_fn) PARAMS((splay_tree_value));
-
-/* The type of a function used to iterate over the tree. */
-typedef int (*splay_tree_foreach_fn) PARAMS((splay_tree_node, void*));
-
-/* The nodes in the splay tree. */
-struct splay_tree_node_s
-{
- /* The key. */
- splay_tree_key key;
-
- /* The value. */
- splay_tree_value value;
-
- /* The left and right children, respectively. */
- splay_tree_node left;
- splay_tree_node right;
-};
-
-/* The splay tree itself. */
-typedef struct splay_tree_s
-{
- /* The root of the tree. */
- splay_tree_node 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;
-} *splay_tree;
-
-extern splay_tree splay_tree_new PARAMS((splay_tree_compare_fn,
- splay_tree_delete_key_fn,
- splay_tree_delete_value_fn));
-extern void splay_tree_delete PARAMS((splay_tree));
-extern splay_tree_node splay_tree_insert
- PARAMS((splay_tree,
- splay_tree_key,
- splay_tree_value));
-extern void splay_tree_remove PARAMS((splay_tree,
- splay_tree_key));
-extern splay_tree_node splay_tree_lookup
- PARAMS((splay_tree,
- splay_tree_key));
-extern splay_tree_node splay_tree_predecessor
- PARAMS((splay_tree,
- splay_tree_key));
-extern splay_tree_node splay_tree_successor
- PARAMS((splay_tree,
- splay_tree_key));
-extern int splay_tree_foreach PARAMS((splay_tree,
- splay_tree_foreach_fn,
- void*));
-extern int splay_tree_compare_ints PARAMS((splay_tree_key,
- splay_tree_key));
-extern int splay_tree_compare_pointers PARAMS((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 61ce1e9b3..000000000
--- 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.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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/winsup/CYGWIN_LICENSE b/winsup/CYGWIN_LICENSE
deleted file mode 100644
index f10b01f56..000000000
--- a/winsup/CYGWIN_LICENSE
+++ /dev/null
@@ -1,46 +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, Cygnus 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/osd.html for the precise Open Source
-Definition referenced above.
-
-If you have questions about any of the above or would like to arrange
-for other licensing terms, please contact Cygnus using the information
-given below:
-
- Cygnus Solutions
- 1325 Chesapeake Terrace
- Sunnyvale, CA 94089
- USA
-
- +1 408 542 9600
- hotline: +1 408 542 9601
- email: info@cygnus.com
- fax: +1 408 542 9699
diff --git a/winsup/ChangeLog b/winsup/ChangeLog
deleted file mode 100644
index 6dabc9d99..000000000
--- a/winsup/ChangeLog
+++ /dev/null
@@ -1,138 +0,0 @@
-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/MAINTAINERS b/winsup/MAINTAINERS
deleted file mode 100644
index be58c5e9c..000000000
--- a/winsup/MAINTAINERS
+++ /dev/null
@@ -1,28 +0,0 @@
-The following people are responsible for maintaining various pieces of
-the winsup directory. Their approval is required before committing any
-changes to the repository.
-
-Makefile.* Chris Faylor <cgf@cygnus.com>
-configure.* Chris Faylor <cgf@cygnus.com>
-MAINTAINERS Chris Faylor <cgf@cygnus.com>
-cygwin/security.cc and
-ntsec stuff Corinna Vinschen <vinschen@cygnus.com>
-cygwin/fhandler_raw.cc Corinna Vinschen <vinschen@cygnus.com>
-cygwin/fhandler_floppy.cc Corinna Vinschen <vinschen@cygnus.com>
-cygwin/fhandler_tape.cc Corinna Vinschen <vinschen@cygnus.com>
-utils/getfacl.c Corinna Vinschen <vinschen@cygnus.com>
-utils/mkgroup.c Corinna Vinschen <vinschen@cygnus.com>
-utils/mkpasswd.c Corinna Vinschen <vinschen@cygnus.com>
-utils/passwd.c Corinna Vinschen <vinschen@cygnus.com>
-utils/setfacl.c Corinna Vinschen <vinschen@cygnus.com>
-mingw/* Mumit Khan <xraylith.wisc.edu>
-w32api/* Mumit Khan <xraylith.wisc.edu>
-cinstall/* DJ Delorie <dj@cygnus.com>
-cygwin/{everything else} Chris Faylor <cgf@cygnus.com>,
- DJ Delorie <dj@cygnus.com>
- Corinna Vinschen <vinschen@cygnus.com>
-doc/*.texinfo David Starks-Browning <starksb@ebi.ac.uk>
-doc/{everything else} DJ Delorie <dj@cygnus.com>
-utils/* Chris Faylor <cgf@cygnus.com>,
- DJ Delorie <dj@cygnus.com>
- Corinna Vinschen <vinschen@cygnus.com>
diff --git a/winsup/Makefile.common b/winsup/Makefile.common
deleted file mode 100644
index f11a4e398..000000000
--- a/winsup/Makefile.common
+++ /dev/null
@@ -1,147 +0,0 @@
-# Makefile.common - common definitions for the winsup directory
-#
-# 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.
-
-# This makefile requires GNU make.
-
-CFLAGS_COMMON:=-Wall -Wwrite-strings # -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}
-here:=${word 1,${subst winsup/,winsup ,$(pwd)}}/cygwin
-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
-
-w32api_source:=$(updir)/w32api
-w32api_build:=$(bupdir)/w32api
-w32api_include:=$(w32api_source)/include
-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
-
-INCLUDES:=-I. -I$(cygwin_source)/include -I$(cygwin_source) -I$(newlib_source)/libc/sys/cygwin -I$(newlib_source)/libc/include -I$(w32api_include)
-ifdef CONFIG_DIR
-INCLUDES+=-I$(CONFIG_DIR)
-endif
-
-MINGW_INCLUDES:=-I$(updir)/mingw/include $(INCLUDES)
-
-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:=$(newlib_build)/libc/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
-o=.E
-endif
-
-libgcc:=${subst \,/,${shell $(CC_FOR_TARGET) -print-libgcc-file-name}}
-GCC_INCLUDE:=${word 1,${dir $(libgcc)}}/include
-
-COMPILE_CXX:=$(CXX) $c -nostdinc++ $(ALL_CXXFLAGS) -I$(GCC_INCLUDE) \
- -fno-rtti -fno-exceptions
-COMPILE_CC:=$(CC) $c -nostdinc $(ALL_CFLAGS) -I$(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)
-
-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 2bc1c419c..000000000
--- a/winsup/Makefile.in
+++ /dev/null
@@ -1,86 +0,0 @@
-# Makefile.in for windows stuff
-# Copyright 1995, 1996, 1997, 1998, 1999, 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.
-
-# 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@
-
-SUBDIRS=@SUBDIRS@
-INSTALL_SUBDIRS=${patsubst %,install_%,$(SUBDIRS)}
-CLEAN_SUBDIRS=${patsubst %,clean_%,$(SUBDIRS)}
-
-.PHONY: all install clean all-info info install-info 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: Makefile $(INSTALL_SUBDIRS)
-
-clean: $(CLEAN_SUBDIRS)
-
-all-info:
-
-install-info:
-
-info:
-
-$(SUBDIRS):
- @$(MAKE) -C $@ all
-
-$(INSTALL_SUBDIRS):
- @$(MAKE) -C ${patsubst install_%,%,$@} install
-
-$(CLEAN_SUBDIRS):
- @$(MAKE) -C ${patsubst clean_%,%,$@} clean
-
-.PRECIOUS: Makefile
-
-Makefile: Makefile.in $(srcdir)/configure.in config.status
- $(SHELL) config.status
-
-config.status: configure
- $(SHELL) config.status --recheck
-
-check:
- @$(MAKE) -C testsuite check
diff --git a/winsup/configure b/winsup/configure
deleted file mode 100755
index 29f08d15d..000000000
--- a/winsup/configure
+++ /dev/null
@@ -1,1333 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-sitefile=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --site-file=FILE use FILE as the site file
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=Makefile.in
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
- fi
-else
- CONFIG_SITE="$sitefile"
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-
-
-
-
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:589: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:610: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:628: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:660: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_CC"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:692: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="gcc"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- CC="gcc"
-fi
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:728: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:777: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:801: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-# Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
-set dummy ${ac_tool_prefix}g++; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:831: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CXX="${ac_tool_prefix}g++"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CXX="$ac_cv_prog_CXX"
-if test -n "$CXX"; then
- echo "$ac_t""$CXX" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_CXX"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "g++", so it can be a program name with args.
-set dummy g++; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:863: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CXX="g++"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_CXX" && ac_cv_prog_CXX="g++"
-fi
-fi
-CXX="$ac_cv_prog_CXX"
-if test -n "$CXX"; then
- echo "$ac_t""$CXX" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- CXX="g++"
-fi
-fi
-
-if test -z "$CXX"; then
- # Extract the first word of "c++", so it can be a program name with args.
-set dummy c++; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:899: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CXX="c++"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CXX="$ac_cv_prog_CXX"
-if test -n "$CXX"; then
- echo "$ac_t""$CXX" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-CXXFLAGS="$(CFLAGS)"
-
-
-SUBDIRS='w32api cygwin mingw'
-case "$with_cross_host" in
- ""|*cygwin*)
- test -d $srcdir/cinstall && SUBDIRS="$SUBDIRS cinstall"
- SUBDIRS="$SUBDIRS utils doc testsuite"
- ;;
-esac
-
-subdirs="$SUBDIRS"
-
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:943: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@CC@%$CC%g
-s%@CXX@%$CXX%g
-s%@subdirs@%$subdirs%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@SUBDIRS@%$SUBDIRS%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-if test "$no_recursion" != yes; then
-
- # Remove --cache-file and --srcdir arguments so they do not pile up.
- ac_sub_configure_args=
- ac_prev=
- for ac_arg in $ac_configure_args; 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=*)
- ;;
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- ;;
- *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
- esac
- done
-
- for ac_config_dir in $SUBDIRS; do
-
- # Do not complain, so a configure script can configure whichever
- # parts of a large source tree are present.
- if test ! -d $srcdir/$ac_config_dir; then
- continue
- fi
-
- echo configuring in $ac_config_dir
-
- case "$srcdir" in
- .) ;;
- *)
- if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
- else
- { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
- fi
- ;;
- esac
-
- ac_popdir=`pwd`
- cd $ac_config_dir
-
- # A "../" for each directory in /$ac_config_dir.
- ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
- case "$srcdir" in
- .) # No --srcdir option. We are building in place.
- ac_sub_srcdir=$srcdir ;;
- /*) # Absolute path.
- ac_sub_srcdir=$srcdir/$ac_config_dir ;;
- *) # Relative path.
- ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
- esac
-
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_sub_srcdir/configure; then
- ac_sub_configure=$ac_sub_srcdir/configure
- elif test -f $ac_sub_srcdir/configure.in; then
- ac_sub_configure=$ac_configure
- else
- echo "configure: warning: no configuration information is in $ac_config_dir" 1>&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 path.
- ac_sub_cache_file="$ac_dots$cache_file" ;;
- esac
-
- echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
- # The eval makes quoting arguments work.
- if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
- then :
- else
- { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
- fi
- fi
-
- cd $ac_popdir
- done
-fi
-
diff --git a/winsup/configure.in b/winsup/configure.in
deleted file mode 100755
index 2ab6fb153..000000000
--- a/winsup/configure.in
+++ /dev/null
@@ -1,82 +0,0 @@
-dnl Autoconf configure script for Cygwin.
-dnl Copyright 1996, 1997, 1998, 1999, 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.12)dnl
-AC_INIT(Makefile.in)
-
-dnl FIXME: We temporarily define our own version of AC_PROG_CC. This is
-dnl copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-dnl are probably using a cross compiler, which will not be able to fully
-dnl link an executable. This should really be fixed in autoconf
-dnl itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-AC_DEFUN(LIB_AC_PROG_CXX,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CXX, g++, g++)
-if test -z "$CXX"; then
- AC_CHECK_PROG(CXX, c++, c++, , , )
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-CXXFLAGS='$(CFLAGS)'
-])
-
-AC_CANONICAL_SYSTEM
-
-LIB_AC_PROG_CC
-LIB_AC_PROG_CXX
-
-SUBDIRS='w32api cygwin mingw'
-case "$with_cross_host" in
- ""|*cygwin*)
- test -d $srcdir/cinstall && SUBDIRS="$SUBDIRS cinstall"
- SUBDIRS="$SUBDIRS utils doc testsuite"
- ;;
-esac
-
-AC_CONFIG_SUBDIRS($SUBDIRS)
-
-AC_PROG_MAKE_SET
-
-AC_SUBST(SUBDIRS)
-AC_OUTPUT(Makefile)
diff --git a/winsup/cygwin/CYGWIN_LICENSE b/winsup/cygwin/CYGWIN_LICENSE
deleted file mode 100644
index f10b01f56..000000000
--- a/winsup/cygwin/CYGWIN_LICENSE
+++ /dev/null
@@ -1,46 +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, Cygnus 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/osd.html for the precise Open Source
-Definition referenced above.
-
-If you have questions about any of the above or would like to arrange
-for other licensing terms, please contact Cygnus using the information
-given below:
-
- Cygnus Solutions
- 1325 Chesapeake Terrace
- Sunnyvale, CA 94089
- USA
-
- +1 408 542 9600
- hotline: +1 408 542 9601
- email: info@cygnus.com
- fax: +1 408 542 9699
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
deleted file mode 100644
index d28486f33..000000000
--- a/winsup/cygwin/ChangeLog
+++ /dev/null
@@ -1,4066 +0,0 @@
-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 accomodate
- 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): Accomodate 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 accomodate 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 accomodate 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. Accomodate new argument to cygheap_fixup_in child.
- * fork.cc (fork): Accomodate 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 accomodate 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): Accomodate 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. Accomodate 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: Accomodate 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: Accomodate 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: Accomodate 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): Accomodate set_myself argument change.
- (__api_fatal): Accomodate _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): Accomodate 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 accomodate 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. Accomodate 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: Accomodate 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 accomodate 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: Accomodate 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: Accomodate 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 accomodate 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
- accomodate 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): Accomodate 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-1995 b/winsup/cygwin/ChangeLog-1995
deleted file mode 100644
index 462a61336..000000000
--- 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 b0c88d97b..000000000
--- 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 7a5c0b3a4..000000000
--- 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 e22a158ed..000000000
--- 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. Accomodates
- 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: Accomodate 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): Accomodate 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 accomodate "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 accomodate 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): Accomodate 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 49d6fe468..000000000
--- 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): Accomodate 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 accomodates
- older and newer versions.
- * winver.c: Reorganize slightly to accomodate 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): Accomodate 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): Accomodate 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 accomodate 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): Accomodate 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 accomodate 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 : Accomodate additional argument to _spawnve, throughout.
- (_spawnve): Make this a global function and take an hToken argument so
- that it can be used by sexecve. Accomodate 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): Accomodate 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: Accomodate 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): Accomodate 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. Accomodate 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 accomodate 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 accomodate 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 accomodate 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): Accomodate 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):
- Accomodate 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): Accomodate 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: Accomodate 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/Makefile.in b/winsup/cygwin/Makefile.in
deleted file mode 100644
index 37f4c9623..000000000
--- a/winsup/cygwin/Makefile.in
+++ /dev/null
@@ -1,224 +0,0 @@
-# Makefile.in for Cygwin.
-# Copyright 1995, 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-#
-# This file is part of Cygwin.
-#
-# This software is a copyrighted work licensed under the terms of the
-# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-# details.
-
-# This makefile requires GNU make.
-
-SHELL:=@SHELL@
-srcdir:=@srcdir@
-objdir:=.
-
-CONFIG_DIR:=$(srcdir)/config/@CONFIG_DIR@
-VPATH:=$(srcdir):$(CONFIG_DIR):$(srcdir)/regexp:$(srcdir)/lib
-
-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@
-
-#
-# --enable options from configure
-#
-MT_SAFE = @MT_SAFE@
-DEFS = @DEFS@
-
-CC:=@CC@
-# FIXME: Which is it, CC or CC_FOR_TARGET?
-CC_FOR_TARGET:=$(CC)
-CFLAGS:=@CFLAGS@
-CFLAGS+=-MD -fbuiltin
-CXX:=@CXX@
-CXXFLAGS:=@CXXFLAGS@
-
-# For linking mount, etc. crt0.o isn't accessable in a fresh build.
-EXE_LDFLAGS:=@EXE_LDFLAGS@
-
-AR:=@AR@
-AR_FLAGS:=qv
-RANLIB:=@RANLIB@
-LD:=@LD@
-DLLTOOL:=@DLLTOOL@
-WINDRES:=@WINDRES@
-AS:=@AS@
-
-#
-# Include common definitions for winsup directory
-#
-include $(srcdir)/../Makefile.common
-
-INSTALL_DATA:=$(SHELL) $(updir1)/install-sh -c
-
-@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 new-cygwin.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
-LIB_NAME:=libcygwin.a
-DEF_FILE:=cygwin.def
-DLL_ENTRY:=@DLL_ENTRY@
-
-LIBGMON_A:=libgmon.a
-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=$(bupdir1)/libiberty/random.o $(bupdir1)/libiberty/strsignal.o
-
-DLL_IMPORTS:=$(w32api_lib)/libkernel32.a
-
-DLL_OFILES:=assert.o autoload.o cygheap.o dcrt0.o debug.o delqueue.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_floppy.o fhandler_mem.o fhandler_random.o fhandler_raw.o \
- fhandler_serial.o fhandler_socket.o fhandler_tape.o \
- fhandler_termios.o fhandler_tty.o fhandler_windows.o fhandler_zero.o \
- fork.o glob.o grp.o heap.o init.o ioctl.o localtime.o malloc.o \
- miscfuncs.o mmap.o \
- net.o ntea.o passwd.o path.o pinfo.o pipe.o poll.o pthread.o regexp.o \
- regerror.o regsub.o registry.o resource.o scandir.o security.o select.o \
- shared.o signal.o sigproc.o smallprint.o spawn.o strace.o strsep.o \
- sync.o syscalls.o sysconf.o syslog.o termios.o thread.o times.o tty.o \
- uinfo.o uname.o wait.o window.o \
- $(EXTRA_DLL_OFILES) $(EXTRA_OFILES) $(MT_SAFE_OBJECTS)
-
-GMON_OFILES:= gmon.o mcount.o profil.o
-
-.PHONY: all force dll_ofiles install all_target install_target all_host install_host
-
-.SUFFIXES:
-.SUFFIXES: .c .cc .def .a .o .d
-
-all_host=@all_host@
-install_host=@install_host@
-
-all: new-$(DLL_NAME) $(all_host) all_target
-
-all_target: $(LIBGMON_A) $(LIB_NAME) automode.o binmode.o textmode.o
-
-all_host: new-$(LIB_NAME) cygrun.exe
-
-force:
-
-install: all $(install_host) $(install_target)
- $(INSTALL_DATA) new-$(DLL_NAME) $(bindir)/$(DLL_NAME); \
- for i in $(LIB_NAME) $(GMON_START) $(LIBGMON_A) automode.o binmode.o textmode.o ; do \
- $(INSTALL_DATA) $$i $(tooldir)/lib/$$i ; \
- done ; \
- cd $(srcdir); \
- for sub in `find include -name '[a-z]*' -type d -print | sort`; do \
- for i in $$sub/*.h ; do \
- $(INSTALL_DATA) $$i $(tooldir)/$$sub/`basename $$i` ; \
- done ; \
- done ; \
- $(INSTALL_DATA) regexp/regexp.h $(tooldir)/include/regexp.h
-
-install_host:
-
-clean:
- -rm -f *.o *.dll *.a *.exp junk *.base version.cc regexp/*.o winver_stamp *.exe *.d
-
-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 libcygwin.a
-
-$(LIB_NAME): $(DEF_FILE) $(LIBCOS)
- $(DLLTOOL) --as=$(AS) --dllname $(DLL_NAME) --def $(DEF_FILE) --output-lib templib.a
- $(AR) rcv templib.a $(LIBCOS)
- mv templib.a $(LIB_NAME)
-
-# Rule to make stub library used by testsuite
-
-# dependency set to $(LIB_NAME) to accomodate make -j2.
-# Otherwise dlltool gets confused. cgf (11-16-2000)
-new-$(LIB_NAME): $(LIB_NAME)
- $(DLLTOOL) --as=$(AS) --dllname new-$(DLL_NAME) --def $(DEF_FILE) --output-lib new-templib.a
- $(AR) rcv new-templib.a $(LIBCOS)
- mv new-templib.a new-$(LIB_NAME)
-
-# Rule to build cygwin.dll
-
-new-$(DLL_NAME): $(DLL_OFILES) $(DEF_FILE) $(DLL_IMPORTS) $(LIBC) $(LIBM) Makefile winver_stamp
- $(CXX) $(CXXFLAGS) -nostdlib -Wl,-shared -o $@ -e $(DLL_ENTRY) $(DEF_FILE) $(DLL_OFILES) version.o \
- winver.o $(DLL_IMPORTS) $(MALLOC_OBJ) $(LIBM) $(LIBC) -lgcc -lstdc++
-
-dll_ofiles: $(DLL_OFILES)
-
-$(LIBGMON_A): $(GMON_OFILES) $(GMON_START)
- $(AR) rcv $(LIBGMON_A) $(GMON_OFILES)
-
-version.cc winver.o: winver_stamp
- @ :
-
-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) && \
- touch $@ && \
- $(COMPILE_CXX) -o version.o version.cc
-
-cygrun.exe : cygrun.o $(LIB_NAME) $(w32api_lib)/libuser32.a \
- $(w32api_lib)/libshell32.a $(w32api_lib)/libkernel32.a
- $(CC) -nodefaultlibs -o $@ $^
-
-#
-
-Makefile: cygwin.din
-
-$(DEF_FILE): cygwin.din config.status
- $(SHELL) config.status
-
-winsup.h: config.h
-
-ifneq (,${wildcard *.d})
-include *.d
-endif
diff --git a/winsup/cygwin/ROADMAP b/winsup/cygwin/ROADMAP
deleted file mode 100644
index fd0387d59..000000000
--- 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 c187c0be3..000000000
--- a/winsup/cygwin/acconfig.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Define if DEBUGGING support is requested. */
-#undef DEBUGGING
-
-/* Define if building "extra" thread-safe Cygwin DLL. */
-#undef _CYG_THREAD_FAILSAFE
-
-/* Define if GCC supports builtin memset. */
-#undef HAVE_BUILTIN_MEMSET
-
-/* Define if building thread-safe Cygwin DLL. */
-#undef _MT_SAFE
-
-/* Define if using new vfork functionality. */
-#undef NEWVFORK
diff --git a/winsup/cygwin/ansi.sgml b/winsup/cygwin/ansi.sgml
deleted file mode 100644
index d6a41ab31..000000000
--- a/winsup/cygwin/ansi.sgml
+++ /dev/null
@@ -1,59 +0,0 @@
-<sect1 id="std-ansi">
-<title>Compatibility with ANSI</title>
-
-<para>The following functions are compatible with ANSI:</para>
-
-<sect2><title>stdio</title><para>
-
-clearerr, fclose, feof, ferror, fflush, fgetc, fgetpos, fgets, fopen,
-fprintf, fputc, fputs, fread, freopen, fscanf, fseek, fsetpos, ftell,
-fwrite, getc, getchar, gets, perror, printf, putc, putchar, puts,
-remove, rename, rewind, scanf, setbuf, setvbuf, sprintf, sscanf,
-tmpfile, tmpnam, vfprintf, ungetc, vprintf, vsprintf,
-
-</para></sect2>
-<sect2><title>string</title><para>
-
-memchr, memcmp, memcpy, memmove, memset, strcat, strchr, strcmp,
-strcoll, strcpy, strcspn, strerror, strlen, strncat, strncmp, strncpy,
-strpbrk, strrchr, strspn, strstr, strtok, strxfrm
-
-</para></sect2>
-<sect2><title>stdlib</title><para>
-
-abort, abs, assert, atexit, atof, atoi, atol, bsearch, calloc, div,
-exit, free, getenv, labs, ldiv, longjmp, malloc, mblen, mbstowcs,
-mbtowc, qsort, rand, realloc, setjmp, srand, strtod, strtol, strtoul,
-system, wcstombs, wctomb
-
-</para></sect2>
-<sect2><title>time</title><para>
-
-asctime, gmtime, localtime, time, clock, ctime, difftime, mktime,
-strftime
-
-</para></sect2>
-<sect2><title>signals</title><para>
-
-raise, signal
-
-</para></sect2>
-<sect2><title>ctype</title><para>
-
-isalnum, isalpha, iscntrl, isdigit, isgraph, islower, isprint,
-ispunct, isspace, isupper, isxdigit, tolower, toupper
-
-</para></sect2>
-<sect2><title>math</title><para>
-
-acos, asin, atan, atan2, ceil, cos, cosh, exp, fabs, floor, fmod,
-frexp, ldexp, log, log10, modf, pow, sin, sinh, sqrt, tan, tanh
-
-</para></sect2>
-<sect2><title>misc</title><para>
-
-localeconv, setlocale, va_arg, va_end, va_start
-
-</para></sect2>
-
-</sect1> \ No newline at end of file
diff --git a/winsup/cygwin/assert.cc b/winsup/cygwin/assert.cc
deleted file mode 100644
index 68a5934ee..000000000
--- a/winsup/cygwin/assert.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-/* assert.cc: Handle the assert macro for WIN32.
-
- Copyright 1997, 1998, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "security.h"
-#include <wingdi.h>
-#include <winuser.h>
-
-#include <assert.h>
-#include <stdlib.h>
-#include <stdio.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)
-{
- HANDLE h;
-
- /* If we don't have a console in a Windows program, then bring up a
- message box for the assertion failure. */
-
- h = CreateFileA ("CONOUT$", GENERIC_WRITE, FILE_SHARE_WRITE, &sec_none_nih,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- if (h == INVALID_HANDLE_VALUE || h == 0)
- {
- char *buf;
-
- buf = (char *) alloca (100 + strlen (failedexpr));
- __small_sprintf (buf, "Failed assertion\n\t%s\nat line %d of file %s",
- failedexpr, line, file);
- MessageBox (NULL, buf, NULL, MB_OK | MB_ICONERROR | MB_TASKMODAL);
- }
- else
- {
- CloseHandle (h);
- small_printf ("assertion \"%s\" failed: file \"%s\", line %d\n",
- failedexpr, file, line);
- }
-
- abort (); // FIXME: Someday this should work.
-
- /* NOTREACHED */
-}
diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc
deleted file mode 100644
index 77c37249e..000000000
--- a/winsup/cygwin/autoload.cc
+++ /dev/null
@@ -1,317 +0,0 @@
-/* autoload.cc: all dynamic load stuff.
-
- Copyright 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "autoload.h"
-
-extern "C" {
-
-/* This struct is unused, but it illustrates the layout of a DLL
- information block. */
-struct DLLinfo
-{
- char jmpinst[4];
- HANDLE h;
- DWORD flag;
- char name[0];
-};
-
-/* FIXME: This is not thread-safe! */
-__asm__ ("
-msg1:
- .ascii \"couldn't dynamically determine load address for '%s' (handle %p), %E\\0\"
-
- .align 32
-noload:
- popl %edx # Get the address of the information block
- movl 8(%edx),%eax # Should we 'ignore' the lack
- test $1,%eax # of this function?
- jz 1f # Nope.
- decl %eax # Yes. This is the # of bytes + 1
- popl %edx # Caller's caller
- addl %eax,%esp # Pop off bytes
- xor %eax,%eax # Zero functional return
- jmp *%edx # Return
-1:
- movl 4(%edx),%eax # Handle value
- pushl (%eax)
- leal 12(%edx),%eax # Location of name of function
- push %eax
- push $msg1 # The message
- call ___api_fatal # Print message. Never returns
-
- .globl cygwin_dll_func_load
-cygwin_dll_func_load:
- movl (%esp),%eax # 'Return address' contains load info
- addl $12,%eax # Address of name of function to load
- pushl %eax # Second argument
- movl -8(%eax),%eax # Address of Handle to DLL
- pushl (%eax) # Handle to DLL
- call _GetProcAddress@8# Load it
- test %eax,%eax # Success?
- jne gotit # Yes
- jmp noload # Issue an error or return
-gotit:
- popl %ecx # Pointer to 'return address'
- movb $0xe0,-1(%ecx) # Turn preceding call to a jmp *%eax
- movl %eax,(%ecx) # Point dispatch to address loaded above
- jmp *%eax
-");
-
-LoadDLLinitfunc (advapi32)
-{
- HANDLE h;
- static NO_COPY LONG here = -1L;
-
- while (InterlockedIncrement (&here))
- {
- InterlockedDecrement (&here);
- Sleep (0);
- }
-
- if (advapi32_handle)
- /* nothing to do */;
- else if ((h = LoadLibrary ("advapi32.dll")) != NULL)
- advapi32_handle = h;
- else if (!advapi32_handle)
- api_fatal ("could not load advapi32.dll, %E");
-
- InterlockedDecrement (&here);
- return 0;
-}
-
-LoadDLLinitfunc (netapi32)
-{
- HANDLE h;
-
- if ((h = LoadLibrary ("netapi32.dll")) != NULL)
- netapi32_handle = h;
- else if (! netapi32_handle)
- api_fatal ("could not load netapi32.dll. %d", GetLastError ());
- return 0;
-}
-
-LoadDLLinitfunc (ntdll)
-{
- HANDLE h;
- static NO_COPY LONG here = -1L;
-
- while (InterlockedIncrement (&here))
- {
- InterlockedDecrement (&here);
-small_printf ("Multiple tries to read ntdll.dll\n");
- Sleep (0);
- }
-
- if (ntdll_handle)
- /* nothing to do */;
- else if ((h = LoadLibrary ("ntdll.dll")) != NULL)
- ntdll_handle = h;
- else if (!ntdll_handle)
- api_fatal ("could not load ntdll.dll, %E");
-
- InterlockedDecrement (&here);
- return 0;
-}
-
-LoadDLLinitfunc (user32)
-{
- HANDLE h;
- static NO_COPY LONG here = -1L;
-
- while (InterlockedIncrement (&here))
- {
- InterlockedDecrement (&here);
- Sleep (0);
- }
-
- if (user32_handle)
- /* nothing to do */;
- else if ((h = LoadLibrary ("user32.dll")) != NULL)
- user32_handle = h;
- else if (!user32_handle)
- api_fatal ("could not load user32.dll, %E");
-
- InterlockedDecrement (&here);
- return 0; /* Already done by another thread? */
-}
-
-LoadDLLinitfunc (wsock32)
-{
- extern void wsock_init ();
- HANDLE h;
-
- if ((h = LoadLibrary ("wsock32.dll")) != NULL)
- wsock32_handle = h;
- else if (!wsock32_handle)
- api_fatal ("could not load wsock32.dll. Is TCP/IP installed?");
- else
- return 0; /* Already done by another thread? */
-
- if (!ws2_32_handle)
- wsock_init ();
-
- return 0;
-}
-
-LoadDLLinitfunc (ws2_32)
-{
- extern void wsock_init ();
- HANDLE h;
-
- if ((h = LoadLibrary ("ws2_32.dll")) == NULL)
- return 0; /* Already done or not available. */
- ws2_32_handle = h;
-
- if (!wsock32_handle)
- wsock_init ();
-
- return 0;
-}
-
-static void dummy_autoload (void) __attribute__ ((unused));
-static void
-dummy_autoload (void)
-{
-LoadDLLinit (advapi32)
-LoadDLLfunc (AddAccessAllowedAce, 16, advapi32)
-LoadDLLfunc (AddAccessDeniedAce, 16, advapi32)
-LoadDLLfunc (AddAce, 20, advapi32)
-LoadDLLfunc (AdjustTokenPrivileges, 24, advapi32)
-LoadDLLfunc (CopySid, 12, advapi32)
-LoadDLLfunc (CreateProcessAsUserA, 44, advapi32)
-LoadDLLfuncEx (CryptAcquireContextA, 20, advapi32, 1)
-LoadDLLfuncEx (CryptGenRandom, 12, advapi32, 1)
-LoadDLLfuncEx (CryptReleaseContext, 8, advapi32, 1)
-LoadDLLfunc (DeregisterEventSource, 4, advapi32)
-LoadDLLfunc (EqualSid, 8, advapi32)
-LoadDLLfunc (GetAce, 12, advapi32)
-LoadDLLfunc (GetFileSecurityA, 20, advapi32)
-LoadDLLfunc (GetLengthSid, 4, advapi32)
-LoadDLLfunc (GetSecurityDescriptorDacl, 16, advapi32)
-LoadDLLfunc (GetSecurityDescriptorGroup, 12, advapi32)
-LoadDLLfunc (GetSecurityDescriptorOwner, 12, advapi32)
-LoadDLLfunc (GetSidIdentifierAuthority, 4, advapi32)
-LoadDLLfunc (GetSidSubAuthority, 8, advapi32)
-LoadDLLfunc (GetSidSubAuthorityCount, 4, advapi32)
-LoadDLLfunc (GetTokenInformation, 20, advapi32)
-LoadDLLfunc (GetUserNameA, 8, advapi32)
-LoadDLLfunc (ImpersonateLoggedOnUser, 4, advapi32)
-LoadDLLfunc (InitializeAcl, 12, advapi32)
-LoadDLLfunc (InitializeSecurityDescriptor, 8, advapi32)
-LoadDLLfunc (InitializeSid, 12, advapi32)
-LoadDLLfunc (IsValidSid, 4, advapi32)
-LoadDLLfunc (LogonUserA, 24, advapi32)
-LoadDLLfunc (LookupAccountNameA, 28, advapi32)
-LoadDLLfunc (LookupAccountSidA, 28, advapi32)
-LoadDLLfunc (LookupPrivilegeValueA, 12, advapi32)
-LoadDLLfunc (MakeSelfRelativeSD, 12, advapi32)
-LoadDLLfunc (OpenProcessToken, 12, advapi32)
-LoadDLLfunc (RegCloseKey, 4, advapi32)
-LoadDLLfunc (RegCreateKeyExA, 36, advapi32)
-LoadDLLfunc (RegDeleteKeyA, 8, advapi32)
-LoadDLLfunc (RegDeleteValueA, 8, advapi32)
-LoadDLLfunc (RegLoadKeyA, 12, advapi32)
-LoadDLLfunc (RegEnumKeyExA, 32, advapi32)
-LoadDLLfunc (RegEnumValueA, 32, advapi32)
-LoadDLLfunc (RegOpenKeyExA, 20, advapi32)
-LoadDLLfunc (RegQueryValueExA, 24, advapi32)
-LoadDLLfunc (RegSetValueExA, 24, advapi32)
-LoadDLLfunc (RegisterEventSourceA, 8, advapi32)
-LoadDLLfunc (ReportEventA, 36, advapi32)
-LoadDLLfunc (RevertToSelf, 0, advapi32)
-LoadDLLfunc (SetKernelObjectSecurity, 12, advapi32)
-LoadDLLfunc (SetSecurityDescriptorDacl, 16, advapi32)
-LoadDLLfunc (SetSecurityDescriptorGroup, 12, advapi32)
-LoadDLLfunc (SetSecurityDescriptorOwner, 12, advapi32)
-
-LoadDLLinit (netapi32)
-LoadDLLfunc (NetWkstaUserGetInfo, 12, netapi32)
-LoadDLLfunc (NetUserGetInfo, 16, netapi32)
-LoadDLLfunc (NetApiBufferFree, 4, netapi32)
-
-LoadDLLinit (ntdll)
-LoadDLLfuncEx (NtMapViewOfSection, 40, ntdll, 1)
-LoadDLLfuncEx (NtOpenSection, 12, ntdll, 1)
-LoadDLLfuncEx (NtQuerySystemInformation, 16, ntdll, 1)
-LoadDLLfuncEx (NtUnmapViewOfSection, 8, ntdll, 1)
-LoadDLLfuncEx (RtlInitUnicodeString, 8, ntdll, 1)
-LoadDLLfuncEx (RtlNtStatusToDosError, 4, ntdll, 1)
-LoadDLLfuncEx (ZwQuerySystemInformation, 16, ntdll, 1)
-
-LoadDLLinit (user32)
-LoadDLLfunc (CharToOemA, 8, user32)
-LoadDLLfunc (CharToOemBuffA, 12, user32)
-LoadDLLfunc (CloseClipboard, 0, user32)
-LoadDLLfunc (CreateWindowExA, 48, user32)
-LoadDLLfunc (DefWindowProcA, 16, user32)
-LoadDLLfunc (DispatchMessageA, 4, user32)
-LoadDLLfunc (FindWindowA, 8, user32)
-LoadDLLfunc (GetClipboardData, 4, user32)
-LoadDLLfunc (GetMessageA, 16, user32)
-LoadDLLfunc (GetProcessWindowStation, 0, user32)
-LoadDLLfunc (GetThreadDesktop, 4, user32)
-LoadDLLfunc (GetUserObjectInformationA, 20, user32)
-LoadDLLfunc (KillTimer, 8, user32)
-LoadDLLfunc (MessageBoxA, 16, user32)
-LoadDLLfunc (MsgWaitForMultipleObjects, 20, user32)
-LoadDLLfunc (OemToCharBuffA, 12, user32)
-LoadDLLfunc (OpenClipboard, 4, user32)
-LoadDLLfunc (PeekMessageA, 20, user32)
-LoadDLLfunc (PostMessageA, 16, user32)
-LoadDLLfunc (PostQuitMessage, 4, user32)
-LoadDLLfunc (RegisterClassA, 4, user32)
-LoadDLLfunc (SendMessageA, 16, user32)
-LoadDLLfunc (SetTimer, 16, user32)
-LoadDLLfunc (SetUserObjectSecurity, 12, user32)
-
-LoadDLLinit (wsock32)
-LoadDLLfunc (WSAAsyncSelect, 16, wsock32)
-LoadDLLfunc (WSACleanup, 0, wsock32)
-LoadDLLfunc (WSAGetLastError, 0, wsock32)
-LoadDLLfunc (WSASetLastError, 4, wsock32)
-LoadDLLfunc (WSAStartup, 8, wsock32)
-LoadDLLfunc (__WSAFDIsSet, 8, wsock32)
-LoadDLLfunc (accept, 12, wsock32)
-LoadDLLfunc (bind, 12, wsock32)
-LoadDLLfunc (closesocket, 4, wsock32)
-LoadDLLfunc (connect, 12, wsock32)
-LoadDLLfunc (gethostbyaddr, 12, wsock32)
-LoadDLLfunc (gethostbyname, 4, wsock32)
-LoadDLLfunc (gethostname, 8, wsock32)
-LoadDLLfunc (getpeername, 12, wsock32)
-LoadDLLfunc (getprotobyname, 4, wsock32)
-LoadDLLfunc (getprotobynumber, 4, wsock32)
-LoadDLLfunc (getservbyname, 8, wsock32)
-LoadDLLfunc (getservbyport, 8, wsock32)
-LoadDLLfunc (getsockname, 12, wsock32)
-LoadDLLfunc (getsockopt, 20, wsock32)
-LoadDLLfunc (inet_addr, 4, wsock32)
-LoadDLLfunc (inet_network, 4, wsock32)
-LoadDLLfunc (inet_ntoa, 4, wsock32)
-LoadDLLfunc (ioctlsocket, 12, wsock32)
-LoadDLLfunc (listen, 8, wsock32)
-LoadDLLfunc (rcmd, 24, wsock32)
-LoadDLLfunc (recv, 16, wsock32)
-LoadDLLfunc (recvfrom, 24, wsock32)
-LoadDLLfunc (rexec, 24, wsock32)
-LoadDLLfunc (rresvport, 4, wsock32)
-LoadDLLfunc (select, 20, wsock32)
-LoadDLLfunc (send, 16, wsock32)
-LoadDLLfunc (sendto, 24, wsock32)
-LoadDLLfunc (setsockopt, 20, wsock32)
-LoadDLLfunc (shutdown, 8, wsock32)
-LoadDLLfunc (socket, 12, wsock32)
-
-LoadDLLinit (ws2_32)
-LoadDLLfuncEx (WSADuplicateSocketA, 12, ws2_32, 1)
-LoadDLLfuncEx (WSASocketA, 24, ws2_32, 1)
-}
-}
diff --git a/winsup/cygwin/autoload.h b/winsup/cygwin/autoload.h
deleted file mode 100644
index 9367c0daf..000000000
--- a/winsup/cygwin/autoload.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* autoload.h: Define functions for auto-loading symbols from a DLL.
-
- Copyright 1999, 2000 Cygnus Solutions.
-
- 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. */
-
-#define LoadDLLinitfunc(dllname) \
-HANDLE NO_COPY dllname ## _handle = NULL; \
-static int dllname ## _init () __asm__ (#dllname "_init") __attribute__ ((unused)); \
-static int dllname ## _init ()
-
-#define LoadDLLinitnow(dllname) \
- ({__asm__ ("movl $cygwin_dll_func_load, " #dllname "_init_holder"); dllname##_init ();})
-
-#define _LoadDLLinitnow(dllname) \
- __asm__ ("movl $cygwin_dll_func_load, " #dllname "_init_holder"); \
- __asm__ ("call " #dllname "_init"); \
-
-#define LoadDLLinit(dllname) \
- __asm__ (".section .data_cygwin_nocopy,\"w\""); \
- __asm__ (#dllname "_init_holder: .long " #dllname "_init_and_load"); \
- __asm__ (".text"); \
- __asm__ (#dllname "_init_and_load:"); \
- _LoadDLLinitnow (dllname); \
- __asm__ ("jmp cygwin_dll_func_load");
-
-
-/* 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 DLL" step.
- *
- * So, immediately following the the call to one of the above routines
- * we have:
- * foojmp (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 %eax. If the initialization has been
- * done, only the load part is done.
- * DLL handle (4 bytes) The handle to use when loading the DLL.
- * flag (4 bytes) If "TRUE" then it is not a fatal error if this
- * function cannot be found. Instead, error is set
- * to ERROR_PROC_NOT_FOUND and 0 is returned.
- * func name (n bytes) asciz string containing the name of the function
- * to be loaded.
- */
-
-#define LoadDLLmangle(name, n) #name "@" #n
-#define LoadDLLfunc(name, n, dllname) LoadDLLfuncEx (name, n, dllname, 0)
-#define LoadDLLfuncEx(name, n, dllname, notimp) \
-__asm__ (".section .data_cygwin_nocopy,\"w\""); \
-__asm__ (".global _" LoadDLLmangle (name, n)); \
-__asm__ (".global _win32_" LoadDLLmangle (name, n)); \
-__asm__ (".align 8"); \
-__asm__ ("_" LoadDLLmangle (name, n) ":"); \
-__asm__ ("_win32_" LoadDLLmangle (name, n) ":"); \
-__asm__ ("movl (" #name "jump),%eax"); \
-__asm__ ("call *(%eax)"); \
-__asm__ (#name "jump: .long " #dllname "_init_holder"); \
-__asm__ (" .long _" #dllname "_handle"); \
-__asm__ (" .long " #n "+" #notimp); \
-__asm__ (".asciz \"" #name "\""); \
-__asm__ (".text"); \
-
-extern "C" void cygwin_dll_func_load () __asm__ ("cygwin_dll_func_load");
diff --git a/winsup/cygwin/automode.c b/winsup/cygwin/automode.c
deleted file mode 100644
index e02b0b9de..000000000
--- 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)
-{
- 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 2eb02df23..000000000
--- a/winsup/cygwin/binmode.c
+++ /dev/null
@@ -1,19 +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 <sys/fcntl.h>
-
-extern int _fmode;
-void
-cygwin_premain0 (int argc, char **argv)
-{
- _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 a8922fc07..000000000
--- a/winsup/cygwin/child_info.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* childinfo.h: shared child info for cygwin
-
- 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 <setjmp.h>
-
-enum
-{
- PROC_MAGIC = 0xaf0bf000,
- PROC_FORK = PROC_MAGIC + 1,
- PROC_EXEC = PROC_MAGIC + 2,
- PROC_SPAWN = PROC_MAGIC + 3,
- PROC_FORK1 = PROC_MAGIC + 4, // Newer versions provide stack
- // location information
- PROC_SPAWN1 = PROC_MAGIC + 5
-};
-
-#define PROC_MAGIC_MASK 0xff00f000
-#define PROC_MAGIC_GENERIC 0xaf00f000
-#define PROC_MAGIC_VER_MASK 0x0ff0000
-
-#define EXEC_MAGIC_SIZE sizeof(child_info)
-class child_info
-{
-public:
- DWORD zero[1]; // must be zeroed
- DWORD cb; // size of this record
- DWORD type; // type of record
- int cygpid; // cygwin pid of child process
- HANDLE subproc_ready; // used for synchronization with parent
- HANDLE shared_h;
- HANDLE console_h;
- HANDLE parent;
- HANDLE pppid_handle;
- init_cygheap *cygheap;
- void *cygheap_max;
-};
-
-class child_info_fork: public child_info
-{
-public:
- HANDLE forker_finished;// for synchronization with child
- DWORD stacksize; // size of parent stack
- void *heaptop;
- void *heapbase;
- void *heapptr;
- jmp_buf jmp; // where child will jump to
- void *stacktop; // location of top of parent stack
- void *stackbottom; // location of bottom of parent stack
-};
-
-class fhandler_base;
-
-class cygheap_exec_info
-{
-public:
- uid_t uid;
- char *old_title;
- fhandler_base **fds;
- size_t nfds;
- int argc;
- char **argv;
- int envc;
- char **envp;
- HANDLE myself_pinfo;
- char *cwd_posix;
- char *cwd_win32;
- DWORD cwd_hash;
-};
-
-class child_info_spawn: public child_info
-{
-public:
- cygheap_exec_info *moreinfo;
- HANDLE hexec_proc;
-
- child_info_spawn (): moreinfo (NULL) {}
- ~child_info_spawn ()
- {
- if (parent)
- CloseHandle (parent);
- if (moreinfo)
- {
- if (moreinfo->old_title)
- cfree (moreinfo->old_title);
- if (moreinfo->cwd_posix)
- cfree (moreinfo->cwd_posix);
- if (moreinfo->cwd_win32)
- cfree (moreinfo->cwd_win32);
- if (moreinfo->envp)
- {
- for (char **e = moreinfo->envp; *e; e++)
- cfree (*e);
- cfree (moreinfo->envp);
- }
- CloseHandle (moreinfo->myself_pinfo);
- cfree (moreinfo);
- }
- }
-};
-
-void __stdcall init_child_info (DWORD, child_info *, int, HANDLE);
-
-extern child_info_fork *child_proc_info;
diff --git a/winsup/cygwin/config.h.in b/winsup/cygwin/config.h.in
deleted file mode 100644
index 99931a5c2..000000000
--- a/winsup/cygwin/config.h.in
+++ /dev/null
@@ -1,38 +0,0 @@
-/* config.h.in. Generated automatically from configure.in by autoheader. */
-
-/* Define if using alloca.c. */
-#undef C_ALLOCA
-
-/* 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 if you have alloca, as a function or macro. */
-#undef HAVE_ALLOCA
-
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-#undef HAVE_ALLOCA_H
-
-/* 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
-
-/* Define if DEBUGGING support is requested. */
-#undef DEBUGGING
-
-/* Define if building "extra" thread-safe Cygwin DLL. */
-#undef _CYG_THREAD_FAILSAFE
-
-/* Define if GCC supports builtin memset. */
-#undef HAVE_BUILTIN_MEMSET
-
-/* Define if building thread-safe Cygwin DLL. */
-#undef _MT_SAFE
-
-/* Define if using new vfork functionality. */
-#undef NEWVFORK
diff --git a/winsup/cygwin/config/i386/longjmp.c b/winsup/cygwin/config/i386/longjmp.c
deleted file mode 100644
index d663e20f7..000000000
--- a/winsup/cygwin/config/i386/longjmp.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* longjmp.c
-
- Copyright 1996, 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifdef __i386__
-#if 1
-asm (" .globl _longjmp \n"
-"_longjmp: \n"
-" pushl %ebp \n"
-" movl %esp,%ebp \n"
-" movl 8(%ebp),%edi \n"
-" movl 12(%ebp),%eax \n"
-" testl %eax,%eax \n"
-" jne 0f \n"
-" incl %eax \n"
-"0: \n"
-" movl %eax,0(%edi) \n"
-" movl 24(%edi),%ebp \n"
-" pushfl \n"
-" popl %ebx \n"
-" movw 42(%edi),%ax \n"
-" movw %ax,%ss \n"
-" movl 28(%edi),%esp \n"
-" pushl 32(%edi) \n"
-" pushl %ebx \n"
-" movw 36(%edi),%ax \n"
-" movw %ax,%es \n"
-#if 0
-/* fs is a system register in windows; don't muck with it */
-" movw 38(%edi),%ax \n"
-" movw %ax,%fs \n"
-#endif
-" movw 40(%edi),%ax \n"
-" movw %ax,%gs \n"
-" movl 0(%edi),%eax \n"
-" movl 4(%edi),%ebx \n"
-" movl 8(%edi),%ecx \n"
-" movl 12(%edi),%edx \n"
-" movl 16(%edi),%esi \n"
-" movl 20(%edi),%edi \n"
-" popfl \n"
-" ret \n");
-#endif
-
-#endif /* __i386__ */
diff --git a/winsup/cygwin/config/i386/makefrag b/winsup/cygwin/config/i386/makefrag
deleted file mode 100644
index a8b394221..000000000
--- a/winsup/cygwin/config/i386/makefrag
+++ /dev/null
@@ -1,17 +0,0 @@
-# makefrag: included by the main Cygwin Makefile.in
-
-# Copyright 1996, 1998 Cygnus Solutions.
-
-# This file is part of Cygwin.
-
-# This software is a copyrighted work licensed under the terms of the
-# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-# details.
-
-EXTRA_DLL_OFILES=setjmp.o longjmp.o
-
-setjmp.o:config/i386/setjmp.c
- $(CC) -c $(ALL_CFLAGS) $<
-
-longjmp.o:config/i386/longjmp.c
- $(CC) -c $(ALL_CFLAGS) $<
diff --git a/winsup/cygwin/config/i386/profile.h b/winsup/cygwin/config/i386/profile.h
deleted file mode 100644
index ad5f625d0..000000000
--- 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("movl 4(%%ebp),%0" : "=r" (selfpc)); \
- /* \
- * frompcindex = pc pushed by call into self. \
- */ \
- __asm("movl (%%ebp),%0;movl 4(%0),%0" : "=r" (frompcindex)); \
- _mcount(frompcindex, selfpc); \
-}
-
diff --git a/winsup/cygwin/config/i386/setjmp.c b/winsup/cygwin/config/i386/setjmp.c
deleted file mode 100644
index ffec9141d..000000000
--- a/winsup/cygwin/config/i386/setjmp.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* setjmp.c
-
- Copyright 1996, 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifdef __i386__
-
-#if 1
-asm(" .globl _setjmp \n"
-"_setjmp: \n"
-" pushl %ebp \n"
-" movl %esp,%ebp \n"
-" pushl %edi \n"
-" movl 8(%ebp),%edi \n"
-" movl %eax,0(%edi) \n"
-" movl %ebx,4(%edi) \n"
-" movl %ecx,8(%edi) \n"
-" movl %edx,12(%edi) \n"
-" movl %esi,16(%edi) \n"
-" movl -4(%ebp),%eax \n"
-" movl %eax,20(%edi) \n"
-" movl 0(%ebp),%eax \n"
-" movl %eax,24(%edi) \n"
-" movl %esp,%eax \n"
-" addl $12,%eax \n"
-" movl %eax,28(%edi) \n"
-" movl 4(%ebp),%eax \n"
-" movl %eax,32(%edi) \n"
-" movw %es, %ax \n"
-" movw %ax, 36(%edi) \n"
-" movw %fs, %ax \n"
-" movw %ax, 38(%edi) \n"
-" movw %gs, %ax \n"
-" movw %ax, 40(%edi) \n"
-" movw %ss, %ax \n"
-" movw %ax, 42(%edi) \n"
-" popl %edi \n"
-" movl $0,%eax \n"
-" leave \n"
-" ret \n");
-#endif
-
-#endif /* __i386__ */
diff --git a/winsup/cygwin/configure b/winsup/cygwin/configure
deleted file mode 100755
index c38718b96..000000000
--- a/winsup/cygwin/configure
+++ /dev/null
@@ -1,2341 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-threadsafe=[runtime] Build a cygwin DLL which is thread safe"
-ac_help="$ac_help
- --enable-extra-threadsafe-checking Build a cygwin DLL which is thread safe with extra consistency checking"
-ac_help="$ac_help
- --enable-debugging Build a cygwin DLL which has more consistency checking for debugging"
-ac_help="$ac_help
- --enable-vfork Build a cygwin DLL which uses experimental vfork code"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-sitefile=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --site-file=FILE use FILE as the site file
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=init.cc
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
- fi
-else
- CONFIG_SITE="$sitefile"
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:577: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-
-
-
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:663: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:684: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:702: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:734: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_CC"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:766: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="gcc"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- CC="gcc"
-fi
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:802: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:851: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:875: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-gstabs+ -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-# Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
-set dummy ${ac_tool_prefix}g++; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:905: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CXX="${ac_tool_prefix}g++"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CXX="$ac_cv_prog_CXX"
-if test -n "$CXX"; then
- echo "$ac_t""$CXX" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_CXX"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "g++", so it can be a program name with args.
-set dummy g++; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:937: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CXX="g++"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_CXX" && ac_cv_prog_CXX="g++"
-fi
-fi
-CXX="$ac_cv_prog_CXX"
-if test -n "$CXX"; then
- echo "$ac_t""$CXX" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- CXX="g++"
-fi
-fi
-
-if test -z "$CXX"; then
- # Extract the first word of "c++", so it can be a program name with args.
-set dummy c++; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:973: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CXX="c++"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CXX="$ac_cv_prog_CXX"
-if test -n "$CXX"; then
- echo "$ac_t""$CXX" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-CXXFLAGS='$(CFLAGS)'
-
-
-case "$with_cross_host" in
- ""|*cygwin*)
- all_host="all_host"
- install_host="install_host"
- ;;
- *)
- all_host=
- install_host=
- ;;
-esac
-
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1022: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_AR"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1054: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- AR="ar"
-fi
-fi
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1089: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_AS"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1121: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- AS="as"
-fi
-fi
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1156: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1188: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB="ranlib"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB="ranlib"
-fi
-fi
-
-# Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ld; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1223: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$LD"; then
- ac_cv_prog_LD="$LD" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_LD="${ac_tool_prefix}ld"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-LD="$ac_cv_prog_LD"
-if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_LD"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ld", so it can be a program name with args.
-set dummy ld; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1255: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$LD"; then
- ac_cv_prog_LD="$LD" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_LD="ld"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_LD" && ac_cv_prog_LD="ld"
-fi
-fi
-LD="$ac_cv_prog_LD"
-if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- LD="ld"
-fi
-fi
-
-# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1290: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_DLLTOOL"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1322: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- DLLTOOL="dlltool"
-fi
-fi
-
-# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
-set dummy ${ac_tool_prefix}windres; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1357: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$WINDRES"; then
- ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-WINDRES="$ac_cv_prog_WINDRES"
-if test -n "$WINDRES"; then
- echo "$ac_t""$WINDRES" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_WINDRES"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "windres", so it can be a program name with args.
-set dummy windres; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1389: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$WINDRES"; then
- ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_WINDRES="windres"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
-fi
-fi
-WINDRES="$ac_cv_prog_WINDRES"
-if test -n "$WINDRES"; then
- echo "$ac_t""$WINDRES" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- WINDRES="windres"
-fi
-fi
-
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1423: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 1438 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 1455 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 1472 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
-else
- ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments. Useless!
-echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1505: checking for working alloca.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1510 "configure"
-#include "confdefs.h"
-#include <alloca.h>
-int main() {
-char *p = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:1517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_header_alloca_h=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA_H 1
-EOF
-
-fi
-
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1538: checking for alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1543 "configure"
-#include "confdefs.h"
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
-# include <malloc.h>
-# define alloca _alloca
-# else
-# if HAVE_ALLOCA_H
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-# endif
-# endif
-# endif
-# endif
-#endif
-
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:1571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_func_alloca_works=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_func_alloca_works=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
-if test $ac_cv_func_alloca_works = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-
-fi
-
-if test $ac_cv_func_alloca_works = no; then
- # The SVR3 libPW and SVR4 libucb both contain incompatible functions
- # that cause trouble. Some versions do not even contain alloca or
- # contain a buggy version. If you still want to use their alloca,
- # use ar to extract alloca.o from them instead of compiling alloca.c.
- ALLOCA=alloca.${ac_objext}
- cat >> confdefs.h <<\EOF
-#define C_ALLOCA 1
-EOF
-
-
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1603: checking whether alloca needs Cray hooks" >&5
-if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1608 "configure"
-#include "confdefs.h"
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
-
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "webecray" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_os_cray=yes
-else
- rm -rf conftest*
- ac_cv_os_cray=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
-if test $ac_cv_os_cray = yes; then
-for ac_func in _getb67 GETB67 getb67; do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1633: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1638 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
-#define CRAY_STACKSEG_END $ac_func
-EOF
-
- break
-else
- echo "$ac_t""no" 1>&6
-fi
-
-done
-fi
-
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1688: checking stack direction for C alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_c_stack_direction=0
-else
- cat > conftest.$ac_ext <<EOF
-#line 1696 "configure"
-#include "confdefs.h"
-find_stack_direction ()
-{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
- else
- return (&dummy > addr) ? 1 : -1;
-}
-main ()
-{
- exit (find_stack_direction() < 0);
-}
-EOF
-if { (eval echo configure:1715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_cv_c_stack_direction=1
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_stack_direction=-1
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
-
-fi
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1737: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-# Test for builtin mem* functions.
-
-ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
-cat > conftest.$ac_ext <<EOF
-#line 1774 "configure"
-#include "confdefs.h"
-
-#include <string.h>
-void foo(char *s, int c, size_t n)
-{
- __builtin_memset(s, c, n);
-}
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- use_builtin_memset=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- use_builtin_memset=no
-fi
-rm -f conftest*
-if test $use_builtin_memset = "yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_BUILTIN_MEMSET 1
-EOF
-
-fi
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-
-mt_safe_val=1
-MT_SAFE=yes
-PTH_ALLOW=''
-
-# Check whether --enable-threadsafe or --disable-threadsafe was given.
-if test "${enable_threadsafe+set}" = set; then
- enableval="$enable_threadsafe"
- case "${enableval}" in
-yes)
- ;;
-runtime)
- mt_safe_val=2
- MT_SAFE=yes
- ;;
-no)
- mt_safe_val=0
- MT_SAFE=no
- PTH_ALLOW=';'
- ;;
-esac
-
-fi
-
-
-# Check whether --enable-extra-threadsafe-checking or --disable-extra-threadsafe-checking was given.
-if test "${enable_extra_threadsafe_checking+set}" = set; then
- enableval="$enable_extra_threadsafe_checking"
- case "${enableval}" in
-yes)
- mt_safe_val=1
- MT_SAFE=yes
- cat >> confdefs.h <<\EOF
-#define _CYG_THREAD_FAILSAFE 1
-EOF
-
- ;;
-no)
- ;;
-esac
-
-fi
-
-
-if test "$MT_SAFE" = "yes"; then
- cat >> confdefs.h <<EOF
-#define _MT_SAFE $mt_safe_val
-EOF
-
-fi
-
-
-
-
-# Check whether --enable-debugging or --disable-debugging was given.
-if test "${enable_debugging+set}" = set; then
- enableval="$enable_debugging"
- case "${enableval}" in
-yes) cat >> confdefs.h <<\EOF
-#define DEBUGGING 1
-EOF
- ;;
-no) ;;
-esac
-
-fi
-
-
-# Check whether --enable-vfork or --disable-vfork was given.
-if test "${enable_vfork+set}" = set; then
- enableval="$enable_vfork"
- case "${enableval}" in
-yes) cat >> confdefs.h <<\EOF
-#define NEWVFORK 1
-EOF
- ;;
-no) ;;
-esac
-
-fi
-
-
-
-
-
-
-echo $ac_n "checking if newlib is part of the build tree""... $ac_c" 1>&6
-echo "configure:1897: checking if newlib is part of the build tree" >&5
-
-EXE_LDFLAGS=
-if test -d ../newlib
-then
- echo "$ac_t""yes" 1>&6
- EXE_LDFLAGS="-B../../newlib/ -B../"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test x"$EXE_LDFLAGS" = x
-then
- echo $ac_n "checking if installed newlib needed""... $ac_c" 1>&6
-echo "configure:1912: checking if installed newlib needed" >&5
- cat > conftest.$ac_ext <<EOF
-#line 1914 "configure"
-#include "confdefs.h"
-
-int main() {
-/* main already defined */
-
-; return 0; }
-EOF
-if { (eval echo configure:1922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
-
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
- echo "configure: warning: newlib not found - utility .exe's may not link" 1>&2
-fi
-rm -f conftest*
-fi
-
-
-case "$target_cpu" in
- i386|i486|i586|i686) DLL_ENTRY="_dll_entry@12"
- DEF_DLL_ENTRY="dll_entry@12"
- ALLOCA="_alloca"
- CONFIG_DIR="i386" ;;
- powerpc*) DLL_ENTRY="dll_entry"
- DEF_DLL_ENTRY="dll_entry"
- ALLOCA=" __allocate_stack"
- CONFIG_DIR="ppc" ;;
- *) { echo "configure: error: Invalid target processor \"$target_cpu\"" 1>&2; exit 1; } ;;
-esac
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-DEFS=-DHAVE_CONFIG_H
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile cygwin.def:cygwin.din config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@CC@%$CC%g
-s%@CXX@%$CXX%g
-s%@all_host@%$all_host%g
-s%@install_host@%$install_host%g
-s%@AR@%$AR%g
-s%@AS@%$AS%g
-s%@RANLIB@%$RANLIB%g
-s%@LD@%$LD%g
-s%@DLLTOOL@%$DLLTOOL%g
-s%@WINDRES@%$WINDRES%g
-s%@CPP@%$CPP%g
-s%@ALLOCA@%$ALLOCA%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@MT_SAFE@%$MT_SAFE%g
-s%@PTH_ALLOW@%$PTH_ALLOW%g
-s%@EXE_LDFLAGS@%$EXE_LDFLAGS%g
-s%@DLL_ENTRY@%$DLL_ENTRY%g
-s%@DEF_DLL_ENTRY@%$DEF_DLL_ENTRY%g
-s%@CONFIG_DIR@%$CONFIG_DIR%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile cygwin.def:cygwin.din"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
-ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
-
-# This sed command replaces #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.
-cat >> conftest.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
-rm -f conftest.tail
-while :
-do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
- echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
- else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- fi
- rm -f $ac_file
- mv conftest.h $ac_file
- fi
-fi; done
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
diff --git a/winsup/cygwin/configure.in b/winsup/cygwin/configure.in
deleted file mode 100644
index befd40655..000000000
--- a/winsup/cygwin/configure.in
+++ /dev/null
@@ -1,245 +0,0 @@
-dnl Autoconf configure script for Cygwin.
-dnl Copyright 1996, 1997, 1998, 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
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.12)dnl
-AC_INIT(init.cc)
-AC_CONFIG_HEADER(config.h)
-
-AC_PROG_INSTALL
-
-dnl FIXME: We temporarily define our own version of AC_PROG_CC. This is
-dnl copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-dnl are probably using a cross compiler, which will not be able to fully
-dnl link an executable. This should really be fixed in autoconf
-dnl itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-gstabs+ -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-AC_DEFUN(LIB_AC_PROG_CXX,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CXX, g++, g++)
-if test -z "$CXX"; then
- AC_CHECK_PROG(CXX, c++, c++, , , )
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-CXXFLAGS='$(CFLAGS)'
-])
-
-AC_CANONICAL_SYSTEM
-
-LIB_AC_PROG_CC
-LIB_AC_PROG_CXX
-
-case "$with_cross_host" in
- ""|*cygwin*)
- all_host="all_host"
- install_host="install_host"
- ;;
- *)
- all_host=
- install_host=
- ;;
-esac
-
-AC_SUBST(all_host)
-AC_SUBST(install_host)
-
-AC_CHECK_TOOL(AR, ar, ar)
-dnl AC_SUBST(AR)
-AC_CHECK_TOOL(AS, as, as)
-dnl C_SUBST(AS)
-AC_CHECK_TOOL(RANLIB, ranlib, ranlib)
-dnl C_SUBST(RANLIB)
-AC_CHECK_TOOL(LD, ld, ld)
-dnl C_SUBST(LD)
-AC_CHECK_TOOL(DLLTOOL, dlltool, dlltool)
-dnl C_SUBST(DLLTOOL)
-AC_CHECK_TOOL(WINDRES, windres, windres)
-dnl C_SUBST(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
-
-dnl set default mt safeness and then process the options.
-mt_safe_val=1
-MT_SAFE=yes
-PTH_ALLOW=''
-
-AC_ARG_ENABLE(threadsafe,
-[ --enable-threadsafe=[runtime] Build a cygwin DLL which is thread safe],
-[case "${enableval}" in
-yes)
- dnl default.
- ;;
-runtime)
- mt_safe_val=2
- MT_SAFE=yes
- ;;
-no)
- mt_safe_val=0
- MT_SAFE=no
- PTH_ALLOW=';'
- ;;
-esac
-])
-
-AC_ARG_ENABLE(extra-threadsafe-checking,
-[ --enable-extra-threadsafe-checking Build a cygwin DLL which is thread safe with extra consistency checking],
-[case "${enableval}" in
-yes)
- mt_safe_val=1
- MT_SAFE=yes
- AC_DEFINE(_CYG_THREAD_FAILSAFE)
- ;;
-no)
- dnl Don't do anything here to avoid overriding --enable-threadsafe.
- ;;
-esac
-])
-
-if test "$MT_SAFE" = "yes"; then
- AC_DEFINE_UNQUOTED(_MT_SAFE,$mt_safe_val)
-fi
-
-dnl Makefile uses MT_SAFE, so we subst as well as defining it.
-AC_SUBST(MT_SAFE)
-AC_SUBST(PTH_ALLOW)
-
-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(vfork,
-[ --enable-vfork Build a cygwin DLL which uses experimental vfork code],
-[case "${enableval}" in
-yes) AC_DEFINE(NEWVFORK) ;;
-no) ;;
-esac
-])
-
-
-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
-
-dnl
-dnl If newlib is part of build tree, always set EXE_LDFLAGS to point to
-dnl it; this is important in cases where the installed newlib is perhaps
-dnl not compatible. Check and warn for installed newlib only if it's not
-dnl part of the build tree.
-dnl
-
-AC_MSG_CHECKING([if newlib is part of the build tree])
-
-EXE_LDFLAGS=
-if test -d ../newlib
-then
- AC_MSG_RESULT(yes)
- EXE_LDFLAGS="-B../../newlib/ -B../"
-else
- AC_MSG_RESULT(no)
-fi
- AC_SUBST(EXE_LDFLAGS)
-
-if test x"$EXE_LDFLAGS" = x
-then
- AC_MSG_CHECKING([if installed newlib needed])
- AC_TRY_LINK(,
- [/* main already defined */]
- ,
- AC_MSG_RESULT(no)
- ,
- AC_MSG_RESULT(yes)
- AC_MSG_WARN(newlib not found - utility .exe's may not link))
-fi
-AC_SUBST(EXE_LDFLAGS)
-
-case "$target_cpu" in
- i386|i486|i586|i686) DLL_ENTRY="_dll_entry@12"
- DEF_DLL_ENTRY="dll_entry@12"
- ALLOCA="_alloca"
- CONFIG_DIR="i386" ;;
- powerpc*) DLL_ENTRY="dll_entry"
- DEF_DLL_ENTRY="dll_entry"
- ALLOCA=" __allocate_stack"
- CONFIG_DIR="ppc" ;;
- *) AC_MSG_ERROR(Invalid target processor \"$target_cpu\") ;;
-esac
-
-AC_SUBST(DLL_ENTRY)
-AC_SUBST(DEF_DLL_ENTRY)
-AC_SUBST(ALLOCA)
-AC_SUBST(CONFIG_DIR)
-AC_OUTPUT(Makefile cygwin.def:cygwin.din)
-
diff --git a/winsup/cygwin/cygerrno.h b/winsup/cygwin/cygerrno.h
deleted file mode 100644
index dd40819b9..000000000
--- a/winsup/cygwin/cygerrno.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* cygerrno.h: main Cygwin header file.
-
- 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 __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, int deferrno) __attribute__ ((regparm(2)));
-
-#define __seterrno() seterrno (__FILE__, __LINE__)
-#define __seterrno_from_win_error(val) seterrno_from_win_error (__FILE__, __LINE__, val)
-
-#define set_errno(val) (_impure_ptr->_errno = (val))
-#define get_errno() (_impure_ptr->_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;
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc
deleted file mode 100644
index 697827b85..000000000
--- a/winsup/cygwin/cygheap.cc
+++ /dev/null
@@ -1,371 +0,0 @@
-/* cygheap.cc: Cygwin heap manager.
-
- Copyright 2000 Cygnus Solutions.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include "winsup.h"
-#include <errno.h>
-#include <fhandler.h>
-#include <assert.h>
-#include <stdlib.h>
-#include "cygheap.h"
-#include "heap.h"
-#include "cygerrno.h"
-#include "sync.h"
-
-init_cygheap NO_COPY *cygheap;
-void NO_COPY *cygheap_max = NULL;
-
-static NO_COPY muto *cygheap_protect = NULL;
-
-inline static void
-init_cheap ()
-{
- cygheap = (init_cygheap *) VirtualAlloc (NULL, CYGHEAPSIZE, MEM_RESERVE, PAGE_NOACCESS);
- if (!cygheap)
- api_fatal ("Couldn't reserve space for cygwin's heap, %E");
- cygheap_max = cygheap + 1;
-}
-
-#define pagetrunc(x) ((void *) (((DWORD) (x)) & ~(4096 - 1)))
-
-static void *__stdcall
-_csbrk (int sbs)
-{
- void *lastheap;
- bool needalloc;
-
- if (cygheap)
- needalloc = 0;
- else
- {
- init_cheap ();
- needalloc = 1;
- }
-
- lastheap = cygheap_max;
- (char *) cygheap_max += sbs;
- void *heapalign = (void *) pagetrunc (lastheap);
-
- if (!needalloc)
- needalloc = sbs && ((heapalign == lastheap) || heapalign != pagetrunc (cygheap_max));
- if (needalloc && !VirtualAlloc (lastheap, (DWORD) sbs ?: 1, MEM_COMMIT, PAGE_READWRITE))
- api_fatal ("couldn't commit memory for cygwin heap, %E");
-
- return lastheap;
-}
-
-extern "C" void __stdcall
-cygheap_init ()
-{
- cygheap_protect = new_muto (FALSE, "cygheap_protect");
- _csbrk (0);
-}
-
-/* Copyright (C) 1997, 2000 DJ Delorie */
-
-#define NBUCKETS 32
-char *buckets[NBUCKETS] = {0};
-
-#define N0 ((_cmalloc_entry *) NULL)
-#define to_cmalloc(s) ((_cmalloc_entry *) (((char *) (s)) - (int) (N0->data)))
-
-static void *_cmalloc (int size) __attribute ((regparm(1)));
-static void *__stdcall _crealloc (void *ptr, int size) __attribute ((regparm(2)));
-
-static void *__stdcall
-_cmalloc (int size)
-{
- _cmalloc_entry *rvc;
- int b, sz;
-
- /* Calculate "bit bucket" and size as a power of two. */
- for (b = 3, sz = 8; sz && sz < (size + 4); b++, sz <<= 1)
- continue;
-
- cygheap_protect->acquire ();
- if (buckets[b])
- {
- rvc = (_cmalloc_entry *) buckets[b];
- buckets[b] = rvc->ptr;
- rvc->b = b;
- }
- else
- {
- size = sz + sizeof (_cmalloc_entry);
- rvc = (_cmalloc_entry *) _csbrk (size);
-
- 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 = buckets[b];
- buckets[b] = (char *) rvc;
- cygheap_protect->release ();
-}
-
-static void *__stdcall
-_crealloc (void *ptr, int size)
-{
- void *newptr;
- if (ptr == NULL)
- newptr = _cmalloc (size);
- else
- {
- int oldsize = 1 << to_cmalloc (ptr)->b;
- if (size <= oldsize)
- return ptr;
- newptr = _cmalloc (size);
- memcpy (newptr, ptr, oldsize);
- _cfree (ptr);
- }
- return newptr;
-}
-
-/* End Copyright (C) 1997 DJ Delorie */
-
-#define sizeof_cygheap(n) ((n) + sizeof(cygheap_entry))
-
-struct cygheap_entry
- {
- int type;
- struct cygheap_entry *next;
- char data[0];
- };
-
-#define N ((cygheap_entry *) NULL)
-#define tocygheap(s) ((cygheap_entry *) (((char *) (s)) - (int) (N->data)))
-
-/* Called by fork or spawn to reallocate cygwin heap */
-extern "C" void __stdcall
-cygheap_fixup_in_child (HANDLE parent, bool execed)
-{
- DWORD m, n;
- n = (DWORD) cygheap_max - (DWORD) cygheap;
-
- /* Reserve cygwin heap in same spot as parent */
- if (!VirtualAlloc (cygheap, CYGHEAPSIZE, MEM_RESERVE, PAGE_NOACCESS))
- api_fatal ("Couldn't reserve space for cygwin's heap (%p) in child, cygheap, %E", cygheap);
-
- /* Allocate same amount of memory as parent */
- if (!VirtualAlloc (cygheap, n, MEM_COMMIT, PAGE_READWRITE))
- api_fatal ("Couldn't allocate space for child's heap %p, size %d, %E",
- cygheap, n);
-
- /* Copy memory from the parent */
- m = 0;
- if (!ReadProcessMemory (parent, cygheap, cygheap, n, &m) || m != n)
- api_fatal ("Couldn't read parent's cygwin heap %d bytes != %d, %E",
- n, m);
-
- cygheap_init ();
-
- if (execed)
- {
- /* 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->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 */
- }
- }
-}
-
-inline static void *
-creturn (cygheap_types x, cygheap_entry * c, int len)
-{
- if (!c)
- {
- __seterrno ();
- return NULL;
- }
- c->type = x;
- if (cygheap_max < ((char *) c + len))
- cygheap_max = (char *) c + len;
- MALLOC_CHECK;
- return (void *) c->data;
-}
-
-extern "C" void *__stdcall
-cmalloc (cygheap_types x, DWORD n)
-{
- cygheap_entry *c;
- MALLOC_CHECK;
- c = (cygheap_entry *) _cmalloc (sizeof_cygheap (n));
- if (!c)
- system_printf ("cmalloc returned NULL");
- return creturn (x, c, n);
-}
-
-extern "C" void *__stdcall
-crealloc (void *s, DWORD n)
-{
- 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));
- if (!c)
- system_printf ("crealloc returned NULL");
- return creturn (t, c, n);
-}
-
-extern "C" void __stdcall
-cfree (void *s)
-{
- MALLOC_CHECK;
- assert (!inheap (s));
- (void) _cfree (tocygheap (s));
- MALLOC_CHECK;
-}
-
-extern "C" void *__stdcall
-ccalloc (cygheap_types x, DWORD n, DWORD size)
-{
- cygheap_entry *c;
- MALLOC_CHECK;
- c = (cygheap_entry *) _cmalloc (sizeof_cygheap (n * size));
- if (c)
- memset (c->data, 0, n * size);
- if (!c)
- system_printf ("ccalloc returned NULL");
- return creturn (x, c, n);
-}
-
-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;
-}
-
-cygheap_root::cygheap_root (cygheap_root &nroot)
-{
- rootlen = nroot.rootlen;
- root = nroot.root ? cstrdup (nroot.root) : NULL;
-}
-
-cygheap_root::~cygheap_root ()
-{
- if (root)
- cfree (root);
-}
-
-char *
-cygheap_root::operator =(const char *new_root)
-{
- if (root)
- {
- cfree (root);
- root = NULL;
- }
- rootlen = 0;
- if (new_root && *new_root)
- {
- root = cstrdup (new_root);
- rootlen = strlen (root);
- if (rootlen >= 1 && root[rootlen - 1] == '/')
- root[--rootlen] = '\0';
- if (!rootlen)
- {
- cfree (root);
- root = NULL;
- }
- }
- return root;
-}
-
-cygheap_user::~cygheap_user ()
-{
- if (pname)
- cfree (pname);
- if (plogsrv)
- cfree (plogsrv);
- if (pdomain)
- cfree (pdomain);
- if (psid)
- cfree (psid);
-}
-
-void
-cygheap_user::set_name (const char *new_name)
-{
- if (pname)
- cfree (pname);
- pname = cstrdup (new_name ? new_name : "");
-}
-
-void
-cygheap_user::set_logsrv (const char *new_logsrv)
-{
- if (plogsrv)
- cfree (plogsrv);
- plogsrv = (new_logsrv && *new_logsrv) ? cstrdup (new_logsrv) : NULL;
-}
-
-void
-cygheap_user::set_domain (const char *new_domain)
-{
- if (pdomain)
- cfree (pdomain);
- pdomain = (new_domain && *new_domain) ? cstrdup (new_domain) : NULL;
-}
-
-BOOL
-cygheap_user::set_sid (PSID new_sid)
-{
- if (!new_sid)
- {
- if (psid)
- cfree (psid);
- psid = NULL;
- return TRUE;
- }
- else
- {
- if (!psid)
- psid = cmalloc (HEAP_STR, MAX_SID_LEN);
- return CopySid (MAX_SID_LEN, psid, new_sid);
- }
-}
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h
deleted file mode 100644
index c39438ab1..000000000
--- a/winsup/cygwin/cygheap.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/* cygheap.h: Cygwin heap manager.
-
- Copyright 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#undef cfree
-
-enum cygheap_types
-{
- HEAP_FHANDLER,
- HEAP_STR,
- HEAP_ARGV,
- HEAP_BUF,
- HEAP_1_START,
- HEAP_1_STR,
- HEAP_1_ARGV,
- HEAP_1_BUF,
- HEAP_1_EXEC,
- HEAP_1_MAX = 100
-};
-
-#define CYGHEAPSIZE ((4000 * sizeof (fhandler_union)) + (2 * 65536))
-
-#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];
-};
-
-class cygheap_root
-{
- /* Root directory information.
- This is used after a chroot is called. */
- size_t rootlen;
- char *root;
-public:
- cygheap_root (cygheap_root &nroot);
- ~cygheap_root ();
- char *operator =(const char *new_root);
- size_t length () const { return rootlen; }
- const char *path () const { return root; }
-};
-
-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 */
- PSID psid; /* buffer for user's SID */
-public:
- uid_t orig_uid; /* Remains intact even after impersonation */
- uid_t orig_gid; /* Ditto */
- uid_t real_uid; /* Remains intact on seteuid, replaced by setuid */
- gid_t real_gid; /* Ditto */
-
- /* token is needed if set(e)uid should be called. It can be set by a call
- to `set_impersonation_token()'. */
- HANDLE token;
- BOOL impersonated;
-
- cygheap_user () : pname (NULL), plogsrv (NULL), pdomain (NULL), psid (NULL) {}
- ~cygheap_user ();
-
- void set_name (const char *new_name);
- const char *name () const { return pname; }
-
- void set_logsrv (const char *new_logsrv);
- const char *logsrv () const { return plogsrv; }
-
- void set_domain (const char *new_domain);
- const char *domain () const { return pdomain; }
-
- BOOL set_sid (PSID new_sid);
- PSID sid () const { return psid; }
-
- void operator =(cygheap_user &user)
- {
- set_name (user.name ());
- set_logsrv (user.logsrv ());
- set_domain (user.domain ());
- set_sid (user.sid ());
- }
-};
-
-struct init_cygheap
-{
- _cmalloc_entry *chain;
- cygheap_root root;
- cygheap_user user;
- mode_t umask;
-};
-
-extern init_cygheap *cygheap;
-extern void *cygheap_max;
-
-extern "C" {
-void __stdcall cfree (void *) __attribute__ ((regparm(1)));
-void __stdcall cygheap_fixup_in_child (HANDLE, bool);
-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)));
-char *__stdcall cstrdup (const char *) __attribute__ ((regparm(1)));
-char *__stdcall cstrdup1 (const char *) __attribute__ ((regparm(1)));
-void __stdcall cygheap_init ();
-}
diff --git a/winsup/cygwin/cygrun.c b/winsup/cygwin/cygrun.c
deleted file mode 100644
index 8aa3e30a1..000000000
--- a/winsup/cygwin/cygrun.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* cygrun.c: testsuite support program
-
- Copyright 1999 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* 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>
-
-int
-main(int argc, char **argv)
-{
- STARTUPINFO sa;
- PROCESS_INFORMATION pi;
- DWORD ec = 1;
-
- if (argc < 2)
- {
- fprintf(stderr, "Usage: cygrun [program]\n");
- exit (0);
- }
-
- setenv("CYGWIN_TESTING", "1");
- SetEnvironmentVariable("CYGWIN_TESTING", "1");
-
- 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);
- return ec;
-}
diff --git a/winsup/cygwin/cygwin.din b/winsup/cygwin/cygwin.din
deleted file mode 100644
index 8bb86ecea..000000000
--- a/winsup/cygwin/cygwin.din
+++ /dev/null
@@ -1,1104 +0,0 @@
-LIBRARY "cygwin1.dll" BASE=0x61000000
-
-EXPORTS
-__assert
-__eprintf
-__errno
-__infinity
-__main
-__srget
-__swbuf
-; __vc__10pinfo_listi
-@ALLOCA@
-cygwin_stackdump
-abort
-_abort = abort
-abs
-_abs = abs
-access
-_access = access
-acos
-_acos = acos
-acosf
-_acosf = acosf
-acosh
-_acosh = acosh
-acoshf
-_acoshf = acoshf
-alarm
-_alarm = alarm
-alphasort
-_alphasort = alphasort
-asctime
-_asctime = asctime
-asin
-_asin = asin
-asinf
-_asinf = asinf
-asinh
-_asinh = asinh
-asinhf
-_asinhf = asinhf
-atan
-_atan = atan
-atan2
-_atan2 = atan2
-atan2f
-_atan2f = atan2f
-atanf
-_atanf = atanf
-atanh
-_atanh = atanh
-atanhf
-_atanhf = atanhf
-atexit
-_atexit = atexit
-atof
-_atof = atof
-atoff
-_atoff = atoff
-atoi
-_atoi = atoi
-atol
-_atol = atol
-bcmp
-_bcmp = bcmp
-bcopy
-_bcopy = bcopy
-bsearch
-_bsearch = bsearch
-bzero
-_bzero = bzero
-cabs
-_cabs = cabs
-cabsf
-_cabsf = cabsf
-calloc = export_calloc
-_calloc = export_calloc
-cbrt
-_cbrt = cbrt
-cbrtf
-_cbrtf = cbrtf
-ceil
-_ceil = ceil
-ceilf
-_ceilf = ceilf
-cfgetospeed
-cfgetispeed
-cfsetospeed
-cfsetispeed
-chdir
-_chdir = chdir
-chmod
-_chmod = chmod
-chown
-_chown = chown
-cleanup_glue
-clearerr
-_clearerr = clearerr
-clock
-_clock = clock
-close
-_close = close
-closedir
-_closedir = closedir
-copysign
-_copysign = copysign
-copysignf
-_copysignf = copysignf
-cos
-_cos = cos
-cosf
-_cosf = cosf
-cosh
-_cosh = cosh
-coshf
-_coshf = coshf
-creat
-_creat = creat
-ctime
-_ctime = ctime
-cwait
-_cwait = cwait
-difftime
-_difftime = difftime
-div
-_div = div
-_dll_crt0@0
-dll_crt0__FP11per_process
-cygwin_dll_init
-dll_dllcrt0
-dll_noncygwin_dllcrt0
-cygwin_detach_dll
-cygwin32_detach_dll = cygwin_detach_dll
-@DEF_DLL_ENTRY@
-drem
-_drem = drem
-dremf
-_dremf = dremf
-dup
-_dup = dup
-dup2
-_dup2 = dup2
-ecvt
-_ecvt = ecvt
-ecvtbuf
-_ecvtbuf = ecvtbuf
-ecvtf
-_ecvtf = ecvtf
-endgrent
-_endgrent = endgrent
-erf
-_erf = erf
-erfc
-_erfc = erfc
-erfcf
-_erfcf = erfcf
-erff
-_erff = erff
-execl
-_execl = execl
-execle
-_execle = execle
-execlp
-_execlp = execlp
-execv
-_execv = execv
-execve
-_execve = execve
-execvp
-_execvp = execvp
-exit
-_exit
-exp
-_exp = exp
-expf
-_expf = expf
-expm1
-_expm1 = expm1
-expm1f
-_expm1f = expm1f
-fabs
-_fabs = fabs
-fabsf
-_fabsf = fabsf
-_f_atan2
-__f_atan2 = _f_atan2
-_f_atan2f
-__f_atan2f = _f_atan2f
-fchmod
-_fchmod = fchmod
-fchown
-_fchown = fchown
-fclose
-_fclose = fclose
-fcntl
-_fcntl = fcntl
-fcvt
-_fcvt = fcvt
-fcvtbuf
-_fcvtbuf = fcvtbuf
-fcvtf
-_fcvtf = fcvtf
-fdopen
-_fdopen = fdopen
-feof
-_feof = feof
-ferror
-_ferror = ferror
-_f_exp
-__f_exp = _f_exp
-_f_expf
-__f_expf = _f_expf
-fflush
-_fflush = fflush
-_f_frexp
-__f_frexp = _f_frexp
-_f_frexpf
-__f_frexpf = _f_frexpf
-fgetc
-_fgetc = fgetc
-fgetpos
-_fgetpos = fgetpos
-fgets
-_fgets = fgets
-ffs
-_ffs = ffs
-fileno
-_fileno = fileno
-finite
-_finite = finite
-finitef
-_finitef = finitef
-fiprintf
-_fiprintf = fiprintf
-_f_ldexp
-__f_ldexp = _f_ldexp
-_f_ldexpf
-__f_ldexpf = _f_ldexpf
-_f_log
-__f_log = _f_log
-_f_logf
-__f_logf = _f_logf
-_f_log10
-__f_log10 = _f_log10
-_f_log10f
-__f_log10f = _f_log10f
-floor
-_floor = floor
-floorf
-_floorf = floorf
-fmod
-_fmod = fmod
-fmodf
-_fmodf = fmodf
-fopen
-_fopen = fopen
-fork
-_fork = fork
-fpathconf
-_f_pow
-__f_pow = _f_pow
-_f_powf
-__f_powf = _f_powf
-fprintf
-_fprintf = fprintf
-fputc
-_fputc = fputc
-fputs
-_fputs = fputs
-fread
-_fread = fread
-free = export_free
-_free = export_free
-freopen
-_freopen = freopen
-frexp
-_frexp = frexp
-frexpf
-_frexpf = frexpf
-fscanf
-_fscanf = fscanf
-fseek
-_fseek = fseek
-fsetpos
-_fsetpos = fsetpos
-fstat
-_fstat = fstat
-fstatfs
-_fstatfs = fstatfs
-fsync
-_fsync = fsync
-_f_tan
-__f_tan = _f_tan
-_f_tanf
-__f_tanf = _f_tanf
-ftell
-_ftell = ftell
-ftime
-_ftime = ftime
-ftruncate
-_ftruncate = ftruncate
-fwrite
-_fwrite = fwrite
-gamma
-_gamma = gamma
-gammaf
-_gammaf = gammaf
-gcvt
-_gcvt = gcvt
-gcvtf
-_gcvtf = gcvtf
-getc
-_getc = getc
-getchar
-_getchar = getchar
-getcwd
-_getcwd = getcwd
-getdtablesize
-_getdtablesize = getdtablesize
-getegid
-_getegid = getegid
-geteuid
-_geteuid = geteuid
-getgid
-_getgid = getgid
-getgrgid
-_getgrgid = getgrgid
-getgrnam
-_getgrnam = getgrnam
-getgroups
-_getgroups = getgroups
-gethostname = cygwin_gethostname
-_gethostname = cygwin_gethostname
-getlogin
-_getlogin = getlogin
-getmntent
-_getmntent = getmntent
-getmode
-_getmode = getmode
-get_osfhandle
-_get_osfhandle = get_osfhandle
-getpagesize
-_getpagesize = getpagesize
-getpass
-_getpass = getpass
-getpid
-_getpid = getpid
-getppid
-_getppid = getppid
-getrusage
-_getrusage = getrusage
-gets
-_gets = gets
-gettimeofday
-_gettimeofday = gettimeofday
-getuid
-_getuid = getuid
-glob
-_glob = glob
-globfree
-_globfree = globfree
-gmtime
-_gmtime = gmtime
-h_errno DATA
-hypot
-_hypot = hypot
-hypotf
-_hypotf = hypotf
-ilogb
-_ilogb = ilogb
-ilogbf
-_ilogbf = ilogbf
-index
-_index = index
-infinity
-_infinity = infinity
-infinityf
-_infinityf = infinityf
-initgroups
-ioctl
-_ioctl = ioctl
-iprintf
-_iprintf = iprintf
-isalnum
-_isalnum = isalnum
-isalpha
-_isalpha = isalpha
-isascii
-_isascii = isascii
-isatty
-_isatty = isatty
-iscntrl
-_iscntrl = iscntrl
-isdigit
-_isdigit = isdigit
-isgraph
-_isgraph = isgraph
-isinf
-_isinf = isinf
-isinff
-_isinff = isinff
-islower
-_islower = islower
-isnan
-_isnan = isnan
-isnanf
-_isnanf = isnanf
-isprint
-_isprint = isprint
-ispunct
-_ispunct = ispunct
-isspace
-_isspace = isspace
-isupper
-_isupper = isupper
-isxdigit
-_isxdigit = isxdigit
-j0
-_j0 = j0
-j0f
-_j0f = j0f
-j1
-_j1 = j1
-j1f
-_j1f = j1f
-jn
-_jn = jn
-jnf
-_jnf = jnf
-kill
-_kill = kill
-labs
-_labs = labs
-lchown
-_lchown = lchown
-ldexp
-_ldexp = ldexp
-ldexpf
-_ldexpf = ldexpf
-ldiv
-_ldiv = ldiv
-lgamma
-_lgamma = lgamma
-lgammaf
-_lgammaf = lgammaf
-link
-_link = link
-localeconv
-_localeconv = localeconv
-localtime
-_localtime = localtime
-log
-_log = log
-log10
-_log10 = log10
-log10f
-_log10f = log10f
-log1p
-_log1p = log1p
-log1pf
-_log1pf = log1pf
-logb
-_logb = logb
-logbf
-_logbf = logbf
-logf
-_logf = logf
-login
-logout
-longjmp
-_longjmp = longjmp
-lseek
-_lseek = lseek
-lstat
-_lstat = lstat
-malloc = export_malloc
-_malloc = export_malloc
-matherr
-_matherr = matherr
-mblen
-_mblen = mblen
-mbstowcs
-_mbstowcs = mbstowcs
-mbtowc
-_mbtowc = mbtowc
-memchr
-_memchr = memchr
-memcmp
-_memcmp = memcmp
-memcpy
-_memcpy = memcpy
-memmove
-_memmove = memmove
-memset
-_memset = memset
-mkdir
-_mkdir = mkdir
-mknod
-_mknod = mknod
-mkstemp
-_mkstemp = mkstemp
-mktemp
-_mktemp = mktemp
-mktime
-_mktime = mktime
-mmap
-mprotect
-msync
-munmap
-modf
-_modf = modf
-modff
-_modff = modff
-nan
-_nan = nan
-nanf
-_nanf = nanf
-nextafter
-_nextafter = nextafter
-nextafterf
-_nextafterf = nextafterf
-open
-_open = open
-opendir
-_opendir = opendir
-pathconf
-_pathconf = pathconf
-perror
-_perror = perror
-pipe
-_pipe
-poll
-_poll = poll
-pow
-_pow = pow
-powf
-_powf = powf
-printf
-_printf = printf
-putc
-_putc = putc
-putchar
-_putchar = putchar
-puts
-_puts = puts
-putw
-_putw = putw
-qsort
-_qsort = qsort
-raise
-_raise = raise
-rand
-_rand = rand
-random
-initstate
-setstate
-read
-_read = read
-readdir
-_readdir = readdir
-readlink
-_readlink = readlink
-readv
-_readv = readv
-realloc = export_realloc
-_realloc = export_realloc
-regcomp
-_regcomp = regcomp
-regexec
-_regexec = regexec
-regerror
-_regerror = regerror
-regfree
-_regfree = regfree
-regsub
-_regsub = regsub
-remainder
-_remainder = remainder
-remainderf
-_remainderf = remainderf
-remove
-_remove = remove
-rename
-_rename = rename
-rewind
-_rewind = rewind
-rewinddir
-_rewinddir = rewinddir
-rindex
-_rindex = rindex
-rint
-_rint = rint
-rintf
-_rintf = rintf
-rmdir
-_rmdir = rmdir
-sbrk
-_sbrk = sbrk
-scalb
-_scalb = scalb
-scalbf
-_scalbf = scalbf
-scalbn
-_scalbn = scalbn
-scalbnf
-_scalbnf = scalbnf
-scandir
-_scandir = scandir
-scanf
-_scanf = scanf
-seekdir
-_seekdir = seekdir
-setbuf
-_setbuf = setbuf
-setdtablesize
-_setdtablesize = setdtablesize
-setgid
-_setgid = setgid
-setjmp
-_setjmp = setjmp
-setlocale
-_setlocale = setlocale
-setpgid
-_setpgid = setpgid
-setsid
-_setsid = setsid
-settimeofday
-_settimeofday = settimeofday
-seteuid
-_seteuid = seteuid
-setegid
-_setegid = setegid
-setuid
-_setuid = setuid
-chroot
-_chroot = chroot
-setvbuf
-_setvbuf = setvbuf
-sigaction
-_sigaction = sigaction
-sigaddset
-_sigaddset = sigaddset
-sigdelset
-_sigdelset = sigdelset
-sigismember
-_sigismember = sigismember
-sigemptyset
-_sigemptyset = sigemptyset
-sigfillset
-_sigfillset = sigfillset
-signal
-_signal = signal
-significand
-_significand = significand
-significandf
-_significandf = significandf
-sigpending
-_sigpending = sigpending
-sigprocmask
-_sigprocmask = sigprocmask
-sigsuspend
-_sigsuspend = sigsuspend
-sin
-_sin = sin
-sinf
-_sinf = sinf
-sinh
-_sinh = sinh
-sinhf
-_sinhf = sinhf
-siprintf
-_siprintf = siprintf
-sleep
-_sleep = sleep
-spawnl
-_spawnl = spawnl
-spawnle
-_spawnle = spawnle
-spawnlp
-_spawnlp = spawnlp
-spawnlpe
-_spawnlpe = spawnlpe
-spawnv
-_spawnv = spawnv
-spawnve
-_spawnve = spawnve
-spawnvp
-_spawnvp = spawnvp
-spawnvpe
-_spawnvpe = spawnvpe
-sprintf
-_sprintf = sprintf
-snprintf
-_snprintf = snprintf
-sqrt
-_sqrt = sqrt
-sqrtf
-_sqrtf = sqrtf
-srand
-_srand = srand
-srandom
-sscanf
-_sscanf = sscanf
-stat
-_stat = stat
-statfs
-_statfs = statfs
-strcasecmp
-_strcasecmp = strcasecmp
-strcat
-_strcat = strcat
-strchr
-_strchr = strchr
-strcmp
-_strcmp = strcmp
-strcoll
-_strcoll = strcoll
-strcpy
-_strcpy = strcpy
-strcspn
-_strcspn = strcspn
-strdup
-_strdup = strdup
-strerror
-_strerror = strerror
-strlen
-_strlen = strlen
-strlwr
-_strlwr = strlwr
-strncasecmp
-_strncasecmp = strncasecmp
-strncat
-_strncat = strncat
-strncmp
-_strncmp = strncmp
-strncpy
-_strncpy = strncpy
-strpbrk
-_strpbrk = strpbrk
-strrchr
-_strrchr = strrchr
-strspn
-_strspn = strspn
-strstr
-_strstr = strstr
-strtod
-_strtod = strtod
-strtodf
-_strtodf = strtodf
-strtok
-_strtok = strtok
-strtok_r
-_strtok_r = strtok_r
-strtol
-_strtol = strtol
-strtoul
-_strtoul = strtoul
-strupr
-_strupr = strupr
-strxfrm
-_strxfrm = strxfrm
-swab
-_swab = swab
-symlink
-_symlink = symlink
-sync
-_sync = sync
-sysconf
-_sysconf = sysconf
-system
-_system = system
-tan
-_tan = tan
-tanf
-_tanf = tanf
-tanh
-_tanh = tanh
-tanhf
-_tanhf = tanhf
-tcdrain
-_tcdrain = tcdrain
-tcflow
-_tcflow = tcflow
-tcflush
-_tcflush = tcflush
-tcgetattr
-_tcgetattr = tcgetattr
-tcgetpgrp
-_tcgetpgrp = tcgetpgrp
-tcsendbreak
-_tcsendbreak = tcsendbreak
-tcsetattr
-_tcsetattr = tcsetattr
-tcsetpgrp
-_tcsetpgrp = tcsetpgrp
-telldir
-_telldir = telldir
-tempnam
-_tempnam = tempnam
-time
-_time = time
-times
-_times = times
-timezone
-tmpfile
-_tmpfile = tmpfile
-tmpnam
-_tmpnam = tmpnam
-toascii
-_toascii = toascii
-tolower
-_tolower = tolower
-toupper
-_toupper = toupper
-truncate
-_truncate = truncate
-ttyname
-_ttyname = ttyname
-tzset
-_tzset = tzset
-umask
-_umask = umask
-uname
-_uname = uname
-ungetc
-_ungetc = ungetc
-unlink
-_unlink = unlink
-utime
-_utime = utime
-utimes
-_utimes = utimes
-vfiprintf
-_vfiprintf = vfiprintf
-vfork
-_vfork = vfork
-vfprintf
-_vfprintf = vfprintf
-vprintf
-_vprintf = vprintf
-vsprintf
-_vsprintf = vsprintf
-vsnprintf
-_vsnprintf = vsnprintf
-wait
-_wait = wait
-waitpid
-_waitpid = waitpid
-wait3
-wait4
-wcstombs
-_wcstombs = wcstombs
-wctomb
-_wctomb = wctomb
-write
-_write = write
-writev
-_writev = writev
-y0
-y0f
-y1
-y1f
-yn
-ynf
-setmode
-_setmode = setmode
-__assertfail
-getw
-_getw = getw
-getwd
-_getwd = getwd
-popen
-_popen = popen
-pclose
-_pclose = pclose
-strftime
-_strftime = strftime
-setgrent
-_setgrent = setgrent
-cuserid
-_cuserid = cuserid
-setpgrp
-_setpgrp = setpgrp
-mount
-_mount = mount
-setmntent
-_setmntent = setmntent
-endmntent
-_endmntent = endmntent
-umount
-_umount = umount
-wcscmp
-_wcscmp = wcscmp
-wcslen
-_wcslen = wcslen
-usleep
-_usleep = usleep
-wprintf
-_wprintf = wprintf
-memccpy
-_memccpy = memccpy
-getpwent
-_getpwent = getpwent
-endpwent
-_endpwent = endpwent
-setpwent
-_setpwent = setpwent
-getpwduid
-_getpwduid = getpwduid
-getpwnam
-_getpwnam = getpwnam
-getpwuid
-_getpwuid = getpwuid
-getpgrp
-_getpgrp = getpgrp
-getgrent
-_getgrent = getgrent
-__empty
-ntohl
-_ntohl = ntohl
-htonl
-_htonl = htonl
-htons
-_htons = htons
-ntohs
-_ntohs = ntohs
-accept = cygwin_accept
-bind = cygwin_bind
-connect = cygwin_connect
-hstrerror = cygwin_hstrerror
-herror = cygwin_herror
-inet_addr = cygwin_inet_addr
-inet_network = cygwin_inet_network
-inet_netof
-inet_makeaddr
-listen = cygwin_listen
-getdomainname
-_getdomainname = getdomainname
-gethostbyaddr = cygwin_gethostbyaddr
-gethostbyname = cygwin_gethostbyname
-getpeername = cygwin_getpeername
-getprotobyname = cygwin_getprotobyname
-getprotobynumber = cygwin_getprotobynumber
-getservbyname = cygwin_getservbyname
-getservbyport = cygwin_getservbyport
-getsockname = cygwin_getsockname
-getsockopt = cygwin_getsockopt
-recv = cygwin_recv
-select = cygwin_select
-_select = cygwin_select
-send = cygwin_send
-socket = cygwin_socket
-setsockopt = cygwin_setsockopt
-inet_aton = cygwin_inet_aton
-inet_ntoa = cygwin_inet_ntoa
-recvfrom = cygwin_recvfrom
-sendto = cygwin_sendto
-shutdown = cygwin_shutdown
-sethostent
-endhostent
-setpassent
-_setpassent = setpassent
-strsep
-_strsep = strsep
-syslog
-_syslog = syslog
-closelog
-_closelog = closelog
-openlog
-_openlog = openlog
-vhangup
-_vhangup = vhangup
-nice
-_nice = nice
-cygwin_getshared
-cygwin32_getshared = cygwin_getshared
-cygwin_conv_to_win32_path
-cygwin_conv_to_full_win32_path
-cygwin_conv_to_posix_path
-cygwin_conv_to_full_posix_path
-cygwin_posix_path_list_p
-cygwin_win32_to_posix_path_list_buf_size
-cygwin_posix_to_win32_path_list_buf_size
-cygwin_win32_to_posix_path_list
-cygwin_posix_to_win32_path_list
-cygwin_split_path
-cygwin_umount
-cygwin32_conv_to_win32_path = cygwin_conv_to_win32_path
-cygwin32_conv_to_full_win32_path = cygwin_conv_to_full_win32_path
-cygwin32_conv_to_posix_path = cygwin_conv_to_posix_path
-cygwin32_conv_to_full_posix_path = cygwin_conv_to_full_posix_path
-cygwin32_posix_path_list_p = cygwin_posix_path_list_p
-cygwin32_win32_to_posix_path_list_buf_size = cygwin_win32_to_posix_path_list_buf_size
-cygwin32_posix_to_win32_path_list_buf_size = cygwin_posix_to_win32_path_list_buf_size
-cygwin32_win32_to_posix_path_list = cygwin_win32_to_posix_path_list
-cygwin32_posix_to_win32_path_list = cygwin_posix_to_win32_path_list
-cygwin32_split_path = cygwin_split_path
-cygwin_winpid_to_pid
-cygwin32_winpid_to_pid = cygwin_winpid_to_pid
-cygwin_logon_user
-cygwin_set_impersonation_token
-realpath
-reent_data DATA
-getenv
-_getenv = getenv
-putenv
-_putenv = putenv
-setenv
-_setenv = setenv
-unsetenv
-_unsetenv = unsetenv
-setitimer
-getitimer
-getpgid
-killpg
-pause
-__cygwin_environ DATA
-__cygwin_user_data DATA
-_ctype_ DATA
-_sys_errlist DATA
-_sys_nerr DATA
-__mb_cur_max DATA
-_timezone DATA
-_daylight DATA
-_tzname DATA
-ptsname
-grantpt
-unlockpt
-sexecve
-sexecl
-sexecle
-sexeclp
-sexeclpe
-sexecv
-sexecp
-sexecvpe
-ttyslot
-rcmd = cygwin_rcmd
-rresvport = cygwin_rresvport
-rexec = cygwin_rexec
-socketpair
-strsignal
-strtosigno
-ctermid
-dlopen
-dlclose
-dlsym
-dlerror
-dlfork
-sigpause
-cygwin_attach_handle_to_fd
-cygwin32_attach_handle_to_fd = cygwin_attach_handle_to_fd
-cygwin_internal
-cygwin32_internal = cygwin_internal
-@PTH_ALLOW@pthread_create
-@PTH_ALLOW@pthread_attr_init
-@PTH_ALLOW@pthread_attr_destroy
-@PTH_ALLOW@pthread_attr_setstacksize
-@PTH_ALLOW@pthread_attr_getstacksize
-@PTH_ALLOW@pthread_exit
-@PTH_ALLOW@pthread_join
-@PTH_ALLOW@pthread_detach
-@PTH_ALLOW@pthread_suspend
-@PTH_ALLOW@pthread_continue
-@PTH_ALLOW@pthread_key_create
-@PTH_ALLOW@pthread_key_delete
-@PTH_ALLOW@pthread_setspecific
-@PTH_ALLOW@pthread_getspecific
-@PTH_ALLOW@pthread_kill
-@PTH_ALLOW@pthread_sigmask
-@PTH_ALLOW@pthread_self
-@PTH_ALLOW@pthread_equal
-@PTH_ALLOW@pthread_mutex_init
-@PTH_ALLOW@pthread_mutex_lock
-@PTH_ALLOW@pthread_mutex_trylock
-@PTH_ALLOW@pthread_mutex_unlock
-@PTH_ALLOW@pthread_mutex_destroy
-@PTH_ALLOW@sem_init
-@PTH_ALLOW@sem_destroy
-@PTH_ALLOW@sem_wait
-@PTH_ALLOW@sem_trywait
-@PTH_ALLOW@sem_post
-acl
-_acl = acl
-facl
-_facl = facl
-lacl
-_lacl = lacl
-aclcheck
-_aclcheck = aclcheck
-aclsort
-_aclsort = aclsort
-acltomode
-_acltomode = acltomode
-aclfrommode
-_aclfrommode = aclfrommode
-acltopbits
-_acltopbits = acltopbits
-aclfrompbits
-_aclfrompbits = aclfrompbits
-acltotext
-_acltotext = acltotext
-aclfromtext
-_aclfromtext = aclfromtext
diff --git a/winsup/cygwin/cygwin_version.h b/winsup/cygwin/cygwin_version.h
deleted file mode 100644
index e6d775842..000000000
--- a/winsup/cygwin/cygwin_version.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* cygwin_version.h: shared info for cygwin
-
- Copyright 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <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 d4a6bb952..000000000
--- a/winsup/cygwin/dcrt0.cc
+++ /dev/null
@@ -1,1110 +0,0 @@
-/* dcrt0.cc -- essentially the main() for the Cygwin dll
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <unistd.h>
-#include <stdlib.h>
-#include "glob.h"
-#include "exceptions.h"
-#include <ctype.h>
-#include <limits.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "cygheap.h"
-#include "heap.h"
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "child_info.h"
-#define NEED_VFORK
-#include "perthread.h"
-#include "path.h"
-#include "dtable.h"
-#include "shared_info.h"
-#include "cygwin_version.h"
-#include "perprocess.h"
-#include "dll_init.h"
-#include "host_dependent.h"
-#include "security.h"
-
-#define MAX_AT_FILE_LEVEL 10
-
-#define PREMAIN_LEN (sizeof(user_data->premain) / sizeof (user_data->premain[0]))
-
-HANDLE NO_COPY hMainProc = NULL;
-HANDLE NO_COPY hMainThread = NULL;
-
-sigthread NO_COPY mainthread; // ID of the main thread
-
-per_thread_waitq NO_COPY waitq_storage;
-per_thread_vfork NO_COPY vfork_storage;
-per_thread_signal_dispatch NO_COPY signal_dispatch_storage;
-
-per_thread NO_COPY *threadstuff[] = {&waitq_storage,
- &vfork_storage,
- &signal_dispatch_storage,
- NULL};
-
-BOOL display_title = FALSE;
-BOOL strip_title_path = FALSE;
-BOOL allow_glob = TRUE;
-codepage_type current_codepage = ansi_cp;
-
-int cygwin_finished_initializing = 0;
-
-/* Used in SIGTOMASK for generating a bit for insertion into a sigset_t.
- This is subtracted from the signal number prior to shifting the bit.
- In older versions of cygwin, the signal was used as-is to shift the
- bit for masking. So, we'll temporarily detect this and set it to zero
- for programs that are linked using older cygwins. This is just a stopgap
- measure to allow an orderly transfer to the new, correct sigmask method. */
-unsigned int signal_shift_subtract = 1;
-
-ResourceLocks _reslock NO_COPY;
-MTinterface _mtinterf NO_COPY;
-
-extern "C"
-{
- void *export_malloc (unsigned int);
- void export_free (void *);
- void *export_realloc (void *, unsigned int);
- void *export_calloc (unsigned int, unsigned int);
-
- /* This is an exported copy of environ which can be used by DLLs
- which use cygwin.dll. */
- char **__cygwin_environ;
- char ***main_environ;
- /* __progname used in getopt error message */
- char *__progname = NULL;
- struct _reent reent_data;
- 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 */ export_malloc, /* free */ export_free,
- /* realloc */ export_realloc,
- /* fmode_ptr */ NULL, /* main */ NULL, /* ctors */ NULL,
- /* dtors */ NULL, /* data_start */ NULL, /* data_end */ NULL,
- /* bss_start */ NULL, /* bss_end */ NULL,
- /* calloc */ export_calloc,
- /* premain */ {NULL, NULL, NULL, NULL},
- /* run_ctors_p */ 0,
- /* unused */ { 0, 0, 0},
- /* heapbase */ NULL, /* heapptr */ NULL, /* heaptop */ NULL,
- /* unused1 */ 0, /* forkee */ 0, /* hmodule */ NULL,
- /* api_major */ CYGWIN_VERSION_API_MAJOR,
- /* api_minor */ CYGWIN_VERSION_API_MINOR,
- /* unused2 */ {0, 0, 0, 0, 0},
- /* resourcelocks */ &_reslock, /* threadinterface */ &_mtinterf,
- /* impure_ptr */ &reent_data,
- };
- BOOL ignore_case_with_glob = FALSE;
-};
-
-char *old_title = NULL;
-char title_buf[TITLESIZE + 1];
-
-static void
-do_global_dtors (void)
-{
- if (user_data->dtors)
- {
- void (**pfunc)() = user_data->dtors;
- while (*++pfunc)
- (*pfunc) ();
- }
-}
-
-static void __stdcall
-do_global_ctors (void (**in_pfunc)(), int force)
-{
- if (!force)
- {
- if (user_data->forkee || user_data->run_ctors_p)
- return; // inherit constructed stuff from parent pid
- user_data->run_ctors_p = 1;
- }
-
- /* 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) ();
-
- if (user_data->magic_biscuit == SIZEOF_PER_PROCESS)
- atexit (do_global_dtors);
-}
-
-/* remember the type of Win32 OS being run for future use. */
-os_type NO_COPY os_being_run;
-char NO_COPY osname[40];
-
-/* set_os_type: Set global variable os_being_run with type of Win32
- operating system being run. This information is used internally
- to manage the inconsistency in Win32 API calls between Win32 OSes. */
-/* Cygwin internal */
-static void
-set_os_type ()
-{
- OSVERSIONINFO os_version_info;
- const char *os;
-
- memset (&os_version_info, 0, sizeof os_version_info);
- os_version_info.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
- GetVersionEx (&os_version_info);
-
- switch (os_version_info.dwPlatformId)
- {
- case VER_PLATFORM_WIN32_NT:
- os_being_run = winNT;
- os = "NT";
- break;
- case VER_PLATFORM_WIN32_WINDOWS:
- if (os_version_info.dwMinorVersion == 0)
- {
- os_being_run = win95;
- os = "95";
- }
- else if (os_version_info.dwMinorVersion < 90)
- {
- os_being_run = win98;
- os = "98";
- }
- else /* os_version_info.dwMinorVersion == 90 */
- {
- os_being_run = winME;
- os = "ME";
- }
- break;
- default:
- os_being_run = unknown;
- os = "??";
- break;
- }
- __small_sprintf (osname, "%s-%d.%d", os, os_version_info.dwMajorVersion,
- os_version_info.dwMinorVersion);
-}
-
-host_dependent_constants NO_COPY host_dependent;
-
-/* Constructor for host_dependent_constants. */
-
-void
-host_dependent_constants::init ()
-{
- extern DWORD chunksize;
- /* fhandler_disk_file::lock needs a platform specific upper word
- value for locking entire files.
-
- fhandler_base::open requires host dependent file sharing
- attributes. */
-
- switch (os_being_run)
- {
- case winNT:
- win32_upper = 0xffffffff;
- shared = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE;
- break;
-
- case winME:
- case win98:
- case win95:
- case win32s:
- win32_upper = 0x00000000;
- shared = FILE_SHARE_READ | FILE_SHARE_WRITE;
- chunksize = 32 * 1024 * 1024;
- break;
-
- default:
- api_fatal ("unrecognized system type");
- }
-}
-
-/*
- * 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 int __stdcall
-insert_file (char *name, char *&cmd)
-{
- HANDLE f;
- DWORD size;
-
- f = CreateFile (name + 1,
- GENERIC_READ, /* open for reading */
- FILE_SHARE_READ, /* share for reading */
- &sec_none_nih, /* no 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 = strchr (cmd, quote)) != NULL)
- strcpy (p, p + 1);
- else
- p = strchr (cmd, '\0');
- 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", 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'\n", 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);
-
- if (CYGWIN_VERSION_DLL_MAKE_COMBINED (p->dll_major, p->dll_minor) <=
- CYGWIN_VERSION_DLL_BAD_SIGNAL_MASK)
- signal_shift_subtract = 0;
-}
-
-static NO_COPY STARTUPINFO si;
-# define fork_info ((struct child_info_fork *)(si.lpReserved2))
-# define spawn_info ((struct child_info_spawn *)(si.lpReserved2))
-child_info_fork NO_COPY *child_proc_info = NULL;
-static MEMORY_BASIC_INFORMATION sm;
-
-// __inline__ void
-extern void
-alloc_stack_hard_way (child_info_fork *ci, volatile char *b)
-{
- void *new_stack_pointer;
- MEMORY_BASIC_INFORMATION m;
- void *newbase;
- int newlen;
- LPBYTE curbot = (LPBYTE) sm.BaseAddress + sm.RegionSize;
- bool noguard;
-
- if (ci->stacktop > (LPBYTE) sm.AllocationBase && ci->stacktop < curbot)
- {
- newbase = curbot;
- newlen = (LPBYTE) ci->stackbottom - (LPBYTE) curbot;
- noguard = 1;
- }
- else
- {
- newbase = ci->stacktop;
- newlen = (DWORD) ci->stackbottom - (DWORD) ci->stacktop;
- noguard = 0;
- }
- if (!VirtualAlloc (newbase, newlen, MEM_RESERVE, PAGE_NOACCESS))
- api_fatal ("fork: can't reserve memory for stack %p - %p, %E",
- ci->stacktop, ci->stackbottom);
-
- new_stack_pointer = (void *) ((LPBYTE) ci->stackbottom - ci->stacksize);
-
- if (!VirtualAlloc (new_stack_pointer, ci->stacksize, MEM_COMMIT,
- PAGE_EXECUTE_READWRITE))
- api_fatal ("fork: can't commit memory for stack %p(%d), %E",
- new_stack_pointer, ci->stacksize);
- if (!VirtualQuery ((LPCVOID) new_stack_pointer, &m, sizeof m))
- api_fatal ("fork: couldn't get new stack info, %E");
- if (!noguard)
- {
- m.BaseAddress = (LPVOID)((DWORD)m.BaseAddress - 1);
- if (!VirtualAlloc ((LPVOID) m.BaseAddress, 1, MEM_COMMIT,
- PAGE_EXECUTE_READWRITE|PAGE_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");
- ci->stacktop = m.BaseAddress;
- *b = 0;
-}
-
-/* extend the stack prior to fork longjmp */
-
-static void
-alloc_stack (child_info_fork *ci)
-{
- /* FIXME: adding 16384 seems to avoid a stack copy problem during
- fork on Win95, but I don't know exactly why yet. DJ */
- volatile char b[ci->stacksize + 16384];
-
- if (ci->type == PROC_FORK)
- ci->stacksize = 0; // flag to fork not to do any funny business
- else
- {
- if (!VirtualQuery ((LPCVOID) &b, &sm, sizeof sm))
- api_fatal ("fork: couldn't get stack info, %E");
-
- if (sm.AllocationBase != ci->stacktop)
- alloc_stack_hard_way (ci, b + sizeof(b) - 1);
- else
- ci->stacksize = 0;
- }
-
- return;
-}
-
-static NO_COPY int mypid = 0;
-int _declspec(dllexport) __argc = 0;
-char _declspec(dllexport) **__argv = NULL;
-
-void
-sigthread::init (const char *s)
-{
- InitializeCriticalSection (&lock);
- id = GetCurrentThreadId ();
-}
-
-/* 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. */
-static void
-dll_crt0_1 ()
-{
- /* According to onno@stack.urc.tue.nl, the exception handler record must
- be on the stack. */
- /* FIXME: Verify forked children get their exception handler set up ok. */
- exception_list cygwin_except_entry;
-
- /* Initialize SIGSEGV handling, etc... Because the exception handler
- references data in the shared area, this must be done after
- shared_init. */
- init_exceptions (&cygwin_except_entry);
-
- do_global_ctors (&__CTOR_LIST__, 1);
-
- /* Set the os_being_run global. */
- set_os_type ();
- check_sanity_and_sync (user_data);
-
- /* Nasty static stuff needed by newlib -- point to a local copy of
- the reent stuff.
- Note: this MUST be done here (before the forkee code) as the
- fork copy code doesn't copy the data in libccrt0.cc (that's why we
- pass in the per_process struct into the .dll from libccrt0). */
-
- _impure_ptr = &reent_data;
-
- user_data->resourcelocks->Init ();
- user_data->threadinterface->Init (user_data->forkee);
-
- threadname_init ();
- debug_init ();
-
- regthread ("main", GetCurrentThreadId ());
- mainthread.init ("mainthread"); // For use in determining if signals
- // should be blocked.
-
- int envc = 0;
- char **envp = NULL;
-
- if (child_proc_info)
- {
- cygheap = child_proc_info->cygheap;
- cygheap_max = child_proc_info->cygheap_max;
- switch (child_proc_info->type)
- {
- case PROC_FORK:
- case PROC_FORK1:
- cygheap_fixup_in_child (child_proc_info->parent, 0);
- alloc_stack (fork_info);
- set_myself (mypid);
- user_data->heaptop = child_proc_info->heaptop;
- user_data->heapbase = child_proc_info->heapbase;
- user_data->heapptr = child_proc_info->heapptr;
- ProtectHandle (child_proc_info->forker_finished);
- break;
- case PROC_SPAWN:
- CloseHandle (spawn_info->hexec_proc);
- goto around;
- case PROC_EXEC:
- hexec_proc = spawn_info->hexec_proc;
- around:
- HANDLE h;
- cygheap_fixup_in_child (spawn_info->parent, 1);
- if (!spawn_info->moreinfo->myself_pinfo ||
- !DuplicateHandle (hMainProc, spawn_info->moreinfo->myself_pinfo,
- hMainProc, &h, 0, 0,
- DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE))
- h = NULL;
- set_myself (mypid, h);
- __argc = spawn_info->moreinfo->argc;
- __argv = spawn_info->moreinfo->argv;
- envp = spawn_info->moreinfo->envp;
- envc = spawn_info->moreinfo->envc;
- cygcwd.fixup_after_exec (spawn_info->moreinfo->cwd_win32,
- spawn_info->moreinfo->cwd_posix,
- spawn_info->moreinfo->cwd_hash);
- fdtab.fixup_after_exec (spawn_info->parent, spawn_info->moreinfo->nfds,
- spawn_info->moreinfo->fds);
- signal_fixup_after_exec (child_proc_info->type == PROC_SPAWN);
- CloseHandle (spawn_info->parent);
- if (spawn_info->moreinfo->old_title)
- {
- old_title = strcpy (title_buf, spawn_info->moreinfo->old_title);
- cfree (spawn_info->moreinfo->old_title);
- }
- ProtectHandle (child_proc_info->subproc_ready);
- myself->uid = spawn_info->moreinfo->uid;
- if (myself->uid == USHRT_MAX)
- cygheap->user.set_sid (NULL);
- break;
- }
- }
- ProtectHandle (hMainProc);
- ProtectHandle (hMainThread);
-
- /* Initialize the host dependent constants object. */
- host_dependent.init ();
-
- /* Initialize the cygwin subsystem if this is the first process,
- or attach to the shared data structure if it's already running. */
- shared_init ();
-
- (void) SetErrorMode (SEM_FAILCRITICALERRORS);
-
- /* Initialize the heap. */
- heap_init ();
-
- /* Initialize events. */
- events_init ();
-
- if (!child_proc_info)
- cygheap_init ();
-
- cygcwd.init ();
-
- cygbench ("pre-forkee");
- if (user_data->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)
- {
- asm ("movl %0,%%fs:4" : : "r" (fork_info->stackbottom));
- asm ("movl %0,%%fs:8" : : "r" (fork_info->stacktop));
- }
-
- longjmp (fork_info->jmp, fork_info->cygpid);
- }
-
-#ifdef DEBUGGING
- {
- extern void fork_init ();
- fork_init ();
- }
-#endif
-
- /* Initialize our process table entry. */
- pinfo_init (envp, envc);
-
- if (!old_title && GetConsoleTitle (title_buf, TITLESIZE))
- old_title = title_buf;
-
- /* Allocate fdtab */
- dtable_init ();
-
-/* Initialize uid, gid. */
- uinfo_init ();
-
- /* Initialize signal/subprocess handling. */
- sigproc_init ();
-
- /* Connect to tty. */
- tty_init ();
-
- /* Set up standard fds in file descriptor table. */
- stdio_init ();
-
- if (!__argc)
- {
- char *line = GetCommandLineA ();
- line = strcpy ((char *) alloca (strlen (line) + 1), line);
-
- if (current_codepage == oem_cp)
- CharToOemA ( line, line );
-
- /* 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 *) alloca (MAX_PATH);
- cygwin_conv_to_posix_path (__argv[0], new_argv0);
- char *p = strchr (new_argv0, '\0') - 4;
- if (p > new_argv0 && strcasematch (p, ".exe"))
- *p = '\0';
- __argv[0] = new_argv0;
- }
- }
-
- if (user_data->premain[0])
- for (unsigned int i = 0; i < PREMAIN_LEN / 2; i++)
- user_data->premain[i] (__argc, __argv);
-
- /* Set up __progname for getopt error call. */
- __progname = __argv[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 = 1;
- /* 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);
-
- 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;
-
- /* 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. */
- sig_send (NULL, __SIGFLUSH);
-
- set_errno (0);
-
- MALLOC_CHECK;
- cygbench (__progname);
- if (user_data->main)
- exit (user_data->main (__argc, __argv, *user_data->envptr));
-}
-
-/* Wrap the real one, otherwise gdb gets confused about
- two symbols with the same name, but different addresses.
-
- UPTR is a pointer to global data that lives on the libc side of the
- line [if one distinguishes the application from the dll]. */
-
-extern "C" void __stdcall
-_dll_crt0 ()
-{
-#ifdef DEBUGGING
- char buf[80];
- if (GetEnvironmentVariable ("CYGWIN_SLEEP", buf, sizeof (buf)))
- {
- small_printf ("Sleeping %d, pid %u\n", atoi (buf), GetCurrentProcessId ());
- Sleep (atoi(buf));
- }
-#endif
-
- char zeros[sizeof (fork_info->zero)] = {0};
-#ifdef DEBUGGING
- strace.microseconds ();
-#endif
-
- /* Set the os_being_run global. */
- set_os_type ();
-
- main_environ = user_data->envptr;
- *main_environ = NULL;
- user_data->heapbase = user_data->heapptr = user_data->heaptop = NULL;
-
- set_console_handler ();
- if (!DuplicateHandle (GetCurrentProcess (), GetCurrentProcess (),
- GetCurrentProcess (), &hMainProc, 0, FALSE,
- DUPLICATE_SAME_ACCESS))
- hMainProc = GetCurrentProcess ();
-
- DuplicateHandle (hMainProc, GetCurrentThread (), hMainProc,
- &hMainThread, 0, FALSE, DUPLICATE_SAME_ACCESS);
-
- GetStartupInfo (&si);
- if (si.cbReserved2 >= EXEC_MAGIC_SIZE &&
- memcmp (fork_info->zero, zeros, sizeof (zeros)) == 0)
- {
- switch (fork_info->type)
- {
- case PROC_FORK:
- case PROC_FORK1:
- user_data->forkee = fork_info->cygpid;
- case PROC_SPAWN:
- CloseHandle (fork_info->pppid_handle);
- case PROC_EXEC:
- {
- child_proc_info = fork_info;
- mypid = child_proc_info->cygpid;
- cygwin_shared_h = child_proc_info->shared_h;
- console_shared_h = child_proc_info->console_h;
- break;
- }
- default:
- if ((fork_info->type & PROC_MAGIC_MASK) == PROC_MAGIC_GENERIC)
- api_fatal ("conflicting versions of cygwin1.dll detected. Use only the most recent version.\n");
- }
- }
- dll_crt0_1 ();
-}
-
-void
-dll_crt0 (per_process *uptr)
-{
- /* Set the local copy of the pointer into the user space. */
- if (uptr && uptr != user_data)
- {
- memcpy (user_data, uptr, per_process_overwrite);
- *(user_data->impure_ptr_ptr) = &reent_data;
- }
- _dll_crt0 ();
-}
-
-/* This must be called by anyone who uses LoadLibrary to load cygwin1.dll */
-extern "C" void
-cygwin_dll_init ()
-{
- static char **envp;
- static int _fmode;
- user_data->heapbase = user_data->heapptr = user_data->heaptop = NULL;
-
- if (!DuplicateHandle (GetCurrentProcess (), GetCurrentProcess (),
- GetCurrentProcess (), &hMainProc, 0, FALSE,
- DUPLICATE_SAME_ACCESS))
- hMainProc = GetCurrentProcess ();
-
- DuplicateHandle (hMainProc, GetCurrentThread (), hMainProc,
- &hMainThread, 0, FALSE, DUPLICATE_SAME_ACCESS);
- user_data->magic_biscuit = sizeof (per_process);
-
- user_data->envptr = &envp;
- user_data->fmode_ptr = &_fmode;
-
- dll_crt0_1 ();
-}
-
-extern "C" void
-__main (void)
-{
- do_global_ctors (user_data->ctors, FALSE);
-}
-
-enum
- {
- ES_SIGNAL = 1,
- ES_CLOSEALL = 2,
- ES_SIGPROCTERMINATE = 3
- };
-
-extern "C" void __stdcall
-do_exit (int status)
-{
- UINT n = (UINT) status;
- static int NO_COPY exit_state = 0;
-
- syscall_printf ("do_exit (%d)", n);
-
- vfork_save *vf = vfork_storage.val ();
- if (vf != NULL && vf->pid < 0)
- {
- vf->pid = status < 0 ? status : -status;
- longjmp (vf->j, 1);
- }
-
- if (exit_state < ES_SIGNAL)
- {
- exit_state = ES_SIGNAL;
- if (!(n & EXIT_REPARENTING))
- {
- 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 ();
- }
-
- if (exit_state < ES_SIGPROCTERMINATE)
- {
- exit_state = ES_SIGPROCTERMINATE;
- sigproc_terminate ();
- }
-
- if (n & EXIT_REPARENTING)
- n &= ~EXIT_REPARENTING;
- else
- {
- myself->stopsig = 0;
-
- /* restore console title */
- if (old_title && display_title)
- set_console_title (old_title);
-
- /* Kill orphaned children on group leader exit */
- if (myself->has_pgid_children && myself->pid == myself->pgid)
- {
- sigproc_printf ("%d == pgrp %d, send SIG{HUP,CONT} to stopped children",
- myself->pid, myself->pgid);
- kill_pgrp (myself->pgid, -SIGHUP);
- }
-
- /* Kill the foreground process group on session leader exit */
- if (getpgrp () > 0 && myself->pid == myself->sid && 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)
- kill_pgrp (tp->getpgid (), SIGHUP);
- }
-
- tty_terminate ();
- }
-
- window_terminate ();
- events_terminate ();
- shared_terminate ();
-
- minimal_printf ("winpid %d, exit %d", GetCurrentProcessId (), n);
- myself->exit (n);
-}
-
-extern "C" void
-_exit (int n)
-{
- do_exit ((DWORD) n & 0xffff);
-}
-
-extern "C" void
-__api_fatal (const char *fmt, ...)
-{
- char buf[4096];
- va_list ap;
-
- va_start (ap, fmt);
- __small_vsprintf (buf, fmt, ap);
- va_end (ap);
- strcat (buf, "\n");
- int len = strlen (buf);
- DWORD done;
- (void) WriteFile (GetStdHandle (STD_ERROR_HANDLE), buf, len, &done, 0);
-
- /* 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 = CreateFileA ("CONOUT$", GENERIC_READ|GENERIC_WRITE,
- FILE_SHARE_WRITE | FILE_SHARE_WRITE, &sec_none,
- OPEN_EXISTING, 0, 0);
- if (h)
- (void) WriteFile (h, buf, len, &done, 0);
- }
-
- /* We are going down without mercy. Make sure we reset
- our process_state. */
- sigproc_terminate ();
-#ifdef DEBUGGING
- (void) try_to_debug ();
-#endif
- myself->exit (1);
-}
-
-#ifdef DEBUGGING
-void __stdcall
-cygbench (const char *s)
-{
- char buf[1024];
- if (GetEnvironmentVariable ("CYGWIN_BENCH", buf, sizeof (buf)))
- 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 ebe207ce6..000000000
--- a/winsup/cygwin/debug.cc
+++ /dev/null
@@ -1,322 +0,0 @@
-/* debug.cc
-
- Copyright 1998, 1999, 2000 Cygnus Solutions.
-
-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 "exceptions.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "perthread.h"
-#include "perprocess.h"
-#include "security.h"
-
-#undef CloseHandle
-
-static muto NO_COPY *threadname_lock = NULL;
-#define lock_threadname() \
- do {if (threadname_lock) threadname_lock->acquire (INFINITE); } while (0)
-
-#define unlock_threadname() \
- do {if (threadname_lock) threadname_lock->release (); } while (0)
-
-typedef struct
- {
- DWORD id;
- const char *name;
- } thread_info;
-
-static NO_COPY thread_info threads[32] = {{0, NULL}}; // increase as necessary
-#define NTHREADS (sizeof(threads) / sizeof(threads[0]))
-
-void
-threadname_init ()
-{
- threadname_lock = new_muto (FALSE, "threadname_lock");
-}
-
-void __stdcall
-regthread (const char *name, DWORD tid)
-{
- lock_threadname ();
- for (DWORD i = 0; i < NTHREADS; i++)
- if (threads[i].name == NULL || strcmp (threads[i].name, name) == 0 ||
- threads[i].id == tid)
- {
- threads[i].name = name;
- threads[i].id = tid;
- break;
- }
- unlock_threadname ();
-}
-
-int __stdcall
-iscygthread()
-{
- DWORD tid = GetCurrentThreadId ();
- if (tid != mainthread.id)
- for (DWORD i = 0; i < NTHREADS && threads[i].name != NULL; i++)
- if (threads[i].id == tid)
- return 1;
- return 0;
-}
-
-struct thread_start
- {
- LONG notavail;
- LPTHREAD_START_ROUTINE func;
- VOID *arg;
- };
-
-/* A place to store arguments to thread_stub since they can't be
- stored on the stack. An available element is !notavail. */
-thread_start NO_COPY start_buf[NTHREADS] = {{0, NULL,NULL}};
-
-/* Initial stub called by makethread. Performs initial per-thread
- initialization. */
-static DWORD WINAPI
-thread_stub (VOID *arg)
-{
- LPTHREAD_START_ROUTINE threadfunc = ((thread_start *) arg)->func;
- VOID *threadarg = ((thread_start *) arg)->arg;
-
- exception_list except_entry;
-
- /* Give up our slot in the start_buf array */
- (void) InterlockedExchange (&((thread_start *) arg)->notavail, 0);
-
- /* Initialize this thread's ability to respond to things like
- SIGSEGV or SIGFPE. */
- init_exceptions (&except_entry);
-
- set_reent (user_data->impure_ptr);
- ExitThread (threadfunc (threadarg));
-}
-
-/* Wrapper for CreateThread. Registers the thread name/id and ensures that
- cygwin threads are properly initialized. */
-HANDLE __stdcall
-makethread (LPTHREAD_START_ROUTINE start, LPVOID param, DWORD flags,
- const char *name)
-{
- DWORD tid;
- HANDLE h;
- SECURITY_ATTRIBUTES *sa;
- thread_start *info; /* Various information needed by the newly created thread */
-
- for (;;)
- {
- /* Search the start_buf array for an empty slot to use */
- for (info = start_buf; info < start_buf + NTHREADS; info++)
- if (!InterlockedExchange (&info->notavail, 1))
- goto out;
-
- /* Should never hit here, but be defensive anyway. */
- Sleep (0);
- }
-
-out:
- info->func = start; /* Real function to start */
- info->arg = param; /* The single parameter to the thread */
-
- if (*name != '+')
- sa = &sec_none_nih; /* The handle should not be inherited by subprocesses. */
- else
- {
- name++;
- sa = &sec_none; /* The handle should be inherited by subprocesses. */
- }
-
- if ((h = CreateThread (sa, 0, thread_stub, (VOID *) info, flags, &tid)))
- regthread (name, tid); /* Register this name/thread id for debugging output. */
-
- return h;
-}
-
-/* Return the symbolic name of the current thread for debugging.
- */
-const char * __stdcall
-threadname (DWORD tid, int lockit)
-{
- const char *res = NULL;
- if (!tid)
- tid = GetCurrentThreadId ();
-
- if (lockit)
- lock_threadname ();
- for (DWORD i = 0; i < NTHREADS && threads[i].name != NULL; i++)
- if (threads[i].id == tid)
- {
- res = threads[i].name;
- break;
- }
- if (lockit)
- unlock_threadname ();
-
- if (!res)
- {
- static char buf[30] NO_COPY = {0};
- __small_sprintf (buf, "unknown (%p)", tid);
- res = buf;
- }
-
- return res;
-}
-
-#ifdef DEBUGGING
-/* Here lies extra debugging routines which help track down internal
- Cygwin problems when compiled with -DDEBUGGING . */
-#include <stdlib.h>
-
-typedef struct _h
- {
- BOOL allocated;
- HANDLE h;
- const char *name;
- const char *func;
- int ln;
- struct _h *next;
- } handle_list;
-
-static NO_COPY handle_list starth = {0, NULL, NULL, NULL, 0, NULL};
-static NO_COPY handle_list *endh = NULL;
-
-static handle_list NO_COPY freeh[1000] = {{0, NULL, NULL, NULL, 0, NULL}};
-#define NFREEH (sizeof (freeh) / sizeof (freeh[0]))
-
-static muto NO_COPY *debug_lock = NULL;
-
-#define lock_debug() \
- do {if (debug_lock) debug_lock->acquire (INFINITE); } while (0)
-
-#define unlock_debug() \
- do {if (debug_lock) debug_lock->release (); } while (0)
-
-void
-debug_init ()
-{
- debug_lock = new_muto (FALSE, "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 = &starth; hl->next != NULL; hl = hl->next)
- if (hl->next->h == h)
- goto out;
- endh = hl;
- hl = NULL;
-
-out:
- return hl;
-}
-
-/* Create a new handle record */
-static handle_list * __stdcall
-newh ()
-{
- handle_list *hl;
- lock_debug ();
- for (hl = freeh; hl < freeh + NFREEH; hl++)
- if (hl->name == NULL)
- goto out;
-
- /* All used up??? */
- if ((hl = (handle_list *) malloc (sizeof *hl)) != NULL)
- {
- memset (hl, 0, sizeof (*hl));
- hl->allocated = TRUE;
- }
-
-out:
- unlock_debug ();
- return hl;
-}
-
-/* Add a handle to the linked list of known handles. */
-void __stdcall
-add_handle (const char *func, int ln, HANDLE h, const char *name)
-{
- handle_list *hl;
- lock_debug ();
-
- if ((hl = find_handle (h)))
- {
- hl = hl->next;
- system_printf ("%s:%d - multiple attempts to add handle %s<%p>", func,
- ln, name, h);
- system_printf (" previously allocated by %s:%d(%s<%p>)",
- hl->func, hl->ln, hl->name, hl->h);
- goto out; /* Already did this once */
- }
-
- if ((hl = newh()) == NULL)
- {
- unlock_debug ();
- system_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;
- endh->next = hl;
- endh = hl;
-
-out:
- unlock_debug ();
-}
-
-/* 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;
- handle_list *hl;
- lock_debug ();
-
- if ((hl = find_handle (h)) && !force)
- {
- hl = hl->next;
- unlock_debug (); // race here
- system_printf ("attempt to close protected handle %s:%d(%s<%p>)",
- hl->func, hl->ln, hl->name, hl->h);
- 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);
- }
- ret = CloseHandle (h);
- if (hl)
- {
- handle_list *hnuke = hl->next;
- hl->next = hl->next->next;
- if (hnuke->allocated)
- free (hnuke);
- else
- memset (hnuke, 0, sizeof (*hnuke));
- }
-
- unlock_debug ();
-#if 0 /* Uncomment to see CloseHandle failures */
- if (!ret)
- small_printf ("CloseHandle(%s) failed %s:%d\n", name, func, ln);
-#endif
- return ret;
-}
-#endif /*DEBUGGING*/
diff --git a/winsup/cygwin/debug.h b/winsup/cygwin/debug.h
deleted file mode 100644
index ff4313f77..000000000
--- a/winsup/cygwin/debug.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* debug.h
-
- Copyright 1998, 1999, 2000 Cygnus Solutions.
-
-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
-#define MALLOC_CHECK ({\
- debug_printf ("checking malloc pool");\
- (void)mallinfo ();\
-})
-#endif
-
-extern "C" {
-DWORD __stdcall WFSO (HANDLE, DWORD) __attribute__ ((regparm(2)));
-DWORD __stdcall WFMO (DWORD, CONST HANDLE *, BOOL, DWORD) __attribute__ ((regparm(3)));
-}
-
-#define WaitForSingleObject WFSO
-#define WaitForMultipleObject WFMO
-
-#if !defined(_DEBUG_H_)
-#define _DEBUG_H_
-
-void threadname_init ();
-HANDLE __stdcall makethread (LPTHREAD_START_ROUTINE, LPVOID, DWORD, const char *);
-const char * __stdcall threadname (DWORD, int lockit = TRUE);
-void __stdcall regthread (const char *, DWORD);
-int __stdcall iscygthread ();
-
-#ifndef DEBUGGING
-# define cygbench(s)
-# define ForceCloseHandle CloseHandle
-# define ForceCloseHandle1(h, n) CloseHandle (h)
-# define ForceCloseHandle2(h, n) CloseHandle (h)
-# define ProtectHandle(h) do {} while (0)
-# define ProtectHandle1(h,n) do {} while (0)
-# define ProtectHandle2(h,n) do {} while (0)
-# define debug_init() do {} while (0)
-
-#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)
-# define lock_pinfo_for_update(n) lpfu(__PRETTY_FUNCTION__, __LINE__, n)
-# endif
-
-# 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)
-
-void debug_init ();
-void __stdcall add_handle (const char *, int, HANDLE, const char *);
-BOOL __stdcall close_handle (const char *, int, HANDLE, const char *, BOOL);
-int __stdcall lpfu (const char *, int, DWORD timeout);
-void __stdcall cygbench (const char *s);
-
-#endif /*DEBUGGING*/
-#endif /*_DEBUG_H_*/
diff --git a/winsup/cygwin/delqueue.cc b/winsup/cygwin/delqueue.cc
deleted file mode 100644
index 3073d02cb..000000000
--- a/winsup/cygwin/delqueue.cc
+++ /dev/null
@@ -1,102 +0,0 @@
-/* delqueue.cc
-
- Copyright 1996, 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "shared_info.h"
-
-/* FIXME: this delqueue module is very flawed and should be rewritten.
- First, having an array of a fixed size for keeping track of the
- unlinked but not yet deleted files is bad. Second, some programs
- will unlink files and then create a new one in the same location
- and this behavior is not supported in the current code. Probably
- we should find a move/rename function that will work on open files,
- and move delqueue files to some special location or some such
- hack... */
-
-void
-delqueue_list::init ()
-{
- empty = 1;
- memset(inuse, 0, MAX_DELQUEUES_PENDING);
-}
-
-void
-delqueue_list::queue_file (const char *dosname)
-{
- char temp[MAX_PATH], *end;
- GetFullPathName (dosname, sizeof (temp), temp, &end);
-
- /* Note about race conditions: The only time we get to this point is
- when a delete fails because someone's holding the descriptor open.
- In those cases, other programs will be unable to delete the file
- also, so any entries referring to that file will not be removed
- from the queue while we're here. */
-
- if (!empty)
- {
- /* check for duplicates */
- for (int i=0; i < MAX_DELQUEUES_PENDING; i++)
- if (inuse[i] && strcmp(name[i], temp) == 0)
- return;
- }
-
- for (int i = 0; i < MAX_DELQUEUES_PENDING; i++)
- if (!inuse[i])
- {
- /* set the name first, in case someone else is running the
- queue they'll get a valid name */
- strcpy(name[i], temp);
- inuse[i] = 1;
- empty = 0;
- debug_printf ("adding '%s' to queue %d", temp, i);
- return;
- }
-
- system_printf ("Out of queue slots");
-}
-
-void
-delqueue_list::process_queue ()
-{
- if (empty)
- return;
- /* We set empty to 1 here, rather than later, to avoid a race
- condition - some other program might queue up a file while we're
- processing, and it will zero out empty also. */
- empty = 1; /* but might get set to zero again, below */
-
- syscall_printf ("Running delqueue");
-
- for (int i = 0; i < MAX_DELQUEUES_PENDING; i++)
- if (inuse[i])
- {
- if (DeleteFileA (name[i]))
- {
- syscall_printf ("Deleted %s", name[i]);
- inuse[i] = 0;
- }
- else
- {
- int res = GetLastError ();
- empty = 0;
- if (res == ERROR_SHARING_VIOLATION ||
- (os_being_run != winNT && res == ERROR_ACCESS_DENIED))
- {
- /* File still inuse, that's ok */
- syscall_printf ("Still using %s", name[i]);
- }
- else
- {
- syscall_printf ("Hmm, don't know what to do with '%s', %E", name[i]);
- inuse[i] = 0;
- }
- }
- }
-}
diff --git a/winsup/cygwin/delqueue.h b/winsup/cygwin/delqueue.h
deleted file mode 100644
index f306e7f74..000000000
--- a/winsup/cygwin/delqueue.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* delqueue.h: shared info for cygwin
-
- Copyright 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* First pass at a file deletion queue structure.
-
- We can't keep this list in the per-process info, since
- one process may open a file, and outlive a process which
- wanted to unlink the file - and the data would go away.
-*/
-
-#define MAX_DELQUEUES_PENDING 100
-
-class delqueue_list
-{
- char name[MAX_DELQUEUES_PENDING][MAX_PATH];
- char inuse[MAX_DELQUEUES_PENDING];
- int empty;
-
-public:
- void init ();
- void queue_file (const char *dosname);
- void process_queue ();
-};
diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc
deleted file mode 100644
index a14b44f8f..000000000
--- a/winsup/cygwin/dir.cc
+++ /dev/null
@@ -1,356 +0,0 @@
-/* dir.cc: Posix directory-related routines
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-#include <errno.h>
-
-#define _COMPILING_NEWLIB
-#include <dirent.h>
-
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "path.h"
-#include "security.h"
-#include "cygheap.h"
-
-/* Cygwin internal */
-/* Return whether the directory of a file is writable. Return 1 if it
- is. Otherwise, return 0, and set errno appropriately. */
-int __stdcall
-writable_directory (const char *file)
-{
-#if 0
- char dir[strlen (file) + 1];
-
- strcpy (dir, file);
-
- const char *usedir;
- char *slash = strrchr (dir, '\\');
- if (slash == NULL)
- usedir = ".";
- else if (slash == dir)
- {
- usedir = "\\";
- }
- else
- {
- *slash = '\0';
- usedir = dir;
- }
-
- int acc = access (usedir, W_OK);
-
- return acc == 0;
-#else
- return 1;
-#endif
-}
-
-/* opendir: POSIX 5.1.2.1 */
-extern "C" DIR *
-opendir (const char *dirname)
-{
- int len;
- DIR *dir;
- DIR *res = 0;
- struct stat statbuf;
-
- path_conv real_dirname (dirname, PC_SYM_FOLLOW | PC_FULL);
-
- if (real_dirname.error)
- {
- set_errno (real_dirname.error);
- goto failed;
- }
-
- if (stat (cygheap->root.length () ? dirname : real_dirname.get_win32 (),
- &statbuf) == -1)
- goto failed;
-
- if (!(statbuf.st_mode & S_IFDIR))
- {
- set_errno (ENOTDIR);
- goto failed;
- }
-
- len = strlen (real_dirname.get_win32 ());
- if (len > MAX_PATH - 3)
- {
- set_errno (ENAMETOOLONG);
- goto failed;
- }
-
- if ((dir = (DIR *) malloc (sizeof (DIR))) == NULL)
- {
- set_errno (ENOMEM);
- goto failed;
- }
- if ((dir->__d_dirname = (char *) malloc (len + 3)) == NULL)
- {
- free (dir);
- set_errno (ENOMEM);
- goto failed;
- }
- if ((dir->__d_dirent =
- (struct dirent *) malloc (sizeof (struct dirent))) == NULL)
- {
- free (dir->__d_dirname);
- free (dir);
- set_errno (ENOMEM);
- goto failed;
- }
- strcpy (dir->__d_dirname, real_dirname.get_win32 ());
- /* FindFirstFile doesn't seem to like duplicate /'s. */
- len = strlen (dir->__d_dirname);
- if (len == 0 || SLASH_P (dir->__d_dirname[len - 1]))
- strcat (dir->__d_dirname, "*");
- else
- strcat (dir->__d_dirname, "\\*"); /**/
- dir->__d_cookie = __DIRENT_COOKIE;
- dir->__d_u.__d_data.__handle = INVALID_HANDLE_VALUE;
- dir->__d_position = 0;
- dir->__d_dirhash = statbuf.st_ino;
-
- res = dir;
-
-failed:
- syscall_printf ("%p = opendir (%s)", res, dirname);
- return res;
-}
-
-/* readdir: POSIX 5.1.2.1 */
-extern "C" struct dirent *
-readdir (DIR * dir)
-{
- WIN32_FIND_DATA buf;
- HANDLE handle;
- struct dirent *res = NULL;
-
- if (dir->__d_cookie != __DIRENT_COOKIE)
- {
- set_errno (EBADF);
- syscall_printf ("%p = readdir (%p)", res, dir);
- return res;
- }
-
- if (dir->__d_u.__d_data.__handle == INVALID_HANDLE_VALUE
- && dir->__d_position == 0)
- {
- handle = FindFirstFileA (dir->__d_dirname, &buf);
- DWORD lasterr = GetLastError ();
- dir->__d_u.__d_data.__handle = handle;
- if (handle == INVALID_HANDLE_VALUE && (lasterr != ERROR_NO_MORE_FILES))
- {
- seterrno_from_win_error (__FILE__, __LINE__, lasterr);
- return res;
- }
- }
- else if (!FindNextFileA (dir->__d_u.__d_data.__handle, &buf))
- {
- DWORD lasterr = GetLastError ();
- (void) FindClose (dir->__d_u.__d_data.__handle);
- dir->__d_u.__d_data.__handle = INVALID_HANDLE_VALUE;
- /* POSIX says you shouldn't set errno when readdir can't
- find any more files; so, if another error we leave it set. */
- if (lasterr != ERROR_NO_MORE_FILES)
- seterrno_from_win_error (__FILE__, __LINE__, lasterr);
- syscall_printf ("%p = readdir (%p)", res, dir);
- return res;
- }
-
- /* We get here if `buf' contains valid data. */
- strcpy (dir->__d_dirent->d_name, buf.cFileName);
-
- /* Compute d_ino by combining filename hash with the directory hash
- (which was stored in dir->__d_dirhash when opendir was called). */
- if (buf.cFileName[0] == '.')
- {
- if (buf.cFileName[1] == '\0')
- dir->__d_dirent->d_ino = dir->__d_dirhash;
- else if (buf.cFileName[1] != '.' || buf.cFileName[2] != '\0')
- goto hashit;
- else
- {
- char *p, up[strlen (dir->__d_dirname) + 1];
- strcpy (up, dir->__d_dirname);
- if (!(p = strrchr (up, '\\')))
- goto hashit;
- *p = '\0';
- if (!(p = strrchr (up, '\\')))
- dir->__d_dirent->d_ino = hash_path_name (0, ".");
- else
- {
- *p = '\0';
- dir->__d_dirent->d_ino = hash_path_name (0, up);
- }
- }
- }
- else
- {
- hashit:
- ino_t dino = hash_path_name (dir->__d_dirhash, "\\");
- dir->__d_dirent->d_ino = hash_path_name (dino, buf.cFileName);
- }
-
- ++dir->__d_position;
- res = dir->__d_dirent;
- syscall_printf ("%p = readdir (%p) (%s)",
- &dir->__d_dirent, dir, buf.cFileName);
- return res;
-}
-
-/* telldir */
-extern "C" off_t
-telldir (DIR * dir)
-{
- if (dir->__d_cookie != __DIRENT_COOKIE)
- return 0;
- return dir->__d_position;
-}
-
-/* seekdir */
-extern "C" void
-seekdir (DIR * dir, off_t loc)
-{
- if (dir->__d_cookie != __DIRENT_COOKIE)
- return;
- rewinddir (dir);
- while (loc > dir->__d_position)
- if (! readdir (dir))
- break;
-}
-
-/* rewinddir: POSIX 5.1.2.1 */
-extern "C" void
-rewinddir (DIR * dir)
-{
- syscall_printf ("rewinddir (%p)", dir);
-
- if (dir->__d_cookie != __DIRENT_COOKIE)
- return;
- if (dir->__d_u.__d_data.__handle != INVALID_HANDLE_VALUE)
- {
- (void) FindClose (dir->__d_u.__d_data.__handle);
- dir->__d_u.__d_data.__handle = INVALID_HANDLE_VALUE;
- }
- dir->__d_position = 0;
-}
-
-/* closedir: POSIX 5.1.2.1 */
-extern "C" int
-closedir (DIR * dir)
-{
- if (dir->__d_cookie != __DIRENT_COOKIE)
- {
- set_errno (EBADF);
- syscall_printf ("-1 = closedir (%p)", dir);
- return -1;
- }
-
- if (dir->__d_u.__d_data.__handle != INVALID_HANDLE_VALUE &&
- FindClose (dir->__d_u.__d_data.__handle) == 0)
- {
- __seterrno ();
- syscall_printf ("-1 = closedir (%p)", dir);
- return -1;
- }
-
- /* Reset the marker in case the caller tries to use `dir' again. */
- dir->__d_cookie = 0;
-
- free (dir->__d_dirname);
- free (dir->__d_dirent);
- free (dir);
- syscall_printf ("0 = closedir (%p)", dir);
- return 0;
-}
-
-/* mkdir: POSIX 5.4.1.1 */
-extern "C" int
-mkdir (const char *dir, mode_t mode)
-{
- int res = -1;
-
- path_conv real_dir (dir, PC_SYM_NOFOLLOW);
-
- if (real_dir.error)
- {
- set_errno (real_dir.error);
- goto done;
- }
-
- nofinalslash(real_dir.get_win32 (), real_dir.get_win32 ());
- if (! writable_directory (real_dir.get_win32 ()))
- goto done;
-
- if (CreateDirectoryA (real_dir.get_win32 (), 0))
- {
- set_file_attribute (real_dir.has_acls (), real_dir.get_win32 (),
- S_IFDIR | ((mode & 0777) & ~cygheap->umask));
- res = 0;
- }
- else
- __seterrno ();
-
-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;
-
- path_conv real_dir (dir, PC_SYM_NOFOLLOW);
-
- if (real_dir.error)
- {
- set_errno (real_dir.error);
- goto done;
- }
-
- if (RemoveDirectoryA (real_dir.get_win32 ()))
- {
- /* RemoveDirectory on a samba drive doesn't return an error if the
- directory can't be removed because it's not empty. Checking for
- existence afterwards keeps us informed about success. */
- if (GetFileAttributesA (real_dir.get_win32 ()) != (DWORD) -1)
- set_errno (ENOTEMPTY);
- else
- res = 0;
- }
- else if (GetLastError() == ERROR_ACCESS_DENIED)
- {
- /* Under Windows 9X or on a samba share, ERROR_ACCESS_DENIED is
- returned if you try to remove a file. On 9X the same error is
- returned if you try to remove a non-empty directory. */
- if (real_dir.file_attributes () != (DWORD) -1 &&
- !(real_dir.file_attributes () & FILE_ATTRIBUTE_DIRECTORY))
- set_errno (ENOTDIR);
- else if (os_being_run != winNT)
- set_errno (ENOTEMPTY);
- else
- __seterrno ();
- }
- else
- __seterrno ();
-
-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 a85351323..000000000
--- a/winsup/cygwin/dlfcn.cc
+++ /dev/null
@@ -1,223 +0,0 @@
-/* dlfcn.cc
-
- Copyright 1998, 2000 Cygnus Solutions
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <ctype.h>
-#include "fhandler.h"
-#include "path.h"
-#include "thread.h"
-#include "perprocess.h"
-#include "dlfcn.h"
-#include "dll_init.h"
-
-#define _dl_error _reent_winsup()->_dl_error
-#define _dl_buffer _reent_winsup()->_dl_buffer
-
-static void __stdcall
-set_dl_error (const char *str)
-{
- __small_sprintf (_dl_buffer, "%s: %E", str);
- _dl_error = 1;
-}
-
-/* Check for existence of a file specified by the directory
- and name components. If successful, return a pointer the
- full pathname (static buffer), else return 0. */
-static const char * __stdcall
-check_access (const char *dir, const char *name)
-{
- static char buf[MAX_PATH];
- const char *ret = 0;
-
- buf[0] = 0;
- strcpy (buf, dir);
- strcat (buf, "\\");
- strcat (buf, name);
-
- if (!access (buf, F_OK))
- ret = buf;
- return ret;
-}
-
-/* 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. */
-static const char * __stdcall
-check_path_access (const char *mywinenv, const char *name)
-{
- path_conv buf;
- return find_exec (name, buf, mywinenv, TRUE);
-}
-
-/* Simulate the same search as LoadLibary + check environment
- variable LD_LIBRARY_PATH. If found, return the full pathname
- (static buffer); if illegal, return the input string unchanged
- and let the caller deal with it; return NULL otherwise.
-
- Note that this should never be called with a NULL string, since
- that is the introspective case, and the caller should not call
- this function at all. */
-static const char * __stdcall
-get_full_path_of_dll (const char* str)
-{
- int len = (str) ? strlen (str) : 0;
-
- /* NULL or empty string or too long to be legal win32 pathname? */
- if (len == 0 || len >= MAX_PATH - 1)
- return str;
-
- char buf[MAX_PATH];
- static char name[MAX_PATH];
- const char *ret = 0;
-
- strcpy (name, str);
-
- /* Add extension if necessary, but leave a trailing '.', if any, alone.
- Files with trailing '.'s are handled differently by win32 API. */
- if (str[len - 1] != '.')
- {
- /* Add .dll only if no extension provided. Handle various cases:
- ./shlib --> ./shlib.dll
- ./dir/shlib.so --> ./dir/shlib.so
- shlib --> shlib.dll
- shlib.dll --> shlib.dll
- shlib.so --> shlib.so */
- const char *p = strrchr (str, '.');
- if (!p || isdirsep (p[1]))
- strcat (name, ".dll");
- }
-
- /* Deal with fully qualified filename right away. Do the actual
- conversion to win32 filename just before returning however. */
- if (isabspath (str))
- ret = name;
-
- /* current directory */
- if (!ret)
- {
- if (GetCurrentDirectory (MAX_PATH, buf) == 0)
- small_printf ("WARNING: get_full_path_of_dll can't get current directory win32 %E\n");
- else
- ret = check_access (buf, name);
- }
-
- /* LD_LIBRARY_PATH */
- if (!ret)
- ret = check_path_access ("LD_LIBRARY_PATH=", name);
-
- if (!ret)
- {
- if (GetSystemDirectory (buf, MAX_PATH) == 0)
- small_printf ("WARNING: get_full_path_of_dll can't get system directory win32 %E\n");
- else
- ret = check_access (buf, name);
- }
-
- /* 16 bits system directory */
- if (!ret && (os_being_run == winNT))
- {
- /* we assume last dir was xxxxx\SYSTEM32, so we remove 32 */
- len = strlen (buf);
- buf[len - 2] = 0;
- ret = check_access (buf, name);
- }
-
- /* windows directory */
- if (!ret)
- {
- if (GetWindowsDirectory (buf, MAX_PATH) == 0)
- small_printf ("WARNING: get_full_path_of_dll can't get Windows directory win32 %E\n");
- else
- ret = check_access (buf, name);
- }
-
- /* PATH */
- if (!ret)
- ret = check_path_access ("PATH=", name);
-
- /* Now do a final conversion to win32 pathname. This step is necessary
- to resolve symlinks etc so that win32 API finds the underlying file. */
- if (ret)
- {
- path_conv real_filename (ret, PC_SYM_FOLLOW | PC_FULL);
- if (real_filename.error)
- ret = 0;
- else
- {
- strcpy (name, real_filename.get_win32 ());
- ret = name;
- }
- }
- return ret;
-}
-
-void *
-dlopen (const char *name, int)
-{
- SetResourceLock(LOCK_DLL_LIST,READ_LOCK|WRITE_LOCK," dlopen");
-
- void *ret = 0;
-
- if (!name)
- {
- /* handle for the current module */
- ret = (void *) GetModuleHandle (NULL);
- }
- else
- {
- /* handle for the named library */
- const char *fullpath = get_full_path_of_dll (name);
- ret = (void *) LoadLibrary (fullpath);
- }
-
- if (!ret)
- set_dl_error ("dlopen");
- debug_printf ("ret %p", ret);
-
- ReleaseResourceLock(LOCK_DLL_LIST,READ_LOCK|WRITE_LOCK," dlopen");
- return ret;
-}
-
-void *
-dlsym (void *handle, const char *name)
-{
- void *ret = (void *) GetProcAddress ((HMODULE) handle, name);
- if (!ret)
- set_dl_error ("dlsym");
- debug_printf ("ret %p", ret);
- return ret;
-}
-
-int
-dlclose (void *handle)
-{
- SetResourceLock(LOCK_DLL_LIST,READ_LOCK|WRITE_LOCK," dlclose");
-
- int ret = -1;
- if (FreeLibrary ((HMODULE) handle))
- ret = 0;
- if (ret)
- set_dl_error ("dlclose");
-
- ReleaseResourceLock(LOCK_DLL_LIST,READ_LOCK|WRITE_LOCK," dlclose");
- return ret;
-}
-
-char *
-dlerror ()
-{
- char *ret = 0;
- if (_dl_error)
- ret = _dl_buffer;
- return ret;
-}
diff --git a/winsup/cygwin/dll_init.cc b/winsup/cygwin/dll_init.cc
deleted file mode 100644
index 6a299d45b..000000000
--- a/winsup/cygwin/dll_init.cc
+++ /dev/null
@@ -1,404 +0,0 @@
-/* dll_init.cc
-
- Copyright 1998, 1999, 2000 Cygnus Solutions.
-
-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 "exceptions.h"
-#include "cygerrno.h"
-#include "perprocess.h"
-#include "dll_init.h"
-#include "environ.h"
-
-extern void __stdcall check_sanity_and_sync (per_process *);
-
-dll_list NO_COPY dlls;
-
-static NO_COPY int in_forkee = 0;
-static int dll_global_dtors_recorded = 0;
-
-/* Run destructors for all DLLs on exit. */
-static void
-dll_global_dtors()
-{
- for (dll *d = dlls.istart (DLL_ANY); d; d = dlls.inext ())
- 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 char *name)
-{
- dll *d = &start;
- while ((d = d->next) != NULL)
- if (strcasematch (name, d->name))
- return d;
-
- return NULL;
-}
-
-#define RETRIES 100
-
-/* Allocate space for a dll struct contiguous with the just-loaded dll. */
-dll *
-dll_list::alloc (HINSTANCE h, per_process *p, dll_type type)
-{
- char name[MAX_PATH + 1];
- DWORD namelen = GetModuleFileName (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;
- strcpy (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 (dll *d)
-{
- if (d->count <= 0)
- system_printf ("WARNING: try to detach an already detached dll ...\n");
- 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);
- }
-}
-
-/* Initialization for all linked DLLs, called by dll_crt0_1. */
-void
-dll_list::init ()
-{
- debug_printf ("here");
- /* Make sure that destructors are called on exit. */
- if (!dll_global_dtors_recorded)
- {
- atexit (dll_global_dtors);
- dll_global_dtors_recorded = 1;
- }
-
- /* Walk the dll chain, initializing each dll */
- dll *d = &start;
- 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 char *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 = 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 '%s' 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 char *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 < user_data->heapbase || (void *) start > user_data->heaptop)))
- continue;
- if (!VirtualFree ((void *) start, 0, MEM_RELEASE))
- api_fatal ("couldn't release memory %p(%d) for '%s' 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)
-{
- in_forkee = 1;
- 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)
- {
- HMODULE h = LoadLibraryEx (d.name, NULL, DONT_RESOLVE_DLL_REFERENCES);
-
- /* 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. */
- if (h == d.handle)
- {
- FreeLibrary (h);
- LoadLibrary (d.name);
- }
- else if (try2)
- api_fatal ("unable to remap %s to same address as parent -- %p", d.name, 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 = 0;
-}
-
-extern "C" int
-dll_dllcrt0 (HMODULE h, per_process *p)
-{
- if (p == NULL)
- p = &__cygwin_user_data;
- else
- *(p->impure_ptr_ptr) = __cygwin_user_data.impure_ptr;
-
- /* 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 (!cygwin_finished_initializing)
- 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 || (cygwin_finished_initializing && !d->init ()))
- return -1;
-
- return (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 *d)
-{
- dlls.detach (d);
-}
-
-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 ()
-{
- extern char ***main_environ;
- 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 ac1466803..000000000
--- a/winsup/cygwin/dll_init.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* dll_init.h
-
- Copyright 1998, 1999, 2000 Cygnus Solutions
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-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;
- char name[MAX_PATH + 1];
- 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 char *name);
- dll *alloc (HINSTANCE, per_process *, dll_type);
- void detach (dll *);
- void init ();
- void load_after_fork (HANDLE, dll *);
- dll *istart (dll_type t)
- {
- hold_type = t;
- hold = &start;
- return inext ();
- }
- dll *inext ()
- {
- while ((hold = hold->next))
- if (hold_type == DLL_ANY || hold->type == hold_type)
- break;
- return hold;
- }
-};
-
-extern dll_list dlls;
diff --git a/winsup/cygwin/dll_init.sgml b/winsup/cygwin/dll_init.sgml
deleted file mode 100644
index 38070390c..000000000
--- a/winsup/cygwin/dll_init.sgml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-<sect1 id="func-cygwin-detach-dll">
-<title>cygwin_detach_dll</title>
-
-<funcsynopsis>
-<funcdef>extern "C" void
-<function>cygwin_detach_dll</function></funcdef>
-<paramdef>int <parameter>dll_index</parameter></paramdef>
-</funcsynopsis>
-
-</sect1>
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
deleted file mode 100644
index 1d0b9cb9a..000000000
--- a/winsup/cygwin/dtable.cc
+++ /dev/null
@@ -1,560 +0,0 @@
-/* dtable.cc: file descriptor support.
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#define __INSIDE_CYGWIN_NET__
-
-#define Win32_Winsock
-#include "winsup.h"
-#include <errno.h>
-#include <sys/socket.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/cygwin.h>
-
-#include <winsock.h>
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "cygheap.h"
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "path.h"
-#include "dtable.h"
-
-dtable fdtab;
-
-static DWORD std_consts[] = {STD_INPUT_HANDLE, STD_OUTPUT_HANDLE,
- STD_ERROR_HANDLE};
-
-/* Set aside space for the table of fds */
-void
-dtable_init (void)
-{
- if (!fdtab.size)
- fdtab.extend(NOFILE_INCR);
-}
-
-void __stdcall
-set_std_handle (int fd)
-{
- if (fd == 0)
- SetStdHandle (std_consts[fd], fdtab[fd]->get_handle ());
- else if (fd <= 2)
- SetStdHandle (std_consts[fd], fdtab[fd]->get_output_handle ());
-}
-
-int
-dtable::extend (int howmuch)
-{
- int new_size = size + howmuch;
- fhandler_base **newfds;
-
- if (howmuch <= 0)
- 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");
- 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;
-}
-
-/* Initialize the file descriptor/handle mapping table.
- We only initialize the parent table here. The child table is
- initialized at each fork () call. */
-
-void
-stdio_init (void)
-{
- /* 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->ppid_handle && NOTSTATE(myself, PID_CYGPARENT))
- {
- HANDLE in = GetStdHandle (STD_INPUT_HANDLE);
- HANDLE out = GetStdHandle (STD_OUTPUT_HANDLE);
- HANDLE err = GetStdHandle (STD_ERROR_HANDLE);
-
- fdtab.init_std_file_from_handle (0, in, GENERIC_READ, "{stdin}");
-
- /* 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). */
- if (out == err)
- {
- /* 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,
- 1, DUPLICATE_SAME_ACCESS))
- {
- /* If that fails, do this as a fall back. */
- err = out;
- system_printf ("couldn't make stderr distinct from stdout");
- }
- }
-
- fdtab.init_std_file_from_handle (1, out, GENERIC_WRITE, "{stdout}");
- fdtab.init_std_file_from_handle (2, err, GENERIC_WRITE, "{stderr}");
- }
-}
-
-int
-dtable::not_open (int fd)
-{
- SetResourceLock(LOCK_FD_LIST,READ_LOCK," not_open");
-
- int res = fd < 0 || fd >= (int)size || fds[fd] == NULL;
-
- ReleaseResourceLock(LOCK_FD_LIST,READ_LOCK," not open");
- return res;
-}
-
-int
-dtable::find_unused_handle (int start)
-{
- AssertResourceOwner(LOCK_FD_LIST, READ_LOCK);
-
- do
- {
- for (int i = start; i < (int) 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))
- {
- if ((fds[fd]->get_device () & FH_DEVMASK) == FH_SOCKET)
- dec_need_fixup_before ();
- delete fds[fd];
- fds[fd] = NULL;
- }
-}
-
-void
-dtable::init_std_file_from_handle (int fd, HANDLE handle,
- DWORD myaccess, const char *name)
-{
- int bin = binmode ? O_BINARY : 0;
- /* Check to see if we're being redirected - if not then
- we open then as consoles */
- if (fd == 0 || fd == 1 || fd == 2)
- {
- first_fd_for_open = 0;
- /* See if we can consoleify it - if it is a console,
- don't open it in binary. That will screw up our crlfs*/
- CONSOLE_SCREEN_BUFFER_INFO buf;
- if (GetConsoleScreenBufferInfo (handle, &buf))
- {
- bin = 0;
- if (ISSTATE (myself, PID_USETTY))
- name = "/dev/tty";
- else
- name = "/dev/conout";
- }
- else if (FlushConsoleInputBuffer (handle))
- {
- bin = 0;
- if (ISSTATE (myself, PID_USETTY))
- name = "/dev/tty";
- else
- name = "/dev/conin";
- }
- }
-
- build_fhandler (fd, name, handle)->init (handle, myaccess, bin);
- set_std_handle (fd);
- paranoid_printf ("fd %d, handle %p", fd, handle);
-}
-
-extern "C"
-int
-cygwin_attach_handle_to_fd (char *name, int fd, HANDLE handle, mode_t bin,
- DWORD myaccess)
-{
- if (fd == -1)
- fd = fdtab.find_unused_handle();
- fhandler_base *res = fdtab.build_fhandler (fd, name, handle);
- res->init (handle, myaccess, bin);
- return fd;
-}
-
-fhandler_base *
-dtable::build_fhandler (int fd, const char *name, HANDLE handle)
-{
- int unit;
- DWORD devn;
-
- if ((devn = get_device_number (name, unit)) == FH_BAD)
- {
- struct sockaddr sa;
- int sal = sizeof (sa);
- CONSOLE_SCREEN_BUFFER_INFO cinfo;
- DCB dcb;
-
- if (handle == NULL)
- devn = FH_DISK;
- else if (GetNumberOfConsoleInputEvents (handle, (DWORD *) &cinfo))
- devn = FH_CONIN;
- else if (GetConsoleScreenBufferInfo (handle, &cinfo))
- devn= FH_CONOUT;
- else if (wsock32_handle && getpeername ((SOCKET) handle, &sa, &sal))
- devn = FH_SOCKET;
- else if (GetFileType (handle) == FILE_TYPE_PIPE)
- devn = FH_PIPE;
- else if (GetCommState (handle, &dcb))
- devn = FH_SERIAL;
- else
- devn = FH_DISK;
- }
-
- return build_fhandler (fd, devn, name, unit);
-}
-
-fhandler_base *
-dtable::build_fhandler (int fd, DWORD dev, const char *name, int unit)
-{
- fhandler_base *fh;
- void *buf = ccalloc (HEAP_FHANDLER, 1, sizeof (fhandler_union) + 100);
-
- dev &= FH_DEVMASK;
- switch (dev)
- {
- case FH_TTYM:
- fh = new (buf) fhandler_tty_master (name, unit);
- break;
- case FH_CONSOLE:
- case FH_CONIN:
- case FH_CONOUT:
- fh = new (buf) fhandler_console (name);
- break;
- case FH_PTYM:
- fh = new (buf) fhandler_pty_master (name);
- break;
- case FH_TTYS:
- if (unit < 0)
- fh = new (buf) fhandler_tty_slave (name);
- else
- fh = new (buf) fhandler_tty_slave (unit, name);
- break;
- case FH_WINDOWS:
- fh = new (buf) fhandler_windows (name);
- break;
- case FH_SERIAL:
- fh = new (buf) fhandler_serial (name, dev, unit);
- break;
- case FH_PIPE:
- case FH_PIPER:
- case FH_PIPEW:
- fh = new (buf) fhandler_pipe (name, dev);
- break;
- case FH_SOCKET:
- fh = new (buf) fhandler_socket (name);
- break;
- case FH_DISK:
- fh = new (buf) fhandler_disk_file (NULL);
- break;
- case FH_FLOPPY:
- fh = new (buf) fhandler_dev_floppy (name, unit);
- break;
- case FH_TAPE:
- fh = new (buf) fhandler_dev_tape (name, unit);
- break;
- case FH_NULL:
- fh = new (buf) fhandler_dev_null (name);
- break;
- case FH_ZERO:
- fh = new (buf) fhandler_dev_zero (name);
- break;
- case FH_RANDOM:
- fh = new (buf) fhandler_dev_random (name, unit);
- break;
- case FH_MEM:
- fh = new (buf) fhandler_dev_mem (name, unit);
- break;
- case FH_CLIPBOARD:
- fh = new (buf) fhandler_dev_clipboard (name);
- break;
- default:
- /* FIXME - this could recurse forever */
- return build_fhandler (fd, name, NULL);
- }
-
- debug_printf ("%s - cb %d, fd %d, fh %p", fh->get_name () ?: "", fh->cb,
- fd, fh);
- return fd >= 0 ? (fds[fd] = fh) : fh;
-}
-
-fhandler_base *
-dtable::dup_worker (fhandler_base *oldfh)
-{
- fhandler_base *newfh = build_fhandler (-1, oldfh->get_device (), NULL);
- *newfh = *oldfh;
- newfh->set_io_handle (NULL);
- if (oldfh->dup (newfh))
- {
- cfree (newfh);
- newfh = NULL;
- return NULL;
- }
-
- newfh->set_close_on_exec_flag (0);
- MALLOC_CHECK;
- 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);
-
- if (not_open (oldfd))
- {
- syscall_printf ("fd %d not open", oldfd);
- set_errno (EBADF);
- goto done;
- }
-
- if (newfd == oldfd)
- {
- res = 0;
- goto done;
- }
-
- if ((newfh = dup_worker (fds[oldfd])) == NULL)
- {
- res = -1;
- goto done;
- }
-
- SetResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK,"dup");
-
- if ((size_t) newfd >= fdtab.size || newfd < 0)
- {
- syscall_printf ("new fd out of bounds: %d", newfd);
- set_errno (EBADF);
- goto done;
- }
-
- if ((size_t) newfd >= fdtab.size)
- {
- int inc_size = NOFILE_INCR * ((newfd + NOFILE_INCR - 1) / NOFILE_INCR) -
- fdtab.size;
- fdtab.extend (inc_size);
- }
-
- if (!not_open (newfd))
- _close (newfd);
- fds[newfd] = newfh;
-
- /* Count sockets. */
- if ((fds[newfd]->get_device () & FH_DEVMASK) == FH_SOCKET)
- inc_need_fixup_before ();
-
- ReleaseResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK,"dup");
- MALLOC_CHECK;
-
- if ((res = newfd) <= 2)
- set_std_handle (res);
-
- MALLOC_CHECK;
-done:
- 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->saw_error = 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->saw_error = 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->saw_error = 0;
- debug_printf ("%s fd %d", fh->get_name (), fd);
- return s;
-}
-
-/* Function to walk the fd table after an exec and perform
- per-fhandler type fixups. */
-void
-dtable::fixup_before_fork (DWORD target_proc_id)
-{
- SetResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK,"dup");
- fhandler_base *fh;
- for (size_t i = 0; i < size; i++)
- if ((fh = fds[i]) != NULL)
- {
- debug_printf ("fd %d(%s)", i, fh->get_name ());
- fh->fixup_before_fork_exec (target_proc_id);
- }
- ReleaseResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK,"dup");
-}
-
-void
-dtable::fixup_before_exec (DWORD target_proc_id)
-{
- SetResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK,"dup");
- fhandler_base *fh;
- for (size_t i = 0; i < size; i++)
- if ((fh = fds[i]) != NULL && (!fh->get_close_on_exec ()))
- {
- debug_printf ("fd %d(%s)", i, fh->get_name ());
- fh->fixup_before_fork_exec (target_proc_id);
- }
- ReleaseResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK,"dup");
-}
-
-void
-dtable::fixup_after_exec (HANDLE parent, size_t sz, fhandler_base **f)
-{
- size = sz;
- fds = f;
- first_fd_for_open = 0;
- fhandler_base *fh;
- for (size_t i = 0; i < size; i++)
- if ((fh = fds[i]) != NULL)
- {
- fh->clear_readahead ();
- if (fh->get_close_on_exec ())
- release (i);
- else
- {
- fh->fixup_after_exec (parent);
- 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)
-{
- SetResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK,"dup");
- fhandler_base *fh;
- for (size_t i = 0; i < size; i++)
- if ((fh = fds[i]) != NULL)
- {
- if (fh->get_close_on_exec () || fh->get_need_fork_fixup ())
- {
- debug_printf ("fd %d(%s)", i, fh->get_name ());
- fh->fixup_after_fork (parent);
- }
- }
- ReleaseResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK,"dup");
-}
-
-int
-dtable::vfork_child_dup ()
-{
- fhandler_base **newtable;
- newtable = (fhandler_base **) ccalloc (HEAP_ARGV, size, sizeof(fds[0]));
- int res = 1;
-
- SetResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK,"dup");
- for (size_t i = 0; i < size; i++)
- if (not_open (i))
- continue;
- else if ((newtable[i] = dup_worker (fds[i])) == NULL)
- {
- res = 0;
- set_errno (EBADF);
- goto out;
- }
-
- fds_on_hold = fds;
- fds = newtable;
-out:
- ReleaseResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK,"dup");
- return 1;
-}
-
-void
-dtable::vfork_parent_restore ()
-{
- SetResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK,"dup");
-
- close_all_files ();
- fhandler_base **deleteme = fds;
- fds = fds_on_hold;
- fds_on_hold = NULL;
- cfree (deleteme);
-
- ReleaseResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK,"dup");
- return;
-}
diff --git a/winsup/cygwin/dtable.h b/winsup/cygwin/dtable.h
deleted file mode 100644
index 9ec6dfae6..000000000
--- a/winsup/cygwin/dtable.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* dtable.h: fd table definition.
-
- 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. */
-
-/* Initial and increment values for cygwin's fd table */
-#define NOFILE_INCR 32
-
-class dtable
-{
- fhandler_base **fds;
- fhandler_base **fds_on_hold;
- int first_fd_for_open;
- int cnt_need_fixup_before;
-public:
- size_t size;
-
- dtable () : first_fd_for_open(3), cnt_need_fixup_before(0) {}
-
- void dec_need_fixup_before ()
- { if (cnt_need_fixup_before > 0) --cnt_need_fixup_before; }
- void inc_need_fixup_before ()
- { ++cnt_need_fixup_before; }
- BOOL need_fixup_before ()
- { return cnt_need_fixup_before > 0; }
-
- int vfork_child_dup ();
- void vfork_parent_restore ();
- fhandler_base *dup_worker (fhandler_base *oldfh);
- int extend (int howmuch);
- void fixup_before_exec (DWORD win_proc_id);
- void fixup_before_fork (DWORD win_proc_id);
- void fixup_after_fork (HANDLE);
- fhandler_base *build_fhandler (int fd, DWORD dev, const char *name,
- int unit = -1);
- fhandler_base *build_fhandler (int fd, const char *name, HANDLE h);
- int not_open (int n) __attribute__ ((regparm(1)));
- 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, DWORD access, const char *name);
- int dup2 (int oldfd, int newfd);
- void fixup_after_exec (HANDLE, size_t, fhandler_base **);
- inline fhandler_base *operator [](int fd) { 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 dtable_init (void);
-void stdio_init (void);
-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 9f292ee73..000000000
--- a/winsup/cygwin/dtable.sgml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-<sect1 id="func-cygwin-attach-handle-to-fd">
-<title>cygwin_attach_handle_to_fd</title>
-
-<funcsynopsis>
-<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>
-</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 615ce1726..000000000
--- a/winsup/cygwin/environ.cc
+++ /dev/null
@@ -1,730 +0,0 @@
-/* environ.cc: Cygwin-adopted functions from newlib to manipulate
- process's environment.
-
- Copyright 1997, 1998, 1999, 2000 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 <errno.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <sys/cygwin.h>
-#include <cygwin/version.h>
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "fhandler.h"
-#include "path.h"
-#include "cygerrno.h"
-#include "cygheap.h"
-#include "registry.h"
-#include "environ.h"
-#include "perprocess.h"
-
-extern BOOL allow_glob;
-extern BOOL ignore_case_with_glob;
-extern BOOL allow_ntea;
-extern BOOL strip_title_path;
-extern DWORD chunksize;
-BOOL reset_com = TRUE;
-static BOOL envcache = TRUE;
-
-static char **lastenviron = NULL;
-
-#define ENVMALLOC \
- (CYGWIN_VERSION_DLL_MAKE_COMBINED (user_data->api_major, user_data->api_minor) \
- <= CYGWIN_VERSION_DLL_MALLOC_ENV)
-
-
-/* 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 int return_MAX_PATH (const char *) {return MAX_PATH;}
-static win_env conv_envvars[] =
- {
- {"PATH=", 5, NULL, NULL, cygwin_win32_to_posix_path_list,
- cygwin_posix_to_win32_path_list,
- cygwin_win32_to_posix_path_list_buf_size,
- cygwin_posix_to_win32_path_list_buf_size},
- {"HOME=", 5, NULL, NULL, cygwin_conv_to_full_posix_path, cygwin_conv_to_full_win32_path,
- return_MAX_PATH, return_MAX_PATH},
- {"LD_LIBRARY_PATH=", 16, NULL, NULL, cygwin_conv_to_full_posix_path,
- cygwin_conv_to_full_win32_path, return_MAX_PATH, return_MAX_PATH},
- {"TMPDIR=", 7, NULL, NULL, cygwin_conv_to_full_posix_path, cygwin_conv_to_full_win32_path,
- return_MAX_PATH, return_MAX_PATH},
- {"TMP=", 4, NULL, NULL, cygwin_conv_to_full_posix_path, cygwin_conv_to_full_win32_path,
- return_MAX_PATH, return_MAX_PATH},
- {"TEMP=", 5, NULL, NULL, cygwin_conv_to_full_posix_path, cygwin_conv_to_full_win32_path,
- return_MAX_PATH, return_MAX_PATH},
- {NULL, 0, NULL, NULL, NULL, NULL, 0, 0}
- };
-
-static unsigned char conv_start_chars[256] = {0};
-
-void
-win_env::add_cache (const char *in_posix, const char *in_native)
-{
- posix = (char *) realloc (posix, strlen (in_posix) + 1);
- strcpy (posix, in_posix);
- if (in_native)
- {
- native = (char *) realloc (native, namelen + 1 + strlen (in_native));
- (void) strcpy (native, name);
- (void) strcpy (native + namelen, in_native);
- }
- else
- {
- native = (char *) realloc (native, namelen + 1 + win32_len (in_posix));
- (void) strcpy (native, name);
- towin32 (in_posix, 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. n is the length
- * of the name including a mandatory '='. Returns a pointer to the
- * appropriate conversion structure.
- */
-win_env * __stdcall
-getwinenv (const char *env, const char *in_posix)
-{
- if (!conv_start_chars[(unsigned char)*env])
- return NULL;
-
- for (int i = 0; conv_envvars[i].name != NULL; i++)
- if (strncasematch (env, conv_envvars[i].name, conv_envvars[i].namelen))
- {
- 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))
- 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 *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. */
-
- char *outenv = (char *) malloc (1 + len + conv->posix_len (value));
- memcpy (outenv, src, len);
- conv->toposix (value, outenv + len);
- conv->add_cache (outenv + len, value);
-
- debug_printf ("env var converted to %s", outenv);
- *here = outenv;
- free (src);
-}
-
-/*
- * my_findenv --
- * Returns pointer to value associated with name, if any, else NULL.
- * Sets offset to be the offset of the name/value combination in the
- * 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);
- }
- return NULL;
-}
-
-/*
- * getenv --
- * Returns ptr to value associated with name, if any, else NULL.
- */
-
-extern "C" char *
-getenv (const char *name)
-{
- int offset;
-
- return my_findenv (name, &offset);
-}
-
-extern int __stdcall
-envsize (const char * const *in_envp, int debug_print)
-{
- const char * const *envp;
- for (envp = in_envp; *envp; envp++)
- if (debug_print)
- debug_printf ("%s", *envp);
- 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 + sizeof (char *);
-
- offset = (sz - 1) / sizeof (char *);
-
- /* Allocate space for additional element plus terminating NULL. */
- if (__cygwin_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);
-
- return 0;
-}
-
-/* putenv Sets an environment variable */
-extern "C" int
-putenv (const char *str)
-{
- int res;
- if ((res = check_null_empty_path (str)))
- {
- if (res == ENOENT)
- return 0;
- set_errno (res);
- return -1;
- }
- char *eq = strchr (str, '=');
- if (eq)
- return _addenv (str, eq + 1, -1);
-
- /* Remove str from the environment. */
- unsetenv (str);
- return 0;
-}
-
-/* setenv -- 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)
-{
- int res;
- if ((res = check_null_empty_path (value)) == EFAULT)
- {
- set_errno (res);
- return -1;
- }
- if ((res = check_null_empty_path (name)))
- {
- if (res == ENOENT)
- return 0;
- set_errno (res);
- return -1;
- }
- if (*value == '=')
- value++;
- return _addenv (name, value, !!overwrite);
-}
-
-/* unsetenv(name) -- Delete environment variable "name". */
-extern "C" void
-unsetenv (const char *name)
-{
- register char **e;
- int offset;
-
- 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;
-}
-
-/* Turn environment variable part of a=b string into uppercase. */
-static __inline__ void
-ucenv (char *p, char *eq)
-{
- /* 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 the first process in a session group. */
- for (; p < eq; p++)
- if (islower (*p))
- *p = cyg_toupper (*p);
-}
-
-/* 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 (strncasematch (buf, "ignorecase", 10))
- {
- allow_glob = TRUE;
- ignore_case_with_glob = TRUE;
- }
- else
- {
- allow_glob = TRUE;
- ignore_case_with_glob = FALSE;
- }
-}
-
-/* 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. */
-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[] =
-{
- {"binmode", {x: &binmode}, justset, NULL, {{O_TEXT}, {O_BINARY}}},
- {"codepage", {func: &codepage_init}, isfunc, NULL, {{0}, {0}}},
- {"envcache", {&envcache}, justset, NULL, {{TRUE}, {FALSE}}},
- {"error_start", {func: &error_start_init}, isfunc, NULL, {{0}, {0}}},
- {"export", {&export_settings}, justset, NULL, {{FALSE}, {TRUE}}},
- {"forkchunk", {x: &chunksize}, justset, NULL, {{8192}, {0}}},
- {"glob", {func: &glob_init}, isfunc, NULL, {{0}, {s: "normal"}}},
- {"ntea", {&allow_ntea}, justset, NULL, {{FALSE}, {TRUE}}},
- {"ntsec", {&allow_ntsec}, justset, NULL, {{FALSE}, {TRUE}}},
- {"reset_com", {&reset_com}, justset, NULL, {{FALSE}, {TRUE}}},
- {"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}}},
- {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;
- parse_thing *k;
-
- if (buf == NULL)
- {
- char newbuf[MAX_PATH + 7] = "CYGWIN";
- for (k = known; k->name != NULL; k++)
- if (k->remember)
- {
- strcat (strcat (newbuf, " "), k->remember);
- free (k->remember);
- k->remember = NULL;
- }
- if (!export_settings)
- return;
- newbuf[sizeof ("CYGWIN") - 1] = '=';
- debug_printf ("%s", newbuf);
- putenv (newbuf);
- return;
- }
-
- buf = strcpy ((char *) alloca (strlen (buf) + 1), buf);
- for (p = strtok (buf, " \t"); p != NULL; p = strtok (NULL, " \t"))
- {
- if (!(istrue = !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 (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 (p);
- if (n > 0)
- p[n] = ':';
- k->remember = p;
- break;
- }
- }
- debug_printf ("returning");
- return;
-}
-
-/* Set options from the registry. */
-static void __stdcall
-regopt (const char *name)
-{
- MALLOC_CHECK;
- /* FIXME: should not be under mount */
- reg_key r (KEY_READ, CYGWIN_INFO_PROGRAM_OPTIONS_NAME, NULL);
- char buf[MAX_PATH];
- char lname[strlen(name) + 1];
- strlwr (strcpy (lname, name));
- MALLOC_CHECK;
- if (r.get_string (lname, buf, sizeof (buf) - 1, "") == ERROR_SUCCESS)
- parse_options (buf);
- else
- {
- reg_key r1 (HKEY_LOCAL_MACHINE, KEY_READ, "SOFTWARE",
- CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
- CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
- CYGWIN_INFO_PROGRAM_OPTIONS_NAME, NULL);
- if (r1.get_string (lname, buf, sizeof (buf) - 1, "") == ERROR_SUCCESS)
- parse_options (buf);
- }
- MALLOC_CHECK;
-}
-
-/* Initialize the environ array. Look for the CYGWIN environment
- environment variable and set appropriate options from it. */
-void
-environ_init (char **envp, int envc)
-{
- char *rawenv;
- int i;
- char *p;
- char *newp;
- int sawTERM = 0;
- bool envp_passed_in;
- static char cygterm[] = "TERM=cygwin";
-
- static int initted = 0;
- if (!initted)
- {
- for (int i = 0; conv_envvars[i].name != NULL; i++)
- {
- conv_start_chars[cyg_tolower(conv_envvars[i].name[0])] = 1;
- conv_start_chars[cyg_toupper(conv_envvars[i].name[0])] = 1;
- }
- initted = 1;
- }
-
- regopt ("default");
- if (myself->progname[0])
- regopt (myself->progname);
-
-#ifdef NTSEC_ON_BY_DEFAULT
- /* Set ntsec explicit as default, if NT is running */
- if (os_being_run == winNT)
- allow_ntsec = TRUE;
-#endif
-
- if (!envp)
- envp_passed_in = 0;
- else
- {
- 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 *));
- rawenv = GetEnvironmentStrings ();
-
- /* 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, p = rawenv; *p != '\0'; p = strchr (p, '\0') + 1, i++)
- {
- newp = strdup (p);
- if (i >= envc)
- envp = (char **) realloc (envp, (4 + (envc += 100)) * sizeof (char *));
- envp[i] = newp;
- if (*newp == '=')
- *newp = '!';
- char *eq;
- if ((eq = strchr (newp, '=')) == NULL)
- eq = strchr (newp, '\0');
- if (!myself->ppid_handle)
- ucenv (newp, eq);
- if (*newp == 'T' && strncmp (newp, "TERM=", 5) == 0)
- sawTERM = 1;
- if (*newp == 'C' && strncmp (newp, "CYGWIN=", sizeof("CYGWIN=") - 1) == 0)
- parse_options (newp + sizeof("CYGWIN=") - 1);
- if (*eq && conv_start_chars[(unsigned char)envp[i][0]])
- posify (envp + i, *++eq ? eq : --eq);
- debug_printf ("%p: %s", envp[i], envp[i]);
- }
-
- if (!sawTERM)
- envp[i++] = cygterm;
- envp[i] = NULL;
- FreeEnvironmentStrings (rawenv);
-
-out:
- __cygwin_environ = envp;
- update_envptrs ();
- if (envp_passed_in)
- {
- p = getenv ("CYGWIN");
- if (p)
- parse_options (p);
- }
- parse_options (NULL);
- 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);
-}
-
-/* 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
-winenv (const char * const *envp, int keep_posix)
-{
- int len, n, tl;
- const char * const *srcp;
- const char * *dstp;
-
- for (n = 0; envp[n]; n++)
- continue;
-
- const char *newenvp[n + 1];
-
- debug_printf ("envp %p, keep_posix %d", envp, keep_posix);
-
- for (tl = 0, srcp = envp, dstp = newenvp; *srcp; srcp++, dstp++)
- {
- len = strcspn (*srcp, "=") + 1;
- win_env *conv;
-
- if (!keep_posix && (conv = getwinenv (*srcp, *srcp + len)))
- *dstp = conv->native;
- else
- *dstp = *srcp;
- tl += strlen (*dstp) + 1;
- if ((*dstp)[0] == '!' && isdrive ((*dstp) + 1) && (*dstp)[3] == '=')
- {
- char *p = (char *) alloca (strlen (*dstp) + 1);
- strcpy (p, *dstp);
- *p = '=';
- *dstp = p;
- }
- }
-
- *dstp = NULL; /* Terminate */
-
- int envlen = dstp - newenvp;
- debug_printf ("env count %d, bytes %d", envlen, tl);
-
- /* Windows programs expect the environment block to be sorted. */
- qsort (newenvp, envlen, sizeof (char *), env_sort);
-
- /* Create an environment block suitable for passing to CreateProcess. */
- char *ptr, *envblock;
- envblock = (char *) malloc (tl + 2);
- for (srcp = newenvp, ptr = envblock; *srcp; srcp++)
- {
- len = strlen (*srcp);
- memcpy (ptr, *srcp, len + 1);
- ptr += len + 1;
- }
- *ptr = '\0'; /* Two null bytes at the end */
-
- return envblock;
-}
-
-/* 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 888b473dd..000000000
--- a/winsup/cygwin/environ.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* environ.h: Declarations for environ manipulation
-
- 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. */
-
-/* Initialize the environment */
-void environ_init (char **, int);
-
-/* 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". For the simple case, where a calculated length
- * is required, just return MAX_PATH. *FIXME*
- */
-struct win_env
- {
- const char *name;
- size_t namelen;
- char *posix;
- char *native;
- int (*toposix) (const char *, char *);
- int (*towin32) (const char *, char *);
- int (*posix_len) (const char *);
- int (*win32_len) (const char *);
- void add_cache (const char *in_posix, const char *in_native = NULL);
- const char * get_native () {return native ? native + namelen : NULL;}
- };
-
-win_env * __stdcall getwinenv (const char *name, const char *posix = NULL);
-
-void __stdcall update_envptrs ();
-char * __stdcall winenv (const char * const *, int);
-extern char **__cygwin_environ, ***main_environ;
-extern "C" char __stdcall **cur_environ ();
-int __stdcall envsize (const char * const *, int debug_print = 0);
diff --git a/winsup/cygwin/errno.cc b/winsup/cygwin/errno.cc
deleted file mode 100644
index 87a37910b..000000000
--- a/winsup/cygwin/errno.cc
+++ /dev/null
@@ -1,675 +0,0 @@
-/* errno.cc: errno-related functions
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#define _REENT_ONLY
-#include <stdio.h>
-#include <errno.h>
-#include "cygerrno.h"
-#include "thread.h"
-
-/* 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 const 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 (INVALID_FUNCTION, EBADRQC),
- X (FILE_NOT_FOUND, ENOENT),
- X (PATH_NOT_FOUND, ENOENT),
- X (TOO_MANY_OPEN_FILES, EMFILE),
- X (ACCESS_DENIED, EACCES),
- X (INVALID_HANDLE, EBADF),
- X (NOT_ENOUGH_MEMORY, ENOMEM),
- X (INVALID_DATA, EINVAL),
- X (OUTOFMEMORY, ENOMEM),
- X (INVALID_DRIVE, ENODEV),
- X (NOT_SAME_DEVICE, EXDEV),
- X (NO_MORE_FILES, ENMFILE),
- X (WRITE_PROTECT, EROFS),
- X (BAD_UNIT, ENODEV),
- X (SHARING_VIOLATION, EACCES),
- X (LOCK_VIOLATION, EACCES),
- X (SHARING_BUFFER_EXCEEDED, ENOLCK),
- X (HANDLE_EOF, ENODATA),
- X (HANDLE_DISK_FULL, ENOSPC),
- X (NOT_SUPPORTED, ENOSYS),
- X (REM_NOT_LIST, ENONET),
- X (DUP_NAME, ENOTUNIQ),
- X (BAD_NETPATH, ENOSHARE),
- X (BAD_NET_NAME, ENOSHARE),
- X (FILE_EXISTS, EEXIST),
- X (CANNOT_MAKE, EPERM),
- X (INVALID_PARAMETER, EINVAL),
- X (NO_PROC_SLOTS, EAGAIN),
- X (BROKEN_PIPE, EPIPE),
- X (OPEN_FAILED, EIO),
- X (NO_MORE_SEARCH_HANDLES, ENFILE),
- X (CALL_NOT_IMPLEMENTED, ENOSYS),
- X (INVALID_NAME, ENOENT),
- X (WAIT_NO_CHILDREN, ECHILD),
- X (CHILD_NOT_COMPLETE, EBUSY),
- X (DIR_NOT_EMPTY, ENOTEMPTY),
- X (SIGNAL_REFUSED, EIO),
- X (BAD_PATHNAME, ENOENT),
- X (SIGNAL_PENDING, EBUSY),
- X (MAX_THRDS_REACHED, EAGAIN),
- X (BUSY, EBUSY),
- X (ALREADY_EXISTS, EEXIST),
- X (NO_SIGNAL_SENT, EIO),
- X (FILENAME_EXCED_RANGE, EINVAL),
- X (META_EXPANSION_TOO_LONG, EINVAL),
- X (INVALID_SIGNAL_NUMBER, EINVAL),
- X (THREAD_1_INACTIVE, EINVAL),
- X (BAD_PIPE, EINVAL),
- X (PIPE_BUSY, EBUSY),
- X (NO_DATA, EPIPE),
- X (PIPE_NOT_CONNECTED, ECOMM),
- X (MORE_DATA, EAGAIN),
- X (DIRECTORY, ENOTDIR),
- X (PIPE_CONNECTED, EBUSY),
- X (PIPE_LISTENING, ECOMM),
- X (NO_TOKEN, EINVAL),
- X (PROCESS_ABORTED, EFAULT),
- X (BAD_DEVICE, ENODEV),
- X (BAD_USERNAME, EINVAL),
- X (NOT_CONNECTED, ENOLINK),
- X (OPEN_FILES, EAGAIN),
- X (ACTIVE_CONNECTIONS, EAGAIN),
- X (DEVICE_IN_USE, EAGAIN),
- X (INVALID_AT_INTERRUPT_TIME, EINTR),
- X (IO_DEVICE, EIO),
- X (NOT_OWNER, EPERM),
- X (END_OF_MEDIA, ENOSPC),
- X (EOM_OVERFLOW, ENOSPC),
- X (BEGINNING_OF_MEDIA, ESPIPE),
- X (SETMARK_DETECTED, ESPIPE),
- X (NO_DATA_DETECTED, ENOSPC),
- X (POSSIBLE_DEADLOCK, EDEADLOCK),
- X (CRC, EIO),
- X (NEGATIVE_SEEK, EINVAL),
- X (NOT_READY, ENOMEDIUM),
- X (DISK_FULL, ENOSPC),
- X (NOACCESS, EFAULT),
- { 0, NULL, 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 errno %d", file, line, code);
- set_errno (geterrno_from_win_error (code, EACCES));
- return;
-}
-
-/* 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));
-
-extern const char __declspec(dllexport) * const _sys_errlist[]=
-{
-/* NOERROR 0 */ "No error",
-/* EPERM 1 */ "Not super-user",
-/* ENOENT 2 */ "No such file or directory",
-/* ESRCH 3 */ "No such process",
-/* EINTR 4 */ "Interrupted system call",
-/* EIO 5 */ "I/O error",
-/* ENXIO 6 */ "No such device or address",
-/* E2BIG 7 */ "Arg list too long",
-/* ENOEXEC 8 */ "Exec format error",
-/* EBADF 9 */ "Bad file number",
-/* ECHILD 10 */ "No children",
-/* EAGAIN 11 */ "Resource temporarily unavailable",
-/* ENOMEM 12 */ "Not enough core",
-/* EACCES 13 */ "Permission denied",
-/* EFAULT 14 */ "Bad address",
-/* ENOTBLK 15 */ "Block device required",
-/* EBUSY 16 */ "Mount device busy",
-/* EEXIST 17 */ "File exists",
-/* EXDEV 18 */ "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 */ "Not a typewriter",
-/* 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 */ "Math arg out of domain of func",
-/* ERANGE 34 */ "Math result not representable",
-/* 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 */ "Deadlock condition",
-/* ENOLCK 46 */ "No record locks available",
- "47",
- "48",
- "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 fmt",
- "58",
- "59",
-/* ENOSTR 60 */ "Device not a stream",
-/* ENODATA 61 */ "No data (for no delay io)",
-/* 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 */ "The object is remote",
-/* ENOLINK 67 */ "The link has been severed",
-/* EADV 68 */ "Advertise error",
-/* ESRMNT 69 */ "Srmount error",
-/* ECOMM 70 */ "Communication error on send",
-/* EPROTO 71 */ "Protocol error",
- "72",
- "73",
-/* EMULTIHOP 74 */ "Multihop attempted",
-/* ELBIN 75 */ "Inode is remote (not really error)",
-/* EDOTDOT 76 */ "Cross mount point (not really error)",
-/* EBADMSG 77 */ "Trying to read unreadable message",
- "78",
- "79",
-/* ENOTUNIQ 80 */ "Given log. name not unique",
-/* EBADFD 81 */ "f.d. invalid for this operation",
-/* EREMCHG 82 */ "Remote address changed",
-/* ELIBACC 83 */ "Can't access a needed shared lib",
-/* ELIBBAD 84 */ "Accessing a corrupted shared lib",
-/* ELIBSCN 85 */ ".lib section in a.out corrupted",
-/* ELIBMAX 86 */ "Attempting to link in too many libs",
-/* ELIBEXEC 87 */ "Attempting to exec a shared library",
-/* ENOSYS 88 */ "Function not implemented",
-/* ENMFILE 89 */ "No more files",
-/* ENOTEMPTY 90 */ "Directory not empty",
-/* ENAMETOOLONG 91 */ "File or path name too long",
-/* ELOOP 92 */ "Too many symbolic links",
- "93",
- "94",
-/* EOPNOTSUPP 95 */ "Operation not supported on transport endpoint",
-/* EPFNOSUPPORT 96 */ "Protocol family not supported",
- "97",
- "98",
- "99",
- "100",
- "101",
- "102",
- "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 transport endpoint",
-/* 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 */ "Connection aborted",
-/* 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 because of reset",
-/* EISCONN 127 */ "Transport endpoint is already connected",
-/* ENOTCONN 128 */ "Transport endpoint is not connected",
-/* ETOOMANYREFS 129 */ "Too many references: cannot splice",
-/* EPROCLIM 130 */ "Process limit exceeded",
-/* EUSERS 131 */ "Too many users",
-/* EDQUOT 132 */ "Quota exceeded",
-/* ESTALE 133 */ "Stale NFS file handle",
-/* ENOTSUP 134 */ "134",
-/* ENOMEDIUM 135 */ "no medium",
-/* ENOSHARE 136 */ "No such host or network path"
-};
-
-int __declspec(dllexport) _sys_nerr =
- sizeof (_sys_errlist) / sizeof (_sys_errlist[0]);
-
-/* FIXME: Why is strerror() a long switch and not just:
- return sys_errlist[errnum];
- (or moral equivalent).
- Some entries in sys_errlist[] don't match the corresponding
- entries in strerror(). This seems odd.
-*/
-
-/* CYGWIN internal */
-/* strerror: convert from errno values to error strings */
-extern "C" char *
-strerror (int errnum)
-{
- const char *error;
- switch (errnum)
- {
- case EPERM:
- error = "Not owner";
- break;
- case ENOENT:
- error = "No such file or directory";
- break;
- case ESRCH:
- error = "No such process";
- break;
- case EINTR:
- error = "Interrupted system call";
- break;
- case EIO:
- error = "I/O error";
- break;
- case ENXIO:
- error = "No such device or address";
- break;
- case E2BIG:
- error = "Arg list too long";
- break;
- case ENOEXEC:
- error = "Exec format error";
- break;
- case EBADF:
- error = "Bad file number";
- break;
- case ECHILD:
- error = "No children";
- break;
- case EAGAIN:
- error = "Resource temporarily unavailable";
- break;
- case ENOMEM:
- error = "Not enough memory";
- break;
- case EACCES:
- error = "Permission denied";
- break;
- case EFAULT:
- error = "Bad address";
- break;
- case ENOTBLK:
- error = "Block device required";
- break;
- case EBUSY:
- error = "Device or resource busy";
- break;
- case EEXIST:
- error = "File exists";
- break;
- case EXDEV:
- error = "Cross-device link";
- break;
- case ENODEV:
- error = "No such device";
- break;
- case ENOTDIR:
- error = "Not a directory";
- break;
- case EISDIR:
- error = "Is a directory";
- break;
- case EINVAL:
- error = "Invalid argument";
- break;
- case ENFILE:
- error = "Too many open files in system";
- break;
- case EMFILE:
- error = "Too many open files";
- break;
- case ENOTTY:
- error = "Not a character device";
- break;
- case ETXTBSY:
- error = "Text file busy";
- break;
- case EFBIG:
- error = "File too large";
- break;
- case ENOSPC:
- error = "No space left on device";
- break;
- case ESPIPE:
- error = "Illegal seek";
- break;
- case EROFS:
- error = "Read-only file system";
- break;
- case EMLINK:
- error = "Too many links";
- break;
- case EPIPE:
- error = "Broken pipe";
- break;
- case EDOM:
- error = "Math arg out of domain of func";
- break;
- case ERANGE:
- error = "Math result out of range";
- break;
- case ENOMSG:
- error = "No message of desired type";
- break;
- case EIDRM:
- error = "Identifier removed";
- break;
- case ECHRNG:
- error = "Channel number out of range";
- break;
- case EL2NSYNC:
- error = "Level 2 not synchronized";
- break;
- case EL3HLT:
- error = "Level 3 halted";
- break;
- case EL3RST:
- error = "Level 3 reset";
- break;
- case ELNRNG:
- error = "Link number out of range";
- break;
- case EUNATCH:
- error = "Protocol driver not attached";
- break;
- case ENOCSI:
- error = "No CSI structure available";
- break;
- case EL2HLT:
- error = "Level 2 halted";
- break;
- case EDEADLK:
- error = "Deadlock condition";
- break;
- case ENOLCK:
- error = "No lock";
- break;
- case EBADE:
- error = "Invalid exchange";
- break;
- case EBADR:
- error = "Invalid request descriptor";
- break;
- case EXFULL:
- error = "Exchange full";
- break;
- case ENOANO:
- error = "No anode";
- break;
- case EBADRQC:
- error = "Invalid request code";
- break;
- case EBADSLT:
- error = "Invalid slot";
- break;
- case EDEADLOCK:
- error = "File locking deadlock error";
- break;
- case EBFONT:
- error = "Bad font file fmt";
- break;
- case ENOSTR:
- error = "Not a stream";
- break;
- case ENODATA:
- error = "No data (for no delay io)";
- break;
- case ETIME:
- error = "Stream ioctl timeout";
- break;
- case ENOSR:
- error = "No stream resources";
- break;
- case ENONET:
- error = "Machine is not on the network";
- break;
- case ENOPKG:
- error = "No package";
- break;
- case EREMOTE:
- error = "Resource is remote";
- break;
- case ENOLINK:
- error = "Virtual circuit is gone";
- break;
- case EADV:
- error = "Advertise error";
- break;
- case ESRMNT:
- error = "Srmount error";
- break;
- case ECOMM:
- error = "Communication error";
- break;
- case EPROTO:
- error = "Protocol error";
- break;
- case EMULTIHOP:
- error = "Multihop attempted";
- break;
- case ELBIN:
- error = "Inode is remote (not really error)";
- break;
- case EDOTDOT:
- error = "Cross mount point (not really error)";
- break;
- case EBADMSG:
- error = "Bad message";
- break;
- case ENOTUNIQ:
- error = "Given log. name not unique";
- break;
- case EBADFD:
- error = "f.d. invalid for this operation";
- break;
- case EREMCHG:
- error = "Remote address changed";
- break;
- case ELIBACC:
- error = "Cannot access a needed shared library";
- break;
- case ELIBBAD:
- error = "Accessing a corrupted shared library";
- break;
- case ELIBSCN:
- error = ".lib section in a.out corrupted";
- break;
- case ELIBMAX:
- error = "Attempting to link in more shared libraries than system limit";
- break;
- case ELIBEXEC:
- error = "Cannot exec a shared library directly";
- break;
- case ENOSYS:
- error = "Function not implemented";
- break;
- case ENMFILE:
- error = "No more files";
- break;
- case ENOTEMPTY:
- error = "Directory not empty";
- break;
- case ENAMETOOLONG:
- error = "File or path name too long";
- break;
- case ELOOP:
- error = "Too many symbolic links";
- break;
- case EOPNOTSUPP:
- error = "Operation not supported on transport endpoint";
- break;
- case EPFNOSUPPORT:
- error = "Protocol family not supported";
- break;
- case ECONNRESET:
- error = "Connection reset by peer";
- break;
- case ENOBUFS:
- error = "No buffer space available; the socket cannot be connected";
- break;
- case EAFNOSUPPORT:
- error = "Addresses in the specified family cannot be used with this socket";
- break;
- case EPROTOTYPE:
- error = "errno EPROTOTYPE triggered";
- break;
- case ENOTSOCK:
- error = "The descriptor is a file, not a socket";
- break;
- case ENOPROTOOPT:
- error = "This option is unsupported";
- break;
- case ESHUTDOWN:
- error = "errno ESHUTDOWN triggered";
- break;
- case ECONNREFUSED:
- error = "Connection refused";
- break;
- case EADDRINUSE:
- error = "Address already in use";
- break;
- case ECONNABORTED:
- error = "The connection was aborted";
- break;
- case ENETUNREACH:
- error ="The network can't be reached from this host at this time";
- break;
- case ENETDOWN:
- error = "Network failed.";
- break;
- case ETIMEDOUT:
- error = "Attempt to connect timed out without establishing a connection";
- break;
- case EHOSTDOWN:
- error = "errno EHOSTDOWN triggered";
- break;
- case EHOSTUNREACH:
- error = "errno EHOSTUNREACH triggered";
- break;
- case EINPROGRESS:
- error = "errno EINPROGRESS triggered";
- break;
- case EALREADY:
- error = "errno EALREADY triggered";
- break;
- case EDESTADDRREQ:
- error = "errno EDESTADDRREQ triggered";
- break;
- case EMSGSIZE:
- error = "errno EMSGSIZE triggered";
- break;
-
- case EPROTONOSUPPORT:
- error = "errno EPROTONOSUPPORT triggered";
- break;
- case ESOCKTNOSUPPORT:
- error = "errno ESOCKTNOSUPPORT triggered";
- break;
- case EADDRNOTAVAIL:
- error = "errno EADDRNOTAVAIL triggered";
- break;
- case ENETRESET:
- error = "errno ENETRESET triggered";
- break;
- case EISCONN:
- error = "The socket is already connected";
- break;
- case ENOTCONN:
- error = "The socket is not connected";
- break;
- case ETOOMANYREFS:
- error = "errno ETOOMANYREFS triggered";
- break;
- case EPROCLIM:
- error = "errno EPROCLIM triggered";
- break;
- case EUSERS:
- error = "errno EUSERS triggered";
- break;
- case EDQUOT:
- error = "errno EDQUOT triggered";
- break;
- case ESTALE:
- error = "errno ESTALE triggered";
- break;
- case ENOTSUP:
- error = "errno ENOTSUP triggered";
- break;
- case ENOMEDIUM:
- error = "no medium";
- break;
- case ENOSHARE:
- error = "No such host or network path";
- break;
- default:
-#ifdef _MT_SAFE
- char *buf= _reent_winsup()->_strerror_buf;
-#else
- static NO_COPY char buf[20];
-#endif
- __small_sprintf (buf, "error %d", errnum);
- error = buf;
- break;
- }
-
- /* FIXME: strerror should really be const in the appropriate newlib
- include files. */
- return (char *) error;
-}
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
deleted file mode 100644
index d30eb32db..000000000
--- a/winsup/cygwin/exceptions.cc
+++ /dev/null
@@ -1,1142 +0,0 @@
-/* exceptions.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#define Win32_Winsock
-#include "winsup.h"
-#include <imagehlp.h>
-#include <errno.h>
-
-#include "exceptions.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "cygerrno.h"
-#include "perthread.h"
-#include "shared_info.h"
-#include "perprocess.h"
-#include "security.h"
-
-#define CALL_HANDLER_RETRY 20
-
-char debugger_command[2 * MAX_PATH + 20];
-
-extern "C" {
-static int handle_exceptions (EXCEPTION_RECORD *, void *, CONTEXT *, void *);
-extern void sigreturn ();
-extern void sigdelayed ();
-extern void siglast ();
-extern DWORD __no_sig_start, __no_sig_end;
-};
-
-extern DWORD sigtid;
-
-static BOOL WINAPI ctrl_c_handler (DWORD);
-static void signal_exit (int) __attribute__ ((noreturn));
-static char 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 NO_COPY muto *mask_sync = NULL;
-
-HMODULE NO_COPY cygwin_hmodule;
-
-static const struct
-{
- unsigned int code;
- const char *name;
-} status_info[] NO_COPY =
-{
-#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. */
-
-#ifdef __i386__
-
-// Set up the exception handler for the current thread. The PowerPC & Mips
-// use compiler generated tables to set up the exception handlers for each
-// region of code, and the kernel walks the call list until it finds a region
-// of code that handles exceptions. The x86 on the other hand uses segment
-// register fs, offset 0 to point to the current exception handler.
-
-asm (".equ __except_list,0");
-
-extern exception_list *_except_list asm ("%fs:__except_list");
-
-static void
-init_exception_handler (exception_list *el)
-{
- el->handler = handle_exceptions;
- el->prev = _except_list;
- _except_list = el;
-}
-
-#define INIT_EXCEPTION_HANDLER(el) init_exception_handler (el)
-#endif
-
-void
-set_console_handler ()
-{
- /* Initialize global security attribute stuff */
-
- 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 ();
-
- (void) SetConsoleCtrlHandler (ctrl_c_handler, FALSE);
- if (!SetConsoleCtrlHandler (ctrl_c_handler, TRUE))
- system_printf ("SetConsoleCtrlHandler failed, %E");
-}
-
-extern "C" void
-init_exceptions (exception_list *el)
-{
-#ifdef INIT_EXCEPTION_HANDLER
- INIT_EXCEPTION_HANDLER (el);
-#endif
-}
-
-extern "C" void
-error_start_init (const char *buf)
-{
- if (!buf || !*buf)
- {
- debugger_command[0] = '\0';
- return;
- }
-
- char myself_posix_name[MAX_PATH];
-
- /* FIXME: gdb cannot use win32 paths, but what if debugger isn't gdb? */
- cygwin_conv_to_posix_path (myself->progname, myself_posix_name);
- __small_sprintf (debugger_command, "%s %s", buf, myself_posix_name);
-}
-
-/* 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;
- }
- }
- }
-
-#ifdef __i386__
-#define HAVE_STATUS
- if (exception_name)
- small_printf ("Exception: %s at eip=%08x\r\n", exception_name, in->Eip);
- else
- small_printf ("Exception %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\r\n",
- in->Ebp, in->Esp, myself->progname);
- 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);
-#endif
-
-#ifndef HAVE_STATUS
- system_printf ("Had an exception");
-#endif
-}
-
-#ifdef __i386__
-/* Print a stack backtrace. */
-
-#define HAVE_STACK_TRACE
-
-/* A class for manipulating the stack. */
-class stack_info
-{
- int first_time; /* True if just starting to iterate. */
- int walk (); /* Uses the "old" method */
- char *next_offset () {return *((char **) sf.AddrFrame.Offset);}
-public:
- STACKFRAME sf; /* For storing the stack information */
- void init (DWORD); /* Called the first time that stack info is needed */
- stack_info (): first_time (1) {}
-
- /* Postfix ++ iterates over the stack, returning zero when nothing is left. */
- int operator ++(int) { return this->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;
-static signal_dispatch sigsave;
-
-/* Initialize everything needed to start iterating. */
-void
-stack_info::init (DWORD ebp)
-{
- first_time = 1;
- memset (&sf, 0, sizeof (sf));
- sf.AddrFrame.Offset = ebp;
- sf.AddrPC.Offset = ((DWORD *) ebp)[1];
- sf.AddrFrame.Mode = AddrModeFlat;
-}
-
-/* Walk the stack by looking at successive stored 'bp' frames.
- This is not foolproof. */
-int
-stack_info::walk ()
-{
- char **ebp;
- if (first_time)
- /* Everything is filled out already */
- ebp = (char **) sf.AddrFrame.Offset;
- else if ((ebp = (char **) next_offset ()) != NULL)
- {
- sf.AddrFrame.Offset = (DWORD) ebp;
- sf.AddrPC.Offset = sf.AddrReturn.Offset;
- }
- else
- return 0;
-
- first_time = 0;
- if (!sf.AddrPC.Offset)
- return 0; /* stack frames are exhausted */
-
- /* The return address always follows the stack pointer */
- sf.AddrReturn.Offset = (DWORD) *++ebp;
-
- /* The arguments follow the return address */
- for (unsigned i = 0; i < NPARAMS; i++)
- sf.Params[i] = (DWORD) *++ebp;
- return 1;
-}
-
-/* Dump the stack */
-static void
-stack (CONTEXT *cx)
-{
- int i;
-
- thestack.init (cx->Ebp); /* 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",
- i == 16 ? " (more stack frames may be present)" : "");
-}
-
-/* Temporary (?) function for external callers to get a stack dump */
-extern "C" void
-cygwin_stackdump ()
-{
- CONTEXT c;
- c.ContextFlags = CONTEXT_FULL;
- GetThreadContext (GetCurrentThread (), &c);
- stack (&c);
-}
-
-static int NO_COPY keep_looping = 0;
-
-#define TIME_TO_WAIT_FOR_DEBUGGER 10000
-
-extern "C" int
-try_to_debug ()
-{
- debug_printf ("debugger_command %s", debugger_command);
- if (*debugger_command == '\0')
- return 0;
-
- __small_sprintf (strchr (debugger_command, '\0'), " %u", GetCurrentProcessId ());
-
- BOOL dbg;
-
- PROCESS_INFORMATION pi = {NULL, 0, 0, 0};
-
- STARTUPINFO 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 */
-
- ReleaseMutex (title_mutex);
-
- /* prevent recursive exception handling */
- char* rawenv = GetEnvironmentStrings () ;
- for (char* p = rawenv; *p != '\0'; p = strchr (p, '\0') + 1)
- {
- if (strncmp (p, "CYGWIN=", sizeof ("CYGWIN=") - 1) == 0)
- {
- system_printf ("%s", p);
- char* q = strstr (p, "error_start") ;
- /* replace 'error_start=...' with '_rror_start=...' */
- if (q) *q = '_' ;
- SetEnvironmentVariable ("CYGWIN", p + sizeof ("CYGWIN=")) ;
- break ;
- }
- }
-
- dbg = CreateProcess (NULL,
- debugger_command,
- NULL,
- NULL,
- FALSE,
- CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP,
- NULL,
- NULL,
- &si,
- &pi);
- if (!dbg)
- {
- system_printf ("Failed to start debugger: %E");
- /* FIXME: need to know handles of all running threads to
- resume_all_threads_except (current_thread_id);
- */
- }
- else
- {
- char event_name [ sizeof ("cygwin_error_start_event") + 9 ];
- DWORD win32_pid = GetCurrentProcessId ();
- __small_sprintf (event_name, "cygwin_error_start_event%x", win32_pid);
- HANDLE sync_with_dbg = CreateEvent (NULL, TRUE, FALSE, event_name);
- keep_looping = 1;
- while (keep_looping)
- {
- if (sync_with_dbg == NULL)
- Sleep (TIME_TO_WAIT_FOR_DEBUGGER);
- else
- {
- if (WaitForSingleObject (sync_with_dbg,
- TIME_TO_WAIT_FOR_DEBUGGER) == WAIT_OBJECT_0)
- break;
- }
- }
- }
-
- return 0;
-}
-
-static void
-stackdump (EXCEPTION_RECORD *e, CONTEXT *in)
-{
- const char *p;
- if (myself->progname[0])
- {
- /* write to progname.stackdump if possible */
- if ((p = strrchr (myself->progname, '\\')))
- p++;
- else
- p = myself->progname;
- char corefile[strlen (p) + sizeof (".stackdump")];
- __small_sprintf (corefile, "%s.stackdump", p);
- HANDLE h = CreateFile (corefile, GENERIC_WRITE, 0, &sec_none_nih,
- CREATE_ALWAYS, 0, 0);
- if (h != INVALID_HANDLE_VALUE)
- {
- system_printf ("Dumping stack trace to %s", corefile);
- SetStdHandle (STD_ERROR_HANDLE, h);
- }
- }
- if (e)
- exception (e, in);
- stack (in);
-}
-
-/* Main exception handler. */
-
-static int
-handle_exceptions (EXCEPTION_RECORD *e, void *, CONTEXT *in, void *)
-{
- int sig;
-
- /* If we've already exited, don't do anything here. Returning 1
- tells Windows to keep looking for an exception handler. */
- if (exit_already)
- return 1;
-
- /* Coerce win32 value to posix value. */
- switch (e->ExceptionCode)
- {
- case STATUS_FLOAT_DENORMAL_OPERAND:
- case STATUS_FLOAT_DIVIDE_BY_ZERO:
- case STATUS_FLOAT_INEXACT_RESULT:
- case STATUS_FLOAT_INVALID_OPERATION:
- case STATUS_FLOAT_OVERFLOW:
- case STATUS_FLOAT_STACK_CHECK:
- case STATUS_FLOAT_UNDERFLOW:
- case STATUS_INTEGER_DIVIDE_BY_ZERO:
- case STATUS_INTEGER_OVERFLOW:
- sig = SIGFPE;
- break;
-
- case STATUS_ILLEGAL_INSTRUCTION:
- case STATUS_PRIVILEGED_INSTRUCTION:
- case STATUS_NONCONTINUABLE_EXCEPTION:
- sig = SIGILL;
- break;
-
- case STATUS_TIMEOUT:
- sig = SIGALRM;
- break;
-
- case STATUS_ACCESS_VIOLATION:
- case STATUS_DATATYPE_MISALIGNMENT:
- case STATUS_ARRAY_BOUNDS_EXCEEDED:
- case STATUS_GUARD_PAGE_VIOLATION:
- case STATUS_IN_PAGE_ERROR:
- case STATUS_NO_MEMORY:
- case STATUS_INVALID_DISPOSITION:
- case STATUS_STACK_OVERFLOW:
- sig = SIGSEGV;
- break;
-
- case STATUS_CONTROL_C_EXIT:
- sig = 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", sig, in->Eip);
-
- if (myself->getsig (sig).sa_mask & SIGTOMASK (sig))
- syscall_printf ("signal %d, masked %p", sig, myself->getsig (sig).sa_mask);
-
- debug_printf ("In cygwin_except_handler calling %p",
- myself->getsig (sig).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 (!myself->progname[0]
- || GetCurrentThreadId () == sigtid
- || (void *) myself->getsig (sig).sa_handler == (void *) SIG_DFL
- || (void *) myself->getsig (sig).sa_handler == (void *) SIG_IGN
- || (void *) myself->getsig (sig).sa_handler == (void *) SIG_ERR)
- {
- static NO_COPY int traced = 0;
-
- /* Print the exception to the console */
- if (e)
- {
- 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 (traced++)
- system_printf ("Error while dumping state (probably corrupted stack)");
- else
- {
- CONTEXT c = *in;
- DWORD stack[6];
- stack[0] = in->Ebp;
- stack[1] = in->Eip;
- stack[2] = stack[3] = stack[4] = stack[5] = 0;
- c.Ebp = (DWORD) &stack;
- stackdump (e, &c);
- }
- try_to_debug ();
- signal_exit (0x80 | sig); // Flag signal + core dump
- }
-
- sig_send (NULL, sig, (DWORD) ebp); // Signal myself
- return 0;
-}
-#endif /* __i386__ */
-
-#ifndef HAVE_STACK_TRACE
-void
-stack (void)
-{
- system_printf ("Stack trace not yet supported on this machine.");
-}
-#endif
-
-/* Utilities to call a user supplied exception handler. */
-
-#define SIG_NONMASKABLE (SIGTOMASK (SIGCONT) | SIGTOMASK (SIGKILL) | SIGTOMASK (SIGSTOP))
-
-#ifdef __i386__
-#define HAVE_CALL_HANDLER
-
-/* 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)
-{
- sigframe thisframe (mainthread);
- sigset_t oldmask = myself->getsigmask (); // Remember for restoration
-
- set_process_mask (tempmask & ~SIG_NONMASKABLE);// Let signals we're
- // interested in through.
- sigproc_printf ("old mask %x, new mask %x", oldmask, tempmask);
-
- WaitForSingleObject (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. */
-
- sigsave.oldmask = oldmask; // Will be restored by signal handler
- return -1;
-}
-
-extern DWORD exec_exit; // Possible exit value for exec
-extern int pending_signals;
-
-int
-interruptible (DWORD pc, int testvalid = 0)
-{
- int res;
- MEMORY_BASIC_INFORMATION m;
-
- memset (&m, 0, sizeof m);
- if (!VirtualQuery ((LPCVOID) pc, &m, sizeof m))
- sigproc_printf ("couldn't get memory info, pc %p, %E", pc);
-
- char *checkdir = (char *) alloca (windows_system_directory_length + 4);
- memset (checkdir, 0, sizeof (checkdir));
-
-# define h ((HMODULE) m.AllocationBase)
- /* Apparently Windows 95 can sometimes return bogus addresses from
- GetThreadContext. These resolve to an allocation base == 0.
- These should *never* be treated as interruptible. */
- if (!h || m.State != MEM_COMMIT)
- res = 0;
- else if (testvalid)
- res = 1; /* All we wanted to know was if this was a valid module. */
- else if (h == user_data->hmodule)
- res = 1;
- else if (h == cygwin_hmodule)
- res = 0;
- else if (!GetModuleFileName (h, checkdir, windows_system_directory_length + 2))
- res = 0;
- else
- res = !strncasematch (windows_system_directory, checkdir,
- windows_system_directory_length);
- minimal_printf ("h %p", h);
-# undef h
-
- minimal_printf ("interruptible %d", res);
- return res;
-}
-
-static void __stdcall
-interrupt_setup (int sig, struct sigaction& siga, void *handler,
- DWORD retaddr, DWORD *retaddr_on_stack)
-{
- sigsave.retaddr = retaddr;
- sigsave.retaddr_on_stack = retaddr_on_stack;
- sigsave.oldmask = myself->getsigmask (); // Remember for restoration
- /* FIXME: Not multi-thread aware */
- sigsave.newmask = myself->getsigmask () | siga.sa_mask | SIGTOMASK (sig);
- sigsave.func = (void (*)(int)) handler;
- sigsave.sig = sig;
- sigsave.saved_errno = -1; // Flag: no errno to save
-}
-
-static bool
-interrupt_now (CONTEXT *ctx, int sig, struct sigaction& siga, void *handler)
-{
- interrupt_setup (sig, siga, handler, ctx->Eip, 0);
- ctx->Eip = (DWORD) sigdelayed;
- SetThreadContext (myself->getthread2signal (), ctx); /* Restart the thread */
- return 1;
-}
-
-void __stdcall
-signal_fixup_after_fork ()
-{
- if (!sigsave.sig)
- return;
-
- sigsave.sig = 0;
- if (sigsave.retaddr_on_stack)
- {
- *sigsave.retaddr_on_stack = sigsave.retaddr;
- set_process_mask (sigsave.oldmask);
- }
-}
-
-void __stdcall
-signal_fixup_after_exec (bool isspawn)
-{
- /* Set up child's signal handlers */
- for (int i = 0; i < NSIG; i++)
- {
- myself->getsig(i).sa_mask = 0;
- if (myself->getsig(i).sa_handler != SIG_IGN || isspawn)
- myself->getsig(i).sa_handler = SIG_DFL;
- }
-}
-
-static int
-interrupt_on_return (sigthread *th, int sig, struct sigaction& siga, void *handler)
-{
- int i;
- DWORD ebp = th->frame;
-
- if (!ebp)
- return 0;
-
- thestack.init (ebp); /* Initialize from the input CONTEXT */
- for (i = 0; i < 32 && thestack++ ; i++)
- if (interruptible (thestack.sf.AddrReturn.Offset))
- {
- DWORD *addr_retaddr = ((DWORD *)thestack.sf.AddrFrame.Offset) + 1;
- if (*addr_retaddr == thestack.sf.AddrReturn.Offset)
- {
- interrupt_setup (sig, siga, handler, *addr_retaddr, addr_retaddr);
- *addr_retaddr = (DWORD) sigdelayed;
- }
- return 1;
- }
-
- sigproc_printf ("couldn't find a stack frame, i %d\n", i);
- return 0;
-}
-
-extern "C" void __stdcall
-set_sig_errno (int e)
-{
- set_errno (e);
- sigsave.saved_errno = e;
- // sigproc_printf ("errno %d", e);
-}
-
-static int
-call_handler (int sig, struct sigaction& siga, void *handler)
-{
- CONTEXT cx;
- bool interrupted = 0;
- HANDLE hth = NULL;
- int res;
- sigthread *th = NULL; // Initialization needed to shut up gcc
-
- if (sigsave.sig)
- goto set_pending;
-
- for (int i = 0; !interrupted && i < CALL_HANDLER_RETRY; i++)
- {
- EnterCriticalSection (&mainthread.lock);
- if (mainthread.frame)
- th = &mainthread;
- else
- {
- LeaveCriticalSection (&mainthread.lock);
-
- th = NULL;
-
- hth = myself->getthread2signal ();
-
- /* Suspend the thread which will receive the signal. But first ensure that
- this thread doesn't have any mutos. (FIXME: Someday we should just grab
- all of the mutos rather than checking for them)
- 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 is stopped) then
- just queue the signal. */
-
- sigproc_printf ("suspending mainthread");
- res = SuspendThread (hth);
-
- /* Just set pending if thread is already suspended */
- if (res)
- goto set_pending;
-
- muto *m;
- /* FIXME: Make multi-thread aware */
- for (m = muto_start.next; m != NULL; m = m->next)
- if (m->unstable () || m->owner () == mainthread.id)
- {
- sigproc_printf ("suspended thread owns a muto (%s)", m->name);
- goto resume_thread;
- }
-
- EnterCriticalSection (&mainthread.lock);
- if (mainthread.frame)
- {
- th = &mainthread;
- goto try_to_interrupt;
- }
-
- LeaveCriticalSection (&mainthread.lock);
-
- cx.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER;
- if (!GetThreadContext (hth, &cx))
- system_printf ("couldn't get context of main thread, %E");
- else if (!interruptible (cx.Eip, 1))
- sigproc_printf ("suspended thread in a strange state pc %p, sp %p",
- cx.Eip, cx.Esp);
- else
- goto try_to_interrupt;
-
- resume_thread:
- ResumeThread (hth);
- Sleep (0);
- continue;
- }
-
- try_to_interrupt:
- if (th)
- {
- interrupted = interrupt_on_return (th, sig, siga, handler);
- if (!interrupted)
- LeaveCriticalSection (&th->lock);
- }
- else if (interruptible (cx.Eip))
- interrupted = interrupt_now (&cx, sig, siga, handler);
- else
- break;
- }
-
-set_pending:
- if (!interrupted)
- {
- pending_signals = 1; /* FIXME: Probably need to be more tricky here */
- sig_set_pending (sig);
- sigproc_printf ("couldn't send signal %d", sig);
- }
- else
- {
- res = SetEvent (signal_arrived); // For an EINTR case
- sigproc_printf ("armed signal_arrived %p, res %d", signal_arrived, res);
- /* Clear any waiting threads prior to dispatching to handler function */
- proc_subproc (PROC_CLEARWAIT, 1);
- }
-
- if (th)
- LeaveCriticalSection (&th->lock);
-
- if (!hth)
- sigproc_printf ("didn't suspend main thread, th %p", th);
- else
- {
- res = ResumeThread (hth);
- sigproc_printf ("ResumeThread returned %d", res);
- }
-
- sigproc_printf ("returning %d", interrupted);
- return interrupted;
-}
-#endif /* i386 */
-
-#ifndef HAVE_CALL_HANDLER
-#error "Need to supply machine dependent call_handler"
-#endif
-
-/* Keyboard interrupt handler. */
-static BOOL WINAPI
-ctrl_c_handler (DWORD type)
-{
- if (type == CTRL_LOGOFF_EVENT)
- return TRUE;
-
- if ((type == CTRL_CLOSE_EVENT) || (type == CTRL_SHUTDOWN_EVENT))
- /* 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. */
- {
- sig_send (NULL, SIGHUP);
- return FALSE;
- }
- tty_min *t = cygwin_shared->tty.get_tty (myself->ctty);
- /* Ignore this if we're not the process group lead since it should be handled
- *by* the process group leader. */
- if (t->getpgid () != myself->pid ||
- (GetTickCount () - t->last_ctrl_c) < MIN_CTRL_C_SLOP)
- return TRUE;
- else
- /* 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. */
- {
- t->last_ctrl_c = GetTickCount ();
- kill (-myself->pid, SIGINT);
- t->last_ctrl_c = GetTickCount ();
- return TRUE;
- }
-}
-
-/* Set the signal mask for this process.
- Note that some signals are unmaskable, as in UNIX. */
-extern "C" void __stdcall
-set_process_mask (sigset_t newmask)
-{
- sigframe thisframe (mainthread);
- mask_sync->acquire (INFINITE);
- sigset_t oldmask = myself->getsigmask ();
- newmask &= ~SIG_NONMASKABLE;
- sigproc_printf ("old mask = %x, new mask = %x", myself->getsigmask (), newmask);
- myself->setsigmask (newmask); // Set a new mask
- mask_sync->release ();
- if (oldmask != newmask && GetCurrentThreadId () != sigtid)
- sig_dispatch_pending ();
- else
- sigproc_printf ("not calling sig_dispatch_pending. sigtid %p current %p",
- sigtid, GetCurrentThreadId ());
- return;
-}
-
-extern "C" {
-static void
-sig_handle_tty_stop (int sig)
-{
- myself->stopsig = sig;
- myself->process_state |= PID_STOPPED;
- /* See if we have a living parent. If so, send it a special signal.
- * It will figure out exactly which pid has stopped by scanning
- * its list of subprocesses.
- */
- if (my_parent_is_alive ())
- {
- pinfo parent (myself->ppid);
- sig_send (parent, __SIGCHILDSTOPPED);
- }
- sigproc_printf ("process %d stopped by signal %d, myself->ppid_handle %p",
- myself->pid, sig, myself->ppid_handle);
- /* There is a small race here with the above two mutexes */
- SuspendThread (hMainThread);
- return;
-}
-}
-
-int __stdcall
-sig_handle (int sig)
-{
- int rc = 0;
-
- sigproc_printf ("signal %d", sig);
-
- struct sigaction thissig = myself->getsig (sig);
- void *handler = (void *) thissig.sa_handler;
-
- myself->rusage_self.ru_nsignals++;
-
- /* Clear pending SIGCONT on stop signals */
- if (sig == SIGSTOP || sig == SIGTSTP || sig == SIGTTIN || sig == SIGTTOU)
- sig_clear (SIGCONT);
-
- if (sig == SIGKILL)
- goto exit_sig;
-
- if (sig == SIGSTOP)
- goto stop;
-
- /* FIXME: Should we still do this if SIGCONT has a handler? */
- if (sig == SIGCONT)
- {
- myself->stopsig = 0;
- myself->process_state &= ~PID_STOPPED;
- /* Clear pending stop signals */
- sig_clear (SIGSTOP);
- sig_clear (SIGTSTP);
- sig_clear (SIGTTIN);
- sig_clear (SIGTTOU);
- /* Windows 95 hangs on resuming non-suspended thread */
- SuspendThread (hMainThread);
- while (ResumeThread (hMainThread) > 1)
- ;
- /* process pending signals */
- sig_dispatch_pending (1);
- }
-
-#if 0
- char sigmsg[24];
- __small_sprintf (sigmsg, "cygwin: signal %d\n", sig);
- OutputDebugString (sigmsg);
-#endif
-
- if (handler == (void *) SIG_DFL)
- {
- if (sig == SIGCHLD || sig == SIGIO || sig == SIGCONT || sig == SIGWINCH)
- {
- sigproc_printf ("default signal %d ignored", sig);
- goto done;
- }
-
- if (sig == SIGTSTP || sig == SIGTTIN || sig == SIGTTOU)
- goto stop;
-
- goto exit_sig;
- }
-
- if (handler == (void *) SIG_IGN)
- {
- sigproc_printf ("signal %d ignored", sig);
- goto done;
- }
-
- if (handler == (void *) SIG_ERR)
- goto exit_sig;
-
- if ((sig == SIGCHLD) && (thissig.sa_flags & SA_NOCLDSTOP))
- goto done;
-
- goto dosig;
-
-stop:
- handler = (void *) sig_handle_tty_stop;
-
-dosig:
- /* Dispatch to the appropriate function. */
- sigproc_printf ("signal %d, about to call %p", sig, thissig.sa_handler);
- rc = call_handler (sig, thissig, handler);
-
-done:
- sigproc_printf ("returning %d", rc);
- return rc;
-
-exit_sig:
- if (sig == SIGQUIT || sig == SIGABRT)
- {
- CONTEXT c;
- c.ContextFlags = CONTEXT_FULL;
- GetThreadContext (hMainThread, &c);
- stackdump (NULL, &c);
- try_to_debug ();
- sig |= 0x80;
- }
- sigproc_printf ("signal %d, about to call do_exit", sig);
- signal_exit (sig);
- /* 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. */
-static void
-signal_exit (int rc)
-{
- extern HANDLE hExeced;
-
- rc = EXIT_SIGNAL | (rc << 8);
- if (exit_already++)
- myself->exit (rc);
-
- /* We'd like to stop the main thread from executing but when we do that it
- causes random, inexplicable hangs. So, instead, we set up the priority
- of this thread really high so that it should do its thing and then exit. */
- (void) SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_TIME_CRITICAL);
-
- /* Unlock any main thread mutos since we're executing with prejudice. */
- muto *m;
- for (m = muto_start.next; m != NULL; m = m->next)
- if (m->unstable () || m->owner () == mainthread.id)
- m->reset ();
-
- user_data->resourcelocks->Delete ();
- user_data->resourcelocks->Init ();
-
- if (hExeced)
- TerminateProcess (hExeced, rc);
-
- sigproc_printf ("about to call do_exit (%x)", rc);
- do_exit (rc);
-}
-
-HANDLE NO_COPY title_mutex = NULL;
-
-void
-events_init (void)
-{
- /* title_mutex protects modification of console title. It's neccessary
- while finding console window handle */
-
- if (!(title_mutex = CreateMutex (&sec_all_nih, FALSE,
- shared_name ("title_mutex", 0))))
- api_fatal ("can't create title mutex, %E");
-
- ProtectHandle (title_mutex);
- mask_sync = new_muto (FALSE, "mask_sync");
- windows_system_directory[0] = '\0';
- (void) GetSystemDirectory (windows_system_directory, sizeof (windows_system_directory) - 2);
- char *end = strchr (windows_system_directory, '\0');
- if (end == windows_system_directory)
- api_fatal ("can't find windows system directory");
- if (end[-1] != '\\')
- {
- *end++ = '\\';
- *end = '\0';
- }
- windows_system_directory_length = end - windows_system_directory;
- debug_printf ("windows_system_directory '%s', windows_system_directory_length %d",
- windows_system_directory, windows_system_directory_length);
- debug_printf ("cygwin_hmodule %p", cygwin_hmodule);
-}
-
-void
-events_terminate (void)
-{
- ForceCloseHandle (title_mutex);
- exit_already = 1;
-}
-
-#define pid_offset (unsigned)(((_pinfo *)NULL)->pid)
-extern "C" {
-static void __stdcall reset_signal_arrived () __attribute__ ((unused));
-static void __stdcall
-reset_signal_arrived ()
-{
- (void) ResetEvent (signal_arrived);
- sigproc_printf ("reset signal_arrived");
-}
-
-void unused_sig_wrapper ()
-{
-/* Signal cleanup stuff. Cleans up stack (too bad that we didn't
- prototype signal handlers as __stdcall), calls _set_process_mask
- to restore any mask, restores any potentially clobbered registered
- and returns to orignal caller. */
-__asm__ volatile ("
- .text
-
-_sigreturn:
- addl $4,%%esp # Remove argument
- movl %%esp,%%ebp
- addl $36,%%ebp
- call _set_process_mask@4
- popl %%eax # saved errno
- testl %%eax,%%eax # Is it < 0
- jl 1f # yup. ignore it
- movl %1,%%ebx
- movl %%eax,(%%ebx)
-1: popl %%eax
- popl %%ebx
- popl %%ecx
- popl %%edx
- popl %%edi
- popl %%esi
- popf
- popl %%ebp
- ret
-
-__no_sig_start:
-_sigdelayed:
- pushl %2 # original return address
- pushl %%ebp
- movl %%esp,%%ebp
- pushf
- pushl %%esi
- pushl %%edi
- pushl %%edx
- pushl %%ecx
- pushl %%ebx
- pushl %%eax
- pushl %7 # saved errno
- pushl %3 # oldmask
- pushl %4 # signal argument
- pushl $_sigreturn
-
- call _reset_signal_arrived@0
- movl $0,%0
-
- pushl %8
- call _set_process_mask@4
- jmp *%5
-__no_sig_end:
-
-" : "=m" (sigsave.sig) : "m" (&_impure_ptr->_errno),
- "g" (sigsave.retaddr), "g" (sigsave.oldmask), "g" (sigsave.sig),
- "g" (sigsave.func), "o" (pid_offset), "g" (sigsave.saved_errno), "g" (sigsave.newmask)
-);
-}
-}
diff --git a/winsup/cygwin/exec.cc b/winsup/cygwin/exec.cc
deleted file mode 100644
index 6438d16e2..000000000
--- a/winsup/cygwin/exec.cc
+++ /dev/null
@@ -1,208 +0,0 @@
-/* exec.cc: exec system call support.
-
- Copyright 1996, 1997, 1998, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <unistd.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <process.h>
-#include "fhandler.h"
-#include "path.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "environ.h"
-
-/* 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 (NULL, _P_OVERLAY, path, argv, envp);
-}
-
-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 ());
-}
-
-/* the same as a standard exec() calls family, but with NT security support */
-
-extern "C"
-pid_t
-sexecve (HANDLE hToken, const char *path, const char *const argv[],
- const char *const envp[])
-{
- _spawnve (hToken, _P_OVERLAY, path, argv, envp);
- return -1;
-}
-
-extern "C"
-int
-sexecl (HANDLE hToken, 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 sexecve (hToken, path, (char * const *) argv, cur_environ ());
-}
-
-extern "C"
-int
-sexecle (HANDLE hToken, const char *path, const char *arg0, ...)
-{
- int i;
- va_list args;
- const char * const *envp;
- 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);
-
- envp = va_arg (args, const char * const *);
- va_end (args);
-
- MALLOC_CHECK;
- return sexecve(hToken, path, (char * const *) argv, (char * const *) envp);
-}
-
-extern "C"
-int
-sexeclp (HANDLE hToken, 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 sexecvpe (hToken, path, (const char * const *) argv, cur_environ ());
-}
-
-extern "C"
-int
-sexeclpe (HANDLE hToken, const char *path, const char *arg0, ...)
-{
- int i;
- va_list args;
- const char * const *envp;
- 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);
-
- envp = va_arg (args, const char * const *);
- va_end (args);
-
- MALLOC_CHECK;
- return sexecvpe (hToken, path, argv, envp);
-}
-
-extern "C"
-int
-sexecv (HANDLE hToken, const char *path, const char * const *argv)
-{
- MALLOC_CHECK;
- return sexecve (hToken, path, argv, cur_environ ());
-}
-
-extern "C"
-int
-sexecp (HANDLE hToken, const char *path, const char * const *argv)
-{
- MALLOC_CHECK;
- return sexecvpe (hToken, path, argv, cur_environ ());
-}
-
-/*
- * 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
-sexecvpe (HANDLE hToken, const char *file, const char * const *argv,
- const char *const *envp)
-{
- path_conv buf;
- MALLOC_CHECK;
- return sexecve (hToken, find_exec (file, buf), argv, envp);
-}
diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc
deleted file mode 100644
index 19515b564..000000000
--- a/winsup/cygwin/external.cc
+++ /dev/null
@@ -1,177 +0,0 @@
-/* external.cc: Interface to Cygwin internals from external programs.
-
- Copyright 1997, 1998, 1999, 2000 Cygnus Solutions.
-
- 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 "fhandler.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include <exceptions.h>
-#include "shared_info.h"
-#include "cygwin_version.h"
-#include "perprocess.h"
-
-static external_pinfo *
-fillout_pinfo (pid_t pid, int winpid)
-{
- BOOL nextpid;
- static external_pinfo ep;
-
- if ((nextpid = !!(pid & CW_NEXTPID)))
- pid ^= CW_NEXTPID;
-
- static winpids pids (0);
-
- if (!pids.npids || !nextpid)
- pids.init (winpid);
-
- static unsigned int 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 = thispid;
- ep.dwProcessId = cygwin_pid (thispid);
- ep.process_state = PID_IN_USE;
- ep.ctty = -1;
- }
- else if (nextpid || p->pid == pid)
- {
- ep.ctty = tty_attached (p) ? p->ctty : -1;
- ep.pid = p->pid;
- ep.ppid = p->ppid;
- ep.hProcess = p->hProcess;
- 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;
- strcpy (ep.progname, p->progname);
- ep.strace_mask = 0;
- ep.strace_file = 0;
-
- ep.process_state = p->process_state;
- }
- break;
- }
-
- if (!ep.pid)
- {
- i = 0;
- pids.reset ();
- return 0;
- }
- return &ep;
-}
-
-static DWORD
-get_cygdrive_info (char *user, char *system, char *user_flags,
- char *system_flags)
-{
- shared_info *info = cygwin_getshared();
- int res = info->mount.get_cygdrive_info (user, system, user_flags,
- system_flags);
- return (res == ERROR_SUCCESS) ? 1 : 0;
-}
-
-static DWORD
-get_cygdrive_prefixes (char *user, char *system)
-{
- char user_flags[MAX_PATH];
- char system_flags[MAX_PATH];
- DWORD res = get_cygdrive_info (user, system, user_flags, system_flags);
- return res;
-}
-
-extern "C" DWORD
-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) threadname (va_arg (arg, DWORD));
-
- case CW_SETTHREADNAME:
- {
- char *name = va_arg (arg, char *);
- regthread (name, va_arg (arg, DWORD));
- return 1;
- }
-
- 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:
- /* Upgrade old v1 registry mounts to new location. */
- cygwin_shared->mount.import_v1_mounts ();
- return 0;
-
- 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_prefixes (user, system);
- }
-
- case CW_GETPINFO_FULL:
- return (DWORD) fillout_pinfo (va_arg (arg, pid_t), 1);
-
- case CW_INIT_EXCEPTIONS:
- init_exceptions ((exception_list *) arg);
- 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);
- }
-
- default:
- return (DWORD) -1;
- }
-}
diff --git a/winsup/cygwin/external.sgml b/winsup/cygwin/external.sgml
deleted file mode 100644
index 270eede4d..000000000
--- a/winsup/cygwin/external.sgml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-<sect1 id="func-cygwin-internal">
-<title>cygwin_internal</title>
-
-<funcsynopsis>
-<funcdef>extern "C" DWORD
-<function>cygwin_internal</function></funcdef>
-<paramdef>cygwin_getinfo_types <parameter>t</parameter></paramdef>
-<paramdef><parameter>...</parameter></paramdef>
-</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 408cbc2cb..000000000
--- a/winsup/cygwin/fcntl.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-/* fcntl.cc: fcntl syscall
-
- Copyright 1996, 1997, 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <fcntl.h>
-#include <stdarg.h>
-#include <errno.h>
-#include <unistd.h>
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygerrno.h"
-#include "thread.h"
-
-extern "C"
-int
-_fcntl (int fd, int cmd,...)
-{
- void *arg = NULL;
- va_list args;
- int res;
-
- if (fdtab.not_open (fd))
- {
- set_errno (EBADF);
- res = -1;
- goto done;
- }
-
- SetResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK, "_fcntl");
- va_start (args, cmd);
- arg = va_arg (args, void *);
- if (cmd == F_DUPFD)
- res = dup2 (fd, fdtab.find_unused_handle ((int) arg));
- else
- res = fdtab[fd]->fcntl(cmd, arg);
- va_end (args);
- ReleaseResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK,"_fcntl");
-
-done:
- syscall_printf ("%d = fcntl (%d, %d, %p)", res, fd, cmd, arg);
- return res;
-}
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
deleted file mode 100644
index d2480df17..000000000
--- a/winsup/cygwin/fhandler.cc
+++ /dev/null
@@ -1,1557 +0,0 @@
-/* fhandler.cc. See console.cc for fhandler_console functions.
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include "cygheap.h"
-#include <sys/cygwin.h>
-#include <signal.h>
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "path.h"
-#include "shared_info.h"
-#include "host_dependent.h"
-#include "perprocess.h"
-#include "security.h"
-
-static NO_COPY const int CHUNK_SIZE = 1024; /* Used for crlf conversions */
-
-static char fhandler_disk_dummy_name[] = "some disk file";
-
-struct __cygwin_perfile *perfile_table = NULL;
-
-DWORD binmode = 0;
-
-inline fhandler_base&
-fhandler_base::operator =(fhandler_base &x)
-{
- memcpy (this, &x, sizeof *this);
- unix_path_name_ = x.unix_path_name_ ? cstrdup (x.unix_path_name_) : NULL;
- win32_path_name_ = x.win32_path_name_ ? cstrdup (x.win32_path_name_) : NULL;
- rabuf = NULL;
- ralen = 0;
- raixget = 0;
- raixput = 0;
- rabuflen = 0;
- return *this;
-}
-
-int
-fhandler_base::puts_readahead (const char *s, size_t len = (size_t) -1)
-{
- int success = 1;
- while ((*s || (len != (size_t) -1 && 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 = -1)
-{
- 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.
- Filenames are used mostly for debugging messages, and it's hoped that
- in cases where the name is really required, the filename wouldn't ever
- be too long (e.g. devices or some such).
-*/
-
-void
-fhandler_base::set_name (const char *unix_path, const char *win32_path, int unit)
-{
- if (!no_free_names ())
- {
- if (unix_path_name_ != NULL && unix_path_name_ != fhandler_disk_dummy_name)
- cfree (unix_path_name_);
- if (win32_path_name_ != NULL && unix_path_name_ != fhandler_disk_dummy_name)
- cfree (win32_path_name_);
- }
-
- unix_path_name_ = win32_path_name_ = NULL;
- if (unix_path == NULL || !*unix_path)
- return;
-
- unix_path_name_ = cstrdup (unix_path);
- if (unix_path_name_ == NULL)
- {
- system_printf ("fatal error. strdup failed");
- exit (ENOMEM);
- }
-
- if (win32_path)
- win32_path_name_ = cstrdup (win32_path);
- else
- {
- const char *fmt = get_native_name ();
- win32_path_name_ = (char *) cmalloc (HEAP_STR, strlen(fmt) + 16);
- __small_sprintf (win32_path_name_, fmt, unit);
- }
-
- if (win32_path_name_ == NULL)
- {
- system_printf ("fatal error. strdup failed");
- exit (ENOMEM);
- }
-}
-
-/* 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)
-{
- DWORD size, upper1, curr;
-
- size = GetFileSize (h, &upper1);
- if (upper1 != 0xffffffff || GetLastError () == NO_ERROR)
- {
- LONG upper2 = 0;
- curr = SetFilePointer (h, 0, &upper2, FILE_CURRENT);
- if (curr == size && upper1 == (DWORD) upper2)
- return 1;
- }
-
- SetLastError (err);
- return 0;
-}
-
-/* Normal file i/o handlers. */
-
-/* Cover function to ReadFile to achieve (as much as possible) Posix style
- semantics and use of errno. */
-int
-fhandler_base::raw_read (void *ptr, size_t ulen)
-{
- DWORD bytes_read;
-
- if (!ReadFile (get_handle(), ptr, ulen, &bytes_read, 0))
- {
- int errcode;
-
- /* Some errors are not really errors. Detect such cases here. */
-
- 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))
- return 0;
- default:
- syscall_printf ("ReadFile %s failed, %E", unix_path_name_);
- __seterrno_from_win_error (errcode);
- return -1;
- break;
- }
- }
-
- return bytes_read;
-}
-
-/* Cover function to WriteFile to provide Posix interface and semantics
- (as much as possible). */
-int
-fhandler_base::raw_write (const void *ptr, size_t len)
-{
- DWORD bytes_written;
-
- if (!WriteFile (get_handle(), ptr, len, &bytes_written, 0))
- {
- if (GetLastError () == ERROR_DISK_FULL && bytes_written > 0)
- return bytes_written;
- __seterrno ();
- if (get_errno () == EPIPE)
- raise (SIGPIPE);
- return -1;
- }
- return bytes_written;
-}
-
-#define ACCFLAGS(x) (x & (O_RDONLY | O_WRONLY | O_RDWR))
-int
-fhandler_base::get_default_fmode (int flags)
-{
- if (perfile_table)
- {
- size_t nlen = strlen (get_name ());
- unsigned accflags = ACCFLAGS (flags);
- for (__cygwin_perfile *pf = perfile_table; pf->name; pf++)
- if (!*pf->name && ACCFLAGS (pf->flags) == accflags)
- return pf->flags & ~(O_RDONLY | O_WRONLY | O_RDWR);
- 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 (ACCFLAGS (pf->flags) == accflags && strcasematch (stem, pf->name))
- return pf->flags & ~(O_RDONLY | O_WRONLY | O_RDWR);
- }
- }
- return __fmode;
-}
-
-/* Open system call handler function.
- Path is now already checked for symlinks */
-int
-fhandler_base::open (int flags, mode_t mode)
-{
- int res = 0;
- HANDLE x;
- int file_attributes;
- int shared;
- int creation_distribution;
-
- syscall_printf ("(%s, %p)", get_win32_name (), flags);
-
- if (get_win32_name () == NULL)
- {
- set_errno (ENOENT);
- goto done;
- }
-
- if (get_device () == FH_TAPE)
- {
- access_ = GENERIC_READ | GENERIC_WRITE;
- }
- else if ((flags & (O_RDONLY | O_WRONLY | O_RDWR)) == O_RDONLY)
- {
- access_ = GENERIC_READ;
- }
- else if ((flags & (O_RDONLY | O_WRONLY | O_RDWR)) == O_WRONLY)
- {
- access_ = GENERIC_WRITE;
- }
- else
- {
- access_ = GENERIC_READ | GENERIC_WRITE;
- }
-
- /* FIXME: O_EXCL handling? */
-
- if ((flags & O_TRUNC) && ((flags & O_ACCMODE) != O_RDONLY))
- {
- if (flags & O_CREAT)
- {
- creation_distribution = CREATE_ALWAYS;
- }
- else
- {
- creation_distribution = TRUNCATE_EXISTING;
- }
- }
- else if (flags & O_CREAT)
- creation_distribution = OPEN_ALWAYS;
- else
- creation_distribution = OPEN_EXISTING;
-
- if ((flags & O_EXCL) && (flags & O_CREAT))
- {
- creation_distribution = CREATE_NEW;
- }
-
- if (flags & O_APPEND)
- set_append_p();
-
- /* These flags are host dependent. */
- shared = host_dependent.shared;
-
- file_attributes = FILE_ATTRIBUTE_NORMAL;
- if (flags & O_DIROPEN)
- file_attributes |= FILE_FLAG_BACKUP_SEMANTICS;
- if (get_device () == FH_SERIAL)
- file_attributes |= FILE_FLAG_OVERLAPPED;
-
- x = CreateFileA (get_win32_name (), access_, shared,
- &sec_none, creation_distribution,
- file_attributes,
- 0);
-
- syscall_printf ("%d = CreateFileA (%s, %p, %p, %p, %p, %p, 0)",
- x,
- get_win32_name (), access_, shared,
- &sec_none, creation_distribution,
- file_attributes);
-
- if (x == INVALID_HANDLE_VALUE)
- {
- if (GetLastError () == ERROR_INVALID_HANDLE)
- set_errno (ENOENT);
- else
- __seterrno ();
- goto done;
- }
-
- // Attributes may be set only if a file is _really_ created.
- if (flags & O_CREAT && get_device () == FH_DISK
- && GetLastError () != ERROR_ALREADY_EXISTS)
- set_file_attribute (has_acls (), get_win32_name (), mode);
-
- namehash_ = hash_path_name (0, get_win32_name ());
- set_io_handle (x);
- int bin;
- int fmode;
- if ((bin = flags & (O_BINARY | O_TEXT)))
- /* nothing to do */;
- else if ((fmode = get_default_fmode (flags)) & O_BINARY)
- bin = O_BINARY;
- else if (fmode & O_TEXT)
- bin = O_TEXT;
- else if (get_device () == FH_DISK)
- bin = get_w_binary () || get_r_binary ();
- else
- bin = (binmode == O_BINARY) || get_w_binary () || get_r_binary ();
-
- if (bin & O_TEXT)
- bin = 0;
-
- set_flags (flags | (bin ? O_BINARY : O_TEXT));
-
- set_r_binary (bin);
- set_w_binary (bin);
- syscall_printf ("filemode set to %s", bin ? "binary" : "text");
-
- if (get_device () != FH_TAPE
- && get_device () != FH_FLOPPY
- && get_device () != FH_SERIAL)
- {
- if (flags & O_APPEND)
- SetFilePointer (get_handle(), 0, 0, FILE_END);
- else
- SetFilePointer (get_handle(), 0, 0, FILE_BEGIN);
- }
-
- res = 1;
-done:
- syscall_printf ("%d = fhandler_base::open (%s, %p)", res, get_win32_name (),
- 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.
-*/
-int
-fhandler_base::read (void *in_ptr, size_t in_len)
-{
- int len = (int) in_len;
- char *ctrlzpos;
- char *ptr = (char *) in_ptr;
-
- int c;
- int copied_chars = 0;
-
- while (len)
- if ((c = get_readahead ()) < 0)
- break;
- else
- {
- ptr[copied_chars++] = (unsigned char) (c & 0xff);
- len--;
- }
-
- if (len)
- {
- int readlen = raw_read (ptr + copied_chars, len);
- if (copied_chars == 0)
- copied_chars = readlen; /* Propagate error or EOF */
- else if (readlen > 0) /* FIXME: should flag EOF for next read */
- copied_chars += readlen;
- }
-
- if (copied_chars <= 0)
- return copied_chars;
- if (get_r_binary ())
- {
- debug_printf ("returning %d chars, binary mode", copied_chars);
- return copied_chars;
- }
-
- /* Scan buffer for a control-z and shorten the buffer to that length */
-
- ctrlzpos = (char *) memchr ((char *) ptr, 0x1a, copied_chars);
- if (ctrlzpos)
- {
- lseek ((ctrlzpos - ((char *) ptr + copied_chars)), SEEK_CUR);
- copied_chars = ctrlzpos - (char *) ptr;
- }
-
- if (copied_chars == 0)
- {
- debug_printf ("returning 0 chars, text mode, CTRL-Z found");
- return 0;
- }
-
- /* Scan buffer and turn \r\n into \n */
- register char *src = (char *) ptr;
- register char *dst = (char *) ptr;
- register char *end = src + copied_chars - 1;
-
- /* Read up to the last but one char - the last char needs special handling */
- while (src < end)
- {
- *dst = *src++;
- if (*dst != '\r' || *src != '\n')
- dst++;
- }
-
- c = *src;
- /* if last char is a '\r' then read one more to see if we should
- translate this one too */
- if (c == '\r')
- {
- char c1 = 0;
- len = raw_read (&c1, 1);
- if (len <= 0)
- /* nothing */;
- else if (c1 == '\n')
- c = '\n';
- else
- set_readahead_valid (1, c1);
- }
-
- *dst++ = c;
- copied_chars = 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];
- /* >= 33 so space prints in hex */
- __small_sprintf (p, c >= 33 && c <= 127 ? " %c" : " %p", c);
- p += strlen (p);
- }
- debug_printf ("read %d bytes (%s%s)", copied_chars, buf,
- copied_chars > 16 ? " ..." : "");
- }
-#endif
-
- debug_printf ("returning %d chars, text mode", copied_chars);
- return copied_chars;
-}
-
-int
-fhandler_base::write (const void *ptr, size_t len)
-{
- int res;
-
- if (get_append_p ())
- SetFilePointer (get_handle(), 0, 0, FILE_END);
- else if (os_being_run != winNT && get_check_win95_lseek_bug ())
- {
- /* Note: this bug doesn't happen on NT4, even though the documentation
- for WriteFile() says that it *may* happen on any OS. */
- int actual_length, current_position;
- set_check_win95_lseek_bug (0); /* don't do it again */
- actual_length = GetFileSize (get_handle (), NULL);
- current_position = SetFilePointer (get_handle (), 0, 0, FILE_CURRENT);
- if (current_position > actual_length)
- {
- /* Oops, this is the bug case - Win95 uses whatever is on the disk
- instead of some known (safe) value, so we must seek back and
- fill in the gap with zeros. - DJ */
- char zeros[512];
- int number_of_zeros_to_write = current_position - actual_length;
- memset(zeros, 0, 512);
- SetFilePointer (get_handle (), 0, 0, FILE_END);
- while (number_of_zeros_to_write > 0)
- {
- DWORD zeros_this_time = (number_of_zeros_to_write > 512
- ? 512 : number_of_zeros_to_write);
- DWORD written;
- if (!WriteFile (get_handle (), zeros, zeros_this_time, &written,
- NULL))
- {
- __seterrno ();
- if (get_errno () == EPIPE)
- raise (SIGPIPE);
- /* This might fail, but it's the best we can hope for */
- SetFilePointer (get_handle (), current_position, 0, FILE_BEGIN);
- return -1;
-
- }
- if (written < zeros_this_time) /* just in case */
- {
- set_errno (ENOSPC);
- /* This might fail, but it's the best we can hope for */
- SetFilePointer (get_handle (), current_position, 0, FILE_BEGIN);
- return -1;
- }
- number_of_zeros_to_write -= written;
- }
- }
- }
-
- if (get_w_binary ())
- {
- 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 */
- }
- }
-
- debug_printf ("%d = write (%p, %d)", res, ptr, len);
- return res;
-}
-
-off_t
-fhandler_base::lseek (off_t offset, int whence)
-{
- off_t res;
-
- /* 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);
- }
-
- debug_printf ("lseek (%s, %d, %d)", unix_path_name_, offset, whence);
-
-#if 0 /* lseek has no business messing about with text-mode stuff */
-
- if (!get_r_binary ())
- {
- int newplace;
-
- if (whence == 0)
- {
- newplace = offset;
- }
- else if (whence ==1)
- {
- newplace = rpos + offset;
- }
- else
- {
- /* Seek from the end of a file.. */
- if (rsize == -1)
- {
- /* Find the size of the file by reading till the end */
-
- char b[CHUNK_SIZE];
- while (read (b, sizeof (b)) > 0)
- ;
- rsize = rpos;
- }
- newplace = rsize + offset;
- }
-
- if (rpos > newplace)
- {
- SetFilePointer (handle, 0, 0, 0);
- rpos = 0;
- }
-
- /* You can never shrink something more than 50% by turning CRLF into LF,
- so we binary chop looking for the right place */
-
- while (rpos < newplace)
- {
- char b[CHUNK_SIZE];
- size_t span = (newplace - rpos) / 2;
- if (span == 0)
- span = 1;
- if (span > sizeof (b))
- span = sizeof (b);
-
- debug_printf ("lseek (%s, %d, %d) span %d, rpos %d newplace %d",
- name, offset, whence,span,rpos, newplace);
- read (b, span);
- }
-
- debug_printf ("Returning %d", newplace);
- return newplace;
- }
-#endif /* end of deleted code dealing with text mode */
-
- DWORD win32_whence = whence == SEEK_SET ? FILE_BEGIN
- : (whence == SEEK_CUR ? FILE_CURRENT : FILE_END);
-
- res = SetFilePointer (get_handle(), offset, 0, win32_whence);
- if (res == -1)
- {
- __seterrno ();
- }
- else
- {
- /* When next we write(), we will check to see if *this* seek went beyond
- the end of the file, and back-seek and fill with zeros if so - DJ */
- set_check_win95_lseek_bug ();
-
- /* 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;
-}
-
-int
-fhandler_base::close (void)
-{
- int res = -1;
-
- syscall_printf ("handle %p", get_handle());
- if (CloseHandle (get_handle()))
- res = 0;
- else
- {
- paranoid_printf ("CloseHandle (%d <%s>) failed", get_handle(),
- get_name ());
-
- __seterrno ();
- }
- return res;
-}
-
-int
-fhandler_base::ioctl (unsigned int cmd, void *buf)
-{
- if (cmd == FIONBIO)
- syscall_printf ("ioctl (FIONBIO, %p)", buf);
- else
- syscall_printf ("ioctl (%x, %p)", cmd, buf);
-
- set_errno (EINVAL);
- return -1;
-}
-
-int
-fhandler_base::lock (int, struct flock *)
-{
- set_errno (ENOSYS);
- return -1;
-}
-
-extern "C" char * __stdcall
-rootdir(char *full_path)
-{
- /* Possible choices:
- * d:... -> d:/
- * \\server\share... -> \\server\share\
- * else current drive.
- */
- char *root = full_path;
-
- if (full_path[1] == ':')
- strcpy (full_path + 2, "\\");
- else if (full_path[0] == '\\' && full_path[1] == '\\')
- {
- char *cp = full_path + 2;
- while (*cp && *cp != '\\')
- cp++;
- if (!*cp)
- {
- set_errno (ENOTDIR);
- return NULL;
- }
- cp++;
- while (*cp && *cp != '\\')
- cp++;
- strcpy (cp, "\\");
- }
- else
- root = NULL;
-
- return root;
-}
-
-int
-fhandler_disk_file::fstat (struct stat *buf)
-{
- int res = 0; // avoid a compiler warning
- BY_HANDLE_FILE_INFORMATION local;
- save_errno saved_errno;
-
- memset (buf, 0, sizeof (*buf));
-
- if (is_device ())
- return stat_dev (get_device (), get_unit (), get_namehash (), buf);
-
- /* NT 3.51 seems to have a bug when attempting to get vol serial
- numbers. This loop gets around this. */
- for (int i = 0; i < 2; i++)
- {
- if (!(res = GetFileInformationByHandle (get_handle (), &local)))
- break;
- if (local.dwVolumeSerialNumber && (long) local.dwVolumeSerialNumber != -1)
- break;
- }
- debug_printf ("%d = GetFileInformationByHandle (%s, %d)",
- res, get_win32_name (), get_handle ());
- if (res == 0)
- {
- /* GetFileInformationByHandle will fail if it's given stdin/out/err
- or a pipe*/
- DWORD lsize, hsize;
-
- if (GetFileType (get_handle ()) != FILE_TYPE_DISK)
- buf->st_mode = S_IFCHR;
-
- lsize = GetFileSize (get_handle (), &hsize);
- if (lsize == 0xffffffff && GetLastError () != NO_ERROR)
- buf->st_mode = S_IFCHR;
- else
- buf->st_size = lsize;
- /* We expect these to fail! */
- buf->st_mode |= STD_RBITS | STD_WBITS;
- buf->st_blksize = S_BLKSIZE;
- buf->st_ino = get_namehash ();
- syscall_printf ("0 = fstat (, %p)", buf);
- return 0;
- }
-
- if (!get_win32_name ())
- {
- saved_errno.set (ENOENT);
- return -1;
- }
-
- buf->st_atime = to_time_t (&local.ftLastAccessTime);
- buf->st_mtime = to_time_t (&local.ftLastWriteTime);
- buf->st_ctime = to_time_t (&local.ftCreationTime);
- buf->st_nlink = local.nNumberOfLinks;
- buf->st_dev = local.dwVolumeSerialNumber;
- buf->st_size = local.nFileSizeLow;
-
- /* This is for FAT filesystems, which don't support atime/ctime */
- if (buf->st_atime == 0)
- buf->st_atime = buf->st_mtime;
- if (buf->st_ctime == 0)
- buf->st_ctime = buf->st_mtime;
-
- /* Allocate some place to determine the root directory. Need to allocate
- enough so that rootdir can add a trailing slash if path starts with \\. */
- char root[strlen (get_win32_name ()) + 3];
- strcpy (root, get_win32_name ());
-
- /* Assume that if a drive has ACL support it MAY have valid "inodes".
- It definitely does not have valid inodes if it does not have ACL
- support. */
- switch (has_acls () ? GetDriveType (rootdir (root)) : DRIVE_UNKNOWN)
- {
- case DRIVE_FIXED:
- case DRIVE_REMOVABLE:
- case DRIVE_CDROM:
- case DRIVE_RAMDISK:
- /* Although the documentation indicates otherwise, it seems like
- "inodes" on these devices are persistent, at least across reboots. */
- buf->st_ino = local.nFileIndexHigh | local.nFileIndexLow;
- break;
- default:
- /* Either the nFileIndex* fields are unreliable or unavailable. Use the
- next best alternative. */
- buf->st_ino = get_namehash ();
- break;
- }
-
- buf->st_blksize = S_BLKSIZE;
- buf->st_blocks = ((unsigned long) buf->st_size + S_BLKSIZE-1) / S_BLKSIZE;
-
- /* Using a side effect: get_file_attibutes checks for
- directory. This is used, to set S_ISVTX, if needed. */
- if (local.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
- buf->st_mode |= S_IFDIR;
- if (!get_file_attribute (has_acls (),
- get_win32_name (),
- &buf->st_mode,
- &buf->st_uid,
- &buf->st_gid))
- {
- /* If read-only attribute is set, modify ntsec return value */
- if (local.dwFileAttributes & FILE_ATTRIBUTE_READONLY)
- buf->st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH);
-
- buf->st_mode &= ~S_IFMT;
- if (get_symlink_p ())
- buf->st_mode |= S_IFLNK;
- else if (get_socket_p ())
- buf->st_mode |= S_IFSOCK;
- else if (local.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
- buf->st_mode |= S_IFDIR;
- else
- buf->st_mode |= S_IFREG;
- }
- else
- {
- buf->st_mode = 0;
- buf->st_mode |= STD_RBITS;
-
- if (!(local.dwFileAttributes & FILE_ATTRIBUTE_READONLY))
- buf->st_mode |= STD_WBITS;
- /* | S_IWGRP | S_IWOTH; we don't give write to group etc */
-
- if (get_symlink_p ())
- buf->st_mode |= S_IFLNK;
- else if (get_socket_p ())
- buf->st_mode |= S_IFSOCK;
- else
- switch (GetFileType (get_handle ()))
- {
- case FILE_TYPE_CHAR:
- case FILE_TYPE_UNKNOWN:
- buf->st_mode |= S_IFCHR;
- break;
- case FILE_TYPE_DISK:
- if (local.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
- buf->st_mode |= S_IFDIR | STD_XBITS;
- else
- {
- buf->st_mode |= S_IFREG;
- if (get_execable_p ())
- buf->st_mode |= STD_XBITS;
- }
- break;
- case FILE_TYPE_PIPE:
- buf->st_mode |= S_IFSOCK;
- break;
- }
- }
-
- 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,
- (int) buf->st_ino, sizeof (*buf));
-
- return 0;
-}
-
-void
-fhandler_base::init (HANDLE f, DWORD a, mode_t bin)
-{
- set_io_handle (f);
- set_r_binary (bin);
- set_w_binary (bin);
- access_ = a;
- a &= GENERIC_READ | GENERIC_WRITE;
- if (a == GENERIC_READ)
- set_flags (O_RDONLY);
- if (a == GENERIC_WRITE)
- set_flags (O_WRONLY);
- if (a == (GENERIC_READ | GENERIC_WRITE))
- set_flags (O_RDWR);
- debug_printf ("created new fhandler_base for handle %p", f);
-}
-
-void
-fhandler_base::dump (void)
-{
- paranoid_printf ("here");
-}
-
-int
-fhandler_base::dup (fhandler_base *child)
-{
- debug_printf ("in fhandler_base dup");
-
- HANDLE nh;
- if (!DuplicateHandle (hMainProc, get_handle(), hMainProc, &nh, 0, TRUE,
- DUPLICATE_SAME_ACCESS))
- {
- system_printf ("dup(%s) failed, handle %x, %E",
- get_name (), get_handle());
- __seterrno ();
- return -1;
- }
-
- child->set_io_handle (nh);
- return 0;
-}
-
-int fhandler_base::fcntl (int cmd, void *arg)
-{
- int res;
-
- switch (cmd)
- {
- case F_GETFD:
- res = get_close_on_exec () ? FD_CLOEXEC : 0;
- break;
- case F_SETFD:
- set_close_on_exec ((int) arg);
- res = 0;
- break;
- case F_GETFL:
- res = get_flags ();
- debug_printf ("GETFL: %d", 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 | OLD_O_NDELAY;
-
- /* Care for the old O_NDELAY flag. If one of the flags is set,
- both flags are set. */
- int new_flags = (int) arg;
- if (new_flags & (O_NONBLOCK | OLD_O_NDELAY))
- new_flags |= O_NONBLOCK | OLD_O_NDELAY;
-
- int flags = get_flags () & ~allowed_flags;
- set_flags (flags | (new_flags & allowed_flags));
- }
- res = 0;
- break;
- case F_GETLK:
- case F_SETLK:
- case F_SETLKW:
- res = lock (cmd, (struct flock *) arg);
- 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 (void)
-{
- 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 (void)
-{
- set_errno (ENOTTY);
- return -1;
-}
-
-void
-fhandler_base::operator delete (void *p)
-{
- cfree (p);
- return;
-}
-
-/* Normal I/O constructor */
-fhandler_base::fhandler_base (DWORD devtype, const char *name, int unit):
- access_ (0),
- io_handle (NULL),
- namehash_ (0),
- openflags_ (0),
- rabuf (NULL),
- ralen (0),
- raixget (0),
- raixput (0),
- rabuflen (0)
-{
- status = devtype;
- int bin = __fmode & O_TEXT ? 0 : 1;
- if (status != FH_DISK && status != FH_CONSOLE)
- {
- if (!get_r_binset ())
- set_r_binary (bin);
- if (!get_w_binset ())
- set_w_binary (bin);
- }
- unix_path_name_ = win32_path_name_ = NULL;
- set_name (name, NULL, unit);
-}
-
-/* Normal I/O destructor */
-fhandler_base::~fhandler_base (void)
-{
- if (!no_free_names ())
- {
- if (unix_path_name_ != NULL && unix_path_name_ != fhandler_disk_dummy_name)
- cfree (unix_path_name_);
- if (win32_path_name_ != NULL && win32_path_name_ != fhandler_disk_dummy_name)
- cfree (win32_path_name_);
- }
- if (rabuf)
- free (rabuf);
- unix_path_name_ = win32_path_name_ = NULL;
-}
-
-/**********************************************************************/
-/* fhandler_disk_file */
-
-fhandler_disk_file::fhandler_disk_file (const char *name) :
- fhandler_base (FH_DISK, name)
-{
- set_cb (sizeof *this);
- set_no_free_names ();
- unix_path_name_ = win32_path_name_ = fhandler_disk_dummy_name;
-}
-
-int
-fhandler_disk_file::open (const char *path, int flags, mode_t mode)
-{
- syscall_printf ("(%s, %p)", path, flags);
-
- /* O_NOSYMLINK is an internal flag for implementing lstat, nothing more. */
- path_conv real_path (path, (flags & O_NOSYMLINK) ?
- PC_SYM_NOFOLLOW : PC_SYM_FOLLOW);
-
- if (real_path.error &&
- (flags & O_NOSYMLINK || real_path.error != ENOENT || !(flags & O_CREAT)))
- {
- set_errno (real_path.error);
- syscall_printf ("0 = fhandler_disk_file::open (%s, %p)", path, flags);
- return 0;
- }
-
- set_name (path, real_path.get_win32 ());
- set_no_free_names (0);
- return open (real_path, flags, mode);
-}
-
-int
-fhandler_disk_file::open (path_conv& real_path, int flags, mode_t mode)
-{
- if (get_win32_name () == fhandler_disk_dummy_name)
- {
- win32_path_name_ = real_path.get_win32 ();
- set_no_free_names ();
- }
- /* If necessary, do various other things to see if path is a program. */
- if (!real_path.isexec ())
- real_path.set_exec (check_execable_p (get_win32_name ()));
-
- if (real_path.isbinary ())
- {
- set_r_binary (1);
- set_w_binary (1);
- }
-
- set_has_acls (real_path.has_acls ());
-
- if (real_path.file_attributes () != (DWORD)-1
- && (real_path.file_attributes () & FILE_ATTRIBUTE_DIRECTORY))
- flags |= O_DIROPEN;
-
- int res = this->fhandler_base::open (flags, 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 non
- existant directory. */
- if (real_path.has_buggy_open ()
- && GetFileAttributes (win32_path_name_) == (DWORD) -1)
- {
- debug_printf ("Buggy open detected.");
- close ();
- set_errno (ENOENT);
- return 0;
- }
-
- extern BOOL allow_ntea;
- extern BOOL allow_ntsec;
-
- if (!real_path.isexec () && !allow_ntea
- && (!allow_ntsec || !real_path.has_acls ())
- && GetFileType (get_handle ()) == FILE_TYPE_DISK)
- {
- DWORD done;
- char magic[3];
- /* FIXME should we use /etc/magic ? */
- magic[0] = magic[1] = magic[2] = '\0';
- ReadFile (get_handle (), magic, 3, &done, 0);
- if (has_exec_chars (magic, done))
- real_path.set_exec ();
- if (!(flags & O_APPEND))
- SetFilePointer (get_handle(), 0, 0, FILE_BEGIN);
- }
-
- if (flags & O_APPEND)
- SetFilePointer (get_handle(), 0, 0, FILE_END);
-
- set_symlink_p (real_path.issymlink ());
- set_execable_p (real_path.isexec ());
- set_socket_p (real_path.issocket ());
-
-out:
- syscall_printf ("%d = fhandler_disk_file::open (%s, %p)", res,
- get_win32_name (), flags);
- return res;
-}
-
-int
-fhandler_disk_file::close ()
-{
- int res;
- if ((res = this->fhandler_base::close ()) == 0)
- cygwin_shared->delqueue.process_queue ();
- return res;
-}
-
-/*
- * FIXME !!!
- * The correct way to do this to get POSIX locking
- * semantics is to keep a linked list of posix lock
- * requests and map them into Win32 locks. The problem
- * is that Win32 does not deal correctly with overlapping
- * lock requests. Also another pain is that Win95 doesn't do
- * non-blocking or non exclusive locks at all. For '95 just
- * convert all lock requests into blocking,exclusive locks.
- * This shouldn't break many apps but denying all locking
- * would.
- * For now just convert to Win32 locks and hope for the best.
- */
-
-int
-fhandler_disk_file::lock (int cmd, struct flock *fl)
-{
- int win32_start;
- int win32_len;
- DWORD win32_upper;
- DWORD startpos;
-
- /*
- * We don't do getlck calls yet.
- */
-
- if (cmd == F_GETLK)
- {
- set_errno (ENOSYS);
- return -1;
- }
-
- /*
- * Calculate where in the file to start from,
- * then adjust this by fl->l_start.
- */
-
- switch (fl->l_whence)
- {
- case SEEK_SET:
- startpos = 0;
- break;
- case SEEK_CUR:
- if ((off_t) (startpos = lseek (0, SEEK_CUR)) == (off_t)-1)
- return -1;
- break;
- case SEEK_END:
- {
- BY_HANDLE_FILE_INFORMATION finfo;
- if (GetFileInformationByHandle (get_handle(), &finfo) == 0)
- {
- __seterrno ();
- return -1;
- }
- startpos = finfo.nFileSizeLow; /* Nowhere to keep high word */
- break;
- }
- default:
- set_errno (EINVAL);
- return -1;
- }
-
- /*
- * Now the fun starts. Adjust the start and length
- * fields until they make sense.
- */
-
- win32_start = startpos + fl->l_start;
- if (fl->l_len < 0)
- {
- win32_start -= fl->l_len;
- win32_len = -fl->l_len;
- }
- else
- win32_len = fl->l_len;
-
- if (win32_start < 0)
- {
- /* watch the signs! */
- win32_len -= -win32_start;
- if (win32_len <= 0)
- {
- /* Failure ! */
- set_errno (EINVAL);
- return -1;
- }
- win32_start = 0;
- }
-
- /*
- * Special case if len == 0 for POSIX means lock
- * to the end of the entire file (and all future extensions).
- */
- if (win32_len == 0)
- {
- win32_len = 0xffffffff;
- win32_upper = host_dependent.win32_upper;
- }
- else
- win32_upper = 0;
-
- BOOL res;
-
- if (os_being_run == winNT)
- {
- DWORD lock_flags = (cmd == F_SETLK) ? LOCKFILE_FAIL_IMMEDIATELY : 0;
- lock_flags |= (fl->l_type == F_WRLCK) ? LOCKFILE_EXCLUSIVE_LOCK : 0;
-
- OVERLAPPED ov;
-
- ov.Internal = 0;
- ov.InternalHigh = 0;
- ov.Offset = (DWORD)win32_start;
- ov.OffsetHigh = 0;
- ov.hEvent = (HANDLE) 0;
-
- if (fl->l_type == F_UNLCK)
- {
- res = UnlockFileEx (get_handle (), 0, (DWORD)win32_len, win32_upper, &ov);
- }
- else
- {
- res = LockFileEx (get_handle (), lock_flags, 0, (DWORD)win32_len,
- win32_upper, &ov);
- /* Deal with the fail immediately case. */
- /*
- * FIXME !! I think this is the right error to check for
- * but I must admit I haven't checked....
- */
- if ((res == 0) && (lock_flags & LOCKFILE_FAIL_IMMEDIATELY) &&
- (GetLastError () == ERROR_LOCK_FAILED))
- {
- set_errno (EAGAIN);
- return -1;
- }
- }
- }
- else
- {
- /* Windows 95 -- use primitive lock call */
- if (fl->l_type == F_UNLCK)
- res = UnlockFile (get_handle (), (DWORD)win32_start, 0, (DWORD)win32_len,
- win32_upper);
- else
- res = LockFile (get_handle (), (DWORD)win32_start, 0, (DWORD)win32_len, win32_upper);
- }
-
- if (res == 0)
- {
- __seterrno ();
- return -1;
- }
-
- return 0;
-}
-
-/* Perform various heuristics on PATH to see if it's a program. */
-
-int
-fhandler_disk_file::check_execable_p (const char *path)
-{
- int len = strlen (path);
- const char *ch = path + (len > 4 ? len - 4 : len);
-
- if (strcasematch (".exe", ch)
- || strcasematch (".bat", ch)
- || strcasematch (".com", ch))
- return 1;
- return 0;
-}
-
-/**********************************************************************/
-/* /dev/null */
-
-fhandler_dev_null::fhandler_dev_null (const char *name) :
- fhandler_base (FH_NULL, name)
-{
- set_cb (sizeof *this);
-}
-
-void
-fhandler_dev_null::dump (void)
-{
- paranoid_printf ("here");
-}
-
-/**********************************************************************/
-/* fhandler_pipe */
-
-fhandler_pipe::fhandler_pipe (const char *name, DWORD devtype) :
- fhandler_base (devtype, name)
-{
- set_cb (sizeof *this);
-}
-
-off_t
-fhandler_pipe::lseek (off_t offset, int whence)
-{
- debug_printf ("(%d, %d)", offset, whence);
- set_errno (ESPIPE);
- return -1;
-}
-
-#ifdef DEBUGGING
-#define nameparm name
-#else
-#define nameparm
-#endif
-
-void
-fhandler_base::set_inheritance (HANDLE &h, int not_inheriting, const char *nameparm)
-#undef nameparm
-{
- HANDLE newh;
-
- if (!DuplicateHandle (hMainProc, h, hMainProc, &newh, 0, !not_inheriting,
- DUPLICATE_SAME_ACCESS))
- debug_printf ("DuplicateHandle %E");
-#ifndef DEBUGGING
- else
- {
- hclose (h);
- h = newh;
- }
-#else
- else if (!name)
- {
- hclose (h);
- h = newh;
- }
- else
- /* FIXME: This won't work with sockets */
- {
- ForceCloseHandle2 (h, name);
- h = newh;
- ProtectHandle2 (h, name);
- }
-#endif
-}
-
-void
-fhandler_base::fork_fixup (HANDLE parent, HANDLE &h, const char *name)
-{
- if (!DuplicateHandle (parent, h, hMainProc, &h, 0, !get_close_on_exec (),
- DUPLICATE_SAME_ACCESS))
- system_printf ("%s - %E, handle %s<%p>", get_name (), name, h);
-}
-
-void
-fhandler_base::set_close_on_exec (int val)
-{
- set_inheritance (io_handle, val);
- set_close_on_exec_flag (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 ());
- fork_fixup (parent, io_handle, "io_handle");
-}
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
deleted file mode 100644
index 9010a17a5..000000000
--- a/winsup/cygwin/fhandler.h
+++ /dev/null
@@ -1,907 +0,0 @@
-/* fhandler.h
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _FHANDLER_H_
-#define _FHANDLER_H_
-
-#include <sys/ioctl.h>
-
-/* Classes
-
- Code is located in fhandler.cc unless another file name is given.
-
- fhandler_base normal I/O
-
- fhandler_disk_file
- fhandler_serial Adds vmin and vtime.
- fhandler_dev_null Not really I/O
- fhandler_dev_zero Faked
-
- fhandler_dev_raw (fhandler_raw.cc)
- fhandler_dev_floppy (fhandler_floppy.cc)
- fhandler_dev_tape (fhandler_tape.cc)
-
- fhandler_pipe
- fhandler_socket (fhandler_socket.cc)
-
- fhandler_tty_slave (tty.cc)
- fhandler_pty_master (tty.cc)
- fhandler_tty_master (tty.cc)
-
- fhandler_console Out with ansi control. (console.cc)
-
- fhandler_windows Windows messages I/O (fhandler_windows.cc)
-
- fhandler_dev_random /dev/[u]random implementation (fhandler_random.cc)
-
- fhandler_dev_mem /dev/mem implementation (fhandler_mem.cc)
-
- fhandler_dev_clipboard /dev/clipboard implementation (fhandler_clipboard.cc)
-
- fhandler_proc Interesting possibility, not implemented yet
-*/
-
-enum
-{
- FH_RBINARY = 0x00001000, /* binary read mode */
- FH_WBINARY = 0x00002000, /* binary write mode */
- FH_CLOEXEC = 0x00004000, /* close-on-exec */
- FH_RBINSET = 0x00008000, /* binary read mode has been explicitly set */
- FH_WBINSET = 0x00010000, /* binary write mode has been explicitly set */
- FH_APPEND = 0x00020000, /* always append */
- FH_ASYNC = 0x00040000, /* async I/O */
- FH_HADEOF = 0x00080000, /* EOF seen */
-
- FH_SYMLINK = 0x00100000, /* is a symlink */
- FH_EXECABL = 0x00200000, /* file looked like it would run:
- * ends in .exe or .bat or begins with #! */
- FH_W95LSBUG= 0x00400000, /* set when lseek is called as a flag that
- * _write should check if we've moved beyond
- * EOF, zero filling if so. */
- FH_NOFRNAME= 0x00800000, /* Set if shouldn't free unix_path_name_ and
- windows_path_name_ on destruction. */
- FH_NOEINTR = 0x01000000, /* Set if I/O should be uninterruptible. */
- FH_FFIXUP = 0x02000000, /* Set if need to fixup after fork. */
- FH_LOCAL = 0x04000000, /* File is unix domain socket */
- FH_FIFO = 0x08000000, /* File is FIFO */
- FH_HASACLS = 0x40000000, /* True if fs of file has ACLS */
-
- /* Device flags */
-
- /* Slow devices */
- FH_CONSOLE = 0x00000001, /* is a console */
- FH_CONIN = 0x00000002, /* console input */
- FH_CONOUT = 0x00000003, /* console output */
- FH_TTYM = 0x00000004, /* is a tty master */
- FH_TTYS = 0x00000005, /* is a tty slave */
- FH_PTYM = 0x00000006, /* is a pty master */
- FH_SERIAL = 0x00000007, /* is a serial port */
- FH_PIPE = 0x00000008, /* is a pipe */
- FH_PIPER = 0x00000009, /* read end of a pipe */
- FH_PIPEW = 0x0000000a, /* write end of a pipe */
- FH_SOCKET = 0x0000000b, /* is a socket */
- FH_WINDOWS = 0x0000000c, /* is a window */
-
- FH_SLOW = 0x00000010, /* "slow" device if below this */
-
- /* Fast devices */
- FH_DISK = 0x00000010, /* is a disk */
- FH_FLOPPY = 0x00000011, /* is a floppy */
- FH_TAPE = 0x00000012, /* is a tape */
- FH_NULL = 0x00000013, /* is the null device */
- FH_ZERO = 0x00000014, /* is the zero device */
- FH_RANDOM = 0x00000015, /* is a random device */
- FH_MEM = 0x00000016, /* is a mem device */
- FH_CLIPBOARD = 0x00000017, /* is a clipbaord device */
-
- FH_NDEV = 0x00000018, /* Maximum number of devices */
- FH_DEVMASK = 0x00000fff, /* devices live here */
- FH_BAD = 0xffffffff
-};
-
-#define FHDEVN(n) ((n) & FH_DEVMASK)
-#define FHISSETF(x) __ISSETF (this, x, FH)
-#define FHSETF(x) __SETF (this, x, FH)
-#define FHCLEARF(x) __CLEARF (this, x, FH)
-#define FHCONDSETF(n, x) __CONDSETF(n, this, x, FH)
-
-#define FHSTATOFF 0
-
-extern const char *windows_device_names[];
-extern struct __cygwin_perfile *perfile_table;
-#define __fmode (*(user_data->fmode_ptr))
-
-class select_record;
-class path_conv;
-class fhandler_disk_file;
-
-class fhandler_base
-{
-private:
- DWORD status;
-public:
- int cb;
-private:
- int access_;
- HANDLE io_handle;
-
- unsigned long namehash_; /* hashed filename, used as inode num */
-
- /* Full unix path name of this file */
- /* File open flags from open () and fcntl () calls */
- int openflags_;
-
-protected:
- char *rabuf; /* used for crlf conversion in text files */
- size_t ralen;
- size_t raixget;
- size_t raixput;
- size_t rabuflen;
-
- char *unix_path_name_;
- char *win32_path_name_;
-
-public:
- void set_name (const char * unix_path, const char * win32_path = NULL,
- int unit = 0);
-
- virtual fhandler_base& operator =(fhandler_base &x);
- fhandler_base (DWORD dev, const char *name = 0, int unit = 0);
- virtual ~fhandler_base ();
-
- /* Non-virtual simple accessor functions. */
- void set_io_handle (HANDLE x) { io_handle = x; }
-
- void set_cb (size_t size) { cb = size; }
- DWORD get_device () { return status & FH_DEVMASK; }
- virtual int get_unit () { return 0; }
- virtual BOOL is_slow () { return get_device () < FH_SLOW; }
-
- int get_access () { return access_; }
- void set_access (int x) { access_ = x; }
-
- int get_async () { return FHISSETF (ASYNC); }
- void set_async (int x) { FHCONDSETF (x, ASYNC); }
-
- int get_flags () { return openflags_; }
- void set_flags (int x) { openflags_ = x; }
-
- int get_w_binary () { return FHISSETF (WBINARY); }
- int get_r_binary () { return FHISSETF (RBINARY); }
-
- int get_w_binset () { return FHISSETF (WBINSET); }
- int get_r_binset () { return FHISSETF (RBINSET); }
-
- void set_w_binary (int b) { FHCONDSETF (b, WBINARY); FHSETF (WBINSET); }
- void set_r_binary (int b) { FHCONDSETF (b, RBINARY); FHSETF (RBINSET); }
-
- int get_default_fmode (int flags);
-
- int get_r_no_interrupt () { return FHISSETF (NOEINTR); }
- void set_r_no_interrupt (int b) { FHCONDSETF (b, NOEINTR); }
-
- int get_close_on_exec () { return FHISSETF (CLOEXEC); }
- int set_close_on_exec_flag (int b) { return FHCONDSETF (b, CLOEXEC); }
-
- void set_check_win95_lseek_bug (int b = 1) { FHCONDSETF (b, W95LSBUG); }
- int get_check_win95_lseek_bug () { return FHISSETF (W95LSBUG); }
-
- int get_need_fork_fixup () { return FHISSETF (FFIXUP); }
- void set_need_fork_fixup () { FHSETF (FFIXUP); }
-
- virtual void set_close_on_exec (int val);
-
- virtual void fixup_before_fork_exec (DWORD) {}
- virtual void fixup_after_fork (HANDLE);
- virtual void fixup_after_exec (HANDLE) {}
-
- int get_symlink_p () { return FHISSETF (SYMLINK); }
- void set_symlink_p (int val) { FHCONDSETF (val, SYMLINK); }
- void set_symlink_p () { FHSETF (SYMLINK); }
-
- int get_socket_p () { return FHISSETF (LOCAL); }
- void set_socket_p (int val) { FHCONDSETF (val, LOCAL); }
- void set_socket_p () { FHSETF (LOCAL); }
-
- int get_execable_p () { return FHISSETF (EXECABL); }
- void set_execable_p (int val) { FHCONDSETF (val, EXECABL); }
- void set_execable_p () { FHSETF (EXECABL); }
-
- int get_append_p () { return FHISSETF (APPEND); }
- void set_append_p (int val) { FHCONDSETF (val, APPEND); }
- void set_append_p () { FHSETF (APPEND); }
-
- int 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);
-
- int has_acls () { return FHISSETF (HASACLS); }
- void set_has_acls (int val) { FHCONDSETF (val, HASACLS); }
-
- int no_free_names () { return FHISSETF (NOFRNAME); }
- void set_no_free_names (int val) { FHCONDSETF (val, NOFRNAME); }
- void set_no_free_names () { FHSETF (NOFRNAME); }
-
- const char *get_name () { return unix_path_name_; }
- const char *get_win32_name () { return win32_path_name_; }
- unsigned long get_namehash () { return namehash_; }
-
- virtual void hclose (HANDLE h) {CloseHandle (h);}
- virtual void set_inheritance (HANDLE &h, int not_inheriting,
- const char *name = NULL);
-
- /* fixup fd possibly non-inherited handles after fork */
- void fork_fixup (HANDLE parent, HANDLE &h, const char *name);
-
- /* Potentially overridden virtual functions. */
- virtual int open (const char *, int flags, mode_t mode = 0)
- {
- return open (flags, mode);
- }
- virtual int open (int flags, mode_t mode = 0);
- virtual int close ();
- virtual int fstat (struct stat *buf) { return stat_dev (get_device (), get_unit (), get_namehash (), buf); }
- virtual int ioctl (unsigned int cmd, void *);
- virtual int fcntl (int cmd, void *);
- virtual char const * ttyname () { return get_name(); }
- virtual int read (void *ptr, size_t len);
- virtual int write (const void *ptr, size_t len);
- virtual off_t lseek (off_t offset, int whence);
- virtual int lock (int, struct flock *);
- virtual void dump ();
- virtual int dup (fhandler_base *child);
-
- virtual HANDLE mmap (caddr_t *addr, size_t len, DWORD access,
- int flags, off_t off);
- virtual int munmap (HANDLE h, caddr_t addr, size_t len);
- virtual int msync (HANDLE h, caddr_t addr, size_t len, int flags);
-
- void *operator new (size_t, void *p) {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 int is_tty () { return 0; }
- virtual BOOL is_device () { return TRUE; }
- virtual char *ptsname () { return NULL;}
- virtual class fhandler_socket *is_socket () { return 0; }
- virtual class fhandler_console *is_console () { return 0; }
- virtual int is_windows () {return 0; }
-
- virtual int raw_read (void *ptr, size_t ulen);
- virtual int raw_write (const void *ptr, size_t ulen);
-
- /* Virtual accessor functions to hide the fact
- that some fd's have two handles. */
- virtual HANDLE get_handle () const { return io_handle; }
- virtual HANDLE get_io_handle () const { return io_handle; }
- virtual HANDLE get_output_handle () const { 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, int ignra);
- virtual const char * get_native_name ()
- {
- return windows_device_names[FHDEVN (status)];
- }
- virtual int bg_check (int) {return 1;}
- void clear_readahead ()
- {
- raixput = raixget = ralen = rabuflen = 0;
- rabuf = NULL;
- }
- void operator delete (void *);
-};
-
-class fhandler_socket: public fhandler_base
-{
-private:
- int addr_family;
- struct _WSAPROTOCOL_INFOA *prot_info_ptr;
-
-public:
- fhandler_socket (const char *name = 0);
- ~fhandler_socket ();
- int get_socket () const { return (int) get_handle(); }
- fhandler_socket * is_socket () { return this; }
- int write (const void *ptr, size_t len);
- int read (void *ptr, size_t len);
- int ioctl (unsigned int cmd, void *);
- int fcntl (int cmd, void *);
- off_t lseek (off_t, int) { return 0; }
- int close ();
- void hclose (HANDLE) {close ();}
- int dup (fhandler_base *child);
-
- virtual void fixup_before_fork_exec (DWORD);
- void fixup_after_fork (HANDLE);
- void fixup_after_exec (HANDLE parent) { fixup_after_fork (parent); }
-
- 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 fd, DWORD howlong, int ignra);
- int get_addr_family () {return addr_family;}
- void set_addr_family (int af) {addr_family = af;}
-};
-
-class fhandler_pipe: public fhandler_base
-{
-public:
- fhandler_pipe (const char *name = 0, DWORD devtype = FH_PIPE);
- off_t lseek (off_t offset, int whence);
- /* This strange test is due to the fact that we can't rely on
- Windows shells to "do the right thing" with pipes. Apparently
- the can keep one end of the pipe open when it shouldn't be. */
- BOOL is_slow () {return os_being_run == winNT;}
- 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 fd, DWORD howlong, int ignra);
-};
-
-class fhandler_dev_raw: public fhandler_base
-{
-protected:
- char *devbuf;
- size_t devbufsiz;
- size_t devbufstart;
- size_t devbufend;
- int eom_detected : 1;
- int eof_detected : 1;
- int lastblk_to_read : 1;
- int is_writing : 1;
- int has_written : 1;
- int varblkop : 1;
- int unit;
-
- virtual void clear (void);
- virtual int writebuf (void);
-
- /* returns not null, if `win_error' determines an end of media condition */
- virtual int is_eom(int win_error) = 0;
- /* returns not null, if `win_error' determines an end of file condition */
- virtual int is_eof(int win_error) = 0;
-
- fhandler_dev_raw (DWORD dev, const char *name, int unit);
-
-public:
- ~fhandler_dev_raw (void);
-
- int open (const char *path, int flags, mode_t mode = 0);
- int close (void);
-
- int raw_read (void *ptr, size_t ulen);
- int raw_write (const void *ptr, size_t ulen);
-
- int fstat (struct stat *buf);
-
- int dup (fhandler_base *child);
-
- int ioctl (unsigned int cmd, void *buf);
-
- void fixup_after_fork (HANDLE);
- void fixup_after_exec (HANDLE parent) { fixup_after_fork (parent); }
-};
-
-class fhandler_dev_floppy: public fhandler_dev_raw
-{
-protected:
- virtual int is_eom (int win_error);
- virtual int is_eof (int win_error);
-
-public:
- fhandler_dev_floppy (const char *name, int unit);
-
- virtual int open (const char *path, int flags, mode_t mode = 0);
- virtual int close (void);
-
- virtual off_t lseek (off_t offset, int whence);
-
- virtual int ioctl (unsigned int cmd, void *buf);
-};
-
-class fhandler_dev_tape: public fhandler_dev_raw
-{
- int norewind;
- int lasterr;
-
-protected:
- virtual void clear (void);
-
- virtual int is_eom (int win_error);
- virtual int is_eof (int win_error);
-
-public:
- fhandler_dev_tape (const char *name, int unit);
-
- virtual int open (const char *path, int flags, mode_t mode = 0);
- virtual int close (void);
-
- virtual off_t lseek (off_t offset, int whence);
-
- virtual int fstat (struct stat *buf);
-
- virtual int dup (fhandler_base *child);
-
- virtual int ioctl (unsigned int cmd, void *buf);
-
-private:
- int tape_write_marks (int marktype, DWORD len);
- int tape_get_pos (unsigned long *ret);
- int tape_set_pos (int mode, long count, BOOLEAN sfm_func = FALSE);
- int tape_erase (int mode);
- int tape_prepare (int action);
- BOOLEAN tape_get_feature (DWORD parm);
- int tape_get_blocksize (long *min, long *def, long *max, long *cur);
- int tape_set_blocksize (long count);
- int tape_status (struct mtget *get);
- int tape_compression (long count);
-};
-
-/* Standard disk file */
-
-class fhandler_disk_file: public fhandler_base
-{
-private:
- int check_execable_p (const char *path);
-
-public:
- fhandler_disk_file (const char *name);
-
- int open (const char *path, int flags, mode_t mode = 0);
- int open (path_conv& real_path, int flags, mode_t mode);
- int close ();
- int lock (int, struct flock *);
- BOOL is_device () { return FALSE; }
- int fstat (struct stat *buf);
-
- HANDLE mmap (caddr_t *addr, size_t len, DWORD access, int flags, off_t off);
- int munmap (HANDLE h, caddr_t addr, size_t len);
- int msync (HANDLE h, caddr_t addr, size_t len, int flags);
-};
-
-class fhandler_serial: public fhandler_base
-{
-private:
- unsigned int vmin_; /* from termios */
- unsigned int vtime_; /* from termios */
- pid_t pgrp_;
-
-public:
- int overlapped_armed;
- OVERLAPPED io_status;
-
- /* Constructor */
- fhandler_serial (const char *name, DWORD devtype = FH_SERIAL, int unit = 0);
-
- int open (const char *path, int flags, mode_t mode);
- int close ();
- void init (HANDLE h, DWORD a, mode_t flags);
- void overlapped_setup ();
- int dup (fhandler_base *child);
- int 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 tcsetattr (int a, const struct termios *t);
- int tcgetattr (struct termios *t);
- off_t lseek (off_t, int) { return 0; }
- int tcflush (int);
- void dump ();
- int is_tty () { return 1; }
- void fixup_after_fork (HANDLE parent);
- void fixup_after_exec (HANDLE);
-
- /* 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);
- int ready_for_read (int fd, DWORD howlong, int ignra);
-};
-
-#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 (DWORD dev, const char *name = 0, int unit = 0) :
- fhandler_base (dev, name, unit)
- {
- // nothing to do
- }
- HANDLE get_output_handle () const { return output_handle; }
- int line_edit (const char *rptr, int nread, int always_accept = 0);
- void set_output_handle (HANDLE h) { output_handle = h; }
- void tcinit (tty_min *this_tc, int force = FALSE);
- virtual int is_tty () { return 1; }
- int tcgetpgrp ();
- int tcsetpgrp (int pid);
- void set_ctty (int ttynum, int flags);
- int 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) {}
-};
-
-/* This is a input and output console handle */
-class fhandler_console: public fhandler_termios
-{
-private:
-
-/* Output state */
-
- // enum {normal, gotesc, gotsquare, gotarg1, gotcommand} state;
-#define normal 1
-#define gotesc 2
-#define gotsquare 3
-#define gotarg1 4
-#define gotrsquare 5
-#define gotcommand 6
-#define gettitle 7
-#define eattitle 8
-#define MAXARGS 10
- int state_;
- int args_[MAXARGS];
- int nargs_;
-
- DWORD default_color;
-
-/* Output calls */
-
- BOOL fillin_info ();
- 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);
- const unsigned char * write_normal (unsigned const char*, unsigned const char *);
- void char_command (char);
- 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 (const char *name);
-
- fhandler_console* is_console () { return this; }
-
- int open (const char *path, 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); }
- int read (void *ptr, size_t len);
- 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);
-
- 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 fd, DWORD howlong, int ignra);
- void fixup_after_exec (HANDLE);
- void set_close_on_exec (int val);
- void fixup_after_fork (HANDLE parent);
- void set_input_state ();
-};
-
-class fhandler_tty_common: public fhandler_termios
-{
-public:
- fhandler_tty_common (DWORD dev, const char *name = 0, int unit = 0) :
- fhandler_termios (dev, name, unit),
- ttynum (unit)
- {
- // 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;
- HANDLE inuse; // used to indicate that a tty is in use
-
-
- DWORD __acquire_output_mutex (const char *fn, int ln, DWORD ms);
- void __release_output_mutex (const char *fn, int ln);
-
- int ttynum; // Master tty num.
- virtual int dup (fhandler_base *child);
-
- tty *get_ttyp () { return (tty *)tc; }
- int get_unit () { return ttynum; }
-
- int close ();
- void set_close_on_exec (int 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);
- int ready_for_read (int fd, DWORD howlong, int ignra);
-};
-
-class fhandler_tty_slave: public fhandler_tty_common
-{
-public:
- /* Constructor */
- fhandler_tty_slave (const char *name);
- fhandler_tty_slave (int, const char *name);
-
- int open (const char *path, int flags, mode_t mode = 0);
- int write (const void *ptr, size_t len);
- int read (void *ptr, size_t len);
- 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 *);
-
- off_t lseek (off_t, int) { return 0; }
-};
-
-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
-
- /* Constructor */
- fhandler_pty_master (const char *name, DWORD devtype = FH_PTYM, int unit = -1);
-
- int process_slave_output (char *buf, size_t len, int pktmode_on);
- void doecho (const void *str, DWORD len);
- int accept_input ();
- int open (const char *path, int flags, mode_t mode = 0);
- int write (const void *ptr, size_t len);
- int read (void *ptr, size_t len);
- int close ();
-
- int tcsetattr (int a, const struct termios *t);
- int tcgetattr (struct termios *t);
- int tcflush (int);
- int ioctl (unsigned int cmd, void *);
-
- off_t lseek (off_t, int) { return 0; }
- char *ptsname ();
-
- void set_close_on_exec (int val);
- BOOL hit_eof ();
-};
-
-class fhandler_tty_master: public fhandler_pty_master
-{
-public:
- /* Constructor */
- fhandler_tty_master (const char *name, int unit);
- fhandler_console *console; // device handler to perform real i/o.
- HANDLE hThread; // process_output thread handle.
-
- int init (int);
- int init_console ();
- void fixup_after_fork (HANDLE parent);
- void fixup_after_exec (HANDLE);
-};
-
-class fhandler_dev_null: public fhandler_base
-{
-public:
- fhandler_dev_null (const char *name);
-
- void dump ();
- 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 (const char *name);
- int open (const char *path, int flags, mode_t mode = 0);
- int write (const void *ptr, size_t len);
- int read (void *ptr, size_t len);
- off_t lseek (off_t offset, int whence);
- int close (void);
-
- void dump ();
-};
-
-class fhandler_dev_random: public fhandler_base
-{
-protected:
- int unit;
- HCRYPTPROV crypt_prov;
- long pseudo;
-
- 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 (const char *name, int unit);
- int get_unit () { return unit; }
- int open (const char *path, int flags, mode_t mode = 0);
- int write (const void *ptr, size_t len);
- int read (void *ptr, size_t len);
- off_t lseek (off_t offset, int whence);
- int close (void);
- int dup (fhandler_base *child);
-
- void dump ();
-};
-
-class fhandler_dev_mem: public fhandler_base
-{
-protected:
- int unit;
- DWORD mem_size;
- DWORD pos;
-
-public:
- fhandler_dev_mem (const char *name, int unit);
- ~fhandler_dev_mem (void);
-
- int open (const char *path, int flags, mode_t mode = 0);
- int write (const void *ptr, size_t ulen);
- int read (void *ptr, size_t ulen);
- off_t lseek (off_t offset, int whence);
- int close (void);
- int fstat (struct stat *buf);
- int dup (fhandler_base *child);
-
- HANDLE mmap (caddr_t *addr, size_t len, DWORD access, int flags, off_t off);
- int munmap (HANDLE h, caddr_t addr, size_t len);
- int msync (HANDLE h, caddr_t addr, size_t len, int flags);
-
- void dump ();
-} ;
-
-class fhandler_dev_clipboard: public fhandler_base
-{
-public:
- fhandler_dev_clipboard (const char *name);
- int is_windows (void) { return 1; }
- int open (const char *path, int flags, mode_t mode = 0);
- int write (const void *ptr, size_t len);
- int read (void *ptr, size_t len);
- off_t lseek (off_t offset, int whence);
- int close (void);
-
- void dump ();
-};
-
-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 (const char *name = 0);
- int is_windows (void) { return 1; }
- int open (const char *path, int flags, mode_t mode = 0);
- int write (const void *ptr, size_t len);
- int read (void *ptr, size_t len);
- int ioctl (unsigned int cmd, void *);
- off_t lseek (off_t, int) { return 0; }
- int close (void) { return 0; }
-
- void set_close_on_exec (int 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);
- int ready_for_read (int fd, DWORD howlong, int ignra);
-};
-
-#if 0
-/* You can't do this */
-typedef union
-{
- fhandler_normal normal;
- fhandler_dev_null dev_null;
- fhandler bare;
- fhandler_serial tty;
-} fhandler_union;
-#else
-#define fhandler_union fhandler_console
-#endif
-struct select_record
-{
- int fd;
- HANDLE h;
- fhandler_base *fh;
- BOOL saw_error;
- BOOL windows_handle;
- BOOL read_ready, write_ready, except_ready;
- BOOL read_selected, write_selected, except_selected;
- int (*startup) (select_record *me, class select_stuff *stuff);
- int (*poll) (select_record *me, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds);
- 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;
-
- select_record (fhandler_base *in_fh = NULL) : fd (0), h (NULL),
- fh (in_fh), saw_error (0), windows_handle (0),
- read_ready (0), write_ready (0), except_ready (0),
- read_selected (0), write_selected (0), except_selected (0),
- startup (NULL), poll (NULL), verify (NULL), cleanup (NULL),
- next (NULL) {}
-};
-
-class select_stuff
-{
-public:
- ~select_stuff ();
- select_stuff (): always_ready (0), windows_used (0), start (0)
- {
- memset (device_specific, 0, sizeof (device_specific));
- }
- BOOL always_ready, windows_used;
- select_record start;
- void *device_specific[FH_NDEV];
-
- 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);
-};
-
-int __stdcall set_console_state_for_spawn ();
-
-#endif /* _FHANDLER_H_ */
diff --git a/winsup/cygwin/fhandler_clipboard.cc b/winsup/cygwin/fhandler_clipboard.cc
deleted file mode 100644
index 7b6d05362..000000000
--- a/winsup/cygwin/fhandler_clipboard.cc
+++ /dev/null
@@ -1,95 +0,0 @@
-/* fhandler_dev_clipboard: code to access /dev/clipboard
-
- Copyright 2000 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 <stdio.h>
-#include <errno.h>
-#include "cygerrno.h"
-#include "fhandler.h"
-#include <windows.h>
-#include <wingdi.h>
-#include <winuser.h>
-
-static BOOL clipboard_eof; // NOT THREAD-SAFE
-
-fhandler_dev_clipboard::fhandler_dev_clipboard (const char *name)
- : fhandler_base (FH_CLIPBOARD, name)
-{
- set_cb (sizeof *this);
- clipboard_eof = false;
-}
-
-int
-fhandler_dev_clipboard::open (const char *, int flags, mode_t)
-{
- set_flags (flags);
- clipboard_eof = false;
- return 1;
-}
-
-int
-fhandler_dev_clipboard::write (const void *, size_t len)
-{
- return len;
-}
-
-int
-fhandler_dev_clipboard::read (void *ptr, size_t len)
-{
- HGLOBAL hglb;
- LPSTR lpstr;
- int ret;
-
- if (!clipboard_eof)
- {
- OpenClipboard(0);
- hglb = GetClipboardData((current_codepage==ansi_cp ? CF_TEXT : CF_OEMTEXT));
- lpstr = (LPSTR) GlobalLock(hglb);
- if (len < sizeof (lpstr))
- {
- set_errno (EINVAL);
- GlobalUnlock (hglb);
- CloseClipboard ();
- return -1;
- }
-
- ret = snprintf((char *) ptr, len, "%s", lpstr);
- GlobalUnlock(hglb);
- CloseClipboard();
- set_errno (0);
- clipboard_eof = true;
- return ret;
- }
- else
- {
- return 0;
- }
-}
-
-off_t
-fhandler_dev_clipboard::lseek (off_t offset, int whence)
-{
- return 0;
-}
-
-int
-fhandler_dev_clipboard::close (void)
-{
- clipboard_eof = false;
- return 0;
-}
-
-void
-fhandler_dev_clipboard::dump ()
-{
- paranoid_printf("here, fhandler_dev_clipboard");
-}
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
deleted file mode 100644
index 270e3856a..000000000
--- a/winsup/cygwin/fhandler_console.cc
+++ /dev/null
@@ -1,1535 +0,0 @@
-/* fhandler_console.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <sys/termios.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <unistd.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <wincon.h>
-#include <ctype.h>
-#include <sys/cygwin.h>
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "shared_info.h"
-#include "security.h"
-
-/*
- * Scroll the screen context.
- * x1, y1 - ul corner
- * x2, y2 - dr corner
- * xn, yn - new ul corner
- * Negative values represents current screen dimensions
- */
-static struct
- {
- short Top, Bottom;
- } scroll_region = {0, -1};
-
-#define srTop (info.winTop + scroll_region.Top)
-#define srBottom ((scroll_region.Bottom < 0) ? info.winBottom : info.winTop + scroll_region.Bottom)
-
-#define use_tty ISSTATE (myself, PID_USETTY)
-
-const char * get_nonascii_key (INPUT_RECORD&, char *);
-
-HANDLE console_shared_h;
-
-static tty_min NO_COPY *shared_console_info = NULL;
-
-/* Allocate and initialize the shared record for the current console.
- Returns a pointer to shared_console_info. */
-static __inline tty_min *
-get_tty_stuff (int force = 0)
-{
- if (shared_console_info && !force)
- return shared_console_info;
-
- shared_console_info = (tty_min *) open_shared (NULL, console_shared_h,
- sizeof (*shared_console_info),
- NULL);
- ProtectHandle (console_shared_h);
- shared_console_info->setntty (TTY_CONSOLE);
- shared_console_info->setsid (myself->sid);
- return shared_console_info;
-}
-
-/* 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 get_tty_stuff ();
- else if (n >= 0)
- return &cygwin_shared->tty.ttys[n];
- else
- return &nada;
-}
-
-
-/* Determine if a console is associated with this process prior to a spawn.
- If it is, then we'll return 1. If the console has been initialized, then
- set it into a more friendly state for non-cygwin apps. */
-int __stdcall
-set_console_state_for_spawn ()
-{
- HANDLE h = CreateFileA ("CONIN$", GENERIC_READ, FILE_SHARE_WRITE,
- &sec_none_nih, OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL, NULL);
-
- if (h == INVALID_HANDLE_VALUE || h == NULL)
- return 0;
-
- if (shared_console_info != NULL)
- {
-# define tc shared_console_info /* ACK. Temporarily define for use in TTYSETF macro */
- SetConsoleMode (h, ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT | ENABLE_PROCESSED_INPUT);
- TTYSETF (RSTCONS);
-#if 0
- char ch;
- DWORD n;
- /* NOTE -- This ReadFile is apparently necessary for correct functioning on
- Windows NT 4.0. Without this, the next ReadFile returns garbage. */
- (void) ReadFile (h, &ch, 0, &n, NULL);
-#endif
-# undef tc
- }
-
- CloseHandle (h);
- return 1;
-}
-
-void
-fhandler_console::set_cursor_maybe ()
-{
- CONSOLE_SCREEN_BUFFER_INFO now;
- static CONSOLE_SCREEN_BUFFER_INFO last = {{0, 0}, {-1, -1}, 0, {0, 0}, {0, 0}};
-
- if (!GetConsoleScreenBufferInfo (get_output_handle(), &now))
- return;
-
- if (last.dwCursorPosition.X != now.dwCursorPosition.X ||
- last.dwCursorPosition.Y != now.dwCursorPosition.Y)
- {
- SetConsoleCursorPosition (get_output_handle (), now.dwCursorPosition);
- last.dwCursorPosition = now.dwCursorPosition;
- }
-}
-
-int
-fhandler_console::read (void *pv, size_t buflen)
-{
- if (!buflen)
- return 0;
-
- 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)
- return copied_chars;
-
- HANDLE w4[2];
- DWORD nwait;
- char tmp[17];
-
- w4[0] = h;
- if (iscygthread ())
- nwait = 1;
- else
- {
- w4[1] = signal_arrived;
- nwait = 2;
- }
-
- for (;;)
- {
- int bgres;
- if ((bgres = bg_check (SIGTTIN)) <= 0)
- return bgres;
-
- 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:
- set_sig_errno (EINTR);
- return -1;
- default:
- __seterrno ();
- return -1;
- }
-
- DWORD nread;
- INPUT_RECORD input_rec;
- const char *toadd;
-
- if (!ReadConsoleInput (h, &input_rec, 1, &nread))
- {
- __seterrno ();
- syscall_printf ("ReadConsoleInput failed, %E");
- return -1; /* seems to be failure */
- }
-
- /* check the event that occurred */
- switch (input_rec.EventType)
- {
- case KEY_EVENT:
- if (!input_rec.Event.KeyEvent.bKeyDown)
- continue;
-
-#define ich (input_rec.Event.KeyEvent.uChar.AsciiChar)
-#define wch (input_rec.Event.KeyEvent.uChar.UnicodeChar)
-
- if (wch == 0 ||
- /* arrow/function keys */
- (input_rec.Event.KeyEvent.dwControlKeyState & ENHANCED_KEY))
- {
- toadd = get_nonascii_key (input_rec, tmp);
- if (!toadd)
- continue;
- nread = strlen (toadd);
- }
- else
- {
- tmp[1] = ich;
- /* Need this check since US code page seems to have a bug when
- converting a CTRL-U. */
- if ((unsigned char)ich > 0x7f && current_codepage == ansi_cp)
- OemToCharBuff (tmp + 1, tmp + 1, 1);
- if (!(input_rec.Event.KeyEvent.dwControlKeyState & LEFT_ALT_PRESSED))
- toadd = tmp + 1;
- else
- {
- tmp[0] = '\033';
- tmp[1] = cyg_tolower (tmp[1]);
- toadd = tmp;
- nread++;
- }
- }
-#undef ich
-#undef wch
- break;
-
- case MOUSE_EVENT:
- {
- 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;
-
- /* If the mouse event occurred out of the area we can handle,
- ignore it. */
- int x = mouse_event.dwMousePosition.X;
- int y = mouse_event.dwMousePosition.Y;
- 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. */
- static DWORD dwLastButtonState = 0;
- int b = 0;
- char sz[32];
- if (mouse_event.dwButtonState == dwLastButtonState)
- {
- syscall_printf("mouse: button state unchanged");
- continue;
- }
- else if (mouse_event.dwButtonState < dwLastButtonState)
- {
- b = 3;
- strcpy(sz, "btn up");
- }
- else if ((mouse_event.dwButtonState & 1) != (dwLastButtonState & 1))
- {
- b = 0;
- strcpy(sz, "btn1 down");
- }
- else if ((mouse_event.dwButtonState & 2) != (dwLastButtonState & 2))
- {
- b = 1;
- strcpy(sz, "btn2 down");
- }
- else if ((mouse_event.dwButtonState & 4) != (dwLastButtonState & 4))
- {
- b = 2;
- strcpy(sz, "btn3 down");
- }
-
- /* Remember the current button state */
- dwLastButtonState = mouse_event.dwButtonState;
-
- static int nModifiers = 0;
- /* If a button was pressed, remember the modifiers */
- if (b != 3)
- {
- nModifiers = 0;
- if (mouse_event.dwControlKeyState & SHIFT_PRESSED)
- nModifiers |= 0x4;
- if (mouse_event.dwControlKeyState & (RIGHT_ALT_PRESSED|LEFT_ALT_PRESSED))
- nModifiers |= 0x8;
- if (mouse_event.dwControlKeyState & (RIGHT_CTRL_PRESSED|LEFT_CTRL_PRESSED))
- nModifiers |= 0x10;
- }
-
- b |= 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);
- }
- break;
-
- case WINDOW_BUFFER_SIZE_EVENT:
- kill_pgrp (tc->getpgid (), SIGWINCH);
- continue;
-
- default:
- continue;
- }
-
- if (line_edit (toadd, nread))
- break;
- }
-
- while (buflen)
- if ((ch = get_readahead ()) < 0)
- break;
- else
- {
- buf[copied_chars++] = (unsigned char)(ch & 0xff);
- buflen--;
- }
-#undef buf
-
- return copied_chars;
-}
-
-void
-fhandler_console::set_input_state ()
-{
- if (TTYISSETF (RSTCONS))
- input_tcsetattr (0, &tc->ti);
-}
-
-static struct
- {
- SHORT winTop;
- SHORT winBottom;
- COORD dwWinSize;
- COORD dwBufferSize;
- COORD dwCursorPosition;
- WORD wAttributes;
- } info;
-
-BOOL
-fhandler_console::fillin_info (void)
-{
- BOOL ret;
- CONSOLE_SCREEN_BUFFER_INFO linfo;
-
- if ((ret = GetConsoleScreenBufferInfo (get_output_handle(), &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;
-
- (void)fillin_info ();
- sr1.Left = x1 >= 0 ? x1 : info.dwWinSize.X - 1;
- if (y1 == 0)
- sr1.Top = info.winTop;
- else
- sr1.Top = y1 > 0 ? y1 : info.winBottom;
- sr1.Right = x2 >= 0 ? x2 : info.dwWinSize.X - 1;
- if (y2 == 0)
- sr1.Bottom = info.winTop;
- else
- sr1.Bottom = y2 > 0 ? y2 : info.winBottom;
- sr2.Top = srTop;
- sr2.Left = 0;
- sr2.Bottom = srBottom;
- sr2.Right = info.dwWinSize.X - 1;
- if (sr1.Bottom > sr2.Bottom && sr1.Top <= sr2.Bottom)
- sr1.Bottom = sr2.Bottom;
- dest.X = xn >= 0 ? xn : info.dwWinSize.X - 1;
- if (yn == 0)
- dest.Y = info.winTop;
- else
- dest.Y = yn > 0 ? yn : info.winBottom;
- fill.Char.AsciiChar = ' ';
- fill.Attributes = default_color;
- 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)
- 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 (const char *, int flags, mode_t)
-{
- HANDLE h;
-
- tcinit (get_tty_stuff ());
-
- set_io_handle (INVALID_HANDLE_VALUE);
- set_output_handle (INVALID_HANDLE_VALUE);
-
- set_flags (flags);
-
- /* Open the input handle as handle_ */
- h = CreateFileA ("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);
- set_r_no_interrupt (1); // Handled explicitly in read code
-
- h = CreateFileA ("CONOUT$", GENERIC_READ|GENERIC_WRITE,
- FILE_SHARE_WRITE | FILE_SHARE_WRITE, &sec_none,
- OPEN_EXISTING, 0, 0);
-
- if (h == INVALID_HANDLE_VALUE)
- {
- __seterrno ();
- return 0;
- }
- set_output_handle (h);
-
- if (fillin_info ())
- default_color = info.wAttributes;
-
- DWORD cflags;
- if (GetConsoleMode (get_io_handle (), &cflags))
- {
- cflags |= ENABLE_PROCESSED_INPUT;
- SetConsoleMode (get_io_handle (), ENABLE_WINDOW_INPUT | ENABLE_MOUSE_INPUT | cflags);
- }
-
- TTYCLEARF (RSTCONS);
- set_ctty (TTY_CONSOLE, flags);
- debug_printf("opened conin$ %p, conout$ %p",
- get_io_handle (), get_output_handle ());
-
- return 1;
-}
-
-int
-fhandler_console::close (void)
-{
- CloseHandle (get_io_handle ());
- CloseHandle (get_output_handle ());
- set_io_handle (INVALID_HANDLE_VALUE);
- set_output_handle (INVALID_HANDLE_VALUE);
- 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_name (), get_flags (), 0))
- system_printf ("error opening console, %E");
-
- fhc->state_ = state_;
- fhc->default_color = default_color;
-
- return 0;
-}
-
-int
-fhandler_console::ioctl (unsigned int cmd, void *buf)
-{
- switch (cmd)
- {
- case TIOCGWINSZ:
- int st;
-
- st = fillin_info ();
- if (st)
- {
- /* *not* the buffer size, the actual screen size... */
- /* based on Left Top Right Bottom of srWindow */
- ((struct winsize *) buf)->ws_row = info.dwWinSize.Y;
- ((struct winsize *) buf)->ws_col = 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:
- (void) bg_check (SIGTTOU);
- return 0;
- }
-
- 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)
-{
- /* Ignore the optional_actions stuff, since all output is emitted
- instantly */
-
- /* Enable/disable LF -> CRLF conversions */
- set_w_binary ((t->c_oflag & ONLCR) ? 0 : 1);
-
- /* 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;
-
- /* Enable/disable LF -> CRLF conversions */
- set_r_binary ((t->c_iflag & INLCR) ? 0 : 1);
-
- /* 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;
- }
- /* What about ENABLE_WINDOW_INPUT
- and ENABLE_MOUSE_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);
- }
-
- TTYCLEARF (RSTCONS);
- 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;
-
-#if 0
- if (!get_r_binary ())
- t->c_iflag |= IGNCR;
- if (!get_w_binary ())
- t->c_oflag |= ONLCR;
-#endif
-
- 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;
-}
-
-/*
- * Constructor.
- */
-
-fhandler_console::fhandler_console (const char *name) :
- fhandler_termios (FH_CONSOLE, name, -1)
-{
- set_cb (sizeof *this);
- state_ = normal;
- set_need_fork_fixup ();
-}
-
-/*
- * 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;
-
- (void)fillin_info ();
-
- if (x1 < 0)
- x1 = info.dwWinSize.X-1;
- if (y1 < 0)
- y1 = info.winBottom;
- if (x2 < 0)
- x2 = info.dwWinSize.X-1;
- if (y2 < 0)
- y2 = info.winBottom;
-
- num = abs (y1 - y2) * info.dwBufferSize.X + abs (x1 - x2) + 1;
-
- if ((y2 * info.dwBufferSize.X + x2) > (y1 * 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 (),
- default_color,
- num,
- tlc,
- &done);
-}
-
-void
-fhandler_console::cursor_set (BOOL rel_to_top, int x, int y)
-{
- COORD pos;
-
- (void)fillin_info ();
- if (y > info.winBottom)
- y = info.winBottom;
- else if (y < 0)
- y = 0;
- else if (rel_to_top)
- y += info.winTop;
-
- if (x > info.dwWinSize.X)
- x = 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)
-{
- fillin_info ();
- x += info.dwCursorPosition.X;
- y += info.dwCursorPosition.Y;
- cursor_set (FALSE, x, y);
-}
-
-void
-fhandler_console::cursor_get (int *x, int *y)
-{
- fillin_info ();
- *y = info.dwCursorPosition.Y;
- *x = info.dwCursorPosition.X;
-}
-
-#define BAK 1
-#define ESC 2
-#define NOR 0
-#define IGN 4
-#if 0
-#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 };
-
-/*#define syscall_printf small_printf*/
-
-static int savex, savey; /* for CSI s, CSI u */
-
-void
-fhandler_console::char_command (char c)
-{
- // Keep the background intensity with the colr since there doesn't seem
- // to be a way to set this with termcap/terminfo.
- static int fg = default_color & (FOREGROUND_BLUE | FOREGROUND_GREEN |
- FOREGROUND_RED),
- bg = default_color & (BACKGROUND_BLUE | BACKGROUND_GREEN |
- BACKGROUND_RED | BACKGROUND_INTENSITY),
- bold = default_color & FOREGROUND_INTENSITY;
- int x, y;
- char buf[40];
-
- switch (c)
- {
- case 'm': /* Set Graphics Rendition */
- int i;
-
- for (i = 0; i <= nargs_; i++)
- switch (args_[i])
- {
- case 0: /* normal color */
- fg = default_color & (FOREGROUND_BLUE | FOREGROUND_GREEN |
- FOREGROUND_RED);
- bg = default_color & (BACKGROUND_BLUE | BACKGROUND_GREEN |
- BACKGROUND_RED | BACKGROUND_INTENSITY);
- bold = default_color & FOREGROUND_INTENSITY;
- break;
- case 1: /* bold */
- fg = default_color & (FOREGROUND_BLUE | FOREGROUND_GREEN |
- FOREGROUND_RED);
- bg = default_color & (BACKGROUND_BLUE | BACKGROUND_GREEN |
- BACKGROUND_RED | BACKGROUND_INTENSITY);
- bold = FOREGROUND_INTENSITY;
- break;
- case 4: /* underline - simulate with cyan */
- fg = FOREGROUND_BLUE | FOREGROUND_GREEN;
- bg = default_color & (BACKGROUND_BLUE | BACKGROUND_GREEN |
- BACKGROUND_RED | BACKGROUND_INTENSITY);
- bold = default_color & FOREGROUND_INTENSITY;
- break;
- case 5: /* blink mode */
- fg = default_color & (FOREGROUND_BLUE | FOREGROUND_GREEN |
- FOREGROUND_RED);
- bg = default_color & (BACKGROUND_BLUE | BACKGROUND_GREEN |
- BACKGROUND_RED | BACKGROUND_INTENSITY);
- bold = default_color & FOREGROUND_INTENSITY;
- break;
- case 7: /* reverse */
- fg = (default_color & BACKGROUND_BLUE) ? FOREGROUND_BLUE : 0;
- fg |= (default_color & BACKGROUND_GREEN) ? FOREGROUND_GREEN : 0;
- fg |= (default_color & BACKGROUND_RED) ? FOREGROUND_RED : 0;
- fg |= (default_color & BACKGROUND_INTENSITY) ?
- FOREGROUND_INTENSITY : 0;
- bg = (default_color & FOREGROUND_BLUE) ? BACKGROUND_BLUE : 0;
- bg |= (default_color & FOREGROUND_GREEN) ? BACKGROUND_GREEN : 0;
- bg |= (default_color & FOREGROUND_RED) ? BACKGROUND_RED : 0;
- bg |= (default_color & FOREGROUND_INTENSITY) ?
- BACKGROUND_INTENSITY : 0;
- break;
- case 8: /* invisible */
- fg = (default_color & BACKGROUND_BLUE) ? FOREGROUND_BLUE : 0;
- fg |= (default_color & BACKGROUND_GREEN) ? FOREGROUND_GREEN : 0;
- fg |= (default_color & BACKGROUND_RED) ? FOREGROUND_RED : 0;
- bg = default_color & (BACKGROUND_BLUE | BACKGROUND_GREEN |
- BACKGROUND_RED | BACKGROUND_INTENSITY);
- bold = (default_color & BACKGROUND_INTENSITY) ?
- FOREGROUND_INTENSITY : 0;
- break;
- case 9: /* dim */
- fg = default_color & (FOREGROUND_BLUE | FOREGROUND_GREEN |
- FOREGROUND_RED);
- bg = default_color & (BACKGROUND_BLUE | BACKGROUND_GREEN |
- BACKGROUND_RED | BACKGROUND_INTENSITY);
- bold = (fg == 0) ? FOREGROUND_INTENSITY : 0;
- break;
- case 30: /* BLACK foreground */
- fg = 0;
- break;
- case 31: /* RED foreground */
- fg = FOREGROUND_RED;
- break;
- case 32: /* GREEN foreground */
- fg = FOREGROUND_GREEN;
- break;
- case 33: /* YELLOW foreground */
- fg = FOREGROUND_RED | FOREGROUND_GREEN;
- break;
- case 34: /* BLUE foreground */
- fg = FOREGROUND_BLUE;
- break;
- case 35: /* MAGENTA foreground */
- fg = FOREGROUND_RED | FOREGROUND_BLUE;
- break;
- case 36: /* CYAN foreground */
- fg = FOREGROUND_BLUE | FOREGROUND_GREEN;
- break;
- case 37: /* WHITE foreg */
- fg = FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED;
- break;
- case 40: /* BLACK background */
- bg = 0;
- break;
- case 41: /* RED background */
- bg = BACKGROUND_RED;
- break;
- case 42: /* GREEN background */
- bg = BACKGROUND_GREEN;
- break;
- case 43: /* YELLOW background */
- bg = BACKGROUND_RED | BACKGROUND_GREEN;
- break;
- case 44: /* BLUE background */
- bg = BACKGROUND_BLUE;
- break;
- case 45: /* MAGENTA background */
- bg = BACKGROUND_RED | BACKGROUND_BLUE;
- break;
- case 46: /* CYAN background */
- bg = BACKGROUND_BLUE | BACKGROUND_GREEN;
- break;
- case 47: /* WHITE background */
- bg = BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED;
- break;
- default:
- fg = default_color & (FOREGROUND_BLUE | FOREGROUND_GREEN |
- FOREGROUND_RED);
- bg = default_color & (BACKGROUND_BLUE | BACKGROUND_GREEN |
- BACKGROUND_RED | BACKGROUND_INTENSITY);
- bold = default_color & FOREGROUND_INTENSITY;
- break;
- }
- SetConsoleTextAttribute (get_output_handle (), fg | bg | bold);
- break;
- case 'h':
- case 'l':
- /* Ignore */
- break;
- case 'J':
- switch (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, -(args_[0] ? args_[0] : 1));
- break;
- case 'B':
- cursor_rel (0, args_[0] ? args_[0] : 1);
- break;
- case 'C':
- cursor_rel (args_[0] ? args_[0] : 1, 0);
- break;
- case 'D':
- cursor_rel (-(args_[0] ? args_[0] : 1),0);
- break;
- case 'K':
- switch (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, (args_[1] ? args_[1] : 1) - 1,
- (args_[0] ? args_[0] : 1) - 1);
- break;
- case 'G': /* hpa - position cursor at column n - 1 */
- cursor_get (&x, &y);
- cursor_set (FALSE, (args_[0] ? args_[0] - 1 : 0), y);
- break;
- case 'd': /* vpa - position cursor at line n */
- cursor_get (&x, &y);
- cursor_set (TRUE, x, (args_[0] ? args_[0] - 1 : 0));
- break;
- case 's': /* Save cursor position */
- cursor_get (&savex, &savey);
- break;
- case 'u': /* Restore cursor position */
- cursor_set (FALSE, savex, savey);
- break;
- case 'I': /* TAB */
- cursor_get (&x, &y);
- cursor_set (FALSE, 8*(x/8+1), y);
- break;
- case 'L': /* AL - insert blank lines */
- args_[0] = args_[0] ? args_[0] : 1;
- cursor_get (&x, &y);
- scroll_screen (0, y, -1, -1, 0, y + args_[0]);
- break;
- case 'M': /* DL - delete lines */
- args_[0] = args_[0] ? args_[0] : 1;
- cursor_get (&x, &y);
- scroll_screen (0, y + args_[0], -1, -1, 0, y);
- break;
- case '@': /* IC - insert chars */
- args_[0] = args_[0] ? args_[0] : 1;
- cursor_get (&x, &y);
- scroll_screen (x, y, -1, y, x + args_[0], y);
- break;
- case 'P': /* DC - delete chars */
- args_[0] = args_[0] ? args_[0] : 1;
- cursor_get (&x, &y);
- scroll_screen (x + args_[0], y, -1, y, x, y);
- break;
- case 'S': /* SF - Scroll forward */
- args_[0] = args_[0] ? args_[0] : 1;
- scroll_screen(0, args_[0], -1, -1, 0, 0);
- break;
- case 'T': /* SR - Scroll down */
- fillin_info ();
- args_[0] = args_[0] ? args_[0] : 1;
- scroll_screen (0, 0, -1, -1, 0, info.winTop + args_[0]);
- break;
- case 'X': /* ec - erase chars */
- args_[0] = args_[0] ? args_[0] : 1;
- cursor_get (&x, &y);
- scroll_screen (x + args_[0], y, -1, y, x, y);
- scroll_screen (x, y, -1, y, x + 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 */
- while (args_[1]--)
- WriteFile (get_output_handle (), &args_[0], 1, (DWORD *) &x, 0);
- break;
- case 'c': /* u9 - Terminal enquire string */
- strcpy (buf, "\033[?6c");
- puts_readahead (buf);
- break;
- case 'n':
- switch (args_[0])
- {
- case 6: /* u7 - Cursor position request */
- cursor_get (&x, &y);
- y -= info.winTop;
- /* x -= 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 */
- scroll_region.Top = args_[0] ? args_[0] - 1 : 0;
- scroll_region.Bottom = args_[1] ? args_[1] - 1 : -1;
- cursor_set (TRUE, 0, 0);
- break;
- case 'g': /* TAB set/clear */
- break;
- default:
-bad_escape:
- break;
- }
-}
-
-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;
- const unsigned char *found = src;
-
- while (found < end)
- {
- if (base_chars[*found] != NOR)
- break;
- found++;
- }
- /* Print all the base ones out */
- if (found != src)
- {
- char buf[4096];
- size_t len = found - src;
- do {
- size_t l2 = min (sizeof (buf), len);
- if (current_codepage == ansi_cp)
- CharToOemBuff ((LPCSTR)src, buf, l2);
- else
- strncpy (buf, (LPCSTR)src, l2);
- if (! WriteFile (get_output_handle (), buf, l2, &done, 0))
- {
- debug_printf ("write failed, handle %p", get_output_handle ());
- __seterrno ();
- return 0;
- }
- len -= done;
- src += done;
- } while (len > 0);
- }
- if (src < end)
- {
- int x, y;
- switch (base_chars[*src])
- {
- case BEL:
- Beep (412, 100);
- break;
- case ESC:
- state_ = gotesc;
- break;
- case DWN: /* WriteFile("\n") always adds CR... */
- cursor_get (&x, &y);
- if (y >= srBottom)
- {
- if (y < info.winBottom || scroll_region.Top)
- {
- scroll_screen (0, srTop + 1, -1, srBottom, 0, srTop);
- y--;
- }
- else
- WriteFile (get_output_handle (), "\n", 1, &done, 0);
- }
- if (!get_w_binary ())
- x = 0;
- cursor_set (FALSE, 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:
- WriteFile (get_output_handle (), src, 1, &done, 0);
- break;
- case TAB:
- cursor_get (&x, &y);
- cursor_set (FALSE, 8 * (x / 8 + 1), y);
- break;
- }
- src ++;
- }
- return src;
-}
-
-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;
- static NO_COPY unsigned rarg;
- static NO_COPY char my_title_buf[TITLESIZE + 1];
-
- debug_printf ("%x, %d", vsrc, len);
-
- while (src < end)
- {
- debug_printf ("at %d(%c) state is %d", *src, isprint (*src) ? *src : ' ',
- state_);
- switch (state_)
- {
- case normal:
- src = write_normal (src, end);
- if (!src) /* write_normal failed */
- return -1;
- break;
- case gotesc:
- if (*src == '[')
- {
- state_ = gotsquare;
- for (nargs_ = 0; nargs_ < MAXARGS; nargs_++)
- args_[nargs_] = 0;
- nargs_ = 0;
- }
- else if (*src == ']')
- {
- rarg = 0;
- my_title_buf[0] = '\0';
- state_ = gotrsquare;
- }
- else if (*src == 'M') /* Reverse Index */
- {
- fillin_info ();
- scroll_screen (0, 0, -1, -1, 0, info.winTop + 1);
- state_ = normal;
- }
- else if (*src == 'c') /* Reset Linux terminal */
- {
- clear_screen (0, 0, -1, -1);
- cursor_set (TRUE, 0, 0);
- state_ = normal;
- }
- else if (*src == '8') /* Restore cursor position */
- {
- cursor_set (FALSE, savex, savey);
- state_ = normal;
- }
- else if (*src == '7') /* Save cursor position */
- {
- cursor_get (&savex, &savey);
- state_ = normal;
- }
- else if (*src == 'R')
- state_ = normal;
- else
- {
- state_ = normal;
- }
- src++;
- break;
- case gotarg1:
- if (isdigit (*src))
- {
- args_[nargs_] = args_[nargs_] * 10 + *src - '0';
- src++;
- }
- else if (*src == ';')
- {
- src++;
- nargs_++;
- if (nargs_ >= MAXARGS)
- nargs_--;
- }
- else
- {
- state_ = gotcommand;
- }
- break;
- case gotcommand:
- char_command (*src++);
- state_ = normal;
- break;
- case gotrsquare:
- if (isdigit(*src))
- rarg = rarg * 10 + (*src - '0');
- else if (*src == ';' && (rarg == 2 || rarg == 0))
- state_ = gettitle;
- else
- state_ = eattitle;
- src++;
- break;
- case eattitle:
- case gettitle:
- {
- int n = strlen (my_title_buf);
- if (*src < ' ' || *src >= '\177')
- {
- if (*src == '\007' && state_ == gettitle)
- {
- if (old_title)
- strcpy (old_title, my_title_buf);
- set_console_title (my_title_buf);
- }
- state_ = normal;
- }
- else if (n < TITLESIZE)
- {
- my_title_buf[n++] = *src;
- my_title_buf[n] = '\0';
- }
- src++;
- break;
- }
- case gotsquare:
- if (*src == ';')
- {
- state_ = gotarg1;
- nargs_++;
- src++;
- }
- else if (isalpha (*src))
- {
- state_ = gotcommand;
- }
- else if (*src != '@' && !isalpha (*src) && !isdigit (*src))
- {
- /* ignore any extra chars between [ and first arg or command */
- src++;
- }
- else
- state_ = gotarg1;
- break;
- }
- }
-
- syscall_printf ("%d = write_console (,..%d)", len, len);
-
- return len;
-}
-
-static struct {
- int vk;
- const char *val[4];
-} keytable[] = {
- /* NORMAL */ /* SHIFT */ /* CTRL */ /* ALT */
- {VK_LEFT, {"\033[D", NULL, NULL, NULL}},
- {VK_RIGHT, {"\033[C", NULL, NULL, NULL}},
- {VK_UP, {"\033[A", NULL, NULL, NULL}},
- {VK_DOWN, {"\033[B", NULL, NULL, NULL}},
- {VK_PRIOR, {"\033[5~", NULL, NULL, NULL}},
- {VK_NEXT, {"\033[6~", NULL, NULL, NULL}},
- {VK_HOME, {"\033[1~", NULL, NULL, NULL}},
- {VK_END, {"\033[4~", NULL, NULL, NULL}},
- {VK_INSERT, {"\033[2~", NULL, NULL, NULL}},
- {VK_DELETE, {"\033[3~", NULL, NULL, NULL}},
- {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, bin, a);
-
- /* Ensure both input and output console handles are open */
- int mode = 0;
-
- a &= GENERIC_READ | GENERIC_WRITE;
- if (a == GENERIC_READ)
- mode = O_RDONLY;
- if (a == GENERIC_WRITE)
- mode = O_WRONLY;
- if (a == (GENERIC_READ | GENERIC_WRITE))
- mode = O_RDWR;
- open (0, mode);
- if (f != INVALID_HANDLE_VALUE)
- CloseHandle (f); /* Reopened by open */
-
- output_tcsetattr (0, &tc->ti);
-}
-
-int
-fhandler_console::igncr_enabled (void)
-{
- return tc->ti.c_iflag & IGNCR;
-}
-
-void
-fhandler_console::set_close_on_exec (int val)
-{
- this->fhandler_base::set_close_on_exec (val);
- set_inheritance (output_handle, val);
-}
-
-void
-fhandler_console::fixup_after_fork (HANDLE)
-{
- HANDLE h = get_handle ();
- HANDLE oh = get_output_handle ();
-
- /* Windows does not allow duplication of console handles between processes
- so open the console explicitly. */
-
- if (!open(get_name (), get_flags (), 0))
- system_printf ("error opening console after fork, %E");
-
- if (!get_close_on_exec ())
- {
- CloseHandle (h);
- CloseHandle (oh);
- }
-}
-
-void __stdcall
-set_console_title (char *title)
-{
- int rc;
- char buf[257];
- strncpy(buf, title, sizeof(buf) - 1);
- buf[sizeof(buf) - 1] = '\0';
- if ((rc = WaitForSingleObject (title_mutex, 15000)) != WAIT_OBJECT_0)
- sigproc_printf ("wait for title mutex failed rc %d, %E", rc);
- SetConsoleTitle (buf);
- ReleaseMutex (title_mutex);
- debug_printf ("title '%s'", buf);
-}
-
-void
-fhandler_console::fixup_after_exec (HANDLE)
-{
- HANDLE h = get_handle ();
- HANDLE oh = get_output_handle ();
-
- if (!open(get_name (), get_flags (), 0))
- {
- int sawerr = 0;
- if (!get_io_handle ())
- {
- system_printf ("error opening input console handle after exec, errno %d, %E", get_errno ());
- sawerr = 1;
- }
- if (!get_output_handle ())
- {
- system_printf ("error opening input console handle after exec, errno %d, %E", get_errno ());
- sawerr = 1;
- }
-
- if (!sawerr)
- system_printf ("error opening console after exec, errno %d, %E", get_errno ());
- }
-
- CloseHandle (h);
- CloseHandle (oh);
- return;
-}
diff --git a/winsup/cygwin/fhandler_floppy.cc b/winsup/cygwin/fhandler_floppy.cc
deleted file mode 100644
index ec48c91f3..000000000
--- a/winsup/cygwin/fhandler_floppy.cc
+++ /dev/null
@@ -1,91 +0,0 @@
-/* fhandler_floppy.cc. See fhandler.h for a description of the
- fhandler classes.
-
- Copyright 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <sys/termios.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <unistd.h>
-#include "fhandler.h"
-
-/**********************************************************************/
-/* fhandler_dev_floppy */
-
-int
-fhandler_dev_floppy::is_eom (int win_error)
-{
- int ret = (win_error == ERROR_INVALID_PARAMETER);
- if (ret)
- debug_printf ("end of medium");
- return ret;
-}
-
-int
-fhandler_dev_floppy::is_eof (int)
-{
- int ret = 0;
- if (ret)
- debug_printf ("end of file");
- return ret;
-}
-
-fhandler_dev_floppy::fhandler_dev_floppy (const char *name, int unit) : fhandler_dev_raw (FH_FLOPPY, name, unit)
-{
- set_cb (sizeof *this);
-}
-
-int
-fhandler_dev_floppy::open (const char *path, 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.
- *
- * Let's be smart: Let's take a multiplier of typical tar
- * and cpio buffer sizes by default!
- */
- devbufsiz = 61440L; /* 512L; */
- return fhandler_dev_raw::open (path, flags);
-}
-
-int
-fhandler_dev_floppy::close (void)
-{
- int ret;
-
- ret = writebuf ();
- if (ret)
- {
- fhandler_dev_raw::close ();
- return ret;
- }
- return fhandler_dev_raw::close ();
-}
-
-off_t
-fhandler_dev_floppy::lseek (off_t offset, int whence)
-{
- /* FIXME: Need to implement better. */
- offset = (offset / 512) * 512;
- return fhandler_base::lseek (offset, whence);
-}
-
-int
-fhandler_dev_floppy::ioctl (unsigned int cmd, void *buf)
-{
- return fhandler_dev_raw::ioctl (cmd, buf);
-}
-
diff --git a/winsup/cygwin/fhandler_mem.cc b/winsup/cygwin/fhandler_mem.cc
deleted file mode 100644
index 9b01bbd7d..000000000
--- a/winsup/cygwin/fhandler_mem.cc
+++ /dev/null
@@ -1,403 +0,0 @@
-/* fhandler_mem.cc. See fhandler.h for a description of the fhandler classes.
-
- Copyright 1999, 2000 Cygnus Solutions.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include "winsup.h"
-#include <fcntl.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <ntdef.h>
-
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "ntdll.h"
-
-/**********************************************************************/
-/* fhandler_dev_mem */
-
-fhandler_dev_mem::fhandler_dev_mem (const char *name, int nunit)
-: fhandler_base (FH_MEM, name),
- unit (nunit)
-{
- /* Reading physical memory only supported on NT/W2K. */
- if (os_being_run != winNT)
- {
- mem_size = 0;
- return;
- }
-
- if (unit == 1) /* /dev/mem */
- {
- NTSTATUS ret;
- SYSTEM_BASIC_INFORMATION sbi;
- if ((ret = NtQuerySystemInformation (SystemBasicInformation, (PVOID) &sbi,
- sizeof sbi, NULL)) != STATUS_SUCCESS)
- {
- __seterrno_from_win_error (RtlNtStatusToDosError (ret));
- debug_printf("NtQuerySystemInformation: ret = %d, Dos(ret) = %d",
- ret, RtlNtStatusToDosError (ret));
- mem_size = 0;
- }
- else
- mem_size = sbi.PhysicalPageSize * sbi.NumberOfPhysicalPages;
- debug_printf ("MemSize: %d MB", mem_size >> 20);
- }
- else if (unit == 2) /* /dev/kmem - Not yet supported */
- {
- mem_size = 0;
- debug_printf ("KMemSize: %d MB", mem_size >> 20);
- }
- else if (unit == 4) /* /dev/port == First 64K of /dev/mem */
- {
- mem_size = 65536;
- debug_printf ("PortSize: 64 KB");
- }
- else
- {
- mem_size = 0;
- debug_printf ("Illegal minor number!!!");
- }
-}
-
-fhandler_dev_mem::~fhandler_dev_mem (void)
-{
-}
-
-int
-fhandler_dev_mem::open (const char *, int flags, mode_t)
-{
- if (os_being_run != winNT)
- {
- set_errno (ENOENT);
- debug_printf ("%s is accessible under NT/W2K only",
- unit == 1 ? "/dev/mem" :
- unit == 2 ? "/dev/kmem" :
- "/dev/port" );
- return 0;
- }
-
- /* 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, NULL, NULL);
-
- ACCESS_MASK section_access;
- if ((flags & (O_RDONLY | O_WRONLY | O_RDWR)) == O_RDONLY)
- {
- set_access (GENERIC_READ);
- section_access = SECTION_MAP_READ;
- }
- else if ((flags & (O_RDONLY | O_WRONLY | O_RDWR)) == 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_win_error (RtlNtStatusToDosError (ret));
- set_io_handle (NULL);
- return 0;
- }
-
- set_io_handle (mem);
- 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 + getpagesize () - 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_win_error (RtlNtStatusToDosError (ret));
- return -1;
- }
-
- memcpy ((char *) viewmem + (pos - phys.QuadPart), ptr, ulen);
-
- if (!NT_SUCCESS(ret = NtUnmapViewOfSection (INVALID_HANDLE_VALUE, viewmem)))
- {
- __seterrno_from_win_error (RtlNtStatusToDosError (ret));
- return -1;
- }
-
- pos += ulen;
- return ulen;
-}
-
-int
-fhandler_dev_mem::read (void *ptr, size_t ulen)
-{
- if (!ulen || pos >= mem_size)
- return 0;
-
- if (!(get_access () & GENERIC_READ))
- {
- 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 + getpagesize () - 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_win_error (RtlNtStatusToDosError (ret));
- return -1;
- }
-
- memcpy (ptr, (char *) viewmem + (pos - phys.QuadPart), ulen);
-
- if (!NT_SUCCESS(ret = NtUnmapViewOfSection (INVALID_HANDLE_VALUE, viewmem)))
- {
- __seterrno_from_win_error (RtlNtStatusToDosError (ret));
- return -1;
- }
-
- pos += ulen;
- return ulen;
-}
-
-int
-fhandler_dev_mem::close (void)
-{
- return fhandler_base::close ();
-}
-
-off_t
-fhandler_dev_mem::lseek (off_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 (off_t) -1;
- }
-
- if (pos > mem_size)
- {
- set_errno (EINVAL);
- return (off_t) -1;
- }
-
- return pos;
-}
-
-HANDLE
-fhandler_dev_mem::mmap (caddr_t *addr, size_t len, DWORD access,
- int flags, off_t off)
-{
- if ((DWORD) off >= mem_size
- || (DWORD) len >= mem_size
- || (DWORD) off + len >= mem_size)
- {
- set_errno (EINVAL);
- syscall_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, NULL, NULL);
-
- ACCESS_MASK section_access;
- ULONG protect;
-
- if (access & FILE_MAP_COPY)
- {
- section_access = SECTION_MAP_READ | SECTION_MAP_WRITE;
- protect = PAGE_WRITECOPY;
- }
- else if (access & FILE_MAP_WRITE)
- {
- section_access = SECTION_MAP_READ | SECTION_MAP_WRITE;
- protect = PAGE_READWRITE;
- }
- else
- {
- section_access = SECTION_MAP_READ;
- protect = PAGE_READONLY;
- }
-
- HANDLE h;
- NTSTATUS ret = NtOpenSection (&h, section_access, &attr);
- if (!NT_SUCCESS(ret))
- {
- __seterrno_from_win_error (RtlNtStatusToDosError (ret));
- syscall_printf ("-1 = mmap(): NtOpenSection failed with %E");
- return INVALID_HANDLE_VALUE;
- }
-
- PHYSICAL_ADDRESS phys;
- void *base = *addr;
- DWORD dlen = len;
-
- phys.QuadPart = (ULONGLONG) off;
-
- if ((ret = NtMapViewOfSection (h,
- INVALID_HANDLE_VALUE,
- &base,
- 0L,
- dlen,
- &phys,
- &dlen,
- ViewShare /*??*/,
- 0,
- protect)) != STATUS_SUCCESS)
- {
- __seterrno_from_win_error (RtlNtStatusToDosError (ret));
- syscall_printf ("-1 = mmap(): NtMapViewOfSection failed with %E");
- return INVALID_HANDLE_VALUE;
- }
- if ((flags & MAP_FIXED) && base != addr)
- {
- set_errno (EINVAL);
- syscall_printf ("-1 = mmap(): address shift with MAP_FIXED given");
- NtUnmapViewOfSection (INVALID_HANDLE_VALUE, base);
- 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_win_error (RtlNtStatusToDosError (ret));
- return -1;
- }
- CloseHandle (h);
- return 0;
-}
-
-int
-fhandler_dev_mem::msync (HANDLE h, caddr_t addr, size_t len, int flags)
-{
- return 0;
-}
-
-int
-fhandler_dev_mem::fstat (struct stat *buf)
-{
- if (!buf)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- memset (buf, 0, sizeof *buf);
- buf->st_mode = S_IFCHR;
- if (os_being_run != winNT)
- buf->st_mode |= S_IRUSR | S_IWUSR |
- S_IRGRP | S_IWGRP |
- S_IROTH | S_IWOTH;
- buf->st_nlink = 1;
- buf->st_blksize = getpagesize ();
- buf->st_dev = buf->st_rdev = get_device () << 8 | (unit & 0xff);
-
- 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;
-}
-
-void
-fhandler_dev_mem::dump ()
-{
- paranoid_printf("here, fhandler_dev_mem");
-}
diff --git a/winsup/cygwin/fhandler_random.cc b/winsup/cygwin/fhandler_random.cc
deleted file mode 100644
index 3a2811214..000000000
--- a/winsup/cygwin/fhandler_random.cc
+++ /dev/null
@@ -1,166 +0,0 @@
-/* fhandler_dev_random.cc: code to access /dev/random and /dev/urandom
-
- Copyright 2000 Cygnus Solutions.
-
- 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 <errno.h>
-#include <limits.h>
-#include "cygerrno.h"
-#include "fhandler.h"
-
-#define RANDOM 8
-#define URANDOM 9
-
-#define PSEUDO_MULTIPLIER (6364136223846793005LL)
-#define PSEUDO_SHIFTVAL (21)
-
-fhandler_dev_random::fhandler_dev_random (const char *name, int nunit)
- : fhandler_base (FH_RANDOM, name),
- unit(nunit),
- crypt_prov((HCRYPTPROV)NULL)
-{
- set_cb (sizeof *this);
-}
-
-int
-fhandler_dev_random::open (const char *, int flags, mode_t)
-{
- set_flags (flags);
- 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) && unit == 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;
-}
-
-int
-fhandler_dev_random::read (void *ptr, size_t len)
-{
- if (!len)
- return 0;
- if (!ptr)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- if (crypt_gen_random (ptr, len))
- return len;
- /* 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 (unit == URANDOM)
- return pseudo_read (ptr, len);
-
- __seterrno ();
- return -1;
-}
-
-off_t
-fhandler_dev_random::lseek (off_t, int)
-{
- return 0;
-}
-
-int
-fhandler_dev_random::close (void)
-{
- if (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->unit = unit;
- fhr->crypt_prov = (HCRYPTPROV)NULL;
- return 0;
-}
-
-void
-fhandler_dev_random::dump ()
-{
- paranoid_printf("here, fhandler_dev_random");
-}
-
diff --git a/winsup/cygwin/fhandler_raw.cc b/winsup/cygwin/fhandler_raw.cc
deleted file mode 100644
index 70cf8284c..000000000
--- a/winsup/cygwin/fhandler_raw.cc
+++ /dev/null
@@ -1,537 +0,0 @@
-/* fhandler_raw.cc. See fhandler.h for a description of the fhandler classes.
-
- Copyright 1999, 2000 Cygnus Solutions.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include "winsup.h"
-#include <sys/termios.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <unistd.h>
-
-#include <cygwin/rdevio.h>
-#include <sys/mtio.h>
-#include "cygheap.h"
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "path.h"
-
-/* static wrapper functions to hide the effect of media changes and
- bus resets which occurs after a new media is inserted. This is
- also related to the used tape device. */
-
-static BOOL write_file (HANDLE fh, const void *buf, DWORD to_write,
- DWORD *written, int *err)
-{
- BOOL ret;
-
- *err = 0;
- if (!(ret = WriteFile (fh, buf, to_write, written, 0)))
- {
- if ((*err = GetLastError ()) == ERROR_MEDIA_CHANGED
- || *err == ERROR_BUS_RESET)
- {
- *err = 0;
- if (!(ret = WriteFile (fh, buf, to_write, written, 0)))
- *err = GetLastError ();
- }
- }
- syscall_printf ("%d (err %d) = WriteFile (%d, %d, write %d, written %d, 0)",
- ret, *err, fh, buf, to_write, *written);
- return ret;
-}
-
-static BOOL read_file (HANDLE fh, void *buf, DWORD to_read,
- DWORD *read, int *err)
-{
- BOOL ret;
-
- *err = 0;
- if (!(ret = ReadFile(fh, buf, to_read, read, 0)))
- {
- if ((*err = GetLastError ()) == ERROR_MEDIA_CHANGED
- || *err == ERROR_BUS_RESET)
- {
- *err = 0;
- if (!(ret = ReadFile (fh, buf, to_read, read, 0)))
- *err = GetLastError ();
- }
- }
- syscall_printf ("%d (err %d) = ReadFile (%d, %d, to_read %d, read %d, 0)",
- ret, *err, fh, buf, to_read, *read);
- return ret;
-}
-
-/**********************************************************************/
-/* fhandler_dev_raw */
-
-void
-fhandler_dev_raw::clear (void)
-{
- devbuf = NULL;
- devbufsiz = 0;
- devbufstart = 0;
- devbufend = 0;
- eom_detected = 0;
- eof_detected = 0;
- lastblk_to_read = 0;
- varblkop = 0;
- unit = 0;
-}
-
-int
-fhandler_dev_raw::writebuf (void)
-{
- DWORD written;
- int ret = 0;
-
- if (is_writing && devbuf && devbufend)
- {
- DWORD to_write;
- int ret = 0;
-
- memset (devbuf + devbufend, 0, devbufsiz - devbufend);
- if (get_device () != FH_TAPE)
- to_write = ((devbufend - 1) / 512 + 1) * 512;
- else if (varblkop)
- to_write = devbufend;
- else
- to_write = devbufsiz;
- if (!write_file (get_handle (), devbuf, to_write, &written, &ret)
- && is_eom (ret))
- eom_detected = 1;
- if (written)
- has_written = 1;
- devbufstart = devbufend = 0;
- }
- is_writing = 0;
- return ret;
-}
-
-fhandler_dev_raw::fhandler_dev_raw (DWORD devtype, const char *name, int unit) : fhandler_base (devtype, name)
-{
- clear ();
- this->unit = unit;
- set_need_fork_fixup ();
-}
-
-fhandler_dev_raw::~fhandler_dev_raw (void)
-{
- if (devbufsiz > 1L)
- delete [] devbuf;
- clear ();
-}
-
-int
-fhandler_dev_raw::open (const char *path, int flags, mode_t)
-{
- path_conv real_path (path, PC_SYM_IGNORE);
- int ret;
-
- set_name (path, real_path.get_win32 ());
-
- /* Always open a raw device existing */
- ret = fhandler_base::open (path, flags & ~(O_CREAT | O_TRUNC));
- if (ret)
- {
- if (devbufsiz > 1L)
- devbuf = new char [devbufsiz];
- }
- else
- devbufsiz = 0;
- return ret;
-}
-
-int
-fhandler_dev_raw::close (void)
-{
- return fhandler_base::close ();
-}
-
-int
-fhandler_dev_raw::fstat (struct stat *buf)
-{
- if (!buf)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- memset (buf, 0, sizeof *buf);
- buf->st_mode = S_IFCHR |
- S_IRUSR | S_IWUSR |
- S_IRGRP | S_IWGRP |
- S_IROTH | S_IWOTH;
- buf->st_nlink = 1;
- buf->st_blksize = devbuf ? devbufsiz : 1;
- buf->st_dev = buf->st_rdev = get_device () << 8 | (unit & 0xff);
-
- return 0;
-}
-
-int
-fhandler_dev_raw::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;
-
- /* In mode O_RDWR the buffer has to be written to device first */
- ret = writebuf ();
- if (ret)
- {
- set_errno (is_eom (ret) ? ENOSPC : EACCES);
- return -1;
- }
-
- /* Checking a previous end of file */
- if (eof_detected && !lastblk_to_read)
- {
- eof_detected = 0;
- return 0;
- }
-
- /* Checking a previous end of media */
- if (eom_detected && !lastblk_to_read)
- {
- set_errno (ENOSPC);
- return -1;
- }
-
- 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, devbufstart - devbufend);
- memcpy (ptr, devbuf + devbufstart, bytes_to_read);
- len -= bytes_to_read;
- ptr = (void *) ((char *) ptr + bytes_to_read);
- bytes_read += bytes_to_read;
- devbufstart += bytes_to_read;
-
- if (lastblk_to_read)
- {
- lastblk_to_read = 0;
- break;
- }
- }
- if (len > 0)
- {
- if (!varblkop && len >= devbufsiz)
- {
- if (get_device () == FH_TAPE)
- bytes_to_read = (len / devbufsiz) * devbufsiz;
- else
- bytes_to_read = (len / 512) * 512;
- tgt = (char *) ptr;
- debug_printf ("read %d bytes direct from file",bytes_to_read);
- }
- else
- {
- bytes_to_read = devbufsiz;
- tgt = devbuf;
- if (varblkop)
- debug_printf ("read variable bytes from file into buffer");
- else
- debug_printf ("read %d bytes from file into buffer",
- bytes_to_read);
- }
- if (!read_file (get_handle (), tgt, bytes_to_read, &read2, &ret))
- {
- if (!is_eof (ret) && !is_eom (ret))
- {
- debug_printf ("return -1, set errno to EACCES");
- set_errno (EACCES);
- return -1;
- }
-
- if (is_eof (ret))
- eof_detected = 1;
- else
- eom_detected = 1;
-
- if (!read2)
- {
- if (!bytes_read && is_eom (ret))
- {
- debug_printf ("return -1, set errno to ENOSPC");
- set_errno (ENOSPC);
- return -1;
- }
- break;
- }
- lastblk_to_read = 1;
- }
- if (! read2)
- break;
- if (tgt == devbuf)
- {
- devbufstart = 0;
- devbufend = read2;
- }
- else
- {
- len -= bytes_to_read;
- ptr = (void *) ((char *) ptr + bytes_to_read);
- bytes_read += bytes_to_read;
- }
- }
- }
- }
- else if (!read_file (get_handle (), ptr, len, &bytes_read, &ret))
- {
- if (!is_eof (ret) && !is_eom (ret))
- {
- debug_printf ("return -1, set errno to EACCES");
- set_errno (EACCES);
- return -1;
- }
- if (bytes_read)
- {
- if (is_eof (ret))
- eof_detected = 1;
- else
- eom_detected = 1;
- }
- else if (is_eom (ret))
- {
- debug_printf ("return -1, set errno to ENOSPC");
- set_errno (ENOSPC);
- return -1;
- }
- }
-
- return bytes_read;
-}
-
-int
-fhandler_dev_raw::raw_write (const void *ptr, size_t len)
-{
- DWORD bytes_written = 0;
- DWORD bytes_to_write;
- DWORD written;
- char *p = (char *) ptr;
- char *tgt;
- int ret;
-
- /* Checking a previous end of media on tape */
- if (eom_detected)
- {
- set_errno (ENOSPC);
- return -1;
- }
-
- if (!is_writing)
- devbufstart = devbufend = 0;
- is_writing = 1;
-
- if (devbuf)
- {
- while (len > 0)
- {
- if (!varblkop &&
- (len < devbufsiz || devbufend > 0) && devbufend < devbufsiz)
- {
- bytes_to_write = min (len, devbufsiz - devbufend);
- memcpy (devbuf + devbufend, p, bytes_to_write);
- bytes_written += bytes_to_write;
- devbufend += bytes_to_write;
- p += bytes_to_write;
- len -= bytes_to_write;
- }
- else
- {
- if (varblkop)
- {
- bytes_to_write = len;
- tgt = p;
- }
- else if (devbufend == devbufsiz)
- {
- bytes_to_write = devbufsiz;
- tgt = devbuf;
- }
- else
- {
- bytes_to_write = (len / devbufsiz) * devbufsiz;
- tgt = p;
- }
-
- ret = 0;
- write_file (get_handle (), tgt, bytes_to_write, &written, &ret);
- if (written)
- has_written = 1;
-
- if (ret)
- {
- if (!is_eom (ret))
- {
- __seterrno ();
- return -1;
- }
-
- eom_detected = 1;
-
- if (!written && !bytes_written)
- {
- set_errno (ENOSPC);
- return -1;
- }
-
- if (tgt == p)
- bytes_written += written;
-
- break; // from while (len > 0)
- }
-
- if (tgt == devbuf)
- {
- if (written != devbufsiz)
- memmove (devbuf, devbuf + written, devbufsiz - written);
- devbufend = devbufsiz - written;
- }
- else
- {
- len -= written;
- p += written;
- bytes_written += written;
- }
- }
- }
- }
- else if (len > 0)
- {
- if (!write_file (get_handle (), ptr, len, &bytes_written, &ret))
- {
- if (bytes_written)
- has_written = 1;
- if (!is_eom (ret))
- {
- set_errno (EACCES);
- return -1;
- }
- eom_detected = 1;
- if (!bytes_written)
- {
- set_errno (ENOSPC);
- return -1;
- }
- }
- has_written = 1;
- }
- return bytes_written;
-}
-
-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->eom_detected = eom_detected;
- fhc->eof_detected = eof_detected;
- fhc->lastblk_to_read = 0;
- fhc->varblkop = varblkop;
- fhc->unit = unit;
- }
- return ret;
-}
-
-void
-fhandler_dev_raw::fixup_after_fork (HANDLE)
-{
- if (devbufsiz > 1L)
- devbuf = new char [devbufsiz];
- devbufstart = 0;
- devbufend = 0;
- lastblk_to_read = 0;
-}
-
-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_device () == FH_TAPE)
- {
- struct mtop mop;
-
- mop.mt_op = MTSETBLK;
- mop.mt_count = op->rd_parm;
- ret = ioctl (MTIOCTOP, &mop);
- }
- else if (op->rd_parm % 512)
- ret = ERROR_INVALID_PARAMETER;
- else if (devbuf && op->rd_parm < devbufend - devbufstart)
- ret = ERROR_INVALID_PARAMETER;
- else if (!devbuf || op->rd_parm != devbufsiz)
- {
- char *buf = new char [op->rd_parm];
- if (devbufsiz > 1L)
- {
- memcpy (buf, devbuf + devbufstart, devbufend - devbufstart);
- devbufend -= devbufstart;
- delete [] devbuf;
- }
- else
- devbufend = 0;
-
- devbufstart = 0;
- devbuf = buf;
- devbufsiz = op->rd_parm;
- }
- break;
- default:
- break;
- }
- }
- else if (cmd == RDIOCGET)
- {
- struct rdget *get = (struct rdget *) buf;
-
- if (!get)
- ret = ERROR_INVALID_PARAMETER;
- else
- get->bufsiz = devbufsiz ? devbufsiz : 1L;
- }
- else
- return fhandler_base::ioctl (cmd, buf);
-
- if (ret != NO_ERROR)
- {
- SetLastError (ret);
- __seterrno ();
- return -1;
- }
- return 0;
-}
diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc
deleted file mode 100644
index c1e472bdf..000000000
--- a/winsup/cygwin/fhandler_serial.cc
+++ /dev/null
@@ -1,888 +0,0 @@
-/* fhandler_serial.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <fcntl.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "security.h"
-#include <sys/termios.h>
-
-/**********************************************************************/
-/* fhandler_serial */
-
-fhandler_serial::fhandler_serial (const char *name, DWORD devtype, int unit) :
- fhandler_base (devtype, name, unit)
-{
- set_cb (sizeof *this);
- vmin_ = 0;
- vtime_ = 0;
- pgrp_ = myself->pgid;
- set_need_fork_fixup ();
-}
-
-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;
-}
-
-int
-fhandler_serial::raw_read (void *ptr, size_t ulen)
-{
- int tot;
- DWORD n;
- HANDLE w4[2];
- DWORD minchars = vmin_ ?: 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)
- {
- (void) SetCommMask (get_handle (), EV_RXCHAR);
- ResetEvent (io_status.hEvent);
- }
-
- for (n = 0, tot = 0; ulen; ulen -= n, ptr = (char *)ptr + n)
- {
- DWORD ev;
- COMSTAT st;
- DWORD inq = 1;
-
- n = 0;
-
- if (!vtime_ && !vmin_)
- inq = ulen;
- else if (vtime_)
- {
- inq = ulen; // non-interruptible -- have to use kernel timeouts
- // also note that this is not strictly correct.
- // if vmin > ulen then things won't work right.
- overlapped_armed = -1;
- }
- if (!overlapped_armed)
- {
- if (!ClearCommError (get_handle (), &ev, &st))
- goto err;
- else if (ev)
- termios_printf ("error detected %x", ev);
- else if (st.cbInQue)
- inq = st.cbInQue;
- else 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, min (inq, ulen), &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:
- PurgeComm (get_handle (), PURGE_RXABORT);
- debug_printf ("err %E");
- if (GetLastError () == ERROR_OPERATION_ABORTED)
- n = 0;
- else
- {
- tot = -1;
- __seterrno ();
- break;
- }
- }
-
-out:
- return 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;
-
- if (overlapped_armed)
- PurgeComm (get_handle (), PURGE_TXABORT | PURGE_RXABORT);
- ResetEvent (io_status.hEvent);
-
- for (;;)
- {
- overlapped_armed = TRUE;
- if (WriteFile (get_handle(), ptr, len, &bytes_written, &io_status))
- break;
-
- switch (GetLastError ())
- {
- case ERROR_OPERATION_ABORTED:
- continue;
- case ERROR_IO_PENDING:
- break;
- default:
- goto err;
- }
-
- if (!GetOverlappedResult (get_handle (), &io_status, &bytes_written, TRUE))
- goto err;
-
- break;
- }
-
- overlapped_armed = FALSE;
- return bytes_written;
-
-err:
- __seterrno ();
- return -1;
-}
-
-void
-fhandler_serial::dump (void)
-{
- paranoid_printf ("here");
-}
-
-void
-fhandler_serial::init (HANDLE f, DWORD flags, mode_t bin)
-{
- fhandler_base::init (f, flags, bin);
- (void) open (NULL, flags, bin ? O_BINARY : 0);
-}
-
-int
-fhandler_serial::open (const char *name, 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 (name && !(res = this->fhandler_base::open (flags, mode)))
- return 0;
- else
- res = 1;
-
- (void) SetCommMask (get_handle (), EV_RXCHAR);
-
- set_r_no_interrupt (1); // Handled explicitly in read code
-
- overlapped_setup ();
-
- memset (&to, 0, sizeof (to));
- (void) 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);
- syscall_printf ("%p = fhandler_serial::open (%s, %p, %p)",
- res, get_name (), flags, mode);
- return res;
-}
-
-int
-fhandler_serial::close ()
-{
- (void) 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 (void)
-{
- 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;
-}
-
-/* tcflush: POSIX 7.2.2.1 */
-int
-fhandler_serial::tcflush (int queue)
-{
- if (queue == TCOFLUSH || queue == TCIOFLUSH)
- PurgeComm (get_handle (), PURGE_TXABORT | PURGE_TXCLEAR);
-
- if (queue == TCIFLUSH | queue == TCIOFLUSH)
- /* Input flushing by polling until nothing turns up
- (we stop after 1000 chars anyway) */
- for (int max = 1000; max > 0; max--)
- {
- DWORD ev;
- COMSTAT st;
- if (!PurgeComm (get_handle (), PURGE_RXABORT | PURGE_RXCLEAR))
- break;
- Sleep (100);
- if (!ClearCommError (get_handle (), &ev, &st) || !st.cbInQue)
- break;
- }
-
- 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_;
-
- 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 */
- dropDTR = TRUE;
- state.BaudRate = 0;
- 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;
- 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;
- }
-
- 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;
-
- /* -------------- Set state and exit ------------------ */
- if (memcmp (&ostate, &state, sizeof (state)) != 0)
- SetCommState (get_handle (), &state);
-
- set_r_binary ((t->c_iflag & IGNCR) ? 0 : 1);
- set_w_binary ((t->c_oflag & ONLCR) ? 0 : 1);
-
- if (dropDTR == TRUE)
- EscapeCommFunction (get_handle (), CLRDTR);
- 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);
- }
-
- /*
- 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_ = MAXDWORD;
- vtime_ = 0;
- }
- else
- {
- vtime_ = t->c_cc[VTIME] * 100;
- vmin_ = t->c_cc[VMIN];
- }
-
- debug_printf ("vtime %d, vmin %d\n", vtime_, vmin_);
-
- if (ovmin == vmin_ && ovtime == vtime_)
- return 0;
-
- 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);
- int res = SetCommTimeouts (get_handle (), &to);
- if (!res)
- {
- system_printf ("SetCommTimeout failed, %E");
- __seterrno ();
- return -1;
- }
-
- return 0;
-}
-
-/* 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));
-
- /* -------------- Baud rate ------------------ */
-
- switch (state.BaudRate)
- {
- case 0:
- /* FIXME: need to drop DTR */
- t->c_cflag = t->c_ospeed = t->c_ispeed = B0;
- break;
- case CBR_110:
- t->c_cflag = t->c_ospeed = t->c_ispeed = B110;
- break;
- case CBR_300:
- t->c_cflag = t->c_ospeed = t->c_ispeed = B300;
- break;
- case CBR_600:
- t->c_cflag = t->c_ospeed = t->c_ispeed = B600;
- break;
- case CBR_1200:
- t->c_cflag = t->c_ospeed = t->c_ispeed = B1200;
- break;
- case CBR_2400:
- t->c_cflag = t->c_ospeed = t->c_ispeed = B2400;
- break;
- case CBR_4800:
- t->c_cflag = t->c_ospeed = t->c_ispeed = B4800;
- break;
- case CBR_9600:
- t->c_cflag = t->c_ospeed = t->c_ispeed = B9600;
- break;
- case CBR_19200:
- t->c_cflag = t->c_ospeed = t->c_ispeed = B19200;
- break;
- case CBR_38400:
- t->c_cflag = t->c_ospeed = t->c_ispeed = B38400;
- break;
- case CBR_57600:
- t->c_cflag = t->c_ospeed = t->c_ispeed = B57600;
- break;
- case CBR_115200:
- t->c_cflag = t->c_ospeed = t->c_ispeed = B115200;
- 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 == TRUE)
- 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 == TRUE))
- 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 == FALSE)
- t->c_cflag |= CLOCAL;
-
- /* FIXME: need to handle IGNCR */
-#if 0
- if (!get_r_binary ())
- t->c_iflag |= IGNCR;
-#endif
-
- if (!get_w_binary ())
- t->c_oflag |= ONLCR;
-
- debug_printf ("vmin_ %d, vtime_ %d", vmin_, vtime_);
- if (vmin_ == MAXDWORD)
- {
- t->c_lflag |= ICANON;
- t->c_cc[VTIME] = t->c_cc[VMIN] = 0;
- }
- else
- {
- t->c_cc[VTIME] = vtime_ / 100;
- t->c_cc[VMIN] = vmin_;
- }
-
- return 0;
-}
-
-void
-fhandler_serial::fixup_after_fork (HANDLE parent)
-{
- if (get_close_on_exec ())
- this->fhandler_base::fixup_after_fork (parent);
- overlapped_setup ();
- debug_printf ("io_status.hEvent %p", io_status.hEvent);
-}
-
-void
-fhandler_serial::fixup_after_exec (HANDLE)
-{
- overlapped_setup ();
- debug_printf ("io_status.hEvent %p", io_status.hEvent);
- return;
-}
-
-int
-fhandler_serial::dup (fhandler_base *child)
-{
- fhandler_serial *fhc = (fhandler_serial *) child;
- 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 17a6ff42b..000000000
--- a/winsup/cygwin/fhandler_socket.cc
+++ /dev/null
@@ -1,310 +0,0 @@
-/* fhandler_socket.cc. See fhandler.h for a description of the fhandler classes.
-
- Copyright 2000 Cygnus Solutions.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-/* #define DEBUG_NEST_ON 1 */
-
-#define __INSIDE_CYGWIN_NET__
-
-#define Win32_Winsock
-#include "winsup.h"
-#include <errno.h>
-#include <sys/socket.h>
-
-#include <unistd.h>
-#include <fcntl.h>
-#include <winsock2.h>
-#include "cygheap.h"
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "sigproc.h"
-
-/**********************************************************************/
-/* fhandler_socket */
-
-fhandler_socket::fhandler_socket (const char *name) :
- fhandler_base (FH_SOCKET, name)
-{
- set_cb (sizeof *this);
- set_need_fork_fixup ();
- prot_info_ptr = (LPWSAPROTOCOL_INFOA) cmalloc (HEAP_BUF,
- sizeof (WSAPROTOCOL_INFOA));
-}
-
-fhandler_socket::~fhandler_socket ()
-{
- if (prot_info_ptr)
- cfree (prot_info_ptr);
-}
-
-void
-fhandler_socket::fixup_before_fork_exec (DWORD win_proc_id)
-{
- int ret = 1;
-
- if (prot_info_ptr &&
- (ret = WSADuplicateSocketA (get_socket (), win_proc_id, prot_info_ptr)))
- {
- debug_printf ("WSADuplicateSocket error");
- set_winsock_errno ();
- }
- if (!ret && ws2_32_handle)
- {
- debug_printf ("WSADuplicateSocket went fine, dwServiceFlags1=%d",
- prot_info_ptr->dwServiceFlags1);
- }
- else
- {
- fhandler_base::fixup_before_fork_exec (win_proc_id);
- debug_printf ("Without Winsock 2.0");
- }
-}
-
-void
-fhandler_socket::fixup_after_fork (HANDLE parent)
-{
- SOCKET new_sock = INVALID_SOCKET;
-
- debug_printf ("WSASocket begin, dwServiceFlags1=%d",
- prot_info_ptr->dwServiceFlags1);
- if (prot_info_ptr &&
- (new_sock = WSASocketA (FROM_PROTOCOL_INFO,
- FROM_PROTOCOL_INFO,
- FROM_PROTOCOL_INFO,
- prot_info_ptr, 0, 0)) == INVALID_SOCKET)
- {
- debug_printf ("WSASocket error");
- set_winsock_errno ();
- }
- if (new_sock != INVALID_SOCKET && ws2_32_handle)
- {
- debug_printf ("WSASocket went fine");
- set_io_handle ((HANDLE) new_sock);
- }
- else
- {
- fhandler_base::fixup_after_fork (parent);
- debug_printf ("Without Winsock 2.0");
- }
-}
-
-int
-fhandler_socket::dup (fhandler_base *child)
-{
- fhandler_socket *fhs = (fhandler_socket *) child;
- fhs->set_io_handle (get_io_handle ());
- fhs->fixup_before_fork_exec (GetCurrentProcessId ());
- if (ws2_32_handle)
- {
- fhs->fixup_after_fork (hMainProc);
- return 0;
- }
- return fhandler_base::dup (child);
-}
-
-int
-fhandler_socket::read (void *ptr, size_t len)
-{
- sigframe thisframe (mainthread);
- int res = recv (get_socket (), (char *) ptr, len, 0);
- if (res == SOCKET_ERROR)
- {
- set_winsock_errno ();
- }
- return res;
-}
-
-int
-fhandler_socket::write (const void *ptr, size_t len)
-{
- sigframe thisframe (mainthread);
- int res = send (get_socket (), (const char *) ptr, len, 0);
- if (res == SOCKET_ERROR)
- {
- set_winsock_errno ();
- if (get_errno () == ECONNABORTED || get_errno () == ECONNRESET)
- _raise (SIGPIPE);
- }
- return res;
-}
-
-/* Cygwin internal */
-int
-fhandler_socket::close ()
-{
- int res = 0;
- sigframe thisframe (mainthread);
-
- if (closesocket (get_socket ()))
- {
- set_winsock_errno ();
- res = -1;
- }
-
- return res;
-}
-
-#define ASYNC_MASK (FD_READ|FD_WRITE|FD_OOB|FD_ACCEPT|FD_CONNECT)
-
-/* Cygwin internal */
-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;
- struct ifreq *ifr;
- sigframe thisframe (mainthread);
-
- switch (cmd)
- {
- case SIOCGIFCONF:
- ifc = (struct ifconf *) p;
- if (ifc == 0)
- {
- set_errno (EINVAL);
- return -1;
- }
- res = get_ifconf (ifc, cmd);
- if (res)
- debug_printf ("error in get_ifconf\n");
- break;
- case SIOCGIFFLAGS:
- ifr = (struct ifreq *) p;
- if (ifr == 0)
- {
- set_errno (EINVAL);
- return -1;
- }
- ifr->ifr_flags = IFF_NOTRAILERS | IFF_UP | IFF_RUNNING;
- if (((struct sockaddr_in *) &ifr->ifr_addr)->sin_addr.s_addr
- == INADDR_LOOPBACK)
- ifr->ifr_flags |= IFF_LOOPBACK;
- else
- ifr->ifr_flags |= IFF_BROADCAST;
- res = 0;
- break;
- case SIOCGIFBRDADDR:
- case SIOCGIFNETMASK:
- case SIOCGIFADDR:
- {
- char buf[2048];
- struct ifconf ifc;
- ifc.ifc_len = sizeof (buf);
- ifc.ifc_buf = buf;
- struct ifreq *ifrp;
-
- struct ifreq *ifr = (struct ifreq *) p;
- if (ifr == 0)
- {
- debug_printf ("ifr == NULL\n");
- set_errno (EINVAL);
- return -1;
- }
-
- res = get_ifconf (&ifc, cmd);
- if (res)
- {
- debug_printf ("error in get_ifconf\n");
- break;
- }
-
- debug_printf (" name: %s\n", ifr->ifr_name);
- for (ifrp = ifc.ifc_req;
- (caddr_t) ifrp < ifc.ifc_buf + ifc.ifc_len;
- ++ifrp)
- {
- debug_printf ("testname: %s\n", ifrp->ifr_name);
- if (! strcmp (ifrp->ifr_name, ifr->ifr_name))
- {
- switch (cmd)
- {
- case SIOCGIFADDR:
- ifr->ifr_addr = ifrp->ifr_addr;
- break;
- case SIOCGIFBRDADDR:
- ifr->ifr_broadaddr = ifrp->ifr_broadaddr;
- break;
- case SIOCGIFNETMASK:
- ifr->ifr_netmask = ifrp->ifr_netmask;
- break;
- }
- break;
- }
- }
- if ((caddr_t) ifrp >= ifc.ifc_buf + ifc.ifc_len)
- {
- set_errno (EINVAL);
- return -1;
- }
- break;
- }
- case FIOASYNC:
- res = WSAAsyncSelect (get_socket (), gethwnd (), WM_ASYNCIO,
- *(int *) p ? ASYNC_MASK : 0);
- syscall_printf ("Async I/O on socket %s",
- *(int *) p ? "started" : "cancelled");
- set_async (*(int *) p);
- break;
- default:
- /* We must cancel WSAAsyncSelect (if any) before setting socket to
- * blocking mode
- */
- if (cmd == FIONBIO && *(int *) p == 0)
- WSAAsyncSelect (get_socket (), gethwnd (), 0, 0);
- res = ioctlsocket (get_socket (), cmd, (unsigned long *) p);
- if (res == SOCKET_ERROR)
- set_winsock_errno ();
- if (cmd == FIONBIO)
- {
- syscall_printf ("socket is now %sblocking",
- *(int *) p ? "un" : "");
- /* Start AsyncSelect if async socket unblocked */
- if (*(int *) p && get_async ())
- WSAAsyncSelect (get_socket (), gethwnd (), WM_ASYNCIO, ASYNC_MASK);
- }
- 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_SETFL:
- {
- /* Care for the old O_NDELAY flag. If one of the flags is set,
- both flags are set. */
- int new_flags = (int) arg;
- if (new_flags & (O_NONBLOCK | OLD_O_NDELAY))
- new_flags |= O_NONBLOCK | OLD_O_NDELAY;
- request = (new_flags & O_NONBLOCK) ? 1 : 0;
- current = (get_flags () & O_NONBLOCK) ? 1 : 0;
- if (request != current && (res = ioctl (FIONBIO, &request)))
- break;
- if (request)
- set_flags (get_flags () | O_NONBLOCK | OLD_O_NDELAY);
- else
- set_flags (get_flags () & ~(O_NONBLOCK | OLD_O_NDELAY));
- break;
- }
- default:
- res = fhandler_base::fcntl (cmd, arg);
- break;
- }
- return res;
-}
-
diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc
deleted file mode 100644
index d1c2c8572..000000000
--- a/winsup/cygwin/fhandler_tape.cc
+++ /dev/null
@@ -1,845 +0,0 @@
-/* fhandler_tape.cc. See fhandler.h for a description of the fhandler
- classes.
-
- Copyright 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <sys/termios.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <unistd.h>
-
-#include <sys/mtio.h>
-#include "cygheap.h"
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "path.h"
-
-/**********************************************************************/
-/* fhandler_dev_tape */
-
-void
-fhandler_dev_tape::clear (void)
-{
- norewind = 0;
- lasterr = 0;
- fhandler_dev_raw::clear ();
-}
-
-int
-fhandler_dev_tape::is_eom (int win_error)
-{
- int ret = ((win_error == ERROR_END_OF_MEDIA)
- || (win_error == ERROR_EOM_OVERFLOW)
- || (win_error == ERROR_NO_DATA_DETECTED));
- if (ret)
- debug_printf ("end of medium");
- return ret;
-}
-
-int
-fhandler_dev_tape::is_eof (int win_error)
-{
- int ret = ((win_error == ERROR_FILEMARK_DETECTED)
- || (win_error == ERROR_SETMARK_DETECTED));
- if (ret)
- debug_printf ("end of file");
- return ret;
-}
-
-fhandler_dev_tape::fhandler_dev_tape (const char *name, int unit) : fhandler_dev_raw (FH_TAPE, name, unit)
-{
- set_cb (sizeof *this);
-}
-
-int
-fhandler_dev_tape::open (const char *path, int flags, mode_t)
-{
- int ret;
- int minor;
-
- if (get_device_number (path, minor) != FH_TAPE)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- norewind = (minor >= 128);
- devbufsiz = 1L;
-
- ret = fhandler_dev_raw::open (path, flags);
- if (ret)
- {
- struct mtget get;
- struct mtop op;
- struct mtpos pos;
-
- if (! ioctl (MTIOCGET, &get))
- /* Tape drive supports and is set to variable block size. */
- if (get.mt_dsreg == 0)
- devbufsiz = get.mt_maxblksize;
- else
- devbufsiz = get.mt_dsreg;
- varblkop = get.mt_dsreg == 0;
-
- if (devbufsiz > 1L)
- devbuf = new char [devbufsiz];
-
- /* The following rewind in position 0 solves a problem which appears
- * in case of multi volume archives: The last ReadFile on first medium
- * returns ERROR_NO_DATA_DETECTED. After media change, all subsequent
- * ReadFile calls return ERROR_NO_DATA_DETECTED, too.
- * The call to tape_set_pos seems to reset some internal flags. */
- if ((! ioctl (MTIOCPOS, &pos)) && (! pos.mt_blkno))
- {
- op.mt_op = MTREW;
- ioctl (MTIOCTOP, &op);
- }
-
- if (flags & O_APPEND)
- {
- /* In append mode, seek to beginning of next filemark */
- op.mt_op = MTFSFM;
- op.mt_count = 1;
- ioctl (MTIOCTOP, &op);
- }
- }
-
- return ret;
-}
-
-int
-fhandler_dev_tape::close (void)
-{
- struct mtop op;
- int ret = 0;
-
- if (is_writing)
- {
- ret = writebuf ();
- if ((has_written) && (! eom_detected))
- {
- /* if last operation was writing, write a filemark */
- debug_printf ("writing filemark\n");
- op.mt_op = MTWEOF;
- op.mt_count = 1;
- ioctl (MTIOCTOP, &op);
- }
- }
-
- // To protected reads on signaling (e.g. Ctrl-C)
- eof_detected = 1;
-
- if (! norewind)
- {
- debug_printf ("rewinding\n");
- op.mt_op = MTREW;
- ioctl (MTIOCTOP, &op);
- }
-
- if (ret)
- {
- fhandler_dev_raw::close ();
- return ret;
- }
-
- return fhandler_dev_raw::close ();
-}
-
-int
-fhandler_dev_tape::fstat (struct stat *buf)
-{
- int ret;
-
- if (! (ret = fhandler_dev_raw::fstat (buf)))
- {
- struct mtget get;
-
- if (! ioctl (MTIOCGET, &get))
- {
- buf->st_blocks = get.mt_capacity / buf->st_blksize;
- }
- }
-
- return ret;
-}
-
-off_t
-fhandler_dev_tape::lseek (off_t offset, int whence)
-{
- struct mtop op;
- struct mtpos pos;
-
- debug_printf ("lseek (%s, %d, %d)\n", get_name (), offset, whence);
-
- writebuf ();
- eom_detected = eof_detected = 0;
- lastblk_to_read = 0;
- devbufstart = devbufend = 0;
-
- if (ioctl (MTIOCPOS, &pos))
- {
- return (off_t) -1;
- }
-
- switch (whence)
- {
- case SEEK_END:
- op.mt_op = MTFSF;
- op.mt_count = 1;
- if (ioctl (MTIOCTOP, &op))
- return -1;
- break;
- case SEEK_SET:
- if (whence == SEEK_SET && offset < 0)
- {
- set_errno (EINVAL);
- return -1;
- }
- break;
- case SEEK_CUR:
- break;
- default:
- set_errno (EINVAL);
- return -1;
- }
-
- op.mt_op = MTFSR;
- op.mt_count = offset / devbufsiz
- - (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))
- return -1;
-
- return (pos.mt_blkno * devbufsiz);
-}
-
-int
-fhandler_dev_tape::dup (fhandler_base *child)
-{
- fhandler_dev_tape *fhc = (fhandler_dev_tape *) child;
-
- fhc->norewind = norewind;
- fhc->lasterr = lasterr;
- return fhandler_dev_raw::dup (child);
-}
-
-int
-fhandler_dev_tape::ioctl (unsigned int cmd, void *buf)
-{
- int ret = NO_ERROR;
- unsigned long block;
-
- if (cmd == MTIOCTOP)
- {
- struct mtop *op = (struct mtop *) buf;
-
- if (! op)
- ret = ERROR_INVALID_PARAMETER;
- else
- switch (op->mt_op)
- {
- case MTRESET:
- break;
- case MTFSF:
- ret = tape_set_pos (TAPE_SPACE_FILEMARKS, op->mt_count);
- break;
- case MTBSF:
- ret = tape_set_pos (TAPE_SPACE_FILEMARKS, -op->mt_count);
- break;
- case MTFSR:
- ret = tape_set_pos (TAPE_SPACE_RELATIVE_BLOCKS, op->mt_count);
- break;
- case MTBSR:
- ret = tape_set_pos (TAPE_SPACE_RELATIVE_BLOCKS, -op->mt_count);
- break;
- case MTWEOF:
- if (tape_get_feature (TAPE_DRIVE_WRITE_FILEMARKS))
- ret = tape_write_marks (TAPE_FILEMARKS, op->mt_count);
- else if (tape_get_feature (TAPE_DRIVE_WRITE_LONG_FMKS))
- ret = tape_write_marks (TAPE_LONG_FILEMARKS, op->mt_count);
- else
- ret = tape_write_marks (TAPE_SHORT_FILEMARKS, op->mt_count);
- break;
- case MTREW:
- ret = tape_set_pos (TAPE_REWIND, 0);
- break;
- case MTOFFL:
- ret = tape_prepare (TAPE_UNLOAD);
- break;
- case MTNOP:
- break;
- case MTRETEN:
- if (! tape_get_feature (TAPE_DRIVE_END_OF_DATA))
- ret = ERROR_INVALID_PARAMETER;
- else if (! (ret = tape_set_pos (TAPE_REWIND, 0, FALSE)))
- ret = tape_prepare (TAPE_TENSION);
- break;
- case MTBSFM:
- ret = tape_set_pos (TAPE_SPACE_FILEMARKS, -op->mt_count, TRUE);
- break;
- case MTFSFM:
- ret = tape_set_pos (TAPE_SPACE_FILEMARKS, op->mt_count, TRUE);
- break;
- case MTEOM:
- if (tape_get_feature (TAPE_DRIVE_END_OF_DATA))
- ret = tape_set_pos (TAPE_SPACE_END_OF_DATA, 0);
- else
- ret = tape_set_pos (TAPE_SPACE_FILEMARKS, 32767);
- break;
- case MTERASE:
- ret = tape_erase (TAPE_ERASE_SHORT);
- break;
- case MTRAS1:
- case MTRAS2:
- case MTRAS3:
- ret = ERROR_INVALID_PARAMETER;
- break;
- case MTSETBLK:
- {
- long min, max;
-
- if (! tape_get_feature (TAPE_DRIVE_SET_BLOCK_SIZE))
- {
- ret = ERROR_INVALID_PARAMETER;
- break;
- }
- ret = tape_get_blocksize (&min, NULL, &max, NULL);
- if (ret)
- break;
- if (devbuf && (size_t) op->mt_count == devbufsiz && !varblkop)
- {
- ret = 0;
- break;
- }
- if ((op->mt_count == 0
- && !tape_get_feature (TAPE_DRIVE_VARIABLE_BLOCK))
- || (op->mt_count > 0
- && (op->mt_count < min || op->mt_count > max)))
- {
- ret = ERROR_INVALID_PARAMETER;
- break;
- }
- if (devbuf && op->mt_count > 0
- && (size_t) op->mt_count < devbufend - devbufstart)
- {
- ret = ERROR_MORE_DATA;
- break;
- }
- if (! (ret = tape_set_blocksize (op->mt_count)))
- {
- size_t size = 0;
- if (op->mt_count == 0)
- {
- struct mtget get;
- if ((ret = tape_status (&get)) != NO_ERROR)
- break;
- size = get.mt_maxblksize;
- ret = NO_ERROR;
- }
- char *buf = NULL;
- if (size > 1L && !(buf = new char [size]))
- {
- ret = ERROR_OUTOFMEMORY;
- break;
- }
- if (devbufsiz > 1L && size > 1L)
- {
- memcpy(buf, devbuf + devbufstart,
- devbufend - devbufstart);
- devbufend -= devbufstart;
- }
- else
- devbufend = 0;
- if (devbufsiz > 1L)
- delete [] devbuf;
- devbufstart = 0;
- devbuf = buf;
- devbufsiz = size;
- varblkop = op->mt_count == 0;
- }
- }
- break;
- case MTSETDENSITY:
- ret = ERROR_INVALID_PARAMETER;
- break;
- case MTSEEK:
- if (tape_get_feature (TAPE_DRIVE_ABSOLUTE_BLK))
- {
- ret = tape_set_pos (TAPE_ABSOLUTE_BLOCK, op->mt_count);
- break;
- }
- if (! (ret = tape_get_pos (&block)))
- {
- ret = tape_set_pos (TAPE_SPACE_RELATIVE_BLOCKS,
- op->mt_count - block);
- }
- break;
- case MTTELL:
- if (! (ret = tape_get_pos (&block)))
- op->mt_count = block;
- break;
- case MTSETDRVBUFFER:
- ret = ERROR_INVALID_PARAMETER;
- break;
- case MTFSS:
- ret = tape_set_pos (TAPE_SPACE_SETMARKS, op->mt_count);
- break;
- case MTBSS:
- ret = tape_set_pos (TAPE_SPACE_SETMARKS, -op->mt_count);
- break;
- case MTWSM:
- ret = tape_write_marks (TAPE_SETMARKS, op->mt_count);
- break;
- case MTLOCK:
- ret = tape_prepare (TAPE_LOCK);
- break;
- case MTUNLOCK:
- ret = tape_prepare (TAPE_UNLOCK);
- break;
- case MTLOAD:
- ret = tape_prepare (TAPE_LOAD);
- break;
- case MTUNLOAD:
- ret = tape_prepare (TAPE_UNLOAD);
- break;
- case MTCOMPRESSION:
- ret = tape_compression (op->mt_count);
- break;
- case MTSETPART:
- case MTMKPART:
- default:
- ret = ERROR_INVALID_PARAMETER;
- break;
- }
- }
- else if (cmd == MTIOCGET)
- ret = tape_status ((struct mtget *) buf);
- else if (cmd == MTIOCPOS)
- {
- ret = ERROR_INVALID_PARAMETER;
- if (buf && (ret = tape_get_pos (&block)))
- ((struct mtpos *) buf)->mt_blkno = block;
- }
- else
- return fhandler_dev_raw::ioctl (cmd, buf);
-
- if (ret != NO_ERROR)
- {
- SetLastError (ret);
- __seterrno ();
- return -1;
- }
-
- return 0;
-}
-
-/* ------------------------------------------------------------------ */
-/* Private functions used by `ioctl' */
-/* ------------------------------------------------------------------ */
-
-static int
-tape_error (DWORD lasterr, const char *txt)
-{
- if (lasterr)
- debug_printf ("%s: error: %d\n", txt, lasterr);
-
- return lasterr;
-}
-
-int
-fhandler_dev_tape::tape_write_marks (int marktype, DWORD len)
-{
- syscall_printf ("write_tapemark\n");
- while (((lasterr = WriteTapemark (get_handle (),
- marktype,
- len,
- FALSE)) == ERROR_MEDIA_CHANGED)
- || (lasterr == ERROR_BUS_RESET))
- ;
-
- return tape_error (lasterr, "tape_write_marks");
-}
-
-int
-fhandler_dev_tape::tape_get_pos (unsigned long *ret)
-{
- DWORD part, low, high;
-
- while (((lasterr = GetTapePosition (get_handle (),
- TAPE_ABSOLUTE_POSITION,
- &part,
- &low,
- &high)) == ERROR_MEDIA_CHANGED)
- || (lasterr == ERROR_BUS_RESET))
- ;
- if (! tape_error (lasterr, "tape_get_pos") && ret)
- *ret = low;
-
- return lasterr;
-}
-
-static int _tape_set_pos (HANDLE hTape, int mode, long count)
-{
- int err;
-
- while (((err = SetTapePosition (hTape,
- mode,
- 1,
- count,
- count < 0 ? -1 : 0,
- FALSE)) == ERROR_MEDIA_CHANGED)
- || (err == ERROR_BUS_RESET))
- ;
-
- return err;
-}
-
-int
-fhandler_dev_tape::tape_set_pos (int mode, long count, BOOLEAN sfm_func)
-{
- unsigned long pos, tgtpos;
-
- switch (mode)
- {
- case TAPE_SPACE_RELATIVE_BLOCKS:
- lasterr = tape_get_pos (&pos);
-
- if (lasterr)
- return lasterr;
-
- tgtpos = pos + count;
-
- while (((lasterr = _tape_set_pos (get_handle (),
- mode,
- count)) == ERROR_FILEMARK_DETECTED)
- || (lasterr == ERROR_SETMARK_DETECTED))
- {
- lasterr = tape_get_pos (&pos);
- if (lasterr)
- return lasterr;
- count = tgtpos - pos;
- }
-
- if (lasterr == ERROR_BEGINNING_OF_MEDIA && ! tgtpos)
- lasterr = NO_ERROR;
-
- break;
- case TAPE_SPACE_FILEMARKS:
- if (count < 0)
- {
- if (pos > 0)
- {
- if ((! _tape_set_pos (get_handle (),
- TAPE_SPACE_RELATIVE_BLOCKS,
- -1))
- || (sfm_func))
- ++count;
- _tape_set_pos (get_handle (), TAPE_SPACE_RELATIVE_BLOCKS, 1);
- }
-
- while (! (lasterr = _tape_set_pos (get_handle (), mode, -1))
- && count++ < 0)
- ;
-
- if (lasterr == ERROR_BEGINNING_OF_MEDIA)
- {
- if (! count)
- lasterr = NO_ERROR;
- }
- else if (! sfm_func)
- lasterr = _tape_set_pos (get_handle (), mode, 1);
- }
- else
- {
- if (sfm_func)
- {
- if (_tape_set_pos (get_handle (),
- TAPE_SPACE_RELATIVE_BLOCKS,
- 1) == ERROR_FILEMARK_DETECTED)
- ++count;
- _tape_set_pos (get_handle (), TAPE_SPACE_RELATIVE_BLOCKS, -1);
- }
-
- if (! (lasterr = _tape_set_pos (get_handle (), mode, count))
- && sfm_func)
- lasterr = _tape_set_pos (get_handle (), mode, -1);
- }
- break;
- case TAPE_SPACE_SETMARKS:
- case TAPE_ABSOLUTE_BLOCK:
- case TAPE_SPACE_END_OF_DATA:
- case TAPE_REWIND:
- lasterr = _tape_set_pos (get_handle (), mode, count);
- break;
- }
-
- return tape_error (lasterr, "tape_set_pos");
-}
-
-int
-fhandler_dev_tape::tape_erase (int mode)
-{
- DWORD varlen;
- TAPE_GET_DRIVE_PARAMETERS dp;
-
- while (((lasterr = GetTapeParameters (get_handle (),
- GET_TAPE_DRIVE_INFORMATION,
- (varlen = sizeof dp, &varlen),
- &dp)) == ERROR_MEDIA_CHANGED)
- || (lasterr == ERROR_BUS_RESET))
- ;
-
- switch (mode)
- {
- case TAPE_ERASE_SHORT:
- if (! lasterr && ! (dp.FeaturesLow & TAPE_DRIVE_ERASE_SHORT))
- mode = TAPE_ERASE_LONG;
- break;
- case TAPE_ERASE_LONG:
- if (! lasterr && ! (dp.FeaturesLow & TAPE_DRIVE_ERASE_LONG))
- mode = TAPE_ERASE_SHORT;
- break;
- }
-
- return tape_error (EraseTape (get_handle (), mode, FALSE), "tape_erase");
-}
-
-int
-fhandler_dev_tape::tape_prepare (int action)
-{
- while (((lasterr = PrepareTape (get_handle (),
- action,
- FALSE)) == ERROR_MEDIA_CHANGED)
- || (lasterr == ERROR_BUS_RESET))
- ;
- return tape_error (lasterr, "tape_prepare");
-}
-
-BOOLEAN
-fhandler_dev_tape::tape_get_feature (DWORD parm)
-{
- DWORD varlen;
- TAPE_GET_DRIVE_PARAMETERS dp;
-
- while (((lasterr = GetTapeParameters (get_handle (),
- GET_TAPE_DRIVE_INFORMATION,
- (varlen = sizeof dp, &varlen),
- &dp)) == ERROR_MEDIA_CHANGED)
- || (lasterr == ERROR_BUS_RESET))
- ;
-
- if (lasterr)
- return FALSE;
-
- return ((parm & TAPE_DRIVE_HIGH_FEATURES)
- ? ((dp.FeaturesHigh & parm) != 0)
- : ((dp.FeaturesLow & parm) != 0));
-}
-
-int
-fhandler_dev_tape::tape_get_blocksize (long *min, long *def, long *max, long *cur)
-{
- DWORD varlen;
- TAPE_GET_DRIVE_PARAMETERS dp;
- TAPE_GET_MEDIA_PARAMETERS mp;
-
- while (((lasterr = GetTapeParameters (get_handle (),
- GET_TAPE_DRIVE_INFORMATION,
- (varlen = sizeof dp, &varlen),
- &dp)) == ERROR_MEDIA_CHANGED)
- || (lasterr == ERROR_BUS_RESET))
- ;
-
- if (lasterr)
- return tape_error (lasterr, "tape_get_blocksize");
-
- while (((lasterr = GetTapeParameters (get_handle (),
- GET_TAPE_MEDIA_INFORMATION,
- (varlen = sizeof mp, &varlen),
- &mp)) == ERROR_MEDIA_CHANGED)
- || (lasterr == ERROR_BUS_RESET))
- ;
-
- if (lasterr)
- return tape_error (lasterr, "tape_get_blocksize");
-
- if (min)
- *min = (long) dp.MinimumBlockSize;
- if (def)
- *def = (long) dp.DefaultBlockSize;
- if (max)
- *max = (long) dp.MaximumBlockSize;
- if (cur)
- *cur = (long) mp.BlockSize;
-
- return tape_error (lasterr, "tape_get_blocksize");
-}
-
-int
-fhandler_dev_tape::tape_set_blocksize (long count)
-{
- long min, max;
- TAPE_SET_MEDIA_PARAMETERS mp;
-
- lasterr = tape_get_blocksize (&min, NULL, &max, NULL);
-
- if (lasterr)
- return lasterr;
-
- if (count < min || count > max)
- return tape_error (ERROR_INVALID_PARAMETER, "tape_set_blocksize");
-
- mp.BlockSize = count;
-
- return tape_error (SetTapeParameters (get_handle (),
- SET_TAPE_MEDIA_INFORMATION,
- &mp),
- "tape_set_blocksize");
-}
-
-static long long
-get_ll (PLARGE_INTEGER i)
-{
- long long l = 0;
-
- l = i->HighPart;
- l <<= 32;
- l |= i->LowPart;
- return l;
-}
-
-int
-fhandler_dev_tape::tape_status (struct mtget *get)
-{
- DWORD varlen;
- TAPE_GET_DRIVE_PARAMETERS dp;
- TAPE_GET_MEDIA_PARAMETERS mp;
- int notape = 0;
-
- if (! get)
- return ERROR_INVALID_PARAMETER;
-
- while (((lasterr = GetTapeParameters (get_handle (),
- GET_TAPE_DRIVE_INFORMATION,
- (varlen = sizeof dp, &varlen),
- &dp)) == ERROR_MEDIA_CHANGED)
- || (lasterr == ERROR_BUS_RESET))
- ;
-
- if ((lasterr) || (lasterr = GetTapeParameters (get_handle (),
- GET_TAPE_MEDIA_INFORMATION,
- (varlen = sizeof mp, &varlen),
- &mp)))
- notape = 1;
-
- memset (get, 0, sizeof *get);
-
- get->mt_type = MT_ISUNKNOWN;
-
- if (! notape && (dp.FeaturesLow & TAPE_DRIVE_TAPE_REMAINING))
- {
- get->mt_remaining = get_ll (&mp.Remaining);
- get->mt_resid = get->mt_remaining >> 10;
- }
-
- if ((dp.FeaturesHigh & TAPE_DRIVE_SET_BLOCK_SIZE) && ! notape)
- get->mt_dsreg = mp.BlockSize;
- else
- get->mt_dsreg = dp.DefaultBlockSize;
-
- if (notape)
- get->mt_gstat |= GMT_DR_OPEN (-1);
-
- if (! notape)
- {
- if (dp.FeaturesLow & TAPE_DRIVE_GET_ABSOLUTE_BLK)
- tape_get_pos ((unsigned long *) &get->mt_blkno);
-
- if (! get->mt_blkno)
- get->mt_gstat |= GMT_BOT (-1);
-
- get->mt_gstat |= GMT_ONLINE (-1);
-
- if ((dp.FeaturesLow & TAPE_DRIVE_WRITE_PROTECT) && mp.WriteProtected)
- get->mt_gstat |= GMT_WR_PROT (-1);
-
- if (dp.FeaturesLow & TAPE_DRIVE_TAPE_CAPACITY)
- get->mt_capacity = get_ll (&mp.Capacity);
- }
-
- if ((dp.FeaturesLow & TAPE_DRIVE_COMPRESSION) && dp.Compression)
- get->mt_gstat |= GMT_HW_COMP (-1);
-
- if ((dp.FeaturesLow & TAPE_DRIVE_ECC) && dp.ECC)
- get->mt_gstat |= GMT_HW_ECC (-1);
-
- if ((dp.FeaturesLow & TAPE_DRIVE_PADDING) && dp.DataPadding)
- get->mt_gstat |= GMT_PADDING (-1);
-
- if ((dp.FeaturesLow & TAPE_DRIVE_REPORT_SMKS) && dp.ReportSetmarks)
- get->mt_gstat |= GMT_IM_REP_EN (-1);
-
- get->mt_erreg = lasterr;
-
- 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;
-
- return 0;
-}
-
-int
-fhandler_dev_tape::tape_compression (long count)
-{
- DWORD varlen;
- TAPE_GET_DRIVE_PARAMETERS dpg;
- TAPE_SET_DRIVE_PARAMETERS dps;
-
- while (((lasterr = GetTapeParameters (get_handle (),
- GET_TAPE_DRIVE_INFORMATION,
- (varlen = sizeof dpg, &varlen),
- &dpg)) == ERROR_MEDIA_CHANGED)
- || (lasterr == ERROR_BUS_RESET))
- ;
-
- if (lasterr)
- return tape_error (lasterr, "tape_compression");
-
- if (! (dpg.FeaturesLow & TAPE_DRIVE_COMPRESSION))
- return ERROR_INVALID_PARAMETER;
-
- if (count)
- {
- dps.ECC = dpg.ECC;
- dps.Compression = count ? TRUE : FALSE;
- dps.DataPadding = dpg.DataPadding;
- dps.ReportSetmarks = dpg.ReportSetmarks;
- dps.EOTWarningZoneSize = dpg.EOTWarningZoneSize;
- lasterr = SetTapeParameters (get_handle (),
- SET_TAPE_DRIVE_INFORMATION,
- &dps);
-
- if (lasterr)
- return tape_error (lasterr, "tape_compression");
-
- dpg.Compression = dps.Compression;
- }
-
- return 0;
-}
-
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc
deleted file mode 100644
index 014e7d104..000000000
--- a/winsup/cygwin/fhandler_termios.cc
+++ /dev/null
@@ -1,300 +0,0 @@
-/* fhandler_termios.cc
-
- Copyright 1996, 1997, 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <ctype.h>
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "tty.h"
-
-/* Common functions shared by tty/console */
-
-void
-fhandler_termios::tcinit (tty_min *this_tc, int force)
-{
- /* Initial termios values */
-
- tc = this_tc;
-
- if (force || !TTYISSETF (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;
- TTYSETF (INITIALIZED);
- }
-}
-
-int
-fhandler_termios::tcsetpgrp (const pid_t pgid)
-{
- termios_printf ("pgid %d, sid %d, tsid %d", pgid,
- myself->sid, tc->getsid ());
- if (myself->sid != tc->getsid ())
- {
- set_errno (EPERM);
- return -1;
- }
- tc->setpgid (pgid);
- return 0;
-}
-
-int
-fhandler_termios::tcgetpgrp ()
-{
- return tc->pgid;
-}
-
-void
-fhandler_termios::set_ctty (int ttynum, int flags)
-{
- if ((myself->ctty < 0 || myself->ctty == ttynum) && !(flags & O_NOCTTY))
- {
- myself->ctty = ttynum;
- syscall_printf ("attached tty%d sid %d, pid %d, tty->pgid %d, tty->sid %d",
- ttynum, myself->sid, myself->pid, tc->pgid, tc->getsid ());
-
- pinfo p (tc->getsid ());
- if (myself->sid == myself->pid &&
- (p == myself || !proc_exists (p)))
- {
- paranoid_printf ("resetting tty%d sid. Was %d, now %d. pgid was %d, now %d.",
- ttynum, tc->getsid(), myself->sid, tc->getpgid (), myself->pgid);
- /* We are the session leader */
- tc->setsid (myself->sid);
- tc->setpgid (myself->pgid);
- }
- else
- myself->sid = tc->getsid ();
- if (tc->getpgid () == 0)
- tc->setpgid (myself->pgid);
- }
-}
-
-int
-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 1;
-
- if (sig < 0)
- sig = -sig;
-
- termios_printf("bg I/O pgid %d, tpgid %d, ctty %d",
- myself->pgid, tc->getpgid (), myself->ctty);
-
- 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 0;
- }
-
- /* 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 *) myself->getsig(sig).sa_handler == (void *) SIG_IGN) ||
- (myself->getsigmask () & SIGTOMASK (sig));
-
- if (pgid_gone)
- goto setEIO;
- else if (!sigs_ignored)
- /* nothing */;
- else if (sig == SIGTTOU)
- return 1; /* Just allow the output */
- else
- goto setEIO; /* This is an output error */
-
- _raise (sig);
- return 1;
-
-setEIO:
- set_errno (EIO);
- return -1;
-}
-
-#define set_input_done(x) input_done = input_done || (x)
-
-int
-fhandler_termios::line_edit (const char *rptr, int nread, int always_accept)
-{
- char c;
- int input_done = 0;
- int iscanon = tc->ti.c_lflag & ICANON;
-
- while (nread-- > 0)
- {
- c = *rptr++;
-
- termios_printf ("char %c", c);
-
- /* Check for special chars */
-
- if (c == '\r')
- {
- if (tc->ti.c_iflag & IGNCR)
- continue;
- if (tc->ti.c_iflag & ICRNL)
- {
- c = '\n';
- set_input_done (iscanon);
- }
- }
- else if (c == '\n')
- {
- if (tc->ti.c_iflag & INLCR)
- c = '\r';
- else
- set_input_done (iscanon);
- }
-
- if (tc->ti.c_iflag & ISTRIP)
- c &= 0x7f;
- if (tc->ti.c_lflag & ISIG)
- {
- int sig;
- if (c == tc->ti.c_cc[VINTR])
- sig = SIGINT;
- else if (c == tc->ti.c_cc[VQUIT])
- sig = SIGQUIT;
- else if (c == tc->ti.c_cc[VSUSP])
- sig = SIGTSTP;
- else
- goto not_a_sig;
-
- termios_printf ("got interrupt %d, sending signal %d", c, sig);
- kill_pgrp (tc->getpgid (), sig);
- tc->ti.c_lflag &= ~FLUSHO;
- goto restart_output;
- }
- not_a_sig:
- if (tc->ti.c_iflag & IXON)
- {
- if (c == tc->ti.c_cc[VSTOP])
- {
- if (!tc->OutputStopped)
- {
- tc->OutputStopped = 1;
- acquire_output_mutex (INFINITE);
- }
- continue;
- }
- else if (c == tc->ti.c_cc[VSTART])
- {
- restart_output:
- tc->OutputStopped = 0;
- release_output_mutex ();
- continue;
- }
- else if ((tc->ti.c_iflag & IXANY) && tc->OutputStopped)
- goto restart_output;
- }
- if (tc->ti.c_lflag & IEXTEN && c == tc->ti.c_cc[VDISCARD])
- {
- tc->ti.c_lflag ^= FLUSHO;
- continue;
- }
- if (!iscanon)
- /* nothing */;
- else if (c == tc->ti.c_cc[VERASE])
- {
- if (eat_readahead (1))
- doecho ("\b \b", 3);
- continue;
- }
- else if (c == tc->ti.c_cc[VWERASE])
- {
- int ch;
- do
- if (!eat_readahead (1))
- break;
- else
- doecho ("\b \b", 3);
- while ((ch = peek_readahead (1)) >= 0 && !isspace (ch));
- continue;
- }
- else if (c == tc->ti.c_cc[VKILL])
- {
- int nchars = eat_readahead (-1);
- while (nchars--)
- doecho ("\b \b", 3);
- continue;
- }
- else if (c == tc->ti.c_cc[VREPRINT])
- {
- doecho ("\n\r", 2);
- doecho (rabuf, ralen);
- continue;
- }
- else if (c == tc->ti.c_cc[VEOF])
- {
- termios_printf ("EOF");
- input_done = 1;
- continue;
- }
- else if (c == tc->ti.c_cc[VEOL] ||
- c == tc->ti.c_cc[VEOL2] ||
- c == '\n')
- {
- set_input_done (1);
- termios_printf ("EOL");
- }
-
- if (tc->ti.c_iflag & IUCLC && isupper (c))
- c = cyg_tolower (c);
-
- if (tc->ti.c_lflag & ECHO)
- doecho (&c, 1);
- put_readahead (c);
- }
-
- if (!iscanon || always_accept)
- set_input_done (ralen > 0);
-
- if (input_done)
- (void) accept_input ();
-
- return input_done;
-}
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
deleted file mode 100644
index 01a5a9691..000000000
--- a/winsup/cygwin/fhandler_tty.cc
+++ /dev/null
@@ -1,1074 +0,0 @@
-/* fhandler_tty.cc
-
- Copyright 1997, 1998, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <ctype.h>
-#include <limits.h>
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "cygheap.h"
-#include "shared_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 (const char *name, int unit) :
- fhandler_pty_master (name, FH_TTYM, unit)
-{
- set_cb (sizeof *this);
- console = NULL;
- hThread = NULL;
-}
-
-int
-fhandler_tty_master::init (int ntty)
-{
- HANDLE h;
- termios_printf ("Creating master for tty%d", ntty);
-
- if (init_console ())
- {
- termios_printf ("can't create fhandler");
- return -1;
- }
-
- termios ti;
- memset (&ti, 0, sizeof (ti));
- console->tcsetattr (0, &ti);
-
- ttynum = ntty;
-
- cygwin_shared->tty[ttynum]->common_init (this);
-
- h = makethread (process_input, NULL, 0, "ttyin");
- if (h == NULL)
- {
- termios_printf ("can't create input thread");
- return -1;
- }
- else
- {
- SetThreadPriority (h, THREAD_PRIORITY_HIGHEST);
- CloseHandle (h);
- }
-
- h = makethread (process_ioctl, NULL, 0, "ttyioctl");
- if (h == NULL)
- {
- termios_printf ("can't create ioctl thread");
- return -1;
- }
- else
- {
- SetThreadPriority (h, THREAD_PRIORITY_HIGHEST);
- CloseHandle (h);
- }
-
- hThread = makethread (process_output, NULL, 0, "ttyout");
- if (hThread != NULL)
- SetThreadPriority (hThread, THREAD_PRIORITY_HIGHEST);
- else
- {
- termios_printf ("can't create output thread");
- return -1;
- }
-
- return 0;
-}
-
-#ifdef DEBUGGING
-static class mutex_stack
-{
-public:
- const char *fn;
- int ln;
- const char *tname;
-} ostack[100];
-
-static int osi = 0;
-#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 = threadname (0, 0);
- 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
- }
-}
-
-/* Process tty input. */
-
-void
-fhandler_pty_master::doecho (const void *str, DWORD len)
-{
- acquire_output_mutex (INFINITE);
- if (!WriteFile (get_ttyp ()->to_master, str, len, &len, NULL))
- termios_printf ("Write to %p failed, %E", get_ttyp ()->to_master);
-// WaitForSingleObject (output_done_event, INFINITE);
- release_output_mutex ();
-}
-
-int
-fhandler_pty_master::accept_input ()
-{
- DWORD written;
- DWORD n;
- const char dummy[1] = {'X'};
- const char *buf;
-
- n = get_ttyp ()->read_retval = eat_readahead (-1);
-
- if (n != 0)
- buf = rabuf;
- else
- {
- n = 1;
- buf = dummy;
- termios_printf ("sending EOF to slave");
- }
- termios_printf ("about to write %d chars to slave", n);
- if (!WriteFile (get_output_handle (), buf, n, &written, NULL))
- return -1;
- return get_ttyp ()->read_retval;
-}
-
-static DWORD WINAPI
-process_input (void *)
-{
- char rawbuf[INP_BUFFER_SIZE];
-
- while (1)
- {
- int nraw = tty_master->console->read ((void *) rawbuf,
- (size_t) INP_BUFFER_SIZE);
- tty_master->line_edit (rawbuf, nraw);
- }
-}
-
-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
- OutputStopped at the time that we read the character, so we
- don't check again here. */
- 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;
- if (n == 0 && (get_flags () & (O_NONBLOCK | O_NDELAY)) != 0)
- {
- 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)
- 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)
- {
- termios_printf ("ReadFile %E");
- ExitThread (0);
- }
- if (n == 0)
- {
- /* End of file. */
- 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_master->get_ttyp ()->ioctl_retval =
- tty_master->console->ioctl (tty_master->get_ttyp ()->cmd,
- (void *) &tty_master->get_ttyp ()->arg);
- SetEvent (tty_master->ioctl_done_event);
- }
-}
-
-/**********************************************************************/
-/* Tty slave stuff */
-
-fhandler_tty_slave::fhandler_tty_slave(int num, const char *name) :
- fhandler_tty_common (FH_TTYS, name, num)
-{
- set_cb (sizeof *this);
- ttynum = num;
- /* FIXME: This is wasteful. We should rewrite the set_name path to eliminate the
- need for double allocates. */
- unix_path_name_ = (char *) crealloc (unix_path_name_, strlen(win32_path_name_) + 1);
- strcpy (unix_path_name_, win32_path_name_);
- unix_path_name_[0] = unix_path_name_[4] = '/';
- debug_printf ("unix '%s', win32 '%s'", unix_path_name_, win32_path_name_);
- inuse = NULL;
-}
-
-fhandler_tty_slave::fhandler_tty_slave(const char *name) :
- fhandler_tty_common (FH_TTYS, name, 0)
-{
- set_cb (sizeof *this);
- inuse = NULL;
-}
-
-int
-fhandler_tty_slave::open (const char *, int flags, mode_t)
-{
- tcinit (cygwin_shared->tty[ttynum]);
-
- attach_tty (ttynum);
- set_ctty (ttynum, flags);
-
- set_flags (flags);
- /* Create synchronisation events */
- char buf[40];
-
- /* 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. */
- __small_sprintf (buf, OUTPUT_DONE_EVENT, ttynum);
- output_done_event = OpenEvent (EVENT_ALL_ACCESS, TRUE, buf);
-
- if (!(output_mutex = get_ttyp()->open_output_mutex (TRUE)))
- {
- termios_printf ("open output mutex failed, %E");
- __seterrno ();
- return 0;
- }
-
- /* The ioctl events may or may not exist. See output_done_event,
- above. */
- __small_sprintf (buf, IOCTL_REQUEST_EVENT, ttynum);
- ioctl_request_event = OpenEvent (EVENT_ALL_ACCESS, TRUE, buf);
- __small_sprintf (buf, IOCTL_DONE_EVENT, ttynum);
- 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 ();
- }
-
- /* Duplicate tty handles. */
-
- if (!get_ttyp ()->from_slave || !get_ttyp ()->to_slave)
- {
- termios_printf ("tty handles have been closed");
- set_errno (EACCES);
- return 0;
- }
-
- HANDLE tty_owner = OpenProcess (PROCESS_DUP_HANDLE, FALSE,
- get_ttyp ()->master_pid);
- if (tty_owner == NULL)
- {
- termios_printf ("can't open tty(%d) handle process %d",
- ttynum, get_ttyp ()->master_pid);
- __seterrno ();
- return 0;
- }
-
- HANDLE nh;
- if (!DuplicateHandle (tty_owner, get_ttyp ()->from_master, hMainProc, &nh, 0, TRUE,
- DUPLICATE_SAME_ACCESS))
- {
- termios_printf ("can't duplicate input, %E");
- __seterrno ();
- return 0;
- }
- set_io_handle (nh);
- ProtectHandle1 (nh, from_pty);
- termios_printf ("duplicated from_master %p->%p from tty_owner %p",
- get_ttyp ()->from_master, nh, tty_owner);
- if (!DuplicateHandle (tty_owner, get_ttyp ()->to_master, hMainProc, &nh, 0, TRUE,
- DUPLICATE_SAME_ACCESS))
- {
- termios_printf ("can't duplicate output, %E");
- __seterrno ();
- return 0;
- }
- set_output_handle (nh);
- ProtectHandle1 (nh, to_pty);
- CloseHandle (tty_owner);
-
- termios_printf("tty%d opened", ttynum);
-
- return 1;
-}
-
-void
-fhandler_tty_slave::init (HANDLE, DWORD a, mode_t)
-{
- int mode = 0;
-
- a &= GENERIC_READ | GENERIC_WRITE;
- if (a == GENERIC_READ)
- mode = O_RDONLY;
- if (a == GENERIC_WRITE)
- mode = O_WRONLY;
- if (a == (GENERIC_READ | GENERIC_WRITE))
- mode = O_RDWR;
-
- open (0, mode);
-}
-
-int
-fhandler_tty_slave::write (const void *ptr, size_t len)
-{
- DWORD n, towrite = len;
-
- termios_printf("tty%d, write(%x, %d)", ttynum, 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;
-}
-
-int
-fhandler_tty_slave::read (void *ptr, size_t len)
-{
- DWORD n;
- int totalread = 0;
- int vmin = INT_MAX;
- int vtime = 0; /* Initialized to prevent -Wuninitialized warning */
- char buf[INP_BUFFER_SIZE];
-
- termios_printf("read(%x, %d) handle %d", ptr, len, get_handle ());
-
- if (!(get_ttyp ()->ti.c_lflag & ICANON))
- {
- vmin = get_ttyp ()->ti.c_cc[VMIN];
- vtime = get_ttyp ()->ti.c_cc[VTIME];
- }
-
- while (len)
- {
- size_t readlen = min ((unsigned) vmin, min (len, sizeof (buf)));
- termios_printf ("reading %d bytes (vtime %d)",
- min ((unsigned) vmin, min (len, sizeof (buf))), vtime);
-
- n = get_readahead_into_buffer (buf, readlen);
-
- if (!n && ReadFile (get_handle (), buf, readlen, &n, NULL) == FALSE)
- {
- termios_printf ("read failed, %E");
- _raise (SIGHUP);
- }
-
- 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;
- }
- len -= n;
- totalread += n;
- memcpy (ptr, buf, n);
- ptr = (char *) ptr + n;
- if (get_ttyp ()->ti.c_lflag & ICANON)
- break;
- else if (totalread >= vmin)
- break;
-
- if (!PeekNamedPipe (get_handle (), NULL, 0, NULL, &n, NULL))
- {
- termios_printf("PeekNamedPipe failed, %E");
- break;
- }
- if (n == 0)
- {
- if (get_flags () & (O_NONBLOCK | O_NDELAY))
- break;
-
- /* We can't enter the blocking Readfile as signals will be lost.
- * So, poll the pipe for data.
- * FIXME: try to avoid polling...
- * FIXME: Current EINTR scheme does not take vmin/vtime into account.
- */
- if (!(get_ttyp ()->ti.c_lflag & ICANON))
- {
- termios_printf("vmin %d vtime %d", vmin, vtime);
- if (vmin == 0 && vtime == 0)
- return 0; // min = 0, time = 0
- if (vtime == 0)
- continue; // min > 0, time = 0
- while (vtime--)
- {
- PeekNamedPipe (get_handle (), NULL, 0, NULL, &n, NULL);
- if (n)
- break;
- Sleep(10);
- }
- if (vtime == 0)
- return totalread;
- }
- }
- }
- termios_printf ("%d=read(%x, %d)", totalread, ptr, len);
- return totalread;
-}
-
-int
-fhandler_tty_common::dup (fhandler_base *child)
-{
- fhandler_tty_slave *fts = (fhandler_tty_slave *) child;
- int errind;
-
- fts->ttynum = ttynum;
- fts->tcinit (get_ttyp ());
-
- attach_tty (ttynum);
-
- HANDLE nh;
-
- if (output_done_event == NULL)
- fts->output_done_event = NULL;
- else if (!DuplicateHandle (hMainProc, output_done_event, hMainProc,
- &fts->output_done_event, 0, 1,
- DUPLICATE_SAME_ACCESS))
- {
- errind = 1;
- goto err;
- }
- if (ioctl_request_event == NULL)
- fts->ioctl_request_event = NULL;
- else if (!DuplicateHandle (hMainProc, ioctl_request_event, hMainProc,
- &fts->ioctl_request_event, 0, 1,
- DUPLICATE_SAME_ACCESS))
- {
- errind = 2;
- goto err;
- }
- if (ioctl_done_event == NULL)
- fts->ioctl_done_event = NULL;
- else if (!DuplicateHandle (hMainProc, ioctl_done_event, hMainProc,
- &fts->ioctl_done_event, 0, 1,
- DUPLICATE_SAME_ACCESS))
- {
- errind = 3;
- goto err;
- }
- if (!DuplicateHandle (hMainProc, output_mutex, hMainProc,
- &fts->output_mutex, 0, 1,
- DUPLICATE_SAME_ACCESS))
- {
- errind = 4;
- goto err;
- }
- if (!DuplicateHandle (hMainProc, get_handle (), hMainProc,
- &nh, 0, 1,
- DUPLICATE_SAME_ACCESS))
- {
- errind = 5;
- goto err;
- }
- fts->set_io_handle (nh);
-
- if (!DuplicateHandle (hMainProc, get_output_handle (), hMainProc,
- &nh, 0, 1,
- DUPLICATE_SAME_ACCESS))
- {
- errind = 6;
- goto err;
- }
- fts->set_output_handle (nh);
-
- if (inuse == NULL)
- fts->inuse = NULL;
- else if (!DuplicateHandle (hMainProc, inuse, hMainProc,
- &fts->inuse, 0, 1,
- DUPLICATE_SAME_ACCESS))
- {
- errind = 7;
- goto err;
- }
- return 0;
-
-err:
- __seterrno ();
- termios_printf ("dup %d failed in DuplicateHandle, %E", errind);
- return -1;
-}
-
-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)
-{
- return 0;
-}
-
-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 == ttynum && (get_ttyp ()->ti.c_lflag & TOSTOP))
- {
- /* background process */
- termios_printf("bg ioctl pgid %d, tpgid %d, ctty %d",
- myself->pgid, get_ttyp ()->getpgid (), myself->ctty);
- _raise (SIGTTOU);
- }
-
- switch (cmd)
- {
- case TIOCGWINSZ:
- case TIOCSWINSZ:
- break;
- case FIONBIO:
- if (* (int *) arg)
- set_flags (get_flags () | O_NONBLOCK);
- else
- set_flags (get_flags () & ~O_NONBLOCK);
- goto out;
- default:
- set_errno (EINVAL);
- return -1;
- }
-
- acquire_output_mutex (INFINITE);
-
- get_ttyp ()->cmd = cmd;
- get_ttyp ()->ioctl_retval = 0;
- 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:
- get_ttyp ()->ioctl_retval = -1;
- get_ttyp ()->arg.winsize = * (struct winsize *) arg;
- if (ioctl_request_event)
- SetEvent (ioctl_request_event);
- if (ioctl_done_event)
- WaitForSingleObject (ioctl_done_event, INFINITE);
- break;
- }
-
- release_output_mutex ();
-
-out:
- termios_printf ("%d = ioctl (%x)", get_ttyp ()->ioctl_retval, cmd);
- return get_ttyp ()->ioctl_retval;
-}
-
-/*******************************************************
- fhandler_pty_master
-*/
-fhandler_pty_master::fhandler_pty_master (const char *name, DWORD devtype, int unit) :
- fhandler_tty_common (devtype, name, unit)
-{
- set_cb (sizeof *this);
- ioctl_request_event = NULL;
- ioctl_done_event = NULL;
- pktmode = need_nl = 0;
- inuse = NULL;
-}
-
-int
-fhandler_pty_master::open (const char *, int flags, mode_t)
-{
- ttynum = cygwin_shared->tty.allocate_tty (0);
- if (ttynum < 0)
- return 0;
-
- cygwin_shared->tty[ttynum]->common_init (this);
- inuse = get_ttyp ()->create_inuse (TTY_MASTER_ALIVE);
- set_flags (flags);
-
- termios_printf ("opened pty master tty%d<%p>", ttynum, this);
- return 1;
-}
-
-int
-fhandler_tty_common::close ()
-{
- 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 (inuse && !CloseHandle (inuse))
- termios_printf ("CloseHandle (inuse), %E");
- 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 ());
-
- inuse = NULL;
- termios_printf ("tty%d closed", ttynum);
- return 0;
-}
-
-int
-fhandler_pty_master::close ()
-{
-#if 0
- while (accept_input () > 0)
- continue;
-#endif
- this->fhandler_tty_common::close ();
-
- if (!get_ttyp ()->master_alive ())
- {
- termios_printf ("freeing tty%d (%d)", ttynum, get_ttyp ()->ntty);
-#if 0
- if (get_ttyp ()->to_slave)
- ForceCloseHandle1 (get_ttyp ()->to_slave, to_slave);
- if (get_ttyp ()->from_slave)
- ForceCloseHandle1 (get_ttyp ()->from_slave, from_slave);
-#endif
- if (get_ttyp ()->from_master)
- CloseHandle (get_ttyp ()->from_master);
- if (get_ttyp ()->to_master)
- CloseHandle (get_ttyp ()->to_master);
- get_ttyp ()->init ();
- }
-
- return 0;
-}
-
-int
-fhandler_pty_master::write (const void *ptr, size_t len)
-{
- line_edit ((char *) ptr, len);
- return len;
-}
-
-int
-fhandler_pty_master::read (void *ptr, size_t len)
-{
- return process_slave_output ((char *) ptr, len, pktmode);
-}
-
-int
-fhandler_pty_master::tcgetattr (struct termios *t)
-{
- *t = cygwin_shared->tty[ttynum]->ti;
- return 0;
-}
-
-int
-fhandler_pty_master::tcsetattr (int, const struct termios *t)
-{
- cygwin_shared->tty[ttynum]->ti = *t;
- return 0;
-}
-
-int
-fhandler_pty_master::tcflush (int)
-{
- return 0;
-}
-
-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:
- get_ttyp ()->winsize = * (struct winsize *) arg;
- _kill (-get_ttyp ()->getpgid (), SIGWINCH);
- break;
- case FIONBIO:
- if (* (int *) arg)
- set_flags (get_flags () | O_NONBLOCK);
- else
- set_flags (get_flags () & ~O_NONBLOCK);
- break;
- default:
- set_errno (EINVAL);
- return -1;
- }
- return 0;
-}
-
-char *
-fhandler_pty_master::ptsname (void)
-{
- static char buf[32];
-
- __small_sprintf (buf, "/dev/tty%d", ttynum);
- return buf;
-}
-
-void
-fhandler_tty_common::set_close_on_exec (int val)
-{
- this->fhandler_base::set_close_on_exec (val);
- if (output_done_event)
- set_inheritance (output_done_event, val);
- if (ioctl_request_event)
- set_inheritance (ioctl_request_event, val);
- if (ioctl_done_event)
- set_inheritance (ioctl_done_event, val);
- if (inuse)
- set_inheritance (inuse, val);
- set_inheritance (output_mutex, val, "output_mutex");
- set_inheritance (output_handle, val);
-}
-
-void
-fhandler_tty_common::fixup_after_fork (HANDLE parent)
-{
- this->fhandler_base::fixup_after_fork (parent);
- if (output_done_event)
- fork_fixup (parent, output_done_event, "output_done_event");
- if (ioctl_request_event)
- fork_fixup (parent, ioctl_request_event, "ioctl_request_event");
- if (ioctl_done_event)
- fork_fixup (parent, ioctl_done_event, "ioctl_done_event");
- if (output_mutex)
- {
- fork_fixup (parent, output_mutex, "output_mutex");
- ProtectHandle (output_mutex);
- }
- fork_fixup (parent, output_handle, "output_handle");
- fork_fixup (parent, inuse, "inuse");
-}
-
-void
-fhandler_pty_master::set_close_on_exec (int val)
-{
- this->fhandler_tty_common::set_close_on_exec (val);
-
- /* FIXME: There is a console handle leak here. */
- if (get_ttyp ()->master_pid == GetCurrentProcessId ())
- {
- get_ttyp ()->from_slave = get_handle ();
- get_ttyp ()->to_slave = get_output_handle ();
- termios_printf ("from_slave %p, to_slave %p", get_handle (),
- get_output_handle ());
- }
-}
-
-void
-fhandler_tty_master::fixup_after_fork (HANDLE child)
-{
- this->fhandler_pty_master::fixup_after_fork (child);
- console->fixup_after_fork (child);
-}
-
-void
-fhandler_tty_master::fixup_after_exec (HANDLE)
-{
- console->close ();
- init_console ();
- return;
-}
-
-int
-fhandler_tty_master::init_console ()
-{
- console = (fhandler_console *) fdtab.build_fhandler (-1, FH_CONSOLE, "/dev/ttym");
- if (console == NULL)
- return -1;
-
- console->init (INVALID_HANDLE_VALUE, GENERIC_READ | GENERIC_WRITE, O_BINARY);
- console->set_r_no_interrupt (1);
- return 0;
-}
diff --git a/winsup/cygwin/fhandler_windows.cc b/winsup/cygwin/fhandler_windows.cc
deleted file mode 100644
index f937d81c4..000000000
--- a/winsup/cygwin/fhandler_windows.cc
+++ /dev/null
@@ -1,149 +0,0 @@
-/* fhandler_windows.cc: code to access windows message queues.
-
- Copyright 1998 Cygnus Solutions.
-
- 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 <errno.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include "cygerrno.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 (const char *name) :
- fhandler_base (FH_WINDOWS, name)
-{
- set_cb (sizeof *this);
- hWnd_ = NULL;
- method_ = WINDOWS_POST;
-}
-
-int
-fhandler_windows::open (const char *, int flags, mode_t)
-{
- set_flags (flags);
- set_close_on_exec_flag (1);
- 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);
-}
-
-int
-fhandler_windows::read (void *buf, size_t len)
-{
- MSG *ptr = (MSG *) buf;
- int ret;
-
- if (len < sizeof (MSG))
- {
- set_errno (EINVAL);
- return -1;
- }
-
- ret = GetMessage (ptr, hWnd_, 0, 0);
-
- if (ret == -1)
- {
- __seterrno ();
- }
- set_errno (0);
- return ret;
-}
-
-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 (int val)
-{
- if (get_handle ())
- this->fhandler_base::set_close_on_exec (val);
- else
- this->fhandler_base::set_close_on_exec_flag (val);
- void *h = hWnd_;
- if (h)
- set_inheritance (h, val);
-}
-
-void
-fhandler_windows::fixup_after_fork (HANDLE parent)
-{
- if (get_handle ())
- this->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 4c74abc07..000000000
--- a/winsup/cygwin/fhandler_zero.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/* fhandler_dev_zero.cc: code to access /dev/zero
-
- Copyright 2000 Cygnus Solutions.
-
- 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 <errno.h>
-#include "fhandler.h"
-
-fhandler_dev_zero::fhandler_dev_zero (const char *name)
- : fhandler_base (FH_ZERO, name)
-{
- set_cb (sizeof *this);
-}
-
-int
-fhandler_dev_zero::open (const char *, int flags, mode_t)
-{
- set_flags (flags);
- return 1;
-}
-
-int
-fhandler_dev_zero::write (const void *, size_t len)
-{
- return len;
-}
-
-int
-fhandler_dev_zero::read (void *ptr, size_t len)
-{
- memset(ptr, 0, len);
- return len;
-}
-
-off_t
-fhandler_dev_zero::lseek (off_t, int)
-{
- return 0;
-}
-
-int
-fhandler_dev_zero::close (void)
-{
- return 0;
-}
-
-void
-fhandler_dev_zero::dump ()
-{
- paranoid_printf("here, fhandler_dev_zero");
-}
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
deleted file mode 100644
index 7e8ad534f..000000000
--- a/winsup/cygwin/fork.cc
+++ /dev/null
@@ -1,715 +0,0 @@
-/* fork.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <stdarg.h>
-#include <errno.h>
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygerrno.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "cygheap.h"
-#include "child_info.h"
-#define NEED_VFORK
-#include "perthread.h"
-#include "perprocess.h"
-#include "dll_init.h"
-#include "security.h"
-
-#ifdef DEBUGGING
-static int npid = 0;
-static int npid_max = 0;
-static pid_t fork_pids[100] = {0};
-#endif
-
-DWORD NO_COPY chunksize = 0;
-/* 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 */
-
-#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
-per_thread::set (void *s)
-{
- if (s == PER_THREAD_FORK_CLEAR)
- {
- tls = TlsAlloc ();
- s = NULL;
- }
- TlsSetValue (get_tls (), s);
-}
-
-static void
-stack_base (child_info_fork &ch)
-{
- MEMORY_BASIC_INFORMATION m;
- memset (&m, 0, sizeof m);
- if (!VirtualQuery ((LPCVOID) &m, &m, sizeof m))
- system_printf ("couldn't get memory info, %E");
-
- ch.stacktop = m.AllocationBase;
- ch.stackbottom = (LPBYTE) m.BaseAddress + m.RegionSize;
- ch.stacksize = (DWORD) ch.stackbottom - (DWORD) &m;
- debug_printf ("bottom %p, top %p, stack %p, size %d, reserve %d",
- ch.stackbottom, ch.stacktop, &m, ch.stacksize,
- (DWORD) ch.stackbottom - (DWORD) ch.stacktop);
-}
-
-/* Copy memory from parent to child.
- The result is a boolean indicating success. */
-
-static int
-fork_copy (PROCESS_INFORMATION &pi, const char *what, ...)
-{
- va_list args;
- char *low;
- int pass = 0;
-
- va_start (args, what);
-
- while ((low = va_arg (args, char *)))
- {
- char *high = va_arg (args, char *);
- DWORD todo = chunksize ?: high - low;
- char *here;
-
- for (here = low; here < high; here += todo)
- {
- DWORD done = 0;
- if (here + todo > high)
- todo = high - here;
- int res = WriteProcessMemory (pi.hProcess, here, here, todo, &done);
- debug_printf ("child handle %p, low %p, high %p, res %d", pi.hProcess,
- 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 pass %d failed, %p..%p, done %d, %E",
- what, pass, low, high, done);
- goto err;
- }
- }
-
- pass++;
- }
-
- debug_printf ("done");
- return 1;
-
-err:
- TerminateProcess (pi.hProcess, 1);
- set_errno (EAGAIN);
- return 0;
-}
-
-/* Wait for child to finish what it's doing and signal us.
- We don't want to wait forever here.If there's a problem somewhere
- it'll hang the entire system (since all forks are mutex'd). If we
- time out, set errno = EAGAIN and hope the app tries again. */
-static int
-sync_with_child (PROCESS_INFORMATION &pi, HANDLE subproc_ready,
- BOOL hang_child, const char *s)
-{
- /* We also add the child process handle to the wait. If the child fails
- to initialize (eg. because of a missing dll). Then this
- handle will become signalled. This stops a *looong* timeout wait.
- */
- HANDLE w4[2];
-
- debug_printf ("waiting for child. reason: %s, hang_child %d", s,
- hang_child);
- w4[1] = pi.hProcess;
- w4[0] = subproc_ready;
- DWORD rc = WaitForMultipleObjects (2, w4, FALSE, FORK_WAIT_TIMEOUT);
-
- if (rc == WAIT_OBJECT_0 ||
- WaitForSingleObject (subproc_ready, 0) == WAIT_OBJECT_0)
- /* That's ok */;
- else if (rc == WAIT_FAILED || rc == WAIT_TIMEOUT)
- {
- if (rc != WAIT_FAILED)
- system_printf ("WaitForMultipleObjects timed out");
- else
- system_printf ("WaitForMultipleObjects failed, %E");
- set_errno (EAGAIN);
- syscall_printf ("-1 = fork(), WaitForMultipleObjects failed");
- TerminateProcess (pi.hProcess, 1);
- return 0;
- }
- else
- {
- /* Child died. Clean up and exit. */
- DWORD errcode;
- GetExitCodeProcess (pi.hProcess, &errcode);
- /* Fix me. This is not enough. The fork should not be considered
- * to have failed if the process was essentially killed by a signal.
- */
- if (errcode != STATUS_CONTROL_C_EXIT)
- {
- system_printf ("child %d(%p) died before initialization with status code %p",
- pi.dwProcessId, pi.hProcess, errcode);
- system_printf ("*** child state %s", s);
-#ifdef DEBUGGING
- abort ();
-#endif
- }
- set_errno (EAGAIN);
- syscall_printf ("Child died before subproc_ready signalled");
- return 0;
- }
-
- debug_printf ("child signalled me");
- return 1;
-}
-
-static int
-resume_child (PROCESS_INFORMATION &pi, HANDLE forker_finished)
-{
- SetEvent (forker_finished);
- debug_printf ("signalled child");
- return 1;
-}
-
-/* Notify parent that it is time for the next step.
- Note that this has to be a macro since the parent may be messing with
- our stack. */
-static void __stdcall
-sync_with_parent(const char *s, bool hang_self)
-{
- debug_printf ("signalling parent: %s", s);
- /* Tell our parent we're waiting. */
- if (!SetEvent (child_proc_info->subproc_ready))
- api_fatal ("fork child - SetEvent failed, %E");
- if (hang_self)
- {
- HANDLE h = child_proc_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");
- break;
- case WAIT_FAILED:
- if (GetLastError () == ERROR_INVALID_HANDLE &&
- WaitForSingleObject (child_proc_info->forker_finished, 1) != WAIT_FAILED)
- break;
- api_fatal ("WFSO failed, fork_finished %p, %E", child_proc_info->forker_finished);
- break;
- default:
- debug_printf ("no problems");
- break;
- }
- }
-}
-
-static int __stdcall
-fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
-{
- debug_printf ("child is running. pid %d, ppid %d, stack here %p",
- myself->pid, myself->ppid, __builtin_frame_address (0));
-
- /* Restore the inheritance state as in parent
- Don't call setuid here! The flags are already set. */
- if (cygheap->user.impersonated)
- {
- debug_printf ("Impersonation of child, token: %d", cygheap->user.token);
- if (cygheap->user.token == INVALID_HANDLE_VALUE)
- RevertToSelf (); // probably not needed
- else if (!ImpersonateLoggedOnUser (cygheap->user.token))
- system_printf ("Impersonate for forked child failed: %E");
- }
-
- sync_with_parent ("after longjmp.", TRUE);
- ProtectHandle (hParent);
- sigproc_printf ("hParent %p, child 1 first_dll %p, load_dlls %d\n", hParent, first_dll, load_dlls);
-
-#ifdef DEBUGGING
- char c;
- if (GetEnvironmentVariable ("FORKDEBUG", &c, 1))
- try_to_debug ();
- char buf[80];
- /* This is useful for debugging fork problems. Use gdb to attach to
- the pid reported here. */
- if (GetEnvironmentVariable ("CYGWIN_FORK_SLEEP", buf, sizeof (buf)))
- {
- small_printf ("Sleeping %d after fork, pid %u\n", atoi (buf), GetCurrentProcessId ());
- Sleep (atoi(buf));
- }
-#endif
-
- /* If we've played with the stack, stacksize != 0. That means that
- fork() was invoked from other than the main thread. Make sure that
- when the "main" thread exits it calls do_exit, like a normal process.
- Exit with a status code of 0. */
- if (child_proc_info->stacksize)
- {
- ((DWORD *)child_proc_info->stackbottom)[-17] = (DWORD)do_exit;
- ((DWORD *)child_proc_info->stackbottom)[-15] = (DWORD)0;
- }
-
- MALLOC_CHECK;
-
- pinfo_fixup_after_fork ();
- fdtab.fixup_after_fork (hParent);
- signal_fixup_after_fork ();
-
- 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)
- sync_with_parent ("performed fork fixup.", FALSE);
- else
- {
- dlls.load_after_fork (hParent, first_dll);
- sync_with_parent ("loaded dlls", TRUE);
- }
-
- ForceCloseHandle (hParent);
- (void) ForceCloseHandle (child_proc_info->subproc_ready);
- (void) ForceCloseHandle (child_proc_info->forker_finished);
-
- if (fixup_mmaps_after_fork ())
- api_fatal ("recreate_mmaps_after_fork_failed");
-
- /* Set thread local stuff to zero. Under Windows 95/98 this is sometimes
- non-zero, for some reason.
- FIXME: There is a memory leak here after a fork. */
- for (per_thread **t = threadstuff; *t; t++)
- if ((*t)->clear_on_fork ())
- (*t)->set ();
-
- /* Initialize signal/process handling */
- sigproc_init ();
- cygbench ("fork-child");
- return 0;
-}
-
-static void
-slow_pid_reuse (HANDLE h)
-{
- static NO_COPY HANDLE last_fork_procs[8] = {0};
- static NO_COPY unsigned nfork_procs = 0;
-
- if (nfork_procs >= (sizeof (last_fork_procs) / sizeof (last_fork_procs [0])))
- nfork_procs = 0;
- /* Keep a list of handles to forked 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++;
-}
-
-static int __stdcall
-fork_parent (void *stack_here, HANDLE& hParent, dll *&first_dll,
- bool& load_dlls, child_info_fork &ch)
-{
- HANDLE subproc_ready, forker_finished;
- DWORD rc;
- PROCESS_INFORMATION pi = {0, NULL, 0, 0};
-
- subproc_init ();
-
-#ifdef DEBUGGING_NOTNEEDED
- /* The ProtectHandle call allocates memory so we need to make sure
- that enough is set aside here so that the sbrk pointer does not
- move when ProtectHandle is called after the child is started.
- Otherwise the sbrk pointers in the parent will not agree with
- the child and when user_data is (regrettably) copied over,
- the user_data->ptr field will not be accurate. */
- free (malloc (4096));
-#endif
-
- int c_flags = GetPriorityClass (hMainProc) /*|
- CREATE_NEW_PROCESS_GROUP*/;
- STARTUPINFO si = {0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL};
-
- /* If we don't have a console, then don't create a console for the
- child either. */
- HANDLE console_handle = CreateFileA ("CONOUT$", GENERIC_WRITE,
- FILE_SHARE_WRITE, &sec_none_nih,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
- NULL);
-
- if (console_handle != INVALID_HANDLE_VALUE && console_handle != 0)
- CloseHandle (console_handle);
- else
- c_flags |= DETACHED_PROCESS;
-
- /* Some file types (currently only sockets) 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 (fdtab.need_fixup_before ())
- c_flags |= CREATE_SUSPENDED;
-
- /* Create an inheritable handle to pass to the child process. This will
- allow the child to duplicate handles from the parent to itself. */
- hParent = NULL;
- if (!DuplicateHandle (hMainProc, hMainProc, hMainProc, &hParent, 0, 1,
- DUPLICATE_SAME_ACCESS))
- {
- system_printf ("couldn't create handle to myself for child, %E");
- return -1;
- }
-
- /* 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);
-
- subproc_ready = CreateEvent (&sec_all, FALSE, FALSE, NULL);
- if (subproc_ready == NULL)
- {
- CloseHandle (hParent);
- system_printf ("unable to allocate subproc_ready event, %E");
- return -1;
- }
- forker_finished = CreateEvent (&sec_all, FALSE, FALSE, NULL);
- if (forker_finished == NULL)
- {
- CloseHandle (hParent);
- CloseHandle (subproc_ready);
- system_printf ("unable to allocate subproc_ready event, %E");
- return -1;
- }
-
- ProtectHandle (subproc_ready);
- ProtectHandle (forker_finished);
-
- init_child_info (PROC_FORK1, &ch, 1, subproc_ready);
-
- ch.forker_finished = forker_finished;
- ch.heaptop = user_data->heaptop;
- ch.heapbase = user_data->heapbase;
- ch.heapptr = user_data->heapptr;
-
- stack_base (ch);
-
- si.cb = sizeof (STARTUPINFO);
- si.lpReserved2 = (LPBYTE)&ch;
- si.cbReserved2 = sizeof(ch);
-
- /* Remove impersonation */
- uid_t uid;
- uid = geteuid();
- if (cygheap->user.impersonated && cygheap->user.token != INVALID_HANDLE_VALUE)
- seteuid (cygheap->user.orig_uid);
-
- ch.parent = hParent;
- ch.cygheap = cygheap;
- ch.cygheap_max = cygheap_max;
-#ifdef DEBUGGING
- if (npid_max)
- {
- for (int pass = 0; pass < 2; pass++)
- {
- pid_t pid;
- while ((pid = fork_pids[npid++]))
- if (!pinfo (pid))
- {
- ch.cygpid = pid;
- goto out;
- }
- npid = 0;
- }
- }
-out:
-#endif
-
- char sa_buf[1024];
- syscall_printf ("CreateProcess (%s, %s, 0, 0, 1, %x, 0, 0, %p, %p)",
- myself->progname, myself->progname, c_flags, &si, &pi);
- rc = CreateProcess (myself->progname, /* image to run */
- myself->progname, /* what we send in arg0 */
- allow_ntsec ? sec_user (sa_buf) : &sec_none_nih,
- allow_ntsec ? sec_user (sa_buf) : &sec_none_nih,
- TRUE, /* inherit handles from parent */
- c_flags,
- NULL, /* environment filled in later */
- 0, /* use current drive/directory */
- &si,
- &pi);
-
- CloseHandle (hParent);
-
- if (!rc)
- {
- __seterrno ();
- syscall_printf ("CreateProcessA failed, %E");
- ForceCloseHandle(subproc_ready);
- ForceCloseHandle(forker_finished);
- /* Restore impersonation */
- if (cygheap->user.impersonated
- && cygheap->user.token != INVALID_HANDLE_VALUE)
- seteuid (uid);
- return -1;
- }
-
- /* Fixup the parent datastructure if needed and resume the child's
- main thread. */
- if (fdtab.need_fixup_before ())
- {
- fdtab.fixup_before_fork (pi.dwProcessId);
- ResumeThread (pi.hThread);
- }
-
-#ifdef DEBUGGING
- pinfo forked ((ch.cygpid != 1 ? ch.cygpid : cygwin_pid (pi.dwProcessId)), 1);
-#else
- pinfo forked (cygwin_pid (pi.dwProcessId), 1);
-#endif
-
- /* Initialize things that are done later in dll_crt0_1 that aren't done
- for the forkee. */
- strcpy(forked->progname, myself->progname);
-
- /* Restore impersonation */
- if (cygheap->user.impersonated && cygheap->user.token != INVALID_HANDLE_VALUE)
- seteuid (uid);
-
- ProtectHandle (pi.hThread);
- /* Protect the handle but name it similarly to the way it will
- be called in subproc handling. */
- ProtectHandle1 (pi.hProcess, childhProc);
-
- slow_pid_reuse (pi.hProcess);
-
- /* Fill in fields in the child's process table entry. */
- forked->hProcess = pi.hProcess;
- forked->dwProcessId = pi.dwProcessId;
- forked->copysigs(myself);
- forked.remember ();
-
- /* Wait for subproc to initialize itself. */
- if (!sync_with_child(pi, subproc_ready, TRUE, "waiting for longjmp"))
- goto cleanup;
-
- /* CHILD IS STOPPED */
- debug_printf ("child is alive (but stopped)");
-
- /* Initialize, in order: data, bss, heap, stack, dll data, dll bss
- Note: variables marked as NO_COPY will not be copied
- since they are placed in a protected segment. */
-
-
- MALLOC_CHECK;
- rc = fork_copy (pi, "user/cygwin data",
- user_data->data_start, user_data->data_end,
- user_data->bss_start, user_data->bss_end,
- ch.heapbase, ch.heapptr,
- stack_here, ch.stackbottom,
- dll_data_start, dll_data_end,
- dll_bss_start, dll_bss_end, NULL);
-
- MALLOC_CHECK;
- if (!rc)
- 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 (!fork_copy (pi, "linked dll data/bss", d->p.data_start, d->p.data_end,
- d->p.bss_start, d->p.bss_end,
- NULL))
- goto cleanup;
- }
-
- /* Start thread, and wait for it to reload dlls. */
- if (!resume_child (pi, forker_finished) ||
- !sync_with_child (pi, subproc_ready, load_dlls, "child loading dlls"))
- 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 (!fork_copy (pi, "loaded dll data/bss", d->p.data_start, d->p.data_end,
- d->p.bss_start, d->p.bss_end,
- NULL))
- goto cleanup;
- }
- /* Start the child up again. */
- (void) resume_child (pi, forker_finished);
- }
-
- ForceCloseHandle (subproc_ready);
- ForceCloseHandle (pi.hThread);
- ForceCloseHandle (forker_finished);
- forker_finished = NULL;
- pi.hThread = NULL;
-
- return forked->pid;
-
-/* Common cleanup code for failure cases */
-cleanup:
- /* Remember to de-allocate the fd table. */
- if (pi.hProcess)
- ForceCloseHandle1 (pi.hProcess, childhProc);
- if (pi.hThread)
- ForceCloseHandle (pi.hThread);
- if (subproc_ready)
- ForceCloseHandle (subproc_ready);
- if (forker_finished)
- ForceCloseHandle (forker_finished);
- return -1;
-}
-
-extern "C" int
-fork ()
-{
- struct
- {
- HANDLE hParent;
- dll *first_dll;
- bool load_dlls;
- } grouped;
-
- MALLOC_CHECK;
- sigframe thisframe (mainthread);
-
- debug_printf ("entering");
- grouped.hParent = grouped.first_dll = NULL;
- grouped.load_dlls = 0;
-
- if (ISSTATE(myself, PID_SPLIT_HEAP))
- {
- system_printf ("The heap has been split, CYGWIN can't fork this process.");
- system_printf ("Increase the heap_chunk_size in the registry and try again.");
- set_errno (ENOMEM);
- syscall_printf ("-1 = fork (), split heap");
- return -1;
- }
-
- void *esp;
- __asm ("movl %%esp,%0": "=r" (esp));
-
- myself->set_has_pgid_children ();
-
- child_info_fork ch;
-
- int res = setjmp (ch.jmp);
-
- if (res)
- res = fork_child (grouped.hParent, grouped.first_dll, grouped.load_dlls);
- else
- res = fork_parent (esp, grouped.hParent, grouped.first_dll, grouped.load_dlls, ch);
-
- MALLOC_CHECK;
- syscall_printf ("%d = fork()", res);
- return res;
-}
-#ifdef DEBUGGING
-void
-fork_init ()
-{
- char buf[1024];
- if (!GetEnvironmentVariable ("CYGWIN_FORK_PIDS", buf, 1024))
- return;
- pid_t pid;
- char *p, *pe;
- for (p = buf; (pid = strtol (p, &pe, 10)); p = pe)
- fork_pids[npid_max++] = pid;
-}
-#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
- return fork ();
-#else
- vfork_save *vf = get_vfork_val ();
- char **esp, **pp;
-
- if (vf == NULL)
- vf = vfork_storage.create ();
-
- 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 + 1; pp++, esp++)
- *pp = *esp;
- return fdtab.vfork_child_dup () ? 0 : -1;
- }
-
- fdtab.vfork_parent_restore ();
-
- vf = get_vfork_val ();
- if (vf->pid < 0)
- {
- int exitval = -vf->pid;
- if ((vf->pid = fork ()) == 0)
- exit (exitval);
- }
-
- __asm__ volatile ("movl %%esp,%0": "=r" (esp):);
- for (pp = (char **)vf->frame, esp = vf->vfork_esp;
- esp <= vf->vfork_ebp + 1; pp++, esp++)
- *esp = *pp;
-
- return vf->pid;
-#endif
-}
diff --git a/winsup/cygwin/gcrt0.c b/winsup/cygwin/gcrt0.c
deleted file mode 100644
index e565f092f..000000000
--- a/winsup/cygwin/gcrt0.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* gcrt0.c
-
- Copyright 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <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/glob.c b/winsup/cygwin/glob.c
deleted file mode 100644
index 59e6bbf29..000000000
--- a/winsup/cygwin/glob.c
+++ /dev/null
@@ -1,898 +0,0 @@
-/* $NetBSD: __glob13.c,v 1.1.2.1 1997/10/22 06:41:27 thorpej Exp $ */
-
-/*
- * 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.
- */
-
-#include <sys/cdefs.h>
-
-/*
- * 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.
- */
-
-/* CYGNUS LOCAL: don't include */
-/* #include "namespace.h" */
-/* end CYGNUS LOCAL */
-
-#include "winsup.h"
-
-#include <sys/param.h>
-#include <sys/stat.h>
-
-#include <ctype.h>
-#include <dirent.h>
-#include <errno.h>
-#include <glob.h>
-
-#include <pwd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <windows.h>
-
-#ifdef __weak_alias
-#ifdef __LIBC12_SOURCE__
-__weak_alias(glob,_glob);
-__weak_alias(globfree,_globfree);
-#else
-#error "XXX THESE ARE NOT RIGHT!"
-__weak_alias(__glob13,___glob13);
-__weak_alias(__globfree13,___globfree13);
-#endif /* __LIBC12_SOURCE__ */
-#endif /* __weak_alias */
-
-#ifdef __LIBC12_SOURCE__
-#define STAT stat12
-#else
-#define STAT stat
-#endif
-
-#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 0x8000
-#define M_PROTECT 0x4000
-#define M_MASK 0xffff
-#define M_ASCII 0x00ff
-
-typedef u_short Char;
-
-#else
-
-#define M_QUOTE 0x80
-#define M_PROTECT 0x40
-#define M_MASK 0xff
-#define M_ASCII 0x7f
-
-typedef char Char;
-
-#endif
-
-
-#define CHAR(c) ((Char)((c)&M_ASCII))
-#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 __P((const void *, const void *));
-static void g_Ctoc __P((const Char *, char *));
-static int g_lstat __P((Char *, struct STAT *, glob_t *));
-static DIR *g_opendir __P((Char *, glob_t *));
-static Char *g_strchr __P((Char *, int));
-#ifdef notdef
-static Char *g_strcat __P((Char *, const Char *));
-#endif
-static int g_stat __P((Char *, struct STAT *, glob_t *));
-static int glob0 __P((const Char *, glob_t *));
-static int glob1 __P((Char *, glob_t *));
-static int glob2 __P((Char *, Char *, Char *, glob_t *));
-static int glob3 __P((Char *, Char *, Char *, Char *, glob_t *));
-static int globextend __P((const Char *, glob_t *));
-static const Char * globtilde __P((const Char *, Char *, glob_t *));
-static int globexp1 __P((const Char *, glob_t *));
-static int globexp2 __P((const Char *, const Char *, glob_t *, int *));
-static int match __P((Char *, Char *, Char *));
-#ifdef DEBUG
-static void qprintf __P((const char *, Char *));
-#endif
-
-#undef MAXPATHLEN
-#define MAXPATHLEN 16384
-
-extern BOOL ignore_case_with_glob;
-
-int
-glob(pattern, flags, errfunc, pglob)
- const char *pattern;
- int flags, (*errfunc) __P((const char *, int));
- glob_t *pglob;
-{
- const u_char *patnext;
- int c;
- Char *bufnext, *bufend, patbuf[MAXPATHLEN+1];
-
- patnext = (u_char *) pattern;
- if (!(flags & GLOB_APPEND)) {
- pglob->gl_pathc = 0;
- pglob->gl_pathv = NULL;
- if (!(flags & GLOB_DOOFFS))
- pglob->gl_offs = 0;
- }
- pglob->gl_flags = flags & ~GLOB_MAGCHAR;
- pglob->gl_errfunc = errfunc;
- pglob->gl_matchc = 0;
-
- bufnext = patbuf;
- bufend = bufnext + MAXPATHLEN;
- if (flags & GLOB_QUOTE) {
- /* Protect the quoted characters. */
- while (bufnext < bufend && (c = *patnext++) != EOS)
- if (c == QUOTE) {
- if ((c = *patnext++) == EOS) {
- c = QUOTE;
- --patnext;
- }
- *bufnext++ = c | M_PROTECT;
- }
- else
- *bufnext++ = c;
- }
- else
- while (bufnext < bufend && (c = *patnext++) != EOS)
- *bufnext++ = c;
- *bufnext = EOS;
-
- if (flags & GLOB_BRACE)
- return globexp1(patbuf, pglob);
- else
- return glob0(patbuf, pglob);
-}
-
-/*
- * 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(pattern, pglob)
- const Char *pattern;
- glob_t *pglob;
-{
- 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);
-
- while ((ptr = (const Char *) g_strchr((Char *) ptr, LBRACE)) != NULL)
- if (!globexp2(ptr, pattern, pglob, &rv))
- return rv;
-
- return glob0(pattern, pglob);
-}
-
-
-/*
- * 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(ptr, pattern, pglob, rv)
- const Char *ptr, *pattern;
- glob_t *pglob;
- int *rv;
-{
- int i;
- Char *lm, *ls;
- const Char *pe, *pm, *pl;
- Char patbuf[MAXPATHLEN + 1];
-
- /* copy part up to the brace */
- for (lm = patbuf, pm = pattern; pm != ptr; *lm++ = *pm++)
- continue;
- 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);
- return 0;
- }
-
- for (i = 0, pl = pm = ptr; pm <= pe; pm++)
- switch (*pm) {
- case LBRACKET:
- /* Ignore everything between [] */
- for (pl = pm++; *pm != RBRACKET && *pm != EOS; pm++)
- continue;
- if (*pm == EOS) {
- /*
- * We could not find a matching RBRACKET.
- * Ignore and just look for RBRACE
- */
- pm = pl;
- }
- 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);
-
- /* 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(pattern, patbuf, pglob)
- const Char *pattern;
- Char *patbuf;
- glob_t *pglob;
-{
- struct passwd *pwd;
- char *h;
- const Char *p;
- Char *b;
-
- if (*pattern != TILDE || !(pglob->gl_flags & GLOB_TILDE))
- return pattern;
-
- /* Copy up to the end of the string or / */
- for (p = pattern + 1, h = (char *) patbuf; *p && *p != SLASH;
- *h++ = *p++)
- continue;
-
- *h = EOS;
-
- if (((char *) patbuf)[0] == EOS) {
- /*
- * handle a plain ~ or ~/ by expanding $HOME
- * first and then trying the password file
- */
- if ((h = getenv("HOME")) == NULL) {
- if ((pwd = getpwuid(getuid())) == NULL)
- return pattern;
- else
- h = pwd->pw_dir;
- }
- }
- else {
- /*
- * Expand a ~user
- */
- if ((pwd = getpwnam((char*) patbuf)) == NULL)
- return pattern;
- else
- h = pwd->pw_dir;
- }
-
- /* Copy the home directory */
- for (b = patbuf; *h; *b++ = *h++)
- continue;
-
- /* Append the rest of the pattern */
- while ((*b++ = *p++) != EOS)
- continue;
-
- 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. It is not an error
- * to find no matches.
- */
-static int
-glob0(pattern, pglob)
- const Char *pattern;
- glob_t *pglob;
-{
- const Char *qpatnext;
- int c, err, oldpathc;
- Char *bufnext, patbuf[MAXPATHLEN+1];
-
- qpatnext = globtilde(pattern, patbuf, 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)) != 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 &&
- ((pglob->gl_flags & GLOB_NOCHECK) ||
- ((pglob->gl_flags & GLOB_NOMAGIC) &&
- !(pglob->gl_flags & GLOB_MAGCHAR))))
- return(globextend(pattern, pglob));
- else 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(p, q)
- const void *p, *q;
-{
- return(strcmp(*(char **)p, *(char **)q));
-}
-
-static int
-glob1(pattern, pglob)
- Char *pattern;
- glob_t *pglob;
-{
- Char pathbuf[MAXPATHLEN+1];
-
- /* A null pathname is invalid -- POSIX 1003.1 sect. 2.4. */
- if (*pattern == EOS)
- return(0);
- return(glob2(pathbuf, pathbuf, pattern, pglob));
-}
-
-/*
- * 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(pathbuf, pathend, pattern, pglob)
- Char *pathbuf, *pathend, *pattern;
- glob_t *pglob;
-{
- struct STAT 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)))) {
- *pathend++ = SEP;
- *pathend = EOS;
- }
- ++pglob->gl_matchc;
- return(globextend(pathbuf, pglob));
- }
-
- /* Find end of next segment, copy tentatively to pathend. */
- q = pathend;
- p = pattern;
- while (*p != EOS && *p != SEP) {
- if (ismeta(*p))
- anymeta = 1;
- *q++ = *p++;
- }
-
- if (!anymeta) { /* No expansion, do next segment. */
- pathend = q;
- pattern = p;
- while (*pattern == SEP)
- *pathend++ = *pattern++;
- } else /* Need expansion, recurse. */
- return(glob3(pathbuf, pathend, pattern, p, pglob));
- }
- /* NOTREACHED */
-}
-
-static int
-glob3(pathbuf, pathend, pattern, restpattern, pglob)
- Char *pathbuf, *pathend, *pattern, *restpattern;
- glob_t *pglob;
-{
- register 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) __P((void *));
-
- *pathend = EOS;
- errno = 0;
-
- if ((dirp = g_opendir(pathbuf, pglob)) == NULL) {
- /* TODO: don't call for ENOENT or ENOTDIR? */
- if (pglob->gl_errfunc) {
- g_Ctoc(pathbuf, buf);
- if (pglob->gl_errfunc(buf, errno) ||
- pglob->gl_flags & GLOB_ERR)
- return (GLOB_ABEND);
- }
- return(0);
- }
-
- err = 0;
-
- /* Search directory for matching names. */
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- readdirfunc = pglob->gl_readdir;
- else
- readdirfunc = (struct dirent *(*)__P((void *))) readdir;
- while ((dp = (*readdirfunc)(dirp))) {
- register u_char *sc;
- register Char *dc;
-
- /* Initial DOT must be matched literally. */
- if (dp->d_name[0] == DOT && *pattern != DOT)
- continue;
- for (sc = (u_char *) dp->d_name, dc = pathend;
- (*dc++ = *sc++) != EOS;)
- continue;
- if (!match(pathend, pattern, restpattern)) {
- *pathend = EOS;
- continue;
- }
- err = glob2(pathbuf, --dc, restpattern, pglob);
- 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(path, pglob)
- const Char *path;
- glob_t *pglob;
-{
- register char **pathv;
- register int i;
- u_int newsize;
- char *copy;
- const Char *p;
-
- newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs);
- pathv = pglob->gl_pathv ?
- realloc((char *)pglob->gl_pathv, newsize) :
- malloc(newsize);
- if (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; --i >= 0; )
- *--pathv = NULL;
- }
- pglob->gl_pathv = pathv;
-
- for (p = path; *p++;)
- continue;
- if ((copy = malloc(p - path)) != NULL) {
- g_Ctoc(path, copy);
- 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(name, pat, patend)
- register Char *name, *pat, *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(pglob)
- glob_t *pglob;
-{
- register int i;
- register 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);
- }
-}
-
-static DIR *
-g_opendir(str, pglob)
- register Char *str;
- glob_t *pglob;
-{
- char buf[MAXPATHLEN];
-
- if (!*str)
- strcpy(buf, ".");
- else
- g_Ctoc(str, buf);
-
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- return((*pglob->gl_opendir)(buf));
-
- return(opendir(buf));
-}
-
-static int
-g_lstat(fn, sb, pglob)
- register Char *fn;
- struct STAT *sb;
- glob_t *pglob;
-{
- char buf[MAXPATHLEN];
-
- g_Ctoc(fn, buf);
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- return((*pglob->gl_lstat)(buf, sb));
- return(lstat(buf, sb));
-}
-
-static int
-g_stat(fn, sb, pglob)
- register Char *fn;
- struct STAT *sb;
- glob_t *pglob;
-{
- char buf[MAXPATHLEN];
-
- g_Ctoc(fn, buf);
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- return((*pglob->gl_stat)(buf, sb));
- return(stat(buf, sb));
-}
-
-static Char *
-g_strchr(str, ch)
- Char *str;
- int ch;
-{
- do {
- if (*str == ch)
- return (str);
- } while (*str++);
- return (NULL);
-}
-
-#ifdef notdef
-static Char *
-g_strcat(dst, src)
- Char *dst;
- const Char* src;
-{
- Char *sdst = dst;
-
- while (*dst++)
- continue;
- --dst;
- while((*dst++ = *src++) != EOS)
- continue;
-
- return (sdst);
-}
-#endif
-
-static void
-g_Ctoc(str, buf)
- register const Char *str;
- char *buf;
-{
- register char *dc;
-
- for (dc = buf; (*dc++ = *str++) != EOS;)
- continue;
-}
-
-#ifdef DEBUG
-static void
-qprintf(str, s)
- const char *str;
- register Char *s;
-{
- register 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 6187a7c8f..000000000
--- a/winsup/cygwin/gmon.c
+++ /dev/null
@@ -1,277 +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>
-
-/* 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)
-{
- 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;
- }
-#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
- 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 be016791e..000000000
--- 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 737c50595..000000000
--- a/winsup/cygwin/grp.cc
+++ /dev/null
@@ -1,285 +0,0 @@
-/* grp.cc
-
- Copyright 1996, 1997, 1998, 2000 Cygnus Solutions.
-
- 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 <grp.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "cygheap.h"
-#include "cygerrno.h"
-
-/* Read /etc/group only once for better performance. This is done
- on the first call that needs information from it. */
-
-#define MAX_DOMAIN_NAME 100
-
-static NO_COPY const char *etc_group = "/etc/group";
-static struct group *group_buf = NULL; /* group contents in memory */
-static int curr_lines = 0;
-static int max_lines = 0;
-
-/* Position in the group cache */
-#ifdef _MT_SAFE
-#define grp_pos _reent_winsup()->_grp_pos
-#else
-static int grp_pos = 0;
-#endif
-
-/* Set to 1 when /etc/group has been read in by read_etc_group (). */
-/* Functions in this file need to check the value of group_in_memory_p
- and read in the group file if it isn't set. */
-/* FIXME: This should be static but this is called in uinfo_init outside
- this file */
-int group_in_memory_p = 0;
-
-static int
-parse_grp (struct group &grp, const char *line)
-{
- int len = strlen(line);
- char *newline = (char *) malloc (len + 1);
- (void) memcpy (newline, line, len + 1);
-
- if (newline[--len] == '\n')
- newline[len] = '\0';
-
- char *dp = strchr (newline, ':');
-
- if (!dp)
- return 0;
-
- *dp++ = '\0';
- grp.gr_name = newline;
-
- grp.gr_passwd = dp;
- dp = strchr (grp.gr_passwd, ':');
- if (dp)
- {
- *dp++ = '\0';
- if (!strlen (grp.gr_passwd))
- grp.gr_passwd = NULL;
-
- grp.gr_gid = strtol (dp, NULL, 10);
- dp = strchr (dp, ':');
- if (dp)
- {
- if (*++dp)
- {
- int i = 0;
- char *cp;
-
- for (cp = dp; (cp = strchr (cp, ',')) != NULL; ++cp)
- ++i;
- char **namearray = (char **) calloc (i + 2, sizeof (char *));
- if (namearray)
- {
- i = 0;
- for (cp = dp; (cp = strchr (dp, ',')) != NULL; dp = cp + 1)
- {
- *cp = '\0';
- namearray[i++] = dp;
- }
- namearray[i++] = dp;
- namearray[i] = NULL;
- }
- grp.gr_mem = namearray;
- }
- else
- grp.gr_mem = (char **) calloc (1, sizeof (char *));
- return 1;
- }
- }
- return 0;
-}
-
-/* Read one line from /etc/group into the group cache */
-static void
-add_grp_line (const char *line)
-{
- if (curr_lines == max_lines)
- {
- max_lines += 10;
- group_buf = (struct group *) realloc (group_buf, max_lines * sizeof (struct group));
- }
- if (parse_grp (group_buf[curr_lines], line))
- curr_lines++;
-}
-
-extern PSID get_admin_sid ();
-
-/* 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 */
-/* FIXME: should be static but this is called in uinfo_init outside this
- file */
-void
-read_etc_group ()
-{
- extern int group_sem;
- char linebuf [ 200 ];
- char group_name [ MAX_USER_NAME ];
- DWORD group_name_len = MAX_USER_NAME;
-
- strncpy (group_name, "Administrators", sizeof (group_name));
-
- ++group_sem;
- FILE *f = fopen (etc_group, "rt");
- --group_sem;
-
- if (f)
- {
- while (fgets (linebuf, sizeof (linebuf), f) != NULL)
- {
- if (strlen (linebuf))
- add_grp_line (linebuf);
- }
-
- fclose (f);
- }
- else /* /etc/group doesn't exist -- create default one in memory */
- {
- char domain_name [ MAX_DOMAIN_NAME ];
- DWORD domain_name_len = MAX_DOMAIN_NAME;
- SID_NAME_USE acType;
- debug_printf ("Emulating /etc/group");
- if (! LookupAccountSidA (NULL ,
- get_admin_sid () ,
- group_name,
- &group_name_len,
- domain_name,
- &domain_name_len,
- &acType))
- {
- strcpy (group_name, "unknown");
- debug_printf ("Failed to get local admins group name. %E");
- }
-
- snprintf (linebuf, sizeof (linebuf), "%s::%u:\n", group_name, DEFAULT_GID);
- add_grp_line (linebuf);
- }
-
- group_in_memory_p = 1;
-}
-
-extern "C"
-struct group *
-getgrgid (gid_t gid)
-{
- struct group * default_grp = NULL;
- if (!group_in_memory_p)
- read_etc_group();
-
- for (int i = 0; i < curr_lines; i++)
- {
- if (group_buf[i].gr_gid == DEFAULT_GID)
- default_grp = group_buf + i;
- if (group_buf[i].gr_gid == gid)
- return group_buf + i;
- }
-
- return default_grp;
-}
-
-extern "C"
-struct group *
-getgrnam (const char *name)
-{
- if (!group_in_memory_p)
- read_etc_group();
-
- for (int i = 0; i < curr_lines; i++)
- if (strcasematch (group_buf[i].gr_name, name))
- return group_buf + i;
-
- /* Didn't find requested group */
- return NULL;
-}
-
-extern "C"
-void
-endgrent()
-{
- grp_pos = 0;
-}
-
-extern "C"
-struct group *
-getgrent()
-{
- if (!group_in_memory_p)
- read_etc_group();
-
- if (grp_pos < curr_lines)
- return group_buf + grp_pos++;
-
- return NULL;
-}
-
-extern "C"
-void
-setgrent ()
-{
- grp_pos = 0;
-}
-
-int
-getgroups (int gidsetsize, gid_t *grouplist, gid_t gid, const char *username)
-{
- if (!group_in_memory_p)
- read_etc_group();
-
- int cnt = 0;
-
- for (int i = 0; i < curr_lines; ++i)
- if (gid == group_buf[i].gr_gid)
- {
- if (cnt < gidsetsize)
- grouplist[cnt] = group_buf[i].gr_gid;
- ++cnt;
- if (gidsetsize && cnt > gidsetsize)
- goto error;
- }
- else if (group_buf[i].gr_mem)
- for (int gi = 0; group_buf[i].gr_mem[gi]; ++gi)
- if (strcasematch (username, group_buf[i].gr_mem[gi]))
- {
- if (cnt < gidsetsize)
- grouplist[cnt] = group_buf[i].gr_gid;
- ++cnt;
- if (gidsetsize && cnt > gidsetsize)
- goto error;
- }
- return cnt;
-
-error:
- set_errno (EINVAL);
- return -1;
-}
-
-extern "C"
-int
-getgroups (int gidsetsize, gid_t *grouplist)
-{
- return getgroups (gidsetsize, grouplist, myself->gid, cygheap->user.name ());
-}
-
-extern "C"
-int
-initgroups (const char *, gid_t)
-{
- return 0;
-}
diff --git a/winsup/cygwin/heap.cc b/winsup/cygwin/heap.cc
deleted file mode 100644
index db3edb00f..000000000
--- a/winsup/cygwin/heap.cc
+++ /dev/null
@@ -1,143 +0,0 @@
-/* heap.cc: Cygwin heap manager.
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <errno.h>
-#include "cygerrno.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "heap.h"
-#include "shared_info.h"
-
-#define assert(x)
-
-static unsigned page_const = 0;
-
-static __inline__ int
-getpagesize(void)
-{
- SYSTEM_INFO si;
- GetSystemInfo(&si);
- return (int)si.dwPageSize;
-}
-
-/* Initialize the heap at process start up. */
-
-void
-heap_init ()
-{
- /* 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 = getpagesize();
- if (brkbase)
- {
- DWORD chunk = brkchunk; /* allocation chunk */
- /* total size commited in parent */
- DWORD allocsize = (char *) brktop - (char *) brkbase;
- /* round up by chunk size */
- DWORD reserve_size = chunk * ((allocsize + (chunk - 1)) / chunk);
-
- /* Loop until we've managed to reserve an adequate amount of memory. */
- char *p;
- for (;;)
- {
- p = (char *) VirtualAlloc (brkbase, reserve_size,
- MEM_RESERVE, PAGE_READWRITE);
- if (p)
- break;
- if ((reserve_size -= page_const) <= allocsize)
- break;
- }
- if (p == NULL)
- api_fatal ("1. unable to allocate heap, heap_chunk_size %d, pid %d, %E",
- brkchunk, myself->pid);
- if (p != brkbase)
- api_fatal ("heap allocated but not at %p", brkbase);
- if (! VirtualAlloc (brkbase, allocsize, MEM_COMMIT, PAGE_READWRITE))
- api_fatal ("MEM_COMMIT failed, %E");
- }
- else
- {
- /* Initialize page mask and default heap size. Preallocate a heap
- * to assure contiguous memory. */
- brk = brktop = brkbase = VirtualAlloc(NULL, brkchunk, MEM_RESERVE, PAGE_NOACCESS);
- if (brkbase == NULL)
- api_fatal ("2. unable to allocate heap, heap_chunk_size %d, %E",
- brkchunk);
- }
-
- debug_printf ("heap base %p, heap top %p", brkbase, brktop);
- 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)
-{
- sigframe thisframe (mainthread);
- char *newtop, *newbrk;
- unsigned commitbytes, newbrksize;
-
- if (n == 0)
- return brk; /* Just wanted to find current brk address */
-
- newbrk = (char *) brk + n; /* Where new brk will be */
- newtop = (char *) pround (newbrk); /* Actual top of allocated memory -
- on page boundary */
-
- if (newtop == brktop)
- goto good;
-
- if (n < 0)
- { /* Freeing memory */
- assert(newtop < brktop);
- n = (char *) brktop - newtop;
- if (VirtualFree(newtop, n, MEM_DECOMMIT)) /* Give it back to OS */
- goto good; /* Didn't take */
- else
- goto err;
- }
-
- assert(newtop > brktop);
-
- /* 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. */
- commitbytes = pround (newtop - (char *) brktop);
- if (VirtualAlloc(brktop, 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 brkchunk or the requested
- amount. Then attempt to actually allocate it. */
-
- if ((newbrksize = brkchunk) < commitbytes)
- newbrksize = commitbytes;
-
- if ((VirtualAlloc(brktop, newbrksize, MEM_RESERVE, PAGE_NOACCESS) != NULL) &&
- (VirtualAlloc(brktop, commitbytes, MEM_COMMIT, PAGE_READWRITE) != NULL))
- goto good;
-
-err:
- set_errno (ENOMEM);
- return (void *) -1;
-
-good:
- void *oldbrk = brk;
- brk = newbrk;
- brktop = newtop;
- return oldbrk;
-}
diff --git a/winsup/cygwin/heap.h b/winsup/cygwin/heap.h
deleted file mode 100644
index 110e03763..000000000
--- a/winsup/cygwin/heap.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* heap.h: Cygwin heap manager definitions.
-
- Copyright 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "perprocess.h"
-
-/* Heap management. */
-void heap_init (void);
-void malloc_init (void);
-
-#define inheap(s) (brk && ((char *) (s) >= (char *) brkbase) && ((char *) (s) <= (char *) brktop))
-
-#define brksize ((char *) user_data->heaptop - (char *) user_data->heapbase)
-#define brk (user_data->heapptr)
-#define brkbase (user_data->heapbase)
-#define brktop (user_data->heaptop)
-#define brkchunk (cygwin_shared->heap_chunk_size ())
-
diff --git a/winsup/cygwin/host_dependent.h b/winsup/cygwin/host_dependent.h
deleted file mode 100644
index 94e1546ca..000000000
--- a/winsup/cygwin/host_dependent.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* host_dependent.h: host dependent Cygwin header file.
-
- 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. */
-
-/* Portions of the cygwin DLL require special constants whose values
- are dependent on the host system. Rather than dynamically
- determine those values whenever they are required, initialize these
- values once at process start-up. */
-
-class host_dependent_constants
-{
- public:
- void init (void);
-
- /* Used by fhandler_disk_file::lock which needs a platform-specific
- upper word value for locking entire files. */
- DWORD win32_upper;
-
- /* fhandler_base::open requires host dependent file sharing
- attributes. */
- int shared;
-};
-
-extern host_dependent_constants host_dependent;
diff --git a/winsup/cygwin/include/a.out.h b/winsup/cygwin/include/a.out.h
deleted file mode 100644
index 493c63cce..000000000
--- a/winsup/cygwin/include/a.out.h
+++ /dev/null
@@ -1,421 +0,0 @@
-#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 7d39a3e7a..000000000
--- 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 5b6966ce3..000000000
--- a/winsup/cygwin/include/arpa/inet.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef _ARPA_INET_H
-#define _ARPA_INET_H
-
-#include <netinet/in.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#ifndef __INSIDE_CYGWIN_NET__
-unsigned long inet_addr (const char *);
-int inet_aton (const char *, struct in_addr *);
-unsigned long inet_lnaof (struct in_addr);
-struct in_addr inet_makeaddr (unsigned long , unsigned long);
-unsigned int inet_netof (struct in_addr);
-unsigned int inet_network (const char *);
-char *inet_ntoa (struct in_addr);
-#endif
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _ARPA_INET_H */
diff --git a/winsup/cygwin/include/arpa/telnet.h b/winsup/cygwin/include/arpa/telnet.h
deleted file mode 100644
index 50874765c..000000000
--- 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 5ccd9850a..000000000
--- a/winsup/cygwin/include/asm/byteorder.h
+++ /dev/null
@@ -1,93 +0,0 @@
-#ifndef _I386_BYTEORDER_H
-#define _I386_BYTEORDER_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if 0
-#undef ntohl
-#undef ntohs
-#undef htonl
-#undef htons
-#endif
-
-#ifndef __LITTLE_ENDIAN
-#define __LITTLE_ENDIAN 1234
-#endif
-
-#ifndef __LITTLE_ENDIAN_BITFIELD
-#define __LITTLE_ENDIAN_BITFIELD
-#endif
-
-#if 1
-extern unsigned long int ntohl(unsigned long int);
-extern unsigned short int ntohs(unsigned short int);
-extern unsigned long int htonl(unsigned long int);
-extern unsigned short int htons(unsigned short int);
-
-extern __inline__ unsigned long int __ntohl(unsigned long int);
-extern __inline__ unsigned short int __ntohs(unsigned short int);
-extern __inline__ unsigned long int __constant_ntohl(unsigned long int);
-extern __inline__ unsigned short int __constant_ntohs(unsigned short int);
-
-extern __inline__ unsigned long int
-__ntohl(unsigned long int 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) \
- ((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \
- (((unsigned long int)(x) & 0x0000ff00U) << 8) | \
- (((unsigned long int)(x) & 0x00ff0000U) >> 8) | \
- (((unsigned long int)(x) & 0xff000000U) >> 24)))
-
-extern __inline__ unsigned short int
-__ntohs(unsigned short int x)
-{
- __asm__("xchgb %b0,%h0" /* swap bytes */
- : "=q" (x)
- : "0" (x));
- return x;
-}
-
-#define __constant_ntohs(x) \
- ((unsigned short int)((((unsigned short int)(x) & 0x00ff) << 8) | \
- (((unsigned short int)(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)
-
-#ifdef __OPTIMIZE__
-# 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
-#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 905e81505..000000000
--- a/winsup/cygwin/include/asm/socket.h
+++ /dev/null
@@ -1,58 +0,0 @@
-#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 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)
-
-/*
- * 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 be1177d3c..000000000
--- a/winsup/cygwin/include/asm/types.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#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/cygwin/acl.h b/winsup/cygwin/include/cygwin/acl.h
deleted file mode 100644
index 58b055169..000000000
--- a/winsup/cygwin/include/cygwin/acl.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* cygwin/acl.h header file for Cygwin.
-
- Copyright 1999, 2000 Cygnus Solutions.
- 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
-
-typedef struct acl {
- int a_type; /* entry type */
- uid_t a_id; /* UID | GID */
- mode_t a_perm; /* permissions */
-} aclent_t;
-
-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));
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _CYGWIN_ACL_H */
diff --git a/winsup/cygwin/include/cygwin/core_dump.h b/winsup/cygwin/include/cygwin/core_dump.h
deleted file mode 100644
index 647dc2cb3..000000000
--- a/winsup/cygwin/include/cygwin/core_dump.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* core_dump.h
-
- Copyright 1999 Cygnus Solutions.
-
- 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 37da53d68..000000000
--- a/winsup/cygwin/include/cygwin/cygwin_dll.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* cygwin_dll.h
-
- Copyright 1998, 1999, 2000 Cygnus Solutions
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#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/icmp.h b/winsup/cygwin/include/cygwin/icmp.h
deleted file mode 100644
index 7e7aedccd..000000000
--- 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 fe0b8b4c1..000000000
--- a/winsup/cygwin/include/cygwin/if.h
+++ /dev/null
@@ -1,74 +0,0 @@
-#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_NOTRAILERS 0x20 /* avoid use of trailers */
-#define IFF_RUNNING 0x40 /* resources allocated */
-#define IFF_PROMISC 0x100 /* receive all packets */
-#define IFF_MULTICAST 0x1000 /* Supports multicast */
-
-/*
- * Interface request structure used for socket
- * ioctl's. All interface ioctl's must have parameter
- * definitions which begin with ifr_name. The
- * remainder may be interface specific.
- */
-
-struct ifreq
-{
-#define IFNAMSIZ 16
- union
- {
- char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- } ifr_ifrn;
-
- union {
- struct sockaddr ifru_addr;
- struct sockaddr ifru_broadaddr;
- struct sockaddr ifru_netmask;
- short ifru_flags;
- int ifru_metric;
- int ifru_mtu;
- } 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_netmask ifr_ifru.ifru_netmask /* interface net mask */
-#define ifr_flags ifr_ifru.ifru_flags /* flags */
-
-/*
- * 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 */
-
-#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 ff6952743..000000000
--- a/winsup/cygwin/include/cygwin/in.h
+++ /dev/null
@@ -1,188 +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/types.h>
-
-/* Standard well-defined IP protocols. */
-enum {
- IPPROTO_IP = 0, /* Dummy protocol for TCP */
- 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_RAW = 255, /* Raw IP packets */
- IPPROTO_MAX
-};
-
-/* 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 {
- unsigned int s_addr;
-};
-
-/* Request struct for 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 */
-};
-
-
-/* Structure describing an Internet (IP) socket address. */
-#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */
-struct sockaddr_in {
- short int sin_family; /* Address family */
- unsigned short int 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) ((((long int) (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) ((((long int) (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) ((((long int) (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) ((((long int) (a)) & 0xf0000000) == 0xe0000000)
-#define IN_MULTICAST(a) IN_CLASSD(a)
-#define IN_MULTICAST_NET 0xF0000000
-
-#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xe0000000) == 0xe0000000)
-#define IN_BADCLASS(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
-
-/* Address to accept any incoming messages. */
-#define INADDR_ANY ((unsigned long int) 0x00000000)
-
-/* Address to send to all hosts. */
-#define INADDR_BROADCAST ((unsigned long int) 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) ((((long int) (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_MAX_LOCAL_GROUP 0xe00000ff /* 224.0.0.255 */
-
-/* <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
-
-/*
- * IPv6 definitions as we start to include them. This is just
- * a beginning dont get excited 8)
- */
-
-struct in6_addr
-{
- unsigned char s6_addr[16];
-};
-
-struct sockaddr_in6
-{
- unsigned short sin6_family;
- unsigned short sin6_port;
- unsigned long sin6_flowinfo;
- struct in6_addr sin6_addr;
-};
-
-#endif /* _CYGWIN_IN_H */
diff --git a/winsup/cygwin/include/cygwin/in_systm.h b/winsup/cygwin/include/cygwin/in_systm.h
deleted file mode 100644
index 1a2c1b2e7..000000000
--- 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/ip.h b/winsup/cygwin/include/cygwin/ip.h
deleted file mode 100644
index e4f23c753..000000000
--- a/winsup/cygwin/include/cygwin/ip.h
+++ /dev/null
@@ -1 +0,0 @@
-/* ip.h */
diff --git a/winsup/cygwin/include/cygwin/mtio.h b/winsup/cygwin/include/cygwin/mtio.h
deleted file mode 100644
index 7a9bb7ef5..000000000
--- a/winsup/cygwin/include/cygwin/mtio.h
+++ /dev/null
@@ -1,187 +0,0 @@
-/* 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>
-
-/*
- * 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
- * Cygwin: MT_ISUNKNOWN */
- 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.
- */
- /* the following registers are device dependent */
- long mt_dsreg; /* status register */
- 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;
-};
-
-/* 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_ ? ((x) & 0x02000000) */
-#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) /* data padding */
-#define GMT_HW_ECC(x) ((x) & 0x00080000) /* HW error correction */
-#define GMT_DR_OPEN(x) ((x) & 0x00040000) /* door open (no tape) */
-#define GMT_HW_COMP(x) ((x) & 0x00020000) /* HW compression */
-#define GMT_IM_REP_EN(x) ((x) & 0x00010000) /* immediate report mode */
-/* 16 generic status bits unused */
-
-
-/* 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
-
-/*
- * Constants for mt_type. Not all of these are supported,
- * and these are not all of the ones that are supported.
- */
-#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 */
-
-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_ISEVEREX_FT40A, "Everex FT40A, QIC-40"}, \
- {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 49726fe0e..000000000
--- a/winsup/cygwin/include/cygwin/rdevio.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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/socket.h b/winsup/cygwin/include/cygwin/socket.h
deleted file mode 100644
index fb2feec9e..000000000
--- a/winsup/cygwin/include/cygwin/socket.h
+++ /dev/null
@@ -1,149 +0,0 @@
-#ifndef _CYGWIN_SOCKET_H
-#define _CYGWIN_SOCKET_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-struct sockaddr {
- unsigned short sa_family; /* address family, AF_xxx */
- char sa_data[14]; /* 14 bytes of protocol address */
-};
-
-#include <asm/socket.h> /* arch-dependent defines */
-#include <cygwin/sockios.h> /* the SIOCxxx I/O controls */
-#include <cygwin/uio.h> /* iovec support */
-#include <sys/types.h>
-
-struct linger {
- unsigned short l_onoff; /* Linger active */
- unsigned short l_linger; /* How long to linger for */
-};
-
-struct 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 file descriptor passing) */
- int msg_accrightslen; /* Length of rights list */
-};
-
-/* 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 5
-
-/* 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 */
-
-/* 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 */
-#define IPTOS_LOWDELAY 0x10
-#define IPTOS_THROUGHPUT 0x08
-#define IPTOS_RELIABILITY 0x04
-
-/* 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 WinSock */
-
-#define IP_OPTIONS 1
-#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_TTL 7
-#define IP_TOS 8
-#define IP_DONTFRAGMENT 9
-
-/* IPX options */
-#define IPX_TYPE 1
-
-/* TCP options - this way around because someone left a set in the c library includes */
-#define TCP_NODELAY 0x0001
-#define TCP_MAXSEG 2
-
-/* 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 2e756954e..000000000
--- a/winsup/cygwin/include/cygwin/sockios.h
+++ /dev/null
@@ -1 +0,0 @@
-/* sockios.h */
diff --git a/winsup/cygwin/include/cygwin/types.h b/winsup/cygwin/include/cygwin/types.h
deleted file mode 100644
index 51e349710..000000000
--- a/winsup/cygwin/include/cygwin/types.h
+++ /dev/null
@@ -1 +0,0 @@
-/* types.h */
diff --git a/winsup/cygwin/include/cygwin/uio.h b/winsup/cygwin/include/cygwin/uio.h
deleted file mode 100644
index 18c77ae65..000000000
--- a/winsup/cygwin/include/cygwin/uio.h
+++ /dev/null
@@ -1 +0,0 @@
-/* uio.h */
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
deleted file mode 100644
index 2e1560c7e..000000000
--- a/winsup/cygwin/include/cygwin/version.h
+++ /dev/null
@@ -1,192 +0,0 @@
-/* version.h -- Cygwin version numbers and accompanying documentation.
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* 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
- means of Cygwin versioning: */
-
- /* The DLL major and minor numbers correspond to the "version of
- the Cygwin library". This version is used to track important
- changes to the DLL and is mainly informative in nature. */
-
- /* The current cygwin version is 1.1.0 */
-
-#define CYGWIN_VERSION_DLL_MAJOR 1001
-#define CYGWIN_VERSION_DLL_MINOR 7
-
- /* 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_DLL_VERSION_MAJOR, CYGWIN_DLL_VERSION_MINOR)
-
- /* Every version of cygwin <= this uses an old, incorrect method
- to determine signal masks. */
-
-#define CYGWIN_VERSION_DLL_BAD_SIGNAL_MASK 19005
-
- /* 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_DLL_MAKE_COMBINED (user_data->api_major, user_data->api_minor) <= \
- 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_DLL_MAKE_COMBINED (user_data->api_major, user_data->api_minor) <= \
- 20)
-
-
- /* We used to use the DLL major/minor to track
- non-backward-compatible interface changes to the API. Now we
- use an API major/minor number for this purpose. */
-
- /* 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
- */
-
-#define CYGWIN_VERSION_API_MAJOR 0
-#define CYGWIN_VERSION_API_MINOR 31
-
- /* 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). */
-
-#define CYGWIN_VERSION_SHARED_DATA 3
-
- /* 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.
- */
-
-#define CYGWIN_VERSION_MOUNT_REGISTRY 2
-
- /* Identifiers used in the Win32 registry. */
-
-#define CYGWIN_INFO_CYGNUS_REGISTRY_NAME "Cygnus Solutions"
-#define CYGWIN_INFO_CYGWIN_REGISTRY_NAME "Cygwin"
-#define CYGWIN_INFO_PROGRAM_OPTIONS_NAME "Program Options"
-#define CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME "mounts v2"
-#define CYGWIN_INFO_CYGDRIVE_FLAGS "cygdrive flags"
-#define CYGWIN_INFO_CYGDRIVE_PREFIX "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).
- */
-
diff --git a/winsup/cygwin/include/dlfcn.h b/winsup/cygwin/include/dlfcn.h
deleted file mode 100644
index 753da0277..000000000
--- a/winsup/cygwin/include/dlfcn.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* dlfcn.h
-
- Copyright 1998 Cygnus Solutions
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#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 .... */
-
-/* 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/exceptions.h b/winsup/cygwin/include/exceptions.h
deleted file mode 100644
index 44528bb25..000000000
--- a/winsup/cygwin/include/exceptions.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/* exceptions.h
-
- Copyright 1996, 1997, 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#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 *, void *, CONTEXT *, void *);
-
-typedef struct _exception_list
-{
- struct _exception_list *prev;
- exception_handler *handler;
-
- /* We're apparently free to add more stuff here.
- At present we don't need any. */
-} exception_list;
-
-void init_exceptions (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 90cfab0d4..000000000
--- a/winsup/cygwin/include/fcntl.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _FCNTL_H
-#define _FCNTL_H
-
-#include <sys/fcntl.h>
-#define O_NDELAY _FNDELAY
-
-#endif /* _FCNTL_H */
diff --git a/winsup/cygwin/include/features.h b/winsup/cygwin/include/features.h
deleted file mode 100644
index 206902f7d..000000000
--- a/winsup/cygwin/include/features.h
+++ /dev/null
@@ -1 +0,0 @@
-/* features.h */
diff --git a/winsup/cygwin/include/getopt.h b/winsup/cygwin/include/getopt.h
deleted file mode 100644
index 407a973ce..000000000
--- a/winsup/cygwin/include/getopt.h
+++ /dev/null
@@ -1,66 +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.
- */
-
-#ifndef __GETOPT_H__
-#define __GETOPT_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct option {
- const char *name;
- int has_arg;
- int *flag;
- int val;
-};
-
-extern int opterr; /* if error message should be printed */
-extern int optind; /* index into parent argv vector */
-extern int optopt; /* character checked for validity */
-extern int optreset; /* reset getopt */
-extern char *optarg; /* argument associated with option */
-
-int getopt (int, char * const *, const char *);
-
-int getopt_long (int, char **, char *, struct option *, int *);
-
-#define no_argument 0
-#define required_argument 1
-#define optional_argument 2
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __GETOPT_H__ */
diff --git a/winsup/cygwin/include/glob.h b/winsup/cygwin/include/glob.h
deleted file mode 100644
index 3fdf3e8ae..000000000
--- a/winsup/cygwin/include/glob.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* $NetBSD: glob.h,v 1.6.2.2 1997/11/04 23:38:33 thorpej Exp $ */
-
-/*
- * 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
- */
-
-#ifndef _GLOB_H_
-#define _GLOB_H_
-
-/* CYGNUS LOCAL: end */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-typedef struct {
- int gl_pathc; /* Count of total paths so far. */
- int gl_matchc; /* Count of paths matching pattern. */
- int 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) __P((void *));
- struct dirent *(*gl_readdir) __P((void *));
- void *(*gl_opendir) __P((const char *));
-#ifdef __LIBC12_SOURCE__
- int (*gl_lstat) __P((const char *, struct stat12 *));
- int (*gl_stat) __P((const char *, struct stat12 *));
-#else
- int (*gl_lstat) __P((const char *, struct stat *));
- int (*gl_stat) __P((const char *, struct stat *));
-#endif
-} glob_t;
-
-#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. */
-
-#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. */
-#endif
-
-#define GLOB_NOSPACE (-1) /* Malloc call failed. */
-#define GLOB_ABEND (-2) /* Unignored error. */
-
-__BEGIN_DECLS
-/* CYGNUS LOCAL: normal protos */
-
-#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 *);
-
-#undef DLLEXPORT
-/* end CYGNUS LOCAL */
-__END_DECLS
-
-#endif /* !_GLOB_H_ */
diff --git a/winsup/cygwin/include/icmp.h b/winsup/cygwin/include/icmp.h
deleted file mode 100644
index 7e7aedccd..000000000
--- a/winsup/cygwin/include/icmp.h
+++ /dev/null
@@ -1 +0,0 @@
-/* icmp.h */
diff --git a/winsup/cygwin/include/io.h b/winsup/cygwin/include/io.h
deleted file mode 100644
index e757816b3..000000000
--- a/winsup/cygwin/include/io.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* io.h
-
- Copyright 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#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);
-
-#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 4a5a8f87f..000000000
--- a/winsup/cygwin/include/lastlog.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#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/limits.h b/winsup/cygwin/include/limits.h
deleted file mode 100644
index 397ba2030..000000000
--- a/winsup/cygwin/include/limits.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/* limits.h
-
- Copyright 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _LIMITS_H___
-#ifndef _MACH_MACHLIMITS_H_
-
-/* _MACH_MACHLIMITS_H_ is used on OSF/1. */
-#define _LIMITS_H___
-#define _MACH_MACHLIMITS_H_
-
-/* Number of bits in a `char'. */
-#undef CHAR_BIT
-#define CHAR_BIT 8
-
-/* Maximum length of a multibyte character. */
-#ifndef MB_LEN_MAX
-#define MB_LEN_MAX 1
-#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)
-
-#if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
-/* Minimum and maximum values a `signed long long int' can hold. */
-#ifndef __LONG_LONG_MAX__
-#define __LONG_LONG_MAX__ 9223372036854775807LL
-#endif
-#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
-
-/* Maximum number of iovcnt in a writev */
-#undef IOV_MAX
-#define IOV_MAX (__INT_MAX__-1)
-
-/* Maximum size of ssize_t */
-#undef SSIZE_MAX
-#define SSIZE_MAX (__LONG_MAX__)
-
-/* Maximum length of a path */
-#define PATH_MAX (260 - 1 /*NUL*/)
-
-/* Max num groups for a user, value taken from NT documentation */
-/* Must match <sys/param.h> NGROUPS */
-#define NGROUPS_MAX 16
-
-/* WaitForMultipleObjects can't handle waiting for more than 64 objects.
- This limits how many children we can fork/spawn off. */
-#define CHILD_MAX 63
-
-/* 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. */
-#define _POSIX_ARG_MAX 4096
-#define _POSIX_CHILD_MAX 6
-#define _POSIX_LINK_MAX 8
-#define _POSIX_MAX_CANON 255
-#define _POSIX_MAX_INPUT 255
-#define _POSIX_NAME_MAX 14
-#define _POSIX_NGROUPS_MAX 0
-#define _POSIX_OPEN_MAX 16
-#define _POSIX_PATH_MAX 255
-#define _POSIX_PIPE_BUF 512
-#define _POSIX_SSIZE_MAX 32767
-#define _POSIX_STREAM_MAX 8
-#define _POSIX_TZNAME_MAX 3
-
-#endif /* _MACH_MACHLIMITS_H_ */
-#endif /* _LIMITS_H___ */
diff --git a/winsup/cygwin/include/mapi.h b/winsup/cygwin/include/mapi.h
deleted file mode 100644
index 5e1769f1d..000000000
--- a/winsup/cygwin/include/mapi.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* mapi.h
-
- Copyright 1997, 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#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 dd2bd6cbf..000000000
--- a/winsup/cygwin/include/memory.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#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 eaab27031..000000000
--- a/winsup/cygwin/include/mntent.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#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
-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/net/if.h b/winsup/cygwin/include/net/if.h
deleted file mode 100644
index b7df5264e..000000000
--- a/winsup/cygwin/include/net/if.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#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 f49a94379..000000000
--- a/winsup/cygwin/include/netdb.h
+++ /dev/null
@@ -1,168 +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
-
-/*
- * 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 */
- unsigned long 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 */
-};
-
-/*
- * 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 */
-
-#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);
-#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 8536f551e..000000000
--- a/winsup/cygwin/include/netinet/in.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _NETINET_IN_H
-#define _NETINET_IN_H
-
-#include <cygwin/in.h>
-
-#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 959612279..000000000
--- a/winsup/cygwin/include/netinet/in_systm.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#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 f50d7da2b..000000000
--- a/winsup/cygwin/include/netinet/ip.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _NETINET_IP_H
-#define _NETINET_IP_H
-
-#include <cygwin/ip.h>
-
-#endif /* _NETINET_IP_H */
diff --git a/winsup/cygwin/include/netinet/ip_icmp.h b/winsup/cygwin/include/netinet/ip_icmp.h
deleted file mode 100644
index 547a03a85..000000000
--- a/winsup/cygwin/include/netinet/ip_icmp.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#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 f1ef70107..000000000
--- a/winsup/cygwin/include/netinet/tcp.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _NETINET_TCP_H
-#define _NETINET_TCP_H
-
-/* Maybe add some definitions, someday */
-
-#endif
diff --git a/winsup/cygwin/include/paths.h b/winsup/cygwin/include/paths.h
deleted file mode 100644
index c4180873f..000000000
--- a/winsup/cygwin/include/paths.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _PATHS_H_
-#define _PATHS_H_
-
-#define _PATH_DEV "/dev/"
-#define _PATH_BSHELL "/bin/sh"
-#define _PATH_LASTLOG "/var/log/lastlog"
-#define _PATH_UTMP "/var/run/utmp"
-#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 06fb41ab8..000000000
--- a/winsup/cygwin/include/poll.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <sys/poll.h>
diff --git a/winsup/cygwin/include/pthread.h b/winsup/cygwin/include/pthread.h
deleted file mode 100644
index 90bf5c28c..000000000
--- a/winsup/cygwin/include/pthread.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* pthread.h: POSIX pthread interface
-
- Copyright 1996, 1997, 1998 Cygnus Solutions.
-
- 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>
-
-#ifndef _PTHREAD_H
-#define _PTHREAD_H
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#define TFD(n) void*(*n)(void*)
-
-typedef int pthread_t;
-typedef int pthread_mutex_t;
-typedef int sem_t;
-
-typedef struct pthread_key
- {
- }
-pthread_key_t;
-
-typedef struct pthread_attr
- {
- size_t stacksize;
- }
-pthread_attr_t;
-
-typedef struct pthread_mutexattr
- {
- }
-pthread_mutexattr_t;
-
-/* ThreadCreation */
-int pthread_create (pthread_t * thread, const pthread_attr_t * attr, TFD (function), void *arg);
-int pthread_attr_init (pthread_attr_t * attr);
-int pthread_attr_destroy (pthread_attr_t * attr);
-int pthread_attr_setstacksize (pthread_attr_t * attr, size_t size);
-int pthread_attr_getstacksize (pthread_attr_t * attr, size_t * size);
-
-/* Thread Control */
-int pthread_detach (pthread_t thread);
-int pthread_join (pthread_t thread, void **value_ptr);
-
-/* Thread Exit */
-int pthread_exit (void *value_ptr);
-
-/* Thread SpecificData */
-int pthread_key_create (pthread_key_t * key);
-int pthread_key_delete (pthread_key_t * key);
-int pthread_setspecific (pthread_key_t * key, const void *value);
-void *pthread_getspecific (pthread_key_t * key);
-
-/* Thread signal */
-int pthread_kill (pthread_t * thread, int sig);
-int pthread_sigmask (int operation, const sigset_t * set, sigset_t * old_set);
-
-/* ID */
-pthread_t pthread_self ();
-int pthread_equal (pthread_t t1, pthread_t t2);
-
-/* Mutexes */
-int pthread_mutex_init (pthread_mutex_t * mutex, const pthread_mutexattr_t *);
-int pthread_mutex_lock (pthread_mutex_t * mutext);
-int pthread_mutex_trylock (pthread_mutex_t * mutext);
-int pthread_mutex_unlock (pthread_mutex_t * mutext);
-int pthread_mutex_destroy (pthread_mutex_t * mutext);
-
-/* Solaris Semaphores */
-int sem_init (sem_t * sem, int pshared, unsigned int value);
-int sem_destroy (sem_t * sem);
-int sem_wait (sem_t * sem);
-int sem_trywait (sem_t * sem);
-int sem_post (sem_t * sem);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _PTHREAD_H */
diff --git a/winsup/cygwin/include/strings.h b/winsup/cygwin/include/strings.h
deleted file mode 100644
index e9d2839f2..000000000
--- a/winsup/cygwin/include/strings.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _STRINGS_H
-#define _STRINGS_H
-
-#include <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 3fbef06da..000000000
--- a/winsup/cygwin/include/sys/acl.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* sys/acl.h header file for Cygwin.
-
- Copyright 1999, 2000 Cygnus Solutions.
- 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/cdefs.h b/winsup/cygwin/include/sys/cdefs.h
deleted file mode 100644
index bb99f7d0b..000000000
--- a/winsup/cygwin/include/sys/cdefs.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _SYS_CDEFS_H
-#define _SYS_CDEFS_H
-#ifdef __cplusplus
-#define __BEGIN_DECLS extern "C" {
-#define __END_DECLS }
-#else
-#define __BEGIN_DECLS
-#define __END_DECLS
-#endif
-#define __P(protos) protos /* full-blown ANSI C */
-#endif
-
diff --git a/winsup/cygwin/include/sys/copying.dj b/winsup/cygwin/include/sys/copying.dj
deleted file mode 100644
index b6d105976..000000000
--- 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 2b3370cfa..000000000
--- a/winsup/cygwin/include/sys/cygwin.h
+++ /dev/null
@@ -1,233 +0,0 @@
-#ifndef _SYS_CYGWIN_H
-#define _SYS_CYGWIN_H
-
-#include <sys/types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-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 pid_t cygwin_winpid_to_pid (int);
-extern int cygwin_win32_to_posix_path_list (const char *, char *);
-extern int cygwin_win32_to_posix_path_list_buf_size (const char *);
-extern int cygwin_posix_to_win32_path_list (const char *, char *);
-extern int cygwin_posix_to_win32_path_list_buf_size (const char *);
-extern int cygwin_conv_to_win32_path (const char *, char *);
-extern int cygwin_conv_to_full_win32_path (const char *, char *);
-extern int cygwin_conv_to_posix_path (const char *, char *);
-extern int cygwin_conv_to_full_posix_path (const char *, char *);
-extern int cygwin_posix_path_list_p (const char *);
-extern void cygwin_split_path (const char *, char *, char *);
-
-extern void cygwin_premain0 (int argc, char **argv);
-extern void cygwin_premain1 (int argc, char **argv);
-extern void cygwin_premain2 (int argc, char **argv);
-extern void cygwin_premain3 (int argc, char **argv);
-
-struct __cygwin_perfile
-{
- const char *name;
- unsigned flags;
-};
-
-/* External interface stuff */
-
-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
- } cygwin_getinfo_types;
-
-#define CW_NEXTPID 0x80000000 // or with pid to get next one
-
-/* Flags associated with process_state */
-enum
-{
- PID_IN_USE = 0x0001, // Entry in use.
- PID_ZOMBIE = 0x0002, // Child exited: no parent wait.
- PID_STOPPED = 0x0004, // Waiting for SIGCONT.
- PID_TTYIN = 0x0008, // Waiting for terminal input.
- PID_TTYOU = 0x0010, // Waiting for terminal output.
- PID_ORPHANED = 0x0020, // Member of an orphaned process group.
- PID_ACTIVE = 0x0040, // Pid accepts signals.
- PID_CYGPARENT = 0x0080, // Set if parent was a cygwin app.
- PID_SPLIT_HEAP = 0x0100, // Set if the heap has been split,
- // which means we can't fork again.
- PID_UNUSED = 0x0200, // Flag that pid should be cleared from parent's
- // wait list
- PID_UNUSED1 = 0x0400, // Set if process uses Winsock.
- PID_INITIALIZING = 0x0800, // Set until ready to receive signals.
- PID_USETTY = 0x1000, // Setting this enables or disables cygwin's
- // tty support. This is inherited by
- // all execed or forked processes.
- PID_UNUSED2 = 0x2000, // child has execed
- PID_EXECED = 0x4000, // redirect to original pid info block
- PID_NOREDIR = 0x8000, // don't redirect if execed
- PID_EXITED = 0x80000000 // Free entry.
-};
-
-#ifdef WINVER
-#ifdef _PATH_PASSWD
-extern HANDLE cygwin_logon_user (const struct passwd *, const char *);
-#endif
-
-/* 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 ResourceLocks;
-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 **);
-
- /* 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[3];
-
- /* Heap management. Inherited from parent. */
- void *heapbase; /* bottom of the heap */
- void *heapptr; /* current index into heap */
- void *heaptop; /* current top of heap */
-
- DWORD unused1; /* unused */
-
- /* 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[5];
-
-#ifdef __INSIDE_CYGWIN__
- ResourceLocks *resourcelocks;
- MTinterface *threadinterface;
-#else
- void *resourcelocks;
- void *threadinterface;
-#endif
- struct _reent *impure_ptr;
-};
-#define per_process_overwrite ((unsigned) &(((struct per_process *) NULL)->resourcelocks))
-
-extern void cygwin_set_impersonation_token (const HANDLE);
-
-/* included if <windows.h> is included */
-extern int cygwin32_attach_handle_to_fd (char *, int, HANDLE, mode_t, DWORD);
-extern int cygwin_attach_handle_to_fd (char *, int, HANDLE, mode_t, DWORD);
-
-#include <sys/resource.h>
-
-struct external_pinfo
- {
- pid_t pid;
- pid_t ppid;
- HANDLE hProcess;
- DWORD dwProcessId, dwSpawnedProcessId;
- uid_t uid;
- gid_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;
- HANDLE strace_file;
-
- DWORD process_state;
-};
-
-DWORD cygwin_internal (cygwin_getinfo_types, ...);
-#endif /*WINVER*/
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _SYS_CYGWIN_H */
diff --git a/winsup/cygwin/include/sys/file.h b/winsup/cygwin/include/sys/file.h
deleted file mode 100644
index 79f5f65f5..000000000
--- a/winsup/cygwin/include/sys/file.h
+++ /dev/null
@@ -1,31 +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.
-*/
-
-#ifndef _FILE_H_
-#define _FILE_H_
-
-#include <fcntl.h>
-
-#define L_SET 0
-#define L_CURR 1
-#define L_INCR 1
-#define L_XTND 2
-
-
-#define F_OK 0 /* does file exist */
-#define X_OK 1 /* is it executable by caller */
-#define W_OK 2 /* is it writable by caller */
-#define R_OK 4 /* is it readable by caller */
-
-#endif
diff --git a/winsup/cygwin/include/sys/ioctl.h b/winsup/cygwin/include/sys/ioctl.h
deleted file mode 100644
index 8164de85e..000000000
--- a/winsup/cygwin/include/sys/ioctl.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* sys/ioctl.h */
-
-#ifndef _SYS_IOCTL_H
-#define _SYS_IOCTL_H
-
-#include <sys/cdefs.h>
-
-/* /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 */
-
-__BEGIN_DECLS
-
-int ioctl (int __fd, int __cmd, void *);
-
-__END_DECLS
-
-#endif
diff --git a/winsup/cygwin/include/sys/mman.h b/winsup/cygwin/include/sys/mman.h
deleted file mode 100644
index 244dcdb39..000000000
--- a/winsup/cygwin/include/sys/mman.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#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
-
-#define MAP_FAILED ((caddr_t)-1)
-
-/*
- * Flags for msync.
- */
-#define MS_ASYNC 1
-#define MS_SYNC 2
-#define MS_INVALIDATE 4
-
-extern caddr_t mmap (caddr_t __addr, size_t __len, int __prot, int __flags, int __fd, off_t __off);
-extern int munmap (caddr_t __addr, size_t __len);
-extern int mprotect (caddr_t __addr, size_t __len, int __prot);
-extern int msync (caddr_t __addr, size_t __len, int __flags);
-
-#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 04341f8d6..000000000
--- a/winsup/cygwin/include/sys/mount.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef _SYS_MOUNT_H
-#define _SYS_MOUNT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-enum
-{
- MOUNT_SYMLINK = 0x001, /* "mount point" is a symlink */
- MOUNT_BINARY = 0x002, /* "binary" format read/writes */
- MOUNT_SYSTEM = 0x008, /* mount point came from system table */
- MOUNT_EXEC = 0x010, /* Any file in the mounted directory gets 'x' bit */
- MOUNT_AUTO = 0x020, /* mount point refers to auto device mount */
- MOUNT_CYGWIN_EXEC = 0x040, /* file or directory is or contains a cygwin
- executable */
- MOUNT_MIXED = 0x080, /* reads are text, writes are binary */
-};
-
-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/mtio.h b/winsup/cygwin/include/sys/mtio.h
deleted file mode 100644
index af75e40b2..000000000
--- a/winsup/cygwin/include/sys/mtio.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* 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/poll.h b/winsup/cygwin/include/sys/poll.h
deleted file mode 100644
index 9f9f05d7f..000000000
--- a/winsup/cygwin/include/sys/poll.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* sys/poll.h
-
- Copyright 2000 Cygnus Solutions.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#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;
-};
-
-extern int poll __P ((struct pollfd *fds, unsigned int 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 9b601b377..000000000
--- a/winsup/cygwin/include/sys/procfs.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* 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/resource.h b/winsup/cygwin/include/sys/resource.h
deleted file mode 100644
index a709ec00f..000000000
--- a/winsup/cygwin/include/sys/resource.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef _SYS_RESOURCE_H_
-#define _SYS_RESOURCE_H_
-
-#include <sys/time.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#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 getrusage (int __who, struct rusage *__rusage);
-
-#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 d4e811437..000000000
--- a/winsup/cygwin/include/sys/select.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* select.h
- Copyright 1998 Cygnus Solutions.
-
- 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>
-
-__BEGIN_DECLS
-
-int select __P ((int __n, fd_set *__readfds, fd_set *__writefds,
- fd_set *__exceptfds, struct timeval *__timeout));
-
-__END_DECLS
-
-#endif /* !_POSIX_SOURCE, !__INSIDE_CYGWIN_NET__ */
-
-#endif /* sys/select.h */
diff --git a/winsup/cygwin/include/sys/smallprint.h b/winsup/cygwin/include/sys/smallprint.h
deleted file mode 100644
index 617e12a8c..000000000
--- a/winsup/cygwin/include/sys/smallprint.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#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 a13b55600..000000000
--- a/winsup/cygwin/include/sys/socket.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#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, int *);
- int bind (int, struct sockaddr *__my_addr, int __addrlen);
- int connect (int, const struct sockaddr *, int);
- int getpeername (int, struct sockaddr *__peer, int *);
- int getsockname (int, struct sockaddr *__addr, int *);
- int listen (int, int __n);
- int recv (int, void *__buff, int __len, unsigned int __flags);
- int recvfrom (int, char *__buff, int __len, int __flags,
- struct sockaddr *__from, int *__fromlen);
- int send (int, const void *__buff, int __len, unsigned int __flags);
- int sendto (int, const void *, int, unsigned int, const struct sockaddr *, int);
- int setsockopt (int __s, int __level, int __optname, const void *optval, int __optlen);
- int getsockopt (int __s, int __level, int __optname, void *__optval, int *__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/strace.h b/winsup/cygwin/include/sys/strace.h
deleted file mode 100644
index 37e9758dd..000000000
--- a/winsup/cygwin/include/sys/strace.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* sys/strace.h */
-
-/* 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>
-
-class strace
-{
- int vsprntf (char *buf, const char *func, const char *infmt, va_list ap);
- void write (unsigned category, const char *buf, int count);
-public:
- int microseconds ();
- int version;
- int active;
- int lmicrosec;
- int execing;
- strace() : version(1) {}
- void prntf (unsigned, const char *func, const char *, ...);
- void wm (int message, int word, int lon);
-};
-
-extern strace strace;
-
-#define _STRACE_INTERFACE_ACTIVATE_ADDR -1
-#define _STRACE_INTERFACE_ACTIVATE_ADDR1 -2
-
-/* 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
-
-extern "C" void small_printf (const char *, ...);
-
-#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_strace (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_wrap(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 /* _SYS_STRACE_H */
diff --git a/winsup/cygwin/include/sys/syslog.h b/winsup/cygwin/include/sys/syslog.h
deleted file mode 100644
index 3186804a5..000000000
--- a/winsup/cygwin/include/sys/syslog.h
+++ /dev/null
@@ -1,73 +0,0 @@
-#ifndef _SYS_LOG_H
-#define _SYS_LOG_H
-
-#include <sys/cdefs.h>
-#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)
-
-#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 *, ...);
-
-__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 ecf3a3ae7..000000000
--- a/winsup/cygwin/include/sys/sysmacros.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef _SYS_SYSMACROS_H
-#define _SYS_SYSMACROS_H
-
-#define major(dev) ((int)(((dev) >> 8) & 0xff))
-#define minor(dev) ((int)((dev) & 0xff))
-#define makedev(major, minor) (((major) << 8) | (minor))
-
-#endif /* _SYS_SYSMACROS_H */
diff --git a/winsup/cygwin/include/sys/termio.h b/winsup/cygwin/include/sys/termio.h
deleted file mode 100644
index 75b815146..000000000
--- a/winsup/cygwin/include/sys/termio.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#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 b0dc2e4f3..000000000
--- a/winsup/cygwin/include/sys/termios.h
+++ /dev/null
@@ -1,295 +0,0 @@
-/* sys/termios.h */
-
-#ifndef _SYS_TERMIOS_H
-#define _SYS_TERMIOS_H
-
-#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
-#define CBAUDEX 0x0100f
-#define B57600 0x01001
-#define B115200 0x01002
-#define B128000 0x01003
-#define B256000 0x01003
-#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
-
-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)
-#define cfsetospeed(tp,s) (((tp)->c_ospeed = (s)), 0)
-#define cfsetispeed(tp,s) (((tp)->c_ispeed = (s)), 0)
-
-#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);
-
-#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)
-
-#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 2d313646f..000000000
--- 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 5309a79db..000000000
--- a/winsup/cygwin/include/sys/uio.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#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 {
- caddr_t iov_base;
- int 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 6f49c7b06..000000000
--- a/winsup/cygwin/include/sys/un.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef _SYS_UN_H
-#define _SYS_UN_H
-
-/* POSIX requires only at least 100 bytes */
-#define UNIX_PATH_LEN 108
-
-struct sockaddr_un {
- unsigned short 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/utsname.h b/winsup/cygwin/include/sys/utsname.h
deleted file mode 100644
index bbfa9a6d0..000000000
--- a/winsup/cygwin/include/sys/utsname.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#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 4d3b0b6e0..000000000
--- a/winsup/cygwin/include/sys/vfs.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef _SYS_VFS_H_
-#define _SYS_VFS_H_
-
-struct statfs {
- long f_type; /* type of filesystem (see below) */
- 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 a9648eec2..000000000
--- a/winsup/cygwin/include/sys/wait.h
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef _SYS_WAIT_H
-#define _SYS_WAIT_H
-
-#include <sys/types.h>
-#include <sys/resource.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#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
-
-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 eba0b92dd..000000000
--- 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 ac2c0dc49..000000000
--- a/winsup/cygwin/include/syslog.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#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 8a9b3395f..000000000
--- a/winsup/cygwin/include/termio.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#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 6080f8bce..000000000
--- a/winsup/cygwin/include/tzfile.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _TZFILE_H
-#define _TZFILE_H
-
-#define SECSPERDAY (60*60*24)
-#define DAYSPERNYEAR 365
-#define DAYSPERLYEAR 366
-
-#define isleap(y) (((y) % 4) == 0 && ((y) % 100) != 0 || ((y) % 400) == 0)
-#endif
diff --git a/winsup/cygwin/include/wchar.h b/winsup/cygwin/include/wchar.h
deleted file mode 100644
index 986db9881..000000000
--- a/winsup/cygwin/include/wchar.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* wchar.h
-
- Copyright 1998 Cygnus Solutions
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _WCHAR_H
-#define _WCHAR_H
-
-#include <sys/cdefs.h>
-
-/* Get wchar_t from <stddef.h>. */
-#define __need_wchar_t
-#include <stddef.h>
-
-__BEGIN_DECLS
-
-int wcscmp (const wchar_t *__s1, const wchar_t *__s2);
-size_t wcslen (const wchar_t *__s1);
-
-__END_DECLS
-
-#endif /* _WCHAR_H */
diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc
deleted file mode 100644
index 1f169e9ca..000000000
--- a/winsup/cygwin/init.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/* init.cc for WIN32.
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include "thread.h"
-#include "perprocess.h"
-
-extern HMODULE cygwin_hmodule;
-
-int NO_COPY dynamically_loaded;
-
-extern "C" int
-WINAPI dll_entry (HANDLE h, DWORD reason, void *static_load)
-{
- switch (reason)
- {
- case DLL_PROCESS_ATTACH:
- cygwin_hmodule = (HMODULE) h;
- dynamically_loaded = (static_load == NULL);
- break;
- case DLL_THREAD_ATTACH:
- if (user_data->threadinterface)
- {
- if (!TlsSetValue(user_data->threadinterface->reent_index,
- &user_data->threadinterface->reents))
- api_fatal("Sig proc MT init failed\n");
- }
- break;
- case DLL_PROCESS_DETACH:
- break;
- case DLL_THREAD_DETACH:
-#if 0 // FIXME: REINSTATE SOON
- waitq *w;
- if ((w = waitq_storage.get ()) != NULL)
- {
- if (w->thread_ev != NULL)
- {
- system_printf ("closing %p", w->thread_ev);
- (void) CloseHandle (w->thread_ev);
- }
- memset (w, 0, sizeof(*w)); // FIXME: memory leak
- }
- // FIXME: Need to add other per_thread stuff here
-#endif
- break;
- }
- return 1;
-}
diff --git a/winsup/cygwin/ioctl.cc b/winsup/cygwin/ioctl.cc
deleted file mode 100644
index 50bed772b..000000000
--- a/winsup/cygwin/ioctl.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-/* ioctl.cc: ioctl routines.
-
- Copyright 1996, 1998 Cygnus Solutions.
-
- 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 <sys/ioctl.h>
-#include <errno.h>
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include <sys/termios.h>
-
-extern "C" int
-ioctl (int fd, int cmd, void *buf)
-{
- if (fdtab.not_open (fd))
- {
- set_errno (EBADF);
- return -1;
- }
-
- debug_printf ("fd %d, cmd %x\n", fd, cmd);
- fhandler_base *fh = fdtab[fd];
- if (fh->is_tty () && fh->get_device () != FH_PTYM)
- switch (cmd)
- {
- case TCGETA:
- return tcgetattr (fd, (struct termios *) buf);
- case TCSETA:
- return tcsetattr (fd, TCSANOW, (struct termios *) buf);
- case TCSETAW:
- return tcsetattr (fd, TCSADRAIN, (struct termios *) buf);
- case TCSETAF:
- return tcsetattr (fd, TCSAFLUSH, (struct termios *) buf);
- }
-
- return fh->ioctl (cmd, buf);
-}
diff --git a/winsup/cygwin/lib/_cygwin_crt0_common.cc b/winsup/cygwin/lib/_cygwin_crt0_common.cc
deleted file mode 100644
index 978fcae33..000000000
--- a/winsup/cygwin/lib/_cygwin_crt0_common.cc
+++ /dev/null
@@ -1,99 +0,0 @@
-/* common.cc: common crt0 function for cygwin crt0's.
-
- Copyright 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "perprocess.h"
-#include "cygwin/version.h"
-#include "crt0.h"
-#include <reent.h>
-#include <stdlib.h>
-
-#undef environ
-
-extern "C"
-{
-char **environ;
-void cygwin_crt0 (MainFunc);
-int cygwin_attach_dll (HMODULE, MainFunc);
-int cygwin_attach_noncygwin_dll (HMODULE, MainFunc);
-int main (int, char **, char **);
-struct _reent *_impure_ptr;
-int _fmode;
-
-/* 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__;
- return 1;
-}
-} /* "C" */
diff --git a/winsup/cygwin/lib/crt0.h b/winsup/cygwin/lib/crt0.h
deleted file mode 100644
index 523eedfe2..000000000
--- a/winsup/cygwin/lib/crt0.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* crt0.h: header file for crt0.
-
- Copyright 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-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 1791a4bf2..000000000
--- a/winsup/cygwin/lib/cygwin_attach_dll.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* attach_dll.cc: crt0 for attaching cygwin DLL from a non-cygwin app.
-
- Copyright 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#undef __INSIDE_CYGWIN__
-#include <windows.h>
-#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 d1c76e1f7..000000000
--- a/winsup/cygwin/lib/cygwin_crt0.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* cygwin_crt0.cc: crt0 for cygwin
-
- Copyright 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#undef __INSIDE_CYGWIN__
-#include <windows.h>
-#include <sys/cygwin.h>
-#include "crt0.h"
-
-#define alloca __builtin_alloca
-
-extern void dll_crt0__FP11per_process (struct per_process *) __declspec (dllimport) __attribute ((noreturn));
-
-/* for main module */
-void
-cygwin_crt0 (MainFunc f)
-{
- struct per_process *u;
- if (_cygwin_crt0_common (f, NULL))
- u = NULL; /* Newer DLL. Use DLL internal per_process. */
- else /* Older DLL. Provide a per_process */
- {
- u = (struct per_process *) alloca (sizeof (*u));
- memset (u, 0, sizeof (u));
- (void) _cygwin_crt0_common (f, u);
- }
- dll_crt0__FP11per_process (u); /* 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 6d405b6cd..000000000
--- 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 Cygnus Solutions.
-
-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 43a3c32de..000000000
--- 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 Cygnus Solutions.
-
-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/getopt.c b/winsup/cygwin/lib/getopt.c
deleted file mode 100644
index da7ecfc76..000000000
--- a/winsup/cygwin/lib/getopt.c
+++ /dev/null
@@ -1,391 +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.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "getopt.h"
-
-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 */
-
-static char * __progname (char *);
-int getopt_internal (int, char * const *, const char *);
-
-static char * __progname(nargv0)
- char * nargv0;
-{
- char * tmp = strrchr(nargv0, '/');
- if (tmp) tmp++; else tmp = nargv0;
- return(tmp);
-}
-
-#define BADCH (int)'?'
-#define BADARG (int)':'
-#define EMSG ""
-
-/*
- * getopt --
- * Parse argc/argv argument vector.
- */
-int
-getopt_internal(nargc, nargv, ostr)
- int nargc;
- char * const *nargv;
- const char *ostr;
-{
- static const char *place = EMSG; /* option letter processing */
- char *oli; /* option letter list index */
-
- if (optreset || !*place) { /* update scanning pointer */
- optreset = 0;
- if (optind >= nargc || *(place = nargv[optind]) != '-') {
- place = EMSG;
- return (-1);
- }
- if (place[1] && *++place == '-') { /* found "--" */
- /* ++optind; */
- place = EMSG;
- return (-2);
- }
- } /* option letter okay? */
- if ((optopt = (int)*place++) == (int)':' ||
- !(oli = strchr(ostr, optopt))) {
- /*
- * if the user didn't specify '-' as an option,
- * assume it means -1.
- */
- if (optopt == (int)'-')
- return (-1);
- if (!*place)
- ++optind;
- if (opterr && *ostr != ':')
- (void)fprintf(stderr,
- "%s: illegal option -- %c\n", __progname(nargv[0]), optopt);
- return (BADCH);
- }
- if (*++oli != ':') { /* don't need argument */
- optarg = NULL;
- if (!*place)
- ++optind;
- } else { /* need an argument */
- if (*place) /* no white space */
- optarg = (char *)place;
- else if (nargc <= ++optind) { /* no arg */
- place = EMSG;
- if ((opterr) && (*ostr != ':'))
- (void)fprintf(stderr,
- "%s: option requires an argument -- %c\n",
- __progname(nargv[0]), optopt);
- return (BADARG);
- } else /* white space */
- optarg = nargv[optind];
- place = EMSG;
- ++optind;
- }
- return (optopt); /* dump back option letter */
-}
-
-/*
- * getopt --
- * Parse argc/argv argument vector.
- */
-int
-getopt(nargc, nargv, ostr)
- int nargc;
- char * const *nargv;
- const char *ostr;
-{
- int retval;
-
- if ((retval = getopt_internal(nargc, nargv, ostr)) == -2) {
- retval = -1;
- ++optind;
- }
- return(retval);
-}
-
-/*
- * getopt_long --
- * Parse argc/argv argument vector.
- */
-int
-getopt_long(nargc, nargv, options, long_options, index)
- int nargc;
- char ** nargv;
- char * options;
- struct option * long_options;
- int * index;
-{
- int retval;
-
- if ((retval = getopt_internal(nargc, nargv, options)) == -2) {
- char *current_argv = nargv[optind++] + 2, *has_equal;
- int i, match = -1;
- size_t current_argv_len;
-
- if (*current_argv == '\0') {
- return(-1);
- }
- if ((has_equal = strchr(current_argv, '='))) {
- current_argv_len = has_equal - current_argv;
- has_equal++;
- } else
- current_argv_len = strlen(current_argv);
-
- for (i = 0; long_options[i].name; i++) {
- if (strncmp(current_argv, long_options[i].name, current_argv_len))
- continue;
-
- if (strlen(long_options[i].name) == current_argv_len) {
- match = i;
- break;
- }
- if (match == -1)
- match = i;
- }
- if (match != -1) {
- if (long_options[match].has_arg) {
- if (has_equal)
- optarg = has_equal;
- else
- optarg = nargv[optind++];
- }
- if ((long_options[match].has_arg == 1) && (optarg == NULL)) {
- /* Missing option, leading : indecates no error */
- if ((opterr) && (*options != ':'))
- (void)fprintf(stderr,
- "%s: option requires an argument -- %s\n",
- __progname(nargv[0]), current_argv);
- return (BADARG);
- }
- } else { /* No matching argument */
- if ((opterr) && (*options != ':'))
- (void)fprintf(stderr,
- "%s: illegal option -- %s\n", __progname(nargv[0]), current_argv);
- return (BADCH);
- }
- if (long_options[match].flag) {
- *long_options[match].flag = long_options[match].val;
- retval = 0;
- } else
- retval = long_options[match].val;
- if (index)
- *index = match;
- }
- return(retval);
-}
-/*****************************************************************/
-
-
-
-
-
-
-#include <stdio.h>
-#include "getopt.h"
-
-/* Stuff for getopt */
-static struct option long_options[] = {
- { (char *)"simple", 0, NULL, 's' },
- { (char *)"t", 0, NULL, 't' },
- { (char *)"u", 1, NULL, 'u' },
- { (char *)"v", 0, NULL, 'v' },
- /* Do not reorder the following */
- { (char *)"yy", 0, NULL, 'Y' },
- { (char *)"y", 0, NULL, 'y' },
- { (char *)"zz", 0, NULL, 'z' },
- { (char *)"zzz", 0, NULL, 'Z' },
- { NULL, 0, NULL, 0 }
-};
-extern char * optarg;
-extern int optreset;
-extern int optind;
-
-int test_getopt_long(args, expected_result)
- char ** args, * expected_result;
-{
- char actual_result[256];
- int count, pass, i;
-
- pass = 0;
- optind = 1;
- optreset = 1;
- for (count = 0; args[count]; count++);
- while ((i = getopt_long(count, args, (char *)"ab:", long_options, NULL)) != EOF) {
- switch(i) {
- case 'u':
- if (strcmp(optarg, "bogus")) {
- printf("--u option does not have bogus optarg.\n");
- return(1);
- }
- case 'Y':
- case 's':
- case 't':
- case 'v':
- case 'y':
- case 'z':
- actual_result[pass++] = i;
- break;
- default:
- actual_result[pass++] = '?';
- break;
- }
- }
-
- actual_result[pass] = '\0';
- return(strcmp(actual_result, expected_result));
-
-}
-
-#if 0
-int usage(value)
- int value;
-{
- printf("test_getopt [-d]\n");
- exit(value);
-}
-#endif
-
-#if 0
-
-/*
- * Static arglists for individual tests
- * This is ugly and maybe I should just use a variable arglist
- */
-const char *argv1[] = { "Test simple", "--s", NULL };
-const char *argv2[] = { "Test multiple", "--s", "--t", NULL };
-const char *argv3[] = { "Test optarg with space", "--u", "bogus", NULL };
-const char *argv4[] = { "Test optarg with equal", "--u=bogus", NULL };
-const char *argv5[] = { "Test complex", "--s", "--t", "--u", "bogus", "--v", NULL };
-const char *argv6[] = { "Test exact", "--y", NULL };
-const char *argv7[] = { "Test abbr", "--z", NULL };
-const char *argv8[] = { "Test simple termination", "--z", "foo", "--z", NULL };
-const char *argv9[] = { "Test -- termination", "--z", "--", "--z", NULL };
-
-int debug = 0;
-int main(argc, argv)
- int argc;
- char ** argv;
-{
- int i;
-
- /* Of course if getopt() has a bug this won't work */
- while ((i = getopt(argc, argv, "d")) != EOF) {
- switch(i) {
- case 'd':
- debug++;
- break;
- default:
- usage(1);
- break;
- }
- }
-
- /* Test getopt_long() */
- {
- if (test_getopt_long(argv1, "s")) {
- printf("Test simple failed.\n");
- exit(1);
- }
- }
-
- /* Test multiple arguments */
- {
- if (test_getopt_long(argv2, "st")) {
- printf("Test multiple failed.\n");
- exit(1);
- }
- }
-
- /* Test optarg with space */
- {
- if (test_getopt_long(argv3, "u")) {
- printf("Test optarg with space failed.\n");
- exit(1);
- }
- }
-
- /* Test optarg with equal */
- {
- if (test_getopt_long(argv4, "u")) {
- printf("Test optarg with equal failed.\n");
- exit(1);
- }
- }
-
- /* Test complex */
- {
- if (test_getopt_long(argv5, "stuv")) {
- printf("Test complex failed.\n");
- exit(1);
- }
- }
-
- /* Test that exact matches override abbr matches */
- {
- if (test_getopt_long(argv6, "y")) {
- printf("Test exact failed.\n");
- exit(1);
- }
- }
-
- /* Test that abbr matches are first match. */
- {
- if (test_getopt_long(argv7, "z")) {
- printf("Test abbr failed.\n");
- exit(1);
- }
- }
-
- /* Test that option termination succeeds */
- {
- if (test_getopt_long(argv8, "z")) {
- printf("Test simple termination failed.\n");
- exit(1);
- }
- }
-
- /* Test that "--" termination succeeds */
- {
- if (test_getopt_long(argv9, "z")) {
- printf("Test -- termination failed.\n");
- exit(1);
- }
- }
- exit(0);
-}
-#endif
diff --git a/winsup/cygwin/lib/libcmain.c b/winsup/cygwin/lib/libcmain.c
deleted file mode 100644
index c2b3ef0d3..000000000
--- a/winsup/cygwin/lib/libcmain.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* libcmain.c
-
- Copyright 1996, 1997, 1998, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <windows.h>
-
-/* Allow apps which don't have a main work, as long as they define WinMain */
-int
-main ()
-{
- HMODULE x = GetModuleHandleA(0);
- char *s = GetCommandLineA ();
- STARTUPINFO si;
-
- /* GetCommandLineA returns the entire command line including the
- program name, but WinMain is defined to accept the command
- line without the program name. */
- while (*s != ' ' && *s != '\0')
- ++s;
- while (*s == ' ')
- ++s;
-
- GetStartupInfo (&si);
-
- return WinMain (x, 0, s,
- ((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 b77e02e8e..000000000
--- 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 99aeac916..000000000
--- 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 a89e76ec3..000000000
--- 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 c5b99b918..000000000
--- 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/localtime.c b/winsup/cygwin/localtime.c
deleted file mode 100644
index 9e4a3c22b..000000000
--- a/winsup/cygwin/localtime.c
+++ /dev/null
@@ -1,2247 +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 */
-
-/* CYGNUS LOCAL */
-#include "winsup.h"
-#define lint
-#include <windows.h>
-
-#define USG_COMPAT
-
-/* END CYGNUS LOCAL */
-
-#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 "sys/types.h" /* for time_t */
-#include "stdio.h"
-#include "errno.h"
-#include "limits.h" /* for CHAR_BIT */
-#include "time.h"
-#include "stdlib.h"
-
-#if HAVE_GETTEXT - 0
-#include "libintl.h"
-#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
-#include "sys/param.h"
-#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 */
-
-/*
-** Some ancient errno.h implementations don't declare errno.
-** But some newer errno.h implementations define it as a macro.
-** Fix the former without affecting the latter.
-*/
-#ifndef errno
-extern int errno;
-#endif /* !defined errno */
-
-/*
-** Private function declarations.
-*/
-char * icalloc P((int nelem, int elsize));
-char * icatalloc P((char * old, const char * new));
-char * icpyalloc P((const char * string));
-char * imalloc P((int n));
-void * irealloc P((void * pointer, int size));
-void icfree P((char * pointer));
-void ifree P((char * pointer));
-char * scheck P((const char *string, const char *format));
-
-
-/*
-** Finally, some convenience items.
-*/
-
-#ifndef TRUE
-#define TRUE 1
-#endif /* !defined TRUE */
-
-#ifndef FALSE
-#define FALSE 0
-#endif /* !defined FALSE */
-
-#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/local/etc/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[] = WILDABBR;
-
-static const char gmt[] = "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
-time_t timezone = 0;
-int daylight = 0;
-#endif /* defined USG_COMPAT */
-
-#ifdef ALTZONE
-time_t altzone = 0;
-#endif /* defined ALTZONE */
-
-static long
-detzcode(codep)
-const char * const 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(name, sp)
-register const char * name;
-register struct state * const sp;
-{
- register const char * p;
- register int i;
- register int fid;
-
- 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;
- (void) strcpy(fullname, p);
- (void) strcat(fullname, "/");
- (void) 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(strp)
-register 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(strp, nump, min, max)
-register const char * strp;
-int * const 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(strp, secsp)
-register const char * strp;
-long * const 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(strp, offsetp)
-register const char * strp;
-long * const 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(strp, rulep)
-const char * strp;
-register struct rule * const 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(janfirst, year, rulep, offset)
-const time_t janfirst;
-const int year;
-register const struct rule * const rulep;
-const 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(name, sp, lastditch)
-const char * name;
-register struct state * const 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;
- }
- } 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;
- }
- } 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;
- }
- sp->charcnt = stdlen + 1;
- if (dstlen != 0)
- sp->charcnt += dstlen + 1;
- if ((size_t) sp->charcnt > sizeof sp->chars)
- return -1;
- cp = sp->chars;
- (void) strncpy(cp, stdname, stdlen);
- cp += stdlen;
- *cp++ = '\0';
- if (dstlen != 0) {
- (void) strncpy(cp, dstname, dstlen);
- *(cp + dstlen) = '\0';
- }
- return 0;
-}
-
-static void
-gmtload(sp)
-struct state * const sp;
-{
- if (tzload(gmt, sp) != 0)
- (void) 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 */
-#ifdef _WIN32
-#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 (cp == dst)
- {
- /* In Asian Windows, tz.StandardName may not contain
- the 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 (cp == dst)
- {
- /* In Asian Windows, tz.StandardName may not contain
- the daylight name. */
- strcpy(buf, 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();
- setenv("TZ", buf, 1);
- return;
- }
- }
-#endif
- if (tzload((char *) NULL, lclptr) != 0)
- gmtload(lclptr);
- settzname();
-}
-
-void
-tzset P((void))
-{
- const char * name = getenv("TZ");
-
- if (name == NULL) {
- tzsetwall();
- return;
- }
-
- if (lcl_is_set > 0 && strcmp(lcl_TZname, name) == 0)
- return;
- lcl_is_set = (strlen(name) < sizeof(lcl_TZname));
- if (lcl_is_set)
- (void) strcpy(lcl_TZname, name);
-
-#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 (*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;
- (void) strcpy(lclptr->chars, gmt);
- } else if (tzload(name, lclptr) != 0) {
- if (name[0] == ':' || tzparse(name, lclptr, FALSE) != 0)
- (void) gmtload(lclptr);
- }
- settzname();
-}
-
-/*
-** 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 __attribute__ ((unused)),
- 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 */
-}
-
-struct tm *
-localtime(timep)
-const time_t * const timep;
-{
- tzset();
- localsub(timep, 0L, &tm);
- return &tm;
-}
-
-/*
- * Re-entrant version of localtime
- */
-struct tm *
-localtime_r(timep, tm)
-const time_t * const timep;
-struct tm * tm;
-{
- localsub(timep, 0L, tm);
- return tm;
-}
-
-/*
-** gmtsub is to gmtime as localsub is to localtime.
-*/
-
-static void
-gmtsub(timep, offset, tmp)
-const time_t * const timep;
-const long offset;
-struct tm * const 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 */
-}
-
-struct tm *
-gmtime(timep)
-const time_t * const timep;
-{
- gmtsub(timep, 0L, &tm);
- return &tm;
-}
-
-/*
- * Re-entrant version of gmtime
- */
-struct tm *
-gmtime_r(timep, tm)
-const time_t * const timep;
-struct tm * tm;
-{
- gmtsub(timep, 0L, tm);
- return tm;
-}
-
-#ifdef STD_INSPIRED
-
-struct tm *
-offtime(timep, offset)
-const time_t * const timep;
-const long offset;
-{
- gmtsub(timep, offset, &tm);
- return &tm;
-}
-
-#endif /* defined STD_INSPIRED */
-
-static void
-timesub(timep, offset, sp, tmp)
-const time_t * const timep;
-const long offset;
-register const struct state * const sp;
-register struct tm * const 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 */
-}
-
-char *
-ctime(timep)
-const time_t * const 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));
-}
-
-char *
-ctime_r(timep, buf)
-const time_t * const 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).
-*/
-
-static int
-increment_overflow(number, delta)
-int * number;
-int delta;
-{
- int number0;
-
- number0 = *number;
- *number += delta;
- return (*number < number0) != (delta < 0);
-}
-
-static int
-normalize_overflow(tensptr, unitsptr, base)
-int * const tensptr;
-int * const 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(atmp, btmp)
-register const struct tm * const atmp;
-register const struct tm * const 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(tmp, funcp, offset, okayp, do_norm_secs)
-struct tm * const tmp;
-void (* const funcp) P((const time_t*, long, struct tm*));
-const long offset;
-int * const 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(tmp, funcp, offset, okayp)
-struct tm * const tmp;
-void (* const funcp) P((const time_t*, long, struct tm*));
-const long offset;
-int * const 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(tmp, funcp, offset)
-struct tm * const tmp;
-void (* const 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;
-}
-
-time_t
-mktime(tmp)
-struct tm * const tmp;
-{
- tzset();
- return time1(tmp, localsub, 0L);
-}
-
-#ifdef STD_INSPIRED
-
-time_t
-timelocal(tmp)
-struct tm * const tmp;
-{
- tmp->tm_isdst = -1; /* in case it wasn't initialized */
- return mktime(tmp);
-}
-
-time_t
-timegm(tmp)
-struct tm * const tmp;
-{
- tmp->tm_isdst = 0;
- return time1(tmp, gmtsub, 0L);
-}
-
-time_t
-timeoff(tmp, offset)
-struct tm * const 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.
-*/
-
-long
-gtime(tmp)
-struct tm * const 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(timep)
-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;
-}
-
-time_t
-time2posix(t)
-time_t t;
-{
- tzset();
- return t - leapcorr(&t);
-}
-
-time_t
-posix2time(t)
-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/malloc_wrapper.cc b/winsup/cygwin/malloc_wrapper.cc
deleted file mode 100644
index ad117eb8f..000000000
--- a/winsup/cygwin/malloc_wrapper.cc
+++ /dev/null
@@ -1,246 +0,0 @@
-/* malloc.cc for WIN32.
-
- Copyright 1996, 1997, 1998 Cygnus Solutions.
-
- 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 <stdlib.h>
-#include <assert.h>
-#include "cygheap.h"
-#include "heap.h"
-#include "sync.h"
-#include "perprocess.h"
-
-/* 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 = 0;
-static int use_internal_malloc = 1;
-
-#undef in
-#undef out
-#define in(x)
-#define out(x)
-
-#ifdef MALLOC_DEBUG
-extern "C" void * _sbrk (size_t incr_arg);
-
-#if 0
-extern "C" void *
-_sbrk_r (struct _reent *, size_t incr_arg)
-{
- return _sbrk (incr_arg);
-}
-#endif
-
-extern "C" void *
-_malloc_r (struct _reent *, size_t size)
-{
- export_malloc_called = 1;
- return malloc (size);
-}
-#undef malloc
-
-extern "C" void *
-_calloc_r (struct _reent *, size_t nmemb, size_t size)
-{
- export_malloc_called = 1;
- return calloc (nmemb, size);
-}
-#undef calloc
-
-extern "C" void
-_free_r (struct _reent *, void *p)
-{
- export_malloc_called = 1;
- assert (!incygheap (p));
- assert (inheap (p));
- free (p);
-}
-#undef free
-
-extern "C" void *
-_realloc_r (struct _reent *, void *p, size_t size)
-{
- export_malloc_called = 1;
- assert (!incygheap (p));
- assert (inheap (p));
- return realloc (p, size);
-}
-#undef realloc
-
-extern "C" char *
-strdup_dbg (const char *s, const char *file, int line)
-{
- char *p;
- export_malloc_called = 1;
- if ((p = (char *) malloc_dbg (strlen (s) + 1, file, line)) != NULL)
- strcpy (p, s);
- return p;
-}
-
-#undef strdup
-extern "C" char *
-strdup (const char *s)
-{
- return strdup_dbg (s, __FILE__, __LINE__);
-}
-#else
-/* Call though the application pointer,
- which either points to export_malloc, or the application's
- own version. */
-
-void *
-malloc (size_t size)
-{
- void *res;
- res = user_data->malloc (size);
- return res;
-}
-
-void
-free (void *p)
-{
- user_data->free (p);
-}
-
-void *
-realloc (void *p, size_t size)
-{
- void *res;
- res = user_data->realloc (p, size);
- return res;
-}
-
-void *
-calloc (size_t nmemb, size_t size)
-{
- void *res;
- res = user_data->calloc (nmemb, size);
- return res;
-}
-
-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;
-}
-
-extern "C" char *
-_strdup_r (struct _reent *, const char *s)
-{
- return strdup (s);
-}
-#endif
-
-/* These routines are used by the application if it
- doesn't provide its own malloc. */
-
-extern "C"
-void
-export_free (void *p)
-{
- malloc_printf ("(%p), called by %x", p, ((int *)&p)[-1]);
- if (use_internal_malloc)
- _free_r (_impure_ptr, p);
- else
- user_data->free (p);
-}
-
-extern "C"
-void *
-export_malloc (int size)
-{
- void *res;
- export_malloc_called = 1;
- if (use_internal_malloc)
- res = _malloc_r (_impure_ptr, size);
- else
- res = user_data->malloc (size);
- malloc_printf ("(%d) = %x, called by %x", size, res, ((int *)&size)[-1]);
- return res;
-}
-
-extern "C"
-void *
-export_realloc (void *p, int size)
-{
- void *res;
- if (use_internal_malloc)
- res = _realloc_r (_impure_ptr, p, size);
- else
- res = user_data->realloc (p, size);
- malloc_printf ("(%x, %d) = %x, called by %x", p, size, res, ((int *)&p)[-1]);
- return res;
-}
-
-extern "C"
-void *
-export_calloc (size_t nmemb, size_t size)
-{
- void *res;
- if (use_internal_malloc)
- res = _calloc_r (_impure_ptr, nmemb, size);
- else
- res = user_data->calloc (nmemb, size);
- malloc_printf ("(%d, %d) = %x, called by %x", nmemb, size, res, ((int *)&nmemb)[-1]);
- return res;
-}
-
-/* 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. */
-
-static NO_COPY muto *mprotect = NULL;
-
-void
-malloc_init ()
-{
- mprotect = new_muto (FALSE, "mprotect");
- /* Check if mallock is provided by application. If so, redirect all
- calls to export_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 (!user_data->forkee)
- {
-#ifdef MALLOC_DEBUG
- _free_r (NULL, _malloc_r (NULL, 16));
-#else
- free (malloc (16));
-#endif
- if (!export_malloc_called)
- use_internal_malloc = 0;
- }
-}
-
-extern "C"
-void
-__malloc_lock (struct _reent *)
-{
- mprotect->acquire ();
-}
-
-extern "C"
-void
-__malloc_unlock (struct _reent *)
-{
- mprotect->release ();
-}
diff --git a/winsup/cygwin/mcount.c b/winsup/cygwin/mcount.c
deleted file mode 100644
index dcdbc2b06..000000000
--- 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/misc-std.sgml b/winsup/cygwin/misc-std.sgml
deleted file mode 100644
index 01ac231cd..000000000
--- a/winsup/cygwin/misc-std.sgml
+++ /dev/null
@@ -1,74 +0,0 @@
-<sect1 id="std-misc">
-<title>Compatibility with Miscellaneous Other Standards</title>
-
-<para>The following functions are compatible with miscellaneous other
-standards:</para>
-
-
-<sect2><title>Networking</title>
-
-<para>(Standardized by POSIX 1.g, which is probably still in draft?)</para>
-
-<para>accept, bind, connect, getdomainname, gethostbyaddr,
-gethostbyname, getpeername, getprotobyname, getprotobynumber,
-getservbyname, getservbyport, getsockname, getsockopt, herror, htonl,
-htons, inet_addr, inet_makeaddr, inet_netof, inet_ntoa, listen, ntohl,
-ntohs, rcmd, recv, recvfrom, rexec, rresvport, send, sendto,
-setsockopt, shutdown, socket, socketpair</para>
-
-<para>Of these networking calls, rexec, rcmd and rresvport are
-implemented in MS IP stack but may not be implemented in other
-vendors' stacks. </para>
-
-</sect2>
-
-<sect2><title>Other</title><para>
-
-chroot, closelog, cwait, dlclose, dlerror, dlfork, dlopen, dlsym,
-endgrent, ffs, fstatfs, ftime, get_osfhandle, getdtablesize, getgrent,
-gethostname, getitimer, getmntent, getpagesize, getpgid, getpwent,
-gettimeofday, grantpt, initgroups, ioctl, killpg, login, logout,
-lstat, mknod, memccpy, nice, openlog, pclose, popen, ptsname, putenv,
-random, readv, realpath, regfree, rexec, select, setegid setenv,
-seterrno, seteuid, setitimer, setmntent, setmode, setpassent, setpgrp,
-setpwent, settimeofday, sexecl, sexecle, sexeclp, sexeclpe, sexeclpe,
-sexecp, sexecv, sexecve, sexecvpe, sigpause, spawnl, spawnle, spawnlp,
-spawnlpe, spawnv, spawnve, spawnvp, spawnvpe, srandom, statfs,
-strsignal, strtosigno, swab, syslog, timezone, truncate, ttyslot,
-unlockpt, unsetenv, usleep, utimes, vfork, vhangup, wait3, wait4,
-wcscmp, wcslen, wprintf, writev
-
-</para></sect2>
-<sect2><title>Implementation Notes</title>
-
-<para> <function>initgroups</function> does nothing</para>
-
-<para> <function>chroot</function>, <function>mknod</function>,
-<function>settimeofday</function>, and <function>vhangup</function>
-always return -1 and sets errno to ENOSYS.</para>
-
-<para> <function>nice</function> allows Cygwin programs to alter their
-current runtime priority through the use of its incr argument. Cygwin
-processes can be set to IDLE_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS,
-HIGH_PRIORITY_CLASS, or REALTIME_PRIORITY_CLASS with the
-<function>nice</function> call. NORMAL_PRIORITY_CLASS is the
-default. If you pass a positive number to nice(), then the priority
-level will decrease by one (within the above list of priorities). A
-negative number would make it increase by one. It is not possible to
-change it by more than one at a time without making repeated calls.
-An increment above REALTIME_PRIORITY_CLASS results in the process
-staying at that priority. Likewise, a decrement to
-IDLE_PRIORITY_CLASS has it stay at that priority. Note that in the
-Win32 API, there are 32 priorities. So currently we only give access
-to four of these through <function>nice</function>.</para>
-
-<para> <function>seteuid</function> and <function>setegid</function>
-always return 0 and set errno to
-ENOSYS.</para>
-
-<para><function>vfork</function> just calls
-<function>fork</function></para>
-
-</sect2>
-
-</sect1>
diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc
deleted file mode 100644
index d66c22549..000000000
--- a/winsup/cygwin/miscfuncs.cc
+++ /dev/null
@@ -1,114 +0,0 @@
-/* miscfuncs.cc: misc funcs that don't belong anywhere else
-
- Copyright 1996, 1997, 1998, 1999, 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 "winsup.h"
-
-/********************** String Helper Functions ************************/
-
-char case_folded_lower[] = {
- 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
-};
-
-char case_folded_upper[] = {
- 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
-};
-
-#define ch_case_eq(ch1, ch2) (cyg_tolower(ch1) == cyg_tolower(ch2))
-
-/* Return TRUE if two strings match up to length n */
-extern "C" int __stdcall
-strncasematch (const char *s1, const char *s2, size_t n)
-{
- if (s1 == s2)
- return 1;
-
- n++;
- while (--n && *s1)
- {
- if (!ch_case_eq (*s1, *s2))
- return 0;
- s1++; s2++;
- }
- return !n || *s2 == '\0';
-}
-
-/* Return TRUE if two strings match */
-extern "C" int __stdcall
-strcasematch (const char *s1, const char *s2)
-{
- if (s1 == s2)
- return 1;
-
- while (*s1)
- {
- if (!ch_case_eq (*s1, *s2))
- return 0;
- s1++; s2++;
- }
- return *s2 == '\0';
-}
-
-extern "C" char * __stdcall
-strcasestr (const char *searchee, const char *lookfor)
-{
- if (*searchee == 0)
- {
- if (*lookfor)
- return NULL;
- return (char *) searchee;
- }
-
- while (*searchee)
- {
- int i = 0;
- while (1)
- {
- if (lookfor[i] == 0)
- return (char *) searchee;
-
- if (!ch_case_eq (lookfor[i], searchee[i]))
- break;
- lookfor++;
- }
- searchee++;
- }
-
- return NULL;
-}
diff --git a/winsup/cygwin/mkvers.sh b/winsup/cygwin/mkvers.sh
deleted file mode 100755
index 47cfb27d9..000000000
--- a/winsup/cygwin/mkvers.sh
+++ /dev/null
@@ -1,174 +0,0 @@
-#!/bin/sh
-# mkvers.sh - Make version information for cygwin DLL
-#
-# Copyright 1998, 1999, 2000 Cygnus Solutions.
-#
-# This file is part of Cygwin.
-#
-# This software is a copyrighted work licensed under the terms of the
-# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-# details.
-
-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" -le 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 "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 '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
-# file for a ".snapshot-date" file. If one is found then this information
-# will be saved for output to the DLL.
-#
-dir=`echo $dir | sed -e 's%/include/cygwin.*$%%' -e 's%include/cygwin.*$%.%'`
-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 4de9eb245..000000000
--- a/winsup/cygwin/mmap.cc
+++ /dev/null
@@ -1,600 +0,0 @@
-/* mmap.cc
-
- Copyright 1996, 1997, 1998, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <stddef.h>
-#include <sys/mman.h>
-#include <errno.h>
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygerrno.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "security.h"
-
-/*
- * Simple class used to keep a record of all current
- * mmap areas in a process. Needed so that
- * they can be duplicated after a fork().
- */
-
-class mmap_record
-{
- private:
- HANDLE mapping_handle_;
- DWORD access_mode_;
- DWORD offset_;
- DWORD size_to_map_;
- void *base_address_;
-
- public:
- mmap_record (HANDLE h, DWORD ac, DWORD o, DWORD s, void *b) :
- mapping_handle_ (h), access_mode_ (ac), offset_ (o),
- size_to_map_ (s), base_address_ (b) { ; }
-
- /* Default Copy constructor/operator=/destructor are ok */
-
- /* Simple accessors */
- HANDLE get_handle () const { return mapping_handle_; }
- DWORD get_access () const { return access_mode_; }
- DWORD get_offset () const { return offset_; }
- DWORD get_size () const { return size_to_map_; }
- void *get_address () const { return base_address_; }
-};
-
-class list {
-public:
- mmap_record *recs;
- int nrecs, maxrecs;
- int fd;
- list ();
- ~list ();
- void add_record (mmap_record r);
- void erase (int i);
-};
-
-list::list ()
-{
- recs = (mmap_record *) malloc (10 * sizeof(mmap_record));
- nrecs = 0;
- maxrecs = 10;
- fd = 0;
-}
-
-list::~list ()
-{
- free (recs);
-}
-
-void
-list::add_record (mmap_record r)
-{
- if (nrecs == maxrecs)
- {
- maxrecs += 5;
- recs = (mmap_record *) realloc (recs, maxrecs * sizeof (mmap_record));
- }
- recs[nrecs++] = r;
-}
-
-void
-list::erase (int i)
-{
- for (; i < nrecs-1; i++)
- recs[i] = recs[i+1];
- nrecs--;
-}
-
-class map {
-public:
- list **lists;
- int nlists, maxlists;
- map ();
- ~map ();
- list *get_list_by_fd (int fd);
- list *add_list (list *l, int fd);
- void erase (int i);
-};
-
-map::map ()
-{
- lists = (list **) malloc (10 * sizeof(list *));
- nlists = 0;
- maxlists = 10;
-}
-
-map::~map ()
-{
- free (lists);
-}
-
-list *
-map::get_list_by_fd (int fd)
-{
- int i;
- for (i=0; i<nlists; i++)
- if (lists[i]->fd == fd)
- return lists[i];
- return 0;
-}
-
-list *
-map::add_list (list *l, int fd)
-{
- l->fd = fd;
- if (nlists == maxlists)
- {
- maxlists += 5;
- lists = (list **) realloc (lists, maxlists * sizeof (list *));
- }
- lists[nlists++] = l;
- return lists[nlists-1];
-}
-
-void
-map::erase (int i)
-{
- for (; i < nlists-1; i++)
- lists[i] = lists[i+1];
- nlists--;
-}
-
-/*
- * Code to keep a record of all mmap'ed areas in a process.
- * Needed to duplicate tham in a child of fork().
- * mmap_record classes are kept in an STL list in an STL map, keyed
- * by file descriptor. This is *NOT* duplicated accross a fork(), it
- * needs to be specially handled by the fork code.
- */
-
-static map *mmapped_areas;
-
-extern "C"
-caddr_t
-mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t off)
-{
- syscall_printf ("addr %x, len %d, prot %x, flags %x, fd %d, off %d",
- addr, len, prot, flags, fd, off);
-
- DWORD access = (prot & PROT_WRITE) ? FILE_MAP_WRITE : FILE_MAP_READ;
- if (flags & MAP_PRIVATE)
- access = FILE_MAP_COPY;
-
- SetResourceLock(LOCK_MMAP_LIST,READ_LOCK|WRITE_LOCK," mmap");
-
-#if 0
- /* Windows 95 does not have fixed addresses */
- /*
- * CV: This assumption isn't correct. See Microsoft Platform SDK, Memory,
- * description of call `MapViewOfFileEx'.
- */
- if ((os_being_run != winNT) && (flags & MAP_FIXED))
- {
- set_errno (EINVAL);
- syscall_printf ("-1 = mmap(): win95 and MAP_FIXED");
- return (caddr_t) -1;
- }
-#endif
-
- if (mmapped_areas == NULL)
- {
- /* First mmap call, create STL map */
- mmapped_areas = new map;
- if (mmapped_areas == NULL)
- {
- set_errno (ENOMEM);
- syscall_printf ("-1 = mmap(): ENOMEM");
- return (caddr_t) -1;
- }
- }
-
- fhandler_disk_file fh_paging_file (NULL);
- fhandler_base *fh;
- caddr_t base = addr;
- HANDLE h;
-
- if ((flags & MAP_ANONYMOUS) || fd == -1)
- {
- fh_paging_file.set_io_handle (INVALID_HANDLE_VALUE);
- fh = &fh_paging_file;
- }
- else
- {
- /* Ensure that fd is open */
- if (fdtab.not_open (fd))
- {
- set_errno (EBADF);
- syscall_printf ("-1 = mmap(): EBADF");
- ReleaseResourceLock(LOCK_MMAP_LIST,READ_LOCK|WRITE_LOCK," mmap");
- return (caddr_t) -1;
- }
- fh = fdtab[fd];
- }
-
- h = fh->mmap (&base, len, access, flags, off);
-
- if (h == INVALID_HANDLE_VALUE)
- {
- ReleaseResourceLock(LOCK_MMAP_LIST,READ_LOCK|WRITE_LOCK," mmap");
- return MAP_FAILED;
- }
-
- /* Now we should have a successfully mmaped area.
- Need to save it so forked children can reproduce it.
- */
- mmap_record mmap_rec (h, access, off, len, base);
-
- /* Get list of mmapped areas for this fd, create a new one if
- one does not exist yet.
- */
- list *l = mmapped_areas->get_list_by_fd (fd);
- if (l == 0)
- {
- /* Create a new one */
- l = new list;
- if (l == 0)
- {
- fh->munmap (h, base, len);
- set_errno (ENOMEM);
- syscall_printf ("-1 = mmap(): ENOMEM");
- ReleaseResourceLock(LOCK_MMAP_LIST,READ_LOCK|WRITE_LOCK," mmap");
- return MAP_FAILED;
- }
- l = mmapped_areas->add_list (l, fd);
- }
-
- /* Insert into the list */
- l->add_record (mmap_rec);
-
- syscall_printf ("%x = mmap() succeeded", base);
- ReleaseResourceLock(LOCK_MMAP_LIST,READ_LOCK|WRITE_LOCK," mmap");
- return base;
-}
-
-/* munmap () removes an mmapped area. It insists that base area
- requested is the same as that mmapped, error if not. */
-
-extern "C"
-int
-munmap (caddr_t addr, size_t len)
-{
- syscall_printf ("munmap (addr %x, len %d)", addr, len);
-
- SetResourceLock(LOCK_MMAP_LIST,WRITE_LOCK|READ_LOCK," munmap");
- /* Check if a mmap'ed area was ever created */
- if (mmapped_areas == NULL)
- {
- syscall_printf ("-1 = munmap(): mmapped_areas == NULL");
- set_errno (EINVAL);
- ReleaseResourceLock(LOCK_MMAP_LIST,WRITE_LOCK|READ_LOCK," munmap");
- return -1;
- }
-
- /* Iterate through the map, looking for the mmapped area.
- Error if not found. */
-
- int it;
- for (it = 0; it < mmapped_areas->nlists; ++it)
- {
- list *l = mmapped_areas->lists[it];
- if (l != 0)
- {
- for (int li = 0; li < l->nrecs; ++li)
- {
- mmap_record rec = l->recs[li];
- if (rec.get_address () == addr && rec.get_size () == len)
- {
- int fd = l->fd;
- fhandler_disk_file fh_paging_file (NULL);
- fhandler_base *fh;
-
- if (fd == -1 || fdtab.not_open (fd))
- {
- fh_paging_file.set_io_handle (INVALID_HANDLE_VALUE);
- fh = &fh_paging_file;
- }
- else
- fh = fdtab[fd];
- fh->munmap (rec.get_handle (), addr, len);
-
- /* Delete the entry. */
- l->erase (li);
- syscall_printf ("0 = munmap(): %x", addr);
- ReleaseResourceLock(LOCK_MMAP_LIST,WRITE_LOCK|READ_LOCK," munmap");
- return 0;
- }
- }
- }
- }
-
- set_errno (EINVAL);
- syscall_printf ("-1 = munmap(): EINVAL");
-
- ReleaseResourceLock(LOCK_MMAP_LIST,WRITE_LOCK|READ_LOCK," munmap");
- return -1;
-}
-
-/* Sync file with memory. Ignore flags for now. */
-
-extern "C"
-int
-msync (caddr_t addr, size_t len, int flags)
-{
- syscall_printf ("addr = %x, len = %d, flags = %x",
- addr, len, flags);
-
- /* However, check flags for validity. */
- if ((flags & ~(MS_ASYNC | MS_SYNC | MS_INVALIDATE))
- || ((flags & MS_ASYNC) && (flags & MS_SYNC)))
- {
- syscall_printf ("-1 = msync(): Invalid flags");
- set_errno (EINVAL);
- return -1;
- }
-
- SetResourceLock(LOCK_MMAP_LIST,WRITE_LOCK|READ_LOCK," msync");
- /* Check if a mmap'ed area was ever created */
- if (mmapped_areas == NULL)
- {
- syscall_printf ("-1 = msync(): mmapped_areas == NULL");
- set_errno (EINVAL);
- ReleaseResourceLock(LOCK_MMAP_LIST,WRITE_LOCK|READ_LOCK," msync");
- return -1;
- }
-
- /* Iterate through the map, looking for the mmapped area.
- Error if not found. */
-
- int it;
- for (it = 0; it < mmapped_areas->nlists; ++it)
- {
- list *l = mmapped_areas->lists[it];
- if (l != 0)
- {
- int li;
- for (li = 0; li < l->nrecs; ++li)
- {
- mmap_record rec = l->recs[li];
- if (rec.get_address () == addr)
- {
- int fd = l->fd;
- fhandler_disk_file fh_paging_file (NULL);
- fhandler_base *fh;
-
- if (fd == -1 || fdtab.not_open (fd))
- {
- fh_paging_file.set_io_handle (INVALID_HANDLE_VALUE);
- fh = &fh_paging_file;
- }
- else
- fh = fdtab[fd];
-
- int ret = fh->msync (rec.get_handle (), addr, len, flags);
-
- if (ret)
- syscall_printf ("%d = msync(): %E", ret);
- else
- syscall_printf ("0 = msync()");
-
- ReleaseResourceLock(LOCK_MMAP_LIST,WRITE_LOCK|READ_LOCK," msync");
- return 0;
- }
- }
- }
- }
-
- /* SUSv2: Return code if indicated memory was not mapped is ENOMEM. */
- set_errno (ENOMEM);
- syscall_printf ("-1 = msync(): ENOMEM");
-
- ReleaseResourceLock(LOCK_MMAP_LIST,WRITE_LOCK|READ_LOCK," msync");
- return -1;
-}
-
-/*
- * 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, DWORD access,
- int flags, off_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;
-}
-
-/* Implementation for disk files. */
-HANDLE
-fhandler_disk_file::mmap (caddr_t *addr, size_t len, DWORD access,
- int flags, off_t off)
-{
- DWORD protect;
-
- if (access & FILE_MAP_COPY)
- protect = PAGE_WRITECOPY;
- else if (access & FILE_MAP_WRITE)
- protect = PAGE_READWRITE;
- else
- protect = PAGE_READONLY;
-
- HANDLE h = CreateFileMapping (get_handle(), &sec_none, protect, 0, len, NULL);
- if (h == 0)
- {
- __seterrno ();
- syscall_printf ("-1 = mmap(): CreateFileMapping failed with %E");
- return INVALID_HANDLE_VALUE;
- }
-
- void *base = MapViewOfFileEx (h, access, 0, off, len,
- (flags & MAP_FIXED) ? addr : NULL);
-
- if (!base || ((flags & MAP_FIXED) && base != addr))
- {
- if (!base)
- {
- __seterrno ();
- syscall_printf ("-1 = mmap(): MapViewOfFileEx failed with %E");
- }
- else
- {
- set_errno (EINVAL);
- syscall_printf ("-1 = mmap(): address shift with MAP_FIXED given");
- }
- CloseHandle (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);
- CloseHandle (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;
-}
-
-/* Set memory protection */
-
-extern "C"
-int
-mprotect (caddr_t addr, size_t len, int prot)
-{
- DWORD old_prot;
- DWORD new_prot = 0;
-
- syscall_printf ("mprotect (addr %x, len %d, prot %x)", addr, len, prot);
-
- if (prot == PROT_NONE)
- new_prot = PAGE_NOACCESS;
- else
- {
- switch (prot)
- {
- case PROT_READ | PROT_WRITE | PROT_EXEC:
- new_prot = PAGE_EXECUTE_READWRITE;
- break;
- case PROT_READ | PROT_WRITE:
- new_prot = PAGE_READWRITE;
- break;
- case PROT_READ | PROT_EXEC:
- new_prot = PAGE_EXECUTE_READ;
- break;
- case PROT_READ:
- new_prot = PAGE_READONLY;
- break;
- default:
- syscall_printf ("-1 = mprotect (): invalid prot value");
- set_errno (EINVAL);
- return -1;
- }
- }
-
- if (VirtualProtect (addr, len, new_prot, &old_prot) == 0)
- {
- __seterrno ();
- syscall_printf ("-1 = mprotect (): %E");
- return -1;
- }
-
- syscall_printf ("0 = mprotect ()");
- return 0;
-}
-
-/*
- * 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 ()
-{
-
- debug_printf ("recreate_mmaps_after_fork, mmapped_areas %p", mmapped_areas);
-
- /* Check if a mmapped area was ever created */
- if (mmapped_areas == NULL)
- return 0;
-
- /* Iterate through the map */
- for (int it = 0; it < mmapped_areas->nlists; ++it)
- {
- list *l = mmapped_areas->lists[it];
- if (l != 0)
- {
- int li;
- for (li = 0; li < l->nrecs; ++li)
- {
- mmap_record rec = l->recs[li];
-
- debug_printf ("h %x, access %x, offset %d, size %d, address %p",
- rec.get_handle (), rec.get_access (), rec.get_offset (),
- rec.get_size (), rec.get_address ());
-
- /* Now re-create the MapViewOfFileEx call */
- void *base = MapViewOfFileEx (rec.get_handle (),
- rec.get_access (), 0,
- rec.get_offset (),
- rec.get_size (),
- rec.get_address ());
- if (base != rec.get_address ())
- {
- system_printf ("base address %p fails to match requested address %p",
- rec.get_address ());
- return -1;
- }
- }
- }
- }
-
- debug_printf ("succeeded");
- return 0;
-}
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
deleted file mode 100644
index 65a68bedb..000000000
--- a/winsup/cygwin/net.cc
+++ /dev/null
@@ -1,1824 +0,0 @@
-/* net.cc: network-related routines.
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* #define DEBUG_NEST_ON 1 */
-
-#define __INSIDE_CYGWIN_NET__
-
-#define Win32_Winsock
-#include "winsup.h"
-#include <errno.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include <unistd.h>
-#include <netdb.h>
-#include <fcntl.h>
-#include <winsock2.h>
-#include "cygheap.h"
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "path.h"
-#include "dtable.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "registry.h"
-
-extern "C" {
-int h_errno;
-
-int __stdcall rcmd (char **ahost, unsigned short inport, char *locuser,
- char *remuser, char *cmd, SOCKET *fd2p);
-int __stdcall rexec (char **ahost, unsigned short inport, char *locuser,
- char *password, char *cmd, SOCKET *fd2p);
-int __stdcall rresvport (int *);
-int sscanf (const char *, const char *, ...);
-} /* End of "C" section */
-
-static WSADATA wsadata;
-
-/* Cygwin internal */
-static SOCKET __stdcall
-set_socket_inheritance (SOCKET sock)
-{
- if (os_being_run == winNT)
- (void) SetHandleInformation ((HANDLE) sock, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
- else
- {
- SOCKET newsock;
- if (!DuplicateHandle (hMainProc, (HANDLE) sock, hMainProc, (HANDLE *) &newsock,
- 0, TRUE, DUPLICATE_SAME_ACCESS))
- small_printf ("DuplicateHandle failed %E");
- else
- {
- closesocket (sock);
- sock = newsock;
- }
- }
- return sock;
-}
-
-/* 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);
-}
-
-/* Cygwin internal */
-static void
-dump_protoent (struct protoent *p)
-{
- if (p)
- debug_printf ("protoent %s %x %x", p->p_name, p->p_aliases, p->p_proto);
-}
-
-/* exported as inet_ntoa: BSD 4.3 */
-extern "C" char *
-cygwin_inet_ntoa (struct in_addr in)
-{
- char *res = inet_ntoa (in);
- return res;
-}
-
-/* exported as inet_addr: BSD 4.3 */
-extern "C" unsigned long
-cygwin_inet_addr (const char *cp)
-{
- unsigned long res = inet_addr (cp);
- return res;
-}
-
-/* exported as inet_aton: BSD 4.3
- inet_aton is not exported by wsock32 and ws2_32,
- so it has to be implemented here. */
-extern "C" int
-cygwin_inet_aton (const char *cp, struct in_addr *inp)
-{
- unsigned long res = inet_addr (cp);
- if (res == INADDR_NONE && strcmp (cp, "255.255.255.255"))
- return 0;
- if (inp)
- inp->s_addr = res;
- return 1;
-}
-
-/* undocumented in wsock32.dll */
-extern "C" unsigned int WINAPI inet_network (const char *);
-
-extern "C" unsigned int
-cygwin_inet_network (const char *cp)
-{
- unsigned int res = inet_network (cp);
- return res;
-}
-
-/* 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 struct tl errmap[] =
-{
- {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, NULL, 0}
-};
-
-/* Cygwin internal */
-void
-__set_winsock_errno (const char *fn, int ln)
-{
- int i;
- int why = WSAGetLastError ();
- for (i = 0; errmap[i].w != 0; ++i)
- if (why == errmap[i].w)
- break;
-
- if (errmap[i].w != 0)
- {
- syscall_printf ("%s:%d - %d (%s) -> %d", fn, ln, why, errmap[i].s, errmap[i].e);
- set_errno (errmap[i].e);
- }
- else
- {
- syscall_printf ("%s:%d - unknown error %d", fn, ln, why);
- set_errno (EPERM);
- }
-}
-
-/*
- * Since the member `s' isn't used for debug output we can use it
- * for the error text returned by herror and hstrerror.
- */
-static 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}
-};
-
-/* Cygwin internal */
-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;
-}
-
-/* exported as getprotobyname: standards? */
-extern "C" struct protoent *
-cygwin_getprotobyname (const char *p)
-{
- struct protoent *res = getprotobyname (p);
- if (!res)
- set_winsock_errno ();
-
- dump_protoent (res);
- return res;
-}
-
-/* exported as getprotobynumber: standards? */
-extern "C" struct protoent *
-cygwin_getprotobynumber (int number)
-{
- struct protoent *res = getprotobynumber (number);
- if (!res)
- set_winsock_errno ();
-
- dump_protoent (res);
- return res;
-}
-
-fhandler_socket *
-fdsock (int fd, const char *name, SOCKET soc)
-{
- if (wsadata.wVersion < 512) /* < Winsock 2.0 */
- soc = set_socket_inheritance (soc);
- fhandler_socket *fh = (fhandler_socket *) fdtab.build_fhandler (fd, FH_SOCKET, name);
- fh->set_io_handle ((HANDLE) soc);
- fh->set_flags (O_RDWR);
- fdtab.inc_need_fixup_before ();
- return fh;
-}
-
-/* exported as socket: standards? */
-extern "C" int
-cygwin_socket (int af, int type, int protocol)
-{
- int res = -1;
- SetResourceLock (LOCK_FD_LIST, WRITE_LOCK|READ_LOCK, "socket");
-
- SOCKET soc;
-
- int fd = fdtab.find_unused_handle ();
-
- if (fd < 0)
- set_errno (EMFILE);
- else
- {
- debug_printf ("socket (%d, %d, %d)", af, type, protocol);
-
- soc = socket (AF_INET, type, 0);
-
- if (soc == INVALID_SOCKET)
- {
- set_winsock_errno ();
- goto done;
- }
-
- const char *name;
- if (af == AF_INET)
- name = (type == SOCK_STREAM ? "/dev/tcp" : "/dev/udp");
- else
- name = (type == SOCK_STREAM ? "/dev/streamsocket" : "/dev/dgsocket");
-
- fdsock (fd, name, soc)->set_addr_family (af);
- res = fd;
- }
-
-done:
- syscall_printf ("%d = socket (%d, %d, %d)", res, af, type, protocol);
- ReleaseResourceLock (LOCK_FD_LIST, WRITE_LOCK|READ_LOCK, "socket");
- return res;
-}
-
-/* cygwin internal: map sockaddr into internet domain address */
-
-static int get_inet_addr (const struct sockaddr *in, int inlen,
- struct sockaddr_in *out, int *outlen)
-{
- if (in->sa_family == AF_INET)
- {
- *out = * (sockaddr_in *)in;
- *outlen = inlen;
- return 1;
- }
- else if (in->sa_family == AF_UNIX)
- {
- int fd = _open (in->sa_data, O_RDONLY);
- if (fd == -1)
- return 0;
-
- int ret = 0;
- char buf[32];
- memset (buf, 0, sizeof buf);
- if (read (fd, buf, sizeof buf) != -1)
- {
- sockaddr_in sin;
- sin.sin_family = AF_INET;
- sscanf (buf + strlen (SOCKET_COOKIE), "%hu", &sin.sin_port);
- sin.sin_port = htons (sin.sin_port);
- sin.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
- *out = sin;
- *outlen = sizeof sin;
- ret = 1;
- }
- _close (fd);
- return ret;
- }
- else
- {
- set_errno (EAFNOSUPPORT);
- return 0;
- }
-}
-
-/* exported as sendto: standards? */
-extern "C" int
-cygwin_sendto (int fd,
- const void *buf,
- int len,
- unsigned int flags,
- const struct sockaddr *to,
- int tolen)
-{
- fhandler_socket *h = (fhandler_socket *) fdtab[fd];
- sockaddr_in sin;
- sigframe thisframe (mainthread);
-
- if (get_inet_addr (to, tolen, &sin, &tolen) == 0)
- return -1;
-
- int res = sendto (h->get_socket (), (const char *) buf, len,
- flags, to, tolen);
- if (res == SOCKET_ERROR)
- {
- set_winsock_errno ();
- res = -1;
- }
- return res;
-}
-
-/* exported as recvfrom: standards? */
-extern "C" int
-cygwin_recvfrom (int fd,
- char *buf,
- int len,
- int flags,
- struct sockaddr *from,
- int *fromlen)
-{
- fhandler_socket *h = (fhandler_socket *) fdtab[fd];
- sigframe thisframe (mainthread);
-
- debug_printf ("recvfrom %d", h->get_socket ());
-
- int res = recvfrom (h->get_socket (), buf, len, flags, from, fromlen);
- if (res == SOCKET_ERROR)
- {
- set_winsock_errno ();
- res = -1;
- }
-
- return res;
-}
-
-/* Cygwin internal */
-fhandler_socket *
-get (int fd)
-{
- if (fdtab.not_open (fd))
- {
- set_errno (EINVAL);
- return 0;
- }
-
- return fdtab[fd]->is_socket ();
-}
-
-/* exported as setsockopt: standards? */
-extern "C" int
-cygwin_setsockopt (int fd,
- int level,
- int optname,
- const void *optval,
- int optlen)
-{
- fhandler_socket *h = get (fd);
- int res = -1;
- const char *name = "error";
-
- if (h)
- {
- /* For the following debug_printf */
- switch (optname)
- {
- case SO_DEBUG:
- name="SO_DEBUG";
- break;
- case SO_ACCEPTCONN:
- name="SO_ACCEPTCONN";
- break;
- case SO_REUSEADDR:
- name="SO_REUSEADDR";
- break;
- case SO_KEEPALIVE:
- name="SO_KEEPALIVE";
- break;
- case SO_DONTROUTE:
- name="SO_DONTROUTE";
- break;
- case SO_BROADCAST:
- name="SO_BROADCAST";
- break;
- case SO_USELOOPBACK:
- name="SO_USELOOPBACK";
- break;
- case SO_LINGER:
- name="SO_LINGER";
- break;
- case SO_OOBINLINE:
- name="SO_OOBINLINE";
- break;
- }
-
- res = setsockopt (h->get_socket (), level, optname,
- (const char *) optval, optlen);
-
- if (optlen == 4)
- syscall_printf ("setsockopt optval=%x", *(long *) optval);
-
- if (res)
- set_winsock_errno ();
- }
-
- syscall_printf ("%d = setsockopt (%d, %d, %x (%s), %x, %d)",
- res, fd, level, optname, name, optval, optlen);
- return res;
-}
-
-/* exported as getsockopt: standards? */
-extern "C" int
-cygwin_getsockopt (int fd,
- int level,
- int optname,
- void *optval,
- int *optlen)
-{
- fhandler_socket *h = get (fd);
- int res = -1;
- const char *name = "error";
- if (h)
- {
- /* For the following debug_printf */
- switch (optname)
- {
- case SO_DEBUG:
- name="SO_DEBUG";
- break;
- case SO_ACCEPTCONN:
- name="SO_ACCEPTCONN";
- break;
- case SO_REUSEADDR:
- name="SO_REUSEADDR";
- break;
- case SO_KEEPALIVE:
- name="SO_KEEPALIVE";
- break;
- case SO_DONTROUTE:
- name="SO_DONTROUTE";
- break;
- case SO_BROADCAST:
- name="SO_BROADCAST";
- break;
- case SO_USELOOPBACK:
- name="SO_USELOOPBACK";
- break;
- case SO_LINGER:
- name="SO_LINGER";
- break;
- case SO_OOBINLINE:
- name="SO_OOBINLINE";
- break;
- }
-
- res = getsockopt (h->get_socket (), level, optname,
- (char *) optval, (int *) optlen);
-
- if (res)
- set_winsock_errno ();
- }
-
- syscall_printf ("%d = getsockopt (%d, %d, %x (%s), %x, %d)",
- res, fd, level, optname, name, optval, optlen);
- return res;
-}
-
-/* exported as connect: standards? */
-extern "C" int
-cygwin_connect (int fd,
- const struct sockaddr *name,
- int namelen)
-{
- int res;
- fhandler_socket *sock = get (fd);
- sockaddr_in sin;
- sigframe thisframe (mainthread);
-
- if (get_inet_addr (name, namelen, &sin, &namelen) == 0)
- return -1;
-
- if (!sock)
- {
- res = -1;
- }
- else
- {
- res = connect (sock->get_socket (), (sockaddr *) &sin, namelen);
- if (res)
- {
- /* Special handling for connect to return the correct error code
- when called to early on a non-blocking socket. */
- if (WSAGetLastError () == WSAEWOULDBLOCK)
- WSASetLastError (WSAEINPROGRESS);
-
- set_winsock_errno ();
- }
- }
- return res;
-}
-
-/* exported as getservbyname: standards? */
-extern "C" struct servent *
-cygwin_getservbyname (const char *name, const char *proto)
-{
- struct servent *p = getservbyname (name, proto);
- if (!p)
- set_winsock_errno ();
-
- syscall_printf ("%x = getservbyname (%s, %s)", p, name, proto);
- return p;
-}
-
-/* exported as getservbyport: standards? */
-extern "C" struct servent *
-cygwin_getservbyport (int port, const char *proto)
-{
- struct servent *p = getservbyport (port, proto);
- if (!p)
- set_winsock_errno ();
-
- syscall_printf ("%x = getservbyport (%d, %s)", p, port, proto);
- return p;
-}
-
-extern "C" int
-cygwin_gethostname (char *name, size_t len)
-{
- int PASCAL win32_gethostname (char*, int);
-
- if (wsock32_handle == NULL ||
- win32_gethostname (name, len) == SOCKET_ERROR)
- {
- DWORD local_len = len;
-
- if (!GetComputerNameA (name, &local_len))
- {
- set_winsock_errno ();
- return -1;
- }
- }
- debug_printf ("name %s\n", name);
- h_errno = 0;
- return 0;
-}
-
-/* exported as gethostbyname: standards? */
-extern "C" struct hostent *
-cygwin_gethostbyname (const char *name)
-{
- static unsigned char tmp_addr[4];
- static struct hostent tmp;
- static char *tmp_aliases[1] = {0};
- static char *tmp_addr_list[2] = {0, 0};
- static int a, b, c, d;
-
- if (sscanf (name, "%d.%d.%d.%d", &a, &b, &c, &d) == 4)
- {
- /* 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;
- return &tmp;
- }
-
- struct hostent *ptr = gethostbyname (name);
- if (!ptr)
- {
- set_winsock_errno ();
- set_host_errno ();
- }
- else
- {
- debug_printf ("h_name %s", ptr->h_name);
- h_errno = 0;
- }
- return ptr;
-}
-
-/* exported as accept: standards? */
-extern "C" int
-cygwin_accept (int fd, struct sockaddr *peer, int *len)
-{
- int res = -1;
- sigframe thisframe (mainthread);
-
- fhandler_socket *sock = get (fd);
- if (sock)
- {
- /* 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);
-
- res = accept (sock->get_socket (), peer, len); // can't use a blocking call inside a lock
-
- SetResourceLock (LOCK_FD_LIST, WRITE_LOCK|READ_LOCK, "accept");
-
- int res_fd = fdtab.find_unused_handle ();
- if (res_fd == -1)
- {
- /* FIXME: what is correct errno? */
- set_errno (EMFILE);
- goto done;
- }
- if ((SOCKET) res == (SOCKET) INVALID_SOCKET)
- set_winsock_errno ();
- else
- {
- fdsock (res_fd, sock->get_name (), res);
- res = res_fd;
- }
- }
-done:
- syscall_printf ("%d = accept (%d, %x, %x)", res, fd, peer, len);
- ReleaseResourceLock (LOCK_FD_LIST, WRITE_LOCK|READ_LOCK, "accept");
- return res;
-}
-
-/* exported as bind: standards? */
-extern "C" int
-cygwin_bind (int fd, struct sockaddr *my_addr, int addrlen)
-{
- int res = -1;
-
- fhandler_socket *sock = get (fd);
- if (sock)
- {
- if (my_addr->sa_family == AF_UNIX)
- {
-#define un_addr ((struct sockaddr_un *) my_addr)
- struct sockaddr_in sin;
- int len = sizeof sin;
- int fd;
-
- 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 (sock->get_socket (), (sockaddr *) &sin, len))
- {
- syscall_printf ("AF_UNIX: bind failed %d", get_errno ());
- set_winsock_errno ();
- goto out;
- }
- if (getsockname (sock->get_socket (), (sockaddr *) &sin, &len))
- {
- syscall_printf ("AF_UNIX: getsockname failed %d", get_errno ());
- set_winsock_errno ();
- goto out;
- }
-
- sin.sin_port = ntohs (sin.sin_port);
- debug_printf ("AF_UNIX: socket bound to port %u", sin.sin_port);
-
- /* bind must fail if file system socket object already exists
- so _open () is called with O_EXCL flag. */
- fd = _open (un_addr->sun_path,
- O_WRONLY | O_CREAT | O_EXCL | O_BINARY,
- 0);
- if (fd < 0)
- {
- if (get_errno () == EEXIST)
- set_errno (EADDRINUSE);
- goto out;
- }
-
- char buf[sizeof (SOCKET_COOKIE) + 10];
- __small_sprintf (buf, "%s%u", SOCKET_COOKIE, sin.sin_port);
- len = strlen (buf) + 1;
-
- /* Note that the terminating nul is written. */
- if (_write (fd, buf, len) != len)
- {
- save_errno here;
- _close (fd);
- _unlink (un_addr->sun_path);
- }
- else
- {
- _close (fd);
- chmod (un_addr->sun_path,
- (S_IFSOCK | S_IRWXU | S_IRWXG | S_IRWXO) & ~cygheap->umask);
- res = 0;
- }
-#undef un_addr
- }
- else if (bind (sock->get_socket (), my_addr, addrlen))
- set_winsock_errno ();
- else
- res = 0;
- }
-
-out:
- syscall_printf ("%d = bind (%d, %x, %d)", res, fd, my_addr, addrlen);
- return res;
-}
-
-/* exported as getsockname: standards? */
-extern "C" int
-cygwin_getsockname (int fd, struct sockaddr *addr, int *namelen)
-{
- int res = -1;
-
- fhandler_socket *sock = get (fd);
- if (sock)
- {
- res = getsockname (sock->get_socket (), addr, namelen);
- if (res)
- set_winsock_errno ();
-
- }
- syscall_printf ("%d = getsockname (%d, %x, %d)", res, fd, addr, namelen);
- return res;
-}
-
-/* exported as gethostbyaddr: standards? */
-extern "C" struct hostent *
-cygwin_gethostbyaddr (const char *addr, int len, int type)
-{
- struct hostent *ptr = gethostbyaddr (addr, len, type);
- if (!ptr)
- {
- set_winsock_errno ();
- set_host_errno ();
- }
- else
- {
- debug_printf ("h_name %s", ptr->h_name);
- h_errno = 0;
- }
- return ptr;
-}
-
-/* exported as listen: standards? */
-extern "C" int
-cygwin_listen (int fd, int backlog)
-{
- int res = -1;
-
-
- fhandler_socket *sock = get (fd);
- if (sock)
- {
- res = listen (sock->get_socket (), backlog);
- if (res)
- set_winsock_errno ();
- }
- 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 = -1;
- sigframe thisframe (mainthread);
-
- fhandler_socket *sock = get (fd);
- if (sock)
- {
- res = shutdown (sock->get_socket (), how);
- if (res)
- set_winsock_errno ();
- }
- 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)
-{
- if (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, int *len)
-{
- fhandler_socket *h = (fhandler_socket *) fdtab[fd];
-
- debug_printf ("getpeername %d", h->get_socket ());
- int res = getpeername (h->get_socket (), name, len);
- if (res)
- set_winsock_errno ();
-
- debug_printf ("%d = getpeername %d", res, h->get_socket ());
- return res;
-}
-
-/* exported as recv: standards? */
-extern "C" int
-cygwin_recv (int fd, void *buf, int len, unsigned int flags)
-{
- fhandler_socket *h = (fhandler_socket *) fdtab[fd];
- sigframe thisframe (mainthread);
-
- int res = recv (h->get_socket (), (char *) buf, len, flags);
- if (res == SOCKET_ERROR)
- {
- set_winsock_errno ();
- res = -1;
- }
-
-#if 0
- if (res > 0 && res < 200)
- for (int i=0; i < res; i++)
- system_printf ("%d %x %c", i, ((char *) buf)[i], ((char *) buf)[i]);
-#endif
-
- syscall_printf ("%d = recv (%d, %x, %x, %x)", res, fd, buf, len, flags);
-
- return res;
-}
-
-/* exported as send: standards? */
-extern "C" int
-cygwin_send (int fd, const void *buf, int len, unsigned int flags)
-{
- fhandler_socket *h = (fhandler_socket *) fdtab[fd];
- sigframe thisframe (mainthread);
-
- int res = send (h->get_socket (), (const char *) buf, len, flags);
- if (res == SOCKET_ERROR)
- {
- set_winsock_errno ();
- res = -1;
- }
-
- syscall_printf ("%d = send (%d, %x, %d, %x)", res, fd, buf, len, flags);
-
- return res;
-}
-
-/* getdomainname: standards? */
-extern "C" int
-getdomainname (char *domain, int len)
-{
- /*
- * This works for Win95 only if the machine is configured to use MS-TCP.
- * If a third-party TCP is being used this will fail.
- * FIXME: On Win95, is there a way to portably check the TCP stack
- * in use and include paths for the Domain name in each ?
- * Punt for now and assume MS-TCP on Win95.
- */
- reg_key r (HKEY_LOCAL_MACHINE, KEY_READ,
- (os_being_run != winNT) ? "System" : "SYSTEM",
- "CurrentControlSet", "Services",
- (os_being_run != winNT) ? "MSTCP" : "Tcpip",
- NULL);
-
- /* FIXME: Are registry keys case sensitive? */
- if (r.error () || r.get_string ("Domain", domain, len, "") != ERROR_SUCCESS)
- {
- __seterrno ();
- return -1;
- }
-
- return 0;
-}
-
-/* Cygwin internal */
-/* Fill out an ifconf struct. */
-
-/*
- * IFCONF Windows 2000:
- * Look at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\
- Parameters\Interfaces
- * Each subkey is an interface.
- */
-static void
-get_2k_ifconf (struct ifconf *ifc, int what)
-{
- HKEY key;
- int cnt = 1;
-
- /* Union maps buffer to correct struct */
- struct ifreq *ifr = ifc->ifc_req;
-
- if (RegOpenKeyEx (HKEY_LOCAL_MACHINE,
- "SYSTEM\\"
- "CurrentControlSet\\"
- "Services\\"
- "Tcpip\\"
- "Parameters\\"
- "Interfaces",
- 0, KEY_READ, &key) == ERROR_SUCCESS)
- {
- HKEY ikey;
- unsigned long lip, lnp;
- struct sockaddr_in *sa = NULL;
- char name[256];
- DWORD size;
- char eth[2] = "/", ppp[2] = "/";
-
- for (int idx = 0;
- RegEnumKeyEx (key, idx, name, (size = 256, &size),
- NULL, NULL, 0, NULL) == ERROR_SUCCESS;
- ++idx)
- {
- if (RegOpenKeyEx (key, name, 0, KEY_READ, &ikey) != ERROR_SUCCESS)
- continue;
-
- /* If the "NTEContextList" value not exists, the subkey
- is irrelevant. */
- if (RegQueryValueEx (ikey, "NTEContextList",
- NULL, NULL, NULL, &size) != ERROR_SUCCESS)
- {
- RegCloseKey (ikey);
- continue;
- }
-
- if ((caddr_t) ++ifr > ifc->ifc_buf
- + ifc->ifc_len
- - sizeof (struct ifreq))
- {
- RegCloseKey (ikey);
- break;
- }
-
- char ipaddress[256], netmask[256];
- char dhcpaddress[256], dhcpnetmask[256];
-
- if (RegQueryValueEx (ikey, "IPAddress",
- NULL, NULL,
- (unsigned char *) ipaddress,
- (size = 256, &size)) == ERROR_SUCCESS
- && RegQueryValueEx (ikey, "SubnetMask",
- NULL, NULL,
- (unsigned char *) netmask,
- (size = 256, &size)) == ERROR_SUCCESS)
- {
- /* ppp interfaces don't have the "AddressType" value. */
- if (RegQueryValueEx (ikey, "AddressType",
- NULL, NULL, NULL, &size) == ERROR_SUCCESS)
- {
- ++*eth;
- strcpy (ifr->ifr_name, "eth");
- strcat (ifr->ifr_name, eth);
- }
- else
- {
- ++*ppp;
- strcpy (ifr->ifr_name, "ppp");
- strcat (ifr->ifr_name, ppp);
- }
-
- memset (&ifr->ifr_addr, '\0', sizeof ifr->ifr_addr);
- if (cygwin_inet_addr (ipaddress) == 0L
- && RegQueryValueEx (ikey, "DhcpIPAddress",
- NULL, NULL,
- (unsigned char *) dhcpaddress,
- (size = 256, &size))
- == ERROR_SUCCESS
- && RegQueryValueEx (ikey, "DhcpSubnetMask",
- NULL, NULL,
- (unsigned char *) dhcpnetmask,
- (size = 256, &size))
- == ERROR_SUCCESS)
- {
- switch (what)
- {
- case SIOCGIFCONF:
- case SIOCGIFADDR:
- sa = (struct sockaddr_in *) &ifr->ifr_addr;
- sa->sin_addr.s_addr = cygwin_inet_addr (dhcpaddress);
- break;
- case SIOCGIFBRDADDR:
- lip = cygwin_inet_addr (dhcpaddress);
- lnp = cygwin_inet_addr (dhcpnetmask);
- sa = (struct sockaddr_in *) &ifr->ifr_broadaddr;
- sa->sin_addr.s_addr = lip & lnp | ~lnp;
- break;
- case SIOCGIFNETMASK:
- sa = (struct sockaddr_in *) &ifr->ifr_netmask;
- sa->sin_addr.s_addr =
- cygwin_inet_addr (dhcpnetmask);
- break;
- }
- }
- else
- {
- switch (what)
- {
- case SIOCGIFCONF:
- case SIOCGIFADDR:
- sa = (struct sockaddr_in *) &ifr->ifr_addr;
- sa->sin_addr.s_addr = cygwin_inet_addr (ipaddress);
- break;
- case SIOCGIFBRDADDR:
- lip = cygwin_inet_addr (ipaddress);
- lnp = cygwin_inet_addr (netmask);
- sa = (struct sockaddr_in *) &ifr->ifr_broadaddr;
- sa->sin_addr.s_addr = lip & lnp | ~lnp;
- break;
- case SIOCGIFNETMASK:
- sa = (struct sockaddr_in *) &ifr->ifr_netmask;
- sa->sin_addr.s_addr = cygwin_inet_addr (netmask);
- break;
- }
- }
- sa->sin_family = AF_INET;
- sa->sin_port = 0;
- ++cnt;
- }
-
- RegCloseKey (ikey);
- }
-
- RegCloseKey (key);
- }
-
- /* Set the correct length */
- ifc->ifc_len = cnt * sizeof (struct ifreq);
-}
-
-/*
- * IFCONF Windows NT:
- * 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.
- */
-static void
-get_nt_ifconf (struct ifconf *ifc, int what)
-{
- HKEY key;
- unsigned long lip, lnp;
- struct sockaddr_in *sa = NULL;
- DWORD size;
- int cnt = 1;
- char *binding = (char *) 0;
-
- /* Union maps buffer to correct struct */
- struct ifreq *ifr = ifc->ifc_req;
-
- if (RegOpenKeyEx (HKEY_LOCAL_MACHINE,
- "SYSTEM\\"
- "CurrentControlSet\\"
- "Services\\"
- "Tcpip\\"
- "Linkage",
- 0, KEY_READ, &key) == ERROR_SUCCESS)
- {
- if (RegQueryValueEx (key, "Bind",
- NULL, NULL,
- NULL, &size) == ERROR_SUCCESS)
- {
- binding = (char *) alloca (size);
- if (RegQueryValueEx (key, "Bind",
- NULL, NULL,
- (unsigned char *) binding,
- &size) != ERROR_SUCCESS)
- {
- binding = NULL;
- }
- }
- RegCloseKey (key);
- }
-
- if (binding)
- {
- 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)
- {
- char *ip, *np;
- char dhcpaddress[256], dhcpnetmask[256];
-
- for (ip = ipaddress, np = netmask;
- *ip && *np;
- ip += strlen (ip) + 1, np += strlen (np) + 1)
- {
- if ((caddr_t) ++ifr > ifc->ifc_buf
- + ifc->ifc_len
- - sizeof (struct ifreq))
- break;
-
- if (! strncmp (bp, "NdisWan", 7))
- {
- strcpy (ifr->ifr_name, "ppp");
- strcat (ifr->ifr_name, bp + 7);
- }
- else
- {
- ++*eth;
- strcpy (ifr->ifr_name, "eth");
- strcat (ifr->ifr_name, eth);
- }
- memset (&ifr->ifr_addr, '\0', sizeof ifr->ifr_addr);
- 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)
- {
- switch (what)
- {
- case SIOCGIFCONF:
- case SIOCGIFADDR:
- sa = (struct sockaddr_in *) &ifr->ifr_addr;
- sa->sin_addr.s_addr = cygwin_inet_addr (dhcpaddress);
- break;
- case SIOCGIFBRDADDR:
- lip = cygwin_inet_addr (dhcpaddress);
- lnp = cygwin_inet_addr (dhcpnetmask);
- sa = (struct sockaddr_in *) &ifr->ifr_broadaddr;
- sa->sin_addr.s_addr = lip & lnp | ~lnp;
- break;
- case SIOCGIFNETMASK:
- sa = (struct sockaddr_in *) &ifr->ifr_netmask;
- sa->sin_addr.s_addr =
- cygwin_inet_addr (dhcpnetmask);
- break;
- }
- }
- else
- {
- switch (what)
- {
- case SIOCGIFCONF:
- case SIOCGIFADDR:
- sa = (struct sockaddr_in *) &ifr->ifr_addr;
- sa->sin_addr.s_addr = cygwin_inet_addr (ip);
- break;
- case SIOCGIFBRDADDR:
- lip = cygwin_inet_addr (ip);
- lnp = cygwin_inet_addr (np);
- sa = (struct sockaddr_in *) &ifr->ifr_broadaddr;
- sa->sin_addr.s_addr = lip & lnp | ~lnp;
- break;
- case SIOCGIFNETMASK:
- sa = (struct sockaddr_in *) &ifr->ifr_netmask;
- sa->sin_addr.s_addr = cygwin_inet_addr (np);
- break;
- }
- }
- sa->sin_family = AF_INET;
- sa->sin_port = 0;
- ++cnt;
- }
- }
- RegCloseKey (key);
- }
- }
-
- /* Set the correct length */
- ifc->ifc_len = cnt * sizeof (struct ifreq);
-}
-
-/*
- * IFCONF Windows 9x:
- * HKLM/Enum/Network/MSTCP/"*"
- * -> Value "Driver" enthält Subkey relativ zu
- * HKLM/System/CurrentControlSet/Class/
- * -> In Subkey "Bindings" die Values aufzählen
- * -> Enthält Subkeys der Form "VREDIR\*"
- * Das * ist ein Subkey relativ zu
- * HKLM/System/CurrentControlSet/Class/Net/
- * HKLM/System/CurrentControlSet/Class/"Driver"
- * -> Value "IPAddress"
- * -> Value "IPMask"
- * HKLM/System/CurrentControlSet/Class/Net/"*"(aus "VREDIR\*")
- * -> Wenn Value "AdapterName" == "MS$PPP" -> ppp interface
- * -> Value "DriverDesc" enthält den Namen
- *
- */
-static void
-get_9x_ifconf (struct ifconf *ifc, int what)
-{
- HKEY key;
- unsigned long lip, lnp;
- struct sockaddr_in *sa = NULL;
- FILETIME update;
- LONG res;
- DWORD size;
- int cnt = 1;
- char ifname[256];
- char eth[2] = "/";
- char ppp[2] = "/";
-
- /* Union maps buffer to correct struct */
- struct ifreq *ifr = ifc->ifc_req;
-
- if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, "Enum\\Network\\MSTCP",
- 0, KEY_READ, &key) != ERROR_SUCCESS)
- {
- /* Set the correct length */
- ifc->ifc_len = cnt * sizeof (struct ifreq);
- return;
- }
-
- for (int i = 0;
- (res = RegEnumKeyEx (key, i, ifname,
- (size = sizeof ifname, &size),
- 0, 0, 0, &update)) != ERROR_NO_MORE_ITEMS;
- ++i)
- {
- HKEY ifkey, subkey;
- char driver[256], classname[256], bindname[256], netname[256];
- char adapter[256], ip[256], np[256];
-
- if (res != ERROR_SUCCESS
- || RegOpenKeyEx (key, ifname, 0,
- KEY_READ, &ifkey) != ERROR_SUCCESS)
- continue;
-
- if (RegQueryValueEx (ifkey, "Driver", 0,
- NULL, (unsigned char *) driver,
- (size = sizeof driver, &size)) != ERROR_SUCCESS)
- {
- RegCloseKey (ifkey);
- continue;
- }
-
- strcpy (classname, "System\\CurrentControlSet\\Services\\Class\\");
- strcat (classname, driver);
- if ((res = RegOpenKeyEx (HKEY_LOCAL_MACHINE, classname,
- 0, KEY_READ, &subkey)) != ERROR_SUCCESS)
- {
- RegCloseKey (ifkey);
- continue;
- }
-
- if (RegQueryValueEx (subkey, "IPAddress", 0,
- NULL, (unsigned char *) ip,
- (size = sizeof ip, &size)) == ERROR_SUCCESS
- && RegQueryValueEx (subkey, "IPMask", 0,
- NULL, (unsigned char *) np,
- (size = sizeof np, &size)) == ERROR_SUCCESS)
- {
- if ((caddr_t)++ifr > ifc->ifc_buf
- + ifc->ifc_len
- - sizeof (struct ifreq))
- goto out;
-
- switch (what)
- {
- case SIOCGIFCONF:
- case SIOCGIFADDR:
- sa = (struct sockaddr_in *) &ifr->ifr_addr;
- sa->sin_addr.s_addr = cygwin_inet_addr (ip);
- break;
- case SIOCGIFBRDADDR:
- lip = cygwin_inet_addr (ip);
- lnp = cygwin_inet_addr (np);
- sa = (struct sockaddr_in *) &ifr->ifr_broadaddr;
- sa->sin_addr.s_addr = lip & lnp | ~lnp;
- break;
- case SIOCGIFNETMASK:
- sa = (struct sockaddr_in *) &ifr->ifr_netmask;
- sa->sin_addr.s_addr = cygwin_inet_addr (np);
- break;
- }
- sa->sin_family = AF_INET;
- sa->sin_port = 0;
- }
-
- RegCloseKey (subkey);
-
- if (RegOpenKeyEx (ifkey, "Bindings",
- 0, KEY_READ, &subkey) != ERROR_SUCCESS)
- {
- RegCloseKey (ifkey);
- --ifr;
- continue;
- }
-
- for (int j = 0;
- (res = RegEnumValue (subkey, j, bindname,
- (size = sizeof bindname, &size),
- 0, NULL, NULL, NULL)) != ERROR_NO_MORE_ITEMS;
- ++j)
- if (!strncasecmp (bindname, "VREDIR\\", 7))
- break;
-
- RegCloseKey (subkey);
-
- if (res == ERROR_SUCCESS)
- {
- strcpy (netname, "System\\CurrentControlSet\\Services\\Class\\Net\\");
- strcat (netname, bindname + 7);
-
- if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, netname,
- 0, KEY_READ, &subkey) != ERROR_SUCCESS)
- {
- RegCloseKey (ifkey);
- --ifr;
- continue;
- }
-
- if (RegQueryValueEx (subkey, "AdapterName", 0,
- NULL, (unsigned char *) adapter,
- (size = sizeof adapter, &size)) == ERROR_SUCCESS
- && !strcasecmp (adapter, "MS$PPP"))
- {
- ++*ppp;
- strcpy (ifr->ifr_name, "ppp");
- strcat (ifr->ifr_name, ppp);
- }
- else
- {
- ++*eth;
- strcpy (ifr->ifr_name, "eth");
- strcat (ifr->ifr_name, eth);
- }
-
- RegCloseKey (subkey);
-
- }
-
- RegCloseKey (ifkey);
-
- ++cnt;
- }
-
-out:
-
- RegCloseKey (key);
-
- /* Set the correct length */
- ifc->ifc_len = cnt * sizeof (struct ifreq);
-}
-
-int
-get_ifconf (struct ifconf *ifc, int what)
-{
- unsigned long lip, lnp;
- struct sockaddr_in *sa;
-
- /* Union maps buffer to correct struct */
- struct ifreq *ifr = ifc->ifc_req;
-
- /* Ensure we have space for two struct ifreqs, fail if not. */
- if (ifc->ifc_len < (int) (2 * sizeof (struct ifreq)))
- {
- set_errno (EFAULT);
- return -1;
- }
-
- /* Set up interface lo0 first */
- strcpy (ifr->ifr_name, "lo0");
- memset (&ifr->ifr_addr, '\0', sizeof (ifr->ifr_addr));
- switch (what)
- {
- case SIOCGIFCONF:
- case SIOCGIFADDR:
- sa = (struct sockaddr_in *) &ifr->ifr_addr;
- sa->sin_addr.s_addr = htonl (INADDR_LOOPBACK);
- break;
- case SIOCGIFBRDADDR:
- lip = htonl (INADDR_LOOPBACK);
- lnp = cygwin_inet_addr ("255.0.0.0");
- sa = (struct sockaddr_in *) &ifr->ifr_broadaddr;
- sa->sin_addr.s_addr = lip & lnp | ~lnp;
- break;
- case SIOCGIFNETMASK:
- sa = (struct sockaddr_in *) &ifr->ifr_netmask;
- sa->sin_addr.s_addr = cygwin_inet_addr ("255.0.0.0");
- break;
- default:
- set_errno (EINVAL);
- return -1;
- }
- sa->sin_family = AF_INET;
- sa->sin_port = 0;
-
- OSVERSIONINFO os_version_info;
- memset (&os_version_info, 0, sizeof os_version_info);
- os_version_info.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
- GetVersionEx (&os_version_info);
- if (os_version_info.dwPlatformId != VER_PLATFORM_WIN32_NT)
- get_9x_ifconf (ifc, what);
- else if (os_version_info.dwMajorVersion <= 4)
- get_nt_ifconf (ifc, what);
- else
- get_2k_ifconf (ifc, what);
-
- return 0;
-}
-
-/* exported as rcmd: standards? */
-extern "C" int
-cygwin_rcmd (char **ahost, unsigned short inport, char *locuser,
- char *remuser, char *cmd, int *fd2p)
-{
- int res = -1;
- SOCKET fd2s;
- sigframe thisframe (mainthread);
-
- int res_fd = fdtab.find_unused_handle ();
- if (res_fd == -1)
- goto done;
-
- if (fd2p)
- {
- *fd2p = fdtab.find_unused_handle (res_fd + 1);
- if (*fd2p == -1)
- goto done;
- }
-
- res = rcmd (ahost, inport, locuser, remuser, cmd, fd2p? &fd2s: NULL);
- if (res == (int) INVALID_SOCKET)
- goto done;
- else
- {
- fdsock (res_fd, "/dev/tcp", res);
- res = res_fd;
- }
- if (fd2p)
- {
- fdsock (*fd2p, "/dev/tcp", fd2s);
- }
-done:
- syscall_printf ("%d = rcmd (...)", res);
- return res;
-}
-
-/* exported as rresvport: standards? */
-extern "C" int
-cygwin_rresvport (int *port)
-{
- int res = -1;
- sigframe thisframe (mainthread);
-
- int res_fd = fdtab.find_unused_handle ();
- if (res_fd == -1)
- goto done;
- res = rresvport (port);
-
- if (res == (int) INVALID_SOCKET)
- goto done;
- else
- {
- fdsock (res_fd, "/dev/tcp", res);
- res = res_fd;
- }
-done:
- syscall_printf ("%d = rresvport (%d)", res, port ? *port : 0);
- return res;
-}
-
-/* exported as rexec: standards? */
-extern "C" int
-cygwin_rexec (char **ahost, unsigned short inport, char *locuser,
- char *password, char *cmd, int *fd2p)
-{
- int res = -1;
- SOCKET fd2s;
- sigframe thisframe (mainthread);
-
- int res_fd = fdtab.find_unused_handle ();
- if (res_fd == -1)
- goto done;
- if (fd2p)
- {
- *fd2p = fdtab.find_unused_handle (res_fd + 1);
- if (*fd2p == -1)
- goto done;
- }
- res = rexec (ahost, inport, locuser, password, cmd, fd2p ? &fd2s : NULL);
- if (res == (int) INVALID_SOCKET)
- goto done;
- else
- {
- fdsock (res_fd, "/dev/tcp", res);
- res = res_fd;
- }
- if (fd2p)
- fdsock (*fd2p, "/dev/tcp", fd2s);
-
-done:
- syscall_printf ("%d = rexec (...)", res);
- return res;
-}
-
-/* socketpair: standards? */
-/* Win32 supports AF_INET only, so ignore domain and protocol arguments */
-extern "C" int
-socketpair (int, int type, int, int *sb)
-{
- int res = -1;
- SOCKET insock, outsock, newsock;
- struct sockaddr_in sock_in;
- int len = sizeof (sock_in);
-
- SetResourceLock (LOCK_FD_LIST, WRITE_LOCK|READ_LOCK, "socketpair");
-
- sb[0] = fdtab.find_unused_handle ();
- if (sb[0] == -1)
- {
- set_errno (EMFILE);
- goto done;
- }
- sb[1] = fdtab.find_unused_handle (sb[0] + 1);
- if (sb[1] == -1)
- {
- set_errno (EMFILE);
- goto done;
- }
-
- /* create a listening 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;
- }
-
- if (getsockname (newsock, (struct sockaddr *) &sock_in, &len) < 0)
- {
- debug_printf ("getsockname error");
- set_winsock_errno ();
- closesocket (newsock);
- goto done;
- }
-
- 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;
- }
-
- sock_in.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
-
- /* Do a connect and accept the connection */
- if (connect (outsock, (struct sockaddr *) &sock_in,
- sizeof (sock_in)) < 0)
- {
- debug_printf ("connect error");
- set_winsock_errno ();
- closesocket (newsock);
- closesocket (outsock);
- goto done;
- }
-
- 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);
- res = 0;
-
- fdsock (sb[0], "/dev/tcp", insock);
-
- fdsock (sb[1], "/dev/tcp", outsock);
-
-done:
- syscall_printf ("%d = socketpair (...)", res);
- ReleaseResourceLock (LOCK_FD_LIST, WRITE_LOCK|READ_LOCK, "socketpair");
- return res;
-}
-
-/* sethostent: standards? */
-extern "C" void
-sethostent (int)
-{
-}
-
-/* endhostent: standards? */
-extern "C" void
-endhostent (void)
-{
-}
-
-extern "C" void
-wsock_init ()
-{
- 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);
-
- if (FIONBIO != REAL_FIONBIO)
- debug_printf ("**************** FIONBIO != REAL_FIONBIO");
-}
-
diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h
deleted file mode 100644
index 551d39d66..000000000
--- a/winsup/cygwin/ntdll.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/* ntdll.h. Contains ntdll specific stuff which is nowhere defined.
-
- Copyright 2000 Cygnus Solutions.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS) 0xc0000004)
-
-typedef enum _SYSTEM_INFORMATION_CLASS
-{
- SystemBasicInformation = 0,
- SystemProcessesAndThreadsInformation = 5,
- /* 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;
- ULONG NumberProcessors;
-} SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
-
-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;
-} 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;
-
-/* Function declarations for ntdll.dll. These don't appear in any
- standard Win32 header. */
-extern "C"
-{
- NTSTATUS NTAPI NtMapViewOfSection (HANDLE, HANDLE, PVOID *, ULONG, ULONG,
- PLARGE_INTEGER, PULONG, SECTION_INHERIT,
- ULONG, ULONG);
- NTSTATUS NTAPI NtQuerySystemInformation (SYSTEM_INFORMATION_CLASS,
- PVOID, ULONG, PULONG);
- NTSTATUS NTAPI NtOpenSection (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES);
- NTSTATUS NTAPI NtUnmapViewOfSection (HANDLE, PVOID);
- VOID NTAPI RtlInitUnicodeString (PUNICODE_STRING, PCWSTR);
- ULONG NTAPI RtlNtStatusToDosError (NTSTATUS);
- NTSTATUS NTAPI ZwQuerySystemInformation (IN SYSTEM_INFORMATION_CLASS,
- IN OUT PVOID, IN ULONG,
- OUT PULONG);
-}
diff --git a/winsup/cygwin/ntea.cc b/winsup/cygwin/ntea.cc
deleted file mode 100644
index 2c9df4ce6..000000000
--- a/winsup/cygwin/ntea.cc
+++ /dev/null
@@ -1,335 +0,0 @@
-/* ntea.cc: code for manipulating NTEA information
-
- Copyright 1997, 1998, 2000 Cygnus Solutions.
-
- Written 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 <stdio.h>
-#include <stdlib.h>
-#include "security.h"
-
-/* Default to not using NTEA information */
-BOOL allow_ntea = FALSE;
-
-/*
-From Windows NT DDK:
-
-FILE_FULL_EA_INFORMATION provides extended attribute information.
-This structure is used primarily by network drivers.
-
-Members
-
-NextEntryOffset
-The offset of the next FILE_FULL_EA_INFORMATION-type entry. This member is
-zero if no other entries follow this one.
-
-Flags
-Can be zero or can be set with FILE_NEED_EA, indicating that the file to which
-the EA belongs cannot be interpreted without understanding the associated
-extended attributes.
-
-EaNameLength
-The length in bytes of the EaName array. This value does not include a
-zero-terminator to EaName.
-
-EaValueLength
-The length in bytes of each EA value in the array.
-
-EaName
-An array of characters naming the EA for this entry.
-
-Comments
-This structure is longword-aligned. If a set of FILE_FULL_EA_INFORMATION
-entries is buffered, NextEntryOffset value in each entry, except the last,
-falls on a longword boundary.
-The value(s) associated with each entry follows the EaName array. That is, an
-EA's values are located at EaName + (EaNameLength + 1).
-*/
-
-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;
-
-/* Functions prototypes */
-
-int NTReadEA (const char *file, const char *attrname, char *buf, int len);
-static PFILE_FULL_EA_INFORMATION NTReadEARaw (HANDLE file, int *len);
-BOOL NTWriteEA(const char *file, const char *attrname, char *buf, int len);
-
-/*
- * NTReadEA - read file's Extended Attribute.
- *
- * Parameters:
- * file - pointer to filename
- * attrname- pointer to EA name (case insensitivy. EAs are sored in upper
- * case).
- * attrbuf - pointer to buffer to store EA's value.
- * len - length of attrbuf.
- * Return value:
- * 0 - if file or attribute "attrname" not found.
- * N - number of bytes stored in attrbuf if succes.
- * -1 - attrbuf too small for EA value.
- */
-
-int __stdcall
-NTReadEA (const char *file, const char *attrname, char *attrbuf, int len)
-{
- /* return immediately if NTEA usage is turned off */
- if (! allow_ntea)
- return FALSE;
-
- HANDLE hFileSource;
- int eafound = 0;
- PFILE_FULL_EA_INFORMATION ea, sea;
- int easize;
-
- hFileSource = CreateFile (file, FILE_READ_EA,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- &sec_none_nih, // sa
- OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS,
- NULL
- );
-
- if (hFileSource == INVALID_HANDLE_VALUE)
- return 0;
-
- /* Read in raw array of EAs */
- ea = sea = NTReadEARaw (hFileSource, &easize);
-
- /* Search for requested attribute */
- while (sea)
- {
- if (strcasematch (ea->EaName, attrname)) /* EA found */
- {
- if (ea->EaValueLength > len)
- {
- eafound = -1; /* buffer too small */
- break;
- }
- memcpy (attrbuf, ea->EaName + (ea->EaNameLength + 1),
- ea->EaValueLength);
- eafound = ea->EaValueLength;
- break;
- }
- if ((ea->NextEntryOffset == 0) || ((int) ea->NextEntryOffset > easize))
- break;
- ea = (PFILE_FULL_EA_INFORMATION) ((char *) ea + ea->NextEntryOffset);
- }
-
- if (sea)
- free (sea);
- CloseHandle (hFileSource);
-
- return eafound;
-}
-
-/*
- * NTReadEARaw - internal routine to read EAs array to malloced buffer. The
- * caller should free this buffer after usage.
- * Parameters:
- * hFileSource - handle to file. This handle should have FILE_READ_EA
- * rights.
- * len - pointer to int variable where length of buffer will
- * be stored.
- * Return value:
- * pointer to buffer with file's EAs, or NULL if any error occured.
- */
-
-static
-PFILE_FULL_EA_INFORMATION
-NTReadEARaw (HANDLE hFileSource, int *len)
-{
- WIN32_STREAM_ID StreamId;
- DWORD dwBytesWritten;
- LPVOID lpContext;
- DWORD StreamSize;
- PFILE_FULL_EA_INFORMATION eafound = NULL;
-
- lpContext = NULL;
- StreamSize = sizeof (WIN32_STREAM_ID) - sizeof (WCHAR**);
-
- /* Read the WIN32_STREAM_ID in */
-
- while (BackupRead (hFileSource, (LPBYTE) &StreamId, StreamSize,
- &dwBytesWritten,
- FALSE, // don't abort yet
- FALSE, // don't process security
- &lpContext))
- {
- DWORD sl,sh;
-
- if (dwBytesWritten == 0) /* No more Stream IDs */
- break;
- /* skip StreamName */
- if (StreamId.dwStreamNameSize)
- {
- unsigned char *buf;
- buf = (unsigned char *) malloc (StreamId.dwStreamNameSize);
-
- if (buf == NULL)
- break;
-
- if (!BackupRead (hFileSource, buf, // buffer to read
- StreamId.dwStreamNameSize, // num bytes to read
- &dwBytesWritten,
- FALSE, // don't abort yet
- FALSE, // don't process security
- &lpContext)) // Stream name read error
- {
- free (buf);
- break;
- }
- free (buf);
- }
-
- /* Is it EA stream? */
- if (StreamId.dwStreamId == BACKUP_EA_DATA)
- {
- unsigned char *buf;
- buf = (unsigned char *) malloc (StreamId.Size.LowPart);
-
- if (buf == NULL)
- break;
- if (!BackupRead (hFileSource, buf, // buffer to read
- StreamId.Size.LowPart, // num bytes to write
- &dwBytesWritten,
- FALSE, // don't abort yet
- FALSE, // don't process security
- &lpContext))
- {
- free (buf); /* EA read error */
- break;
- }
- eafound = (PFILE_FULL_EA_INFORMATION) buf;
- *len = StreamId.Size.LowPart;
- break;
- }
- /* Skip current stream */
- if (!BackupSeek (hFileSource,
- StreamId.Size.LowPart,
- StreamId.Size.HighPart,
- &sl,
- &sh,
- &lpContext))
- break;
- }
-
- /* free context */
- BackupRead (
- hFileSource,
- NULL, // buffer to write
- 0, // number of bytes to write
- &dwBytesWritten,
- TRUE, // abort
- FALSE, // don't process security
- &lpContext);
-
- return eafound;
-}
-
-/*
- * NTWriteEA - write file's Extended Attribute.
- *
- * Parameters:
- * file - pointer to filename
- * attrname- pointer to EA name (case insensitivy. EAs are sored in upper
- * case).
- * buf - pointer to buffer with EA value.
- * len - length of buf.
- * Return value:
- * TRUE if success, FALSE otherwice.
- * Note: if len=0 given EA will be deleted.
- */
-
-BOOL __stdcall
-NTWriteEA (const char *file, const char *attrname, char *buf, int len)
-{
- /* return immediately if NTEA usage is turned off */
- if (! allow_ntea)
- return TRUE;
-
- HANDLE hFileSource;
- WIN32_STREAM_ID StreamId;
- DWORD dwBytesWritten;
- LPVOID lpContext;
- DWORD StreamSize, easize;
- BOOL bSuccess=FALSE;
- PFILE_FULL_EA_INFORMATION ea;
-
- hFileSource = CreateFile (file, FILE_WRITE_EA,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- &sec_none_nih, // sa
- OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS,
- NULL);
-
- if (hFileSource == INVALID_HANDLE_VALUE)
- return FALSE;
-
- lpContext = NULL;
- StreamSize = sizeof (WIN32_STREAM_ID) - sizeof (WCHAR**);
-
- /* FILE_FULL_EA_INFORMATION structure is longword-aligned */
- easize = sizeof (*ea) - sizeof (WCHAR**) + strlen (attrname) + 1 + len
- + (sizeof (DWORD) - 1);
- easize &= ~(sizeof (DWORD) - 1);
-
- if ((ea = (PFILE_FULL_EA_INFORMATION) malloc (easize)) == NULL)
- goto cleanup;
-
- memset (ea, 0, easize);
- ea->EaNameLength = strlen (attrname);
- ea->EaValueLength = len;
- strcpy (ea->EaName, attrname);
- memcpy (ea->EaName + (ea->EaNameLength + 1), buf, len);
-
- StreamId.dwStreamId = BACKUP_EA_DATA;
- StreamId.dwStreamAttributes = 0;
- StreamId.Size.HighPart = 0;
- StreamId.Size.LowPart = easize;
- StreamId.dwStreamNameSize = 0;
-
- if (!BackupWrite (hFileSource, (LPBYTE) &StreamId, StreamSize,
- &dwBytesWritten,
- FALSE, // don't abort yet
- FALSE, // don't process security
- &lpContext))
- goto cleanup;
-
- if (!BackupWrite (hFileSource, (LPBYTE) ea, easize,
- &dwBytesWritten,
- FALSE, // don't abort yet
- FALSE, // don't process security
- &lpContext))
- goto cleanup;
-
- bSuccess = TRUE;
- /* free context */
-
-cleanup:
- BackupRead (hFileSource,
- NULL, // buffer to write
- 0, // number of bytes to write
- &dwBytesWritten,
- TRUE, // abort
- FALSE, // don't process security
- &lpContext);
-
- CloseHandle (hFileSource);
- if (ea)
- free (ea);
-
- return bSuccess;
-}
diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc
deleted file mode 100644
index 797fb5375..000000000
--- a/winsup/cygwin/passwd.cc
+++ /dev/null
@@ -1,289 +0,0 @@
-/* passwd.cc: getpwnam () and friends
-
- Copyright 1996, 1997, 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <pwd.h>
-#include <stdio.h>
-#include <errno.h>
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "cygheap.h"
-#include <sys/termios.h>
-
-/* Read /etc/passwd only once for better performance. This is done
- on the first call that needs information from it. */
-
-static struct passwd *passwd_buf = NULL; /* passwd contents in memory */
-static int curr_lines = 0;
-static int max_lines = 0;
-
-/* Set to loaded when /etc/passwd has been read in by read_etc_passwd ().
- Set to emulated if passwd is emulated. */
-/* Functions in this file need to check the value of passwd_state
- and read in the password file if it isn't set. */
-enum pwd_state {
- uninitialized = 0,
- emulated,
- loaded
-};
-static pwd_state passwd_state = uninitialized;
-
-/* Position in the passwd cache */
-#ifdef _MT_SAFE
-#define pw_pos _reent_winsup()->_pw_pos
-#else
-static int pw_pos = 0;
-#endif
-
-/* Remove a : teminated string from the buffer, and increment the pointer */
-static char *
-grab_string (char **p)
-{
- char *src = *p;
- char *res = src;
-
- while (*src && *src != ':' && *src != '\n')
- src++;
-
- if (*src == ':')
- {
- *src = 0;
- src++;
- }
- *p = src;
- return res;
-}
-
-/* same, for ints */
-static int
-grab_int (char **p)
-{
- char *src = *p;
- int val = strtol (src, NULL, 10);
- while (*src && *src != ':' && *src != '\n')
- src++;
- if (*src == ':')
- src++;
- *p = src;
- return val;
-}
-
-/* Parse /etc/passwd line into passwd structure. */
-void
-parse_pwd (struct passwd &res, char *buf)
-{
- /* Allocate enough room for the passwd struct and all the strings
- in it in one go */
- size_t len = strlen (buf);
- char *mybuf = (char *) malloc (len + 1);
- (void) memcpy (mybuf, buf, len + 1);
- if (mybuf[--len] == '\n')
- mybuf[len] = '\0';
-
- res.pw_name = strlwr(grab_string (&mybuf));
- res.pw_passwd = grab_string (&mybuf);
- res.pw_uid = grab_int (&mybuf);
- res.pw_gid = grab_int (&mybuf);
- res.pw_comment = 0;
- res.pw_gecos = grab_string (&mybuf);
- res.pw_dir = grab_string (&mybuf);
- res.pw_shell = grab_string (&mybuf);
-}
-
-/* Add one line from /etc/passwd into the password cache */
-static void
-add_pwd_line (char *line)
-{
- if (curr_lines >= max_lines)
- {
- max_lines += 10;
- passwd_buf = (struct passwd *) realloc (passwd_buf, max_lines * sizeof (struct passwd));
- }
- parse_pwd (passwd_buf[curr_lines++], line);
-}
-
-/* Read in /etc/passwd and save contents in the password cache.
- This sets passwd_state to loaded or emulated so functions in this file can
- tell that /etc/passwd has been read in or will be emulated. */
-void
-read_etc_passwd ()
-{
- extern int passwd_sem;
- char linebuf[1024];
- ++passwd_sem;
- FILE *f = fopen ("/etc/passwd", "rt");
- --passwd_sem;
-
- if (f)
- {
- while (fgets (linebuf, sizeof (linebuf), f) != NULL)
- {
- if (strlen (linebuf))
- add_pwd_line (linebuf);
- }
-
- fclose (f);
- passwd_state = loaded;
- }
- else
- {
- debug_printf ("Emulating /etc/passwd");
- char user_name [ MAX_USER_NAME ];
- DWORD user_name_len = MAX_USER_NAME;
- if (! GetUserNameA (user_name, &user_name_len))
- {
- strncpy (user_name, "Administrator", MAX_USER_NAME);
- debug_printf ("Failed to get current user name. %E");
- }
- snprintf (linebuf, sizeof (linebuf), "%s::%u:%u::%s:/bin/sh", user_name,
- DEFAULT_UID, DEFAULT_GID, getenv ("HOME") ?: "/");
- add_pwd_line (linebuf);
- passwd_state = emulated;
- }
-}
-
-/* Cygwin internal */
-static struct passwd *
-search_for (uid_t uid, const char *name)
-{
- struct passwd *res = 0;
- struct passwd *default_pw = 0;
-
- for (int i = 0; i < curr_lines; i++)
- {
- res = passwd_buf + i;
- if (res->pw_uid == DEFAULT_UID)
- default_pw = res;
- /* on Windows NT user names are case-insensitive */
- if (name)
- {
- if (strcasematch (name, res->pw_name))
- return res;
- }
- else if (uid == res->pw_uid)
- return res;
- }
-
- /* Return default passwd entry if passwd is emulated or it's a
- request for the current user. */
- if (passwd_state != loaded
- || (!name && uid == myself->uid)
- || (name && strcasematch(name, cygheap->user.name ())))
- return default_pw;
-
- return NULL;
-}
-
-extern "C" struct passwd *
-getpwuid (uid_t uid)
-{
- if (passwd_state == uninitialized)
- read_etc_passwd();
-
- return search_for (uid, 0);
-}
-
-extern "C" struct passwd *
-getpwnam (const char *name)
-{
- if (passwd_state == uninitialized)
- read_etc_passwd();
-
- return search_for (0, name);
-}
-
-extern "C" struct passwd *
-getpwent (void)
-{
- if (passwd_state == uninitialized)
- read_etc_passwd();
-
- if (pw_pos < curr_lines)
- return passwd_buf + pw_pos++;
-
- return NULL;
-}
-
-extern "C" struct passwd *
-getpwduid (uid_t)
-{
- if (passwd_state == uninitialized)
- read_etc_passwd();
-
- return NULL;
-}
-
-extern "C" void
-setpwent (void)
-{
- if (passwd_state == uninitialized)
- read_etc_passwd();
-
- pw_pos = 0;
-}
-
-extern "C" void
-endpwent (void)
-{
- if (passwd_state == uninitialized)
- read_etc_passwd();
-
- pw_pos = 0;
-}
-
-extern "C" int
-setpassent ()
-{
- if (passwd_state == uninitialized)
- read_etc_passwd();
-
- return 0;
-}
-
-extern "C" char *
-getpass (const char * prompt)
-{
-#ifdef _MT_SAFE
- char *pass=_reent_winsup()->_pass;
-#else
- static char pass[_PASSWORD_LEN];
-#endif
- struct termios ti, newti;
-
- if (passwd_state == uninitialized)
- read_etc_passwd();
-
- if (fdtab.not_open (0))
- {
- set_errno (EBADF);
- pass[0] = '\0';
- }
- else
- {
- fhandler_base *fhstdin = fdtab[0];
- 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 0584d03e5..000000000
--- a/winsup/cygwin/path.cc
+++ /dev/null
@@ -1,3002 +0,0 @@
-/* path.cc: path support.
-
- Copyright 1996, 1997, 1998, 1999, 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. */
-
-/* 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:\. FIXME: Is this still true?
-*/
-
-#include "winsup.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/mount.h>
-#include <mntent.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <ctype.h>
-#include <winioctl.h>
-#include <sys/cygwin.h>
-#include <cygwin/version.h>
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "path.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "cygheap.h"
-#include "shared_info.h"
-#include "registry.h"
-#include "security.h"
-#include <assert.h>
-
-static int normalize_win32_path (const char *src, char *dst);
-static void slashify (const char *src, char *dst, int trailing_slash_p);
-static void backslashify (const char *src, char *dst, int trailing_slash_p);
-static int path_prefix_p_ (const char *path1, const char *path2, int len1);
-
-struct symlink_info
-{
- char buf[3 + MAX_PATH * 3];
- char *known_suffix;
- char *ext_here;
- char *contents;
- unsigned pflags;
- DWORD fileattr;
- int is_symlink;
- int error;
- symlink_info (): known_suffix (NULL), contents (buf + MAX_PATH + 1) {}
- int check (const char *path, const suffix_info *suffixes);
-};
-
-cwdstuff cygcwd; /* The current working directory. */
-
-#define path_prefix_p(p1, p2, l1) \
- ((cyg_tolower(*(p1))==cyg_tolower(*(p2))) && \
- path_prefix_p_(p1, p2, l1))
-
-#define SYMLINKATTR(x) \
- (((x) & (FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_DIRECTORY)) == \
- FILE_ATTRIBUTE_SYSTEM)
-
-/* Determine if path prefix matches current cygdrive */
-#define iscygdrive(path) \
- (path_prefix_p (cygwin_shared->mount.cygdrive, (path), cygwin_shared->mount.cygdrive_len))
-
-#define iscygdrive_device(path) \
- (iscygdrive(path) && isalpha(path[cygwin_shared->mount.cygdrive_len]) && \
- (isdirsep(path[cygwin_shared->mount.cygdrive_len + 1]) || \
- !path[cygwin_shared->mount.cygdrive_len + 1]))
-
-#define ischrootpath(p) \
- (cygheap->root.length () && \
- strncasematch (cygheap->root.path (), p, cygheap->root.length ()) && \
- (p[cygheap->root.length ()] == '/' \
- || p[cygheap->root.length ()] == '\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
-*/
-
-static int
-path_prefix_p_ (const char *path1, const char *path2, int len1)
-{
- /* Handle case where PATH1 has trailing '/' and when it doesn't. */
- if (len1 > 0 && SLASH_P (path1[len1 - 1]))
- len1--;
-
- if (len1 == 0)
- return SLASH_P (path2[0]) && !SLASH_P (path2[1]);
-
- if (!strncasematch (path1, path2, len1))
- return 0;
-
- return SLASH_P (path2[len1]) || path2[len1] == 0 || path1[len1 - 1] == ':';
-}
-
-/* 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
-*/
-
-void
-path_conv::check (const char *src, unsigned opt,
- const suffix_info *suffixes)
-{
- /* This array is used when expanding symlinks. It is MAX_PATH * 2
- in length so that we can hold the expanded symlink plus a
- trailer. */
- char path_buf[MAX_PATH];
- char path_copy[MAX_PATH];
- char tmp_buf[MAX_PATH];
- symlink_info sym;
- bool need_directory = 0;
-
-#if 0
- static path_conv last_path_conv;
- static char last_src[MAX_PATH + 1];
-
- if (*last_src && strcmp (last_src, src) == 0)
- {
- *this = last_path_conv;
- return;
- }
-#endif
-
- char *rel_path, *full_path;
-
- if (!(opt & PC_NULLEMPTY))
- error = 0;
- else if ((error = check_null_empty_path (src)))
- return;
-
- if (opt & PC_FULL)
- rel_path = path_buf, full_path = this->path;
- else
- rel_path = this->path, full_path = path_buf;
-
- /* This loop handles symlink expansion. */
- int loop = 0;
- path_flags = 0;
- known_suffix = NULL;
- fileattr = (DWORD) -1;
- for (;;)
- {
- MALLOC_CHECK;
- assert (src);
- char *p = strrchr (src, '/');
- if (p)
- {
- if (p[1] == '\0' || strcmp (p, "/.") == 0)
- need_directory = 1;
- }
- else if ((p = strrchr (src, '\\')) &&
- (p[1] == '\0' || strcmp (p, "\\.") == 0))
- need_directory = 1;
- /* Must look up path in mount table, etc. */
- error = cygwin_shared->mount.conv_to_win32_path (src, rel_path,
- full_path,
- devn, unit, &path_flags);
- MALLOC_CHECK;
- if (error)
- return;
- if (devn != FH_BAD)
- {
- fileattr = 0;
- return;
- }
-
- /* Eat trailing slashes */
- char *tail = strchr (full_path, '\0');
- /* If path is only a drivename, Windows interprets it as
- the current working directory on this drive instead of
- the root dir which is what we want. So we need
- the trailing backslash in this case. */
- while (tail > full_path + 3 && (*--tail == '\\'))
- *tail = '\0';
- if (full_path[0] && full_path[1] == ':' && full_path[2] == '\0')
- strcat (full_path, "\\");
-
- if (opt & PC_SYM_IGNORE)
- {
- fileattr = GetFileAttributesA (path);
- goto out;
- }
-
- /* Make a copy of the path that we can munge up */
- strcpy (path_copy, full_path);
-
- tail = path_copy + 1 + (tail - full_path); // Point to end of copy
-
- /* 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? */
- int component = 0; // Number of translated components
- sym.contents[0] = '\0';
-
- for (;;)
- {
- const suffix_info *suff;
-
- /* 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;
- }
- else
- {
- suff = suffixes;
- sym.pflags = path_flags;
- }
-
- int len = sym.check (path_copy, suff);
-
- if (!component)
- path_flags = sym.pflags;
-
- /* 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.is_symlink && sym.fileattr != (DWORD) -1)
- {
- error = sym.error;
- if (component == 0)
- {
- fileattr = sym.fileattr;
- goto fillin;
- }
- goto out; // file found
- }
- /* Found a symlink if len > 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 (len > 0)
- {
- if (component == 0 && !need_directory && !(opt & PC_SYM_FOLLOW))
- {
- set_symlink (); // last component of path is a symlink.
- fileattr = sym.fileattr;
- if (opt & PC_SYM_CONTENTS)
- strcpy (path, sym.contents);
- goto fillin;
- }
- break;
- }
-
- /* No existing file found. */
-
- if (!(tail = strrchr (path_copy, '\\')) ||
- (tail > path_copy && tail[-1] == ':'))
- goto out; // all done
-
- /* Haven't found a valid pathname component yet.
- Pinch off the tail and try again. */
- *tail = '\0';
- component++;
- }
-
- /* Arrive here if above loop detected a symlink. */
- if (++loop > MAX_LINK_DEPTH)
- {
- error = ELOOP; // Eep.
- return;
- }
- MALLOC_CHECK;
-
- tail = full_path + (tail - path_copy);
- int taillen = strlen (tail);
- int buflen = strlen (sym.contents);
- if (buflen + taillen > MAX_PATH)
- {
- error = ENAMETOOLONG;
- strcpy (path, "::ENAMETOOLONG::");
- return;
- }
-
- /* Copy tail of full_path to discovered symlink. */
- for (p = sym.contents + buflen; *tail; tail++)
- *p++ = *tail == '\\' ? '/' : *tail;
- *p = '\0';
-
- /* If symlink referred to an absolute path, then we
- just use sym.contents and loop. Otherwise tack the head of
- path_copy before sym.contents and translate it back from a
- Win32-style path to a POSIX-style one. */
- if (isabspath (sym.contents))
- src = sym.contents;
- else if (!(tail = strrchr (path_copy, '\\')))
- system_printf ("problem parsing %s - '%s'", src, full_path);
- else
- {
- int headlen = 1 + tail - path_copy;
- p = sym.contents - headlen;
- memcpy (p, path_copy, headlen);
- MALLOC_CHECK;
- error = cygwin_shared->mount.conv_to_posix_path (p, tmp_buf, 1);
- MALLOC_CHECK;
- if (error)
- return;
- src = tmp_buf;
- }
- }
-
-fillin:
- if (sym.known_suffix)
- known_suffix = this->path + (sym.known_suffix - path_copy);
- else if (sym.ext_here && !(opt & PC_SYM_CONTENTS))
- {
- known_suffix = strchr (this->path, '\0');
- strcpy (known_suffix, sym.ext_here);
- }
-
-out:
- /* Deal with Windows stupidity which considers filename\. to be valid
- even when "filename" is not a directory. */
- if (!need_directory || error)
- /* nothing to do */;
- else if (fileattr & FILE_ATTRIBUTE_DIRECTORY)
- path_flags &= ~PATH_SYMLINK;
- else
- {
- debug_printf ("%s is a non-directory", path);
- error = ENOTDIR;
- return;
- }
- DWORD serial, volflags;
- char fs_name[16];
-
- strcpy (tmp_buf, full_path);
- if (!rootdir (tmp_buf) ||
- !GetVolumeInformation (tmp_buf, NULL, 0, &serial, NULL,
- &volflags, fs_name, 16))
- {
- debug_printf ("GetVolumeInformation(%s) = ERR, full_path(%s), set_has_acls(FALSE)",
- tmp_buf, full_path, GetLastError ());
- set_has_acls (FALSE);
- set_has_buggy_open (FALSE);
- }
- else
- {
- debug_printf ("GetVolumeInformation(%s) = OK, full_path(%s), set_has_acls(%d)",
- tmp_buf, full_path, volflags & FS_PERSISTENT_ACLS);
- set_has_acls (volflags & FS_PERSISTENT_ACLS);
- /* Known file systems with buggy open calls. Further explanation
- in fhandler.cc (fhandler_disk_file::open). */
- set_has_buggy_open (strcmp (fs_name, "SUNWNFS") == 0);
- }
-
-#if 0
- if (!error)
- {
- last_path_conv = *this;
- strcpy (last_src, src);
- }
-#endif
-}
-
-#define deveq(s) (strcasematch (name, (s)))
-#define deveqn(s, n) (strncasematch (name, (s), (n)))
-
-static __inline int
-digits (const char *name)
-{
- char *p;
- int n = strtol(name, &p, 10);
-
- return p > name && !*p ? n : -1;
-}
-
-const char *windows_device_names[] =
-{
- NULL,
- "\\dev\\console",
- "conin",
- "conout",
- "\\dev\\ttym",
- "\\dev\\tty%d",
- "\\dev\\ptym",
- "\\\\.\\com%d",
- "\\dev\\pipe",
- "\\dev\\piper",
- "\\dev\\pipew",
- "\\dev\\socket",
- "\\dev\\windows",
-
- NULL, NULL, NULL,
-
- "\\dev\\disk",
- "\\dev\\fd%d",
- "\\dev\\st%d",
- "nul",
- "\\dev\\zero",
- "\\dev\\%srandom",
- "\\dev\\mem",
- "\\dev\\clipboard",
-};
-
-static int
-get_raw_device_number (const char *uxname, const char *w32path, int &unit)
-{
- DWORD devn = FH_BAD;
-
- if (strncasematch (w32path, "\\\\.\\tape", 8))
- {
- devn = FH_TAPE;
- unit = digits (w32path + 8);
- // norewind tape devices have leading n in name
- if (strncasematch (uxname, "/dev/n", 6))
- unit += 128;
- }
- else if (isdrive (w32path + 4))
- {
- devn = FH_FLOPPY;
- unit = cyg_tolower (w32path[4]) - 'a';
- }
- else if (strncasematch (w32path, "\\\\.\\physicaldrive", 17))
- {
- devn = FH_FLOPPY;
- unit = digits (w32path + 17) + 128;
- }
- return devn;
-}
-
-int __stdcall
-get_device_number (const char *name, int &unit, BOOL from_conv)
-{
- DWORD devn = FH_BAD;
- unit = 0;
-
- if ((*name == '/' && deveqn ("/dev/", 5)) ||
- (*name == '\\' && deveqn ("\\dev\\", 5)))
- {
- name += 5;
- if (deveq ("tty"))
- {
- if (tty_attached (myself))
- {
- unit = myself->ctty;
- devn = FH_TTYS;
- }
- else if (myself->ctty > 0)
- devn = FH_CONSOLE;
- }
- else if (deveqn ("tty", 3) && (unit = digits (name + 3)) >= 0)
- devn = FH_TTYS;
- else if (deveq ("ttym"))
- devn = FH_TTYM;
- else if (deveq ("ptmx"))
- devn = FH_PTYM;
- else if (deveq ("windows"))
- devn = FH_WINDOWS;
- else if (deveq ("conin"))
- devn = FH_CONIN;
- else if (deveq ("conout"))
- devn = FH_CONOUT;
- else if (deveq ("null"))
- devn = FH_NULL;
- else if (deveq ("zero"))
- devn = FH_ZERO;
- else if (deveq ("random") || deveq ("urandom"))
- {
- devn = FH_RANDOM;
- unit = 8 + (deveqn ("u", 1) ? 1 : 0); /* Keep unit Linux conformant */
- }
- else if (deveq ("mem"))
- {
- devn = FH_MEM;
- unit = 1;
- }
- else if (deveq ("clipboard"))
- devn = FH_CLIPBOARD;
- else if (deveq ("port"))
- {
- devn = FH_MEM;
- unit = 4;
- }
- else if (deveqn ("com", 3) && (unit = digits (name + 3)) >= 0)
- devn = FH_SERIAL;
- else if (deveqn ("ttyS", 4) && (unit = digits (name + 4)) >= 0)
- devn = FH_SERIAL;
- else if (deveq ("pipe") || deveq ("piper") || deveq ("pipew"))
- devn = FH_PIPE;
- else if (deveq ("tcp") || deveq ("udp") || deveq ("streamsocket")
- || deveq ("dgsocket"))
- devn = FH_SOCKET;
- else if (! from_conv)
- devn = get_raw_device_number (name - 5,
- path_conv (name - 5,
- PC_SYM_IGNORE).get_win32 (),
- unit);
- }
- else if (deveqn ("com", 3) && (unit = digits (name + 3)) >= 0)
- devn = FH_SERIAL;
- else if (deveqn ("ttyS", 4) && (unit = digits (name + 4)) >= 0)
- devn = FH_SERIAL;
-
- return devn;
-}
-
-/* Return TRUE if src_path is a Win32 device name, filling out the device
- name in win32_path */
-
-static BOOL
-win32_device_name (const char *src_path, char *win32_path,
- DWORD &devn, int &unit)
-{
- const char *devfmt;
-
- devn = get_device_number (src_path, unit, TRUE);
-
- if (devn == FH_BAD)
- return FALSE;
-
- if ((devfmt = windows_device_names[FHDEVN (devn)]) == NULL)
- return FALSE;
- if (devn == FH_RANDOM)
- __small_sprintf (win32_path, devfmt, unit == 8 ? "" : "u");
- else
- __small_sprintf (win32_path, devfmt, unit);
- return TRUE;
-}
-
-/* Normalize a POSIX 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. */
-
-#define isslash(c) ((c) == '/')
-
-static int
-normalize_posix_path (const char *src, char *dst)
-{
- const char *src_start = src;
- char *dst_start = dst;
-
- syscall_printf ("src %s", src);
- if (isdrive (src) || strpbrk (src, "\\:"))
- {
- cygwin_conv_to_full_posix_path (src, dst);
- return 0;
- }
- if (!isslash (src[0]))
- {
- if (!cygcwd.get (dst))
- return get_errno ();
- if (strlen (dst) + 1 + strlen (src) >= MAX_PATH)
- {
- debug_printf ("ENAMETOOLONG = normalize_posix_path (%s)", src);
- return ENAMETOOLONG;
- }
- dst = strchr (dst, '\0');
- if (*src == '.')
- {
- if (dst == dst_start + 1 && *dst_start == '/')
- --dst;
- goto sawdot;
- }
- if (dst > dst_start && !isslash (dst[-1]))
- *dst++ = '/';
- }
- /* Two leading /'s? If so, preserve them. */
- else if (isslash (src[1]))
- {
- if (cygheap->root.length ())
- {
- debug_printf ("ENOENT = normalize_posix_path (%s)", src);
- return ENOENT;
- }
- *dst++ = '/';
- *dst++ = '/';
- src += 2;
- if (isslash (*src))
- { /* Starts with three or more slashes - reset. */
- dst = dst_start;
- *dst++ = '/';
- src = src_start + 1;
- }
- }
- /* Exactly one leading slash. Absolute path. Check for chroot. */
- else if (cygheap->root.length ())
- {
- strcpy (dst, cygheap->root.path ());
- dst += cygheap->root.length ();
- }
-
- while (*src)
- {
- /* Strip runs of /'s. */
- if (!isslash (*src))
- *dst++ = *src++;
- else
- {
- while (*++src)
- {
- if (isslash (*src))
- continue;
-
- if (*src != '.')
- break;
-
- sawdot:
- if (src[1] != '.')
- {
- if (!src[1])
- {
- if (dst == dst_start)
- *dst++ = '/';
- goto done;
- }
- if (!isslash (src[1]))
- break;
- }
- else if (src[2] && !isslash (src[2]))
- break;
- else
- {
- if (!ischrootpath (dst_start) ||
- dst - dst_start != (int) cygheap->root.length ())
- while (dst > dst_start && !isslash (*--dst))
- continue;
- src++;
- }
- }
-
- *dst++ = '/';
- }
- }
-
-done:
- *dst = '\0';
- if (--dst > dst_start && isslash (*dst))
- *dst = '\0';
-
- debug_printf ("%s = normalize_posix_path (%s)", dst_start, src_start);
- return 0;
-}
-
-/* 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. */
-static int
-normalize_win32_path (const char *src, char *dst)
-{
- const char *src_start = src;
- char *dst_start = dst;
- char *dst_root_start = dst;
- bool beg_src_slash = isdirsep (src[0]);
-
- if (beg_src_slash && isdirsep (src[1]))
- {
- if (cygheap->root.length ())
- {
- debug_printf ("ENOENT = normalize_win32_path (%s)", src);
- return ENOENT;
- }
- *dst++ = '\\';
- ++src;
- }
- /* If absolute path, care for chroot. */
- else if (beg_src_slash && cygheap->root.length ())
- {
- strcpy (dst, cygheap->root.path ());
- char *c;
- while ((c = strchr (dst, '/')) != NULL)
- *c = '\\';
- dst += cygheap->root.length ();
- dst_root_start = dst;
- *dst++ = '\\';
- }
- else if (strchr (src, ':') == NULL && *src != '/')
- {
- if (!cygcwd.get (dst, 0))
- return get_errno ();
- if (beg_src_slash)
- {
- if (dst[1] == ':')
- dst[2] = '\0';
- else if (slash_unc_prefix_p (dst))
- {
- char *p = strpbrk (dst + 2, "\\/");
- if (p && (p = strpbrk (p + 1, "\\/")))
- *p = '\0';
- }
- }
- if (strlen (dst) + 1 + strlen (src) >= MAX_PATH)
- {
- debug_printf ("ENAMETOOLONG = normalize_win32_path (%s)", src);
- return ENAMETOOLONG;
- }
- dst += strlen (dst);
- if (!beg_src_slash)
- *dst++ = '\\';
- }
-
- while (*src)
- {
- /* Strip duplicate /'s. */
- if (SLASH_P (src[0]) && SLASH_P (src[1]))
- src++;
- /* Ignore "./". */
- else if (src[0] == '.' && SLASH_P (src[1])
- && (src == src_start || SLASH_P (src[-1])))
- {
- src += 2;
- }
-
- /* Backup if "..". */
- else if (src[0] == '.' && src[1] == '.'
- /* dst must be greater than dst_start */
- && dst[-1] == '\\'
- && (SLASH_P (src[2]) || src[2] == 0))
- {
- /* Back up over /, but not if it's the first one. */
- if (dst > dst_root_start + 1)
- dst--;
- /* Now back up to the next /. */
- while (dst > dst_root_start + 1 && dst[-1] != '\\' && dst[-2] != ':')
- dst--;
- src += 2;
- if (SLASH_P (*src))
- src++;
- }
- /* Otherwise, add char to result. */
- else
- {
- if (*src == '/')
- *dst++ = '\\';
- else
- *dst++ = *src;
- ++src;
- }
- }
- *dst = 0;
- debug_printf ("%s = normalize_win32_path (%s)", dst_start, src_start);
- return 0;
-}
-
-
-/* Various utilities. */
-
-/* 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. */
-
-static void
-slashify (const char *src, char *dst, int 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;
-}
-
-/* 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. */
-
-static void
-backslashify (const char *src, char *dst, int 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;
-}
-
-/* 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 && SLASH_P (dst[--len]))
- dst[len] = '\0';
-}
-
-/* slash_drive_prefix_p: Return non-zero if PATH begins with
- //<letter>. */
-
-static int
-slash_drive_prefix_p (const char *path)
-{
- return (isdirsep(path[0])
- && isdirsep(path[1])
- && isalpha (path[2])
- && (path[3] == 0 || path[3] == '/'));
-}
-
-/* slash_unc_prefix_p: Return non-zero if PATH begins with //UNC/SHARE */
-
-int __stdcall
-slash_unc_prefix_p (const char *path)
-{
- char *p = NULL;
- int ret = (isdirsep (path[0])
- && isdirsep (path[1])
- && isalpha (path[2])
- && path[3] != 0
- && !isdirsep (path[3])
- && ((p = strpbrk(path + 3, "\\/")) != NULL));
- if (!ret || p == NULL)
- return ret;
- return ret && isalnum (p[1]);
-}
-
-/* conv_path_list: Convert a list of path names to/from Win32/POSIX.
-
- SRC is not a const char * because we temporarily modify it to ease
- the implementation.
-
- I believe Win32 always has '.' in $PATH. POSIX obviously doesn't.
- We certainly don't want to handle that here, but it is something for
- the caller to think about. */
-
-static void
-conv_path_list (const char *src, char *dst, int to_posix_p)
-{
- char *s;
- char *d = dst;
- char src_delim = to_posix_p ? ';' : ':';
- char dst_delim = to_posix_p ? ':' : ';';
- int (*conv_fn) (const char *, char *) = (to_posix_p
- ? cygwin_conv_to_posix_path
- : cygwin_conv_to_win32_path);
-
- do
- {
- s = strchr (src, src_delim);
- if (s)
- {
- *s = 0;
- (*conv_fn) (src[0] != 0 ? src : ".", d);
- d += strlen (d);
- *d++ = dst_delim;
- *s = src_delim;
- src = s + 1;
- }
- else
- {
- /* Last one. */
- (*conv_fn) (src[0] != 0 ? src : ".", d);
- }
- }
- while (s != NULL);
-}
-
-/************************* mount_info class ****************************/
-
-/* init: Initialize the mount table. */
-
-void
-mount_info::init ()
-{
- nmounts = 0;
- had_to_create_mount_areas = 0;
-
- /* Fetch the mount table and cygdrive-related information from
- the registry. */
- from_registry ();
-}
-
-/* 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. MAX_PATH bytes). */
-
-int
-mount_info::conv_to_win32_path (const char *src_path, char *win32_path,
- char *full_win32_path, DWORD &devn, int &unit,
- unsigned *flags)
-{
- int src_path_len = strlen (src_path);
- int trailing_slash_p = (src_path_len > 1
- && SLASH_P (src_path[src_path_len - 1]));
- MALLOC_CHECK;
- int isrelpath;
- unsigned dummy_flags;
-
- devn = FH_BAD;
- unit = 0;
-
- if (!flags)
- flags = &dummy_flags;
-
- *flags = 0;
- debug_printf ("conv_to_win32_path (%s)", src_path);
-
- if (src_path_len >= MAX_PATH)
- {
- debug_printf ("ENAMETOOLONG = conv_to_win32_path (%s)", src_path);
- return ENAMETOOLONG;
- }
-
- int i, rc;
- char *dst = NULL;
- mount_item *mi = NULL; /* initialized to avoid compiler warning */
- char pathbuf[MAX_PATH];
-
- /* Determine where the destination should be placed. */
- if (full_win32_path != NULL)
- dst = full_win32_path;
- else if (win32_path != NULL)
- dst = win32_path;
-
- if (dst == NULL)
- goto out; /* Sanity check. */
-
- /* An MS-DOS spec has either a : or a \. If this is found, short
- circuit most of the rest of this function. */
- if (strpbrk (src_path, ":\\") != NULL)
- {
- debug_printf ("%s already win32", src_path);
- rc = normalize_win32_path (src_path, dst);
- if (rc)
- {
- debug_printf ("normalize_win32_path failed, rc %d", rc);
- return rc;
- }
- isrelpath = !isabspath (src_path);
- *flags = set_flags_from_win32_path (dst);
- if (cygheap->root.length () && dst[0] && dst[1] == ':')
- {
- char posix_path[MAX_PATH + 1];
-
- rc = cygwin_shared->mount.conv_to_posix_path (dst, posix_path, 0);
- if (rc)
- {
- debug_printf ("conv_to_posix_path failed, rc %d", rc);
- return rc;
- }
- if (!ischrootpath (posix_path))
- {
- debug_printf ("ischrootpath failed");
- return ENOENT;
- }
- }
- goto fillin;
- }
-
- /* Normalize the path, taking out ../../ stuff, we need to do 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.
-
- We do this by first getting an absolute UNIX-style path and then
- converting it to a DOS-style path, looking up the appropriate drive
- in the mount table. */
-
- rc = normalize_posix_path (src_path, pathbuf);
-
- if (rc)
- {
- debug_printf ("%d = conv_to_win32_path (%s)", rc, src_path);
- *flags = 0;
- return rc;
- }
-
- isrelpath = !isslash (*src_path);
-
- /* See if this is a cygwin "device" */
- if (win32_device_name (pathbuf, dst, devn, unit))
- {
- *flags = MOUNT_BINARY; /* FIXME: Is this a sensible default for devices? */
- goto fillin;
- }
-
- /* Check if the cygdrive prefix was specified. If so, just strip
- off the prefix and transform it into an MS-DOS path. */
- MALLOC_CHECK;
- if (iscygdrive_device (pathbuf))
- {
- if (!cygdrive_win32_path (pathbuf, dst, trailing_slash_p))
- return ENOENT;
- *flags = cygdrive_flags;
- goto fillin;
- }
-
- /* Check the mount table for prefix matches. */
- for (i = 0; i < nmounts; i++)
- {
- mi = mount + posix_sorted[i];
- if (path_prefix_p (mi->posix_path, pathbuf, mi->posix_pathlen))
- break;
- }
-
- if (i >= nmounts)
- {
- if (slash_drive_prefix_p (pathbuf))
- slash_drive_to_win32_path (pathbuf, dst, trailing_slash_p);
- else
- backslashify (pathbuf, dst, trailing_slash_p); /* just convert */
- *flags = 0;
- }
- else
- {
- int n = mi->native_pathlen;
- memcpy (dst, mi->native_path, n + 1);
- char *p = pathbuf + mi->posix_pathlen;
- if (!trailing_slash_p && !*p)
- {
- if (isdrive (dst) && !dst[2])
- dst[n++] = '\\';
- dst[n] = '\0';
- }
- else
- {
- /* Do not add trailing \ to UNC device names like \\.\a: */
- if (*p != '/' && /* FIXME: this test seems wrong. */
- (strncmp (mi->native_path, "\\\\.\\", 4) != 0 ||
- strncmp (mi->native_path + 4, "UNC\\", 4) == 0))
- dst[n++] = '\\';
- strcpy (dst + n, p);
- }
- backslashify (dst, dst, trailing_slash_p);
- *flags = mi->flags;
- }
-
-fillin:
- /* Compute relative path if asked to and able to. */
- if (win32_path == NULL)
- /* nothing to do */;
- else if (isrelpath)
- {
- char cwd_win32[MAX_PATH];
- if (!cygcwd.get (cwd_win32, 0))
- return get_errno ();
- unsigned cwdlen = strlen (cwd_win32);
- if (!path_prefix_p (cwd_win32, dst, cwdlen))
- strcpy (win32_path, dst);
- else
- {
- size_t n = strlen (dst);
- if (n < cwdlen)
- strcpy (win32_path, dst);
- else
- {
- if (n == cwdlen)
- dst += cwdlen;
- else
- dst += isdirsep (cwd_win32[cwdlen - 1]) ? cwdlen : cwdlen + 1;
-
- memmove (win32_path, dst, strlen (dst) + 1);
- if (!*win32_path)
- {
- strcpy (win32_path, ".");
- if (trailing_slash_p)
- strcat (win32_path, "\\");
- }
- }
- }
- }
- else if (win32_path != dst)
- strcpy (win32_path, dst);
-
-out:
- MALLOC_CHECK;
- debug_printf ("%s(rel), %s(abs) %p(flags) = conv_to_win32_path (%s)",
- win32_path, full_win32_path, *flags,
- src_path);
- return 0;
-}
-
-/* Convert PATH (for which slash_drive_prefix_p returns 1) to WIN32 form. */
-
-void
-mount_info::slash_drive_to_win32_path (const char *path, char *buf,
- int trailing_slash_p)
-{
- buf[0] = path[2];
- buf[1] = ':';
- if (path[3] == '0')
- strcpy (buf + 2, "\\");
- else
- backslashify (path + 3, buf + 2, trailing_slash_p);
-}
-
-/* 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] || (SLASH_P (src[2]) && !src[3]))
- dst[len++] = '\000';
- else
- {
- int n;
- dst[len++] = '/';
- if (SLASH_P (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 trailing_slash_p)
-{
- const char *p = src + cygdrive_len;
- if (!isalpha (*p) || (!isdirsep (p[1]) && p[1]))
- return 0;
- dst[0] = *p;
- dst[1] = ':';
- strcpy (dst + 2, p + 1);
- backslashify (dst, dst, trailing_slash_p || !dst[2]);
- debug_printf ("src '%s', dst '%s'", src, dst);
- return 1;
-}
-
-/* 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. MAX_PATH bytes).
- If keep_rel_p is non-zero, relative paths stay that way. */
-
-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 = SLASH_P (*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 >= 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;
- }
-
- char pathbuf[MAX_PATH];
- int rc = normalize_win32_path (src_path, pathbuf);
- if (rc != 0)
- {
- debug_printf ("%d = conv_to_posix_path (%s)", rc, src_path);
- return rc;
- }
-
- int pathbuflen = strlen (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))
- 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) >= 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);
- 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))
- return mi.flags;
- }
- return 0;
-}
-
-/* read_mounts: Given a specific regkey, read mounts from under its
- key. */
-
-void
-mount_info::read_mounts (reg_key& r)
-{
- char posix_path[MAX_PATH];
- HKEY key = r.get_key ();
- DWORD i, posix_path_size;
- int res;
-
- /* Loop through subkeys */
- /* FIXME: we would like to not check MAX_MOUNTS but the heap in the
- shared area is currently statically allocated so we can't have an
- arbitrarily large number of mounts. */
- for (i = 0; ; i++)
- {
- char native_path[MAX_PATH];
- int mount_flags;
-
- posix_path_size = MAX_PATH;
- /* FIXME: if maximum posix_path_size is 256, we're going to
- run into problems if we ever try to store a mount point that's
- over 256 but is under MAX_PATH! */
- res = RegEnumKeyEx (key, i, posix_path, &posix_path_size, NULL,
- NULL, NULL, NULL);
-
- if (res == ERROR_NO_MORE_ITEMS)
- break;
- else if (res != ERROR_SUCCESS)
- {
- debug_printf ("RegEnumKeyEx failed, error %d!\n", res);
- break;
- }
-
- /* Get a reg_key based on i. */
- reg_key subkey = reg_key (key, KEY_READ, posix_path, NULL);
-
- /* Fetch info from the subkey. */
- subkey.get_string ("native", native_path, sizeof (native_path), "");
- mount_flags = subkey.get_int ("flags", 0);
-
- /* Add mount_item corresponding to registry mount point. */
- res = cygwin_shared->mount.add_item (native_path, posix_path, mount_flags, FALSE);
- if (res && get_errno () == EMFILE)
- break; /* The number of entries exceeds MAX_MOUNTS */
- }
-}
-
-/* from_registry: Build the entire mount table from the registry. Also,
- read in cygdrive-related information from its registry location. */
-
-void
-mount_info::from_registry ()
-{
- /* Use current mount areas if either user or system mount areas
- already exist. Otherwise, import old mounts. */
-
- reg_key r;
-
- /* Retrieve cygdrive-related information. */
- read_cygdrive_info_from_registry ();
-
- nmounts = 0;
-
- /* First read mounts from user's table. */
- read_mounts (r);
-
- /* Then read mounts from system-wide mount table. */
- reg_key r1 (HKEY_LOCAL_MACHINE, KEY_READ, "SOFTWARE",
- CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
- CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
- CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
- NULL);
- read_mounts (r1);
-
- /* If we had to create both user and system mount areas, import
- old mounts. */
- if (had_to_create_mount_areas == 2)
- import_v1_mounts ();
-}
-
-/* add_reg_mount: Add mount item to registry. Return zero on success,
- non-zero on failure. */
-/* FIXME: Need a mutex to avoid collisions with other tasks. */
-
-int
-mount_info::add_reg_mount (const char * native_path, const char * posix_path, unsigned mountflags)
-{
- int res = 0;
-
- /* Add the mount to the right registry location, depending on
- whether MOUNT_SYSTEM is set in the mount flags. */
- if (!(mountflags & MOUNT_SYSTEM)) /* current_user mount */
- {
- /* reg_key for user mounts in HKEY_CURRENT_USER. */
- reg_key reg_user;
-
- /* Start by deleting existing mount if one exists. */
- res = reg_user.kill (posix_path);
- if (res != ERROR_SUCCESS && res != ERROR_FILE_NOT_FOUND)
- goto err;
-
- /* Create the new mount. */
- reg_key subkey = reg_key (reg_user.get_key (),
- KEY_ALL_ACCESS,
- posix_path, NULL);
- res = subkey.set_string ("native", native_path);
- if (res != ERROR_SUCCESS)
- goto err;
- res = subkey.set_int ("flags", mountflags);
- }
- else /* local_machine mount */
- {
- /* reg_key for system mounts in HKEY_LOCAL_MACHINE. */
- reg_key reg_sys (HKEY_LOCAL_MACHINE, KEY_ALL_ACCESS, "SOFTWARE",
- CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
- CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
- CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
- NULL);
-
- /* Start by deleting existing mount if one exists. */
- res = reg_sys.kill (posix_path);
- if (res != ERROR_SUCCESS && res != ERROR_FILE_NOT_FOUND)
- goto err;
-
- /* Create the new mount. */
- reg_key subkey = reg_key (reg_sys.get_key (),
- KEY_ALL_ACCESS,
- posix_path, NULL);
- res = subkey.set_string ("native", native_path);
- if (res != ERROR_SUCCESS)
- goto err;
- res = subkey.set_int ("flags", mountflags);
- }
-
- return 0; /* Success! */
- err:
- __seterrno_from_win_error (res);
- return -1;
-}
-
-/* del_reg_mount: delete mount item from registry indicated in flags.
- Return zero on success, non-zero on failure.*/
-/* FIXME: Need a mutex to avoid collisions with other tasks. */
-
-int
-mount_info::del_reg_mount (const char * posix_path, unsigned flags)
-{
- int res;
-
- if ((flags & MOUNT_SYSTEM) == 0) /* Delete from user registry */
- {
- reg_key reg_user (KEY_ALL_ACCESS,
- CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME, NULL);
- res = reg_user.kill (posix_path);
- }
- else /* Delete from system registry */
- {
- reg_key reg_sys (HKEY_LOCAL_MACHINE, KEY_ALL_ACCESS, "SOFTWARE",
- CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
- CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
- CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
- NULL);
- res = reg_sys.kill (posix_path);
- }
-
- if (res != ERROR_SUCCESS)
- {
- __seterrno_from_win_error (res);
- return -1;
- }
-
- return 0; /* Success! */
-}
-
-/* read_cygdrive_info_from_registry: Read the default prefix and flags
- to use when creating cygdrives from the special user registry
- location used to store cygdrive information. */
-
-void
-mount_info::read_cygdrive_info_from_registry ()
-{
- /* reg_key for user path prefix in HKEY_CURRENT_USER. */
- reg_key r;
-
- if (r.get_string (CYGWIN_INFO_CYGDRIVE_PREFIX, cygdrive, sizeof (cygdrive),
- "") != 0)
- {
- /* Didn't find the user path prefix so check the system path prefix. */
-
- /* reg_key for system path prefix in HKEY_LOCAL_MACHINE. */
- reg_key r2 (HKEY_LOCAL_MACHINE, KEY_READ, "SOFTWARE",
- CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
- CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
- CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
- NULL);
-
- if (r2.get_string (CYGWIN_INFO_CYGDRIVE_PREFIX, cygdrive, sizeof (cygdrive),
- "") != 0)
- {
- /* Didn't find either so write the default to the registry and use it.
- NOTE: We are writing and using the user path prefix. */
- write_cygdrive_info_to_registry (CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX,
- MOUNT_AUTO);
- }
- else
- {
- /* Fetch system cygdrive_flags from registry; returns MOUNT_AUTO on
- error. */
- cygdrive_flags = r2.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS, MOUNT_AUTO);
- slashify (cygdrive, cygdrive, 1);
- cygdrive_len = strlen(cygdrive);
- }
- }
- else
- {
- /* Fetch user cygdrive_flags from registry; returns MOUNT_AUTO on
- error. */
- cygdrive_flags = r.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS, MOUNT_AUTO);
- slashify (cygdrive, cygdrive, 1);
- cygdrive_len = strlen(cygdrive);
- }
-}
-
-/* write_cygdrive_info_to_registry: Write the default prefix and flags
- to use when creating cygdrives to the special user registry
- location used to store cygdrive information. */
-
-int
-mount_info::write_cygdrive_info_to_registry (const char *cygdrive_prefix, unsigned flags)
-{
- /* Determine whether to modify user or system cygdrive path prefix. */
- HKEY top = (flags & MOUNT_SYSTEM) ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
-
- /* reg_key for user path prefix in HKEY_CURRENT_USER or system path prefix in
- HKEY_LOCAL_MACHINE. */
- reg_key r (top, KEY_ALL_ACCESS, "SOFTWARE",
- CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
- CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
- CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
- NULL);
-
- /* 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;
- }
-
- char hold_cygdrive_prefix[strlen (cygdrive_prefix) + 1];
- /* Ensure that there is never a final slash */
- nofinalslash (cygdrive_prefix, hold_cygdrive_prefix);
-
- int res;
- res = r.set_string (CYGWIN_INFO_CYGDRIVE_PREFIX, hold_cygdrive_prefix);
- if (res != ERROR_SUCCESS)
- {
- __seterrno_from_win_error (res);
- return -1;
- }
- r.set_int (CYGWIN_INFO_CYGDRIVE_FLAGS, flags);
-
- /* This also needs to go in the in-memory copy of "cygdrive", but only if
- appropriate:
- 1. setting user path prefix, or
- 2. overwriting (a previous) system path prefix */
- if ((flags & MOUNT_SYSTEM) == 0 ||
- (cygwin_shared->mount.cygdrive_flags & MOUNT_SYSTEM) != 0)
- {
- slashify (cygdrive_prefix, cygwin_shared->mount.cygdrive, 1);
- cygwin_shared->mount.cygdrive_flags = flags;
- cygwin_shared->mount.cygdrive_len = strlen(cygwin_shared->mount.cygdrive);
- }
-
- return 0;
-}
-
-int
-mount_info::remove_cygdrive_info_from_registry (const char *cygdrive_prefix, unsigned flags)
-{
- /* Determine whether to modify user or system cygdrive path prefix. */
- HKEY top = (flags & MOUNT_SYSTEM) ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
-
- /* reg_key for user path prefix in HKEY_CURRENT_USER or system path prefix in
- HKEY_LOCAL_MACHINE. */
- reg_key r (top, KEY_ALL_ACCESS, "SOFTWARE",
- CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
- CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
- CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
- NULL);
-
- /* Delete cygdrive prefix and flags. */
- int res = r.killvalue (CYGWIN_INFO_CYGDRIVE_PREFIX);
- int res2 = r.killvalue (CYGWIN_INFO_CYGDRIVE_FLAGS);
-
- /* Reinitialize the cygdrive path prefix to reflect to removal from the
- registry. */
- read_cygdrive_info_from_registry ();
-
- return (res != ERROR_SUCCESS) ? res : res2;
-}
-
-int
-mount_info::get_cygdrive_info (char *user, char *system, char* user_flags,
- char* system_flags)
-{
- /* Get the user path prefix from HKEY_CURRENT_USER. */
- reg_key r;
- int res = r.get_string (CYGWIN_INFO_CYGDRIVE_PREFIX, user, MAX_PATH, "");
-
- /* Get the user flags, if appropriate */
- if (res == ERROR_SUCCESS)
- {
- int flags = r.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS, MOUNT_AUTO);
- strcpy (user_flags, (flags & MOUNT_BINARY) ? "binmode" : "textmode");
- }
-
- /* Get the system path prefix from HKEY_LOCAL_MACHINE. */
- reg_key r2 (HKEY_LOCAL_MACHINE, KEY_READ, "SOFTWARE",
- CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
- CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
- CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
- NULL);
- int res2 = r2.get_string (CYGWIN_INFO_CYGDRIVE_PREFIX, system, MAX_PATH, "");
-
- /* Get the system flags, if appropriate */
- if (res2 == ERROR_SUCCESS)
- {
- int flags = r2.get_int (CYGWIN_INFO_CYGDRIVE_FLAGS, MOUNT_AUTO);
- strcpy (system_flags, (flags & MOUNT_BINARY) ? "binmode" : "textmode");
- }
-
- return (res != ERROR_SUCCESS) ? res : res2;
-}
-
-struct mntent *
-mount_info::getmntent (int x)
-{
- if (x < 0 || x >= nmounts)
- return NULL;
-
- return mount[native_sorted[x]].getmntent ();
-}
-
-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) == 0) /* 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) == 0) /* 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, int reg_p)
-{
- /* Something's wrong if either path is NULL or empty, or if it's
- not a UNC or absolute path. */
-
- if ((native == NULL) || (*native == 0) ||
- (posix == NULL) || (*posix == 0) ||
- !isabspath (native) || !isabspath (posix) ||
- slash_unc_prefix_p (posix) || isdrive (posix))
- {
- set_errno (EINVAL);
- return -1;
- }
-
- /* Make sure both paths do not end in /. */
- char nativetmp[MAX_PATH];
- char posixtmp[MAX_PATH];
-
- if (slash_drive_prefix_p (native))
- slash_drive_to_win32_path (native, nativetmp, 0);
- else
- backslashify (native, nativetmp, 0);
- nofinalslash (nativetmp, nativetmp);
-
- slashify (posix, posixtmp, 0);
- nofinalslash (posixtmp, posixtmp);
-
- debug_printf ("%s[%s], %s[%s], %p",
- native, nativetmp, posix, posixtmp, mountflags);
-
- /* Duplicate /'s in path are an error. */
- for (char *p = posixtmp + 1; *p; ++p)
- {
- if (p[-1] == '/' && p[0] == '/')
- {
- set_errno (EINVAL);
- return -1;
- }
- }
-
- /* 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 (strcasematch (mount[i].posix_path, posixtmp) &&
- (mount[i].flags & MOUNT_SYSTEM) == (mountflags & MOUNT_SYSTEM))
- break;
- }
-
- if (i == nmounts && nmounts == MAX_MOUNTS)
- {
- set_errno (EMFILE);
- return -1;
- }
-
- if (reg_p && add_reg_mount (nativetmp, posixtmp, mountflags))
- 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, int reg_p)
-{
- char pathtmp[MAX_PATH];
- 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 (slash_drive_prefix_p (path))
- slash_drive_to_win32_path (path, pathtmp, 0);
- else if (slash_unc_prefix_p (path) || strpbrk (path, ":\\"))
- backslashify (path, pathtmp, 0);
- else
- {
- slashify (path, pathtmp, 0);
- posix_path_p = TRUE;
- }
- nofinalslash (pathtmp, pathtmp);
-
- if (reg_p && posix_path_p &&
- del_reg_mount (pathtmp, flags) &&
- del_reg_mount (path, flags)) /* for old irregular entries */
- return -1;
-
- for (int i = 0; i < nmounts; i++)
- {
- int ent = native_sorted[i]; /* in the same order as getmntent() */
- if (((posix_path_p)
- ? strcasematch (mount[ent].posix_path, pathtmp)
- : strcasematch (mount[ent].native_path, pathtmp)) &&
- (mount[ent].flags & MOUNT_SYSTEM) == (flags & MOUNT_SYSTEM))
- {
- if (!posix_path_p &&
- reg_p && del_reg_mount (mount[ent].posix_path, flags))
- 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;
-}
-
-/* read_v1_mounts: Given a reg_key to an old mount table registry area,
- read in the mounts. The "which" arg contains zero if we're reading
- the user area and MOUNT_SYSTEM if we're reading the system area.
- This way we can store the mounts read in the appropriate place when
- they are written back to the new registry layout. */
-
-void
-mount_info::read_v1_mounts (reg_key r, unsigned which)
-{
- unsigned mountflags = 0;
-
- /* MAX_MOUNTS was 30 when we stopped using the v1 layout */
- for (int i = 0; i < 30; i++)
- {
- char key_name[10];
- char win32path[MAX_PATH];
- char unixpath[MAX_PATH];
-
- __small_sprintf (key_name, "%02x", i);
-
- reg_key k (r.get_key (), KEY_ALL_ACCESS, key_name, NULL);
-
- /* The registry names are historical but useful so are left alone. */
- k.get_string ("native", win32path, sizeof (win32path), "");
- k.get_string ("unix", unixpath, sizeof (unixpath), "");
-
- /* Does this entry contain something? */
- if (*win32path != 0)
- {
- mountflags = 0;
-
- if (k.get_int ("fbinary", 0))
- mountflags |= MOUNT_BINARY;
-
- /* Or in zero or MOUNT_SYSTEM depending on which table
- we're reading. */
- mountflags |= which;
-
- int res = cygwin_shared->mount.add_item (win32path, unixpath, mountflags, TRUE);
- if (res && get_errno () == EMFILE)
- break; /* The number of entries exceeds MAX_MOUNTS */
- }
- }
-}
-
-/* import_v1_mounts: If v1 mounts are present, load them and write
- the new entries to the new registry area. */
-
-void
-mount_info::import_v1_mounts ()
-{
- reg_key r (HKEY_CURRENT_USER, KEY_ALL_ACCESS,
- "SOFTWARE",
- "Cygnus Solutions",
- "CYGWIN.DLL setup",
- "b15.0",
- "mounts",
- NULL);
-
- nmounts = 0;
-
- /* First read mounts from user's table. */
- read_v1_mounts (r, 0);
-
- /* Then read mounts from system-wide mount table. */
- reg_key r1 (HKEY_LOCAL_MACHINE, KEY_ALL_ACCESS,
- "SOFTWARE",
- "Cygnus Solutions",
- "CYGWIN.DLL setup",
- "b15.0",
- "mounts",
- NULL);
- read_v1_mounts (r1, MOUNT_SYSTEM);
-}
-
-/************************* mount_item class ****************************/
-
-struct mntent *
-mount_item::getmntent ()
-{
-#ifdef _MT_SAFE
- struct mntent &ret=_reent_winsup()->_ret;
-#else
- static NO_COPY struct mntent ret;
-#endif
-
- /* Pass back pointers to mount_info 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. */
-
- strcpy (cygwin_shared->mount.mnt_fsname, native_path);
- ret.mnt_fsname = cygwin_shared->mount.mnt_fsname;
- strcpy (cygwin_shared->mount.mnt_dir, posix_path);
- ret.mnt_dir = cygwin_shared->mount.mnt_dir;
-
- if (!(flags & MOUNT_SYSTEM)) /* user mount */
- strcpy (cygwin_shared->mount.mnt_type, (char *) "user");
- else /* system mount */
- strcpy (cygwin_shared->mount.mnt_type, (char *) "system");
-
- if ((flags & MOUNT_AUTO)) /* cygdrive */
- strcat (cygwin_shared->mount.mnt_type, (char *) ",auto");
-
- ret.mnt_type = cygwin_shared->mount.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 (cygwin_shared->mount.mnt_opts, (char *) "textmode");
- else
- strcpy (cygwin_shared->mount.mnt_opts, (char *) "binmode");
-
- if (flags & MOUNT_CYGWIN_EXEC)
- strcat (cygwin_shared->mount.mnt_opts, (char *) ",cygexec");
- else if (flags & MOUNT_EXEC)
- strcat (cygwin_shared->mount.mnt_opts, (char *) ",exec");
-
-
- ret.mnt_opts = cygwin_shared->mount.mnt_opts;
-
- ret.mnt_freq = 1;
- ret.mnt_passno = 1;
- return &ret;
-}
-
-/* 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;
-
- if (flags & MOUNT_AUTO) /* normal mount */
- {
- /* When flags include MOUNT_AUTO, take this to mean that
- we actually want to change the cygdrive prefix and flags
- without actually mounting anything. */
- res = cygwin_shared->mount.write_cygdrive_info_to_registry (posix_path, flags);
- win32_path = NULL;
- }
- else
- res = cygwin_shared->mount.add_item (win32_path, posix_path, flags, TRUE);
-
- 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)
-{
- 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_AUTO)
- {
- /* When flags include MOUNT_AUTO, take this to mean that we actually want
- to remove the cygdrive prefix and flags without actually unmounting
- anything. */
- res = cygwin_shared->mount.remove_cygdrive_info_from_registry (path, flags);
- }
- else
- {
- res = cygwin_shared->mount.del_item (path, flags, TRUE);
- }
-
- syscall_printf ("%d = cygwin_umount (%s, %d)", res, path, flags);
- return res;
-}
-
-#ifdef _MT_SAFE
-#define iteration _reent_winsup()->_iteration
-#else
-static int iteration;
-#endif
-
-extern "C"
-FILE *
-setmntent (const char *filep, const char *)
-{
- iteration = 0;
- return (FILE *) filep;
-}
-
-extern "C"
-struct mntent *
-getmntent (FILE *)
-{
- return cygwin_shared->mount.getmntent (iteration++);
-}
-
-extern "C"
-int
-endmntent (FILE *)
-{
- return 1;
-}
-
-/********************** Symbolic Link Support **************************/
-
-/* Create a symlink from FROMPATH to TOPATH. */
-
-extern "C"
-int
-symlink (const char *topath, const char *frompath)
-{
- HANDLE h;
- int res = -1;
-
- path_conv win32_path (frompath, PC_SYM_NOFOLLOW);
- if (win32_path.error)
- {
- set_errno (win32_path.error);
- goto done;
- }
-
- syscall_printf ("symlink (%s, %s)", topath, win32_path.get_win32 ());
-
- if (topath[0] == 0)
- {
- set_errno (EINVAL);
- goto done;
- }
- if (strlen (topath) >= MAX_PATH)
- {
- set_errno (ENAMETOOLONG);
- goto done;
- }
-
- if (win32_path.is_device () ||
- win32_path.file_attributes () != (DWORD) -1)
- {
- set_errno (EEXIST);
- goto done;
- }
-
- h = CreateFileA(win32_path, GENERIC_WRITE, 0, &sec_none_nih,
- CREATE_NEW, FILE_ATTRIBUTE_NORMAL, 0);
- if (h == INVALID_HANDLE_VALUE)
- __seterrno ();
- else
- {
- char buf[sizeof (SYMLINK_COOKIE) + MAX_PATH + 10];
-
- __small_sprintf (buf, "%s%s", SYMLINK_COOKIE, topath);
- DWORD len = strlen (buf) + 1;
-
- /* Note that the terminating nul is written. */
- DWORD written;
- if (!WriteFile (h, buf, len, &written, NULL) || written != len)
- {
- __seterrno ();
- CloseHandle (h);
- DeleteFileA (win32_path.get_win32 ());
- }
- else
- {
- CloseHandle (h);
- set_file_attribute (win32_path.has_acls (),
- win32_path.get_win32 (),
- S_IFLNK | S_IRWXU | S_IRWXG | S_IRWXO);
- SetFileAttributesA (win32_path.get_win32 (), FILE_ATTRIBUTE_SYSTEM);
- res = 0;
- }
- }
-
-done:
- syscall_printf ("%d = symlink (%s, %s)", res, topath, frompath);
- return res;
-}
-
-static __inline char *
-has_suffix (const char *path, const suffix_info *suffixes)
-{
- assert (path);
- char *ext = strrchr (path, '.');
- if (ext)
- for (const suffix_info *ex = suffixes; ex->name != NULL; ex++)
- if (strcasematch (ext, ex->name))
- return ext;
- return NULL;
-}
-
-static __inline__ int
-next_suffix (char *ext_here, const suffix_info *&suffixes)
-{
- if (!suffixes)
- return 1;
-
- while (suffixes && suffixes->name)
- if (!suffixes->addon)
- suffixes++;
- else
- {
- strcpy (ext_here, suffixes->name);
- suffixes++;
- return 1;
- }
- return 0;
-}
-
-/* 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 (const char *in_path, const suffix_info *suffixes)
-{
- HANDLE h;
- int res = 0;
- char extbuf[MAX_PATH + 5];
- const char *path = in_path;
-
- if (!suffixes)
- ext_here = NULL;
- else if ((known_suffix = has_suffix (in_path, suffixes)) != NULL)
- {
- suffixes = NULL;
- ext_here = NULL;
- }
- else
- {
- path = strcpy (extbuf, in_path);
- ext_here = strchr (path, '\0');
- }
-
- is_symlink = TRUE;
-
- error = 0;
- do
- {
- if (!next_suffix (ext_here, suffixes))
- break;
- error = 0;
- fileattr = GetFileAttributesA (path);
- if (fileattr == (DWORD) -1)
- {
- /* The GetFileAttributesA call can fail for reasons that don't
- matter, so we just return 0. For example, getting the
- attributes of \\HOST will typically fail. */
- debug_printf ("GetFileAttributesA (%s) failed", path);
- error = geterrno_from_win_error (GetLastError (), EACCES);
- continue;
- }
-
- /* A symlink will have the `system' file attribute. */
- /* Only files can be symlinks (which can be symlinks to directories). */
- if (!(pflags & PATH_SYMLINK) && !SYMLINKATTR (fileattr))
- goto file_not_symlink;
-
- /* Open the file. */
-
- h = CreateFileA (path, GENERIC_READ, FILE_SHARE_READ, &sec_none_nih, OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL, 0);
- res = -1;
- if (h == INVALID_HANDLE_VALUE)
- goto file_not_symlink;
- else
- {
- char cookie_buf[sizeof (SYMLINK_COOKIE) - 1];
- DWORD got;
-
- if (! ReadFile (h, cookie_buf, sizeof (cookie_buf), &got, 0))
- error = EIO;
- else if (got == sizeof (cookie_buf)
- && memcmp (cookie_buf, SYMLINK_COOKIE,
- sizeof (cookie_buf)) == 0)
- {
- /* It's a symlink. */
- pflags = PATH_SYMLINK;
-
- res = ReadFile (h, contents, MAX_PATH + 1, &got, 0);
- if (!res)
- error = EIO;
- else
- {
- /* Versions prior to b16 stored several trailing
- NULs with the path (to fill the path out to 1024
- chars). Current versions only store one trailing
- NUL. The length returned is the path without
- *any* trailing NULs. We also have to handle (or
- at least not die from) corrupted paths. */
- if (memchr (contents, 0, got) != NULL)
- res = strlen (contents);
- else
- res = got;
- }
- }
- else if (got == sizeof (cookie_buf)
- && memcmp (cookie_buf, SOCKET_COOKIE,
- sizeof (cookie_buf)) == 0)
- {
- pflags |= PATH_SOCKET;
- goto close_and_return;
- }
- else
- {
- /* Not a symlink, see if executable. */
- if (!(pflags & PATH_ALL_EXEC) &&
- has_exec_chars (cookie_buf, got))
-{
-debug_printf ("setting exec flag");
- pflags |= PATH_EXEC;
-}
- close_and_return:
- CloseHandle (h);
- goto file_not_symlink;
- }
- }
-
- CloseHandle (h);
- break;
- }
- while (suffixes);
- goto out;
-
-file_not_symlink:
- is_symlink = FALSE;
- syscall_printf ("not a symlink");
- res = 0;
-
-out:
- syscall_printf ("%d = symlink.check (%s, %p) (%p)",
- res, path, contents, pflags);
-
- return res;
-}
-
-/* readlink system call */
-
-extern "C"
-int
-readlink (const char *path, char *buf, int buflen)
-{
- extern suffix_info stat_suffixes[];
-
- 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.file_attributes () == (DWORD) -1)
- {
- set_errno (ENOENT);
- return -1;
- }
-
- if (!pathbuf.issymlink ())
- {
- if (pathbuf.fileattr != (DWORD) -1)
- set_errno (EINVAL);
- return -1;
- }
-
- int len = min (buflen, (int) 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 */
-
-unsigned long __stdcall
-hash_path_name (unsigned long hash, const char *name)
-{
- if (!*name)
- return hash;
-
- /* Perform some initial permutations on the pathname if this is
- not "seeded" */
- if (!hash)
- {
- /* Simplistic handling of drives. If there is a drive specified,
- make sure that the initial letter is upper case. If there is
- no \ after the ':' assume access through the root directory
- of that drive.
- FIXME: Should really honor MS-Windows convention of using
- the environment to track current directory on various drives. */
- if (name[1] == ':')
- {
- char *nn, *newname = (char *) alloca (strlen (name) + 2);
- nn = strncpy (newname, name, 2);
- if (isupper (*nn))
- *newname = cyg_tolower (*nn);
- *(nn += 2) = '\0';
- name += 2;
- if (*name != '\\')
- {
- *nn = '\\';
- *++nn = '\0';
- }
- strcpy (nn, name);
- name = newname;
- goto hashit;
- }
-
- /* Fill out the hashed path name with the current working directory if
- this is not an absolute path and there is no pre-specified hash value.
- Otherwise the inodes same will differ depending on whether a file is
- referenced with an absolute value or relatively. */
-
- if (!hash && !isabspath (name))
- {
- hash = cygcwd.get_hash ();
- if (name[0] == '.' && name[1] == '\0')
- return hash;
- hash += hash_path_name (hash, "\\");
- }
- }
-
-hashit:
- /* Build up hash. Ignore single trailing slash or \a\b\ != \a\b or
- \a\b\. but allow a single \ if that's all there is. */
- do
- {
- int ch = cyg_tolower(*name);
- hash += ch + (ch << 17);
- hash ^= hash >> 2;
- }
- while (*++name != '\0' &&
- !(*name == '\\' && (!name[1] || (name[1] == '.' && !name[2]))));
- return hash;
-}
-
-char *
-getcwd (char *buf, size_t ulen)
-{
- return cygcwd.get (buf, 1, 1, ulen);
-}
-
-/* getwd: standards? */
-extern "C"
-char *
-getwd (char *buf)
-{
- return getcwd (buf, MAX_PATH);
-}
-
-/* chdir: POSIX 5.2.1.1 */
-extern "C"
-int
-chdir (const char *dir)
-{
- MALLOC_CHECK;
- syscall_printf ("dir %s", dir);
- path_conv path (dir, PC_FULL | PC_SYM_FOLLOW);
-
- if (path.error)
- {
- set_errno (path.error);
- syscall_printf ("-1 = chdir (%s)", dir);
- return -1;
- }
-
- /* Look for trailing path component consisting entirely of dots. This
- is needed only in case of chdir since Windows simply ignores count
- of dots > 2 here instead of returning an error code. Counts of dots
- <= 2 are already eliminated by normalize_posix_path. */
- const char *p = strrchr (dir, '/');
- if (!p)
- p = dir;
- else
- p++;
-
- size_t len = strlen (p);
- if (len > 2 && strspn (p, ".") == len)
- {
- set_errno (ENOENT);
- return -1;
- }
-
- char *native_dir = path.get_win32 ();
-
- /* Check to see if path translates to something like C:.
- If it does, append a \ to the native directory specification to
- defeat the Windows 95 (i.e. MS-DOS) tendency of returning to
- the last directory visited on the given drive. */
- if (isdrive (native_dir) && !native_dir[2])
- {
- native_dir[2] = '\\';
- native_dir[3] = '\0';
- }
- int res = SetCurrentDirectoryA (native_dir) ? 0 : -1;
- if (res == -1)
- __seterrno ();
- else
- cygcwd.set (path, strpbrk (dir, ":\\") != NULL ? NULL : dir);
-
- /* 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() cygcwd.posix '%s' native '%s'", res,
- cygcwd.posix, native_dir);
- MALLOC_CHECK;
- return res;
-}
-
-/******************** Exported Path Routines *********************/
-
-/* Cover functions to the path conversion routines.
- These are exported to the world as cygwin_foo by cygwin.din. */
-
-extern "C"
-int
-cygwin_conv_to_win32_path (const char *path, char *win32_path)
-{
- path_conv p (path, PC_SYM_FOLLOW);
- if (p.error)
- {
- set_errno (p.error);
- return -1;
- }
-
- strcpy (win32_path, p.get_win32 ());
- return 0;
-}
-
-extern "C"
-int
-cygwin_conv_to_full_win32_path (const char *path, char *win32_path)
-{
- path_conv p (path, PC_SYM_FOLLOW | PC_FULL);
- if (p.error)
- {
- set_errno (p.error);
- return -1;
- }
-
- strcpy (win32_path, p.get_win32 ());
- return 0;
-}
-
-/* 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)
-{
- if (check_null_empty_path_errno (path))
- return -1;
- cygwin_shared->mount.conv_to_posix_path (path, posix_path, 1);
- return 0;
-}
-
-extern "C"
-int
-cygwin_conv_to_full_posix_path (const char *path, char *posix_path)
-{
- if (check_null_empty_path_errno (path))
- return -1;
- cygwin_shared->mount.conv_to_posix_path (path, posix_path, 0);
- return 0;
-}
-
-/* The realpath function is supported on some UNIX systems. */
-
-extern "C"
-char *
-realpath (const char *path, char *resolved)
-{
- int err;
-
- path_conv real_path (path, PC_SYM_FOLLOW | PC_FULL);
-
- if (real_path.error)
- err = real_path.error;
- else
- {
- err = cygwin_shared->mount.conv_to_posix_path (real_path.get_win32 (), resolved, 0);
- if (err == 0)
- return resolved;
- }
-
- /* FIXME: on error, we are supposed to put the name of the path
- component which could not be resolved into RESOLVED. */
- resolved[0] = '\0';
-
- set_errno (err);
- 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, int to_posix_p)
-{
- int i, num_elms, max_mount_path_len, size;
- const char *p;
-
- /* The theory is that an upper bound is
- current_size + (num_elms * max_mount_path_len) */
-
- char delim = to_posix_p ? ';' : ':';
- p = path_list;
- for (num_elms = 1; (p = strchr (p, delim)) != NULL; ++num_elms)
- ++p;
-
- /* 7: strlen ("//c") + slop, a conservative initial value */
- for (max_mount_path_len = 7, i = 0; i < cygwin_shared->mount.nmounts; ++i)
- {
- int mount_len = (to_posix_p
- ? cygwin_shared->mount.mount[i].posix_pathlen
- : cygwin_shared->mount.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) + 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, 1);
-}
-
-extern "C"
-int
-cygwin_posix_to_win32_path_list_buf_size (const char *path_list)
-{
- return conv_path_list_buf_size (path_list, 0);
-}
-
-extern "C"
-int
-cygwin_win32_to_posix_path_list (const char *win32, char *posix)
-{
- conv_path_list (win32, posix, 1);
- return 0;
-}
-
-extern "C"
-int
-cygwin_posix_to_win32_path_list (const char *posix, char *win32)
-{
- conv_path_list (posix, win32, 0);
- return 0;
-}
-
-/* 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 (SLASH_P (*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 && SLASH_P (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 (SLASH_P (*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;
-}
-
-int __stdcall
-check_null_empty_path (const char *name)
-{
- MEMORY_BASIC_INFORMATION m;
- if (!name || !VirtualQuery (name, &m, sizeof (m)) || (m.State != MEM_COMMIT))
- return EFAULT;
-
- if (!*name)
- return ENOENT;
-
- return 0;
-}
-
-/*****************************************************************************/
-
-/* Return the hash value for the current win32 value.
- This is used when constructing inodes. */
-DWORD
-cwdstuff::get_hash ()
-{
- DWORD hashnow;
- lock->acquire ();
- hashnow = hash;
- lock->release ();
- return hashnow;
-}
-
-/* Initialize cygcwd 'muto' for serializing access to cwd info. */
-void
-cwdstuff::init ()
-{
- lock = new_muto (FALSE, "cwd");
-}
-
-/* Called to fill in cwd values after an exec. */
-void
-cwdstuff::fixup_after_exec (char *win32_cwd, char *posix_cwd, DWORD hash_cwd)
-{
- win32 = win32_cwd;
- posix = posix_cwd;
- hash = hash_cwd;
-}
-
-/* Get initial cwd. Should only be called once in a
- process tree. */
-bool
-cwdstuff::get_initial ()
-{
- lock->acquire ();
-
- if (win32)
- return 1;
-
- int i;
- DWORD len, dlen;
- for (i = 0, dlen = MAX_PATH, len = 0; i < 3; dlen *= 2, i++)
- {
- win32 = (char *) crealloc (win32, dlen + 2);
- if ((len = GetCurrentDirectoryA (dlen, win32)) < dlen)
- break;
- }
-
- if (len == 0)
- {
- __seterrno ();
- lock->release ();
- debug_printf ("get_initial_cwd failed, %E");
- lock->release ();
- return 0;
- }
- set (NULL);
- return 1; /* Leaves cwd lock unreleased */
-}
-
-/* Fill out the elements of a cwdstuff struct.
- It is assumed that the lock for the cwd is acquired if
- win32_cwd == NULL. */
-void
-cwdstuff::set (const char *win32_cwd, const char *posix_cwd)
-{
- char pathbuf[MAX_PATH];
-
- if (win32_cwd)
- {
- lock->acquire ();
- win32 = (char *) crealloc (win32, strlen (win32_cwd) + 1);
- strcpy (win32, win32_cwd);
- }
-
- if (!posix_cwd)
- cygwin_shared->mount.conv_to_posix_path (win32, pathbuf, 0);
- else
- (void) normalize_posix_path (posix_cwd, pathbuf);
-
- posix = (char *) crealloc (posix, strlen (pathbuf) + 1);
- strcpy (posix, pathbuf);
-
- hash = hash_path_name (0, win32);
-
- if (win32_cwd)
- lock->release ();
-
- return;
-}
-
-/* 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;
-
- if (ulen)
- /* nothing */;
- else if (buf == NULL)
- ulen = (unsigned) -1;
- else
- {
- set_errno (EINVAL);
- goto out;
- }
-
- if (!get_initial ()) /* Get initial cwd and set cwd lock */
- return NULL;
-
- char *tocopy;
- if (!need_posix)
- tocopy = win32;
- else
- tocopy = with_chroot && ischrootpath(posix) ?
- posix + cygheap->root.length () : posix;
-
- debug_printf("cygheap->root: %s, posix: %s",
- (const char *) cygheap->root.path (), 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, "/");
- }
-
- 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;
-}
-
-/* Get copies of all cwdstuff elements. Used by spawn_guts. */
-void
-cwdstuff::copy (char * &posix_cwd, char * &win32_cwd, DWORD hash_cwd)
-{
- lock->acquire ();
- get_initial (); /* FIXME: Check return someday */
- posix_cwd = cstrdup (posix);
- win32_cwd = cstrdup (win32);
- hash_cwd = hash;
- MALLOC_CHECK;
- lock->release ();
-}
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h
deleted file mode 100644
index ca039e200..000000000
--- a/winsup/cygwin/path.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/* path.h: path data structures
-
- Copyright 1996, 1997, 1998, 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. */
-
-struct suffix_info
-{
- const char *name;
- int addon;
- suffix_info (const char *s, int addit = 0): name (s), addon (addit) {}
-};
-
-enum pathconv_arg
-{
- PC_SYM_FOLLOW = 0x0001,
- PC_SYM_NOFOLLOW = 0x0002,
- PC_SYM_IGNORE = 0x0004,
- PC_SYM_CONTENTS = 0x0008,
- PC_FULL = 0x0010,
- PC_NULLEMPTY = 0x0020
-};
-
-#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_CYGWIN_EXEC = MOUNT_CYGWIN_EXEC,
- PATH_ALL_EXEC = PATH_CYGWIN_EXEC | PATH_EXEC,
- PATH_HASBUGGYOPEN = 0x20000000,
- PATH_SOCKET = 0x40000000,
- PATH_HASACLS = 0x80000000
-};
-
-class path_conv
-{
- char path[MAX_PATH];
- public:
-
- unsigned path_flags;
-
- int has_acls () {return path_flags & PATH_HASACLS;}
- int hasgood_inode () {return path_flags & PATH_HASACLS;} // Not strictly correct
- int has_buggy_open () {return path_flags & PATH_HASBUGGYOPEN;}
- int isbinary () {return path_flags & PATH_BINARY;}
- int issymlink () {return path_flags & PATH_SYMLINK;}
- int issocket () {return path_flags & PATH_SOCKET;}
- int isexec () {return path_flags & PATH_ALL_EXEC;}
- int iscygexec () {return path_flags & PATH_CYGWIN_EXEC;}
-
- void set_binary () {path_flags |= PATH_BINARY;}
- void set_symlink () {path_flags |= PATH_SYMLINK;}
- void set_exec (int x = 1) {path_flags |= x ? PATH_EXEC : PATH_NOTHING;}
- void set_has_acls (int x = 1) {path_flags |= x ? PATH_HASACLS : PATH_NOTHING;}
- void set_has_buggy_open (int x = 1) {path_flags |= x ? PATH_HASBUGGYOPEN : PATH_NOTHING;}
-
- char *known_suffix;
-
- int error;
- DWORD devn;
- int unit;
-
- DWORD fileattr;
-
- void check (const char *src, unsigned opt = PC_SYM_FOLLOW,
- const suffix_info *suffixes = NULL) __attribute__ ((regparm(3)));
-
- path_conv (int, const char *src, unsigned opt = PC_SYM_FOLLOW,
- const suffix_info *suffixes = NULL)
- {
- check (src, opt, suffixes);
- }
-
- path_conv (const char *src, unsigned opt = PC_SYM_FOLLOW,
- const suffix_info *suffixes = NULL)
- {
- check (src, opt | PC_NULLEMPTY, suffixes);
- }
-
- path_conv (): path_flags (0), known_suffix (NULL), error (0), devn (0), unit (0), fileattr (0xffffffff) {path[0] = '\0';}
-
- inline char *get_win32 () { return path; }
- operator char *() {return path; }
- BOOL is_device () {return devn != FH_BAD;}
- DWORD get_devn () {return devn == FH_BAD ? (DWORD) FH_DISK : devn;}
- short get_unitn () {return devn == FH_BAD ? 0 : unit;}
- DWORD file_attributes () {return fileattr;}
-};
-
-/* Symlink marker */
-#define SYMLINK_COOKIE "!<symlink>"
-
-/* Socket marker */
-#define SOCKET_COOKIE "!<socket >"
-
-/* Maximum depth of symlinks (after which ELOOP is issued). */
-#define MAX_LINK_DEPTH 10
-
-int __stdcall get_device_number (const char *name, int &unit, BOOL from_conv = FALSE) __attribute__ ((regparm(3)));
-int __stdcall slash_unc_prefix_p (const char *path) __attribute__ ((regparm(1)));
-int __stdcall check_null_empty_path (const char *name) __attribute__ ((regparm(1)));
-
-const char * __stdcall find_exec (const char *name, path_conv& buf, const char *winenv = "PATH=",
- int null_if_notfound = 0, const char **known_suffix = NULL) __attribute__ ((regparm(3)));
-
-/* Common macros for checking for invalid path names */
-
-#define check_null_empty_path_errno(src) \
-({ \
- int __err; \
- if ((__err = check_null_empty_path(src))) \
- set_errno (__err); \
- __err; \
-})
-
-#define isdrive(s) (isalpha (*(s)) && (s)[1] == ':')
-
-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'));
-}
-
-/* cwd cache stuff. */
-
-class muto;
-
-struct cwdstuff
-{
- char *posix;
- char *win32;
- DWORD hash;
- muto *lock;
- char *get (char *buf, int need_posix = 1, int with_chroot = 0, unsigned ulen = MAX_PATH);
- DWORD get_hash ();
- void init ();
- void fixup_after_exec (char *win32, char *posix, DWORD hash);
- bool get_initial ();
- void copy (char * &posix_cwd, char * &win32_cwd, DWORD hash_cwd);
- void set (const char *win32_cwd, const char *posix_cwd = NULL);
-};
-
-extern cwdstuff cygcwd;
diff --git a/winsup/cygwin/path.sgml b/winsup/cygwin/path.sgml
deleted file mode 100644
index 6030c8f78..000000000
--- a/winsup/cygwin/path.sgml
+++ /dev/null
@@ -1,205 +0,0 @@
-<sect1 id="func-cygwin-posix-to-win32-path-list">
-<title>cygwin_posix_to_win32_path_list</title>
-
-<funcsynopsis>
-<funcdef>extern "C" void
-<function>cygwin_posix_to_win32_path_list</function></funcdef>
-<paramdef>const char *<parameter>posix</parameter></paramdef>
-<paramdef>char *<parameter>win32</parameter></paramdef>
-</funcsynopsis>
-
-<para>Given a POSIX path-style string (i.e. /foo:/bar) convert it to
-the equivalent Win32 path-style string (i.e. d:\;e:\bar).
-<parameter>win32</parameter> must point to a sufficiently large
-buffer.</para>
-
-<example>
-<title>Example use of cygwin_posix_to_win32_path_list</title>
-<programlisting>
-char *_epath;
-char *_win32epath;
-_epath = _win32epath = getenv (NAME);
-/* If we have a POSIX path list, convert to win32 path list */
-if (_epath != NULL && *_epath != 0
- && cygwin_posix_path_list_p (_epath))
- {
- _win32epath = (char *) xmalloc
- (cygwin_posix_to_win32_path_list_buf_size (_epath));
- cygwin_posix_to_win32_path_list (_epath, _win32epath);
- }
-</programlisting>
-</example>
-
-<para>See also <link linkend="func-cygwin-posix-to-win32-path-list-buf-size">
-cygwin_posix_to_win32_path_list_buf_size</link></para>
-
-</sect1>
-
-<sect1 id="func-cygwin-win32-to-posix-path-list">
-<title>cygwin_win32_to_posix_path_list</title>
-
-<funcsynopsis>
-<funcdef>extern "C" void
-<function>cygwin_win32_to_posix_path_list</function></funcdef>
-<paramdef>const char *<parameter>win32</parameter></paramdef>
-<paramdef>char *<parameter>posix</parameter></paramdef>
-</funcsynopsis>
-
-<para>Given a Win32 path-style string (i.e. d:\;e:\bar) convert it to
-the equivalent POSIX path-style string (i.e. /foo:/bar).
-<parameter>posix</parameter> must point to a sufficiently large
-buffer. See also <link
-linkend="func-cygwin-win32-to-posix-path-list-buf-size">
-cygwin_win32_to_posix_path_list_buf_size</link></para>
-
-</sect1>
-
-<sect1 id="func-cygwin-posix-to-win32-path-list-buf-size">
-<title>cygwin_posix_to_win32_path_list_buf_size</title>
-
-<funcsynopsis>
-<funcdef>extern "C" int
-<function>cygwin_posix_to_win32_path_list_buf_size</function></funcdef>
-<paramdef>const char *<parameter>path_list</parameter></paramdef>
-</funcsynopsis>
-
-<para>Returns the number of bytes needed to hold the result of calling
-<link linkend="func-cygwin-posix-to-win32-path-list">
-cygwin_posix_to_win32_path_list</link>.</para>
-
-</sect1>
-
-<sect1 id="func-cygwin-win32-to-posix-path-list-buf-size">
-<title>cygwin_win32_to_posix_path_list_buf_size</title>
-
-<funcsynopsis>
-<funcdef>extern "C" int
-<function>cygwin_win32_to_posix_path_list_buf_size</function></funcdef>
-<paramdef>const char *<parameter>path_list</parameter></paramdef>
-</funcsynopsis>
-
-<para>Tells you how many bytes are needed for the results of <link
-linkend="func-cygwin-win32-to-posix-path-list">
-cygwin_win32_to_posix_path_list</link>.</para>
-
-</sect1>
-
-<sect1 id="func-cygwin-conv-to-posix-path">
-<title>cygwin_conv_to_posix_path</title>
-
-<funcsynopsis>
-<funcdef>extern "C" void
-<function>cygwin_conv_to_posix_path</function></funcdef>
-<paramdef>const char *<parameter>path</parameter></paramdef>
-<paramdef>char *<parameter>posix_path</parameter></paramdef>
-</funcsynopsis>
-
-<para>Converts a Win32 path to a POSIX path. If
-<parameter>path</parameter> is already a POSIX path, leaves it alone.
-If <parameter>path</parameter> is relative, then
-<parameter>posix_path</parameter> will also be relative. Note that
-<parameter>posix_path</parameter> must point to a buffer of sufficient
-size; use MAX_PATH if needed.</para>
-
-</sect1>
-
-<sect1 id="func-cygwin-conv-to-win32-path">
-<title>cygwin_conv_to_win32_path</title>
-
-<funcsynopsis>
-<funcdef>extern "C" void
-<function>cygwin_conv_to_win32_path</function></funcdef>
-<paramdef>const char *<parameter>path</parameter></paramdef>
-<paramdef>char *<parameter>win32_path</parameter></paramdef>
-</funcsynopsis>
-
-<para>Converts a POSIX path to a Win32 path. If
-<parameter>path</parameter> is already a Win32 path, leaves it alone.
-If <parameter>path</parameter> is relative, then
-<parameter>win32_path</parameter> will also be relative. Note that
-<parameter>win32_path</parameter> must point to a buffer of sufficient
-size; use MAX_PATH if needed.</para>
-
-</sect1>
-<sect1 id="func-cygwin-conv-to-full-posix-path">
-<title>cygwin_conv_to_full_posix_path</title>
-
-<funcsynopsis>
-<funcdef>extern "C" void
-<function>cygwin_conv_to_full_posix_path</function></funcdef>
-<paramdef>const char *<parameter>path</parameter></paramdef>
-<paramdef>char *<parameter>posix_path</parameter></paramdef>
-</funcsynopsis>
-
-<para>Converts a Win32 path to a POSIX path. If
-<parameter>path</parameter> is already a POSIX path, leaves it alone.
-If <parameter>path</parameter> is relative, then
-<parameter>posix_path</parameter> will be converted to an absolute
-path. Note that <parameter>posix_path</parameter> must point to a
-buffer of sufficient size; use MAX_PATH if needed.</para>
-
-</sect1>
-
-<sect1 id="func-cygwin-conv-to-full-win32-path">
-<title>cygwin_conv_to_full_win32_path</title>
-
-<funcsynopsis>
-<funcdef>extern "C" void
-<function>cygwin_conv_to_full_win32_path</function></funcdef>
-<paramdef>const char *<parameter>path</parameter></paramdef>
-<paramdef>char *<parameter>win32_path</parameter></paramdef>
-</funcsynopsis>
-
-<para>Converts a POSIX path to a Win32 path. If
-<parameter>path</parameter> is already a Win32 path, leaves it alone.
-If <parameter>path</parameter> is relative, then
-<parameter>win32_path</parameter> will be converted to an absolute
-path. Note that <parameter>win32_path</parameter> must point to a
-buffer of sufficient size; use MAX_PATH if needed.</para>
-
-</sect1>
-
-<sect1 id="func-cygwin-posix-path-list-p">
-<title>cygwin_posix_path_list_p</title>
-
-<funcsynopsis>
-<funcdef>extern "C" int
-<function>posix_path_list_p</function></funcdef>
-<paramdef>const char *<parameter>path</parameter></paramdef>
-</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>
-<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>
-</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 a649ece74..000000000
--- a/winsup/cygwin/perprocess.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* per_process.h: main Cygwin header file.
-
- 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 <sys/cygwin.h>
-
-/* Pointer into application's static data */
-extern "C" 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)
diff --git a/winsup/cygwin/perthread.h b/winsup/cygwin/perthread.h
deleted file mode 100644
index 89b97d4fb..000000000
--- a/winsup/cygwin/perthread.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/* perthread.h: Header file for cygwin synchronization primitives.
-
- Copyright 2000 Cygnus Solutions.
-
- 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. */
-
-#define PTMAGIC 0x77366377
-
-struct _reent;
-extern struct _reent reent_data;
-
-extern DWORD *__stackbase __asm__ ("%fs:4");
-
-extern __inline struct _reent *
-get_reent ()
-{
- DWORD *base = __stackbase - 1;
-
- if (*base != PTMAGIC)
- return &reent_data;
- return (struct _reent *) base[-1];
-}
-
-extern inline void
-set_reent (struct _reent *r)
-{
- DWORD *base = __stackbase - 1;
-
- *base = PTMAGIC;
- base[-1] = (DWORD) r;
-}
-
-#define PER_THREAD_FORK_CLEAR ((void *)0xffffffff)
-class per_thread
-{
- DWORD tls;
- int clear_on_fork_p;
-public:
- per_thread (int forkval = 1) {tls = TlsAlloc (); clear_on_fork_p = forkval;}
- DWORD get_tls () {return tls;}
- int clear_on_fork () {return clear_on_fork_p;}
-
- virtual void *get () {return TlsGetValue (get_tls ());}
- virtual size_t size () {return 0;}
- virtual void set (void *s = NULL);
- virtual void set (int n) {TlsSetValue (get_tls (), (void *)n);}
- virtual void *create ()
- {
- void *s = new char [size ()];
- memset (s, 0, size ());
- set (s);
- return s;
- }
-};
-
-class per_thread_waitq : public per_thread
-{
-public:
- per_thread_waitq () : per_thread (0) {}
- void *get () {return (waitq *) this->per_thread::get ();}
- void *create () {return (waitq *) this->per_thread::create ();}
- size_t size () {return sizeof (waitq);}
-};
-
-#ifdef NEED_VFORK
-struct vfork_save
-{
- int pid;
- jmp_buf j;
- DWORD frame[100];
- char **vfork_ebp;
- char **vfork_esp;
- int is_active () { return pid < 0; }
-};
-
-class per_thread_vfork : public per_thread
-{
-public:
- vfork_save *val () { return (vfork_save *) this->per_thread::get (); }
- vfork_save *create () {return (vfork_save *) this->per_thread::create ();}
- size_t size () {return sizeof (vfork_save);}
-};
-extern per_thread_vfork vfork_storage;
-#endif
-
-extern "C" {
-struct signal_dispatch
-{
- int arg;
- void (*func) (int);
- int sig;
- int saved_errno;
- DWORD oldmask;
- DWORD newmask;
- DWORD retaddr;
- DWORD *retaddr_on_stack;
-};
-};
-
-struct per_thread_signal_dispatch : public per_thread
-{
- signal_dispatch *get () { return (signal_dispatch *) this->per_thread::get (); }
- signal_dispatch *create () {return (signal_dispatch *) this->per_thread::create ();}
- size_t size () {return sizeof (signal_dispatch);}
-};
-
-extern per_thread_waitq waitq_storage;
-extern per_thread_signal_dispatch signal_dispatch_storage;
-
-extern per_thread *threadstuff[];
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
deleted file mode 100644
index eea05c03e..000000000
--- a/winsup/cygwin/pinfo.cc
+++ /dev/null
@@ -1,469 +0,0 @@
-/* pinfo.cc: process table support
-
- Copyright 1996, 1997, 1998, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <time.h>
-#include <errno.h>
-#include <limits.h>
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygerrno.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "cygwin_version.h"
-#include "perprocess.h"
-#include "environ.h"
-#include "security.h"
-#include <assert.h>
-#include <ntdef.h>
-#include "ntdll.h"
-
-static char NO_COPY pinfo_dummy[sizeof(pinfo)] = {0};
-
-pinfo NO_COPY myself ((_pinfo *)&pinfo_dummy); // Avoid myself != NULL checks
-
-HANDLE hexec_proc = NULL;
-
-void __stdcall
-pinfo_fixup_after_fork ()
-{
- if (hexec_proc)
- CloseHandle (hexec_proc);
-
- if (!DuplicateHandle (hMainProc, hMainProc, hMainProc, &hexec_proc, 0,
- TRUE, DUPLICATE_SAME_ACCESS))
- {
- system_printf ("couldn't save current process handle %p, %E", hMainProc);
- hexec_proc = NULL;
- }
-}
-
-/* Initialize the process table.
- This is done once when the dll is first loaded. */
-
-void __stdcall
-set_myself (pid_t pid, HANDLE h)
-{
- DWORD winpid = GetCurrentProcessId ();
- if (pid == 1)
- pid = cygwin_pid (winpid);
- myself.init (pid, 1, h);
- myself->dwProcessId = winpid;
- myself->process_state |= PID_IN_USE;
- myself->start_time = time (NULL); /* Register our starting time. */
-
- char buf[30];
- __small_sprintf (buf, "cYg%8x %x", _STRACE_INTERFACE_ACTIVATE_ADDR,
- &strace.active);
- OutputDebugString (buf);
-
- (void) GetModuleFileName (NULL, myself->progname,
- sizeof(myself->progname));
- if (strace.active)
- {
- extern char osname[];
- strace.prntf (1, NULL, "**********************************************");
- strace.prntf (1, NULL, "Program name: %s (%d)", myself->progname, myself->pid);
- strace.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);
- strace.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);
- strace.prntf (1, NULL, "DLL build: %s", cygwin_version.dll_build_date);
- strace.prntf (1, NULL, "OS version: Windows %s", osname);
- strace.prntf (1, NULL, "**********************************************");
- }
-
- return;
-}
-
-extern "C" void
-codepage_init (const char *buf)
-{
- if (!buf || !*buf)
- return;
-
- if ( strcmp ( buf, "oem" ) == 0 )
- {
- current_codepage = oem_cp;
- SetFileApisToOEM ();
- debug_printf ( "File APIs set to OEM" );
- }
- else if ( strcmp ( buf, "ansi" ) == 0 )
- {
- current_codepage = ansi_cp;
- SetFileApisToANSI ();
- debug_printf ( "File APIs set to ANSI" );
- }
- else
- {
- debug_printf ( "Wrong codepage name: %s", buf );
- }
-}
-
-
-/* Initialize the process table entry for the current task.
- This is not called for fork'd tasks, only exec'd 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. */
-
- set_myself (1);
- myself->ppid = 1;
- myself->pgid = myself->sid = myself->pid;
- myself->ctty = -1;
- myself->uid = USHRT_MAX;
-
- environ_init (NULL, 0); /* call after myself has been set up */
- }
-
- debug_printf ("pid %d, pgid %d", myself->pid, myself->pgid);
-}
-
-void
-_pinfo::exit (UINT n, bool norecord)
-{
- if (!norecord)
- process_state = PID_EXITED;
-
- /* FIXME: There is a potential race between an execed process and its
- parent here. I hated to add a mutex just for this, though. */
- struct rusage r;
- fill_rusage (&r, hMainProc);
- add_rusage (&rusage_self, &r);
-
- sigproc_printf ("Calling ExitProcess %d", n);
- ExitProcess (n);
-}
-
-void
-pinfo::init (pid_t n, DWORD flag, HANDLE in_h)
-{
- if (n == myself->pid)
- {
- procinfo = myself;
- destroy = 0;
- h = NULL;
- return;
- }
-
- int createit = flag & (PID_IN_USE | PID_EXECED);
- for (int i = 0; i < 10; i++)
- {
- int created;
- char mapname[MAX_PATH];
- __small_sprintf (mapname, "cygpid.%x", n);
-
- int mapsize;
- if (flag & PID_EXECED)
- mapsize = PINFO_REDIR_SIZE;
- else
- mapsize = sizeof (_pinfo);
-
- if (in_h)
- {
- h = in_h;
- created = 0;
- }
- else if (!createit)
- {
- h = OpenFileMappingA (FILE_MAP_READ | FILE_MAP_WRITE, FALSE, mapname);
- created = 0;
- }
- else
- {
- h = CreateFileMapping ((HANDLE) 0xffffffff, &sec_all_nih,
- PAGE_READWRITE, 0, mapsize, mapname);
- created = h && GetLastError () != ERROR_ALREADY_EXISTS;
- }
-
- if (!h)
- {
- if (createit)
- __seterrno ();
- procinfo = NULL;
- return;
- }
-
- procinfo = (_pinfo *) MapViewOfFile (h, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
- ProtectHandle1 (h, pinfo_shared_handle);
-
- if ((procinfo->process_state & PID_INITIALIZING) && (flag & PID_NOREDIR))
- {
- release ();
- set_errno (ENOENT);
- return;
- }
-
- if (procinfo->process_state & PID_EXECED)
- {
- assert (!i);
- 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;
- release ();
- continue;
- }
-
- /* In certain rare, 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. FIXME: I'm sure I'll regret doing it
- this way at some point. */
- if (i < 9 && !created && createit && (procinfo->process_state & PID_EXITED))
- {
- Sleep (5);
- release ();
- continue;
- }
-
- if (!created)
- /* nothing */;
- else if (!(flag & PID_EXECED))
- procinfo->pid = n;
- else
- {
- procinfo->process_state |= PID_IN_USE | PID_EXECED;
- procinfo->pid = myself->pid;
- }
- break;
- }
- destroy = 1;
-}
-
-void
-pinfo::release ()
-{
- if (h)
- {
-#ifdef DEBUGGING
- if (((DWORD) procinfo & 0x77000000) == 0x61000000) try_to_debug ();
-#endif
- UnmapViewOfFile (procinfo);
- procinfo = NULL;
- ForceCloseHandle1 (h, pinfo_shared_handle);
- h = NULL;
- }
-}
-
-/* DOCTOOL-START
-
-<sect1 id="func-cygwin-winpid-to-pid">
- <title>cygwin_winpid_to_pid</title>
-
- <funcsynopsis>
- <funcdef>extern "C" pid_t
- <function>cygwin_winpid_to_pid</function>
- </funcdef>
- <paramdef>int <parameter>winpid</parameter></paramdef>
- </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 (winpid);
- if (p)
- return p->pid;
-
- set_errno (ESRCH);
- return (pid_t) -1;
-}
-
-#include <tlhelp32.h>
-
-typedef HANDLE (WINAPI * CREATESNAPSHOT) (DWORD, DWORD);
-typedef BOOL (WINAPI * PROCESSWALK) (HANDLE, LPPROCESSENTRY32);
-typedef BOOL (WINAPI * CLOSESNAPSHOT) (HANDLE);
-
-static NO_COPY CREATESNAPSHOT myCreateToolhelp32Snapshot = NULL;
-static NO_COPY PROCESSWALK myProcess32First = NULL;
-static NO_COPY PROCESSWALK myProcess32Next = NULL;
-
-#define slop_pidlist 200
-#define size_pidlist(i) (sizeof (pidlist[0]) * ((i) + 1))
-#define size_pinfolist(i) (sizeof (pinfolist[0]) * ((i) + 1))
-
-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));
- pinfolist = (pinfo *) realloc (pinfolist, size_pinfolist (npidlist));
- }
-
- pinfolist[nelem].init (cygpid, PID_NOREDIR);
- if (winpid)
- /* nothing to do */;
- else if (!pinfolist[nelem])
- return;
- else
- /* 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 == pinfolist[nelem]->pid )
- {
- if ((_pinfo *) pinfolist[nelem] != (_pinfo *) myself)
- pinfolist[nelem].release ();
- return;
- }
-
- pidlist[nelem++] = pid;
-}
-
-DWORD
-winpids::enumNT (bool winpid)
-{
- static DWORD szprocs = 0;
- static SYSTEM_PROCESSES *procs;
-
- DWORD nelem = 0;
- if (!szprocs)
- procs = (SYSTEM_PROCESSES *) malloc (szprocs = 200 * sizeof (*procs));
-
- NTSTATUS res;
- for (;;)
- {
- res = ZwQuerySystemInformation (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;
-}
-
-DWORD
-winpids::enum9x (bool winpid)
-{
- DWORD nelem = 0;
-
- HANDLE h = myCreateToolhelp32Snapshot (TH32CS_SNAPPROCESS, 0);
- if (!h)
- {
- system_printf ("Couldn't create process snapshot, %E");
- return 0;
- }
-
- PROCESSENTRY32 proc;
- proc.dwSize = sizeof (proc);
-
- if (myProcess32First(h, &proc))
- do
- {
- if (proc.th32ProcessID)
- add (nelem, winpid, proc.th32ProcessID);
- }
- while (myProcess32Next (h, &proc));
-
- CloseHandle (h);
- return nelem;
-}
-
-void
-winpids::init (bool winpid)
-{
- npids = (this->*enum_processes) (winpid);
- pidlist[npids] = 0;
-}
-
-DWORD
-winpids::enum_init (bool winpid)
-{
- HINSTANCE h;
- if (os_being_run == winNT)
- enum_processes = &winpids::enumNT;
- else
- {
- h = GetModuleHandle("kernel32.dll");
- myCreateToolhelp32Snapshot = (CREATESNAPSHOT)
- GetProcAddress(h, "CreateToolhelp32Snapshot");
- myProcess32First = (PROCESSWALK)
- GetProcAddress(h, "Process32First");
- myProcess32Next = (PROCESSWALK)
- GetProcAddress(h, "Process32Next");
- if (!myCreateToolhelp32Snapshot || !myProcess32First || !myProcess32Next)
- {
- system_printf ("Couldn't find toolhelp processes, %E");
- return 0;
- }
-
- enum_processes = &winpids::enum9x;
- }
-
- return (this->*enum_processes) (winpid);
-}
-
-void
-winpids::release ()
-{
- for (unsigned i = 0; i < npids; i++)
- if (pinfolist[i] && (_pinfo *) pinfolist[i] != (_pinfo *) myself)
- pinfolist[i].release ();
-}
-
-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 dd49cd819..000000000
--- a/winsup/cygwin/pinfo.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/* pinfo.h: process table info
-
- Copyright 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* Signal constants (have to define them here, unfortunately) */
-
-enum
-{
- __SIGFLUSH = -2,
- __SIGSTRACE = -1,
- __SIGCHILDSTOPPED = 0,
- __SIGOFFSET = 3
-};
-
-#define PSIZE 1024
-
-#include <sys/resource.h>
-#include "thread.h"
-
-class _pinfo
-{
-public:
- /* Cygwin pid */
- pid_t pid;
-
- /* Various flags indicating the state of the process. See PID_
- constants below. */
- DWORD process_state;
-
- /* If hProcess is set, it's because it came from a
- CreateProcess call. This means it's process relative
- to the thing which created the process. That's ok because
- we only use this handle from the parent. */
- HANDLE hProcess;
-
-#define PINFO_REDIR_SIZE ((DWORD) &(((_pinfo *)NULL)->hProcess) + sizeof (DWORD))
-
- /* Handle associated with initial Windows pid which started it all. */
- HANDLE pid_handle;
-
- /* Handle to the logical parent of this pid. */
- HANDLE ppid_handle;
-
- /* 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[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. */
- uid_t uid; /* User ID */
- gid_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;
-
- /* Non-zero if process was stopped by a signal. */
- char stopsig;
-
- void exit (UINT n, bool norecord = 0) __attribute__ ((noreturn, regparm(2)));
-
- 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;}
-
- inline struct sigaction& getsig (int sig)
- {
- return thread2signal ? thread2signal->sigs[sig] : sigs[sig];
- }
-
- inline void copysigs (_pinfo *p) {sigs = p->sigs;}
-
- inline sigset_t& getsigmask ()
- {
- return thread2signal ? *thread2signal->sigmask : sig_mask;
- }
-
- inline void setsigmask (sigset_t mask)
- {
- if (thread2signal)
- *(thread2signal->sigmask) = mask;
- sig_mask = mask;
- }
-
- inline LONG* getsigtodo (int sig) {return _sigtodo + __SIGOFFSET + sig;}
-
- inline HANDLE getthread2signal ()
- {
- return thread2signal ? thread2signal->win32_obj_id : hMainThread;
- }
-
- inline void setthread2signal (void *thr) {thread2signal = (ThreadItem *) thr;}
-
-private:
- struct sigaction sigs[NSIG];
- sigset_t sig_mask; /* one set for everything to ignore. */
- LONG _sigtodo[NSIG + __SIGOFFSET];
- ThreadItem *thread2signal; // NULL means means thread any other means a pthread
-};
-
-class pinfo
-{
- HANDLE h;
- _pinfo *procinfo;
- int destroy;
-public:
- void init (pid_t n, DWORD create = 0, HANDLE h = NULL) __attribute__ ((regparm(3)));
- pinfo () {}
- pinfo (_pinfo *x): procinfo (x) {}
- pinfo (pid_t n) {init (n);}
- pinfo (pid_t n, int create) {init (n, create);}
- void release ();
- ~pinfo ()
- {
- if (destroy && procinfo)
- release ();
- }
-
- _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 == (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 remember () {destroy = 0; proc_subproc (PROC_ADDCHILD, (DWORD) this);}
- HANDLE shared_handle () {return h;}
-};
-
-#define ISSTATE(p, f) (!!((p)->process_state & f))
-#define NOTSTATE(p, f) (!((p)->process_state & f))
-
-class winpids
-{
- DWORD *pidlist;
- DWORD npidlist;
- pinfo *pinfolist;
- DWORD (winpids::* enum_processes) (bool winpid);
- DWORD enum_init (bool winpid);
- DWORD enumNT (bool winpid);
- DWORD enum9x (bool winpid);
- void add (DWORD& nelem, bool, DWORD pid);
-public:
- DWORD npids;
- inline void reset () { npids = 0; release (); }
- void init (bool winpid);
- winpids (int): enum_processes (&winpids::enum_init) { reset (); }
- winpids (): pidlist (NULL), npidlist (0), pinfolist (NULL),
- enum_processes (&winpids::enum_init), npids (0) { init (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_t) (os_being_run == winNT) ? pid : -(int) pid;
-}
-
-void __stdcall pinfo_init (char **, int);
-void __stdcall set_myself (pid_t pid, HANDLE h = NULL);
-extern pinfo myself;
-
-#define _P_VFORK 0
-extern "C" int _spawnve (HANDLE hToken, int mode, const char *path,
- const char *const *argv, const char *const *envp);
-
-extern void __stdcall pinfo_fixup_after_fork ();
-extern HANDLE hexec_proc;
-
-/* For mmaps across fork(). */
-int __stdcall fixup_mmaps_after_fork ();
-
-void __stdcall fill_rusage (struct rusage *, HANDLE);
-void __stdcall add_rusage (struct rusage *, struct rusage *);
diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc
deleted file mode 100644
index 4a6e49345..000000000
--- a/winsup/cygwin/pipe.cc
+++ /dev/null
@@ -1,96 +0,0 @@
-/* pipe.cc: pipe for Cygwin.
-
- Copyright 1996, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <unistd.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "thread.h"
-#include "security.h"
-
-static int
-make_pipe (int fildes[2], unsigned int psize, int mode)
-{
- SetResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK," make_pipe");
-
- HANDLE r, w;
- int fdr = -1, fdw = -1;
- SECURITY_ATTRIBUTES *sa = (mode & O_NOINHERIT) ? &sec_none_nih : &sec_none;
- int res = -1;
-
- if ((fdr = fdtab.find_unused_handle ()) < 0)
- set_errno (ENMFILE);
- else if ((fdw = fdtab.find_unused_handle (fdr + 1)) < 0)
- set_errno (ENMFILE);
- else if (!CreatePipe (&r, &w, sa, psize))
- __seterrno ();
- else
- {
- fhandler_base *fhr = fdtab.build_fhandler (fdr, FH_PIPER, "/dev/piper");
- fhandler_base *fhw = fdtab.build_fhandler (fdw, FH_PIPEW, "/dev/pipew");
-
- int binmode = mode & O_TEXT ? 0 : 1;
- fhr->init (r, GENERIC_READ, binmode);
- fhw->init (w, GENERIC_WRITE, binmode);
- if (mode & O_NOINHERIT)
- {
- fhr->set_close_on_exec_flag (1);
- fhw->set_close_on_exec_flag (1);
- }
-
- fildes[0] = fdr;
- fildes[1] = fdw;
-
- res = 0;
- }
-
- syscall_printf ("%d = make_pipe ([%d, %d], %d, %p)", res, fdr, fdw, psize, mode);
- ReleaseResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK," make_pipe");
- return res;
-}
-
-extern "C" int
-pipe (int filedes[2])
-{
- extern DWORD binmode;
- return make_pipe (filedes, 16384, (!binmode || binmode == O_BINARY) ? O_BINARY : O_TEXT);
-}
-
-extern "C" int
-_pipe (int filedes[2], unsigned int psize, int mode)
-{
- int res = make_pipe (filedes, psize, mode);
- /* This type of pipe is not interruptible so set the appropriate flag. */
- if (!res)
- fdtab[filedes[0]]->set_r_no_interrupt (1);
- return res;
-}
-
-int
-dup (int fd)
-{
- int res;
- SetResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK," dup");
-
- res = dup2 (fd, fdtab.find_unused_handle ());
-
- ReleaseResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK," dup");
-
- return res;
-}
-
-int
-dup2 (int oldfd, int newfd)
-{
- return fdtab.dup2 (oldfd, newfd);
-}
diff --git a/winsup/cygwin/poll.cc b/winsup/cygwin/poll.cc
deleted file mode 100644
index d55b2af32..000000000
--- a/winsup/cygwin/poll.cc
+++ /dev/null
@@ -1,85 +0,0 @@
-/* poll.cc. Implements poll(2) via usage of select(2) call.
-
- Copyright 2000 Cygnus Solutions.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include "winsup.h"
-#include <sys/time.h>
-#include <sys/poll.h>
-#include <errno.h>
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygerrno.h"
-
-extern "C"
-int
-poll (struct pollfd *fds, unsigned int nfds, int timeout)
-{
- int max_fd = 0;
- fd_set *open_fds, *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);
-
- open_fds = (fd_set *) alloca (fds_size);
- read_fds = (fd_set *) alloca (fds_size);
- write_fds = (fd_set *) alloca (fds_size);
- except_fds = (fd_set *) alloca (fds_size);
-
- if (!open_fds || !read_fds || !write_fds || !except_fds)
- {
- set_errno (ENOMEM);
- return -1;
- }
-
- memset (open_fds, 0, fds_size);
- memset (read_fds, 0, fds_size);
- memset (write_fds, 0, fds_size);
- memset (except_fds, 0, fds_size);
-
- for (unsigned int i = 0; i < nfds; ++i)
- if (!fdtab.not_open (fds[i].fd))
- {
- FD_SET (fds[i].fd, open_fds);
- 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);
- }
-
- int ret = cygwin_select (max_fd + 1, read_fds, write_fds, except_fds,
- timeout < 0 ? NULL : &tv);
-
- for (unsigned int i = 0; i < nfds; ++i)
- {
- if (!FD_ISSET (fds[i].fd, open_fds))
- fds[i].revents = POLLNVAL;
- else if (fdtab.not_open(fds[i].fd))
- fds[i].revents = POLLHUP;
- else if (ret < 0)
- fds[i].revents = POLLERR;
- else
- {
- fds[i].revents = 0;
- if (FD_ISSET (fds[i].fd, read_fds))
- fds[i].revents |= POLLIN;
- if (FD_ISSET (fds[i].fd, write_fds))
- fds[i].revents |= POLLOUT;
- if (FD_ISSET (fds[i].fd, except_fds))
- fds[i].revents |= POLLPRI;
- }
- }
-
- return ret;
-}
diff --git a/winsup/cygwin/posix.sgml b/winsup/cygwin/posix.sgml
deleted file mode 100644
index 80e9c6e97..000000000
--- a/winsup/cygwin/posix.sgml
+++ /dev/null
@@ -1,98 +0,0 @@
-<sect1 id="std-posix">
-<title>Compatibility with POSIX.1</title>
-
-<para>The following functions are compatible with POSIX.1:</para>
-
-<sect2><title>Process Primitives (Section 3) </title><para>
-
-fork, execl, execle, execlp, execv, execve, execvp, wait, waitpid,
-_exit, kill, sigemptyset, sigfillset, sigaddset, sigdelset,
-sigismember, sigaction, pthread_sigmask, sigprocmask, sigpending,
-sigsuspend, alarm, pause, sleep, pthread_kill, pthread_sigmask
-
-</para></sect2>
-<sect2><title>Process Environment (Section 4) </title><para>
-
-getpid, getppid, getuid, geteuid, getgid, getegid, setuid, setgid,
-getgroups, getlogin, getpgrp, setsid, setpgid, uname, time, times,
-getenv, ctermid, ttyname, isatty, sysconf
-
-</para></sect2>
-<sect2><title>Files and Directories (Section 5) </title><para>
-
-opendir, readdir, rewinddir, closedir, chdir, getcwd, open, creat,
-umask, link, mkdir, unlink, rmdir, rename, stat, fstat, access, chmod,
-fchmod, chown, utime, ftruncate, pathconf, fpathconf
-
-</para></sect2>
-<sect2><title>Input and Output Primitives (Section 6) </title><para>
-
-pipe, dup, dup2, close, read, write, fcntl, lseek, fsync
-
-</para></sect2>
-<sect2><title>Device- and Class-Specific Functions (Section 7) </title><para>
-
-cfgetispeed, cfgetospeed, cfsetispeed, cfsetospeed, tcdrain, tcflow,
-tcflush, tcgetattr, tcgetpgrp, tcsendbreak, tcsetattr, tcsetpgrp
-
-</para></sect2>
-<sect2><title>Language-Specific Services for the C Programming Language (Section 8) </title><para>
-
-abort, exit, fclose, fdopen, fflush, fgetc, fgets, fileno, fopen,
-fprintf, fputc, fputs, fread, freopen, fscanf, fseek, ftell, fwrite,
-getc, getchar, gets, perror, printf, putc, putchar, puts, remove,
-rewind, scanf, setlocale, siglongjmp, sigsetjmp, tmpfile, tmpnam,
-tzset
-
-</para></sect2>
-<sect2><title>System Databases (Section 9) </title><para>
-
-getgrgid, getgrnam, getpwnam, getpwuid
-
-</para></sect2>
-<sect2><title>Synchronization (Section 11) </title><para>
-
-sem_init, sem_destroy, sem_wait, sem_trywait, sem_post,
-pthread_mutex_init, pthread_mutex_destroy, pthread_mutex_lock,
-pthread_mutex_trylock, pthread_mutex_unlock
-
-</para></sect2>
-<sect2><title>Memory Management (Section 12) </title><para>
-
-mmap, mprotect, msync, munmap
-
-</para></sect2>
-<sect2><title>Thread Management (Section 16) </title><para>
-
-pthread_attr_init, pthread_attr_destroy, pthread_attr_setstacksize,
-pthread_attr_getstacksize, pthread_create, pthread_exit, pthread_self,
-pthread_equal
-
-</para></sect2>
-<sect2><title>Thread-Specific Data Functions (Section 17) </title><para>
-
-pthread_key_create, pthread_setspecific, pthread_getspecific,
-pthread_key_delete
-
-</para></sect2>
-
-<sect2><title>Implementation Details</title>
-
-<para><function>setuid</function> and <function>setgid</function>
-always return ENOSYS.</para>
-
-<para><function>link</function> will copy the file if it can't
-implement a true symbolic link. Currently, symbolic links work, if at
-all, only under Windows NT.</para>
-
-<para><function>chown</function> always returns zero.</para>
-
-<para><function>fcntl</function> doesn't support F_GETLK - it returns
--1 and sets errno to ENOSYS.</para>
-
-<para><function>lseek</function> only works properly on binary
-files.</para>
-
-</sect2>
-
-</sect1>
diff --git a/winsup/cygwin/profil.c b/winsup/cygwin/profil.c
deleted file mode 100644
index 0cac701b0..000000000
--- a/winsup/cygwin/profil.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/* profil.c -- win32 profil.c equivalent
-
- Copyright 1998 Cygnus Solutions.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include <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)
-{
- int 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 c62f92251..000000000
--- a/winsup/cygwin/profil.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* profil.h: gprof profiling header file
-
- Copyright 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* 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) + ((((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/pthread.cc b/winsup/cygwin/pthread.cc
deleted file mode 100644
index 82200e4a7..000000000
--- a/winsup/cygwin/pthread.cc
+++ /dev/null
@@ -1,204 +0,0 @@
-/* pthread.cc: posix pthread interface for Cygwin
-
- Copyright 1998 Cygnus Solutions.
-
- 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_attr_init (pthread_attr_t * attr)
-{
- return __pthread_attr_init (attr);
-}
-
-int
-pthread_attr_destroy (pthread_attr_t * attr)
-{
- return __pthread_attr_destroy (attr);
-}
-
-int
-pthread_attr_setstacksize (pthread_attr_t * attr, size_t size)
-{
- return __pthread_attr_setstacksize (attr, size);
-}
-
-int
-pthread_attr_getstacksize (pthread_attr_t * attr, size_t * size)
-{
- return __pthread_attr_getstacksize (attr, size);
-}
-
-
-/*
- pthread_attr_setstackaddr(...){};
- pthread_attr_getstackaddr(...){};
- */
-
-/* Thread Exit */
-int
-pthread_exit (void * value_ptr)
-{
- return __pthread_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);
-}
-
-int
-pthread_suspend(pthread_t thread)
-{
- return __pthread_suspend(&thread);
-}
-
-int
-pthread_continue(pthread_t thread)
-{
- return __pthread_continue(&thread);
-}
-
-unsigned long
-pthread_getsequence_np (pthread_t * thread)
-{
- return __pthread_getsequence_np (thread);
-}
-
-/* Thread SpecificData */
-int
-pthread_key_create (pthread_key_t * key)
-{
- return __pthread_key_create (key);
-}
-
-int
-pthread_key_delete (pthread_key_t * key)
-{
- return __pthread_key_delete (key);
-}
-
-int
-pthread_setspecific (pthread_key_t * key, const void *value)
-{
- return __pthread_setspecific (key, value);
-}
-
-void *
-pthread_getspecific (pthread_key_t * key)
-{
- return (void *) __pthread_getspecific (key);
-}
-
-/* Thread signal */
-int
-pthread_kill (pthread_t * thread, int sig)
-{
- return __pthread_kill (thread, sig);
-}
-
-int
-pthread_sigmask (int operation, const sigset_t * set, sigset_t * old_set)
-{
- return __pthread_sigmask (operation, set, old_set);
-}
-
-/* ID */
-
-pthread_t
-pthread_self ()
-{
- return __pthread_self ();
-}
-
-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)
-{
- return __pthread_mutex_init (mutex, attr);
-}
-
-int
-pthread_mutex_lock (pthread_mutex_t * mutex)
-{
- return __pthread_mutex_lock (mutex);
-}
-
-int
-pthread_mutex_trylock (pthread_mutex_t * mutex)
-{
- return __pthread_mutex_trylock (mutex);
-}
-
-int
-pthread_mutex_unlock (pthread_mutex_t * mutex)
-{
- return __pthread_mutex_unlock (mutex);
-}
-
-int
-pthread_mutex_destroy (pthread_mutex_t * mutex)
-{
- return __pthread_mutex_destroy (mutex);
-}
-
-/* Semaphores */
-int
-sem_init (sem_t * sem, int pshared, unsigned int value)
-{
- return __sem_init (sem, pshared, value);
-}
-
-int
-sem_destroy (sem_t * sem)
-{
- return __sem_destroy (sem);
-}
-
-int
-sem_wait (sem_t * sem)
-{
- return __sem_wait (sem);
-}
-
-int
-sem_trywait (sem_t * sem)
-{
- return __sem_trywait (sem);
-}
-
-int
-sem_post (sem_t * sem)
-{
- return __sem_post (sem);
-}
-}
diff --git a/winsup/cygwin/regexp/COPYRIGHT b/winsup/cygwin/regexp/COPYRIGHT
deleted file mode 100644
index 48b3f4339..000000000
--- a/winsup/cygwin/regexp/COPYRIGHT
+++ /dev/null
@@ -1,22 +0,0 @@
-This entire subtree is copyright the University of Toronto.
-The following copyright notice applies to all files found here. None of
-these files contain AT&T proprietary source code.
-_____________________________________________________________________________
-
- Copyright (c) 1986 by University of Toronto.
- Written by Henry Spencer. Not derived from licensed software.
-
- Permission is granted to anyone to use this software for any
- purpose on any computer system, and to redistribute it freely,
- 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 defects in it.
-
- 2. The origin of this software must not be misrepresented, either
- by explicit claim or by omission.
-
- 3. Altered versions must be plainly marked as such, and must not
- be misrepresented as being the original software.
-
diff --git a/winsup/cygwin/regexp/README b/winsup/cygwin/regexp/README
deleted file mode 100644
index 37d6f51c7..000000000
--- a/winsup/cygwin/regexp/README
+++ /dev/null
@@ -1,84 +0,0 @@
-This is a nearly-public-domain reimplementation of the V8 regexp(3) package.
-It gives C programs the ability to use egrep-style regular expressions, and
-does it in a much cleaner fashion than the analogous routines in SysV.
-
- Copyright (c) 1986 by University of Toronto.
- Written by Henry Spencer. Not derived from licensed software.
-
- Permission is granted to anyone to use this software for any
- purpose on any computer system, and to redistribute it freely,
- 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 defects in it.
-
- 2. The origin of this software must not be misrepresented, either
- by explicit claim or by omission.
-
- 3. Altered versions must be plainly marked as such, and must not
- be misrepresented as being the original software.
-
-Barring a couple of small items in the BUGS list, this implementation is
-believed 100% compatible with V8. It should even be binary-compatible,
-sort of, since the only fields in a "struct regexp" that other people have
-any business touching are declared in exactly the same way at the same
-location in the struct (the beginning).
-
-This implementation is *NOT* AT&T/Bell code, and is not derived from licensed
-software. Even though U of T is a V8 licensee. This software is based on
-a V8 manual page sent to me by Dennis Ritchie (the manual page enclosed
-here is a complete rewrite and hence is not covered by AT&T copyright).
-The software was nearly complete at the time of arrival of our V8 tape.
-I haven't even looked at V8 yet, although a friend elsewhere at U of T has
-been kind enough to run a few test programs using the V8 regexp(3) to resolve
-a few fine points. I admit to some familiarity with regular-expression
-implementations of the past, but the only one that this code traces any
-ancestry to is the one published in Kernighan & Plauger (from which this
-one draws ideas but not code).
-
-Simplistically: put this stuff into a source directory, copy regexp.h into
-/usr/include, inspect Makefile for compilation options that need changing
-to suit your local environment, and then do "make r". This compiles the
-regexp(3) functions, compiles a test program, and runs a large set of
-regression tests. If there are no complaints, then put regexp.o, regsub.o,
-and regerror.o into your C library, and regexp.3 into your manual-pages
-directory.
-
-Note that if you don't put regexp.h into /usr/include *before* compiling,
-you'll have to add "-I." to CFLAGS before compiling.
-
-The files are:
-
-Makefile instructions to make everything
-regexp.3 manual page
-regexp.h header file, for /usr/include
-regexp.c source for regcomp() and regexec()
-regsub.c source for regsub()
-regerror.c source for default regerror()
-regmagic.h internal header file
-try.c source for test program
-timer.c source for timing program
-tests test list for try and timer
-
-This implementation uses nondeterministic automata rather than the
-deterministic ones found in some other implementations, which makes it
-simpler, smaller, and faster at compiling regular expressions, but slower
-at executing them. In theory, anyway. This implementation does employ
-some special-case optimizations to make the simpler cases (which do make
-up the bulk of regular expressions actually used) run quickly. In general,
-if you want blazing speed you're in the wrong place. Replacing the insides
-of egrep with this stuff is probably a mistake; if you want your own egrep
-you're going to have to do a lot more work. But if you want to use regular
-expressions a little bit in something else, you're in luck. Note that many
-existing text editors use nondeterministic regular-expression implementations,
-so you're in good company.
-
-This stuff should be pretty portable, given appropriate option settings.
-If your chars have less than 8 bits, you're going to have to change the
-internal representation of the automaton, although knowledge of the details
-of this is fairly localized. There are no "reserved" char values except for
-NUL, and no special significance is attached to the top bit of chars.
-The string(3) functions are used a fair bit, on the grounds that they are
-probably faster than coding the operations in line. Some attempts at code
-tuning have been made, but this is invariably a bit machine-specific.
diff --git a/winsup/cygwin/regexp/regerror.c b/winsup/cygwin/regexp/regerror.c
deleted file mode 100644
index afd7a861a..000000000
--- a/winsup/cygwin/regexp/regerror.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include "winsup.h"
-#include "regexp.h"
-#include <stdio.h>
-
-void
-regerror(const char *s __attribute__ ((unused)))
-{
-#ifdef ERRAVAIL
- error("regexp: %s", s);
-#else
-/*
- fprintf(stderr, "regexp(3): %s\n", s);
- exit(1);
-*/
- return; /* let std. egrep handle errors */
-#endif
- /* NOTREACHED */
-}
diff --git a/winsup/cygwin/regexp/regexp.3 b/winsup/cygwin/regexp/regexp.3
deleted file mode 100644
index d1a3a000d..000000000
--- a/winsup/cygwin/regexp/regexp.3
+++ /dev/null
@@ -1,321 +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.
-.\"
-.\" @(#)regexp.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt REGEXP 3
-.Os
-.Sh NAME
-.Nm regcomp ,
-.Nm regexec ,
-.Nm regsub ,
-.Nm regerror
-.Nd regular expression handlers
-.Sh SYNOPSIS
-.Fd #include <regexp.h>
-.Ft regexp *
-.Fn regcomp "const char *exp"
-.Ft int
-.Fn regexec "const regexp *prog" "const char *string"
-.Ft void
-.Fn regsub "const regexp *prog" "const char *source" "char *dest"
-.Sh DESCRIPTION
-.Bf -symbolic
-This interface is made obsolete by
-.Xr regex 3 .
-It is available from the compatibility library, libcompat.
-.Ef
-.Pp
-The
-.Fn regcomp ,
-.Fn regexec ,
-.Fn regsub ,
-and
-.Fn regerror
-functions
-implement
-.Xr egrep 1 Ns -style
-regular expressions and supporting facilities.
-.Pp
-The
-.Fn regcomp
-function
-compiles a regular expression into a structure of type
-.Xr regexp ,
-and returns a pointer to it.
-The space has been allocated using
-.Xr malloc 3
-and may be released by
-.Xr free .
-.Pp
-The
-.Fn regexec
-function
-matches a
-.Dv NUL Ns -terminated
-.Fa string
-against the compiled regular expression
-in
-.Fa prog .
-It returns 1 for success and 0 for failure, and adjusts the contents of
-.Fa prog Ns 's
-.Em startp
-and
-.Em endp
-(see below) accordingly.
-.Pp
-The members of a
-.Xr regexp
-structure include at least the following (not necessarily in order):
-.Bd -literal -offset indent
-char *startp[NSUBEXP];
-char *endp[NSUBEXP];
-.Ed
-.Pp
-where
-.Dv NSUBEXP
-is defined (as 10) in the header file.
-Once a successful
-.Fn regexec
-has been done using the
-.Fn regexp ,
-each
-.Em startp Ns - Em endp
-pair describes one substring
-within the
-.Fa string ,
-with the
-.Em startp
-pointing to the first character of the substring and
-the
-.Em endp
-pointing to the first character following the substring.
-The 0th substring is the substring of
-.Fa string
-that matched the whole
-regular expression.
-The others are those substrings that matched parenthesized expressions
-within the regular expression, with parenthesized expressions numbered
-in left-to-right order of their opening parentheses.
-.Pp
-The
-.Fn regsub
-function
-copies
-.Fa source
-to
-.Fa dest ,
-making substitutions according to the
-most recent
-.Fn regexec
-performed using
-.Fa prog .
-Each instance of `&' in
-.Fa source
-is replaced by the substring
-indicated by
-.Em startp Ns Bq
-and
-.Em endp Ns Bq .
-Each instance of
-.Sq \e Ns Em n ,
-where
-.Em n
-is a digit, is replaced by
-the substring indicated by
-.Em startp Ns Bq Em n
-and
-.Em endp Ns Bq Em n .
-To get a literal `&' or
-.Sq \e Ns Em n
-into
-.Fa dest ,
-prefix it with `\e';
-to get a literal `\e' preceding `&' or
-.Sq \e Ns Em n ,
-prefix it with
-another `\e'.
-.Pp
-The
-.Fn regerror
-function
-is called whenever an error is detected in
-.Fn regcomp ,
-.Fn regexec ,
-or
-.Fn regsub .
-The default
-.Fn regerror
-writes the string
-.Fa msg ,
-with a suitable indicator of origin,
-on the standard
-error output
-and invokes
-.Xr exit 2 .
-The
-.Fn regerror
-function
-can be replaced by the user if other actions are desirable.
-.Sh REGULAR EXPRESSION SYNTAX
-A regular expression is zero or more
-.Em branches ,
-separated by `|'.
-It matches anything that matches one of the branches.
-.Pp
-A branch is zero or more
-.Em pieces ,
-concatenated.
-It matches a match for the first, followed by a match for the second, etc.
-.Pp
-A piece is an
-.Em atom
-possibly followed by `*', `+', or `?'.
-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 match of the atom, or the null string.
-.Pp
-An atom is a regular expression in parentheses (matching a match for the
-regular expression), a
-.Em range
-(see below), `.'
-(matching any single character), `^' (matching the null string at the
-beginning of the input string), `$' (matching the null string at the
-end of the input string), a `\e' followed by a single character (matching
-that character), or a single character with no other significance
-(matching that character).
-.Pp
-A
-.Em range
-is a sequence of characters enclosed in `[]'.
-It normally matches any single character from the sequence.
-If the sequence begins with `^',
-it matches any single character
-.Em not
-from the rest of the sequence.
-If two characters in the sequence are separated by `\-', this is shorthand
-for the full list of
-.Tn ASCII
-characters between them
-(e.g. `[0-9]' matches any decimal digit).
-To include a literal `]' in the sequence, make it the first character
-(following a possible `^').
-To include a literal `\-', make it the first or last character.
-.Sh AMBIGUITY
-If a regular expression could match two different parts of the input string,
-it will match the one which begins earliest.
-If both begin in the same place but match different lengths, or match
-the same length in different ways, life gets messier, as follows.
-.Pp
-In general, the possibilities in a list of branches are considered in
-left-to-right order, the possibilities for `*', `+', and `?' are
-considered longest-first, nested constructs are considered from the
-outermost in, and concatenated constructs are considered leftmost-first.
-The match that will be chosen is the one that uses the earliest
-possibility in the first choice that has to be made.
-If there is more than one choice, the next will be made in the same manner
-(earliest possibility) subject to the decision on the first choice.
-And so forth.
-.Pp
-For example,
-.Sq Li (ab|a)b*c
-could match
-`abc' in one of two ways.
-The first choice is between `ab' and `a'; since `ab' is earlier, and does
-lead to a successful overall match, it is chosen.
-Since the `b' is already spoken for,
-the `b*' must match its last possibility\(emthe empty string\(emsince
-it must respect the earlier choice.
-.Pp
-In the particular case where no `|'s are present and there is only one
-`*', `+', or `?', the net effect is that the longest possible
-match will be chosen.
-So
-.Sq Li ab* ,
-presented with `xabbbby', will match `abbbb'.
-Note that if
-.Sq Li ab* ,
-is tried against `xabyabbbz', it
-will match `ab' just after `x', due to the begins-earliest rule.
-(In effect, the decision on where to start the match is the first choice
-to be made, hence subsequent choices must respect it even if this leads them
-to less-preferred alternatives.)
-.Sh RETURN VALUES
-The
-.Fn regcomp
-function
-returns
-.Dv NULL
-for a failure
-.Pf ( Fn regerror
-permitting),
-where failures are syntax errors, exceeding implementation limits,
-or applying `+' or `*' to a possibly-null operand.
-.Sh SEE ALSO
-.Xr ed 1 ,
-.Xr ex 1 ,
-.Xr expr 1 ,
-.Xr egrep 1 ,
-.Xr fgrep 1 ,
-.Xr grep 1 ,
-.Xr regex 3
-.Sh HISTORY
-Both code and manual page for
-.Fn regcomp ,
-.Fn regexec ,
-.Fn regsub ,
-and
-.Fn regerror
-were written at the University of Toronto
-and appeared in
-.Bx 4.3 tahoe .
-They are intended to be compatible with the Bell V8
-.Xr regexp 3 ,
-but are not derived from Bell code.
-.Sh BUGS
-Empty branches and empty regular expressions are not portable to V8.
-.Pp
-The restriction against
-applying `*' or `+' to a possibly-null operand is an artifact of the
-simplistic implementation.
-.Pp
-Does not support
-.Xr egrep Ns 's
-newline-separated branches;
-neither does the V8
-.Xr regexp 3 ,
-though.
-.Pp
-Due to emphasis on
-compactness and simplicity,
-it's not strikingly fast.
-It does give special attention to handling simple cases quickly.
diff --git a/winsup/cygwin/regexp/regexp.c b/winsup/cygwin/regexp/regexp.c
deleted file mode 100644
index 7bcd954e4..000000000
--- a/winsup/cygwin/regexp/regexp.c
+++ /dev/null
@@ -1,1321 +0,0 @@
-/*
- * regcomp and regexec -- regsub and regerror are elsewhere
- *
- * Copyright (c) 1986 by University of Toronto.
- * Written by Henry Spencer. Not derived from licensed software.
- *
- * Permission is granted to anyone to use this software for any
- * purpose on any computer system, and to redistribute it freely,
- * 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 defects in it.
- *
- * 2. The origin of this software must not be misrepresented, either
- * by explicit claim or by omission.
- *
- * 3. Altered versions must be plainly marked as such, and must not
- * be misrepresented as being the original software.
- *** THIS IS AN ALTERED VERSION. It was altered by John Gilmore,
- *** hoptoad!gnu, on 27 Dec 1986, to add \n as an alternative to |
- *** to assist in implementing egrep.
- *** THIS IS AN ALTERED VERSION. It was altered by John Gilmore,
- *** hoptoad!gnu, on 27 Dec 1986, to add \< and \> for word-matching
- *** as in BSD grep and ex.
- *** THIS IS AN ALTERED VERSION. It was altered by John Gilmore,
- *** hoptoad!gnu, on 28 Dec 1986, to optimize characters quoted with \.
- *** THIS IS AN ALTERED VERSION. It was altered by James A. Woods,
- *** ames!jaw, on 19 June 1987, to quash a regcomp() redundancy.
- *** THIS IS AN ALTERED VERSION. It was altered by Geoffrey Noer,
- *** noer@cygnus.com, on 6 Oct 1997, to change the prototype format
- *** for inclusion in the Cygwin32 library.
- *
- * Beware that some of this code is subtly aware of the way operator
- * precedence is structured in regular expressions. Serious changes in
- * regular-expression syntax might require a total rethink.
- */
-
-#include "winsup.h"
-#include "regexp.h"
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include "regmagic.h"
-
-/*
- * The "internal use only" fields in regexp.h are present to pass info from
- * compile to execute that permits the execute phase to run lots faster on
- * simple cases. They are:
- *
- * regstart char that must begin a match; '\0' if none obvious
- * reganch is the match anchored (at beginning-of-line only)?
- * regmust string (pointer into program) that match must include, or NULL
- * regmlen length of regmust string
- *
- * Regstart and reganch permit very fast decisions on suitable starting points
- * for a match, cutting down the work a lot. Regmust permits fast rejection
- * of lines that cannot possibly match. The regmust tests are costly enough
- * that regcomp() supplies a regmust only if the r.e. contains something
- * potentially expensive (at present, the only such thing detected is * or +
- * at the start of the r.e., which can involve a lot of backup). Regmlen is
- * supplied because the test in regexec() needs it and regcomp() is computing
- * it anyway.
- */
-
-/*
- * Structure for regexp "program". This is essentially a linear encoding
- * of a nondeterministic finite-state machine (aka syntax charts or
- * "railroad normal form" in parsing technology). Each node is an opcode
- * plus a "next" pointer, possibly plus an operand. "Next" pointers of
- * all nodes except BRANCH implement concatenation; a "next" pointer with
- * a BRANCH on both ends of it is connecting two alternatives. (Here we
- * have one of the subtle syntax dependencies: an individual BRANCH (as
- * opposed to a collection of them) is never concatenated with anything
- * because of operator precedence.) The operand of some types of node is
- * a literal string; for others, it is a node leading into a sub-FSM. In
- * particular, the operand of a BRANCH node is the first node of the branch.
- * (NB this is *not* a tree structure: the tail of the branch connects
- * to the thing following the set of BRANCHes.) The opcodes are:
- */
-
-/* definition number opnd? meaning */
-#define END 0 /* no End of program. */
-#define BOL 1 /* no Match "" at beginning of line. */
-#define EOL 2 /* no Match "" at end of line. */
-#define ANY 3 /* no Match any one character. */
-#define ANYOF 4 /* str Match any character in this string. */
-#define ANYBUT 5 /* str Match any character not in this string. */
-#define BRANCH 6 /* node Match this alternative, or the next... */
-#define BACK 7 /* no Match "", "next" ptr points backward. */
-#define EXACTLY 8 /* str Match this string. */
-#define NOTHING 9 /* no Match empty string. */
-#define STAR 10 /* node Match this (simple) thing 0 or more times. */
-#define PLUS 11 /* node Match this (simple) thing 1 or more times. */
-#define WORDA 12 /* no Match "" at wordchar, where prev is nonword */
-#define WORDZ 13 /* no Match "" at nonwordchar, where prev is word */
-#define OPEN 20 /* no Mark this point in input as start of #n. */
- /* OPEN+1 is number 1, etc. */
-#define CLOSE 30 /* no Analogous to OPEN. */
-
-/*
- * Opcode notes:
- *
- * BRANCH The set of branches constituting a single choice are hooked
- * together with their "next" pointers, since precedence prevents
- * anything being concatenated to any individual branch. The
- * "next" pointer of the last BRANCH in a choice points to the
- * thing following the whole choice. This is also where the
- * final "next" pointer of each individual branch points; each
- * branch starts with the operand node of a BRANCH node.
- *
- * BACK Normal "next" pointers all implicitly point forward; BACK
- * exists to make loop structures possible.
- *
- * STAR,PLUS '?', and complex '*' and '+', are implemented as circular
- * BRANCH structures using BACK. Simple cases (one character
- * per match) are implemented with STAR and PLUS for speed
- * and to minimize recursive plunges.
- *
- * OPEN,CLOSE ...are numbered at compile time.
- */
-
-/*
- * A node is one char of opcode followed by two chars of "next" pointer.
- * "Next" pointers are stored as two 8-bit pieces, high order first. The
- * value is a positive offset from the opcode of the node containing it.
- * An operand, if any, simply follows the node. (Note that much of the
- * code generation knows about this implicit relationship.)
- *
- * Using two bytes for the "next" pointer is vast overkill for most things,
- * but allows patterns to get big without disasters.
- */
-#define OP(p) (*(p))
-#define NEXT(p) (((*((p)+1)&0377)<<8) + (*((p)+2)&0377))
-#define OPERAND(p) ((p) + 3)
-
-/*
- * See regmagic.h for one further detail of program structure.
- */
-
-
-/*
- * Utility definitions.
- */
-#ifndef CHARBITS
-#define UCHARAT(p) ((int)*(unsigned char *)(p))
-#else
-#define UCHARAT(p) ((int)*(p)&CHARBITS)
-#endif
-
-#define FAIL(m) { regerror(m); return(NULL); }
-#define ISMULT(c) ((c) == '*' || (c) == '+' || (c) == '?')
-
-/*
- * Flags to be passed up and down.
- */
-#define HASWIDTH 01 /* Known never to match null string. */
-#define SIMPLE 02 /* Simple enough to be STAR/PLUS operand. */
-#define SPSTART 04 /* Starts with * or +. */
-#define WORST 0 /* Worst case. */
-
-/*
- * Global work variables for regcomp().
- */
-static char *regparse; /* Input-scan pointer. */
-static int regnpar; /* () count. */
-static char regdummy;
-static char *regcode; /* Code-emit pointer; &regdummy = don't. */
-static long regsize; /* Code size. */
-
-/*
- * Forward declarations for regcomp()'s friends.
- */
-#ifndef STATIC
-#define STATIC static
-#endif
-STATIC char *reg (int, int *);
-STATIC char *regbranch (int *);
-STATIC char *regpiece (int *);
-STATIC char *regatom (int *);
-STATIC char *regnode (char);
-STATIC char *regnext (char *);
-STATIC void regc (char);
-STATIC void reginsert (char, char *);
-STATIC void regtail (char *, char *);
-STATIC void regoptail (char *, char *);
-#ifdef STRCSPN
-STATIC int strcspn (char *, char *);
-#endif
-
-/*
- - regcomp - compile a regular expression into internal code
- *
- * We can't allocate space until we know how big the compiled form will be,
- * but we can't compile it (and thus know how big it is) until we've got a
- * place to put the code. So we cheat: we compile it twice, once with code
- * generation turned off and size counting turned on, and once "for real".
- * This also means that we don't allocate space until we are sure that the
- * thing really will compile successfully, and we never have to move the
- * code and thus invalidate pointers into it. (Note that it has to be in
- * one piece because free() must be able to free it all.)
- *
- * Beware that the optimization-preparation code in here knows about some
- * of the structure of the compiled regexp.
- */
-regexp *
-regcomp(exp)
-const char *exp;
-{
- register regexp *r;
- register char *scan;
- register char *longest;
- register int len;
- int flags;
-
- if (exp == NULL)
- FAIL("NULL argument");
-
- /* First pass: determine size, legality. */
-#ifdef notdef
- if (exp[0] == '.' && exp[1] == '*') exp += 2; /* aid grep */
-#endif
- regparse = (char *)exp;
- regnpar = 1;
- regsize = 0L;
- regcode = &regdummy;
- regc(MAGIC);
- if (reg(0, &flags) == NULL)
- return(NULL);
-
- /* Small enough for pointer-storage convention? */
- if (regsize >= 32767L) /* Probably could be 65535L. */
- FAIL("regexp too big");
-
- /* Allocate space. */
- r = (regexp *)malloc(sizeof(regexp) + (unsigned)regsize);
- if (r == NULL)
- FAIL("out of space");
-
- /* Second pass: emit code. */
- regparse = (char *)exp;
- regnpar = 1;
- regcode = r->program;
- regc(MAGIC);
- if (reg(0, &flags) == NULL)
- return(NULL);
-
- /* Dig out information for optimizations. */
- r->regstart = '\0'; /* Worst-case defaults. */
- r->reganch = 0;
- r->regmust = NULL;
- r->regmlen = 0;
- scan = r->program+1; /* First BRANCH. */
- if (OP(regnext(scan)) == END) { /* Only one top-level choice. */
- scan = OPERAND(scan);
-
- /* Starting-point info. */
- if (OP(scan) == EXACTLY)
- r->regstart = *OPERAND(scan);
- else if (OP(scan) == BOL)
- r->reganch++;
-
- /*
- * If there's something expensive in the r.e., find the
- * longest literal string that must appear and make it the
- * regmust. Resolve ties in favor of later strings, since
- * the regstart check works with the beginning of the r.e.
- * and avoiding duplication strengthens checking. Not a
- * strong reason, but sufficient in the absence of others.
- */
- if (flags&SPSTART) {
- longest = NULL;
- len = 0;
- for (; scan != NULL; scan = regnext(scan))
- if (OP(scan) == EXACTLY && (int) strlen(OPERAND(scan)) >= len) {
- longest = OPERAND(scan);
- len = strlen(OPERAND(scan));
- }
- r->regmust = longest;
- r->regmlen = len;
- }
- }
-
- return(r);
-}
-
-/*
- - reg - regular expression, i.e. main body or parenthesized thing
- *
- * Caller must absorb opening parenthesis.
- *
- * Combining parenthesis handling with the base level of regular expression
- * is a trifle forced, but the need to tie the tails of the branches to what
- * follows makes it hard to avoid.
- */
-static char *
-reg(paren, flagp)
-int paren; /* Parenthesized? */
-int *flagp;
-{
- register char *ret;
- register char *br;
- register char *ender;
- register int parno = 0;
- int flags;
-
- *flagp = HASWIDTH; /* Tentatively. */
-
- /* Make an OPEN node, if parenthesized. */
- if (paren) {
- if (regnpar >= NSUBEXP)
- FAIL("too many ()");
- parno = regnpar;
- regnpar++;
- ret = regnode(OPEN+parno);
- } else
- ret = NULL;
-
- /* Pick up the branches, linking them together. */
- br = regbranch(&flags);
- if (br == NULL)
- return(NULL);
- if (ret != NULL)
- regtail(ret, br); /* OPEN -> first. */
- else
- ret = br;
- if (!(flags&HASWIDTH))
- *flagp &= ~HASWIDTH;
- *flagp |= flags&SPSTART;
- while (*regparse == '|' || *regparse == '\n') {
- regparse++;
- br = regbranch(&flags);
- if (br == NULL)
- return(NULL);
- regtail(ret, br); /* BRANCH -> BRANCH. */
- if (!(flags&HASWIDTH))
- *flagp &= ~HASWIDTH;
- *flagp |= flags&SPSTART;
- }
-
- /* Make a closing node, and hook it on the end. */
- ender = regnode((paren) ? CLOSE+parno : END);
- regtail(ret, ender);
-
- /* Hook the tails of the branches to the closing node. */
- for (br = ret; br != NULL; br = regnext(br))
- regoptail(br, ender);
-
- /* Check for proper termination. */
- if (paren && *regparse++ != ')') {
- FAIL("unmatched ()");
- } else if (!paren && *regparse != '\0') {
- if (*regparse == ')') {
- FAIL("unmatched ()");
- } else
- FAIL("junk on end"); /* "Can't happen". */
- /* NOTREACHED */
- }
-
- return(ret);
-}
-
-/*
- - regbranch - one alternative of an | operator
- *
- * Implements the concatenation operator.
- */
-static char *
-regbranch(flagp)
-int *flagp;
-{
- register char *ret;
- register char *chain;
- register char *latest;
- int flags;
-
- *flagp = WORST; /* Tentatively. */
-
- ret = regnode(BRANCH);
- chain = NULL;
- while (*regparse != '\0' && *regparse != ')' &&
- *regparse != '\n' && *regparse != '|') {
- latest = regpiece(&flags);
- if (latest == NULL)
- return(NULL);
- *flagp |= flags&HASWIDTH;
- if (chain == NULL) /* First piece. */
- *flagp |= flags&SPSTART;
- else
- regtail(chain, latest);
- chain = latest;
- }
- if (chain == NULL) /* Loop ran zero times. */
- (void) regnode(NOTHING);
-
- return(ret);
-}
-
-/*
- - regpiece - something followed by possible [*+?]
- *
- * Note that the branching code sequences used for ? and the general cases
- * of * and + are somewhat optimized: they use the same NOTHING node as
- * both the endmarker for their branch list and the body of the last branch.
- * It might seem that this node could be dispensed with entirely, but the
- * endmarker role is not redundant.
- */
-static char *
-regpiece(flagp)
-int *flagp;
-{
- register char *ret;
- register char op;
- register char *next;
- int flags;
-
- ret = regatom(&flags);
- if (ret == NULL)
- return(NULL);
-
- op = *regparse;
- if (!ISMULT(op)) {
- *flagp = flags;
- return(ret);
- }
-
- if (!(flags&HASWIDTH) && op != '?')
- FAIL("*+ operand could be empty");
- *flagp = (op != '+') ? (WORST|SPSTART) : (WORST|HASWIDTH);
-
- if (op == '*' && (flags&SIMPLE))
- reginsert(STAR, ret);
- else if (op == '*') {
- /* Emit x* as (x&|), where & means "self". */
- reginsert(BRANCH, ret); /* Either x */
- regoptail(ret, regnode(BACK)); /* and loop */
- regoptail(ret, ret); /* back */
- regtail(ret, regnode(BRANCH)); /* or */
- regtail(ret, regnode(NOTHING)); /* null. */
- } else if (op == '+' && (flags&SIMPLE))
- reginsert(PLUS, ret);
- else if (op == '+') {
- /* Emit x+ as x(&|), where & means "self". */
- next = regnode(BRANCH); /* Either */
- regtail(ret, next);
- regtail(regnode(BACK), ret); /* loop back */
- regtail(next, regnode(BRANCH)); /* or */
- regtail(ret, regnode(NOTHING)); /* null. */
- } else if (op == '?') {
- /* Emit x? as (x|) */
- reginsert(BRANCH, ret); /* Either x */
- regtail(ret, regnode(BRANCH)); /* or */
- next = regnode(NOTHING); /* null. */
- regtail(ret, next);
- regoptail(ret, next);
- }
- regparse++;
- if (ISMULT(*regparse))
- FAIL("nested *?+");
-
- return(ret);
-}
-
-/*
- - regatom - the lowest level
- *
- * Optimization: gobbles an entire sequence of ordinary characters so that
- * it can turn them into a single node, which is smaller to store and
- * faster to run. Backslashed characters are exceptions, each becoming a
- * separate node; the code is simpler that way and it's not worth fixing.
- */
-static char *
-regatom(flagp)
-int *flagp;
-{
- register char *ret;
- int flags;
-
- *flagp = WORST; /* Tentatively. */
-
- switch (*regparse++) {
- /* FIXME: these chars only have meaning at beg/end of pat? */
- case '^':
- ret = regnode(BOL);
- break;
- case '$':
- ret = regnode(EOL);
- break;
- case '.':
- ret = regnode(ANY);
- *flagp |= HASWIDTH|SIMPLE;
- break;
- case '[': {
- register int class;
- register int classend;
-
- if (*regparse == '^') { /* Complement of range. */
- ret = regnode(ANYBUT);
- regparse++;
- } else
- ret = regnode(ANYOF);
- if (*regparse == ']' || *regparse == '-')
- regc(*regparse++);
- while (*regparse != '\0' && *regparse != ']') {
- if (*regparse == '-') {
- regparse++;
- if (*regparse == ']' || *regparse == '\0')
- regc('-');
- else {
- class = UCHARAT(regparse-2)+1;
- classend = UCHARAT(regparse);
- if (class > classend+1)
- FAIL("invalid [] range");
- for (; class <= classend; class++)
- regc(class);
- regparse++;
- }
- } else
- regc(*regparse++);
- }
- regc('\0');
- if (*regparse != ']')
- FAIL("unmatched []");
- regparse++;
- *flagp |= HASWIDTH|SIMPLE;
- }
- break;
- case '(':
- ret = reg(1, &flags);
- if (ret == NULL)
- return(NULL);
- *flagp |= flags&(HASWIDTH|SPSTART);
- break;
- case '\0':
- case '|':
- case '\n':
- case ')':
- FAIL("internal urp"); /* Supposed to be caught earlier. */
- break;
- case '?':
- case '+':
- case '*':
- FAIL("?+* follows nothing");
- break;
- case '\\':
- switch (*regparse++) {
- case '\0':
- FAIL("trailing \\");
- break;
- case '<':
- ret = regnode(WORDA);
- break;
- case '>':
- ret = regnode(WORDZ);
- break;
- /* FIXME: Someday handle \1, \2, ... */
- default:
- /* Handle general quoted chars in exact-match routine */
- goto de_fault;
- }
- break;
- de_fault:
- default:
- /*
- * Encode a string of characters to be matched exactly.
- *
- * This is a bit tricky due to quoted chars and due to
- * '*', '+', and '?' taking the SINGLE char previous
- * as their operand.
- *
- * On entry, the char at regparse[-1] is going to go
- * into the string, no matter what it is. (It could be
- * following a \ if we are entered from the '\' case.)
- *
- * Basic idea is to pick up a good char in ch and
- * examine the next char. If it's *+? then we twiddle.
- * If it's \ then we frozzle. If it's other magic char
- * we push ch and terminate the string. If none of the
- * above, we push ch on the string and go around again.
- *
- * regprev is used to remember where "the current char"
- * starts in the string, if due to a *+? we need to back
- * up and put the current char in a separate, 1-char, string.
- * When regprev is NULL, ch is the only char in the
- * string; this is used in *+? handling, and in setting
- * flags |= SIMPLE at the end.
- */
- {
- char *regprev;
- register char ch = 0;
-
- regparse--; /* Look at cur char */
- ret = regnode(EXACTLY);
- for ( regprev = 0 ; ; ) {
- ch = *regparse++; /* Get current char */
- switch (*regparse) { /* look at next one */
-
- default:
- regc(ch); /* Add cur to string */
- break;
-
- case '.': case '[': case '(':
- case ')': case '|': case '\n':
- case '$': case '^':
- case '\0':
- /* FIXME, $ and ^ should not always be magic */
- magic:
- regc(ch); /* dump cur char */
- goto done; /* and we are done */
-
- case '?': case '+': case '*':
- if (!regprev) /* If just ch in str, */
- goto magic; /* use it */
- /* End mult-char string one early */
- regparse = regprev; /* Back up parse */
- goto done;
-
- case '\\':
- regc(ch); /* Cur char OK */
- switch (regparse[1]){ /* Look after \ */
- case '\0':
- case '<':
- case '>':
- /* FIXME: Someday handle \1, \2, ... */
- goto done; /* Not quoted */
- default:
- /* Backup point is \, scan * point is after it. */
- regprev = regparse;
- regparse++;
- continue; /* NOT break; */
- }
- }
- regprev = regparse; /* Set backup point */
- }
- done:
- regc('\0');
- *flagp |= HASWIDTH;
- if (!regprev) /* One char? */
- *flagp |= SIMPLE;
- }
- break;
- }
-
- return(ret);
-}
-
-/*
- - regnode - emit a node
- */
-static char * /* Location. */
-regnode(op)
-char op;
-{
- register char *ret;
- register char *ptr;
-
- ret = regcode;
- if (ret == &regdummy) {
- regsize += 3;
- return(ret);
- }
-
- ptr = ret;
- *ptr++ = op;
- *ptr++ = '\0'; /* Null "next" pointer. */
- *ptr++ = '\0';
- regcode = ptr;
-
- return(ret);
-}
-
-/*
- - regc - emit (if appropriate) a byte of code
- */
-static void
-regc(b)
-char b;
-{
- if (regcode != &regdummy)
- *regcode++ = b;
- else
- regsize++;
-}
-
-/*
- - reginsert - insert an operator in front of already-emitted operand
- *
- * Means relocating the operand.
- */
-static void
-reginsert(op, opnd)
-char op;
-char *opnd;
-{
- register char *src;
- register char *dst;
- register char *place;
-
- if (regcode == &regdummy) {
- regsize += 3;
- return;
- }
-
- src = regcode;
- regcode += 3;
- dst = regcode;
- while (src > opnd)
- *--dst = *--src;
-
- place = opnd; /* Op node, where operand used to be. */
- *place++ = op;
- *place++ = '\0';
- *place++ = '\0';
-}
-
-/*
- - regtail - set the next-pointer at the end of a node chain
- */
-static void
-regtail(p, val)
-char *p;
-char *val;
-{
- register char *scan;
- register char *temp;
- register int offset;
-
- if (p == &regdummy)
- return;
-
- /* Find last node. */
- scan = p;
- for (;;) {
- temp = regnext(scan);
- if (temp == NULL)
- break;
- scan = temp;
- }
-
- if (OP(scan) == BACK)
- offset = scan - val;
- else
- offset = val - scan;
- *(scan+1) = (offset>>8)&0377;
- *(scan+2) = offset&0377;
-}
-
-/*
- - regoptail - regtail on operand of first argument; nop if operandless
- */
-static void
-regoptail(p, val)
-char *p;
-char *val;
-{
- /* "Operandless" and "op != BRANCH" are synonymous in practice. */
- if (p == NULL || p == &regdummy || OP(p) != BRANCH)
- return;
- regtail(OPERAND(p), val);
-}
-
-/*
- * regexec and friends
- */
-
-/*
- * Global work variables for regexec().
- */
-static char *reginput; /* String-input pointer. */
-static char *regbol; /* Beginning of input, for ^ check. */
-static char **regstartp; /* Pointer to startp array. */
-static char **regendp; /* Ditto for endp. */
-
-/*
- * Forwards.
- */
-STATIC int regtry (const regexp *, const char *);
-STATIC int regmatch (char *);
-STATIC int regrepeat (char *);
-
-#ifdef DEBUG
-int regnarrate = 0;
-void regdump __P((regexp *));
-STATIC char *regprop __P((char *));
-#endif
-
-/*
- - regexec - match a regexp against a string
- */
-int
-regexec(prog, string)
-register const regexp *prog;
-register const char *string;
-{
- register char *s;
-
- /* Be paranoid... */
- if (prog == NULL || string == NULL) {
- regerror("NULL parameter");
- return(0);
- }
-
- /* Check validity of program. */
- if (UCHARAT(prog->program) != MAGIC) {
- regerror("corrupted program");
- return(0);
- }
-
- /* If there is a "must appear" string, look for it. */
- if (prog->regmust != NULL) {
- s = (char *)string;
- while ((s = strchr(s, prog->regmust[0])) != NULL) {
- if (strncmp(s, prog->regmust, prog->regmlen) == 0)
- break; /* Found it. */
- s++;
- }
- if (s == NULL) /* Not present. */
- return(0);
- }
-
- /* Mark beginning of line for ^ . */
- regbol = (char *)string;
-
- /* Simplest case: anchored match need be tried only once. */
- if (prog->reganch)
- return(regtry(prog, string));
-
- /* Messy cases: unanchored match. */
- s = (char *)string;
- if (prog->regstart != '\0')
- /* We know what char it must start with. */
- while ((s = strchr(s, prog->regstart)) != NULL) {
- if (regtry(prog, s))
- return(1);
- s++;
- }
- else
- /* We don't -- general case. */
- do {
- if (regtry(prog, s))
- return(1);
- } while (*s++ != '\0');
-
- /* Failure. */
- return(0);
-}
-
-/*
- - regtry - try match at specific point
- */
-static int /* 0 failure, 1 success */
-regtry(prog, string)
-const regexp *prog;
-const char *string;
-{
- register int i;
- register char **sp;
- register char **ep;
-
- reginput = (char *)string; /* XXX */
- regstartp = (char **)prog->startp; /* XXX */
- regendp = (char **)prog->endp; /* XXX */
-
- sp = (char **)prog->startp; /* XXX */
- ep = (char **)prog->endp; /* XXX */
- for (i = NSUBEXP; i > 0; i--) {
- *sp++ = NULL;
- *ep++ = NULL;
- }
- if (regmatch((char *)prog->program + 1)) { /* XXX */
- ((regexp *)prog)->startp[0] = (char *)string; /* XXX */
- ((regexp *)prog)->endp[0] = reginput; /* XXX */
- return(1);
- } else
- return(0);
-}
-
-/*
- - regmatch - main matching routine
- *
- * Conceptually the strategy is simple: check to see whether the current
- * node matches, call self recursively to see whether the rest matches,
- * and then act accordingly. In practice we make some effort to avoid
- * recursion, in particular by going through "ordinary" nodes (that don't
- * need to know whether the rest of the match failed) by a loop instead of
- * by recursion.
- */
-static int /* 0 failure, 1 success */
-regmatch(prog)
-char *prog;
-{
- register char *scan; /* Current node. */
- char *next; /* Next node. */
-
- scan = prog;
-#ifdef DEBUG
- if (scan != NULL && regnarrate)
- fprintf(stderr, "%s(\n", regprop(scan));
-#endif
- while (scan != NULL) {
-#ifdef DEBUG
- if (regnarrate)
- fprintf(stderr, "%s...\n", regprop(scan));
-#endif
- next = regnext(scan);
-
- switch (OP(scan)) {
- case BOL:
- if (reginput != regbol)
- return(0);
- break;
- case EOL:
- if (*reginput != '\0')
- return(0);
- break;
- case WORDA:
- /* Must be looking at a letter, digit, or _ */
- if ((!isalnum(*reginput)) && *reginput != '_')
- return(0);
- /* Prev must be BOL or nonword */
- if (reginput > regbol &&
- (isalnum(reginput[-1]) || reginput[-1] == '_'))
- return(0);
- break;
- case WORDZ:
- /* Must be looking at non letter, digit, or _ */
- if (isalnum(*reginput) || *reginput == '_')
- return(0);
- /* We don't care what the previous char was */
- break;
- case ANY:
- if (*reginput == '\0')
- return(0);
- reginput++;
- break;
- case EXACTLY: {
- register int len;
- register char *opnd;
-
- opnd = OPERAND(scan);
- /* Inline the first character, for speed. */
- if (*opnd != *reginput)
- return(0);
- len = strlen(opnd);
- if (len > 1 && strncmp(opnd, reginput, len) != 0)
- return(0);
- reginput += len;
- }
- break;
- case ANYOF:
- if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) == NULL)
- return(0);
- reginput++;
- break;
- case ANYBUT:
- if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) != NULL)
- return(0);
- reginput++;
- break;
- case NOTHING:
- break;
- case BACK:
- break;
- case OPEN+1:
- case OPEN+2:
- case OPEN+3:
- case OPEN+4:
- case OPEN+5:
- case OPEN+6:
- case OPEN+7:
- case OPEN+8:
- case OPEN+9: {
- register int no;
- register char *save;
-
- no = OP(scan) - OPEN;
- save = reginput;
-
- if (regmatch(next)) {
- /*
- * Don't set startp if some later
- * invocation of the same parentheses
- * already has.
- */
- if (regstartp[no] == NULL)
- regstartp[no] = save;
- return(1);
- } else
- return(0);
- }
- break;
- case CLOSE+1:
- case CLOSE+2:
- case CLOSE+3:
- case CLOSE+4:
- case CLOSE+5:
- case CLOSE+6:
- case CLOSE+7:
- case CLOSE+8:
- case CLOSE+9: {
- register int no;
- register char *save;
-
- no = OP(scan) - CLOSE;
- save = reginput;
-
- if (regmatch(next)) {
- /*
- * Don't set endp if some later
- * invocation of the same parentheses
- * already has.
- */
- if (regendp[no] == NULL)
- regendp[no] = save;
- return(1);
- } else
- return(0);
- }
- break;
- case BRANCH: {
- register char *save;
-
- if (OP(next) != BRANCH) /* No choice. */
- next = OPERAND(scan); /* Avoid recursion. */
- else {
- do {
- save = reginput;
- if (regmatch(OPERAND(scan)))
- return(1);
- reginput = save;
- scan = regnext(scan);
- } while (scan != NULL && OP(scan) == BRANCH);
- return(0);
- /* NOTREACHED */
- }
- }
- break;
- case STAR:
- case PLUS: {
- register char nextch;
- register int no;
- register char *save;
- register int min;
-
- /*
- * Lookahead to avoid useless match attempts
- * when we know what character comes next.
- */
- nextch = '\0';
- if (OP(next) == EXACTLY)
- nextch = *OPERAND(next);
- min = (OP(scan) == STAR) ? 0 : 1;
- save = reginput;
- no = regrepeat(OPERAND(scan));
- while (no >= min) {
- /* If it could work, try it. */
- if (nextch == '\0' || *reginput == nextch)
- if (regmatch(next))
- return(1);
- /* Couldn't or didn't -- back up. */
- no--;
- reginput = save + no;
- }
- return(0);
- }
- break;
- case END:
- return(1); /* Success! */
- break;
- default:
- regerror("memory corruption");
- return(0);
- break;
- }
-
- scan = next;
- }
-
- /*
- * We get here only if there's trouble -- normally "case END" is
- * the terminating point.
- */
- regerror("corrupted pointers");
- return(0);
-}
-
-/*
- - regrepeat - repeatedly match something simple, report how many
- */
-static int
-regrepeat(p)
-char *p;
-{
- register int count = 0;
- register char *scan;
- register char *opnd;
-
- scan = reginput;
- opnd = OPERAND(p);
- switch (OP(p)) {
- case ANY:
- count = strlen(scan);
- scan += count;
- break;
- case EXACTLY:
- while (*opnd == *scan) {
- count++;
- scan++;
- }
- break;
- case ANYOF:
- while (*scan != '\0' && strchr(opnd, *scan) != NULL) {
- count++;
- scan++;
- }
- break;
- case ANYBUT:
- while (*scan != '\0' && strchr(opnd, *scan) == NULL) {
- count++;
- scan++;
- }
- break;
- default: /* Oh dear. Called inappropriately. */
- regerror("internal foulup");
- count = 0; /* Best compromise. */
- break;
- }
- reginput = scan;
-
- return(count);
-}
-
-/*
- - regnext - dig the "next" pointer out of a node
- */
-static char *
-regnext(p)
-register char *p;
-{
- register int offset;
-
- if (p == &regdummy)
- return(NULL);
-
- offset = NEXT(p);
- if (offset == 0)
- return(NULL);
-
- if (OP(p) == BACK)
- return(p-offset);
- else
- return(p+offset);
-}
-
-#ifdef DEBUG
-
-/*
- - regdump - dump a regexp onto stdout in vaguely comprehensible form
- */
-void
-regdump(r)
-regexp *r;
-{
- register char *s;
- register char op = EXACTLY; /* Arbitrary non-END op. */
- register char *next;
- extern char *strchr();
-
-
- s = r->program + 1;
- while (op != END) { /* While that wasn't END last time... */
- op = OP(s);
- printf("%2d%s", s-r->program, regprop(s)); /* Where, what. */
- next = regnext(s);
- if (next == NULL) /* Next ptr. */
- printf("(0)");
- else
- printf("(%d)", (s-r->program)+(next-s));
- s += 3;
- if (op == ANYOF || op == ANYBUT || op == EXACTLY) {
- /* Literal string, where present. */
- while (*s != '\0') {
- putchar(*s);
- s++;
- }
- s++;
- }
- putchar('\n');
- }
-
- /* Header fields of interest. */
- if (r->regstart != '\0')
- printf("start `%c' ", r->regstart);
- if (r->reganch)
- printf("anchored ");
- if (r->regmust != NULL)
- printf("must have \"%s\"", r->regmust);
- printf("\n");
-}
-
-/*
- - regprop - printable representation of opcode
- */
-static char *
-regprop(op)
-char *op;
-{
- register char *p;
- static char buf[50];
-
- (void) strcpy(buf, ":");
-
- switch (OP(op)) {
- case BOL:
- p = "BOL";
- break;
- case EOL:
- p = "EOL";
- break;
- case ANY:
- p = "ANY";
- break;
- case ANYOF:
- p = "ANYOF";
- break;
- case ANYBUT:
- p = "ANYBUT";
- break;
- case BRANCH:
- p = "BRANCH";
- break;
- case EXACTLY:
- p = "EXACTLY";
- break;
- case NOTHING:
- p = "NOTHING";
- break;
- case BACK:
- p = "BACK";
- break;
- case END:
- p = "END";
- break;
- case OPEN+1:
- case OPEN+2:
- case OPEN+3:
- case OPEN+4:
- case OPEN+5:
- case OPEN+6:
- case OPEN+7:
- case OPEN+8:
- case OPEN+9:
- sprintf(buf+strlen(buf), "OPEN%d", OP(op)-OPEN);
- p = NULL;
- break;
- case CLOSE+1:
- case CLOSE+2:
- case CLOSE+3:
- case CLOSE+4:
- case CLOSE+5:
- case CLOSE+6:
- case CLOSE+7:
- case CLOSE+8:
- case CLOSE+9:
- sprintf(buf+strlen(buf), "CLOSE%d", OP(op)-CLOSE);
- p = NULL;
- break;
- case STAR:
- p = "STAR";
- break;
- case PLUS:
- p = "PLUS";
- break;
- case WORDA:
- p = "WORDA";
- break;
- case WORDZ:
- p = "WORDZ";
- break;
- default:
- regerror("corrupted opcode");
- break;
- }
- if (p != NULL)
- (void) strcat(buf, p);
- return(buf);
-}
-#endif
-
-/*
- * The following is provided for those people who do not have strcspn() in
- * their C libraries. They should get off their butts and do something
- * about it; at least one public-domain implementation of those (highly
- * useful) string routines has been published on Usenet.
- */
-#ifdef STRCSPN
-/*
- * strcspn - find length of initial segment of s1 consisting entirely
- * of characters not from s2
- */
-
-static int
-strcspn(s1, s2)
-char *s1;
-char *s2;
-{
- register char *scan1;
- register char *scan2;
- register int count;
-
- count = 0;
- for (scan1 = s1; *scan1 != '\0'; scan1++) {
- for (scan2 = s2; *scan2 != '\0';) /* ++ moved down. */
- if (*scan1 == *scan2++)
- return(count);
- count++;
- }
- return(count);
-}
-#endif
diff --git a/winsup/cygwin/regexp/regexp.h b/winsup/cygwin/regexp/regexp.h
deleted file mode 100644
index 9e9cd9eb6..000000000
--- a/winsup/cygwin/regexp/regexp.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Definitions etc. for regexp(3) routines.
- *
- * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof],
- * not the System V one.
- *
- * $Id$
- */
-
-#define NSUBEXP 10
-typedef struct regexp {
- char *startp[NSUBEXP];
- char *endp[NSUBEXP];
- char regstart; /* Internal use only. */
- char reganch; /* Internal use only. */
- char *regmust; /* Internal use only. */
- int regmlen; /* Internal use only. */
- char program[1]; /* Unwarranted chumminess with compiler. */
-} regexp;
-
-extern regexp *regcomp();
-extern int regexec();
-extern void regsub();
-extern void regerror();
diff --git a/winsup/cygwin/regexp/regmagic.h b/winsup/cygwin/regexp/regmagic.h
deleted file mode 100644
index 9eb4eaf96..000000000
--- a/winsup/cygwin/regexp/regmagic.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* $Id$ */
-
-/*
- * The first byte of the regexp internal "program" is actually this magic
- * number; the start node begins in the second byte.
- */
-#define MAGIC 0234
diff --git a/winsup/cygwin/regexp/regsub.c b/winsup/cygwin/regexp/regsub.c
deleted file mode 100644
index e544072c1..000000000
--- a/winsup/cygwin/regexp/regsub.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * regsub
- *
- * Copyright (c) 1986 by University of Toronto.
- * Written by Henry Spencer. Not derived from licensed software.
- *
- * Permission is granted to anyone to use this software for any
- * purpose on any computer system, and to redistribute it freely,
- * 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 defects in it.
- *
- * 2. The origin of this software must not be misrepresented, either
- * by explicit claim or by omission.
- *
- * 3. Altered versions must be plainly marked as such, and must not
- * be misrepresented as being the original software.
- */
-
-#if 0
-#ifndef lint
-static char *rcsid = "$Id$";
-#endif /* not lint */
-#endif
-
-#include "regexp.h"
-#include <stdio.h>
-#include <string.h>
-#include "regmagic.h"
-
-#ifndef CHARBITS
-#define UCHARAT(p) ((int)*(unsigned char *)(p))
-#else
-#define UCHARAT(p) ((int)*(p)&CHARBITS)
-#endif
-
-/*
- - regsub - perform substitutions after a regexp match
- */
-void
-regsub(prog, source, dest)
-const regexp *prog;
-const char *source;
-char *dest;
-{
- register char *src;
- register char *dst;
- register char c;
- register int no;
- register int len;
-
- if (prog == NULL || source == NULL || dest == NULL) {
- regerror("NULL parm to regsub");
- return;
- }
- if (UCHARAT(prog->program) != MAGIC) {
- regerror("damaged regexp fed to regsub");
- return;
- }
-
- src = (char *)source;
- dst = dest;
- while ((c = *src++) != '\0') {
- if (c == '&')
- no = 0;
- else if (c == '\\' && '0' <= *src && *src <= '9')
- no = *src++ - '0';
- else
- no = -1;
- if (no < 0) { /* Ordinary character. */
- if (c == '\\' && (*src == '\\' || *src == '&'))
- c = *src++;
- *dst++ = c;
- } else if (prog->startp[no] != NULL && prog->endp[no] != NULL) {
- len = prog->endp[no] - prog->startp[no];
- (void) strncpy(dst, prog->startp[no], len);
- dst += len;
- if (len != 0 && *(dst-1) == '\0') { /* strncpy hit NUL. */
- regerror("damaged match string");
- return;
- }
- }
- }
- *dst++ = '\0';
-}
diff --git a/winsup/cygwin/registry.cc b/winsup/cygwin/registry.cc
deleted file mode 100644
index 70a96f62f..000000000
--- a/winsup/cygwin/registry.cc
+++ /dev/null
@@ -1,249 +0,0 @@
-/* registry.cc: registry interface
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "shared_info.h"
-#include "registry.h"
-#include "security.h"
-#include <cygwin/version.h>
-
-char cygnus_class[] = "cygnus";
-
-reg_key::reg_key (HKEY top, REGSAM access, ...)
-{
- va_list av;
- va_start (av, access);
- build_reg (top, access, av);
- va_end (av);
-}
-
-reg_key::reg_key (REGSAM access, ...)
-{
- va_list av;
-
- new (this) reg_key (HKEY_CURRENT_USER, access, "SOFTWARE",
- CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
- CYGWIN_INFO_CYGWIN_REGISTRY_NAME, NULL);
-
- HKEY top = key;
- va_start (av, access);
- build_reg (top, KEY_READ, av);
- va_end (av);
- if (top != key)
- RegCloseKey (top);
-}
-
-reg_key::reg_key (REGSAM access)
-{
- new (this) reg_key (HKEY_CURRENT_USER, access, "SOFTWARE",
- CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
- CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
- CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME, NULL);
-}
-
-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)
- {
- DWORD disp;
- int res = RegCreateKeyExA (r,
- name,
- 0,
- cygnus_class,
- REG_OPTION_NON_VOLATILE,
- access,
- &sec_none_nih,
- &key,
- &disp);
- 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;
- }
-
- /* If we're considering the mounts key, check if it had to
- be created and set had_to_create appropriately. */
- if (strcmp (name, CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME) == 0)
- if (disp == REG_CREATED_NEW_KEY)
- cygwin_shared->mount.had_to_create_mount_areas++;
- }
-}
-
-/* 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;
-}
-
-char *
-get_registry_hive_path (const PSID psid, char *path)
-{
- char sid[256];
- char key[256];
- HKEY hkey;
-
- if (!psid || !path)
- return NULL;
- convert_sid_to_string_sid (psid, sid);
- strcpy (key,"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\");
- strcat (key, sid);
- if (!RegOpenKeyExA (HKEY_LOCAL_MACHINE, key, 0, KEY_READ, &hkey))
- {
- char buf[256];
- DWORD type, siz;
-
- key[0] = '\0';
- if (!RegQueryValueExA (hkey, "ProfileImagePath", 0, &type,
- (BYTE *)buf, (siz = 256, &siz)))
- ExpandEnvironmentStringsA (buf, key, 256);
- RegCloseKey (hkey);
- if (key[0])
- return strcpy (path, key);
- }
- return NULL;
-}
-
-void
-load_registry_hive (PSID psid)
-{
- char sid[256];
- char path[MAX_PATH + 1];
- HKEY hkey;
- LONG ret;
-
- if (!psid)
- return;
- /* Check if user hive is already loaded. */
- if (!RegOpenKeyExA (HKEY_USERS, convert_sid_to_string_sid (psid, sid),
- 0, KEY_READ, &hkey))
- {
- debug_printf ("User registry hive for %s already exists", sid);
- RegCloseKey (hkey);
- return;
- }
- if (get_registry_hive_path (psid, path))
- {
- strcat (path, "\\NTUSER.DAT");
- if ((ret = RegLoadKeyA (HKEY_USERS, sid, path)) != ERROR_SUCCESS)
- debug_printf ("Loading user registry hive for %s failed: %d", sid, ret);
- }
-}
-
diff --git a/winsup/cygwin/registry.h b/winsup/cygwin/registry.h
deleted file mode 100644
index 7e21245b9..000000000
--- a/winsup/cygwin/registry.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* registry.h: shared info for cygwin
-
- Copyright 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-class reg_key
-{
-private:
-
- HKEY key;
- LONG key_is_invalid;
-
-public:
-
- reg_key (HKEY toplev, REGSAM access, ...);
- reg_key (REGSAM access, ...);
- reg_key (REGSAM access = KEY_ALL_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);
-
- ~reg_key ();
-};
-
-/* Evaluates path to the directory of the local user registry hive */
-char *__stdcall get_registry_hive_path (const PSID psid, char *path);
-void __stdcall load_registry_hive (PSID psid);
diff --git a/winsup/cygwin/resource.cc b/winsup/cygwin/resource.cc
deleted file mode 100644
index 58c2ced25..000000000
--- a/winsup/cygwin/resource.cc
+++ /dev/null
@@ -1,99 +0,0 @@
-/* resource.cc: getrusage () and friends.
-
- Copyright 1996, 1997, 1998, 2000 Cygnus Solutions.
-
- 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 <errno.h>
-#include "cygerrno.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.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);
-}
-
-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;
-}
diff --git a/winsup/cygwin/scandir.cc b/winsup/cygwin/scandir.cc
deleted file mode 100644
index 793505d2f..000000000
--- a/winsup/cygwin/scandir.cc
+++ /dev/null
@@ -1,101 +0,0 @@
-/* scandir.cc
-
- Copyright 1998 Cygnus Solutions.
-
- Written by Corinna Vinschen <corinna.vinschen@cityweb.de>
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include "winsup.h"
-#include <dirent.h>
-#include <stdlib.h>
-#include <errno.h>
-#include "cygerrno.h"
-
-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;
-
- if (!(dirp = opendir (dir)))
- return -1;
-
- int prior_errno = get_errno ();
- set_errno (0);
-
- while ((ent = readdir (dirp)))
- {
- if (!select || select (ent))
- {
-
- /* Ignore error from readdir/select. See POSIX specs. */
- set_errno (0);
-
- if (count == allocated)
- {
-
- if (allocated == 0)
- allocated = 10;
- else
- allocated *= 2;
-
- ntmp = (struct dirent **) realloc (nl, allocated * sizeof *nl);
- if (!ntmp)
- {
- set_errno (ENOMEM);
- break;
- }
- nl = ntmp;
- }
-
- if (!(etmp = (struct dirent *) malloc (sizeof *ent)))
- {
- set_errno (ENOMEM);
- break;
- }
- *etmp = *ent;
- nl[count++] = etmp;
- }
- }
-
- if ((prior_errno = get_errno ()) != 0)
- {
- closedir (dirp);
- if (nl)
- {
- while (count > 0)
- free (nl[--count]);
- free (nl);
- }
- /* Ignore errors from closedir() and what not else. */
- set_errno (prior_errno);
- return -1;
- }
-
- closedir (dirp);
- set_errno (prior_errno);
-
- qsort (nl, count, sizeof *nl, (int (*)(const void *, const void *)) compar);
- if (namelist)
- *namelist = nl;
- return count;
-}
-
-extern "C"
-int
-alphasort (const struct dirent **a, const struct dirent **b)
-{
- return strcoll ((*a)->d_name, (*b)->d_name);
-}
-
diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc
deleted file mode 100644
index 04915781d..000000000
--- a/winsup/cygwin/security.cc
+++ /dev/null
@@ -1,2180 +0,0 @@
-/* security.cc: NT security functions
-
- Copyright 1997, 1998, 1999, 2000 Cygnus Solutions.
-
- Originaly written by Gunther Ebert, gunther.ebert@ixos-leipzig.de
- Extensions 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 <grp.h>
-#include <pwd.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <limits.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/acl.h>
-#include <ctype.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "path.h"
-#include "dtable.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "cygheap.h"
-#include "security.h"
-
-extern BOOL allow_ntea;
-BOOL allow_ntsec = FALSE;
-
-SID_IDENTIFIER_AUTHORITY sid_auth[] = {
- {SECURITY_NULL_SID_AUTHORITY},
- {SECURITY_WORLD_SID_AUTHORITY},
- {SECURITY_LOCAL_SID_AUTHORITY},
- {SECURITY_CREATOR_SID_AUTHORITY},
- {SECURITY_NON_UNIQUE_AUTHORITY},
- {SECURITY_NT_AUTHORITY}
-};
-
-#define DONT_INHERIT (0)
-#define INHERIT_ALL (CONTAINER_INHERIT_ACE|OBJECT_INHERIT_ACE)
-#define INHERIT_ONLY (INHERIT_ONLY_ACE|CONTAINER_INHERIT_ACE|OBJECT_INHERIT_ACE)
-
-char *
-convert_sid_to_string_sid (PSID psid, char *sid_str)
-{
- char t[32];
- DWORD i;
-
- if (!psid || !sid_str)
- return NULL;
- strcpy (sid_str, "S-1-");
- __small_sprintf(t, "%u", GetSidIdentifierAuthority (psid)->Value[5]);
- strcat (sid_str, t);
- for (i = 0; i < *GetSidSubAuthorityCount (psid); ++i)
- {
- __small_sprintf(t, "-%lu", *GetSidSubAuthority (psid, i));
- strcat (sid_str, t);
- }
- return sid_str;
-}
-
-PSID
-get_sid (PSID psid, DWORD s, DWORD cnt, DWORD *r)
-{
- DWORD i;
-
- if (! psid || s > 5 || cnt < 1 || cnt > 8)
- return NULL;
-
- InitializeSid(psid, &sid_auth[s], cnt);
- for (i = 0; i < cnt; ++i)
- memcpy ((char *) psid + 8 + sizeof (DWORD) * i, &r[i], sizeof (DWORD));
- return psid;
-}
-
-PSID
-convert_string_sid_to_sid (PSID psid, const char *sid_str)
-{
- char sid_buf[256];
- char *t;
- DWORD cnt = 0;
- DWORD s = 0;
- DWORD i, r[8];
-
- if (! sid_str || strncmp (sid_str, "S-1-", 4))
- return NULL;
-
- strcpy (sid_buf, sid_str);
-
- for (t = sid_buf + 4, i = 0; cnt < 8 && (t = strtok (t, "-")); t = NULL, ++i)
- if (i == 0)
- s = strtoul (t, NULL, 10);
- else
- r[cnt++] = strtoul (t, NULL, 10);
-
- return get_sid (psid, s, cnt, r);
-}
-
-BOOL
-get_pw_sid (PSID sid, struct passwd *pw)
-{
- char *sp = pw->pw_gecos ? strrchr (pw->pw_gecos, ',') : NULL;
-
- if (!sp)
- return FALSE;
- return convert_string_sid_to_sid (sid, ++sp) != NULL;
-}
-
-BOOL
-get_gr_sid (PSID sid, struct group *gr)
-{
- return convert_string_sid_to_sid (sid, gr->gr_passwd) != NULL;
-}
-
-PSID
-get_admin_sid ()
-{
- static NO_COPY char admin_sid_buf[MAX_SID_LEN];
- static NO_COPY PSID admin_sid = NULL;
-
- if (!admin_sid)
- {
- admin_sid = (PSID) admin_sid_buf;
- convert_string_sid_to_sid (admin_sid, "S-1-5-32-544");
- }
- return admin_sid;
-}
-
-PSID
-get_system_sid ()
-{
- static NO_COPY char system_sid_buf[MAX_SID_LEN];
- static NO_COPY PSID system_sid = NULL;
-
- if (!system_sid)
- {
- system_sid = (PSID) system_sid_buf;
- convert_string_sid_to_sid (system_sid, "S-1-5-18");
- }
- return system_sid;
-}
-
-PSID
-get_creator_owner_sid ()
-{
- static NO_COPY char owner_sid_buf[MAX_SID_LEN];
- static NO_COPY PSID owner_sid = NULL;
-
- if (!owner_sid)
- {
- owner_sid = (PSID) owner_sid_buf;
- convert_string_sid_to_sid (owner_sid, "S-1-3-0");
- }
- return owner_sid;
-}
-
-PSID
-get_world_sid ()
-{
- static NO_COPY char world_sid_buf[MAX_SID_LEN];
- static NO_COPY PSID world_sid = NULL;
-
- if (!world_sid)
- {
- world_sid = (PSID) world_sid_buf;
- convert_string_sid_to_sid (world_sid, "S-1-1-0");
- }
- return world_sid;
-}
-
-int passwd_sem = 0;
-int group_sem = 0;
-
-static int
-get_id_from_sid (PSID psid, BOOL search_grp, int *type)
-{
- if (!IsValidSid (psid))
- {
- __seterrno ();
- small_printf ("IsValidSid failed with %E");
- return -1;
- }
-
- /* First try to get SID from passwd or group entry */
- if (allow_ntsec)
- {
- char sidbuf[MAX_SID_LEN];
- PSID sid = (PSID) sidbuf;
- int id = -1;
-
- if (! search_grp)
- {
- if (passwd_sem > 0)
- return 0;
- ++passwd_sem;
-
- struct passwd *pw;
- while ((pw = getpwent ()) != NULL)
- {
- if (get_pw_sid (sid, pw) && EqualSid (psid, sid))
- {
- id = pw->pw_uid;
- break;
- }
- }
- endpwent ();
- --passwd_sem;
- if (id >= 0)
- {
- if (type)
- *type = USER;
- return id;
- }
- }
- if (search_grp || type)
- {
- if (group_sem > 0)
- return 0;
- ++group_sem;
-
- struct group *gr;
- while ((gr = getgrent ()) != NULL)
- {
- if (get_gr_sid (sid, gr) && EqualSid (psid, sid))
- {
- id = gr->gr_gid;
- break;
- }
- }
- endgrent ();
- --group_sem;
- if (id >= 0)
- {
- if (type)
- *type = GROUP;
- return id;
- }
- }
- }
-
- /* We use the RID as default UID/GID */
- int id = *GetSidSubAuthority(psid, *GetSidSubAuthorityCount(psid) - 1);
-
- /*
- * The RID maybe -1 if accountname == computername.
- * In this case we search for the accountname in the passwd and group files.
- * If type is needed, we search in each case.
- */
- if (id == -1 || type)
- {
- char account[MAX_USER_NAME];
- char domain[MAX_COMPUTERNAME_LENGTH+1];
- DWORD acc_len = MAX_USER_NAME;
- DWORD dom_len = MAX_COMPUTERNAME_LENGTH+1;
- SID_NAME_USE acc_type;
-
- if (!LookupAccountSid (NULL, psid, account, &acc_len,
- domain, &dom_len, &acc_type))
- {
- __seterrno ();
- return -1;
- }
-
- switch (acc_type)
- {
- case SidTypeGroup:
- case SidTypeAlias:
- case SidTypeWellKnownGroup:
- if (type)
- *type = GROUP;
- if (id == -1)
- {
- struct group *gr = getgrnam (account);
- if (gr)
- id = gr->gr_gid;
- }
- break;
- case SidTypeUser:
- if (type)
- *type = USER;
- if (id == -1)
- {
- struct passwd *pw = getpwnam (account);
- if (pw)
- id = pw->pw_uid;
- }
- break;
- default:
- break;
- }
- }
- if (id == -1)
- id = getuid ();
- return id;
-}
-
-int
-get_id_from_sid (PSID psid, BOOL search_grp)
-{
- return get_id_from_sid (psid, search_grp, NULL);
-}
-
-static BOOL
-legal_sid_type (SID_NAME_USE type)
-{
- return type == SidTypeUser || type == SidTypeGroup
- || SidTypeAlias || SidTypeWellKnownGroup;
-}
-
-BOOL
-is_grp_member (uid_t uid, gid_t gid)
-{
- extern int getgroups (int, gid_t *, gid_t, const char *);
- BOOL grp_member = TRUE;
-
- if (!group_sem && !passwd_sem)
- {
- struct passwd *pw = getpwuid (uid);
- gid_t grps[NGROUPS_MAX];
- int cnt = getgroups (NGROUPS_MAX, grps,
- pw ? pw->pw_gid : myself->gid,
- pw ? pw->pw_name : cygheap->user.name ());
- int i;
- for (i = 0; i < cnt; ++i)
- if (grps[i] == gid)
- break;
- grp_member = (i < cnt);
- }
- return grp_member;
-}
-
-BOOL
-lookup_name (const char *name, const char *logsrv, PSID ret_sid)
-{
- char sidbuf[MAX_SID_LEN];
- PSID sid = (PSID) sidbuf;
- DWORD sidlen;
- char domuser[MAX_COMPUTERNAME_LENGTH+MAX_USER_NAME+1];
- char dom[MAX_COMPUTERNAME_LENGTH+1];
- DWORD domlen;
- SID_NAME_USE acc_type;
-
- debug_printf ("name : %s", name ? name : "NULL");
-
- if (! name)
- return FALSE;
-
- if (cygheap->user.domain ())
- {
- strcat (strcat (strcpy (domuser, cygheap->user.domain ()), "\\"), name);
- if (LookupAccountName (NULL, domuser,
- sid, (sidlen = MAX_SID_LEN, &sidlen),
- dom, (domlen = MAX_COMPUTERNAME_LENGTH, &domlen),
- &acc_type)
- && legal_sid_type (acc_type))
- goto got_it;
- if (logsrv && *logsrv
- && LookupAccountName (logsrv, domuser,
- sid, (sidlen = MAX_SID_LEN, &sidlen),
- dom, (domlen = MAX_COMPUTERNAME_LENGTH,&domlen),
- &acc_type)
- && legal_sid_type (acc_type))
- goto got_it;
- }
- if (logsrv && *logsrv)
- {
- if (LookupAccountName (logsrv, name,
- sid, (sidlen = MAX_SID_LEN, &sidlen),
- dom, (domlen = MAX_COMPUTERNAME_LENGTH, &domlen),
- &acc_type)
- && legal_sid_type (acc_type))
- goto got_it;
- if (acc_type == SidTypeDomain)
- {
- strcat (strcat (strcpy (domuser, dom), "\\"), name);
- if (LookupAccountName (logsrv, domuser,
- sid,(sidlen = MAX_SID_LEN, &sidlen),
- dom,(domlen = MAX_COMPUTERNAME_LENGTH,&domlen),
- &acc_type))
- goto got_it;
- }
- }
- if (LookupAccountName (NULL, name,
- sid, (sidlen = MAX_SID_LEN, &sidlen),
- dom, (domlen = 100, &domlen),
- &acc_type)
- && legal_sid_type (acc_type))
- goto got_it;
- if (acc_type == SidTypeDomain)
- {
- strcat (strcat (strcpy (domuser, dom), "\\"), name);
- if (LookupAccountName (NULL, domuser,
- sid, (sidlen = MAX_SID_LEN, &sidlen),
- dom, (domlen = MAX_COMPUTERNAME_LENGTH, &domlen),
- &acc_type))
- goto got_it;
- }
- debug_printf ("LookupAccountName(%s) %E", name);
- __seterrno ();
- return FALSE;
-
-got_it:
- debug_printf ("sid : [%d]", *GetSidSubAuthority((PSID) sid,
- *GetSidSubAuthorityCount((PSID) sid) - 1));
-
- if (ret_sid)
- memcpy (ret_sid, sid, sidlen);
-
- return TRUE;
-}
-
-extern "C"
-void
-cygwin_set_impersonation_token (const HANDLE hToken)
-{
- debug_printf ("set_impersonation_token (%d)", hToken);
- if (cygheap->user.token != hToken)
- {
- if (cygheap->user.token != INVALID_HANDLE_VALUE)
- CloseHandle (cygheap->user.token);
- cygheap->user.token = hToken;
- cygheap->user.impersonated = FALSE;
- }
-}
-
-extern "C"
-HANDLE
-cygwin_logon_user (const struct passwd *pw, const char *password)
-{
- if (os_being_run != winNT)
- {
- set_errno (ENOSYS);
- return INVALID_HANDLE_VALUE;
- }
- if (!pw)
- {
- set_errno (EINVAL);
- return INVALID_HANDLE_VALUE;
- }
-
- char *c, *nt_user, *nt_domain = NULL;
- char usernamebuf[256];
- HANDLE hToken;
-
- strcpy (usernamebuf, pw->pw_name);
- if (pw->pw_gecos)
- {
- if ((c = strstr (pw->pw_gecos, "U-")) != NULL &&
- (c == pw->pw_gecos || c[-1] == ','))
- {
- usernamebuf[0] = '\0';
- strncat (usernamebuf, c + 2, 255);
- if ((c = strchr (usernamebuf, ',')) != NULL)
- *c = '\0';
- }
- }
- nt_user = usernamebuf;
- if ((c = strchr (nt_user, '\\')) != NULL)
- {
- nt_domain = nt_user;
- *c = '\0';
- nt_user = c + 1;
- }
- if (! LogonUserA (nt_user, nt_domain, (char *) password,
- LOGON32_LOGON_INTERACTIVE,
- LOGON32_PROVIDER_DEFAULT,
- &hToken)
- || !SetHandleInformation (hToken,
- HANDLE_FLAG_INHERIT,
- HANDLE_FLAG_INHERIT))
- {
- __seterrno ();
- return INVALID_HANDLE_VALUE;
- }
- debug_printf ("%d = logon_user(%s,...)", hToken, pw->pw_name);
- return hToken;
-}
-
-/* read_sd reads a security descriptor from a file.
- In case of error, -1 is returned and errno is set.
- If sd_buf is too small, 0 is returned and sd_size
- is set to the needed buffer size.
- On success, 1 is returned.
-
- GetFileSecurity() is used instead of BackupRead()
- to avoid access denied errors if the caller has
- not the permission to open that file for read.
-
- Originally the function should return the size
- of the SD on success. Unfortunately NT returns
- 0 in `len' on success, while W2K returns the
- correct size!
-*/
-
-LONG
-read_sd(const char *file, PSECURITY_DESCRIPTOR sd_buf, LPDWORD sd_size)
-{
- /* Check parameters */
- if (! sd_size)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- debug_printf("file = %s", file);
-
- DWORD len = 0;
- const char *pfile = file;
- char fbuf [PATH_MAX];
- if (current_codepage == oem_cp)
- {
- DWORD fname_len = min (sizeof (fbuf) - 1, strlen (file));
- bzero (fbuf, sizeof (fbuf));
- OemToCharBuff(file, fbuf, fname_len);
- pfile = fbuf;
- }
-
- if (! GetFileSecurity (pfile,
- OWNER_SECURITY_INFORMATION
- | GROUP_SECURITY_INFORMATION
- | DACL_SECURITY_INFORMATION,
- sd_buf, *sd_size, &len))
- {
- __seterrno ();
- return -1;
- }
- debug_printf("file = %s: len=%d", file, len);
- if (len > *sd_size)
- {
- *sd_size = len;
- return 0;
- }
- return 1;
-}
-
-LONG
-write_sd(const char *file, PSECURITY_DESCRIPTOR sd_buf, DWORD sd_size)
-{
- /* Check parameters */
- if (! sd_buf || ! sd_size)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- /* No need to be thread save. */
- static BOOL first_time = TRUE;
- if (first_time)
- {
- set_process_privileges ();
- first_time = FALSE;
- }
-
- HANDLE fh;
- fh = CreateFile (file,
- WRITE_OWNER | WRITE_DAC,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- &sec_none_nih,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS,
- NULL);
-
- if (fh == INVALID_HANDLE_VALUE)
- {
- __seterrno ();
- return -1;
- }
-
- LPVOID context = NULL;
- DWORD bytes_written = 0;
- WIN32_STREAM_ID header;
-
- memset (&header, 0, sizeof (header));
- /* write new security info header */
- header.dwStreamId = BACKUP_SECURITY_DATA;
- header.dwStreamAttributes = STREAM_CONTAINS_SECURITY;
- header.Size.HighPart = 0;
- header.Size.LowPart = sd_size;
- header.dwStreamNameSize = 0;
- if (!BackupWrite (fh, (LPBYTE) &header,
- 3 * sizeof (DWORD) + sizeof (LARGE_INTEGER),
- &bytes_written, FALSE, TRUE, &context))
- {
- __seterrno ();
- CloseHandle (fh);
- return -1;
- }
-
- /* write new security descriptor */
- if (!BackupWrite (fh, (LPBYTE) sd_buf,
- header.Size.LowPart + header.dwStreamNameSize,
- &bytes_written, FALSE, TRUE, &context))
- {
- /* Samba returns ERROR_NOT_SUPPORTED.
- FAT returns ERROR_INVALID_SECURITY_DESCR.
- This shouldn't return as error, but better be ignored. */
- DWORD ret = GetLastError ();
- if (ret != ERROR_NOT_SUPPORTED && ret != ERROR_INVALID_SECURITY_DESCR)
- {
- __seterrno ();
- BackupWrite (fh, NULL, 0, &bytes_written, TRUE, TRUE, &context);
- CloseHandle (fh);
- return -1;
- }
- }
-
- /* terminate the restore process */
- BackupWrite (fh, NULL, 0, &bytes_written, TRUE, TRUE, &context);
- CloseHandle (fh);
- return 0;
-}
-
-int
-set_process_privileges ()
-{
- HANDLE hToken = NULL;
- LUID restore_priv;
- TOKEN_PRIVILEGES new_priv;
- int ret = -1;
-
- if (! OpenProcessToken (hMainProc, TOKEN_ADJUST_PRIVILEGES, &hToken))
- {
- __seterrno ();
- goto out;
- }
-
- if (! LookupPrivilegeValue (NULL, SE_RESTORE_NAME, &restore_priv))
- {
- __seterrno ();
- goto out;
- }
-
- new_priv.PrivilegeCount = 1;
- new_priv.Privileges[0].Luid = restore_priv;
- new_priv.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
-
- if (! AdjustTokenPrivileges (hToken, FALSE, &new_priv, 0, NULL, NULL))
- {
- __seterrno ();
- goto out;
- }
-
- ret = 0;
-
-out:
- if (hToken)
- CloseHandle (hToken);
-
- syscall_printf ("%d = set_process_privileges ()", ret);
- return ret;
-}
-
-static int
-get_nt_attribute (const char *file, int *attribute,
- uid_t *uidret, gid_t *gidret)
-{
- if (os_being_run != winNT)
- return 0;
-
- syscall_printf ("file: %s", file);
-
- /* Yeah, sounds too much, but I've seen SDs of 2100 bytes! */
- DWORD sd_size = 4096;
- char sd_buf[4096];
- PSECURITY_DESCRIPTOR psd = (PSECURITY_DESCRIPTOR) sd_buf;
-
- int ret;
- if ((ret = read_sd (file, psd, &sd_size)) <= 0)
- {
- debug_printf ("read_sd %E");
- return ret;
- }
-
- PSID owner_sid;
- PSID group_sid;
- BOOL dummy;
-
- if (! GetSecurityDescriptorOwner (psd, &owner_sid, &dummy))
- debug_printf ("GetSecurityDescriptorOwner %E");
- if (! GetSecurityDescriptorGroup (psd, &group_sid, &dummy))
- debug_printf ("GetSecurityDescriptorGroup %E");
-
- PACL acl;
- BOOL acl_exists;
-
- if (! GetSecurityDescriptorDacl (psd, &acl_exists, &acl, &dummy))
- {
- __seterrno ();
- debug_printf ("GetSecurityDescriptorDacl %E");
- return -1;
- }
-
- uid_t uid = get_uid_from_sid (owner_sid);
- gid_t gid = get_gid_from_sid (group_sid);
- if (uidret)
- *uidret = uid;
- if (gidret)
- *gidret = gid;
-
- if (! attribute)
- {
- syscall_printf ("file: %s uid %d, gid %d", file, uid, gid);
- return 0;
- }
-
- BOOL grp_member = is_grp_member (uid, gid);
-
- if (! acl_exists || ! acl)
- {
- *attribute |= S_IRWXU | S_IRWXG | S_IRWXO;
- syscall_printf ("file: %s No ACL = %x, uid %d, gid %d",
- file, *attribute, uid, gid);
- return 0;
- }
-
- 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_ACE)
- continue;
- switch (ace->Header.AceType)
- {
- case ACCESS_ALLOWED_ACE_TYPE:
- flags = &allow;
- anti = &deny;
- break;
- case ACCESS_DENIED_ACE_TYPE:
- flags = &deny;
- anti = &allow;
- break;
- default:
- continue;
- }
-
- PSID ace_sid = (PSID) &ace->SidStart;
- if (owner_sid && EqualSid (ace_sid, owner_sid))
- {
- if (ace->Mask & FILE_READ_DATA)
- *flags |= S_IRUSR;
- if (ace->Mask & FILE_WRITE_DATA)
- *flags |= S_IWUSR;
- if (ace->Mask & FILE_EXECUTE)
- *flags |= S_IXUSR;
- }
- else if (group_sid && EqualSid (ace_sid, group_sid))
- {
- if (ace->Mask & FILE_READ_DATA)
- *flags |= S_IRGRP
- | ((grp_member && !(*anti & S_IRUSR)) ? S_IRUSR : 0);
- if (ace->Mask & FILE_WRITE_DATA)
- *flags |= S_IWGRP
- | ((grp_member && !(*anti & S_IWUSR)) ? S_IWUSR : 0);
- if (ace->Mask & FILE_EXECUTE)
- *flags |= S_IXGRP
- | ((grp_member && !(*anti & S_IXUSR)) ? S_IXUSR : 0);
- }
- else if (EqualSid (ace_sid, get_world_sid ()))
- {
- if (ace->Mask & FILE_READ_DATA)
- *flags |= S_IROTH
- | ((!(*anti & S_IRGRP)) ? S_IRGRP : 0)
- | ((!(*anti & S_IRUSR)) ? S_IRUSR : 0);
- if (ace->Mask & FILE_WRITE_DATA)
- *flags |= S_IWOTH
- | ((!(*anti & S_IWGRP)) ? S_IWGRP : 0)
- | ((!(*anti & S_IWUSR)) ? S_IWUSR : 0);
- if (ace->Mask & FILE_EXECUTE)
- {
- *flags |= S_IXOTH
- | ((!(*anti & S_IXGRP)) ? S_IXGRP : 0)
- | ((!(*anti & S_IXUSR)) ? S_IXUSR : 0);
- /* Sticky bit for directories according to linux rules. */
- if (! (ace->Mask & FILE_DELETE_CHILD)
- && S_ISDIR(*attribute)
- && !(*anti & S_ISVTX))
- *flags |= S_ISVTX;
- }
- }
- }
- *attribute &= ~(S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX);
- *attribute |= allow;
- *attribute &= ~deny;
- syscall_printf ("file: %s %x, uid %d, gid %d", file, *attribute, uid, gid);
- return 0;
-}
-
-int
-get_file_attribute (int use_ntsec, const char *file,
- int *attribute, uid_t *uidret, gid_t *gidret)
-{
- if (use_ntsec && allow_ntsec)
- return get_nt_attribute (file, attribute, uidret, gidret);
-
- if (uidret)
- *uidret = getuid ();
- if (gidret)
- *gidret = getgid ();
-
- if (! attribute)
- return 0;
-
- int res = NTReadEA (file, ".UNIXATTR",
- (char *) attribute, sizeof (*attribute));
-
- /* symlinks are everything for everyone! */
- if ((*attribute & S_IFLNK) == S_IFLNK)
- *attribute |= S_IRWXU | S_IRWXG | S_IRWXO;
-
- if (res <= 0)
- set_errno (ENOSYS);
- return res > 0 ? 0 : -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 (GetAce(acl, offset, (PVOID *) &ace))
- ace->Header.AceFlags |= inherit;
- len_add += sizeof (ACCESS_DENIED_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 (GetAce(acl, offset, (PVOID *) &ace))
- ace->Header.AceFlags |= inherit;
- len_add += sizeof (ACCESS_DENIED_ACE) - sizeof (DWORD)
- + GetLengthSid (sid);
- return TRUE;
-}
-
-PSECURITY_DESCRIPTOR
-alloc_sd (uid_t uid, gid_t gid, const char *logsrv, int attribute,
- PSECURITY_DESCRIPTOR sd_ret, DWORD *sd_size_ret)
-{
- BOOL dummy;
-
- if (os_being_run != winNT)
- return NULL;
-
- if (! sd_ret || ! sd_size_ret)
- {
- set_errno (EINVAL);
- return NULL;
- }
-
- /* Get SID and name of new owner. */
- char owner[MAX_USER_NAME];
- char *owner_sid_buf[MAX_SID_LEN];
- PSID owner_sid = NULL;
- struct passwd *pw = getpwuid (uid);
- strcpy (owner, pw ? pw->pw_name : getlogin ());
- owner_sid = (PSID) owner_sid_buf;
- if ((! pw || ! get_pw_sid (owner_sid, pw))
- && ! lookup_name (owner, logsrv, owner_sid))
- return NULL;
- debug_printf ("owner: %s [%d]", owner,
- *GetSidSubAuthority((PSID) owner_sid,
- *GetSidSubAuthorityCount((PSID) owner_sid) - 1));
-
- /* Get SID and name of new group. */
- char *group_sid_buf[MAX_SID_LEN];
- PSID group_sid = NULL;
- struct group *grp = getgrgid (gid);
- if (grp)
- {
- group_sid = (PSID) group_sid_buf;
- if ((! grp || ! get_gr_sid (group_sid, grp))
- && ! lookup_name (grp->gr_name, logsrv, group_sid))
- return NULL;
- }
- else
- debug_printf ("no group");
-
- /* Initialize local security descriptor. */
- SECURITY_DESCRIPTOR sd;
- PSECURITY_DESCRIPTOR psd = NULL;
- if (! InitializeSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION))
- {
- __seterrno ();
- return NULL;
- }
-
- /* Create owner for local security descriptor. */
- if (! SetSecurityDescriptorOwner(&sd, owner_sid, FALSE))
- {
- __seterrno ();
- return NULL;
- }
-
- /* Create group for local security descriptor. */
- if (group_sid && ! SetSecurityDescriptorGroup(&sd, group_sid, FALSE))
- {
- __seterrno ();
- return NULL;
- }
-
- /* Initialize local access control list. */
- char acl_buf[3072];
- PACL acl = (PACL) acl_buf;
- if (! InitializeAcl (acl, 3072, ACL_REVISION))
- {
- __seterrno ();
- return NULL;
- }
-
- /*
- * VTX bit may only be set if executable for `other' is set.
- * For correct handling under WinNT, FILE_DELETE_CHILD has to
- * be (un)set in each ACE.
- */
- if (! (attribute & S_IXOTH))
- attribute &= ~S_ISVTX;
- if (! (attribute & S_IFDIR))
- attribute |= S_ISVTX;
-
- /* From here fill ACL. */
- size_t acl_len = sizeof (ACL);
- int ace_off = 0;
-
- /* Construct allow attribute for owner. */
- DWORD owner_allow = (STANDARD_RIGHTS_ALL & ~DELETE)
- | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA;
- if (attribute & S_IRUSR)
- owner_allow |= FILE_GENERIC_READ;
- if (attribute & S_IWUSR)
- owner_allow |= FILE_GENERIC_WRITE | DELETE;
- if (attribute & S_IXUSR)
- owner_allow |= FILE_GENERIC_EXECUTE;
- if (! (attribute & S_ISVTX))
- owner_allow |= FILE_DELETE_CHILD;
-
- /* Construct allow attribute for group. */
- DWORD group_allow = STANDARD_RIGHTS_READ
- | FILE_READ_ATTRIBUTES | FILE_READ_EA;
- if (attribute & S_IRGRP)
- group_allow |= FILE_GENERIC_READ;
- if (attribute & S_IWGRP)
- group_allow |= STANDARD_RIGHTS_WRITE | FILE_GENERIC_WRITE | DELETE;
- if (attribute & S_IXGRP)
- group_allow |= FILE_GENERIC_EXECUTE;
- if (! (attribute & S_ISVTX))
- group_allow |= FILE_DELETE_CHILD;
-
- /* Construct allow attribute for everyone. */
- DWORD other_allow = STANDARD_RIGHTS_READ
- | FILE_READ_ATTRIBUTES | FILE_READ_EA;
- if (attribute & S_IROTH)
- other_allow |= FILE_GENERIC_READ;
- if (attribute & S_IWOTH)
- other_allow |= STANDARD_RIGHTS_WRITE | FILE_GENERIC_WRITE | DELETE;
- if (attribute & S_IXOTH)
- other_allow |= FILE_GENERIC_EXECUTE;
- if (! (attribute & S_ISVTX))
- other_allow |= FILE_DELETE_CHILD;
-
- /* Construct deny attributes for owner and group. */
- DWORD owner_deny = 0;
- if (is_grp_member (uid, gid))
- owner_deny = ~owner_allow & (group_allow | other_allow);
- else
- owner_deny = ~owner_allow & other_allow;
- owner_deny &= ~(STANDARD_RIGHTS_READ
- | FILE_READ_ATTRIBUTES | FILE_READ_EA
- | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA);
- DWORD group_deny = ~group_allow & other_allow;
- group_deny &= ~(STANDARD_RIGHTS_READ | FILE_READ_ATTRIBUTES | FILE_READ_EA);
-
- /* Construct appropriate inherit attribute. */
- DWORD inherit = (attribute & S_IFDIR) ? INHERIT_ALL : DONT_INHERIT;
-
- /* Set deny ACE for owner. */
- if (owner_deny
- && ! add_access_denied_ace (acl, ace_off++, owner_deny,
- owner_sid, acl_len, inherit))
- return NULL;
- /* Set allow ACE for owner. */
- if (! add_access_allowed_ace (acl, ace_off++, owner_allow,
- owner_sid, acl_len, inherit))
- return NULL;
- /* Set deny ACE for group. */
- if (group_deny
- && ! add_access_denied_ace (acl, ace_off++, group_deny,
- group_sid, acl_len, inherit))
- return NULL;
- /* Set allow ACE for group. */
- if (! add_access_allowed_ace (acl, ace_off++, group_allow,
- group_sid, acl_len, inherit))
- return NULL;
-
- /* 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");
-
- /* Fill ACL with unrelated ACEs from current security descriptor. */
- PACL oacl;
- BOOL acl_exists;
- 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))
- {
- PSID ace_sid = (PSID) &ace->SidStart;
- /* Check for related ACEs. */
- if ((cur_owner_sid && EqualSid (ace_sid, cur_owner_sid))
- || (owner_sid && EqualSid (ace_sid, owner_sid))
- || (cur_group_sid && EqualSid (ace_sid, cur_group_sid))
- || (group_sid && EqualSid (ace_sid, group_sid))
- || (EqualSid (ace_sid, get_world_sid ())))
- continue;
- /*
- * Add unrelated ACCESS_DENIED_ACE to the beginning but
- * behind the owner_deny, ACCESS_ALLOWED_ACE to the end
- * but in front of the `everyone' ACE.
- */
- 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;
- ++ace_off;
- }
-
- /* Set allow ACE for everyone. */
- if (! add_access_allowed_ace (acl, ace_off++, other_allow,
- get_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. */
- *sd_size_ret = 0;
- MakeSelfRelativeSD (&sd, sd_ret, sd_size_ret);
- if (*sd_size_ret <= 0)
- {
- __seterrno ();
- return NULL;
- }
- if (! MakeSelfRelativeSD (&sd, sd_ret, sd_size_ret))
- {
- __seterrno ();
- return NULL;
- }
- psd = sd_ret;
- debug_printf ("Created SD-Size: %d", *sd_size_ret);
-
- return psd;
-}
-
-static int
-set_nt_attribute (const char *file, uid_t uid, gid_t gid,
- const char *logsrv, int attribute)
-{
- if (os_being_run != winNT)
- return 0;
-
- DWORD sd_size = 4096;
- char sd_buf[4096];
- PSECURITY_DESCRIPTOR psd = (PSECURITY_DESCRIPTOR) sd_buf;
-
- int ret;
- if ((ret = read_sd (file, psd, &sd_size)) <= 0)
- {
- debug_printf ("read_sd %E");
- return ret;
- }
-
- sd_size = 4096;
- if (! (psd = alloc_sd (uid, gid, logsrv, attribute, psd, &sd_size)))
- return -1;
-
- return write_sd (file, psd, sd_size);
-}
-
-int
-set_file_attribute (int use_ntsec, const char *file,
- uid_t uid, gid_t gid,
- int attribute, const char *logsrv)
-{
- /* symlinks are anything for everyone! */
- if ((attribute & S_IFLNK) == S_IFLNK)
- attribute |= S_IRWXU | S_IRWXG | S_IRWXO;
-
- if (!use_ntsec || !allow_ntsec)
- {
- if (! NTWriteEA (file, ".UNIXATTR",
- (char *) &attribute, sizeof (attribute)))
- {
- __seterrno ();
- return -1;
- }
- return 0;
- }
-
- int ret = set_nt_attribute (file, uid, gid, logsrv, attribute);
- syscall_printf ("%d = set_file_attribute (%s, %d, %d, %p)",
- ret, file, uid, gid, attribute);
- return ret;
-}
-
-int
-set_file_attribute (int use_ntsec, const char *file, int attribute)
-{
- return set_file_attribute (use_ntsec, file,
- myself->uid, myself->gid,
- attribute, cygheap->user.logsrv ());
-}
-
-static int
-searchace (aclent_t *aclp, int nentries, int type, int id = -1)
-{
- 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;
-}
-
-static int
-setacl (const char *file, int nentries, aclent_t *aclbufp)
-{
- DWORD sd_size = 4096;
- char sd_buf[4096];
- PSECURITY_DESCRIPTOR psd = (PSECURITY_DESCRIPTOR) sd_buf;
-
- if (read_sd (file, psd, &sd_size) <= 0)
- {
- debug_printf ("read_sd %E");
- return -1;
- }
-
- BOOL dummy;
-
- /* Get owner SID. */
- PSID owner_sid = NULL;
- if (! GetSecurityDescriptorOwner (psd, &owner_sid, &dummy))
- {
- __seterrno ();
- return -1;
- }
- char owner_buf[MAX_SID_LEN];
- if (!CopySid (MAX_SID_LEN, (PSID) owner_buf, owner_sid))
- {
- __seterrno ();
- return -1;
- }
- owner_sid = (PSID) owner_buf;
-
- /* Get group SID. */
- PSID group_sid = NULL;
- if (! GetSecurityDescriptorGroup (psd, &group_sid, &dummy))
- {
- __seterrno ();
- return -1;
- }
- char group_buf[MAX_SID_LEN];
- if (!CopySid (MAX_SID_LEN, (PSID) group_buf, group_sid))
- {
- __seterrno ();
- return -1;
- }
- group_sid = (PSID) group_buf;
-
- /* Initialize local security descriptor. */
- SECURITY_DESCRIPTOR sd;
- if (! InitializeSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION))
- {
- __seterrno ();
- return -1;
- }
- if (! SetSecurityDescriptorOwner(&sd, owner_sid, FALSE))
- {
- __seterrno ();
- return -1;
- }
- if (group_sid
- && ! SetSecurityDescriptorGroup(&sd, group_sid, FALSE))
- {
- __seterrno ();
- return -1;
- }
-
- /* Fill access control list. */
- char acl_buf[3072];
- PACL acl = (PACL) acl_buf;
- size_t acl_len = sizeof (ACL);
- int ace_off = 0;
-
- char sidbuf[MAX_SID_LEN];
- PSID sid = (PSID) sidbuf;
- struct passwd *pw;
- struct group *gr;
- int pos;
-
- if (! InitializeAcl (acl, 3072, ACL_REVISION))
- {
- __seterrno ();
- return -1;
- }
- for (int i = 0; i < nentries; ++i)
- {
- DWORD allow = STANDARD_RIGHTS_READ
- | FILE_READ_ATTRIBUTES | FILE_READ_EA;
- if (aclbufp[i].a_perm & S_IROTH)
- allow |= FILE_GENERIC_READ;
- if (aclbufp[i].a_perm & S_IWOTH)
- allow |= STANDARD_RIGHTS_ALL | FILE_GENERIC_WRITE
- | DELETE | FILE_DELETE_CHILD;
- if (aclbufp[i].a_perm & S_IXOTH)
- allow |= FILE_GENERIC_EXECUTE;
- /* Set inherit property. */
- DWORD inheritance = (aclbufp[i].a_type & ACL_DEFAULT)
- ? INHERIT_ONLY : DONT_INHERIT;
- /*
- * 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)
- && (pos = searchace (aclbufp, nentries,
- aclbufp[i].a_type | ACL_DEFAULT,
- (aclbufp[i].a_type & (USER|GROUP))
- ? aclbufp[i].a_id : -1)) >= 0
- && pos < nentries
- && aclbufp[i].a_perm == aclbufp[pos].a_perm)
- {
- inheritance = INHERIT_ALL;
- /* This eliminates the corresponding default entry. */
- aclbufp[pos].a_type = 0;
- }
- switch (aclbufp[i].a_type)
- {
- case USER_OBJ:
- case DEF_USER_OBJ:
- allow |= STANDARD_RIGHTS_ALL & ~DELETE;
- if (! add_access_allowed_ace (acl, ace_off++, allow,
- owner_sid, acl_len, inheritance))
- return -1;
- break;
- case USER:
- case DEF_USER:
- if (!(pw = getpwuid (aclbufp[i].a_id))
- || ! get_pw_sid (sid, pw)
- || ! add_access_allowed_ace (acl, ace_off++, allow,
- sid, acl_len, inheritance))
- return -1;
- break;
- case GROUP_OBJ:
- case DEF_GROUP_OBJ:
- if (! add_access_allowed_ace (acl, ace_off++, allow,
- group_sid, acl_len, inheritance))
- return -1;
- break;
- case GROUP:
- case DEF_GROUP:
- if (!(gr = getgrgid (aclbufp[i].a_id))
- || ! get_gr_sid (sid, gr)
- || ! 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,
- get_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 psd. */
- sd_size = 0;
- MakeSelfRelativeSD (&sd, psd, &sd_size);
- if (sd_size <= 0)
- {
- __seterrno ();
- return -1;
- }
- if (! MakeSelfRelativeSD (&sd, psd, &sd_size))
- {
- __seterrno ();
- return -1;
- }
- debug_printf ("Created SD-Size: %d", sd_size);
- return write_sd (file, psd, sd_size);
-}
-
-static void
-getace (aclent_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_DATA)
- if (win_ace_type == ACCESS_ALLOWED_ACE_TYPE)
- acl.a_perm |= (acl.a_perm & S_IRGRP) ? 0 : S_IRUSR;
- else if (win_ace_type == ACCESS_DENIED_ACE_TYPE)
- acl.a_perm &= ~S_IRGRP;
-
- if (win_ace_mask & FILE_WRITE_DATA)
- if (win_ace_type == ACCESS_ALLOWED_ACE_TYPE)
- acl.a_perm |= (acl.a_perm & S_IWGRP) ? 0 : S_IWUSR;
- else if (win_ace_type == ACCESS_DENIED_ACE_TYPE)
- acl.a_perm &= ~S_IWGRP;
-
- if (win_ace_mask & FILE_EXECUTE)
- if (win_ace_type == ACCESS_ALLOWED_ACE_TYPE)
- acl.a_perm |= (acl.a_perm & S_IXGRP) ? 0 : S_IXUSR;
- else if (win_ace_type == ACCESS_DENIED_ACE_TYPE)
- acl.a_perm &= ~S_IXGRP;
-}
-
-static int
-getacl (const char *file, DWORD attr, int nentries, aclent_t *aclbufp)
-{
- DWORD sd_size = 4096;
- char sd_buf[4096];
- PSECURITY_DESCRIPTOR psd = (PSECURITY_DESCRIPTOR) sd_buf;
-
- int ret;
- if ((ret = read_sd (file, psd, &sd_size)) <= 0)
- {
- debug_printf ("read_sd %E");
- return ret;
- }
-
- PSID owner_sid;
- PSID group_sid;
- BOOL dummy;
- uid_t uid;
- gid_t gid;
-
- if (! GetSecurityDescriptorOwner (psd, &owner_sid, &dummy))
- {
- debug_printf ("GetSecurityDescriptorOwner %E");
- __seterrno ();
- return -1;
- }
- uid = get_uid_from_sid (owner_sid);
-
- if (! GetSecurityDescriptorGroup (psd, &group_sid, &dummy))
- {
- debug_printf ("GetSecurityDescriptorGroup %E");
- __seterrno ();
- return -1;
- }
- gid = get_gid_from_sid (group_sid);
-
- aclent_t lacl[MAX_ACL_ENTRIES];
- memset (&lacl, 0, MAX_ACL_ENTRIES * sizeof (aclent_t));
- lacl[0].a_type = USER_OBJ;
- lacl[0].a_id = uid;
- lacl[1].a_type = GROUP_OBJ;
- lacl[1].a_id = gid;
- lacl[2].a_type = OTHER_OBJ;
-
- PACL acl;
- BOOL acl_exists;
-
- if (! GetSecurityDescriptorDacl (psd, &acl_exists, &acl, &dummy))
- {
- __seterrno ();
- debug_printf ("GetSecurityDescriptorDacl %E");
- return -1;
- }
-
- int pos, i;
-
- if (! acl_exists || ! acl)
- {
- for (pos = 0; pos < MIN_ACL_ENTRIES; ++pos)
- lacl[pos].a_perm = S_IRWXU | S_IRWXG | S_IRWXO;
- pos = nentries < MIN_ACL_ENTRIES ? nentries : MIN_ACL_ENTRIES;
- memcpy (aclbufp, lacl, pos * sizeof (aclent_t));
- return pos;
- }
-
- for (i = 0; i < acl->AceCount && (!nentries || i < nentries); ++i)
- {
- ACCESS_ALLOWED_ACE *ace;
-
- if (!GetAce (acl, i, (PVOID *) &ace))
- continue;
-
- PSID ace_sid = (PSID) &ace->SidStart;
- int id;
- int type = 0;
-
- if (EqualSid (ace_sid, owner_sid))
- {
- type = USER_OBJ;
- id = uid;
- }
- else if (EqualSid (ace_sid, group_sid))
- {
- type = GROUP_OBJ;
- id = gid;
- }
- else if (EqualSid (ace_sid, get_world_sid ()))
- {
- type = OTHER_OBJ;
- id = 0;
- }
- else
- {
- id = get_id_from_sid (ace_sid, FALSE, &type);
- if (type != GROUP)
- {
- int type2 = 0;
- int id2 = get_id_from_sid (ace_sid, TRUE, &type2);
- if (type2 == GROUP)
- {
- id = id2;
- type = GROUP;
- }
- }
- }
- if (!type)
- continue;
- if (!(ace->Header.AceFlags & INHERIT_ONLY_ACE))
- {
- if ((pos = searchace (lacl, MAX_ACL_ENTRIES, type, id)) >= 0)
- getace (lacl[pos], type, id, ace->Mask, ace->Header.AceType);
- }
- if ((ace->Header.AceFlags & INHERIT_ALL)
- && (attr & FILE_ATTRIBUTE_DIRECTORY))
- {
- type |= ACL_DEFAULT;
- if ((pos = searchace (lacl, MAX_ACL_ENTRIES, type, id)) >= 0)
- getace (lacl[pos], type, id, ace->Mask, ace->Header.AceType);
- }
- }
- if ((pos = searchace (lacl, MAX_ACL_ENTRIES, 0)) < 0)
- pos = MAX_ACL_ENTRIES;
- for (i = 0; i < pos; ++i)
- {
- lacl[i].a_perm = (lacl[i].a_perm & S_IRWXU)
- & ~((lacl[i].a_perm & S_IRWXG) << 3);
- lacl[i].a_perm |= (lacl[i].a_perm & S_IRWXU) >> 3
- | (lacl[i].a_perm & S_IRWXU) >> 6;
- }
- if ((searchace (lacl, MAX_ACL_ENTRIES, USER) >= 0
- || searchace (lacl, MAX_ACL_ENTRIES, GROUP) >= 0)
- && (pos = searchace (lacl, MAX_ACL_ENTRIES, CLASS_OBJ)) >= 0)
- {
- lacl[pos].a_type = CLASS_OBJ;
- lacl[pos].a_perm =
- lacl[searchace (lacl, MAX_ACL_ENTRIES, GROUP_OBJ)].a_perm;
- }
- int dgpos;
- if ((searchace (lacl, MAX_ACL_ENTRIES, DEF_USER) >= 0
- || searchace (lacl, MAX_ACL_ENTRIES, DEF_GROUP) >= 0)
- && (dgpos = searchace (lacl, MAX_ACL_ENTRIES, DEF_GROUP_OBJ)) >= 0
- && (pos = searchace (lacl, MAX_ACL_ENTRIES, DEF_CLASS_OBJ)) >= 0
- && (attr & FILE_ATTRIBUTE_DIRECTORY))
- {
- lacl[pos].a_type = DEF_CLASS_OBJ;
- lacl[pos].a_perm = lacl[dgpos].a_perm;
- }
- if ((pos = searchace (lacl, MAX_ACL_ENTRIES, 0)) < 0)
- pos = MAX_ACL_ENTRIES;
- if (pos > nentries)
- pos = nentries;
- if (aclbufp)
- memcpy (aclbufp, lacl, pos * sizeof (aclent_t));
- aclsort (pos, 0, aclbufp);
- syscall_printf ("%d = getacl (%s)", pos, file);
- return pos;
-}
-
-int
-acl_access (const char *path, int flags)
-{
- aclent_t acls[MAX_ACL_ENTRIES];
- int cnt;
-
- if ((cnt = acl (path, GETACL, MAX_ACL_ENTRIES, acls)) < 1)
- return -1;
-
- /* Only check existance. */
- if (!(flags & (R_OK|W_OK|X_OK)))
- return 0;
-
- for (int i = 0; i < cnt; ++i)
- {
- switch (acls[i].a_type)
- {
- case USER_OBJ:
- case USER:
- if (acls[i].a_id != myself->uid)
- {
- /*
- * Check if user is a NT group:
- * Take SID from passwd, search SID in group, check is_grp_member.
- */
- char owner_sidbuf[MAX_SID_LEN];
- PSID owner_sid = (PSID) owner_sidbuf;
- char group_sidbuf[MAX_SID_LEN];
- PSID group_sid = (PSID) group_sidbuf;
- struct passwd *pw;
- struct group *gr = NULL;
-
- if (group_sem > 0)
- continue;
- ++group_sem;
- if ((pw = getpwuid (acls[i].a_id)) != NULL
- && get_pw_sid (owner_sid, pw))
- {
- while ((gr = getgrent ()))
- if (get_gr_sid (group_sid, gr)
- && EqualSid (owner_sid, group_sid)
- && is_grp_member (myself->uid, gr->gr_gid))
- break;
- endgrent ();
- }
- --group_sem;
- if (! gr)
- continue;
- }
- break;
- case GROUP_OBJ:
- case GROUP:
- if (acls[i].a_id != myself->gid &&
- !is_grp_member (myself->uid, acls[i].a_id))
- continue;
- break;
- case OTHER_OBJ:
- break;
- default:
- continue;
- }
- if ((!(flags & R_OK) || (acls[i].a_perm & S_IREAD))
- && (!(flags & W_OK) || (acls[i].a_perm & S_IWRITE))
- && (!(flags & X_OK) || (acls[i].a_perm & S_IEXEC)))
- return 0;
- }
- set_errno (EACCES);
- return -1;
-}
-
-static
-int
-acl_worker (const char *path, int cmd, int nentries, aclent_t *aclbufp,
- int nofollow)
-{
- extern suffix_info stat_suffixes[];
- path_conv real_path (path, (nofollow ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW) | PC_FULL, stat_suffixes);
- if (real_path.error)
- {
- set_errno (real_path.error);
- syscall_printf ("-1 = acl (%s)", path);
- return -1;
- }
- if (!real_path.has_acls ())
- {
- struct stat st;
- int ret = -1;
-
- switch (cmd)
- {
- case SETACL:
- set_errno (ENOSYS);
- break;
- case GETACL:
- if (nentries < 1)
- set_errno (EINVAL);
- else if ((nofollow && ! lstat (path, &st))
- || (!nofollow && ! stat (path, &st)))
- {
- aclent_t lacl[4];
- if (nentries > 0)
- {
- lacl[0].a_type = USER_OBJ;
- lacl[0].a_id = st.st_uid;
- lacl[0].a_perm = (st.st_mode & S_IRWXU)
- | (st.st_mode & S_IRWXU) >> 3
- | (st.st_mode & S_IRWXU) >> 6;
- }
- if (nentries > 1)
- {
- lacl[1].a_type = GROUP_OBJ;
- lacl[1].a_id = st.st_gid;
- lacl[1].a_perm = (st.st_mode & S_IRWXG)
- | (st.st_mode & S_IRWXG) << 3
- | (st.st_mode & S_IRWXG) >> 3;
- }
- if (nentries > 2)
- {
- lacl[2].a_type = OTHER_OBJ;
- lacl[2].a_id = 0;
- lacl[2].a_perm = (st.st_mode & S_IRWXO)
- | (st.st_mode & S_IRWXO) << 6
- | (st.st_mode & S_IRWXO) << 3;
- }
- if (nentries > 3)
- {
- lacl[3].a_type = CLASS_OBJ;
- lacl[3].a_id = 0;
- lacl[3].a_perm = (st.st_mode & S_IRWXG)
- | (st.st_mode & S_IRWXG) << 3
- | (st.st_mode & S_IRWXG) >> 3;
- }
- if (nentries > 4)
- nentries = 4;
- if (aclbufp)
- memcpy (aclbufp, lacl, nentries * sizeof (aclent_t));
- ret = nentries;
- }
- break;
- case GETACLCNT:
- ret = 4;
- break;
- }
- syscall_printf ("%d = acl (%s)", ret, path);
- return ret;
- }
- switch (cmd)
- {
- case SETACL:
- if (!aclsort(nentries, 0, aclbufp))
- return setacl (real_path.get_win32 (),
- nentries, aclbufp);
- break;
- case GETACL:
- if (nentries < 1)
- break;
- return getacl (real_path.get_win32 (),
- real_path.file_attributes (),
- nentries, aclbufp);
- case GETACLCNT:
- return getacl (real_path.get_win32 (),
- real_path.file_attributes (),
- 0, NULL);
- default:
- break;
- }
- set_errno (EINVAL);
- syscall_printf ("-1 = acl (%s)", path);
- return -1;
-}
-
-extern "C"
-int
-acl (const char *path, int cmd, int nentries, aclent_t *aclbufp)
-{
- return acl_worker (path, cmd, nentries, aclbufp, 0);
-}
-
-extern "C"
-int
-lacl (const char *path, int cmd, int nentries, aclent_t *aclbufp)
-{
- return acl_worker (path, cmd, nentries, aclbufp, 1);
-}
-
-extern "C"
-int
-facl (int fd, int cmd, int nentries, aclent_t *aclbufp)
-{
- if (fdtab.not_open (fd))
- {
- syscall_printf ("-1 = facl (%d)", fd);
- set_errno (EBADF);
- return -1;
- }
- const char *path = fdtab[fd]->get_name ();
- if (path == NULL)
- {
- syscall_printf ("-1 = facl (%d) (no name)", fd);
- set_errno (ENOSYS);
- return -1;
- }
- syscall_printf ("facl (%d): calling acl (%s)", fd, path);
- return acl_worker (path, cmd, nentries, aclbufp, 0);
-}
-
-extern "C"
-int
-aclcheck (aclent_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;
-}
-
-extern "C"
-int acecmp (const void *a1, const void *a2)
-{
-#define ace(i) ((const aclent_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
-aclsort (int nentries, int, aclent_t *aclbufp)
-{
- if (aclcheck (aclbufp, nentries, NULL))
- return -1;
- if (!aclbufp || nentries < 1)
- {
- set_errno (EINVAL);
- return -1;
- }
- qsort((void *) aclbufp, nentries, sizeof (aclent_t), acecmp);
- return 0;
-}
-
-extern "C"
-int
-acltomode (aclent_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)
- {
- set_errno (EINVAL);
- return -1;
- }
- *modep |= aclbufp[pos].a_perm & S_IRWXU;
- if ((pos = searchace (aclbufp, nentries, GROUP_OBJ)) < 0)
- {
- set_errno (EINVAL);
- return -1;
- }
- if (searchace (aclbufp, nentries, CLASS_OBJ) < 0)
- pos = searchace (aclbufp, nentries, CLASS_OBJ);
- *modep |= (aclbufp[pos].a_perm & S_IRWXU) >> 3;
- if ((pos = searchace (aclbufp, nentries, OTHER_OBJ)) < 0)
- {
- set_errno (EINVAL);
- return -1;
- }
- *modep |= (aclbufp[pos].a_perm & S_IRWXU) >> 6;
- return 0;
-}
-
-extern "C"
-int
-aclfrommode(aclent_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)
- {
- set_errno (EINVAL);
- return -1;
- }
- aclbufp[pos].a_perm = (*modep & S_IRWXU)
- | (*modep & S_IRWXU) >> 3
- | (*modep & S_IRWXU) >> 6;
- if ((pos = searchace (aclbufp, nentries, GROUP_OBJ)) < 0)
- {
- set_errno (EINVAL);
- return -1;
- }
- if (searchace (aclbufp, nentries, CLASS_OBJ) < 0)
- pos = searchace (aclbufp, nentries, CLASS_OBJ);
- aclbufp[pos].a_perm = (*modep & S_IRWXG)
- | (*modep & S_IRWXG) << 3
- | (*modep & S_IRWXG) >> 3;
- if ((pos = searchace (aclbufp, nentries, OTHER_OBJ)) < 0)
- {
- set_errno (EINVAL);
- return -1;
- }
- aclbufp[pos].a_perm = (*modep & S_IRWXO)
- | (*modep & S_IRWXO) << 6
- | (*modep & S_IRWXO) << 3;
- return 0;
-}
-
-extern "C"
-int
-acltopbits (aclent_t *aclbufp, int nentries, mode_t *pbitsp)
-{
- return acltomode (aclbufp, nentries, pbitsp);
-}
-
-extern "C"
-int
-aclfrompbits (aclent_t *aclbufp, int nentries, mode_t *pbitsp)
-{
- return aclfrommode (aclbufp, nentries, pbitsp);
-}
-
-static char *
-permtostr (mode_t perm)
-{
- static char pbuf[4];
-
- pbuf[0] = (perm & S_IREAD) ? 'r' : '-';
- pbuf[1] = (perm & S_IWRITE) ? 'w' : '-';
- pbuf[2] = (perm & S_IEXEC) ? 'x' : '-';
- pbuf[3] = '\0';
- return pbuf;
-}
-
-extern "C"
-char *
-acltotext (aclent_t *aclbufp, int aclcnt)
-{
- if (!aclbufp || aclcnt < 1 || aclcnt > MAX_ACL_ENTRIES
- || aclcheck (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)
- {
- 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_IRUSR | S_IRGRP | S_IROTH;
- else if (perm[0] != '-')
- return 01000;
- if (perm[1] == 'w')
- mode |= S_IWUSR | S_IWGRP | S_IWOTH;
- else if (perm[1] != '-')
- return 01000;
- if (perm[2] == 'x')
- mode |= S_IXUSR | S_IXGRP | S_IXOTH;
- else if (perm[2] != '-')
- return 01000;
- return mode;
-}
-
-extern "C"
-aclent_t *
-aclfromtext (char *acltextp, int *)
-{
- if (!acltextp)
- {
- set_errno (EINVAL);
- return NULL;
- }
- char buf[strlen (acltextp) + 1];
- aclent_t lacl[MAX_ACL_ENTRIES];
- memset (lacl, 0, sizeof lacl);
- int pos = 0;
- for (char *c = strtok (buf, ","); c; c = strtok (NULL, ","))
- {
- 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 = getpwnam (c);
- if (!pw)
- {
- set_errno (EINVAL);
- return NULL;
- }
- lacl[pos].a_id = pw->pw_uid;
- c = strchr (c, ':');
- }
- else if (isdigit (*c))
- lacl[pos].a_id = strtol (c, &c, 10);
- if (!c || *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 group *gr = getgrnam (c);
- if (!gr)
- {
- set_errno (EINVAL);
- return NULL;
- }
- lacl[pos].a_id = gr->gr_gid;
- c = strchr (c, ':');
- }
- else if (isdigit (*c))
- lacl[pos].a_id = strtol (c, &c, 10);
- if (!c || *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;
- }
- aclent_t *aclp = (aclent_t *) malloc (pos * sizeof (aclent_t));
- if (aclp)
- memcpy (aclp, lacl, pos * sizeof (aclent_t));
- return aclp;
-}
-
diff --git a/winsup/cygwin/security.h b/winsup/cygwin/security.h
deleted file mode 100644
index b6397fe10..000000000
--- a/winsup/cygwin/security.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* security.h: security declarations
-
- 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. */
-
-/* File manipulation */
-int __stdcall set_process_privileges ();
-int __stdcall get_file_attribute (int, const char *, int *,
- uid_t * = NULL, gid_t * = NULL);
-int __stdcall set_file_attribute (int, const char *, int);
-int __stdcall set_file_attribute (int, const char *, uid_t, gid_t, int, const char *);
-extern BOOL allow_ntsec;
-
-/* `lookup_name' should be called instead of LookupAccountName.
- * logsrv may be NULL, in this case only the local system is used for lookup.
- * The buffer for ret_sid (40 Bytes) has to be allocated by the caller! */
-BOOL __stdcall lookup_name (const char *, const char *, PSID);
-char *__stdcall convert_sid_to_string_sid (PSID, char *);
-PSID __stdcall convert_string_sid_to_sid (PSID, const char *);
-BOOL __stdcall get_pw_sid (PSID, struct passwd *);
-
-/* Retrieve a security descriptor that allows all access */
-SECURITY_DESCRIPTOR *__stdcall get_null_sd (void);
-
-int __stdcall get_id_from_sid (PSID, BOOL);
-extern inline int get_uid_from_sid (PSID psid) { return get_id_from_sid (psid, FALSE);}
-extern inline int get_gid_from_sid (PSID psid) { return get_id_from_sid (psid, TRUE); }
-
-/* 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 sid2 = NULL, BOOL inherit = TRUE);
-extern SECURITY_ATTRIBUTES *__stdcall sec_user_nih (PVOID sa_buf, PSID sid2 = NULL);
-
-int __stdcall NTReadEA (const char *file, const char *attrname, char *buf, int len);
-BOOL __stdcall NTWriteEA (const char *file, const char *attrname, char *buf, int len);
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
deleted file mode 100644
index 83312714b..000000000
--- a/winsup/cygwin/select.cc
+++ /dev/null
@@ -1,1428 +0,0 @@
-/* select.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000 Red Hat, Inc.
-
- Written by Christopher Faylor of Cygnus Solutions
- 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. */
-
-/*
- * The following line means that the BSD socket
- * definitions for fd_set, FD_ISSET etc. are used in this
- * file.
- */
-
-#define __INSIDE_CYGWIN_NET__
-#define Win32_Winsock
-
-#include "winsup.h"
-#include <errno.h>
-#include <sys/socket.h>
-#include <stdlib.h>
-#include <sys/time.h>
-
-#include <wingdi.h>
-#include <winuser.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <winsock.h>
-#include "select.h"
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "perthread.h"
-#include "tty.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));
-
-/* Make a fhandler_foo::ready_for_ready method.
- Assumption: The "ready_for_read" methods are called with one level of
- signal blocking. */
-#define MAKEready(what) \
-int \
-fhandler_##what::ready_for_read (int fd, DWORD howlong, int ignra) \
-{ \
- select_record me (this); \
- me.fd = fd; \
- (void) select_read (&me); \
- while (!peek_##what (&me, ignra) && howlong == INFINITE) \
- if (fd >= 0 && fdtab.not_open (fd)) \
- break; \
- else if (WaitForSingleObject (signal_arrived, 10) == WAIT_OBJECT_0) \
- break; \
- return me.read_ready; \
-}
-
-#define set_handle_or_return_if_not_open(h, s) \
- h = (s)->fh->get_handle (); \
- if (fdtab.not_open ((s)->fd)) \
- { \
- (s)->saw_error = TRUE; \
- set_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);
- sigframe thisframe (mainthread);
-
-#if 0
- if (n > FD_SETSIZE)
- {
- set_errno (EINVAL);
- return -1;
- }
-#endif
-
- 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);
-
- /* 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;
- }
- return 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);
-
- if (sel.always_ready || ms == 0)
- /* Don't bother waiting. */;
- else if (sel.wait (r, w, e, ms))
- return -1; /* some kind of error */
-
- copyfd_set (readfds, r, maxfds);
- copyfd_set (writefds, w, maxfds);
- copyfd_set (exceptfds, e, maxfds);
- return sel.poll (readfds, writefds, exceptfds);
-}
-
-/* Cleanup */
-select_stuff::~select_stuff ()
-{
- select_record *s = &start;
-
- select_printf ("calling cleanup routines");
- while ((s = s->next))
- if (s->cleanup)
- s->cleanup (s, this);
-
- 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 = fdtab.select_read (i, s)) == NULL)
- return 0; /* error */
- if (UNIX_FD_ISSET (i, writefds) && (s = fdtab.select_write (i, s)) == NULL)
- return 0; /* error */
- if (UNIX_FD_ISSET (i, exceptfds) && (s = 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 || s->windows_handle || s->windows_handle)
- windows_used = TRUE;
-
- s->next = start.next;
- start.next = s;
- return 1;
-}
-
-/* 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->poll (s, readfds, writefds, exceptfds);
- select_printf ("returning %d", n);
- return n;
-}
-
-/* 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;
-
- 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_errno (EINVAL);
- return -1;
- }
- if (!s->startup (s, this))
- {
- __seterrno ();
- 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;
- }
-
- DWORD start_time = GetTickCount (); /* 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");
- __seterrno ();
- return -1;
- case WAIT_TIMEOUT:
- select_printf ("timed out");
- goto out;
- }
-
- select_printf ("woke up. wait_ret %d. verifying", wait_ret);
- s = &start;
- int gotone = FALSE;
- while ((s = s->next))
- if (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");
-
- DWORD now = GetTickCount ();
- 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 0");
- return 0;
-}
-
-static int
-set_bits (select_record *me, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds)
-{
- int ready = 0;
- 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);
- ready++;
- }
- if (me->except_ready && me->except_ready)
- {
- UNIX_FD_SET (me->fd, exceptfds);
- ready++;
- }
- select_printf ("ready %d", ready);
- return ready;
-}
-
-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, int ignra)
-{
- 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 ("already ready");
- gotone = 1;
- goto out;
- }
- if (fh->bg_check (SIGTTIN) <= 0)
- {
- gotone = s->read_ready = 1;
- goto out;
- }
-
- switch (fh->get_device ())
- {
- case FH_PTYM:
- case FH_TTYM:
- if (((fhandler_pty_master *)fh)->need_nl)
- {
- gotone = s->read_ready = 1;
- goto out;
- }
- break;
- default:
- if (!ignra && fh->get_readahead_valid ())
- {
- select_printf ("readahead");
- gotone = s->read_ready = 1;
- goto out;
- }
- }
- }
-
- if (fh->get_device() != FH_PIPEW &&
- !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", fh->get_name ());
- 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;
- select_printf ("saw eof on '%s'", fh->get_name ());
- }
-
-out:
- return gotone || s->write_ready;
-}
-
-static int
-poll_pipe (select_record *me, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds)
-{
- return peek_pipe (me, 0) ?
- set_bits (me, readfds, writefds, exceptfds) :
- 0;
-}
-
-MAKEready(pipe)
-
-static int start_thread_pipe (select_record *me, select_stuff *stuff);
-
-struct pipeinf
- {
- HANDLE thread;
- BOOL stop_thread_pipe;
- select_record *start;
- };
-
-static DWORD WINAPI
-thread_pipe (void *arg)
-{
- pipeinf *pi = (pipeinf *)arg;
- BOOL gotone = FALSE;
-
- for (;;)
- {
- select_record *s = pi->start;
- while ((s = s->next))
- if (s->startup == start_thread_pipe)
- {
- if (peek_pipe (s, 0))
- 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 (10);
- }
-out:
- return 0;
-}
-
-static int
-start_thread_pipe (select_record *me, select_stuff *stuff)
-{
- if (stuff->device_specific[FHDEVN(FH_PIPE)])
- {
- me->h = ((pipeinf *) stuff->device_specific[FHDEVN(FH_PIPE)])->thread;
- return 1;
- }
- pipeinf *pi = new pipeinf;
- pi->start = &stuff->start;
- pi->stop_thread_pipe = FALSE;
- pi->thread = me->h = makethread (thread_pipe, (LPVOID)pi, 0, "select_pipe");
- if (!me->h)
- return 0;
- stuff->device_specific[FHDEVN(FH_PIPE)] = (void *)pi;
- return 1;
-}
-
-static void
-pipe_cleanup (select_record *, select_stuff *stuff)
-{
- pipeinf *pi = (pipeinf *)stuff->device_specific[FHDEVN(FH_PIPE)];
- if (pi && pi->thread)
- {
- pi->stop_thread_pipe = TRUE;
- WaitForSingleObject (pi->thread, INFINITE);
- CloseHandle (pi->thread);
- delete pi;
- stuff->device_specific[FHDEVN(FH_PIPE)] = NULL;
- }
-}
-
-select_record *
-fhandler_pipe::select_read (select_record *s)
-{
- if (!s)
- s = new select_record;
- s->startup = start_thread_pipe;
- s->poll = poll_pipe;
- s->verify = verify_ok;
- s->read_selected = TRUE;
- s->cleanup = pipe_cleanup;
- return s;
-}
-
-select_record *
-fhandler_pipe::select_write (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->poll = poll_pipe;
- s->verify = no_verify;
- }
- s->write_selected = TRUE;
- s->write_ready = TRUE;
- return s;
-}
-
-select_record *
-fhandler_pipe::select_except (select_record *s)
-{
- if (!s)
- s = new select_record;
- s->startup = start_thread_pipe;
- s->poll = poll_pipe;
- s->verify = verify_ok;
- s->cleanup = pipe_cleanup;
- s->except_selected = TRUE;
- return s;
-}
-
-static int
-peek_console (select_record *me, int ignra)
-{
- 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 (!ignra && fh->get_readahead_valid ())
- {
- select_printf ("readahead");
- return me->read_ready = 1;
- }
-
- 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) <= 0)
- return me->read_ready = 1;
- else if (!PeekConsoleInput (h, &irec, 1, &events_read) || !events_read)
- break;
- else
- {
- if (irec.EventType == WINDOW_BUFFER_SIZE_EVENT)
- kill_pgrp (fh->tc->getpgid (), SIGWINCH);
- else if (irec.EventType == KEY_EVENT && irec.Event.KeyEvent.bKeyDown == TRUE &&
- (irec.Event.KeyEvent.uChar.AsciiChar || get_nonascii_key (irec, tmpbuf)))
- return me->read_ready = 1;
-
- /* Read and discard the event */
- ReadConsoleInput (h, &irec, 1, &events_read);
- }
-
- return me->write_ready;
-}
-
-static int
-poll_console (select_record *me, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds)
-{
- return peek_console (me, 0) ?
- set_bits (me, readfds, writefds, exceptfds) :
- 0;
-}
-
-MAKEready (console)
-
-select_record *
-fhandler_console::select_read (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->poll = poll_console;
- s->verify = poll_console;
- set_cursor_maybe ();
- }
-
- s->h = get_handle ();
- s->read_selected = TRUE;
- return s;
-}
-
-select_record *
-fhandler_console::select_write (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->poll = poll_console;
- s->verify = no_verify;
- set_cursor_maybe ();
- }
-
- 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->poll = poll_console;
- s->verify = no_verify;
- set_cursor_maybe ();
- }
-
- s->except_selected = TRUE;
- return s;
-}
-
-int
-fhandler_tty_common::ready_for_read (int fd, DWORD howlong, int ignra)
-{
-#if 0
- if (myself->pgid && get_ttyp ()->getpgid () != myself->pgid &&
- myself->ctty == ttynum) // background process?
- return 1; // Yes. Let read return an error
-#endif
- return ((fhandler_pipe*)this)->fhandler_pipe::ready_for_read (fd, howlong, ignra);
-}
-
-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);
-}
-
-select_record *
-fhandler_dev_null::select_read (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->poll = set_bits;
- s->verify = no_verify;
- }
- s->h = get_handle ();
- s->read_selected = TRUE;
- return s;
-}
-
-select_record *
-fhandler_dev_null::select_write (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->poll = set_bits;
- s->verify = no_verify;
- }
- s->h = get_handle ();
- s->write_selected = TRUE;
- return s;
-}
-
-select_record *
-fhandler_dev_null::select_except (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->poll = set_bits;
- s->verify = no_verify;
- }
- s->h = get_handle ();
- s->except_selected = TRUE;
- s->except_ready = TRUE;
- return s;
-}
-
-static int start_thread_serial (select_record *me, select_stuff *stuff);
-
-struct serialinf
- {
- HANDLE thread;
- BOOL stop_thread_serial;
- select_record *start;
- };
-
-static int
-peek_serial (select_record *s, int)
-{
- DWORD ev;
- COMSTAT st;
-
- fhandler_serial *fh = (fhandler_serial *)s->fh;
-
- if (fh->get_readahead_valid () || fh->overlapped_armed < 0)
- return s->read_ready = 1;
-
- 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;
- }
-
- (void) SetCommMask (h, EV_RXCHAR);
-
- if (!fh->overlapped_armed)
- {
- DWORD ev;
- COMSTAT st;
-
- ResetEvent (fh->io_status.hEvent);
-
- if (!ClearCommError (h, &ev, &st))
- {
- debug_printf ("ClearCommError");
- goto err;
- }
- else if (st.cbInQue)
- return s->read_ready = 1;
- else if (WaitCommEvent (h, &ev, &fh->io_status))
- return s->read_ready = 1;
- 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, &ev, &st))
- {
- debug_printf ("ClearCommError");
- goto err;
- }
- else if (!st.cbInQue)
- Sleep (to);
- else
- {
- return s->read_ready = 1;
- select_printf ("got something");
- }
- PurgeComm (h, PURGE_TXABORT | PURGE_RXABORT);
- break;
- case WAIT_OBJECT_0 + 1:
- PurgeComm (h, PURGE_TXABORT | PURGE_RXABORT);
- select_printf ("interrupt");
- set_sig_errno (EINTR);
- ready = -1;
- break;
- case WAIT_TIMEOUT:
- PurgeComm (h, PURGE_TXABORT | PURGE_RXABORT);
- break;
- default:
- PurgeComm (h, PURGE_TXABORT | PURGE_RXABORT);
- debug_printf ("WaitForMultipleObjects");
- goto err;
- }
-
-out:
- return ready;
-
-err:
- if (GetLastError () == ERROR_OPERATION_ABORTED)
- {
- select_printf ("operation aborted");
- return ready;
- }
-
- __seterrno ();
- s->saw_error = TRUE;
- 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, 0))
- 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[FHDEVN(FH_SERIAL)])
- {
- me->h = ((pipeinf *) stuff->device_specific[FHDEVN(FH_SERIAL)])->thread;
- return 1;
- }
- serialinf *si = new serialinf;
- si->start = &stuff->start;
- si->stop_thread_serial = FALSE;
- si->thread = me->h = makethread (thread_serial, (LPVOID)si, 0, "select_serial");
- if (!me->h)
- return 0;
- stuff->device_specific[FHDEVN(FH_SERIAL)] = (void *)si;
- return 1;
-}
-
-static void
-serial_cleanup (select_record *, select_stuff *stuff)
-{
- serialinf *si = (serialinf *)stuff->device_specific[FHDEVN(FH_SERIAL)];
- if (si && si->thread)
- {
- si->stop_thread_serial = TRUE;
- WaitForSingleObject (si->thread, INFINITE);
- CloseHandle (si->thread);
- delete si;
- stuff->device_specific[FHDEVN(FH_SERIAL)] = NULL;
- }
-}
-
-static int
-poll_serial (select_record *me, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds)
-
-{
- return peek_serial (me, 0) ?
- set_bits (me, readfds, writefds, exceptfds) :
- 0;
-}
-
-MAKEready (serial)
-
-select_record *
-fhandler_serial::select_read (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = start_thread_serial;
- s->poll = poll_serial;
- s->verify = verify_ok;
- s->cleanup = serial_cleanup;
- }
- s->read_selected = TRUE;
- return s;
-}
-
-select_record *
-fhandler_serial::select_write (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->poll = set_bits;
- s->verify = verify_ok;
- }
- 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->poll = set_bits;
- s->verify = verify_ok;
- }
- s->h = NULL;
- s->except_selected = FALSE; // Can't do this
- return s;
-}
-
-int
-fhandler_base::ready_for_read (int, DWORD, int)
-{
- return 1;
-}
-
-select_record *
-fhandler_base::select_read (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->poll = set_bits;
- 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->poll = set_bits;
- 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->poll = set_bits;
- s->verify = verify_ok;
- }
- s->h = NULL;
- s->write_selected = TRUE;
- return s;
-}
-
-struct socketinf
- {
- HANDLE thread;
- winsock_fd_set readfds, writefds, exceptfds;
- SOCKET exitsock;
- struct sockaddr_in sin;
- select_record *start;
- };
-
-static int
-peek_socket (select_record *me, int)
-{
- winsock_fd_set ws_readfds, ws_writefds, ws_exceptfds;
- struct timeval tv = {0, 0};
- WINSOCK_FD_ZERO (&ws_readfds);
- WINSOCK_FD_ZERO (&ws_writefds);
- WINSOCK_FD_ZERO (&ws_exceptfds);
- int gotone = 0;
-
- HANDLE h;
- set_handle_or_return_if_not_open (h, me);
- select_printf ("considering handle %p", h);
-
- if (me->read_selected)
- {
- select_printf ("adding read fd_set %s, fd %d", me->fh->get_name (),
- me->fd);
- WINSOCK_FD_SET (h, &ws_readfds);
- }
- if (me->write_selected)
- {
- select_printf ("adding write fd_set %s, fd %d", me->fh->get_name (),
- me->fd);
- WINSOCK_FD_SET (h, &ws_writefds);
- }
- if (me->except_selected)
- {
- select_printf ("adding except fd_set %s, fd %d", me->fh->get_name (),
- me->fd);
- WINSOCK_FD_SET (h, &ws_exceptfds);
- }
- int r = WINSOCK_SELECT (0, &ws_readfds, &ws_writefds, &ws_exceptfds, &tv);
- select_printf ("WINSOCK_SELECT returned %d", r);
- if (r == -1)
- {
- select_printf ("error %d", WSAGetLastError ());
- return 0;
- }
-
- if (WINSOCK_FD_ISSET (h, &ws_readfds) || (me->read_selected && me->read_ready))
- gotone = me->read_ready = TRUE;
- if (WINSOCK_FD_ISSET (h, &ws_writefds) || (me->write_selected && me->write_ready))
- gotone = me->write_ready = TRUE;
- if (WINSOCK_FD_ISSET (h, &ws_exceptfds) || (me->except_selected && me->except_ready))
- gotone = me->except_ready = TRUE;
- return gotone;
-}
-
-static int
-poll_socket (select_record *me, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds)
-{
- return peek_socket (me, 0) ?
- set_bits (me, readfds, writefds, exceptfds) :
- 0;
-}
-
-MAKEready (socket)
-
-static int start_thread_socket (select_record *, select_stuff *);
-
-static DWORD WINAPI
-thread_socket (void *arg)
-{
- socketinf *si = (socketinf *)arg;
-
- select_printf ("stuff_start %p", &si->start);
- int r = WINSOCK_SELECT (0, &si->readfds, &si->writefds, &si->exceptfds, NULL);
- select_printf ("Win32 select returned %d", r);
- if (r == -1)
- select_printf ("error %d", WSAGetLastError ());
- select_record *s = si->start;
- while ((s = s->next))
- if (s->startup == start_thread_socket)
- {
- HANDLE h = s->fh->get_handle ();
- select_printf ("s %p, testing fd %d (%s)", s, s->fd, s->fh->get_name ());
- if (WINSOCK_FD_ISSET (h, &si->readfds))
- {
- select_printf ("read_ready");
- s->read_ready = TRUE;
- }
- if (WINSOCK_FD_ISSET (h, &si->writefds))
- {
- select_printf ("write_ready");
- s->write_ready = TRUE;
- }
- if (WINSOCK_FD_ISSET (h, &si->exceptfds))
- {
- select_printf ("except_ready");
- s->except_ready = TRUE;
- }
- }
-
- if (WINSOCK_FD_ISSET (si->exitsock, &si->readfds))
- select_printf ("saw exitsock read");
-
- return 0;
-}
-
-extern "C" unsigned long htonl (unsigned long);
-
-static int
-start_thread_socket (select_record *me, select_stuff *stuff)
-{
- socketinf *si;
-
- if ((si = (socketinf *)stuff->device_specific[FHDEVN(FH_SOCKET)]))
- {
- me->h = si->thread;
- return 1;
- }
-
- si = new socketinf;
- WINSOCK_FD_ZERO (&si->readfds);
- WINSOCK_FD_ZERO (&si->writefds);
- WINSOCK_FD_ZERO (&si->exceptfds);
- select_record *s = &stuff->start;
- while ((s = s->next))
- if (s->startup == start_thread_socket)
- {
- HANDLE h = s->fh->get_handle ();
- select_printf ("Handle %p", h);
- if (s->read_selected)
- {
- WINSOCK_FD_SET (h, &si->readfds);
- select_printf ("Added to readfds");
- }
- if (s->write_selected)
- {
- WINSOCK_FD_SET (h, &si->writefds);
- select_printf ("Added to writefds");
- }
- if (s->except_selected)
- {
- WINSOCK_FD_SET (h, &si->exceptfds);
- select_printf ("Added to exceptfds");
- }
- }
-
- if ((si->exitsock = socket (PF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
- {
- set_winsock_errno ();
- select_printf ("cannot create socket, %E");
- return -1;
- }
- /* Allow rapid reuse of the port. */
- int tmp = 1;
- (void) setsockopt (si->exitsock, SOL_SOCKET, SO_REUSEADDR, (char *) &tmp, sizeof (tmp));
-
- int sin_len = sizeof(si->sin);
- memset (&si->sin, 0, sizeof (si->sin));
- si->sin.sin_family = AF_INET;
- si->sin.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
- if (bind (si->exitsock, (struct sockaddr *) &si->sin, sizeof (si->sin)) < 0)
- {
- select_printf ("cannot bind socket, %E");
- goto err;
- }
-
- if (getsockname (si->exitsock, (struct sockaddr *) &si->sin, &sin_len) < 0)
- {
- select_printf ("getsockname error");
- goto err;
- }
-
- if (listen (si->exitsock, 1))
- {
- select_printf ("listen failed, %E");
- goto err;
- }
-
- select_printf ("exitsock %p", si->exitsock);
- WINSOCK_FD_SET ((HANDLE) si->exitsock, &si->readfds);
- WINSOCK_FD_SET ((HANDLE) si->exitsock, &si->exceptfds);
- stuff->device_specific[FHDEVN(FH_SOCKET)] = (void *) si;
- si->start = &stuff->start;
- select_printf ("stuff_start %p", &stuff->start);
- si->thread = me->h = makethread (thread_socket, (LPVOID)si, 0,
- "select_socket");
- return !!me->h;
-
-err:
- set_winsock_errno ();
- closesocket (si->exitsock);
- return -1;
-}
-
-void
-socket_cleanup (select_record *, select_stuff *stuff)
-{
- socketinf *si = (socketinf *)stuff->device_specific[FHDEVN(FH_SOCKET)];
- select_printf ("si %p si->thread %p", si, si ? si->thread : NULL);
- if (si && si->thread)
- {
- select_printf ("connection to si->exitsock %p", si->exitsock);
- SOCKET s = socket (AF_INET, SOCK_STREAM, 0);
- /* Connecting to si->exitsock will cause any executing select to wake
- up. When this happens then the exitsock condition will cause the
- thread to terminate. */
- if (connect (s, (struct sockaddr *) &si->sin, sizeof (si->sin)) < 0)
- {
- set_winsock_errno ();
- select_printf ("connect failed");
- /* FIXME: now what? */
- }
- shutdown (s, 2);
- closesocket (s);
-
- /* Wait for thread to go away */
- WaitForSingleObject (si->thread, INFINITE);
- shutdown (si->exitsock, 2);
- closesocket (si->exitsock);
- CloseHandle (si->thread);
- stuff->device_specific[FHDEVN(FH_SOCKET)] = NULL;
- 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->poll = poll_socket;
- s->verify = verify_true;
- s->cleanup = socket_cleanup;
- }
- 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->poll = poll_socket;
- s->verify = verify_true;
- s->cleanup = socket_cleanup;
- }
- s->write_selected = TRUE;
- return s;
-}
-
-select_record *
-fhandler_socket::select_except (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = start_thread_socket;
- s->poll = poll_socket;
- s->verify = verify_true;
- s->cleanup = socket_cleanup;
- }
- s->except_selected = TRUE;
- return s;
-}
-
-static int
-peek_windows (select_record *me, int)
-{
- 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
-poll_windows (select_record *me, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds)
-{
-
- return peek_windows (me, 0) ?
- set_bits (me, readfds, writefds, exceptfds) :
- 0;
-}
-
-MAKEready (windows)
-
-select_record *
-fhandler_windows::select_read (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->poll = poll_windows;
- s->verify = poll_windows;
- }
- s->h = get_handle ();
- s->read_selected = TRUE;
- 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->poll = set_bits;
- s->verify = verify_ok;
- }
- 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->poll = set_bits;
- s->verify = verify_ok;
- }
- s->h = get_handle ();
- s->except_selected = TRUE;
- s->except_ready = TRUE;
- s->windows_handle = TRUE;
- return s;
-}
diff --git a/winsup/cygwin/select.h b/winsup/cygwin/select.h
deleted file mode 100644
index 286951ebc..000000000
--- a/winsup/cygwin/select.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* select.h
-
- Copyright 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* Winsock select() types and macros */
-
-/*
- * Use this struct to interface to
- * the system provided select.
- */
-typedef struct winsock_fd_set
-{
- unsigned int fd_count;
- HANDLE fd_array[1024]; /* Dynamically allocated. */
-} winsock_fd_set;
-
-/*
- * Define the Win32 winsock definitions to have a prefix WINSOCK_
- * so we can be explicit when we are using them.
- */
-#define WINSOCK_FD_ISSET(fd, set) __WSAFDIsSet ((SOCKET)fd, (fd_set *)set)
-#define WINSOCK_FD_SET(fd, set) do { \
- (set)->fd_array[(set)->fd_count++]=fd;\
-} while(0)
-#define WINSOCK_FD_ZERO(set) ((set)->fd_count = 0)
-#define WINSOCK_FD_CLR(fd, set) do { \
- u_int __i; \
- for (__i = 0; __i < (set)->fd_count ; __i++) { \
- if ((set)->fd_array[__i] == fd) { \
- while (__i < (set)->fd_count-1) { \
- (set)->fd_array[__i] = \
- (set)->fd_array[__i+1]; \
- __i++; \
- } \
- (set)->fd_count--; \
- break; \
- } \
- } \
-} while(0)
-
-extern "C" int PASCAL __WSAFDIsSet(SOCKET, fd_set*);
-extern "C" int PASCAL win32_select(int, fd_set*, fd_set*, fd_set*, const struct timeval*);
-
-/*
- * call to winsock's select() -
- * type coercion need to appease confused prototypes
- */
-#define WINSOCK_SELECT(nfd, rd, wr, ex, timeo) \
- win32_select (nfd, (fd_set *)rd, (fd_set *)wr, (fd_set *)ex, timeo)
-
diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc
deleted file mode 100644
index fb023e725..000000000
--- a/winsup/cygwin/shared.cc
+++ /dev/null
@@ -1,295 +0,0 @@
-/* shared.cc: shared data area support.
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <grp.h>
-#include <pwd.h>
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "cygheap.h"
-#include "shared_info.h"
-#include "registry.h"
-#include "cygwin_version.h"
-#include "security.h"
-
-#define SHAREDVER (unsigned)(cygwin_version.api_major << 16 | \
- cygwin_version.api_minor)
-
-shared_info NO_COPY *cygwin_shared = NULL;
-
-/* The handle of the shared data area. */
-HANDLE cygwin_shared_h = NULL;
-
-/* 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;
-
-char * __stdcall
-shared_name (const char *str, int num)
-{
- static NO_COPY char buf[MAX_PATH] = {0};
- char envbuf[6];
-
- __small_sprintf (buf, "%s.%s.%d", cygwin_version.shared_id, str, num);
- if (GetEnvironmentVariable("CYGWIN_TESTING", envbuf, 5))
- strcat(buf, cygwin_version.dll_build_date);
- return buf;
-}
-
-/* Open the shared memory map. */
-static void __stdcall
-open_shared_file_map ()
-{
- cygwin_shared = (shared_info *) open_shared ("shared",
- cygwin_shared_h,
- sizeof (*cygwin_shared),
- (void *)0xa000000);
- ProtectHandle (cygwin_shared);
-}
-
-void * __stdcall
-open_shared (const char *name, HANDLE &shared_h, DWORD size, void *addr)
-{
- void *shared;
-
- if (!shared_h)
- {
- char *mapname;
- if (!name)
- mapname = NULL;
- else
- {
- mapname = shared_name (name, 0);
- shared_h = OpenFileMappingA (FILE_MAP_READ | FILE_MAP_WRITE,
- TRUE, mapname);
- }
- if (!shared_h &&
- !(shared_h = CreateFileMappingA ((HANDLE) 0xffffffff,
- &sec_all,
- PAGE_READWRITE,
- 0,
- size,
- mapname)))
- api_fatal ("CreateFileMappingA, %E. Terminating.");
- }
-
- shared = (shared_info *) MapViewOfFileEx (shared_h,
- FILE_MAP_READ | FILE_MAP_WRITE,
- 0, 0, 0, addr);
-
- if (!shared)
- {
- /* Probably win95, so try without specifying the address. */
- shared = (shared_info *) MapViewOfFileEx (shared_h,
- FILE_MAP_READ|FILE_MAP_WRITE,
- 0,0,0,0);
- }
-
- if (!shared)
- api_fatal ("MapViewOfFileEx, %E. Terminating.");
-
- debug_printf ("name %s, shared %p, h %p", name, shared, shared_h);
-
- /* FIXME: I couldn't find anywhere in the documentation a note about
- whether the memory is initialized to zero. The code assumes it does
- and since this part seems to be working, we'll leave it as is. */
- return shared;
-}
-
-void
-shared_info::initialize ()
-{
- /* Ya, Win32 provides a way for a dll to watch when it's first loaded.
- We may eventually want to use it but for now we have this. */
- if (inited)
- {
- if (inited != SHAREDVER)
- api_fatal ("Shared region version mismatch. Version %x != %x.\n"
- "Are you using multiple versions of cygwin1.dll?\n"
- "Run 'cygcheck -r -s -v' to find out.",
- inited, SHAREDVER);
- return;
- }
-
- /* Initialize the mount table. */
- mount.init ();
-
- /* Initialize the queue of deleted files. */
- delqueue.init ();
-
- /* Initialize tty table. */
- tty.init ();
-
- /* Fetch misc. registry entries. */
-
- reg_key reg (KEY_READ, NULL);
-
- /* Note that reserving a huge amount of heap space does not result in
- swapping since we are not committing it. */
- /* FIXME: We should not be restricted to a fixed size heap no matter
- what the fixed size is. */
-
- heap_chunk_in_mb = reg.get_int ("heap_chunk_in_mb", 128);
- if (heap_chunk_in_mb < 4)
- {
- heap_chunk_in_mb = 4;
- reg.set_int ("heap_chunk_in_mb", heap_chunk_in_mb);
- }
-
- inited = SHAREDVER;
-}
-
-void __stdcall
-shared_init ()
-{
- open_shared_file_map ();
-
- cygwin_shared->initialize ();
-}
-
-void __stdcall
-shared_terminate ()
-{
- if (cygwin_shared_h)
- ForceCloseHandle (cygwin_shared_h);
-}
-
-unsigned
-shared_info::heap_chunk_size ()
-{
- return heap_chunk_in_mb << 20;
-}
-
-/* For apps that wish to access the shared data. */
-
-shared_info *
-cygwin_getshared ()
-{
- return cygwin_shared;
-}
-
-/*
- * Function to return a common SECURITY_DESCRIPTOR * that
- * allows all access.
- */
-
-static NO_COPY SECURITY_DESCRIPTOR *null_sdp = 0;
-
-SECURITY_DESCRIPTOR *__stdcall
-get_null_sd ()
-{
- static NO_COPY SECURITY_DESCRIPTOR sd;
-
- if (null_sdp == 0)
- {
- InitializeSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION);
- SetSecurityDescriptorDacl (&sd, TRUE, 0, FALSE);
- null_sdp = &sd;
- }
- return null_sdp;
-}
-
-extern PSID get_admin_sid ();
-extern PSID get_system_sid ();
-extern PSID get_creator_owner_sid ();
-
-PSECURITY_ATTRIBUTES __stdcall
-sec_user (PVOID sa_buf, PSID sid2, BOOL inherit)
-{
- if (! sa_buf)
- return inherit ? &sec_none_nih : &sec_none;
-
- 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));
-
- char sid_buf[MAX_SID_LEN];
- PSID sid = (PSID) sid_buf;
-
- if (cygheap->user.sid ())
- CopySid (MAX_SID_LEN, sid, (void *) cygheap->user.sid ());
- else if (! lookup_name (getlogin (), cygheap->user.logsrv (), sid))
- return inherit ? &sec_none_nih : &sec_none;
-
- size_t acl_len = sizeof (ACL)
- + 4 * (sizeof (ACCESS_ALLOWED_ACE) - sizeof (DWORD))
- + GetLengthSid (sid)
- + GetLengthSid (get_admin_sid ())
- + GetLengthSid (get_system_sid ())
- + GetLengthSid (get_creator_owner_sid ());
- if (sid2)
- acl_len += sizeof (ACCESS_ALLOWED_ACE) - sizeof (DWORD)
- + GetLengthSid (sid2);
-
- if (! InitializeAcl (acl, acl_len, ACL_REVISION))
- debug_printf("InitializeAcl %E");
-
- if (! AddAccessAllowedAce (acl, ACL_REVISION,
- SPECIFIC_RIGHTS_ALL | STANDARD_RIGHTS_ALL,
- sid))
- debug_printf("AddAccessAllowedAce(%s) %E", getlogin());
-
- if (! AddAccessAllowedAce (acl, ACL_REVISION,
- SPECIFIC_RIGHTS_ALL | STANDARD_RIGHTS_ALL,
- get_admin_sid ()))
- debug_printf("AddAccessAllowedAce(admin) %E");
-
- if (! AddAccessAllowedAce (acl, ACL_REVISION,
- SPECIFIC_RIGHTS_ALL | STANDARD_RIGHTS_ALL,
- get_system_sid ()))
- debug_printf("AddAccessAllowedAce(system) %E");
-
- if (! AddAccessAllowedAce (acl, ACL_REVISION,
- SPECIFIC_RIGHTS_ALL | STANDARD_RIGHTS_ALL,
- get_creator_owner_sid ()))
- debug_printf("AddAccessAllowedAce(creator_owner) %E");
-
- if (sid2)
- if (! AddAccessAllowedAce (acl, ACL_REVISION,
- SPECIFIC_RIGHTS_ALL | STANDARD_RIGHTS_ALL,
- sid2))
- debug_printf("AddAccessAllowedAce(sid2) %E");
-
- 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;
-}
-
-SECURITY_ATTRIBUTES *__stdcall
-sec_user_nih (PVOID sa_buf, PSID sid2)
-{
- return sec_user (sa_buf, sid2, FALSE);
-}
-
diff --git a/winsup/cygwin/shared.sgml b/winsup/cygwin/shared.sgml
deleted file mode 100644
index f43d654e2..000000000
--- a/winsup/cygwin/shared.sgml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-<sect1 id="func-cygwin-getshared">
-<title>cygwin_getshared</title>
-
-<funcsynopsis>
-<funcdef>shared_info *
-<function>cygwin_getshared</function></funcdef>
-<void>
-</funcsynopsis>
-
-<para>Returns a pointer to an internal Cygwin memory structure
-containing shared information used by cooperating cygwin processes.
-This function is intended for use only by "system" programs like
-<filename>mount</filename> and <filename>ps</filename>.
-</para>
-
-</sect1>
diff --git a/winsup/cygwin/shared_info.h b/winsup/cygwin/shared_info.h
deleted file mode 100644
index 4b4b2f82f..000000000
--- a/winsup/cygwin/shared_info.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/* shared_info.h: shared info for cygwin
-
- Copyright 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "tty.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[MAX_PATH];
- int native_pathlen;
-
- /* POSIX-style mount point ("/foo/bar") */
- char posix_path[MAX_PATH];
- int posix_pathlen;
-
- unsigned flags;
-
- void init (const char *dev, const char *path, unsigned flags);
-
- struct mntent *getmntent ();
-};
-
-/* 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
-
-class reg_key;
-class mount_info
-{
- int posix_sorted[MAX_MOUNTS];
- int native_sorted[MAX_MOUNTS];
-public:
- int nmounts;
- mount_item mount[MAX_MOUNTS];
-
- /* Strings used by getmntent(). */
- char mnt_type[20];
- char mnt_opts[20];
- char mnt_fsname[MAX_PATH];
- char mnt_dir[MAX_PATH];
-
- /* 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[MAX_PATH];
- size_t cygdrive_len;
- unsigned cygdrive_flags;
-
- /* Increment when setting up a reg_key if mounts area had to be
- created so we know when we need to import old mount tables. */
- int had_to_create_mount_areas;
-
- void init ();
- int add_item (const char *dev, const char *path, unsigned flags, int reg_p);
- int del_item (const char *path, unsigned flags, int reg_p);
-
- void from_registry ();
- int add_reg_mount (const char * native_path, const char * posix_path,
- unsigned mountflags);
- int del_reg_mount (const char * posix_path, unsigned mountflags);
-
- unsigned set_flags_from_win32_path (const char *path);
- int conv_to_win32_path (const char *src_path, char *win32_path,
- char *full_win32_path, DWORD &devn, int &unit,
- unsigned *flags = NULL);
- 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_to_registry (const char *cygdrive_prefix, unsigned flags);
- int remove_cygdrive_info_from_registry (const char *cygdrive_prefix, unsigned flags);
- int get_cygdrive_info (char *user, char *system, char* user_flags,
- char* system_flags);
-
- void import_v1_mounts ();
-
-private:
-
- void sort ();
- void read_mounts (reg_key& r);
- void read_v1_mounts (reg_key r, unsigned which);
- void mount_slash ();
- void to_registry ();
-
- int cygdrive_win32_path (const char *src, char *dst, int trailing_slash_p);
- void cygdrive_posix_path (const char *src, char *dst, int trailing_slash_p);
- void slash_drive_to_win32_path (const char *path, char *buf, int trailing_slash_p);
- void read_cygdrive_info_from_registry ();
-};
-
-/******** Close-on-delete queue ********/
-
-/* First pass at a file deletion queue structure.
-
- We can't keep this list in the per-process info, since
- one process may open a file, and outlive a process which
- wanted to unlink the file - and the data would go away.
-*/
-
-#define MAX_DELQUEUES_PENDING 100
-
-class delqueue_list
-{
- char name[MAX_DELQUEUES_PENDING][MAX_PATH];
- char inuse[MAX_DELQUEUES_PENDING];
- int empty;
-
-public:
- void init ();
- void queue_file (const char *dosname);
- void process_queue ();
-};
-
-/******** Shared Info ********/
-/* Data accessible to all tasks */
-
-class shared_info
-{
- DWORD inited;
-
-public:
- /* FIXME: Doesn't work if more than one user on system. */
- mount_info mount;
-
- int heap_chunk_in_mb;
- unsigned heap_chunk_size (void);
-
- tty_list tty;
- delqueue_list delqueue;
- void initialize (void);
-};
-
-extern shared_info *cygwin_shared;
-extern HANDLE cygwin_shared_h;
-extern HANDLE console_shared_h;
-
-void __stdcall shared_init (void);
-void __stdcall shared_terminate (void);
-
-char *__stdcall shared_name (const char *, int);
-void *__stdcall open_shared (const char *name, HANDLE &shared_h, DWORD size, void *addr);
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
deleted file mode 100644
index 242b2fb5d..000000000
--- a/winsup/cygwin/signal.cc
+++ /dev/null
@@ -1,372 +0,0 @@
-/* signal.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
- 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 <errno.h>
-#include "cygerrno.h"
-#include <sys/cygwin.h>
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-
-int sigcatchers; /* FIXME: Not thread safe. */
-
-#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_func_ptr prev;
-
- /* check that sig is in right range */
- if (sig < 0 || sig >= NSIG)
- {
- set_errno (EINVAL);
- syscall_printf ("SIG_ERR = signal (%d, %p)", sig, func);
- return (_sig_func_ptr) SIG_ERR;
- }
-
- prev = myself->getsig (sig).sa_handler;
- myself->getsig (sig).sa_handler = func;
- myself->getsig (sig).sa_mask = 0;
- set_sigcatchers (prev, func);
-
- syscall_printf ("%p = signal (%d, %p)", prev, sig, func);
- return prev;
-}
-
-extern "C" unsigned int
-sleep (unsigned int seconds)
-{
- int rc;
- unsigned start_time;
- unsigned int res;
-
- start_time = GetTickCount ();
-
- syscall_printf ("sleep (%d)", seconds);
- rc = WaitForSingleObject (signal_arrived, seconds * 1000);
- if (rc == WAIT_TIMEOUT)
- res = 0;
- else
- res = seconds - (GetTickCount () - start_time)/1000;
-
- syscall_printf ("%d = sleep (%d)", res, seconds);
-
- return res;
-}
-
-extern "C" unsigned int
-usleep (unsigned int useconds)
-{
- syscall_printf ("usleep (%d)", useconds);
- WaitForSingleObject (signal_arrived, (useconds + 500) / 1000);
- syscall_printf ("0 = usleep (%d)", useconds);
- return 0;
-}
-
-extern "C" int
-sigprocmask (int sig, const sigset_t *set, sigset_t *oldset)
-{
- /* check that sig is in right range */
- if (sig < 0 || sig >= NSIG)
- {
- set_errno (EINVAL);
- syscall_printf ("SIG_ERR = sigprocmask sig %d out of range", sig);
- return -1;
- }
-
- if (oldset)
- *oldset = myself->getsigmask ();
- if (set)
- {
- sigset_t newmask = myself->getsigmask ();
- switch (sig)
- {
- 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;
- default:
- set_errno (EINVAL);
- return -1;
- }
- (void) set_process_mask (newmask);
- }
- return 0;
-}
-
-static int
-kill_worker (pid_t pid, int sig)
-{
- int res = 0;
- pinfo dest (pid);
- BOOL sendSIGCONT;
-
- if (!dest)
- {
- set_errno (ESRCH);
- return -1;
- }
-
- dest->setthread2signal (NULL);
-
- if ((sendSIGCONT = (sig < 0)))
- sig = -sig;
-
-#if 0
- if (dest == myself && !sendSIGCONT)
- dest = myself_nowait_nonmain;
-#endif
- if (sig == 0)
- res = proc_exists (dest) ? 0 : -1;
- else if ((res = sig_send (dest, sig)))
- {
- sigproc_printf ("%d = sig_send, %E ", res);
- res = -1;
- }
- else if (sendSIGCONT)
- (void) sig_send (dest, SIGCONT);
-
- syscall_printf ("%d = kill_worker (%d, %d)", res, pid, sig);
- return res;
-}
-
-int
-_raise (int sig)
-{
- return _kill (myself->pid, sig);
-}
-
-/* This is called _kill because the real kill is in newlib. */
-int
-_kill (pid_t pid, int sig)
-{
- syscall_printf ("kill (%d, %d)", pid, sig);
- /* check that sig is in right range */
- if (sig < 0 || sig >= NSIG)
- {
- set_errno (EINVAL);
- syscall_printf ("sig %d out of range", sig);
- return -1;
- }
-
- /* Silently ignore stop signals from a member of orphaned process group.
- FIXME: Why??? */
- if (ISSTATE(myself, PID_ORPHANED) &&
- (sig == SIGTSTP || sig == SIGTTIN || sig == SIGTTOU))
- sig = 0;
-
- return (pid > 0) ? kill_worker (pid, sig) : kill_pgrp (-pid, sig);
-}
-
-int
-kill_pgrp (pid_t pid, int sig)
-{
- int res = 0;
- int found = 0;
- int killself = 0;
-
- sigproc_printf ("pid %d, sig %d", pid, sig);
-
- winpids pids;
- for (unsigned i = 0; i < pids.npids; i++)
- {
- _pinfo *p = pids[i];
-
- if (!proc_exists (p))
- continue;
-
- /* Is it a process we want to kill? */
- if (pid == 0 && (p->pgid != myself->pgid || p->ctty != myself->ctty))
- continue;
- if (pid > 1 && p->pgid != pid)
- continue;
- if (sig < 0 && NOTSTATE(p, PID_STOPPED))
- continue;
- sigproc_printf ("killing pid %d, pgrp %d, p->ctty %d, myself->ctty %d",
- p->pid, p->pgid, p->ctty, myself->ctty);
- if (p == myself)
- killself++;
- else if (kill_worker (p->pid, sig))
- res = -1;
- found++;
- }
-
- if (killself && kill_worker (myself->pid, sig))
- res = -1;
-
- if (!found)
- {
- set_errno (ESRCH);
- res = -1;
- }
- syscall_printf ("%d = kill (%d, %d)", res, pid, sig);
- return res;
-}
-
-extern "C" int
-killpg (int pgrp, int sig)
-{
- return _kill (-pgrp, sig);
-}
-
-extern "C" int
-sigaction (int sig, const struct sigaction *newact, struct sigaction *oldact)
-{
- sigproc_printf ("sig %d, newact %p, oldact %p", sig, newact, oldact);
- /* check that sig is in right range */
- if (sig < 0 || sig >= NSIG)
- {
- set_errno (EINVAL);
- syscall_printf ("SIG_ERR = sigaction sig %d out of range", sig);
- return -1;
- }
-
- struct sigaction oa = myself->getsig (sig);
-
- if (newact)
- {
- if ((sig == SIGKILL || sig == SIGSTOP) && newact->sa_handler != SIG_DFL)
- {
- set_errno (EINVAL);
- return -1;
- }
- myself->getsig (sig) = *newact;
- if (newact->sa_handler == SIG_IGN)
- sig_clear (sig);
- if (newact->sa_handler == SIG_DFL && sig == SIGCHLD)
- sig_clear (sig);
- set_sigcatchers (oa.sa_handler, newact->sa_handler);
- }
-
- if (oldact)
- *oldact = oa;
-
- return 0;
-}
-
-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 sig %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 sig %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 sig %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
-sigpending (sigset_t *set)
-{
- unsigned bit;
- *set = 0;
- for (int sig = 1; sig < NSIG; sig++)
- if (*myself->getsigtodo (sig) && myself->getsigmask () & (bit = SIGTOMASK (sig)))
- *set |= bit;
- 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 (myself->getsigmask ());
-}
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
deleted file mode 100644
index ed778e7a5..000000000
--- a/winsup/cygwin/sigproc.cc
+++ /dev/null
@@ -1,1324 +0,0 @@
-/* sigproc.cc: inter/intra signal and sub process handler
-
- Copyright 1997, 1998, 1999, 2000 Cygnus Solutions.
-
- 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 <stdlib.h>
-#include <time.h>
-#include <sys/wait.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <sys/cygwin.h>
-#include "cygerrno.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "cygheap.h"
-#include "child_info.h"
-#include "perthread.h"
-#include <assert.h>
-#include "shared_info.h"
-#include "security.h"
-
-/*
- * Convenience defines
- */
-#define WSSC 60000 // Wait for signal completion
-#define WPSP 40000 // Wait for proc_subproc mutex
-#define WSPX 20000 // Wait for wait_sig to terminate
-#define WWSP 20000 // Wait for wait_subproc to terminate
-
-#define WAIT_SIG_PRIORITY THREAD_PRIORITY_NORMAL
-
-#define TOTSIGS (NSIG + __SIGOFFSET)
-
-#define wake_wait_subproc() SetEvent (events[0])
-
-#define no_signals_available() (!hwait_sig || !sig_loop_wait)
-
-/*
- * Global variables
- */
-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
-char NO_COPY myself_nowait_nonmain_dummy[1] = {'1'};// Flag to sig_send that signal goes to
- // current process but no wait is required
- // if this is not the main thread.
-
-HANDLE NO_COPY signal_arrived; // Event signaled when a signal has
- // resulted in a user-specified
- // function call
-/*
- * Common variables
- */
-
-
-/* How long to wait for message/signals. Normally this is infinite.
- * On termination, however, these are set to zero as a flag to exit.
- */
-
-#define Static static NO_COPY
-
-Static DWORD proc_loop_wait = 1000; // Wait for subprocesses to exit
-Static DWORD sig_loop_wait = INFINITE; // Wait for signals to arrive
-
-Static HANDLE sigcatch_nonmain = NULL; // The semaphore signaled when
- // signals are available for
- // processing from non-main thread
-Static HANDLE sigcatch_main = NULL; // Signalled when main thread sends a
- // signal
-Static HANDLE sigcatch_nosync = NULL; // Signal wait_sig to scan sigtodo
- // but not to bother with any
- // synchronization
-Static HANDLE sigcomplete_main = NULL; // Event signaled when a signal has
- // finished processing for the main
- // thread
-Static HANDLE sigcomplete_nonmain = NULL;// Semaphore raised for non-main
- // threads when a signal has finished
- // processing
-Static HANDLE hwait_sig = NULL; // Handle of wait_sig thread
-Static HANDLE hwait_subproc = NULL; // Handle of sig_subproc thread
-
-Static HANDLE wait_sig_inited = NULL; // Control synchronization of
- // message queue startup
-
-/* Used by WaitForMultipleObjects. These are handles to child processes.
- */
-Static HANDLE events[PSIZE + 1] = {0}; // All my children's handles++
-#define hchildren (events + 1) // Where the children handles begin
-Static pinfo pchildren[PSIZE]; // All my children info
-Static pinfo zombies[PSIZE]; // All my deceased children info
-Static int nchildren = 0; // Number of active children
-Static int nzombies = 0; // Number of deceased children
-
-Static waitq waitq_head = {0, 0, 0, 0, 0, 0, 0};// Start of queue for wait'ing threads
-Static waitq waitq_main; // Storage for main thread
-
-muto NO_COPY *sync_proc_subproc = NULL; // Control access to subproc stuff
-
-DWORD NO_COPY sigtid = 0; // ID of the signal thread
-
-int NO_COPY pending_signals = 0; // TRUE if signals pending
-
-/* Functions
- */
-static int __stdcall checkstate (waitq *);
-static __inline__ BOOL get_proc_lock (DWORD, DWORD);
-static HANDLE __stdcall getsem (_pinfo *, const char *, int, int);
-static void __stdcall remove_zombie (int);
-static DWORD WINAPI wait_sig (VOID *arg);
-static int __stdcall stopped_or_terminated (waitq *, _pinfo *);
-static DWORD WINAPI wait_subproc (VOID *);
-
-/* Determine if the parent process is alive.
- */
-
-BOOL __stdcall
-my_parent_is_alive ()
-{
- DWORD res;
- if (!myself->ppid_handle)
- {
- debug_printf ("No myself->ppid_handle");
- res = FALSE;
- }
- else
- for (int i = 0; i < 2; i++)
- switch (res = WaitForSingleObject (myself->ppid_handle, 0))
- {
- case WAIT_OBJECT_0:
- debug_printf ("parent dead.");
- res = FALSE;
- goto out;
- case WAIT_TIMEOUT:
- debug_printf ("parent still alive");
- res = TRUE;
- goto out;
- case WAIT_FAILED:
- DWORD werr = GetLastError ();
- if (werr == ERROR_INVALID_HANDLE && i == 0)
- continue;
- system_printf ("WFSO for myself->ppid_handle(%p) failed, error %d",
- myself->ppid_handle, werr);
- res = FALSE;
- goto out;
- }
-out:
- return res;
-}
-
-__inline static void
-wait_for_me ()
-{
- /* See if this is the first signal call after initialization.
- * If so, wait for notification that all initialization has completed.
- * Then set the handle to NULL to avoid checking this again.
- */
- if (wait_sig_inited)
- {
- (void) WaitForSingleObject (wait_sig_inited, INFINITE);
- (void) ForceCloseHandle (wait_sig_inited);
- wait_sig_inited = NULL;
- }
-}
-
-static BOOL __stdcall
-proc_can_be_signalled (_pinfo *p)
-{
- if (p == myself_nowait || p == myself_nowait_nonmain || p == myself)
- {
- wait_for_me ();
- return 1;
- }
-
- return ISSTATE (p, PID_INITIALIZING) ||
- (((p)->process_state & (PID_ACTIVE | PID_IN_USE)) ==
- (PID_ACTIVE | PID_IN_USE));
-}
-
-BOOL __stdcall
-pid_exists (pid_t pid)
-{
- pinfo p (pid);
- return proc_exists (p);
-}
-
-/* Test to determine if a process really exists and is processing signals.
- */
-BOOL __stdcall
-proc_exists (_pinfo *p)
-{
- return p && !(p->process_state & (PID_INITIALIZING | PID_EXITED));
-}
-
-/* Return 1 if this is one of our children, zero otherwise.
- FIXME: This really should be integrated with the rest of the proc_subproc
- testing. Scanning these lists twice is inefficient. */
-int __stdcall
-mychild (int pid)
-{
- for (int i = 0; i < nchildren; i++)
- if (pchildren[i]->pid == pid)
- return 1;
- for (int i = 0; i < nzombies; i++)
- if (zombies[i]->pid == pid)
- return 1;
- return 0;
-}
-
-/* Handle all subprocess requests
- */
-#define vchild (*((pinfo *) val))
-int __stdcall
-proc_subproc (DWORD what, DWORD val)
-{
- int rc = 1;
- int potential_match;
- _pinfo *child;
- int clearing;
- waitq *w;
-
-#define wval ((waitq *) 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. Something is wrong.");
- goto out1;
- }
-
- switch (what)
- {
- /* Add a new subprocess to the children arrays.
- * (usually called from the main thread)
- */
- case PROC_ADDCHILD:
- if (nchildren >= PSIZE - 1)
- system_printf ("nchildren too large %d", nchildren);
- pchildren[nchildren] = vchild;
- hchildren[nchildren] = vchild->hProcess;
- if (!DuplicateHandle (hMainProc, vchild->hProcess, hMainProc, &vchild->pid_handle,
- 0, 0, DUPLICATE_SAME_ACCESS))
- system_printf ("Couldn't duplicate child handle for pid %d, %E", vchild->pid);
- ProtectHandle1 (vchild->pid_handle, pid_handle);
-
- if (!DuplicateHandle (hMainProc, hMainProc, vchild->hProcess, &vchild->ppid_handle,
- 0, TRUE, DUPLICATE_SAME_ACCESS))
- system_printf ("Couldn't duplicate my handle<%p> for pid %d, %E", hMainProc, vchild->pid);
- vchild->ppid = myself->pid;
- vchild->uid = myself->uid;
- vchild->gid = myself->gid;
- vchild->pgid = myself->pgid;
- vchild->sid = myself->sid;
- vchild->ctty = myself->ctty;
- vchild->process_state |= PID_INITIALIZING | (myself->process_state & PID_USETTY);
-
- sigproc_printf ("added pid %d to wait list, slot %d, winpid %p, handle %p",
- vchild->pid, nchildren, vchild->dwProcessId,
- vchild->hProcess);
- nchildren++;
-
- wake_wait_subproc ();
- break;
-
- /* A child process had terminated.
- Possibly this is just due to an exec(). Cygwin implements an exec()
- as a "handoff" from one windows process to another. If child->hProcess
- is different from what is recorded in hchildren, then this is an exec().
- Otherwise this is a normal child termination event.
- (called from wait_subproc thread) */
- case PROC_CHILDTERMINATED:
- if (hchildren[val] != pchildren[val]->hProcess)
- {
- sigproc_printf ("pid %d[%d], reparented old hProcess %p, new %p",
- pchildren[val]->pid, val, hchildren[val], pchildren[val]->hProcess);
- ForceCloseHandle1 (hchildren[val], childhProc);
- hchildren[val] = pchildren[val]->hProcess; /* Filled out by child */
- ProtectHandle1 (pchildren[val]->hProcess, childhProc);
- rc = 0;
- break; // This was an exec()
- }
-
- sigproc_printf ("pid %d[%d] terminated, handle %p, nchildren %d, nzombies %d",
- pchildren[val]->pid, val, hchildren[val], nchildren, nzombies);
- zombies[nzombies] = pchildren[val]; // Add to zombie array
- zombies[nzombies++]->process_state = PID_ZOMBIE;// Walking dead
- sigproc_printf ("removing [%d], pid %d, handle %p, nchildren %d",
- val, pchildren[val]->pid, hchildren[val], nchildren);
- if ((int) val < --nchildren)
- {
- hchildren[val] = hchildren[nchildren];
- pchildren[val] = pchildren[nchildren];
- }
- /* Don't scan the wait queue yet. Caller will send SIGCHLD to this process.
- This will cause an eventual scan of waiters. */
- break;
-
- /* A child is in the stopped state. Scan wait() queue to see if anyone
- * should be notified. (Called from wait_sig thread)
- */
- case PROC_CHILDSTOPPED:
- child = myself; // Just to avoid accidental NULL dereference
- sigproc_printf ("Received stopped notification");
- clearing = 0;
- goto scan_wait;
-
- /* 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 <= 0)
- 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);
- ProtectHandle (wval->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");
- 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");
- }
- break;
- }
-
-out:
- sync_proc_subproc->release (); // Release the lock
-out1:
- sigproc_printf ("returning %d", rc);
- return rc;
-}
-
-/* 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 zombies.
- */
-void __stdcall
-proc_terminate (void)
-{
- sigproc_printf ("nchildren %d, nzombies %d", nchildren, nzombies);
- /* Signal processing is assumed to be blocked in this routine. */
- if (hwait_subproc)
- {
- int rc;
- proc_loop_wait = 0; // Tell wait_subproc thread to exit
- wake_wait_subproc (); // Wake wait_subproc loop
-
- /* Wait for wait_subproc thread to exit (but not *too* long) */
- if ((rc = WaitForSingleObject (hwait_subproc, WWSP)) != WAIT_OBJECT_0)
- if (rc == WAIT_TIMEOUT)
- system_printf ("WFSO(hwait_subproc) timed out");
- else
- system_printf ("WFSO(hwait_subproc), rc %d, %E", rc);
-
- HANDLE h = hwait_subproc;
- hwait_subproc = NULL;
- ForceCloseHandle1 (h, hwait_subproc);
-
- sync_proc_subproc->acquire(WPSP);
- (void) proc_subproc (PROC_CLEARWAIT, 1);
-
- /* Clean out zombie processes from the pid list. */
- int i;
- for (i = 0; i < nzombies; i++)
- {
- if (zombies[i]->hProcess)
- {
- ForceCloseHandle1 (zombies[i]->hProcess, childhProc);
- ForceCloseHandle1 (zombies[i]->pid_handle, pid_handle);
- }
- zombies[i]->process_state = PID_EXITED; /* CGF FIXME - still needed? */
- zombies[i].release(); // FIXME: this breaks older gccs for some reason
- }
-
- /* Disassociate my subprocesses */
- for (i = 0; i < nchildren; i++)
- {
- if (!pchildren[i]->hProcess)
- sigproc_printf ("%d(%d) hProcess cleared already?", pchildren[i]->pid,
- pchildren[i]->dwProcessId);
- else
- {
- ForceCloseHandle1 (pchildren[i]->hProcess, childhProc);
- sigproc_printf ("%d(%d) closed child handle", pchildren[i]->pid,
- pchildren[i]->dwProcessId);
- pchildren[i]->ppid = 1;
- if (pchildren[i]->pgid == myself->pid)
- pchildren[i]->process_state |= PID_ORPHANED;
- }
- pchildren[i].release ();
- }
- nchildren = nzombies = 0;
- /* Just zero sync_proc_subproc as the delete below seems to cause
- problems for older gccs. */
- sync_proc_subproc = NULL;
- }
- sigproc_printf ("leaving");
-}
-
-/* Clear pending signal from the sigtodo array
- */
-void __stdcall
-sig_clear (int sig)
-{
- (void) InterlockedExchange (myself->getsigtodo(sig), 0L);
- return;
-}
-
-/* Force the wait_sig thread to wake up and scan the sigtodo array.
- */
-extern "C" int __stdcall
-sig_dispatch_pending (int justwake)
-{
- if (!hwait_sig)
- return 0;
-
- int was_pending = pending_signals;
-#ifdef DEBUGGING
- sigproc_printf ("pending_signals %d", was_pending);
-#endif
- if (!was_pending && !justwake)
-#ifdef DEBUGGING
- sigproc_printf ("no need to wake anything up");
-#else
- ;
-#endif
- else
- {
- wait_for_me ();
- if (!justwake)
- (void) sig_send (myself, __SIGFLUSH);
- else if (ReleaseSemaphore (sigcatch_nosync, 1, NULL))
-#ifdef DEBUGGING
- sigproc_printf ("woke up wait_sig");
-#else
- ;
-#endif
- else if (no_signals_available ())
- /*sigproc_printf ("I'm going away now")*/;
- else
- system_printf ("%E releasing sigcatch_nosync(%p)", sigcatch_nosync);
-
- }
- return was_pending;
-}
-
-/* Message 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);
-
- /* 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);
-
- if (!(hwait_sig = makethread (wait_sig, NULL, 0, "sig")))
- {
- system_printf ("cannot create wait_sig thread, %E");
- api_fatal ("terminating");
- }
-
- ProtectHandle (hwait_sig);
-
- /* sync_proc_subproc is used by proc_subproc. It serialises
- * access to the children and zombie arrays.
- */
- sync_proc_subproc = new_muto (FALSE, "sync_proc_subproc");
-
- /* Initialize waitq structure for main thread. A waitq structure is
- * allocated for each thread that executes a wait to allow multiple threads
- * to perform waits. Pre-allocate a waitq structure for the main thread.
- */
- waitq *w;
- if ((w = (waitq *)waitq_storage.get ()) == NULL)
- {
- w = &waitq_main;
- waitq_storage.set (w);
- }
- memset (w, 0, sizeof *w); // Just to be safe
-
- sigproc_printf ("process/signal handling enabled(%x)", myself->process_state);
- return;
-}
-
-/* Called on process termination to terminate signal and process threads.
- */
-void __stdcall
-sigproc_terminate (void)
-{
- HANDLE h = hwait_sig;
- hwait_sig = NULL;
-
- if (GetCurrentThreadId () == sigtid)
- {
- ForceCloseHandle (sigcomplete_main);
- for (int i = 0; i < 20; i++)
- (void) ReleaseSemaphore (sigcomplete_nonmain, 1, NULL);
- // ForceCloseHandle (sigcomplete_nonmain);
- // ForceCloseHandle (sigcatch_main);
- // ForceCloseHandle (sigcatch_nonmain);
- // ForceCloseHandle (sigcatch_nosync);
- }
- proc_terminate (); // Terminate process handling thread
-
- if (!sig_loop_wait)
- sigproc_printf ("sigproc_terminate: sigproc handling not active");
- else
- {
- sigproc_printf ("entering");
- sig_loop_wait = 0; // Tell wait_sig to exit when it is
- // finished with anything it is doing
- // sig_dispatch_pending (TRUE); // wake up and die
- /* In case of a sigsuspend */
- SetEvent (signal_arrived);
-
- /* If !hwait_sig, then the process probably hasn't even finished
- * its initialization phase.
- */
- if (0 && hwait_sig)
- {
- if (GetCurrentThreadId () != sigtid)
- WaitForSingleObject (h, 10000);
- ForceCloseHandle1 (h, hwait_sig);
-
-
- if (GetCurrentThreadId () != sigtid)
- {
- ForceCloseHandle (sigcomplete_main);
- ForceCloseHandle (sigcomplete_nonmain);
- ForceCloseHandle (sigcatch_main);
- ForceCloseHandle (sigcatch_nonmain);
- ForceCloseHandle (sigcatch_nosync);
- }
- }
- sigproc_printf ("done");
- }
-
-#if 0
- /* Set this so that subsequent tests will succeed. */
- if (!myself->dwProcessId)
- myself->dwProcessId = GetCurrentProcessId ();
-#endif
-
- return;
-}
-
-/* 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, int sig, DWORD ebp)
-{
- int rc = 1;
- DWORD tid = GetCurrentThreadId ();
- BOOL its_me;
- HANDLE thiscatch = NULL;
- HANDLE thiscomplete = NULL;
- BOOL wait_for_completion;
- sigframe thisframe;
-
- if (p == myself_nowait_nonmain)
- p = (tid == mainthread.id) ? (_pinfo *) myself : myself_nowait;
- if (!(its_me = (p == NULL || p == myself || p == myself_nowait)))
- wait_for_completion = FALSE;
- else
- {
- if (no_signals_available ())
- goto out; // Either exiting or not yet initializing
- wait_for_me ();
- wait_for_completion = p != myself_nowait;
- p = myself;
- }
-
- /* 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, sig);
- set_errno (ESRCH);
- goto out;
- }
-
- sigproc_printf ("pid %d, signal %d, its_me %d", p->pid, sig, its_me);
-
- if (its_me)
- {
- if (!wait_for_completion)
- thiscatch = sigcatch_nosync;
- else if (tid != mainthread.id)
- {
- thiscatch = sigcatch_nonmain;
- thiscomplete = sigcomplete_nonmain;
- }
- else
- {
- thiscatch = sigcatch_main;
- thiscomplete = sigcomplete_main;
- thisframe.set (mainthread, ebp);
- }
- }
- else if (!(thiscatch = getsem (p, "sigcatch", 0, 0)))
- goto out; // Couldn't get the semaphore. getsem issued
- // an error, if appropriate.
-
-#if WHEN_MULTI_THREAD_SIGNALS_WORK
- signal_dispatch *sd;
- sd = signal_dispatch_storage.get ();
- if (sd == NULL)
- sd = signal_dispatch_storage.create ();
-#endif
-
- /* Increment the sigtodo array to signify which signal to assert.
- */
- (void) InterlockedIncrement (p->getsigtodo(sig));
-
- /* Notify the process that a signal has arrived.
- */
- SetLastError (0);
-
-#if 0
- int prio;
- prio = GetThreadPriority (GetCurrentThread ());
- (void) SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_TIME_CRITICAL);
-#endif
-
- if (!ReleaseSemaphore (thiscatch, 1, NULL) && (int) GetLastError () > 0)
- {
- /* Couldn't signal the semaphore. This probably means that the
- * process is exiting.
- */
- if (!its_me)
- ForceCloseHandle (thiscatch);
- else
- {
- if (no_signals_available ())
- sigproc_printf ("I'm going away now");
- else if ((int) GetLastError () == -1)
- rc = WaitForSingleObject (thiscomplete, 500);
- else
- system_printf ("error sending signal %d to pid %d, semaphore %p, %E",
- sig, p->pid, thiscatch);
- }
- 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)
- {
- rc = WAIT_OBJECT_0;
- sigproc_printf ("Not waiting for sigcomplete. its_me %d sig %d", its_me, sig);
- if (!its_me)
- ForceCloseHandle (thiscatch);
- }
- else
- {
- sigproc_printf ("Waiting for thiscomplete %p", thiscomplete);
-
- SetLastError (0);
- rc = WaitForSingleObject (thiscomplete, WSSC);
- /* Check for strangeness due to this thread being redirected by the
- signal handler. Sometimes a WAIT_TIMEOUT will occur when the
- thread hasn't really timed out. So, check again.
- FIXME: This isn't foolproof. */
- if (rc != WAIT_OBJECT_0 &&
- WaitForSingleObject (thiscomplete, 0) == WAIT_OBJECT_0)
- rc = WAIT_OBJECT_0;
- }
-
-#if 0
- SetThreadPriority (GetCurrentThread (), prio);
-#endif
-
- if (rc == WAIT_OBJECT_0)
- rc = 0; // Successful exit
- else
- {
- /* It's an error unless sig_loop_wait == 0 (the process is exiting). */
- if (!no_signals_available ())
- system_printf ("wait for sig_complete event failed, sig %d, rc %d, %E",
- sig, rc);
- set_errno (ENOSYS);
- rc = -1;
- }
-
-out:
- sigproc_printf ("returning %d from sending signal %d", rc, sig);
- return rc;
-}
-
-/* Set pending signal from the sigtodo array
- */
-void __stdcall
-sig_set_pending (int sig)
-{
- (void) InterlockedIncrement (myself->getsigtodo(sig));
- return;
-}
-
-/* Initialize the wait_subproc thread.
- * Called from fork() or spawn() to initialize the handling of subprocesses.
- */
-void __stdcall
-subproc_init (void)
-{
- if (hwait_subproc)
- return;
-
- /* A "wakeup" handle which can be toggled to make wait_subproc reexamine
- * the hchildren array.
- */
- events[0] = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);
- if (!(hwait_subproc = makethread (wait_subproc, NULL, 0, "+proc")))
- system_printf ("cannot create wait_subproc thread, %E");
- ProtectHandle (events[0]);
- ProtectHandle (hwait_subproc);
- sigproc_printf ("started wait_subproc thread %p", hwait_subproc);
-}
-
-/* Initialize some of the memory block passed to child processes
- by fork/spawn/exec. */
-
-void __stdcall
-init_child_info (DWORD chtype, child_info *ch, pid_t pid, HANDLE subproc_ready)
-{
- memset (ch, 0, sizeof *ch);
- ch->cb = sizeof *ch;
- ch->type = chtype;
- ch->cygpid = pid;
- ch->shared_h = cygwin_shared_h;
- ch->console_h = console_shared_h;
- ch->subproc_ready = subproc_ready;
- ch->pppid_handle = myself->ppid_handle;
-}
-
-/* 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 ("nchildren %d, nzombies %d", nchildren, nzombies);
-
- /* Check already dead processes first to see if they match the criteria
- * given in w->next.
- */
- for (int i = 0; i < nzombies; i++)
- switch (stopped_or_terminated (parent_w, zombies[i]))
- {
- case -1:
- potential_match = -1;
- break;
- case 1:
- remove_zombie (i);
- potential_match = 1;
- goto out;
- }
-
- sigproc_printf ("checking alive children");
-
- /* No dead terminated children matched. Check for stopped children. */
- for (int i = 0; i < nchildren; i++)
- switch (stopped_or_terminated (parent_w, pchildren[i]))
- {
- case -1:
- potential_match = -1;
- break;
- case 1:
- potential_match = 1;
- goto out;
- }
-
-out:
- sigproc_printf ("returning %d", potential_match);
- return potential_match;
-}
-
-/* Get or create a process specific semaphore used in message passing.
- */
-static HANDLE __stdcall
-getsem (_pinfo *p, const char *str, int init, int max)
-{
- HANDLE h;
-
- if (p != NULL)
- {
- if (!proc_can_be_signalled (p))
- {
- set_errno (ESRCH);
- return NULL;
- }
- int wait = 10000;
- sigproc_printf ("pid %d, ppid %d, wait %d, initializing %x", p->pid, p->ppid, wait,
- ISSTATE (p, PID_INITIALIZING));
- for (int i = 0; ISSTATE (p, PID_INITIALIZING) && i < wait; i++)
- Sleep (1);
- }
-
- SetLastError (0);
- if (p == NULL)
- {
- char sa_buf[1024];
-
- DWORD winpid = GetCurrentProcessId ();
- h = CreateSemaphore (allow_ntsec ? sec_user (sa_buf) : &sec_none_nih,
- init, max, str = shared_name (str, winpid));
- p = myself;
- }
- else
- {
- h = OpenSemaphore (SEMAPHORE_ALL_ACCESS, FALSE,
- str = shared_name (str, p->dwProcessId));
-
- if (h == NULL)
- {
- if (GetLastError () == ERROR_FILE_NOT_FOUND && !proc_exists (p))
- set_errno (ESRCH);
- else
- set_errno (EPERM);
- return NULL;
- }
- }
-
- if (!h)
- {
- system_printf ("can't %s %s, %E", p ? "open" : "create", str);
- set_errno (ESRCH);
- }
- return h;
-}
-
-/* Get the sync_proc_subproc muto to control access to
- * children, zombie 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)
- return FALSE;
- if (sync_proc_subproc->acquire (WPSP))
- {
- lastwhat = what;
- return TRUE;
- }
- if (!sync_proc_subproc)
- return FALSE;
- system_printf ("Couldn't aquire sync_proc_subproc for(%d,%d), %E, last %d",
- what, val, lastwhat);
- return TRUE;
-}
-
-/* Remove a zombie from zombies by swapping it with the last child in the list.
- */
-static void __stdcall
-remove_zombie (int ci)
-{
- sigproc_printf ("removing %d, pid %d, nzombies %d", ci, zombies[ci]->pid,
- nzombies);
-
- if (zombies[ci])
- {
- ForceCloseHandle1 (zombies[ci]->hProcess, childhProc);
- ForceCloseHandle1 (zombies[ci]->pid_handle, pid_handle);
- zombies[ci].release ();
- }
-
- if (ci < --nzombies)
- zombies[ci] = zombies[nzombies];
-
- return;
-}
-
-/* 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
- * 1 if stopped or terminated child matches parent_w->next criteria
- * -1 if a non-stopped/terminated child matches parent_w->next criteria
- * 0 if child does not match parent_w->next criteria
- */
-static int __stdcall
-stopped_or_terminated (waitq *parent_w, _pinfo *child)
-{
- int potential_match;
- waitq *w = parent_w->next;
-
- sigproc_printf ("considering pid %d", child->pid);
- if (w->pid == -1)
- potential_match = 1;
- else if (w->pid == 0)
- potential_match = child->pgid == myself->pgid;
- else if (w->pid < 0)
- potential_match = child->pgid == -w->pid;
- else
- potential_match = (w->pid == child->pid);
-
- if (!potential_match)
- return 0;
-
- BOOL terminated;
-
- if ((terminated = child->process_state == PID_ZOMBIE) ||
- ((w->options & WUNTRACED) && child->stopsig))
- {
- 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 /* Should only get here when child has been moved to the zombies array */
- {
- DWORD status;
- if (!GetExitCodeProcess (child->hProcess, &status))
- status = 0xffff;
- if (status & EXIT_SIGNAL)
- w->status = (status >> 8) & 0xff; /* exited due to signal */
- else
- w->status = (status & 0xff) << 8; /* exited via "exit ()" */
-
- 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 1;
- }
-
- return -potential_match;
-}
-
-/* Process signals by waiting for a semaphore to become signaled.
- * Then scan an in-memory array representing queued signals.
- * Executes in a separate thread.
- *
- * Signals sent from this process are sent a completion signal so
- * that returns from kill/raise do not occur until the signal has
- * has been handled, as per POSIX.
- */
-static DWORD WINAPI
-wait_sig (VOID *)
-{
- /* Initialization */
- (void) SetThreadPriority (hwait_sig, WAIT_SIG_PRIORITY);
-
- /* sigcatch_nosync - semaphore incremented by sig_dispatch_pending and
- * by foreign processes to force an examination of
- * the sigtodo array.
- * sigcatch_main - ditto for local main thread.
- * sigcatch_nonmain - ditto for local non-main threads.
- *
- * sigcomplete_main - event used to signal main thread on signal
- * completion
- * sigcomplete_nonmain - semaphore signaled for non-main thread on signal
- * completion
- */
- sigcatch_nosync = getsem (NULL, "sigcatch", 0, MAXLONG);
- sigcatch_nonmain = CreateSemaphore (&sec_none_nih, 0, MAXLONG, NULL);
- sigcatch_main = CreateSemaphore (&sec_none_nih, 0, MAXLONG, NULL);
- sigcomplete_nonmain = CreateSemaphore (&sec_none_nih, 0, MAXLONG, NULL);
- sigcomplete_main = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);
- sigproc_printf ("sigcatch_nonmain %p, sigcatch_main %p", sigcatch_nonmain, sigcatch_main);
-
- /* Setting dwProcessId flags that this process is now capable of receiving
- * signals. Prior to this, dwProcessId was set to the windows pid of
- * of the original windows process which spawned us unless this was a
- * "toplevel" process.
- */
- myself->dwProcessId = GetCurrentProcessId ();
- myself->process_state |= PID_ACTIVE;
- myself->process_state &= ~PID_INITIALIZING;
-
- ProtectHandle (sigcatch_nosync);
- ProtectHandle (sigcatch_nonmain);
- ProtectHandle (sigcatch_main);
- ProtectHandle (sigcomplete_nonmain);
- ProtectHandle (sigcomplete_main);
-
- /* If we've been execed, then there is still a stub left in the previous
- * windows process waiting to see if it's started a cygwin process or not.
- * Signalling subproc_ready indicates that we are a cygwin process.
- */
- if (child_proc_info &&
- (child_proc_info->type == PROC_EXEC || child_proc_info->type == PROC_SPAWN))
- {
- debug_printf ("subproc_ready %p", child_proc_info->subproc_ready);
- if (!SetEvent (child_proc_info->subproc_ready))
- system_printf ("SetEvent (subproc_ready) failed, %E");
- ForceCloseHandle (child_proc_info->subproc_ready);
- /* Initialize an "indirect" pid block so that if someone looks up this
- process via its Windows PID it will be redirected to the appropriate
- Cygwin PID shared memory block. */
- static pinfo NO_COPY myself_identity;
- myself_identity.init (cygwin_pid (myself->dwProcessId), PID_EXECED);
- }
-
- SetEvent (wait_sig_inited);
- sigtid = GetCurrentThreadId ();
-
- HANDLE catchem[] = {sigcatch_main, sigcatch_nonmain, sigcatch_nosync};
- sigproc_printf ("Ready. dwProcessid %d", myself->dwProcessId);
- for (;;)
- {
- DWORD rc = WaitForMultipleObjects (3, catchem, FALSE, sig_loop_wait);
-
- /* sigproc_terminate sets sig_loop_wait to zero to indicate that
- * this thread should terminate.
- */
- if (rc == WAIT_TIMEOUT)
- {
- if (!sig_loop_wait)
- break; // Exiting
- else
- continue;
- }
-
- if (rc == WAIT_FAILED)
- {
- if (sig_loop_wait != 0)
- system_printf ("WFMO failed, %E");
- break;
- }
-
- rc -= WAIT_OBJECT_0;
- int dispatched = FALSE;
- sigproc_printf ("awake");
- /* A sigcatch semaphore has been signaled. Scan the sigtodo
- * array looking for any unprocessed signals.
- */
- pending_signals = -1;
- int saw_pending_signals = 0;
- int saw_sigchld = 0;
- int dispatched_sigchld = 0;
- for (int sig = -__SIGOFFSET; sig < NSIG; sig++)
- {
- while (InterlockedDecrement (myself->getsigtodo(sig)) >= 0)
- {
- if (sig == SIGCHLD)
- saw_sigchld = 1;
-
- if (sig > 0 && sig != SIGCONT && sig != SIGKILL && sig != SIGSTOP &&
- (sigismember (& myself->getsigmask (), sig) ||
- myself->process_state & PID_STOPPED))
- {
- sigproc_printf ("sig %d blocked", sig);
- break;
- }
-
- /* Found a signal to process */
- sigproc_printf ("processing signal %d", sig);
- switch (sig)
- {
- case __SIGFLUSH:
- /* just forcing the loop */
- break;
-
- /* Internal signal to force a flush of strace data to disk. */
- case __SIGSTRACE:
- // proc_strace (); // Dump cached strace.prntf stuff.
- break;
-
- /* Signalled from a child process that it has stopped */
- case __SIGCHILDSTOPPED:
- sigproc_printf ("Received child stopped notification");
- dispatched |= sig_handle (SIGCHLD);
- if (proc_subproc (PROC_CHILDSTOPPED, 0))
- dispatched |= 1;
- break;
-
- /* A normal UNIX signal */
- default:
- sigproc_printf ("Got signal %d", sig);
- int wasdispatched = sig_handle (sig);
- dispatched |= wasdispatched;
- if (sig == SIGCHLD && wasdispatched)
- dispatched_sigchld = 1;
- goto nextsig;
- }
- }
- /* Decremented too far. */
- if (InterlockedIncrement (myself->getsigtodo(sig)) > 0)
- saw_pending_signals = 1;
- nextsig:
- continue;
- }
-
- /* FIXME: The dispatched stuff probably isn't needed anymore. */
- if (dispatched >= 0 && pending_signals < 0 && !saw_pending_signals)
- pending_signals = 0;
-
- if (nzombies && saw_sigchld && !dispatched_sigchld)
- proc_subproc (PROC_CLEARWAIT, 0);
- /* Signal completion of signal handling depending on which semaphore
- * woke up the WaitForMultipleObjects above.
- */
- switch (rc)
- {
- case 0:
- SetEvent (sigcomplete_main);
- break;
- case 1:
- ReleaseSemaphore (sigcomplete_nonmain, 1, NULL);
- break;
- default:
- /* Signal from another process. No need to synchronize. */
- break;
- }
-
- sigproc_printf ("looping");
- }
-
- sigproc_printf ("done");
- return 0;
-}
-
-/* Wait for subprocesses to terminate. Executes in a separate thread. */
-static DWORD WINAPI
-wait_subproc (VOID *)
-{
- sigproc_printf ("starting");
- int errloop = 0;
-
- for (;;)
- {
- DWORD rc = WaitForMultipleObjects (nchildren + 1, events, FALSE,
- proc_loop_wait);
- if (rc == WAIT_TIMEOUT)
- if (!proc_loop_wait)
- break; // Exiting
- else
- continue;
-
- if (rc == WAIT_FAILED)
- {
- if (!proc_loop_wait)
- break;
-
- /* It's ok to get an ERROR_INVALID_HANDLE since another thread may have
- closed a handle in the children[] array. So, we try looping a couple
- of times to stabilize. FIXME - this is not foolproof. Probably, this
- thread should be responsible for closing the children. */
- if (!errloop++)
- proc_subproc (PROC_NOTHING, 0); // Just synchronize and continue
- if (errloop < 10)
- continue;
-
- system_printf ("wait failed. nchildren %d, wait %d, %E",
- nchildren, proc_loop_wait);
-
- for (int i = 0; i <= nchildren; i++)
- if ((rc = WaitForSingleObject (events[i], 0)) == WAIT_OBJECT_0 ||
- rc == WAIT_TIMEOUT)
- continue;
- else if (i == 0)
- system_printf ("nchildren %d, event[%d] %p, %E", nchildren, i, events[i]);
- else
- {
- system_printf ("nchildren %d, event[%d] %p, pchildren[%d] %p, events[0] %p, %E",
- nchildren, i, events[i], i - 1, (_pinfo *) pchildren[i - 1], events[0]);
- system_printf ("pid %d, dwProcessId %u, hProcess %p, progname '%s'",
- pchildren[i - 1]->pid, pchildren[i - 1]->dwProcessId,
- pchildren[i - 1]->hProcess, pchildren[i - 1]->progname);
- }
- break;
- }
-
- errloop = 0;
- rc -= WAIT_OBJECT_0;
- if (rc-- != 0)
- {
- rc = proc_subproc (PROC_CHILDTERMINATED, rc);
- if (!proc_loop_wait) // Don't bother if wait_subproc is
- break; // exiting
-
- /* 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. */
- if (rc)
- sig_send (myself_nowait, SIGCHLD);
- }
- sigproc_printf ("looping");
- }
-
- ForceCloseHandle (events[0]);
- events[0] = NULL;
- sigproc_printf ("done");
- return 0;
-}
-
-extern "C" {
-/* Provide a stack frame when calling WaitFor* functions */
-
-#undef WaitForSingleObject
-
-DWORD __stdcall
-WFSO (HANDLE hHandle, DWORD dwMilliseconds)
-{
- DWORD ret;
- sigframe thisframe (mainthread);
- ret = WaitForSingleObject (hHandle, dwMilliseconds);
- return ret;
-}
-
-#undef WaitForMultipleObjects
-
-DWORD __stdcall
-WFMO (DWORD nCount, CONST HANDLE *lpHandles, BOOL fWaitAll, DWORD dwMilliseconds)
-{
- DWORD ret;
- sigframe thisframe (mainthread);
- ret = WaitForMultipleObjects (nCount, lpHandles, fWaitAll, dwMilliseconds);
- return ret;
-}
-}
diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h
deleted file mode 100644
index b7c1f2bb7..000000000
--- a/winsup/cygwin/sigproc.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* sigproc.h
-
- Copyright 1997, 1998, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <signal.h>
-
-#define EXIT_SIGNAL 0x010000
-#define EXIT_REPARENTING 0x020000
-#define EXIT_NOCLOSEALL 0x040000
-
-enum procstuff
-{
- PROC_ADDCHILD = 1, // add a new subprocess to list
- PROC_CHILDSTOPPED = 2, // a child stopped
- PROC_CHILDTERMINATED = 3, // a child died
- PROC_CLEARWAIT = 4, // clear all waits - signal arrived
- PROC_WAIT = 5, // setup for wait() for subproc
- PROC_NOTHING = 6 // nothing, really
-};
-
-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;
-
-struct sigthread
-{
- DWORD id;
- DWORD frame;
- CRITICAL_SECTION lock;
- void init (const char *s);
-};
-
-class sigframe
-{
-private:
- sigthread *st;
-
-public:
- void set (sigthread &t, DWORD ebp)
- {
- st = &t;
- t.frame = ebp;
- }
-
- sigframe () {st = NULL;}
- sigframe (sigthread &t, DWORD ebp = (DWORD) __builtin_frame_address (0))
- {
- if (!t.frame && t.id == GetCurrentThreadId ())
- set (t, ebp);
- else
- st = NULL;
- }
- ~sigframe ()
- {
- if (st)
- {
- EnterCriticalSection (&st->lock);
- st->frame = 0;
- LeaveCriticalSection (&st->lock);
- st = NULL;
- }
- }
-};
-
-extern sigthread mainthread;
-extern HANDLE signal_arrived;
-
-BOOL __stdcall my_parent_is_alive ();
-extern "C" int __stdcall sig_dispatch_pending (int force = FALSE);
-extern "C" void __stdcall set_process_mask (sigset_t newmask);
-int __stdcall sig_handle (int);
-void __stdcall sig_clear (int);
-void __stdcall sig_set_pending (int);
-int __stdcall handle_sigsuspend (sigset_t);
-
-int __stdcall proc_subproc (DWORD, DWORD);
-
-class _pinfo;
-void __stdcall proc_terminate ();
-void __stdcall sigproc_init ();
-void __stdcall subproc_init ();
-void __stdcall sigproc_terminate ();
-BOOL __stdcall proc_exists (_pinfo *) __attribute__ ((regparm(1)));
-BOOL __stdcall pid_exists (pid_t) __attribute__ ((regparm(1)));
-int __stdcall sig_send (_pinfo *, int, DWORD ebp = (DWORD) __builtin_frame_address (0)) __attribute__ ((regparm(3)));
-void __stdcall signal_fixup_after_fork ();
-void __stdcall signal_fixup_after_exec (bool);
-
-extern char myself_nowait_dummy[];
-extern char myself_nowait_nonmain_dummy[];
-
-#define WAIT_SIG_EXITING (WAIT_OBJECT_0 + 1)
-
-#define myself_nowait ((_pinfo *)myself_nowait_dummy)
-#define myself_nowait_nonmain ((_pinfo *)myself_nowait_nonmain_dummy)
diff --git a/winsup/cygwin/smallprint.c b/winsup/cygwin/smallprint.c
deleted file mode 100644
index ac90df3d8..000000000
--- a/winsup/cygwin/smallprint.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/* smallprint.c: small print routines for WIN32
-
- Copyright 1996, 1998, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <windows.h>
-
-int __small_sprintf (char *dst, const char *fmt,...);
-int __small_vsprintf (char *dst, const char *fmt, va_list ap);
-
-static char *
-rn (char *dst, int base, int dosign, int val, int len, int pad)
-{
- /* longest number is 4294967295, 10 digits */
- unsigned uval;
- char res[10];
- static const char str[16] = "0123456789ABCDEF";
- int l = 0;
-
- if (dosign && val < 0)
- {
- *dst++ = '-';
- uval = -val;
- }
- else if (dosign > 0 && val > 0)
- {
- *dst++ = '+';
- uval = val;
- }
- else
- {
- uval = val;
- }
-
- do
- {
- res[l++] = str[uval % base];
- uval /= base;
- }
- while (uval);
-
- while (len -- > l)
- *dst++ = pad;
-
- while (l > 0)
- {
- *dst++ = res[--l];
- }
-
- return dst;
-}
-
-int
-__small_vsprintf (char *dst, const char *fmt, va_list ap)
-{
- char tmp[MAX_PATH + 1];
- char *orig = dst;
- const char *s;
-
- 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);
- }
- }
- break;
- case 'E':
- strcpy (dst, "Win32 error ");
- dst = rn (dst + sizeof ("Win32 error"), 10, 0, GetLastError (), len, pad);
- break;
- case 'd':
- dst = rn (dst, 10, addsign, va_arg (ap, int), len, pad);
- break;
- case 'u':
- dst = rn (dst, 10, 0, va_arg (ap, int), len, pad);
- break;
- case 'p':
- *dst++ = '0';
- *dst++ = 'x';
- /* fall through */
- case 'x':
- dst = rn (dst, 16, 0, va_arg (ap, int), len, pad);
- break;
- case 'P':
- if (!GetModuleFileName (NULL, tmp, 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;
- default:
- *dst++ = '?';
- *dst++ = fmt[-1];
- }
- endfor:
- break;
- }
- }
- }
- *dst = 0;
- return dst - orig;
-}
-
-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;
-}
-
-void
-small_printf (const char *fmt,...)
-{
- char buf[2000];
- 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, 0);
- FlushFileBuffers (GetStdHandle (STD_ERROR_HANDLE));
-}
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
deleted file mode 100644
index 030e6b6ab..000000000
--- a/winsup/cygwin/spawn.cc
+++ /dev/null
@@ -1,1030 +0,0 @@
-/* spawn.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <unistd.h>
-#include <process.h>
-#include <sys/wait.h>
-#include <errno.h>
-#include <limits.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <ctype.h>
-#include "cygerrno.h"
-#include <sys/cygwin.h>
-#include "fhandler.h"
-#include "path.h"
-#include "dtable.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "cygheap.h"
-#include "child_info.h"
-#include "pinfo.h"
-#define NEED_VFORK
-#include "perthread.h"
-#include "registry.h"
-#include "environ.h"
-#include "security.h"
-
-#define LINE_BUF_CHUNK (MAX_PATH * 2)
-
-static suffix_info std_suffixes[] =
-{
- suffix_info (".exe", 1), suffix_info ("", 1),
- suffix_info (".com"), suffix_info (".cmd"),
- suffix_info (".bat"), suffix_info (".dll"),
- suffix_info (NULL)
-};
-
-HANDLE hExeced;
-
-/* 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)
-{
- char *ext;
-
- debug_printf ("prog '%s'", prog);
- buf.check (prog, PC_SYM_FOLLOW | PC_FULL, std_suffixes);
-
- if (buf.file_attributes () & FILE_ATTRIBUTE_DIRECTORY)
- ext = NULL;
- else if (buf.known_suffix)
- ext = buf + (buf.known_suffix - buf.get_win32 ());
- else
- ext = strchr (buf, '\0');
-
- debug_printf ("buf %s, suffix found '%s'", (char *) buf, 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,
- int null_if_notfound, const char **known_suffix)
-{
- const char *suffix = "";
- debug_printf ("find_exec (%s)", name);
- char *retval = buf;
-
- /* 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 ((suffix = perhaps_suffix (name, buf)) != NULL)
- goto out;
-
- win_env *winpath;
- const char *path;
- char tmp[MAX_PATH];
-
- /* Return the error condition if this is an absolute path or if there
- is no PATH to search. */
- if (strchr (name, '/') || strchr (name, '\\') ||
- isdrive (name) ||
- !(winpath = getwinenv (mywinenv)) ||
- !(path = winpath->get_native ()) ||
- *path == '\0')
- goto errout;
-
- debug_printf ("%s%s", mywinenv, path);
-
- /* Iterate over the specified path, looking for the file with and
- without executable extensions. */
- do
- {
- char *eotmp = strccpy (tmp, &path, ';');
- /* An empty path or '.' means the current directory, but we've
- already tried that. */
- if (tmp[0] == '\0' || (tmp[0] == '.' && tmp[1] == '\0'))
- continue;
-
- *eotmp++ = '\\';
- strcpy (eotmp, name);
-
- debug_printf ("trying %s", tmp);
-
- if ((suffix = perhaps_suffix (tmp, buf)) != NULL)
- goto out;
- }
- while (*path && *++path);
-
-errout:
- /* Couldn't find anything in the given path.
- Take the appropriate action based on null_if_not_found. */
- if (null_if_notfound)
- retval = NULL;
- else
- buf.check (name);
-
-out:
- debug_printf ("%s = find_exec (%s)", (char *) buf, name);
- if (known_suffix)
- *known_suffix = suffix ?: strchr (buf, '\0');
- return retval;
-}
-
-/* Utility for spawn_guts. */
-
-static HANDLE
-handle (int n, int direction)
-{
- fhandler_base *fh = fdtab[n];
-
- if (!fh)
- return INVALID_HANDLE_VALUE;
- if (fh->get_close_on_exec ())
- return INVALID_HANDLE_VALUE;
- if (direction == 0)
- return fh->get_handle ();
- return fh->get_output_handle ();
-}
-
-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]));
-}
-
-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);
- 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) >= 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;
-}
-
-class av
-{
- char **argv;
- int calloced;
-public:
- int argc;
- av (int ac, const char * const *av) : calloced (0), argc (ac)
- {
- argv = (char **) cmalloc (HEAP_1_ARGV, (argc + 5) * sizeof (char *));
- memcpy (argv, av, (argc + 1) * sizeof (char *));
- }
- ~av ()
- {
- for (int i = 0; i < calloced; 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 = 1;
- }
- }
- 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
-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 *));
- char buf[MAX_PATH + 1];
- if (conv)
- {
- cygwin_conv_to_posix_path (what, buf);
- char *p = strchr (buf, '\0') - 4;
- if (p > buf && strcasematch (p, ".exe"))
- *p = '\0';
- what = buf;
- }
- *argv = cstrdup1 (what);
- argc++;
- calloced++;
- return 1;
-}
-
-static int __stdcall
-spawn_guts (HANDLE hToken, const char * prog_arg, const char *const *argv,
- const char *const envp[], int mode)
-{
- BOOL rc;
- pid_t cygpid;
- sigframe thisframe (mainthread);
-
- MALLOC_CHECK;
-
- if (prog_arg == NULL)
- {
- syscall_printf ("prog_arg is NULL");
- set_errno(EINVAL);
- return -1;
- }
-
- syscall_printf ("spawn_guts (%.132s)", prog_arg);
-
- if (argv == NULL)
- {
- syscall_printf ("argv is NULL");
- set_errno(EINVAL);
- return (-1);
- }
-
- path_conv real_path;
-
- linebuf one_line;
-
- STARTUPINFO si = {0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL};
-
- child_info_spawn ciresrv;
- si.lpReserved2 = (LPBYTE) &ciresrv;
- si.cbReserved2 = sizeof (ciresrv);
-
- DWORD chtype;
- if (mode != _P_OVERLAY && mode != _P_VFORK)
- chtype = PROC_SPAWN;
- else
- chtype = PROC_EXEC;
-
- HANDLE spr = CreateEvent(&sec_all, TRUE, FALSE, NULL);
- ProtectHandle (spr);
-
- init_child_info (chtype, &ciresrv, (mode == _P_OVERLAY) ? myself->pid : 1, spr);
- if (!DuplicateHandle (hMainProc, hMainProc, hMainProc, &ciresrv.parent, 0, 1,
- DUPLICATE_SAME_ACCESS))
- {
- system_printf ("couldn't create handle to myself for child, %E");
- return -1;
- }
-
- ciresrv.moreinfo = (cygheap_exec_info *) ccalloc (HEAP_1_EXEC, 1, sizeof (cygheap_exec_info));
- ciresrv.moreinfo->old_title = NULL;
- ciresrv.moreinfo->fds = fdtab;
- ciresrv.moreinfo->nfds = fdtab.size;
-
- /* 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 */;
-
- av newargv (ac, argv);
-
- int null_app_name = 0;
- 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);
- 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, argv[0]);
- null_app_name = 1;
- goto skip_arg_parsing;
- }
-
- const char *ext;
- if ((ext = perhaps_suffix (prog_arg, real_path)) == NULL)
- {
- set_errno (ENOENT);
- return -1;
- }
-
- MALLOC_CHECK;
-
- /* If the file name ends in either .exe, .com, .bat, or .cmd we assume
- that it is NOT a script file */
- while (*ext == '\0')
- {
- HANDLE hnd = CreateFileA (real_path,
- GENERIC_READ,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- &sec_none_nih,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
- 0);
- if (hnd == INVALID_HANDLE_VALUE)
- {
- __seterrno ();
- return -1;
- }
-
- DWORD done;
-
- char buf[2 * MAX_PATH + 1];
- buf[0] = buf[1] = buf[2] = buf[sizeof(buf) - 1] = '\0';
- if (!ReadFile (hnd, buf, sizeof (buf) - 1, &done, 0))
- {
- CloseHandle (hnd);
- __seterrno ();
- return -1;
- }
-
- CloseHandle (hnd);
-
- if (buf[0] == 'M' && buf[1] == 'Z')
- break;
-
- debug_printf ("%s is a script", (char *) real_path);
-
- char *pgm, *arg1;
-
- if (buf[0] != '#' || buf[1] != '!')
- {
- pgm = (char *) "/bin/sh";
- arg1 = NULL;
- }
- else
- {
- char *ptr;
- pgm = buf + 2;
- pgm += strspn (pgm, " \t");
- for (ptr = pgm, arg1 = NULL;
- *ptr && *ptr != '\r' && *ptr != '\n';
- 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 || *newptr == '\r' || *newptr == '\n')
- break;
- arg1 = newptr;
- ptr = newptr - 1;
- }
-
- *ptr = '\0';
- }
-
- /* Replace argv[0] with the full path to the script if this is the
- first time through the loop. */
- newargv.replace0_maybe (prog_arg);
-
- /* pointers:
- * pgm interpreter name
- * arg1 optional string
- */
- if (arg1)
- newargv.unshift (arg1);
-
- find_exec (pgm, real_path, "PATH=", 0, &ext);
- newargv.unshift (real_path, 1);
- }
-
- if (real_path.iscygexec ())
- newargv.dup_all ();
- else
- {
- 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\""))
- one_line.add (a, len);
- else
- {
- one_line.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)
- {
- one_line.add (a, p - a);
- /* Find length of string of backslashes */
- int n = strspn (p, "\\");
- if (!n)
- one_line.add ("\\\"", 2); /* No backslashes, so it must be a ".
- The " has to be protected with a backslash. */
- else
- {
- one_line.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] == '"')
- one_line.add (p, n);
- p += n - 1; /* Point to last backslash */
- }
- }
- if (*a)
- one_line.add (a);
- one_line.add ("\"", 1);
- }
- MALLOC_CHECK;
- one_line.add (" ", 1);
- MALLOC_CHECK;
- }
-
- MALLOC_CHECK;
- if (one_line.ix)
- one_line.buf[one_line.ix - 1] = '\0';
- else
- one_line.add ("", 1);
- MALLOC_CHECK;
- }
-
- newargv.all_calloced ();
- ciresrv.moreinfo->argc = newargv.argc;
- ciresrv.moreinfo->argv = newargv;
-
- cygcwd.copy (ciresrv.moreinfo->cwd_posix, ciresrv.moreinfo->cwd_win32,
- ciresrv.moreinfo->cwd_hash);
-
- ciresrv.moreinfo->envc = envsize (envp, 1);
- ciresrv.moreinfo->envp = (char **) cmalloc (HEAP_1_ARGV, ciresrv.moreinfo->envc);
- ciresrv.hexec_proc = hexec_proc;
- char **c;
- const char * const *e;
- for (c = ciresrv.moreinfo->envp, e = envp; *e;)
- *c++ = cstrdup1 (*e++);
- *c = NULL;
- if (mode != _P_OVERLAY ||
- !DuplicateHandle (hMainProc, myself.shared_handle (), hMainProc, &ciresrv.moreinfo->myself_pinfo, 0,
- TRUE, DUPLICATE_SAME_ACCESS))
- ciresrv.moreinfo->myself_pinfo = NULL;
-
-skip_arg_parsing:
- PROCESS_INFORMATION pi = {NULL, 0, 0, 0};
- si.lpReserved = NULL;
- si.lpDesktop = NULL;
- si.dwFlags = STARTF_USESTDHANDLES;
- si.hStdInput = handle (0, 0); /* Get input handle */
- si.hStdOutput = handle (1, 1); /* Get output handle */
- si.hStdError = handle (2, 1); /* Get output handle */
- si.cb = sizeof (si);
-
- int flags = CREATE_DEFAULT_ERROR_MODE | GetPriorityClass (hMainProc);
-
- if (mode == _P_DETACH || !set_console_state_for_spawn ())
- flags |= DETACHED_PROCESS;
- if (mode != _P_OVERLAY)
- flags |= CREATE_SUSPENDED;
-
- /* Some file types (currently only sockets) 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 (fdtab.need_fixup_before ())
- flags |= CREATE_SUSPENDED;
-
-
- /* Build windows style environment list */
- char *envblock;
- if (real_path.iscygexec ())
- envblock = NULL;
- else
- envblock = winenv (envp, 0);
-
- ciresrv.cygheap = cygheap;
- ciresrv.cygheap_max = cygheap_max;
-
- /* Preallocated buffer for `sec_user' call */
- char sa_buf[1024];
-
- if (!hToken && cygheap->user.token != INVALID_HANDLE_VALUE)
- hToken = cygheap->user.token;
-
- const char *runpath = null_app_name ? NULL : (const char *) real_path;
-
- syscall_printf ("spawn_guts null_app_name %d (%s, %.132s)", null_app_name, runpath, one_line.buf);
-
- cygbench ("spawn-guts");
- if (!hToken)
- {
- ciresrv.moreinfo->uid = getuid ();
- rc = CreateProcess (runpath, /* image name - with full path */
- one_line.buf, /* what was passed to exec */
- /* process security attrs */
- allow_ntsec ? sec_user (sa_buf) : &sec_all_nih,
- /* thread security attrs */
- allow_ntsec ? sec_user (sa_buf) : &sec_all_nih,
- TRUE, /* inherit handles from parent */
- flags,
- envblock,/* environment */
- 0, /* use current drive/directory */
- &si,
- &pi);
- }
- else
- {
- /* allow the child to interact with our window station/desktop */
- HANDLE hwst, hdsk;
- SECURITY_INFORMATION dsi = DACL_SECURITY_INFORMATION;
- DWORD n;
- char wstname[1024];
- char dskname[1024];
-
- ciresrv.moreinfo->uid = USHRT_MAX;
- hwst = GetProcessWindowStation();
- SetUserObjectSecurity(hwst, &dsi, get_null_sd ());
- GetUserObjectInformation(hwst, UOI_NAME, wstname, 1024, &n);
- hdsk = GetThreadDesktop(GetCurrentThreadId());
- SetUserObjectSecurity(hdsk, &dsi, get_null_sd ());
- GetUserObjectInformation(hdsk, UOI_NAME, dskname, 1024, &n);
- strcat (wstname, "\\");
- strcat (wstname, dskname);
- si.lpDesktop = wstname;
-
- char tu[1024];
- PSID sid = NULL;
- DWORD ret_len;
- if (GetTokenInformation (hToken, TokenUser,
- (LPVOID) &tu, sizeof tu,
- &ret_len))
- sid = ((TOKEN_USER *) &tu)->User.Sid;
- else
- system_printf ("GetTokenInformation: %E");
-
- /* Retrieve security attributes before setting psid to NULL
- since it's value is needed by `sec_user'. */
- PSECURITY_ATTRIBUTES sec_attribs = allow_ntsec && sid
- ? sec_user (sa_buf, sid)
- : &sec_all_nih;
-
- /* Remove impersonation */
- uid_t uid = geteuid();
- if (cygheap->user.impersonated
- && cygheap->user.token != INVALID_HANDLE_VALUE)
- seteuid (cygheap->user.orig_uid);
-
- /* Load users registry hive. */
- load_registry_hive (sid);
-
- rc = CreateProcessAsUser (hToken,
- runpath, /* image name - with full path */
- one_line.buf, /* what was passed to exec */
- sec_attribs, /* process security attrs */
- sec_attribs, /* thread security attrs */
- TRUE, /* inherit handles from parent */
- flags,
- envblock,/* environment */
- 0, /* use current drive/directory */
- &si,
- &pi);
- /* Restore impersonation. In case of _P_OVERLAY this isn't
- allowed since it would overwrite child data. */
- if (mode != _P_OVERLAY && mode != _P_VFORK
- && cygheap->user.impersonated
- && cygheap->user.token != INVALID_HANDLE_VALUE)
- seteuid (uid);
- }
-
- MALLOC_CHECK;
- if (envblock)
- free (envblock);
- MALLOC_CHECK;
-
- /* 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 (spr)
- ForceCloseHandle (spr);
- return -1;
- }
-
- /* Fixup the parent datastructure if needed and resume the child's
- main thread. */
- if (fdtab.need_fixup_before ())
- {
- fdtab.fixup_before_exec (pi.dwProcessId);
- if (mode == _P_OVERLAY)
- ResumeThread (pi.hThread);
- }
-
- if (mode == _P_OVERLAY)
- cygpid = myself->pid;
- else
- cygpid = cygwin_pid (pi.dwProcessId);
-
- /* We print the original program name here so the user can see that too. */
- syscall_printf ("%d = spawn_guts (%s, %.132s)",
- rc ? cygpid : (unsigned int) -1, prog_arg, one_line.buf);
-
- /* Name the handle similarly to proc_subproc. */
- ProtectHandle1 (pi.hProcess, childhProc);
-
- if (mode == _P_OVERLAY)
- {
- /* These are both duplicated in the child code. We do this here,
- primarily for strace. */
- strcpy (myself->progname, real_path);
- strace.execing = 1;
- hExeced = pi.hProcess;
- }
- else
- {
- myself->set_has_pgid_children ();
- ProtectHandle (pi.hThread);
- pinfo child (cygpid, 1);
- if (!child)
- {
- set_errno (EAGAIN);
- syscall_printf ("-1 = spawnve (), process table full");
- return -1;
- }
- child->progname[0] = '\0';
- child->dwProcessId = pi.dwProcessId;
- child->hProcess = pi.hProcess;
- child.remember ();
- /* Start the child running */
- ResumeThread (pi.hThread);
- }
-
- ForceCloseHandle (pi.hThread);
-
- sigproc_printf ("spawned windows pid %d", pi.dwProcessId);
-
- if (hToken && hToken != cygheap->user.token)
- CloseHandle (hToken);
-
- DWORD res;
- BOOL exited;
-
- HANDLE waitbuf[3] = {pi.hProcess, signal_arrived, spr};
- int nwait = 3;
-
- res = 0;
- exited = FALSE;
- MALLOC_CHECK;
- for (int i = 0; i < 100; i++)
- {
- switch (WaitForMultipleObjects (nwait, waitbuf, FALSE, INFINITE))
- {
- case WAIT_OBJECT_0:
- sigproc_printf ("subprocess exited");
- DWORD exitcode;
- if (!GetExitCodeProcess (pi.hProcess, &exitcode))
- exitcode = 1;
- res |= exitcode;
- exited = TRUE;
- break;
- case WAIT_OBJECT_0 + 1:
- sigproc_printf ("signal arrived");
- ResetEvent (signal_arrived);
- continue;
- case WAIT_OBJECT_0 + 2:
- if (mode == _P_OVERLAY)
- {
- res |= EXIT_REPARENTING;
- if (!my_parent_is_alive ())
- {
- nwait = 1;
- sigproc_terminate ();
- continue;
- }
- }
- break;
- case WAIT_FAILED:
- system_printf ("wait failed: nwait %d, pid %d, winpid %d, %E",
- nwait, myself->pid, myself->dwProcessId);
- system_printf ("waitbuf[0] %p %d", waitbuf[0],
- WaitForSingleObject (waitbuf[0], 0));
- system_printf ("waitbuf[1] %p = %d", waitbuf[1],
- WaitForSingleObject (waitbuf[1], 0));
- system_printf ("waitbuf[w] %p = %d", waitbuf[2],
- WaitForSingleObject (waitbuf[2], 0));
- set_errno (ECHILD);
- try_to_debug ();
- return -1;
- }
- break;
- }
-
- ForceCloseHandle (spr);
-
- sigproc_printf ("res = %x", res);
-
- if (mode == _P_OVERLAY && (res & EXIT_REPARENTING))
- {
- /* Try to reparent child process.
- * Make handles to child available to parent process and exit with
- * EXIT_REPARENTING status. Wait() syscall in parent will then wait
- * for newly created child.
- */
- HANDLE oldh = myself->hProcess;
- HANDLE h = myself->ppid_handle;
- sigproc_printf ("parent handle %p", h);
- int rc = DuplicateHandle (hMainProc, pi.hProcess, h, &myself->hProcess,
- 0, FALSE, DUPLICATE_SAME_ACCESS);
- sigproc_printf ("%d = DuplicateHandle, oldh %p, newh %p",
- rc, oldh, myself->hProcess);
- if (!rc && my_parent_is_alive ())
- {
- system_printf ("Reparent failed, parent handle %p, %E", h);
- system_printf ("my dwProcessId %d, myself->dwProcessId %d",
- GetCurrentProcessId(), myself->dwProcessId);
- system_printf ("old hProcess %p, hProcess %p", oldh, myself->hProcess);
- }
- }
-
- MALLOC_CHECK;
-
- switch (mode)
- {
- case _P_OVERLAY:
- ForceCloseHandle1 (pi.hProcess, childhProc);
- proc_terminate ();
- myself->exit (res, 1);
- break;
- case _P_WAIT:
- waitpid (cygpid, (int *) &res, 0);
- break;
- case _P_DETACH:
- res = 0; /* Lose all memory of this child. */
- break;
- case _P_NOWAIT:
- case _P_NOWAITO:
- case _P_VFORK:
- res = cygpid;
- break;
- default:
- break;
- }
-
- return (int) res;
-}
-
-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 (HANDLE hToken, int mode, const char *path, const char *const *argv,
- const char *const *envp)
-{
- int ret;
- vfork_save *vf = vfork_storage.val ();
-
- if (vf != NULL && (vf->pid < 0) && mode == _P_OVERLAY)
- mode = _P_NOWAIT;
- else
- vf = NULL;
-
- 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 (hToken, 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:
- subproc_init ();
- ret = spawn_guts (hToken, path, argv, envp, mode);
- if (vf && ret > 0)
- {
- vf->pid = ret;
- longjmp (vf->j, 1);
- }
- 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 (NULL, 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 (NULL, 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 (NULL, mode, path, argv, cur_environ ());
-}
-
-extern "C"
-int
-spawnve (int mode, const char *path, char * const *argv,
- const char * const *envp)
-{
- return _spawnve (NULL, mode, path, argv, envp);
-}
-
-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 (NULL, mode, find_exec (file, buf), argv, envp);
-}
diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc
deleted file mode 100644
index d13596ea4..000000000
--- a/winsup/cygwin/strace.cc
+++ /dev/null
@@ -1,389 +0,0 @@
-/* strace.cc: system/windows tracing
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <time.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <ctype.h>
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.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 NO_COPY strace strace;
-
-/* 'twould be nice to declare this in winsup.h but winsup.h doesn't require
- stdarg.h, so we declare it here instead. */
-
-#ifndef NOSTRACE
-
-int
-strace::microseconds()
-{
- static NO_COPY int first_microsec = 0;
- static NO_COPY long long hires_frequency = 0;
- static NO_COPY int hires_initted = 0;
-
- int microsec;
-
- if (!hires_initted)
- {
- hires_initted = 1;
- QueryPerformanceFrequency ((LARGE_INTEGER *) &hires_frequency);
- if (hires_frequency == 0)
- hires_initted = 2;
- }
- if (hires_initted == 2)
- {
- int count = GetTickCount ();
- microsec = count * 1000;
- }
- else
- {
- long long thiscount;
- QueryPerformanceCounter ((LARGE_INTEGER *) &thiscount);
- thiscount = (long long) (((double) thiscount/(double) hires_frequency)
- * 1000000.0);
- microsec = thiscount;
- }
- if (first_microsec == 0)
- first_microsec = microsec;
- return microsec - first_microsec;
-}
-
-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;
-}
-
-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 int nonewline = FALSE;
- DWORD err = GetLastError ();
- const char *tn = threadname (0);
- char *pn = __progname ?: myself->progname;
-
- int microsec = microseconds ();
- lmicrosec = microsec;
-
- __small_sprintf (fmt, "%7d [%s] %s ", microsec, tn, "%s %d%s");
-
- SetLastError (err);
-
- if (nonewline)
- count = 0;
- else
- {
- char *p, progname[MAX_PATH + 1];
- if (!pn)
- p = (char *) "*** unknown ***";
- else if ((p = strrchr (pn, '\\')) != NULL)
- p++;
- else if ((p = strrchr (pn, '/')) != NULL)
- p++;
- else
- p = pn;
- strcpy (progname, p);
- if ((p = strrchr (progname, '.')) != NULL && strcasematch (p, ".exe"))
- *p = '\000';
- p = progname;
- count = __small_sprintf (buf, fmt, p && *p ? p : "?", myself->pid,
- 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
-}
-
-/* Printf function used when tracing system calls.
- Warning: DO NOT SET ERRNO HERE! */
-
-void
-strace::prntf (unsigned category, const char *func, const char *fmt, ...)
-{
- DWORD err = GetLastError ();
- int count;
- char buf[10000];
- va_list ap;
-
- PROTECT(buf);
- SetLastError (err);
-
- va_start (ap, fmt);
- count = this->vsprntf (buf, func, fmt, ap);
- CHECK(buf);
- if (category & _STRACE_SYSTEM)
- {
- DWORD done;
- WriteFile (GetStdHandle (STD_ERROR_HANDLE), buf, count, &done, 0);
- FlushFileBuffers (GetStdHandle (STD_ERROR_HANDLE));
- }
-
-#ifndef NOSTRACE
- if (active)
- this->write (category, buf, count);
-#endif
- SetLastError (err);
-}
-
-static NO_COPY const 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)
- {
- this->prntf (_STRACE_WM, NULL, "wndproc %d %s %d %d", message, ta[i].n, word, lon);
- return;
- }
- }
- this->prntf (_STRACE_WM, NULL, "wndproc %d unknown %d %d", message, word, lon);
- }
-}
-#endif /*NOSTRACE*/
diff --git a/winsup/cygwin/strsep.cc b/winsup/cygwin/strsep.cc
deleted file mode 100644
index 0a421f6e1..000000000
--- a/winsup/cygwin/strsep.cc
+++ /dev/null
@@ -1,65 +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/sync.cc b/winsup/cygwin/sync.cc
deleted file mode 100644
index 5aa798e69..000000000
--- a/winsup/cygwin/sync.cc
+++ /dev/null
@@ -1,142 +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 Cygnus Solutions.
-
- 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 <stdlib.h>
-#include <time.h>
-#include <sys/wait.h>
-#include <errno.h>
-#include <stdlib.h>
-#include "sync.h"
-#include "security.h"
-
-muto NO_COPY muto_start;
-
-#undef WaitForSingleObject
-
-/* Constructor */
-muto::muto (int inh, const char *s) : sync (0), visits(0), waiters(-1), tid (0), next (NULL)
-{
- /* Create event which is used in the fallback case when blocking is necessary */
- if (!(bruteforce = CreateEvent (inh ? &sec_all_nih : &sec_none_nih, FALSE, FALSE, name)))
- {
- DWORD oerr = GetLastError ();
- SetLastError (oerr);
- return;
- }
- name = s;
-}
-
-/* Destructor (racy?) */
-muto::~muto ()
-{
- while (visits)
- release ();
-
- HANDLE h = bruteforce;
- h = NULL;
- /* Just need to close the event handle */
- if (h)
- CloseHandle (h);
-}
-
-/* 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. */
-int
-muto::acquire (DWORD ms)
-{
- DWORD this_tid = GetCurrentThreadId ();
-
- if (tid != this_tid)
- {
- /* Increment the waiters part of the class. Need to do this first to
- avoid potential races. */
- LONG was_waiting = InterlockedIncrement (&waiters);
-
- /* This is deceptively simple. Basically, it allows multiple attempts to
- lock the same muto to succeed without attempting to manipulate sync.
- If the muto is already locked then this thread will wait for ms until
- it is signalled by muto::release. Then it will attempt to grab the
- sync field. If it succeeds, then this thread owns the muto.
-
- There is a pathological condition where a thread times out waiting for
- bruteforce but the release code triggers the bruteforce event. In this
- case, it is possible for a thread which is going to wait for bruteforce
- to wake up immediately. It will then attempt to grab sync but will fail
- and go back to waiting. */
- while (tid != this_tid && (was_waiting || InterlockedExchange (&sync, 1) != 0))
- {
- switch (WaitForSingleObject (bruteforce, ms))
- {
- case WAIT_OBJECT_0:
- goto gotit;
- break;
- default:
- InterlockedDecrement (&waiters);
- return 0; /* failed. */
- }
- }
- }
-
-gotit:
- tid = this_tid; /* register this thread. */
- return ++visits; /* Increment visit count. */
-}
-
-/* Return the muto lock. Needs to be called once per every acquire. */
-int
-muto::release ()
-{
- DWORD this_tid = GetCurrentThreadId ();
-
- if (tid != this_tid || !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)
- {
- tid = 0; /* We were the last unlocker. */
- (void) 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)
- (void) SetEvent (bruteforce); /* Wake up one of the waiting threads */
- }
-
- return 1; /* success. */
-}
-
-/* Call only when we're exiting. This is not thread safe. */
-void
-muto::reset ()
-{
- visits = sync = tid = 0;
- InterlockedExchange (&waiters, -1);
- if (bruteforce)
- {
- CloseHandle (bruteforce);
- bruteforce = CreateEvent (&sec_none_nih, FALSE, FALSE, name);
- }
-}
diff --git a/winsup/cygwin/sync.h b/winsup/cygwin/sync.h
deleted file mode 100644
index b04fc3999..000000000
--- a/winsup/cygwin/sync.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* sync.h: Header file for cygwin synchronization primitives.
-
- Copyright 1999, 2000 Cygnus Solutions.
-
- 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. */
-
-/* FIXME: Note that currently this class cannot be allocated via `new' since
- there are issues with malloc and fork. */
-class muto
-{
- LONG sync; /* Used to serialize access to this class. */
- LONG visits; /* Count of number of times a thread has called acquire. */
- LONG waiters; /* Number of threads waiting for lock. */
- HANDLE bruteforce; /* event handle used to control waiting for lock. */
- DWORD tid; /* Thread Id of lock owner. */
-public:
- class muto *next;
- const char *name;
- void *operator new (size_t, void *p) {return p;}
- void *operator new (size_t) {return ::new muto; }
- void operator delete (void *) {;} /* can't handle allocated mutos
- currently */
-
- muto() {}
- /* The real constructor. */
- muto(int inh, const char *name);
- ~muto ();
- int acquire (DWORD ms = INFINITE) __attribute__ ((regparm(1))); /* Acquire the lock. */
- int release (); /* Release the lock. */
-
- /* Return true if caller thread owns the lock. */
- int ismine () {return tid == GetCurrentThreadId ();}
- DWORD owner () {return tid;}
- int unstable () {return !tid && (sync || waiters >= 0);}
- void reset ();
-};
-
-extern muto muto_start;
-
-/* Use a statically allocated buffer as the storage for a muto */
-#define new_muto(__inh, __name) \
-({ \
- static __attribute__((section(".data_cygwin_nocopy"))) muto __mbuf; \
- (void) new ((char *) &__mbuf) muto (__inh, __name); \
- __mbuf.next = muto_start.next; \
- muto_start.next = &__mbuf; \
- &__mbuf; \
-})
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
deleted file mode 100644
index d63ab9b8f..000000000
--- a/winsup/cygwin/syscalls.cc
+++ /dev/null
@@ -1,2183 +0,0 @@
-/* syscalls.cc: syscalls
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <sys/stat.h>
-#include <sys/vfs.h> /* needed for statfs */
-#include <fcntl.h>
-#include <pwd.h>
-#include <grp.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <process.h>
-#include <utmp.h>
-#include <sys/uio.h>
-#include <errno.h>
-#include <limits.h>
-#include <winnls.h>
-#include <lmcons.h> /* for UNLEN */
-#include <cygwin/version.h>
-#include <sys/cygwin.h>
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "path.h"
-#include "dtable.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include <unistd.h>
-#include "shared_info.h"
-#include "perprocess.h"
-#include "security.h"
-#include "cygheap.h"
-
-extern BOOL allow_ntsec;
-
-/* 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 (void)
-{
- SetResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK," close");
-
- fhandler_base *fh;
- for (int i = 0; i < (int) fdtab.size; i++)
- if ((fh = fdtab[i]) != NULL)
- {
- fh->close ();
- fdtab.release (i);
- }
-
- ReleaseResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK," close");
- cygwin_shared->delqueue.process_queue ();
-}
-
-extern "C" int
-_unlink (const char *ourname)
-{
- int res = -1;
- sigframe thisframe (mainthread);
-
- path_conv win32_name (ourname, PC_SYM_NOFOLLOW | PC_FULL);
-
- if (win32_name.error)
- {
- set_errno (win32_name.error);
- goto done;
- }
-
- syscall_printf ("_unlink (%s)", win32_name.get_win32 ());
-
- DWORD atts;
- atts = win32_name.file_attributes ();
- if (atts != 0xffffffff && atts & FILE_ATTRIBUTE_DIRECTORY)
- {
- syscall_printf ("unlinking a directory");
- set_errno (EPERM);
- goto done;
- }
-
- /* Windows won't check the directory mode, so we do that ourselves. */
- if (!writable_directory (win32_name))
- {
- syscall_printf ("non-writable directory");
- goto done;
- }
-
- for (int i = 0; i < 2; i++)
- {
- if (DeleteFile (win32_name))
- {
- syscall_printf ("DeleteFile succeeded");
- res = 0;
- break;
- }
-
- DWORD lasterr;
- lasterr = GetLastError ();
-
- /* FIXME: There's a race here. */
- HANDLE h = CreateFile (win32_name, GENERIC_READ,
- FILE_SHARE_READ,
- &sec_none_nih, OPEN_EXISTING,
- FILE_FLAG_DELETE_ON_CLOSE, 0);
- if (h != INVALID_HANDLE_VALUE)
- {
- CloseHandle (h);
- syscall_printf ("CreateFile/CloseHandle succeeded");
- if (os_being_run == winNT || GetFileAttributes (win32_name) == (DWORD) -1)
- {
- res = 0;
- break;
- }
- }
-
- if (i > 0)
- {
- DWORD dtype;
- if (os_being_run == winNT || lasterr != ERROR_ACCESS_DENIED)
- goto err;
-
- char root[MAX_PATH];
- strcpy (root, win32_name);
- dtype = GetDriveType (rootdir (root));
- if (dtype & DRIVE_REMOTE)
- {
- syscall_printf ("access denied on remote drive");
- goto err; /* Can't detect this, unfortunately */
- }
- lasterr = ERROR_SHARING_VIOLATION;
- }
-
- syscall_printf ("i %d, couldn't delete file, %E", i);
-
- /* If we get ERROR_SHARING_VIOLATION, the file may still be open -
- Windows NT doesn't support deleting a file while it's open. */
- if (lasterr == ERROR_SHARING_VIOLATION)
- {
- cygwin_shared->delqueue.queue_file (win32_name);
- res = 0;
- break;
- }
-
- /* if access denied, chmod to be writable in case it is not
- and try again */
- /* FIXME: Should check whether ourname is directory or file
- and only try again if permissions are not sufficient */
- if (lasterr == ERROR_ACCESS_DENIED && chmod (win32_name, 0777) == 0)
- continue;
-
- err:
- __seterrno ();
- res = -1;
- break;
- }
-
-done:
- syscall_printf ("%d = unlink (%s)", res, ourname);
- return res;
-}
-
-extern "C" pid_t
-_getpid ()
-{
- return myself->pid;
-}
-
-/* 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)
-{
- /* FIXME: for now */
- if (myself->pgid != _getpid ())
- {
- myself->ctty = -1;
- myself->sid = _getpid ();
- myself->pgid = _getpid ();
- syscall_printf ("sid %d, pgid %d, ctty %d", myself->sid, myself->pgid, myself->ctty);
- return myself->sid;
- }
- set_errno (EPERM);
- return -1;
-}
-
-extern "C" int
-_read (int fd, void *ptr, size_t len)
-{
- sigframe thisframe (mainthread);
- extern int sigcatchers;
- if (fdtab.not_open (fd))
- {
- set_errno (EBADF);
- return -1;
- }
-
- // set_sig_errno (0);
- fhandler_base *fh = fdtab[fd];
- DWORD wait = (fh->get_flags () & (O_NONBLOCK | OLD_O_NDELAY)) ? 0 : INFINITE;
-
- /* Could block, so let user know we at least got here. */
- syscall_printf ("read (%d, %p, %d) %sblocking, sigcatchers %d", fd, ptr, len, wait ? "" : "non", sigcatchers);
-
- int res;
- if (wait && (!sigcatchers || !fh->is_slow () || fh->get_r_no_interrupt ()))
- debug_printf ("non-interruptible read\n");
- else if (!fh->ready_for_read (fd, wait, 0))
- {
- if (!wait)
- set_sig_errno (EAGAIN); /* Don't really need 'set_sig_errno' here, but... */
- else
- set_sig_errno (EINTR);
- res = -1;
- goto out;
- }
-
- /* Check to see if this is a background read from a "tty",
- sending a SIGTTIN, if appropriate */
- res = fh->bg_check (SIGTTIN);
- if (res > 0)
- {
- myself->process_state |= PID_TTYIN;
- res = fh->read (ptr, len);
- myself->process_state &= ~PID_TTYIN;
- }
-
-out:
- syscall_printf ("%d = read (%d<%s>, %p, %d), errno %d", res, fd, fh->get_name (),
- ptr, len, get_errno ());
- MALLOC_CHECK;
- return res;
-}
-
-extern "C" int
-_write (int fd, const void *ptr, size_t len)
-{
- int res = -1;
- sigframe thisframe (mainthread);
-
- if (fdtab.not_open (fd))
- {
- set_errno (EBADF);
- goto done;
- }
-
- /* Could block, so let user know we at least got here. */
- if (fd == 1 || fd == 2)
- paranoid_printf ("write (%d, %p, %d)", fd, ptr, len);
- else
- syscall_printf ("write (%d, %p, %d)", fd, ptr, len);
-
- fhandler_base *fh;
- fh = fdtab[fd];
-
- res = fh->bg_check (SIGTTOU);
- if (res > 0)
- {
- myself->process_state |= PID_TTYOU;
- res = fh->write (ptr, len);
- myself->process_state &= ~PID_TTYOU;
- }
-
-done:
- if (fd == 1 || fd == 2)
- paranoid_printf ("%d = write (%d, %p, %d)", res, fd, ptr, len);
- else
- syscall_printf ("%d = write (%d, %p, %d)", res, fd, ptr, len);
-
- MALLOC_CHECK;
- return (ssize_t)res;
-}
-
-/*
- * FIXME - should really move this interface into fhandler, and implement
- * write in terms of it. There are devices in Win32 that could do this with
- * overlapped I/O much more efficiently - we should eventually use
- * these.
- */
-
-extern "C" ssize_t
-writev (int fd, const struct iovec *iov, int iovcnt)
-{
- int i;
- ssize_t len, total;
- char *base;
-
- if (iovcnt < 1 || iovcnt > IOV_MAX)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- /* Ensure that the sum of the iov_len values is less than
- SSIZE_MAX (per spec), if so, we must fail with no output (per spec).
- */
- total = 0;
- for (i = 0; i < iovcnt; ++i)
- {
- total += iov[i].iov_len;
- if (total > SSIZE_MAX)
- {
- set_errno (EINVAL);
- return -1;
- }
- }
- /* Now write the data */
- for (i = 0, total = 0; i < iovcnt; i++, iov++)
- {
- len = iov->iov_len;
- base = iov->iov_base;
- while (len > 0)
- {
- register int nbytes;
- nbytes = write (fd, base, len);
- if (nbytes < 0 && total == 0)
- return -1;
- if (nbytes <= 0)
- return total;
- len -= nbytes;
- total += nbytes;
- base += nbytes;
- }
- }
- return total;
-}
-
-/*
- * FIXME - should really move this interface into fhandler, and implement
- * read in terms of it. There are devices in Win32 that could do this with
- * overlapped I/O much more efficiently - we should eventually use
- * these.
- */
-
-extern "C" ssize_t
-readv (int fd, const struct iovec *iov, int iovcnt)
-{
- int i;
- ssize_t len, total;
- char *base;
-
- for (i = 0, total = 0; i < iovcnt; i++, iov++)
- {
- len = iov->iov_len;
- base = iov->iov_base;
- while (len > 0)
- {
- register int nbytes;
- nbytes = read (fd, base, len);
- if (nbytes < 0 && total == 0)
- return -1;
- if (nbytes <= 0)
- return total;
- len -= nbytes;
- total += nbytes;
- base += nbytes;
- }
- }
- return total;
-}
-
-/* _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 fd;
- int res = -1;
- va_list ap;
- mode_t mode = 0;
- fhandler_base *fh;
- sigframe thisframe (mainthread);
-
- syscall_printf ("open (%s, %p)", unix_path, flags);
- if (!check_null_empty_path_errno(unix_path))
- {
- SetResourceLock(LOCK_FD_LIST, WRITE_LOCK|READ_LOCK, " open ");
-
- /* check for optional mode argument */
- va_start (ap, flags);
- mode = va_arg (ap, mode_t);
- va_end (ap);
-
- fd = fdtab.find_unused_handle ();
-
- if (fd < 0)
- set_errno (ENMFILE);
- else if ((fh = fdtab.build_fhandler (fd, unix_path, NULL)) == NULL)
- res = -1; // errno already set
- else if (!fh->open (unix_path, flags, (mode & 0777) & ~cygheap->umask))
- {
- fdtab.release (fd);
- res = -1;
- }
- else if ((res = fd) <= 2)
- set_std_handle (res);
- ReleaseResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK," open");
- }
-
- syscall_printf ("%d = open (%s, %p)", res, unix_path, flags);
- return res;
-}
-
-extern "C" off_t
-_lseek (int fd, off_t pos, int dir)
-{
- off_t res;
- sigframe thisframe (mainthread);
-
- if (fdtab.not_open (fd))
- {
- set_errno (EBADF);
- res = -1;
- }
- else
- {
- res = fdtab[fd]->lseek (pos, dir);
- }
- syscall_printf ("%d = lseek (%d, %d, %d)", res, fd, pos, dir);
-
- return res;
-}
-
-extern "C" int
-_close (int fd)
-{
- int res;
- sigframe thisframe (mainthread);
-
- syscall_printf ("close (%d)", fd);
-
- MALLOC_CHECK;
- if (fdtab.not_open (fd))
- {
- debug_printf ("handle %d not open", fd);
- set_errno (EBADF);
- res = -1;
- }
- else
- {
- SetResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK," close");
- res = fdtab[fd]->close ();
- fdtab.release (fd);
- ReleaseResourceLock(LOCK_FD_LIST,WRITE_LOCK|READ_LOCK," close");
- }
-
- syscall_printf ("%d = close (%d)", res, fd);
- MALLOC_CHECK;
- return res;
-}
-
-extern "C" int
-isatty (int fd)
-{
- int res;
- sigframe thisframe (mainthread);
-
- if (fdtab.not_open (fd))
- {
- syscall_printf ("0 = isatty (%d)", fd);
- return 0;
- }
-
- res = fdtab[fd]->is_tty ();
- syscall_printf ("%d = isatty (%d)", res, fd);
- return res;
-}
-
-/* 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 *a, const char *b)
-{
- int res = -1;
- sigframe thisframe (mainthread);
- path_conv real_a (a, PC_SYM_NOFOLLOW | PC_FULL);
- path_conv real_b (b, PC_SYM_NOFOLLOW | PC_FULL);
-
- if (real_a.error)
- {
- set_errno (real_a.error);
- goto done;
- }
- if (real_b.error)
- {
- set_errno (real_b.error);
- goto done;
- }
- if (real_b.get_win32 ()[strlen (real_b.get_win32 ()) - 1] == '.')
- {
- syscall_printf ("trailing dot, bailing out");
- set_errno (EINVAL);
- goto done;
- }
-
- /* Try to make hard link first on Windows NT */
- if (os_being_run == winNT)
- {
- HANDLE hFileSource;
-
- WIN32_STREAM_ID StreamId;
- DWORD dwBytesWritten;
- LPVOID lpContext;
- DWORD cbPathLen;
- DWORD StreamSize;
- WCHAR wbuf[MAX_PATH];
-
- BOOL bSuccess;
-
- hFileSource = CreateFile (
- real_a.get_win32 (),
- FILE_WRITE_ATTRIBUTES,
- FILE_SHARE_READ | FILE_SHARE_WRITE /*| FILE_SHARE_DELETE*/,
- &sec_none_nih, // sa
- OPEN_EXISTING,
- 0,
- NULL
- );
-
- if (hFileSource == INVALID_HANDLE_VALUE)
- {
- syscall_printf ("cannot open source, %E");
- goto docopy;
- }
-
- lpContext = NULL;
- cbPathLen = sys_mbstowcs (wbuf, real_b.get_win32 (), MAX_PATH) * sizeof (WCHAR);
-
- StreamId.dwStreamId = BACKUP_LINK;
- StreamId.dwStreamAttributes = 0;
- StreamId.dwStreamNameSize = 0;
- StreamId.Size.HighPart = 0;
- StreamId.Size.LowPart = cbPathLen;
-
- StreamSize = sizeof (WIN32_STREAM_ID) - sizeof (WCHAR**) +
- StreamId.dwStreamNameSize;
-
- /* Write the WIN32_STREAM_ID */
- bSuccess = BackupWrite (
- hFileSource,
- (LPBYTE) &StreamId, // buffer to write
- StreamSize, // number of bytes to write
- &dwBytesWritten,
- FALSE, // don't abort yet
- FALSE, // don't process security
- &lpContext);
-
- if (bSuccess)
- {
- /* write the buffer containing the path */
- /* FIXME: BackupWrite sometimes traps if linkname is invalid.
- Need to handle. */
- bSuccess = BackupWrite (
- hFileSource,
- (LPBYTE) wbuf, // buffer to write
- cbPathLen, // number of bytes to write
- &dwBytesWritten,
- FALSE, // don't abort yet
- FALSE, // don't process security
- &lpContext
- );
-
- if (!bSuccess)
- syscall_printf ("cannot write linkname, %E");
-
- /* Free context */
- BackupWrite (
- hFileSource,
- NULL, // buffer to write
- 0, // number of bytes to write
- &dwBytesWritten,
- TRUE, // abort
- FALSE, // don't process security
- &lpContext);
- }
- else
- syscall_printf ("cannot write streamId, %E");
-
- CloseHandle (hFileSource);
-
- if (!bSuccess)
- goto docopy;
-
- res = 0;
- goto done;
- }
-docopy:
- /* do this with a copy */
- if (CopyFileA (real_a.get_win32 (), real_b.get_win32 (), 1))
- res = 0;
- else
- __seterrno ();
-
-done:
- syscall_printf ("%d = link (%s, %s)", res, a, b);
- return res;
-}
-
-#if 0
-static BOOL
-rel2abssd (PSECURITY_DESCRIPTOR psd_rel, PSECURITY_DESCRIPTOR psd_abs,
- DWORD abslen)
-{
-#ifdef _MT_SAFE
- struct _winsup_t *r=_reent_winsup();
- char *dacl_buf=r->_dacl_buf;
- char *sacl_buf=r->_sacl_buf;
- char *ownr_buf=r->_ownr_buf;
- char *grp_buf=r->_grp_buf;
-#else
- static char dacl_buf[1024];
- static char sacl_buf[1024];
- static char ownr_buf[1024];
- static char grp_buf[1024];
-#endif
- DWORD dacl_len = 1024;
- DWORD sacl_len = 1024;
- DWORD ownr_len = 1024;
- DWORD grp_len = 1024;
-
- BOOL res = MakeAbsoluteSD (psd_rel, psd_abs, &abslen, (PACL) dacl_buf,
- &dacl_len, (PACL) sacl_buf, &sacl_len,
- (PSID) ownr_buf, &ownr_len, (PSID) grp_buf,
- &grp_len);
-
- syscall_printf ("%d = rel2abssd (...)", res);
- return res;
-}
-#endif
-
-/* 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, uid_t uid, gid_t gid)
-{
- int res;
- uid_t old_uid;
- gid_t old_gid;
-
- if (check_null_empty_path_errno(name))
- return -1;
-
- if (os_being_run != winNT) // real chown only works on NT
- res = 0; // return zero (and do nothing) under Windows 9x
- else
- {
- /* we need Win32 path names because of usage of Win32 API functions */
- path_conv win32_path (PC_NONULLEMPTY, name, fmode);
-
- if (win32_path.error)
- {
- set_errno (win32_path.error);
- res = -1;
- goto done;
- }
-
- /* FIXME: This makes chown on a device succeed always. Someday we'll want
- to actually allow chown to work properly on devices. */
- if (win32_path.is_device ())
- {
- res = 0;
- goto done;
- }
-
- DWORD attrib = 0;
- if (win32_path.file_attributes () & FILE_ATTRIBUTE_DIRECTORY)
- attrib |= S_IFDIR;
- res = get_file_attribute (win32_path.has_acls (),
- win32_path.get_win32 (),
- (int *) &attrib,
- &old_uid,
- &old_gid);
- if (!res)
- {
- if (uid == (uid_t) -1)
- uid = old_uid;
- if (gid == (gid_t) -1)
- gid = old_gid;
- if (win32_path.file_attributes () & FILE_ATTRIBUTE_DIRECTORY)
- attrib |= S_IFDIR;
- res = set_file_attribute (win32_path.has_acls (),
- win32_path.get_win32 (),
- uid, gid, attrib,
- cygheap->user.logsrv ());
- }
- if (res != 0 && get_errno () == ENOSYS)
- {
- /* fake - if not supported, pretend we're like win95
- where it just works */
- res = 0;
- }
- }
-
-done:
- syscall_printf ("%d = %schown (%s,...)",
- res, (fmode & PC_SYM_IGNORE) ? "l" : "", name);
- return res;
-}
-
-extern "C" int
-chown (const char * name, uid_t uid, gid_t gid)
-{
- sigframe thisframe (mainthread);
- return chown_worker (name, PC_SYM_FOLLOW, uid, gid);
-}
-
-extern "C" int
-lchown (const char * name, uid_t uid, gid_t gid)
-{
- sigframe thisframe (mainthread);
- return chown_worker (name, PC_SYM_IGNORE, uid, gid);
-}
-
-extern "C" int
-fchown (int fd, uid_t uid, gid_t gid)
-{
- sigframe thisframe (mainthread);
- if (fdtab.not_open (fd))
- {
- syscall_printf ("-1 = fchown (%d,...)", fd);
- set_errno (EBADF);
- return -1;
- }
-
- const char *path = fdtab[fd]->get_name ();
-
- if (path == NULL)
- {
- syscall_printf ("-1 = fchown (%d,...) (no name)", fd);
- set_errno (ENOSYS);
- return -1;
- }
-
- syscall_printf ("fchown (%d,...): calling chown_worker (%s,FOLLOW,...)",
- fd, path);
- return chown_worker (path, PC_SYM_FOLLOW, uid, 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;
-}
-
-/* chmod: POSIX 5.6.4.1 */
-extern "C" int
-chmod (const char *path, mode_t mode)
-{
- int res = -1;
- sigframe thisframe (mainthread);
-
- path_conv win32_path (path);
-
- if (win32_path.error)
- {
- set_errno (win32_path.error);
- goto done;
- }
-
- /* FIXME: This makes chmod on a device succeed always. Someday we'll want
- to actually allow chmod to work properly on devices. */
- if (win32_path.is_device ())
- {
- res = 0;
- goto done;
- }
-
- if (win32_path.file_attributes () == (DWORD)-1)
- __seterrno ();
- else
- {
- DWORD attr = win32_path.file_attributes ();
- /* temporary erase read only bit, to be able to set file security */
- SetFileAttributesA (win32_path.get_win32 (),
- attr & ~FILE_ATTRIBUTE_READONLY);
-
- uid_t uid;
- gid_t gid;
-
- if (win32_path.file_attributes () & FILE_ATTRIBUTE_DIRECTORY)
- mode |= S_IFDIR;
- get_file_attribute (win32_path.has_acls (),
- win32_path.get_win32 (),
- NULL, &uid, &gid);
- if (win32_path.file_attributes () & FILE_ATTRIBUTE_DIRECTORY)
- mode |= S_IFDIR;
- if (! set_file_attribute (win32_path.has_acls (),
- win32_path.get_win32 (),
- uid, gid,
- mode, cygheap->user.logsrv ())
- && allow_ntsec)
- res = 0;
-
- /* if the mode we want has any write bits set, we can't
- be read only. */
- if (mode & (S_IWUSR | S_IWGRP | S_IWOTH))
- attr &= ~FILE_ATTRIBUTE_READONLY;
- else
- attr |= FILE_ATTRIBUTE_READONLY;
-
- if (S_ISLNK (mode) || S_ISSOCK (mode))
- attr |= FILE_ATTRIBUTE_SYSTEM;
-
- if (!SetFileAttributesA (win32_path.get_win32 (), attr))
- __seterrno ();
- else
- {
- /* Correct NTFS security attributes have higher priority */
- if (res == 0 || !allow_ntsec)
- res = 0;
- }
- }
-
-done:
- 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)
-{
- sigframe thisframe (mainthread);
- if (fdtab.not_open (fd))
- {
- syscall_printf ("-1 = fchmod (%d, 0%o)", fd, mode);
- set_errno (EBADF);
- return -1;
- }
-
- const char *path = fdtab[fd]->get_name ();
-
- if (path == NULL)
- {
- syscall_printf ("-1 = fchmod (%d, 0%o) (no name)", fd, mode);
- set_errno (ENOSYS);
- return -1;
- }
-
- syscall_printf ("fchmod (%d, 0%o): calling chmod (%s, 0%o)",
- fd, mode, path, mode);
- return chmod (path, mode);
-}
-
-/* Cygwin internal */
-static int
-num_entries (const char *win32_name)
-{
- WIN32_FIND_DATA buf;
- HANDLE handle;
- char buf1[MAX_PATH];
- int count = 0;
-
- strcpy (buf1, win32_name);
- int len = strlen (buf1);
- if (len == 0 || isdirsep (buf1[len - 1]))
- strcat (buf1, "*");
- else
- strcat (buf1, "/*"); /* */
-
- handle = FindFirstFileA (buf1, &buf);
-
- if (handle == INVALID_HANDLE_VALUE)
- return 0;
- count ++;
- while (FindNextFileA (handle, &buf))
- {
- if ((buf.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
- count ++;
- }
- FindClose (handle);
- return count;
-}
-
-extern "C" int
-_fstat (int fd, struct stat *buf)
-{
- int r;
- sigframe thisframe (mainthread);
-
- if (fdtab.not_open (fd))
- {
- syscall_printf ("-1 = fstat (%d, %p)", fd, buf);
- set_errno (EBADF);
- r = -1;
- }
- else
- {
- memset (buf, 0, sizeof (struct stat));
- r = fdtab[fd]->fstat (buf);
- syscall_printf ("%d = fstat (%d, %x)", r, fd, buf);
- }
-
- return r;
-}
-
-/* fsync: P96 6.6.1.1 */
-extern "C" int
-fsync (int fd)
-{
- sigframe thisframe (mainthread);
- if (fdtab.not_open (fd))
- {
- syscall_printf ("-1 = fsync (%d)", fd);
- set_errno (EBADF);
- return -1;
- }
-
- HANDLE h = fdtab[fd]->get_handle ();
-
- if (FlushFileBuffers (h) == 0)
- {
- __seterrno ();
- return -1;
- }
- return 0;
-}
-
-/* sync: standards? */
-extern "C" int
-sync ()
-{
- return 0;
-}
-
-int __stdcall
-stat_dev (DWORD devn, int unit, unsigned long ino, struct stat *buf)
-{
- sigframe thisframe (mainthread);
- switch (devn)
- {
- case FH_CONOUT:
- case FH_PIPEW:
- buf->st_mode = STD_WBITS;
- break;
- case FH_CONIN:
- case FH_PIPER:
- buf->st_mode = STD_RBITS;
- break;
- default:
- buf->st_mode = STD_RBITS | S_IWUSR | S_IWGRP | S_IWOTH;
- break;
- }
-
- buf->st_mode |= S_IFCHR;
- buf->st_blksize = S_BLKSIZE;
- buf->st_nlink = 1;
- buf->st_dev = buf->st_rdev = FHDEVN (devn) << 8 | (unit & 0xff);
- buf->st_ino = ino;
- buf->st_atime = buf->st_mtime = buf->st_ctime = time (NULL);
- return 0;
-}
-
-suffix_info stat_suffixes[] =
-{
- suffix_info ("", 1),
- suffix_info (".exe", 1),
- suffix_info (NULL)
-};
-
-/* Cygwin internal */
-static int
-stat_worker (const char *caller, const char *name, struct stat *buf,
- int nofollow)
-{
- int res = -1;
- int oret = 1;
- int atts;
- char root[MAX_PATH];
- UINT dtype;
- fhandler_disk_file fh (NULL);
-
- MALLOC_CHECK;
-
- debug_printf ("%s (%s, %p)", caller, name, buf);
-
- path_conv real_path (name, (nofollow ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW) |
- PC_FULL, stat_suffixes);
-
- if (real_path.error)
- {
- set_errno (real_path.error);
- goto done;
- }
-
- memset (buf, 0, sizeof (struct stat));
-
- if (real_path.is_device ())
- return stat_dev (real_path.get_devn (), real_path.get_unitn (),
- hash_path_name (0, real_path.get_win32 ()), buf);
-
- atts = real_path.file_attributes ();
-
- debug_printf ("%d = GetFileAttributesA (%s)", atts, real_path.get_win32 ());
-
- strcpy (root, real_path.get_win32 ());
- dtype = GetDriveType (rootdir (root));
-
- if ((atts == -1 || !(atts & FILE_ATTRIBUTE_DIRECTORY) ||
- (os_being_run == winNT
- && dtype != DRIVE_NO_ROOT_DIR
- && dtype != DRIVE_UNKNOWN))
- && (oret = fh.open (real_path, O_RDONLY | O_BINARY | O_DIROPEN |
- (nofollow ? O_NOSYMLINK : 0), 0)))
- {
- res = fh.fstat (buf);
- fh.close ();
- /* 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 and
- set the number of links to 2. */
- /* Unfortunately the count of 2 confuses `find(1)' command. So
- let's try it with `1' as link count. */
- if (atts != -1 && (atts & FILE_ATTRIBUTE_DIRECTORY))
- buf->st_nlink =
- (dtype == DRIVE_REMOTE ? 1 : num_entries (real_path.get_win32 ()));
- }
- else if (atts != -1 || (!oret && get_errno () != ENOENT
- && get_errno () != ENOSHARE))
- {
- /* Unfortunately, the above open may fail if the file exists, though.
- So we have to care for this case here, too. */
- WIN32_FIND_DATA wfd;
- HANDLE handle;
- buf->st_nlink = 1;
- if (atts != -1
- && (atts & FILE_ATTRIBUTE_DIRECTORY)
- && dtype != DRIVE_REMOTE)
- buf->st_nlink = num_entries (real_path.get_win32 ());
- buf->st_dev = FHDEVN(FH_DISK) << 8;
- buf->st_ino = hash_path_name (0, real_path.get_win32 ());
- if (atts != -1 && (atts & FILE_ATTRIBUTE_DIRECTORY))
- buf->st_mode = S_IFDIR;
- else if (real_path.issymlink ())
- buf->st_mode = S_IFLNK;
- else if (real_path.issocket ())
- buf->st_mode = S_IFSOCK;
- else
- buf->st_mode = S_IFREG;
- if (!real_path.has_acls ()
- || get_file_attribute (real_path.has_acls (), real_path.get_win32 (),
- &buf->st_mode, &buf->st_uid, &buf->st_gid))
- {
- buf->st_mode |= STD_RBITS | STD_XBITS;
- if ((atts & FILE_ATTRIBUTE_READONLY) == 0)
- buf->st_mode |= STD_WBITS;
- get_file_attribute (FALSE, real_path.get_win32 (),
- NULL, &buf->st_uid, &buf->st_gid);
- }
- if ((handle = FindFirstFile (real_path.get_win32(), &wfd))
- != INVALID_HANDLE_VALUE)
- {
- buf->st_atime = to_time_t (&wfd.ftLastAccessTime);
- buf->st_mtime = to_time_t (&wfd.ftLastWriteTime);
- buf->st_ctime = to_time_t (&wfd.ftCreationTime);
- buf->st_size = wfd.nFileSizeLow;
- buf->st_blksize = S_BLKSIZE;
- buf->st_blocks = ((unsigned long) buf->st_size +
- S_BLKSIZE-1) / S_BLKSIZE;
- FindClose (handle);
- }
- res = 0;
- }
-
- done:
- MALLOC_CHECK;
- syscall_printf ("%d = %s (%s, %p)", res, caller, name, buf);
- return res;
-}
-
-extern "C" int
-_stat (const char *name, struct stat *buf)
-{
- sigframe thisframe (mainthread);
- return stat_worker ("stat", name, buf, 0);
-}
-
-/* lstat: Provided by SVR4 and 4.3+BSD, POSIX? */
-extern "C" int
-lstat (const char *name, struct stat *buf)
-{
- sigframe thisframe (mainthread);
- return stat_worker ("lstat", name, buf, 1);
-}
-
-extern int acl_access (const char *, int);
-
-extern "C" int
-access (const char *fn, int flags)
-{
- sigframe thisframe (mainthread);
- // flags were incorrectly specified
- if (flags & ~(F_OK|R_OK|W_OK|X_OK))
- {
- set_errno (EINVAL);
- return -1;
- }
-
- if (allow_ntsec)
- return acl_access (fn, flags);
-
- struct stat st;
- int r = stat (fn, &st);
- if (r)
- return -1;
- r = -1;
- if (flags & R_OK)
- {
- if (st.st_uid == myself->uid)
- {
- if (!(st.st_mode & S_IRUSR))
- goto done;
- }
- else if (st.st_gid == myself->gid)
- {
- if (!(st.st_mode & S_IRGRP))
- goto done;
- }
- else if (!(st.st_mode & S_IROTH))
- goto done;
- }
- if (flags & W_OK)
- {
- if (st.st_uid == myself->uid)
- {
- if (!(st.st_mode & S_IWUSR))
- goto done;
- }
- else if (st.st_gid == myself->gid)
- {
- if (!(st.st_mode & S_IWGRP))
- goto done;
- }
- else if (!(st.st_mode & S_IWOTH))
- goto done;
- }
- if (flags & X_OK)
- {
- if (st.st_uid == myself->uid)
- {
- if (!(st.st_mode & S_IXUSR))
- goto done;
- }
- else if (st.st_gid == myself->gid)
- {
- if (!(st.st_mode & S_IXGRP))
- goto done;
- }
- else if (!(st.st_mode & S_IXOTH))
- goto done;
- }
- r = 0;
-done:
- if (r)
- set_errno (EACCES);
- return r;
-}
-
-extern "C" int
-_rename (const char *oldpath, const char *newpath)
-{
- sigframe thisframe (mainthread);
- int res = 0;
-
- path_conv real_old (oldpath, PC_SYM_NOFOLLOW);
-
- if (real_old.error)
- {
- set_errno (real_old.error);
- syscall_printf ("-1 = rename (%s, %s)", oldpath, newpath);
- return -1;
- }
-
- path_conv real_new (newpath, PC_SYM_NOFOLLOW);
-
- if (real_new.error)
- {
- set_errno (real_new.error);
- syscall_printf ("-1 = rename (%s, %s)", oldpath, newpath);
- return -1;
- }
-
- if (! writable_directory (real_old.get_win32 ())
- || ! writable_directory (real_new.get_win32 ()))
- {
- syscall_printf ("-1 = rename (%s, %s)", oldpath, newpath);
- return -1;
- }
-
- if (real_old.file_attributes () == (DWORD) -1) /* file to move doesn't exist */
- {
- syscall_printf ("file to move doesn't exist");
- return (-1);
- }
-
- if (real_new.file_attributes () != (DWORD) -1 &&
- real_new.file_attributes () & FILE_ATTRIBUTE_READONLY)
- {
- /* Destination file exists and is read only, change that or else
- the rename won't work. */
- SetFileAttributesA (real_new.get_win32 (), real_new.file_attributes () & ~ FILE_ATTRIBUTE_READONLY);
- }
-
- if (!MoveFile (real_old.get_win32 (), real_new.get_win32 ()))
- res = -1;
-
- if (res == 0 || (GetLastError () != ERROR_ALREADY_EXISTS
- && GetLastError () != ERROR_FILE_EXISTS))
- goto done;
-
- if (os_being_run == winNT)
- {
- if (MoveFileEx (real_old.get_win32 (), real_new.get_win32 (),
- MOVEFILE_REPLACE_EXISTING))
- res = 0;
- }
- else
- {
- syscall_printf ("try win95 hack");
- for (;;)
- {
- if (!DeleteFileA (real_new.get_win32 ()) &&
- GetLastError () != ERROR_FILE_NOT_FOUND)
- {
- syscall_printf ("deleting %s to be paranoid",
- real_new.get_win32 ());
- break;
- }
- else
- {
- if (MoveFile (real_old.get_win32 (), real_new.get_win32 ()))
- {
- res = 0;
- break;
- }
- }
- }
- }
-
-done:
- if (res)
- __seterrno ();
-
- if (res == 0)
- {
- /* make the new file have the permissions of the old one */
- SetFileAttributesA (real_new.get_win32 (), real_old.file_attributes ());
- }
-
- syscall_printf ("%d = rename (%s, %s)", res, real_old.get_win32 (),
- real_new.get_win32 ());
-
- return res;
-}
-
-extern "C" int
-system (const char *cmdstring)
-{
- sigframe thisframe (mainthread);
- int res;
- const char* command[4];
- _sig_func_ptr oldint, oldquit;
- sigset_t child_block, old_mask;
-
- if (cmdstring == (const char *) NULL)
- return 1;
-
- oldint = signal (SIGINT, SIG_IGN);
- oldquit = signal (SIGQUIT, SIG_IGN);
- sigemptyset (&child_block);
- sigaddset (&child_block, SIGCHLD);
- (void) sigprocmask (SIG_BLOCK, &child_block, &old_mask);
-
- command[0] = "sh";
- command[1] = "-c";
- command[2] = cmdstring;
- command[3] = (const char *) NULL;
-
- if ((res = spawnvp (_P_WAIT, "sh", command)) == -1)
- {
- // when exec fails, return value should be as if shell
- // executed exit (127)
- res = 127;
- }
-
- signal (SIGINT, oldint);
- signal (SIGQUIT, oldquit);
- (void) sigprocmask (SIG_SETMASK, &old_mask, 0);
- return res;
-}
-
-extern "C" void
-setdtablesize (int size)
-{
- if (size > (int)fdtab.size)
- fdtab.extend (size);
-}
-
-extern "C" int
-getdtablesize ()
-{
- return fdtab.size;
-}
-
-extern "C" size_t
-getpagesize ()
-{
- return sysconf (_SC_PAGESIZE);
-}
-
-/* FIXME: not all values are correct... */
-extern "C" long int
-fpathconf (int fd, int v)
-{
- switch (v)
- {
- case _PC_LINK_MAX:
- return _POSIX_LINK_MAX;
- case _PC_MAX_CANON:
- case _PC_MAX_INPUT:
- if (isatty (fd))
- return _POSIX_MAX_CANON;
- else
- {
- set_errno (EBADF);
- return -1;
- }
- case _PC_NAME_MAX:
- case _PC_PATH_MAX:
- return PATH_MAX;
- case _PC_PIPE_BUF:
- return 4096;
- case _PC_CHOWN_RESTRICTED:
- case _PC_NO_TRUNC:
- return -1;
- case _PC_VDISABLE:
- if (isatty (fd))
- return -1;
- else
- {
- set_errno (EBADF);
- return -1;
- }
- default:
- set_errno (EINVAL);
- return -1;
- }
-}
-
-extern "C" long int
-pathconf (const char *file, int v)
-{
- switch (v)
- {
- case _PC_PATH_MAX:
- return PATH_MAX - strlen (file);
- case _PC_NAME_MAX:
- return PATH_MAX;
- case _PC_LINK_MAX:
- return _POSIX_LINK_MAX;
- case _PC_MAX_CANON:
- case _PC_MAX_INPUT:
- return _POSIX_MAX_CANON;
- case _PC_PIPE_BUF:
- return 4096;
- case _PC_CHOWN_RESTRICTED:
- case _PC_NO_TRUNC:
- return -1;
- case _PC_VDISABLE:
- return -1;
- default:
- set_errno (EINVAL);
- return -1;
- }
-}
-
-extern "C" char *
-ttyname (int fd)
-{
- if (fdtab.not_open (fd) || !fdtab[fd]->is_tty ())
- {
- return 0;
- }
- return (char *)(fdtab[fd]->ttyname ());
-}
-
-extern "C" char *
-ctermid (char *str)
-{
- static NO_COPY char buf[16];
- if (str == NULL)
- str = buf;
- if (!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)
-{
- syscall_printf("_cygwin_istext_for_stdio (%d)\n", fd);
- if (CYGWIN_VERSION_OLD_STDIO_CRLF_HANDLING)
- {
- syscall_printf(" _cifs: old API\n");
- return 0; /* we do it for old apps, due to getc/putc macros */
- }
-
- if (fdtab.not_open (fd))
- {
- syscall_printf(" _cifs: fd not open\n");
- return 0;
- }
-
- fhandler_base *p = fdtab[fd];
-
- if (p->get_device() != FH_DISK)
- {
- syscall_printf(" _cifs: fd not disk file\n");
- return 0;
- }
-
- if (p->get_w_binary () || p->get_r_binary ())
- {
- syscall_printf(" _cifs: get_*_binary\n");
- return 0;
- }
-
- syscall_printf("_cygwin_istext_for_stdio says yes\n");
- return 1;
-}
-
-/* internal newlib function */
-extern "C" int _fwalk (struct _reent *ptr, int (*function)(FILE *));
-
-static int setmode_mode;
-static int setmode_file;
-
-static int
-setmode_helper (FILE *f)
-{
- if (fileno(f) != setmode_file)
- return 0;
- syscall_printf("setmode: file was %s now %s\n",
- f->_flags & __SCLE ? "cle" : "raw",
- setmode_mode & O_TEXT ? "cle" : "raw");
- if (setmode_mode & O_TEXT)
- f->_flags |= __SCLE;
- else
- f->_flags &= ~__SCLE;
- return 0;
-}
-
-extern "C" int
-getmode (int fd)
-{
- if (fdtab.not_open (fd))
- {
- set_errno (EBADF);
- return -1;
- }
-
- return fdtab[fd]->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)
-{
- if (fdtab.not_open (fd))
- {
- set_errno (EBADF);
- return -1;
- }
- if (mode != O_BINARY && mode != O_TEXT)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- fhandler_base *p = fdtab[fd];
-
- /* 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 (p->get_w_binary () && p->get_r_binary ())
- res = O_BINARY;
- else
- res = O_TEXT;
-
- if (mode & O_BINARY)
- {
- p->set_w_binary (1);
- p->set_r_binary (1);
- }
- else
- {
- p->set_w_binary (0);
- p->set_r_binary (0);
- }
-
- if (_cygwin_istext_for_stdio (fd))
- setmode_mode = O_TEXT;
- else
- setmode_mode = O_BINARY;
- setmode_file = fd;
- _fwalk(_REENT, setmode_helper);
-
- syscall_printf ("setmode (%d, %s) returns %s\n", fd,
- mode&O_TEXT ? "text" : "binary",
- res&O_TEXT ? "text" : "binary");
-
- return res;
-}
-
-/* ftruncate: P96 5.6.7.1 */
-extern "C" int
-ftruncate (int fd, off_t length)
-{
- sigframe thisframe (mainthread);
- int res = -1;
-
- if (fdtab.not_open (fd))
- {
- set_errno (EBADF);
- }
- else
- {
- HANDLE h = fdtab[fd]->get_handle ();
- off_t prev_loc;
-
- if (h)
- {
- /* remember curr file pointer location */
- prev_loc = fdtab[fd]->lseek (0, SEEK_CUR);
-
- fdtab[fd]->lseek (length, SEEK_SET);
- if (!SetEndOfFile (h))
- {
- __seterrno ();
- }
- else
- res = 0;
-
- /* restore original file pointer location */
- fdtab[fd]->lseek (prev_loc, 0);
- }
- }
- syscall_printf ("%d = ftruncate (%d, %d)", res, fd, length);
-
- return res;
-}
-
-/* truncate: Provided by SVR4 and 4.3+BSD. Not part of POSIX.1 or XPG3 */
-/* FIXME: untested */
-extern "C" int
-truncate (const char *pathname, off_t length)
-{
- sigframe thisframe (mainthread);
- int fd;
- int res = -1;
-
- fd = open (pathname, O_RDWR);
-
- if (fd == -1)
- {
- set_errno (EBADF);
- }
- else
- {
- res = ftruncate (fd, length);
- close (fd);
- }
- syscall_printf ("%d = truncate (%s, %d)", res, pathname, length);
-
- return res;
-}
-
-extern "C" long
-get_osfhandle (int fd)
-{
- long res = -1;
-
- if (fdtab.not_open (fd))
- {
- set_errno (EBADF);
- }
- else
- {
- res = (long) fdtab[fd]->get_handle ();
- }
- syscall_printf ("%d = get_osfhandle(%d)", res, fd);
-
- return res;
-}
-
-extern "C" int
-statfs (const char *fname, struct statfs *sfs)
-{
- sigframe thisframe (mainthread);
- if (!sfs)
- {
- set_errno (EFAULT);
- return -1;
- }
-
- path_conv full_path(fname, PC_SYM_FOLLOW | PC_FULL);
- char *root = rootdir (full_path);
-
- syscall_printf ("statfs %s", root);
-
- DWORD spc, bps, freec, totalc;
-
- if (!GetDiskFreeSpace (root, &spc, &bps, &freec, &totalc))
- {
- __seterrno ();
- return -1;
- }
-
- DWORD vsn, maxlen, flags;
-
- if (!GetVolumeInformation (root, NULL, 0, &vsn, &maxlen, &flags, NULL, 0))
- {
- __seterrno ();
- return -1;
- }
- sfs->f_type = flags;
- sfs->f_bsize = spc*bps;
- sfs->f_blocks = totalc;
- sfs->f_bfree = sfs->f_bavail = freec;
- sfs->f_files = -1;
- sfs->f_ffree = -1;
- sfs->f_fsid = vsn;
- sfs->f_namelen = maxlen;
- return 0;
-}
-
-extern "C" int
-fstatfs (int fd, struct statfs *sfs)
-{
- sigframe thisframe (mainthread);
- if (fdtab.not_open (fd))
- {
- set_errno (EBADF);
- return -1;
- }
- fhandler_disk_file *f = (fhandler_disk_file *) fdtab[fd];
- return statfs (f->get_name (), sfs);
-}
-
-/* setpgid: POSIX 4.3.3.1 */
-extern "C" int
-setpgid (pid_t pid, pid_t pgid)
-{
- sigframe thisframe (mainthread);
- int res = -1;
- if (pid == 0)
- pid = getpid ();
- if (pgid == 0)
- pgid = pid;
-
- if (pgid < 0)
- {
- set_errno (EINVAL);
- goto out;
- }
- else
- {
- pinfo p (pid);
- if (!p)
- {
- set_errno (ESRCH);
- goto out;
- }
- /* A process may only change the process group of itself and its children */
- if (p == myself || p->ppid == myself->pid)
- {
- p->pgid = pgid;
- if (p->pid != p->pgid)
- p->set_has_pgid_children (0);
- res = 0;
- }
- else
- {
- set_errno (EPERM);
- goto out;
- }
- }
-out:
- syscall_printf ("pid %d, pgid %d, res %d", pid, pgid, res);
- return res;
-}
-
-extern "C" pid_t
-getpgid (pid_t pid)
-{
- sigframe thisframe (mainthread);
- if (pid == 0)
- pid = getpid ();
-
- pinfo p (pid);
- if (p == 0)
- {
- set_errno (ESRCH);
- return -1;
- }
- return p->pgid;
-}
-
-extern "C" int
-setpgrp (void)
-{
- sigframe thisframe (mainthread);
- return setpgid (0, 0);
-}
-
-extern "C" pid_t
-getpgrp (void)
-{
- sigframe thisframe (mainthread);
- return getpgid (0);
-}
-
-extern "C" char *
-ptsname (int fd)
-{
- sigframe thisframe (mainthread);
- if (fdtab.not_open (fd))
- {
- set_errno (EBADF);
- return 0;
- }
- return (char *)(fdtab[fd]->ptsname ());
-}
-
-/* FIXME: what is this? */
-extern "C" int
-regfree ()
-{
- return 0;
-}
-
-/* mknod was the call to create directories before the introduction
- of mkdir in 4.2BSD and SVR3. Use of mknod required superuser privs
- so the mkdir command had to be setuid root.
- Although mknod hasn't been implemented yet, some GNU tools (e.g. the
- fileutils) assume its existence so we must provide a stub that always
- fails. */
-extern "C" int
-mknod ()
-{
- set_errno (ENOSYS);
- return -1;
-}
-
-/* setgid: POSIX 4.2.2.1 */
-extern "C" int
-setgid (gid_t gid)
-{
- int ret = setegid (gid);
- if (!ret)
- cygheap->user.real_gid = myself->gid;
- return ret;
-}
-
-/* setuid: POSIX 4.2.2.1 */
-extern "C" int
-setuid (uid_t uid)
-{
- int ret = seteuid (uid);
- if (!ret)
- cygheap->user.real_uid = myself->uid;
- debug_printf ("real: %d, effective: %d", cygheap->user.real_uid, myself->uid);
- return ret;
-}
-
-extern const char *internal_getlogin (cygheap_user &user);
-
-/* seteuid: standards? */
-extern "C" int
-seteuid (uid_t uid)
-{
- sigframe thisframe (mainthread);
- if (os_being_run == winNT)
- {
- if (uid != (uid_t) -1)
- {
- struct passwd *pw_new = getpwuid (uid);
- if (!pw_new)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- if (uid != myself->uid)
- if (uid == cygheap->user.orig_uid)
- {
- debug_printf ("RevertToSelf() (uid == orig_uid, token=%d)",
- cygheap->user.token);
- RevertToSelf();
- if (cygheap->user.token != INVALID_HANDLE_VALUE)
- cygheap->user.impersonated = FALSE;
- }
- else if (!cygheap->user.impersonated)
- {
- debug_printf ("Impersonate(uid == %d)", uid);
- RevertToSelf();
- if (cygheap->user.token != INVALID_HANDLE_VALUE)
- if (!ImpersonateLoggedOnUser (cygheap->user.token))
- system_printf ("Impersonate(%d) in set(e)uid failed: %E",
- cygheap->user.token);
- else
- cygheap->user.impersonated = TRUE;
- }
-
- cygheap_user user;
- /* user.token is used in internal_getlogin() to determine if
- impersonation is active. If so, the token is used for
- retrieving user's SID. */
- user.token = cygheap->user.impersonated ? cygheap->user.token
- : INVALID_HANDLE_VALUE;
- struct passwd *pw_cur = getpwnam (internal_getlogin (user));
- if (pw_cur != pw_new)
- {
- debug_printf ("Diffs!!! token: %d, cur: %d, new: %d, orig: %d",
- cygheap->user.token, pw_cur->pw_uid,
- pw_new->pw_uid, cygheap->user.orig_uid);
- set_errno (EPERM);
- return -1;
- }
- myself->uid = uid;
- cygheap->user = user;
- }
- }
- else
- set_errno (ENOSYS);
- debug_printf ("real: %d, effective: %d", cygheap->user.real_uid, myself->uid);
- return 0;
-}
-
-/* setegid: from System V. */
-extern "C" int
-setegid (gid_t gid)
-{
- sigframe thisframe (mainthread);
- if (os_being_run == winNT)
- {
- if (gid != (gid_t) -1)
- {
- if (!getgrgid (gid))
- {
- set_errno (EINVAL);
- return -1;
- }
- myself->gid = gid;
- }
- }
- else
- set_errno (ENOSYS);
- return 0;
-}
-
-/* chroot: privileged Unix system call. */
-/* FIXME: Not privileged here. How should this be done? */
-extern "C" int
-chroot (const char *newroot)
-{
- sigframe thisframe (mainthread);
- int ret = -1;
- path_conv path(newroot, PC_SYM_FOLLOW | PC_FULL);
-
- if (path.error)
- goto done;
- if (path.file_attributes () == (DWORD)-1)
- {
- set_errno (ENOENT);
- goto done;
- }
- if (!(path.file_attributes () & FILE_ATTRIBUTE_DIRECTORY))
- {
- set_errno (ENOTDIR);
- goto done;
- }
- char buf[MAX_PATH + 1];
- ret = cygwin_shared->mount.conv_to_posix_path (path.get_win32 (),
- buf, 0);
- if (ret)
- {
- set_errno (ret);
- goto done;
- }
- cygheap->root = buf;
- ret = 0;
-
-done:
- syscall_printf ("%d = chroot (%s)", ret ? get_errno () : 0,
- newroot ? newroot : "NULL");
- return ret;
-}
-
-extern "C" int
-creat (const char *path, mode_t mode)
-{
- sigframe thisframe (mainthread);
- return open (path, O_WRONLY | O_CREAT | O_TRUNC, mode);
-}
-
-extern "C" void
-__assertfail ()
-{
- exit (99);
-}
-
-extern "C" int
-getw (FILE *fp)
-{
- sigframe thisframe (mainthread);
- int w, ret;
- ret = fread (&w, sizeof (int), 1, fp);
- return ret != 1 ? EOF : w;
-}
-
-extern "C" int
-putw (int w, FILE *fp)
-{
- sigframe thisframe (mainthread);
- int ret;
- ret = fwrite (&w, sizeof (int), 1, fp);
- if (feof (fp) || ferror (fp))
- return -1;
- return 0;
-}
-
-extern "C" int
-wcscmp (const wchar_t *s1, const wchar_t *s2)
-{
- while (*s1 && *s1 == *s2)
- {
- s1++;
- s2++;
- }
-
- return (*(unsigned short *) s1) - (*(unsigned short *) s2);
-}
-
-extern "C" size_t
-wcslen (const wchar_t *s1)
-{
- int l = 0;
- while (s1[l])
- l++;
- return l;
-}
-
-/* FIXME: to do this right, maybe work out the usoft va_list machine
- and use wsvprintfW instead?
-*/
-extern "C" int
-wprintf (const char *fmt, ...)
-{
- va_list ap;
- int ret;
-
- va_start (ap, fmt);
- ret = vprintf (fmt, ap);
- va_end (ap);
- return ret;
-}
-
-extern "C" int
-vhangup ()
-{
- set_errno (ENOSYS);
- return -1;
-}
-
-extern "C" _PTR
-memccpy (_PTR out, const _PTR in, int c, size_t len)
-{
- const char *inc = (char *) in;
- char *outc = (char *) out;
-
- while (len)
- {
- char x = *inc++;
- *outc++ = x;
- if (x == c)
- return outc;
- len --;
- }
- return 0;
-}
-
-extern "C" int
-nice (int incr)
-{
- sigframe thisframe (mainthread);
- DWORD priority[] =
- {
- IDLE_PRIORITY_CLASS,
- IDLE_PRIORITY_CLASS,
- NORMAL_PRIORITY_CLASS,
- HIGH_PRIORITY_CLASS,
- REALTIME_PRIORITY_CLASS,
- REALTIME_PRIORITY_CLASS
- };
- int curr = 2;
-
- switch (GetPriorityClass (hMainProc))
- {
- case IDLE_PRIORITY_CLASS:
- curr = 1;
- break;
- case NORMAL_PRIORITY_CLASS:
- curr = 2;
- break;
- case HIGH_PRIORITY_CLASS:
- curr = 3;
- break;
- case REALTIME_PRIORITY_CLASS:
- curr = 4;
- break;
- }
- if (incr > 0)
- incr = -1;
- else if (incr < 0)
- incr = 1;
-
- if (SetPriorityClass (hMainProc, priority[curr + incr]) == FALSE)
- {
- __seterrno ();
- return -1;
- }
-
- return 0;
-}
-
-/*
- * 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;
-}
-
-extern "C" void
-login (struct utmp *ut)
-{
- sigframe thisframe (mainthread);
- register int fd;
- int currtty = ttyslot ();
-
- if (currtty >= 0 && (fd = open (_PATH_UTMP, O_WRONLY | O_CREAT | O_BINARY,
- 0644)) >= 0)
- {
- (void) lseek (fd, (long) (currtty * sizeof (struct utmp)), SEEK_SET);
- (void) write (fd, (char *) ut, sizeof (struct utmp));
- (void) close (fd);
- }
- if ((fd = open (_PATH_WTMP, O_WRONLY | O_APPEND | O_BINARY, 0)) >= 0)
- {
- (void) write (fd, (char *) ut, sizeof (struct utmp));
- (void) close (fd);
- }
-}
-
-/* It isn't possible to use unix-style I/O function in logout code because
-cygwin's I/O subsystem may be inaccessible at logout() call time.
-FIXME (cgf): huh?
-*/
-extern "C" int
-logout (char *line)
-{
- sigframe thisframe (mainthread);
- int res = 0;
- HANDLE ut_fd;
- static const char path_utmp[] = _PATH_UTMP;
-
- path_conv win32_path (path_utmp);
- if (win32_path.error)
- return 0;
-
- ut_fd = CreateFile (win32_path.get_win32 (),
- GENERIC_READ | GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- &sec_none_nih,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
- NULL);
- if (ut_fd != INVALID_HANDLE_VALUE)
- {
- struct utmp *ut;
- struct utmp ut_buf[100];
- off_t pos = 0; /* Position in file */
- DWORD rd;
-
- while (!res && ReadFile (ut_fd, ut_buf, sizeof ut_buf, &rd, NULL)
- && rd != 0)
- {
- struct utmp *ut_end = (struct utmp *) ((char *) ut_buf + rd);
-
- for (ut = ut_buf; ut < ut_end; ut++, pos += sizeof (*ut))
- if (ut->ut_name[0]
- && strncmp (ut->ut_line, line, sizeof (ut->ut_line)) == 0)
- /* Found the entry for LINE; mark it as logged out. */
- {
- /* Zero out entries describing who's logged in. */
- bzero (ut->ut_name, sizeof (ut->ut_name));
- bzero (ut->ut_host, sizeof (ut->ut_host));
- time (&ut->ut_time);
-
- /* Now seek back to the position in utmp at which UT occured,
- and write the new version of UT there. */
- if ((SetFilePointer (ut_fd, pos, 0, FILE_BEGIN) != 0xFFFFFFFF)
- && (WriteFile (ut_fd, (char *) ut, sizeof (*ut),
- &rd, NULL)))
- {
- res = 1;
- break;
- }
- }
- }
-
- CloseHandle (ut_fd);
- }
-
- return res;
-}
diff --git a/winsup/cygwin/sysconf.cc b/winsup/cygwin/sysconf.cc
deleted file mode 100644
index 432c6a2ba..000000000
--- a/winsup/cygwin/sysconf.cc
+++ /dev/null
@@ -1,100 +0,0 @@
-/* sysconf.cc
-
- Copyright 1996, 1997, 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <unistd.h>
-#include <errno.h>
-#include <time.h>
-#include <limits.h>
-#include <ntdef.h>
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygerrno.h"
-#include "ntdll.h"
-
-/* 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)
-{
- switch (in)
- {
- case _SC_ARG_MAX:
- /* FIXME: what's the right value? _POSIX_ARG_MAX is only 4K */
- return 1048576;
- case _SC_OPEN_MAX:
- /* FIXME: this returns the current limit which can increase
- if and when dtable::find_unused_handle is called. Perhaps
- we should return NOFILE or OPEN_MAX instead? */
- return fdtab.size;
- case _SC_PAGESIZE:
- {
- SYSTEM_INFO b;
- GetSystemInfo (&b);
- return b.dwPageSize;
- }
- case _SC_CLK_TCK:
- return CLOCKS_PER_SEC;
- case _SC_JOB_CONTROL:
- return _POSIX_JOB_CONTROL;
- case _SC_CHILD_MAX:
- return CHILD_MAX;
- case _SC_NGROUPS_MAX:
- return NGROUPS_MAX;
- case _SC_SAVED_IDS:
- return _POSIX_SAVED_IDS;
- case _SC_VERSION:
- return _POSIX_VERSION;
-#if 0 /* FIXME -- unimplemented */
- case _SC_TZNAME_MAX:
- return _POSIX_TZNAME_MAX;
- case _SC_STREAM_MAX:
- return _POSIX_STREAM_MAX;
-#endif
- case _SC_NPROCESSORS_CONF:
- case _SC_NPROCESSORS_ONLN:
- if (os_being_run != winNT)
- return 1;
- /*FALLTHRU*/
- case _SC_PHYS_PAGES:
- case _SC_AVPHYS_PAGES:
- {
- NTSTATUS ret;
- SYSTEM_BASIC_INFORMATION sbi;
- if ((ret = NtQuerySystemInformation (SystemBasicInformation,
- (PVOID) &sbi,
- sizeof sbi, NULL))
- != STATUS_SUCCESS)
- {
- __seterrno_from_win_error (RtlNtStatusToDosError (ret));
- debug_printf("NtQuerySystemInformation: ret = %d, "
- "Dos(ret) = %d",
- ret, RtlNtStatusToDosError (ret));
- return -1;
- }
- switch (in)
- {
- case _SC_NPROCESSORS_CONF:
- return sbi.NumberProcessors;
- case _SC_NPROCESSORS_ONLN:
- return sbi.ActiveProcessors;
- case _SC_PHYS_PAGES:
- return sbi.NumberOfPhysicalPages;
- case _SC_AVPHYS_PAGES:
- return sbi.HighestPhysicalPage - sbi.LowestPhysicalPage + 1;
- }
- }
- }
-
- /* Invalid input or unimplemented sysconf name */
- set_errno (EINVAL);
- return -1;
-}
diff --git a/winsup/cygwin/syslog.cc b/winsup/cygwin/syslog.cc
deleted file mode 100644
index d0dda8b75..000000000
--- a/winsup/cygwin/syslog.cc
+++ /dev/null
@@ -1,392 +0,0 @@
-/* syslog.cc
-
- Copyright 1996, 1997, 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <stdio.h>
-#include <syslog.h>
-#include <stdarg.h>
-#include <unistd.h>
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygerrno.h"
-#include "cygheap.h"
-#include "thread.h"
-
-/* FIXME: These should probably be in the registry. */
-/* FIXME: The Win95 path should be whatever slash is */
-
-#define WIN95_EVENT_LOG_PATH "C:\\CYGWIN_SYSLOG.TXT"
-#define CYGWIN_LOG_NAME "Cygwin"
-
-/*
- * Utility function to help enable moving
- * WIN95_EVENT_LOG_PATH into registry later.
- */
-static const char *
-get_win95_event_log_path ()
-{
- return WIN95_EVENT_LOG_PATH;
-}
-
-/* FIXME: For MT safe code these will need to be replaced */
-
-#ifdef _MT_SAFE
-#define process_ident _reent_winsup()->_process_ident
-#define process_logopt _reent_winsup()->_process_logopt
-#define process_facility _reent_winsup()->_process_facility
- /* Default priority logmask */
-#define process_logmask _reent_winsup()->_process_logmask
-#else
-static char *process_ident = 0;
-static int process_logopt = 0;
-static int process_facility = 0;
-
-/* Default priority logmask */
-static int process_logmask = LOG_UPTO (LOG_DEBUG);
-#endif
-
-/*
- * openlog: save the passed args. Don't open the
- * system log (NT) or log file (95) 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 (process_ident != NULL)
- {
- free (process_ident);
- process_ident = 0;
- }
- if (ident)
- {
- process_ident = (char *) malloc (strlen (ident) + 1);
- if (process_ident == NULL)
- {
- debug_printf ("failed to allocate memory for process_ident");
- return;
- }
- strcpy (process_ident, ident);
- }
- process_logopt = logopt;
- process_facility = facility;
-}
-
-/* setlogmask: set the log priority mask and return previous mask.
- If maskpri is zero, just return previous. */
-#if 0
-/* FIXME: nobody calls setlogmask? */
-int
-setlogmask (int maskpri)
-{
- if (maskpri == 0)
- return process_logmask;
-
- int old_mask = process_logmask;
- process_logmask = maskpri & LOG_PRIMASK;
-
- return old_mask;
-}
-#endif
-
-/* 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");
- 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;
-}
-
-/*
- * syslog: creates the log message and writes to system
- * log (NT) or log file (95). FIXME. WinNT log error 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
-syslog (int priority, const char *message, ...)
-{
- debug_printf ("%x %s", priority, message);
- /* If the priority fails the current mask, reject */
- if (((priority & LOG_PRIMASK) & process_logmask) == 0)
- {
- debug_printf ("failing message %x due to priority mask %x",
- priority, process_logmask);
- return;
- }
-
- /* 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_ERR:
- eventType = EVENTLOG_ERROR_TYPE;
- break;
- case LOG_WARNING:
- eventType = EVENTLOG_WARNING_TYPE;
- break;
- case LOG_INFO:
- 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 :-).
- */
- va_list ap;
-
- 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 (process_ident != NULL)
- {
- if (pass.print ("%s : ", process_ident) == -1)
- return;
- }
- if (process_logopt & LOG_PID)
- {
- if (pass.print ("Win32 Process Id = 0x%X : Cygwin Process Id = 0x%X : ",
- GetCurrentProcessId(), getpid ()) == -1)
- return;
- }
-
- if (os_being_run != winNT)
- {
- /* Add a priority string - not needed for NT
- as NT has its own priority codes. */
- switch (LOG_PRI (priority))
- {
- case LOG_ERR:
- pass.print ("%s : ", "LOG_ERR");
- break;
- case LOG_WARNING:
- pass.print ("%s : ", "LOG_WARNING");
- break;
- case LOG_INFO:
- pass.print ("%s : ", "LOG_INFO");
- break;
- default:
- pass.print ("%s : ", "LOG_ERR");
- break;
- }
- }
-
- /* Print out the variable part */
- va_start (ap, message);
- if (pass.print_va (message, ap) == -1)
- return;
- va_end (ap);
-
- }
- 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 - 1] = '\0';
-
- msg_strings[0] = total_msg;
-
- if (os_being_run == winNT)
- {
- /* For NT, open the event log and send the message */
- HANDLE hEventSrc = RegisterEventSourceA (NULL, (process_ident != NULL) ?
- process_ident : CYGWIN_LOG_NAME);
- if (hEventSrc == NULL)
- {
- debug_printf ("RegisterEventSourceA failed with %E");
- return;
- }
- ReportEventA (hEventSrc, eventType, 0, 0,
- cygheap->user.sid (), 1, 0, msg_strings, NULL);
- DeregisterEventSource (hEventSrc);
- }
- else
- {
- /* Under Windows 95, append the message to the log file */
- FILE *fp = fopen (get_win95_event_log_path (), "a");
- if (fp == NULL)
- {
- debug_printf ("failed to open file %s",
- get_win95_event_log_path ());
- return;
- }
- /* Now to prevent several syslog messages from being
- interleaved, we must lock the first byte of the file
- This works on Win32 even if we created the file above.
- */
- HANDLE fHandle = fdtab[fileno (fp)]->get_handle ();
- if (LockFile (fHandle, 0, 0, 1, 0) == FALSE)
- {
- debug_printf ("failed to lock file %s", get_win95_event_log_path());
- fclose (fp);
- return;
- }
- fputs (msg_strings[0], fp);
- fputc ('\n', fp);
- UnlockFile (fHandle, 0, 0, 1, 0);
- if (ferror (fp))
- {
- debug_printf ("error in writing syslog");
- }
- fclose (fp);
- }
-}
-
-extern "C"
-void
-closelog (void)
-{
- ;
-}
diff --git a/winsup/cygwin/termios.cc b/winsup/cygwin/termios.cc
deleted file mode 100644
index c72a49414..000000000
--- a/winsup/cygwin/termios.cc
+++ /dev/null
@@ -1,269 +0,0 @@
-/* termios.cc: termios for WIN32.
-
- Copyright 1996, 1997, 1998, 2000 Cygnus Solutions.
-
- 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 <errno.h>
-#include <signal.h>
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include <cygwin/version.h>
-#include "perprocess.h"
-#include <sys/termios.h>
-
-/* tcsendbreak: POSIX 7.2.2.1 */
-extern "C" int
-tcsendbreak (int fd, int duration)
-{
- int res = -1;
-
- if (fdtab.not_open (fd))
- {
- set_errno (EBADF);
- goto out;
- }
-
- fhandler_base *fh;
- fh = fdtab[fd];
-
- if (!fh->is_tty ())
- set_errno (ENOTTY);
- else
- {
- if ((res = fh->bg_check (-SIGTTOU)) > 0)
- res = fh->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");
-
- if (fdtab.not_open (fd))
- {
- set_errno (EBADF);
- goto out;
- }
-
- fhandler_base *fh;
- fh = fdtab[fd];
-
- if (!fh->is_tty ())
- set_errno (ENOTTY);
- else
- {
- if ((res = fh->bg_check (-SIGTTOU)) > 0)
- res = fh->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;
-
- if (fdtab.not_open (fd))
- {
- set_errno (EBADF);
- goto out;
- }
-
- fhandler_base *fh;
- fh = fdtab[fd];
-
- if (!fh->is_tty ())
- set_errno (ENOTTY);
- else
- {
- if ((res = fh->bg_check (-SIGTTOU)) > 0)
- res = fh->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;
-
- if (fdtab.not_open (fd))
- {
- set_errno (EBADF);
- goto out;
- }
-
- fhandler_base *fh;
- fh = fdtab[fd];
-
- if (!fh->is_tty ())
- set_errno (ENOTTY);
- else
- {
- if ((res = fh->bg_check (-SIGTTOU)) > 0)
- res = fh->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 = -1;
-
- t = __tonew_termios (t);
- if (fdtab.not_open (fd))
- {
- set_errno (EBADF);
- goto out;
- }
-
- fhandler_base *fh;
- fh = fdtab[fd];
-
- if (!fh->is_tty ())
- set_errno (ENOTTY);
- else
- {
- if ((res = fh->bg_check (-SIGTTOU)) > 0)
- res = fh->tcsetattr (a, t);
- }
-
-out:
- 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]);
- 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);
-
- if (fdtab.not_open (fd))
- set_errno (EBADF);
- else if (!fdtab[fd]->is_tty ())
- set_errno (ENOTTY);
- else
- {
- if ((res = fdtab[fd]->tcgetattr (t)) == 0)
- (void) __toapp_termios (in_t, t);
- }
-
- if (res)
- termios_printf ("%d = tcgetattr (%d, %x)", 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;
-
- if (fdtab.not_open (fd))
- set_errno (EBADF);
- else if (!fdtab[fd]->is_tty ())
- set_errno (ENOTTY);
- else
- res = fdtab[fd]->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;
-
- if (fdtab.not_open (fd))
- set_errno (EBADF);
- else if (!fdtab[fd]->is_tty ())
- set_errno (ENOTTY);
- else
- res = fdtab[fd]->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;
-}
-
-/* cfsetospeed: POSIX96 7.1.3.1 */
-extern "C" int
-cfsetospeed (struct termios *in_tp, speed_t speed)
-{
- struct termios *tp = __tonew_termios (in_tp);
- tp->c_ospeed = speed;
- (void) __toapp_termios (in_tp, tp);
- return 0;
-}
-
-/* cfsetispeed: POSIX96 7.1.3.1 */
-extern "C" int
-cfsetispeed (struct termios *in_tp, speed_t speed)
-{
- struct termios *tp = __tonew_termios (in_tp);
- tp->c_ispeed = speed;
- (void) __toapp_termios (in_tp, tp);
- return 0;
-}
diff --git a/winsup/cygwin/test.c b/winsup/cygwin/test.c
deleted file mode 100644
index cd63a3e68..000000000
--- a/winsup/cygwin/test.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/* test.c: misc Cygwin testing code
-
- Copyright 1996, 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <stdio.h>
-#include <windows.h>
-
-char a[] ="This is static data";
-
-void
-test1()
-{
- int depth = 0;
- while (depth < 5)
- {
- int r;
- printf ("about to fork %d\n", depth);
-
- r = fork ();
-
- if (r == 0)
- {
- int res;
- depth++;
- printf ("************Depth is %d\n", depth);
- sleep (1);
- }
- else
- {
- printf ("This is the parent, quitting %d\n", depth);
- sleep (1);
- exit (1);
- }
- printf ("done loop, depth %d\n", depth);
- }
-}
-
-#define N 10
-int v[N];
-startup ()
-{
- int i;
- for (i = 0; i < N; i++)
- {
- int r;
- fflush (stdout);
- r = fork ();
- if (r)
- {
- v[i] = r;
- printf ("started %d, were'id %d\n", v[i], GetCurrentProcessId ());
- fflush (stdout);
- }
- else
- {
- /* running the child, sleep a bit and exit. */
- printf ("the fork said 0, were %d\n", GetCurrentProcessId ());
- fflush (stdout);
- sleep (2);
- printf ("Running, and exiting %d\n", i);
- fflush (stdout);
- _exit (i + 0x30);
- }
- }
-}
-
-test2()
-{
- int i;
- startup ();
- sleep (1);
- /* Wait for them one by one */
- for (i = 0; i < N; i++)
- {
- int res;
-
- waitpid (v[i], &res, 0);
- printf ("Process %d gave res %x\n", v[i], res);
- if (res != (0x30 + i) << 8)
- printf ("***** BAD *** Process %d gave res %x\n", v[i], res);
- }
-}
-
-test3()
-{
- int i;
- startup ();
- /* Wait for them all at the same time */
- for (i = 0; i < N; i++)
- {
- int res;
- wait (&res);
- printf ("Got res %x\n", res);
- }
-}
-
-test5()
-{
- char *c = strdup ("HI STEVE");
- printf ("c is %s\n", c);
- free (c);
-}
-
-int count;
-
-main (int ac, char **av)
-{
- int r;
- int done;
- int test;
- fprintf (stderr,"TO STDERR\n");
- if (ac < 2) {
- printf ("usage: test <n>\n");
- exit (2);
- }
- test = atoi (av[1]);
-
- printf ("%d %d Hi steve, about to start fork test %d %d.\n",getpid (), count++, test,
- GetCurrentProcessId ());
-fflush (stdout);
- switch (test)
- {
- case 1:
- test1();
- break;
- case 2:
- test2();
- break;
- case 3:
- test3();
- break;
- case 4:
-SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE), FOREGROUND_RED);
-break;
- case 5:
- test5();
-break;
- }
-
-}
-
-free ()
-{
- printf ("MY FREE!\n");
-}
-
-char b[100000];
-int i;
-
-malloc (x)
-{
-char *r = b + i;
-i += x;
-return r;
-}
-
-realloc ()
-{
-}
diff --git a/winsup/cygwin/textmode.c b/winsup/cygwin/textmode.c
deleted file mode 100644
index 92648ca04..000000000
--- a/winsup/cygwin/textmode.c
+++ /dev/null
@@ -1,19 +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 <sys/fcntl.h>
-
-extern int _fmode;
-void
-cygwin_premain0 (int argc, char **argv)
-{
- _fmode &= ~_O_BINARY;
- _fmode |= _O_TEXT;
-}
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
deleted file mode 100644
index cb2a98efe..000000000
--- a/winsup/cygwin/thread.cc
+++ /dev/null
@@ -1,992 +0,0 @@
-/* thread.cc: Locking and threading module functions
-
- Copyright 1998, 2000 Cygnus Solutions.
-
- 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. */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#ifdef _MT_SAFE
-#include "winsup.h"
-#include <errno.h>
-#include <assert.h>
-#include <stdlib.h>
-#include <syslog.h>
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "perprocess.h"
-#include "security.h"
-
-extern int threadsafe;
-
-#define MT_INTERFACE user_data->threadinterface
-
-#define NOT_IMP(n) system_printf ("not implemented %s\n", n); return 0;
-
-#define CHECKHANDLE(rval, release) \
- if (!item->HandleOke ()) \
- { \
- if (release) \
- item->used=false; \
- return rval; \
- }
-
-#define GETTHREAD(n) \
- if (!thread) system_printf ("thread is NULL");\
- SetResourceLock (LOCK_THREAD_LIST, READ_LOCK, n);\
- ThreadItem *item=user_data->threadinterface->GetThread (thread); \
- ReleaseResourceLock (LOCK_THREAD_LIST, READ_LOCK, n); \
- if (!item) return EINVAL; \
- CHECKHANDLE (EINVAL, 0);
-
-#define GETMUTEX(n) \
- SetResourceLock (LOCK_MUTEX_LIST, READ_LOCK, n); \
- MutexItem* item=user_data->threadinterface->GetMutex (mutex); \
- ReleaseResourceLock (LOCK_MUTEX_LIST, READ_LOCK, n); \
- if (!item) return EINVAL; \
- CHECKHANDLE (EINVAL, 0);
-
-#define GETSEMA(n) \
- SetResourceLock (LOCK_SEM_LIST, READ_LOCK, n); \
- SemaphoreItem* item=user_data->threadinterface->GetSemaphore (sem); \
- ReleaseResourceLock (LOCK_SEM_LIST, READ_LOCK, n); \
- if (!item) return EINVAL; \
- CHECKHANDLE (EINVAL, 0);
-
-#define CHECKITEM(rn, rm, fn) \
- if (!item) { \
- ReleaseResourceLock (rn, rm, fn); \
- return EINVAL; }; \
-
-struct _reent *
-_reent_clib ()
-{
- int tmp = GetLastError ();
- struct __reent_t *_r = (struct __reent_t *) TlsGetValue (MT_INTERFACE->reent_index);
-
-#ifdef _CYG_THREAD_FAILSAFE
- if (_r == 0)
- system_printf ("local thread storage not inited");
-#endif
-
- SetLastError (tmp);
- return _r->_clib;
-}
-
-struct _winsup_t *
-_reent_winsup ()
-{
- int tmp = GetLastError ();
- struct __reent_t *_r;
- _r = (struct __reent_t *) TlsGetValue (MT_INTERFACE->reent_index);
-#ifdef _CYG_THREAD_FAILSAFE
- if (_r == 0)
- system_printf ("local thread storage not inited");
-#endif
- SetLastError (tmp);
- return _r->_winsup;
-}
-
-inline LPCRITICAL_SECTION
-ResourceLocks::Lock (int _resid)
-{
-#ifdef _CYG_THREAD_FAILSAFE
- if (!inited)
- system_printf ("lock called before initialization");
-
- thread_printf ("Get Resource lock %d ==> %p for %p , real : %d , threadid %d ",
- _resid, &lock, user_data, myself->pid, GetCurrentThreadId ());
-#endif
- return &lock;
-}
-
-void
-SetResourceLock (int _res_id, int _mode, const char *_function)
-{
-#ifdef _CYG_THREAD_FAILSAFE
- thread_printf ("Set resource lock %d mode %d for %s start",
- _res_id, _mode, _function);
-#endif
- EnterCriticalSection (user_data->resourcelocks->Lock (_res_id));
-
-#ifdef _CYG_THREAD_FAILSAFE
- user_data->resourcelocks->owner = GetCurrentThreadId ();
- user_data->resourcelocks->count++;
-#endif
-}
-
-void
-ReleaseResourceLock (int _res_id, int _mode, const char *_function)
-{
-#ifdef _CYG_THREAD_FAILSAFE
- thread_printf ("Release resource lock %d mode %d for %s done", _res_id, _mode, _function);
-
- AssertResourceOwner (_res_id, _mode);
- user_data->resourcelocks->count--;
- if (user_data->resourcelocks->count == 0)
- user_data->resourcelocks->owner = 0;
-#endif
-
- LeaveCriticalSection (user_data->resourcelocks->Lock (_res_id));
-}
-
-#ifdef _CYG_THREAD_FAILSAFE
-void
-AssertResourceOwner (int _res_id, int _mode)
-{
-
- thread_printf ("Assert Resource lock %d ==> for %p , real : %d , threadid %d count %d owner %d",
- _res_id, user_data, myself->pid, GetCurrentThreadId (),
- user_data->resourcelocks->count, user_data->resourcelocks->owner);
- if (user_data && (user_data->resourcelocks->owner != GetCurrentThreadId ()))
- system_printf ("assertion failed, not the resource owner");
-}
-
-#endif
-
-void
-ResourceLocks::Init ()
-{
- InitializeCriticalSection (&lock);
- inited = true;
-
-#ifdef _CYG_THREAD_FAILSAFE
- owner = 0;
- count = 0;
-#endif
-
- thread_printf ("lock %p inited by %p , %d", &lock, user_data, myself->pid);
-}
-
-void
-ResourceLocks::Delete ()
-{
- if (inited)
- {
- thread_printf ("Close Resource Locks %p ", &lock);
- DeleteCriticalSection (&lock);
- inited = false;
- }
-}
-
-
-// Thread interface
-
-void
-MTinterface::ReleaseItem (MTitem * _item)
-{
- _item->used = false;
-}
-
-MTitem *
-MTinterface::Find (void *_value, int (*comp) (void *, void *), register int &_index, MTList * _list)
-{
- register MTitem *current = NULL;
- for (; _index < _list->index; _index++)
- {
- current = _list->items[_index];
- if (current->used && comp (current, _value))
- break;
- current = NULL;
- }
- return current;
-}
-
-int
-MTinterface::Find (MTitem & _item, MTList * _list)
-{
- register MTitem *current;
- register int _index = 0;
- for (; _index < _list->index; _index++)
- {
- current = _list->items[_index];
- if (current->used && current == &_item)
- break;
- }
- return (_index == _list->index ? -1 : _index);
-}
-
-int
-MTinterface::FindNextUnused (MTList * _list)
-{
- register int i = 0;
- for (; i < _list->index && _list->items[i] != NULL && _list->items[i]->used && _list->items[i]->joinable != 'Y'; i++)
- continue;
- return i;
-}
-
-MTitem *
-MTinterface::GetItem (int _index, MTList * _list)
-{
- return (_index < _list->index ? _list->items[_index] : NULL);
-}
-
-MTitem *
-MTinterface::SetItem (int _index, MTitem * _item, MTList * _list)
-{
- if (_index == _list->index && _list->index < MT_MAX_ITEMS)
- _list->index++;
- return (_index < _list->index ? _list->items[_index] = _item : NULL);
-}
-
-int
-CmpPthreadObj (void *_i, void *_value)
-{
- return ((MTitem *) _i)->Id () == *(int *) _value;
-}
-
-int
-CmpThreadId (void *_i, void *_id)
-{
- return ((ThreadItem *) _i)->thread_id == * (DWORD *) _id;
-}
-
-void
-MTinterface::Init (int forked)
-{
-#if 0
- for (int i = 0; i < MT_MAX_ITEMS; i++)
- {
- threadlist.items[i] = NULL;
- mutexlist.items[i] = NULL;
- semalist.items[i] = NULL;
- }
-
- threadlist.index = 0;
- mutexlist.index = 0;
- semalist.index = 0;
-#endif
-
- reent_index = TlsAlloc ();
-
- reents._clib = _impure_ptr;
- reents._winsup = &winsup_reent;
-
- winsup_reent._process_logmask = LOG_UPTO (LOG_DEBUG);
-#if 0
- winsup_reent._grp_pos = 0;
- winsup_reent._process_ident = 0;
- winsup_reent._process_logopt = 0;
- winsup_reent._process_facility = 0;
-#endif
-
- TlsSetValue (reent_index, &reents);
- // the static reent_data will be used in the main thread
-
- if (forked)
- return;
-
- // create entry for main thread
-
- ThreadItem *item = (ThreadItem *) GetItem (0, &threadlist);
-
- item = (ThreadItem *) SetItem (0, &mainthread, &threadlist);
- item->used = true;
- item->win32_obj_id = myself->hProcess;
- item->thread_id = GetCurrentThreadId ();
-#if 0
- item->function = NULL;
-
- item->sigs = NULL;
- item->sigmask = NULL;
- item->sigtodo = NULL;
-#endif
-
- struct _reent *r = _REENT;
- memset (r, 0, sizeof (struct _reent));
-
- r->_errno = 0;
- r->_stdin = &r->__sf[0];
- r->_stdout = &r->__sf[1];
- r->_stderr = &r->__sf[2];
-}
-
-ThreadItem *
-MTinterface::CreateThread (pthread_t * t, TFD (func), void *arg, pthread_attr_t a)
-{
- AssertResourceOwner (LOCK_THREAD_LIST, WRITE_LOCK | READ_LOCK);
-
- int i = FindNextUnused (&threadlist);
-
- ThreadItem *item = (ThreadItem *) GetItem (i, &threadlist);
- if (!item)
- item = (ThreadItem *) SetItem (i, new ThreadItem (), &threadlist);
- if (!item)
- system_printf ("thread creation failed");
-
- item->used = true;
- item->function = func;
- item->arg = arg;
- item->attr = a;
-
- item->win32_obj_id = ::CreateThread (&sec_none_nih, item->attr.stacksize,
- (LPTHREAD_START_ROUTINE) thread_init_wrapper, item, 0, &item->thread_id);
-
- CHECKHANDLE (NULL, 1);
-
- *t = (pthread_t) item->win32_obj_id;
-
- return item;
-}
-
-MutexItem *
-MTinterface::CreateMutex (pthread_mutex_t * mutex)
-{
- AssertResourceOwner (LOCK_MUTEX_LIST, WRITE_LOCK | READ_LOCK);
-
- int i = FindNextUnused (&mutexlist);
-
- MutexItem *item = (MutexItem *) GetItem (i, &mutexlist);
- if (!item)
- item = (MutexItem *) SetItem (i, new MutexItem (), &mutexlist);
- if (!item)
- system_printf ("mutex creation failed");
- item->used = true;
-
- item->win32_obj_id = ::CreateMutex (&sec_none_nih, false, NULL);
-
- CHECKHANDLE (NULL, 1);
-
- *mutex = (pthread_mutex_t) item->win32_obj_id;
-
- return item;
-}
-
-ThreadItem *
-MTinterface::GetCallingThread ()
-{
- AssertResourceOwner (LOCK_THREAD_LIST, READ_LOCK);
- DWORD id = GetCurrentThreadId ();
- int index = 0;
- return (ThreadItem *) Find (&id, &CmpThreadId, index, &threadlist);
-}
-
-ThreadItem *
-MTinterface::GetThread (pthread_t * _t)
-{
- AssertResourceOwner (LOCK_THREAD_LIST, READ_LOCK);
- int index = 0;
- return (ThreadItem *) Find (_t, &CmpPthreadObj, index, &threadlist);
-}
-
-MutexItem *
-MTinterface::GetMutex (pthread_mutex_t * mp)
-{
- AssertResourceOwner (LOCK_MUTEX_LIST, READ_LOCK);
- int index = 0;
- return (MutexItem *) Find (mp, &CmpPthreadObj, index, &mutexlist);
-}
-
-SemaphoreItem *
-MTinterface::GetSemaphore (sem_t * sp)
-{
- AssertResourceOwner (LOCK_SEM_LIST, READ_LOCK);
- int index = 0;
- return (SemaphoreItem *) Find (sp, &CmpPthreadObj, index, &semalist);
-}
-
-
-void
-MTitem::Destroy ()
-{
- CloseHandle (win32_obj_id);
-}
-
-int
-MutexItem::Lock ()
-{
- return WaitForSingleObject (win32_obj_id, INFINITE);
-}
-
-int
-MutexItem::TryLock ()
-{
- return WaitForSingleObject (win32_obj_id, 0);
-}
-
-int
-MutexItem::UnLock ()
-{
- return ReleaseMutex (win32_obj_id);
-}
-
-SemaphoreItem *
-MTinterface::CreateSemaphore (sem_t * _s, int pshared, int _v)
-{
- AssertResourceOwner (LOCK_SEM_LIST, WRITE_LOCK | READ_LOCK);
-
- int i = FindNextUnused (&semalist);
-
- SemaphoreItem *item = (SemaphoreItem *) GetItem (i, &semalist);
- if (!item)
- item = (SemaphoreItem *) SetItem (i, new SemaphoreItem (), &semalist);
- if (!item)
- system_printf ("semaphore creation failed");
- item->used = true;
- item->shared = pshared;
-
- item->win32_obj_id = ::CreateSemaphore (&sec_none_nih, _v, _v, NULL);
-
- CHECKHANDLE (NULL, 1);
-
- *_s = (sem_t) item->win32_obj_id;
-
- return item;
-}
-
-int
-SemaphoreItem::Wait ()
-{
- return WaitForSingleObject (win32_obj_id, INFINITE);
-}
-
-int
-SemaphoreItem::Post ()
-{
- long pc;
- return ReleaseSemaphore (win32_obj_id, 1, &pc);
-}
-
-int
-SemaphoreItem::TryWait ()
-{
- return WaitForSingleObject (win32_obj_id, 0);
-}
-
-
-////////////////////////// Pthreads
-
-void *
-thread_init_wrapper (void *_arg)
-{
-// Setup the local/global storage of this thread
-
- ThreadItem *thread = (ThreadItem *) _arg;
- struct __reent_t local_reent;
- struct _winsup_t local_winsup;
- struct _reent local_clib;
-
- struct sigaction _sigs[NSIG];
- sigset_t _sig_mask; /* one set for everything to ignore. */
- LONG _sigtodo[NSIG + __SIGOFFSET];
-
-// setup signal structures
- thread->sigs = _sigs;
- thread->sigmask = &_sig_mask;
- thread->sigtodo = _sigtodo;
-
- memset (&local_clib, 0, sizeof (struct _reent));
- memset (&local_winsup, 0, sizeof (struct _winsup_t));
-
- local_clib._errno = 0;
- local_clib._stdin = &local_clib.__sf[0];
- local_clib._stdout = &local_clib.__sf[1];
- local_clib._stderr = &local_clib.__sf[2];
-
- local_reent._clib = &local_clib;
- local_reent._winsup = &local_winsup;
-
- local_winsup._process_logmask = LOG_UPTO (LOG_DEBUG);
-
-
- if (!TlsSetValue (MT_INTERFACE->reent_index, &local_reent))
- system_printf ("local storage for thread couldn't be set");
-
-#ifdef _CYG_THREAD_FAILSAFE
- if (_REENT == _impure_ptr)
- system_printf ("local storage for thread isn't setup correctly");
-#endif
-
-
- thread_printf ("started thread %p %p %p %p %p %p", _arg, &local_clib, _impure_ptr, thread, thread->function, thread->arg);
-
-
-// call the user's thread
- void *ret = thread->function (thread->arg);
-
-// FIX ME : cleanup code
-
-// thread->used = false; // release thread entry
- thread->return_ptr = ret;
- ExitThread (0);
-}
-
-int
-__pthread_create (pthread_t * thread, const pthread_attr_t * attr, TFD (start_routine), void *arg)
-{
- SetResourceLock (LOCK_THREAD_LIST, WRITE_LOCK | READ_LOCK, "__pthread_create");
-
- pthread_attr_t a;
- ThreadItem *item;
-
- if (attr)
- item = MT_INTERFACE->CreateThread (thread, start_routine, arg, *attr);
- else
- {
- __pthread_attr_init (&a);
- item = MT_INTERFACE->CreateThread (thread, start_routine, arg, a);
- }
-
- CHECKITEM (LOCK_THREAD_LIST, WRITE_LOCK | READ_LOCK, "__pthread_create")
-
- ReleaseResourceLock (LOCK_THREAD_LIST, WRITE_LOCK | READ_LOCK, "__pthread_create");
- return 0;
-}
-
-int
-__pthread_attr_init (pthread_attr_t * attr)
-{
- attr->stacksize = 0;
- return 0;
-}
-
-int
-__pthread_attr_setstacksize (pthread_attr_t * attr, size_t size)
-{
- attr->stacksize = size;
- return 0;
-}
-
-int
-__pthread_attr_getstacksize (pthread_attr_t * attr, size_t * size)
-{
- *size = attr->stacksize;
- return 0;
-}
-
-int
-__pthread_attr_destroy (pthread_attr_t * /*attr*/)
-{
- return 0;
-}
-
-int
-__pthread_exit (void *value_ptr)
-{
- ThreadItem *item = MT_INTERFACE->GetCallingThread ();
- item->return_ptr = value_ptr;
- ExitThread (0);
- return 0;
-}
-
-int
-__pthread_join (pthread_t * thread, void **return_val)
-{
- ThreadItem *item=user_data->threadinterface->GetThread (thread);
-
-
- if (!item)
- return ESRCH;
-
- if (item->joinable == 'N')
- {
- if (return_val)
- *return_val = NULL;
- return EINVAL;
- }
- else
- {
- item->joinable = 'N';
- WaitForSingleObject ((HANDLE)*thread, INFINITE);
- if (return_val)
- *return_val = item->return_ptr;
- }/* End if*/
-
- return 0;
-}
-
-int
-__pthread_detach (pthread_t * thread)
-{
- ThreadItem *item=user_data->threadinterface->GetThread (thread);
- if (!item)
- return ESRCH;
-
- if (item->joinable == 'N')
- {
- item->return_ptr = NULL;
- return EINVAL;
- }
-
- item->joinable = 'N';
- return 0;
-}
-
-int
-__pthread_suspend (pthread_t * thread)
-{
- ThreadItem *item=user_data->threadinterface->GetThread (thread);
- if (!item)
- return ESRCH;
-
- if (item->suspended == false)
- {
- item->suspended = true;
- SuspendThread ((HANDLE)*thread);
- }
-
- return 0;
-}
-
-
-int
-__pthread_continue (pthread_t * thread)
-{
- ThreadItem *item=user_data->threadinterface->GetThread (thread);
- if (!item)
- return ESRCH;
-
- if (item->suspended == true)
- ResumeThread ((HANDLE)*thread);
- item->suspended = false;
-
- return 0;
-}
-
-
-
-
-unsigned long
-__pthread_getsequence_np (pthread_t * thread)
-{
- GETTHREAD ("__pthread_getsequence_np");
- return item->GetThreadId ();
-}
-
-/* Thread SpecificData */
-int
-__pthread_key_create (pthread_key_t */*key*/)
-{
- NOT_IMP ("_p_key_create\n");
-}
-
-int
-__pthread_key_delete (pthread_key_t */*key*/)
-{
- NOT_IMP ("_p_key_delete\n");
-}
-int
-__pthread_setspecific (pthread_key_t */*key*/, const void */*value*/)
-{
- NOT_IMP ("_p_key_setsp\n");
-}
-void *
-__pthread_getspecific (pthread_key_t */*key*/)
-{
- NOT_IMP ("_p_key_getsp\n");
-}
-
-/* Thread signal */
-int
-__pthread_kill (pthread_t * thread, int sig)
-{
-// lock myself, for the use of thread2signal
- // two differ kills might clash: FIX ME
- GETTHREAD ("__pthread_kill");
-
- if (item->sigs)
- myself->setthread2signal (item);
-
- int rval = _kill (myself->pid, sig);
-
-// unlock myself
- return rval;
-
-}
-
-int
-__pthread_sigmask (int operation, const sigset_t * set, sigset_t * old_set)
-{
- SetResourceLock (LOCK_THREAD_LIST, READ_LOCK, "__pthread_sigmask");
- ThreadItem *item = MT_INTERFACE->GetCallingThread ();
- ReleaseResourceLock (LOCK_THREAD_LIST, READ_LOCK, "__pthread_sigmask");
-
-// lock this myself, for the use of thread2signal
- // two differt kills might clash: FIX ME
-
- if (item->sigs)
- myself->setthread2signal (item);
-
- int rval = sigprocmask (operation, set, old_set);
-
-// unlock this myself
-
- return rval;
-}
-
-/* ID */
-pthread_t
-__pthread_self ()
-{
- SetResourceLock (LOCK_THREAD_LIST, READ_LOCK, "__pthread_self");
-
- ThreadItem *item = MT_INTERFACE->GetCallingThread ();
-
- ReleaseResourceLock (LOCK_THREAD_LIST, READ_LOCK, "__pthread_self");
- return (pthread_t) item->Id ();
-
-}
-
-int
-__pthread_equal (pthread_t * t1, pthread_t * t2)
-{
- return (*t1 - *t2);
-}
-
-/* Mutexes */
-
-int
-__pthread_mutex_init (pthread_mutex_t * mutex, const pthread_mutexattr_t */*_attr*/)
-{
- SetResourceLock (LOCK_MUTEX_LIST, WRITE_LOCK | READ_LOCK, "__pthread_mutex_init");
-
- MutexItem *item = MT_INTERFACE->CreateMutex (mutex);
-
- CHECKITEM (LOCK_MUTEX_LIST, WRITE_LOCK | READ_LOCK, "__pthread_mutex_init");
-
- ReleaseResourceLock (LOCK_MUTEX_LIST, WRITE_LOCK | READ_LOCK, "__pthread_mutex_init");
- return 0;
-}
-
-int
-__pthread_mutex_lock (pthread_mutex_t * mutex)
-{
- GETMUTEX ("_ptherad_mutex_lock");
-
- item->Lock ();
-
- return 0;
-}
-
-int
-__pthread_mutex_trylock (pthread_mutex_t * mutex)
-{
- GETMUTEX ("_ptherad_mutex_lock");
-
- if (item->TryLock () == WAIT_TIMEOUT)
- return EBUSY;
-
- return 0;
-}
-
-int
-__pthread_mutex_unlock (pthread_mutex_t * mutex)
-{
- GETMUTEX ("_ptherad_mutex_lock");
-
- item->UnLock ();
-
- return 0;
-}
-
-int
-__pthread_mutex_destroy (pthread_mutex_t * mutex)
-{
- SetResourceLock (LOCK_MUTEX_LIST, READ_LOCK | WRITE_LOCK, "__pthread_mutex_destroy");
-
- MutexItem *item = MT_INTERFACE->GetMutex (mutex);
-
- CHECKITEM (LOCK_MUTEX_LIST, WRITE_LOCK | READ_LOCK, "__pthread_mutex_init");
-
- item->Destroy ();
-
- MT_INTERFACE->ReleaseItem (item);
-
- ReleaseResourceLock (LOCK_MUTEX_LIST, READ_LOCK | WRITE_LOCK, "__pthread_mutex_destroy");
- return 0;
-}
-
-/* Semaphores */
-int
-__sem_init (sem_t * sem, int pshared, unsigned int value)
-{
- SetResourceLock (LOCK_SEM_LIST, READ_LOCK | WRITE_LOCK, "__sem_init");
-
- SemaphoreItem *item = MT_INTERFACE->CreateSemaphore (sem, pshared, value);
-
- CHECKITEM (LOCK_SEM_LIST, READ_LOCK | WRITE_LOCK, "__sem_init");
-
- ReleaseResourceLock (LOCK_SEM_LIST, READ_LOCK | WRITE_LOCK, "__sem_init");
- return 0;
-}
-
-int
-__sem_destroy (sem_t * sem)
-{
- SetResourceLock (LOCK_SEM_LIST, READ_LOCK | WRITE_LOCK, "__sem_destroy");
-
- SemaphoreItem *item = MT_INTERFACE->GetSemaphore (sem);
-
- CHECKITEM (LOCK_SEM_LIST, READ_LOCK | WRITE_LOCK, "__sem_init");
-
- item->Destroy ();
-
- MT_INTERFACE->ReleaseItem (item);
-
- ReleaseResourceLock (LOCK_SEM_LIST, READ_LOCK | WRITE_LOCK, "__sem_destroy");
- return 0;
-}
-
-int
-__sem_wait (sem_t * sem)
-{
- GETSEMA ("__sem_wait");
-
- item->Wait ();
-
- return 0;
-}
-
-int
-__sem_trywait (sem_t * sem)
-{
- GETSEMA ("__sem_trywait");
-
- if (item->TryWait () == WAIT_TIMEOUT)
- return EAGAIN;
-
- return 0;
-}
-
-int
-__sem_post (sem_t * sem)
-{
- GETSEMA ("__sem_post");
-
- item->Post ();
-
- return 0;
-}
-
-
-#else
-
-// empty functions needed when makeing the dll without mt_safe support
-extern "C"
-{
- int __pthread_create (pthread_t *, const pthread_attr_t *, TFD (start_routine), void *arg)
- {
- return -1;
- }
- int __pthread_attr_init (pthread_attr_t * attr)
- {
- return -1;
- }
- int __pthread_attr_destroy (pthread_attr_t * attr)
- {
- return -1;
- }
- int __pthread_attr_setstacksize (pthread_attr_t * attr, size_t size)
- {
- return -1;
- }
- int __pthread_attr_getstacksize (pthread_attr_t * attr, size_t * size)
- {
- return -1;
- }
-/*
- __pthread_attr_setstackaddr (...){ return -1; };
- __pthread_attr_getstackaddr (...){ return -1; };
- */
- int __pthread_exit (void *value_ptr)
- {
- return -1;
- }
-
- int __pthread_join (pthread_t thread_id, void **return_val)
- {
- return -1;
- }
-
- unsigned long __pthread_getsequence_np (pthread_t * thread)
- {
- return 0;
- }
- int __pthread_key_create (pthread_key_t * key)
- {
- return -1;
- }
- int __pthread_key_delete (pthread_key_t * key)
- {
- return -1;
- }
- int __pthread_setspecific (pthread_key_t * key, const void *value)
- {
- return -1;
- }
- void *__pthread_getspecific (pthread_key_t * key)
- {
- return NULL;
- }
- int __pthread_kill (pthread_t * thread, int sig)
- {
- return -1;
- }
- int __pthread_sigmask (int operation, const sigset_t * set, sigset_t * old_set)
- {
- return -1;
- }
- pthread_t __pthread_self ()
- {
- return -1;
- }
- int __pthread_equal (pthread_t * t1, pthread_t * t2)
- {
- return -1;
- }
- int __pthread_mutex_init (pthread_mutex_t *, const pthread_mutexattr_t *)
- {
- return -1;
- }
- int __pthread_mutex_lock (pthread_mutex_t *)
- {
- return -1;
- }
- int __pthread_mutex_trylock (pthread_mutex_t *)
- {
- return -1;
- }
- int __pthread_mutex_unlock (pthread_mutex_t *)
- {
- return -1;
- }
- int __pthread_mutex_destroy (pthread_mutex_t *)
- {
- return -1;
- }
- int __sem_init (sem_t * sem, int pshared, unsigned int value)
- {
- return -1;
- }
- int __sem_destroy (sem_t * sem)
- {
- return -1;
- }
- int __sem_wait (sem_t * sem)
- {
- return -1;
- }
- int __sem_trywait (sem_t * sem)
- {
- return -1;
- }
- int __sem_post (sem_t * sem)
- {
- return -1;
- }
- struct _reent *_reent_clib ()
- {
- return NULL;
- }
-}
-
-#endif // MT_SAFE
diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h
deleted file mode 100644
index 999bd5ed8..000000000
--- a/winsup/cygwin/thread.h
+++ /dev/null
@@ -1,305 +0,0 @@
-/* thread.h: Locking and threading module definitions
-
- Copyright 1998, 1999, 2000 Cygnus Solutions.
-
- 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. */
-
-#ifndef _CYGNUS_THREADS_
-#define _CYGNUS_THREADS_
-
-#define LOCK_FD_LIST 1
-#define LOCK_MEMORY_LIST 2
-#define LOCK_MMAP_LIST 3
-#define LOCK_DLL_LIST 4
-#define LOCK_THREAD_LIST 5
-#define LOCK_MUTEX_LIST 6
-#define LOCK_SEM_LIST 7
-
-#define WRITE_LOCK 1
-#define READ_LOCK 2
-
-extern "C"
-{
-#if defined (_CYG_THREAD_FAILSAFE) && defined (_MT_SAFE)
- void AssertResourceOwner (int, int);
-#else
-# define AssertResourceOwner(i,ii)
-#endif
-}
-
-#ifndef _MT_SAFE
-
-#define SetResourceLock(i,n,c)
-#define ReleaseResourceLock(i,n,c)
-
-#else
-
-#include <pthread.h>
-#include <pwd.h>
-#include <grp.h>
-#define _NOMNTENT_FUNCS
-#include <mntent.h>
-
-extern "C" {
-
-struct _winsup_t
-{
-/*
- Needed for the group functions
-*/
- struct group _grp;
- char *_namearray[2];
- char _linebuf[100];
- int _grp_pos;
-
-/* console.cc */
- unsigned _rarg;
- char _my_title_buf[TITLESIZE + 1];
-
-/* dlfcn.cc */
- int _dl_error;
- char _dl_buffer[256];
-
-/* passwd.cc */
- struct passwd _res;
- char _tmpbuf[100];
- char _pass[_PASSWORD_LEN];
- int _pw_pos;
-
-/* path.cc */
- struct mntent _ret;
- int _iteration;
-
-/* strerror */
- char _strerror_buf[20];
-
-/* syscalls.cc */
- char _dacl_buf[1024];
- char _sacl_buf[1024];
- char _ownr_buf[1024];
- char _grp_buf[1024];
-
-/* sysloc.cc */
- char *_process_ident;
- int _process_logopt;
- int _process_facility;
- int _process_logmask;
-
-/* times.cc */
- char _b[20];
- struct tm _localtime_buf;
- char _buf1[33];
- char _buf2[33];
-
-/* uinfo.cc */
- char _username[MAX_USER_NAME];
-};
-
-
-struct __reent_t
-{
- struct _reent *_clib;
- struct _winsup_t *_winsup;
-};
-
-_reent *_reent_clib ();
-_winsup_t *_reent_winsup ();
-void SetResourceLock (int, int, const char *) __attribute__ ((regparm(3)));
-void ReleaseResourceLock (int, int, const char *) __attribute__ ((regparm(3)));
-
-#ifdef _CYG_THREAD_FAILSAFE
-void AssertResourceOwner (int, int);
-#else
-#define AssertResourceOwner(i,ii)
-#endif
-}
-
-class per_process;
-class pinfo;
-
-class ResourceLocks
-{
-public:
- ResourceLocks () {};
- LPCRITICAL_SECTION Lock (int);
- void Init ();
- void Delete ();
-#ifdef _CYG_THREAD_FAILSAFE
- DWORD owner;
- DWORD count;
-#endif
- private:
- CRITICAL_SECTION lock;
- bool inited;
-};
-
-
-#define MT_MAX_ITEMS 128
-
-// thread classes\lists
-
-class MTitem
-{
- public:
- HANDLE win32_obj_id;
- UINT return_value;
- bool used;
- char joinable; // for thread only
- bool HandleOke () {return win32_obj_id;}
- virtual void Destroy ();
- virtual int Id () {return (int) win32_obj_id;}
-};
-
-class ThreadItem: public MTitem
-{
-public:
- pthread_attr_t attr;
- TFD (function);
- void *arg;
- void *return_ptr;
- bool suspended;
- DWORD thread_id;
- DWORD GetThreadId () {return thread_id;}
-
- /* signal handling */
- struct sigaction *sigs;
- sigset_t *sigmask;
- LONG *sigtodo;
-};
-
-class MutexItem: public MTitem
-{
-public:
- int Lock ();
- int TryLock ();
- int UnLock ();
-};
-
-class SemaphoreItem: public MTitem
-{
-public:
- int shared;
- int Wait ();
- int Post ();
- int TryWait ();
-};
-
-
-typedef struct
-{
- MTitem *items[MT_MAX_ITEMS];
- int index;
-} MTList;
-
-class MTinterface
-{
-public:
- // General
- DWORD reent_index;
- DWORD thread_key;
-
- // Used for main thread data, and sigproc thread
- struct __reent_t reents;
- struct _winsup_t winsup_reent;
- ThreadItem mainthread;
-
- void Init (int);
-
- void ReleaseItem (MTitem *);
-
- // Thread functions
- ThreadItem *CreateThread (pthread_t *, TFD (func), void *, pthread_attr_t);
- ThreadItem *GetCallingThread ();
- ThreadItem *GetThread (pthread_t *);
-
- // Mutex functions
- MutexItem *CreateMutex (pthread_mutex_t *);
- MutexItem *GetMutex (pthread_mutex_t *);
-
- // Semaphore functions
- SemaphoreItem *CreateSemaphore (sem_t *, int, int);
- SemaphoreItem *GetSemaphore (sem_t * t);
-
-private:
- // General Administration
- MTitem * Find (void *, int (*compare) (void *, void *), int &, MTList *);
- MTitem *GetItem (int, MTList *);
- MTitem *SetItem (int, MTitem *, MTList *);
- int Find (MTitem &, MTList *);
- int FindNextUnused (MTList *);
-
- MTList threadlist;
- MTList mutexlist;
- MTList semalist;
-};
-
-
-extern "C"
-{
-
-void *thread_init_wrapper (void *);
-
-/* ThreadCreation */
-int __pthread_create (pthread_t * thread, const pthread_attr_t * attr, TFD (start_routine), void *arg);
-int __pthread_attr_init (pthread_attr_t * attr);
-int __pthread_attr_destroy (pthread_attr_t * attr);
-int __pthread_attr_setstacksize (pthread_attr_t * attr, size_t size);
-int __pthread_attr_getstacksize (pthread_attr_t * attr, size_t * size);
-/*
-__pthread_attr_setstackaddr(...);
-__pthread_attr_getstackaddr(...);
-*/
-
-/* Thread Exit */
-int __pthread_exit (void *value_ptr);
-int __pthread_join(pthread_t *thread, void **return_val);
-int __pthread_detach(pthread_t *thread);
-
-/* Thread suspend */
-
-int __pthread_suspend(pthread_t *thread);
-int __pthread_continue(pthread_t *thread);
-
-unsigned long __pthread_getsequence_np (pthread_t * thread);
-
-/* Thread SpecificData */
-int __pthread_key_create (pthread_key_t * key);
-int __pthread_key_delete (pthread_key_t * key);
-int __pthread_setspecific (pthread_key_t * key, const void *value);
-void *__pthread_getspecific (pthread_key_t * key);
-
-
-/* Thread signal */
-int __pthread_kill (pthread_t * thread, int sig);
-int __pthread_sigmask (int operation, const sigset_t * set, sigset_t * old_set);
-
-/* ID */
-pthread_t __pthread_self ();
-int __pthread_equal (pthread_t * t1, pthread_t * t2);
-
-
-/* Mutexes */
-int __pthread_mutex_init (pthread_mutex_t *, const pthread_mutexattr_t *);
-int __pthread_mutex_lock (pthread_mutex_t *);
-int __pthread_mutex_trylock (pthread_mutex_t *);
-int __pthread_mutex_unlock (pthread_mutex_t *);
-int __pthread_mutex_destroy (pthread_mutex_t *);
-
-/* Semaphores */
-int __sem_init (sem_t * sem, int pshared, unsigned int value);
-int __sem_destroy (sem_t * sem);
-int __sem_wait (sem_t * sem);
-int __sem_trywait (sem_t * sem);
-int __sem_post (sem_t * sem);
-
-};
-
-#endif // MT_SAFE
-
-#endif // _CYGNUS_THREADS_
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc
deleted file mode 100644
index 790291248..000000000
--- a/winsup/cygwin/times.cc
+++ /dev/null
@@ -1,546 +0,0 @@
-/* times.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <time.h>
-#include <sys/times.h>
-#include <sys/timeb.h>
-#include <utime.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "path.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "security.h"
-
-#define FACTOR (0x19db1ded53e8000LL)
-#define NSPERSEC 10000000LL
-
-static void __stdcall timeval_to_filetime (timeval *time, FILETIME *out);
-
-/* 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\n", (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;
-
- DWORD ticks = GetTickCount ();
- /* Ticks is in milliseconds, convert to our ticks. Use long long to prevent
- overflow. */
- clock_t tc = (clock_t) ((long long) ticks * CLOCKS_PER_SEC / 1000);
- if (os_being_run == winNT)
- {
- 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);
- }
- else
- /* GetProcessTimes() does not work for non-NT versions of Windows. The
- return values are undefined, so instead just copy the ticks value
- into utime so that clock() will work properly on these systems */
- {
- buf->tms_utime = tc;
- buf->tms_stime = 0;
- buf->tms_cstime = 0;
- buf->tms_cutime = 0;
- }
-
- return tc;
-}
-
-extern "C" clock_t
-_times (struct tms * buf)
-{
- return times (buf);
-}
-
-/* settimeofday: BSD */
-extern "C" int
-settimeofday (const struct timeval *, const struct timezone *)
-{
- set_errno (ENOSYS);
- return -1;
-}
-
-/* timezone: standards? */
-extern "C" char *
-timezone ()
-{
-#ifdef _MT_SAFE
- char *b=_reent_winsup()->_b;
-#else
- static NO_COPY char b[20] = {0};
-#endif
-
- 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);
-}
-
-/* gettimeofday: BSD */
-extern "C" int
-gettimeofday (struct timeval *p, struct timezone *z)
-{
- int res = 0;
-
- if (p != NULL)
- {
- FILETIME f;
-
- GetSystemTimeAsFileTime (&f);
- totimeval (p, &f, 0, 1);
- }
-
- if (z != NULL)
- {
- tzset();
- z->tz_minuteswest = _timezone / 60;
- z->tz_dsttime = _daylight;
- }
-
- syscall_printf ("%d = gettimeofday (%x, %x)", res, p, z);
-
- return res;
-}
-
-extern "C"
-int
-_gettimeofday (struct timeval *p, struct timezone *z)
-{
- return gettimeofday (p, z);
-}
-
-#if 0
-/* Work out magic constant below */
-genf ()
-{
- SYSTEMTIME s;
- FILETIME f;
- s.wYear = 1970;
- s.wMonth = 1;
- s.wDayOfWeek = 4;
- s.wDay = 1;
- s.wHour = 0;
- s.wMinute = 0;
- s.wSecond = 0;
- s.wMilliseconds = 0;
- SystemTimeToFileTime (&s, &f);
-
- small_printf ("FILE TIME is %08x%08x\n",
- f.dwHighDateTime,
- f.dwLowDateTime);
-}
-#endif
-
-/* 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 */
-static void __stdcall
-timeval_to_filetime (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 */
-/* 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);
-
- /* pass "no time" as epoch */
- if (x == 0)
- return 0;
-
- 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;
-}
-
-/* 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;
- SYSTEMTIME systemtime;
- FILETIME filetime;
-
- GetSystemTime (&systemtime);
- SystemTimeToFileTime (&systemtime, &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;
-#ifdef _MT_SAFE
- struct tm &localtime_buf=_reent_winsup()->_localtime_buf;
-#else
- static NO_COPY struct tm localtime_buf = {0};
-#endif
-
- 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 */
-
-/* utimes: standards? */
-extern "C"
-int
-utimes (const char *path, struct timeval *tvp)
-{
- int res = 0;
- struct timeval tmp[2];
- path_conv win32 (path);
-
- if (win32.error)
- {
- set_errno (win32.error);
- syscall_printf ("-1 = utimes (%s, %x)", path, tvp);
- return -1;
- }
-
- /* MSDN suggests using FILE_FLAG_BACKUP_SEMANTICS for accessing
- the times of directories. FIXME: what about Win95??? */
- HANDLE h = CreateFileA (win32.get_win32 (),
- GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- &sec_none_nih,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS,
- 0);
-
- if (h == INVALID_HANDLE_VALUE)
- {
- if ((res = GetFileAttributes (win32.get_win32 ())) != -1 &&
- (res & FILE_ATTRIBUTE_DIRECTORY))
- {
- /* What we can do with directories more? */
- res = 0;
- }
- else
- {
- res = -1;
- __seterrno ();
- }
- }
- else
- {
- if (tvp == 0)
- {
- gettimeofday (&tmp[0], 0);
- tmp[1] = tmp[0];
- tvp = tmp;
- }
-
- FILETIME lastaccess;
- FILETIME lastwrite;
-
- timeval_to_filetime (tvp + 0, &lastaccess);
- timeval_to_filetime (tvp + 1, &lastwrite);
-
- debug_printf ("incoming lastaccess %08x %08x",
- tvp->tv_sec,
- tvp->tv_usec);
-
-// dump_filetime (lastaccess);
-// dump_filetime (lastwrite);
-
- /* FIXME: SetFileTime needs a handle with a write lock
- on the file whose time is being modified. So calls to utime()
- fail for read only files. */
-
- if (!SetFileTime (h, 0, &lastaccess, &lastwrite))
- {
- __seterrno ();
- res = -1;
- }
- else
- res = 0;
- CloseHandle (h);
- }
-
- syscall_printf ("%d = utimes (%s, %x); (h%d)",
- res, path, tvp, h);
- return res;
-}
-
-/* utime: POSIX 5.6.6.1 */
-extern "C"
-int
-utime (const char *path, 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 ()
-{
-}
diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc
deleted file mode 100644
index baff0a4c2..000000000
--- a/winsup/cygwin/tty.cc
+++ /dev/null
@@ -1,426 +0,0 @@
-/* tty.cc
-
- Copyright 1997, 1998, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <errno.h>
-#include <unistd.h>
-#include <utmp.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <sys/cygwin.h>
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "shared_info.h"
-#include "security.h"
-
-extern fhandler_tty_master *tty_master;
-
-extern "C"
-int
-grantpt (void)
-{
- return 0;
-}
-
-extern "C"
-int
-unlockpt (void)
-{
- return 0;
-}
-
-extern "C"
-int
-ttyslot (void)
-{
- if (NOTSTATE (myself, PID_USETTY))
- return -1;
- return myself->ctty;
-}
-
-void __stdcall
-tty_init (void)
-{
- if (NOTSTATE (myself, PID_USETTY))
- return;
- if (myself->ctty == -1)
- if (NOTSTATE (myself, PID_CYGPARENT))
- myself->ctty = attach_tty (myself->ctty);
- else
- return;
- if (myself->ctty == -1)
- termios_printf ("Can't attach to tty");
-}
-
-/* Create session's master tty */
-
-void __stdcall
-create_tty_master (int ttynum)
-{
- tty_master = (fhandler_tty_master *) fdtab.build_fhandler (-1, FH_TTYM,
- "/dev/ttym", ttynum);
- if (tty_master->init (ttynum))
- api_fatal ("Can't create master tty");
- else
- {
- /* Log utmp entry */
- struct utmp our_utmp;
-
- bzero ((char *) &our_utmp, sizeof (utmp));
- (void) time (&our_utmp.ut_time);
- strncpy (our_utmp.ut_name, getlogin (), sizeof (our_utmp.ut_name));
- cygwin_gethostname (our_utmp.ut_host, sizeof (our_utmp.ut_host));
- __small_sprintf (our_utmp.ut_line, "tty%d", ttynum);
- our_utmp.ut_type = USER_PROCESS;
- myself->ctty = ttynum;
- login (&our_utmp);
- }
-}
-
-void __stdcall
-tty_terminate (void)
-{
- if (NOTSTATE (myself, PID_USETTY))
- return;
- cygwin_shared->tty.terminate ();
-}
-
-int __stdcall
-attach_tty (int num)
-{
- if (num != -1)
- {
- return cygwin_shared->tty.connect_tty (num);
- }
- if (NOTSTATE (myself, PID_USETTY))
- return -1;
- return cygwin_shared->tty.allocate_tty (1);
-}
-
-void
-tty_list::terminate (void)
-{
- int ttynum = myself->ctty;
-
- /* Keep master running till there are connected clients */
- if (ttynum != -1 && ttys[ttynum].master_pid == GetCurrentProcessId ())
- {
- tty *t = ttys + ttynum;
- CloseHandle (t->from_master);
- CloseHandle (t->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;
- }
-
- Sleep (200);
- }
-
- termios_printf ("tty %d master about to finish", ttynum);
- ForceCloseHandle1 (t->to_slave, to_pty);
- ForceCloseHandle1 (t->from_slave, from_pty);
- WaitForSingleObject (tty_master->hThread, INFINITE);
- t->init ();
-
- char buf[20];
- __small_sprintf (buf, "tty%d", ttynum);
- logout (buf);
- }
-}
-
-int
-tty_list::connect_tty (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 (void)
-{
- 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_tty (int with_console)
-{
- HWND console;
-
- /* FIXME: This whole function needs a protective mutex. */
-
- if (!with_console)
- console = NULL;
- else
- {
- char *oldtitle = new char [TITLESIZE];
-
- if (!oldtitle)
- {
- termios_printf ("Can't *allocate console title buffer");
- return -1;
- }
- if (!GetConsoleTitle (oldtitle, TITLESIZE))
- {
- termios_printf ("Can't read console title");
- return -1;
- }
-
- if (WaitForSingleObject (title_mutex, INFINITE) == WAIT_FAILED)
- termios_printf ("WFSO for title_mutext %p failed, %E", title_mutex);
-
- char buf[40];
-
- __small_sprintf (buf, "cygwin.find.console.%d", myself->pid);
- SetConsoleTitle (buf);
- Sleep (40);
- console = FindWindow (NULL, buf);
- SetConsoleTitle (oldtitle);
- Sleep (40);
- ReleaseMutex (title_mutex);
- if (console == NULL)
- {
- termios_printf ("Can't find console window");
- return -1;
- }
- }
- /* Is a tty allocated for console? */
-
- int freetty = -1;
- 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. */
- }
-
- if (with_console && ttys[i].gethwnd () == console)
- {
- termios_printf ("console %x already associated with tty%d",
- console, i);
- /* Is the master alive? */
- HANDLE hMaster;
- hMaster = OpenProcess (PROCESS_DUP_HANDLE, FALSE, ttys[i].master_pid);
- if (hMaster)
- {
- CloseHandle (hMaster);
- return i;
- }
- /* Master is dead */
- freetty = i;
- break;
- }
- }
-
- /* There is no tty allocated to console, allocate the first free found */
- if (freetty == -1)
- {
- system_printf ("No free ttys available");
- return -1;
- }
- tty *t = ttys + freetty;
- t->init ();
- t->setsid (-1);
- t->setpgid (myself->pgid);
- t->sethwnd (console);
-
- if (with_console)
- {
- termios_printf ("console %x associated with tty%d", console, freetty);
- create_tty_master (freetty);
- }
- else
- termios_printf ("tty%d allocated", freetty);
- return freetty;
-}
-
-BOOL
-tty::slave_alive ()
-{
- return alive (TTY_SLAVE_ALIVE);
-}
-
-BOOL
-tty::master_alive ()
-{
- return alive (TTY_MASTER_ALIVE);
-}
-
-BOOL
-tty::alive (const char *fmt)
-{
- HANDLE ev;
- char buf[sizeof (TTY_MASTER_ALIVE) + 16];
-
- __small_sprintf (buf, fmt, ntty);
- if ((ev = OpenEvent (EVENT_ALL_ACCESS, TRUE, buf)))
- CloseHandle (ev);
- return ev != NULL;
-}
-
-HANDLE
-tty::create_inuse (const char *fmt)
-{
- HANDLE h;
- char buf[sizeof (TTY_MASTER_ALIVE) + 16];
-
- __small_sprintf (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 (void)
-{
- OutputStopped = 0;
- setsid (0);
- pgid = 0;
- hwnd = NULL;
- to_slave = NULL;
- from_slave = NULL;
- was_opened = 0;
-}
-
-HANDLE
-tty::get_event (const char *fmt, BOOL inherit)
-{
- HANDLE hev;
- char buf[40];
-
- __small_sprintf (buf, fmt, ntty);
- if (!(hev = CreateEvent (inherit ? &sec_all : &sec_all_nih, FALSE, 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;
-}
-
-int
-tty::make_pipes (fhandler_pty_master *ptym)
-{
- /* Create communication pipes */
-
- /* FIXME: should this be sec_none_nih? */
- if (CreatePipe (&from_master, &to_slave, &sec_all, 0) == FALSE)
- {
- termios_printf ("can't create input pipe");
- set_errno (ENOENT);
- return FALSE;
- }
-
- ProtectHandle1 (to_slave, to_pty);
- if (CreatePipe (&from_slave, &to_master, &sec_all, 0) == FALSE)
- {
- termios_printf ("can't create output pipe");
- set_errno (ENOENT);
- return FALSE;
- }
- ProtectHandle1 (from_slave, from_pty);
- termios_printf ("tty%d from_slave %p, to_slave %p", ntty, from_slave,
- to_slave);
- ptym->set_io_handle (from_slave);
- ptym->set_output_handle (to_slave);
- return TRUE;
-}
-
-BOOL
-tty::common_init (fhandler_pty_master *ptym)
-{
- /* Set termios information. Force initialization. */
- ptym->tcinit (this, TRUE);
-
- if (!make_pipes (ptym))
- return FALSE;
- ptym->need_nl = 0;
-
- /* Save our pid */
-
- master_pid = GetCurrentProcessId ();
-
- /* Allow the others to open us (for handle duplication) */
-
- if ((os_being_run == winNT) &&
- (SetKernelObjectSecurity (hMainProc, DACL_SECURITY_INFORMATION,
- get_null_sd ()) == FALSE))
- small_printf ("Can't set process security, %E");
-
- /* Create synchronisation events */
-
- if (ptym->get_device () != FH_TTYM)
- {
- ptym->output_done_event = ptym->ioctl_done_event =
- ptym->ioctl_request_event = NULL;
- }
- else
- {
- if (!(ptym->output_done_event = get_event (OUTPUT_DONE_EVENT, FALSE)))
- return FALSE;
- if (!(ptym->ioctl_done_event = get_event (IOCTL_DONE_EVENT, FALSE)))
- return FALSE;
- if (!(ptym->ioctl_request_event = get_event (IOCTL_REQUEST_EVENT, FALSE)))
- return FALSE;
- }
-
- char buf[40];
- __small_sprintf (buf, OUTPUT_MUTEX, ntty);
- if (!(ptym->output_mutex = CreateMutex (&sec_all, FALSE, buf)))
- {
- termios_printf ("can't create %s", buf);
- set_errno (ENOENT);
- return FALSE;
- }
-
- ProtectHandle1 (ptym->output_mutex, output_mutex);
- winsize.ws_col = 80;
- winsize.ws_row = 25;
-
- termios_printf("tty%d opened", ntty);
- return TRUE;
-}
diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h
deleted file mode 100644
index bdd6eaedf..000000000
--- a/winsup/cygwin/tty.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* tty.h: shared tty info for cygwin
-
- Copyright 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-
-/* tty tables */
-
-#define INP_BUFFER_SIZE 256
-#define OUT_BUFFER_SIZE 256
-#define NTTYS 128
-#define TTY_CONSOLE 0x40000000
-#define tty_attached(p) ((p)->ctty >= 0 && (p)->ctty != TTY_CONSOLE)
-
-/* Input/Output/ioctl events */
-
-#define OUTPUT_DONE_EVENT "cygtty%d.output.done"
-#define IOCTL_REQUEST_EVENT "cygtty%d.ioctl.request"
-#define IOCTL_DONE_EVENT "cygtty%d.ioctl.done"
-#define RESTART_OUTPUT_EVENT "cygtty%d.output.restart"
-#define OUTPUT_MUTEX "cygtty%d.output.mutex"
-#define TTY_SLAVE_ALIVE "cygtty%x.slave_alive"
-#define TTY_MASTER_ALIVE "cygtty%x.master_alive"
-
-#include <sys/termios.h>
-
-enum
-{
- TTY_INITIALIZED = 1, /* Set if tty is initialized */
- TTY_RSTCONS = 2 /* Set if console needs to be set to "non-cooked" */
-};
-
-#define TTYISSETF(x) __ISSETF (tc, x, TTY)
-#define TTYSETF(x) __SETF (tc, x, TTY)
-#define TTYCLEARF(x) __CLEARF (tc, x, TTY)
-#define TTYCONDSETF(n, x) __CONDSETF(n, tc, x, TTY)
-
-#ifndef MIN_CTRL_C_SLOP
-#define MIN_CTRL_C_SLOP 50
-#endif
-
-class tty_min
-{
- pid_t sid; /* Session ID of tty */
-public:
- DWORD status;
- pid_t pgid;
- int OutputStopped;
- int ntty;
- DWORD last_ctrl_c; // tick count of last ctrl-c
-
- tty_min (int t = -1, pid_t s = -1) : sid (s), ntty (t) {}
- 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;}
- 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;
-};
-
-class fhandler_pty_master;
-
-class tty: public tty_min
-{
- HANDLE get_event (const char *fmt, BOOL inherit);
-public:
- HWND hwnd; /* Console window handle tty belongs to */
-
- DWORD master_pid; /* Win32 PID of tty master process */
-
- HANDLE from_master, to_slave;
- HANDLE from_slave, to_master;
-
- int read_retval;
- BOOL was_opened; /* True if opened at least once. */
-
- void init ();
- HANDLE create_inuse (const char *);
- BOOL common_init (fhandler_pty_master *);
- BOOL alive (const char *fmt);
- BOOL slave_alive ();
- BOOL master_alive ();
- HWND gethwnd () {return hwnd;}
- void sethwnd (HWND wnd) {hwnd = wnd;}
- int make_pipes (fhandler_pty_master *ptym);
- HANDLE open_output_mutex (BOOL inherit = FALSE)
- {
- char buf[80];
- __small_sprintf (buf, OUTPUT_MUTEX, ntty);
- return OpenMutex (MUTEX_ALL_ACCESS, inherit, buf);
- }
- BOOL exists ()
- {
- HANDLE h = open_output_mutex ();
- if (h)
- {
- CloseHandle (h);
- return 1;
- }
- return slave_alive ();
- }
-};
-
-class tty_list
-{
- tty ttys[NTTYS];
-
-public:
- tty * operator [](int n) {return ttys + n;}
- int allocate_tty (int n); /* n non zero if allocate a tty, pty otherwise */
- int connect_tty (int);
- void terminate ();
- void init ();
- tty_min *get_tty (int n);
-};
-
-void __stdcall tty_init ();
-void __stdcall tty_terminate ();
-int __stdcall attach_tty (int);
-void __stdcall create_tty_master (int);
-extern "C" int ttyslot (void);
diff --git a/winsup/cygwin/tz_posixrules.h b/winsup/cygwin/tz_posixrules.h
deleted file mode 100644
index 6059d67f7..000000000
--- a/winsup/cygwin/tz_posixrules.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* generated with bin2h from zoneinfo/posixrules */
-
-static 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 962950e1f..000000000
--- a/winsup/cygwin/uinfo.cc
+++ /dev/null
@@ -1,260 +0,0 @@
-/* uinfo.cc: user info (uid, gid, etc...)
-
- Copyright 1996, 1997, 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <pwd.h>
-#include <unistd.h>
-#include <winnls.h>
-#include <utmp.h>
-#include <limits.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <lm.h>
-#include <sys/cygwin.h>
-#include "sync.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "cygheap.h"
-#include "registry.h"
-#include "security.h"
-
-const char *
-internal_getlogin (cygheap_user &user)
-{
- char username[MAX_USER_NAME];
- DWORD username_len = MAX_USER_NAME;
-
- if (! GetUserName (username, &username_len))
- user.set_name ("unknown");
- else
- user.set_name (username);
- if (os_being_run == winNT)
- {
- LPWKSTA_USER_INFO_1 wui;
- char buf[MAX_PATH], *env;
- char *un = NULL;
-
- /* First trying to get logon info from environment */
- if ((env = getenv ("USERNAME")) != NULL)
- un = env;
- if ((env = getenv ("LOGONSERVER")) != NULL)
- user.set_logsrv (env + 2); /* filter leading double backslashes */
- if ((env = getenv ("USERDOMAIN")) != NULL)
- user.set_domain (env);
- /* Trust only if usernames are identical */
- if (un && strcasematch (user.name (), un)
- && user.domain () && user.logsrv ())
- debug_printf ("Domain: %s, Logon Server: %s",
- user.domain (), user.logsrv ());
- /* If that failed, try to get that info from NetBIOS */
- else if (!NetWkstaUserGetInfo (NULL, 1, (LPBYTE *)&wui))
- {
- char buf[512];
-
- sys_wcstombs (buf, wui->wkui1_username, MAX_USER_NAME);
- user.set_name (buf);
- sys_wcstombs (buf, wui->wkui1_logon_server, MAX_HOST_NAME);
- user.set_logsrv (buf);
- sys_wcstombs (buf, wui->wkui1_logon_domain,
- MAX_COMPUTERNAME_LENGTH + 1);
- user.set_domain (buf);
- /* Save values in environment */
- if (!strcasematch (user.name (), "SYSTEM")
- && user.domain () && user.logsrv ())
- {
- LPUSER_INFO_3 ui = NULL;
- WCHAR wbuf[MAX_HOST_NAME + 2];
-
- strcat (strcpy (buf, "\\\\"), user.logsrv ());
- setenv ("USERNAME", user.name (), 1);
- setenv ("LOGONSERVER", buf, 1);
- setenv ("USERDOMAIN", user.domain (), 1);
- /* HOMEDRIVE and HOMEPATH are wrong most of the time, too,
- after changing user context! */
- sys_mbstowcs (wbuf, buf, MAX_HOST_NAME + 2);
- if (!NetUserGetInfo (NULL, wui->wkui1_username, 3, (LPBYTE *)&ui)
- || !NetUserGetInfo (wbuf,wui->wkui1_username,3,(LPBYTE *)&ui))
- {
- sys_wcstombs (buf, ui->usri3_home_dir, MAX_PATH);
- if (!buf[0])
- {
- sys_wcstombs (buf, ui->usri3_home_dir_drive, MAX_PATH);
- if (buf[0])
- strcat (buf, "\\");
- else
- {
- env = getenv ("SYSTEMDRIVE");
- if (env && *env)
- strcat (strcpy (buf, env), "\\");
- else
- GetSystemDirectoryA (buf, MAX_PATH);
- }
- }
- setenv ("HOMEPATH", buf + 2, 1);
- buf[2] = '\0';
- setenv ("HOMEDRIVE", buf, 1);
- NetApiBufferFree (ui);
- }
- }
- debug_printf ("Domain: %s, Logon Server: %s, Windows Username: %s",
- user.domain (), user.logsrv (), user.name ());
- NetApiBufferFree (wui);
- }
- if (allow_ntsec)
- {
- HANDLE ptok = user.token; /* Which is INVALID_HANDLE_VALUE if no
- impersonation took place. */
- DWORD siz;
- char tu[1024];
- int ret = 0;
-
- /* Try to get the SID either from already impersonated token
- or from current process first. To differ that two cases is
- important, because you can't rely on the user information
- in a process token of a currently impersonated process. */
- if (ptok == INVALID_HANDLE_VALUE
- && !OpenProcessToken (GetCurrentProcess (), TOKEN_QUERY, &ptok))
- debug_printf ("OpenProcessToken(): %E\n");
- else if (!GetTokenInformation (ptok, TokenUser, (LPVOID) &tu,
- sizeof tu, &siz))
- debug_printf ("GetTokenInformation(): %E");
- else if (!(ret = user.set_sid (((TOKEN_USER *) &tu)->User.Sid)))
- debug_printf ("Couldn't retrieve SID from access token!");
- /* Close token only if it's a result from OpenProcessToken(). */
- if (ptok != INVALID_HANDLE_VALUE
- && user.token == INVALID_HANDLE_VALUE)
- CloseHandle (ptok);
-
- /* If that failes, try to get the SID from localhost. This can only
- be done if a domain is given because there's a chance that a local
- and a domain user may have the same name. */
- if (!ret && user.domain ())
- {
- /* Concat DOMAIN\USERNAME for the next lookup */
- strcat (strcat (strcpy (buf, user.domain ()), "\\"), user.name ());
- if (!(ret = lookup_name (buf, NULL, user.sid ())))
- debug_printf ("Couldn't retrieve SID locally!");
- }
-
- /* If that failes, too, as a last resort try to get the SID from
- the logon server. */
- if (!ret && !(ret = lookup_name(user.name (), user.logsrv (),
- user.sid ())))
- debug_printf ("Couldn't retrieve SID from '%s'!", user.logsrv ());
-
- /* If we have a SID, try to get the corresponding Cygwin user name
- which can be different from the Windows user name. */
- if (ret)
- {
- struct passwd *pw;
- char psidbuf[MAX_SID_LEN];
- PSID psid = (PSID) psidbuf;
-
- if (!strcasematch (user.name (), "SYSTEM")
- && user.domain () && user.logsrv ())
- {
- if (get_registry_hive_path (user.sid (), buf))
- setenv ("USERPROFILE", buf, 1);
- }
- while ((pw = getpwent ()) != NULL)
- if (get_pw_sid (psid, pw) && EqualSid (user.sid (), psid))
- {
- user.set_name (pw->pw_name);
- break;
- }
- endpwent ();
- }
- }
- }
- debug_printf ("Cygwins Username: %s", user.name ());
- return user.name ();
-}
-
-void
-uinfo_init ()
-{
- struct passwd *p;
-
- /* Initialize to non impersonated values.
- Setting `impersonated' to TRUE seems to be wrong but it
- isn't. Impersonated is thought as "Current User and `token'
- are coincident". See seteuid() for the mechanism behind that. */
- cygwin_set_impersonation_token (INVALID_HANDLE_VALUE);
- cygheap->user.impersonated = TRUE;
-
- /* If uid is USHRT_MAX, the process is started from a non cygwin
- process or the user context was changed in spawn.cc */
- if (myself->uid == USHRT_MAX)
- if ((p = getpwnam (internal_getlogin (cygheap->user))) != NULL)
- {
- myself->uid = p->pw_uid;
- myself->gid = p->pw_gid;
- }
- else
- {
- myself->uid = DEFAULT_UID;
- myself->gid = DEFAULT_GID;
- }
- /* Real and effective uid/gid are always identical on process start up.
- This is at least true for NT/W2K. */
- cygheap->user.orig_uid = cygheap->user.real_uid = myself->uid;
- cygheap->user.orig_gid = cygheap->user.real_gid = myself->gid;
-}
-
-extern "C" char *
-getlogin (void)
-{
-#ifdef _MT_SAFE
- char *this_username=_reent_winsup()->_username;
-#else
- static NO_COPY char this_username[MAX_USER_NAME];
-#endif
-
- return strcpy (this_username, cygheap->user.name ());
-}
-
-extern "C" uid_t
-getuid (void)
-{
- return cygheap->user.real_uid;
-}
-
-extern "C" gid_t
-getgid (void)
-{
- return cygheap->user.real_gid;
-}
-
-extern "C" uid_t
-geteuid (void)
-{
- return myself->uid;
-}
-
-extern "C" gid_t
-getegid (void)
-{
- return myself->gid;
-}
-
-/* Not quite right - cuserid can change, getlogin can't */
-extern "C" char *
-cuserid (char *src)
-{
- if (src)
- {
- strcpy (src, getlogin ());
- return src;
- }
- else
- {
- return getlogin ();
- }
-}
diff --git a/winsup/cygwin/uname.cc b/winsup/cygwin/uname.cc
deleted file mode 100644
index 54d07df9b..000000000
--- a/winsup/cygwin/uname.cc
+++ /dev/null
@@ -1,92 +0,0 @@
-/* uname.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
- 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 <stdio.h>
-#include <sys/utsname.h>
-#include "cygwin_version.h"
-
-/* uname: POSIX 4.4.1.1 */
-extern "C" int
-uname (struct utsname *name)
-{
- DWORD len;
- SYSTEM_INFO sysinfo;
- extern char osname[];
- char *snp = strstr (cygwin_version.dll_build_date, "SNP");
-
- memset (name, 0, sizeof (*name));
- __small_sprintf (name->sysname, "CYGWIN_%s", osname);
-
- GetSystemInfo (&sysinfo);
-
- /* Computer name */
- len = sizeof (name->nodename) - 1;
- GetComputerNameA (name->nodename, &len);
-
- /* 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:
- /* But which of the x86 chips are we? */
- /* Default to i386 if the specific chip cannot be determined */
- switch (os_being_run)
- {
- case win95:
- case win98:
- case winME:
- /* dwProcessorType only valid in Windows 95 */
- if ((sysinfo.dwProcessorType == PROCESSOR_INTEL_386) ||
- (sysinfo.dwProcessorType == PROCESSOR_INTEL_486) ||
- (sysinfo.dwProcessorType == PROCESSOR_INTEL_PENTIUM))
- __small_sprintf (name->machine, "i%d", sysinfo.dwProcessorType);
- else
- strcpy (name->machine, "i386");
- break;
- case winNT:
- /* wProcessorLevel only valid in Windows NT */
- __small_sprintf (name->machine, "i%d86", sysinfo.wProcessorLevel);
- break;
- default:
- strcpy (name->machine, "i386");
- break;
- }
- 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 2f5c1ba4e..000000000
--- a/winsup/cygwin/wait.cc
+++ /dev/null
@@ -1,118 +0,0 @@
-/* wait.cc: Posix wait routines.
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <sys/wait.h>
-#include <stdlib.h>
-#include <errno.h>
-#include "cygerrno.h"
-#include "sync.h"
-#include "sigproc.h"
-#include "perthread.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);
-}
-
-pid_t
-waitpid (pid_t intpid, int *status, int options)
-{
- return wait4 (intpid, status, options, NULL);
-}
-
-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.
- */
-
-pid_t
-wait4 (int intpid, int *status, int options, struct rusage *r)
-{
- int rc;
- waitq *w;
- HANDLE waitfor;
- sigframe thisframe (mainthread);
-
- if (options & ~(WNOHANG | WUNTRACED))
- {
- set_errno (EINVAL);
- return -1;
- }
-
- if (r)
- memset (r, 0, sizeof (*r));
-
- if ((w = (waitq *) waitq_storage.get ()) == NULL)
- w = (waitq *) waitq_storage.create ();
-
- 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");
- rc = -1;
- goto done;
- }
-
- if ((waitfor = w->ev) == NULL)
- goto nochildren;
-
- rc = WaitForSingleObject (waitfor, INFINITE);
-
- sigproc_printf ("%d = WaitForSingleObject (...)", rc);
-
- if (w->ev == NULL)
- {
- nochildren:
- /* found no children */
- set_errno (ECHILD);
- rc = -1;
- goto done;
- }
-
- if (w->status == -1)
- {
- set_sig_errno (EINTR);
- rc = -1;
- }
- else if (rc != 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);
- rc = -1;
- }
- else if ((rc = w->pid) != 0 && status)
- *status = w->status;
-
-done:
- sigproc_printf ("intpid %d, status %p, w->status %d, options %d, rc %d",
- intpid, status, w->status, options, rc);
- w->status = -1;
- if (rc < 0)
- sigproc_printf("*** errno = %d", get_errno());
- return rc;
-}
diff --git a/winsup/cygwin/window.cc b/winsup/cygwin/window.cc
deleted file mode 100644
index db5fbe10f..000000000
--- a/winsup/cygwin/window.cc
+++ /dev/null
@@ -1,247 +0,0 @@
-/* window.cc: hidden windows for signals/itimer support
-
- Copyright 1997, 1998, 2000 Cygnus Solutions.
-
- 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 <stdlib.h>
-#include <errno.h>
-#include <signal.h>
-#include <limits.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include "cygerrno.h"
-#include "perprocess.h"
-#include "security.h"
-
-static NO_COPY UINT timer_active = 0;
-static NO_COPY struct itimerval itv;
-static NO_COPY DWORD start_time;
-static NO_COPY HWND ourhwnd = NULL;
-
-static LRESULT CALLBACK
-WndProc (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_TIMER:
- if (wParam == timer_active)
- {
- UINT elapse = itv.it_interval.tv_sec * 1000 +
- itv.it_interval.tv_usec / 1000;
- KillTimer (hwnd, timer_active);
- if (!elapse)
- {
- timer_active = 0;
- }
- else
- {
- timer_active = SetTimer (hwnd, 1, elapse, NULL);
- start_time = GetTickCount ();
- itv.it_value = itv.it_interval;
- }
- raise(SIGALRM);
- }
- return 0;
- case WM_ASYNCIO:
- raise (SIGIO);
- return 0;
- default:
- return DefWindowProc (hwnd, uMsg, wParam, lParam);
- }
-}
-
-static HANDLE window_started;
-
-static DWORD WINAPI
-Winmain (VOID *)
-{
- MSG msg;
- WNDCLASS wc;
- static char classname[] = "CygwinWndClass";
-
- /* Register the window class for the main window. */
-
- wc.style = 0;
- wc.lpfnWndProc = (WNDPROC) WndProc;
- 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))
- {
- system_printf ("Cannot register window class");
- return FALSE;
- }
-
- /* Create hidden window. */
- ourhwnd = CreateWindow (classname, classname,
- WS_POPUP, CW_USEDEFAULT, CW_USEDEFAULT,
- CW_USEDEFAULT, CW_USEDEFAULT, (HWND) NULL,
- (HMENU) NULL, user_data->hmodule, (LPVOID) NULL);
-
- SetEvent (window_started);
-
- if (!ourhwnd)
- {
- system_printf ("Cannot create window");
- return FALSE;
- }
-
- /* Start the message loop. */
-
- while (GetMessage (&msg, ourhwnd, 0, 0) == TRUE)
- {
- DispatchMessage (&msg);
- }
-
- return msg.wParam;
-}
-
-HWND __stdcall
-gethwnd ()
-{
- if (ourhwnd != NULL)
- return ourhwnd;
-
- HANDLE hThread;
-
- window_started = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
- hThread = makethread (Winmain, NULL, 0, "win");
- if (!hThread)
- {
- system_printf ("Cannot start window thread");
- }
- else
- {
- SetThreadPriority (hThread, THREAD_PRIORITY_HIGHEST);
- CloseHandle (hThread);
- }
- WaitForSingleObject (window_started, INFINITE);
- CloseHandle (window_started);
- return ourhwnd;
-}
-
-void __stdcall
-window_terminate ()
-{
- if (ourhwnd)
- SendMessage (ourhwnd, WM_DESTROY, 0, 0);
-}
-
-extern "C"
-int
-setitimer (int which, const struct itimerval *value, struct itimerval *oldvalue)
-{
- UINT elapse;
-
- if (which != ITIMER_REAL)
- {
- set_errno (EINVAL);
- return -1;
- }
- /* Check if we will wrap */
- if (itv.it_value.tv_sec >= (long) (UINT_MAX / 1000))
- {
- set_errno (EINVAL);
- return -1;
- }
- if (timer_active)
- {
- KillTimer (gethwnd(), timer_active);
- timer_active = 0;
- }
- if (oldvalue)
- *oldvalue = itv;
- if (value == NULL)
- {
- set_errno (EFAULT);
- return -1;
- }
- itv = *value;
- elapse = itv.it_value.tv_sec * 1000 + itv.it_value.tv_usec / 1000;
- if (elapse == 0)
- if (itv.it_value.tv_usec)
- elapse = 1;
- else
- return 0;
- if (!(timer_active = SetTimer (gethwnd(), 1, elapse, NULL)))
- {
- __seterrno ();
- return -1;
- }
- start_time = GetTickCount ();
- return 0;
-}
-
-extern "C"
-int
-getitimer (int which, struct itimerval *value)
-{
- UINT elapse, val;
-
- if (which != ITIMER_REAL)
- {
- set_errno (EINVAL);
- return -1;
- }
- if (value == NULL)
- {
- set_errno (EFAULT);
- return -1;
- }
- *value = itv;
- if (!timer_active)
- {
- value->it_value.tv_sec = 0;
- value->it_value.tv_usec = 0;
- return 0;
- }
- elapse = GetTickCount () - start_time;
- val = itv.it_value.tv_sec * 1000 + itv.it_value.tv_usec / 1000;
- val -= elapse;
- value->it_value.tv_sec = val/1000;
- value->it_value.tv_usec = val%1000;
- return 0;
-}
-
-extern "C"
-unsigned int
-alarm (unsigned int seconds)
-{
- int ret;
- struct itimerval newt, oldt;
-
- getitimer (ITIMER_REAL, &oldt);
-
- newt.it_value.tv_sec = seconds;
- newt.it_value.tv_usec = 0;
- newt.it_interval.tv_sec = 0;
- newt.it_interval.tv_usec = 0;
- setitimer (ITIMER_REAL, &newt, NULL);
- ret = oldt.it_value.tv_sec;
- if (ret == 0 && oldt.it_value.tv_usec)
- ret = 1;
- return ret;
-}
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h
deleted file mode 100644
index d2f475ba2..000000000
--- a/winsup/cygwin/winsup.h
+++ /dev/null
@@ -1,273 +0,0 @@
-/* winsup.h: main Cygwin header file.
-
- Copyright 1996, 1997, 1998, 1999, 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. */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#define __INSIDE_CYGWIN__
-
-#ifdef __cplusplus
-
-#define alloca __builtin_alloca
-#define strlen __builtin_strlen
-#define strcmp __builtin_strcmp
-#define strcpy __builtin_strcpy
-#define memcpy __builtin_memcpy
-#define memcmp __builtin_memcmp
-#ifdef HAVE_BUILTIN_MEMSET
-# define memset __builtin_memset
-#endif
-
-#if !defined(__STDC_VERSION__) || __STDC_VERSION__ >= 199900L
-#define NEW_MACRO_VARARGS
-#endif
-
-#include <sys/types.h>
-#include <sys/strace.h>
-
-#undef strchr
-#define strchr cygwin_strchr
-extern "C" inline __stdcall char * strchr(const char * s, int c)
-{
-register char * __res;
-__asm__ __volatile__(
- "movb %%al,%%ah\n"
- "1:\tmovb (%1),%%al\n\t"
- "cmpb %%ah,%%al\n\t"
- "je 2f\n\t"
- "incl %1\n\t"
- "testb %%al,%%al\n\t"
- "jne 1b\n\t"
- "xorl %1,%1\n"
- "2:\tmovl %1,%0\n\t"
- :"=a" (__res), "=r" (s)
- :"0" (c), "1" (s));
-return __res;
-}
-
-extern char case_folded_lower[];
-#define cyg_tolower(c) (case_folded_lower[(unsigned char)(c)])
-extern char case_folded_upper[];
-#define cyg_toupper(c) (case_folded_upper[(unsigned char)(c)])
-
-#define cfree newlib_cfree_dont_use
-
-#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>
-#undef _WINGDI_H
-#undef _WINUSER_H
-#undef _WINNLS_H
-#undef _WINVER_H
-#undef _WINNETWK_H
-#undef _WINSVC_H
-
-/* The one function we use from winuser.h most of the time */
-extern "C" DWORD WINAPI GetLastError (void);
-
-/* Used for runtime OS check/decisions. */
-enum os_type {winNT = 1, win95, win98, winME, win32s, unknown};
-extern os_type os_being_run;
-
-enum codepage_type {ansi_cp, oem_cp};
-extern codepage_type current_codepage;
-
-/* Used to check if Cygwin DLL is dynamically loaded. */
-extern int dynamically_loaded;
-
-#define sys_wcstombs(tgt,src,len) \
- WideCharToMultiByte((current_codepage==ansi_cp?CP_ACP:CP_OEMCP),0,(src),-1,(tgt),(len),NULL,NULL)
-#define sys_mbstowcs(tgt,src,len) \
- MultiByteToWideChar((current_codepage==ansi_cp?CP_ACP:CP_OEMCP),0,(src),-1,(tgt),(len))
-
-#define TITLESIZE 1024
-#define MAX_USER_NAME 20
-#define DEFAULT_UID 500
-#define DEFAULT_GID 544
-
-#define MAX_SID_LEN 40
-#define MAX_HOST_NAME 256
-
-/* status bit manipulation */
-#define __ISSETF(what, x, prefix) \
- ((what)->status & prefix##_##x)
-#define __SETF(what, x, prefix) \
- ((what)->status |= prefix##_##x)
-#define __CLEARF(what, x, prefix) \
- ((what)->status &= ~prefix##_##x)
-#define __CONDSETF(n, what, x, prefix) \
- ((n) ? __SETF (what, x, prefix) : __CLEARF (what, x, prefix))
-
-#include "debug.h"
-
-/* Events/mutexes */
-extern HANDLE title_mutex;
-
-/**************************** Convenience ******************************/
-
-#define NO_COPY __attribute__((section(".data_cygwin_nocopy")))
-
-/* Used when treating / and \ as equivalent. */
-#define SLASH_P(ch) \
- ({ \
- char __c = (ch); \
- ((__c) == '/' || (__c) == '\\'); \
- })
-
-/* Convert a signal to a signal mask */
-#define SIGTOMASK(sig) (1<<((sig) - signal_shift_subtract))
-extern unsigned int signal_shift_subtract;
-
-#ifdef NEW_MACRO_VARARGS
-# define api_fatal(...) __api_fatal ("%P: *** " __VA_ARGS__)
-#else
-# define api_fatal(fmt, args...) __api_fatal ("%P: *** " fmt,## args)
-#endif
-
-#undef issep
-#define issep(ch) (strchr (" \t\n\r", (ch)) != NULL)
-
-#define isdirsep SLASH_P
-#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 ();
-
-/* 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 */
-extern "C" void __stdcall do_exit (int) __attribute__ ((noreturn));
-
-/* UID/GID */
-void uinfo_init (void);
-
-/* various events */
-void events_init (void);
-void events_terminate (void);
-
-void __stdcall close_all_files (void);
-
-/* Invisible window initialization/termination. */
-HWND __stdcall gethwnd (void);
-void __stdcall window_terminate (void);
-
-/* Globals that handle initialization of winsock in a child process. */
-extern HANDLE wsock32_handle;
-extern HANDLE ws2_32_handle;
-
-/* Globals that handle initialization of netapi in a child process. */
-extern HANDLE netapi32_handle;
-
-/* debug_on_trap support. see exceptions.cc:try_to_debug() */
-extern "C" void error_start_init (const char*);
-extern "C" int try_to_debug ();
-
-extern "C" void codepage_init (const char*);
-
-extern int cygwin_finished_initializing;
-
-/**************************** Miscellaneous ******************************/
-
-void __stdcall set_std_handle (int);
-int __stdcall writable_directory (const char *file);
-int __stdcall stat_dev (DWORD, int, unsigned long, struct stat *);
-extern BOOL allow_ntsec;
-
-unsigned long __stdcall hash_path_name (unsigned long hash, const char *name) __attribute__ ((regparm(2)));
-void __stdcall nofinalslash (const char *src, char *dst) __attribute__ ((regparm(2)));
-extern "C" char *__stdcall rootdir (char *full_path) __attribute__ ((regparm(1)));
-
-/* String manipulation */
-extern "C" char *__stdcall strccpy (char *s1, const char **s2, char c);
-extern "C" int __stdcall strcasematch (const char *s1, const char *s2) __attribute__ ((regparm(2)));
-extern "C" int __stdcall strncasematch (const char *s1, const char *s2, size_t n) __attribute__ ((regparm(3)));
-extern "C" char *__stdcall strcasestr (const char *searchee, const char *lookfor) __attribute__ ((regparm(2)));
-
-/* Time related */
-void __stdcall totimeval (struct timeval *dst, FILETIME * src, int sub, int flag);
-long __stdcall to_time_t (FILETIME * ptr);
-
-void __stdcall set_console_title (char *);
-void set_console_handler ();
-
-#define set_winsock_errno() __set_winsock_errno (__FUNCTION__, __LINE__)
-void __set_winsock_errno (const char *fn, int ln);
-
-/* Printf type functions */
-extern "C" void __api_fatal (const char *, ...) __attribute__ ((noreturn));
-extern "C" int __small_sprintf (char *dst, const char *fmt, ...);
-extern "C" int __small_vsprintf (char *dst, const char *fmt, va_list ap);
-
-/**************************** Exports ******************************/
-
-extern "C" {
-int cygwin_select (int , fd_set *, fd_set *, fd_set *,
- struct timeval *to);
-int cygwin_gethostname (char *__name, size_t __len);
-
-int kill_pgrp (pid_t, int);
-int _kill (int, int);
-int _raise (int sig);
-
-extern DWORD binmode;
-extern char _data_start__, _data_end__, _bss_start__, _bss_end__;
-extern void (*__CTOR_LIST__) (void);
-extern void (*__DTOR_LIST__) (void);
-};
-
-/*************************** Unsorted ******************************/
-
-#define WM_ASYNCIO 0x8000 // WM_APP
-
-/* Note that MAX_PATH is defined in the windows headers */
-/* There is also PATH_MAX and MAXPATHLEN.
- PATH_MAX is from Posix and does *not* include the trailing NUL.
- MAXPATHLEN is from Unix.
-
- Thou shalt use MAX_PATH throughout. It avoids the NUL vs no-NUL
- issue and is neither of the Unixy ones [so we can punt on which
- one is the right one to use]. */
-
-#define STD_RBITS (S_IRUSR | S_IRGRP | S_IROTH)
-#define STD_WBITS (S_IWUSR)
-#define STD_XBITS (S_IXUSR | S_IXGRP | S_IXOTH)
-
-#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 accomodate older executables. */
-#define OLD_O_NDELAY 4
-
-/* The title on program start. */
-extern char *old_title;
-extern BOOL display_title;
-
-extern HANDLE hMainThread;
-extern HANDLE hMainProc;
-
-#endif /* defined __cplusplus */
diff --git a/winsup/cygwin/winver.rc b/winsup/cygwin/winver.rc
deleted file mode 100644
index 5969eadf5..000000000
--- a/winsup/cygwin/winver.rc
+++ /dev/null
@@ -1,53 +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_REGISTRY_KEY CYGWIN_INFO_CYGNUS_REGISTRY_NAME "\\" \
- CYGWIN_INFO_CYGWIN_REGISTRY_NAME
-
-#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. 1996-2000"
- 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_REGISTRY_KEY
- 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 e6e9df66a..000000000
--- a/winsup/doc/ChangeLog
+++ /dev/null
@@ -1,39 +0,0 @@
-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 2abc34f16..000000000
--- a/winsup/doc/Makefile.in
+++ /dev/null
@@ -1,119 +0,0 @@
-# -*- Makefile -*- for winsup/doc
-# Copyright (c) 1998-2000 Cygnus Solutions.
-#
-# This file is part of Cygwin.
-#
-# This software is a copyrighted work licensed under the terms of the
-# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-# details.
-
-SHELL = @SHELL@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-SGMLDIRS = -d $(srcdir) -d $(utils_source) -d $(cygwin_source)
-
-# These *.info targets don't actually work, so remove them for now.
-# Put them back when we figure out what to do with them. (davisb)
-#DOC=faq.txt faq.info readme.txt readme.info
-DOC=faq.txt readme.txt
-HTMLDOC=faq.html readme.html
-
-CC:=@CC@
-CC_FOR_TARGET:=@CC@
-exeext:=@build_exeext@
-
-MAKEINFO:=makeinfo
-TEXI2DVI:=texi2dvi
-TEXI2HTML:=texi2html
-
-include $(srcdir)/../Makefile.common
-
-TOCLEAN:=faq.txt *.html readme.txt doctool.o doctool \
- cygwin-ug.sgml cygwin-ug-net.sgml
-
-.SUFFIXES:
-
-# You can add cygwin-api/cygwin-api.html if you want to.
-all : \
- cygwin-ug/cygwin-ug.html \
- cygwin-ug-net/cygwin-ug-net.html \
- cygwin-api-int/cygwin-api-int.html \
- $(DOC) \
- $(HTMLDOC)
-
-clean:
- rm -f $(TOCLEAN)
-
-install: all
-
-cygwin-ug/cygwin-ug.html : cygwin-ug.sgml doctool
- -db2html $<
-
-cygwin-ug.sgml : cygwin-ug.in.sgml ./doctool Makefile
- -./doctool -m $(SGMLDIRS) -s $(srcdir) -o $@ $<
-
-cygwin-ug-net/cygwin-ug-net.html : cygwin-ug-net.sgml doctool
- -db2html $<
-
-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
- -db2html $<
-
-cygwin-api.sgml : cygwin-api.in.sgml ./doctool Makefile
- -./doctool -m $(SGMLDIRS) -s $(srcdir) -o $@ $<
-
-cygwin-api-int/cygwin-api-int.html : cygwin-api-int.sgml
- -db2html $<
-
-cygwin-api-int.sgml : cygwin-api.in.sgml ./doctool Makefile
- -./doctool -i -m $(SGMLDIRS) -s $(srcdir) -b cygwin-api-int -o $@ $<
-
-./doctool : doctool.c
- gcc -g $< -o $@
-
-%.dvi: %.sgml
- -db2dvi $<
-
-%.rtf: %.sgml
- -db2rtf $<
-
-%.ps: %.sgml
- -db2ps $<
-
-%.pdf: %.ps
- -ps2pdf $< $@
-
-%.info: %.texinfo
- -$(MAKEINFO) -I$(srcdir) $<
-
-%.txt: %.texinfo
- -$(MAKEINFO) -I$(srcdir) $<
-
-%.html: %.texinfo
- -$(TEXI2HTML) -I$(srcdir) $<
-
-readme.txt: $(srcdir)/readme.texinfo $(srcdir)/*.texinfo
- -$(MAKEINFO) -I$(srcdir) --no-split --no-headers $< -o - |\
- sed '/^Concept Index/,$$d' > $@
-
-faq.html: $(srcdir)/faq.texinfo $(srcdir)/*.texinfo
- -for i in $(srcdir)/*.texinfo ; do \
- sed < $$i -e 's?@file{\([fth]*p://[^}]*\)}?@strong{<A HREF="\1">\1</A>}?' \
- -e 's?\([.+a-zA-Z0-9-]*@@[.a-zA-Z0-9-]*[a-zA-Z0-9]\)?<A HREF="mailto:\1">\1</A>?' >./`basename $$i` ; done; \
- $(TEXI2HTML) -split_chapter -v ./faq.texinfo; \
- rm -f *.texinfo; \
- cp faq_toc.html faq.html
-
-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.gz
-cygwin-docs.tar.gz : $(TBFILES) $(TBDEPS)
- tar cf - $(TBFILES) $(TBDIRS) | gzip -9 > cygwin-docs.tar.gz
diff --git a/winsup/doc/calls.texinfo b/winsup/doc/calls.texinfo
deleted file mode 100644
index c4fe0aba1..000000000
--- a/winsup/doc/calls.texinfo
+++ /dev/null
@@ -1,707 +0,0 @@
-@chapter What Unix API calls are supported by Cygwin?
-
-This is the beginning of documentation listing the calls supported
-by the Cygwin library.
-
-All POSIX.1/1996 and ANSI C calls are listed in this file. Note that
-while almost all POSIX.1/1990 calls are included in Cygwin, most
-POSIX.1/1996 calls are not (yet at least!). Additional Unix
-compatibility calls and extended libc/libm calls are provided by
-Cygwin but may or may not be listed yet.
-
-To see if a function is implemented but not listed here, check for the
-presence of the call in the file winsup/cygwin.din in the sources. In
-addition, you may want to read the source code corresponding to the call
-to verify that it is not a stub. Finally, libc/libm functions
-(including extended calls not listed here) may be documented in the
-newlib texinfo documentation.
-
-Calls are implemented on both Windows 95 and NT unless otherwise
-noted. Included are references to relevant standards, if any.
-Calls starting with "cygwin_" are Cygwin-specific calls.
-
-@section ANSI C Library Functions
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-@itemize @code
-
-@item libc stdio (newlib/libc/stdio)
-@itemize @code
-@item clearerr: C 4.9.10.1
-@item fclose: C 4.9.5.1, P 8.2.3.2
-@item feof: C 4.9.10.2
-@item ferror: C 4.9.10.3
-@item fflush: C 4.9.5.2, P 8.2.3.4
-@item fgetc: C 4.9.7.1, P 8.2.3.5
-@item fgetpos: C 4.9.9.1
-@item fgets: C 4.9.7.2, P 8.2.3.5
-@item fopen: C 4.9.5.3, P 8.2.3.1
-@item fprintf: C 4.9.7.3, P 8.2.3.6
-@item fputc: C 4.9.7.3, P 8.2.3.6
-@item fputs: C 4.9.7.4, P 8.2.3.6
-@item fread: C 4.9.8.1, P 8.2.3.5
-@item freopen: C 4.9.5.4, P 8.2.3.3
-@item fscanf: C 4.9.6.2, P 8.2.3.7
-@item fseek: C 4.9.9.2, P 8.2.3.7
-@item fsetpos: C 4.9.9.3
-@item ftell: C 4.9.9.4, P 8.2.3.10
-@item fwrite: C 4.9.8.2, P 8.2.3.6
-@item getc: C 4.9.7.5, P 8.2.3.5
-@item getchar: C 4.9.7.6, P 8.2.3.5
-@item gets: C 4.9.7.7, P 8.2.3.5
-@item perror: C 4.9.10.4, P 8.2.3.8
-@item printf: C 4.9.6.3, P 8.2.3.6
-@item putc: C 4.9.7.8, P 8.2.3.6
-@item putchar: C 4.9.7.9, P 8.2.3.6
-@item puts: C 4.9.7.10, P 8.2.3.6
-@item remove: C 4.9.4.1, P 8.2.4
-@item rename: C 4.9.4.2, P 5.5.3.1
-@item rewind: C 4.9.9.5, P 8.2.3.7
-@item scanf: C 4.9.6.4, P 8.2.3.5
-@item setbuf: C 4.9.5.5
-@item setvbuf: C 4.9.5.6
-@item sprintf: C 4.9.6.5
-@item sscanf: C 4.9.6.6
-@item tmpfile: C 4.9.4.3, P 8.2.3.9
-@item tmpnam: C 4.9.4.4, P 8.2.5
-@item vfprintf: C 4.9.6.7
-@item ungetc: C 4.9.7.11
-@item vprintf: C 4.9.6.8
-@item vsprintf: C 4.9.6.9
-@end itemize
-
-@item libc string (newlib/libc/string)
-@itemize @code
-@item memchr: C 4.11.5.1
-@item memcmp: C 4.11.4.1
-@item memcpy: C 4.11.2.1
-@item memmove: C 4.11.2.2
-@item memset: C 4.11.6.1
-@item strcat: C 4.11.3.1
-@item strchr: C 4.11.5.2
-@item strcmp: C 4.11.4.2
-@item strcoll: C 4.11.4.3
-@item strcpy: C 4.11.2.3
-@item strcspn: C 4.11.5.3
-@item strerror: C 4.11.6.2
-@item strlen: C 4.11.6.3
-@item strncat: C 4.11.3.2
-@item strncmp: C 4.11.3.2
-@item strncpy: C 4.11.2.4
-@item strpbrk: C 4.11.5.4
-@item strrchr: C 4.11.5.5
-@item strspn: C 4.11.5.6
-@item strstr: C 4.11.5.7
-@item strtok: C 4.11.5.8
-@item strxfrm: C 4.11.4.5
-@end itemize
-
-@item libc stdlib (newlib/libc/stdlib, environ.cc, newlib/libc/include/machine/setjmp.h newlib/libc/include/assert.h)
-@itemize @code
-@item abort: C 4.10.4.1, P 8.2.3.12
-@item abs: C 4.10.6.1
-@item assert: C 4.2.1.1
-@item atexit: C 4.10.4.2
-@item atof: C 4.10.1.1
-@item atoi: C 4.10.1.2
-@item atol: C 4.10.1.3
-@item bsearch: C 4.10.5.1
-@item calloc: C 4.10.3.1
-@item div: C 4.10.6.2
-@item exit: C 4.10.4.3, P 8.2.3.12
-@item free: C 4.10.3.2
-@item getenv: C 4.10.4.4, P 4.6.1.1
-@item labs: C 4.10.6.3
-@item ldiv: C 4.10.6.2
-@item longjmp: C 4.6.2.1
-@item malloc: C 4.10.3.3
-@item mblen: C 4.10.7.1
-@item mbstowcs: C 4.10.8.1
-@item mbtowc: C 4.10.7.2
-@item qsort: 4.10.5.2
-@item rand: C 4.10.2.1
-@item realloc: C 4.10.3.4
-@item setjmp: C 4.6.1.1
-@item srand: C 4.10.2.2
-@item strtod: C 4.10.1.4
-@item strtol: C 4.10.1.5
-@item strtoul: C 4.10.1.6
-@item system: C 4.10.4.5
-@item wcstombs: C 4.10.8.2
-@item wctomb: C 4.10.7.3
-@end itemize
-
-@item libc time (times.cc, newlib/libc/time)
-@itemize @code
-@item asctime: C 4.12.3.1
-@item gmtime: C 4.12.3.3
-@item localtime: C 4.12.3.4, P 8.1.1
-@item time: C 4.12.2.4, P 4.5.1.1
-@item clock: C 4.12.2.1
-@item ctime: C 4.12.3.2
-@item difftime: C 4.12.2.2
-@item mktime: C 4.12.2.3, P 8.1.1
-@item strftime: C 4.11.6.2
-@end itemize
-
-@item libc signals (signal.cc, newlib/libc/signal)
-@itemize @code
-@item raise: C 4.7.2.1
-@item signal: C 4.7.1.1
-@end itemize
-
-@item libc ctype (newlib/libc/ctype)
-@itemize @code
-@item isalnum: C 4.3.1.1
-@item isalpha: C 4.3.1.2
-@item iscntrl: C 4.3.1.3
-@item isdigit: C 4.3.1.4
-@item isgraph: C 4.3.1.5
-@item islower: C 4.3.1.6
-@item isprint: C 4.3.1.7
-@item ispunct: C 4.3.1.8
-@item isspace: C 4.3.1.9
-@item isupper: C 4.3.1.10
-@item isxdigit: C 4.3.1.11
-@item tolower: C 4.3.2.1
-@item toupper: C 4.3.2.2
-@end itemize
-
-@item libm math (newlib/libm/math)
-@itemize @code
-@item acos: C 4.5.2.1
-@item asin: C 4.5.2.2
-@item atan: C 4.5.2.3
-@item atan2: C 4.5.2.4
-@item ceil: C 4.5.6.1
-@item cos: C 4.5.2.5
-@item cosh: C 4.5.3.2
-@item exp: C 4.5.4.1
-@item fabs: C 4.5.6.2
-@item floor: C 4.5.6.3
-@item fmod: C 4.5.6.4
-@item frexp: C 4.5.4.2
-@item ldexp: C 4.5.4.3
-@item log: C 4.5.4.4
-@item log10: C 4.5.4.5
-@item modf: C 4.5.4.6
-@item pow: C 4.5.5.1
-@item sin: C 4.5.2.6
-@item sinh: C 4.5.3.2
-@item sqrt: C 4.5.5.2
-@item tan: C 4.5.2.7
-@item tanh: C 4.5.3.3
-@end itemize
-
-@item libc misc (newlib/libc/locale, gcc/ginclude/stdarg.h)
-@itemize @code
-@item localeconv: C 4.4.2.1
-@item setlocale: C 4.4.1.1, P 8.1.2.1
-@item va_arg: C 4.8.1.2
-@item va_end: C 4.8.1.3
-@item va_start: C 4.8.1.1
-@end itemize
-
-@section POSIX.1/96 Functions
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-@item Process Primitives (Section 3)
-@itemize @code
-@item fork: P 3.1.1.1
-@item execl: P 3.1.2.1
-@item execle: P 3.1.2.1
-@item execlp: P 3.1.2.1
-@item execv: P 3.1.2.1
-@item execve: P 3.1.2.1
-@item execvp: P 3.1.2.1
-@item pthread_atfork: P96 3.1.3.1 -- unimplemented
-@item wait: P 3.2.1.1
-@item waitpid: P 3.2.1.1
-@item _exit: P 3.2.2.1
-@item kill: P 3.3.2.1
-@item sigemptyset: P 3.3.3.1
-@item sigfillset: P 3.3.3.1
-@item sigaddset: P 3.3.3.1
-@item sigdelset: P 3.3.3.1
-@item sigismember: P 3.3.3.1
-@item sigaction: P 3.3.4.1
-@item pthread_sigmask: P96 3.3.5.1
-@item sigprocmask: P 3.3.5.1
-@item sigpending: P 3.3.6.1
-@item sigsuspend: P 3.3.7.1
-@item sigwait: P96 3.3.8.1 -- unimplemented
-@item sigwaitinfo: P96 3.3.8.1 -- unimplemented
-@item sigtimedwait: P96 3.3.8.1 -- unimplemented
-@item sigqueue: P96 3.3.9.1 -- unimplemented
-@item pthread_kill: P96 3.3.10.1
-@item alarm: P 3.4.1.1
-@item pause: P 3.4.2.1
-@item sleep: P 3.4.3.1
-@end itemize
-
-@item Process Environment (Section 4)
-@itemize @code
-@item getpid: P 4.1.1.1
-@item getppid: P 4.1.1.1
-@item getuid: P 4.2.1.1
-@item geteuid: P 4.2.1.1
-@item getgid: P 4.2.1.1
-@item getegid: P 4.2.1.1
-@item setuid: P 4.2.2.1 (stub on 9X, sets ENOSYS, returns zero)
-@item setgid: P 4.2.2.1 (stub on 9X, sets ENOSYS, returns zero)
-@item getgroups: P 4.2.3.1
-@item getlogin: P 4.2.4.1
-@item getlogin_r: P 4.2.4.1 -- unimplemented
-@item getpgrp: P 4.3.1.1
-@item setsid: P 4.3.2.1
-@item setpgid: P 4.3.3.1
-@item uname: P 4.4.1.1
-@item time: C 4.12.2.4, P 4.5.1.1
-@item times: P 4.5.2.1
-@item getenv: C 4.10.4.4, P 4.6.1.1
-@item ctermid: P 4.7.1.1
-@item ttyname: P 4.7.2.1
-@item ttyname_r: P 4.7.2.1 -- unimplemented
-@item isatty: P 4.7.2.1
-@item sysconf: P 4.8.1.1
-@end itemize
-
-@item Files and Directories (Section 5)
-@itemize @code
-@item opendir: P 5.1.2.1
-@item readdir: P 5.1.2.1
-@item readdir_r: P96 5.1.2.1 -- unimplemented
-@item rewinddir: P 5.1.2.1
-@item closedir: P 5.1.2.1
-@item chdir: P 5.2.1.1
-@item getcwd: P 5.2.2.1
-@item open: P 5.3.1.1
-@item creat: P 5.3.2.1
-@item umask: P 5.3.3.1
-@item link: P 5.3.4.1 (copy file in Win 95, and when link fails in NT)
-@item mkdir: P 5.4.1.1
-@item mkfifo: P 5.4.2.1 -- unimplemented!!!
-@item unlink: P 5.5.1.1
-@item rmdir: P 5.5.2.1
-@item rename: C 4.9.4.2, P 5.5.3.1
-@item stat: P 5.6.2.1
-@item fstat: P 5.6.2.1
-@item access: P 5.6.3.1
-@item chmod: P 5.6.4.1
-@item fchmod: P96 5.6.4.1
-@item chown: P 5.6.5.1 (stub in Win 95; always returns zero)
-@item utime: P 5.6.6.1
-@item ftruncate: P96 5.6.7.1
-@item pathconf: P 5.7.1.1
-@item fpathconf: P 5.7.1.1
-@end itemize
-
-@item Input and Output Primitives (Section 6)
-@itemize @code
-@item pipe: P 6.1.1.1
-@item dup: P 6.2.1.1
-@item dup2: P 6.2.1.1
-@item close: P 6.3.1.1
-@item read: P 6.4.1.1
-@item write: P 6.4.2.1
-@item fcntl: P 6.5.2.1 (note: fcntl(fd, F_GETLK,...) is not implemented (returns -1 with errno set to ENOSYS)).
-@item lseek: P 6.5.3.1 (note: only works correctly on binary files)
-@item fsync: P96 6.6.1.1
-@item fdatasync: P96 6.6.2.1 -- unimplemented
-@item aio_read: P96 6.7.2.1 -- unimplemented
-@item aio_write: P96 6.7.3.1 -- unimplemented
-@item lio_listio: P96 6.7.4.1 -- unimplemented
-@item aio_error: P96 6.7.5.1 -- unimplemented
-@item aio_return: P96 6.7.6.1 -- unimplemented
-@item aio_cancel: P96 6.7.7.1 -- unimplemented
-@item aio_suspend: P96 6.7.8.1 -- unimplemented
-@item aio_fsync: P96 6.7.9.1 -- unimplemented
-@end itemize
-
-@item Device- and Class-Specific Functions (Section 7)
-@itemize @code
-@item cfgetispeed: P96 7.1.3.1
-@item cfgetospeed: P96 7.1.3.1
-@item cfsetispeed: P96 7.1.3.1
-@item cfsetospeed: P96 7.1.3.1
-@item tcdrain: P 7.2.2.1
-@item tcflow: P 7.2.2.1
-@item tcflush: P 7.2.2.1
-@item tcgetattr: P96 7.2.1.1
-@item tcgetpgrp: P 7.2.3.1
-@item tcsendbreak: P 7.2.2.1
-@item tcsetattr: P96 7.2.1.1
-@item tcsetpgrp: P 7.2.4.1
-@end itemize
-
-@item Language-Specific Services for the C Programming Language
-(Section 8)
-@itemize @code
-@item abort: C 4.10.4.1, P 8.2.3.12
-@item asctime_r: P96 8.3.4.1 -- unimplemented
-@item ctime_r: P96 8.3.5.1 -- unimplemented
-@item exit: C 4.10.4.3, P 8.2.3.12
-@item fclose: C 4.9.5.1, P 8.2.3.2
-@item fdopen: P 8.2.2.1
-@item fflush: C 4.9.5.2, P 8.2.3.4
-@item fgetc: C 4.9.7.1, P 8.2.3.5
-@item fgets: C 4.9.7.2, P 8.2.3.5
-@item fileno: P 8.2.1.1
-@item flockfile: P96 8.2.6.1 -- unimplemented
-@item fopen: C 4.9.5.3, P 8.2.3.1
-@item fprintf: C 4.9.7.3, P 8.2.3.6
-@item fputc: C 4.9.7.3, P 8.2.3.6
-@item fputs: C 4.9.7.4, P 8.2.3.6
-@item fread: C 4.9.8.1, P 8.2.3.5
-@item freopen: C 4.9.5.4, P 8.2.3.3
-@item fscanf: C 4.9.6.2, P 8.2.3.7
-@item fseek: C 4.9.9.2, P 8.2.3.7
-@item ftell: C 4.9.9.4, P 8.2.3.10
-@item ftrylockfile: P96 8.2.6.1 -- unimplemented
-@item funlockfile: P96 8.2.6.1 -- unimplemented
-@item fwrite: C 4.9.8.2, P 8.2.3.6
-@item getc: C 4.9.7.5, P 8.2.3.5
-@item getc_unlocked: P96 8.2.7.1 -- unimplemented
-@item getchar: C 4.9.7.6, P 8.2.3.5
-@item getchar_unlocked: P96 8.2.7.1 -- unimplemented
-@item gets: C 4.9.7.7, P 8.2.3.5
-@item gmtime_r: P96 8.3.6.1 -- unimplemented
-@item localtime_r: P96 8.3.7.1 -- unimplemented
-@item perror: C 4.9.10.4, P 8.2.3.8
-@item printf: C 4.9.6.3, P 8.2.3.6
-@item putc: C 4.9.7.8, P 8.2.3.6
-@item putc_unlocked: P96 8.2.7.1 -- unimplemented
-@item putchar: C 4.9.7.9, P 8.2.3.6
-@item putchar_unlocked: P96 8.2.7.1 -- unimplemented
-@item puts: C 4.9.7.10, P 8.2.3.6
-@item rand_r: P96 8.3.8.1 -- unimplemented
-@item remove: C 4.9.4.1, P 8.2.4
-@item rewind: C 4.9.9.5, P 8.2.3.7
-@item scanf: C 4.9.6.4, P 8.2.3.5
-@item setlocale: C 4.4.1.1, P 8.1.2.1
-@item siglongjmp: P 8.3.1.1
-@item sigsetjmp: P 8.3.1.1
-@item strtok_r: P96 8.3.3.1 -- unimplemented
-@item tmpfile: C 4.9.4.3, P 8.2.3.9
-@item tmpnam: C 4.9.4.4, P 8.2.5
-@item tzset: P 8.3.2.1
-@end itemize
-
-@item System Databases (Section 9)
-@itemize @code
-@item getgrgid: P 9.2.1.1
-@item getgrgid_r: P96 9.2.1.1 -- unimplemented
-@item getgrnam: P 9.2.1.1
-@item getgrnam_r: P96 9.2.1.1 -- unimplemented
-@item getpwnam: P 9.2.2.1
-@item getpwnam_r: P96 9.2.2.1 -- unimplemented
-@item getpwuid: P 9.2.2.1
-@item getpwuid_r: P96 9.2.2.1 -- unimplemented
-@end itemize
-
-@item Synchronization (Section 11)
-@itemize @code
-@item pthread_cond_broadcast: P96 11.4.3.1 -- unimplemented
-@item pthread_cond_destroy: P96 11.4.2.1 -- unimplemented
-@item pthread_cond_init: P96 11.4.2.1 -- unimplemented
-@item pthread_cond_signal: P96 11.4.3.1 -- unimplemented
-@item pthread_cond_timedwait: P96 11.4.4.1 -- unimplemented
-@item pthread_cond_wait: P96 11.4.4.1 -- unimplemented
-@item pthread_condattr_destroy: P96 11.4.1.1 -- unimplemented
-@item pthread_condattr_getpshared: P96 11.4.1.1 -- unimplemented
-@item pthread_condattr_init: P96 11.4.1.1 -- unimplemented
-@item pthread_condattr_setpshared: P96 11.4.1.1 -- unimplemented
-@item pthread_mutex_destroy: P96 11.3.2.1
-@item pthread_mutex_init: P96 11.3.2.1
-@item pthread_mutex_lock: P96 11.3.3.1
-@item pthread_mutex_trylock: P96 11.3.3.1
-@item pthread_mutex_unlock: P96 11.3.3.1
-@item sem_close: P96 11.2.4.1 -- unimplemented
-@item sem_destroy: P96 11.2.2.1
-@item sem_getvalue: P96 11.2.8.1 -- unimplemented
-@item sem_init: P96 11.2.1.1
-@item sem_open: P96 11.2.3.1 -- unimplemented
-@item sem_post: P96 11.2.7.1
-@item sem_trywait: P96 11.2.6.1
-@item sem_unlink: P96 11.2.5.1 -- unimplemented
-@item sem_wait: P96 11.2.6.1
-@end itemize
-
-@item Memory Management (Section 12)
-@itemize @code
-@item mlock: P96 12.1.2.1 -- unimplemented
-@item mlockall: P96 12.1.1.1 -- unimplemented
-@item mmap: P96 12.2.1.1
-@item mprotect: P96 12.2.3.1
-@item msync: P96 12.2.4.1
-@item munlock: P96 12.1.2.1 -- unimplemented
-@item munlockall: P96 12.1.1.1 -- unimplemented
-@item munmap: P96 12.2.2.1
-@item shm_open: P96 12.3.1.1 -- unimplemented
-@item shm_unlink: P96 12.3.2.1 -- unimplemented
-@end itemize
-
-@item Execution Scheduling (Section 13)
-@itemize @code
-@item pthread_attr_getinheritsched: P96 13.5.1.1 -- unimplemented
-@item pthread_attr_getschedparam: P96 13.5.1.1 -- unimplemented
-@item pthread_attr_getschedpolicy: P96 13.5.1.1 -- unimplemented
-@item pthread_attr_getscope: P96 13.5.1.1 -- unimplemented
-@item pthread_attr_setinheritsched: P96 13.5.1.1 -- unimplemented
-@item pthread_attr_setschedparam: P96 13.5.1.1 -- unimplemented
-@item pthread_attr_setschedpolicy: P96 13.5.1.1 -- unimplemented
-@item pthread_attr_setscope: P96 13.5.1.1 -- unimplemented
-@item pthread_getschedparam: P96 13.5.2.1 -- unimplemented
-@item pthread_mutex_getprioceiling: P96 13.6.2.1 -- unimplemented
-@item pthread_mutex_setprioceiling: P96 13.6.2.1 -- unimplemented
-@item pthread_mutexattr_getprioceiling: P96 13.6.1.1 -- unimplemented
-@item pthread_mutexattr_getprotocol: P96 13.6.1.1 -- unimplemented
-@item pthread_mutexattr_setprioceiling: P96 13.6.1.1 -- unimplemented
-@item pthread_mutexattr_setprotocol: P96 13.6.1.1 -- unimplemented
-@item pthread_setschedparam: P96 13.5.2.1 -- unimplemented
-@item sched_get_priority_max: P96 13.3.6.1 -- unimplemented
-@item sched_get_priority_min: P96 13.3.6.1 -- unimplemented
-@item sched_getparam: P96 13.3.2.1 -- unimplemented
-@item sched_getscheduler: P96 13.3.4.1 -- unimplemented
-@item sched_rr_get_interval: P96 13.3.6.1 -- unimplemented
-@item sched_setparam: P96 13.3.1.1 -- unimplemented
-@item sched_setscheduler: P96 13.3.3.1 -- unimplemented
-@item sched_yield: P96 13.3.5.1 -- unimplemented
-@end itemize
-
-@item Clocks and Timers (Section 14)
-@itemize @code
-@item clock_getres: P96 14.2.1.1 -- unimplemented
-@item clock_gettime: P96 14.2.1.1 -- unimplemented
-@item clock_settime: P96 14.2.1.1 -- unimplemented
-@item nanosleep: P96 14.2.5.1 -- unimplemented
-@item timer_create: P96 14.2.2.1 -- unimplemented
-@item timer_delete: P96 14.2.3.1 -- unimplemented
-@item timer_getoverrun: P96 14.2.4.1 -- unimplemented
-@item timer_gettime: P96 14.2.4.1 -- unimplemented
-@item timer_settime: P96 14.2.4.1 -- unimplemented
-@end itemize
-
-@item Message Passing (Section 15)
-@itemize @code
-@item mq_close: P96 15.2.2.1 -- unimplemented
-@item mq_getattr: P96 15.2.8.1 -- unimplemented
-@item mq_notify: P96 15.2.6.1 -- unimplemented
-@item mq_open: P96 15.2.1.1 -- unimplemented
-@item mq_receive: P96 15.2.5.1 -- unimplemented
-@item mq_send: P96 15.2.4.1 -- unimplemented
-@item mq_setattr: P96 15.2.7.1 -- unimplemented
-@item mq_unlink: P96 15.2.3.1 -- unimplemented
-@end itemize
-
-@item Thread Management (Section 16)
-@itemize @code
-@item pthread_attr_destroy: P96 16.2.1.1
-@item pthread_attr_getdetachstate: P96 16.2.1.1 -- unimplemented
-@item pthread_attr_getstackaddr: P96 16.2.1.1 -- unimplemented
-@item pthread_attr_getstacksize: P96 16.2.1.1
-@item pthread_attr_init: P96 16.2.1.1
-@item pthread_attr_setdetachstate: P96 16.2.1.1 -- unimplemented
-@item pthread_attr_setstackaddr: P96 16.2.1.1 -- unimplemented
-@item pthread_attr_setstacksize: P96 16.2.1.1
-@item pthread_create: P96 16.2.2.1
-@item pthread_detach: P96 16.2.4.1 -- unimplemented
-@item pthread_equal: P96 16.2.7.1
-@item pthread_exit: P96 16.2.5.1
-@item pthread_join: P96 16.2.3.1 -- unimplemented
-@item pthread_once: P96 16.2.8.1 -- unimplemented
-@item pthread_self: P96 16.2.6.1
-@end itemize
-
-@item Thread-Specific Data (Section 17)
-@itemize @code
-@item pthread_getspecific: P96 17.1.2.1
-@item pthread_key_create: P96 17.1.1.1
-@item pthread_key_delete: P96 17.1.3.1
-@item pthread_setspecific: P96 17.1.2.1
-@end itemize
-
-@item Thread Cancellation (Section 18)
-@itemize @code
-@item pthread_cancel: P96 18.2.1.1 -- unimplemented
-@item pthread_cleanup_pop: P96 18.2.3.1 -- unimplemented
-@item pthread_cleanup_push: P96 18.2.3.1 -- unimplemented
-@item pthread_setcancelstate: P96 18.2.2.1 -- unimplemented
-@item pthread_setcanceltype: P96 18.2.2.1 -- unimplemented
-@item pthread_testcancel: P96 18.2.2.1 -- unimplemented
-@end itemize
-
-@section Misc Functions
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-@item Networking (net.cc) (Standardized by POSIX 1.g, which is probably still in draft?)
-@itemize @code
-@item accept
-@item bind
-@item connect
-@item getdomainname
-@item gethostbyaddr
-@item gethostbyname
-@item getpeername
-@item getprotobyname
-@item getprotobynumber
-@item getservbyname
-@item getservbyport
-@item getsockname
-@item getsockopt
-@item herror
-@item htonl
-@item htons
-@item inet_addr
-@item inet_makeaddr
-@item inet_netof
-@item inet_ntoa
-@item listen
-@item ntohl
-@item ntohs
-@item rcmd
-@item recv
-@item recvfrom
-@item rexec
-@item rresvport
-@item send
-@item sendto
-@item setsockopt
-@item shutdown
-@item socket
-@item socketpair
-@end itemize
-
-Of these networking calls, rexec, rcmd and rresvport are implemented
-in MS IP stack but may not be implemented in other vendors' stacks.
-
-@item Other
-@itemize @code
-@item acl
-@item aclcheck
-@item aclfrommode
-@item aclfrompbits
-@item aclfromtext
-@item aclsort
-@item acltomode
-@item acltopbits
-@item acltotext
-@item chroot (with restrictions)
-@item closelog
-@item cwait
-@item cygwin_conv_to_full_posix_path
-@item cygwin_conv_to_full_win32_path
-@item cygwin_conv_to_posix_path
-@item cygwin_conv_to_win32_path
-@item cygwin_logon_user
-@item cygwin_posix_path_list_p
-@item cygwin_posix_to_win32_path_list
-@item cygwin_posix_to_win32_path_list_buf_size
-@item cygwin_set_impersonation_token
-@item cygwin_split_path
-@item cygwin_win32_to_posix_path_list
-@item cygwin_win32_to_posix_path_list_buf_size
-@item cygwin_winpid_to_pid
-@item dlclose
-@item dlerror
-@item dlfork
-@item dlopen
-@item dlsym
-@item endgrent
-@item endhostent
-@item facl
-@item ffs
-@item fstatfs
-@item ftime
-@item get_osfhandle
-@item getdtablesize
-@item getgrent
-@item gethostname
-@item getitimer
-@item getmntent
-@item getpagesize
-@item getpgid
-@item getpwent
-@item gettimeofday: BSD
-@item grantpt
-@item initgroups (stub)
-@item ioctl
-@item killpg
-@item login
-@item logout
-@item lstat
-@item mknod (stub, sets ENOSYS, returns -1)
-@item memccpy
-@item nice
-@item openlog
-@item pclose
-@item popen
-@item ptsname
-@item putenv
-@item random
-@item readv
-@item realpath
-@item regfree
-@item rexec
-@item select
-@item setegid: SVR4 (stub on 9X, sets ENOSYS, returns zero)@item endpwent
-@item setenv
-@item seterrno
-@item seteuid (stub on 9X, sets ENOSYS, returns zero)
-@item sethostent
-@item setitimer
-@item setmntent
-@item setmode
-@item setpassent
-@item setpgrp
-@item setpwent
-@item settimeofday: BSD (stub, set ENOSYS, return -1)
-@item sexecl
-@item sexecle
-@item sexeclp
-@item sexeclpe
-@item sexeclpe
-@item sexecp
-@item sexecv
-@item sexecve
-@item sexecvpe
-@item sigpause
-@item spawnl (spawn calls are from Windows C library)
-@item spawnle
-@item spawnlp
-@item spawnlpe
-@item spawnv
-@item spawnve
-@item spawnvp
-@item spawnvpe
-@item srandom
-@item statfs
-@item strsignal
-@item strtosigno
-@item swab
-@item syslog
-@item timezone
-@item truncate (SVR4/4.3+BSD)
-@item ttyslot
-@item unlockpt
-@item unsetenv
-@item usleep
-@item utimes
-@item vfork: stub that calls fork
-@item vhangup (stub, sets ENOSYS, returns -1)
-@item wait3
-@item wait4
-@item wcscmp
-@item wcslen
-@item wprintf
-@item writev
-@end itemize
-
-@end itemize
-
diff --git a/winsup/doc/changes.texinfo b/winsup/doc/changes.texinfo
deleted file mode 100644
index 6e464784d..000000000
--- a/winsup/doc/changes.texinfo
+++ /dev/null
@@ -1,202 +0,0 @@
-@section Release Beta 20.1 (Dec 4 1998)
-
-This is a bug fix update to the Beta 20 release.
-
-The main change is an improved version of the Cygwin library although
-there are also a couple of other minor changes to the tools.
-
-@subsection Changes in specific tools:
-
-The "-mno-cygwin" flag to gcc now include the correct headers. In 20.0,
-it included the Cygwin headers which was incorrect.
-
-The "-pipe" flag to gcc works correctly now.
-
-The cygcheck program now reassures users that not finding cpp is the
-correct behavior.
-
-The "-b" flag to md5sum can now be used to generate correct checksums
-of binary files.
-
-The libtermcap library has been added to the compiler tools sources.
-It is the new source of the termcap library and /etc/termcap file.
-
-The less pager (using libtermcap) has been added to the binary
-distribution.
-
-@subsection Changes in the Cygwin API (cygwin.dll):
-
-This version of Cygwin is backwards-compatible with the beta 20 and 19
-releases. The library is now much more stable under Windows 9x and the
-bugs affecting configures under 9x (and NT to a lesser extent) have
-also been fixed.
-
-The bug that made it necessary to start the value of the CYGWIN
-environment variable with two leading spaces has been fixed.
-
-The serial support in the select call has been fixed.
-
-Handling of DLLs loaded by non-cygwin apps has been improved. Bugs in
-dlopen have been fixed.
-
-Passing _SC_CHILD_MAX to the sysconf function now yields CHILD_MAX (63)
-instead of _POSIX_CHILD_MAX (3).
-
-Several minor path bugs have been fixed. Including the one that
-caused "mkdir a/" to fail.
-
-The include file sys/sysmacros.h has been added. Added missing protos
-for wcslen and wcscmp to wchar.h.
-
-__P is now defined in include/sys/cdefs.h. To support that last change,
-the top-level Makefile.in now sets CC_FOR_TARGET and CXX_FOR_TARGET
-differently.
-
-Cygwin now exports the following newlib bessel functions: j1, jn, y1,
-yn.
-
-Several tty ioctl options have been added: TCGETA, TCSETA, TCSETAW, and
-TCSETAF.
-
-Several functions cope with NULL pointer references more gracefully.
-
-Problems with execution of relative paths via #! should be fixed.
-
-@section Release Beta 20 (Oct 30 1998)
-
-This is a significant update to the Beta 19 release. In addition to an
-EGCS-based compiler and updated tools, this release includes a new
-version of the Cygwin library that contains many improvements and
-bugfixes over the last one.
-
-@subsection The project has a new name!
-
-Starting with this release, we are retiring the "GNU-Win32" name for the
-releases. We have also dropped the "32" from Cygwin32. This means that
-you should now refer to the tools as "the Cygwin toolset", the library
-as "the Cygwin library" or "the Cygwin DLL", and the library's interface
-as "the Cygwin API".
-
-Because of this name change, we have changed any aspects of the library
-that involved the name "Cygwin32". For example, the CYGWIN32
-environment variable is now the CYGWIN environment variable. API
-functions starting with cygwin32_ are still available under that form
-for backwards-compatibility as well as under the new cygwin_-prefixed
-names. The same goes for the change of preprocessor define from
-__CYGWIN32__ to __CYGWIN__. We will remove the old names in a future
-release so please take the minute or two that it will take to remove
-those "32"s. Thanks and I apologize for the hassle this may cause
-people. We would have changed the name to "Bob" but that name's already
-taken by Microsoft... :-)
-
-Why change it? For one thing, not all of the software included in the
-distributions is GNU software, including the Cygwin library itself. So
-calling the project "GNU-Win32" has always been a bit of a misnomer. In
-addition, we think that calling the tools the "Cygwin tools" that use
-the "Cygwin library" will be less confusing to people.
-
-Also notice that we are now on the spiffy new sourceware.cygnus.com
-web/ftp site. The old address will work for some unknown period of
-time (hopefully at least until we get all of the mirrors adjusted).
-
-@subsection Changes in specific tools:
-
-The latest public EGCS release is now the basis for the compiler used
-in Cygwin distributions. As a result, EGCS 1.1 is the compiler in this
-release, with a few additional x86/Cygwin-related patches.
-
-Those of you who are more interested in native Windows development than
-in porting Unix programs will be glad to know that a new gcc flag
-"-mno-cygwin" will link in the latest Mingw32 libs and produce an
-executable that does not use Cygwin.
-
-All of the other development tools have been updated to their latest
-versions. The linker (ld) includes many important bug fixes. It is now
-possible to safely strip a DLL with a .reloc section. The windres
-resource compiler is significantly improved.
-
-Beta 20 also includes upgrades to a number of packages: ash-0.3.2-4,
-bash 2.02.1, grep-2.2, ncurses 4.2, and less 332. We have added bzip2
-0.9.0 to the distribution. And you'll now find that the df utility
-has joined its other friends from the fileutils package.
-
-The sh executable is still ash from the Debian Linux distribution but no
-longer has the problematic quoting bug that was present in the Beta 19
-release. Control-Cs in the bash shell no longer kill background tasks.
-
-Tcl/tk are upgraded to version 8.1a2 (with additional patches).
-Compatible versions of tix and itcl are included. These all include
-Cygwin-compatible configury files so you can do a Unix-style build of
-the Win32 ports of tcl/tk. expect has been upgraded to 5.26 with some
-additional Cygwin patches.
-
-In response to customer requests and feedback, Cygnus has developed a
-better graphical front end to GDB than GDBtk or WinGDB. This tcl-based
-GUI is shipping today to customers of the GNUPro Toolkit. The
-instrumentation changes to GDB and the tcl interpreter that was built
-into GDB are part of the GPL'd source base. But the tcl scripts are not
-being made available to the net at this time. For this reason, you will
-only find a command-line version of gdb in this Cygwin release.
-
-DJ Delorie has written a new "cygcheck" program that will print out
-useful information about how your Cygwin environment is set up, what
-DLLs a named executable is loading from where, etc. We hope this will
-make it easier to help diagnose common setup problems.
-
-The ps utility has been upgraded. It now has several options including
-shorter and longer output formats.
-
-@subsection Changes in the Cygwin API (cygwin.dll):
-
-This version of Cygwin is backwards-compatible with the beta 19 release.
-You can use the new "cygwin1.dll" with your old B19-compiled executables
-if you move the old "cygwinb19.dll" out of the way and install a copy
-of "cygwin1.dll" as "cygwinb19.dll".
-
-Quite a lot of the Cygwin internals have been rewritten or modified to
-address various issues. If you have a question about specific changes,
-the winsup/ChangeLog file in the development tools sources lists all
-changes made to the DLL over the last three years. Following are a few
-highlights:
-
-We are now using a new versioning scheme for Cygwin. There is now a
-separate version number for the DLL, the API, the shared memory region
-interfaces, and the registry interface. This will hopefully make it
-easier for multiple Cygwin toolsets to coexist in one user environment.
-
-Windows 98 is now supported (it is like Windows 95 from Cygwin's
-perspective). We still recommend upgrading to Windows NT.
-
-While there is still a lot left to do in improving Cygwin's runtime
-performance, we have put some effort into this prior to the B20 release.
-Hopefully you will find that the latest version of Cygwin is faster than
-ever. In addition, we have plugged several nasty handle leaks
-associated with opening/closing files and with using ttys.
-
-The lseek call now uses WriteFile to fill gaps with zeros whenever a
-write is done past an EOF, rather than leaving "undefined" data as Win32
-specifies.
-
-Significant work has been done to improve the Cygwin header files.
-
-The Cygwin Support for Unix-style serial I/O is much improved.
-
-Path handling has had another round of fixes/rewrites. We no longer use
-NT Extended Attributes by default for storing Unix permissions/execute
-status because the file NT creates on FAT partitions is not scalable to
-thousands of files (everything slows to a crawl).
-
-Signal handling has also gotten a fair amount of attention.
-Unfortunately, there are still some problems combining itimers and
-Windows 9x.
-
-The number of ttys has been upped from 16 to 128.
-
-New API calls included in the DLL: sethostent, endhostent.
-
-As mentioned earlier, all cygwin32_-prefixed functions are now exported
-with a cygwin_ prefix instead. Please adjust your code to call the
-newly named functions.
-
-reads of `slow' devices are now correctly interrupted by signals, i.e.
-a read will receive an EINTR.
diff --git a/winsup/doc/configure b/winsup/doc/configure
deleted file mode 100755
index 09d5a070c..000000000
--- a/winsup/doc/configure
+++ /dev/null
@@ -1,1078 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-sitefile=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --site-file=FILE use FILE as the site file
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=cygwin-api.in.sgml
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
- fi
-else
- CONFIG_SITE="$sitefile"
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:586: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:607: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:625: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:657: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_CC"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:689: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="gcc"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- CC="gcc"
-fi
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:725: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:779: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
- if test "$ac_test_CXXFLAGS" != set; then
- CXXFLAGS='$(CFLAGS)'
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@CC@%$CC%g
-s%@build_exeext@%$build_exeext%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/winsup/doc/configure.in b/winsup/doc/configure.in
deleted file mode 100644
index a51a474a9..000000000
--- a/winsup/doc/configure.in
+++ /dev/null
@@ -1,54 +0,0 @@
-dnl Autoconf configure script for winsup/regexp
-dnl Copyright 1997 Cygnus Solutions.
-dnl
-dnl This file is part of Cygwin.
-dnl
-dnl This software is a copyrighted work licensed under the terms of the
-dnl Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-dnl details.
-
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.12)
-AC_INIT(cygwin-api.in.sgml)
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
- if test "$ac_test_CXXFLAGS" != set; then
- CXXFLAGS='$(CFLAGS)'
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-AC_CANONICAL_SYSTEM
-
-LIB_AC_PROG_CC
-
-AC_SUBST(build_exeext)
-
-AC_OUTPUT(Makefile)
diff --git a/winsup/doc/copy.texinfo b/winsup/doc/copy.texinfo
deleted file mode 100644
index 90dc078d1..000000000
--- a/winsup/doc/copy.texinfo
+++ /dev/null
@@ -1,382 +0,0 @@
-@chapter What are the copyrights ?
-
-@section The general idea
-
-Most of the tools are covered by the GNU General Public License (GPL),
-although some are public domain, and others have a X11-style
-copyright. To cover the GNU GPL
-requirements, the basic rule is if you give out any binaries, you must
-also make the source available. For the full details, be sure to
-read the text of the GNU GPL which follows.
-
-The Cygwin API library found in the winsup subdirectory of the
-source code is also covered by the GNU GPL. By default, all
-executables link against this library (and in the process include GPL'd
-Cygwin glue code). This means that unless you modify the tools
-so that compiled executables do not make use of the Cygwin library,
-your compiled programs will also have to be free software distributed
-under the GPL with source code available to all.
-
-Cygwin is currently available for proprietary use only through a
-proprietary-use license. Please contact sales@@cygnus.com for
-more information.
-
-In accordance with section 10 of the GPL, Cygnus 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/osd.html for the precise Open Source
-Definition referenced above.
-
-@section GNU GENERAL PUBLIC LICENSE
-@example
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, 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
-
- Appendix: 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., 675 Mass Ave, Cambridge, MA 02139, 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.
-
-@end example
-
diff --git a/winsup/doc/cygwin-api.in.sgml b/winsup/doc/cygwin-api.in.sgml
deleted file mode 100644
index 13d7f8c2f..000000000
--- a/winsup/doc/cygwin-api.in.sgml
+++ /dev/null
@@ -1,68 +0,0 @@
-<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
- <!ENTITY cygnus-copyright "<YEAR>1998</YEAR><HOLDER>Cygnus
- Solutions</HOLDER>">
- <!ENTITY cygnus-code-copyright "
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-Copyright (C) 1998 Cygnus Solutions.
-
-This is copyrighted software that may only
-be reproduced, modified, or distributed
-under license from Cygnus Solutions.
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-">
- ]>
-
-<book id="cygwin-api">
-
- <bookinfo>
- <date>1998-08-31</date>
- <title>Cygwin API Reference</title>
- <authorgroup>
- <author>
- <firstname>DJ</firstname>
- <surname>Delorie</surname>
- </author>
- <author>
- <firstname>Geoffrey</firstname>
- <surname>Noer</surname>
- </author>
- </authorgroup>
-
- DOCTOOL-INSERT-legal
-
- <revhistory>
- <revision>
- <revnumber>0.0</revnumber>
- <date>1998-08-31</date>
- <authorinitials>dj@cygnus.com</authorinitials>
- <revremark>Initial revision</revremark>
- </revision>
- <revision>
- <revnumber>0.5.0</revnumber>
- <date>1998-12-17</date>
- <authorinitials>noer@cygnus.com</authorinitials>
- <revremark>Add pthread, sem calls. Change revnumber to
- three-part number: Cygwin API major, Cygwin API minor, Doc rev
- number. Starts out at 0.5.0.</revremark>
- </revision>
- </revhistory>
- </bookinfo>
-
- <toc></toc>
-
-<chapter id="compatibility"><title>Compatibility</title>
-DOCTOOL-INSERT-std-ansi
-DOCTOOL-INSERT-std-posix
-DOCTOOL-INSERT-std-misc
-</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 633689631..000000000
--- a/winsup/doc/cygwin-ug-net.in.sgml
+++ /dev/null
@@ -1,64 +0,0 @@
-<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
- <!ENTITY cygnus-copyright
- "<YEAR>1999</YEAR>
- <HOLDER>Cygnus Solutions</HOLDER>">
- <!ENTITY cygnus-code-copyright "
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-Copyright (C) 1998, 1999 Cygnus Solutions.
-
-This is copyrighted software that may only
-be reproduced, modified, or distributed
-under license from Cygnus Solutions.
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-">
- ]>
-
-<book id="cygwin-ug-net">
-
- <bookinfo>
- <date>1999-02-08</date>
- <title>Cygwin User's Guide</title>
- <authorgroup>
- <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
-
- <revhistory>
- <revision>
- <revnumber>0.0</revnumber>
- <date>1998-10-06</date>
- <authorinitials>noer@cygnus.com</authorinitials>
- <revremark>Initial revision</revremark>
- </revision>
- <revision>
- <revnumber>20.1.0</revnumber>
- <date>1999-02-08</date>
- <authorinitials>Pierre.Humblet@eurecom.fr</authorinitials>
- <revremark>Expand, describe Cygwin 20.1</revremark>
- </revision>
- </revhistory>
- </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 3a7371a88..000000000
--- a/winsup/doc/cygwin-ug.in.sgml
+++ /dev/null
@@ -1,63 +0,0 @@
-<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
- <!ENTITY cygnus-copyright "<YEAR>1999</YEAR>
- <HOLDER>Cygnus Solutions</HOLDER>">
- <!ENTITY cygnus-code-copyright "
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-Copyright (C) 1998, 1999 Cygnus Solutions.
-
-This is copyrighted software that may only
-be reproduced, modified, or distributed
-under license from Cygnus Solutions.
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-">
- ]>
-
-<book id="cygwin-ug">
-
- <bookinfo>
- <date>1998-01-28</date>
- <title>Cygwin User's Guide</title>
- <authorgroup>
- <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
-
- <revhistory>
- <revision>
- <revnumber>0.0</revnumber>
- <date>1998-08-31</date>
- <authorinitials>dj@cygnus.com</authorinitials>
- <revremark>Initial revision</revremark>
- </revision>
- <revision>
- <revnumber>20.1.0</revnumber>
- <date>1999-02-08</date>
- <authorinitials>Pierre.Humblet@eurecom.fr</authorinitials>
- <revremark>Expand, describe Cygwin 20.1</revremark>
- </revision>
- </revhistory>
- </bookinfo>
-
- <toc></toc>
-
-DOCTOOL-INSERT-overview
-
-DOCTOOL-INSERT-setup
-
-DOCTOOL-INSERT-using
-
-DOCTOOL-INSERT-programming
-
-</book>
diff --git a/winsup/doc/cygwinenv.sgml b/winsup/doc/cygwinenv.sgml
deleted file mode 100644
index 1ca47f10d..000000000
--- a/winsup/doc/cygwinenv.sgml
+++ /dev/null
@@ -1,87 +0,0 @@
-<sect1 id="using-cygwinenv"><title>The <EnVar>CYGWIN</EnVar> environment
-variable</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><FirstTerm>(no)binmode</FirstTerm> - if set, non-disk
-(e.g. pipe and COM ports) file opens default to binary mode
-(no CR/LF/Ctrl-Z translations) instead of text mode.
-Defaults to set (binary mode). This option must be set
-before starting a Cygwin shell to have an effect on redirection.
-</para>
-<warning><title>Warning!</title><para>If set in 12/98 b20.1, all files
-always open in binary mode.</para> </warning>
-</listitem>
-<listitem>
-<para><FirstTerm>(no)envcache</FirstTerm> - If set, environment variable
-conversions (between Win32 and POSIX) are cached. Note that this is 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><FirstTerm>(no)export</FirstTerm> - if set, the final values of these
-settings are re-exported to the environment as $CYGWIN again.</para>
-</listitem>
-<listitem>
-<para><FirstTerm>error_start:filepath</FirstTerm> - if set, runs <filename>filepath</filepath>
-when cygwin encounters a fatal error. This is useful for debugging.
-<filename>filepath</filename> is usually set to the path to the <filename>gdb</filename>
-program.
-<para><FirstTerm>(no)glob[:ignorecase]</FirstTerm> - 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><FirstTerm>(no)ntea</FirstTerm> - if set, use the full NT Extended
-Attributes to store UNIX-like inode information.
-This option only operates under Windows NT. Defaults to not set. </para>
-<Warning><Title>Warning!</Title> <para>This may create additional
-<emphasis>large</emphasis> files on non-NTFS partitions.</para></Warning>
-</listitem>
-<listitem>
-<para><FirstTerm>(no)ntsec</FirstTerm> - if set, use the NT security
-model to set UNIX-like permissions on files and processes. The
-file permissions can only be set on NTFS partitions. FAT and SAMBA doesn't
-support the NT file security. For more information, read the documentation
-in <citation>ntsec.sgml</citation>.</para>
-</listitem>
-<listitem>
-<para><FirstTerm>(no)reset_com</FirstTerm> - 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><FirstTerm>(no)strip_title</FirstTerm> - if set, strips the directory
-part off the window title, if any. Default is not set.</para>
-</listitem>
-<listitem>
-<para><FirstTerm>(no)title</FirstTerm> - if set, the title bar
-reflects the name of the program currently running. Default is not
-set. Note that under Win9x the title bar is always enabled and it is
-stripped by default, but this is because of the way Win9x works. In
-order not to strip, specify <literal>title</literal> or <literal>title
-nostrip_title</literal>.</para>
-</listitem>
-<listitem>
-<para><FirstTerm>(no)tty</FirstTerm> - if set, Cygwin enables extra support
-(i.e., termios) for UNIX-like ttys.
-It is not compatible with some Windows programs.
-Defaults to not set, in which case the tty is opened in text mode
-with ^Z as EOF. Note that this has been changed such that ^D works as
-expected instead of ^Z, and is settable via stty.
-This option must be specified before starting a Cygwin shell
-and it cannot be changed in the shell.</para>
-</listitem>
-</itemizedlist>
-</sect1>
diff --git a/winsup/doc/dll.sgml b/winsup/doc/dll.sgml
deleted file mode 100644
index 274f12926..000000000
--- a/winsup/doc/dll.sgml
+++ /dev/null
@@ -1,120 +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>OK, 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>Now compile everything to objects:</para>
-
-<screen>
-gcc -c myprog.c
-gcc -c mydll.c
-</screen>
-
-<para>Unfortunately, the process for building a dll is, well, convoluted.
-You have to run five commands, like this:</para>
-
-<screen>
-gcc -s -Wl,--base-file,mydll.base -o mydll.dll mydll.o -Wl,-e,_mydll_init@12
-dlltool --base-file mydll.base --def mydll.def --output-exp mydll.exp --dllname mydll.dll
-gcc -s -Wl,--base-file,mydll.base,mydll.exp -o mydll.dll mydll.o -Wl,-e,_mydll_init@12
-dlltool --base-file mydll.base --def mydll.def --output-exp mydll.exp --dllname mydll.dll
-gcc -Wl,mydll.exp -o mydll.dll mydll.o -Wl,-e,_mydll_init@12
-</screen>
-
-<para>The extra steps give <filename>dlltool</filename> the
-opportunity to generate the extra sections (exports and relocation)
-that a dll needs. After this, you build the import library:</para>
-
-<screen>
-dlltool --def mydll.def --dllname mydll.dll --output-lib mydll.a
-</screen>
-
-<para>Now, when you build your program, you link against the import
-library:</para>
-
-<screen>
-gcc -o myprog myprog.o mydll.a
-</screen>
-
-<para>Note that we linked with <command>-e _mydll_init@12</command>.
-This tells the OS what the DLL's "entry point" is, and this is a
-special function that coordinates bringing the dll to life withing the
-OS. The minimum function looks like this:</para>
-
-<screen>
-#include &lt;windows.h&gt;
-
-int WINAPI
-mydll_init(HANDLE h, DWORD reason, void *foo)
-{
- return 1;
-}
-</screen>
-
-</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 (The supplied ones should work, but
-you might not have them) to link against. Unfortunately, there is not
-yet any tool to do this automatically. However, 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 26e76669d..000000000
--- a/winsup/doc/doctool.c
+++ /dev/null
@@ -1,622 +0,0 @@
-/* doctool.c
-
- Copyright 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <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))
- {
- scan_directory(name);
- }
-
- else if (S_ISREG(st.st_mode))
- {
- char *dot = strrchr(de->d_name, '.');
- int i;
-
- if (dot)
- {
- for (i=0; extensions[i].upper; i++)
- if (strcmp(dot, extensions[i].upper) == 0
- || strcmp(dot, extensions[i].lower) == 0)
- {
- OneFile *one = (OneFile *)malloc(sizeof(OneFile));
- one->next = file_list;
- file_list = one;
- one->filename = name;
- one->enable_scan = ! extensions[i].is_sgml;
- one->used = 0;
- one->sections = 0;
- }
- }
- }
- }
- closedir (dir);
-}
-
-/*****************************************************************************/
-
-void
-scan_file(OneFile *one)
-{
- FILE *f = fopen(one->filename, "r");
- int enabled = ! one->enable_scan;
- char line[1000], *tag=0, *id=0, *tmp;
- int taglen = 0;
- Section *section = 0;
- Section **prev_section_ptr = &(one->sections);
-
- if (!f)
- {
- perror(one->filename);
- return;
- }
-
- while (fgets(line, 1000, f))
- {
- if (one->enable_scan)
- {
- /* source files have comment-embedded docs, check for them */
- if (has_string(line, "DOCTOOL-START"))
- enabled = 1;
- if (has_string(line, "DOCTOOL-END"))
- enabled = 0;
- }
- if (!enabled)
- continue;
-
- /* DOCTOOL-START
-
-<sect1 id="dt-tags">
-this is the doctool tags section.
-</sect1>
-
- DOCTOOL-END */
-
- if (!tag && line[0] == '<')
- {
- tag = (char *)malloc(strlen(line)+1);
- id = (char *)malloc(strlen(line)+1);
- if (sscanf(line, "<%s id=\"%[^\"]\">", tag, id) == 2)
- {
- if (strcmp(tag, "book") == 0 || strcmp(tag, "BOOK") == 0)
- {
- /* Don't want to "scan" these */
- return;
- }
- taglen = strlen(tag);
- section = (Section *)malloc(sizeof(Section));
- /* We want chunks within single files to appear in that order */
- section->next = 0;
- section->file = one;
- *prev_section_ptr = section;
- prev_section_ptr = &(section->next);
- section->internal = 0;
- section->addend = 0;
- section->used = 0;
- section->name = id;
- if (starts_with(section->name, "add-"))
- {
- section->addend = 1;
- section->name += 4;
- }
- if (starts_with(section->name, "int-"))
- {
- section->internal = 1;
- section->name += 4;
- }
- section->lines = (char **)malloc(10*sizeof(char *));
- section->num_lines = 0;
- section->max_lines = 10;
- }
- else
- {
- free(tag);
- free(id);
- tag = id = 0;
- }
- }
-
- if (tag && section)
- {
- if (section->num_lines >= section->max_lines)
- {
- section->max_lines += 10;
- section->lines = (char **)realloc(section->lines,
- section->max_lines * sizeof (char *));
- }
- section->lines[section->num_lines] = (char *)malloc(strlen(line)+1);
- strcpy(section->lines[section->num_lines], line);
- section->num_lines++;
-
- if (line[0] == '<' && line[1] == '/'
- && memcmp(line+2, tag, taglen) == 0
- && (isspace(line[2+taglen]) || line[2+taglen] == '>'))
- {
- /* last line! */
- tag = 0;
- }
- }
- }
- fclose(f);
-}
-
-/*****************************************************************************/
-
-Section **
-enumerate_matching_sections(char *name_prefix, int internal, int addend, int *count_ret)
-{
- Section **rv = (Section **)malloc(12*sizeof(Section *));
- int count = 0, max=10, prefix_len = strlen(name_prefix);
- OneFile *one;
- int wildcard = 0;
-
- if (name_prefix[strlen(name_prefix)-1] == '-')
- wildcard = 1;
-
- for (one=file_list; one; one=one->next)
- {
- Section *s;
- for (s=one->sections; s; s=s->next)
- {
- int matches = 0;
- if (wildcard)
- {
- if (starts_with(s->name, name_prefix))
- matches = 1;
- }
- else
- {
- if (strcmp(s->name, name_prefix) == 0)
- matches = 1;
- }
- if (s->internal <= internal
- && s->addend == addend
- && matches
- && ! s->used)
- {
- s->used = 1;
- if (count >= max)
- {
- max += 10;
- rv = (Section **)realloc(rv, max*sizeof(Section *));
- }
- rv[count++] = s;
- rv[count] = 0;
- }
- }
- }
- if (count_ret)
- *count_ret = count;
- return rv;
-}
-
-/*****************************************************************************/
-
-#define ID_CHARS "~@$%&()_-+[]{}:."
-
-void include_section(char *name, int addend);
-
-char *
-unprefix(char *fn)
-{
- int l = strlen(source_dir_prefix);
- if (memcmp(fn, source_dir_prefix, l) == 0)
- {
- fn += l;
- while (*fn == '/' || *fn == '\\')
- fn++;
- return fn;
- }
- return fn;
-}
-
-void
-parse_line(char *line, char *filename)
-{
- char *cmd = has_string(line, "DOCTOOL-INSERT-");
- char *sname, *send, *id, *save;
- if (!cmd)
- {
- if (book_id
- && (starts_with(line, "<book") || starts_with(line, "<BOOK")))
- {
- cmd = strchr(line, '>');
- if (cmd)
- {
- cmd++;
- fprintf(output_file, "<book id=\"%s\">", book_id);
- fputs(cmd, output_file);
- return;
- }
- }
- fputs(line, output_file);
- return;
- }
- if (cmd != line)
- fwrite(line, cmd-line, 1, output_file);
- save = (char *)malloc(strlen(line)+1);
- strcpy(save, line);
- line = save;
-
- sname = cmd + 15; /* strlen("DOCTOOL-INSERT-") */
- for (send = sname;
- *send && isalnum(*send) || strchr(ID_CHARS, *send);
- send++);
- id = (char *)malloc(send-sname+2);
- memcpy(id, sname, send-sname);
- id[send-sname] = 0;
- include_section(id, 0);
-
- fprintf(output_file, "<!-- %s -->\n", unprefix(filename));
-
- fputs(send, output_file);
- free(save);
-}
-
-int
-section_sort(const void *va, const void *vb)
-{
- Section *a = *(Section **)va;
- Section *b = *(Section **)vb;
- int rv = strcmp(a->name, b->name);
- if (rv)
- return rv;
- return a->internal - b->internal;
-}
-
-void
-include_section(char *name, int addend)
-{
- Section **sections, *s;
- int count, i, l;
-
- sections = enumerate_matching_sections(name, internal_flag, addend, &count);
-
- qsort(sections, count, sizeof(sections[0]), section_sort);
- for (i=0; i<count; i++)
- {
- s = sections[i];
- s->file->used = 1;
- fprintf(output_file, "<!-- %s -->\n", unprefix(s->file->filename));
- for (l=addend; l<s->num_lines-1; l++)
- parse_line(s->lines[l], s->file->filename);
- if (!addend)
- {
- include_section(s->name, 1);
- parse_line(s->lines[l], s->file->filename);
- }
- }
-
- free(sections);
-}
-
-void
-parse_sgml(FILE *in, char *input_name)
-{
- static char line[1000];
- while (fgets(line, 1000, in))
- {
- parse_line(line, input_name);
- }
-}
-
-/*****************************************************************************/
-
-void
-fix_makefile(char *output_name)
-{
- FILE *in, *out;
- char line[1000];
- int oname_len = strlen(output_name);
- OneFile *one;
- int used_something = 0;
- struct stat st;
- struct utimbuf times;
-
- stat("Makefile", &st);
-
- in = fopen("Makefile", "r");
- if (!in)
- {
- perror("Makefile");
- return;
- }
-
- out = fopen("Makefile.new", "w");
- if (!out)
- {
- perror("Makefile.new");
- return;
- }
-
- while (fgets(line, 1000, in))
- {
- if (starts_with(line, output_name)
- && strcmp(line+oname_len, ": \\\n") == 0)
- {
- /* this is the old dependency */
- while (fgets(line, 1000, in))
- {
- if (strcmp(line+strlen(line)-2, "\\\n"))
- break;
- }
- }
- else
- fputs(line, out);
- }
- fclose(in);
-
- for (one=file_list; one; one=one->next)
- if (one->used)
- {
- used_something = 1;
- break;
- }
-
- if (used_something)
- {
- fprintf(out, "%s:", output_name);
- for (one=file_list; one; one=one->next)
- if (one->used)
- fprintf(out, " \\\n\t%s", one->filename);
- fprintf(out, "\n");
- }
-
- fclose(out);
-
- times.actime = st.st_atime;
- times.modtime = st.st_mtime;
- utime("Makefile.new", &times);
-
- if (rename("Makefile", "Makefile.old"))
- return;
- if (rename("Makefile.new", "Makefile"))
- rename("Makefile.old", "Makefile");
-}
-
-/*****************************************************************************/
-
-int
-main(argc, argv)
- int argc;
- char **argv;
-{
- int i;
- OneFile *one;
- FILE *input_file;
- int fix_makefile_flag = 0;
-
- while (argc > 1 && argv[1][0] == '-')
- {
- if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0)
- {
- show_help();
- }
- else if (strcmp(argv[1], "-i") == 0)
- {
- internal_flag = 1;
- }
- else if (strcmp(argv[1], "-m") == 0)
- {
- fix_makefile_flag = 1;
- }
- else if (strcmp(argv[1], "-d") == 0 && argc > 2)
- {
- scan_directory(argv[2]);
- argc--;
- argv++;
- }
- else if (strcmp(argv[1], "-o") == 0 && argc > 2)
- {
- output_name = argv[2];
- argc--;
- argv++;
- }
- else if (strcmp(argv[1], "-s") == 0 && argc > 2)
- {
- source_dir_prefix = argv[2];
- argc--;
- argv++;
- }
- else if (strcmp(argv[1], "-b") == 0 && argc > 2)
- {
- book_id = argv[2];
- argc--;
- argv++;
- }
-
- argc--;
- argv++;
- }
-
- for (one=file_list; one; one=one->next)
- {
- scan_file(one);
- }
-
- input_file = fopen(argv[1], "r");
- if (!input_file)
- {
- perror(argv[1]);
- return 1;
- }
-
- if (output_name)
- {
- output_file = fopen(output_name, "w");
- if (!output_file)
- {
- perror(output_name);
- return 1;
- }
- }
- else
- {
- output_file = stdout;
- output_name = "<stdout>";
- }
-
- parse_sgml(input_file, argv[1]);
-
- if (output_file != stdout)
- fclose(output_file);
-
- if (fix_makefile_flag)
- fix_makefile(output_name);
-
- return 0;
-}
diff --git a/winsup/doc/doctool.txt b/winsup/doc/doctool.txt
deleted file mode 100644
index c89e39243..000000000
--- a/winsup/doc/doctool.txt
+++ /dev/null
@@ -1,146 +0,0 @@
-Doctool
-
-DJ Delorie <dj@cygnus.com>
-
-These are the instructions for using doctool. Yes, I should have
-written them *in* DocBook, but hey, I was in a hurry.
-
-OK, doctool is a program that gathers snippets of a docbook document and
-puts them all together in the right order. There are three
-places that it gets snippets from:
-
-1. The document that you tell it you want "finished"
-
-2. blocks of SGML in *.sgml files
-
-3. comments in source code
-
-The first of these is the template file, which is to say, it's a
-normal SGML file (sort of). This file is the first one read, and
-includes such things as your <book> tags etc. It contains commands to
-doctool to tell it where to put the other parts.
-
-The second, the *.sgml files, contain one or more blocks of SGML.
-To work with doctool, each of these snippets must begin and end
-with matching tags, must have an id="" attribute, and the start/end
-tags must begin at the beginning of the line. For example:
-
-<foo id="frob-45">
- stuff goes here
-</foo>
-<bar id="frob-48">
- stuff goes here
-</bar>
-
-In this example, the file contains two snippets, one marked by "foo"
-and one barked by "bar", with id's "from-45" and "from-48". Note that
-I made up the foo and bar tags. You'd usually use a <sect1> tag or
-something useful like that. Stuff outside the blocks is ignored.
-
-The third is simply an encapsulation of the second in comments, like this:
-
-/* DOCTOOL-START
-<foo id="frob-45">
- stuff goes here
-</foo>
-DOCTOOL-END */
-
-The DOCTOOL-START and DOCTOOL-END things are special. Doctool uses
-those to know which parts of which comments are useful, and which
-parts are the useless source code stuff ;-)
-
-
-OK, so now we've got all these snippets of SGML floating around. What
-do we do with them? Well, inside the template document (#1 in our
-list up there) you'd put text snippets that said "ok, put them
-here". Each text snippet looks like this:
-
-DOCTOOL-INSERT-frob-
-
-Note that the "frob-" part tells doctool to pull in all the snippets
-with IDs that start with "frob-", in alphabetical (well, asciibetical
-at the moment) order. So, by saying "DOCTOOL-INSERT-frob-" you'd get
-all the "frob-*" snippets, like "frob-45" and "frob-48".
-
-If you just said DOCTOOL-INSERT-frob, it inserts the snippet named
-"frob" and no others.
-
-Note that no snippet will ever be inserted more than once, no matter
-how many DOCTOOL-INSERTs you have.
-
-There's two other tricks doctool has. If it finds a snippet with an ID
-like "int-*" (i.e. int-frob-45) that means that snippet of documentation
-is for the "internal" version only. The "int-" is discarded, and if
-the -i option is given to doctool, this snippet is treated as if the
-int- wasn't there. Without the -i, the int-* snippets are ignored
-completely.
-
-If a snippet has "add-" on it, like "add-frob-45", that's an addendum.
-Each time a snippet named without the add- is found, doctool looks for
-an addendum with exactly that same name (i.e. frob-45 looks for
-add-frob-45). If it finds any, it puts them just before the last line
-of the non-add snippet (so that it's *inside* the main snippet's
-block, not after it). Example:
-
-<sect1 id="frob-45">
- some text
-</sect1>
-<sect1 id="add-frob-45">
- more text
-</sect1>
-
-This would yield:
-
-<sect1 id="frob-45">
- some text
- more text
-</sect1>
-
-You should use the same outermost tags as the main snippet, but only
-because it sets the proper nesting rules for what's enclosed.
-
-You can use add- and int- at the same time, but always do add-int- and
-not int-add- (i.e. "add-int-frob-45").
-
-
-OK, now for doctool command line options.
-
--m tells doctool to "fix" the Makefile (not makefile) to include the
-extra dependencies needed by the file you're generating. You need to
-manually include dependencies on the Makefile itself and the template
-file; doctool only includes the snippet files (sources etc) that it
-actually pulled content from. Note: this isn't perfect! Someone can
-come along and add a new snippet to a source file, and doctool would
-never know. Sometimes, it's best to just rebuild the docs all the
-time.
-
--i means to include snippets with the "int-" prefix on their IDs. Use
-with -b to make internal and public versions from the same sources.
-
-"-d dir" tells doctool to scan all the files in that directory (and
-subdirectories, recursively) for files that might contain snippets of
-SGML. These include *.c, *.cc, *.h, and *.sgml. The idea is that
-most of the documentation would be in a *.sgml file named after the
-source (i.e. foo.c -> foo.sgml) but some commentary within the source
-might be useful in the docs as well. SGML files (*.sgml) do not need
-the DOCTOOL-START/END tags but the others do.
-
--o sets the output file. Without -o, the file goes to stdout (ick).
-
--s tells doctool to supress a "source directory prefix". What this
-means is that, in the generated output doctool puts comments that say
-where each snippet comes from (for debugging), which includes the full
-path sometimes, but if you use -s, you can tell doctool to cut off
-that prefix. For example,
-/usr/people/dj/src/cygnus/latest/devo/winsup/foo.c might get shortened
-to winsup/foo.c if you gave "-s
-/usr/people/dj/src/cygnus/latest/devo/". Cygnus makefiles could
-just use -s $(srcdir) most of the time.
-
--b changes the ID for the <book> tag. db2html uses the <book> tag's
-ID as the default subdirectory name and/or html file name to create
-the book with. You'd need this to generate two books (internal vs
-public) from the same source.
-
-The only other thing you'd add to the command line is the ONE template
-file you want to pull in.
diff --git a/winsup/doc/faq.texinfo b/winsup/doc/faq.texinfo
deleted file mode 100644
index 3908f637a..000000000
--- a/winsup/doc/faq.texinfo
+++ /dev/null
@@ -1,18 +0,0 @@
-\input texinfo
-
-@title The Cygwin FAQ
-
-@subtitle (Not @emph{completely} updated for the latest net release, but still useful!)
-
-@author You can always find the latest version of this FAQ at @file{http://cygwin.com/faq/}.
-
-@setfilename faq.txt
-
-@include what.texinfo
-@include install.texinfo
-@include calls.texinfo
-@include how.texinfo
-@include relnotes.texinfo
-@include history.texinfo
-@include who.texinfo
-@include copy.texinfo
diff --git a/winsup/doc/fhandler-tut.txt b/winsup/doc/fhandler-tut.txt
deleted file mode 100644
index 213b32b20..000000000
--- a/winsup/doc/fhandler-tut.txt
+++ /dev/null
@@ -1,83 +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_*
-path.cc - 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 fhandler.h.
-
-First, update the comment about which files are where. We're adding
-fhandler_dev_zero as FH_DEV_ZERO. We're adding this as a "fast"
-device (it will never block) so we have to adjust FH_NDEV also.
-
-Later 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 path.cc to recognize when the user is trying
-to open "/dev/zero". Look in get_device_number; there's a long list
-of cases, just add one (I added one after "null"). Also remember to
-add an entry to the windows_device_names list in the right spot.
-
-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 b0bac2eef..000000000
--- a/winsup/doc/filemodes.sgml
+++ /dev/null
@@ -1,34 +0,0 @@
-<sect1 id="using-filemodes"><title>File permissions</title>
-
-<para>On Windows 9x systems, files are always readable, and Cygwin uses the
-native read-only mode 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>Under NT, file permissions default to the same behavior as Windows
-9x but there is optional functionality in Cygwin that can make file
-systems behave more like on UNIX systems. This is turned on by adding
-the "ntea" option to the <EnVar>CYGWIN</EnVar> environment variable.</para>
-
-<para>When the "ntea" feature is activated, Cygwin will start with basic
-permissions as determined above, but can store POSIX file permissions in NT
-Extended Attributes. This feature works quite well on NTFS partitions
-because the attributes can be stored sensibly inside the normal NTFS
-filesystem structure. However, on a FAT partition, NT stores extended
-attributes in a flat file at the root of the partition called <filename>EA
-DATA. SF</filename>. This file can grow to extremely large sizes if you
-have a large number of files on the partition in question, slowing the
-system to a crawl. In addition, the <filename>EA DATA. SF</filename> file
-can only be deleted outside of Windows because of its "in use" status. For
-these reasons, the use of NT Extended Attributes is off by default in
-Cygwin. Finally, note that specifying "ntea" in <EnVar>CYGWIN</EnVar> has no
-effect under Windows 9x. </para>
-
-<para>Under NT, the test "[ -w filename]" is only true if filename is
-writable across the board, e.g. <command>chmod +w filename</command>. </para>
-
-</sect1>
-
diff --git a/winsup/doc/gcc.sgml b/winsup/doc/gcc.sgml
deleted file mode 100644
index d13bba116..000000000
--- a/winsup/doc/gcc.sgml
+++ /dev/null
@@ -1,78 +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>
-<title>Building Hello World with GCC</title>
-<screen>
-<prompt>C:\cygnus\&gt;</prompt> <userinput>gcc hello.c -o hello.exe</userinput>
-<prompt>C:\cygnus\&gt;</prompt> <userinput>hello.exe</userinput>
-Hello, World
-
-<prompt>C:\cygnus\&gt;</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>For most cases, you can just remove the __export and leave it at
-that. For convenience sake, you might want to include the following
-code snippet when compiling GUI programs. If you don't, you will want
-to add "-e _mainCRTStartup" to your link line in your Makefile.</para>
-
-<screen>
-#ifdef __CYGWIN__
-WinMainCRTStartup() { mainCRTStartup(); }
-#endif
-</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>
-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>
-
-</sect2>
-</sect1>
diff --git a/winsup/doc/gdb.sgml b/winsup/doc/gdb.sgml
deleted file mode 100644
index 732004f49..000000000
--- 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><title>Compiling with -g</title>
-<screen>
-<prompt>$</prompt> gcc -g -O2 -c myapp.c
-<prompt>$</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><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><title>Debugging with command line arguments</title>
-<screen>
-<prompt>$</prompt> myprog -t foo --queue 47
-
-<prompt>$</prompt> gdb myprog
-<prompt>(gdb)</prompt> run -t foo --queue 47
-</screen>
-</example>
-
-
-</sect1>
diff --git a/winsup/doc/history.texinfo b/winsup/doc/history.texinfo
deleted file mode 100644
index f13be55fc..000000000
--- a/winsup/doc/history.texinfo
+++ /dev/null
@@ -1,670 +0,0 @@
-@chapter History
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-@include changes.texinfo
-
-@section Release Beta 19 (Feb 26 1998)
-
-This is a major release. It includes a much-updated version of the
-Cygwin32 library. Because the Cygwin API has changed in incompatible
-ways, the dll has been renamed cygwinb19.dll to avoid invalidating
-previously built executables.
-
-Note that a B19-compiled application exec()ing a B18-compiled
-application will treat the B18-compiled executable as an ordinary
-Win32 executable. This means that open file descriptors and some other
-internals will not be inheritted on exec() calls. The reason for this
-is that different shared memory areas are used by the different versions
-of the cygwin library. This may or may not be of importance to you
-depending on what you're doing.
-
-The Beta 19 release of the Cygwin32 library continues to be licensed
-under the GNU General Public License (GPL).
-
-The PE format definition used by the compiler tools now matches
-Microsoft's more closely. This should allow better interoperability
-with other vendors' development tools although more work probably
-remains to be done in this area. This change invalidates all previously
-built object (.o) and static library (.a) files so be sure to
-delete/rebuild old .o and .a files you are using!
-
-Finally, old symlinks are invalidated by this release. The "system"
-attribute is now used to mark symlinks which significantly speeds
-up fstat and other file related calls. Either recreate old ones or
-set their "system" attribute flag so they will be recognized properly.
-
-The new installer takes care of all environment variable settings
-automatically by installing a shortcut in program files that pulls
-up a bash prompt with all the correct environment variables set.
-As a result, the setup process should be much cleaner than in the last
-release.
-
-For those of you who end up moving the tools around, the batch file
-that sets up the default environment is called cygnus.bat and is
-installed in the root of the install directory. Because the tools have
-been compiled to install in /cygnus/b19, when installed in this
-location, the tools should "just work" if the bin directory is in your
-path (no special environment variables are needed). The only exception
-is MAKE_MODE which needs to be set if you want to get ordinary Unix-like
-make behavior -- see the make notes below for more information.
-
-@subsection Changes in specific tools:
-
-Ian Lance Taylor has written a resource compiler called "windres".
-It can be used to compile windows resources from a textual rc file
-into a COFF file. The sources are in the binutils subdirectory of
-the sources.
-
-We have upgraded many of the utilities. Beta 19 includes bash 2.01.1,
-fileutils 3.16, gawk 3.0.3, patch 2.5, shellutils 1.16, tar 1.12,
-textutils 1.22, and texinfo 3.11. Bash under Cygwin32 now includes
-working job control among other improvements.
-
-The sh executable is now ash 0.2 from the Debian Linux distribution.
-Using this more minimal shell as /bin/sh.exe speeds up configures
-significantly.
-
-Bison 1.25 has been added.
-
-Tcl/tk are upgraded to version 8.0. Compatible versions of tix and
-itcl have been added. These all include Cygwin32-compatible configury
-files so you can do a Unix-style build of the Win32 ports of tcl/tk.
-
-Expect 5.21.3 is included and basically works.
-
-The binaries have been compiled with i686 optimizations turned on
-which may result in a speed increase on Pentium-based systems
-although the tools should work on i386 and later chips.
-
-The linker (ld) has been enhanced -- it will now add the idata3
-terminator automatically when linking dlls.
-
-kill now supports signal names in arguments. ps now shows process
-start time information.
-
-Although the default install of the tools should hide this detail, the
-make utility now defaults to a Win32 mode which uses cmd.exe/command.com
-as the subshell. This mode allows the use of backslashes in filenames.
-To build Unix programs, you need to set the MAKE_MODE environment
-variable to "UNIX". This way you will get the old behavior of using
-sh.exe as the subshell.
-
-@subsection Changes in the Cygwin32 API (cygwin.dll):
-
-The interface is now better defined. It contains libc, libm, and
-Unix compatability calls. It no longer contains exports for libgcc.a.
-This should result in a more stable interface. See the calls.texinfo
-document for interface documentation.
-
-There is now only one environment variable called CYGWIN32 that controls
-the overall behavior of the dll:
-
- set CYGWIN32=[no]title [no]strip_title [no]binmode [no]glob
- strace=mask:cache,file [no]tty
-
-So if you "set CYGWIN32=title tty", then you would get tty support
-(see below) and have the current running process listed in the title
-bar.
-
-B19 adds support for:
-
-* tty and pseudo-tty devices. For now, ttys default to off because
-taking over the console causes problems with using non-Cygwin console
-programs in a Cygwin console. To turn it on, set the environment
-variable CYGWIN32 to include "tty".
-* Hard links (requires NT on an NTFS filesystem). When not possible (on
-non-NTFS filesystems), link() will make a copy of the file in question
-as it has done in previous releases.
-* The SIGWINCH signal. If tty handling is enabled then the process will
-receive a SIGWINCH signal when the screen size changes.
-* Additional terminal escape sequences recognized: scroll region setting via
-<ESC>[n1;n2r and setting the console title using xterm escape sequence:
-<ESC>]2;new title^G .
-
-The following calls have been added:
-
-* ptsname, grantpt, unlockpt
-* login, logout, ttyslot, ctermid
-* cfgetispeed, cfgetospeed, cfsetispeed, cfsetospeed
-* setitimer, getitimer, ftime, tzset
-* wait3, wait4, pause, sigpause
-* getpgid, killpg, setegid (stub)
-* strlwr, strupr
-* sexecve, sexecl, sexecle, sexeclp, sexeclpe, sexecv, sexecp, sexecvpe
-* rcmd, rresvport, rexec
-* strsignal, strtosigno
-* dlopen, dlsym, dlclose, dlerror
-* inet_netof, inet_makeaddr
-* socketpair
-* fpathconf, realpath, chroot (stub)
-* initgroups (stub), getgroups
-* random, srandom
-
-The following calls have been removed:
-
-* ScreenCols, ScreenGetCursor, ScreenRows, ScreenSetCursor
-* getkey, kbhit
-* crypt (stub)
-* all libgcc.a exports
-
-The Winsock dll (wsock32.dll) is no longer implicitly linked into
-the Cygwin32 dll. Instead, it is explicitly loaded with LoadLibrary
-the first time a process calls a Cygwin32 networking function. This
-speeds up most processes significantly (configures by about 20%).
-
-The signal-related code has been rewritten from scratch. Ditto for
-most of the path handling code.
-
-The globbing and getopt code has been replaced with BSD-derived
-code. The regexp code has been replaced with Henry Spencer's PD
-implementation.
-
-Doug Lea's malloc is now being used as the default malloc exported by
-cygwin. This malloc balances speed and compactness very nicely but is
-more unforgiving when attempts are made to free already freed memory,
-i.e., a segmentation violation will occur.
-
-The bsearch call has been rewritten.
-
-Alt Gr-key behavior has been changed in this release. The left alt-key
-still produces ESC-key sequence. The right alt (Alt Gr)-key now
-produces characters according to national keyboard layouts.
-
-Processes no longer write their name in the title bar unless you include
-"title" in the CYGWIN32 environment variable (see above).
-
-Multiple cygwin.dlls no longer use the same memory space unless they are
-identical (built at the same time). This allows multiple dlls with
-incompatible shared memory usage to be run simultaneously. It also
-facilitates debugging a buggy cygwin.dll. By keeping only a single copy
-of the latest cygwin.dll on your system, you can be assured of having
-all cygwin processes exist in the same shared memory space.
-
-The slash mount no longer defaults to C:. It now defaults to the
-system drive letter (where the OS is installed).
-
-The standard dl* dynamic library loader functions are now available.
-Cygwin32 B19 now correctly copies data after a fork and automatically
-reloads any DLLs loaded in the parent process. In addition, dlls will
-now be correctly initialized when loaded and global constructors will
-be called. Global destructors will be called when the DLL is detached.
-Handles gotten from dlopen or dlsym in the parent will be accessible in a
-forked child. The LD_LIBRARY_PATH environment variable is used in the dlopen
-search.
-
-Include the file <cygwin32/cygwin_dll.h> in a cygwin32 created .dll and
-use the line DECLARE_CYGWIN_DLL(dll-entry-point) to produce .dlls that
-can be used with these functions.
-
-@section Release Beta 18 (May 6 1997)
-
-This is a major release. The new cygwin.dll is still
-backwards-compatible with previously linked applications but
-contains significant changes.
-
-We have completely changed the installation process to make
-use of an InstallShield5-based installer. This should reduce the
-number of installation problems people have experienced in the
-past. However, it is still necessary to set environment variables
-by hand, as explained in the README.txt accompanying the distribution.
-(Future gnu-win32 installers may include the capability to do this
-automatically).
-
-@subsection Changes in specific tools:
-
-GCC compilation times have been improved by 20-30% by using spawn()
-instead of fork().
-
-GCC accepts both Win32 and POSIX paths/path lists in its
-environment variables (COMPILER_PATH, LIBRARY_PATH, C_INCLUDE_PATH,
-CPLUS_INCLUDE_PATH, OBJC_INCLUDE_PATH)
-
-GDB comes with a tcl/tk-based GUI (gdbtk). You can still invoke the
-command line gdb by invoking it with "gdb -nw".
-
-Bash verifies that /tmp exists and is a directory upon startup.
-It complains if this isn't the case.
-
-Running gcc or ld with "-s" used to create invalid executables.
-The bug in bfd that was responsible for this has been fixed.
-
-The conflict between String.h and string.h (and other such pairs
-of header files) where you include one and get the other has been
-fixed.
-
-The top level install-sh script tries to install foo.exe if asked
-to install foo when foo's not present. This fixes many installs
-of Unix software.
-
-Dlltool has preliminary support for the IMPORT declaration in .def files
-when invoked with -I. Feel free to experiment with it but once this
-functionality is tested more extensively this flag may go away.
-
-Time is upgraded to version 1.7.
-
-Make is upgraded to version 3.75.
-
-Make accepts both Win32 and POSIX path lists in the VPATH variable.
-
-@subsection Changes in the Cygwin32 API (cygwin.dll):
-
-The following is now supported:
-
-* UNC paths
-* Reverse index escapes in console code
-* Blocking select()s on a combination of sockets/handles
-* Directory symlinks.
-* Reparenting of child processes.
-
-The following calls have been added:
-
-* mmap(), mprotect(), msync(), munmap(). fork() changed to support these.
-* fsync(), statfs(), fstatfs().
-* getprotobynumber() and getservbyport().
-* get_osfhandle(), cwait().
-* spawnl(), spawnle(), spawnlp(), spawnlpe(), spawnv(), spawnve(),
-spawnvp(), spawnvpe().
-* nice().
-* sigpending(), sigsuspend()
-* Under NT only, chown(), getgrgid(), getgrnam(), endgrent(), getgrent(),
-setpwend(), getpwent(), endpwent(). Win95 still has these as stubs.
-
-Significantly better signals / exception handling support added.
-The kill signal works much better now (control-C works in bash).
-
-Shell scripts now run the shell specified after the #! instead of
-always defaulting to /bin/sh.
-
-Floating point registers are now properly initialized in the crt0.o.
-
-Opening non-disk files such as com ports no longer check to see
-if they are symlinks or executables.
-
-The console title now is set to the name of the running process.
-
-Winsock is now initialized upon app startup.
-
-Moved reent_data from private address space to cygwin.dll.
-
-The system() call now invokes spawnvp() instead of fork()/exec().
-
-Support for NT extended attributes has been added but is disabled
-for now because it slowed things down too much. We want to use them to
-remember info about symlink and executable status of files.
-
-Under NT only, utilities mkpasswd and mkgroup can generate a valid
-/etc/passwd and /etc/group.
-
-Earlier releases stored mount points in the registry under
-"Cygnus Support". This changed to "Cygnus Solutions" starting
-with beta 18. Either use a registry editor (regedit under NT)
-to rename the old entry or just redo your mount points and the
-cygwin.dll will automatically create the new one for you.
-
-Mount points can now be up to MAX_PATH in length instead of 30
-characters.
-
-@section Release Beta 17.1 (Dec 10 1996)
-
-A patch has been applied to make Win 95 configure work again.
-
-ld has been changed to make "a.exe" be the default executable name.
-
-@section Release Beta 17 (Dec 7 1996)
-
-It is now possible to rebuild the tools natively under x86 NT when
-the full Cygnus Developers' Kit (CDK) and the User Tools are both
-installed correctly.
-
-While the cygwin.dll underwent substantial changes, none of them
-prevent you from using previously built applications The new dll
-is compatible with beta 16 to the best of our knowledge. Beta 14-built
-programs will continue to fail with the beta 17 dll -- you will have to
-relink them before they will work.
-
-The winsup files that make up the Cygwin32 API are now under the
-GNU General Public License. See the accompanying press release
-for more information.
-
-@subsection Changes in specific tools:
-
-Gcc now links by default against -lkernel32 and also against
--luser32 -lgdi32 -lcomdlg32 when mwindows is set. Another major
-change is that when creating an executable, gcc will now create
-foo.exe when given a -o argument of foo.
-
-Dlltool has patches to make it better handle the --subsystem argument
-that allows choosing console vs. GUI among other options.
-ld has been changed to have a much larger stack reserve size. This
-is necessary when rebuilding the toolchain natively under NT.
-
-The C++ headers can now be found given a correctly set GCC_EXEC_PREFIX
-environment variable.
-
-New versions of fileutils and make are included. Findutils has been
-added.
-
-@subsection Changes in the Cygwin32 API (cygwin.dll):
-
-Scott Christley's headers and def files for the standard Win32 dlls
-have been integrated. Anything present only in the previous Cygnus headers
-has been added in the appropriate places. There are placeholder files
-with the standard Win32 header names that pull in our headers so
-programs that try to include specific headers should continue to work.
-Having more complete headers should make Win32 native programming
-easier.
-
-Select has been rewritten from scratch. The new one can deal with
-all sockets, handles and sockets always ready, all handles. Handles
-and sockets with timeout not implemented yet. Select now does
-blocking and doesn't spin cpu.
-
-File handling has been largely rewritten:
-The fhandler array has been moved into local memory instead of shared
-memory. This makes a number of things behave better. Lots of changes
-to support this. There is now fairly complete ansi/vt100 console support.
-Some new file locking support has been added. Arrow keys are now
-supported.
-
-Process handling much improved.
-
-Significant serious bugs in fork() fixed.
-
-The system() call now works.
-
-unlink() now chmods read-only files to writable before attempting to
-delete a file. This fixes the outstanding problem where rm can't
-delete read-only files saying "out of queue slots" repeatedly.
-
-Text mode read has been rewritten.
-
-New syslog code allows logging to event log under NT, file under Win 95.
-
-Symlinks are enabled.
-
-readv() and writev() have been written and exported.
-
-For MS compatibility, we now export functions in the dll as _funcname
-in addition to funcname. I would suggest not making use of this fact
-unless you are building code that already accesses C library calls
-in this way.
-
-Almost all of the source code is now in C++ files.
-
-@section Release Beta 16 (Aug 30 1996)
-
-Path handling has been completely rewritten. To refer to drive Q: in
-bash, you can now refer to //q/. Alternatively, type "mount Q: /q" to
-have drive Q: show up as /q.
-
-We now pass the Plum Hall positive C conformance tests on the
-i386 under Windows 95 and NT 4.0b2.
-
-Fork was previously not accessible inside the dll. This is no
-longer the case which should allow us to add working system and popen
-calls.
-
-getdomainname works (it used to just return "cygnus.com") by getting
-information from registry.
-
-Fixed readdir bug that set errno improperly. This fixed the problem
-with diff not working across directories.
-
-Better error checking in signal functions. Initialize winsock in
-cygwin32_socket with checkinit call (fixes bug that required calling any
-function that did this first).
-
-New functions: sigaddset, sigismember, sigfillset, sigemptyset.
-
-Removed extra underscores present in sysdef files.
-
-There is a now a major and a minor version number associated with
-the cygwin.dll. The major number changes only when incompatible changes
-are made, the minor number changes when significant changes are made
-to the dll that don't require relinking of old apps.
-
-Changed value of HZ in include/sys/param.h to correct value of 1000.
-(Fixes bug people reported about "time sleep 5" returning 50).
-
-Assorted exception handling fixes for both i386 and ppc processors.
-
-Assorted time-related fixes required for Cygnus Kerberos work.
-New time functions: gmtime, corelocaltime
-
-Assorted spawn and fork fixes.
-
-Pseudo-Unix process handling added -- new ps and kill commands added
-
-Control-Z's are now handled as a valid EOF token in files opened as
-text.
-lseek now always operates in binary mode.
-
-Select revamped.
-
-Various other changes. For more detailed information, consult the file
-in the source code winsup/ChangeLog.
-
-Preprocessor define scheme changed. Apps should now use _WIN32
-instead of __WIN32__ to check for access to Win32 API and __CYGWIN32__
-to check for presence of the Cygwin32 environment.
-
-We are no longer including GNU findutils, GNU dbm, GNU bison,
-GNU less, ncurses, ftp, finger, rcl, cvtres, or V. This may or may not
-change in the future.
-
-You must relink old apps you built with prior releases with the new
-cygwin.dll.
-
-@section Release Beta 14 (April 10 1996)
-
-Some bugs have been fixed. GDBM and m4 are in the release. GCC now
-uses the standard install directories for cc1 etc.
-
-A port of V to gnu-win32 is included. You can now write graphics
-applications which will run on Unix or Windows unchanged. Some parts of
-V work on the PPC too.
-
-If you call any programs from the standard DOS shell, then the DLL will
-expand all the wildcards (glob) found in the arguments on the command
-line. So ls *.exe will do what you think it should, even if you're not
-in bash.
-
-ncurses and less are included. The DLL's emulation of a vt100 isn't complete,
-so ncurses doesn't do all that it should. Hence less is more or less
-useless. This can be fixed with a new DLL. (If you want to use
-something which uses curses, be sure to set your TERM and HOME
-envirionment variables)
-
-If you leave out main, then the libraries will try and call WinMain in the
-usual way.
-
-^C works much better on Windows 95. It's still not quite right, but at
-least most times it quits what you're doing, and most times doesn't
-crash your machine.
-
-You can start more than one concurrent bash session.
-
-Some networking support has been added. Even though telnet.exe is provided,
-I know that it doesn't work, so please don't send me bug reports.
-
-You will have to relink your applications to go with the new DLL.
-
-The DLL is released in its own .zip file too, so you don't have to
-download a load of other stuff if you dont want to.
-
-@section Release Beta 13 (Feb 9 1996)
-
-Files are opened in binary mode, unless the registry is fiddled with.
-
-The `cat >foo <<EOF bug is fixed.
-
-The symlink cookie has changed, so old links wont work any more.
-
-Two resource tools are provided (untested).
-
-More windows header files are provided. WxWindows almost compiles.
-
-You can get to a raw floppy with `/dev/fd0 or `/dev/fd1.
-
-You can have two filenames with the same name and different case in
-the same directory.
-
-Stat now fills in the st_nlink field for directories, so find works
-better.
-
-This version is much more stable than any previous version, and will
-stay running long enough to configure and build itself on my NT box.
-
-This version is also available in PowerPC versions. The PowerPC
-compiler doesn't do stack probing, so some applications won't work, or
-they'll only work on some input data - e.g. the demo "hello world" will
-compile, but gcc will crash compiling the dhrystone benchmark.
-
-There's a new registry variable "fmode=binary" which controls
-whether the tools always open files in binary mode (unless overridden
-with O_TEXT), or always open files in text mode (unless overridden with
-O_BINARY).
-
-Filesystems can be mounted with the mixed_case flag. This allows
-you to use filenames with the same spelling, but different case in the
-same directory.
-
-I haven't tested or even used some of the packages that I've
-provided. I compiled them, and then fixed the obvious "the file should
-have been opened in binary mode" problems.
-
-I've already had reports of some of it not working correctly on
-Windows 95. I don't have a simple to use Windows 95 configuration, but
-when I did try "it worked for me". This may be another manifestation
-of the bug which makes bash hang sometimes under NT.
-
-@section Release Beta 12 (Jan 3 1996)
-
-You can call non- gnu-win32 applications from bash.
-
-You can mount other directories using the @code{mount} command.
-
-Minimal ANSI terminal emulation included.
-
-Packages split into smaller and more logical lumps.
-
-/d<name> mechanism gone.
-
-Initial support for the PowerPC added.
-
-@section Release Beta 11 (Jan 3 1996)
-
-Something broke on the way to the ftp site.
-
-@section Release Beta 10 (Dec 5 1995)
-
-You can pass environment variables around in bash.
-
-Lots more stuff provided precompiled.
-
-Diffs to standard FSF release provided.
-
-It self-hosts.
-
-It supports symbolic links.
-
-The directory layout has changed to be more unix like.
-
-The way that you get to non-c drives is new - i:\foo.cc
-is now /di/foo.cc
-
-Nasty bug found and fixed in fork.
-
-CPP will now search the directories you supply in env names.
-
-@section Release Beta 9
-
-I've put all of libc and libm into a shared library,
-This drastically reduces the size of some binaries.
-e.g., ls goes from 82,949 bytes to 26,624.
-"Hello World" is 2564 bytes long.
-This is the first stage in greatly speeding up
-some of the stuff that's going on behind the curtain.
-
-Different processes communicate using shared memory.
-
-Some trivial use of the registry is made.
-
-DLLTOOL is now *much* faster.
-
-Some small problems have been fixed in the way that DLLs were
-layed out.
-
-@section Release Beta 8
-
-GDB works.
-
-GCC now emits debug info which can make **huge** executables
-Fortunately, strip works too.
-
-More work has been done to make quoting work.
-
-Simple termios support added to newlib.
-
-Much nicer way of describing paths, eg //c/foo is c:\foo.
-
-@section Release Beta 7
-
-Works again on Win 95 (which is why -6 wasn't advertised).
-
-Permissions are faked better.
-
-Source of demos available without having to ftp the entire win32
-binary tree.
-
-@section Release Beta 6
-
-Can now generate DLLs, tiny demo included.
-tcl, byacc, fileutils, diff, make included.
-
-@section Release Beta 5
-
-Bug preventing anything from running on recent versions
-of Win95 fixed.
-
-vfork and exec oddities fixed.
-
-Import libraries are now really libraries and not
-just .o files.
-
-Debugging info stripped from images and libraries;
-it's just bloat until gdb works.
-
-I've filled in the four major import libraries.
-
-The win*.h files are now installed into <foo>/include
-rather that <foo>/include/sys, so more things will
-compile out of the box.
-
-@section Release Beta 4
-
-PE support is fixed. Programs run on
-NT 3.1, NT 3.5, NT 3.51 and Windows 95.
-
-You can build GUI programs.
-
-.DEF files for three other DLL's started.
-
-New GUI demo program.
-
-C library distinguishes between text and binary files
-consequently the text files generated by the
-tools have the familiar ^M at the end of the line
-which DOS likes so much.
-
-Doug Evans of Cygnus has added a load
-of fancy support for execve, opendir and
-various other cool things.
-
-Exception handling is better.
-
-@section Release Beta 3
-
-Was so long ago we don't remember.
diff --git a/winsup/doc/how-api.texinfo b/winsup/doc/how-api.texinfo
deleted file mode 100644
index 6272582ae..000000000
--- a/winsup/doc/how-api.texinfo
+++ /dev/null
@@ -1,275 +0,0 @@
-@section Cygwin API Questions
-
-@subsection How does everything work?
-
-There's a C library which provides a Unix-style API. The
-applications are linked with it and voila - they run on Windows.
-
-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.
-
-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.
-
-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.
-
-@subsection Are development snapshots for the Cygwin library available?
-
-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
-http://cygwin.com/snapshots/
-
-
-@subsection How is the DOS/Unix CR/LF thing handled?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-Let's start with some background.
-
-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.
-
-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 dependant 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.
-
-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.
-
-Some people push the notion of globally setting the default processing
-mode to binary via mount point options or by setting the CYGWIN32
-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.
-
-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 @code{O_BINARY} to
-the second argument of an @code{open} call, or @code{"b"} to second
-argument of an @code{fopen} call. You can also call @code{setmode (fd,
-O_BINARY)}.
-
-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.
-
-Also note that @code{lseek} only works in binary mode.
-
-Explanation adapted from mailing list email by Earnie Boyd
-<earnie_boyd@@yahoo.com>.
-
-@subsection Is the Cygwin library multi-thread-safe?
-
-Multi-thread-safe support is turned on by default in 1.1.x releases
-(i.e., in the latest net release). That does not mean that it is bug
-free!
-
-There is also limited support for 'POSIX threads', see the file
-@code{cygwin.din} for the list of POSIX thread functions provided.
-
-@subsection Why is some functionality only supported in Windows NT?
-
-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.
-
-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.
-
-@subsection How is fork() implemented?
-
-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.
-
-Here's how it works:
-
-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 childs
-.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.
-
-@subsection How does wildcarding (globbing) work?
-
-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 @code{LS *.EXE} from DOS, it will do what you might
-expect.
-
-Beware: globbing uses @code{malloc}. If your application defines
-@code{malloc}, that will get used. This may do horrible things to you.
-
-@subsection How do symbolic links work?
-
-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.
-
-@subsection Why do some files, which are not executables have the 'x' type.
-
-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.
-
-It guesses that files ending in .exe and .bat are executable, as are
-ones which have a "#!" as their first characters.
-
-@subsection How secure is Cygwin in a multi-user environment?
-
-Cygwin is not secure in a multi-user environment. For
-example if you have a long running daemon such as "inetd"
-running as admin while ordinary users are logged in, or if
-you have a user logged in remotely while another user is logged
-into the console, one cygwin client can trick another into
-running code for it. In this way one user may gain the
-priveledge of another cygwin program running on the machine.
-This is because cygwin has shared state that is accessible by
-all processes.
-
-(Thanks to Tim Newsham (newsham@@lava.net) for this explanation).
-
-@subsection How do the net-related functions work?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-The network support in Cygwin is supposed to provide the Unix API, not
-the Winsock API.
-
-There are differences between the semantics of functions with the same
-name under the API.
-
-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.
-
-If you are porting an application which already uses Winsock, then
-using the net support in Cygwin is wrong.
-
-But you can still use native Winsock, and use Cygwin. The functions
-which cygwin.dll exports are called 'cygwin_<name>'. There
-are a load of defines which map the standard Unix names to the names
-exported by the dll -- check out include/netdb.h:
-
-@example
-..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..
-@end example
-
-The idea is that you'll get the Unix->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.
-
-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.
-
-As of the b19 release, this information may be slightly out of date.
-
-@subsection I don't want Unix sockets, how do I use normal Win32 winsock?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-To use the vanilla Win32 winsock, you just need to #define Win32_Winsock
-and #include "windows.h" at the top of your source file(s). You'll also
-want to add -lwsock32 to the compiler's command line so you link against
-libwsock32.a.
-
-@subsection What version numbers are associated with Cygwin?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-There is a cygwin.dll major version number that gets incremented
-every time we make a new Cygwin release available. This
-corresponds to the name of the release (e.g. beta 19's major
-number is "19"). There is also a cygwin.dll minor version number. If
-we release an update of the library for an existing release, the minor
-number would be incremented.
-
-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.
-
-Then there is a shared memory region compatibity 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 "B15.0" since the beta 15 release.
-
-@subsection Why isn't _timezone set correctly?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-Did you explicitly call tzset() before checking the value of _timezone?
-If not, you must do so.
-
-@subsection Is there a mouse interface?
-
-There is no way to capture mouse events from Cygwin. There are
-currently no plans to add support for this.
-
diff --git a/winsup/doc/how-programming.texinfo b/winsup/doc/how-programming.texinfo
deleted file mode 100644
index fb0145caf..000000000
--- a/winsup/doc/how-programming.texinfo
+++ /dev/null
@@ -1,578 +0,0 @@
-@section Programming Questions
-
-@subsection How do I contribute a package?
-
-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.
-
-There will be a separate web page where all the details are documented,
-but this is not prepared yet. Meanwhile, pore through the cygwin-apps
-mailing archives (start at @file{http://cygwin.com/lists.html}), and
-subscribe. Charles Wilson posted a short recipe of what's involved,
-using texinfo as an example,
-at @file{http://cygwin.com/ml/cygwin-apps/2000-11/msg00055.html}. This
-should give you an idea of what is required.
-
-You should announce your intentions to the general cygwin list, in case
-others were thinking the same thing.
-
-@subsection Why are compiled executables so huge?!?
-
-By default, gcc compiles in all symbols. You'll also find that gcc
-creates large executables on UNIX.
-
-If that bothers you, just use the 'strip' program, part of the binutils
-package. Or compile with the @samp{-s} option to gcc.
-
-@subsection Where is glibc?
-
-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.
-
-@subsection Why is make behaving badly?
-
-First of all, if you are using @samp{make -j[N]}, then stop. It doesn't
-work well.
-
-Otherwise, read on...
-
-Make has two operating modes, UNIX and WIN32. You need to make sure
-that you are operating in the right mode.
-
-In UNIX mode, make uses sh.exe as a subshell. The path list separator
-is ':', '\' is the escape character, POSIX paths are expected, and
-Cygwin mounts will be understood. Use this for Makefiles written for
-UNIX.
-
-In WIN32 mode, make uses the "native" command shell (cmd.exe or
-command.com), with all the restrictions that implies. The path list
-separator is ';', the path separator is '\', "copy" and "del" work, but
-the Cygwin mount table is not understood. Use this for nmake-style
-Makefiles.
-
-The default mode for the Net Release of make (the one installed by
-@code{setup.exe}) is UNIX. The default mode for commercial releases to
-Redhat (formerly Cygnus) customers is WIN32.
-
-You can override the default by setting the environment variable
-MAKE_MODE to "UNIX" (actually case is not significant) or "WIN32"
-(actually anything other than "UNIX"). You can also specify the options
---unix or --win32 on the make command line.
-
-@subsection Why the undefined reference to @samp{WinMain@@16}?
-
-Try adding an empty main() function to one of your sources.
-
-Or, perhaps you have @samp{-lm} too early in the link command line. It
-should be at the end:
-
-@example
- bash$ gcc hello.c -lm
- bash$ ./a.exe
- Hello World!
-@end example
-
-works, but
-
-@example
- 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
-@end example
-
-This is an artifact of libm.a being a symbolic link to libcygwin.a.
-
-@subsection How do I use Win32 API calls?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-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).
-
-For example, to use graphics functions (GDI) you must link
-with gdi32 like this:
-
-gcc -o foo.exe foo.o bar.o -lgdi32
-
-or (compiling and linking in one step):
-
-gcc -o foo.exe foo.c bar.c -lgdi32
-
-The following libraries are available for use in this way:
-
-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
-
-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.
-
-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.
-
-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.
-
-@subsection How do I compile a Win32 executable that doesn't use Cygwin?
-
-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.
-
-This is not to be confused with 'MinGW' (Minimalist GNU for Windows),
-which is a completely separate effort. That project's home page is
-@file{http://www.mingw.org/index.shtml}.
-
-@subsection Can I link with both MSVCRT*.DLL and cygwin1.dll?
-
-No, you must use one or the other, they are mutually exclusive.
-
-@subsection How do I make the console window go away?
-
-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 commandline.
-
-@subsection Why does make complain about a "missing separator"?
-
-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.
-
-@subsection Why can't we redistribute Microsoft's Win32 headers?
-
-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 Cygnus (err... Red Hat) can't agree to. Fortunately, we
-have our own Win32 headers which are pretty complete.
-
-@subsection How do I link against .lib files?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-1. 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.
-2. Build a dummy 'LibMain'.
-3. Build a .def with all the exports you need.
-4. Link with your .lib using link.exe.
-
-or
-
-1. Extract all the object files from the .lib using LIB.EXE.
-2. Build a dummy C file referencing all the functions you need, either
-with a direct call or through an initialized function pointer.
-3. Build a dummy LibMain.
-4. Link all the objects with this file+LibMain.
-5. Write a .def.
-6. Link.
-
-You can use these methods to use MSVC (and many other runtime libs)
-with Cygwin development tools.
-
-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...
-
-(thanks to Jacob Navia (root@@jacob.remcomp.fr) for this explanation)
-
-@subsection How do I rebuild the tools on my NT box?
-
-@strong{Note:} You must build in a directory @emph{outside} the source
-tree.
-
-Assuming that you have the src installed as /src, will build in
-the directory /obj, and want to install the tools in /install:
-
-@example
-bash
-cd /obj
-/src/configure --prefix=/install -v > configure.log 2>&1
-make > make.log 2>&1
-make install > install.log 2>&1
-@end example
-
-Normally, this will also attempt to build the documentation, which
-additionally requires db2html, texi2html and possibly others.
-These tools are not included in the Cygwin distribution, but are readily
-obtainable:
-
-@table @samp
-@item db2html
-Part of docbook, from @file{http://sources.redhat.com/docbook-tools/}.
-@item texi2html
-From @file{http://www.mathematik.uni-kl.de/~obachman/Texi2html/}.
-@end table
-
-To check a cygwin1.dll, run "make check" in the winsup/cygwin directory.
-If that works, install everything @emph{except} 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 @emph{all} the
-places where the old dll was (if there is more than one on your
-machine). Then start up a bash window and see what happens. (Or better,
-run a cygwin program from the Windows command prompt.)
-
-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.
-
-@subsection How can I compile a powerpc NT toolchain?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-Unfortunately, this will be difficult. It hasn't been built for
-some time (late 1996) since Microsoft has dropped development of
-powerpc NT. Exception handling/signals support semantics/args have been
-changed for x86 and not updated for ppc so the ppc specific support would
-have to be rewritten. We don't know of any other incompatibilities.
-Please send us patches if you do this work!
-
-@subsection How can I compile an Alpha NT toolchain?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-We have not ported the tools to Alpha NT and do not have plans to
-do so at the present time. We would be happy to add support
-for Alpha NT if someone contributes the changes to us.
-
-@subsection How can I adjust the heap/stack size of an application?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-Pass heap/stack linker arguments to gcc. To create foo.exe with
-a heap size of 1024 and a stack size of 4096, you would invoke
-gcc as:
-
-@code{gcc -Wl,--heap,1024,--stack,4096 -o foo foo.c}
-
-@subsection How can I find out which dlls are needed by an executable?
-
-@samp{objdump -p} provides this information, but is rather verbose.
-
-@samp{cygcheck} will do this much more concisely, and operates
-recursively, provided the command is in your path.
-
-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:
-
-@example
-cygcheck c:\\winnt\\system32\\cmd.exe
-@end example
-
-(Note the windows path separator must be escaped if this is typed in
-bash.)
-
-@subsection How do I build a DLL?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-There's documentation that explains the process on the main Cygwin
-project web page (http://cygwin.com/).
-
-@subsection How can I set a breakpoint at MainCRTStartup?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-Set a breakpoint at *0x401000 in gdb and then run the program in
-question.
-
-@subsection How can I build a relocatable dll?
-
-@strong{(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
-@file{http://cygwin.com/ml/cygwin/2000-06/msg00688.html} and
-related messages.)}
-
-You must execute the following sequence of five commands, in this
-order:
-
-@example
-$(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
-@end example
-
-In this example, $(LD) is the linker, ld.
-
-$(DLLTOOL) is dlltool.
-
-$(AS) is the assembler, as.
-
-DLLNAME is the name of the DLL you want to create, e.g., tcl80.dll.
-
-OBJS is the list of object files you want to put into the DLL.
-
-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.
-
-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.
-
-BASEFILE is a temporary file that is used during this five stage
-process, e.g., tcl.base.
-
-EXPFILE is another temporary file, e.g., tcl.exp.
-
-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)
-
-This means that the actual symbol name will have an appended @@12, so if
-your entry point really is named @samp{startup}, the string you should
-use for ENTRY in the above examples would be @samp{startup@@12}.
-
-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 @samp{_impure_ptr}, and then initializing it in the
-entry function. Be careful not to export the global variable
-@samp{_impure_ptr} from your DLL; that is, do not put it in DEFFILE.
-
-@example
-/* 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. */
-@}
-@end example
-
-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 <x> flag to ld,
-the -e entry must come after the subsystem flag, since the subsystem flag
-sets a different default entry point.
-
-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.
-
-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:
-
-$(DLLTOOL) --as=$(AS) --dllname DLLNAME --def DEFFILE --output-lib LIBFILE
-
-$(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.
-
-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.
-
-@subsection How can I debug what's going on?
-
-You can debug your application using @code{gdb}. 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).
-
-@subsection Can I use a system trace mechanism instead?
-
-Yes. You can use the @code{strace.exe} utility to run other cygwin
-programs with various debug and trace messages enabled. For information
-on using @code{strace}, see the Cygwin User's Guide or the file
-@code{winsup/utils/utils.sgml}.
-
-@subsection Why doesn't gdb handle signals?
-
-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.
-
-@subsection The linker complains that it can't find something.
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-A common error is to put the library on the command line before
-the thing that needs things from it.
-
-This is wrong @code{gcc -lstdc++ hello.cc}.
-This is right @code{gcc hello.cc -lstdc++}.
-
-@subsection I use a function I know is in the API, but I still get a link error.
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-The function probably isn't declared in the header files, or
-the UNICODE stuff for it isn't filled in.
-
-@subsection Can you make DLLs that are linked against libc ?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-Yes.
-
-@subsection Where is malloc.h?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-Include stdlib.h instead of malloc.h.
-
-@subsection Can I use my own malloc?
-
-If you define a function called @code{malloc} in your own code, and link
-with the DLL, the DLL @emph{will} call your @code{malloc}. Needless to
-say, you will run into serious problems if your malloc is buggy.
-
-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 @code{malloc} @emph{before} your main line is started.
-If you have written your own @code{malloc} to need some initialization
-to occur after @code{main} is called, then this will surely break.
-
-Moreover, there is an outstanding issue with @code{_malloc_r} in
-@code{newlib}. This re-entrant version of @code{malloc} will be called
-directly from within @code{newlib}, by-passing your custom version, and
-is probably incompatible with it. But it may not be possible to replace
-@code{_malloc_r} too, because @code{cygwin1.dll} 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.
-
-@subsection Can I mix objects compiled with msvc++ and gcc?
-
-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.
-
-@subsection Can I use the gdb debugger to debug programs built by VC++?
-
-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.
-
-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.
-
-@subsection Where can I find info on x86 assembly?
-
-CPU reference manuals for Intel's current chips are available in
-downloadable PDF form on Intel's web site:
-
-@file{http://developer.intel.com/design/pro/manuals/}
-
-@subsection Shell scripts aren't running properly from my makefiles?
-
-If your scripts are in the current directory, you must have @samp{.}
-(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.
-
-@subsection What preprocessor do I need to know about?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-We use _WIN32 to signify access to the Win32 API and __CYGWIN__ for
-access to the Cygwin environment provided by the dll.
-
-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++.
-
-@subsection Where can I get f77 and objc components for B20 EGCS 1.1?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-B20-compatible versions of the f77 and objc components are available
-from @file{http://www.xraylith.wisc.edu/~khan/software/gnu-win32/}.
-
-@subsection How should I port my Unix GUI to Windows?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-There are two basic strategies for porting Unix GUIs to Windows.
-
-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.
-
-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.
-
-@subsection Why not use DJGPP ?
-
-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.
-
-You can get more info on DJGPP by following
-@file{http://www.delorie.com/}.
diff --git a/winsup/doc/how-resources.texinfo b/winsup/doc/how-resources.texinfo
deleted file mode 100644
index 0b42e0fa9..000000000
--- a/winsup/doc/how-resources.texinfo
+++ /dev/null
@@ -1,115 +0,0 @@
-@section Where can I get more information?
-
-@subsection Where's the documentation?
-
-There are links to quite a lot of it on the main Cygwin project web
-page: @file{http://cygwin.com/}. Be sure to at least
-read any 'Release Notes' or 'Readme' or 'read this' links on the main
-web page, if there are any.
-
-There is a comprehensive Cygwin User's Guide at
-@file{http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html}
-and an API Reference at
-@file{http://cygwin.com/cygwin-api/cygwin-api.html}.
-
-There is an interesting paper about Cygwin from the 1998 USENIX Windows
-NT Workshop Proceedings at
-@file{http://cygwin.com/usenix-98/cygwin.html}.
-
-You can find documentation for the individual GNU tools at
-@file{http://www.fsf.org/manual/}. (You should read GNU manuals from a
-local mirror, check @file{http://www.fsf.org/server/list-mirrors.html}
-for a list of them.)
-
-@subsection What Cygwin mailing lists can I join?
-
-Comprehensive information about the Cygwin mailing lists can be found at
-@file{http://cygwin.com/lists.html}.
-
-To subscribe to the main list, send a message to
-cygwin-subscribe@@cygwin.com. To unsubscribe from the
-main list, send a message to cygwin-unsubscribe@@cygwin.com.
-In both cases, the subject and body of the message are ignored.
-
-Similarly, to subscribe to the Cygwin annoucements list, send a message
-to cygwin-announce-subscribe@@cygwin.com. To unsubscribe,
-send a message to cygwin-announce-unsubscribe@@cygwin.com.
-
-If you are going to help develop the Cygwin library by volunteering for
-the project, you will want to subscribe to the Cygwin developers list,
-called cygwin-developers. If you are contributing to Cygwin tools &
-applications, rather than the library itself, then you should subscribe
-to cygwin-apps. The same mechanism as described for the first two lists
-works for these as well. Both cygwin-developers and cygwin-apps are
-by-approval lists.
-
-There is a searchable archive of the main mailing list at
-@file{http://cygwin.com/ml/cygwin/}. There is an alternate
-archive, also searchable, at @file{http://www.delorie.com/archives/}.
-
-Cygwin mailing lists are not gatewayed to USENET, so anti-spam measures
-in your email address are neither required nor appreciated. Also, avoid
-sending HTML content to Cygwin mailing lists.
-
-@subsection Posting Guidelines (Or: Why won't you/the mailing list answer my questions?)
-
-If you follow these guidelines, you are much more likely to get a
-helpful response from the Cygwin developers and/or the Cygwin community at
-large:
-
-@itemize @bullet
-@item Read the User's Guide and the FAQ first.
-@item Check the mailing list archives. Your topic may have come up
-before. (It may even have been answered!) Use the search facilities
-at the links above. Try the alternate site if the main archive is not
-producing search results.
-@item Explain your problem carefully and completely. "I installed Blah
-and it doesn't work!" wastes everybody's time. It provides no
-information for anyone to help you with your problem. You should
-provide:
-
-@itemize @bullet
-@item A problem statement: How does it behave, how do you think it
-should behave, and what makes you think it's broken? (Oh yeah, and what
-is @emph{"it"}?)
-@item Information about your Windows OS ("Win95 OSR2" or "NT4/SP3" or
-"Win2K" or "Win98 SE" or ...).
-@item Details about your installation process, or attempts at same. (Internet or
-Directory install? If the former, exactly when and from what mirror?
-If the latter, which packages did you download? Which version of
-setup.exe? Any subsequent updates?)
-@item Details about your Cygwin setup, accomplished by @emph{pasting}
-the output of 'cygcheck -s -v -r' into your message. (Do not send the
-output as a file attachment.)
-@item A valid return address, so that a reply doesn't require manual editing of
-the 'To:' header.
-@end itemize
-
-@item Your message must be relevant to the list. Messages that are
-@emph{not} directly related to Cygwin are considered off-topic and are
-unwelcome. For example, the following are off-topic:
-
-@itemize @bullet
-@item General programming language questions
-@item General Windows programming questions
-@item General UNIX shell programming questions
-@item General application usage questions
-@item How to make millions by working at home
-@item Announcements from LaserJet toner cartridge suppliers
-@end itemize
-
-@end itemize
-
-If you do not follow the above guidelines, you may still elicit a
-response, but you may not appreciate it!
-
-Inquiries about support contracts and commercial licensing should go to
-info@@cygnus.com. If you want to purchase the Cygwin 1.0 CD-ROM, visit
-@file{http://www.cygnus.com/cygwin/} or write to
-cygwin-info@@cygnus.com. While not strictly @emph{unappreciated} in the
-main cygwin list, you'll get the information you need more quickly if
-you write to the correct address in the first place.
-
-Beyond that, perhaps nobody has time to answer your question. Perhaps
-nobody knows the answer.
-
diff --git a/winsup/doc/how-using.texinfo b/winsup/doc/how-using.texinfo
deleted file mode 100644
index d1077b837..000000000
--- a/winsup/doc/how-using.texinfo
+++ /dev/null
@@ -1,571 +0,0 @@
-@section Using Cygwin
-
-@subsection How should I set my PATH?
-
-If you look at the "Cygwin 1.1.0" (or similar) shortcut created in the
-"Cygnus Solutions" programs folder, you'll see that it runs
-@code{C:\cygwin\bin\cygwin.bat} (assuming your root is
-@code{C:\cygwin}). The contents should look something like this:
-
-@example
- @@echo off
- SET MAKE_MODE=unix
- SET PATH=C:\cygwin\bin;C:\cygwin\usr\local\bin;%PATH%
- bash
-@end example
-
-Effectively, this @strong{prepends} /usr/bin and /usr/local/bin to your
-Windows system path. If you choose to reset your PATH, say in
-$HOME/.bashrc, then you should follow this rule. You @strong{must} have
-@code{/usr/bin} in your PATH @strong{before} 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.
-
-If you haven't messed up the default mounts, then @code{/bin} and
-@code{/usr/bin} are the same location, so you only need one of them in
-your PATH. You should use @code{/usr/local/bin} for installing
-additional Cygwin applications that are not part of the core net
-release. (That is, anything not found in an ftp mirror of @code{latest}
-and installed by @code{setup.exe}.)
-
-@subsection Bash says "command not found", but it's right there!
-
-If you compile a program, you might find that you can't run it:
-
-@example
- bash$ gcc -o hello hello.c
- bash$ hello
- bash: hello: command not found
-@end example
-
-Unlike Windows, bash does not look for programs in @samp{.} (the current
-directory) by default. You can add @samp{.} 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:
-
-@example
- bash$ gcc -o hello hello.c
- bash$ ./hello
- Hello World!
-@end example
-
-@subsection How do I convert between Windows and UNIX paths?
-
-Use the 'cygpath' utility. Type '@code{cygpath}' with no arguments to
-get usage information. For example (on my installation):
-@example
- 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
-@end example
-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 recognised
-as such.
-
-@subsection Why doesn't bash read my .bashrc file on startup?
-
-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.
-
-@subsection How can I get bash filename completion to be case insensitive?
-
-"shopt -s nocaseglob" should do the trick.
-
-@subsection Can I use paths/filenames containing spaces in them?
-
-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.
-
-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:
-@example
- bash-2.03$ cd '/cygdrive/c/Program Files'
-@end example
-or
-@example
- bash-2.03$ cd /cygdrive/c/Program\ Files
-@end example
-
-@subsection Why can't I cd into a shortcut to a directory?
-
-Cygwin does not follow MS Windows Explorer Shortcuts (*.lnk files). It
-sees a shortcut as a regular file and this you cannot "cd" into it.
-
-Some people have suggested replacing the current symbolic link scheme
-with shortcuts. The major problem with this is that .LNK files would
-then be used to symlink Cygwin paths that may or may not be valid
-under native Win32 non-Cygwin applications such as Explorer.
-
-@subsection I'm having basic problems with find. Why?
-
-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.
-
-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 @samp{-follow} option. This behavior is different than most
-other UNIX implementations, but is not likely to change.
-
-@subsection Why doesn't man work?
-
-Even after installing the @samp{man} package, you get an error like this:
-
-@example
- bash-2.03$ man man
- Error executing formatting or display command.
- System command (cd /usr/man ; (echo -e ".pl 1100i"; cat /usr/man/man1/man.1; echo ".pl \n(nlu+10") | /usr/bin/tbl | /usr/bin/groff -Tascii -mandoc | less -is) exited with status 32512.
- No manual entry for man
-@end example
-
-You also need /bin/sh, which is found in the @samp{ash} package.
-Install this too.
-
-@subsection Why doesn't chmod work?
-
-@samp{ntsec} will allow UNIX permissions in Windows NT on NTFS file systems.
-
-@samp{ntea} works on NTFS @emph{and} FAT but it creates a huge,
-@strong{undeletable} file on FAT filesystems.
-
-(The @samp{ntsec} and @samp{ntea} settings are values for the
-@samp{CYGWIN} environment variable. See the Cygwin User's Guide at
-@file{http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html} for more
-information on this variable and its settings.)
-
-There is no solution at all for Windows 9x.
-
-If you have an application that requires a certain permission mode on a
-file, you may be able to work around this requirement by modifying the
-application's source code. For a hint, based on work done by Corinna
-Vinschen for OpenSSH, see this message from the cygwin mailing list:
-@file{http://cygwin.com/ml/cygwin/2000-11/msg01176.html}.
-
-@subsection Why doesn't @samp{mkdir -p} work on a network share?
-
-Unfortunately, you cannot do something like this:
-
-@example
-bash$ mkdir -p //MACHINE/Share/path/to/new/dir
-mkdir: cannot create directory `//MACHINE': No such file or directory
-@end example
-
-This is because mkdir checks for the existence of each directory on the
-path, creating them as necessary. Since @samp{//MACHINE} is not a
-directory (you can't cd to it either), mkdir tries to create it, and
-fails.
-
-This might get fixed someday, but for now, you have to work around it:
-
-@example
-bash$ cd //MACHINE/Share
-bash$ mkdir -p path/to/new/dir
-@end example
-
-@subsection Why doesn't my script work?
-
-There are two basic problems you might run into. One is the fact that
-/bin/sh is really ash, and is missing some features you might expect in
-/bin/sh. For example:
-
-@itemize bullet
-@item No job control
-@item No getopts
-@item No functions exported
-@end itemize
-
-Or it could be a permission problem, and Cygwin doesn't understand that
-your script is executable. Because @samp{chmod} 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
-
-@example
- #! /bin/sh
-@end example
-
-(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
-
-@example
- :
- # This is the 2nd line, assume processing by /bin/sh
-@end example
-
-also works.
-
-Note that you can use @samp{mount -x} 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.
-
-@subsection Why don't cursor keys work under Win95/Win98?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-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're 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:
-
-@example
-keyb ru,,C:\WINDOWS\COMMAND\keybrd3.sys
-@end example
-
-(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. exUSSR users are of course knowledgable 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).
-
-@subsection Is it OK to have multiple copies of the DLL?
-
-You should only have one copy of the Cygwin DLL on your system. If you
-have multiple versions, they will conflict and cause problems.
-
-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 @emph{all} Cygwin apps (including inetd)
-beforehand.
-
-If you're trying to find multiple versions of the DLL that are causing
-this problem, reboot first, in case DLL's 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).
-
-@subsection Where can I find "more"?
-
-If you are looking for the "more" pager, you should use the "less" pager
-instead.
-
-@subsection Where can I find "which"?
-
-There is no "which" command with Cygwin. However, you can use the bash
-shell builtin "type" which does something similar.
-
-@subsection Why isn't package XXXX available in Cygwin? (Or, why is your package so out of date?)
-
-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 below.
-
-@subsection How can I access other drives?
-
-You have some flexibility here.
-
-Cygwin has a builtin "cygdrive prefix" for drives that are not mounted.
-You can access any drive, say Z:, as '/cygdrive/z/'.
-
-In some applications (notably bash), you can use the familiar windows
-<drive>:/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:
-@example
- bash$ cd C:/Windows
- bash$ pwd
- /cygdrive/c/Windows
-@end example
-and
-@example
- bash$ cd C:/cygwin
- bash$ pwd
- /
-@end example
-for a default setup. You could also use backward-slashes in the
-Windows path, but these would have to be escaped from the shell.
-
-@strong{Warning:} 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
-behaviour of Cygwin apps will vary depending on the posix path used to
-get there.
-
-You can avoid the ambiguity of Windows paths, and avoid typing
-"/cygdrive", by explicitly mounting drives to posix paths. For example:
-@example
- bash$ mkdir /c
- bash$ mount c:/ /c
- bash$ ls /c
-@end example
-Then @samp{/cygdrive/c/Windows} becomes @samp{/c/Windows} which is a
-little less typing.
-
-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.
-
-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.
-
-You can change the default @samp{cygdrive} prefix and whether it is
-binmode or textmode using the @code{mount} command. For example,
-@example
- bash$ mount -b --change-cygdrive-prefix cygdrive
-@end example
-will change all @code{/cygdrive/...} mounts to binmode.
-
-@subsection How can I copy and paste into Cygwin console windows?
-
-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.
-
-Under Windows 9x, open the properties dialog of the console window.
-Select the Misc tab. Uncheck Fast Pasting. Check QuickEdit.
-
-@subsection What does "mount failed: Device or resource busy" mean?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-This usually means that you are trying to mount to a location
-already in use by mount. For example, if c: is mounted as '/'
-and you try to mount d: there as well, you will get this error
-message. First "umount" the old location, then "mount" the new one and
-you should have better luck.
-
-If you are trying to umount '/' and are getting this message, you may
-need to run @code{regedit.exe} and change the "native" key for the '/'
-mount in one of the mount points kept under
-HKEY_CURRENT_USER/Software/Cygnus Solutions/CYGWIN.DLL setup/<version>
-where <version> is the latest registry version associated with the
-Cygwin library.
-
-@subsection How can I share files between Unix and Windows?
-
-During development, we have both Unix boxes running Samba and
-NT/Windows 95/98 machines. We often build with cross-compilers
-under Unix 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.
-
-@subsection Are mixed-case filenames possible with Cygwin?
-
-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 @code{Makefile} and
-@code{makefile}. WIN32 can't tell the difference between files with
-just different case, so the configuration fails.
-
-In releases prior to beta 16, mount had a special mixed case option
-which renamed files in such a way as to allow mixed case filenames. We
-chose to remove the support when we rewrote the path handling code for
-beta 16. The standard Windows apps -- explorer.exe,
-cmd.exe/command.com, etc. -- do not distinguish filenames that differed
-only in case, resulting in some (very) undesirable behavior.
-
-Sergey Okhapkin had maintained a mixed-case patch ('coolview') until
-about B20.1, but this has not been updated to recent versions of Cygwin.
-
-@subsection What about DOS special filenames?
-
-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
-@code{aux.sh}. The perl configuration tries to make sure that
-@code{aux.sh} is there, but an operation on a file with the magic
-letters 'aux' in it will hang.
-
-@subsection When it hangs, how do I get it back?
-
-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.
-
-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.
-
-And, if all else fails, there's always the reset button/power switch.
-This should never be necessary under Windows NT.
-
-@subsection Why the weird directory structure?
-
-Why do /lib and /usr/lib (and /bin, /usr/bin) point to the same thing?
-
-Why use mounts instead of symbolic links?
-
-Can I use a disk root (e.g., C:\) as Cygwin root? Why is this discouraged?
-
-After a new installation in the default location, your mount points will
-look something like this:
-
-@example
-Device Directory Type Flags
-C:\cygwin\bin /usr/bin user binmode
-C:\cygwin\lib /usr/lib user binmode
-C:\cygwin / user binmode
-@end example
-
-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 @emph{really} know what you are doing.
-
-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.
-
-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.
-
-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. @emph{So don't do this!}
-
-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?)
-
-@subsection How do anti-virus programs like Cygwin?
-
-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.)
-
-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.
-
-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 @samp{@code{C:\cygwin\bin}}. Obviously, this could be
-exploited by a hostile non-Cygwin program, so do this at your own risk.
-
-@subsection Why can't I run bash as a shell under NT Emacs?
-
-The Windows port of GNU Emacs (aka "NT emacs") uses the Windows command
-shell by default. Also, since Emacs 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
-bash. This is particularly useful for the JDE package
-(@file{http://sunsite.dk/jde/}).
-
-@example
- ;; 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 process-coding-system-alist '(("bash" . undecided-unix)))
- (setq w32-quote-process-args ?\")
- (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)
-@end example
-
-@subsection info error "dir: No such file or directory"
-
-Cygwin packages install their info documentation in the /usr/info
-directory. But you need to create a @code{dir} file there before the
-standalone info program (probably @code{/usr/bin/info}) can be used to
-read those info files. This is how you do it:
-@example
- bash$ cd /usr/info
- bash$ for f in *.info ; do install-info $f dir ; done
-@end example
-This may generate warnings:
-@example
- install-info: warning: no info dir entry in `gzip.info'
- install-info: warning: no info dir entry in `time.info'
-@end example
-The @code{install-info} command cannot parse these files, so you will
-have to add their entries to @code{/usr/info/dir} by hand.
-
-@subsection Why do I get a message saying Out of Queue slots?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-"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).
-
-@subsection Why don't symlinks work on samba-mounted filesystems?
-
-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:
-
-@smallexample
- map system = yes
- create mask = 0775
-@end smallexample
-
-Note that the 0775 can be anything as long as the 0010 bit is set.
-
-@subsection Why does df report sizes incorrectly.
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-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?
-
diff --git a/winsup/doc/how.texinfo b/winsup/doc/how.texinfo
deleted file mode 100644
index 4c7385ba4..000000000
--- a/winsup/doc/how.texinfo
+++ /dev/null
@@ -1,6 +0,0 @@
-@chapter Question and Answers
-
-@include how-resources.texinfo
-@include how-using.texinfo
-@include how-api.texinfo
-@include how-programming.texinfo
diff --git a/winsup/doc/install.texinfo b/winsup/doc/install.texinfo
deleted file mode 100644
index 0edef9248..000000000
--- a/winsup/doc/install.texinfo
+++ /dev/null
@@ -1,268 +0,0 @@
-@chapter Installation Instructions
-@section Contents
-
-Unlike previous net releases such as B20.1 and earlier, there is no
-monolithic "full" or "usertools" installation. Rather, you can pick and
-choose the packages you wish to install, and update them individually.
-
-The following packages are available with the current release, in their
-respective directories:
-
-@table @samp
-
-@item latest
-ash autoconf bash binutils bison byacc bzip2 clear common crypt cygwin
-dejagnu diff expect fileutils findutils flex gawk gcc gdb gperf grep
-groff gzip inetutils less login m4 make man mt opengl openssh openssl
-patch regex sed shellutils tar tcltk termcap texinfo textutils time vim
-w32api
-
-@item contrib
-cvs gdbm gettext jbigkit jpeg libpng ncurses readline tiff xpm zlib
-
-@end table
-
-Full source code is available for all packages and tools.
-
-There is one recommended way to install Cygwin, which is to use the GUI
-installer @samp{setup.exe}. There are some variations on how you go
-about that.
-
-Do it any other way, and 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 elsewhere, then by all means report it to the
-mailing list.
-
-@section Installation using the @samp{setup.exe} program
-
-@strong{IMPORTANT: First read the README file in the @samp{latest}
-directory at any ftp mirror. DO THIS NOW! Information in the README
-file is not repeated here. You can find a mirror site near you from
-@file{http://cygwin.com/mirrors.html}.}
-
-The @samp{setup.exe} program is the recommended way to install Cygwin,
-but it is still a work in progress. Expect features and functionality
-to change. For this reason, it is a good idea to note the version and
-build time reported by @code{setup.exe} when you run it. This will help
-diagnose problems, should you have any. Check the cygwin mailing list
-for the latest news about @code{setup.exe}.
-
-@subsection Why not install in C:\?
-
-The @code{setup.exe} program will prompt you for a "root" directory.
-The default is @samp{C:\cygwin}, but you can change it. You are urged not to
-choose something like 'C:\' (the root directory on the system drive) for
-your Cygwin root. If you do, then critical Cygwin system directories
-like 'etc', 'lib' and 'bin' could easily be corrupted by other (non-Cygwin)
-applications or packages that use \etc, \lib or \bin. 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. (In the past, there had been
-genuine bugs that would cause problems for people who installed in C:\,
-but we believe those are gone now.)
-
-@subsection Can I use the new setup to update a B18, B19, B20, B20.1 or CD-ROM (1.0) installation of Cygwin?
-
-No, you must start from scratch with the new setup. The overall
-structure has changed so much that it would be silly to try to
-accomodate old installations of Cygwin. You'll probably be much better
-off with a whole new installation anyway. You may backup or rename your
-old installation first, or just install the new one somewhere else. Be
-sure to make note of your current mount table, because this will be
-overwritten during the new setup.
-
-Once you've installed the latest net release, the new setup will update
-just the individual packages that need it.
-
-@subsection The README says I should turn off anti-virus software. Isn't that dangerous?
-
-Only Network Associates (formerly McAfee) products have been reported to
-"hang" when extracting Cygwin tar archives. Other products have been
-reported to detect false positives in Cygwin files. Depending on how
-your anti-virus software is configured, it may then delete the file(s)
-without prompting you. Any problems will depend on the particular
-engine and/or signature file in use, and possibly other factors. If you
-don't mind @emph{this} risk, then just leave your anti-virus software
-running.
-
-Otherwise, you can download @code{setup.exe} and scan it. Then turn off
-the anti-virus software, then run setup to download and extract all the
-tar files. Then re-activate your anti-virus software and scan
-everything in C:\cygwin (or wherever you chose to install). This should
-be safe, as long as nobody substitutes a malicious @code{setup.exe}!
-
-@subsection What packages should I download?
-
-Just get everything, if you have room for it. But if you must be
-selective:
-
-@table @samp
-
-@item cygwin
-This is the minimum core, consisting of the cygwin1.dll and a few
-commands (like @code{mount}). Not much else, and no shell!
-
-@item bash
-This is the default interactive command shell for cygwin. If you don't
-install @samp{bash}, then the "Cygwin Bash Shell" shortcut that setup
-creates for you won't actually do anything.
-
-@item ash
-This is often forgotten because it's not obvious that @samp{ash}
-contains @code{/bin/sh}, which is essential for running scripts (and
-@samp{make} and ...).
-
-@end table
-
-If you want to build programs, of course you'll need @samp{gcc}, but
-you'll also need @samp{binutils}, probably @samp{make} and
-@samp{fileutils}, and possibly lots more. (Again, consider just getting
-everything!)
-
-@subsection What if setup fails?
-
-First, make sure that you are using the latest version of
-@code{setup.exe}. It's a work in progress, with improvements and
-bugfixes being made often. The latest version is always available from
-the 'Install Cygwin now' link on the Cygwin Home Page at
-@file{http://cygwin.com/}.
-
-If you are downloading from the internet, setup will fail if it cannot
-download the list of mirrors at
-@file{http://cygwin.com/mirrors.html}. It could be that
-the network is too busy. Similarly for an ftp download site that isn't
-working. Try another mirror, or try again later.
-
-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.
-
-If setup has otherwise behaved strangely, check the files
-@samp{setup.log} and @samp{setup.log.full} in the Cygwin root directory
-(@code{C:\cygwin} by default). It may provide some clues as to what
-went wrong and why.
-
-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.
-
-@subsection What's the difference between packages in @samp{latest} and @samp{contrib}?
-
-Good question! That very issue has been debated on the
-@samp{cygwin-apps} mailing list. Check the list archives if you want to
-know more. Start at @file{http://cygwin.com/lists.html}.
-
-But it really doesn't matter, and there is no distinction as far as
-@code{setup.exe} is concerned. By default, it will install all packages
-from both @code{latest} and @code{contrib} directories.
-
-@subsection My Windows logon name has a space in it, will this cause problems?
-
-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.
-
-In particular, the environment variables @samp{USER} and @samp{HOME} are
-set for you in /etc/profile. By default these derive from your Windows
-logon name. You may edit this file and set them explicitly to something
-without spaces.
-
-(If you use the @samp{login} package or anything else that reads
-/etc/passwd, you may need to make corresponding changes there. See the
-README file for that package.)
-
-@subsection Setup screwed up my mounts!
-
-Setup will remove the following mounts, should you have them:
-
-@example
- /
- /usr
- /usr/bin
- /usr/lib
- /var
- /lib
- /bin
- /etc
-@end example
-
-It will then restore (or create new) mounts for /, /usr/bin and /usr/lib
-as follows (assuming the default install root C:\cygwin):
-
-@example
- Device Directory
- C:\cygwin\bin /usr/bin
- C:\cygwin\lib /usr/lib
- C:\cygwin /
-@end example
-
-Since setup is not a Cygwin program, it cannot know about your mounts
-(or symlinks, for that matter), and so must impose and enforce this
-structure. You should not try to defeat it, unless you know what you
-are doing and can deal with the consequences.
-
-@subsection How do I uninstall Cygwin?
-
-Setup has no automatic uninstall facility. Just delete everything
-manually:
-
-@itemize @bullet
-@item Cygwin shortcuts on the Desktop and Start Menu
-
-@item The registry tree @samp{Software\Cygnus Solutions} under
-@code{HKEY_LOCAL_MACHINE} and/or @code{HKEY_CURRENT_USER}.
-
-@item Anything under the Cygwin root folder, @samp{C:\cygwin} by
-default.
-
-@item Anything created by setup in its temporary working directory.
-
-@end itemize
-
-It's up to you to deal with other changes you made to your system, such
-as installing the inetd service, altering system paths, etc. Setup
-would not have done any of these things for you.
-
-@subsection Can I use setup to install snapshots?
-
-Yes. If experimenting with developer snapshots from
-@file{http://cygwin.com/snapshots/}, you should generally install the
-full @code{cygwin-inst-YYYYMMDD.tar.bz2} update, rather than just the
-DLL, otherwise some components may be out of sync. However, Cygwin tar
-won't work because it will load the DLL that you're trying to update,
-and a non-Cygwin program like WinZip will put everything in the wrong
-place. The solution is to use @code{setup.exe}.
-
-Just bunzip2 the cygwin-inst tarball, rename it to cygwin-YYYYMMDD.tar,
-gzip it, put it in an empty directory, and run @code{setup.exe} there.
-You should be given the option to install it.
-
-The obvious warnings about updating the cygwin package and using developer
-snapshots apply:
-
-@enumerate
-
-@item Always download the latest version of setup from
-@file{http://cygwin.com/setup.exe}.
-
-@item Close all Cygwin apps, including shells and services
-(e.g. inetd), before running setup. You may have to restart Windows to
-clear the DLL from memory.
-
-@item Snapshots are risky. They have not been tested. Use them @strong{only} if
-there is a feature or bugfix that you need to try.
-
-@item If you cannot download a snapshot from the main ftp distribution
-site, use a mirror, and look in the @samp{snapshots} directory. You may
-have to hunt for one that has a copy of the latest snapshot. Start at
-@file{http://cygwin.com/mirrors.html}.
-
-@end enumerate
diff --git a/winsup/doc/legal.sgml b/winsup/doc/legal.sgml
deleted file mode 100644
index 721899c46..000000000
--- a/winsup/doc/legal.sgml
+++ /dev/null
@@ -1,32 +0,0 @@
-<LegalNotice id="legal">
-
-<Para>Copyright &copy; 1998,1999 Cygnus Solutions.</Para>
-
-<!--
-
-<Para>GNUPro&trade;, the GNUPro&trade; logo, and the Cygnus Solutions
-logo are trademarks of Cygnus Solutions. 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 Cygnus Solutions
-Technical Publications; to contact the Cygnus Solutions Technical
-Publications staff, email: <Email>doc@cygnus.com</Email>.</Para>
-
--->
-
-</LegalNotice>
diff --git a/winsup/doc/ntsec.sgml b/winsup/doc/ntsec.sgml
deleted file mode 100644
index 1741b8046..000000000
--- a/winsup/doc/ntsec.sgml
+++ /dev/null
@@ -1,663 +0,0 @@
-<sect1 id="ntsec"><title>NT security and the <literal>ntsec</literal> usage</title>
-
-<para>The design goal of the ntsec patch was to get a more UNIX like
-permission structure based upon the security features of Windows NT.
-To describe the changes, I will give a short overview of NT security
-in chapter one.</para>
-<para>Chapter two discusses the changes in ntsec related to privileges on
-processes.</para>
-<para>Chapter three shows the basics of UNIX like setting of
-file permissions.</para>
-<para>Chapter four talks about the advanced settings introduced in
-release 1.1</para>
-<para>Chapter five illustrates the permission mapping leak of Windows NT.</para>
-<para>Chapter six describes the new support of a setuid concept introduced
-with release 1.1.3.</para>
-
-<para>Chapter six describes in short the new acl API since release 1.1</para>
-
-<para>The setting of UNIX like object permissions is controlled by the new
-<EnVar>CYGWIN</EnVar> variable setting <literal>(no)ntsec</literal>.</para>
-
-<sect2 id="ntsec-common"><title>NT security</title>
-
-<para>The NT security allows a process to allow or deny access of
-different kind to `objects'. `Objects' are files, processes,
-threads, semaphores, etc.</para>
-
-<para>The main data structure of NT security is the `security descriptor'
-(SD) structure. It explains the permissions, that are granted (or denied)
-to an object and contains information, that is related to so called
-`security identifiers' (SID).</para>
-
-<para>A SID is a unique identifier for users, groups and domains.
-SIDs are comparable to UNIX UIDs and GIDs, but are more complicated
-because they are unique across networks. Example:</para>
-
-<para>SID of a system `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 above example shows the convention for printing SIDs. The leading
-`S' should show that it is a SID. The next number is a version number which
-is always 1. The next number is the so called `top-level authority' that
-identifies the source that issued the SID.</para>
-
-<para>While each system in a NT network has it's own SID, the situation
-is modified in NT domains: The SID of the domain controller is the
-base SID for each domain user. If an NT user has one account as domain
-user and another account on his local machine, this accounts are under
-any circumstances DIFFERENT, regardless of the usage of the same user
-name and password!</para>
-
-<para>SID of a domain `bar':</para>
-
-<screen>
- S-1-5-21-186985262-1144665072-740312968
-</screen>
-
-<para>SID of a user `johndoe' in the domain `bar':</para>
-
-<screen>
- S-1-5-21-186985262-1144665072-740312968-1207
-</screen>
-
-<para>The last part of the SID, the so called `relative identifier' (RID),
-is by default used as UID and/or GID under cygwin. As the name and the
-above example implies, this id is unique only relative to one system or
-domain.</para>
-
-<para>Note, that it's possible, that an user has the same RID on two
-different systems. The resulting SIDs are nevertheless different, so
-the SIDs are representing different users in an NT network.</para>
-
-<para>There is a big difference between UNIX IDs and NT SIDs, the existence of
-the so called `well known groups'. For example UNIX has no GID for the
-group of `all users'. NT has an SID for them, called `Everyone' in the
-English versions. The SIDs of well-known groups are not unique across
-an NT network but their meanings are unmistakable.
-Examples of well-known groups:</para>
-
-<screen>
-everyone S-1-1-0
-creator/owner S-1-3-0
-batch process (via `at') S-1-5-3
-authenticated users S-1-5-11
-system S-1-5-18
-</screen>
-
-<para>The last important group of SIDs are the `predefined groups'. This
-groups are used mainly on systems outside of domains to simplify the
-administration of user permissions. The corresponding SIDs are not unique
-across the network so they are interpreted only locally:</para>
-
-<screen>
-administrators S-1-5-32-544
-users S-1-5-32-545
-guests S-1-5-32-546
-...
-</screen>
-
-<para>Now, how are permissions given to objects? A process may assign an SD
-to the object. The SD of an object consists of three parts:</para>
-
-<itemizedlist spacing="compact">
-<listitem><para>the SID of the owner </para></listitem>
-<listitem><para>the SID of the group </para></listitem>
-<listitem><para>a list of SIDs with their permissions, called
-`access control list' (ACL) </para></listitem>
-</itemizedlist>
-
-<para>UNIX is able to create three different permissions, the permissions
-for the owner, for the group and for the world. In contrast the ACL
-has a potentially infinite number of members. Every member is a so called
-`access control element' (ACE). An ACE contains three parts:</para>
-
-<itemizedlist spacing="compact">
-<listitem><para>the type of the ACE </para></listitem>
-<listitem><para>permissions, described with a DWORD </para></listitem>
-<listitem><para>the SID, for which the above mentioned permissions are
-set </para></listitem>
-</itemizedlist>
-
-<para>The two important types of ACEs are the `access allowed ACE' and the
-`access denied ACE'. The ntsec patch only used `access allowed ACEs' up
-to Cygwin version 1.1.0. Later versions use `access denied ACEs' as well
-to reflect the UNIX permissions as good as possible.</para>
-
-<para>The possible permissions on objects are more detailed than in
-UNIX. For example, the permission to delete an object is different
-from the write permission.</para>
-
-<para>With the aforementioned method NT is able to grant or revoke permissions
-to objects in a far more specific way. But what about cygwin? In a POSIX
-environment it would be fine to have the security behavior of a POSIX
-system. The NT security model is MOSTLY able to reproduce the POSIX model.
-The ntsec patch tries to do this in cygwin.</para>
-
-<para>You ask "Mostly? Why mostly???" Because there's a leak in the NT model.
-I will describe that in detail in chapter 4.</para>
-
-<para>Creating explicit object security is not that easy so you will often
-see only two simple variations in use:</para>
-
-<itemizedlist spacing="compact">
-<listitem><para>default permissions, computed by the operating system </para></listitem>
-<listitem><para>each permission to everyone </para></listitem>
-</itemizedlist>
-
-<para>For parameters to functions that create or open securable objects another
-data structure is used, the `security attributes' (SA). This structure
-contains an SD and a flag that specifies whether the returned handle
-to the object is inherited to child processes or not.
-This property is not important for the ntsec patch description so in
-this document the difference between SDs and SAs is ignored.</para>
-
-</sect2>
-
-<sect2 id="ntsec-processes"><title>Process privileges</title>
-
-<para>Any process started under control of cygwin has a semaphore attached
-to it, that is used for signaling purposes. The creation of this semaphore
-can be found in sigproc.cc, function `getsem'. The first parameter to the
-function call `CreateSemaphore' is an SA. Without ntsec patch this SA
-assigns default security to the semaphore. There is a simple disadvantage:
-Only the owner of the process may send signals to it. Or, in other words,
-if the owner of the process is not a member of the administrators' group,
-no administrator may kill the process! This is especially annoying, if
-processes are started via service manager.</para>
-
-<para>The ntsec patch now assigns an SA to the process control semaphore, that
-has each permission set for the user of the process, for the
-administrators' group and for `system', which is a synonym for the
-operating system itself. The creation of this SA is done by the function
-`sec_user', that can be found in `shared.cc'. Each member of the
-administrators' group is now allowed to send signals to any process
-created in cygwin, regardless of the process owner.</para>
-
-<para>Moreover, each process now has the appropriate security settings, when
-it is started via `CreateProcess'. You will find this in function
-`spawn_guts' in module `spawn.cc'. The security settings for starting a
-process in another user context have to add the sid of the new user, too.
-In the case of the `CreateProcessAsUser' call, sec_user creates an SA with
-an additional entry for the sid of the new user.</para>
-
-</sect2>
-
-<sect2 id="ntsec-files"><title>File permissions</title>
-
-<para>If ntsec is turned on, file permissions are set as in UNIX. An SD is
-assigned to the file containing the owner and group and ACEs for the
-owner, the group and `Everyone'.</para>
-
-<para>The complete settings of UNIX like permissions can be found in the file
-`security.cc'. The two functions `get_nt_attribute' and `set_nt_attribute'
-are the main code. The reading and writing of the SDs is done by the
-functions `read_sd' and `write_sd'. `write_sd' uses the function `BackupRead'
-instead of the simpler function `SetFileSecurity' because the latter is
-unable to set owners different from the caller.</para>
-
-<para>If you are creating a file `foo' outside of cygwin, you will see something
-like the following on <command>ls -ln</command>:</para>
-
-<para>If your login is member of the administrators' group:</para>
-<screen>
- rwxrwxrwx 1 544 513 ... foo
-</screen>
-<para>if not:</para>
-<screen>
- rwxrwxrwx 1 1000 513 ... foo
-</screen>
-
-<para>Note the user and group IDs. 544 is the UID of the administrators' group.
-This is a `feature' <literal>:-P</literal> of WinNT. If one is a member of
-the administrators' group, every file, that he has created is owned by the
-administrators' group, instead by him.</para>
-
-<para>The second example shows the UID of the first user, that has been
-created with NT's the user administration tool. The users and groups are
-sequentially numbered, starting with 1000. Users and groups are using the
-same numbering scheme, so a user and a group don't share the same ID.</para>
-
-<para>In both examples the GID 513 is of special interest. This GID is a
-well known group with different naming in local systems and domains.
-Outside of domains the group is named 'None' (`Kein' in German, `Aucun'
-in French, etc.), in domains it is named 'Domain Users'. Unfortunately,
-the group `None' is never shown in the user admin tool outside of domains!
-This is very confusing but it seems that this has no negativ influences.</para>
-
-<para>To work correctly the ntsec patch depends on reasoned files
-<filename>/etc/passwd/</filename> and <filename>/etc/group</filename>.
-In cygwin release 1.0 the names and the IDs must correspond to the
-appropriate NT IDs! The IDs used in cygwin are the RID of the NT SID, as
-mentioned earlier.
-An SID of e.g. the user `corinna' on my NT workstation:</para>
-
-<screen>
- S-1-5-21-165875785-1005667432-441284377-1000
-</screen>
-
-<para>Note the last number: It's the RID 1000, the cygwin's UID.</para>
-
-<para>Unfortunately, workstations and servers outside of domains are not
-able to set primary groups! In these cases, where there is no correlation
-of users to primary groups, NT returns 513 (None) as primary group,
-regardless of the membership to existing local groups.</para>
-
-<para>when using <command>mkpasswd -l -g</command> on such systems, you
-have to change the primary group by hand if `None' as primary group is
-not what you want (and I'm sure, it's not what you want!)</para>
-
-<para>To get help in creating correct passwd and group files, look at
-the following examples, that are part of my files. With the exception
-of my personal user entry, all entries are well known entries. For a
-better understanding, the names are translated to the equivalents of the
-English NT version.</para>
-<example>
-<title>/etc/passwd</title>
-<screen>
-everyone:*:0:0:::
-system:*:18:18:::
-administrator::500:544::/home/root:/bin/bash
-guest:*:501:546:::
-administrators:*:544:544::/home/root:
-corinna::1000:547:Corinna Vinschen:/home/corinna:/bin/tcsh
-</screen>
-</example>
-
-<example>
-<title>/etc/group</title>
-<screen>
-everyone::0:
-system::18:
-none::513:
-administrators::544:
-users::545:
-guests::546:
-powerusers::547:
-</screen>
-</example>
-
-<para>Groups may be mentioned in the passwd file, too. This has two
-advantages:</para>
-<itemizedlist spacing="compact">
-<listitem><para>Because NT assigns them to files as owners, a
-<command>ls -l</command> is often better readable.</para></listitem>
-<listitem><para>Moreover it's possible to assigned them to files as
-owners with cygwin's <command>chown</command>.</para></listitem>
-</itemizedlist>
-
-<para>The group `system' is the aforementioned synonym for the operating system
-itself and is normally the owner of processes, that are started through
-service manager. The same is true for files, that are created by
-processes, which are started through service manager.</para>
-
-</sect2>
-
-<sect2 id="ntsec-release1.1"><title>New since Cygwin release 1.1</title>
-
-<para>In Cygwin release 1.1 a new technique of using the
-<filename>/etc/passwd</filename> and <filename>/etc/group</filename>
- is introduced.</para>
-
-<para>Both files may now contain SIDs of users and groups. They
-are saved in the last field of pw_gecos in <filename>/etc/passwd</filename>
-and in the gr_passwd field in <filename>/etc/group</filename>.</para>
-
-<para>This has the following advantages:</para>
-<itemizedlist spacing="compact">
-<listitem><para>ntsec works better in domain environments.</para></listitem>
-<listitem><para>Accounts (users and groups) may get another name in
-cygwin than their NT account name. The name in <filename>/etc/passwd</filename>
-or <filename>/etc/group</filename> is transparently used by cygwin
-applications (eg. <command>chown</command>, <command>chmod</command>,
-<command>ls</command>):</para>
-
-<screen>
-root::500:513::/home/root:/bin/sh
-</screen>
-
-<para>instead of</para>
-
-<screen>
-adminstrator::500:513::/home/root:/bin/sh
-</screen>
-
-<para>Caution: If you like to use the account as login account via
-<command>telnet</command> etc. you have to remain the name unchanged or
-you have to use the special version of <command>login</command> which is
-part of the standard Cygwin distribution since 1.1.</para></listitem>
-<listitem><para>Cygwin UIDs and GIDs are now not necessarily the RID
-part of the NT SID:</para>
-
-<screen>
-root::0:513:S-1-5-21-54355234-56236534-345635656-500:/home/root:/bin/sh
-</screen>
-
-<para>instead of</para>
-
-<screen>
-root::500:513::/home/root:/bin/sh
-</screen>
-
-</listitem>
-<listitem><para>As in U*X systems UIDs and GIDs numbering scheme now
-don't influence each other. So it's possible to have same Id's for a
-user and a group:</para>
-<example>
-<title>/etc/passwd:</title>
-<screen>
-root::0:0:S-1-5-21-54355234-56236534-345635656-500:/home/root:/bin/sh
-</screen>
-</example>
-
-<example>
-<title>/etc/group:</title>
-<screen>
-root:S-1-5-32-544:0:
-</screen>
-</example>
-</listitem>
-</itemizedlist>
-
-<para>The tools <command>mkpasswd</command> and <command>mkgroup</command>
-create the needed entries by default. If you don't want that you can use
-the options <literal>-s</literal> or <literal>--no-sids</literal>. In this
-case ntsec behaves like the previous version.</para>
-
-<para>Please note that the pw_gecos field in <filename>/etc/passwd</filename>
-is defined as a comma seperated list. The SID has to be the last field!</para>
-
-<para>As aforementioned you are able to use cygwin account names different
-from the NT account names. If you want to login thru `telnet' or something
-else you have to use the special <command>login</command>. You may then
-add another field to pw_gecos which contains the NT user name including
-it's domain. So you are able to login as each domain user. The syntax
-is easy: Just add an entry of the form U-ntdomain\ntusername to the pw_gecos
-field. Note that the SID must still remain the last field in pw_gecos!</para>
-
-<screen>
-the_king::1:1:Elvis Presley,U-STILLHERE\elvis,S-1-5-21-1234-5678-9012-1000:/bin/sh
-</screen>
-
-<para>For a local user just drop the domain:</para>
-
-<screen>
-the_king::1:1:Elvis Presley,U-elvis,S-1-5-21-1234-5678-9012-1000:/bin/sh
-</screen>
-
-<para>In each case the password of the user is taken from the NT user
-database, NOT from the passwd file!</para>
-
-</sect2>
-
-<sect2 id="ntsec-mapping"><title>The mapping leak</title>
-
-<para>Now its time to point out the leak in the NT permissions.
-The official documentation explains in short the following:</para>
-<itemizedlist spacing="compact">
-<listitem><para>access allow ACEs are accumulated regarding to the
-group membership of the caller.</para></listitem>
-<listitem><para>The order of ACEs is important. The system reads them
-in sequence until either any needed right is denied or all needed rights
-are granted. Later ACEs are then not taken into account.</para></listitem>
-<listitem><para>All access denied ACEs _should_ precede any
-access allowed ACE.</para></listitem>
-</itemizedlist>
-
-<para>Note that the last rule is a preference, not a law. NT will correctly
-deal with the ACL regardless of the sequence order. The second rule is
-not modified to get the ACEs in the prefered order.</para>
-
-<para>Unfortunately the security tab of the NT4 explorer is completely
-unable to deal with access denied ACEs while the explorer of W2K rearranges
-the order of the ACEs before you can read them. Thank God, the sort order
-remains unchanged if one presses the Cancel button.</para>
-
-<para>You still ask "Where is the leak?" NT ACLs are unable to reflect each
-possible combination of POSIX permissions. Example:</para>
-
-<screen>
-rw-r-xrw-
-</screen>
-
-<para>1st try:</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>2st 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>3rd 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, too. How should this problem be solved? According to
-the official rules 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 for both, NT4 and W2K. Only the GUIs aren't
-able to deal with that order.</para>
-
-</sect2>
-
-<sect2 id="ntsec-aclfuncs"><title>New acl API</title>
-
-<para>For dealing with ACLs Cygwin now has the acl API as it's
-implemented in newer versions of Solaris. The new data structure
-for a single ACL entry (ACE in NT terminology) is defined in
-<filename>sys/acl.h</filename> as:</para>
-
-<screen>
-typedef struct acl {
- int a_type; /* entry type */
- uid_t a_id; /* UID | GID */
- mode_t a_perm; /* permissions */
-} aclent_t;
-</screen>
-
-<para>The a_perm member of the aclent_t type contains only the bits
-for read, write and execute as in the file mode. If eg. read permission
-is granted, all read bits (S_IRUSR, S_IRGRP, S_IROTH) are set.
-CLASS_OBJ or MASK ACL entries are not fully implemented yet.</para>
-
-<para>The new API calls are</para>
-
-<screen>
-acl(2), facl(2)
-aclcheck(3),
-aclsort(3),
-acltomode(3), aclfrommode(3),
-acltopbits(3), aclfrompbits(3),
-acltotext(3), aclfromtext(3)
-</screen>
-
-<para>Like in Solaris, Cygwin has two new commands for working with
-ACLs on the command line: <command>getfacl</command> and
-<command>setfacl</command>.</para>
-
-<para>Online man pages for the aforementioned commands and API calls
-can be found on eg. http://docs.sun.com</para>
-
-</sect2>
-
-<sect2 id="ntsec-setuid"><title>New setuid concept</title>
-
-<para>UNIX applications which have to switch the user context are using
-the <command>setuid</command> and <command>seteuid</command> calls which
-are not part of the Windows API.
-Nevertheless these calls are supported under Windows NT/W2K since Cygwin
-release 1.1.3. Because of the nature of NT security an application which
-needs the ability has to be patched, though.</para>
-
-<para>NT uses so called `access tokens' to identify a user and it's
-permissions. To switch the user context the application has to request
-such an `access token'. This is typically done by calling the NT API
-function <command>LogonUser</command>. The access token is returned and
-either used in <command>ImpersonateLoggedOnUser</command> to change user
-context of the current process or in <command>CreateProcessAsUser</command>
-to change user context of a spawned child process. An important restriction
-is that the application using <command>LogonUser</command> must have special
-permissions:</para>
-
-<screen>
-"Act as part of the operating system"
-"Replace process level token"
-"Increase quotas"
-</screen>
-
-<para>Note that administrators do not have all that user rights set by default.</para>
-
-<para>Two new Cygwin calls are introduced to support porting
-<command>setuid</command> applications with a minimum of effort. You only
-have to care to give Cygwin the right access token and then you can call
-<command>seteuid</command> or <command>setuid</command> as usual in POSIX
-applications. The call to <command>sexec</command> is not needed
-anymore. Porting a <command>setuid</command> application is illustrated by
-a short example:</para>
-
-<screen>
-
-/* First include all needed cygwin stuff. */
-#ifdef __CYGWIN__
-#include &lt;windows.h&gt;
-#include &lt;sys/cygwin.h&gt;
-/* Use the following define to determine the Windows version */
-#define is_winnt (GetVersion() < 0x80000000)
-#endif
-
-[...]
-
- struct passwd *user_pwd_entry = getpwnam (username);
- char *cleartext_password = getpass ("Password:");
-
-[...]
-
-#ifdef __CYGWIN__
- /* Patch the typical password test. */
- if (is_winnt)
- {
- HANDLE token;
-
- /* Try to get the access token from NT. */
- token = cygwin_logon_user (user_pwd_entry, cleartext_password);
- if (token == INVALID_HANDLE_VALUE)
- error_exit;
- /* Inform Cygwin about the new impersonation token.
- Cygwin is able now, to switch to that user context by
- setuid or seteuid calls. */
- cygwin_set_impersonation_token (token);
- }
- else
-#endif /* CYGWIN */
- /* Use standard method for W9X as well. */
- hashed_password = crypt (cleartext_password, salt);
- if (!user_pwd_entry ||
- strcmp (hashed_password, user_pwd_entry-&gt;pw_password))
- error_exit;
-
-[...]
-
- /* Everything else remains the same! */
-
- setegid (user_pwd_entry-&gt;pw_gid);
- seteuid (user_pwd_entry-&gt;pw_uid);
- execl ("/bin/sh", ...);
-
-</screen>
-
-<para>The new Cygwin call to retrive an access token is defined as follows:</para>
-
-<screen>
-#include &lt;windows.h&gt;
-#include &lt;sys/cygwin.h&gt;
-
-HANDLE
-cygwin_logon_user (struct passwd *pw, const char *cleartext_password)
-</screen>
-
-<para>You can call that function as often as you want for different user
-logons and remeber the access tokens for further calls to the second function.</para>
-
-<screen>
-#include &lt;windows.h&gt;
-#include &lt;sys/cygwin.h&gt;
-
-void
-cygwin_set_impersonation_token (HANDLE hToken);
-</screen>
-
-<para> is the call to inform Cygwin about the user context to which further
-calls to <command>setuid</command>/<command>seteuid</command> should switch to.
-While you need always the correct access token to do a
-<command>setuid</command>/<command>seteuid</command> to another users context,
-you are always able to use <command>setuid</command>/<command>seteuid</command>
-to return to your own user context by giving your own uid as parameter.</para>
-
-<para>If you have remembered several access tokens from calls to
-<command>cygwin_logon_user</command> you can switch to different user
-contexts by observing the following order:</para>
-
-<screen>
-
- cygwin_set_impersonation_token (user1_token);
- seteuid (user1_uid);
-
-[...]
-
- seteuid (own_uid);
- cygwin_set_impersonation_token (user2_token);
- seteuid (user2_uid);
-
-[...]
-
- seteuid (own_uid);
- cygwin_set_impersonation_token (user1_token);
- seteuid (user1_uid);
-
-etc.
-
-</screen>
-
-</sect2>
-
-</sect1>
diff --git a/winsup/doc/overview.sgml b/winsup/doc/overview.sgml
deleted file mode 100644
index 4b48094aa..000000000
--- a/winsup/doc/overview.sgml
+++ /dev/null
@@ -1,87 +0,0 @@
-<chapter id="overview"><title>Cygwin Overview</title>
-
-<sect1 id="what-is-it"><title>What is it?</title>
-
-<para>The Cygwin tools are ports of the popular GNU development
-tools and utilities for Windows NT and 9x. They function through the
-use of the Cygwin library which provides the UNIX system calls and
-environment that these programs require.</para>
-
-<para>With the tools installed, 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 distributions). Even if the
-compiler tools are of little to no use to you, you may have
-interest in the many standard UNIX utilities. They can be used both
-from the bash shell (provided) or from the command.com.</para>
-
-</sect1>
-
-<sect1 id="are-free"><title>Are the Cygwin tools free software?</title>
-
-<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 more more information on
-how the GNU General Public License 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 contact sales@cygnus.com. 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 cygwin@sourceware.cygnus.com.</para>
-
-</sect1>
-
-<sect1 id="brief-history"><title>A brief history of the Cygwin project</title>
-
-<para>The first thing done was to enhance the development tools (gcc,
-gdb, gas, et al) so that they could generate/interpret Win32 native
-object files.</para>
-
-<para>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 (fork, spawn, signals, select, sockets,
-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.</para>
-
-</sect1>
-
-DOCTOOL-INSERT-ov-ex-unix
-DOCTOOL-INSERT-ov-ex-win
-<sect1 id="highlights"><title>Highlights of Cygwin Functionality</title>
-DOCTOOL-INSERT-ov-hi-intro
-DOCTOOL-INSERT-ov-hi-win9xnt
-DOCTOOL-INSERT-ov-hi-perm
-DOCTOOL-INSERT-ov-hi-files
-DOCTOOL-INSERT-ov-hi-textvsbinary
-DOCTOOL-INSERT-ov-hi-ansiclib
-DOCTOOL-INSERT-ov-hi-process
-DOCTOOL-INSERT-ov-hi-signals
-DOCTOOL-INSERT-ov-hi-sockets
-DOCTOOL-INSERT-ov-hi-select
-</sect1>
-</chapter>
diff --git a/winsup/doc/overview2.sgml b/winsup/doc/overview2.sgml
deleted file mode 100644
index 4c8595dd5..000000000
--- a/winsup/doc/overview2.sgml
+++ /dev/null
@@ -1,323 +0,0 @@
-<sect1 id="ov-ex-unix"><title>Expectations for UNIX Programmers</title>
-
-<para>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 or 9x will find that the Cygwin library provides
-an easy way to port many UNIX packages, with only minimal source code
-changes.</para>
-</sect1>
-
-<sect1 id="ov-ex-win"><title>Expectations for Windows Programmers</title>
-<para>Developers coming from a Windows background will find a set of tools capable
-of writing console or GUI executables that rely on the Microsoft Win32 API.
-The linker and dlltool utility may be used to write Windows Dynamically Linked
-Libraries (DLLs). The resource compiler "windres" is also provided with the
-native Windows GNUPro tools. All tools may be used from the Microsoft command
-line prompt, with full support for normal Windows pathnames.</para>
-</sect1>
-
-<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 that other processes using separate instances
-of the DLL can access. This is used to keep track of open file descriptors and
-assist fork and exec, among other purposes. In addition to the shared memory
-regions, 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 using the Win32 API, which allows it to run on all
-Win32 hosts. 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>Early on in the development process, we made the important design
-decision that it would not be necessary to strictly adhere to existing UNIX
-standards like POSIX.1 if it was not possible or if it would significantly
-diminish the usability of the tools on the Win32 platform. In many cases, an
-environment variable can be set to override the default behavior and force
-standards compliance.</para>
-</sect2>
-
-<sect2 id="ov-hi-win9xnt"><title>Supporting both Windows NT and 9x</title>
-<para>While Windows 95 and Windows 98 are similar enough to each other that we
-can safely ignore the distinction when implementing Cygwin, Windows NT is an
-extremely different operating system. For this reason, whenever the DLL is
-loaded, the library checks which operating system is active so that it can act
-accordingly.</para>
-
-<para>In some cases, the Win32 API is only different for
-historical reasons. In this situation, the same basic functionality is
-available under Windows 9x and NT but the method used to gain this
-functionality differs. A trivial example: in our implementation of
-uname, the library examines the sysinfo.dwProcessorType structure
-member to figure out the processor type under Windows 9x. This field
-is not supported in NT, which has its own operating system-specific
-structure member called sysinfo.wProcessorLevel.</para>
-
-<para>Other differences between NT and 9x are much more fundamental in
-nature. The best example is that only NT provides a security model.</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 the
-more standard, older UNIX model by default. Cygwin version 1.1 introduces
-support for ACLs according to the system calls used on newer versions of
-Solaris. This ability is used when the `ntsec' feature is switched on which
-is described in another chapter.
-The chmod call maps UNIX-style permissions
-back to the Win32 equivalents. Because many programs expect to be able to find
-the /etc/passwd and /etc/group files, we provide utilities that can be used to
-construct them from the user and group information provided by the operating
-system.</para>
-
-<para>Under Windows NT, the administrator is permitted to chown files. There
-is no mechanism to support the setuid concept or API call since Cygwin version
-1.1.2. With version 1.1.3 Cygwin introduces a mechanism for setting real
-and effective UIDs under Windows NT/W2K. This is described in the ntsec
-section.</para>
-
-<para>Under Windows 9x, the situation is considerably different. Since a
-security model is not provided, Cygwin fakes file ownership by making all
-files look like they are owned by a default user and group id. As under NT,
-file permissions can still be determined by examining their read/write/execute
-status. Rather than return an unimplemented error, under Windows 9x, the
-chown call succeeds immediately without actually performing any action
-whatsoever. This is appropriate since essentially all users jointly own the
-files when no concept of file ownership exists.</para>
-
-<para>It is important that we discuss the implications of our "kernel" using
-shared memory areas to store information about Cygwin processes. Because
-these areas are not yet protected in any way, in principle a malicious user
-could modify them to cause unexpected behavior in Cygwin processes. While
-this is not a new problem under Windows 9x (because of the lack of operating
-system security), it does constitute a security hole under Windows NT.
-This is because one user could affect the Cygwin programs run by
-another user by changing the shared memory information in ways that
-they could not in a more typical WinNT program. For this reason, it
-is not appropriate to use Cygwin in high-security applications. In
-practice, this will not be a major problem for most uses of the
-library.</para>
-</sect2>
-
-<sect2 id="ov-hi-files"><title>File Access</title> <para>Cygwin supports
-both Win32- and POSIX-style paths, using either forward or back slashes as the
-directory delimiter. Paths coming into the DLL are translated from Win32 to
-POSIX as needed. As a result, the library believes that the file system is a
-POSIX-compliant one, translating paths back to Win32 paths whenever it calls a
-Win32 API function. UNC pathnames (starting with two slashes) are
-supported.</para>
-
-<para>The layout of this POSIX view of the Windows file system space is stored
-in the Windows registry. While the slash ('/') directory points to the system
-partition by default, this is easy to change with the Cygwin mount utility.
-In addition to selecting the slash partition, it allows mounting arbitrary
-Win32 paths into the POSIX file system space. Many people use the utility to
-mount each drive letter under the slash partition (e.g. C:\ to /c, D:\ to /d,
-etc...).</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 cygpath
-utility program that we provide with Cygwin.</para>
-
-<para>Win32 file systems are case preserving but case insensitive. Cygwin
-does not currently support case distinction because, in practice, few UNIX
-programs actually rely on it. While we could mangle file names to support case
-distinction, this would add unnecessary overhead to the library and make it
-more difficult for non-Cygwin applications to access those files.</para>
-
-<para>Symbolic links are emulated by files containing a magic cookie followed
-by the path to which the link points. They are marked with the System
-attribute so that only files with that attribute have to be read to determine
-whether or not the file is a symbolic link. Hard links are fully supported
-under Windows NT on NTFS file systems. On a FAT file system, the call falls
-back to simply copying the file, a strategy that works in many cases.</para>
-
-<para>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
-d_ino of the dirent 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>Chroot is supported since release 1.1.3. Note that chroot isn't
-supported native by Windows. This implies some restrictions. First of all,
-the chroot 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 that 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) and CIFS paths (//server/share or \\server\share) as well.</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 Cygnus
-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. The
-control-z character is interpreted as a valid end-of-file character for a
-similar reason.</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
-Cygnus' 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.</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 fork 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 simply
-call the functions by the same name in Winsock, Microsoft's
-implementation of Berkeley sockets. Only a few changes were needed to
-match the expected UNIX semantics - one of the most troublesome
-differences was that Winsock must be initialized before the first
-socket function is called. As a result, Cygwin has to perform this
-initialization when appropriate. In order to support sockets across
-fork calls, child processes initialize Winsock if any inherited file
-descriptor is a socket.</para>
-
-<para>Unfortunately, implicitly loading DLLs
-at process startup is usually a slow affair. Because many processes
-do not use sockets, Cygwin explicitly loads the Winsock DLL the
-first time it calls the Winsock initialization routine. This single
-change sped up GNU configure times by thirty
-percent.</para>
-</sect2>
-
-<sect2 id="ov-hi-select"><title>Select</title>
-<para>The UNIX select 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>
diff --git a/winsup/doc/pathnames.sgml b/winsup/doc/pathnames.sgml
deleted file mode 100644
index c2979300a..000000000
--- a/winsup/doc/pathnames.sgml
+++ /dev/null
@@ -1,322 +0,0 @@
-<sect1 id="using-pathnames"><title>Mapping path names</title>
-
-<sect2><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 between Win32 and POSIX paths as
-necessary.</para>
-
-</sect2>
-
-<sect2 id="mount-table"><title>The Cygwin Mount Table</title>
-
-<para>The <command>mount</command> utility program is used to
-to map Win32 drives and network shares into Cygwin's internal POSIX
-directory tree. This is a similar concept to the typical UNIX mount
-program. For those people coming from a Windows background, the
-<command>mount</command> utility is very similar to the old DOS
-<command>join</command>, in that it makes your drive letters appear as
-subdirectories somewhere else.</para>
-
-<para>The mapping is stored in the current user's Cygwin
-<FirstTerm>mount table</FirstTerm> in the Windows registry so that the
-information will be retrieved next time the user logs in. Because it
-is sometimes desirable to have system-wide as well as user-specific
-mounts, there is also a system-wide mount table that all Cygwin users
-inherit. The system-wide table may only be modified by a user with
-the appropriate priviledges (Administrator priviledges in Windows
-NT).</para>
-
-<para>The current user's table is located under
-"HKEY_CURRENT_USER/Software/Cygnus Solutions/Cygwin/mounts
-v&lt;version&gt;"
-where &lt;version&gt; is the latest registry version associated with
-the Cygwin library (this version is not the same as the release
-number). The system-wide table is located under the same subkeys
-under HKEY_LOCAL_SYSTEM.</para>
-
-<para>By default, the POSIX root <filename>/</filename> points to the
-system partition but it can be relocated to any directory in the
-Windows file system using the <command>mount</command> command.
-Whenever Cygwin generates a POSIX path from a Win32 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>.</para>
-
-<para>Invoking <command>mount</command> without any arguments displays
-Cygwin's current set of mount points.
-In the following example, the C
-drive is the POSIX root and D drive is mapped to
-<filename>/d</filename>. Note that in this case, the root mount is a
-system-wide mount point that is visible to all users running Cygwin
-programs, whereas the <filename>/d</filename> mount is only visible
-to the current user.</para>
-
-<example>
-<title>Displaying the current set of mount points</title>
-<screen>
-<prompt>c:\cygnus\&gt;</prompt> <userinput>mount</userinput>
-Device Directory Type Flags
-D: /d user textmode
-C: / system textmode
-</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. See <Xref Linkend="mount"> and <Xref Linkend="umount"> for more
-information on how to use these utilities to set up your Cygwin POSIX
-file system.</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 (see the
-<Xref Linkend="mount"> for more information).</para>
-
-<para>It is possible to assign some special attributes to each mount
-point. Automatically mounted partitions are displayed as "auto"
-mounts. Mounts can also be marked as either "textmode" or "binmode"
--- whether text files are read in the same manner as binary files by
-default or not (see <Xref Linkend="using-textbinary"> for more
-information on text and binary modes.</para>
-
-</sect2>
-
-<sect2><title>Cygwin Mount Table Strategies</title>
-
-<para>Which set of mounts is right for a given Cygwin user depends
-largely on how closely you want to simulate a POSIX environment,
-whether you mix Windows and Cygwin programs, and how many drive
-letters you are using. If you want to be very POSIX-like (assuming
-"CygwinRoot" is the top directory of your Cygwin distribution), you may
-want to do something like this:</para>
-
-<example><title>POSIX-like mount setup</title>
-<screen>
-<prompt>C:\&gt;</prompt> <userinput>mount c:\Cygnus\CygwinRoot /</userinput>
-<prompt>C:\&gt;</prompt> <userinput>mount c:\ /c</userinput>
-<prompt>C:\&gt;</prompt> <userinput>mount d:\ /d</userinput>
-<prompt>C:\&gt;</prompt> <userinput>mount e:\ /cdrom</userinput>
-</screen>
-</example>
-
-<para>However, if you mix Windows and Cygwin programs a lot, you might
-want to create an "identity" mapping, so that conversions between the
-two (see <Xref Linkend="cygpath">) can be eliminated:</para>
-
-<example><title>Identity mount setup</title>
-<screen>
-<prompt>C:\&gt;</prompt> <userinput>mount c:\ /</userinput>
-<prompt>C:\&gt;</prompt> <userinput>mount d:\foo /foo</userinput>
-<prompt>C:\&gt;</prompt> <userinput>mount d:\bar /bar</userinput>
-<prompt>C:\&gt;</prompt> <userinput>mount e:\grill /grill</userinput>
-</screen>
-</example>
-
-<para>You'd have to repeat this for all top-level subdirectories on
-all drives, but then you'd always have the top-level directories
-available as the same names in both systems.</para>
-
-</sect2>
-
-<sect2><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"> 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:\cygnus\cygwin-b20\H-i586-cygwin32\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> <title>DOS devices</title>
-
-<para>Windows filenames invalid under Windows are also invalid under
-Cygwin. This means that base filenames such as
-<filename>AUX</filename>, <filename>COM1</filename>,
-<filename>LPT1</filename> or <filename>PRN</filename> (to name a few)
-cannot be used in a regular Cygwin Windows or POSIX path, even with an
-extension (<filename>prn.txt</filename>). However the special names can be
-used as filename extensions (<filename>file.aux</filename>). You can use
-the special names as you would under DOS, for example you can print on your
-default printer with the command <command>cat filename > PRN</command>
-(make sure to end with a Form Feed).
-</para>
-
-</sect2>
-
-<sect2> <Title>POSIX devices</title>
-<para>There is no need to create a POSIX <filename>/dev</filename>
-directory as it is simulated within Cygwin automatically.
-It supports the following devices: <filename>/dev/null</filename>,
-<filename>/dev/zero</filename>, <filename>/dev/tty</filename>,
-<filename>/dev/ttyX</filename>, <filename>/dev/ptmx</filename>,
-<filename>/dev/comX</filename> (the serial ports),
-<filename>/dev/windows</filename> (the windows message queue),
-<filename>/dev/random</filename> and <filename>/dev/urandom</filename>.
-These devices cannot be seen with the command <command>ls /dev</command>
-although commands such as <command>ls /dev/tty</command> work fine.
-</para>
-
-<para>However, on Windows NT/W2K there are different devices which are
-supported but have to be created as mount points. These are the raw block
-special devices and tape devices. These devices need a special handling
-which is enabled through the mount points. The usage of the native Windows
-device names is not sufficent.
-</para>
-
-<para>NT/W2K supports raw block special device support for partitions
-and drives. The device names for partitions is the drive letter
-with leading <filename>\\.\</filename>, so the floppy would be
-<filename>\\.\A:</filename>, the first partition typically
-<filename>\\.\C:</filename>. Complete drives (except floppies
-which are supported as partitions only) are named
-<filename>\\.\PHYSICALDRIVEx</filename>. The <literal>x</literal>
-is the drive number which you can check in the disk manager.
-Each drive line has prepended the text "Disk x".
-</para>
-
-<para>To access tape drives, NT/W2K uses the file name
-<filename>\\.\TAPEx</filename>. For example the first installed tape device
-is named <filename>\\.\tape0</filename>.
-</para>
-
-<para>To access those devices you have to mount them and you have to
-use the posix name of the device to be recognized by Cygwin.
-The naming convention is simple: The name has to begin with
-<filename>/dev/</filename> and the rest is as you like. The only
-exception are tape devices. To identify if the tape device is
-used as a rewind or a no-rewind device the name must not begin with
-<literal>n</literal> (rewind) or has to begin with <literal>n</literal>
-(no-rewind).
-</para>
-
-<para>Some examples:</para>
-
-<screen>
-mount -b //./A: /dev/fd0 # mount floppy as raw block special
-mount -b //./physicaldrive1 /dev/hdb # mount "Disk 1"
-mount -b //./tape0 /dev/st0 # mount first tape as the rewind device...
-mount -b //./tape0 /dev/nst0 # ...and as the no-rewind device
-</screen>
-
-<para>Note the usage of the <literal>-b</literal> option. It is best to
-include the -b option when mounting these devices to ensure that all
-file I/O is in "binary mode".
-</para>
-
-</sect2>
-
-<sect2><title>The .exe extension</title>
-
-<para> Executable program filenames end with .exe but the .exe need
-not be included in the command, so that traditional UNIX names can be
-used. However, for programs that end in ".bat" and ".com", 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>C:\Cygnus\&gt;</prompt> <userinput>ls * </userinput>
-a a.exe b.exe
-<prompt>C:\Cygnus\&gt;</prompt> <userinput>ls -i a a.exe</userinput>
-445885548 a 435996602 a.exe
-<prompt>C:\Cygnus\&gt;</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 program
-has precedence and is selected for execution of
-<command>myprog</command>.</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>
-
-<para>Unfortunately, the <command>install</command> and
-<command>strip</command> commands do distinguish between
-<filename>filename</filename> and <filename>filename.exe</filename>. They
-fail when working on a non-existing <filename>filename</filename> even if
-<filename>filename.exe</filename> exists, thus breaking some makefiles.
-This problem can be solved by writing <command>install</command> and
-<command>strip</command> shell scripts to provide the extension ".exe"
-when needed.
-</para>
-</sect2>
-
-<sect2><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><title> Using @pathname</title>
-<screen>
-<prompt>/Cygnus$</prompt> <userinput>echo 'This is "a long" line' > mylist</userinput>
-<prompt>/Cygnus$</prompt> <userinput>echo @mylist</userinput>
-@mylist
-<prompt>/Cygnus$</prompt> <userinput>/bin/echo @mylist</userinput>
-This is a long line
-<prompt>/Cygnus$</prompt> <userinput>rm mylist</userinput>
-<prompt>/Cygnus$</prompt> <userinput>/bin/echo @mylist</userinput>
-@mylist
-</screen>
-</example>
-</sect2>
-</sect1>
diff --git a/winsup/doc/programming.sgml b/winsup/doc/programming.sgml
deleted file mode 100644
index 45f26f4fa..000000000
--- 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/readme.texinfo b/winsup/doc/readme.texinfo
deleted file mode 100644
index 42e81d67d..000000000
--- a/winsup/doc/readme.texinfo
+++ /dev/null
@@ -1,18 +0,0 @@
-\input texinfo
-@title The Cygwin README
-
-@subtitle (Only partially updated for the latest net release.)
-
-@setfilename readme.txt
-
-@include sites.texinfo
-@include install.texinfo
-
-@chapter Release Information
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-@include changes.texinfo
-
-@include relnotes.texinfo
diff --git a/winsup/doc/relnotes.texinfo b/winsup/doc/relnotes.texinfo
deleted file mode 100644
index 37c98a883..000000000
--- a/winsup/doc/relnotes.texinfo
+++ /dev/null
@@ -1,23 +0,0 @@
-@chapter Known/potential Problems in the Latest Net Release
-
-@section Aware of the problem, no solution known.
-
-@subsection On Win9x, scp and cvs/ssh leave ssh processes running
-
-For now you'll just have to kill them manually.
-
-This is a difficult problem, related to the implementation of select()
-and pipes on Windows 9x. It has been discussed at length on the cygwin
-mailing list. For an excellent technical description of the problem, see
-@file{http://sources.redhat.com/ml/cygwin/2000-12/msg00470.html}, and
-related threads.
-
-@subsection Cannot access tape devices with mt on Win9x
-
-Win9x does not support the API used by the Cygwin fhandler_dev_tape
-class. Details at
-@file{http://sources.redhat.com/ml/cygwin/2000-12/msg00331.html}.
-
-@section Fixed in the Next Release
-
-Nothing currently.
diff --git a/winsup/doc/setup-net.sgml b/winsup/doc/setup-net.sgml
deleted file mode 100644
index d6719e655..000000000
--- a/winsup/doc/setup-net.sgml
+++ /dev/null
@@ -1,132 +0,0 @@
-<chapter id="setup-net"><title>Setting Up Cygwin</title>
-
-<sect1><title>Cygwin Contents</title>
-
-<para>The following packages are included in the full release:</para>
-
-<para>Development tools: binutils, bison, byacc, dejagnu, diff,
-expect, flex, gas, gcc, gdb, itcl, ld, libstdc++, make, patch, tcl,
-tix, tk</para>
-
-<para>User tools: ash, bash, bzip2, diff, fileutils, findutils, gawk,
-grep, gzip, less, m4, sed, shellutils, tar, textutils, time</para>
-
-<para>The user tools release only contains the user tools.</para>
-
-<para>Full source code is available for these tools.</para>
-
-</sect1>
-<sect1 id="installing-binaries"><title>Installing the binary release</title>
-
-<para>Important! Be sure to remove any older versions of the Cygwin
-tools from your <EnVar>PATH</EnVar> environment variable so you do
-not execute them by mistake.</para>
-
-<para>Connect to one of the ftp servers listed in
-<ulink URL="http://sourceware.cygnus.com/cygwin/mirrors.html">
-http://sourceware.cygnus.com/cygwin/mirrors.html</ulink> and
-<command>cd</command> to the directory containing the latest release.
-</para>
-
-<para>If you want the development tools and the programs necessary to
-run the GNU configure mechanism, you should download the full binary
-release called <filename>full.exe</filename>. If you only care
-about the user tools listed above, download
-<filename>usertools.exe</filename> instead.</para>
-
-<para>If you have an unreliable connection, download the appropriate
-binary in smaller chunks instead. For the split full installer, get
-the files in the `full-split' subdirectory. Once downloaded,
-combine the split files at the command prompt by doing a:</para>
-
-<screen>
-<prompt>C:\Cygnus\&gt;</prompt><userinput>copy /b xaa + xab + xac + ... + xak + xal full.exe</userinput>
-<prompt>C:\Cygnus\&gt;</prompt><userinput>del xa*.*</userinput>
-</screen>
-
-<para>A similar process can be used for the user tools.</para>
-
-<para>Once you have installed the executable on your system, run
-it. First off, the installer will prompt you for a location to extract
-the temporary files it needs to install the release on your
-system. The default should be fine for most people.</para>
-
-<para>Next it will ask you to choose an install location. The default is
-<filename><replaceable>system-drive</replaceable>:\cygnus\cygwin-b20</filename>.
-Feel free to choose another location if you would prefer.</para>
-
-<para>Finally, it will ask you for the name of the Program Files
-folder shortcut to add. By default, the installer will create a
-`Cygwin B20' entry in a folder called `Cygnus Solutions'. When this
-step is completed, it will install the tools and exit.</para>
-
-<para>If you should ever want to uninstall the tools, you may do so
-via the "Add/Remove Programs" control panel.</para>
-
-<para> At this point you should be able to look under the start menu and
-select "Cygwin Beta 20" (or whatever you named it). This will pop up a bash
-shell with special environment variables set up for you. If you are running
-Windows 95 or 98 and are faced with the error message "Out of environment
-space", you need to increase the amount of environment space. Adding the
-line <command>shell=C:\command.com /e:4096 /p</command> to the file
-<filename>C:\CONFIG.SYS</filename> and then rebooting should do the trick if
-<filename>C:</filename> is your system drive letter.</para>
-
-<para>If you want to install the sources follow the
-instructions in the next section, else go directly to
-<Xref LinkEnd="setup-dir"> to complete your system setup.</para>
-
-</sect1>
-<sect1 id="installing-source"><title>Installing the source code</title>
-
-<para>Before downloading the source code corresponding to the release,
-you should install the latest release of the tools (either the full
-release or just the user tools).</para>
-
-<para>Create the directory that will house the source code.
-<command>cd</command> there.</para>
-
-<para>Connect to one of the ftp servers listed above and
-<command>cd</command> to the directory containing the latest release.
-</para>
-
-<para>The source code is split into two units: user tools and development
-tools. If you want the user tools source code, <command>cd</command> into
-the <filename>user-src-split</filename> subdirectory. Download the files
-there. If you want the development tools sources, <command>cd</command>
-into the <filename>dev-src-split</filename> subdirectory. Download the
-files there.</para>
-
-<para>Back in the Windows command shell, for the user tools
-source:</para>
-
-<screen>
-<prompt>C:\Cygnus\&gt;</prompt> <userinput>copy /b xba + xbb + xbc + xbd + xbe + xbf + xbg user-src.tar.bz2</userinput>
-<prompt>C:\Cygnus\&gt;</prompt> <userinput>del xb*.*</userinput>
-<prompt>C:\Cygnus\&gt;</prompt> <userinput>bunzip2 user-src.tar.bz2</userinput>
-<prompt>C:\Cygnus\&gt;</prompt> <userinput>tar xvf user-src.tar</userinput>
-</screen>
-
-<para>For the development tools source:</para>
-
-<screen>
-<prompt>C:\Cygnus\&gt;</prompt> <userinput>copy /b xca + xcb + xcc + xcd + ... + xck + xcl dev-src.tar.bz2</userinput>
-<prompt>C:\Cygnus\&gt;</prompt> <userinput>del xc*.*</userinput>
-<prompt>C:\Cygnus\&gt;</prompt> <userinput>bunzip2 dev-src.tar.bz2</userinput>
-<prompt>C:\Cygnus\&gt;</prompt> <userinput>tar xvf dev-src.tar</userinput>
-</screen>
-
-<para>Both will expand into a directory called
-<filename>src</filename>.</para>
-
-<para>Note: if you want the sources corresponding to everything in the
-full.exe binary installer, you will need to download and expand both
-the <filename>user-src.tar.bz2</filename> and
-<filename>dev-src.tar.bz2</filename> source archives!</para>
-</sect1>
-
-DOCTOOL-INSERT-setup-dir
-DOCTOOL-INSERT-setup-env
-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 1ba28abb5..000000000
--- 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 d23044f3a..000000000
--- a/winsup/doc/setup2.sgml
+++ /dev/null
@@ -1,279 +0,0 @@
-<sect1 id="setup-dir"><title>Directory Structure</title>
-
-<para>
-Cygwin knows how to emulate a standard UNIX directory structure, to
-some extent. This is done through the use of mount tables that map
-Win32 paths to POSIX ones. The mount table may be set up and modified
-with the <command>mount</command> command. This section explains how
-to properly organize the structure. </para>
-
-<para> When you set up the system you should decide where you want the
-root to be mapped. Possible choices are the root of your Windows
-system, such as
-<filename>c:</filename> or a directory such as
-<filename>c:\progra~1\root</filename>.
-</para>
-
-<para>
-Execute the following commands inside bash as it is difficult to
-change the position of the root from the Windows command prompt.
-Changing the mount points may invalidate <EnVar>PATH</EnVar>, if this
-happens simply exit and relaunch bash. Create the directory if
-needed, then <command>umount /</command> the current root and
-<command>mount</command> it in its new place. You also have to decide if
-you want to use text or binary mode.
-</para>
-
-<para>
-Next, create the traditional main UNIX directories, with
-the following command (in some shells it is necessary to issue
-separate <command>mkdir</command> commands, each with a single
-argument).
-</para>
-
-<screen>
-<prompt>/$</prompt> <userinput>mkdir /tmp /bin /etc /var /usr</userinput>
-</screen>
-
-<para>
-Next we will initialize the content of these directories.
-</para>
-
-<para>
-You should make sure that you always have a valid
-<filename>/tmp</filename> directory. If you want to avoid creating a
-real <filename>/tmp</filename>, you can use the
-<command>mount</command> utility to point <filename>/tmp</filename> to
-another directory, such as <filename>c:\tmp</filename>, or create a
-symbolic link <filename>/tmp</filename> to point to such a directory.
-</para>
-
-<para>
-The <filename>/bin</filename> directory should contain the shell
-<filename>sh.exe</filename>. You have three choices. The first is to
-copy this program from the Cygnus <filename>bin</filename> directory.
-The second is to use <command>mount</command> to mount the Cygnus
-<filename>bin</filename> directory to <filename>/bin</filename> (the
-advantage of this approach is that your <envar>PATH</envar> will be
-shorter inside bash). The third is to make <filename>/bin</filename> a
-symbolic link to the Cygnus <filename>bin</filename> directory.
-</para>
-
-<para>
-Note that Cygwin comes with two shells: <command>bash.exe</command> and
-<command>sh.exe</command>, which is based on <command>ash</command>. The
-system is faster when <command>ash</command> is used as the
-non-interactive shell.
-The only functionality supported in <command>ash</command> is that
-of the traditional <command>sh</command>.
-In case of trouble with <command>ash</command> make
-<command>sh.exe</command> point to <command>bash.exe</command>.
-</para>
-
-<para>
-We now turn to <filename>/etc</filename>. You may want to copy in it
-the <filename>termcap</filename> file from the Cygnus
-<filename>etc</filename> directory, although the defaults built into
-the programs suffice for the normal console. You may also use
-<command>mount</command> or create as symbolic link to the Cygnus
-<filename>etc</filename>, just as for <filename>/bin</filename>
-above.
-</para>
-
-<para> Under Windows NT, if you want to create
-<filename>/etc/passwd</filename> and <filename>/etc/group</filename>
-(i.e. so that <command>whoami</command> works and
-<command>ls -l</command> replaces the UID with a name) just
-do this:
-</para>
-
-<screen>
-<prompt>/$</prompt> <userinput>cd /etc</userinput>
-<prompt>/etc$</prompt> <userinput>mkpasswd -l > /etc/passwd</userinput>
-<prompt>/etc$</prompt> <userinput>mkgroup -l > /etc/group</userinput>
-</screen>
-
-<para> Future changes to your NT registry will NOT be reflected in
-<filename>/etc/passwd</filename> or <filename>/etc/group </filename> after
-this so you may want to regenerate these files periodically. Under Windows
-9x, you can create and edit these files with a text editor. </para>
-
-<para>
-The <command>who</command> command requires the
-<filename>/var/run/utmp</filename> to exist.
-Create it if you wish.
-The system also logs information in <filename>/var/log/wtmp</filename>,
-if it exists.
-</para>
-
-<para>
-The <filename>/usr</filename> directory is not used by the Cygwin
-system but it is a standard place to install optional packages.
-</para>
-
-<para>
-You may also want to mount directories such as <filename>/a</filename>
-and <filename>/d</filename> to refer to your local and network drives.
-</para>
-
-<para>
-You do not need to create <filename>/dev</filename> in order to set up
-mounts for devices such as <filename>/dev/null</filename> as these
-are already automatically simulated inside the Cygwin library.
-</para>
-
-</sect1>
-
-<sect1 id="setup-env"><title>Environment Variables</title>
-
-<para>
-Before starting bash, you must set some environment variables, some of
-which can also be set or modified inside bash. Cygnus provides you
-with a .bat file 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 by default in
-<filename>\cygnus\cygwin-b20/cygnus.bat</filename> and pointed to in
-the Start Menu. You can edit it to 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:\Cygnus\&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:\WinNT\system32;C:\WinNT</filename>) to UNIX format
-(e.g., <filename>/WinNT/system32:/WinNT</filename>) when a Cygwin
-process first starts.
-Set it so that it contains at least the Cygnus
-<filename>bin</filename> directory
-<filename>C:\cygnus\cygwin-b20\H-i586-cygwin32\bin</filename> before
-launching bash.
-</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. Set it to point to your home directory
-before launching bash.
-</para>
-
-<para>
-<command>make</command> uses an environment variable
-<envar>MAKE_MODE</envar> to decide if it uses
-<filename>command.com</filename> or <filename>/bin/sh</filename> to
-run command lines. If you are getting strange errors from
-<command>make</command> about "/c not found", set
-<envar>MAKE_MODE</envar> to <literal>UNIX</literal> at the command
-prompt or in bash.
-</para>
-
-<screen>
-<prompt>C:\Cygnus\&gt;</prompt> <userinput>set MAKE_MODE=UNIX</userinput>
-
-<prompt>/Cygnus$</prompt> <userinput>export MAKE_MODE=UNIX</userinput>
-</screen>
-
-<para>
-The <envar>TERM</envar> environment variable specifies your terminal
-type. You can set it to <literal>cygwin</literal>.
-</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-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 "Quick Edit" is checked and "Fast Pasting" isn't. 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.
-</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>. These initialization files will only
-be read if <envar>HOME</envar> is defined before starting bash.
-</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> (the provided
-.bat file does not set the switch). 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 bash) behave. It is loaded automatically. The
-full details are in the <filename>readline.info</filename>.
-Due to a bug in the current readline version,
-<filename>.inputrc</filename> cannot contain \r,
-even on text mounted systems.
-Consider the following settings:
-<screen>
-# Make Bash 8bit clean
-set meta-flag on
-set convert-meta off
-set output-meta on
-# Ignore case while completing
-set completion-ignore-case on
-</screen>
-The first three commands allow bash to display 8-bit characters,
-useful for languages with accented characters. The last line makes
-filename completion case insensitive, which can be convenient in a
-Windows environment.
-</para>
-
-</sect1>
-
diff --git a/winsup/doc/textbinary.sgml b/winsup/doc/textbinary.sgml
deleted file mode 100644
index cf6fc1b36..000000000
--- a/winsup/doc/textbinary.sgml
+++ /dev/null
@@ -1,181 +0,0 @@
-<sect1 id="using-textbinary"><title>Text and Binary modes</title>
-
-<sect2> <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 in text mode there are
-major differences:</para>
-<OrderedList Numeration="Loweralpha" Spacing="Compact">
-<listitem>
-<para>
-On writing in text mode, a NL (\n, ^J) is transformed into the
-sequence CR (\r, ^M) NL.</para>
-</listitem>
-<listitem>
-<para>
-On reading in text mode, a CR followed by an NL is deleted and a ^Z
-character signals the end of file.</para>
-</listitem>
-</OrderedList>
-
-<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><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 file 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 appears to reside on a file system that is not mounted
-(as can happen when the path contains a drive letter), the default is text.
-</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>.</para>
-<warning><Title>Warning!</Title><para>In b20.1 of 12/98, a file will be opened
-in binary mode if any of the following conditions hold:</para>
-<OrderedList Numeration="arabic" Spacing="Compact">
-<listitem><para>binary mode is specified in the open call</para>
-</listitem>
-<listitem><para><envar>CYGWIN</envar> contains <literal>binmode</literal></para>
-</listitem>
-<listitem><para>the file resides in a binary mounted partition</para>
-</listitem>
-<listitem><para>the file is not a disk file</para>
-</listitem>
-</OrderedList>
-</warning>
-</listitem>
-
-<listitem>
-<para>When a Cygwin program is launched by a shell, its standard input,
-output and error are in binary mode if the <envar>CYGWIN</envar> variable
-contains <literal>tty</literal>, else in text mode, except if they are piped
-or redirected.</para>
-<para> When redirecting, the Cygwin shells uses rules (a-c). 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><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>
-#!/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>
-#!/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>
-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><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 Cygnus 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, e.g. <command>cat</command> will
-not work with binary files (input will stop at ^Z, CRs will be
-introduced in the output). 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><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. There is no
-direct way to specify text mode.</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 9d60e77bf..000000000
--- a/winsup/doc/using.sgml
+++ /dev/null
@@ -1,19 +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-utils
-
-</chapter>
diff --git a/winsup/doc/what.texinfo b/winsup/doc/what.texinfo
deleted file mode 100644
index 145e42d51..000000000
--- a/winsup/doc/what.texinfo
+++ /dev/null
@@ -1,145 +0,0 @@
-@chapter What is it?
-
-The Cygwin tools are ports of the popular GNU development tools for
-Windows 9x/ME/NT/2000. They run thanks to the Cygwin library which
-provides the UNIX system calls and environment these programs expect.
-
-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.
-
-@section Where can I get it?
-
-The main WWW page for the Cygwin project is
-@file{http://cygwin.com/}. There you should find
-everything you need for Cygwin, including links for download and setup,
-a current list of ftp mirror sites, a User's Guide, an API Reference,
-mailing lists and archives, and additional ported software.
-
-You can find documentation for the individual GNU tools at
-@file{http://www.fsf.org/manual/}. (You should read GNU manuals from a
-local mirror. Check @file{http://www.fsf.org/server/list-mirrors.html}
-for a list of them.)
-
-
-@section Is it free software?
-
-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 more more information on
-how the GNU General Public License may affect your use of these tools.
-
-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
-contact sales@@cygnus.com for more information.
-All other questions should be sent to the project
-mailing list cygwin@@cygwin.com.
-
-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.
-
-The Cygwin 1.0 product was a "commercial" distribution of cygwin. As
-such, it included such non-software things as printed manuals, support,
-and aggregation of useful utilities. There was nothing (software-wise)
-in there that you couldn't get off the net already, if you took the time
-to find and download everything (and usually, build it yourself),
-although the @emph{versions} available for download may have been
-different than those distributed with the commercial product. We tested
-it all to make sure it worked together, and packaged it in a convenient
-form. We considered such testing and packaging to be a valuable service
-and thus charged a fee for it. Plus, it provided income for the cygwin
-project so we could continue working on it. However, Red Hat is no
-longer offering Cygwin 1.0 on CD. There are tentative plans to offer a
-new Cygwin CD sometime in early 2001. So far, however, there are no
-definite plans. The latest news about this can be found at
-@file{http://cygwin.com/cygwin-cd.html}.
-
-
-@section Recent history of the project: What version @emph{is} this, anyway?
-
-Starting on April 17, 2000, the Cygwin team changed the procedure for
-doing net releases.
-
-Previously, net releases entailed downloading one or two large files
-(called something like @code{FULL.EXE} or @code{USER.EXE}). These files
-unpacked a "Cygwin Distribution" to a static (and arcane) directory
-structure. This distribution contained lots of .exe, .a, .h, and other
-files.
-
-These distributions were named after the version of the Cygwin DLL which
-they contained. The last version released with this method was Cygwin
-B20.1.
-
-This distribution method has the advantage that everything was "all in
-one place". You could copy the huge FULL.EXE file around and know that
-you were getting the complete "Cygwin Distribution".
-
-The method had several disadvantages, however. 1) it was huge, 2) it
-was hard to download in one error-free piece, and 3) it was hard to
-update.
-
-Why was it hard to update? Because any change to any package in
-FULL.EXE meant re-generating all of FULL.EXE. This process was not easy
-to automate since FULL.EXE was an InstallShield executable. As a
-result, until recently, Cygwin development was relatively static.
-
-To rectify these problems, the Cygwin team decided, early in January
-2000, to break up the packages in the release and make a small program
-(@code{setup.exe}) available to use in downloading packages. After much
-development and internal discussion on the cygwin-developers mailing
-list, the new, improved version of a Cygwin release was made available
-on April 17, 2000.
-
-This new release also had a new version of the Cygwin DLL -- 1.1.0.
-Most of the other packages were updated and some packages from the
-Cygwin CD were included. Meanwhile, the Cygwin DLL continues to be
-updated, and is more generically referred to as "1.1.x".
-
-Users obtain this package by first downloading a version of
-@code{setup.exe}. This program started as a simple command line tool,
-has metamorphosed into a GUI, and is in the process of continual
-improvement. However, its purpose is simple -- it is designed to
-install packages from the cygwin web site at @file{http://cygwin.com/}.
-In effect, it is a smaller, more intelligent replacement for FULL.EXE.
-It does not require the downloading a huge executable but rather
-downloads individual small packages.
-
-Does this mean that the new net release of the Cygwin package is 1.1.x?
-No. We no longer label the releases with the Cygwin version number.
-Each package in the cygwin release has its own version now.
-
-Does this mean that Cygwin 1.1.x is newer than B20.1? Yes! The cygwin
-1.1.x versions all represent continual improvement in the Cygwin DLL.
-Although the 1.1.x code is still considered "beta quality", the Cygwin
-team felt comfortable enough with the cygwin technology to bump the
-version number to "1".
-
-The other packages in the latest directory are also continually
-improving, some 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.
-
-So, how do you get the most up-to-date version of cygwin? Easy. Just
-download the setup.exe program from your closest mirror. This program
-will handle the task of updating the packages on your system to the
-latest version. The Cygwin team frequently updates and adds new
-packages to the soureware web site. The setup.exe program is the
-easiest way to determine what you need on your system.
-
-For some "ancient" history of the project (rather, just woefully out of
-date), visit the Project History page at
-@file{http://cygwin.com/history.html}.
diff --git a/winsup/doc/who.texinfo b/winsup/doc/who.texinfo
deleted file mode 100644
index 6b90ba49a..000000000
--- a/winsup/doc/who.texinfo
+++ /dev/null
@@ -1,74 +0,0 @@
-@chapter Who's behind the project?
-
-@strong{(Please note: This section has not yet been updated for the latest
-net release.)}
-
-Chris Faylor (cgf@@cygnus.com) is behind many of the recent
-changes in Cygwin. Prior to joining Cygnus, he contributed significant
-fixes to the process control and environ code, reworked the strace
-mechanism, and rewrote the signal-related code from scratch as a Net
-contributor. In addition to continuing to make technical contributions,
-Chris is also currently the group's manager.
-
-Geoffrey Noer (noer@@cygnus.com) took over the Cygwin project from its'
-initial author Steve Chamberlain in mid-1996. As maintainer, he
-produced Net releases beta 16 through 20; made the development
-snapshots; worked with Net contributors to fix bugs; made many various
-code improvements himself; wrote a paper on Cygwin for the
-1998 Usenix NT Symposium; authored the project WWW pages, FAQ, README;
-etc.
-
-DJ Delorie (dj@@cygnus.com) has done important work in profiling Cygwin,
-worked on the Dejagnu automated testing framework, merged the dlltool
-functionality into ld, wrote a good deal of the Cygwin Users' Guide,
-authored the cygcheck utility, and made automated snapshots available
-from our project WWW page.
-
-Steve Chamberlain (sac@@transmeta.com) 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.
-
-Marco Fuykschot (marco@@ddi.nl) and Peter Boncz (boncz@@ddi.nl) of
-Data Distilleries contributed nearly all of the changes required to
-make Cygwin thread-safe. They also provided the pthreads interface.
-
-Sergey Okhapkin (sos@@prospect.com.ru) 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.
-
-Mumit Khan (khan@@xraylith.wisc.edu) has been most helpful on the EGCS
-end of things, providing quite a large number of stabilizing patches to
-the compiler tools for the B20 release.
-
-Corinna Vinschen <corinna@@vinschen.de> has contributed several
-useful fixes to the path handling code, console support, improved security
-handling, and raw device support.
-
-Philippe Giacinti (giac@@dalim.de) contributed the implementation of
-dlopen, dlclose, dlsym, dlfork, and dlerror in Cygwin.
-
-Many other people at Cygnus have made important contributions to Cygwin.
-Tobin Brockett wrote the InstallShield-based installer for the beta 19
-and 20 releases. 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.
-
-Please note that those of us here at Cygnus that work 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.
-
-Many thanks to everyone using the tools for their many contributions in
-the form of advice, bug reports, and code fixes. Keep them coming!
diff --git a/winsup/doc/windres.sgml b/winsup/doc/windres.sgml
deleted file mode 100644
index 2d5410639..000000000
--- a/winsup/doc/windres.sgml
+++ /dev/null
@@ -1,167 +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>
-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/mingw/CRT_noglob.c b/winsup/mingw/CRT_noglob.c
deleted file mode 100644
index 442820cd8..000000000
--- a/winsup/mingw/CRT_noglob.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * noglob.c
- *
- * This file defines _CRT_glob to have a value of 0, which will
- * turn off command line globbing. It is compiled into a separate object
- * file which you can add to your link line to turn off globbing like
- * this:
- *
- * gcc -o foo.exe foo.o noglob.o
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-int _CRT_glob = 0;
diff --git a/winsup/mingw/CRTfmode.c b/winsup/mingw/CRTfmode.c
deleted file mode 100644
index d0db222f0..000000000
--- a/winsup/mingw/CRTfmode.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * CRTfmode.c
- *
- * Sets _CRT_fmode to be zero, which will cause _mingw32_init_fmode to leave
- * all file modes in their default state (basically text mode).
- *
- * This file is part of the Mingw32 package.
- *
- * THIS FILE IS IN THE PUBLIC DOMAIN.
- *
- * Contributers:
- * Created by Colin Peters <colin@fu.is.saga-u.ac.jp>
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-unsigned int _CRT_fmode = 0;
diff --git a/winsup/mingw/CRTglob.c b/winsup/mingw/CRTglob.c
deleted file mode 100644
index 09f858146..000000000
--- a/winsup/mingw/CRTglob.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * CRTglob.c
- *
- * This object file defines _CRT_glob to have a value of -1, which will
- * turn on command line globbing by default. If you want to turn off
- * command line globbing include a line
- *
- * int _CRT_glob = 0;
- *
- * in one of your source modules.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-int _CRT_glob = -1;
diff --git a/winsup/mingw/CRTinit.c b/winsup/mingw/CRTinit.c
deleted file mode 100644
index fa0e7ba1f..000000000
--- a/winsup/mingw/CRTinit.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * CRTinit.c
- *
- * 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.
- *
- * 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$
- *
- */
-
-void
-_CRT_INIT ()
-{
-}
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
deleted file mode 100644
index 5cb3f55e9..000000000
--- a/winsup/mingw/ChangeLog
+++ /dev/null
@@ -1,540 +0,0 @@
-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/Makefile.in b/winsup/mingw/Makefile.in
deleted file mode 100644
index 036c28217..000000000
--- a/winsup/mingw/Makefile.in
+++ /dev/null
@@ -1,367 +0,0 @@
-# Makefile.in for the winsup/mingw directory.
-# Copyright (c) 1995, 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.
-
-PACKAGE = mingw-runtime
-VERSION = 0.4
-
-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@
-
-# 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@
-# FIXME: Which is it, CC or CC_FOR_TARGET?
-CC_FOR_TARGET = $(CC)
-AS_FOR_TARGET = $(AS)
-CFLAGS = @CFLAGS@
-CXXFLAGS = @CXXFLAGS@
-
-# compiling with Cygwin?
-MNO_CYGWIN = @MNO_CYGWIN@
-ifdef MNO_CYGWIN
- subdirforlib=/mingw
-else
- libdir=
-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@
-
-INCLUDES = -I$(srcdir)/include -I$(srcdir)/../w32api/include \
- -I$(srcdir)/../include \
- -nostdinc -nostdinc++
-ALL_CFLAGS = $(CFLAGS) $(INCLUDES) $(MNO_CYGWIN)
-ALL_CXXFLAGS = $(CXXFLAGS) $(INCLUDES) $(MNO_CYGWIN)
-
-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)
-TAR = tar
-
-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)" \
- prefix="$(prefix)" \
- target_alias="$(target_alias)"
-
-CRT0S = crt1.o dllcrt1.o crt2.o dllcrt2.o CRT_noglob.o crtmt.o crtst.o
-MINGW_OBJS = CRTglob.o CRTfmode.o CRTinit.o dirent.o dllmain.o gccmain.o \
- main.o crtst.o mthr_stub.o
-MOLD_OBJS = ctype_old.o string_old.o
-
-LIBS = libcrtdll.a libmsvcrt.a libmsvcrt20.a libmsvcrt40.a libmingw32.a \
- libcoldname.a libmoldname.a $(LIBM_A) libmingwthrd.a
-
-DLLS = $(THREAD_DLL_NAME)
-
-SRCDIST_FILES = CRT_noglob.c CRTfmode.c CRTglob.c CRTinit.c ChangeLog \
-Makefile.in README TODO config.guess config.sub configure configure.in \
-crt1.c crtdll.def crtmt.c crtst.c ctype_old.c dirent.c dllcrt1.c dllmain.c \
-gccmain.c init.c install-sh jamfile main.c mkinstalldirs moldname-crtdll.def \
-moldname-msvcrt.def moldname.def moldname.def.in msvcrt.def msvcrt20.def \
-msvcrt40.def mthr.c mthr_init.c mthr_stub.c readme.txt string_old.c
-
-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 $(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) $@
-
-# Using dllwrap would be so much easier, but Cygnus top-level configure
-# Makefile.in etc don't pass the right variables yet.
-xx_$(THREAD_DLL_NAME) xx_mingwthrd.def: mthr.o mthr_init.o
- $(DLLWRAP) $(DLLWRAP_FLAGS) -o $(THREAD_DLL_NAME) \
- --output-def mingwthrd.def \
- mthr.o mthr_init.o
-
-DLL_OFILES = mthr.o mthr_init.o
-DLL_CC_STUFF = -B./ -mdll $(MNO_CYGWIN) -Wl,--image-base,0x6FBC0000 \
- -Wl,--entry,_DllMainCRTStartup@12 \
- $(DLL_OFILES)
-DLL_DLLTOOL_STUFF = --as=$(AS) --dllname $(THREAD_DLL_NAME) \
- --def mingwthrd.def \
- --base-file mingwthrd.base --output-exp mingwthrd.exp
-
-$(THREAD_DLL_NAME) mingwthrd.def: $(DLL_OFILES) Makefile
- $(DLLTOOL) --as $(AS) --output-def mingwthrd.def $(DLL_OFILES)
- $(CC) -Wl,--base-file=mingwthrd.base $(DLL_CC_STUFF)
- $(DLLTOOL) $(DLL_DLLTOOL_STUFF)
- $(CC) -Wl,--base-file=mingwthrd.base mingwthrd.exp $(DLL_CC_STUFF)
- $(DLLTOOL) $(DLL_DLLTOOL_STUFF)
- $(CC) mingwthrd.exp -o $(THREAD_DLL_NAME) $(DLL_CC_STUFF)
-
-libmingw32.a: $(MINGW_OBJS)
- $(AR) rc $@ $(MINGW_OBJS)
- $(RANLIB) $@
-
-$(srcdir)/moldname-crtdll.def: moldname.def.in
- $(CC) -DRUNTIME=crtdll \
- -D__FILENAME__=moldname-crtdll.def \
- -D__CRTDLL__ -c -E -P \
- -xc-header $? > $@
-
-$(srcdir)/moldname-msvcrt.def: moldname.def.in
- $(CC) -DRUNTIME=msvcrt \
- -D__FILENAME__=moldname-msvcrt.def \
- -D__MSVCRT__ -c -E -P \
- -xc-header $? > $@
-
-libcoldname.a: $(srcdir)/moldname-crtdll.def $(MOLD_OBJS)
- $(DLLTOOL) --as $(AS) -k -U \
- --dllname crtdll.dll \
- --def $(srcdir)/moldname-crtdll.def \
- --output-lib $@
- $(AR) rc $@ $(MOLD_OBJS)
- $(RANLIB) $@
-
-libmoldname.a: $(srcdir)/moldname-msvcrt.def $(MOLD_OBJS)
- $(DLLTOOL) --as $(AS) -k -U \
- --dllname msvcrt.dll \
- --def $(srcdir)/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 $@
-
-clean:
- -rm -f *.o *.a *~ core a.out mingwthrd.def mingwthrd.base mingwthrd.exp
- -rm -f $(THREAD_DLL_NAME)
- @$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
-
-distclean:
- @$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
- -rm -f *.o *.a *~ core a.out mingwthrd.def mingwthrd.base mingwthrd.exp
- -rm -f $(THREAD_DLL_NAME)
- -rm -f config.cache config.status config.log
- -rm -f Makefile
-
-ifdef SNAPDATE
- distdir=$(PACKAGE)-$(VERSION)-$(SNAPDATE)
-else
- distdir=$(PACKAGE)-$(VERSION)
-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.
- mkdir $(distdir)/include
- mkdir $(distdir)/include/sys
- cp $(srcdir)/include/*.h $(distdir)/include/
- cp $(srcdir)/include/sys/*.h $(distdir)/include/sys/
-#end FIXME
- rm -f $(distdir)-src.tar.gz
- $(TAR) czf $(distdir)-src.tar.gz $(distdir)
-
-
-bindist:
- rm -rf $(distdir)
- mkdir $(distdir)
- chmod 755 $(distdir)
- $(MAKE) install prefix=$(shell pwd)/$(distdir)
- rm -f $(distdir).tar.gz
-#FIXME does the install process really need to install into the $(tooldir)?
- cd $(distdir) ; \
- cd $(target_alias); \
- for i in *; do \
- mv $$i ../; \
- done; \
- cd ..; \
- rmdir $(target_alias); \
- $(TAR) czf ../$(distdir).tar.gz *
-#end FIXME
-
-snapshot:
- make dist SNAPDATE=$(shell date '+%Y%m%d')
-
-info:
-
-info-html:
-
-install-info: info
-
-install-dirs:
- $(mkinstalldirs) $(bindir)
- $(mkinstalldirs) $(tooldir)/lib$(subdirforlib)
-
-install: all install-dirs $(install_dlls_host)
- for i in $(LIBS); do \
- $(INSTALL_DATA) $$i $(tooldir)/lib$(subdirforlib)/$$i ; \
- done
- for i in $(CRT0S); do \
- $(INSTALL_DATA) $$i $(tooldir)/lib/$(subdirforlib)/$$i ; \
- done
- for sub in . sys ; do \
- dstdir=$(tooldir)/include/$(HEADER_SUBDIR)/$$sub ; \
- $(mkinstalldirs) $$dstdir ; \
- for i in $(srcdir)/include/$$sub/*.h ; do \
- $(INSTALL_DATA) $$i $$dstdir/`basename $$i` ; \
- done ; \
- done
- @$(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:
-
-#
-# Dependancies
-#
-libcrtdll.a: $(srcdir)/crtdll.def
-libmsvcrt.a: $(srcdir)/msvcrt.def
-libmsvcrt20.a: $(srcdir)/msvcrt20.def
-libmsvcrt40.a: $(srcdir)/msvcrt40.def
-CRT_noglob.o: $(srcdir)/CRT_noglob.c
-CRTfmode.o: $(srcdir)/CRTfmode.c
-CRTglob.o: $(srcdir)/CRTglob.c
-CRTinit.o: $(srcdir)/CRTinit.c
-crt1.o: $(srcdir)/crt1.c $(srcdir)/init.c
-crt2.o: $(srcdir)/crt1.c $(srcdir)/init.c
-crtmt.o: $(srcdir)/crtmt.c
-crtst.o: $(srcdir)/crtst.c
-ctype_old.o: $(srcdir)/ctype_old.c
-dllcrt1.o: $(srcdir)/dllcrt1.c
-dllcrt2.o: $(srcdir)/dllcrt1.c
-dirent.o: $(srcdir)/dirent.c
-dllmain.o: $(srcdir)/dllmain.c
-main.o: $(srcdir)/main.c
-oldnames.o: $(srcdir)/oldnames.c
-string_old.o: $(srcdir)/string_old.c
-
-Makefile: Makefile.in config.status configure
- $(SHELL) config.status
-
-config.status: configure
- $(SHELL) config.status --recheck
-
-.SUFFIXES: .y $(SUFFIXES) .cc .def .a
-
-lib%.a:%.def
- $(DLLTOOL) --as=$(AS) -k --dllname $*.dll --output-lib lib$*.a --def $<
-
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $< -o $@
-
diff --git a/winsup/mingw/README b/winsup/mingw/README
deleted file mode 100644
index 936819172..000000000
--- a/winsup/mingw/README
+++ /dev/null
@@ -1,10 +0,0 @@
- Free Win32 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 60f6bc2af..000000000
--- a/winsup/mingw/TODO
+++ /dev/null
@@ -1 +0,0 @@
-Finish the README.
diff --git a/winsup/mingw/config.guess b/winsup/mingw/config.guess
deleted file mode 100755
index 5432d5898..000000000
--- a/winsup/mingw/config.guess
+++ /dev/null
@@ -1,1342 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
-# Free Software Foundation, Inc.
-
-version='2000-11-16'
-
-# 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.
-
-# Written by Per Bothner <bothner@cygnus.com>.
-# Please send patches to <config-patches@gnu.org>.
-#
-# 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 system type (host/target name).
-#
-# Only a few systems have been added to this list; please add others
-# (but try to keep the structure clean).
-#
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of this system.
-
-Operation modes:
- -h, --help print this help, then exit
- -V, --version print version number, then exit"
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case "$1" in
- --version | --vers* | -V )
- echo "$version" ; exit 0 ;;
- --help | --h* | -h )
- echo "$usage"; exit 0 ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- exec >&2
- echo "$me: invalid option $1"
- echo "$help"
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
-fi
-
-
-dummy=dummy-$$
-trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
-
-# Use $HOST_CC if defined. $CC may point to a cross-compiler
-if test x"$CC_FOR_BUILD" = x; then
- if test x"$HOST_CC" != x; then
- CC_FOR_BUILD="$HOST_CC"
- else
- if test x"$CC" != x; then
- CC_FOR_BUILD="$CC"
- else
- echo 'int dummy(){}' >$dummy.c
- for c in cc c89 gcc; do
- ($c $dummy.c -c) >/dev/null 2>&1
- if test $? = 0; then
- CC_FOR_BUILD="$c"; break
- fi
- done
- rm -f $dummy.c $dummy.o
- if test x"$CC_FOR_BUILD" = x; then
- CC_FOR_BUILD=no_compiler_found
- fi
- fi
- fi
-fi
-
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 8/24/94.)
-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.
- # Determine the machine/vendor (is the vendor relevant).
- case "${UNAME_MACHINE}" in
- amiga) machine=m68k-unknown ;;
- arm32) machine=arm-unknown ;;
- atari*) machine=m68k-atari ;;
- sun3*) machine=m68k-sun ;;
- mac68k) machine=m68k-apple ;;
- macppc) machine=powerpc-apple ;;
- hp3[0-9][05]) machine=m68k-hp ;;
- ibmrt|romp-ibm) machine=romp-ibm ;;
- *) machine=${UNAME_MACHINE}-unknown ;;
- esac
- # The Operating System including object format.
- 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
- # The OS release
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- # 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 ;;
- alpha:OSF1:*:*)
- if test $UNAME_RELEASE = "V4.0"; then
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- fi
- # 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.
- cat <<EOF >$dummy.s
- .data
-\$Lformat:
- .byte 37,100,45,37,120,10,0 # "%d-%x\n"
-
- .text
- .globl main
- .align 4
- .ent main
-main:
- .frame \$30,16,\$26,0
- ldgp \$29,0(\$27)
- .prologue 1
- .long 0x47e03d80 # implver \$0
- lda \$2,-1
- .long 0x47e20c21 # amask \$2,\$1
- lda \$16,\$Lformat
- mov \$0,\$17
- not \$1,\$18
- jsr \$26,printf
- ldgp \$29,0(\$26)
- mov 0,\$16
- jsr \$26,exit
- .end main
-EOF
- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
- if test "$?" = 0 ; then
- case `./$dummy` in
- 0-0)
- UNAME_MACHINE="alpha"
- ;;
- 1-0)
- UNAME_MACHINE="alphaev5"
- ;;
- 1-1)
- UNAME_MACHINE="alphaev56"
- ;;
- 1-101)
- UNAME_MACHINE="alphapca56"
- ;;
- 2-303)
- UNAME_MACHINE="alphaev6"
- ;;
- 2-307)
- UNAME_MACHINE="alphaev67"
- ;;
- esac
- fi
- rm -f $dummy.s $dummy
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- 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;;
- amiga:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit 0 ;;
- arc64:OpenBSD:*:*)
- echo mips64el-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- arc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- hkmips:OpenBSD:*:*)
- echo mips-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- pmax:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sgi:OpenBSD:*:*)
- echo mips-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- wgrisc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- 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:*:*)
- 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 ;;
- 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=`(head -1 /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 ;;
- atari*:OpenBSD:*:*)
- echo m68k-unknown-openbsd${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 ;;
- sun3*:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mac68k:OpenBSD:*:*)
- echo m68k-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 ;;
- 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)
- 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 $dummy.c -o $dummy \
- && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && rm $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- echo mips-mips-riscos${UNAME_RELEASE}
- 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 ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- 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 $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- 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:*:4)
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
- if /usr/sbin/lsattr -EHl ${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=4.${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])
- case "${HPUX_REV}" in
- 11.[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" ;;
- esac ;;
- esac
- fi ;;
- esac
- if [ "${HP_ARCH}" = "" ]; then
- 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 $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
- if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
- rm -f $dummy.c $dummy
- fi ;;
- esac
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit 0 ;;
- 3050*:HI-UX:*:*)
- 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 $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- 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:*:*)
- 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 ;;
- hppa*:OpenBSD:*:*)
- echo hppa-unknown-openbsd
- 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*X-MP:*:*:*)
- echo xmp-cray-unicos
- exit 0 ;;
- CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE}
- 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/
- exit 0 ;;
- CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- CRAY*T3D:*:*:*)
- echo alpha-cray-unicosmk${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 ;;
- CRAY-2:*:*:*)
- echo cray2-cray-unicos
- exit 0 ;;
- F300:UNIX_System_V:*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit 0 ;;
- F301:UNIX_System_V:*:*)
- echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
- exit 0 ;;
- hp300:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- 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:*:*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit 0 ;;
- *:OpenBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- 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 ;;
- 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 i386-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 ;;
- *: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.
- ld_supported_emulations=`cd /; ld --help 2>&1 \
- | sed -ne '/supported emulations:/!d
- s/[ ][ ]*/ /g
- s/.*supported emulations: *//
- s/ .*//
- p'`
- case "$ld_supported_emulations" in
- *ia64)
- echo "${UNAME_MACHINE}-unknown-linux"
- exit 0
- ;;
- i?86linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit 0
- ;;
- elf_i?86)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- i?86coff)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit 0
- ;;
- sparclinux)
- echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
- exit 0
- ;;
- elf32_sparc)
- echo "${UNAME_MACHINE}-unknown-linux-gnu"
- exit 0
- ;;
- armlinux)
- echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
- exit 0
- ;;
- elf32arm*)
- echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
- exit 0
- ;;
- armelf_linux*)
- echo "${UNAME_MACHINE}-unknown-linux-gnu"
- exit 0
- ;;
- m68klinux)
- echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
- exit 0
- ;;
- elf32ppc | elf32ppclinux)
- # Determine Lib Version
- cat >$dummy.c <<EOF
-#include <features.h>
-#if defined(__GLIBC__)
-extern char __libc_version[];
-extern char __libc_release[];
-#endif
-main(argc, argv)
- int argc;
- char *argv[];
-{
-#if defined(__GLIBC__)
- printf("%s %s\n", __libc_version, __libc_release);
-#else
- printf("unkown\n");
-#endif
- return 0;
-}
-EOF
- LIBC=""
- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
- if test "$?" = 0 ; then
- ./$dummy | grep 1\.99 > /dev/null
- if test "$?" = 0 ; then
- LIBC="libc1"
- fi
- fi
- rm -f $dummy.c $dummy
- echo powerpc-unknown-linux-gnu${LIBC}
- exit 0
- ;;
- shelf_linux)
- echo "${UNAME_MACHINE}-unknown-linux-gnu"
- exit 0
- ;;
- esac
-
- if test "${UNAME_MACHINE}" = "alpha" ; then
- cat <<EOF >$dummy.s
- .data
- \$Lformat:
- .byte 37,100,45,37,120,10,0 # "%d-%x\n"
-
- .text
- .globl main
- .align 4
- .ent main
- main:
- .frame \$30,16,\$26,0
- ldgp \$29,0(\$27)
- .prologue 1
- .long 0x47e03d80 # implver \$0
- lda \$2,-1
- .long 0x47e20c21 # amask \$2,\$1
- lda \$16,\$Lformat
- mov \$0,\$17
- not \$1,\$18
- jsr \$26,printf
- ldgp \$29,0(\$26)
- mov 0,\$16
- jsr \$26,exit
- .end main
-EOF
- LIBC=""
- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
- if test "$?" = 0 ; then
- case `./$dummy` in
- 0-0)
- UNAME_MACHINE="alpha"
- ;;
- 1-0)
- UNAME_MACHINE="alphaev5"
- ;;
- 1-1)
- UNAME_MACHINE="alphaev56"
- ;;
- 1-101)
- UNAME_MACHINE="alphapca56"
- ;;
- 2-303)
- UNAME_MACHINE="alphaev6"
- ;;
- 2-307)
- UNAME_MACHINE="alphaev67"
- ;;
- esac
-
- objdump --private-headers $dummy | \
- grep ld.so.1 > /dev/null
- if test "$?" = 0 ; then
- LIBC="libc1"
- fi
- fi
- rm -f $dummy.s $dummy
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
- elif test "${UNAME_MACHINE}" = "mips" ; then
- cat >$dummy.c <<EOF
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
-#ifdef __MIPSEB__
- printf ("%s-unknown-linux-gnu\n", argv[1]);
-#endif
-#ifdef __MIPSEL__
- printf ("%sel-unknown-linux-gnu\n", argv[1]);
-#endif
- return 0;
-}
-EOF
- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- elif test "${UNAME_MACHINE}" = "s390"; then
- echo s390-ibm-linux && exit 0
- elif test "${UNAME_MACHINE}" = "x86_64"; then
- echo x86_64-unknown-linux-gnu && exit 0
- elif test "${UNAME_MACHINE}" = "parisc" -o "${UNAME_MACHINE}" = "hppa"; then
- # 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
- else
- # Either a pre-BFD a.out linker (linux-gnuoldld)
- # or one that does not give us useful --help.
- # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
- # If ld does not provide *any* "supported emulations:"
- # that means it is gnuoldld.
- test -z "$ld_supported_emulations" \
- && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
-
- case "${UNAME_MACHINE}" in
- i?86)
- VENDOR=pc;
- ;;
- *)
- VENDOR=unknown;
- ;;
- esac
- # Determine whether the default compiler is a.out or elf
- cat >$dummy.c <<EOF
-#include <features.h>
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
-#ifdef __ELF__
-# ifdef __GLIBC__
-# if __GLIBC__ >= 2
- printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
-# else
- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
-# endif
-# else
- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
-# endif
-#else
- printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
-#endif
- return 0;
-}
-EOF
- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
- fi ;;
-# 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.
- i?86:DYNIX/ptx:4*:*)
- 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:*: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:7*)
- # Fixed at (any) Pentium or better
- UNAME_MACHINE=i586
- if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
- echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
- else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
- fi
- 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|egrep Release|sed -e 's/.*= //')`
- (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
- else
- echo ${UNAME_MACHINE}-pc-sysv32
- fi
- exit 0 ;;
- i?86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- 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 ;;
- 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 | 4850:*: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.*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit 0 ;;
- i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
- echo rs6000-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:CPunix: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 ;;
- 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 ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
- *:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
- *:Darwin:*:*)
- echo `uname -p`-apple-darwin${UNAME_RELEASE}
- exit 0 ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- if test "${UNAME_MACHINE}" = "x86pc"; then
- UNAME_MACHINE=pc
- fi
- echo `uname -p`-${UNAME_MACHINE}-nto-qnx
- exit 0 ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
- exit 0 ;;
- NSR-[KW]: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 ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-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)
- printf ("vax-dec-bsd\n"); exit (0);
-#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 $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
-rm -f $dummy.c $dummy
-
-# 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
-
-The $version version of this script cannot recognize your system type.
-Please download the most up to date version of the config scripts:
-
- 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 version = $version
-
-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: "version='"
-# 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 3cccc5acd..000000000
--- a/winsup/mingw/config.sub
+++ /dev/null
@@ -1,1332 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script, version 1.1.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
-# Free Software Foundation, Inc.
-
-version='2000-11-15'
-
-# 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>.
-#
-# 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
- -V, --version print version number, then exit"
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case "$1" in
- --version | --vers* | -V )
- echo "$version" ; exit 0 ;;
- --help | --h* | -h )
- echo "$usage"; exit 0 ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- exec >&2
- echo "$me: invalid option $1"
- echo "$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* | storm-chaos*)
- 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
- ;;
- -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.
- tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
- | arme[lb] | armv[2345] | armv[345][lb] | pyramid | mn10200 | mn10300 | tron | a29k \
- | 580 | i960 | h8300 \
- | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
- | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
- | hppa64 \
- | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
- | alphaev6[78] \
- | we32k | ns16k | clipper | i370 | sh | sh[34] \
- | powerpc | powerpcle \
- | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
- | mips64orion | mips64orionel | mipstx39 | mipstx39el \
- | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
- | mips64vr5000 | miprs64vr5000el | mcore \
- | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
- | thumb | d10v | d30v | fr30 | avr)
- 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 | z8k | v70 | h8500 | w65 | pj | pjl)
- ;;
-
- # 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[234567]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.
- # FIXME: clean up the formatting here.
- vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
- | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
- | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
- | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
- | xmp-* | ymp-* \
- | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
- | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
- | hppa2.0n-* | hppa64-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
- | alphaev6[78]-* \
- | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
- | clipper-* | orion-* \
- | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
- | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
- | mips64el-* | mips64orion-* | mips64orionel-* \
- | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
- | mipstx39-* | mipstx39el-* | mcore-* \
- | f301-* | armv*-* | s390-* | sv1-* | t3e-* \
- | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
- | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
- | bs2000-* | tic54x-* | c54x-* | x86_64-*)
- ;;
- # 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
- ;;
- 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
- ;;
- 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 | ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
- cray2)
- basic_machine=cray2-cray
- os=-unicos
- ;;
- [ctj]90-cray)
- basic_machine=c90-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
- ;;
- 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
- ;;
- 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[34567]86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
- ;;
- i[34567]86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
- ;;
- i[34567]86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
- ;;
- i[34567]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
- ;;
- i386-go32 | go32)
- basic_machine=i386-unknown
- os=-go32
- ;;
- i386-mingw32 | mingw32)
- basic_machine=i386-unknown
- os=-mingw32
- ;;
- i[34567]86-pw32 | pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- 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
- ;;
- miniframe)
- basic_machine=m68000-convergent
- ;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
- mipsel*-linux*)
- basic_machine=mipsel-unknown
- os=-linux-gnu
- ;;
- mips*-linux*)
- basic_machine=mips-unknown
- os=-linux-gnu
- ;;
- 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
- ;;
- msdos)
- basic_machine=i386-unknown
- 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
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
- ;;
- op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- 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)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2)
- basic_machine=i686-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumii-* | pentium2-*)
- basic_machine=i686-`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/^[^-]*-//'`
- ;;
- ps2)
- basic_machine=i386-ibm
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- rm[46]00)
- basic_machine=mips-siemens
- ;;
- rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
- ;;
- sequent)
- basic_machine=i386-sequent
- ;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
- sparclite-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=t3e-cray
- os=-unicos
- ;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tx39)
- basic_machine=mipstx39-unknown
- ;;
- tx39el)
- basic_machine=mipstx39el-unknown
- ;;
- 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
- ;;
- xmp)
- basic_machine=xmp-cray
- os=-unicos
- ;;
- xps | xps100)
- basic_machine=xps100-honeywell
- ;;
- 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
- ;;
- mips)
- if [ x$os = x-linux-gnu ]; then
- basic_machine=mips-unknown
- else
- basic_machine=mips-mips
- fi
- ;;
- romp)
- basic_machine=romp-ibm
- ;;
- rs6000)
- basic_machine=rs6000-ibm
- ;;
- vax)
- basic_machine=vax-dec
- ;;
- pdp11)
- basic_machine=pdp11-dec
- ;;
- we32k)
- basic_machine=we32k-att
- ;;
- sh3 | sh4)
- basic_machine=sh-unknown
- ;;
- sparc | sparcv9)
- 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
- ;;
- c4x*)
- basic_machine=c4x-none
- os=-coff
- ;;
- *)
- 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* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* | -storm-chaos*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
- case $basic_machine in
- x86-* | i[34567]86-*)
- ;;
- *)
- os=-nto$os
- ;;
- esac
- ;;
- -nto*)
- os=-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
- ;;
- -386bsd)
- os=-bsd
- ;;
- -ctix* | -uts*)
- os=-sysv
- ;;
- -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)
- os=-mint
- ;;
- -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
- ;;
- 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
- ;;
- *-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
- ;;
- f301-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*)
- vendor=wrs
- ;;
- -aux*)
- vendor=apple
- ;;
- -hms*)
- vendor=hitachi
- ;;
- -mpw* | -macos*)
- vendor=apple
- ;;
- -*mint | -*MiNT)
- vendor=atari
- ;;
- 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: "version='"
-# 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 15708528e..000000000
--- a/winsup/mingw/configure
+++ /dev/null
@@ -1,2166 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=dllmain.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-
-
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:555: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:576: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:602: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_CC"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:634: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="gcc"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- CC="gcc"
-fi
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:670: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:719: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:743: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
- if test "$ac_test_CXXFLAGS" != set; then
- CXXFLAGS='$(CFLAGS)'
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-case "$with_cross_host" in
- ""|*cygwin*) all_dlls_host='all_dlls_host'
- install_dlls_host='install_dlls_host';;
-esac
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:784: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_AR"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:816: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- AR="ar"
-fi
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:853: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_AS"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:885: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- AS="as"
-fi
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:921: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:953: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB="ranlib"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB="ranlib"
-fi
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ld; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:989: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$LD"; then
- ac_cv_prog_LD="$LD" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_LD="${ac_tool_prefix}ld"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-LD="$ac_cv_prog_LD"
-if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_LD"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ld", so it can be a program name with args.
-set dummy ld; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1021: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$LD"; then
- ac_cv_prog_LD="$LD" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_LD="ld"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_LD" && ac_cv_prog_LD="ld"
-fi
-fi
-LD="$ac_cv_prog_LD"
-if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- LD="ld"
-fi
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1057: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_DLLTOOL"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1089: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- DLLTOOL="dlltool"
-fi
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLWRAP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLWRAP"; then
- ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLWRAP="${ac_tool_prefix}dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-DLLWRAP="$ac_cv_prog_DLLWRAP"
-if test -n "$DLLWRAP"; then
- echo "$ac_t""$DLLWRAP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_DLLWRAP"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1157: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLWRAP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLWRAP"; then
- ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLWRAP="dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_DLLWRAP" && ac_cv_prog_DLLWRAP="dlltool"
-fi
-fi
-DLLWRAP="$ac_cv_prog_DLLWRAP"
-if test -n "$DLLWRAP"; then
- echo "$ac_t""$DLLWRAP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- DLLWRAP="dlltool"
-fi
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
-set dummy ${ac_tool_prefix}windres; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1193: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$WINDRES"; then
- ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-WINDRES="$ac_cv_prog_WINDRES"
-if test -n "$WINDRES"; then
- echo "$ac_t""$WINDRES" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_WINDRES"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "windres", so it can be a program name with args.
-set dummy windres; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1225: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$WINDRES"; then
- ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_WINDRES="windres"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
-fi
-fi
-WINDRES="$ac_cv_prog_WINDRES"
-if test -n "$WINDRES"; then
- echo "$ac_t""$WINDRES" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- WINDRES="windres"
-fi
-fi
-
-
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1260: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 1275 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 1292 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 1309 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
-else
- ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments. Useless!
-echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1342: checking for working alloca.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1347 "configure"
-#include "confdefs.h"
-#include <alloca.h>
-int main() {
-char *p = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:1354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_header_alloca_h=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA_H 1
-EOF
-
-fi
-
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1375: checking for alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1380 "configure"
-#include "confdefs.h"
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
-# include <malloc.h>
-# define alloca _alloca
-# else
-# if HAVE_ALLOCA_H
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-# endif
-# endif
-# endif
-# endif
-#endif
-
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:1408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_func_alloca_works=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_func_alloca_works=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
-if test $ac_cv_func_alloca_works = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-
-fi
-
-if test $ac_cv_func_alloca_works = no; then
- # The SVR3 libPW and SVR4 libucb both contain incompatible functions
- # that cause trouble. Some versions do not even contain alloca or
- # contain a buggy version. If you still want to use their alloca,
- # use ar to extract alloca.o from them instead of compiling alloca.c.
- ALLOCA=alloca.${ac_objext}
- cat >> confdefs.h <<\EOF
-#define C_ALLOCA 1
-EOF
-
-
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1440: checking whether alloca needs Cray hooks" >&5
-if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1445 "configure"
-#include "confdefs.h"
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
-
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "webecray" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_os_cray=yes
-else
- rm -rf conftest*
- ac_cv_os_cray=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
-if test $ac_cv_os_cray = yes; then
-for ac_func in _getb67 GETB67 getb67; do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1470: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1475 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
-#define CRAY_STACKSEG_END $ac_func
-EOF
-
- break
-else
- echo "$ac_t""no" 1>&6
-fi
-
-done
-fi
-
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1525: checking stack direction for C alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_c_stack_direction=0
-else
- cat > conftest.$ac_ext <<EOF
-#line 1533 "configure"
-#include "confdefs.h"
-find_stack_direction ()
-{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
- else
- return (&dummy > addr) ? 1 : -1;
-}
-main ()
-{
- exit (find_stack_direction() < 0);
-}
-EOF
-if { (eval echo configure:1552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_cv_c_stack_direction=1
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_stack_direction=-1
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
-
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1602: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1623: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1641: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-configdirs=""
-SUBDIRS=""
-HEADER_SUBDIR=""
-
-case "$target_os" in
-*cygwin*)
- MNO_CYGWIN=-mno-cygwin
- configdirs="$configdirs"
- # FIXME MinGW versions of libm.a and libgmon.a needed for -mno-cygwin
- # Do not build libm.a when building under Cygwin winsup. Otherwise, it'll
- # overwrite Cygwin's one. Likewise for libgmon.a.
- LIBM_A=
- LIBGMON_A=
- # Install mingw headers in mingw subdirectory.
- HEADER_SUBDIR="mingw"
- ;;
-*)
- # Build it for MSVCRT by default.
- MNO_CYGWIN=
- LIBM_A=libm.a
- LIBGMON_A=libgmon.a
- SUBDIRS="profile"
- configdirs="$configdirs profile"
- ;;
-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
-
-if test -n "$configdirs"; then
- subdirs="$configdirs"
-
-fi
-
-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
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1723: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@CC@%$CC%g
-s%@all_dlls_host@%$all_dlls_host%g
-s%@install_dlls_host@%$install_dlls_host%g
-s%@AR@%$AR%g
-s%@AS@%$AS%g
-s%@RANLIB@%$RANLIB%g
-s%@LD@%$LD%g
-s%@DLLTOOL@%$DLLTOOL%g
-s%@DLLWRAP@%$DLLWRAP%g
-s%@WINDRES@%$WINDRES%g
-s%@CPP@%$CPP%g
-s%@ALLOCA@%$ALLOCA%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@subdirs@%$subdirs%g
-s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
-s%@MNO_CYGWIN@%$MNO_CYGWIN%g
-s%@THREAD_DLL@%$THREAD_DLL%g
-s%@LIBM_A@%$LIBM_A%g
-s%@LIBGMON_A@%$LIBGMON_A%g
-s%@SUBDIRS@%$SUBDIRS%g
-s%@HEADER_SUBDIR@%$HEADER_SUBDIR%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-if test "$no_recursion" != yes; then
-
- # Remove --cache-file and --srcdir arguments so they do not pile up.
- ac_sub_configure_args=
- ac_prev=
- for ac_arg in $ac_configure_args; 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=*)
- ;;
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- ;;
- *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
- esac
- done
-
- for ac_config_dir in $configdirs; do
-
- # Do not complain, so a configure script can configure whichever
- # parts of a large source tree are present.
- if test ! -d $srcdir/$ac_config_dir; then
- continue
- fi
-
- echo configuring in $ac_config_dir
-
- case "$srcdir" in
- .) ;;
- *)
- if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
- else
- { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
- fi
- ;;
- esac
-
- ac_popdir=`pwd`
- cd $ac_config_dir
-
- # A "../" for each directory in /$ac_config_dir.
- ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
- case "$srcdir" in
- .) # No --srcdir option. We are building in place.
- ac_sub_srcdir=$srcdir ;;
- /*) # Absolute path.
- ac_sub_srcdir=$srcdir/$ac_config_dir ;;
- *) # Relative path.
- ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
- esac
-
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_sub_srcdir/configure; then
- ac_sub_configure=$ac_sub_srcdir/configure
- elif test -f $ac_sub_srcdir/configure.in; then
- ac_sub_configure=$ac_configure
- else
- echo "configure: warning: no configuration information is in $ac_config_dir" 1>&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 path.
- ac_sub_cache_file="$ac_dots$cache_file" ;;
- esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
- # The eval makes quoting arguments work.
- if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
- then :
- else
- { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
- fi
- fi
-
- cd $ac_popdir
- done
-fi
-
-
diff --git a/winsup/mingw/configure.in b/winsup/mingw/configure.in
deleted file mode 100644
index 3e98517e7..000000000
--- a/winsup/mingw/configure.in
+++ /dev/null
@@ -1,140 +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.12)
-AC_INIT(dllmain.c)
-
-dnl FIXME: We temporarily define our own version of AC_PROG_CC. This is
-dnl copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-dnl are probably using a cross compiler, which will not be able to fully
-dnl link an executable. This should really be fixed in autoconf
-dnl itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
- if test "$ac_test_CXXFLAGS" != set; then
- CXXFLAGS='$(CFLAGS)'
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-case "$with_cross_host" in
- ""|*cygwin*) all_dlls_host='all_dlls_host'
- install_dlls_host='install_dlls_host';;
-esac
-AC_SUBST(all_dlls_host)
-AC_SUBST(install_dlls_host)
-
-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(DLLWRAP, dlltool, dlltool)
-AC_SUBST(DLLWRAP)
-AC_CHECK_TOOL(WINDRES, windres, windres)
-AC_SUBST(WINDRES)
-
-AC_ALLOCA
-
-AC_CANONICAL_SYSTEM
-
-configdirs=""
-SUBDIRS=""
-HEADER_SUBDIR=""
-
-case "$target_os" in
-*cygwin*)
- MNO_CYGWIN=-mno-cygwin
- configdirs="$configdirs"
- # FIXME MinGW versions of libm.a and libgmon.a needed for -mno-cygwin
- # Do not build libm.a when building under Cygwin winsup. Otherwise, it'll
- # overwrite Cygwin's one. Likewise for libgmon.a.
- LIBM_A=
- LIBGMON_A=
- # Install mingw headers in mingw subdirectory.
- HEADER_SUBDIR="mingw"
- ;;
-*)
- # Build it for MSVCRT by default.
- MNO_CYGWIN=
- LIBM_A=libm.a
- LIBGMON_A=libgmon.a
- SUBDIRS="profile"
- configdirs="$configdirs profile"
- ;;
-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
-
-if test -n "$configdirs"; then
- AC_CONFIG_SUBDIRS($configdirs)
-fi
-
-MKINSTALLDIRS=$ac_aux_dir/mkinstalldirs
-AC_SUBST(MKINSTALLDIRS)
-AC_SUBST(MNO_CYGWIN)
-AC_SUBST(THREAD_DLL)
-AC_SUBST(LIBM_A)
-AC_SUBST(LIBGMON_A)
-AC_SUBST(SUBDIRS)
-AC_SUBST(HEADER_SUBDIR)
-
-AC_PROG_INSTALL
-AC_OUTPUT(Makefile)
-
diff --git a/winsup/mingw/crt1.c b/winsup/mingw/crt1.c
deleted file mode 100644
index f91f1da28..000000000
--- a/winsup/mingw/crt1.c
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * crt1.c
- *
- * 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.
- *
- * This code is part of the Mingw32 package.
- *
- * 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.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <io.h>
-#include <fcntl.h>
-#include <process.h>
-#include <float.h>
-#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"
-
-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__ */
-
-/*
- * Setup the default file handles to have the _CRT_fmode mode, as well as
- * any new files created by the user.
- */
-extern unsigned int _CRT_fmode;
-
-static void
-_mingw32_init_fmode ()
-{
- /* Don't set the 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);
- }
- }
-}
-
-/* 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_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 int
-__mingw_CRTStartup ()
-{
- 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.
- */
- _fpreset (); /* Supplied by the runtime library. */
-
- /*
- * Set up __argc, __argv and _environ.
- */
- _mingw32_init_mainargs ();
-
- /*
- * Sets the default file mode for stdin, stdout and stderr, as well
- * as files later opened by the user, to _CRT_fmode.
- * NOTE: DLLs don't do this because that would be rude!
- */
- _mingw32_init_fmode ();
-
- /*
- * 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);
-
- return 0;
-}
-
-/*
- * The function mainCRTStartup is the entry point for all console programs.
- */
-int
-mainCRTStartup ()
-{
-#ifdef __MSVCRT__
- __set_app_type (__CONSOLE_APP);
-#endif
- __mingw_CRTStartup ();
- return 0;
-}
-
-/*
- * 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.
- */
-int
-WinMainCRTStartup ()
-{
-#ifdef __MSVCRT__
- __set_app_type (__GUI_APP);
-#endif
- __mingw_CRTStartup ();
-}
-
diff --git a/winsup/mingw/crtdll.def b/winsup/mingw/crtdll.def
deleted file mode 100644
index 00ff624c8..000000000
--- a/winsup/mingw/crtdll.def
+++ /dev/null
@@ -1,704 +0,0 @@
-;
-; crtdll.def
-;
-; Exports from crtdll.dll from Windows 95 SYSTEM directory. Hopefully this
-; should also work with the crtdll provided with Windows NT.
-;
-; 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$
-;
-; 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
-_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
-_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
-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 116d850f0..000000000
--- 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 4835b0963..000000000
--- 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/ctype_old.c b/winsup/mingw/ctype_old.c
deleted file mode 100644
index 07eaec1d8..000000000
--- a/winsup/mingw/ctype_old.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * ctype_old.c
- *
- * Oldnames from ANSI header ctype.h
- *
- * Some wrapper functions for those old name functions whose appropriate
- * equivalents are not simply underscore prefixed.
- *
- * 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 <ctype.h>
-
-int
-isascii (int c)
-{
- return __isascii(c);
-}
-
-int
-toascii (int c)
-{
- return __toascii(c);
-}
-
-int
-iscsymf (int c)
-{
- return __iscsymf(c);
-}
-
-int
-iscsym (int c)
-{
- return __iscsym(c);
-}
diff --git a/winsup/mingw/dirent.c b/winsup/mingw/dirent.c
deleted file mode 100644
index 00041d76e..000000000
--- a/winsup/mingw/dirent.c
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * dirent.c
- *
- * 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>
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <io.h>
-#include <direct.h>
-#include <sys/stat.h>
-
-#include <dirent.h>
-
-#define SUFFIX "*"
-#define SLASH "\\"
-
-/*
- * opendir
- *
- * Returns a pointer to a DIR structure appropriately filled in to begin
- * searching a directory.
- */
-DIR *
-opendir (const char *szPath)
-{
- DIR *nd;
- struct _stat statDir;
-
- errno = 0;
-
- if (!szPath)
- {
- errno = EFAULT;
- return (DIR *) 0;
- }
-
- if (szPath[0] == '\0')
- {
- errno = ENOTDIR;
- return (DIR *) 0;
- }
-
- /* Attempt to determine if the given path really is a directory. */
- if (_stat (szPath, &statDir))
- {
- /* Error, stat should have set an error value. */
- return (DIR *) 0;
- }
-
- if (!S_ISDIR (statDir.st_mode))
- {
- /* Error, stat reports not a directory. */
- errno = ENOTDIR;
- return (DIR *) 0;
- }
-
- /* Allocate enough space to store DIR structure and the complete
- * directory path given. */
- nd = (DIR *) malloc (sizeof (DIR) + strlen (szPath) + strlen (SLASH) +
- strlen (SUFFIX));
-
- if (!nd)
- {
- /* Error, out of memory. */
- errno = ENOMEM;
- return (DIR *) 0;
- }
-
- /* Create the search expression. */
- strcpy (nd->dd_name, szPath);
-
- /* Add on a slash if the path does not end with one. */
- if (nd->dd_name[0] != '\0' &&
- nd->dd_name[strlen (nd->dd_name) - 1] != '/' &&
- nd->dd_name[strlen (nd->dd_name) - 1] != '\\')
- {
- strcat (nd->dd_name, SLASH);
- }
-
- /* Add on the search pattern */
- strcat (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;
- nd->dd_dir.d_name = nd->dd_dta.name;
-
- return nd;
-}
-
-
-/*
- * readdir
- *
- * Return a pointer to a dirent structure filled with the information on the
- * next entry in the directory.
- */
-struct dirent *
-readdir (DIR * dirp)
-{
- errno = 0;
-
- /* Check for valid DIR struct. */
- if (!dirp)
- {
- errno = EFAULT;
- return (struct dirent *) 0;
- }
-
- if (dirp->dd_dir.d_name != dirp->dd_dta.name)
- {
- /* The structure does not seem to be set up correctly. */
- errno = EINVAL;
- return (struct dirent *) 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 dirent *) 0;
- }
- else if (dirp->dd_stat == 0)
- {
- /* We haven't started the search yet. */
- /* Start the search */
- dirp->dd_handle = _findfirst (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 (_findnext (dirp->dd_handle, &(dirp->dd_dta)))
- {
- /* We are off the end or otherwise error. */
- _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 = strlen (dirp->dd_dir.d_name);
- return &dirp->dd_dir;
- }
-
- return (struct dirent *) 0;
-}
-
-
-/*
- * closedir
- *
- * Frees up resources allocated by opendir.
- */
-int
-closedir (DIR * 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
-rewinddir (DIR * 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
-telldir (DIR * 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
-seekdir (DIR * 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. */
- rewinddir (dirp);
-
- while ((dirp->dd_stat < lPos) && readdir (dirp))
- ;
- }
-}
diff --git a/winsup/mingw/dllcrt1.c b/winsup/mingw/dllcrt1.c
deleted file mode 100644
index a0055d8b0..000000000
--- a/winsup/mingw/dllcrt1.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * dllcrt1.c
- *
- * Initialization code for DLLs.
- *
- * This file is part of the Mingw32 package.
- *
- * Contributors:
- * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
- * DLL support adapted from Gunther Ebert <gunther.ebert@ixos-leipzig.de>
- * 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.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#include <stdio.h>
-#include <io.h>
-#include <process.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
-
-extern BOOL WINAPI DllMain (HANDLE, DWORD, LPVOID);
-
-BOOL WINAPI
-DllMainCRTStartup (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
-{
- BOOL bRet;
-
- if (dwReason == DLL_PROCESS_ATTACH)
- {
-#ifdef __GNUC__
- /* From libgcc.a, calls global class constructors. */
- __main ();
-#endif
- }
-
- /*
- * Call the user-supplied DllMain subroutine
- * 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);
-
-#ifdef __GNUC__
- if (dwReason == DLL_PROCESS_DETACH)
- {
- /* From libgcc.a, calls global class destructors. */
- __do_global_dtors ();
- }
-#endif
-
- return bRet;
-}
-
-/*
- * For the moment a dummy atexit. Atexit causes problems in DLLs, especially
- * if they are dynamically loaded. For now atexit inside a DLL does nothing.
- * NOTE: We need this even if the DLL author never calls atexit because
- * the global constructor function __do_global_ctors called from __main
- * will attempt to register __do_global_dtors using atexit.
- * Thanks to Andrey A. Smirnov for pointing this one out.
- */
-int
-atexit (void (*pfn) ())
-{
- return 0;
-}
-
diff --git a/winsup/mingw/dllmain.c b/winsup/mingw/dllmain.c
deleted file mode 100644
index 40c4f4f37..000000000
--- a/winsup/mingw/dllmain.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * dllmain.c
- *
- * A stub DllMain function which will be called by DLLs which do not
- * have a user supplied DllMain.
- *
- * 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 <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 5c438e98a..000000000
--- a/winsup/mingw/gccmain.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * gccmain.c
- *
- * 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.
- *
- * This file is part of the Mingw32 package.
- *
- * Contributors:
- * Code supplied by Stan Cox <scox@cygnus.com>
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-/* 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 780cdda3a..000000000
--- a/winsup/mingw/include/_mingw.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * _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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __MINGW_H
-#define __MINGW_H
-
-/* 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.
- __MINGW32_VERSION Runtime version.
- __MINGW32_MAJOR_VERSION Runtime major version.
- __MINGW32_MINOR_VERSION Runtime minor version.
- __MINGW32_BUILD_DATE Runtime build date.
-
- Other macros:
-
- __int64 define to be long long. Using a typedef can
- tweak bugs in the C++ parser.
-
- All headers should include this first, and then use __DECLSPEC_SUPPORTED
- to choose between the old ``__imp__name'' style or __MINGW_IMPORT
- style declarations. */
-
-#ifndef __GNUC__
-# define __MINGW_IMPORT __declspec(dllimport)
-# define __DECLSPEC_SUPPORTED
-#else /* __GNUC__ */
-# ifdef __declspec
- /* note the extern at the end. This is needed to work around GCC's
- limitations in handling dllimport attribute. */
-# define __MINGW_IMPORT __attribute__((dllimport)) extern
-# define __DECLSPEC_SUPPORTED
-# else
-# undef __DECLSPEC_SUPPORTED
-# undef __MINGW_IMPORT
-# endif
-# undef __int64
-# define __int64 long long
-#endif /* __GNUC__ */
-
-#define __MINGW32_VERSION 0.3
-#define __MINGW32_MAJOR_VERSION 0
-#define __MINGW32_MINOR_VERSION 3
-
-#endif /* __MINGW_H */
-
diff --git a/winsup/mingw/include/assert.h b/winsup/mingw/include/assert.h
deleted file mode 100644
index 18deea166..000000000
--- a/winsup/mingw/include/assert.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * assert.h
- *
- * Define the assert macro for debug output.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef _ASSERT_H_
-#define _ASSERT_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#ifndef RC_INVOKED
-
-#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.
- */
-void _assert (const char*, const char*, int)
-#ifdef __GNUC__
- __attribute__ ((noreturn))
-#endif
- ;
-
-/*
- * Definition of the assert macro.
- */
-#define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
-#endif /* NDEBUG */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _ASSERT_H_ */
-
diff --git a/winsup/mingw/include/conio.h b/winsup/mingw/include/conio.h
deleted file mode 100644
index f4fa731d8..000000000
--- a/winsup/mingw/include/conio.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * conio.h
- *
- * Low level console I/O functions. Pretty please try to use the ANSI
- * standard ones if you are writing new code.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#ifndef _CONIO_H_
-#define _CONIO_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-char* _cgets (char*);
-int _cprintf (const char*, ...);
-int _cputs (const char*);
-int _cscanf (char*, ...);
-
-int _getch (void);
-int _getche (void);
-int _kbhit (void);
-int _putch (int);
-int _ungetch (int);
-
-
-#ifndef _NO_OLDNAMES
-
-int getch (void);
-int getche (void);
-int kbhit (void);
-int putch (int);
-int ungetch (int);
-
-#endif /* Not _NO_OLDNAMES */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _CONIO_H_ */
-
-#endif /* Not __STRICT_ANSI__ */
diff --git a/winsup/mingw/include/ctype.h b/winsup/mingw/include/ctype.h
deleted file mode 100644
index e58b15321..000000000
--- a/winsup/mingw/include/ctype.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * ctype.h
- *
- * Functions for testing character types and converting characters.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#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
-#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
-
-int isalnum(int);
-int isalpha(int);
-int iscntrl(int);
-int isdigit(int);
-int isgraph(int);
-int islower(int);
-int isprint(int);
-int ispunct(int);
-int isspace(int);
-int isupper(int);
-int isxdigit(int);
-
-#ifndef __STRICT_ANSI__
-int _isctype (int, int);
-#endif
-
-int tolower(int);
-int toupper(int);
-
-/*
- * NOTE: The above are not old name type wrappers, but functions exported
- * explicitly by CRTDLL. However, underscored versions are also exported.
- */
-#ifndef __STRICT_ANSI__
-int _tolower(int);
-int _toupper(int);
-#endif
-
-#ifndef WEOF
-#define WEOF (wchar_t)(0xFFFF)
-#endif
-
-/* Also defined in stdlib.h */
-#ifndef MB_CUR_MAX
-# 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 */
-#endif /* MB_CUR_MAX */
-
-#ifndef _WCTYPE_T_DEFINED
-typedef wchar_t wctype_t;
-#define _WCTYPE_T_DEFINED
-#endif
-
-/* Wide character equivalents */
-int iswalnum(wint_t);
-int iswalpha(wint_t);
-int iswascii(wint_t);
-int iswcntrl(wint_t);
-int iswctype(wint_t, wctype_t);
-int is_wctype(wint_t, wctype_t); /* Obsolete! */
-int iswdigit(wint_t);
-int iswgraph(wint_t);
-int iswlower(wint_t);
-int iswprint(wint_t);
-int iswpunct(wint_t);
-int iswspace(wint_t);
-int iswupper(wint_t);
-int iswxdigit(wint_t);
-
-wchar_t towlower(wchar_t);
-wchar_t towupper(wchar_t);
-
-int isleadbyte (int);
-
-#ifndef __STRICT_ANSI__
-int __isascii (int);
-int __toascii (int);
-int __iscsymf (int); /* Valid first character in C symbol */
-int __iscsym (int); /* Valid character in C symbol (after first) */
-
-#ifndef _NO_OLDNAMES
-int isascii (int);
-int toascii (int);
-int iscsymf (int);
-int 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 8f089f82c..000000000
--- 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
- * DISCLAMED. 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 c5b07aafb..000000000
--- a/winsup/mingw/include/direct.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * direct.h
- *
- * Functions for manipulating paths and directories (included from io.h)
- * plus functions for setting the current drive.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#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.
- */
-int _getdrive (void);
-unsigned long _getdrives(void);
-int _chdrive (int);
-char* _getdcwd (int, char*, int);
-unsigned _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__
-int _wchdir(const wchar_t*);
-wchar_t* _wgetcwd(wchar_t*, int);
-wchar_t* _wgetdcwd(int, wchar_t*, int);
-int _wmkdir(const wchar_t*);
-int _wrmdir(const wchar_t*);
-#endif /* __MSVCRT__ */
-#define _WDIRECT_DEFINED
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _DIRECT_H_ */
-
-#endif /* Not __STRICT_ANSI__ */
-
diff --git a/winsup/mingw/include/dirent.h b/winsup/mingw/include/dirent.h
deleted file mode 100644
index 3d484ee9b..000000000
--- a/winsup/mingw/include/dirent.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * DIRENT.H (formerly DIRLIB.H)
- *
- * by M. J. Weinstein Released to public domain 1-Jan-89
- *
- * Because I have heard that this feature (opendir, readdir, closedir)
- * it so useful for programmers coming from UNIX or attempting to port
- * UNIX code, and because it is reasonably light weight, I have included
- * it in the Mingw32 package. I have also added an implementation of
- * rewinddir, seekdir and telldir.
- * - Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
- *
- * This code is distributed in the hope that is will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includeds but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#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; /* File name. */
- /* NOTE: The name in the dirent structure points to the name in the
- * finddata_t structure in the DIR. */
-};
-
-/*
- * 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 _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
- */
- short dd_stat;
-
- /* given path for dir with search pattern (struct is extended) */
- char dd_name[1];
-} DIR;
-
-
-DIR* opendir (const char*);
-struct dirent* readdir (DIR*);
-int closedir (DIR*);
-void rewinddir (DIR*);
-long telldir (DIR*);
-void seekdir (DIR*, long);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _DIRENT_H_ */
-
-#endif /* Not __STRICT_ANSI__ */
-
diff --git a/winsup/mingw/include/dos.h b/winsup/mingw/include/dos.h
deleted file mode 100644
index a67c19962..000000000
--- a/winsup/mingw/include/dos.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * dos.h
- *
- * DOS-specific functions and structures.
- *
- * This file is part of the Mingw32 package.
- *
- * Contributors:
- * Created by J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
- *
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#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 __DECLSPEC_SUPPORTED
-
-extern char** __imp__pgmptr_dll;
-#define _pgmptr (*__imp__pgmptr_dll)
-
-/* Wide character equivalent */
-extern wchar_t** __imp_wpgmptr_dll;
-#define _wpgmptr (*__imp__wpgmptr_dll)
-
-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 char* _pgmptr_dll;
-#define _pgmptr _pgmptr_dll
-
-/* Wide character equivalent */
-__MINGW_IMPORT wchar_t* _wpgmptr_dll;
-#define _wpgmptr _wpgmptr_dll
-
-__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 */
-
-#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
-
-unsigned _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_ */
-
-#endif /* Not __STRICT_ANSI__ */
-
diff --git a/winsup/mingw/include/errno.h b/winsup/mingw/include/errno.h
deleted file mode 100644
index d731078f5..000000000
--- a/winsup/mingw/include/errno.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * errno.h
- *
- * Error numbers and access to error reporting.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#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
-int* _errno();
-#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 7bc032938..000000000
--- a/winsup/mingw/include/excpt.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * excpt.h
- *
- * Support for operating system level structured exception handling.
- *
- * NOTE: This is very preliminary stuff. I am also pretty sure it is
- * completely Intel specific.
- *
- * This file is part of the Mingw32 package.
- *
- * Contributors:
- * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
- * Based on code by Mikey <jeffdb@netzone.com>
- *
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef _EXCPT_H_
-#define _EXCPT_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#ifndef __STRICT_ANSI__
-
-#include <windows.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 (dispite 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 /* Not strict ANSI */
-
-#endif /* _EXCPT_H_ not defined */
diff --git a/winsup/mingw/include/fcntl.h b/winsup/mingw/include/fcntl.h
deleted file mode 100644
index 44b00097a..000000000
--- a/winsup/mingw/include/fcntl.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * fcntl.h
- *
- * Access constants for _open. Note that the permissions constants are
- * in sys/stat.h (ick).
- *
- * This code is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#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. */
-
-/* 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
-
-#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_SEQENTIAL _O_SEQUENTIAL
-#define O_RANDOM _O_RANDOM
-
-#endif /* Not _NO_OLDNAMES */
-
-
-#ifndef RC_INVOKED
-
-/*
- * This variable determines the default file mode.
- * TODO: Which flags work?
- */
-#ifndef __DECLSPEC_SUPPORTED
-
-#ifdef __MSVCRT__
-extern unsigned int* __imp__fmode;
-#define _fmode (*__imp__fmode)
-#else
-/* CRTDLL */
-extern unsigned int* __imp__fmode_dll;
-#define _fmode (*__imp__fmode_dll)
-#endif
-
-#else /* __DECLSPEC_SUPPORTED */
-
-#ifdef __MSVCRT__
-__MINGW_IMPORT unsigned int _fmode;
-#else /* ! __MSVCRT__ */
-__MINGW_IMPORT unsigned int _fmode_dll;
-#define _fmode _fmode_dll
-#endif /* ! __MSVCRT__ */
-
-#endif /* __DECLSPEC_SUPPORTED */
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int _setmode (int, int);
-
-#ifndef _NO_OLDNAMES
-int setmode (int, int);
-#endif /* Not _NO_OLDNAMES */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _FCNTL_H_ */
-
-#endif /* Not __STRICT_ANSI__ */
-
diff --git a/winsup/mingw/include/float.h b/winsup/mingw/include/float.h
deleted file mode 100644
index af7c08614..000000000
--- a/winsup/mingw/include/float.h
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * float.h
- *
- * 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, and it is probably more accurate than this,
- * but it doesn't include the non-standard stuff for accessing the
- * fp controller. (TODO: Move those bits elsewhere?) Thus it is
- * probably not a good idea to use the GCC supplied version instead
- * of this header.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef _FLOAT_H_
-#define _FLOAT_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#define FLT_ROUNDS 1
-#define FLT_GUARD 1
-#define FLT_NORMALIZE 1
-
-/*
- * The characteristics of float.
- */
-
-/* The radix for floating point representation. */
-#define FLT_RADIX 2
-
-/* Decimal digits of precision. */
-#define FLT_DIG 6
-
-/* Smallest number such that 1+x != 1 */
-#define FLT_EPSILON 1.19209290e-07F
-
-/* The number of base FLT_RADIX digits in the mantissa. */
-#define FLT_MANT_DIG 24
-
-/* The maximum floating point number. */
-#define FLT_MAX 3.40282347e+38F
-
-/* Maximum n such that FLT_RADIX^n - 1 is representable. */
-#define FLT_MAX_EXP 128
-
-/* Maximum n such that 10^n is representable. */
-#define FLT_MAX_10_EXP 38
-
-/* Minimum normalized floating-point number. */
-#define FLT_MIN 1.17549435e-38F
-
-/* Minimum n such that FLT_RADIX^n is a normalized number. */
-#define FLT_MIN_EXP (-125)
-
-/* Minimum n such that 10^n is a normalized number. */
-#define FLT_MIN_10_EXP (-37)
-
-
-/*
- * The characteristics of double.
- */
-#define DBL_DIG 15
-#define DBL_EPSILON 1.1102230246251568e-16
-#define DBL_MANT_DIG 53
-#define DBL_MAX 1.7976931348623157e+308
-#define DBL_MAX_EXP 1024
-#define DBL_MAX_10_EXP 308
-#define DBL_MIN 2.2250738585072014e-308
-#define DBL_MIN_EXP (-1021)
-#define DBL_MIN_10_EXP (-307)
-
-
-/*
- * The characteristics of long double.
- * NOTE: long double is the same as double.
- */
-#define LDBL_DIG 15
-#define LDBL_EPSILON 1.1102230246251568e-16L
-#define LDBL_MANT_DIG 53
-#define LDBL_MAX 1.7976931348623157e+308L
-#define LDBL_MAX_EXP 1024
-#define LDBL_MAX_10_EXP 308
-#define LDBL_MIN 2.2250738585072014e-308L
-#define LDBL_MIN_EXP (-1021)
-#define LDBL_MIN_10_EXP (-307)
-
-
-/*
- * 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
-
-/* Return values for fpclass. */
-#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 */
-
-/* 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. */
-unsigned int _controlfp (unsigned int unNew, unsigned int unMask);
-unsigned int _control87 (unsigned int unNew, unsigned int unMask);
-
-
-unsigned int _clearfp (); /* Clear the FPU status word */
-unsigned int _statusfp (); /* Report the FPU status word */
-#define _clear87 _clearfp
-#define _status87 _statusfp
-
-void _fpreset (); /* Reset the FPU */
-void fpreset ();
-
-/* Global 'variable' for the current floating point error code. */
-int * __fpecode();
-#define _fpecode (*(__fpecode()))
-
-/*
- * IEEE recommended functions
- */
-
-double _chgsign (double);
-double _copysign (double, double);
-double _logb (double);
-double _nextafter (double, double);
-double _scalb (double, long);
-
-int _finite (double);
-int _fpclass (double);
-int _isnan (double);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not __STRICT_ANSI__ */
-
-#endif /* _FLOAT_H_ */
-
diff --git a/winsup/mingw/include/io.h b/winsup/mingw/include/io.h
deleted file mode 100644
index 6cb65a4da..000000000
--- a/winsup/mingw/include/io.h
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * io.h
- *
- * System level I/O functions and types.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#ifndef _IO_H_
-#define _IO_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-/* We need the definition of FILE anyway... */
-#include <stdio.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 */
-#ifndef __STRICT_ANSI__
-
-#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 _FSIZE_T_DEFINED
-typedef unsigned long _fsize_t;
-#define _FSIZE_T_DEFINED
-#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];
-};
-
-
-#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];
-};
-
-#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.
- */
-int _findfirst (const char*, struct _finddata_t*);
-int _findnext (int, struct _finddata_t*);
-int _findclose (int);
-
-int _chdir (const char*);
-char* _getcwd (char*, int);
-int _mkdir (const char*);
-char* _mktemp (char*);
-int _rmdir (const char*);
-
-#ifdef __MSVCRT__
-__int64 _filelengthi64(int);
-long _findfirsti64(const char*, struct _finddatai64_t*);
-int _findnexti64(long, struct _finddatai64_t*);
-__int64 _lseeki64(int, __int64, int);
-__int64 _telli64(int);
-#endif /* __MSVCRT__ */
-
-
-#ifndef _NO_OLDNAMES
-
-#ifndef _UWIN
-int chdir (const char*);
-char* getcwd (char*, int);
-int mkdir (const char*);
-char* mktemp (char*);
-int rmdir (const char*);
-#endif /* _UWIN */
-
-#endif /* Not _NO_OLDNAMES */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not __STRICT_ANSI__ */
-
-/* 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 */
-#define X_OK 1 /* 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
-
-int _access (const char*, int);
-int _chsize (int, long);
-int _close (int);
-
-/* NOTE: The only significant bit in unPermissions appears to be bit 7 (0x80),
- * the "owner write permission" bit (on FAT). */
-int _creat (const char*, unsigned);
-
-int _dup (int);
-int _dup2 (int, int);
-long _filelength (int);
-int _fileno (FILE*);
-long _get_osfhandle (int);
-int _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
-int _eof (int);
-#endif
-
-/* LK_... locking commands defined in sys/locking.h. */
-int _locking (int, int, long);
-
-long _lseek (int, long, int);
-
-/* Optional third argument is unsigned unPermissions. */
-int _open (const char*, int, ...);
-
-int _open_osfhandle (long, int);
-int _pipe (int *, unsigned int, int);
-int _read (int, void*, unsigned int);
-
-/* SH_... flags for nShFlags defined in share.h
- * Optional fourth argument is unsigned unPermissions */
-int _sopen (const char*, int, int, ...);
-
-long _tell (int);
-/* Should umask be in sys/stat.h and/or sys/types.h instead? */
-int _umask (int);
-int _unlink (const char*);
-int _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__)
-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 _wopen(const wchar_t*, int, ...);
-int _wsopen(const wchar_t*, int, int, ...);
-wchar_t * _wmktemp(wchar_t*);
-long _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
-int _wfindnexti64(long, struct _wfinddatai64_t*);
-#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
-int access (const char*, int);
-int chsize (int, long );
-int close (int);
-int creat (const char*, int);
-int dup (int);
-int dup2 (int, int);
-int eof (int);
-long filelength (int);
-int fileno (FILE*);
-int isatty (int);
-long lseek (int, long, int);
-int open (const char*, int, ...);
-int read (int, void*, unsigned int);
-int sopen (const char*, int, int, ...);
-long tell (int);
-int umask (int);
-int unlink (const char*);
-int write (int, const void*, unsigned int);
-#endif /* _UWIN */
-
-/* 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 */
-
-#endif /* Not strict ANSI */
-
diff --git a/winsup/mingw/include/limits.h b/winsup/mingw/include/limits.h
deleted file mode 100644
index 725d56ec5..000000000
--- a/winsup/mingw/include/limits.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * limits.h
- *
- * 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).
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#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
-
-
-/*
- * 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)
-
-/* ISO C9x macro names */
-#define LLONG_MAX LONG_LONG_MAX
-#define LLONG_MIN LONG_LONG_MIN
-#define ULLONG_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 4f751246c..000000000
--- a/winsup/mingw/include/locale.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * locale.h
- *
- * Functions and types for localization (ie. changing the appearance of
- * output based on the standards of a certain country).
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#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
-
-#ifndef RC_INVOKED
-
-/*
- * 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
-
-char* setlocale (int, const char*);
-struct lconv* localeconv (void);
-
-#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 90a96b618..000000000
--- a/winsup/mingw/include/malloc.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * malloc.h
- *
- * 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.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#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.
- * TODO: This is a guess at the internals of this structure.
- */
-typedef struct _heapinfo
-{
- void* ptr;
- unsigned int size;
- int in_use;
-} _HEAPINFO;
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int _heapwalk (_HEAPINFO*);
-
-#ifndef _NO_OLDNAMES
-int heapwalk (_HEAPINFO*);
-#endif /* Not _NO_OLDNAMES */
-
-int _heapchk (void); /* Verify heap integrety. */
-int _heapmin (void); /* Return unused heap to the OS. */
-int _heapset (unsigned int);
-size_t _msize (void*);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif RC_INVOKED
-
-#endif /* Not _MALLOC_H_ */
-
-#endif /* Not __STRICT_ANSI__ */
-
diff --git a/winsup/mingw/include/math.h b/winsup/mingw/include/math.h
deleted file mode 100644
index 8f2ba105d..000000000
--- a/winsup/mingw/include/math.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * math.h
- *
- * Mathematical functions.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef _MATH_H_
-#define _MATH_H_
-
-/* 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__ */
-
-
-#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.
- */
-
-#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 */
-
-struct _exception
-{
- int type;
- char *name;
- double arg1;
- double arg2;
- double retval;
-};
-
-
-double sin (double);
-double cos (double);
-double tan (double);
-double sinh (double);
-double cosh (double);
-double tanh (double);
-double asin (double);
-double acos (double);
-double atan (double);
-double atan2 (double, double);
-double exp (double);
-double log (double);
-double log10 (double);
-double pow (double, double);
-double sqrt (double);
-double ceil (double);
-double floor (double);
-double fabs (double);
-double ldexp (double, int);
-double frexp (double, int*);
-double modf (double, double*);
-double fmod (double, double);
-
-
-#ifndef __STRICT_ANSI__
-
-/* Complex number (for cabs) */
-struct _complex
-{
- double x; /* Real part */
- double y; /* Imaginary part */
-};
-
-double _cabs (struct _complex);
-double _hypot (double, double);
-double _j0 (double);
-double _j1 (double);
-double _jn (int, double);
-double _y0 (double);
-double _y1 (double);
-double _yn (int, double);
-int _matherr (struct _exception *);
-
-#ifndef _NO_OLDNAMES
-
-/*
- * Non-underscored versions of non-ANSI functions. These reside in
- * liboldnames.a. Provided for extra portability.
- */
-double cabs (struct _complex);
-double hypot (double, double);
-double j0 (double);
-double j1 (double);
-double jn (int, double);
-double y0 (double);
-double y1 (double);
-double yn (int, double);
-
-#endif /* Not _NO_OLDNAMES */
-
-#endif /* Not __STRICT_ANSI__ */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _MATH_H_ */
-
diff --git a/winsup/mingw/include/mem.h b/winsup/mingw/include/mem.h
deleted file mode 100644
index 20c8fa4a5..000000000
--- a/winsup/mingw/include/mem.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * This file is part of the Mingw32 package.
- *
- * mem.h maps to string.h
- */
-#ifndef __STRICT_ANSI__
-#include <string.h>
-#endif
diff --git a/winsup/mingw/include/memory.h b/winsup/mingw/include/memory.h
deleted file mode 100644
index e0c91d635..000000000
--- a/winsup/mingw/include/memory.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * This file is part of the Mingw32 package.
- *
- * memory.h maps to the standard string.h header.
- */
-#ifndef __STRICT_ANSI__
-#include <string.h>
-#endif
-
diff --git a/winsup/mingw/include/process.h b/winsup/mingw/include/process.h
deleted file mode 100644
index dc138c390..000000000
--- a/winsup/mingw/include/process.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * process.h
- *
- * Function calls for spawning child processes.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#ifndef _PROCESS_H_
-#define _PROCESS_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-/* Includes a definition of _pid_t and pid_t */
-#include <sys/types.h>
-
-/*
- * 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
-
-void _cexit(void);
-void _c_exit(void);
-
-int _cwait (int*, _pid_t, int);
-
-_pid_t _getpid(void);
-
-int _execl (const char*, const char*, ...);
-int _execle (const char*, const char*, ...);
-int _execlp (const char*, const char*, ...);
-int _execlpe (const char*, const char*, ...);
-int _execv (const char*, char* const*);
-int _execve (const char*, char* const*, char* const*);
-int _execvp (const char*, char* const*);
-int _execvpe (const char*, char* const*, char* const*);
-
-int _spawnl (int, const char*, const char*, ...);
-int _spawnle (int, const char*, const char*, ...);
-int _spawnlp (int, const char*, const char*, ...);
-int _spawnlpe (int, const char*, const char*, ...);
-int _spawnv (int, const char*, char* const*);
-int _spawnve (int, const char*, char* const*, char* const*);
-int _spawnvp (int, const char*, char* const*);
-int _spawnvpe (int, const char*, char* 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.
- */
-unsigned long
- _beginthread (void (*)(void *), unsigned, void*);
-void _endthread (void);
-
-#ifdef __MSVCRT__
-unsigned long
- _beginthreadex (void *, unsigned, unsigned (__stdcall *) (void *),
- void*, unsigned, unsigned*);
-void _endthreadex (unsigned);
-#endif
-
-
-#ifndef _NO_OLDNAMES
-/*
- * Functions without the leading underscore, for portability. These functions
- * live in liboldnames.a.
- */
-int cwait (int*, pid_t, int);
-pid_t getpid (void);
-int execl (const char*, const char*, ...);
-int execle (const char*, const char*, ...);
-int execlp (const char*, const char*, ...);
-int execlpe (const char*, const char*, ...);
-int execv (const char*, char* const*);
-int execve (const char*, char* const*, char* const*);
-int execvp (const char*, char* const*);
-int execvpe (const char*, char* const*, char* const*);
-int spawnl (int, const char*, const char*, ...);
-int spawnle (int, const char*, const char*, ...);
-int spawnlp (int, const char*, const char*, ...);
-int spawnlpe (int, const char*, const char*, ...);
-int spawnv (int, const char*, char* const*);
-int spawnve (int, const char*, char* const*, char* const*);
-int spawnvp (int, const char*, char* const*);
-int spawnvpe (int, const char*, char* const*, char* const*);
-#endif /* Not _NO_OLDNAMES */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* _PROCESS_H_ not defined */
-
-#endif /* Not __STRICT_ANSI__ */
-
diff --git a/winsup/mingw/include/setjmp.h b/winsup/mingw/include/setjmp.h
deleted file mode 100644
index 9164178d4..000000000
--- a/winsup/mingw/include/setjmp.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * setjmp.h
- *
- * Declarations supporting setjmp and longjump, a method for avoiding
- * the normal function call return sequence. (Bleah!)
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#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.
- */
-int _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!).
- */
-void longjmp (jmp_buf, int);
-
-#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 8abf78736..000000000
--- a/winsup/mingw/include/share.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * share.h
- *
- * Constants for file sharing functions.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#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 */
-
-#endif /* Not _SHARE_H_ */
-
-#endif /* Not __STRICT_ANSI__ */
-
diff --git a/winsup/mingw/include/signal.h b/winsup/mingw/include/signal.h
deleted file mode 100644
index f4eb33a85..000000000
--- a/winsup/mingw/include/signal.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * signal.h
- *
- * A way to set handlers for exceptional conditions (also known as signals).
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#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), or indicate an error return (SIG_ERR).
- */
-#define SIG_DFL ((__p_sig_fn_t) 0)
-#define SIG_IGN ((__p_sig_fn_t) 1)
-#define SIG_ERR ((__p_sig_fn_t) -1)
-
-#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.
- */
-__p_sig_fn_t signal(int, __p_sig_fn_t);
-
-/*
- * Raise the signal indicated by sig. Returns non-zero on success.
- */
-int raise (int);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _SIGNAL_H_ */
-
diff --git a/winsup/mingw/include/stdarg.h b/winsup/mingw/include/stdarg.h
deleted file mode 100644
index 6db01aa35..000000000
--- a/winsup/mingw/include/stdarg.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * stdarg.h
- *
- * Provides facilities for stepping through a list of function arguments of
- * an unknown number and type.
- *
- * NOTE: Gcc should provide stdarg.h, and I believe their version will work
- * with crtdll. If necessary I think you can replace this with the GCC
- * stdarg.h.
- *
- * Note that the type used in va_arg is supposed to match the actual type
- * *after default promotions*. Thus, va_arg (..., short) is not valid.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef _STDARG_H_
-#define _STDARG_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-/*
- * Don't do any of this stuff for the resource compiler.
- */
-#ifndef RC_INVOKED
-
-/*
- * I was told that Win NT likes this.
- */
-#ifndef _VA_LIST_DEFINED
-#define _VA_LIST_DEFINED
-#endif
-
-#ifndef _VA_LIST
-#define _VA_LIST
-typedef char* va_list;
-#endif
-
-
-/*
- * Amount of space required in an argument list (ie. the stack) for an
- * argument of type t.
- */
-#define __va_argsiz(t) \
- (((sizeof(t) + sizeof(int) - 1) / sizeof(int)) * sizeof(int))
-
-
-/*
- * Start variable argument list processing by setting AP to point to the
- * argument after pN.
- */
-#ifdef __GNUC__
-/*
- * In GNU the stack is not necessarily arranged very neatly in order to
- * pack shorts and such into a smaller argument list. Fortunately a
- * neatly arranged version is available through the use of __builtin_next_arg.
- */
-#define va_start(ap, pN) \
- ((ap) = ((va_list) __builtin_next_arg(pN)))
-#else
-/*
- * For a simple minded compiler this should work (it works in GNU too for
- * vararg lists that don't follow shorts and such).
- */
-#define va_start(ap, pN) \
- ((ap) = ((va_list) (&pN) + __va_argsiz(pN)))
-#endif
-
-
-/*
- * End processing of variable argument list. In this case we do nothing.
- */
-#define va_end(ap) ((void)0)
-
-
-/*
- * Increment ap to the next argument in the list while returing a
- * pointer to what ap pointed to first, which is of type t.
- *
- * We cast to void* and then to t* because this avoids a warning about
- * increasing the alignment requirement.
- */
-
-#define va_arg(ap, t) \
- (((ap) = (ap) + __va_argsiz(t)), \
- *((t*) (void*) ((ap) - __va_argsiz(t))))
-
-#endif /* Not RC_INVOKED */
-
-#endif /* not _STDARG_H_ */
diff --git a/winsup/mingw/include/stddef.h b/winsup/mingw/include/stddef.h
deleted file mode 100644
index e953fca76..000000000
--- a/winsup/mingw/include/stddef.h
+++ /dev/null
@@ -1,373 +0,0 @@
-/*
- * stddef.h
- *
- * Standard type definitions provided by the C library.
- *
- * NOTE: This is typically supplied by GCC, but there's a small gotcha -
- * GCC's version doesn't guard typedefs via RC_INVOKED. This is
- * GCC's version, with the guard macro. Since we install this in
- * the tool include directory, it gets picked up before GCC's
- * internal include directory, and we're safe.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#if (!defined(_STDDEF_H) && !defined(_STDDEF_H_) && !defined(_ANSI_STDDEF_H) \
- && !defined(__STDDEF_H__)) \
- || defined(__need_wchar_t) || defined(__need_size_t) \
- || defined(__need_ptrdiff_t) || defined(__need_NULL) \
- || defined(__need_wint_t)
-
-/* Any one of these symbols __need_* means that GNU libc
- wants us just to define one data type. So don't define
- the symbols that indicate this file's entire job has been done. */
-#if (!defined(__need_wchar_t) && !defined(__need_size_t) \
- && !defined(__need_ptrdiff_t) && !defined(__need_NULL) \
- && !defined(__need_wint_t))
-#define _STDDEF_H
-#define _STDDEF_H_
-/* snaroff@next.com says the NeXT needs this. */
-#define _ANSI_STDDEF_H
-/* Irix 5.1 needs this. */
-#define __STDDEF_H__
-#endif
-
-#ifndef RC_INVOKED
-
-#ifndef __sys_stdtypes_h
-/* This avoids lossage on SunOS but only if stdtypes.h comes first.
- There's no way to win with the other order! Sun lossage. */
-
-/* On 4.3bsd-net2, make sure ansi.h is included, so we have
- one less case to deal with in the following. */
-#if defined (__BSD_NET2__) || defined (____386BSD____) || defined (__FreeBSD__) || defined(__NetBSD__)
-#include <machine/ansi.h>
-#endif
-
-/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
- defined if the corresponding type is *not* defined.
- FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_ */
-#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_)
-#if !defined(_SIZE_T_) && !defined(_BSD_SIZE_T_)
-#define _SIZE_T
-#endif
-#if !defined(_PTRDIFF_T_) && !defined(_BSD_PTRDIFF_T_)
-#define _PTRDIFF_T
-#endif
-/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
- instead of _WCHAR_T_. */
-#if !defined(_WCHAR_T_) && !defined(_BSD_WCHAR_T_)
-#ifndef _BSD_WCHAR_T_
-#define _WCHAR_T
-#endif
-#endif
-/* Undef _FOO_T_ if we are supposed to define foo_t. */
-#if defined (__need_ptrdiff_t) || defined (_STDDEF_H_)
-#undef _PTRDIFF_T_
-#undef _BSD_PTRDIFF_T_
-#endif
-#if defined (__need_size_t) || defined (_STDDEF_H_)
-#undef _SIZE_T_
-#undef _BSD_SIZE_T_
-#endif
-#if defined (__need_wchar_t) || defined (_STDDEF_H_)
-#undef _WCHAR_T_
-#undef _BSD_WCHAR_T_
-#endif
-#endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) */
-
-/* Sequent's header files use _PTRDIFF_T_ in some conflicting way.
- Just ignore it. */
-#if defined (__sequent__) && defined (_PTRDIFF_T_)
-#undef _PTRDIFF_T_
-#endif
-
-/* On VxWorks, <type/vxTypesBase.h> may have defined macros like
- _TYPE_size_t which will typedef size_t. fixincludes patched the
- vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
- not defined, and so that defining this macro defines _GCC_SIZE_T.
- If we find that the macros are still defined at this point, we must
- invoke them so that the type is defined as expected. */
-#if defined (_TYPE_ptrdiff_t) && (defined (__need_ptrdiff_t) || defined (_STDDEF_H_))
-_TYPE_ptrdiff_t;
-#undef _TYPE_ptrdiff_t
-#endif
-#if defined (_TYPE_size_t) && (defined (__need_size_t) || defined (_STDDEF_H_))
-_TYPE_size_t;
-#undef _TYPE_size_t
-#endif
-#if defined (_TYPE_wchar_t) && (defined (__need_wchar_t) || defined (_STDDEF_H_))
-_TYPE_wchar_t;
-#undef _TYPE_wchar_t
-#endif
-
-/* In case nobody has defined these types, but we aren't running under
- GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE__TYPE__, and
- __WCHAR_TYPE__ have reasonable values. This can happen if the
- parts of GCC is compiled by an older compiler, that actually
- include gstddef.h, such as collect2. */
-
-/* Signed type of difference of two pointers. */
-
-/* Define this type if we are doing the whole job,
- or if we want this type in particular. */
-#if defined (_STDDEF_H) || defined (__need_ptrdiff_t)
-#ifndef _PTRDIFF_T /* in case <sys/types.h> has defined it. */
-#ifndef _T_PTRDIFF_
-#ifndef _T_PTRDIFF
-#ifndef __PTRDIFF_T
-#ifndef _PTRDIFF_T_
-#ifndef _BSD_PTRDIFF_T_
-#ifndef ___int_ptrdiff_t_h
-#ifndef _GCC_PTRDIFF_T
-#define _PTRDIFF_T
-#define _T_PTRDIFF_
-#define _T_PTRDIFF
-#define __PTRDIFF_T
-#define _PTRDIFF_T_
-#define _BSD_PTRDIFF_T_
-#define ___int_ptrdiff_t_h
-#define _GCC_PTRDIFF_T
-#ifndef __PTRDIFF_TYPE__
-#define __PTRDIFF_TYPE__ long int
-#endif
-typedef __PTRDIFF_TYPE__ ptrdiff_t;
-#endif /* _GCC_PTRDIFF_T */
-#endif /* ___int_ptrdiff_t_h */
-#endif /* _BSD_PTRDIFF_T_ */
-#endif /* _PTRDIFF_T_ */
-#endif /* __PTRDIFF_T */
-#endif /* _T_PTRDIFF */
-#endif /* _T_PTRDIFF_ */
-#endif /* _PTRDIFF_T */
-
-/* If this symbol has done its job, get rid of it. */
-#undef __need_ptrdiff_t
-
-#endif /* _STDDEF_H or __need_ptrdiff_t. */
-
-/* Unsigned type of `sizeof' something. */
-
-/* Define this type if we are doing the whole job,
- or if we want this type in particular. */
-#if defined (_STDDEF_H) || defined (__need_size_t)
-#ifndef __size_t__ /* BeOS */
-#ifndef _SIZE_T /* in case <sys/types.h> has defined it. */
-#ifndef _SYS_SIZE_T_H
-#ifndef _T_SIZE_
-#ifndef _T_SIZE
-#ifndef __SIZE_T
-#ifndef _SIZE_T_
-#ifndef _BSD_SIZE_T_
-#ifndef _SIZE_T_DEFINED_
-#ifndef _SIZE_T_DEFINED
-#ifndef ___int_size_t_h
-#ifndef _GCC_SIZE_T
-#ifndef _SIZET_
-#ifndef __size_t
-#define __size_t__ /* BeOS */
-#define _SIZE_T
-#define _SYS_SIZE_T_H
-#define _T_SIZE_
-#define _T_SIZE
-#define __SIZE_T
-#define _SIZE_T_
-#define _BSD_SIZE_T_
-#define _SIZE_T_DEFINED_
-#define _SIZE_T_DEFINED
-#define ___int_size_t_h
-#define _GCC_SIZE_T
-#define _SIZET_
-#define __size_t
-#ifndef __SIZE_TYPE__
-#define __SIZE_TYPE__ long unsigned int
-#endif
-#if !(defined (__GNUG__) && defined (size_t))
-typedef __SIZE_TYPE__ size_t;
-#ifdef __BEOS__
-typedef long ssize_t;
-#endif /* __BEOS__ */
-#endif /* !(defined (__GNUG__) && defined (size_t)) */
-#endif /* __size_t */
-#endif /* _SIZET_ */
-#endif /* _GCC_SIZE_T */
-#endif /* ___int_size_t_h */
-#endif /* _SIZE_T_DEFINED */
-#endif /* _SIZE_T_DEFINED_ */
-#endif /* _BSD_SIZE_T_ */
-#endif /* _SIZE_T_ */
-#endif /* __SIZE_T */
-#endif /* _T_SIZE */
-#endif /* _T_SIZE_ */
-#endif /* _SYS_SIZE_T_H */
-#endif /* _SIZE_T */
-#endif /* __size_t__ */
-#undef __need_size_t
-#endif /* _STDDEF_H or __need_size_t. */
-
-/* Wide character type.
- Locale-writers should change this as necessary to
- be big enough to hold unique values not between 0 and 127,
- and not (wchar_t) -1, for each defined multibyte character. */
-
-/* Define this type if we are doing the whole job,
- or if we want this type in particular. */
-#if defined (_STDDEF_H) || defined (__need_wchar_t)
-#ifndef __wchar_t__ /* BeOS */
-#ifndef _WCHAR_T
-#ifndef _T_WCHAR_
-#ifndef _T_WCHAR
-#ifndef __WCHAR_T
-#ifndef _WCHAR_T_
-#ifndef _BSD_WCHAR_T_
-#ifndef _WCHAR_T_DEFINED_
-#ifndef _WCHAR_T_DEFINED
-#ifndef _WCHAR_T_H
-#ifndef ___int_wchar_t_h
-#ifndef __INT_WCHAR_T_H
-#ifndef _GCC_WCHAR_T
-#define __wchar_t__ /* BeOS */
-#define _WCHAR_T
-#define _T_WCHAR_
-#define _T_WCHAR
-#define __WCHAR_T
-#define _WCHAR_T_
-#define _BSD_WCHAR_T_
-#define _WCHAR_T_DEFINED_
-#define _WCHAR_T_DEFINED
-#define _WCHAR_T_H
-#define ___int_wchar_t_h
-#define __INT_WCHAR_T_H
-#define _GCC_WCHAR_T
-
-/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
- instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other
- symbols in the _FOO_T_ family, stays defined even after its
- corresponding type is defined). If we define wchar_t, then we
- must undef _WCHAR_T_; for BSD/386 1.1 (and perhaps others), if
- we undef _WCHAR_T_, then we must also define rune_t, since
- headers like runetype.h assume that if machine/ansi.h is included,
- and _BSD_WCHAR_T_ is not defined, then rune_t is available.
- machine/ansi.h says, "Note that _WCHAR_T_ and _RUNE_T_ must be of
- the same type." */
-#ifdef _BSD_WCHAR_T_
-#undef _BSD_WCHAR_T_
-#ifdef _BSD_RUNE_T_
-#if !defined (_ANSI_SOURCE) && !defined (_POSIX_SOURCE)
-typedef _BSD_RUNE_T_ rune_t;
-#endif
-#endif
-#endif
-
-#ifndef __WCHAR_TYPE__
-#ifdef __BEOS__
-#define __WCHAR_TYPE__ unsigned char
-#else
-#define __WCHAR_TYPE__ int
-#endif
-#endif
-#ifndef __cplusplus
-typedef __WCHAR_TYPE__ wchar_t;
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif /* __wchar_t__ */
-#undef __need_wchar_t
-#endif /* _STDDEF_H or __need_wchar_t. */
-
-#if defined (_STDDEF_H) || defined (__need_wint_t)
-#ifndef _WINT_T
-#define _WINT_T
-
-#ifndef __WINT_TYPE__
-#define __WINT_TYPE__ unsigned int
-#endif
-typedef __WINT_TYPE__ wint_t;
-#endif
-#undef __need_wint_t
-#endif
-
-/* In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
- are already defined. */
-/* BSD/OS 3.1 requires the MACHINE_ANSI_H check here. FreeBSD 2.x apparently
- does not, even though there is a check for MACHINE_ANSI_H above. */
-#if defined(_ANSI_H_) || (defined(__bsdi__) && defined(_MACHINE_ANSI_H_))
-/* The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_
- are probably typos and should be removed before 2.8 is released. */
-#ifdef _GCC_PTRDIFF_T_
-#undef _PTRDIFF_T_
-#undef _BSD_PTRDIFF_T_
-#endif
-#ifdef _GCC_SIZE_T_
-#undef _SIZE_T_
-#undef _BSD_SIZE_T_
-#endif
-#ifdef _GCC_WCHAR_T_
-#undef _WCHAR_T_
-#undef _BSD_WCHAR_T_
-#endif
-/* The following ones are the real ones. */
-#ifdef _GCC_PTRDIFF_T
-#undef _PTRDIFF_T_
-#undef _BSD_PTRDIFF_T_
-#endif
-#ifdef _GCC_SIZE_T
-#undef _SIZE_T_
-#undef _BSD_SIZE_T_
-#endif
-#ifdef _GCC_WCHAR_T
-#undef _WCHAR_T_
-#undef _BSD_WCHAR_T_
-#endif
-#endif /* _ANSI_H_ || ( __bsdi__ && _MACHINE_ANSI_H_ ) */
-
-#endif /* __sys_stdtypes_h */
-
-#endif /* RC_INVOKED */
-
-/* A null pointer constant. */
-
-#if defined (_STDDEF_H) || defined (__need_NULL)
-#undef NULL /* in case <stdio.h> has defined it. */
-#ifdef __GNUG__
-#define NULL __null
-#else /* G++ */
-#define NULL ((void *)0)
-#endif /* G++ */
-#endif /* NULL not defined and <stddef.h> or need NULL. */
-#undef __need_NULL
-
-#ifdef _STDDEF_H
-
-/* Offset of member MEMBER in a struct of type TYPE. */
-
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-
-#endif /* _STDDEF_H was defined this time */
-
-#endif /* !_STDDEF_H && !_STDDEF_H_ && !_ANSI_STDDEF_H && !__STDDEF_H__
- || __need_XXX was not defined before */
diff --git a/winsup/mingw/include/stdio.h b/winsup/mingw/include/stdio.h
deleted file mode 100644
index c2b1cd496..000000000
--- a/winsup/mingw/include/stdio.h
+++ /dev/null
@@ -1,380 +0,0 @@
-/*
- * stdio.h
- *
- * 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 path separator.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef _STDIO_H_
-#define _STDIO_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#define __need_size_t
-#define __need_NULL
-#define __need_wchar_t
-#define __need_wint_t
-#ifndef RC_INVOKED
-#include <stddef.h>
-#endif /* Not RC_INVOKED */
-
-
-/* Some flags for the iobuf structure provided by <paag@tid.es> */
-#define _IOREAD 1
-#define _IOWRT 2
-#define _IORW 4
-
-/*
- * 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.
- *
- * NOTE: This is used in the structure _finddata_t (see io.h) so changing it
- * is probably not a good idea.
- */
-#define FILENAME_MAX (260)
-
-/*
- * 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)
-
-/*
- * The maximum size of name (including NUL) that will be put in the user
- * supplied buffer caName for tmpnam.
- * NOTE: This has not been determined by experiment, but based on the
- * maximum file name length above it is probably reasonable. I could be
- * wrong...
- */
-#define L_tmpnam (260)
-
-#define _IOFBF 0x0000
-#define _IOLBF 0x0040
-#define _IONBF 0x0004
-
-/*
- * 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. Enclosed in ifdefs because io.h could also
- * define them. (Though not anymore since io.h includes this file now.) */
-#ifndef SEEK_SET
-#define SEEK_SET (0)
-#endif
-
-#ifndef SEEK_CUR
-#define SEEK_CUR (1)
-#endif
-
-#ifndef SEEK_END
-#define SEEK_END (2)
-#endif
-
-
-#ifndef RC_INVOKED
-
-/*
- * I used to include stdarg.h at this point, in order to allow for the
- * functions later on in the file which use va_list. That conflicts with
- * using stdio.h and varargs.h in the same file, so I do the typedef myself.
- */
-#ifndef _VA_LIST
-#define _VA_LIST
-typedef char* va_list;
-#endif
-
-/*
- * The structure underlying the FILE type.
- *
- * I still 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
- */
-FILE* fopen (const char*, const char*);
-FILE* freopen (const char*, const char*, FILE*);
-int fflush (FILE*);
-int fclose (FILE*);
-/* MS puts remove & rename (but not wide versions) in io.h also */
-int remove (const char*);
-int rename (const char*, const char*);
-FILE* tmpfile (void);
-char* tmpnam (char*);
-char* _tempnam (const char*, const char*);
-
-#ifndef NO_OLDNAMES
-char* tempnam (const char*, const char*);
-#endif
-
-int setvbuf (FILE*, char*, int, size_t);
-
-void setbuf (FILE*, char*);
-
-/*
- * Formatted Output
- */
-
-int fprintf (FILE*, const char*, ...);
-int printf (const char*, ...);
-int sprintf (char*, const char*, ...);
-int _snprintf (char*, size_t, const char*, ...);
-int vfprintf (FILE*, const char*, va_list);
-int vprintf (const char*, va_list);
-int vsprintf (char*, const char*, va_list);
-int _vsnprintf (char*, size_t, const char*, va_list);
-
-
-/*
- * Formatted Input
- */
-
-int fscanf (FILE*, const char*, ...);
-int scanf (const char*, ...);
-int sscanf (const char*, const char*, ...);
-/*
- * Character Input and Output Functions
- */
-
-int fgetc (FILE*);
-char* fgets (char*, int, FILE*);
-int fputc (int, FILE*);
-int fputs (const char*, FILE*);
-int getc (FILE*);
-int getchar (void);
-char* gets (char*);
-int putc (int, FILE*);
-int putchar (int);
-int puts (const char*);
-int ungetc (int, FILE*);
-
-/*
- * Direct Input and Output Functions
- */
-
-size_t fread (void*, size_t, size_t, FILE*);
-size_t fwrite (const void*, size_t, size_t, FILE*);
-
-/*
- * File Positioning Functions
- */
-
-int fseek (FILE*, long, int);
-long ftell (FILE*);
-void rewind (FILE*);
-
-/*
- * 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
-
-int fgetpos (FILE*, fpos_t*);
-int fsetpos (FILE*, const fpos_t*);
-
-/*
- * Error Functions
- */
-
-void clearerr (FILE*);
-int feof (FILE*);
-int ferror (FILE*);
-void perror (const char*);
-
-
-#ifndef __STRICT_ANSI__
-/*
- * Pipes
- */
-FILE* _popen (const char*, const char*);
-int _pclose (FILE*);
-
-#ifndef NO_OLDNAMES
-FILE* popen (const char*, const char*);
-int pclose (FILE*);
-#endif
-
-/*
- * Other Non ANSI functions
- */
-int _flushall(void);
-int _fgetchar (void);
-int _fputchar (int);
-FILE* _fdopen (int, const char*);
-int _fileno (FILE*);
-
-#ifndef _NO_OLDNAMES
-int fgetchar (void);
-int fputchar (int);
-FILE* fdopen (int, const char*);
-int fileno (FILE*);
-#endif /* Not _NO_OLDNAMES */
-
-#endif /* Not __STRICT_ANSI__ */
-
-/* Wide versions */
-
-#ifndef _WSTDIO_DEFINED
-/* also in wchar.h - keep in sync */
-int fwprintf (FILE*, const wchar_t*, ...);
-int wprintf (const wchar_t*, ...);
-int swprintf (wchar_t*, const wchar_t*, ...);
-int vfwprintf (FILE*, const wchar_t*, va_list);
-int vwprintf (const wchar_t*, va_list);
-int vswprintf (wchar_t*, const wchar_t*, va_list);
-int fwscanf (FILE*, const wchar_t*, ...);
-int wscanf (const wchar_t*, ...);
-int swscanf (wchar_t*, const wchar_t*, ...);
-wint_t fgetwc (FILE*);
-wint_t fputwc (wchar_t, FILE*);
-wint_t ungetwc (wchar_t, FILE*);
-#ifdef __MSVCRT__
-wchar_t* fgetws (wchar_t*, int, FILE*);
-int fputws (const wchar_t*, FILE*);
-wint_t getwc (FILE*);
-wint_t getwchar (void);
-wchar_t* _getws (wchar_t*);
-wint_t putwc (wint_t, FILE*);
-int _putws (const wchar_t*);
-wint_t putwchar (wint_t);
-FILE* _wfopen (const wchar_t*, const wchar_t*);
-FILE* _wfreopen (const wchar_t*, const wchar_t*, FILE*);
-FILE* _wfsopen(const wchar_t*, const wchar_t*, int);
-wchar_t* _wtmpnam (wchar_t*);
-wchar_t* _wtempnam (const wchar_t*, const wchar_t*);
-int _wrename(const wchar_t*, const wchar_t*);
-int _wremove (const wchar_t*);
-void _wperror(const wchar_t*);
-FILE* _wpopen(const wchar_t*, const wchar_t*);
-#endif /* __MSVCRT__ */
-#define _WSTDIO_DEFINED
-#endif /* _WSTDIO_DEFINED */
-
-#ifndef __STRICT_ANSI__
-#ifdef __MSVCRT__
-#ifndef NO_OLDNAMES
-#if 0
-FILE* wpopen (const wchar_t*, const wchar_t*);
-#else /* Always true */
-/*
- * The above prototypeing is not possible unless the wpopen export is added
- * to moldnames, which can't be done unless we make separate moldnames.def
- * files for every supported runtime. For the time being we use a define
- * instead. Pedro's modified dlltool should take care of this I think.
- */
-#define wpopen _wpopen
-#endif /* Always true */
-#endif /* not NO_OLDNAMES */
-#endif /* MSVCRT runtime */
-
-/*
- * Other Non ANSI wide functions
- */
-wint_t _fgetwchar(void);
-wint_t _fputwchar(wint_t);
-int _getw (FILE*);
-int _putw (int, FILE*);
-
-#ifndef _NO_OLDNAMES
-wint_t fgetwchar(void);
-wint_t fputwchar(wint_t);
-int getw (FILE*);
-int 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 31a00cf9f..000000000
--- a/winsup/mingw/include/stdlib.h
+++ /dev/null
@@ -1,399 +0,0 @@
-/*
- * stdlib.h
- *
- * Definitions for common types, variables, and functions.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#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
-
-/*
- * 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* __p___argc(void);
-extern char*** __p___argv(void);
-extern wchar_t*** __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 */
-
-/*
- * Also defined in ctype.h.
- */
-
-#ifndef MB_CUR_MAX
-# 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 */
-#endif /* MB_CUR_MAX */
-
-/*
- * MS likes to declare errno in stdlib.h as well.
- */
-
-#ifdef _UWIN
-#undef errno
-extern int errno;
-#else
-int* _errno(void);
-#define errno (*_errno())
-#endif
-int* __doserrno(void);
-#define _doserrno (*__doserrno())
-
-/*
- * Use environ from the DLL, not as a global.
- */
-
-#ifdef __MSVCRT__
- extern char *** __p__environ();
- extern wchar_t *** __p__wenviron();
-# 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.
- */
-#ifndef __STRICT_ANSI__
-
-#ifdef __MSVCRT__
-/* msvcrtxx.dll */
-
-extern unsigned int* __p__osver(void);
-extern unsigned int* __p__winver(void);
-extern unsigned int* __p__winmajor(void);
-extern unsigned int* __p__winminor(void);
-
-#define _osver (*__p__osver())
-#define _winver (*__p__winver())
-#define _winmajor (*__p__winmajor())
-#define _winminor (*__p__winminor())
-
-#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
-
-#endif /* Not __STRICT_ANSI__ */
-
-#ifdef __GNUC__
-#define _ATTRIB_NORETURN __attribute__ ((noreturn))
-#else /* Not __GNUC__ */
-#define _ATTRIB_NORETURN
-#endif /* __GNUC__ */
-
-double atof (const char*);
-int atoi (const char*);
-long atol (const char*);
-int _wtoi (const wchar_t *);
-long _wtol (const wchar_t *);
-
-double strtod (const char*, char**);
-double wcstod (const wchar_t*, wchar_t**);
-long strtol (const char*, char**, int);
-long wcstol (const wchar_t*, wchar_t**, int);
-
-unsigned long strtoul (const char*, char**, int);
-unsigned long wcstoul (const wchar_t*, wchar_t**, int);
-
-size_t wcstombs (char*, const wchar_t*, size_t);
-int wctomb (char*, wchar_t);
-
-int mblen (const char*, size_t);
-size_t mbstowcs (wchar_t*, const char*, size_t);
-int mbtowc (wchar_t*, const char*, size_t);
-
-int rand (void);
-void srand (unsigned int);
-
-void* calloc (size_t, size_t);
-void* malloc (size_t);
-void* realloc (void*, size_t);
-void free (void*);
-
-void abort (void) _ATTRIB_NORETURN;
-void exit (int) _ATTRIB_NORETURN;
-int atexit (void (*)(void));
-
-int system (const char*);
-char* getenv (const char*);
-
-void* bsearch (const void*, const void*, size_t, size_t,
- int (*)(const void*, const void*));
-void qsort (const void*, size_t, size_t,
- int (*)(const void*, const void*));
-
-int abs (int);
-long labs (long);
-
-/*
- * 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;
-
-div_t div (int, int);
-ldiv_t ldiv (long, long);
-
-
-#ifndef __STRICT_ANSI__
-
-/*
- * NOTE: Officially the three following functions are obsolete. The Win32 API
- * functions SetErrorMode, Beep and Sleep are their replacements.
- */
-void _beep (unsigned int, unsigned int);
-void _seterrormode (int);
-void _sleep (unsigned long);
-
-void _exit (int) _ATTRIB_NORETURN;
-
-int _putenv (const char*);
-void _searchenv (const char*, const char*, char*);
-
-
-char* _ecvt (double, int, int*, int*);
-char* _fcvt (double, int, int*, int*);
-char* _gcvt (double, int, char*);
-
-void _makepath (char*, const char*, const char*, const char*, const char*);
-void _splitpath (const char*, char*, char*, char*, char*);
-char* _fullpath (char*, const char*, size_t);
-
-
-char* _itoa (int, char*, int);
-char* _ltoa (long, char*, int);
-char* _ultoa(unsigned long, char*, int);
-wchar_t* _itow (int, wchar_t*, int);
-wchar_t* _ltow (long, wchar_t*, int);
-wchar_t* _ultow (unsigned long, wchar_t*, int);
-
-#ifdef __MSVCRT__
-__int64 _atoi64(const char *);
-char* _i64toa(__int64, char *, int);
-char* _ui64toa(unsigned __int64, char *, int);
-__int64 _wtoi64(const wchar_t *);
-wchar_t* _i64tow(__int64, wchar_t *, int);
-wchar_t* _ui64tow(unsigned __int64, wchar_t *, int);
-
-int _wgetenv(const wchar_t*);
-int _wputenv(const wchar_t*);
-void _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*);
-void _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*);
-void _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*);
-wchar_t* _wfullpath (wchar_t*, const wchar_t*, size_t);
-#endif
-
-#ifndef _NO_OLDNAMES
-
-int putenv (const char*);
-void searchenv (const char*, const char*, char*);
-
-char* itoa (int, char*, int);
-char* ltoa (long, char*, int);
-
-#ifndef _UWIN
-char* ecvt (double, int, int*, int*);
-char* fcvt (double, int, int*, int*);
-char* gcvt (double, int, char*);
-#endif /* _UWIN */
-#endif /* Not _NO_OLDNAMES */
-
-#endif /* Not __STRICT_ANSI__ */
-
-/*
- * Undefine the no return attribute used in some function definitions
- */
-#undef _ATTRIB_NORETURN
-
-#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 55aa0bfcb..000000000
--- a/winsup/mingw/include/string.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * string.h
- *
- * Definitions for memory and string functions.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#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.
- */
-void* memchr (const void*, int, size_t);
-int memcmp (const void*, const void*, size_t);
-void* memcpy (void*, const void*, size_t);
-void* memmove (void*, const void*, size_t);
-void* memset (void*, int, size_t);
-char* strcat (char*, const char*);
-char* strchr (const char*, int);
-int strcmp (const char*, const char*);
-int strcoll (const char*, const char*); /* Compare using locale */
-char* strcpy (char*, const char*);
-size_t strcspn (const char*, const char*);
-char* strerror (int); /* NOTE: NOT an old name wrapper. */
-char* _strerror (const char *);
-size_t strlen (const char*);
-char* strncat (char*, const char*, size_t);
-int strncmp (const char*, const char*, size_t);
-char* strncpy (char*, const char*, size_t);
-char* strpbrk (const char*, const char*);
-char* strrchr (const char*, int);
-size_t strspn (const char*, const char*);
-char* strstr (const char*, const char*);
-char* strtok (char*, const char*);
-size_t strxfrm (char*, const char*, size_t);
-
-#ifndef __STRICT_ANSI__
-/*
- * Extra non-ANSI functions provided by the CRTDLL library
- */
-void* _memccpy (void*, const void*, int, size_t);
-int _memicmp (const void*, const void*, size_t);
-char* _strdup (const char*);
-int _strcmpi (const char*, const char*);
-int _stricmp (const char*, const char*);
-int _stricoll (const char*, const char*);
-char* _strlwr (char*);
-int _strnicmp (const char*, const char*, size_t);
-char* _strnset (char*, int, size_t);
-char* _strrev (char*);
-char* _strset (char*, int);
-char* _strupr (char*);
-void _swab (const char*, char*, size_t);
-
-/*
- * Multi-byte character functions
- */
-unsigned char* _mbschr (unsigned char*, unsigned char*);
-unsigned char* _mbsncat (unsigned char*, const unsigned char*, size_t);
-unsigned char* _mbstok (unsigned char*, unsigned char*);
-
-#ifdef __MSVCRT__
-int _strncoll(const char*, const char*, size_t);
-int _strnicoll(const char*, const char*, size_t);
-#endif
-
-#endif /* Not __STRICT_ANSI__ */
-
-/*
- * Unicode versions of the standard calls.
- */
-wchar_t* wcscat (wchar_t*, const wchar_t*);
-wchar_t* wcschr (const wchar_t*, wchar_t);
-int wcscmp (const wchar_t*, const wchar_t*);
-int wcscoll (const wchar_t*, const wchar_t*);
-wchar_t* wcscpy (wchar_t*, const wchar_t*);
-size_t wcscspn (const wchar_t*, const wchar_t*);
-/* Note: No wcserror in CRTDLL. */
-size_t wcslen (const wchar_t*);
-wchar_t* wcsncat (wchar_t*, const wchar_t*, size_t);
-int wcsncmp(const wchar_t*, const wchar_t*, size_t);
-wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t);
-wchar_t* wcspbrk(const wchar_t*, const wchar_t*);
-wchar_t* wcsrchr(const wchar_t*, wchar_t);
-size_t wcsspn(const wchar_t*, const wchar_t*);
-wchar_t* wcsstr(const wchar_t*, const wchar_t*);
-wchar_t* wcstok(wchar_t*, const wchar_t*);
-size_t 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
-
-wchar_t* _wcsdup (wchar_t*);
-int _wcsicmp (const wchar_t*, const wchar_t*);
-int _wcsicoll (const wchar_t*, const wchar_t*);
-wchar_t* _wcslwr (wchar_t*);
-int _wcsnicmp (const wchar_t*, const wchar_t*, size_t);
-wchar_t* _wcsnset (wchar_t*, wchar_t, size_t);
-wchar_t* _wcsrev (wchar_t*);
-wchar_t* _wcsset (wchar_t*, wchar_t);
-wchar_t* _wcsupr (wchar_t*);
-
-#ifdef __MSVCRT__
-int _wcsncoll(const wchar_t*, const wchar_t*, size_t);
-int _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
-#endif
-
-
-#endif /* Not __STRICT_ANSI__ */
-
-
-#ifndef __STRICT_ANSI__
-#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.
- */
-
-void* memccpy (void*, const void*, int, size_t);
-int memicmp (const void*, const void*, size_t);
-char* strdup (const char*);
-int strcmpi (const char*, const char*);
-int stricmp (const char*, const char*);
-int strcasecmp (const char*, const char*);
-int stricoll (const char*, const char*);
-char* strlwr (char*);
-int strnicmp (const char*, const char*, size_t);
-int strncasecmp (const char*, const char*, size_t);
-char* strnset (char*, int, size_t);
-char* strrev (char*);
-char* strset (char*, int);
-char* strupr (char*);
-#ifndef _UWIN
-void swab (const char*, char*, size_t);
-#endif /* _UWIN */
-
-/* NOTE: There is no _wcscmpi, but this is for compatibility. */
-int wcscmpi (const wchar_t*, const wchar_t*);
-wchar_t* wcsdup (wchar_t*);
-int wcsicmp (const wchar_t*, const wchar_t*);
-int wcsicoll (const wchar_t*, const wchar_t*);
-wchar_t* wcslwr (wchar_t*);
-int wcsnicmp (const wchar_t*, const wchar_t*, size_t);
-wchar_t* wcsnset (wchar_t*, wchar_t, size_t);
-wchar_t* wcsrev (wchar_t*);
-wchar_t* wcsset (wchar_t*, wchar_t);
-wchar_t* wcsupr (wchar_t*);
-
-#endif /* Not _NO_OLDNAMES */
-#endif /* Not strict ANSI */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _STRING_H_ */
-
diff --git a/winsup/mingw/include/sys/fcntl.h b/winsup/mingw/include/sys/fcntl.h
deleted file mode 100644
index b343f272f..000000000
--- a/winsup/mingw/include/sys/fcntl.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * This file is part of the Mingw32 package.
- *
- * This fcntl.h maps to the root fcntl.h
- */
-#ifndef __STRICT_ANSI__
-#include <fcntl.h>
-#endif
diff --git a/winsup/mingw/include/sys/file.h b/winsup/mingw/include/sys/file.h
deleted file mode 100644
index 96c49e117..000000000
--- a/winsup/mingw/include/sys/file.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * This file is part of the Mingw32 package.
- *
- * This file.h maps to the root fcntl.h
- * TODO?
- */
-#ifndef __STRICT_ANSI__
-#include <fcntl.h>
-#endif
diff --git a/winsup/mingw/include/sys/locking.h b/winsup/mingw/include/sys/locking.h
deleted file mode 100644
index cf33b5f03..000000000
--- a/winsup/mingw/include/sys/locking.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * locking.h
- *
- * Constants for the mode parameter of the locking function.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#ifndef _LOCKING_H_
-#define _LOCKING_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#define _LK_UNLOCK 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_UNLOCK _LK_UNLOCK
-#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_ */
-
-#endif /* Not __STRICT_ANSI__ */
-
diff --git a/winsup/mingw/include/sys/stat.h b/winsup/mingw/include/sys/stat.h
deleted file mode 100644
index 0178660bd..000000000
--- a/winsup/mingw/include/sys/stat.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * stat.h
- *
- * Symbolic constants for opening and creating files, also stat, fstat and
- * chmod functions.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#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 */
-#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_IFDIR)
-#define _S_ISFIFO(m) ((m) & _S_IFIFO)
-#define _S_ISCHR(m) ((m) & _S_IFCHR)
-#define _S_ISBLK(m) ((m) & _S_IFBLK)
-#define _S_ISREG(m) ((m) & _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_IFDIR)
-#define S_ISFIFO(m) ((m) & S_IFIFO)
-#define S_ISCHR(m) ((m) & S_IFCHR)
-#define S_ISBLK(m) ((m) & S_IFBLK)
-#define S_ISREG(m) ((m) & 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 */
-};
-
-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 */
-};
-#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;
-};
-#endif /* __MSVCRT__ */
-#define _STAT_DEFINED
-#endif /* _STAT_DEFINED */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int _fstat (int, struct _stat*);
-int _chmod (const char*, int);
-int _stat (const char*, struct _stat*);
-
-#if defined (__MSVCRT__)
-int _fstati64(int, struct _stati64 *);
-int _stati64(const char *, struct _stati64 *);
-#if !defined ( _WSTAT_DEFINED) /* also declared in wchar.h */
-int _wstat(const wchar_t*, struct _stat*);
-int _wstati64 (const wchar_t*, struct _stati64*);
-#define _WSTAT_DEFINED
-#endif /* _WSTAT_DEFIND */
-#endif /* __MSVCRT__ */
-
-#ifndef _NO_OLDNAMES
-
-/* These functions live in liboldnames.a. */
-int fstat (int, struct stat*);
-int chmod (const char*, int);
-int stat (const char*, struct stat*);
-
-#endif /* Not _NO_OLDNAMES */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _STAT_H_ */
-
-#endif /* Not __STRICT_ANSI__ */
-
diff --git a/winsup/mingw/include/sys/time.h b/winsup/mingw/include/sys/time.h
deleted file mode 100644
index 39d85f67b..000000000
--- a/winsup/mingw/include/sys/time.h
+++ /dev/null
@@ -1,3 +0,0 @@
-
-#include <time.h>
-
diff --git a/winsup/mingw/include/sys/timeb.h b/winsup/mingw/include/sys/timeb.h
deleted file mode 100644
index 696a33404..000000000
--- a/winsup/mingw/include/sys/timeb.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * timeb.h
- *
- * Support for the UNIX System V ftime system call.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#ifndef _TIMEB_H_
-#define _TIMEB_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#ifndef RC_INVOKED
-
-/*
- * TODO: Structure not tested.
- */
-struct _timeb
-{
- long time;
- short millitm;
- short timezone;
- short dstflag;
-};
-
-#ifndef _NO_OLDNAMES
-/*
- * TODO: Structure not tested.
- */
-struct timeb
-{
- long time;
- short millitm;
- short timezone;
- short dstflag;
-};
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* TODO: Not tested. */
-void _ftime (struct _timeb*);
-
-#ifndef _NO_OLDNAMES
-void ftime (struct timeb*);
-#endif /* Not _NO_OLDNAMES */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _TIMEB_H_ */
-
-#endif /* Not __STRICT_ANSI__ */
-
diff --git a/winsup/mingw/include/sys/types.h b/winsup/mingw/include/sys/types.h
deleted file mode 100644
index dce11f51d..000000000
--- a/winsup/mingw/include/sys/types.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * types.h
- *
- * The definition of constants, data types and global variables.
- *
- * This file is part of the Mingw32 package.
- *
- * Contributors:
- * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
- * Lots of types supplied by Pedro A. Aranda <paag@tid.es>
- *
- * 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$
- *
- */
-
-#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 __STRICT_ANSI__
-
-#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_ */
-
-#endif /* Not __STRICT_ANSI__ */
-
-#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 ed122d9dd..000000000
--- a/winsup/mingw/include/sys/unistd.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * This file is part of the Mingw32 package.
- *
- * unistd.h maps (roughly) to io.h
- */
-#ifndef __STRICT_ANSI__
-#include <io.h>
-#endif
-
diff --git a/winsup/mingw/include/sys/utime.h b/winsup/mingw/include/sys/utime.h
deleted file mode 100644
index 59d00fe2c..000000000
--- a/winsup/mingw/include/sys/utime.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * utime.h
- *
- * Support for the utime function.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#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
-
-int _utime (const char*, struct _utimbuf*);
-int _futime (int, struct _utimbuf*);
-
-/* The wide character version, only available for MSVCRT versions of the
- * C runtime library. */
-#ifdef __MSVCRT__
-int _wutime (const wchar_t*, struct _utimbuf*);
-#endif /* MSVCRT runtime */
-#ifndef _NO_OLDNAMES
-int utime (const char*, struct utimbuf*);
-#endif /* Not _NO_OLDNAMES */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _UTIME_H_ */
-
-#endif /* Not __STRICT_ANSI__ */
-
diff --git a/winsup/mingw/include/tchar.h b/winsup/mingw/include/tchar.h
deleted file mode 100644
index c2eb90527..000000000
--- a/winsup/mingw/include/tchar.h
+++ /dev/null
@@ -1,355 +0,0 @@
-/*
- * tchar.h
- *
- * 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).
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#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
-
-
-/*
- * 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;
-#endif /* Not RC_INVOKED */
-#define _TCHAR_DEFINED
-#endif
-
-
-/*
- * Enclose constant strings and literal characters in the _TEXT macro to make
- * them unicode constant strings when _UNICODE is defined.
- */
-#define _TEXT(x) L ## x
-
-#ifndef _T
-#define _T(x) L ## x
-#endif
-
-/* 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 _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 _tmktemp _wmktemp
-#define _topen _wopen
-#define _tremove _wremove
-#define _trename _wrename
-#define _tsopen _wsopen
-#define _tunlink _wunlink
-#define _tfinddata_t _wfinddata_t
-#define _tfindfirsti64 _wfindfirsti64
-#define _tfindnexti64 _wfindnexti64
-#define _tfinddatai64_t _wfinddatai64_t
-#endif /* __MSVCRT__ */
-
-#else /* Not _UNICODE */
-
-/*
- * TCHAR, the type you should use instead of char.
- */
-#ifndef _TCHAR_DEFINED
-#ifndef RC_INVOKED
-typedef char TCHAR;
-#endif
-#define _TCHAR_DEFINED
-#endif
-
-/*
- * Enclose constant strings and characters in the _TEXT macro.
- */
-#define _TEXT(x) x
-
-#ifndef _T
-#define _T(x) x
-#endif
-
-/* 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 _gettc getc
-#define _getts gets
-#define _puttc putc
-#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 _tunlink _unlink
-#define _tfinddata_t _finddata_t
-
-
-#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
-#endif /* __MSVCRT__ */
-
-#endif /* Not _UNICODE */
-
-#endif /* Not _TCHAR_H_ */
-
diff --git a/winsup/mingw/include/time.h b/winsup/mingw/include/time.h
deleted file mode 100644
index 53dd86a5f..000000000
--- a/winsup/mingw/include/time.h
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * time.h
- *
- * Date and time functions and types.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef _TIME_H_
-#define _TIME_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 */
-
-/*
- * Need a definition of time_t.
- */
-#include <sys/types.h>
-
-/*
- * 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 1000.0
-#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: Normally this is defined by the above include of sys/types.h
- */
-#ifndef _TIME_T_DEFINED
-typedef long time_t;
-#define _TIME_T_DEFINED
-#endif
-
-/*
- * A type for measuring processor time (in clock ticks).
- */
-#ifndef _CLOCK_T_DEFINED
-typedef long clock_t;
-#define _CLOCK_T_DEFINED
-#endif
-
-
-/*
- * 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 */
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-clock_t clock (void);
-time_t time (time_t*);
-double difftime (time_t, time_t);
-time_t 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...
- */
-char* asctime (const struct tm*);
-char* ctime (const time_t*);
-struct tm* gmtime (const time_t*);
-struct tm* localtime (const time_t*);
-
-
-size_t strftime (char*, size_t, const char*, const struct tm*);
-
-size_t wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
-
-#ifndef __STRICT_ANSI__
-extern void _tzset (void);
-
-#ifndef _NO_OLDNAMES
-extern void tzset (void);
-#endif
-
-size_t strftime(char*, size_t, const char*, const struct tm*);
-char* _strdate(char*);
-char* _strtime(char*);
-
-#endif /* Not __STRICT_ANSI__ */
-
-/*
- * _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 int* __p__daylight (void);
-extern long* __p__timezone (void);
-extern char** __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];
-
-#ifndef _WTIME_DEFINED
-
-/* wide function prototypes, also declared in wchar.h */
-
-wchar_t * _wasctime(const struct tm*);
-wchar_t * _wctime(const time_t*);
-wchar_t* _wstrdate(wchar_t*);
-wchar_t* _wstrtime(wchar_t*);
-
-#define _WTIME_DEFINED
-#endif /* _WTIME_DEFINED */
-
-
-#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 because it would conflict with sys/timeb.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 */
-
-#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 8f51f7661..000000000
--- a/winsup/mingw/include/unistd.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * This file is part of the Mingw32 package.
- *
- * unistd.h maps (roughly) to io.h
- */
-
-#ifndef __STRICT_ANSI__
-#include <io.h>
-#endif
-
diff --git a/winsup/mingw/include/values.h b/winsup/mingw/include/values.h
deleted file mode 100644
index 10e16a281..000000000
--- 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 48e203b24..000000000
--- a/winsup/mingw/include/varargs.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * varargs.h
- *
- * Old, non-ANSI facilities for stepping through a list of function
- * arguments of an unknown number and type.
- * TODO: Has not been tested. Essentially it copies the GCC version.
- *
- * NOTE: I believe GCC supplies a version of this header as well (in
- * addition to stdarg.h and others). The GCC version is more
- * complex, to deal with many alternate systems, but it is
- * probably more trustworthy overall. It would probably be
- * better to use the GCC version.
- *
- * NOTE: These are incompatible with the versions in stdarg.h and should
- * NOT be mixed! All new code should use the ANSI compatible versions.
- *
- * This file is 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 WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef __STRICT_ANSI__
-
-#ifndef _VARARGS_H_
-#define _VARARGS_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-/*
- * I was told that Win NT likes this.
- */
-#ifndef _VA_LIST_DEFINED
-#define _VA_LIST_DEFINED
-#endif
-
-#ifndef RC_INVOKED
-
-#ifndef _VA_LIST
-#define _VA_LIST
-typedef char* va_list;
-#endif
-
-/*
- * Amount of space required in an argument list (ie. the stack) for an
- * argument of type t.
- */
-#define __va_argsiz(t) \
- (((sizeof(t) + sizeof(int) - 1) / sizeof(int)) * sizeof(int))
-
-#define va_alist __builtin_va_alist
-
-/*
- * Used in old style argument lists IIRC. The ellipsis forces the compiler
- * to realize this is a vararg function.
- */
-#define va_dcl int __builtin_va_alist; ...
-
-#define va_start(ap) \
- ((ap) = ((va_list) &__builtin_va_alist))
-#define va_end(ap) ((void)0)
-
-
-/*
- * Increment ap to the next argument in the list while returing a
- * pointer to what ap pointed to first, which is of type t.
- *
- * We cast to void* and then to t* because this avoids a warning about
- * increasing the alignment requirement.
- */
-
-#define va_arg(ap, t) \
- (((ap) = (ap) + __va_argsiz(t)), \
- *((t*) (void*) ((ap) - __va_argsiz(t))))
-
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _VARARGS_H_ */
-
-#endif /* Not __STRICT_ANSI__ */
-
diff --git a/winsup/mingw/include/wchar.h b/winsup/mingw/include/wchar.h
deleted file mode 100644
index 9d598e80e..000000000
--- a/winsup/mingw/include/wchar.h
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * wchar.h
- *
- * 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.
- *
- * 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
- * DISCLAMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef _WCHAR_H_
-#define _WCHAR_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <sys/types.h>
-
-#define __need_size_t
-#define __need_wint_t
-#define __need_wchar_t
-#ifndef RC_INVOKED
-#include <stddef.h>
-#endif /* Not RC_INVOKED */
-
-#define WCHAR_MIN 0
-#define WCHAR_MAX ((wchar_t)-1)
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef __STRICT_ANSI__
-
-#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[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];
-};
-#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__)
-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 _wopen(const wchar_t*, int, ...);
-int _wsopen(const wchar_t*, int, int, ...);
-wchar_t * _wmktemp(wchar_t*);
-long _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
-int _wfindnexti64(long, struct _wfinddatai64_t*);
-#endif /* defined (__MSVCRT__) */
-#define _WIO_DEFINED
-#endif /* _WIO_DEFINED */
-
-#ifndef _WSTDIO_DEFINED
-/* also in stdio.h - keep in sync */
-int fwprintf (FILE*, const wchar_t*, ...);
-int wprintf (const wchar_t*, ...);
-int swprintf (wchar_t*, const wchar_t*, ...);
-int vfwprintf (FILE*, const wchar_t*, va_list);
-int vwprintf (const wchar_t*, va_list);
-int vswprintf (wchar_t*, const wchar_t*, va_list);
-int fwscanf (FILE*, const wchar_t*, ...);
-int wscanf (const wchar_t*, ...);
-int swscanf (wchar_t*, const wchar_t*, ...);
-wint_t fgetwc (FILE*);
-wint_t fputwc (wchar_t, FILE*);
-wint_t ungetwc (wchar_t, FILE*);
-
-#ifdef __MSVCRT__
-wchar_t* fgetws (wchar_t*, int, FILE*);
-int fputws (const wchar_t*, FILE*);
-wint_t getwc (FILE*);
-wint_t getwchar (void);
-wchar_t* _getws (wchar_t*);
-wint_t putwc (wint_t, FILE*);
-int _putws (const wchar_t*);
-wint_t putwchar (wint_t);
-
-FILE* _wfopen (const wchar_t*, const wchar_t*);
-FILE* _wfreopen (const wchar_t*, const wchar_t*, FILE*);
-FILE* _wfsopen(const wchar_t*, const wchar_t*, int);
-wchar_t* _wtmpnam (wchar_t*);
-wchar_t* _wtempnam (const wchar_t*, const wchar_t*);
-int _wrename(const wchar_t*, const wchar_t*);
-int _wremove (const wchar_t*)
-
-FILE* _wpopen(const wchar_t*, const wchar_t*)
-void _wperror(const wchar_t*);
-#endif /* __MSVCRT__ */
-#define _WSTDIO_DEFINED
-#endif /* _WSTDIO_DEFINED */
-
-#ifndef _WDIRECT_DEFINED
-/* Also in direct.h */
-#ifdef __MSVCRT__
-int _wchdir(const wchar_t*);
-wchar_t* _wgetcwd(wchar_t*, int);
-wchar_t* _wgetdcwd(int, wchar_t*, int);
-int _wmkdir(const wchar_t*);
-int _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 */
-};
-
-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 */
-};
-#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;
- };
-#endif /* __MSVCRT__ */
-#define _STAT_DEFINED
-#endif /* _STAT_DEFINED */
-
-#if !defined ( _WSTAT_DEFINED)
-/* also declared in sys/stat.h */
-#if defined __MSVCRT__
-int _wstat(const wchar_t*, struct _stat*);
-int _wstati64 (const wchar_t*, struct _stati64*);
-#endif /* __MSVCRT__ */
-#define _WSTAT_DEFINED
-#endif /* ! _WSTAT_DEFIND */
-
-#ifndef _WTIME_DEFINED
-#ifdef __MSVCRT__
-/* wide function prototypes, also declared in time.h */
-wchar_t * _wasctime(const struct tm*);
-wchar_t * _wctime(const time_t*);
-wchar_t* _wstrdate(wchar_t*);
-wchar_t* _wstrtime(wchar_t*);
-#endif /* __MSVCRT__ */
-size_t wcsftime(wchar_t*, size_t, const wchar_t*, const struct tm*);
-#define _WTIME_DEFINED
-#endif /* _WTIME_DEFINED */
-
-#ifndef _WLOCALE_DEFINED /* also declared in locale.h */
-wchar_t* _wsetlocale(int, const wchar_t*);
-#define _WLOCALE_DEFINED
-#endif
-
-
-#ifndef _NO_OLDNAMES
-
-/* Wide character versions. Also declared in io.h. */
-/* CHECK: Are these in the oldnames??? NO! */
-#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 wremove (const wchar_t *);
-int wopen(const wchar_t *, int, ...);
-int wsopen(const wchar_t *, int, int, ...);
-wchar_t * wmktemp(wchar_t *);
-#endif
-#endif /* _NO_OLDNAMES */
-
-#endif /* not __STRICT_ANSI__ */
-
-typedef int mbstate_t;
-typedef wchar_t _Wint_t;
-
-wint_t btowc(int);
-size_t mbrlen(const char *, size_t, mbstate_t *);
-size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *);
-size_t mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *);
-
-size_t wcrtomb(char *, wchar_t, mbstate_t *);
-size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *);
-int wctob(wint_t);
-
-#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 3dc5ae2df..000000000
--- a/winsup/mingw/include/wctype.h
+++ /dev/null
@@ -1,99 +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
- * DISCLAMED. 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 */
-int iswalnum(wint_t);
-int iswalpha(wint_t);
-int iswascii(wint_t);
-int iswcntrl(wint_t);
-int iswctype(wint_t, wctype_t);
-int is_wctype(wint_t, wctype_t); /* Obsolete! */
-int iswdigit(wint_t);
-int iswgraph(wint_t);
-int iswlower(wint_t);
-int iswprint(wint_t);
-int iswpunct(wint_t);
-int iswspace(wint_t);
-int iswupper(wint_t);
-int iswxdigit(wint_t);
-
-wchar_t towlower(wchar_t);
-wchar_t towupper(wchar_t);
-
-int isleadbyte (int);
-
-typedef wchar_t wctrans_t;
-wint_t towctrans(wint_t, wctrans_t);
-wctrans_t wctrans(const char*);
-wctype_t 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 8fa4652fa..000000000
--- a/winsup/mingw/init.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * init.c
- *
- * Code to initialize standard file handles and command line arguments.
- * This file is #included in both crt1.c and dllcrt1.c.
- *
- * This file is part of the Mingw32 package.
- *
- * 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.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-/*
- * 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 9344e52bc..000000000
--- 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/jamfile b/winsup/mingw/jamfile
deleted file mode 100644
index 1769d952d..000000000
--- a/winsup/mingw/jamfile
+++ /dev/null
@@ -1,72 +0,0 @@
-#
-# Jamfile for building various libraries and object files for the
-# Minimalist GNU-Win32 package.
-#
-# $Revision$
-# $Author$
-# $Date$
-#
-
-# 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 ea1dcd85e..000000000
--- a/winsup/mingw/main.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * main.c
- *
- * 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.
- *
- * This file is part of the Mingw32 package.
- *
- * 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.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#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/mkinstalldirs b/winsup/mingw/mkinstalldirs
deleted file mode 100755
index cc8783edc..000000000
--- 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-crtdll.def b/winsup/mingw/moldname-crtdll.def
deleted file mode 100644
index 3ead24436..000000000
--- a/winsup/mingw/moldname-crtdll.def
+++ /dev/null
@@ -1,135 +0,0 @@
-;
-; moldname-crtdll.def
-;
-; 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
-beep
-cabs
-chdir
-chmod
-chsize
-close
-creat
-cwait
-
-dup
-dup2
-ecvt
-eof
-execl
-execle
-execlp
-execlpe
-execv
-execve
-execvp
-execvpe
-fcvt
-fdopen
-fgetchar
-fgetwchar
-filelength
-fileno
-fpreset
-fputchar
-fputwchar
-fstat
-ftime
-gcvt
-getch
-getche
-getcwd
-getpid
-getw
-heapwalk
-hypot
-isatty
-itoa
-j0
-j1
-jn
-kbhit
-lseek
-ltoa
-memccpy
-memicmp
-mkdir
-mktemp
-open
-pclose
-popen
-putch
-putenv
-putw
-read
-rmdir
-searchenv
-seterrormode
-setmode
-sleep
-sopen
-spawnl
-spawnle
-spawnlp
-spawnlpe
-spawnv
-spawnve
-spawnvp
-spawnvpe
-stat
-strcmpi
-strdup
-stricmp
-stricoll
-strlwr
-strnicmp
-strnset
-strrev
-strset
-strupr
-swab
-tell
-tempnam
-
-; export tzname for both. See <time.h>
-tzname DATA
-tzset
-umask
-ungetch
-unlink
-utime
-wcsdup
-wcsicmp
-wcsicoll
-wcslwr
-wcsnicmp
-wcsnset
-wcsrev
-wcsset
-wcsupr
-write
-y0
-y1
-yn
diff --git a/winsup/mingw/moldname-msvcrt.def b/winsup/mingw/moldname-msvcrt.def
deleted file mode 100644
index 0e0d39c31..000000000
--- a/winsup/mingw/moldname-msvcrt.def
+++ /dev/null
@@ -1,139 +0,0 @@
-;
-; moldname-msvcrt.def
-;
-; 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
-beep
-cabs
-chdir
-chmod
-chsize
-close
-creat
-cwait
-
-daylight DATA
-
-dup
-dup2
-ecvt
-eof
-execl
-execle
-execlp
-execlpe
-execv
-execve
-execvp
-execvpe
-fcvt
-fdopen
-fgetchar
-fgetwchar
-filelength
-fileno
-fpreset
-fputchar
-fputwchar
-fstat
-ftime
-gcvt
-getch
-getche
-getcwd
-getpid
-getw
-heapwalk
-hypot
-isatty
-itoa
-j0
-j1
-jn
-kbhit
-lseek
-ltoa
-memccpy
-memicmp
-mkdir
-mktemp
-open
-pclose
-popen
-putch
-putenv
-putw
-read
-rmdir
-searchenv
-seterrormode
-setmode
-sleep
-sopen
-spawnl
-spawnle
-spawnlp
-spawnlpe
-spawnv
-spawnve
-spawnvp
-spawnvpe
-stat
-strcmpi
-strdup
-stricmp
-stricoll
-strlwr
-strnicmp
-strnset
-strrev
-strset
-strupr
-swab
-tell
-tempnam
-
-timezone DATA
-
-; export tzname for both. See <time.h>
-tzname DATA
-tzset
-umask
-ungetch
-unlink
-utime
-wcsdup
-wcsicmp
-wcsicoll
-wcslwr
-wcsnicmp
-wcsnset
-wcsrev
-wcsset
-wcsupr
-write
-y0
-y1
-yn
diff --git a/winsup/mingw/moldname.def b/winsup/mingw/moldname.def
deleted file mode 100644
index 369439b5c..000000000
--- a/winsup/mingw/moldname.def
+++ /dev/null
@@ -1,137 +0,0 @@
-;
-; moldname.def
-;
-; 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.
-;
-; NOTE: All the names currently included are available from both msvcrt and
-; crtdll. This may change in the future and require a new .def to be
-; created.
-;
-; 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$
-;
-EXPORTS
-access
-beep
-cabs
-chdir
-chmod
-chsize
-close
-creat
-cwait
-dup
-dup2
-ecvt
-eof
-execl
-execle
-execlp
-execlpe
-execv
-execve
-execvp
-execvpe
-fcvt
-fdopen
-fgetchar
-fgetwchar
-filelength
-fileno
-fputchar
-fputwchar
-fstat
-ftime
-gcvt
-getch
-getche
-getcwd
-getpid
-getw
-heapwalk
-hypot
-isatty
-itoa
-j0
-j1
-jn
-kbhit
-lseek
-ltoa
-memccpy
-memicmp
-mkdir
-mktemp
-open
-pclose
-popen
-putch
-putenv
-putw
-read
-rmdir
-searchenv
-seterrormode
-setmode
-sleep
-sopen
-spawnl
-spawnle
-spawnlp
-spawnlpe
-spawnv
-spawnve
-spawnvp
-spawnvpe
-stat
-strcmpi
-strdup
-stricmp
-stricoll
-strlwr
-strnicmp
-strnset
-strrev
-strset
-strupr
-swab
-tell
-tempnam
-tzset
-umask
-ungetch
-unlink
-utime
-wcsdup
-wcsicmp
-wcsicoll
-wcslwr
-wcsnicmp
-wcsnset
-wcsrev
-wcsset
-wcsupr
-write
-y0
-y1
-yn
diff --git a/winsup/mingw/moldname.def.in b/winsup/mingw/moldname.def.in
deleted file mode 100644
index 7e90cb374..000000000
--- a/winsup/mingw/moldname.def.in
+++ /dev/null
@@ -1,139 +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
-beep
-cabs
-chdir
-chmod
-chsize
-close
-creat
-cwait
-#if (__MSVCRT__)
-daylight DATA
-#endif
-dup
-dup2
-ecvt
-eof
-execl
-execle
-execlp
-execlpe
-execv
-execve
-execvp
-execvpe
-fcvt
-fdopen
-fgetchar
-fgetwchar
-filelength
-fileno
-fpreset
-fputchar
-fputwchar
-fstat
-ftime
-gcvt
-getch
-getche
-getcwd
-getpid
-getw
-heapwalk
-hypot
-isatty
-itoa
-j0
-j1
-jn
-kbhit
-lseek
-ltoa
-memccpy
-memicmp
-mkdir
-mktemp
-open
-pclose
-popen
-putch
-putenv
-putw
-read
-rmdir
-searchenv
-seterrormode
-setmode
-sleep
-sopen
-spawnl
-spawnle
-spawnlp
-spawnlpe
-spawnv
-spawnve
-spawnvp
-spawnvpe
-stat
-strcmpi
-strdup
-stricmp
-stricoll
-strlwr
-strnicmp
-strnset
-strrev
-strset
-strupr
-swab
-tell
-tempnam
-#if (__MSVCRT__)
-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
-write
-y0
-y1
-yn
diff --git a/winsup/mingw/msvcrt.def b/winsup/mingw/msvcrt.def
deleted file mode 100644
index 8a1b87210..000000000
--- a/winsup/mingw/msvcrt.def
+++ /dev/null
@@ -1,737 +0,0 @@
-;
-; msvcrt.def
-;
-; Exports from msvcrt.dll. Msvcrt.dll appears to be distributed with
-; Internet Explorer 4.0, and may be more common in the future, but
-; right now it seems like a risky choice. There are differences, although
-; they seem to be minor overall, between the exports from msvcrt and msvcrt20.
-; However, for most purposes the two sets are interchangable.
-;
-; NOTE: All exports, except for what appeared to be C++ mangled names,
-; are included. Not all functions have prototypes in the headers
-; (and some aren't functions at all).
-;
-; 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$
-;
-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
-__crtCompareStringA
-__crtGetLocaleInfoW
-__crtLCMapStringA
-__dllonexit
-__doserrno
-__fpecode
-__getmainargs
-__initenv DATA
-__isascii
-__iscsym
-__iscsymf
-__lc_codepage
-__lc_handle
-__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
-__pxcptinfoptrs
-__set_app_type
-__setlc_active
-__setusermatherr
-__threadhandle
-__threadid
-__toascii
-__unDName
-__unguarded_readlc_active
-__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
-_ctype DATA
-_cwait
-_daylight DATA
-_dstbias
-_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
-_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
-_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
-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
-
diff --git a/winsup/mingw/msvcrt20.def b/winsup/mingw/msvcrt20.def
deleted file mode 100644
index 2f27ea04b..000000000
--- a/winsup/mingw/msvcrt20.def
+++ /dev/null
@@ -1,719 +0,0 @@
-;
-; msvcrt20.def
-;
-; Exports from msvcrt20.dll. I am hoping that msvcrt20.dll will be reasonably
-; common on user systems (if not ubiquitous) so that, effectively, it can
-; be considered part of the OS. Apparently it was included with the Windows 95
-; distribution, so it should be present there at least.
-;
-; NOTE: All exports, except for what appeared to be C++ mangled names,
-; are included. Not all functions have prototypes in the headers
-; (and some aren't functions at all).
-;
-; 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$
-;
-EXPORTS
-_CIacos
-_CIasin
-_CIatan
-_CIatan2
-_CIcos
-_CIcosh
-_CIexp
-_CIfmod
-_CIlog
-_CIlog10
-_CIpow
-_CIsin
-_CIsinh
-_CIsqrt
-_CItan
-_CItanh
-_CxxThrowException
-_HUGE
-_XcptFilter
-__CxxFrameHandler
-__CxxLongjmpUnwind
-__STRINGTOLD
-__argc
-__argv
-__dllonexit
-__doserrno
-__fpecode
-__getmainargs
-__initenv
-__isascii
-__iscsym
-__iscsymf
-__lconv_init
-__mb_cur_max
-__p___argc
-__p___argv
-__p___initenv
-__p___mb_cur_max
-__p___wargv
-__p___winitenv
-__p__acmdln
-__p__amblksiz
-__p__commode
-__p__daylight
-__p__environ
-__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
-__pxcptinfoptrs
-__threadhandle
-__threadid
-__toascii
-__wargv
-__wgetmainargs
-__winitenv
-_abnormal_termination
-_access
-_acmdln
-_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
-_aexit_rtn
-_amsg_exit
-_assert
-_atodbl
-_atoldbl
-_beep
-_beginthread
-_beginthreadex
-_c_exit
-_cabs
-_cexit
-_cgets
-_chdir
-_chdrive
-_chgsign
-_chmod
-_chsize
-_clearfp
-_close
-_commit
-_commode
-_control87
-_controlfp
-_copysign
-_cprintf
-_cputs
-_creat
-_cscanf
-_ctype
-_cwait
-_daylight
-_dup
-_dup2
-_ecvt
-_endthread
-_endthreadex
-_environ
-_eof
-_errno
-_except_handler2
-_except_handler3
-_execl
-_execle
-_execlp
-_execlpe
-_execv
-_execve
-_execvp
-_execvpe
-_exit
-_expand
-_fcloseall
-_fcvt
-_fdopen
-_fgetchar
-_fgetwchar
-_filbuf
-_fileinfo
-_filelength
-_fileno
-_findclose
-_findfirst
-_findnext
-_finite
-_flsbuf
-_flushall
-_fmode
-_fpclass
-_fpieee_flt
-_fpreset
-_fputchar
-_fputwchar
-_fsopen
-_fstat
-_ftime
-_ftol
-_fullpath
-_futime
-_gcvt
-_get_osfhandle
-_getch
-_getche
-_getcwd
-_getdcwd
-_getdiskfree
-_getdllprocaddr
-_getdrive
-_getdrives
-_getmbcp
-_getpid
-_getsystime
-_getw
-_getws
-_global_unwind2
-_heapadd
-_heapchk
-_heapmin
-_heapset
-_heapused
-_heapwalk
-_hypot
-_initterm
-_iob
-_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
-_locking
-_logb
-_longjmpex
-_lrotl
-_lrotr
-_lsearch
-_lseek
-_ltoa
-_ltow
-_makepath
-_matherr
-_mbbtombc
-_mbbtype
-_mbccpy
-_mbcjistojms
-_mbcjmstojis
-_mbclen
-_mbctohira
-_mbctokata
-_mbctolower
-_mbctombb
-_mbctoupper
-_mbctype
-_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
-_mtlock
-_mtunlock
-_nextafter
-_onexit
-_open
-_open_osfhandle
-_osver
-_pclose
-_pctype
-_pgmptr
-_pipe
-_popen
-_purecall
-_putch
-_putenv
-_putw
-_putws
-_pwctype
-_read
-_rmdir
-_rmtmp
-_rotl
-_rotr
-_safe_fdiv
-_safe_fdivr
-_safe_fprem
-_safe_fprem1
-_scalb
-_searchenv
-__seh_longjmp_unwind@4
-_seterrormode
-_setjmp
-_setjmp3
-_setmbcp
-_setmode
-_setsystime
-_sleep
-_snprintf
-_snwprintf
-_sopen
-_spawnl
-_spawnle
-_spawnlp
-_spawnlpe
-_spawnv
-_spawnve
-_spawnvp
-_spawnvpe
-_splitpath
-_stat
-_statusfp
-_strcmpi
-_strdate
-_strdup
-_strerror
-_stricmp
-_stricoll
-_strlwr
-_strncoll
-_strnicmp
-_strnicoll
-_strnset
-_strrev
-_strset
-_strtime
-_strupr
-_swab
-_sys_errlist
-_sys_nerr
-_tccpy
-_tclen
-_tcschr
-_tcsclen
-_tcscmp
-_tcscspn
-_tcsdec
-_tcsicmp
-_tcsinc
-_tcslwr
-_tcsnbcnt
-_tcsncat
-_tcsnccat
-_tcsnccmp
-_tcsnccnt
-_tcsnccpy
-_tcsncicmp
-_tcsncmp
-_tcsncpy
-_tcsncset
-_tcsnextc
-_tcsnicmp
-_tcsninc
-_tcsnset
-_tcspbrk
-_tcsrchr
-_tcsrev
-_tcsset
-_tcsspn
-_tcsspnp
-_tcsstr
-_tcstok
-_tcsupr
-_tell
-_tempnam
-_timezone
-_tolower
-_toupper
-_tzname
-_tzset
-_ultoa
-_ultow
-_umask
-_ungetch
-_unlink
-_unloaddll
-_utime
-_vsnprintf
-_vsnwprintf
-_waccess
-_wasctime
-_wchdir
-_wchmod
-_wcmdln
-_wcreat
-_wcsdup
-_wcsicmp
-_wcsicoll
-_wcslwr
-_wcsncoll
-_wcsnicmp
-_wcsnicoll
-_wcsnset
-_wcsrev
-_wcsset
-_wcsupr
-_wctime
-_wenviron
-_wexecl
-_wexecle
-_wexeclp
-_wexeclpe
-_wexecv
-_wexecve
-_wexecvp
-_wexecvpe
-_wfdopen
-_wfindfirst
-_wfindnext
-_wfopen
-_wfreopen
-_wfsopen
-_wfullpath
-_wgetcwd
-_wgetdcwd
-_wgetenv
-_winmajor
-_winminor
-_winver
-_wmakepath
-_wmkdir
-_wmktemp
-_wopen
-_wperror
-_wpgmptr
-_wpopen
-_wputenv
-_wremove
-_wrename
-_write
-_wrmdir
-_wsearchenv
-_wsetlocale
-_wsopen
-_wspawnl
-_wspawnle
-_wspawnlp
-_wspawnlpe
-_wspawnv
-_wspawnve
-_wspawnvp
-_wspawnvpe
-_wsplitpath
-_wstat
-_wstrdate
-_wstrtime
-_wsystem
-_wtempnam
-_wtmpnam
-_wtoi
-_wtol
-_wunlink
-_wutime
-_y0
-_y1
-_yn
-abort
-abs
-acos
-asctime
-asin
-atan
-atan2
-atexit
-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
-
diff --git a/winsup/mingw/msvcrt40.def b/winsup/mingw/msvcrt40.def
deleted file mode 100644
index 7b1d2e84e..000000000
--- a/winsup/mingw/msvcrt40.def
+++ /dev/null
@@ -1,676 +0,0 @@
-EXPORTS
-$I10_OUTPUT
-_CIacos
-_CIasin
-_CIatan
-_CIatan2
-_CIcos
-_CIcosh
-_CIexp
-_CIfmod
-_CIlog
-_CIlog10
-_CIpow
-_CIsin
-_CIsinh
-_CIsqrt
-_CItan
-_CItanh
-_CxxThrowException
-_EH_prolog
-_HUGE
-_XcptFilter
-__CxxFrameHandler
-__CxxLongjmpUnwind
-__RTCastToVoid
-__RTDynamicCast
-__RTtypeid
-__STRINGTOLD
-__argc
-__argv
-__dllonexit
-__doserrno
-__fpecode
-__getmainargs
-__initenv
-__isascii
-__iscsym
-__iscsymf
-__lconv_init
-__mb_cur_max
-__p___argc
-__p___argv
-__p___initenv
-__p___mb_cur_max
-__p___wargv
-__p___winitenv
-__p__acmdln
-__p__amblksiz
-__p__commode
-__p__daylight
-__p__environ
-__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
-__pxcptinfoptrs
-__set_app_type
-__setusermatherr
-__threadhandle
-__threadid
-__toascii
-__unDName
-__wargv
-__wgetmainargs
-__winitenv
-_abnormal_termination
-_access
-_acmdln
-_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
-_aexit_rtn
-_amsg_exit
-_assert
-_atodbl
-_atoldbl
-_beep
-_beginthread
-_beginthreadex
-_c_exit
-_cabs
-_cexit
-_cgets
-_chdir
-_chdrive
-_chgsign
-_chmod
-_chsize
-_clearfp
-_close
-_commit
-_commode
-_control87
-_controlfp
-_copysign
-_cprintf
-_cputs
-_creat
-_cscanf
-_ctype
-_cwait
-_daylight
-_dup
-_dup2
-_ecvt
-_endthread
-_endthreadex
-_environ
-_eof
-_errno
-_except_handler2
-_except_handler3
-_execl
-_execle
-_execlp
-_execlpe
-_execv
-_execve
-_execvp
-_execvpe
-_exit
-_expand
-_fcloseall
-_fcvt
-_fdopen
-_fgetchar
-_fgetwchar
-_filbuf
-_fileinfo
-_filelength
-_filelengthi64
-_fileno
-_findclose
-_findfirst
-_findfirsti64
-_findnext
-_findnexti64
-_finite
-_flsbuf
-_flushall
-_fmode
-_fpclass
-_fpieee_flt
-_fpreset
-_fputchar
-_fputwchar
-_fsopen
-_fstat
-_fstati64
-_ftime
-_ftol
-_fullpath
-_futime
-_gcvt
-_get_osfhandle
-_getch
-_getche
-_getcwd
-_getdcwd
-_getdiskfree
-_getdllprocaddr
-_getdrive
-_getdrives
-_getmbcp
-_getpid
-_getsystime
-_getw
-_getws
-_global_unwind2
-_heapadd
-_heapchk
-_heapmin
-_heapset
-_heapused
-_heapwalk
-_hypot
-_initterm
-_iob
-_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
-_locking
-_logb
-_longjmpex
-_lrotl
-_lrotr
-_lsearch
-_lseek
-_lseeki64
-_ltoa
-_ltow
-_makepath
-_mbbtombc
-_mbbtype
-_mbccpy
-_mbcjistojms
-_mbcjmstojis
-_mbclen
-_mbctohira
-_mbctokata
-_mbctolower
-_mbctombb
-_mbctoupper
-_mbctype
-_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
-_mtlock
-_mtunlock
-_nextafter
-_onexit
-_open
-_open_osfhandle
-_osver
-_pclose
-_pctype
-_pgmptr
-_pipe
-_popen
-_purecall
-_putch
-_putenv
-_putw
-_putws
-_pwctype
-_read
-_rmdir
-_rmtmp
-_rotl
-_rotr
-_safe_fdiv
-_safe_fdivr
-_safe_fprem
-_safe_fprem1
-_scalb
-_searchenv
-_seh_longjmp_unwind
-_set_error_mode
-_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
-_sys_nerr
-_tell
-_telli64
-_tempnam
-_timezone
-_tolower
-_toupper
-_tzname
-_tzset
-_ultoa
-_ultow
-_umask
-_ungetch
-_unlink
-_unloaddll
-_utime
-_vsnprintf
-_vsnwprintf
-_waccess
-_wasctime
-_wchdir
-_wchmod
-_wcmdln
-_wcreat
-_wcsdup
-_wcsicmp
-_wcsicoll
-_wcslwr
-_wcsncoll
-_wcsnicmp
-_wcsnicoll
-_wcsnset
-_wcsrev
-_wcsset
-_wcsupr
-_wctime
-_wenviron
-_wexecl
-_wexecle
-_wexeclp
-_wexeclpe
-_wexecv
-_wexecve
-_wexecvp
-_wexecvpe
-_wfdopen
-_wfindfirst
-_wfindfirsti64
-_wfindnext
-_wfindnexti64
-_wfopen
-_wfreopen
-_wfsopen
-_wfullpath
-_wgetcwd
-_wgetdcwd
-_wgetenv
-_winmajor
-_winminor
-_winver
-_wmakepath
-_wmkdir
-_wmktemp
-_wopen
-_wperror
-_wpgmptr
-_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
-_wtol
-_wunlink
-_wutime
-_y0
-_y1
-_yn
-abort
-abs
-acos
-asctime
-asin
-atan
-atan2
-atexit
-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
-
diff --git a/winsup/mingw/mthr.c b/winsup/mingw/mthr.c
deleted file mode 100644
index 24855479a..000000000
--- a/winsup/mingw/mthr.c
+++ /dev/null
@@ -1,206 +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_thread __mingwthr_thread_t;
-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;
-};
-
-/* The list of key/dtor pairs for a particular thread. */
-struct __mingwthr_thread {
- DWORD thread_id;
- __mingwthr_key_t *keys;
- __mingwthr_thread_t *next;
-};
-
-static __mingwthr_thread_t *__mingwthr_thread_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 thread_id, DWORD key, void (*dtor) (void *))
-{
- __mingwthr_thread_t *threadp;
- __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;
-
- /* This may be called by multiple threads, and so we need to protect
- the whole process of adding the key/dtor pair. */
- EnterCriticalSection (&__mingwthr_cs);
-
- for (threadp = __mingwthr_thread_list;
- threadp && (threadp->thread_id != thread_id);
- threadp = threadp->next)
- ;
-
- if (threadp == NULL)
- {
- threadp = (__mingwthr_thread_t *)
- calloc (1, sizeof (__mingwthr_thread_t));
- if (threadp == NULL)
- {
- free (new_key);
- LeaveCriticalSection (&__mingwthr_cs);
- return -1;
- }
- threadp->thread_id = thread_id;
- threadp->next = __mingwthr_thread_list;
- __mingwthr_thread_list = threadp;
- }
-
- new_key->next = threadp->keys;
- threadp->keys = new_key;
-
- LeaveCriticalSection (&__mingwthr_cs);
-
-#ifdef DEBUG
- printf ("%s: allocating: (%ld, %ld, %x)\n",
- __FUNCTION__, thread_id, key, dtor);
-#endif
-
- return 0;
-}
-
-/*
- * __mingwthr_run_key_dtors (DWORD thread_id):
- *
- * 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 (DWORD thread_id)
-{
- __mingwthr_thread_t *prev_threadp, *threadp;
- __mingwthr_key_t *keyp;
-
-#ifdef DEBUG
- printf ("%s: Entering Thread id %ld\n", __FUNCTION__, thread_id);
-#endif
-
- /* Since this is called just once per thread, we only need to protect
- the part where we take out this thread's entry and reconfigure the
- list instead of wrapping the whole process in a critical section. */
- EnterCriticalSection (&__mingwthr_cs);
-
- prev_threadp = NULL;
- for (threadp = __mingwthr_thread_list;
- threadp && (threadp->thread_id != thread_id);
- prev_threadp = threadp, threadp = threadp->next)
- ;
-
- if (threadp == NULL)
- {
- LeaveCriticalSection (&__mingwthr_cs);
- return;
- }
-
- /* take the damned thread out of the chain. */
- if (prev_threadp == NULL) /* first entry hit. */
- __mingwthr_thread_list = threadp->next;
- else
- prev_threadp->next = threadp->next;
-
- LeaveCriticalSection (&__mingwthr_cs);
-
- for (keyp = threadp->keys; keyp; )
- {
- __mingwthr_key_t *prev_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
- prev_keyp = keyp;
- keyp = keyp->next;
- free (prev_keyp);
- }
-
- free (threadp);
-
-#ifdef DEBUG
- printf ("%s: Exiting Thread id %ld\n", __FUNCTION__, thread_id);
-#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)
- {
- DWORD thread_id = GetCurrentThreadId ();
- return __mingwthr_add_key_dtor (thread_id, key, dtor);
- }
-
- return 0;
-}
-
diff --git a/winsup/mingw/mthr_init.c b/winsup/mingw/mthr_init.c
deleted file mode 100644
index 23f7966a0..000000000
--- a/winsup/mingw/mthr_init.c
+++ /dev/null
@@ -1,76 +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 (DWORD);
-
- switch (reason)
- {
- case DLL_PROCESS_ATTACH:
- InitializeCriticalSection (&__mingwthr_cs);
- break;
-
- case DLL_PROCESS_DETACH:
- DeleteCriticalSection (&__mingwthr_cs);
- break;
-
- case DLL_THREAD_ATTACH:
- break;
-
- case DLL_THREAD_DETACH:
- __mingwthr_run_key_dtors (GetCurrentThreadId ());
- break;
- }
- return TRUE;
-}
-
diff --git a/winsup/mingw/mthr_stub.c b/winsup/mingw/mthr_stub.c
deleted file mode 100644
index b2d219c9e..000000000
--- a/winsup/mingw/mthr_stub.c
+++ /dev/null
@@ -1,37 +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
-#include <assert.h>
-
-/*
- * __mingwthr_register_key_dtor (DWORD key, void (*dtor) (void *))
- *
- * Public interface called by C++ exception handling mechanism in
- * libgcc (cf: __gthread_key_create).
- *
- * THIS SHOULD NEVER BE CALLED!
- *
- */
-
-int
-__mingwthr_key_dtor (DWORD key, void (*dtor) (void *))
-{
- assert (0);
- /* NOTREACHED */
- return 0;
-}
-
diff --git a/winsup/mingw/profile/Makefile.in b/winsup/mingw/profile/Makefile.in
deleted file mode 100644
index 1243b8a1d..000000000
--- a/winsup/mingw/profile/Makefile.in
+++ /dev/null
@@ -1,127 +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 gcrt0.c gmon.c gmon.h mcount.c \
-profil.c profil.h profile.h
-
-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?
-MNO_CYGWIN = @MNO_CYGWIN@
-
-# 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
-
-INCLUDES = -I$(srcdir) -I$(srcdir)/../include \
- -I$(srcdir)/../../w32api/include \
- -nostdinc -nostdinc++
-ALL_CFLAGS = $(CFLAGS) $(INCLUDES) $(MNO_CYGWIN)
-ALL_CXXFLAGS = $(CXXFLAGS) $(INCLUDES) $(MNO_CYGWIN)
-
-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 = gcrt$(CRT_ID).o
-
-LIBS = $(LIBGMON_A)
-DLLS =
-
-all: $(LIBGMON_A)
-
-$(LIBGMON_A): $(LIBGMON_OBJS) $(CRT0S)
- $(AR) $(ARFLAGS) $@ $(LIBGMON_OBJS)
- $(RANLIB) $@
-
-gcrt1.o: gcrt0.c
- $(CC) -U__MSVCRT__ -c -o $@ $(CPPFLAGS) $(CFLAGS) $?
-
-gcrt2.o: gcrt0.c
- $(CC) -D__MSVCRT__ -c -o $@ $(CPPFLAGS) $(CFLAGS) $?
-
-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) $(tooldir)/lib
- for i in $(LIBS); do \
- $(INSTALL_DATA) $$i $(tooldir)/lib/$$i ; \
- done
- for i in $(CRT0S); do \
- $(INSTALL_DATA) $$i $(tooldir)/lib/$$i ; \
- done
- for sub in . ; do \
- $(mkinstalldirs) $(tooldir)/include/$$sub ; \
- for i in $(srcdir)/$$sub/*.h ; do \
- $(INSTALL_DATA) $$i $(tooldir)/include/$$sub/`basename $$i` ; \
- done ; \
- done
-
-clean:
- -rm -f $(LIBGMON_OBJS) $(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/configure b/winsup/mingw/profile/configure
deleted file mode 100755
index 7d5b92b22..000000000
--- a/winsup/mingw/profile/configure
+++ /dev/null
@@ -1,1037 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=gcrt0.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-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
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:587: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:608: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:626: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-case "$target_os" in
-*mingw32msvc*)
- CRT_ID=2
- MNO_CYGWIN=
- RUNTIME=msvcrt
- THREAD_DLL=mingwm
- LIBM_A=libm.a
- LIBGMON_A=libgmon.a
- ;;
-*cygwin*)
- CRT_ID=1
- MNO_CYGWIN=-mno-cygwin
- RUNTIME=crtdll
- THREAD_DLL=mingwc
- # Do not build libm.a when building under Cygwin winsup. Otherwise, it'll
- # overwrite Cygwin's one. Likewise for libgmon.a.
- LIBM_A=
- LIBGMON_A=
- ;;
-*)
- # Build it for CRTDLL by default.
- CRT_ID=1
- MNO_CYGWIN=
- RUNTIME=crtdll
- THREAD_DLL=mingwc
- LIBM_A=libm.a
- LIBGMON_A=libgmon.a
- ;;
-esac
-
-
-
-
-
-
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:698: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@LD@%$LD%g
-s%@RANLIB@%$RANLIB%g
-s%@DLLTOOL@%$DLLTOOL%g
-s%@DLLWRAP@%$DLLWRAP%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@CRT_ID@%$CRT_ID%g
-s%@RUNTIME@%$RUNTIME%g
-s%@MNO_CYGWIN@%$MNO_CYGWIN%g
-s%@THREAD_DLL@%$THREAD_DLL%g
-s%@LIBM_A@%$LIBM_A%g
-s%@LIBGMON_A@%$LIBGMON_A%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
diff --git a/winsup/mingw/profile/configure.in b/winsup/mingw/profile/configure.in
deleted file mode 100644
index 8f2846e70..000000000
--- a/winsup/mingw/profile/configure.in
+++ /dev/null
@@ -1,77 +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.12)
-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
-
-case "$target_os" in
-*mingw32msvc*)
- CRT_ID=2
- MNO_CYGWIN=
- RUNTIME=msvcrt
- THREAD_DLL=mingwm
- LIBM_A=libm.a
- LIBGMON_A=libgmon.a
- ;;
-*cygwin*)
- CRT_ID=1
- MNO_CYGWIN=-mno-cygwin
- RUNTIME=crtdll
- THREAD_DLL=mingwc
- # Do not build libm.a when building under Cygwin winsup. Otherwise, it'll
- # overwrite Cygwin's one. Likewise for libgmon.a.
- LIBM_A=
- LIBGMON_A=
- ;;
-*)
- # Build it for CRTDLL by default.
- CRT_ID=1
- MNO_CYGWIN=
- RUNTIME=crtdll
- THREAD_DLL=mingwc
- LIBM_A=libm.a
- LIBGMON_A=libgmon.a
- ;;
-esac
-
-AC_SUBST(CRT_ID)
-AC_SUBST(RUNTIME)
-AC_SUBST(MNO_CYGWIN)
-AC_SUBST(THREAD_DLL)
-AC_SUBST(LIBM_A)
-AC_SUBST(LIBGMON_A)
-
-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 601b2758c..000000000
--- a/winsup/mingw/profile/gcrt0.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* gcrt0.c
-
- Copyright 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/*
- * 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 17398b8e2..000000000
--- a/winsup/mingw/profile/gmon.c
+++ /dev/null
@@ -1,284 +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");
-
-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;
- }
-#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
- 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 1f01bf418..000000000
--- 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 296f8c891..000000000
--- a/winsup/mingw/profile/mcount.c
+++ /dev/null
@@ -1,180 +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_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/mingw/profile/profil.c b/winsup/mingw/profile/profil.c
deleted file mode 100644
index d2946210e..000000000
--- a/winsup/mingw/profile/profil.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/* profil.c -- win32 profil.c equivalent
-
- Copyright 1998 Cygnus Solutions.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-/*
- * 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 1e3ef479f..000000000
--- a/winsup/mingw/profile/profil.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* profil.h: gprof profiling header file
-
- Copyright 1998 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/*
- * 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) + ((((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/mingw/profile/profile.h b/winsup/mingw/profile/profile.h
deleted file mode 100644
index d578657f8..000000000
--- a/winsup/mingw/profile/profile.h
+++ /dev/null
@@ -1,63 +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.
- */
-
-#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("movl 4(%%ebp),%0" : "=r" (selfpc)); \
- /* \
- * frompcindex = pc pushed by call into self. \
- */ \
- __asm("movl (%%ebp),%0;movl 4(%0),%0" : "=r" (frompcindex)); \
- _mcount(frompcindex, selfpc); \
-}
-
diff --git a/winsup/mingw/readme.txt b/winsup/mingw/readme.txt
deleted file mode 100644
index 4b680df48..000000000
--- 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 4bfdc2461..000000000
--- 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 bb4629fea..000000000
--- 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/dlltest/dll.c b/winsup/mingw/samples/dlltest/dll.c
deleted file mode 100644
index ba00fab3e..000000000
--- 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 4572319b3..000000000
--- 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 35faa4c32..000000000
--- 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 06a580a67..000000000
--- 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 584b5306b..000000000
--- 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 10a8f08b1..000000000
--- 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 fa0aa2856..000000000
--- 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 5278d0379..000000000
--- 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 bbb34a3c9..000000000
--- 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 c5a84dc01..000000000
--- 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 a46dd23a5..000000000
--- 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 70f5af5c7..000000000
--- 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 6733e5df7..000000000
--- 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 386e81c1c..000000000
--- 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 007b0f5d7..000000000
--- 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 bd5ccea30..000000000
--- 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 24e048c52..000000000
--- 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 6f29c3758..000000000
--- 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 f933c546e..000000000
--- 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 50c24cd06..000000000
--- 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 0e6222660..000000000
--- 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 14048f534..000000000
--- 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 52f93d1c1..000000000
--- a/winsup/mingw/samples/fmode/all.c
+++ /dev/null
@@ -1,46 +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 <fcntl.h>
-
-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 2c7f7d32f..000000000
--- a/winsup/mingw/samples/fmode/jamfile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-Main test.exe : test.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 873b853d3..000000000
--- 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 f19e7e0ec..000000000
--- a/winsup/mingw/samples/fmode/test.c
+++ /dev/null
@@ -1,31 +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 <fcntl.h> /* Required to get _fmode and _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/globbing/glob.c b/winsup/mingw/samples/globbing/glob.c
deleted file mode 100644
index 6bf8acaee..000000000
--- 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 ff3a585d6..000000000
--- 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 8bc4c82a3..000000000
--- 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 5e20de826..000000000
--- 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 f5395339d..000000000
--- 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 801d1d885..000000000
--- 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 e00201904..000000000
--- 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 9d98d8350..000000000
--- 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 bf20cc14f..000000000
--- 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 79937f745..000000000
--- 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 72b51b790..000000000
--- 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 1a414e649..000000000
--- 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 d2442850a..000000000
--- 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 b7ac3357e..000000000
--- 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 7f743bfcd..000000000
--- 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 0c0240685..000000000
--- 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 0a623d6b5..000000000
--- 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 cc44202ee..000000000
--- 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 30704e68d..000000000
--- 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 c7f9b2ae8..000000000
--- 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 332ac04b8..000000000
--- 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 af8884c9c..000000000
--- 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 8102fa067..000000000
--- 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 961496fc1..000000000
--- 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/string_old.c b/winsup/mingw/string_old.c
deleted file mode 100644
index c1baeb47e..000000000
--- a/winsup/mingw/string_old.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * string_old.c
- *
- * Oldnames from ANSI header string.h
- *
- * Some wrapper functions for those old name functions whose appropriate
- * equivalents are not simply underscore prefixed.
- *
- * 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>
-
-int
-strcasecmp (const char *sz1, const char *sz2)
-{
- return _stricmp (sz1, sz2);
-}
-
-int
-strncasecmp (const char *sz1, const char *sz2, size_t sizeMaxCompare)
-{
- return _strnicmp (sz1, sz2, sizeMaxCompare);
-}
-
-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 2966ef4e4..000000000
--- a/winsup/testsuite/ChangeLog
+++ /dev/null
@@ -1,40 +0,0 @@
-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 5e523d9eb..000000000
--- a/winsup/testsuite/Makefile.in
+++ /dev/null
@@ -1,187 +0,0 @@
-# Makefile.in for Cygwin's testsuite.
-# 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.
-
-# 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@
-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@
-
-TESTSUP_INCLUDES:=-I$(libltp_srcdir)/include
-
-INSTALL:=@INSTALL@
-INSTALL_PROGRAM:=@INSTALL_PROGRAM@
-
-#
-# --enable options from configure
-#
-
-CC:=@CC@
-# FIXME: Which is it, CC or CC_FOR_TARGET?
-CC_FOR_TARGET:=$(CC)
-#CFLAGS:=@CFLAGS@ -MD -Wno-write-strings $(TESTSUP_INCLUDES)
-ifneq (,$(CFLAGS))
- override CFLAGS+= -MD $(TESTSUP_INCLUDES)
-else
- CFLAGS:=@CFLAGS@ -MD $(TESTSUP_INCLUDES)
-endif
-CXXFLAGS:=@CXXFLAGS@
-
-AR:=@AR@
-AR_FLAGS:=qv
-RANLIB:=@RANLIB@
-LD:=@LD@
-DLLTOOL:=@DLLTOOL@
-WINDRES:=@WINDRES@
-AS:=@AS@
-
-#
-# Include common definitions for winsup directory
-#
-include $(srcdir)/../Makefile.common
-
-INSTALL_DATA:=$(SHELL) $(updir1)/install-sh -c
-
-# 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 =
-
-ifdef VERBOSE
- RUNTESTFLAGS = -v
-endif
-
-RUNTIME=$(cygwin_build)/new-cygwin1.dll $(cygwin_build)/new-libcygwin.a $(cygwin_build)/cygrun.exe
-
-TESTSUP_LIB_NAME:=libltp.a
-TESTSUP_OFILES:=${sort ${addsuffix .o,${basename ${notdir ${wildcard $(libltp_srcdir)/lib/*.c}}}}}
-
-.PHONY: all force dll_ofiles install all_target install_target all_host install_host
-
-.SUFFIXES:
-.SUFFIXES: .c .cc .def .a .o .d
-
-all_host=@all_host@
-install_host=@install_host@
-
-all: $(TESTSUP_LIB_NAME)
-
-force:
-
-install:
-
-install_host:
-
-clean:
- -rm -f *.o *.dll *.a *.exp junk *.bak *.base *.exe testsuite/*
-
-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 \"\"" >> ./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 new-cygwin1.dll
-
-check: $(TESTSUP_LIB_NAME) $(RUNTIME) testsuite/site.exp
- -rootme=`pwd`; export rootme; \
- srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
- cd testsuite; \
- EXPECT=${EXPECT} ; export EXPECT ; \
- if [ -f $${rootme}/../expect/expect ] ; then \
- TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \
- export TCL_LIBRARY ; fi ; \
- PATH=$${rootme}/../cygwin:$${PATH} ;\
- $(RUNTEST) --tool winsup $(RUNTESTFLAGS)
-
-#
-
diff --git a/winsup/testsuite/README b/winsup/testsuite/README
deleted file mode 100644
index 92ede0dc7..000000000
--- a/winsup/testsuite/README
+++ /dev/null
@@ -1,42 +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 new-libcygwin.a, which is just
-like libcygwin.a, except that it wants new-cygwin1.dll, not
-cygwin1.dll. The testsuite adds the winsup build directory to the
-PATH so that new-cygwin1.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 begin with "xf-" will be *expected* to fail, and
-will "fail" if they compile, run, and return zero. Note that the
-*only* purpose for adding this feature is to test the testing
-framework itself. All real tests should NOT be named xf-*, and should
-pass for real (compile, run, return 0) if the dll is working
-correctly. Do not use xf-* to "silence" a failure that you know isn't
-going to get fixed for a while; let it just keep failing. There are
-five "sample" tests that demonstrate how the framework works and what
-happens to each condition.
-
-"make check" will only work if you run it *on* an NT machine.
-Cross-checking is not supported.
diff --git a/winsup/testsuite/config/default.exp b/winsup/testsuite/config/default.exp
deleted file mode 100644
index 5bbaf8d1f..000000000
--- a/winsup/testsuite/config/default.exp
+++ /dev/null
@@ -1,14 +0,0 @@
-proc winsup_version {} {
- global env
- global rootme
- puts stderr "root=$rootme"
- clone_output "\n[exec grep ^%%% $rootme/../cygwin/new-cygwin1.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 c57fde2cc..000000000
--- a/winsup/testsuite/configure
+++ /dev/null
@@ -1,1193 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=Makefile.in
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:529: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:559: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:610: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:642: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 653 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:684: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:689: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:717: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- 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 $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:749: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 764 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 781 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 798 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
-else
- ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:854: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:875: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:901: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CC@%$CC%g
-s%@CPP@%$CPP%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@AR@%$AR%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/winsup/testsuite/configure.in b/winsup/testsuite/configure.in
deleted file mode 100755
index 6d198437d..000000000
--- 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.12)
-AC_INIT(Makefile.in)
-
-AC_PROG_CC
-AC_PROG_CPP
-AC_CHECK_TOOL(AR,ar)
-
-AC_OUTPUT(Makefile)
diff --git a/winsup/testsuite/libltp/include/dataascii.h b/winsup/testsuite/libltp/include/dataascii.h
deleted file mode 100644
index cd75245e4..000000000
--- 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 b71fbc0c1..000000000
--- 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 8c9a94835..000000000
--- 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 effd5d66e..000000000
--- 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 87fe6ff1d..000000000
--- 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 74f841cae..000000000
--- 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 d3e1cceb8..000000000
--- 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 4808ca258..000000000
--- 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 131311b44..000000000
--- 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(char *cmd, 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 100d37df5..000000000
--- 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 9c0935ec5..000000000
--- 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 acfdfdf1b..000000000
--- a/winsup/testsuite/libltp/include/test.h
+++ /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$ */
-
-#ifndef __TEST_H__
-#define __TEST_H__
-
-#include <stdio.h>
-#include <signal.h>
-#include <unistd.h>
-
-#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, 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();
-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 ac0d5705c..000000000
--- 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 232e67a98..000000000
--- 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 {
- 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.
- ***********************************************************************/
-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;
-
-#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 784d5b3eb..000000000
--- 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 5bc201852..000000000
--- 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 f09c2c86c..000000000
--- 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 9414eae90..000000000
--- 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 7d4a8b68f..000000000
--- a/winsup/testsuite/libltp/lib/forker.c
+++ /dev/null
@@ -1,285 +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 "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 3b4105743..000000000
--- a/winsup/testsuite/libltp/lib/get_high_address.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/* $Header$ */
-
-/*
- * (C) COPYRIGHT CRAY RESEARCH, INC.
- * UNPUBLISHED PROPRIETARY INFORMATION.
- * ALL RIGHTS RESERVED.
- */
-
-#include <unistd.h>
-
-char *
-get_high_address()
-{
- return (char *)sbrk(0) + 16384;
-}
diff --git a/winsup/testsuite/libltp/lib/open_flags.c b/winsup/testsuite/libltp/lib/open_flags.c
deleted file mode 100644
index 3105955d4..000000000
--- 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 c40181395..000000000
--- a/winsup/testsuite/libltp/lib/parse_opts.c
+++ /dev/null
@@ -1,878 +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 <stdlib.h>
-#include <string.h>
-#include <sys/param.h>
-#include <sys/signal.h>
-#include <sys/types.h>
-#include <unistd.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
-
-/* 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;
-
-/*
- * 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;
-
-
-
-/* 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 7f4d5873e..000000000
--- 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 63122c446..000000000
--- 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 d6570cb59..000000000
--- a/winsup/testsuite/libltp/lib/search_path.c
+++ /dev/null
@@ -1,251 +0,0 @@
-/* $Header$ */
-
-/*
- * (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)
-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 beecb71b6..000000000
--- 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 6f0d775dd..000000000
--- 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 7f0a003f3..000000000
--- a/winsup/testsuite/libltp/lib/tst_res.c
+++ /dev/null
@@ -1,964 +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 <string.h>
-#include <stdio.h> /* for I/O functions, BUFSIZ */
-#include <stdlib.h> /* for getenv() */
-#include <stdarg.h> /* for varargs stuff */
-#include <unistd.h> /* for access() */
-#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(char *filename);
-
-
-/*
- * Define some static/global variables.
- */
-static FILE *T_out = NULL; /* tst_res() output file descriptor */
-static 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, 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)
-{
- 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(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 cccc2c7ee..000000000
--- a/winsup/testsuite/libltp/lib/tst_sig.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 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 SIGSEGV:
- 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 ef1e2cd70..000000000
--- a/winsup/testsuite/libltp/lib/tst_tmpdir.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 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 <stdio.h>
-#include <errno.h>
-#include <stdlib.h> /* for getenv() */
-#include <string.h> /* for string functions */
-#include <unistd.h> /* for sysconf(), getcwd(), rmdir() */
-#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 316dfe79b..000000000
--- 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/crlf.c b/winsup/testsuite/winsup.api/crlf.c
deleted file mode 100644
index 5dbc2227b..000000000
--- 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>
-
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-#ifndef O_TEXT
-#define O_TEXT 0
-#endif
-
-int errors = 0;
-
-#define num_commands (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(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, 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, 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(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(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)
-{
- char *readmode = "rb";
- char *writemode = "wb";
- FILE *file = 0;
- int i, fd;
- struct stat st;
- 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/devzero.c b/winsup/testsuite/winsup.api/devzero.c
deleted file mode 100644
index 85a2615b1..000000000
--- a/winsup/testsuite/winsup.api/devzero.c
+++ /dev/null
@@ -1,113 +0,0 @@
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-main()
-{
- int fd, r, w, 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 d286f90bd..000000000
--- 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("%6d", 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 c84eaad28..000000000
--- a/winsup/testsuite/winsup.api/known_bugs.tcl
+++ /dev/null
@@ -1,8 +0,0 @@
-set xfail_list [list dup03 dup05 \
- fcntl05 fcntl07B fcntl09 fcntl10 \
- fsync01 gethostid01 lseek04 mknod01 \
- setgroups01 setregid01 setreuid01 setuid02 \
- ulimit01 unlink06 \
- 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 aaf50cf32..000000000
--- a/winsup/testsuite/winsup.api/ltp/access01.c
+++ /dev/null
@@ -1,302 +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 <string.h>
-#include <sys/unistd.h>
-#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();
-
-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];
-
-static struct test_case_t {
- char *file;
- int mode;
- 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);
-
-/***********************************************************************
- * Main
- ***********************************************************************/
-int main(int ac, char **av)
-{
- 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 dc7dc5ee4..000000000
--- a/winsup/testsuite/winsup.api/ltp/access03.c
+++ /dev/null
@@ -1,507 +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 <unistd.h>
-#include "test.h"
-#include "usctest.h"
-
-
-void setup();
-void cleanup();
-
-
-char *get_high_address();
-
-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/alarm01.c b/winsup/testsuite/winsup.api/ltp/alarm01.c
deleted file mode 100644
index ac754e326..000000000
--- 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();
-
-
-
-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 7c608da66..000000000
--- 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 alarm_received();
-
-
-
-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 */
- 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 275301374..000000000
--- 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();
-
-
-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/asyncio02.c b/winsup/testsuite/winsup.api/ltp/asyncio02.c
deleted file mode 100644
index b7ccb62f5..000000000
--- a/winsup/testsuite/winsup.api/ltp/asyncio02.c
+++ /dev/null
@@ -1,365 +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 <stdlib.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();
-int testrun(int flag, int bytes, int ti);
-
-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];
-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 b59fd9338..000000000
--- a/winsup/testsuite/winsup.api/ltp/chdir02.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 : 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();
-
-
-
-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};
-
-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/chmod02.c b/winsup/testsuite/winsup.api/ltp/chmod02.c
deleted file mode 100644
index 41c3485e8..000000000
--- 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();
-
-
-
-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];
-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 1060637e2..000000000
--- 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();
-
-
-
-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;
-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/close08.c b/winsup/testsuite/winsup.api/ltp/close08.c
deleted file mode 100644
index 7c9567fdb..000000000
--- 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();
-
-
-
-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/creat09.c b/winsup/testsuite/winsup.api/ltp/creat09.c
deleted file mode 100644
index 0caa87973..000000000
--- 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();
-
-
-
-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 d065f9dc1..000000000
--- 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();
-
-
-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 3aac3e9f8..000000000
--- 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();
-
-
-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/dup04.c b/winsup/testsuite/winsup.api/ltp/dup04.c
deleted file mode 100644
index 85540db35..000000000
--- 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();
-
-
-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 4f889cdcd..000000000
--- 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();
-
-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 b23716a0f..000000000
--- 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();
-
-
-
-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 f29d34f6a..000000000
--- 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();
-
-
-
-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", 0, 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 6bf97d4e1..000000000
--- 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();
-
-
-
-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", 0);
- /* 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 b833e1c4f..000000000
--- a/winsup/testsuite/winsup.api/ltp/execv01.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 : 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 <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();
-
-
-
-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 */
-char *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 1abe72f23..000000000
--- 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();
-
-
-
-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 */
-char *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 6f645d68d..000000000
--- 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();
-
-
-
-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 */
-char *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/fchmod01.c b/winsup/testsuite/winsup.api/ltp/fchmod01.c
deleted file mode 100644
index ffcf37f66..000000000
--- 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();
-
-
-
-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;
-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 045f84892..000000000
--- 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();
-
-
-
-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 14fc1b61d..000000000
--- 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();
-
-
-
-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 93a9b9b1f..000000000
--- 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();
-
-
-
-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 d70843071..000000000
--- 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();
-
-
-
-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 86f492aa7..000000000
--- 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();
-
-
-
-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 c48e475ba..000000000
--- a/winsup/testsuite/winsup.api/ltp/fcntl07.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 : 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 <string.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <stdlib.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 help();
-
-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"
-char *File1 = DEFAULT_FILE;
-
-#define DEFAULT_SUBPROG "test_open"
-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
- };
-
-char *testfdtypes[] = {
- "regular file",
- "write side of system pipe",
- };
-
-int test_open(char *arg);
-int do_exec(char *prog, int fd, 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) */
- 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(char *prog, int fd, 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, 0);
-
- /* 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/fcntl07B.c b/winsup/testsuite/winsup.api/ltp/fcntl07B.c
deleted file mode 100644
index 51b88c278..000000000
--- a/winsup/testsuite/winsup.api/ltp/fcntl07B.c
+++ /dev/null
@@ -1,427 +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 <unistd.h>
-#include <stdlib.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 help();
-
-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"
-char *File1 = DEFAULT_FILE;
-
-#define DEFAULT_SUBPROG "test_open"
-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
-#define FIFONAME "FiFo"
-
-int *testfds[] = {
- &npipe_fd, 0
- };
-
-char *testfdtypes[] = {
- "named pipe"
- };
-
-int test_open(char *arg);
-int do_exec(char *prog, int fd, 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) */
- 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(char *prog, int fd, 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, 0);
-
- /* 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;
-
- extern char *optarg;
- extern int optind;
-
- 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 c4cbad461..000000000
--- 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();
-
-#ifndef O_NDELAY
-#define O_NDELAY 0
-#endif
-
-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 f10df71fe..000000000
--- a/winsup/testsuite/winsup.api/ltp/fcntl09.c
+++ /dev/null
@@ -1,272 +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();
-
-
-
-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;
-
- flocks.l_type = F_RDLCK | F_WRLCK;
- /*
- * 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 8b23575b3..000000000
--- a/winsup/testsuite/winsup.api/ltp/fcntl10.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 : 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();
-
-
-
-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;
-
- flocks.l_type = F_RDLCK | F_WRLCK;
- /*
- * 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 dfd412a5f..000000000
--- a/winsup/testsuite/winsup.api/ltp/fork01.c
+++ /dev/null
@@ -1,317 +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 <stdlib.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"
-
-
-
-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/fork04.c b/winsup/testsuite/winsup.api/ltp/fork04.c
deleted file mode 100644
index 3725d9f0f..000000000
--- a/winsup/testsuite/winsup.api/ltp/fork04.c
+++ /dev/null
@@ -1,405 +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 <stdlib.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <unistd.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"
-
-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 */
-char *environ_list[] = {"TERM","NoTSetzWq","TESTPROG"};
-#define NUMBER_OF_ENVIRON 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("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/fpathconf01.c b/winsup/testsuite/winsup.api/ltp/fpathconf01.c
deleted file mode 100644
index bc4f2b2ad..000000000
--- a/winsup/testsuite/winsup.api/ltp/fpathconf01.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 : 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 <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-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
-{
- 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 9cb7959e4..000000000
--- a/winsup/testsuite/winsup.api/ltp/fstat01.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 : 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();
-
-
-
-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/fsync01.c b/winsup/testsuite/winsup.api/ltp/fsync01.c
deleted file mode 100644
index 57ddd5f98..000000000
--- 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();
-
-
-
-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;
-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/getegid01.c b/winsup/testsuite/winsup.api/ltp/getegid01.c
deleted file mode 100644
index d2c8a5240..000000000
--- 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();
-
-
-
-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 b4840f52c..000000000
--- 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();
-
-
-
-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 fcde734a0..000000000
--- 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();
-
-
-
-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/getgroups01.c b/winsup/testsuite/winsup.api/ltp/getgroups01.c
deleted file mode 100644
index 6b935f293..000000000
--- a/winsup/testsuite/winsup.api/ltp/getgroups01.c
+++ /dev/null
@@ -1,315 +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 <unistd.h>
-#include <signal.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/param.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup();
-
-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 b517c7617..000000000
--- 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();
-
-
-
-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 2d4a18755..000000000
--- 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();
-
-
-
-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 2f94db725..000000000
--- 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();
-
-
-
-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/getpgrp01.c b/winsup/testsuite/winsup.api/ltp/getpgrp01.c
deleted file mode 100644
index bd3a89117..000000000
--- 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();
-
-
-
-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 58d6b0579..000000000
--- 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();
-
-
-
-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/getppid01.c b/winsup/testsuite/winsup.api/ltp/getppid01.c
deleted file mode 100644
index 9eab5dfc2..000000000
--- 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();
-
-
-
-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/getuid01.c b/winsup/testsuite/winsup.api/ltp/getuid01.c
deleted file mode 100644
index 58920ed34..000000000
--- 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();
-
-
-
-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/kill09.c b/winsup/testsuite/winsup.api/ltp/kill09.c
deleted file mode 100644
index 9d6b0a181..000000000
--- 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 alarm_handler(int sig);
-
-
-
-
-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 61294f16f..000000000
--- 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();
-
-
-
-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 7b4395853..000000000
--- 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();
-
-
-
-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 7f2390139..000000000
--- 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();
-
-
-extern char *get_high_address();
-
-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 {
- char *file1;
- char *desc1;
- char *file2;
- 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 */
- char *fname1, *fname2;
- 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 5078a6a3f..000000000
--- 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 help();
-
-
-
-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 32756fedd..000000000
--- a/winsup/testsuite/winsup.api/ltp/lseek01.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 : 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 <unistd.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup();
-
-
-
-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 9ad906b5b..000000000
--- a/winsup/testsuite/winsup.api/ltp/lseek02.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 : 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 <unistd.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup();
-
-
-
-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/lseek04.c b/winsup/testsuite/winsup.api/ltp/lseek04.c
deleted file mode 100644
index d1c3c36a1..000000000
--- a/winsup/testsuite/winsup.api/ltp/lseek04.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 : 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 <unistd.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup();
-
-
-
-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 0d51643f0..000000000
--- a/winsup/testsuite/winsup.api/ltp/lseek05.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 : 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 <unistd.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup();
-
-
-
-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/lstat02.c b/winsup/testsuite/winsup.api/ltp/lstat02.c
deleted file mode 100644
index f6b97d78a..000000000
--- 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();
-
-
-
-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 80f9bb6cc..000000000
--- a/winsup/testsuite/winsup.api/ltp/mkdir01.c
+++ /dev/null
@@ -1,271 +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 <unistd.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup();
-
-
-char *get_high_address();
-
-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 8378aba34..000000000
--- a/winsup/testsuite/winsup.api/ltp/mkdir08.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 : 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 <unistd.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-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 32c7fe1e2..000000000
--- a/winsup/testsuite/winsup.api/ltp/mknod01.c
+++ /dev/null
@@ -1,274 +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 <unistd.h>
-#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();
-
-
-
-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();
-
- /* Check that user is root */
- if ( geteuid() != 0 )
- tst_brkm(TBROK, cleanup, "Must be root for this test!");
-
- /* 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/nice05.c b/winsup/testsuite/winsup.api/ltp/nice05.c
deleted file mode 100644
index 602971f8a..000000000
--- a/winsup/testsuite/winsup.api/ltp/nice05.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 : 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 <unistd.h>
-#include <sys/types.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup();
-
-
-
-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/open03.c b/winsup/testsuite/winsup.api/ltp/open03.c
deleted file mode 100644
index b8dce9cee..000000000
--- 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();
-
-
-
-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 f87c6e239..000000000
--- a/winsup/testsuite/winsup.api/ltp/pathconf01.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 : 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 <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-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;
-char *path = "/tmp";
-
-struct pathconf_args
-{
- 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 28187c39f..000000000
--- 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();
-
-
-
-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/readlink02.c b/winsup/testsuite/winsup.api/ltp/readlink02.c
deleted file mode 100644
index c0ed6f154..000000000
--- 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();
-
-
-
-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/rename02.c b/winsup/testsuite/winsup.api/ltp/rename02.c
deleted file mode 100644
index 28890f119..000000000
--- 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();
-
-
-
-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/rmdir04.c b/winsup/testsuite/winsup.api/ltp/rmdir04.c
deleted file mode 100644
index 5cf84f770..000000000
--- a/winsup/testsuite/winsup.api/ltp/rmdir04.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 : 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 <unistd.h>
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-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/select01.c b/winsup/testsuite/winsup.api/ltp/select01.c
deleted file mode 100644
index 6ff0fe87b..000000000
--- 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();
-
-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/setgid01.c b/winsup/testsuite/winsup.api/ltp/setgid01.c
deleted file mode 100644
index 50b339d03..000000000
--- 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();
-
-
-
-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 dc7bd1d47..000000000
--- a/winsup/testsuite/winsup.api/ltp/setgroups01.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 : 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 <unistd.h>
-#include <grp.h>
-
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup();
-
-
-
-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 e580a34f7..000000000
--- a/winsup/testsuite/winsup.api/ltp/setpgid01.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 : 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();
-
-
-
-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 e247f6c61..000000000
--- 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();
-
-
-
-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 67f3bae4a..000000000
--- 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();
-
-
-
-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 4437108c8..000000000
--- 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();
-
-
-
-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 65576af62..000000000
--- 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();
-
-
-
-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/stat05.c b/winsup/testsuite/winsup.api/ltp/stat05.c
deleted file mode 100644
index ba102e3cb..000000000
--- 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();
-
-
-
-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/symlink01.c b/winsup/testsuite/winsup.api/ltp/symlink01.c
deleted file mode 100644
index d0ad0d5ac..000000000
--- a/winsup/testsuite/winsup.api/ltp/symlink01.c
+++ /dev/null
@@ -1,2024 +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 <stdio.h>
-#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 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 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
-{
- char *tcid;
- int test_fail;
- int errno_val;
- int pass_msg;
- int (*test_setup)();
- int (*ck_test)();
- 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
-{
- char *tcid;
- char *syscall;
- int test_cases; /* number of entries in test_objects array */
- struct all_test_cases *tc_ptr;
- 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;
-char *TCID;
-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;
-
- }
-#ifndef ALL
- else {
- TCID = DEFAULT_TCID;
- Selectedtests = DEFAULT_TCID;
- }
-#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;
-{
- int 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 *cwd, *getcwd();
-
- if ((cwd = getcwd((char *)NULL, 64)) == 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);
- }
- cwd = getcwd((char *)NULL, 64);
- 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++) {
-
- Buffer[0]='\0';
-
- /*
- * If running all test cases for all tcid, set the TCID if needed.
- */
- if ( Selectedtests == NULL ) {
- if ( strcmp(tcs->tcid, tc_ptr->tcid) != 0 ) {
- TCID = tc_ptr->tcid;
- Tst_count=0;
- }
- }
- /*
- * Insure that we are executing the correct tcs test case
- */
- if (strcmp(tcs->tcid, tc_ptr->tcid) != 0) {
- tst_resm(TBROK, "%s TCID attempted to execute %s %d %d test case",
- tcs->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));
- }
- 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));
- }
- 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));
- }
- 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 *cwd, *getcwd();
- 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((char *)NULL, 64)) == 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:%d) and of\n\t\t\
-%s (ino:%d), 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()
-{
- int 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 9fbecf202..000000000
--- 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();
-
-
-
-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/sync01.c b/winsup/testsuite/winsup.api/ltp/sync01.c
deleted file mode 100644
index a32b24ba8..000000000
--- 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();
-
-
-
-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/time01.c b/winsup/testsuite/winsup.api/ltp/time01.c
deleted file mode 100644
index 570dedc6b..000000000
--- 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();
-
-
-
-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/times01.c b/winsup/testsuite/winsup.api/ltp/times01.c
deleted file mode 100644
index 0d8d1d0ca..000000000
--- 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();
-
-
-
-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/ulimit01.c b/winsup/testsuite/winsup.api/ltp/ulimit01.c
deleted file mode 100644
index 655c9e32e..000000000
--- 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();
-
-
-
-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 04b385145..000000000
--- 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();
-
-
-
-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/uname01.c b/winsup/testsuite/winsup.api/ltp/uname01.c
deleted file mode 100644
index e2f8f8b0c..000000000
--- 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();
-
-
-
-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 63e97df89..000000000
--- 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();
-
-
-
-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 3d0690383..000000000
--- a/winsup/testsuite/winsup.api/ltp/unlink06.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 : 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 <unistd.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void create_file();
-void cleanup();
-
-
-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 889b60959..000000000
--- a/winsup/testsuite/winsup.api/ltp/unlink07.c
+++ /dev/null
@@ -1,329 +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 <unistd.h>
-#include <sys/param.h> /* for PATH_MAX */
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup();
-
-
-extern char *get_high_address();
-
-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 {
- char *pathname;
- 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 */
- char *fname;
- 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/wait02.c b/winsup/testsuite/winsup.api/ltp/wait02.c
deleted file mode 100644
index 8b4f41b09..000000000
--- 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();
-
-
-
-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/write01.c b/winsup/testsuite/winsup.api/ltp/write01.c
deleted file mode 100644
index 0fae9aea1..000000000
--- 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();
-
-
-
-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/samples/sample-fail.c b/winsup/testsuite/winsup.api/samples/sample-fail.c
deleted file mode 100644
index d8beb90be..000000000
--- a/winsup/testsuite/winsup.api/samples/sample-fail.c
+++ /dev/null
@@ -1,4 +0,0 @@
-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 bc0d21d2e..000000000
--- 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 893a0b605..000000000
--- a/winsup/testsuite/winsup.api/samples/sample-pass.c
+++ /dev/null
@@ -1,4 +0,0 @@
-main()
-{
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/sigchld.c b/winsup/testsuite/winsup.api/sigchld.c
deleted file mode 100644
index a7d1069b7..000000000
--- a/winsup/testsuite/winsup.api/sigchld.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <sys/types.h>
-#include <unistd.h>
-#include <signal.h>
-
-int no_signal_caught = 1;
-
-void handler ( int signo )
-{
- no_signal_caught = 0;
-}
-
-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/waitpid.c b/winsup/testsuite/winsup.api/waitpid.c
deleted file mode 100644
index 9845cd1a4..000000000
--- a/winsup/testsuite/winsup.api/waitpid.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <stdio.h>
-#include <sys/wait.h>
-#include <errno.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 743f4cfaa..000000000
--- a/winsup/testsuite/winsup.api/winsup.exp
+++ /dev/null
@@ -1,70 +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 add_includes ""
-set add_libs ""
-
-set ltp_includes "-I$ltp_includes"
-set ltp_libs "$rootme/libltp.a"
-
-proc ws_spawn {cmd args} {
- global rv
- verbose "running $cmd\n"
- catch [eval "exec $cmd"] rv
- verbose send "catchCode = $rv\n"
-}
-
-foreach src [glob -nocomplain $srcdir/$subdir/*.c $srcdir/$subdir/*/*.c] {
- 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 { [regexp "^ltp/" $testcase ] } {
- set add_includes $ltp_includes
- set add_libs $ltp_libs
- }
-
- ws_spawn "$CC -g3 $CFLAGS $src $add_includes $add_libs $runtime_root/new-libcygwin.a -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 "$runtime_root/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"
- catch { file delete "$base.exe" } err
- if { $err != "" } {
- note "error deleting $base.exe: $err"
- }
- }
- }
-}
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
deleted file mode 100644
index 273e0da7f..000000000
--- a/winsup/utils/ChangeLog
+++ /dev/null
@@ -1,321 +0,0 @@
-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 c5e5855b0..000000000
--- a/winsup/utils/Makefile.in
+++ /dev/null
@@ -1,171 +0,0 @@
-# Makefile for Cygwin utilities
-# Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-# This file is part of Cygwin.
-
-# This software is a copyrighted work licensed under the terms of the
-# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-# details.
-
-SHELL:=@SHELL@
-
-srcdir:=@srcdir@
-VPATH:=@srcdir@
-prefix:=@prefix@
-exec_prefix:=@exec_prefix@
-
-bindir:=@bindir@
-etcdir:=$(exec_prefix)/etc
-program_transform_name:=@program_transform_name@
-
-INSTALL:=@INSTALL@
-INSTALL_PROGRAM:=@INSTALL_PROGRAM@
-INSTALL_DATA:=@INSTALL_DATA@
-
-EXEEXT:=@EXEEXT@
-EXEEXT_FOR_BUILD:=@EXEEXT_FOR_BUILD@
-
-CC:=@CC@
-CC_FOR_TARGET:=$(CC)
-CXX:=@CXX@
-CXX_FOR_TARGET:=$(CXX)
-
-CFLAGS:=@CFLAGS@
-CXXFLAGS:=@CXXFLAGS@ -fno-exceptions -fno-rtti
-
-include $(srcdir)/../Makefile.common
-
-MINGW_INCLUDES:=-I$(mingw_source)/include -I$(cygwin_source)/include -I$(w32api_include)
-
-libbfd:=$(bupdir2)/bfd/libbfd.a
-libintl:=$(bupdir2)/intl/libintl.a
-build_dumper:=${shell test -r $(libbfd) -a -r $(libintl) -a -d $(updir1)/include && echo 1}
-
-DUMPER_INCLUDES:=-I$(bupdir2)/bfd -I$(updir1)/include
-
-MINGW_CXXFLAGS:=$(CXXFLAGS) -mno-cygwin $(MINGW_INCLUDES)
-MINGW_CFLAGS:=-mno-cygwin $(MINGW_INCLUDES)
-
-libcygwin:=$(cygwin_build)/libcygwin.a
-libuser32:=$(w32api_lib)/libuser32.a
-libkernel32:=$(w32api_lib)/libkernel32.a
-ALL_DEP_LDLIBS:=$(libcygwin) $(w32api_lib)/libnetapi32.a \
- $(w32api_lib)/libadvapi32.a $(w32api_lib)/libkernel32.a \
- $(w32api_lib)/libuser32.a
-
-ALL_LDLIBS:=${patsubst $(w32api_lib)/lib%.a,-l%,\
- ${filter-out $(libuser32),\
- ${filter-out $(libkernel32),\
- ${filter-out $(libcygwin), $(ALL_DEP_LDLIBS)}}}}
-
-MINGW_LIB:=$(mingw_build)/libmingw32.a
-DUMPER_LIB:=-L$(bupdir2)/bfd -lbfd -L$(bupdir1)/libiberty -liberty -L$(bupdir2)/intl -lintl
-MINGW_LDLIBS:=$(ALL_LDLIBS) $(MINGW_LIB)
-MINGW_DEP_LDLIBS:=${ALL_DEP_LDLIBS} ${MINGW_LIB}
-ALL_LDFLAGS:=-B$(newlib_build)/libc/ -B$(newlib_build)/libm/ -B$(w32api_lib)/ \
- $(LDFLAGS) $(ALL_LDLIBS)
-MINGW_LDFLAGS:=$(ALL_LDFLAGS) $(MINGW_LIB)
-DUMPER_LDFLAGS:=$(ALL_LDFLAGS) $(DUMPER_LIB)
-
-PROGS:=mount$(EXEEXT) umount$(EXEEXT) ps$(EXEEXT) kill$(EXEEXT) \
- mkpasswd$(EXEEXT) mkgroup$(EXEEXT) cygpath$(EXEEXT) cygcheck$(EXEEXT) \
- passwd$(EXEEXT) getfacl$(EXEEXT) setfacl$(EXEEXT) strace$(EXEEXT) \
- regtool$(EXEEXT) ssp$(EXEEXT)
-
-CLEAN_PROGS:=$(PROGS)
-ifdef build_dumper
-PROGS+=dumper$(EXEEXT)
-else
-PROGS:=warn_dumper $(PROGS)
-CLEAN_PROGS+=dumper.exe
-endif
-
-.SUFFIXES:
-.NOEXPORT:
-
-.PHONY: all install clean realclean warn_dumper
-
-all: Makefile $(PROGS)
-
-strace.exe: strace.cc mingw_getopt.o $(MINGW_DEP_LDLIBS)
-ifdef VERBOSE
- $(CXX) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,2,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS)
-else
- @echo $(CXX) -o $@ ${wordlist 1,2,$^} ${filter-out -B%, $(MINGW_CXXFLAGS) $(MINGW_LDFLAGS)};\
- $(CXX) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,2,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS)
-endif
-
-dumper.o: dumper.cc dumper.h
-ifdef VERBOSE
- $(COMPILE_CXX) $c -o $@ $(DUMPER_INCLUDES) ${firstword $^}
-else
- @echo $(CXX) $c $(CFLAGS) $(DUMPER_INCLUDES) ... $(basename $@).cc;\
- $(COMPILE_CXX) $c -o $(@D)/$(basename $@)$o $(DUMPER_INCLUDES) $<
-endif
-
-
-module_info.o: module_info.cc
-ifdef VERBOSE
- $(COMPILE_CXX) $c -o $@ $(DUMPER_INCLUDES) ${firstword $^}
-else
- @echo $(CXX) $c $(CFLAGS) $(DUMPER_INCLUDES) ... $(basename $@).cc;\
- $(COMPILE_CXX) $c -o $(@D)/$(basename $@)$o $(DUMPER_INCLUDES) $<
-endif
-
-parse_pe.o: parse_pe.cc dumper.h
-ifdef VERBOSE
- $(COMPILE_CXX) $c -o $@ $(DUMPER_INCLUDES) ${firstword $^}
-else
- @echo $(CXX) $c $(CFLAGS) $(DUMPER_INCLUDES) ... $(basename $@).cc;\
- $(COMPILE_CXX) $c -o $(@D)/$(basename $@)$o $(DUMPER_INCLUDES) $<
-endif
-
-mingw_getopt.o: $(cygwin_source)/lib/getopt.c
-ifdef VERBOSE
- $(COMPILE_CC) $c -o $(@D)/$(basename $@)$o $(MINGW_CFLAGS) $<
-else
- @echo $(CC) $c -o $(@D)/$(basename $@)$o $(MINGW_CFLAGS) ... $^;\
- $(COMPILE_CC) $c -o $(@D)/$(basename $@)$o $(MINGW_CFLAGS) $<
-endif
-
-clean:
- rm -f *.o $(CLEAN_PROGS)
-
-realclean: clean
- rm -f Makefile config.cache
-
-install: all
- $(SHELL) $(updir1)/mkinstalldirs $(bindir) $(etcdir)
- for i in $(PROGS) ; do \
- n=`echo $$i | sed '$(program_transform_name)'`; \
- $(INSTALL_PROGRAM) $$i $(bindir)/$$n; \
- done
-
-$(cygwin_build)/libcygwin.a: $(cygwin_build)/Makefile
- @$(MAKE) -C $(@D) $(@F)
-
-$(mingw_build)/libmingw32.a: $(mingw_build)/Makefile
- @$(MAKE) -C $(@D) $(@F)
-
-warn_dumper:
- @echo '*** Not building dumper.exe since some required libraries are'
- @echo '*** missing: libbfd.a and libintl.a.'
- @echo '*** If you need this program, check out the naked-bfd and naked-intl'
- @echo '*** sources from sources.redhat.com. Then, configure and build these'
- @echo '*** libraries. Otherwise, you can safely ignore this warning.'
-
-dumper.exe: module_info.o parse_pe.o dumper.o $(ALL_DEP_LDLIBS)
-ifdef VERBOSE
- $(CXX) -o $@ ${wordlist 1,3,$^} -B$(cygwin_build)/ $(DUMPER_LDFLAGS)
-else
- @echo $(CXX) -o $@ ${wordlist 1,3,$^} ${filter-out -B%, $(DUMPER_LDFLAGS)};\
- $(CXX) -o $@ ${wordlist 1,3,$^} -B$(cygwin_build)/ $(DUMPER_LDFLAGS)
-endif
-
-%.exe: %.o $(ALL_DEP_LDLIBS)
-ifdef VERBOSE
- $(CXX) -o $@ ${firstword $^} -B$(cygwin_build)/ $(ALL_LDFLAGS)
-else
- @echo $(CXX) -o $@ ${firstword $^} ${filter-out -B%, $(ALL_LDFLAGS)};\
- $(CXX) -o $@ ${firstword $^} -B$(cygwin_build)/ $(ALL_LDFLAGS)
-endif
diff --git a/winsup/utils/aclocal.m4 b/winsup/utils/aclocal.m4
deleted file mode 100644
index 754f640bb..000000000
--- a/winsup/utils/aclocal.m4
+++ /dev/null
@@ -1,78 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.3b
-
-dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-# Check to see if we're running under Win32, without using
-# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
-# Otherwise set it to "".
-
-dnl AM_EXEEXT()
-dnl This knows we add .exe if we're building in the Cygwin
-dnl environment. But if we're not, then it compiles a test program
-dnl to see if there is a suffix for executables.
-AC_DEFUN(AM_EXEEXT,
-[AC_REQUIRE([AM_CYGWIN])
-AC_REQUIRE([AM_MINGW32])
-AC_MSG_CHECKING([for executable suffix])
-AC_CACHE_VAL(am_cv_exeext,
-[if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-am_cv_exeext=.exe
-else
-cat > am_c_test.c << 'EOF'
-int main() {
-/* Nothing needed here */
-}
-EOF
-${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
-am_cv_exeext=
-for file in am_c_test.*; do
- case $file in
- *.c) ;;
- *.o) ;;
- *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;;
- esac
-done
-rm -f am_c_test*])
-test x"${am_cv_exeext}" = x && am_cv_exeext=no
-fi
-EXEEXT=""
-test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
-AC_MSG_RESULT(${am_cv_exeext})
-AC_SUBST(EXEEXT)])
-
-# Check to see if we're running under Cygwin, without using
-# AC_CANONICAL_*. If so, set output variable CYGWIN to "yes".
-# Otherwise set it to "no".
-
-dnl AM_CYGWIN()
-AC_DEFUN(AM_CYGWIN,
-[AC_CACHE_CHECK(for Cygwin environment, am_cv_cygwin,
-[AC_TRY_COMPILE(,[return __CYGWIN32__;],
-am_cv_cygwin=yes, am_cv_cygwin=no)
-rm -f conftest*])
-CYGWIN=
-test "$am_cv_cygwin" = yes && CYGWIN=yes])
-
-
-
-# Check to see if we're running under Mingw, without using
-# AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
-# Otherwise set it to "no".
-
-dnl AM_MINGW32()
-AC_DEFUN(AM_MINGW32,
-[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
-[AC_TRY_COMPILE(,[return __MINGW32__;],
-am_cv_mingw32=yes, am_cv_mingw32=no)
-rm -f conftest*])
-MINGW32=
-test "$am_cv_mingw32" = yes && MINGW32=yes])
-
diff --git a/winsup/utils/configure b/winsup/utils/configure
deleted file mode 100755
index 4e0fa4345..000000000
--- a/winsup/utils/configure
+++ /dev/null
@@ -1,1358 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-sitefile=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --site-file=FILE use FILE as the site file
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=mount.cc
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
- fi
-else
- CONFIG_SITE="$sitefile"
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-
-
-
-
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:589: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:610: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:628: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:654: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:684: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:733: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:757: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-# Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
-set dummy ${ac_tool_prefix}g++; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:793: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CXX="${ac_tool_prefix}g++"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CXX="$ac_cv_prog_CXX"
-if test -n "$CXX"; then
- echo "$ac_t""$CXX" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_CXX"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "g++", so it can be a program name with args.
-set dummy g++; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:825: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CXX="g++"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_CXX" && ac_cv_prog_CXX="g++"
-fi
-fi
-CXX="$ac_cv_prog_CXX"
-if test -n "$CXX"; then
- echo "$ac_t""$CXX" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- CXX="g++"
-fi
-fi
-
-if test -z "$CXX"; then
- # Extract the first word of "c++", so it can be a program name with args.
-set dummy c++; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:861: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CXX="c++"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CXX="$ac_cv_prog_CXX"
-if test -n "$CXX"; then
- echo "$ac_t""$CXX" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-CXXFLAGS='$(CFLAGS)'
-
-
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-
-if test "x$cross_compiling" = "xyes"; then
- if test "x$program_transform_name" = "xs,x,x,"; then
- program_transform_name=""
- fi
- if test "x$program_transform_name" = "x"; then
- program_transform_name="s,^,$host-,"
- else
- program_transform_name="$program_transform_name -e s,^,$host-,"
- fi
-fi
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:936: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:990: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'am_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 995 "configure"
-#include "confdefs.h"
-
-int main() {
-return __CYGWIN32__;
-; return 0; }
-EOF
-if { (eval echo configure:1002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- am_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- am_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$am_cv_cygwin" 1>&6
-CYGWIN=
-test "$am_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
-echo "configure:1019: checking for Mingw32 environment" >&5
-if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1024 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- am_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- am_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$am_cv_mingw32" 1>&6
-MINGW32=
-test "$am_cv_mingw32" = yes && MINGW32=yes
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1050: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-am_cv_exeext=.exe
-else
-cat > am_c_test.c << 'EOF'
-int main() {
-/* Nothing needed here */
-}
-EOF
-${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
-am_cv_exeext=
-for file in am_c_test.*; do
- case $file in
- *.c) ;;
- *.o) ;;
- *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;;
- esac
-done
-rm -f am_c_test*
-fi
-
-test x"${am_cv_exeext}" = x && am_cv_exeext=no
-fi
-EXEEXT=""
-test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
-echo "$ac_t""${am_cv_exeext}" 1>&6
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@CC@%$CC%g
-s%@CXX@%$CXX%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@EXEEXT@%$EXEEXT%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
diff --git a/winsup/utils/configure.in b/winsup/utils/configure.in
deleted file mode 100644
index aea20413f..000000000
--- a/winsup/utils/configure.in
+++ /dev/null
@@ -1,88 +0,0 @@
-dnl Autoconf configure script for Cygwin utilities.
-dnl Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-dnl
-dnl This file is part of Cygwin.
-dnl
-dnl This software is a copyrighted work licensed under the terms of the
-dnl Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-dnl details.
-
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.12)
-
-AC_INIT(mount.cc)
-
-dnl FIXME: We temporarily define our own version of AC_PROG_CC. This is
-dnl copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-dnl are probably using a cross compiler, which will not be able to fully
-dnl link an executable. This should really be fixed in autoconf
-dnl itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-AC_DEFUN(LIB_AC_PROG_CXX,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CXX, g++, g++)
-if test -z "$CXX"; then
- AC_CHECK_PROG(CXX, c++, c++, , , )
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-CXXFLAGS='$(CFLAGS)'
-])
-
-AC_CANONICAL_SYSTEM
-
-LIB_AC_PROG_CC
-LIB_AC_PROG_CXX
-
-AC_ARG_PROGRAM
-
-if test "x$cross_compiling" = "xyes"; then
- if test "x$program_transform_name" = "xs,x,x,"; then
- program_transform_name=""
- fi
- if test "x$program_transform_name" = "x"; then
- program_transform_name="s,^,$host-,"
- else
- program_transform_name="$program_transform_name -e s,^,$host-,"
- fi
-fi
-
-AC_PROG_INSTALL
-
-AM_EXEEXT
-
-AC_OUTPUT(Makefile)
-
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
deleted file mode 100644
index dfca35b0f..000000000
--- a/winsup/utils/cygcheck.cc
+++ /dev/null
@@ -1,1095 +0,0 @@
-/* cygcheck.cc
-
- Copyright 1998 Cygnus Solutions.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <windows.h>
-#include <sys/cygwin.h>
-#include <mntent.h>
-#include <time.h>
-#include <getopt.h>
-
-int verbose = 0;
-int registry = 0;
-int sysinfo = 0;
-int givehelp = 0;
-int keycheck = 0;
-
-#ifdef __GNUC__
-typedef long long longlong;
-#else
-typedef __int64 longlong;
-#endif
-
-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;
-}
-common_apps[] =
-{
- {"bash", 0},
- {"cat", 0},
- {"cpp", 1},
- {"find", 0},
- {"gcc", 0},
- {"gdb", 0},
- {"ld", 0},
- {"ls", 0},
- {"make", 0},
- {"sh", 0},
- {0, 0}
-};
-
-int num_paths = 0, max_paths = 0;
-char **paths = 0;
-
-void
-add_path (char *s, int maxlen)
-{
- if (num_paths >= max_paths)
- {
- max_paths += 10;
- if (paths)
- paths = (char **) realloc (paths, max_paths * sizeof (char *));
- else
- paths = (char **) malloc (max_paths * sizeof (char *));
- }
- paths[num_paths] = (char *) malloc (maxlen + 1);
- memcpy (paths[num_paths], s, maxlen);
- paths[num_paths][maxlen] = 0;
- char *e = paths[num_paths] + strlen (paths[num_paths]);
- if (e[-1] == '\\' && e[-2] != ':')
- *--e = 0;
- for (int i = 1; i < num_paths; i++)
- if (strcasecmp (paths[num_paths], paths[i]) == 0)
- return;
- num_paths++;
-}
-
-void
-init_paths ()
-{
- char tmp[4000], *sl;
- add_path ((char *) ".", 1); /* to be replaced later */
- add_path ((char *) ".", 1); /* the current directory */
- GetSystemDirectory (tmp, 4000);
- add_path (tmp, strlen (tmp));
- sl = strrchr (tmp, '\\');
- if (sl)
- {
- strcpy (sl, "\\SYSTEM");
- add_path (tmp, strlen (tmp));
- }
- GetWindowsDirectory (tmp, 4000);
- add_path (tmp, strlen (tmp));
-
- char *path = getenv ("PATH");
- if (path)
- {
- char wpath[4000];
- cygwin_posix_to_win32_path_list (path, wpath);
- char *b, *e, sep = ':';
- if (strchr (wpath, ';'))
- sep = ';';
- b = wpath;
- while (1)
- {
- for (e = b; *e && *e != sep; e++);
- add_path (b, e - b);
- if (!*e)
- break;
- b = e + 1;
- }
- }
- else
- printf ("WARNING: PATH is not set at all!\n");
-}
-
-char *
-find_on_path (char *file, char *default_extension,
- int showall = 0, int search_sysdirs = 0)
-{
- static char rv[4000];
- char tmp[4000], *ptr = rv;
-
- if (strchr (file, ':') || strchr (file, '\\') || strchr (file, '/'))
- return file;
-
- if (strchr (file, '.'))
- default_extension = (char *) "";
-
- for (int i = 0; i < num_paths; i++)
- {
- if (!search_sysdirs && (i == 0 || i == 2 || i == 3))
- continue;
- if (i == 0 || !search_sysdirs || strcasecmp (paths[i], paths[0]))
- {
- sprintf (ptr, "%s\\%s%s", paths[i], file, default_extension);
- if (GetFileAttributes (ptr) != (DWORD) -1)
- {
- if (showall)
- printf ("Found: %s\n", ptr);
- if (ptr == tmp && verbose)
- printf ("Warning: %s hides %s\n", rv, ptr);
- ptr = tmp;
- }
- }
- }
-
- if (ptr == tmp)
- return rv;
-
- return 0;
-}
-
-#define DID_NEW 1
-#define DID_ACTIVE 2
-#define DID_INACTIVE 3
-
-struct Did
-{
- Did *next;
- char *file;
- int state;
-};
-Did *did = 0;
-
-Did *
-already_did (char *file)
-{
- Did *d;
- for (d = did; d; d = d->next)
- if (strcasecmp (d->file, file) == 0)
- return d;
- d = new Did;
- d->file = strdup (file);
- d->next = did;
- d->state = DID_NEW;
- did = d;
- return d;
-}
-
-int
-get_word (HANDLE fh, int offset)
-{
- short rv;
- unsigned r;
- SetFilePointer (fh, offset, 0, FILE_BEGIN);
- ReadFile (fh, &rv, 2, (DWORD *) &r, 0);
- return rv;
-}
-
-int
-get_dword (HANDLE fh, int offset)
-{
- int rv;
- unsigned r;
- SetFilePointer (fh, offset, 0, FILE_BEGIN);
- ReadFile (fh, &rv, 4, (DWORD *) &r, 0);
- return rv;
-}
-
-struct Section
-{
- char name[8];
- int virtual_size;
- int virtual_address;
- int size_of_raw_data;
- int pointer_to_raw_data;
-};
-
-int
-rva_to_offset (int rva, char *sections, int nsections, int *sz)
-{
- int i;
- 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;
-};
-
-
-void track_down (char *file, char *suffix, int lvl);
-
-#define CYGPREFIX (sizeof ("%%% Cygwin ") - 1)
-static void
-cygwin_info (HANDLE h)
-{
- char *buf, *bufend;
- char *major, *minor;
- const char *hello = " Cygwin DLL version info:\n";
- DWORD size = GetFileSize (h, NULL);
- DWORD n;
-
- if (size == 0xffffffff)
- return;
-
- buf = (char *) malloc (size);
- if (!buf)
- return;
-
- (void) SetFilePointer (h, 0, NULL, FILE_BEGIN);
- if (!ReadFile (h, buf, size, &n, NULL))
- return;
-
- bufend = buf + size;
- major = minor = NULL;
- 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');
- fputs (hello, stdout);
- fputs (" ", stdout);
- fwrite (buf, 1 + p - buf, 1, stdout);
- hello = "";
- }
-
- if (!*hello)
- puts ("");
- return;
-}
-
-void
-dll_info (const char *path, HANDLE fh, int lvl, int recurse)
-{
- DWORD junk;
- int i;
- int pe_header_offset = get_dword (fh, 0x3c);
- int opthdr_ofs = pe_header_offset + 4 + 20;
- unsigned short v[6];
- SetFilePointer (fh, opthdr_ofs + 40, 0, FILE_BEGIN);
- ReadFile (fh, &v, sizeof (v), &junk, 0);
- if (verbose)
- printf (" - os=%d.%d img=%d.%d sys=%d.%d\n",
- v[0], v[1], v[2], v[3], v[4], v[5]);
- else
- printf ("\n");
- int num_entries = get_dword (fh, opthdr_ofs + 92);
- int export_rva = get_dword (fh, opthdr_ofs + 96);
- int export_size = get_dword (fh, opthdr_ofs + 100);
- int import_rva = get_dword (fh, opthdr_ofs + 104);
- int import_size = get_dword (fh, opthdr_ofs + 108);
-
- int nsections = get_word (fh, pe_header_offset + 4 + 2);
- char *sections = (char *) malloc (nsections * 40);
- SetFilePointer (fh,
- pe_header_offset + 4 + 20 + get_word (fh,
- pe_header_offset + 4 +
- 16), 0, FILE_BEGIN);
- ReadFile (fh, sections, nsections * 40, &junk, 0);
-
- if (verbose && num_entries >= 1 && export_size > 0)
- {
- int expsz;
- int expbase = rva_to_offset (export_rva, sections, nsections, &expsz);
- if (expbase)
- {
- SetFilePointer (fh, expbase, 0, FILE_BEGIN);
- unsigned char *exp = (unsigned char *) malloc (expsz);
- ReadFile (fh, exp, expsz, &junk, 0);
- 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)
- {
- SetFilePointer (fh, impbase, 0, FILE_BEGIN);
- unsigned char *imp = (unsigned char *) malloc (impsz);
- ReadFile (fh, imp, impsz, &junk, 0);
- 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);
-}
-
-void
-track_down (char *file, char *suffix, int lvl)
-{
- char *path = find_on_path (file, suffix, 0, 1);
- if (!path)
- {
- printf ("Error: could not find %s\n", file);
- return;
- }
-
- Did *d = already_did (file);
- switch (d->state)
- {
- case DID_NEW:
- break;
- case DID_ACTIVE:
- if (verbose)
- {
- if (lvl)
- printf ("%*c", lvl, ' ');
- printf ("%s", path);
- printf (" (recursive)\n");
- }
- return;
- case DID_INACTIVE:
- if (verbose)
- {
- if (lvl)
- printf ("%*c", lvl, ' ');
- printf ("%s", path);
- printf (" (already done)\n");
- }
- return;
- }
-
- if (lvl)
- printf ("%*c", lvl, ' ');
-
- if (!path)
- {
- printf ("%s not found\n", file);
- return;
- }
-
- printf ("%s", path);
-
- HANDLE fh =
- CreateFile (path, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
- NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- if (fh == INVALID_HANDLE_VALUE)
- {
- printf (" - Cannot open\n");
- return;
- }
-
- d->state = DID_ACTIVE;
-
- dll_info (path, fh, lvl, 1);
- d->state = DID_INACTIVE;
- CloseHandle (fh);
-}
-
-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;
- GetFileInformationByHandle (h, &info);
- SYSTEMTIME systime;
- FileTimeToSystemTime (&info.ftLastWriteTime, &systime);
- printf ("%5dk %04d/%02d/%02d %s",
- (((int) info.nFileSizeLow) + 512) / 1024,
- systime.wYear, systime.wMonth, systime.wDay, f);
- dll_info (f, h, 16, 0);
- CloseHandle (h);
-
-}
-
-void
-cygcheck (char *app)
-{
- char *papp = find_on_path (app, (char *) ".exe", 1, 0);
- if (!papp)
- {
- printf ("Error: could not find %s\n", app);
- return;
- }
- char *s = strdup (papp);
- char *sl = 0, *t;
- for (t = s; *t; t++)
- if (*t == '/' || *t == '\\' || *t == ':')
- sl = t;
- if (sl == 0)
- paths[0] = (char *) ".";
- else
- {
- *sl = 0;
- paths[0] = s;
- }
- did = 0;
- track_down (papp, (char *) ".exe", 0);
-}
-
-
-extern char **environ;
-
-struct RegInfo
-{
- RegInfo *prev;
- char *name;
- HKEY key;
-};
-
-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);
-}
-
-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);
- char *value_data = (char *) malloc (max_valdata_len + 1);
-
- 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_ALL_ACCESS, &sKey)
- == ERROR_SUCCESS)
- {
- scan_registry (&ri, sKey, subkey_name, cygnus);
- RegCloseKey (sKey);
- }
- }
- }
- free (subkey_name);
-}
-
-void
-dump_sysinfo ()
-{
- int i, j;
- char tmp[4000];
- time_t now;
- char *found_cygwin_dll;
-
- printf ("\nCygnus Win95/NT Configuration Diagnostics\n");
- time (&now);
- printf ("Current System Time: %s\n", ctime (&now));
-
- OSVERSIONINFO osversion;
- osversion.dwOSVersionInfoSize = sizeof (osversion);
- GetVersionEx (&osversion);
- char *osname = (char *) "unknown OS";
- switch (osversion.dwPlatformId)
- {
- case VER_PLATFORM_WIN32s:
- osname = (char *) "win32s";
- break;
- case VER_PLATFORM_WIN32_WINDOWS:
- switch (osversion.dwMinorVersion)
- {
- case 0:
- osname = (char *) "Win95";
- break;
- case 1:
- osname = (char *) "Win98";
- break;
- default:
- osname = (char *) "Win9X";
- break;
- }
- break;
- case VER_PLATFORM_WIN32_NT:
- osname = (char *) "WinNT";
- break;
- default:
- osname = (char *) "uknown-os";
- break;
- }
- printf ("%s Ver %d.%d build %d %s\n\n", osname,
- (int) osversion.dwMajorVersion, (int) osversion.dwMinorVersion,
- (int) osversion.dwBuildNumber, osversion.szCSDVersion);
-
- printf ("Path:");
- char *s = getenv ("PATH"), *e;
- char sep = strchr (s, ';') ? ';' : ':';
- int count_path_items = 0;
- while (1)
- {
- for (e = s; *e && *e != sep; e++);
- printf ("\t%.*s\n", e - s, s);
- count_path_items++;
- if (!*e)
- break;
- s = e + 1;
- }
-
- GetSystemDirectory (tmp, 4000);
- printf ("\nSysDir: %s\n", tmp);
- GetWindowsDirectory (tmp, 4000);
- printf ("WinDir: %s\n\n", tmp);
-
-
- if (givehelp)
- printf ("Here's some environment variables that may affect cygwin:\n");
- for (i = 0; environ[i]; i++)
- {
- char *eq = strchr (environ[i], '=');
- if (!eq)
- continue;
- /* int len = eq - environ[i]; */
- for (j = 0; known_env_vars[j]; j++)
- {
- *eq = 0;
- if (strcmp (environ[i], "PATH") == 0)
- continue; /* we handle this one specially */
- if (strcasecmp (environ[i], known_env_vars[j]) == 0)
- printf ("%s = `%s'\n", environ[i], eq + 1);
- *eq = '=';
- }
- }
- printf ("\n");
-
- if (verbose)
- {
- if (givehelp)
- printf ("Here's the rest of your environment variables:\n");
- for (i = 0; environ[i]; i++)
- {
- int found = 0;
- char *eq = strchr (environ[i], '=');
- if (!eq)
- continue;
- /* int len = eq - environ[i]; */
- for (j = 0; known_env_vars[j]; j++)
- {
- *eq = 0;
- if (strcasecmp (environ[i], known_env_vars[j]) == 0)
- found = 1;
- *eq = '=';
- }
- if (!found)
- {
- *eq = 0;
- printf ("%s = `%s'\n", environ[i], eq + 1);
- *eq = '=';
- }
- }
- printf ("\n");
- }
-
- if (registry)
- {
- if (givehelp)
- printf ("Scanning registry for keys with `Cygnus' in them...\n");
-#if 0
- /* big and not generally useful */
- scan_registry (0, HKEY_CLASSES_ROOT, (char *) "HKEY_CLASSES_ROOT", 0);
-#endif
- scan_registry (0, HKEY_CURRENT_CONFIG,
- (char *) "HKEY_CURRENT_CONFIG", 0);
- scan_registry (0, HKEY_CURRENT_USER, (char *) "HKEY_CURRENT_USER", 0);
- scan_registry (0, HKEY_LOCAL_MACHINE, (char *) "HKEY_LOCAL_MACHINE", 0);
-#if 0
- /* the parts we need are duplicated in HKEY_CURRENT_USER anyway */
- scan_registry (0, HKEY_USERS, (char *) "HKEY_USERS", 0);
-#endif
- printf ("\n");
- }
- else
- printf ("Use `-r' to scan registry\n\n");
-
- if (givehelp)
- {
- printf ("Listing available drives...\n");
- printf ("Drv Type Size Free Flags Name\n");
- }
- int prev_mode =
- SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
- int drivemask = GetLogicalDrives ();
-
- HINSTANCE k32 = LoadLibrary ("kernel32.dll");
- BOOL (WINAPI * gdfse) (LPCSTR, long long *, long long *, long long *) =
- (BOOL (WINAPI *) (LPCSTR, long long *, long long *, long long *))
- GetProcAddress (k32, "GetDiskFreeSpaceExA");
-
- for (i = 0; i < 26; i++)
- {
- if (!(drivemask & (1 << i)))
- continue;
- char drive[4], name[200], fsname[200];
- DWORD serno = 0, maxnamelen = 0, flags = 0;
- name[0] = name[0] = fsname[0] = 0;
- sprintf (drive, "%c:\\", i + 'a');
- GetVolumeInformation (drive, name, sizeof (name), &serno, &maxnamelen,
- &flags, fsname, sizeof (fsname));
-
- 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;
- }
-
- long capacity_mb = -1;
- int percent_full = -1;
-
- long long free_me = 0ULL, free_bytes = 0ULL, total_bytes = 1ULL;
- if (gdfse != NULL && gdfse (drive, &free_me, &total_bytes, &free_bytes))
- {
- capacity_mb = total_bytes / (1024L * 1024L);
- percent_full = 100 - (int) ((100.0 * free_me) / total_bytes);
- }
- else
- {
- DWORD spc = 0, bps = 0, fc = 0, tc = 1;
- if (GetDiskFreeSpace (drive, &spc, &bps, &fc, &tc))
- {
- capacity_mb = (spc * bps * tc) / (1024 * 1024);
- percent_full = 100 - (int) ((100.0 * fc) / tc);
- }
- }
-
- printf ("%.2s %s %-6s ", drive, drive_type, fsname);
- if (capacity_mb >= 0)
- printf ("%5dMb %3d%% ", (int) capacity_mb, (int) percent_full);
- else
- printf (" N/A N/A ");
- printf ("%s %s %s %s %s %s %s\n",
- flags & FS_CASE_IS_PRESERVED ? "CP" : " ",
- flags & FS_CASE_SENSITIVE ? "CS" : " ",
- flags & FS_UNICODE_STORED_ON_DISK ? "UN" : " ",
- flags & FS_PERSISTENT_ACLS ? "PA" : " ",
- flags & FS_FILE_COMPRESSION ? "FC" : " ",
- flags & FS_VOL_IS_COMPRESSED ? "VC" : " ",
-#if 0
- flags & FILE_SUPPORTS_ENCRYPTION ? "EN" : " ",
- flags & FILE_SUPPORTS_OBJECT_IDS ? "OI" : " ",
- flags & FILE_SUPPORTS_REPARSE_POINTS ? "RP" : " ",
- flags & FILE_SUPPORTS_SPARSE_FILES ? "SP" : " ",
- flags & FILE_VOLUME_QUOTAS ? "QU" : " ",
-#endif
- name);
- }
-
- FreeLibrary (k32);
- SetErrorMode (prev_mode);
- if (givehelp)
- {
- printf ("fd=floppy, hd=hard drive, cd=CD-ROM, net=Network Share\n");
- printf ("CP=Case Preserving, CS=Case Sensitive, UN=Unicode\n");
- printf
- ("PA=Persistent ACLS, FC=File Compression, VC=Volume Compression\n");
- }
- printf ("\n");
-
- unsigned int ml_fsname = 4, ml_dir = 7, ml_type = 6;
-
- 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-");
- }
-
- struct mntent *mnt;
- setmntent (0, 0);
-
- while ((mnt = getmntent (0)))
- {
- printf ("%-*s %-*s %-*s %s\n",
- ml_fsname, mnt->mnt_fsname,
- ml_dir, mnt->mnt_dir, ml_type, mnt->mnt_type, mnt->mnt_opts);
- }
- printf ("\n");
-
- add_path ((char *) "\\bin", 4); /* just in case */
-
- if (givehelp)
- printf
- ("Looking to see where common programs can be found, if at all...\n");
- for (i = 0; common_apps[i].name; i++)
- if (!find_on_path ((char *) common_apps[i].name, (char *) ".exe", 1, 0))
- {
- if (common_apps[i].missing_is_good)
- printf ("Not Found: %s (good!)\n", common_apps[i].name);
- else
- printf ("Not Found: %s\n", common_apps[i].name);
- }
- printf ("\n");
-
- if (givehelp)
- printf ("Looking for various Cygnus DLLs... (-v gives version info)\n");
- for (i = 0; i < num_paths; i++)
- {
- WIN32_FIND_DATA ffinfo;
- sprintf (tmp, "%s/*.*", paths[i]);
- HANDLE ff = FindFirstFile (tmp, &ffinfo);
- int found = (ff != INVALID_HANDLE_VALUE);
- found_cygwin_dll = NULL;
- while (found)
- {
- char *f = ffinfo.cFileName;
- if (strcasecmp (f + strlen (f) - 4, ".dll") == 0)
- {
- if (strncasecmp (f, "cyg", 3) == 0)
- {
- sprintf (tmp, "%s\\%s", paths[i], f);
- if (strcasecmp (f, "cygwin1.dll") == 0)
- found_cygwin_dll = strdup (tmp);
- else
- ls (tmp);
- }
- }
- found = FindNextFile (ff, &ffinfo);
- }
- if (found_cygwin_dll)
- {
- ls (found_cygwin_dll);
- free (found_cygwin_dll);
- }
-
- FindClose (ff);
- }
-}
-
-int
-keyeprint (const char *name)
-{
- fprintf (stderr, "cygcheck: %s failed: %lu\n", name, GetLastError ());
- return 1;
-}
-
-int
-check_keys ()
-{
- HANDLE h = CreateFileA ("CONIN$", GENERIC_READ | GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-
- if (h == INVALID_HANDLE_VALUE || h == NULL)
- return keyeprint ("Opening CONIN$");
-
- DWORD mode;
-
- if (!GetConsoleMode (h, &mode))
- keyeprint ("GetConsoleMode");
- else
- {
- mode &= ~ENABLE_PROCESSED_INPUT;
- if (!SetConsoleMode (h, mode))
- keyeprint ("GetConsoleMode");
- }
-
- fputs ("\nThis key check works only in a console window,", stderr);
- fputs (" _NOT_ in a terminal session!\n", stderr);
- fputs ("Abort with Ctrl+C if in a terminal session.\n\n", stderr);
- fputs ("Press `q' to exit.\n", stderr);
-
- INPUT_RECORD in, prev_in;
-
- // Drop first <RETURN> key
- ReadConsoleInput (h, &in, 1, &mode);
-
- memset (&in, 0, sizeof in);
-
- do
- {
- prev_in = in;
- if (!ReadConsoleInput (h, &in, 1, &mode))
- keyeprint ("ReadConsoleInput");
-
- if (!memcmp (&in, &prev_in, sizeof in))
- continue;
-
- switch (in.EventType)
- {
- case KEY_EVENT:
- printf ("%s %ux VK: 0x%02x VS: 0x%02x A: 0x%02x CTRL: ",
- in.Event.KeyEvent.bKeyDown ? "Pressed " : "Released",
- in.Event.KeyEvent.wRepeatCount,
- in.Event.KeyEvent.wVirtualKeyCode,
- in.Event.KeyEvent.wVirtualScanCode,
- (unsigned char) in.Event.KeyEvent.uChar.AsciiChar);
- fputs (in.Event.KeyEvent.dwControlKeyState & CAPSLOCK_ON ?
- "CL " : "-- ", stdout);
- fputs (in.Event.KeyEvent.dwControlKeyState & ENHANCED_KEY ?
- "EK " : "-- ", stdout);
- fputs (in.Event.KeyEvent.dwControlKeyState & LEFT_ALT_PRESSED ?
- "LA " : "-- ", stdout);
- fputs (in.Event.KeyEvent.dwControlKeyState & LEFT_CTRL_PRESSED ?
- "LC " : "-- ", stdout);
- fputs (in.Event.KeyEvent.dwControlKeyState & NUMLOCK_ON ?
- "NL " : "-- ", stdout);
- fputs (in.Event.KeyEvent.dwControlKeyState & RIGHT_ALT_PRESSED ?
- "RA " : "-- ", stdout);
- fputs (in.Event.KeyEvent.dwControlKeyState & RIGHT_CTRL_PRESSED ?
- "RC " : "-- ", stdout);
- fputs (in.Event.KeyEvent.dwControlKeyState & SCROLLLOCK_ON ?
- "SL " : "-- ", stdout);
- fputs (in.Event.KeyEvent.dwControlKeyState & SHIFT_PRESSED ?
- "SH " : "-- ", stdout);
- fputc ('\n', stdout);
- break;
-
- }
- }
- while (in.EventType != KEY_EVENT ||
- in.Event.KeyEvent.bKeyDown != FALSE ||
- in.Event.KeyEvent.uChar.AsciiChar != 'q');
-
- CloseHandle (h);
- return 0;
-}
-
-void
-usage ()
-{
- fprintf (stderr, "Usage: cygcheck [OPTIONS] [program ...]\n");
- fprintf (stderr, " -s, --sysinfo = system information (not with -k)\n");
- fprintf (stderr,
- " -v, --verbose = verbose output (indented) (for -s or programs)\n");
- fprintf (stderr, " -r, --registry = registry search (requires -s)\n");
- fprintf (stderr,
- " -k, --keycheck = perform a keyboard check session (not with -s)\n");
- fprintf (stderr, " -h, --help = give help about the info\n");
- fprintf (stderr,
- "You must at least give either -s or -k or a program name\n");
- exit (1);
-}
-
-struct option longopts[] = {
- {"sysinfo", no_argument, NULL, 's'},
- {"registry", no_argument, NULL, 'r'},
- {"verbose", no_argument, NULL, 'v'},
- {"keycheck", no_argument, NULL, 'k'},
- {"help", no_argument, NULL, 'h'},
- {0, no_argument, NULL, 0}
-};
-
-char opts[] = "srvkh";
-
-int
-main (int argc, char **argv)
-{
- int i;
-
- while ((i = getopt_long (argc, argv, opts, longopts, NULL)) != EOF)
- switch (i)
- {
- case 's':
- sysinfo = 1;
- break;
- case 'r':
- registry = 1;
- break;
- case 'v':
- verbose = 1;
- break;
- case 'k':
- keycheck = 1;
- break;
- case 'h':
- givehelp = 1;
- break;
- default:
- usage ();
- /*NOTREACHED*/}
- argc -= optind;
- argv += optind;
-
- if (argc == 0 && !sysinfo && !keycheck)
- usage ();
-
- if (sysinfo && keycheck)
- usage ();
-
- if (keycheck)
- return check_keys ();
-
- init_paths ();
-
- if (argc >= 1 && givehelp)
- {
- if (argc == 1)
- {
- printf
- ("Here is where the OS will find your program, and which dlls\n");
- printf ("will be used for it. Use -v to see DLL version info\n");
- }
- else
- {
- printf
- ("Here is where the OS will find your programs, and which dlls\n");
- printf ("will be used for them. Use -v to see DLL version info\n");
- }
-
- if (!sysinfo)
- printf ("\n");
- }
-
- for (i = 0; i < argc; i++)
- {
- cygcheck (argv[i]);
- printf ("\n");
- }
-
- if (sysinfo)
- dump_sysinfo ();
-
- if (!givehelp)
- printf ("Use -h to see help about each section\n");
-
- return 0;
-}
diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc
deleted file mode 100644
index 8e2aa1d89..000000000
--- a/winsup/utils/cygpath.cc
+++ /dev/null
@@ -1,377 +0,0 @@
-/* pathconv.cc -- convert pathnames between Windows and Unix format
- Copyright 1998, 1999, 2000 Cygnus Solutions.
- Written by Ian Lance Taylor <ian@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 <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <getopt.h>
-#include <windows.h>
-#include <io.h>
-#include <sys/fcntl.h>
-#include <sys/cygwin.h>
-#include <ctype.h>
-
-static char *prog_name;
-static char *file_arg;
-static char *close_arg;
-static int path_flag, unix_flag, windows_flag, absolute_flag;
-static int shortname_flag, ignore_flag;
-
-static struct option long_options[] =
-{
- { (char *) "help", no_argument, NULL, 'h' },
- { (char *) "absolute", no_argument, NULL, 'a'},
- { (char *) "option", no_argument, NULL, 'o'},
- { (char *) "path", no_argument, NULL, 'p' },
- { (char *) "close", required_argument, (int *) &close_arg, 'c'},
- { (char *) "unix", no_argument, NULL, 'u' },
- { (char *) "file", required_argument, (int *) &file_arg, 'f'},
- { (char *) "version", no_argument, NULL, 'v' },
- { (char *) "windows", no_argument, NULL, 'w' },
- { (char *) "short-name", no_argument, NULL, 's' },
- { (char *) "windir", no_argument, NULL, 'W' },
- { (char *) "sysdir", no_argument, NULL, 'S' },
- { (char *) "ignore", no_argument, NULL, 'i' },
- { 0, no_argument, 0, 0 }
-};
-
-static void
-usage (FILE *stream, int status)
-{
- if (!ignore_flag || !status)
- fprintf (stream, "\
-Usage: %s [-p|--path] (-u|--unix)|(-w|--windows [-s|--short-name]) filename\n\
- -a|--absolute output absolute path\n\
- -c|--close handle close handle (for use in captured process)\n\
- -f|--file file read file for path information\n\
- -u|--unix print Unix form of filename\n\
- -w|--windows print Windows form of filename\n\
- -s|--short-name print Windows short form of filename\n\
- -W|--windir print `Windows' directory\n\
- -S|--sysdir print `system' directory\n\
- -p|--path filename argument is a path\n\
- -i|--ignore ignore missing argument\n",
- prog_name);
- exit (ignore_flag ? 0 : status);
-}
-
-static char *
-get_short_paths (char *path)
-{
- char *sbuf;
- char *sptr;
- char *next;
- char *ptr = path;
- char *end = strrchr (path, 0);
- DWORD acc = 0;
- DWORD len;
-
- while (ptr != NULL)
- {
- next = ptr;
- ptr = strchr (ptr, ';');
- if (ptr)
- *ptr++ = 0;
- len = GetShortPathName (next, NULL, 0);
- if (len == ERROR_INVALID_PARAMETER)
- {
- fprintf (stderr, "%s: cannot create short name of %s\n", prog_name, next);
- exit (2);
- }
- acc += len+1;
- }
- sptr = sbuf = (char *) malloc(acc+1);
- if (sbuf == NULL)
- {
- fprintf (stderr, "%s: out of memory\n", prog_name);
- exit (1);
- }
- ptr = path;
- for(;;)
- {
- if (GetShortPathName (ptr, sptr, acc) == ERROR_INVALID_PARAMETER)
- {
- fprintf (stderr, "%s: cannot create short name of %s\n", prog_name, ptr);
- exit (2);
- }
-
- ptr = strrchr (ptr, 0);
- sptr = strrchr (sptr, 0);
- if (ptr == end)
- break;
- *sptr = ';';
- ++ptr, ++sptr;
- }
- return sbuf;
-}
-
-static char *
-get_short_name (const char *filename)
-{
- char *sbuf;
- DWORD len = GetShortPathName (filename, NULL, 0);
- if (len == ERROR_INVALID_PARAMETER)
- {
- fprintf (stderr, "%s: cannot create short name of %s\n", prog_name, filename);
- exit (2);
- }
- sbuf = (char *) malloc(++len);
- if (sbuf == NULL)
- {
- fprintf (stderr, "%s: out of memory\n", prog_name);
- exit (1);
- }
- if (GetShortPathName (filename, sbuf, len) == ERROR_INVALID_PARAMETER)
- {
- fprintf (stderr, "%s: cannot create short name of %s\n", prog_name, filename);
- exit (2);
- }
- return sbuf;
-}
-
-static void
-doit (char *filename)
-{
- char *buf;
- size_t len;
-
- if (path_flag)
- {
- if (cygwin_posix_path_list_p (filename)
- ? unix_flag
- : windows_flag)
- {
- /* The path is already in the right format. */
- puts (filename);
- exit (0);
- }
- }
-
- if (! path_flag)
- len = strlen (filename) + 100;
- else
- {
- if (unix_flag)
- len = cygwin_win32_to_posix_path_list_buf_size (filename);
- else
- len = cygwin_posix_to_win32_path_list_buf_size (filename);
- }
-
- if (len < PATH_MAX)
- len = PATH_MAX;
-
- buf = (char *) malloc (len);
- if (buf == NULL)
- {
- fprintf (stderr, "%s: out of memory\n", prog_name);
- exit (1);
- }
-
- if (path_flag)
- {
- if (unix_flag)
- cygwin_win32_to_posix_path_list (filename, buf);
- else
- {
- cygwin_posix_to_win32_path_list (filename, buf);
- if (shortname_flag)
- buf = get_short_paths (buf);
- }
- }
- else
- {
- if (unix_flag)
- (absolute_flag ? cygwin_conv_to_full_posix_path : cygwin_conv_to_posix_path) (filename, buf);
- else
- {
- (absolute_flag ? cygwin_conv_to_full_win32_path : cygwin_conv_to_win32_path) (filename, buf);
- if (shortname_flag)
- buf = get_short_name (buf);
- }
- }
-
- puts (buf);
-}
-
-int
-main (int argc, char **argv)
-{
- int c;
- int options_from_file_flag;
- char *filename;
- char buf[MAX_PATH], buf2[MAX_PATH];
-
- prog_name = strrchr (argv[0], '/');
- if (prog_name == NULL)
- prog_name = strrchr (argv[0], '\\');
- if (prog_name == NULL)
- prog_name = argv[0];
-
- path_flag = 0;
- unix_flag = 0;
- windows_flag = 0;
- shortname_flag = 0;
- ignore_flag = 0;
- options_from_file_flag = 0;
- while ((c = getopt_long (argc, argv, (char *) "hac:f:opsSuvwWi", long_options, (int *) NULL))
- != EOF)
- {
- switch (c)
- {
- case 'a':
- absolute_flag = 1;
- break;
-
- case 'c':
- CloseHandle ((HANDLE) strtoul (optarg, NULL, 16));
- break;
-
- case 'f':
- file_arg = optarg;
- break;
-
- case 'o':
- options_from_file_flag = 1;
- break;
-
- case 'p':
- path_flag = 1;
- break;
-
- case 'u':
- if (unix_flag || windows_flag)
- usage (stderr, 1);
- unix_flag = 1;
- break;
-
- case 'w':
- if (unix_flag || windows_flag)
- usage (stderr, 1);
- windows_flag = 1;
- break;
-
- case 's':
- if (unix_flag)
- usage (stderr, 1);
- shortname_flag = 1;
- break;
-
- case 'W':
- GetWindowsDirectory(buf, MAX_PATH);
- cygwin_conv_to_posix_path(buf, buf2);
- printf("%s\n", buf2);
- exit(0);
-
- case 'S':
- GetSystemDirectory(buf, MAX_PATH);
- cygwin_conv_to_posix_path(buf, buf2);
- printf("%s\n", buf2);
- exit(0);
-
- case 'i':
- ignore_flag = 1;
- break;
-
- case 'h':
- usage (stdout, 0);
- break;
-
- case 'v':
- printf ("Cygwin pathconv version 1.0\n");
- printf ("Copyright 1998,1999,2000 Cygnus Solutions\n");
- exit (0);
-
- default:
- usage (stderr, 1);
- break;
- }
- }
-
- if (options_from_file_flag && !file_arg)
- usage (stderr, 1);
-
- if (! unix_flag && ! windows_flag && !options_from_file_flag)
- usage (stderr, 1);
-
- if (!file_arg)
- {
- if (optind != argc - 1)
- usage (stderr, 1);
-
- filename = argv[optind];
- doit (filename);
- }
- else
- {
- FILE *fp;
- char buf[PATH_MAX * 2 + 1];
-
- if (argv[optind])
- usage (stderr, 1);
-
- if (strcmp (file_arg, "-") != 0)
- fp = fopen (file_arg, "rt");
- else
- {
- fp = stdin;
- setmode (0, O_TEXT);
- }
- if (fp == NULL)
- {
- perror ("cygpath");
- exit (1);
- }
-
- setbuf (stdout, NULL);
- while (fgets (buf, sizeof (buf), fp) != NULL)
- {
- char *s = buf;
- char *p = strchr (s, '\n');
- if (p)
- *p = '\0';
- if (options_from_file_flag && *s == '-')
- {
- char c;
- for (c = *++s; c && !isspace (c); c = *++s)
- switch (c)
- {
- case 'a':
- absolute_flag = 1;
- break;
- case 'i':
- ignore_flag = 1;
- break;
- case 's':
- shortname_flag = 1;
- break;
- case 'w':
- unix_flag = 0;
- windows_flag = 1;
- break;
- case 'u':
- windows_flag = 0;
- unix_flag = 1;
- break;
- case 'p':
- path_flag = 1;
- }
- if (*s)
- do
- s++;
- while (*s && isspace (*s));
- }
- if (*s)
- doit (s);
- }
- }
-
- exit (0);
-}
diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc
deleted file mode 100644
index db4e16deb..000000000
--- a/winsup/utils/dumper.cc
+++ /dev/null
@@ -1,790 +0,0 @@
-/* dumper.cc
-
- Copyright 1999 Cygnus Solutions.
-
- Written by Egor Duda <deo@logos-m.ru>
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include <bfd.h>
-#include <elf/common.h>
-#include <elf/external.h>
-#include <sys/procfs.h>
-#include <sys/cygwin.h>
-#include <getopt.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <windows.h>
-
-#include "dumper.h"
-
-#define NOTE_NAME_SIZE 16
-
-typedef struct _note_header
- {
- Elf_External_Note elf_note_header;
- char name[NOTE_NAME_SIZE - 1]; /* external note contains first byte of data */
- }
-#ifdef __GNUC__
-__attribute__ ((packed))
-#endif
- note_header;
-
- BOOL verbose = FALSE;
-
- int deb_printf (const char *format,...)
-{
- if (!verbose)
- return 0;
- va_list va;
- va_start (va, format);
- int ret_val = vprintf (format, va);
- va_end (va);
- return ret_val;
-}
-
-dumper::dumper (DWORD pid, DWORD tid, const char *file_name)
-{
- this->file_name = strdup (file_name);
-
- this->pid = pid;
- this->tid = tid;
- core_bfd = NULL;
- excl_list = new exclusion (20);
-
- list = last = NULL;
-
- status_section = NULL;
-
- memory_num = module_num = thread_num = 0;
-
- hProcess = OpenProcess (PROCESS_ALL_ACCESS,
- FALSE, /* no inheritance */
- pid);
- if (!hProcess)
- {
- fprintf (stderr, "Failed to open process #%lu\n", pid);
- 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;
-}
-
-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))
- 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))
- {
- 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\n",
- (DWORD) current_page_address,
- (DWORD) current_page_address + mbi.RegionSize,
- buf);
- 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 ("Error reading process memory at %x(%x) %u\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 ()
-{
- if (!sane ())
- return 0;
-
- if (!DebugActiveProcess (pid))
- {
- fprintf (stderr, "Cannot attach to process #%lu", pid);
- 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;
-
- 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:
-
- 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;
- }
-
- return 1;
-
-failed:
- dumper_abort ();
- return 0;
-
-}
-
-int
-dumper::prepare_core_dump ()
-{
- if (!sane ())
- return 0;
-
- int sect_no = 0;
- char sect_name[50];
-
- flagword sect_flags;
- DWORD sect_size;
- bfd_vma sect_vma;
-
- asection *new_section;
-
- for (process_entity * p = list; p != NULL; p = p->next)
- {
- sect_no++;
-
- switch (p->type)
- {
- case pr_ent_memory:
- sprintf (sect_name, ".mem/%u", sect_no);
- sect_flags = SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD;
- sect_size = p->u.memory.size;
- sect_vma = (bfd_vma) (p->u.memory.base);
-
- break;
-
- case pr_ent_thread:
- sprintf (sect_name, ".note/%u", sect_no);
- sect_flags = SEC_HAS_CONTENTS | SEC_LOAD;
- sect_size = sizeof (note_header) + sizeof (struct win32_pstatus);
- sect_vma = 0;
- break;
-
- case pr_ent_module:
- sprintf (sect_name, ".note/%u", sect_no);
- sect_flags = SEC_HAS_CONTENTS | SEC_LOAD;
- sect_size = sizeof (note_header) + sizeof (struct win32_pstatus) +
- (bfd_size_type) (strlen (p->u.module.name));
- sect_vma = 0;
- break;
-
- default:
- continue;
- }
-
- if (p->type == pr_ent_module && status_section != NULL)
- {
- if (!bfd_set_section_size (core_bfd,
- status_section,
- status_section->_raw_size + sect_size))
- {
- bfd_perror ("resizing status section");
- goto failed;
- };
- continue;
- }
-
- deb_printf ("creating section (type%u) %s(%u), flags=%08x\n",
- p->type, sect_name, sect_size, sect_flags);
-
- char *buf = strdup (sect_name);
- new_section = bfd_make_section (core_bfd, buf);
-
- if (new_section == NULL ||
- !bfd_set_section_flags (core_bfd, new_section, sect_flags) ||
- !bfd_set_section_size (core_bfd, new_section, sect_size))
- {
- bfd_perror ("creating section");
- goto failed;
- };
-
- new_section->vma = sect_vma;
- new_section->output_section = new_section;
- new_section->output_offset = 0;
- p->section = new_section;
- }
-
- return 1;
-
-failed:
- dumper_abort ();
- return 0;
-}
-
-int
-dumper::write_core_dump ()
-{
- if (!sane ())
- return 0;
-
- for (process_entity * p = list; p != NULL; p = p->next)
- {
- if (p->section == NULL)
- continue;
-
- deb_printf ("writing section type=%u base=%08x size=%08x flags=%08x\n",
- p->type,
- p->section->vma,
- p->section->_raw_size,
- p->section->flags);
-
- switch (p->type)
- {
- case pr_ent_memory:
- dump_memory_region (p->section, &(p->u.memory));
- break;
-
- case pr_ent_thread:
- dump_thread (p->section, &(p->u.thread));
- break;
-
- case pr_ent_module:
- dump_module (p->section, &(p->u.module));
- break;
-
- default:
- continue;
-
- }
- }
- return 1;
-}
-
-static void
-usage ()
-{
- fprintf (stderr, "Usage: dumper [-v] [-c filename] pid\n");
- fprintf (stderr, "-c filename -- dump core to filename.core\n");
- fprintf (stderr, "-d -- print some debugging info while dumping\n");
- fprintf (stderr, "pid -- win32-pid of process to dump\n");
-}
-
-int
-main (int argc, char **argv)
-{
- int opt;
- const char *p = "";
- DWORD pid;
-
- while ((opt = getopt (argc, argv, "dc:")) != EOF)
- switch (opt)
- {
- case 'd':
- verbose = TRUE;
- break;
- case 'c':
- char win32_name[MAX_PATH];
- cygwin_conv_to_win32_path (optarg, win32_name);
- if ((p = strrchr (win32_name, '\\')))
- p++;
- else
- p = win32_name;
- break;
- }
-
- 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);
-
- if (argv && *(argv + optind))
- pid = atoi (*(argv + optind));
- else
- {
- usage ();
- return -1;
- }
-
- 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 673a0037e..000000000
--- a/winsup/utils/dumper.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/* dumper.h
-
- Copyright 1999 Cygnus Solutions.
-
- Written by Egor Duda <deo@logos-m.ru>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _DUMPER_H_
-#define _DUMPER_H_
-
-#include <windows.h>
-
-typedef struct
-{
- LPBYTE base;
- DWORD size;
-} process_mem_region;
-
-typedef struct
-{
- DWORD tid;
- HANDLE hThread;
- CONTEXT context;
-} process_thread;
-
-typedef struct
-{
- LPVOID base_address;
- char* name;
-} process_module;
-
-enum process_entity_type
-{
- pr_ent_memory,
- pr_ent_thread,
- pr_ent_module
-};
-
-typedef struct _process_entity
-{
- process_entity_type type;
- union
- {
- process_thread thread;
- process_mem_region memory;
- process_module module;
- } u;
- asection* section;
- struct _process_entity* next;
-} process_entity;
-
-class exclusion
-{
-public:
- int last;
- int size;
- int step;
- process_mem_region* region;
-
- exclusion ( int step ) { last = size = 0;
- this->step = step;
- region = NULL; }
- ~exclusion () { free ( region ); }
- int add ( LPBYTE mem_base, DWORD mem_size );
- int sort_and_check ();
-};
-
-#define PAGE_BUFFER_SIZE 4096
-
-class dumper
-{
- DWORD pid;
- DWORD tid; /* thread id of active thread */
- HANDLE hProcess;
- process_entity* list;
- process_entity* last;
- exclusion* excl_list;
-
- char* file_name;
- bfd* core_bfd;
-
- asection* status_section;
-
- int memory_num;
- int module_num;
- int thread_num;
-
- void close ();
- void dumper_abort ();
-
- process_entity* add_process_entity_to_list ( process_entity_type type );
- int add_thread ( DWORD tid, HANDLE hThread );
- int add_mem_region ( LPBYTE base, DWORD size );
-
- /* break mem_region by excl_list and add add all subregions */
- int split_add_mem_region ( LPBYTE base, DWORD size );
-
- int add_module ( LPVOID base_address );
-
- int collect_memory_sections ();
- int dump_memory_region ( asection* to, process_mem_region* memory );
- int dump_thread ( asection* to, process_thread* thread );
- int dump_module ( asection* to, process_module* module );
-
-public:
- int sane ();
-
- int collect_process_information ();
-
- 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 482bc0c7b..000000000
--- a/winsup/utils/getfacl.c
+++ /dev/null
@@ -1,126 +0,0 @@
-
-#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>
-
-char *
-permstr (mode_t perm)
-{
- static char pbuf[4];
-
- pbuf[0] = (perm & S_IREAD) ? 'r' : '-';
- pbuf[1] = (perm & S_IWRITE) ? 'w' : '-';
- pbuf[2] = (perm & S_IEXEC) ? 'x' : '-';
- pbuf[3] = '\0';
- return pbuf;
-}
-
-#if 0
-char *
-username (uid_t uid)
-{
- static char ubuf[256];
- struct passwd *pw;
-
- if (pw = getpwuid (uid))
- strcpy (ubuf, pw->pw_name);
- else
- strcpy (ubuf, "<unknown>");
-}
-
-char *
-groupname (gid_t gid)
-{
- static char gbuf[256];
- struct group *gr;
-
- if (gr = getgruid (gid))
- strcpy (gbuf, gr->gr_name);
- else
- strcpy (gbuf, "<unknown>");
-}
-#endif
-
-int
-main (int argc, char **argv)
-{
- extern int optind;
- int c, i;
- int aopt = 0;
- int dopt = 0;
- int first = 1;
- struct stat st;
- aclent_t acls[MAX_ACL_ENTRIES];
-
- while ((c = getopt (argc, argv, "ad")) != EOF)
- switch (c)
- {
- case 'a':
- aopt = 1;
- break;
- case 'd':
- dopt = 1;
- break;
- default:
- fprintf (stderr, "usage: %s [-ad] file...\n", argv[0]);
- 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]);
- printf ("# owner: %d\n", st.st_uid);
- printf ("# group: %d\n", 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:
- printf ("user:%d:", acls[i].a_id);
- break;
- case GROUP_OBJ:
- printf ("group::");
- break;
- case GROUP:
- printf ("group:%d:", 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 c4a805d37..000000000
--- a/winsup/utils/kill.cc
+++ /dev/null
@@ -1,129 +0,0 @@
-/* kill.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <string.h>
-#include <time.h>
-#include <errno.h>
-#include <windows.h>
-#include <sys/cygwin.h>
-
-static void usage (void);
-static int __stdcall getsig (char *);
-static void __stdcall forcekill (int, int, int);
-
-int
-main (int argc, char **argv)
-{
- int sig = SIGTERM;
- int force = 0;
- int gotsig = 0;
- int ret = 0;
-
- if (argc == 1)
- usage ();
-
- while (*++argv && **argv == '-')
- if (strcmp (*argv + 1, "f") == 0)
- force = 1;
- else if (gotsig)
- break;
- else if (strcmp(*argv + 1, "0") != 0)
- {
- sig = getsig (*argv + 1);
- gotsig = 1;
- }
- else
- {
- argv++;
- sig = 0;
- goto sig0;
- }
-
- if (sig <= 0 || sig > NSIG)
- {
- fprintf (stderr, "kill: unknown signal: %s\n", argv[-1]);
- exit (1);
- }
-
-sig0:
- while (*argv != NULL)
- {
- char *p;
- int pid = strtol (*argv, &p, 10);
- if (*p != '\0')
- fprintf (stderr, "kill: illegal pid: %s\n", *argv);
- else
- {
-#if 0
- printf ("Sending %s(%d) signal to pid %d\n",
- strsignal (sig), sig, pid);
-#endif
- if (kill (pid, sig) == 0)
- {
- if (force)
- forcekill (pid, sig, 1);
- }
- else
- {
- if (force && sig != 0)
- forcekill (pid, sig, 0);
- else
- {
- char buf[1000];
- sprintf (buf, "kill %d", pid);
- perror (buf);
- ret = 1;
- }
- }
- }
- argv++;
- }
- return ret;
-}
-
-static void
-usage (void)
-{
- fprintf (stderr, "Usage: kill [-sigN] pid1 [pid2 ...]\n");
- exit (1);
-}
-
-static int
-getsig (char *in_sig)
-{
- char *sig;
- char buf[80];
-
- if (strncmp (in_sig, "SIG", 3) == 0)
- sig = in_sig;
- else
- {
- sprintf (buf, "SIG%s", in_sig);
- sig = buf;
- }
- return (strtosigno (sig) ?: atoi (in_sig));
-}
-
-static void __stdcall
-forcekill (int pid, int sig, int wait)
-{
- external_pinfo *p = (external_pinfo *) cygwin_internal (CW_GETPINFO_FULL, pid);
- if (!p)
- return;
- HANDLE h = OpenProcess (PROCESS_TERMINATE, FALSE, (DWORD) p->pid);
- if (!h)
- return;
- if (!wait || WaitForSingleObject (h, 200) != WAIT_OBJECT_0)
- TerminateProcess (h, sig << 8);
- CloseHandle (h);
-}
diff --git a/winsup/utils/mkgroup.c b/winsup/utils/mkgroup.c
deleted file mode 100644
index e81337511..000000000
--- a/winsup/utils/mkgroup.c
+++ /dev/null
@@ -1,475 +0,0 @@
-/* mkgroup.c:
-
- Copyright 1997, 1998 Cygnus Solutions.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-#include <windows.h>
-#include <sys/cygwin.h>
-#include <getopt.h>
-#include <lmaccess.h>
-#include <lmapibuf.h>
-
-SID_IDENTIFIER_AUTHORITY sid_world_auth = {SECURITY_WORLD_SID_AUTHORITY};
-SID_IDENTIFIER_AUTHORITY sid_nt_auth = {SECURITY_NT_AUTHORITY};
-
-NET_API_STATUS WINAPI (*netapibufferfree)(PVOID);
-NET_API_STATUS WINAPI (*netgroupenum)(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI (*netlocalgroupenum)(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI (*netgetdcname)(LPWSTR,LPWSTR,PBYTE*);
-
-#ifndef min
-#define min(a,b) (((a)<(b))?(a):(b))
-#endif
-
-BOOL
-load_netapi ()
-{
- HANDLE h = LoadLibrary ("netapi32.dll");
-
- if (!h)
- return FALSE;
-
- if (!(netapibufferfree = GetProcAddress (h, "NetApiBufferFree")))
- return FALSE;
- if (!(netgroupenum = GetProcAddress (h, "NetGroupEnum")))
- return FALSE;
- if (!(netlocalgroupenum = GetProcAddress (h, "NetLocalGroupEnum")))
- return FALSE;
- if (!(netgetdcname = GetProcAddress (h, "NetGetDCName")))
- return FALSE;
-
- return TRUE;
-}
-
-char *
-put_sid (PSID sid)
-{
- static char s[512];
- char t[32];
- DWORD i;
-
- strcpy (s, "S-1-");
- sprintf(t, "%u", GetSidIdentifierAuthority (sid)->Value[5]);
- strcat (s, t);
- for (i = 0; i < *GetSidSubAuthorityCount (sid); ++i)
- {
- sprintf(t, "-%lu", *GetSidSubAuthority (sid, i));
- strcat (s, t);
- }
- return s;
-}
-
-void
-psx_dir (char *in, char *out)
-{
- if (isalpha (in[0]) && in[1] == ':')
- {
- sprintf (out, "/cygdrive/%c", in[0]);
- in += 2;
- out += strlen (out);
- }
-
- while (*in)
- {
- if (*in == '\\')
- *out = '/';
- else
- *out = *in;
- in++;
- out++;
- }
-
- *out = '\0';
-}
-
-void
-uni2ansi (LPWSTR wcs, char *mbs)
-{
- if (wcs)
- wcstombs (mbs, wcs, (wcslen (wcs) + 1) * sizeof (WCHAR));
-
- else
- *mbs = '\0';
-}
-
-int
-enum_local_groups (int print_sids)
-{
- LOCALGROUP_INFO_0 *buffer;
- DWORD entriesread = 0;
- DWORD totalentries = 0;
- DWORD resume_handle = 0;
- DWORD rc;
-
- do
- {
- DWORD i;
-
- rc = netlocalgroupenum (NULL, 0, (LPBYTE *) & buffer, 1024,
- &entriesread, &totalentries, &resume_handle);
- switch (rc)
- {
- case ERROR_ACCESS_DENIED:
- fprintf (stderr, "Access denied\n");
- exit (1);
-
- case ERROR_MORE_DATA:
- case ERROR_SUCCESS:
- break;
-
- default:
- fprintf (stderr, "NetLocalGroupEnum() failed with %ld\n", rc);
- exit (1);
- }
-
- for (i = 0; i < entriesread; i++)
- {
- char localgroup_name[100];
- char domain_name[100];
- DWORD domname_len = 100;
- char psid_buffer[1024];
- PSID psid = (PSID) psid_buffer;
- DWORD sid_length = 1024;
- DWORD gid;
- SID_NAME_USE acc_type;
- uni2ansi (buffer[i].lgrpi0_name, localgroup_name);
-
- if (!LookupAccountName (NULL, localgroup_name, psid,
- &sid_length, domain_name, &domname_len,
- &acc_type))
- {
- fprintf (stderr, "LookupAccountName(%s) failed with %ld\n",
- localgroup_name, GetLastError ());
- continue;
- }
- else if (acc_type == SidTypeDomain)
- {
- char domname[356];
-
- strcpy (domname, domain_name);
- strcat (domname, "\\");
- strcat (domname, localgroup_name);
- sid_length = 1024;
- domname_len = 100;
- if (!LookupAccountName (NULL, domname,
- psid, &sid_length,
- domain_name, &domname_len,
- &acc_type))
- {
- fprintf (stderr,
- "LookupAccountName(%s) failed with error %ld\n",
- localgroup_name, GetLastError ());
- continue;
- }
- }
-
- gid = *GetSidSubAuthority (psid, *GetSidSubAuthorityCount(psid) - 1);
-
- printf ("%s:%s:%ld:\n", localgroup_name,
- print_sids ? put_sid (psid) : "",
- gid);
- }
-
- netapibufferfree (buffer);
-
- }
- while (rc == ERROR_MORE_DATA);
-
- return 0;
-}
-
-void
-enum_groups (LPWSTR servername, int print_sids)
-{
- GROUP_INFO_2 *buffer;
- DWORD entriesread = 0;
- DWORD totalentries = 0;
- DWORD resume_handle = 0;
- DWORD rc;
- char ansi_srvname[256];
-
- if (servername)
- uni2ansi (servername, ansi_srvname);
-
- do
- {
- DWORD i;
-
- rc = netgroupenum (servername, 2, (LPBYTE *) & buffer, 1024,
- &entriesread, &totalentries, &resume_handle);
- switch (rc)
- {
- case ERROR_ACCESS_DENIED:
- fprintf (stderr, "Access denied\n");
- exit (1);
-
- case ERROR_MORE_DATA:
- case ERROR_SUCCESS:
- break;
-
- default:
- fprintf (stderr, "NetGroupEnum() failed with %ld\n", rc);
- exit (1);
- }
-
- for (i = 0; i < entriesread; i++)
- {
- char groupname[100];
- char domain_name[100];
- DWORD domname_len = 100;
- char psid_buffer[1024];
- PSID psid = (PSID) psid_buffer;
- DWORD sid_length = 1024;
- SID_NAME_USE acc_type;
-
- int gid = buffer[i].grpi2_group_id;
- uni2ansi (buffer[i].grpi2_name, groupname);
- if (print_sids)
- {
- if (!LookupAccountName (servername ? ansi_srvname : NULL,
- groupname,
- psid, &sid_length,
- domain_name, &domname_len,
- &acc_type))
- {
- fprintf (stderr,
- "LookupAccountName (%s, %s) failed with error %ld\n",
- servername ? ansi_srvname : "NULL",
- groupname,
- GetLastError ());
- continue;
- }
- else if (acc_type == SidTypeDomain)
- {
- char domname[356];
-
- strcpy (domname, domain_name);
- strcat (domname, "\\");
- strcat (domname, groupname);
- sid_length = 1024;
- domname_len = 100;
- if (!LookupAccountName (servername ? ansi_srvname : NULL,
- domname,
- psid, &sid_length,
- domain_name, &domname_len,
- &acc_type))
- {
- fprintf (stderr,
- "LookupAccountName(%s,%s) failed with error %ld\n",
- servername ? ansi_srvname : "NULL",
- domname,
- GetLastError ());
- continue;
- }
- }
- }
- printf ("%s:%s:%d:\n", groupname,
- print_sids ? put_sid (psid) : "",
- gid);
- }
-
- netapibufferfree (buffer);
-
- }
- while (rc == ERROR_MORE_DATA);
-
- if (servername)
- netapibufferfree (servername);
-}
-
-int
-usage ()
-{
- fprintf (stderr, "Usage: mkgroup [OPTION]... [domain]\n\n");
- fprintf (stderr, "This program prints a /etc/group file to stdout\n\n");
- fprintf (stderr, "Options:\n");
- fprintf (stderr, " -l,--local print local group information\n");
- fprintf (stderr, " -d,--domain print global group information from the domain\n");
- fprintf (stderr, " specified (or from the current domain if there is\n");
- fprintf (stderr, " no domain specified)\n");
- fprintf (stderr, " -s,--no-sids don't print SIDs in pwd field\n");
- fprintf (stderr, " (this affects ntsec)\n");
- fprintf (stderr, " -?,--help print this message\n\n");
- fprintf (stderr, "One of `-l' or `-d' must be given on NT/W2K.\n");
- return 1;
-}
-
-struct option longopts[] = {
- {"local", no_argument, NULL, 'l'},
- {"domain", no_argument, NULL, 'd'},
- {"no-sids", no_argument, NULL, 's'},
- {"help", no_argument, NULL, 'h'},
- {0, no_argument, NULL, 0}
-};
-
-char opts[] = "ldsh";
-
-int
-main (int argc, char **argv)
-{
- LPWSTR servername;
- DWORD rc = ERROR_SUCCESS;
- WCHAR domain_name[100];
- int print_local = 0;
- int print_domain = 0;
- int print_sids = 1;
- int domain_specified = 0;
- int i;
-
- char name[256], dom[256];
- DWORD len, len2;
- PSID sid, csid;
- SID_NAME_USE use;
-
- if (GetVersion () < 0x80000000)
- if (argc == 1)
- return usage ();
- else
- {
- while ((i = getopt_long (argc, argv, opts, longopts, NULL)) != EOF)
- switch (i)
- {
- case 'l':
- print_local = 1;
- break;
- case 'd':
- print_domain = 1;
- break;
- case 's':
- print_sids = 0;
- break;
- case 'h':
- return usage ();
- default:
- fprintf (stderr, "Try `%s --help' for more information.\n", argv[0]);
- return 1;
- }
- if (!print_local && !print_domain)
- {
- fprintf (stderr, "%s: Specify one of `-l' or `-d'\n", argv[0]);
- return 1;
- }
- if (optind < argc)
- {
- if (!print_domain)
- {
- fprintf (stderr, "%s: A domain name is only accepted "
- "when `-d' is given.\n", argv[0]);
- return 1;
- }
- mbstowcs (domain_name, argv[optind], (strlen (argv[optind]) + 1));
- domain_specified = 1;
- }
- }
-
- /* This takes Windows 9x/ME into account. */
- if (GetVersion () >= 0x80000000)
- {
- printf ("unknown::%ld:\n", DOMAIN_ALIAS_RID_ADMINS);
- return 0;
- }
-
- if (!load_netapi ())
- {
- fprintf (stderr, "Failed loading symbols from netapi32.dll "
- "with error %lu\n", GetLastError ());
- return 1;
- }
-
- /*
- * Get `Everyone' group
- */
- if (AllocateAndInitializeSid (&sid_world_auth, 1, SECURITY_WORLD_RID,
- 0, 0, 0, 0, 0, 0, 0, &sid))
- {
- if (LookupAccountSid (NULL, sid,
- name, (len = 256, &len),
- dom, (len2 = 256, &len),
- &use))
- printf ("%s:%s:%d:\n", name,
- print_sids ? put_sid (sid) : "",
- SECURITY_WORLD_RID);
- FreeSid (sid);
- }
-
- /*
- * Get `system' group
- */
- if (AllocateAndInitializeSid (&sid_nt_auth, 1, SECURITY_LOCAL_SYSTEM_RID,
- 0, 0, 0, 0, 0, 0, 0, &sid))
- {
- if (LookupAccountSid (NULL, sid,
- name, (len = 256, &len),
- dom, (len2 = 256, &len),
- &use))
- printf ("%s:%s:%d:\n", name,
- print_sids ? put_sid (sid) : "",
- SECURITY_LOCAL_SYSTEM_RID);
- FreeSid (sid);
- }
-
- if (print_local)
- {
- /*
- * Get `None' group
- */
- GetComputerName (name, (len = 256, &len));
- csid = (PSID) malloc (1024);
- LookupAccountName (NULL, name,
- csid, (len = 1024, &len),
- dom, (len2 = 256, &len),
- &use);
- if (AllocateAndInitializeSid (GetSidIdentifierAuthority (csid),
- 5,
- *GetSidSubAuthority (csid, 0),
- *GetSidSubAuthority (csid, 1),
- *GetSidSubAuthority (csid, 2),
- *GetSidSubAuthority (csid, 3),
- 513,
- 0,
- 0,
- 0,
- &sid))
- {
- if (LookupAccountSid (NULL, sid,
- name, (len = 256, &len),
- dom, (len2 = 256, &len),
- &use))
- printf ("%s:%s:513:\n", name,
- print_sids ? put_sid (sid) : "");
- FreeSid (sid);
- }
- free (csid);
- }
-
- if (print_domain)
- {
- if (domain_specified)
- rc = netgetdcname (NULL, domain_name, (LPBYTE *) & servername);
-
- else
- rc = netgetdcname (NULL, NULL, (LPBYTE *) & servername);
-
- if (rc != ERROR_SUCCESS)
- {
- fprintf (stderr, "Cannot get PDC, code = %ld\n", rc);
- exit (1);
- }
-
- enum_groups (servername, print_sids);
- }
-
- if (print_local)
- enum_local_groups (print_sids);
-
- return 0;
-}
diff --git a/winsup/utils/mkpasswd.c b/winsup/utils/mkpasswd.c
deleted file mode 100644
index 47d344038..000000000
--- a/winsup/utils/mkpasswd.c
+++ /dev/null
@@ -1,536 +0,0 @@
-/* mkpasswd.c:
-
- Copyright 1997, 1998, 1999, 2000 Cygnus Solutions.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-#include <windows.h>
-#include <sys/cygwin.h>
-#include <getopt.h>
-#include <lmaccess.h>
-#include <lmapibuf.h>
-
-SID_IDENTIFIER_AUTHORITY sid_world_auth = {SECURITY_WORLD_SID_AUTHORITY};
-SID_IDENTIFIER_AUTHORITY sid_nt_auth = {SECURITY_NT_AUTHORITY};
-
-NET_API_STATUS WINAPI (*netapibufferfree)(PVOID);
-NET_API_STATUS WINAPI (*netuserenum)(LPWSTR,DWORD,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI (*netlocalgroupenum)(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI (*netgetdcname)(LPWSTR,LPWSTR,PBYTE*);
-
-#ifndef min
-#define min(a,b) (((a)<(b))?(a):(b))
-#endif
-
-BOOL
-load_netapi ()
-{
- HANDLE h = LoadLibrary ("netapi32.dll");
-
- if (!h)
- return FALSE;
-
- if (!(netapibufferfree = GetProcAddress (h, "NetApiBufferFree")))
- return FALSE;
- if (!(netuserenum = GetProcAddress (h, "NetUserEnum")))
- return FALSE;
- if (!(netlocalgroupenum = GetProcAddress (h, "NetLocalGroupEnum")))
- return FALSE;
- if (!(netgetdcname = GetProcAddress (h, "NetGetDCName")))
- return FALSE;
-
- return TRUE;
-}
-
-char *
-put_sid (PSID sid)
-{
- static char s[512];
- char t[32];
- DWORD i;
-
- strcpy (s, "S-1-");
- sprintf(t, "%u", GetSidIdentifierAuthority (sid)->Value[5]);
- strcat (s, t);
- for (i = 0; i < *GetSidSubAuthorityCount (sid); ++i)
- {
- sprintf(t, "-%lu", *GetSidSubAuthority (sid, i));
- strcat (s, t);
- }
- return s;
-}
-
-void
-psx_dir (char *in, char *out)
-{
- if (isalpha (in[0]) && in[1] == ':')
- {
- sprintf (out, "/cygdrive/%c", in[0]);
- in += 2;
- out += strlen (out);
- }
-
- while (*in)
- {
- if (*in == '\\')
- *out = '/';
- else
- *out = *in;
- in++;
- out++;
- }
-
- *out = '\0';
-}
-
-void
-uni2ansi (LPWSTR wcs, char *mbs)
-{
- if (wcs)
- wcstombs (mbs, wcs, (wcslen (wcs) + 1) * sizeof (WCHAR));
-
- else
- *mbs = '\0';
-}
-
-int
-enum_users (LPWSTR servername, int print_sids, int print_cygpath,
- const char * passed_home_path)
-{
- USER_INFO_3 *buffer;
- DWORD entriesread = 0;
- DWORD totalentries = 0;
- DWORD resume_handle = 0;
- DWORD rc;
- char ansi_srvname[256];
-
- if (servername)
- uni2ansi (servername, ansi_srvname);
-
- do
- {
- DWORD i;
-
- rc = netuserenum (servername, 3, FILTER_NORMAL_ACCOUNT,
- (LPBYTE *) & buffer, 1024,
- &entriesread, &totalentries, &resume_handle);
- switch (rc)
- {
- case ERROR_ACCESS_DENIED:
- fprintf (stderr, "Access denied\n");
- exit (1);
-
- case ERROR_MORE_DATA:
- case ERROR_SUCCESS:
- break;
-
- default:
- fprintf (stderr, "NetUserEnum() failed with %ld\n", rc);
- exit (1);
- }
-
- for (i = 0; i < entriesread; i++)
- {
- char username[100];
- char fullname[100];
- char homedir_psx[MAX_PATH];
- char homedir_w32[MAX_PATH];
- char domain_name[100];
- DWORD domname_len = 100;
- char psid_buffer[1024];
- PSID psid = (PSID) psid_buffer;
- DWORD sid_length = 1024;
- SID_NAME_USE acc_type;
-
- int uid = buffer[i].usri3_user_id;
- int gid = buffer[i].usri3_primary_group_id;
- uni2ansi (buffer[i].usri3_name, username);
- uni2ansi (buffer[i].usri3_full_name, fullname);
- homedir_w32[0] = homedir_psx[0] = '\0';
- uni2ansi (buffer[i].usri3_home_dir, homedir_w32);
- if (print_cygpath)
- cygwin_conv_to_posix_path (homedir_w32, homedir_psx);
- else
- psx_dir (homedir_w32, homedir_psx);
-
- if (homedir_psx[0] == '\0')
- {
- strcat (homedir_psx, passed_home_path);
- strcat (homedir_psx, username);
- }
-
- if (print_sids)
- {
- if (!LookupAccountName (servername ? ansi_srvname : NULL,
- username,
- psid, &sid_length,
- domain_name, &domname_len,
- &acc_type))
- {
- fprintf (stderr,
- "LookupAccountName(%s,%s) failed with error %ld\n",
- servername ? ansi_srvname : "NULL",
- username,
- GetLastError ());
- continue;
- }
- else if (acc_type == SidTypeDomain)
- {
- char domname[356];
-
- strcpy (domname, domain_name);
- strcat (domname, "\\");
- strcat (domname, username);
- sid_length = 1024;
- domname_len = 100;
- if (!LookupAccountName (servername ? ansi_srvname : NULL,
- domname,
- psid, &sid_length,
- domain_name, &domname_len,
- &acc_type))
- {
- fprintf (stderr,
- "LookupAccountName(%s,%s) failed with error %ld\n",
- servername ? ansi_srvname : "NULL",
- domname,
- GetLastError ());
- continue;
- }
- }
- }
- printf ("%s::%d:%d:%s%s%s:%s:/bin/sh\n", username, uid, gid,
- fullname,
- print_sids ? "," : "",
- print_sids ? put_sid (psid) : "",
- homedir_psx);
- }
-
- netapibufferfree (buffer);
-
- }
- while (rc == ERROR_MORE_DATA);
-
- if (servername)
- netapibufferfree (servername);
-
- return 0;
-}
-
-int
-enum_local_groups (int print_sids)
-{
- LOCALGROUP_INFO_0 *buffer;
- DWORD entriesread = 0;
- DWORD totalentries = 0;
- DWORD resume_handle = 0;
- DWORD rc ;
-
- do
- {
- DWORD i;
-
- rc = netlocalgroupenum (NULL, 0, (LPBYTE *) & buffer, 1024,
- &entriesread, &totalentries, &resume_handle);
- switch (rc)
- {
- case ERROR_ACCESS_DENIED:
- fprintf (stderr, "Access denied\n");
- exit (1);
-
- case ERROR_MORE_DATA:
- case ERROR_SUCCESS:
- break;
-
- default:
- fprintf (stderr, "NetLocalGroupEnum() failed with %ld\n", rc);
- exit (1);
- }
-
- for (i = 0; i < entriesread; i++)
- {
- char localgroup_name[100];
- char domain_name[100];
- DWORD domname_len = 100;
- char psid_buffer[1024];
- PSID psid = (PSID) psid_buffer;
- DWORD sid_length = 1024;
- DWORD gid;
- SID_NAME_USE acc_type;
- uni2ansi (buffer[i].lgrpi0_name, localgroup_name);
-
- if (!LookupAccountName (NULL, localgroup_name, psid,
- &sid_length, domain_name, &domname_len,
- &acc_type))
- {
- fprintf (stderr, "LookupAccountName(%s) failed with %ld\n",
- localgroup_name, GetLastError ());
- continue;
- }
- else if (acc_type == SidTypeDomain)
- {
- char domname[356];
-
- strcpy (domname, domain_name);
- strcat (domname, "\\");
- strcat (domname, localgroup_name);
- sid_length = 1024;
- domname_len = 100;
- if (!LookupAccountName (NULL, domname,
- psid, &sid_length,
- domain_name, &domname_len,
- &acc_type))
- {
- fprintf (stderr,
- "LookupAccountName(%s) failed with error %ld\n",
- localgroup_name, GetLastError ());
- continue;
- }
- }
-
- gid = *GetSidSubAuthority (psid, *GetSidSubAuthorityCount(psid) - 1);
-
- printf ("%s:*:%ld:%ld:%s%s::\n", localgroup_name, gid, gid,
- print_sids ? "," : "",
- print_sids ? put_sid (psid) : "");
- }
-
- netapibufferfree (buffer);
-
- }
- while (rc == ERROR_MORE_DATA);
-
- return 0;
-}
-
-int
-usage ()
-{
- fprintf (stderr, "Usage: mkpasswd [OPTION]... [domain]\n\n");
- fprintf (stderr, "This program prints a /etc/passwd file to stdout\n\n");
- fprintf (stderr, "Options:\n");
- fprintf (stderr, " -l,--local print local user accounts\n");
- fprintf (stderr, " -d,--domain print domain accounts (from current domain\n");
- fprintf (stderr, " if no domain specified)\n");
- fprintf (stderr, " -g,--local-groups print local group information too\n");
- fprintf (stderr, " if no domain specified\n");
- fprintf (stderr, " -m,--no-mount don't use mount points for home dir\n");
- fprintf (stderr, " -s,--no-sids don't print SIDs in GCOS field\n");
- fprintf (stderr, " (this affects ntsec)\n");
- fprintf (stderr, " -p,--path-to-home path if user account has no home dir, use\n");
- fprintf (stderr, " path instead of /home/\n");
- fprintf (stderr, " -?,--help displays this message\n\n");
- fprintf (stderr, "One of `-l', `-d' or `-g' must be given on NT/W2K.\n");
- return 1;
-}
-
-struct option longopts[] = {
- {"local", no_argument, NULL, 'l'},
- {"domain", no_argument, NULL, 'd'},
- {"local-groups", no_argument, NULL, 'g'},
- {"no-mount", no_argument, NULL, 'm'},
- {"no-sids", no_argument, NULL, 's'},
- {"path-to-home",required_argument, NULL, 'p'},
- {"help", no_argument, NULL, 'h'},
- {0, no_argument, NULL, 0}
-};
-
-char opts[] = "ldgsmhp:";
-
-int
-main (int argc, char **argv)
-{
- LPWSTR servername = NULL;
- DWORD rc = ERROR_SUCCESS;
- WCHAR domain_name[200];
- int print_local = 0;
- int print_domain = 0;
- int print_local_groups = 0;
- int domain_name_specified = 0;
- int print_sids = 1;
- int print_cygpath = 1;
- int i;
-
- char name[256], dom[256], passed_home_path[MAX_PATH];
- DWORD len, len2;
- PSID sid;
- SID_NAME_USE use;
-
- passed_home_path[0] = '\0';
-
- if (GetVersion () < 0x80000000)
- if (argc == 1)
- return usage ();
- else
- {
- while ((i = getopt_long (argc, argv, opts, longopts, NULL)) != EOF)
- switch (i)
- {
- case 'l':
- print_local = 1;
- break;
- case 'd':
- print_domain = 1;
- break;
- case 'g':
- print_local_groups = 1;
- break;
- case 's':
- print_sids = 0;
- break;
- case 'm':
- print_cygpath = 0;
- break;
- case 'p':
- if (optarg[0] != '/')
- {
- fprintf (stderr, "%s: `%s' is not a fully qualified path.\n",
- argv[0], optarg);
- return 1;
- }
- strcpy (passed_home_path, optarg);
- if (optarg[strlen (optarg)-1] != '/')
- strcat (passed_home_path, "/");
- break;
- case 'h':
- return usage ();
- default:
- fprintf (stderr, "Try `%s --help' for more information.\n", argv[0]);
- return 1;
- }
- if (!print_local && !print_domain && !print_local_groups)
- {
- fprintf (stderr, "%s: Specify one of `-l', `-d' or `-g'\n", argv[0]);
- return 1;
- }
- if (optind < argc)
- {
- if (!print_domain)
- {
- fprintf (stderr, "%s: A domain name is only accepted "
- "when `-d' is given.\n", argv[0]);
- return 1;
- }
- mbstowcs (domain_name, argv[optind], (strlen (argv[optind]) + 1));
- domain_name_specified = 1;
- }
- }
-
- if (passed_home_path[0] == '\0')
- strcpy (passed_home_path, "/home/");
-
- /* This takes Windows 9x/ME into account. */
- if (GetVersion () >= 0x80000000)
- {
- /* Same behaviour as in cygwin/uinfo.cc (internal_getlogin). */
- if (!GetUserName (name, (len = 256, &len)))
- strcpy (name, "unknown");
-
- printf ("%s::%ld:%ld::%s%s:/bin/sh\n", name,
- DOMAIN_USER_RID_ADMIN,
- DOMAIN_ALIAS_RID_ADMINS,
- passed_home_path,
- name);
-
- return 0;
- }
-
- if (!load_netapi ())
- {
- fprintf (stderr, "Failed loading symbols from netapi32.dll "
- "with error %lu\n", GetLastError ());
- return 1;
- }
-
- /*
- * Get `Everyone' group
- */
- if (AllocateAndInitializeSid (&sid_world_auth, 1, SECURITY_WORLD_RID,
- 0, 0, 0, 0, 0, 0, 0, &sid))
- {
- if (LookupAccountSid (NULL, sid,
- name, (len = 256, &len),
- dom, (len2 = 256, &len),
- &use))
- printf ("%s:*:%d:%d:%s%s::\n", name,
- SECURITY_WORLD_RID,
- SECURITY_WORLD_RID,
- print_sids ? "," : "",
- print_sids ? put_sid (sid) : "");
- FreeSid (sid);
- }
-
- /*
- * Get `system' group
- */
- if (AllocateAndInitializeSid (&sid_nt_auth, 1, SECURITY_LOCAL_SYSTEM_RID,
- 0, 0, 0, 0, 0, 0, 0, &sid))
- {
- if (LookupAccountSid (NULL, sid,
- name, (len = 256, &len),
- dom, (len2 = 256, &len),
- &use))
- printf ("%s:*:%d:%d:%s%s::\n", name,
- SECURITY_LOCAL_SYSTEM_RID,
- SECURITY_LOCAL_SYSTEM_RID,
- print_sids ? "," : "",
- print_sids ? put_sid (sid) : "");
- FreeSid (sid);
- }
-
- /*
- * Get `administrators' group
- */
- if (!print_local_groups
- && AllocateAndInitializeSid (&sid_nt_auth, 2,
- SECURITY_BUILTIN_DOMAIN_RID,
- DOMAIN_ALIAS_RID_ADMINS,
- 0, 0, 0, 0, 0, 0, &sid))
- {
- if (LookupAccountSid (NULL, sid,
- name, (len = 256, &len),
- dom, (len2 = 256, &len),
- &use))
- printf ("%s:*:%ld:%ld:%s%s::\n", name,
- DOMAIN_ALIAS_RID_ADMINS,
- DOMAIN_ALIAS_RID_ADMINS,
- print_sids ? "," : "",
- print_sids ? put_sid (sid) : "");
- FreeSid (sid);
- }
-
- if (print_local_groups)
- enum_local_groups (print_sids);
-
- if (print_domain)
- {
- if (domain_name_specified)
- rc = netgetdcname (NULL, domain_name, (LPBYTE *) & servername);
-
- else
- rc = netgetdcname (NULL, NULL, (LPBYTE *) & servername);
-
- if (rc != ERROR_SUCCESS)
- {
- fprintf (stderr, "Cannot get DC, code = %ld\n", rc);
- exit (1);
- }
-
- enum_users (servername, print_sids, print_cygpath, passed_home_path);
- }
-
- if (print_local)
- enum_users (NULL, print_sids, print_cygpath, passed_home_path);
-
- if (servername)
- netapibufferfree (servername);
-
- return 0;
-}
diff --git a/winsup/utils/module_info.cc b/winsup/utils/module_info.cc
deleted file mode 100644
index 249f089d6..000000000
--- a/winsup/utils/module_info.cc
+++ /dev/null
@@ -1,114 +0,0 @@
-/* module_info.cc
-
- Copyright 1999 Cygnus Solutions.
-
- 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 4117c01c5..000000000
--- a/winsup/utils/mount.cc
+++ /dev/null
@@ -1,289 +0,0 @@
-/* mount.cc
-
- Copyright 1996, 1997, 1998, 1999 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <stdio.h>
-#include <sys/mount.h>
-#include <sys/stat.h>
-#include <mntent.h>
-#include <windows.h>
-#include <sys/cygwin.h>
-#include <stdlib.h>
-
-#ifdef errno
-#undef errno
-#endif
-#include <errno.h>
-
-static void show_mounts (void);
-static void show_cygdrive_info (void);
-static void change_cygdrive_prefix (const char *new_prefix, int flags);
-static int mount_already_exists (const char *posix_path, int flags);
-
-// static short create_missing_dirs = FALSE;
-static short force = FALSE;
-
-static const char *progname;
-
-static void
-error (const char *path)
-{
- fprintf (stderr, "%s: %s: %s\n", progname, path,
- (errno == EMFILE) ? "Too many mount entries" : strerror (errno));
- exit (1);
-}
-
-/* FIXME: do_mount should also print a warning message if the dev arg
- is a non-existent Win32 path. */
-
-static void
-do_mount (const char *dev, const char *where, int flags)
-{
- struct stat statbuf;
- char win32_path[MAX_PATH];
- int statres;
-
- cygwin_conv_to_win32_path (where, win32_path);
-
- statres = stat (win32_path, &statbuf);
-
-#if 0
- if (statres == -1)
- {
- /* FIXME: this'll fail if mount dir is missing any parent dirs */
- if (create_missing_dirs == TRUE)
- {
- if (mkdir (where, 0755) == -1)
- fprintf (stderr, "Warning: unable to create %s!\n", where);
- else
- statres = 0; /* Pretend stat succeeded if we could mkdir. */
- }
- }
-#endif
-
- if (mount (dev, where, flags))
- error (where);
-
- if (statres == -1)
- {
- if (force == FALSE)
- fprintf (stderr, "%s: warning - %s does not exist.\n", progname, where);
- }
- else if (!(statbuf.st_mode & S_IFDIR))
- {
- if (force == FALSE)
- fprintf (stderr, "%s: warning: %s is not a directory.\n", progname, where);
- }
-
- exit (0);
-}
-
-static void
-usage (void)
-{
- fprintf (stderr, "usage %s [-bfstux] <win32path> <posixpath>
--b text files are equivalent to binary files (newline = \\n)
--f force mount, don't warn about missing mount point directories
--s add mount point to system-wide registry location
--t text files get \\r\\n line endings (default)
--u add mount point to user registry location (default)
--x treat all files under mount point as executables
-
-[-bs] --change-cygdrive-prefix <posixpath>
- change the cygdrive path prefix to <posixpath>
---show-cygdrive-prefixes
- show user and/or system cygdrive path prefixes
---import-old-mounts
- copy old registry mount table mounts into the current mount areas
-", progname);
- exit (1);
-}
-
-int
-main (int argc, const char **argv)
-{
- int i;
- int flags = 0;
-
- progname = argv[0];
-
- if (argc == 1)
- {
- show_mounts ();
- exit (0);
- }
-
- for (i = 1; i < argc; ++i)
- {
- if (argv[i][0] != '-')
- break;
-
- if (strcmp (argv[i], "--change-cygdrive-prefix") == 0)
- {
- if ((i + 2) != argc)
- usage ();
-
- change_cygdrive_prefix (argv[i+1], flags);
- }
- else if (strcmp (argv[i], "--import-old-mounts") == 0)
- {
- if ((i + 1) != argc)
- usage ();
-
- cygwin_internal (CW_READ_V1_MOUNT_TABLES);
- exit (0);
- }
- else if (strcmp (argv[i], "--show-cygdrive-prefixes") == 0)
- {
- if ((i + 1) != argc)
- usage ();
-
- show_cygdrive_info ();
- }
- else if (strcmp (argv[i], "-b") == 0)
- flags |= MOUNT_BINARY;
- else if (strcmp (argv[i], "-t") == 0)
- flags &= ~MOUNT_BINARY;
- else if (strcmp (argv[i], "-X") == 0)
- flags |= MOUNT_CYGWIN_EXEC;
-#if 0
- else if (strcmp (argv[i], "-x") == 0)
- create_missing_dirs = TRUE;
-#endif
- else if (strcmp (argv[i], "-s") == 0)
- flags |= MOUNT_SYSTEM;
- else if (strcmp (argv[i], "-u") == 0)
- flags &= ~MOUNT_SYSTEM;
- else if (strcmp (argv[i], "-x") == 0)
- flags |= MOUNT_EXEC;
- else if (strcmp (argv[i], "-f") == 0)
- force = TRUE;
- else
- usage ();
- }
-
- if ((i + 2) != argc)
- usage ();
-
- if ((force == FALSE) && (mount_already_exists (argv[i + 1], flags)))
- {
- errno = EBUSY;
- error (argv[i + 1]);
- }
- else
- do_mount (argv[i], argv[i + 1], flags);
-
- /* NOTREACHED */
- return 0;
-}
-
-static void
-show_mounts (void)
-{
- FILE *m = setmntent ("/-not-used-", "r");
- struct mntent *p;
- const char *format = "%-18s %-18s %-11s %s\n";
-
- printf (format, "Device", "Directory", "Type", "Flags");
- while ((p = getmntent (m)) != NULL)
- {
- printf (format,
- p->mnt_fsname,
- p->mnt_dir,
- p->mnt_type,
- p->mnt_opts);
- }
- endmntent (m);
-}
-
-/* Return 1 if mountpoint from the same registry area is already in
- mount table. Otherwise return 0. */
-static int
-mount_already_exists (const char *posix_path, int flags)
-{
- int found_matching = 0;
-
- FILE *m = setmntent ("/-not-used-", "r");
- struct mntent *p;
-
- while ((p = getmntent (m)) != NULL)
- {
- /* if the paths match, and they're both the same type of mount. */
- if (strcmp (p->mnt_dir, posix_path) == 0)
- {
- if (p->mnt_type[0] == 'u')
- {
- if (!(flags & MOUNT_SYSTEM)) /* both current_user */
- found_matching = 1;
- else
- fprintf (stderr,
- "%s: warning: system mount point of '%s' "
- "will always be masked by user mount.\n",
- progname, posix_path);
- break;
- }
- else if (p->mnt_type[0] == 's')
- {
- if (flags & MOUNT_SYSTEM) /* both system */
- found_matching = 1;
- else
- fprintf (stderr,
- "%s: warning: user mount point of '%s' "
- "masks system mount.\n",
- progname, posix_path);
- break;
- }
- else
- {
- fprintf (stderr, "%s: warning: couldn't determine mount type.\n", progname);
- break;
- }
- }
- }
- endmntent (m);
-
- return found_matching;
-}
-
-/* change_cygdrive_prefix: Change the cygdrive prefix */
-static void
-change_cygdrive_prefix (const char *new_prefix, int flags)
-{
- flags |= MOUNT_AUTO;
-
- if (mount (NULL, new_prefix, flags))
- error (new_prefix);
-
- exit (0);
-}
-
-/* show_cygdrive_info: Show the user and/or cygdrive info, i.e., prefixes 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 prefixes, if necessary
- (ie, not empty) */
- const char *format = "%-18s %-11s %s\n";
- printf (format, "Prefix", "Type", "Flags");
- if (strlen (user) > 0)
- printf (format, user, "user", user_flags);
- if (strlen (system) > 0)
- printf (format, system, "system", system_flags);
-
- exit (0);
-}
diff --git a/winsup/utils/parse_pe.cc b/winsup/utils/parse_pe.cc
deleted file mode 100644
index 7e2a83731..000000000
--- a/winsup/utils/parse_pe.cc
+++ /dev/null
@@ -1,91 +0,0 @@
-/* parse_pe.cc
-
- Copyright 1999 Cygnus Solutions.
-
- Written by Egor Duda <deo@logos-m.ru>
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include <bfd.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "dumper.h"
-
-int
-exclusion::add (LPBYTE mem_base, DWORD mem_size)
-{
- while (last >= size)
- size += step;
- region = (process_mem_region *) realloc (region, size * sizeof (process_mem_region));
- if (region == NULL)
- return 0;
- region[last].base = mem_base;
- region[last].size = mem_size;
- last++;
- return 1;
-};
-
-int
-cmp_regions (const void *r1, const void *r2)
-{
- if (((process_mem_region *) r1)->base < ((process_mem_region *) r2)->base)
- return -1;
- if (((process_mem_region *) r1)->base > ((process_mem_region *) r2)->base)
- return 1;
- return 0;
-}
-
-int
-exclusion::sort_and_check ()
-{
- qsort (region, last, sizeof (process_mem_region), &cmp_regions);
- for (process_mem_region * p = region; p < region + last - 1; p++)
- {
- process_mem_region *q = p + 1;
- if (p->base + size > q->base)
- {
- fprintf (stderr, "region error @ %08x", (unsigned) p->base);
- return 0;
- }
- }
- return 1;
-}
-
-static void
-select_data_section (bfd * abfd, asection * sect, PTR obj)
-{
- exclusion *excl_list = (exclusion *) obj;
-
- if ((sect->flags & (SEC_CODE | SEC_DEBUGGING)) &&
- sect->vma && sect->_raw_size)
- {
- excl_list->add ((LPBYTE) sect->vma, (DWORD) sect->_raw_size);
- deb_printf ("excluding section: %20s %08lx\n", sect->name, sect->_raw_size);
- }
-}
-
-int
-parse_pe (const char *file_name, exclusion * excl_list)
-{
- if (file_name == NULL || excl_list == NULL)
- return 0;
-
- bfd *abfd = bfd_openr (file_name, "pei-i386");
- if (abfd == NULL)
- {
- bfd_perror ("failed to open file");
- return 0;
- }
-
- bfd_check_format (abfd, bfd_object);
- bfd_map_over_sections (abfd, &select_data_section, (PTR) excl_list);
- excl_list->sort_and_check ();
-
- bfd_close (abfd);
- return 1;
-}
diff --git a/winsup/utils/passwd.c b/winsup/utils/passwd.c
deleted file mode 100644
index e6c940900..000000000
--- a/winsup/utils/passwd.c
+++ /dev/null
@@ -1,353 +0,0 @@
-/* passwd.c: Changing passwords and managing account information
-
- Copyright 1999 Cygnus Solutions.
-
- Written by Corinna Vinschen <corinna.vinschen@cityweb.de>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <pwd.h>
-#include <sys/types.h>
-#include <time.h>
-
-#include <windows.h>
-#include <lmaccess.h>
-#include <lmerr.h>
-#include <lmcons.h>
-#include <lmapibuf.h>
-
-#define USER_PRIV_ADMIN 2
-
-#define UF_LOCKOUT 0x00010
-
-char *myname;
-
-int
-eprint (int with_name, const char *fmt, ...)
-{
- va_list ap;
-
- if (with_name)
- fprintf(stderr, "%s: ", myname);
- va_start (ap, fmt);
- vfprintf (stderr, fmt, ap);
- va_end (ap);
- fprintf(stderr, "\n");
- return 1;
-}
-
-int
-EvalRet (int ret, const char *user)
-{
- switch (ret)
- {
- case NERR_Success:
- return 0;
-
- case ERROR_ACCESS_DENIED:
- if (! user)
- eprint (0, "You may not change password expiry information.");
- else
- eprint (0, "You may not change the password for %s.", user);
- break;
-
- eprint (0, "Bad password: Invalid.");
- break;
-
- case NERR_PasswordTooShort:
- eprint (0, "Bad password: Too short.");
- break;
-
- case NERR_UserNotFound:
- eprint (1, "unknown user %s", user);
- break;
-
- case ERROR_INVALID_PASSWORD:
- case NERR_BadPassword:
- eprint (0, "Incorrect password for %s.", user);
- eprint (0, "The password for %s is unchanged.", user);
- break;
-
- default:
- eprint (1, "unrecoverable error %d", ret);
- break;
- }
- return 1;
-}
-
-PUSER_INFO_3
-GetPW (const char *user)
-{
- WCHAR name[512];
- DWORD ret;
- PUSER_INFO_3 ui;
-
- MultiByteToWideChar (CP_ACP, 0, user, -1, name, 512);
- ret = NetUserGetInfo (NULL, name, 3, (LPBYTE *) &ui);
- return EvalRet (ret, user) ? NULL : ui;
-}
-
-int
-ChangePW (const char *user, const char *oldpwd, const char *pwd)
-{
- WCHAR name[512], oldpass[512], pass[512];
- DWORD ret;
-
- MultiByteToWideChar (CP_ACP, 0, user, -1, name, 512);
- MultiByteToWideChar (CP_ACP, 0, pwd, -1, pass, 512);
- if (! oldpwd)
- {
- USER_INFO_1003 ui;
-
- ui.usri1003_password = pass;
- ret = NetUserSetInfo (NULL, name, 1003, (LPBYTE) &ui, NULL);
- }
- else
- {
- MultiByteToWideChar (CP_ACP, 0, oldpwd, -1, oldpass, 512);
- ret = NetUserChangePassword (NULL, name, oldpass, pass);
- }
- if (! EvalRet (ret, user))
- {
- eprint (0, "Password changed.");
- }
- return ret;
-}
-
-void
-PrintPW (PUSER_INFO_3 ui)
-{
- time_t t = time (NULL) - ui->usri3_password_age;
- int ret;
- PUSER_MODALS_INFO_0 mi;
-
- printf ("Account disabled : %s", (ui->usri3_flags & UF_ACCOUNTDISABLE)
- ? "yes\n" : "no\n");
- printf ("Password required: %s", (ui->usri3_flags & UF_PASSWD_NOTREQD)
- ? "no\n" : "yes\n");
- printf ("Password expired : %s", (ui->usri3_password_expired)
- ? "yes\n" : "no\n");
- printf ("Password changed : %s", ctime(&t));
- ret = NetUserModalsGet (NULL, 0, (LPBYTE *) &mi);
- if (! ret)
- {
- if (mi->usrmod0_max_passwd_age == TIMEQ_FOREVER
- || ui->usri3_priv == USER_PRIV_ADMIN)
- mi->usrmod0_max_passwd_age = 0;
- if (mi->usrmod0_min_passwd_age == TIMEQ_FOREVER
- || ui->usri3_priv == USER_PRIV_ADMIN)
- mi->usrmod0_min_passwd_age = 0;
- if (mi->usrmod0_force_logoff == TIMEQ_FOREVER
- || ui->usri3_priv == USER_PRIV_ADMIN)
- mi->usrmod0_force_logoff = 0;
- if (ui->usri3_priv == USER_PRIV_ADMIN)
- mi->usrmod0_min_passwd_len = 0;
- printf ("Max. password age %ld days\n",
- mi->usrmod0_max_passwd_age / ONE_DAY);
- printf ("Min. password age %ld days\n",
- mi->usrmod0_min_passwd_age / ONE_DAY);
- printf ("Force logout after %ld days\n",
- mi->usrmod0_force_logoff / ONE_DAY);
- printf ("Min. password length: %ld\n",
- mi->usrmod0_min_passwd_len);
- }
-}
-
-int
-SetModals (int xarg, int narg, int iarg, int Larg)
-{
- int ret;
- PUSER_MODALS_INFO_0 mi;
-
- ret = NetUserModalsGet (NULL, 0, (LPBYTE *) &mi);
- if (! ret)
- {
- if (xarg == 0)
- mi->usrmod0_max_passwd_age = TIMEQ_FOREVER;
- else if (xarg > 0)
- mi->usrmod0_max_passwd_age = xarg * ONE_DAY;
-
- if (narg == 0)
- {
- mi->usrmod0_min_passwd_age = TIMEQ_FOREVER;
- mi->usrmod0_password_hist_len = 0;
- }
- else if (narg > 0)
- mi->usrmod0_min_passwd_age = narg * ONE_DAY;
-
- if (iarg == 0)
- mi->usrmod0_force_logoff = TIMEQ_FOREVER;
- else if (iarg > 0)
- mi->usrmod0_force_logoff = iarg * ONE_DAY;
-
- if (Larg >= 0)
- mi->usrmod0_min_passwd_len = Larg;
-
- ret = NetUserModalsSet (NULL, 0, (LPBYTE) mi, NULL);
- NetApiBufferFree (mi);
- }
- return EvalRet (ret, NULL);
-}
-
-int
-usage ()
-{
- fprintf (stderr, "usage: %s [name]\n", myname);
- fprintf (stderr, " %s [-L maxlen] [-x max] [-n min] [-i inact]\n",
- myname);
- fprintf (stderr, " %s {-l|-u|-S} name\n", myname);
- return 2;
-}
-
-int
-main (int argc, char **argv)
-{
- char *c;
- char user[64], oldpwd[64], newpwd[64];
- int ret = 0;
- int cnt = 0;
- int opt;
- int Larg = -1;
- int xarg = -1;
- int narg = -1;
- int iarg = -1;
- int lopt = 0;
- int uopt = 0;
- int Sopt = 0;
- PUSER_INFO_3 ui, li;
-
- if ((myname = strrchr (argv[0], '/'))
- || (myname = strrchr (argv[0], '\\')))
- ++myname;
- else
- myname = argv[0];
- c = strrchr (myname, '.');
- if (c)
- *c = '\0';
-
- while ((opt = getopt (argc, argv, "L:x:n:i:luS")) != EOF)
- switch (opt)
- {
- case 'x':
- if ((xarg = atoi (optarg)) < 0 || xarg > 999)
- return eprint (1, "Maximum password age must be between 0 and 999.");
- if (narg >= 0 && xarg < narg)
- return eprint (1, "Maximum password age must be greater than "
- "minimum password age.");
- break;
-
- case 'n':
- if ((narg = atoi (optarg)) < 0 || narg > 999)
- return eprint (1, "Minimum password age must be between 0 and 999.");
- if (xarg >= 0 && narg > xarg)
- return eprint (1, "Minimum password age must be less than "
- "maximum password age.");
- break;
-
- case 'i':
- if ((iarg = atoi (optarg)) < 0 || iarg > 999)
- return eprint (1, "Force logout time must be between 0 and 999.");
- break;
-
- case 'L':
- if ((Larg = atoi (optarg)) < 0 || Larg > LM20_PWLEN)
- return eprint (1, "Minimum password length must be between "
- "0 and %d.", LM20_PWLEN);
- break;
-
- case 'l':
- if (xarg >= 0 || narg >= 0 || iarg >= 0 || Larg >= 0 || uopt || Sopt)
- return usage ();
- lopt = 1;
- break;
-
- case 'u':
- if (xarg >= 0 || narg >= 0 || iarg >= 0 || Larg >= 0 || lopt || Sopt)
- return usage ();
- uopt = 1;
- break;
-
- case 'S':
- if (xarg >= 0 || narg >= 0 || iarg >= 0 || Larg >= 0 || lopt || uopt)
- return usage ();
- Sopt = 1;
- break;
-
- default:
- return usage ();
- }
- if (Larg >= 0 || xarg >= 0 || narg >= 0 || iarg >= 0)
- {
- if (optind < argc)
- return usage ();
- return SetModals (xarg, narg, iarg, Larg);
- }
-
- strcpy (user, optind >= argc ? getlogin () : argv[optind]);
-
- li = GetPW (getlogin ());
- if (! li)
- return 1;
-
- ui = GetPW (user);
- if (! ui)
- return 1;
-
- if (lopt || uopt || Sopt)
- {
- if (li->usri3_priv != USER_PRIV_ADMIN)
- return eprint (0, "You have no maintenance privileges.");
- if (lopt)
- {
- if (ui->usri3_priv == USER_PRIV_ADMIN)
- return eprint (0, "You may not lock an administrators account.");
- ui->usri3_flags |= UF_ACCOUNTDISABLE;
- }
- if (uopt)
- ui->usri3_flags &= ~UF_ACCOUNTDISABLE;
- if (lopt || uopt)
- {
- ret = NetUserSetInfo (NULL, ui->usri3_name, 3, (LPBYTE) ui, NULL);
- return EvalRet (ret, NULL);
- }
- // Sopt
- PrintPW (ui);
- return 0;
- }
-
- if (li->usri3_priv != USER_PRIV_ADMIN && strcmp (getlogin (), user))
- return eprint (0, "You may not change the password for %s.", user);
-
- eprint (0, "Enter the new password (minimum of 5, maximum of 8 characters).");
- eprint (0, "Please use a combination of upper and lower case letters and numbers.");
-
- oldpwd[0] = '\0';
- if (li->usri3_priv != USER_PRIV_ADMIN)
- {
- strcpy (oldpwd, getpass ("Old password: "));
- if (ChangePW (user, oldpwd, oldpwd))
- 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))
- ret = 1;
- if (! ret && cnt < 2)
- eprint (0, "Try again.");
- }
- while (! ret && ++cnt < 3);
- return ! ret;
-}
diff --git a/winsup/utils/ps.cc b/winsup/utils/ps.cc
deleted file mode 100644
index 79d28b1c5..000000000
--- a/winsup/utils/ps.cc
+++ /dev/null
@@ -1,313 +0,0 @@
-/* ps.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <stdio.h>
-#include <windows.h>
-#include <time.h>
-#include <getopt.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <pwd.h>
-#include <sys/cygwin.h>
-#include <tlhelp32.h>
-#include <psapi.h>
-
-typedef BOOL (WINAPI *ENUMPROCESSMODULES)(
- HANDLE hProcess, // handle to the process
- HMODULE * lphModule, // array to receive the module handles
- DWORD cb, // size of the array
- LPDWORD lpcbNeeded // receives the number of bytes returned
-);
-
-typedef DWORD (WINAPI *GETMODULEFILENAME)(
- HANDLE hProcess,
- HMODULE hModule,
- LPTSTR lpstrFileName,
- DWORD nSize
-);
-
-typedef HANDLE (WINAPI *CREATESNAPSHOT)(
- DWORD dwFlags,
- DWORD th32ProcessID
-);
-
-// Win95 functions
-typedef BOOL (WINAPI *PROCESSWALK)(
- HANDLE hSnapshot,
- LPPROCESSENTRY32 lppe
-);
-
-ENUMPROCESSMODULES myEnumProcessModules;
-GETMODULEFILENAME myGetModuleFileNameEx;
-CREATESNAPSHOT myCreateToolhelp32Snapshot;
-PROCESSWALK myProcess32First;
-PROCESSWALK myProcess32Next;
-
-static BOOL WINAPI dummyprocessmodules (
- HANDLE hProcess, // handle to the process
- HMODULE * lphModule, // array to receive the module handles
- DWORD cb, // size of the array
- LPDWORD lpcbNeeded // receives the number of bytes returned
-)
-{
- lphModule[0] = (HMODULE) *lpcbNeeded;
- *lpcbNeeded = 1;
- return 1;
-}
-
-static DWORD WINAPI GetModuleFileNameEx95 (
- HANDLE hProcess,
- HMODULE hModule,
- LPTSTR lpstrFileName,
- DWORD n
-)
-{
- HANDLE h;
- DWORD pid = (DWORD) hModule;
-
- h = myCreateToolhelp32Snapshot (TH32CS_SNAPPROCESS, 0);
- if (!h)
- return 0;
-
- PROCESSENTRY32 proc;
- proc.dwSize = sizeof (proc);
- if (myProcess32First(h, &proc))
- do
- if (proc.th32ProcessID == pid)
- {
- CloseHandle (h);
- strcpy (lpstrFileName, proc.szExeFile);
- return 1;
- }
- while (myProcess32Next (h, &proc));
- CloseHandle (h);
- return 0;
-}
-
-int
-init_win ()
-{
- OSVERSIONINFO os_version_info;
-
- memset (&os_version_info, 0, sizeof os_version_info);
- os_version_info.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
- GetVersionEx (&os_version_info);
-
- HMODULE h;
- if (os_version_info.dwPlatformId == VER_PLATFORM_WIN32_NT)
- {
- h = LoadLibrary ("psapi.dll");
- if (!h)
- return 0;
- myEnumProcessModules = (ENUMPROCESSMODULES) GetProcAddress (h, "EnumProcessModules");
- myGetModuleFileNameEx = (GETMODULEFILENAME) GetProcAddress (h, "GetModuleFileNameExA");
- if (!myEnumProcessModules || !myGetModuleFileNameEx)
- return 0;
- return 1;
- }
-
- h = GetModuleHandle("KERNEL32.DLL");
- myCreateToolhelp32Snapshot = (CREATESNAPSHOT)GetProcAddress (h, "CreateToolhelp32Snapshot");
- myProcess32First = (PROCESSWALK)GetProcAddress (h, "Process32First");
- myProcess32Next = (PROCESSWALK)GetProcAddress (h, "Process32Next");
- if (!myCreateToolhelp32Snapshot || !myProcess32First || !myProcess32Next)
- return 0;
-
- myEnumProcessModules = dummyprocessmodules;
- myGetModuleFileNameEx = GetModuleFileNameEx95;
- return 1;
-}
-
-static char *
-start_time (external_pinfo *child)
-{
- time_t st = child->start_time;
- time_t t = time (NULL);
- static char stime[40] = {'\0'};
- char now[40];
-
- strncpy (stime, ctime (&st) + 4, 15);
- strcpy (now, ctime (&t) + 4);
-
- if ((t - st) < (24 * 3600))
- return (stime + 7);
-
- stime[6] = '\0';
-
- return stime;
-}
-
-#define FACTOR (0x19db1ded53ea710LL)
-#define NSPERSEC 10000000LL
-
-/* Convert a Win32 time to "UNIX" format. */
-long __stdcall
-to_time_t (FILETIME *ptr)
-{
- /* A file time is the number of 100ns since jan 1 1601
- stuffed into two long words.
- A time_t is the number of seconds since jan 1 1970. */
-
- long rem;
- long long x = ((long long) ptr->dwHighDateTime << 32) + ((unsigned)ptr->dwLowDateTime);
- x -= FACTOR; /* number of 100ns between 1601 and 1970 */
- rem = x % ((long long)NSPERSEC);
- rem += (NSPERSEC / 2);
- x /= (long long) NSPERSEC; /* number of 100ns in a second */
- x += (long long) (rem / NSPERSEC);
- return x;
-}
-
-int
-main (int argc, char *argv[])
-{
- external_pinfo *p;
- int aflag, lflag, fflag, sflag, uid;
- cygwin_getinfo_types query = CW_GETPINFO;
- const char *dtitle = " PID TTY STIME COMMAND\n";
- const char *dfmt = "%7d%4d%10s %s\n";
- const char *ftitle = " UID PID PPID TTY STIME COMMAND\n";
- const char *ffmt = "%8.8s%8d%8d%4d%10s %s\n";
- const char *ltitle = " PID PPID PGID WINPID TTY UID STIME COMMAND\n";
- const char *lfmt = "%c %7d %7d %7d %10u %3d %4d %8s %s\n";
- char ch;
-
- aflag = lflag = fflag = sflag = 0;
- uid = getuid ();
- lflag = 1;
-
- while ((ch = getopt (argc, argv, "aelfsu:W")) != -1)
- switch (ch)
- {
- case 'a':
- case 'e':
- aflag = 1;
- break;
- case 'f':
- fflag = 1;
- break;
- case 'l':
- lflag = 1;
- break;
- case 's':
- sflag = 1;
- break;
- case 'u':
- uid = atoi (optarg);
- if (uid == 0)
- {
- struct passwd *pw;
-
- if ((pw = getpwnam (optarg)))
- uid = pw->pw_uid;
- else
- {
- fprintf (stderr, "user %s unknown\n", optarg);
- exit (1);
- }
- }
- break;
- case 'W':
- query = CW_GETPINFO_FULL;
- aflag = 1;
- break;
-
- default:
- fprintf (stderr, "Usage %s [-aefl] [-u uid]\n", argv[0]);
- fprintf (stderr, "-f = show process uids, ppids\n");
- fprintf (stderr, "-l = show process uids, ppids, pgids, winpids\n");
- fprintf (stderr, "-u uid = list processes owned by uid\n");
- fprintf (stderr, "-a, -e = show processes of all users\n");
- fprintf (stderr, "-s = show process summary\n");
- fprintf (stderr, "-W = show windows as well as cygwin processes\n");
- exit (1);
- }
-
- if (sflag)
- printf (dtitle);
- else if (fflag)
- printf (ftitle);
- else if (lflag)
- printf (ltitle);
-
- (void) cygwin_internal (CW_LOCK_PINFO, 1000);
-
- if (query == CW_GETPINFO_FULL && !init_win ())
- query = CW_GETPINFO;
-
- for (int pid = 0;
- (p = (external_pinfo *) cygwin_internal (query, pid | CW_NEXTPID));
- pid = p->pid)
- {
- if (!aflag && p->uid != uid)
- continue;
- char status = ' ';
- if (p->process_state & PID_STOPPED)
- status = 'S';
- else if (p->process_state & PID_TTYIN)
- status = 'I';
- else if (p->process_state & PID_TTYOU)
- status = 'O';
-
- char pname[MAX_PATH];
- if (p->process_state & (PID_ZOMBIE | PID_EXITED))
- strcpy (pname, "<defunct>");
- else if (p->ppid)
- {
- char *s;
- pname[0] = '\0';
- cygwin_conv_to_posix_path (p->progname, pname);
- s = strchr (pname, '\0') - 4;
- if (s > pname && strcasecmp (s, ".exe") == 0)
- *s = '\0';
- }
- else if (query == CW_GETPINFO_FULL)
- {
- HANDLE h = OpenProcess (PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, p->dwProcessId);
- if (!h)
- continue;
- HMODULE hm[1000];
- DWORD n = p->dwProcessId;
- if (!myEnumProcessModules (h, hm, sizeof (hm), &n))
- n = 0;
- if (!n || !myGetModuleFileNameEx (h, hm[0], pname, MAX_PATH))
- strcpy (pname, "*** unknown ***");
- FILETIME ct, et, kt, ut;
- if (GetProcessTimes (h, &ct, &et, &kt, &ut))
- p->start_time = to_time_t (&ct);
- CloseHandle (h);
- }
-
- char uname[128];
-
- if (fflag)
- {
- struct passwd *pw;
-
- if ((pw = getpwuid (p->uid)))
- strcpy (uname, pw->pw_name);
- else
- sprintf (uname, "%d", p->uid);
- }
-
- if (sflag)
- printf (dfmt, p->pid, p->ctty, start_time (p), pname);
- else if (fflag)
- printf (ffmt, uname, p->pid, p->ppid, p->ctty, start_time (p), pname);
- else if (lflag)
- printf (lfmt, status, p->pid, p->ppid, p->pgid,
- p->dwProcessId, p->ctty, p->uid, start_time (p), pname);
-
- }
- (void) cygwin_internal (CW_UNLOCK_PINFO);
-
- return 0;
-}
-
diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc
deleted file mode 100644
index 8ba9f8901..000000000
--- a/winsup/utils/regtool.cc
+++ /dev/null
@@ -1,524 +0,0 @@
-/* regtool.cc
-
- Copyright 2000 Red Hat Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <getopt.h>
-#include <windows.h>
-
-enum {
- KT_AUTO, KT_INT, KT_STRING, KT_EXPAND, KT_MULTI
-} key_type = KT_AUTO;
-
-int verbose = 0;
-int quiet = 0;
-char **argv;
-
-HKEY key;
-char *value;
-
-const char *usage_msg[] =
-{
- "Regtool Copyright (c) 2000 Red Hat Inc",
- " regtool -h - print this message",
- " regtool [-v] list [key] - list subkeys and values",
- " regtool [-v] add [key\\subkey] - add new subkey",
- " regtool [-v] remove [key] - remove key",
- " regtool [-v|-q] check [key] - exit 0 if key exists, 1 if not",
- " regtool [-i|-s|-e|-m] set [key\\value] [data ...] - set value",
- " -i=integer -s=string -e=expand-string -m=multi-string",
- " regtool [-v] unset [key\\value] - removes value from key",
- " regtool [-q] get [key\\value] - prints value to stdout",
- " -q=quiet, no error msg, just return nonzero exit if key/value missing",
- " keys are like \\prefix\\key\\key\\key\\value, where prefix is any of:",
- " root HKCR HKEY_CLASSES_ROOT",
- " config HKCC HKEY_CURRENT_CONFIG",
- " user HKCU HKEY_CURRENT_USER",
- " machine HKLM HKEY_LOCAL_MACHINE",
- " users HKU HKEY_USERS",
- " example: \\user\\software\\Microsoft\\Clock\\iFormat",
- 0
-};
-
-void
-usage(void)
-{
- int i;
- for (i=0; usage_msg[i]; i++)
- fprintf(stderr, "%s\n", usage_msg[i]);
- exit(1);
-}
-
-void
-Fail(DWORD rv)
-{
- char *buf;
- if (!quiet)
- {
- FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER
- | FORMAT_MESSAGE_FROM_SYSTEM,
- 0, rv, 0, (CHAR *)&buf, 0, 0);
- fprintf(stderr, "Error: %s\n", buf);
- }
- exit(1);
-}
-
-struct {
- const char *string;
- HKEY key;
-} wkprefixes[] = {
- { "root", HKEY_CLASSES_ROOT },
- { "HKCR", HKEY_CLASSES_ROOT },
- { "HKEY_CLASSES_ROOT", HKEY_CLASSES_ROOT },
- { "config", HKEY_CURRENT_CONFIG },
- { "HKCC", HKEY_CURRENT_CONFIG },
- { "HKEY_CURRENT_CONFIG", HKEY_CURRENT_CONFIG },
- { "user", HKEY_CURRENT_USER },
- { "HKCU", HKEY_CURRENT_USER },
- { "HKEY_CURRENT_USER", HKEY_CURRENT_USER },
- { "machine", HKEY_LOCAL_MACHINE },
- { "HKLM", HKEY_LOCAL_MACHINE },
- { "HKEY_LOCAL_MACHINE", HKEY_LOCAL_MACHINE },
- { "users", HKEY_USERS },
- { "HKU", HKEY_USERS },
- { "HKEY_USERS", HKEY_USERS },
- { 0, 0 }
-};
-
-void translate(char *key)
-{
-#define isodigit(c) (strchr("01234567", c))
-#define tooct(c) ((c)-'0')
-#define tohex(c) (strchr(_hs,tolower(c))-_hs)
- static char _hs[] = "0123456789abcdef";
-
- char *d = key;
- char *s = key;
- char c;
-
- while (*s)
- {
- if (*s == '\\')
- switch (*++s)
- {
- case 'a':
- *d++ = '\007';
- break;
- case 'b':
- *d++ = '\b';
- break;
- case 'e':
- *d++ = '\033';
- break;
- case 'f':
- *d++ = '\f';
- break;
- case 'n':
- *d++ = '\n';
- break;
- case 'r':
- *d++ = '\r';
- break;
- case 't':
- *d++ = '\t';
- break;
- case 'v':
- *d++ = '\v';
- break;
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- c = tooct(*s);
- if (isodigit(s[1]))
- {
- c = (c << 3) | tooct(*++s);
- if (isodigit(s[1]))
- c = (c << 3) | tooct(*++s);
- }
- *d++ = c;
- break;
- case 'x':
- if (isxdigit(s[1]))
- {
- c = tohex(*++s);
- if (isxdigit(s[1]))
- c = (c << 4) | tohex(*++s);
- }
- *d++ = c;
- break;
- default: /* before non-special char: just add the char */
- *d++ = *s;
- break;
- }
- else if (*s == '/')
- *d++ = '\\';
- else
- *d++ = *s;
- ++s;
- }
- *d = '\0';
-}
-
-void
-find_key(int howmanyparts, REGSAM access)
-{
- char *n = argv[0], *e, c;
- int i;
- if (*n == '/')
- translate(n);
- while (*n == '\\')
- n++;
- for (e=n; *e && *e != '\\'; e++);
- c = *e;
- *e = 0;
- for (i=0; wkprefixes[i].string; i++)
- if (strcmp(wkprefixes[i].string, n) == 0)
- break;
- if (!wkprefixes[i].string)
- {
- fprintf(stderr, "Unknown key prefix. Valid prefixes are:\n");
- for (i=0; wkprefixes[i].string; i++)
- fprintf(stderr, "\t%s\n", wkprefixes[i].string);
- exit(1);
- }
-
- n = e;
- *e = c;
- while (*n && *n == '\\')
- n++;
- e = n+strlen(n);
- if (howmanyparts > 1)
- {
- while (n < e && *e != '\\')
- e--;
- if (*e != '\\')
- {
- fprintf(stderr, "Invalid key\n");
- exit(1);
- }
- *e = 0;
- value = e+1;
- }
- if (n[0] == 0)
- {
- key = wkprefixes[i].key;
- return;
- }
- int rv = RegOpenKeyEx(wkprefixes[i].key, n, 0, access, &key);
- if (rv != ERROR_SUCCESS)
- Fail(rv);
- //printf("key `%s' value `%s'\n", n, value);
-}
-
-
-int
-cmd_list()
-{
- DWORD num_subkeys, maxsubkeylen, num_values, maxvalnamelen, maxvaluelen;
- DWORD maxclasslen;
- char *subkey_name, *value_name, *class_name;
- unsigned char *value_data, *vd;
- DWORD i, j, m, n, t;
- int v;
-
- find_key(1, KEY_READ);
- RegQueryInfoKey(key, 0, 0, 0, &num_subkeys, &maxsubkeylen, &maxclasslen,
- &num_values, &maxvalnamelen, &maxvaluelen, 0, 0);
-
- subkey_name = (char *)malloc(maxsubkeylen+1);
- class_name = (char *)malloc(maxclasslen+1);
- value_name = (char *)malloc(maxvalnamelen+1);
- value_data = (unsigned char *)malloc(maxvaluelen+1);
-
- for (i=0; i<num_subkeys; i++)
- {
- m = maxsubkeylen+1;
- n = maxclasslen+1;
- RegEnumKeyEx(key, i, subkey_name, &m, 0, class_name, &n, 0);
- if (verbose)
- printf("%s\\ (%s)\n", subkey_name, class_name);
- else
- printf("%s\n", subkey_name);
- }
-
- for (i=0; i<num_values; i++)
- {
- m = maxvalnamelen+1;
- n = maxvaluelen+1;
- RegEnumValue(key, i, value_name, &m, 0, &t, (BYTE *)value_data, &n);
- if (!verbose)
- printf("%s\n", value_name);
- else
- {
- printf("%s = ", value_name);
- switch (t)
- {
- case REG_BINARY:
- for (j=0; j<8 && j<n; j++)
- printf("%02x ", value_data[j]);
- printf("\n");
- break;
- case REG_DWORD:
- printf("0x%08lx (%lu)\n", *(DWORD *)value_data,
- *(DWORD *)value_data);
- break;
- case REG_DWORD_BIG_ENDIAN:
- v = ((value_data[0] << 24)
- | (value_data[1] << 16)
- | (value_data[2] << 8)
- | (value_data[3]));
- printf("0x%08x (%d)\n", v, v);
- break;
- case REG_EXPAND_SZ:
- case REG_SZ:
- printf("\"%s\"\n", value_data);
- break;
- case REG_MULTI_SZ:
- vd = value_data;
- while (vd && *vd)
- {
- printf("\"%s\"", vd);
- vd = vd+strlen((const char *)vd) + 1;
- if (*vd)
- printf(", ");
- }
- printf("\n");
- break;
- default:
- printf("? (type %d)\n", (int)t);
- }
- }
- }
- return 0;
-}
-
-int
-cmd_add()
-{
- find_key(2, KEY_ALL_ACCESS);
- HKEY newkey;
- DWORD newtype;
- int rv = RegCreateKeyEx(key, value, 0, (char *)"", REG_OPTION_NON_VOLATILE,
- KEY_ALL_ACCESS, 0, &newkey, &newtype);
- if (rv != ERROR_SUCCESS)
- Fail(rv);
-
- if (verbose)
- {
- if (newtype == REG_OPENED_EXISTING_KEY)
- printf("Key %s already exists\n", value);
- else
- printf("Key %s created\n", value);
- }
- return 0;
-}
-
-int
-cmd_remove()
-{
- find_key(2, KEY_ALL_ACCESS);
- DWORD rv = RegDeleteKey(key, value);
- if (rv != ERROR_SUCCESS)
- Fail(rv);
- if (verbose)
- printf("subkey %s deleted\n", value);
- return 0;
-}
-
-int
-cmd_check()
-{
- find_key(1, KEY_READ);
- if (verbose)
- printf("key %s exists\n", argv[0]);
- return 0;
-}
-
-int
-cmd_set()
-{
- int i, n;
- DWORD v, rv;
- char *a = argv[1], *data;
- find_key(2, KEY_ALL_ACCESS);
-
- if (key_type == KT_AUTO)
- {
- char *e;
- strtoul(a, &e, 0);
- if (a[0] == '%')
- key_type = KT_EXPAND;
- else if (a[0] && !*e)
- key_type = KT_INT;
- else if (argv[2])
- key_type = KT_MULTI;
- else
- key_type = KT_STRING;
- }
-
- switch (key_type)
- {
- case KT_INT:
- v = strtoul(a, 0, 0);
- rv = RegSetValueEx(key, value, 0, REG_DWORD, (const BYTE *)&v, sizeof(v));
- break;
- case KT_STRING:
- rv = RegSetValueEx(key, value, 0, REG_SZ, (const BYTE *)a, strlen(a));
- break;
- case KT_EXPAND:
- rv = RegSetValueEx(key, value, 0, REG_EXPAND_SZ, (const BYTE *)a, strlen(a));
- break;
- case KT_MULTI:
- for (i=1, n=1; argv[i]; i++)
- n += strlen(argv[i])+1;
- data = (char *)malloc(n);
- for (i=1, n=0; argv[i]; i++)
- {
- strcpy(data+n, argv[i]);
- n += strlen(argv[i])+1;
- }
- data[n] = 0;
- rv = RegSetValueEx(key, value, 0, REG_MULTI_SZ, (const BYTE *)data, n+1);
- break;
- case KT_AUTO:
- break;
- }
-
- if (rv != ERROR_SUCCESS)
- Fail(rv);
-
- return 0;
-}
-
-int
-cmd_unset()
-{
- find_key(2, KEY_ALL_ACCESS);
- DWORD rv = RegDeleteValue(key, value);
- if (rv != ERROR_SUCCESS)
- Fail(rv);
- if (verbose)
- printf("value %s deleted\n", value);
- return 0;
-}
-
-int
-cmd_get()
-{
- find_key(2, KEY_READ);
- DWORD vtype, dsize, rv;
- char *data, *vd;
- rv = RegQueryValueEx(key, value, 0, &vtype, 0, &dsize);
- if (rv != ERROR_SUCCESS)
- Fail(rv);
- dsize++;
- data = (char *)malloc(dsize);
- rv = RegQueryValueEx(key, value, 0, &vtype, (BYTE *)data, &dsize);
- if (rv != ERROR_SUCCESS)
- Fail(rv);
- switch (vtype)
- {
- case REG_BINARY:
- fwrite(data, dsize, 0, stdout);
- break;
- case REG_DWORD:
- printf("%lu\n", *(DWORD *)data);
- break;
- case REG_SZ:
- printf("%s\n", data);
- break;
- case REG_EXPAND_SZ:
- if (key_type == KT_EXPAND) // hack
- {
- char *buf;
- DWORD bufsize;
- bufsize = ExpandEnvironmentStrings(data, 0, 0);
- buf = (char *)malloc(bufsize+1);
- ExpandEnvironmentStrings(data, buf, bufsize+1);
- data = buf;
- }
- printf("%s\n", data);
- break;
- case REG_MULTI_SZ:
- vd = data;
- while (vd && *vd)
- {
- printf("%s\n", vd);
- vd = vd+strlen((const char *)vd) + 1;
- }
- break;
- }
- return 0;
-}
-
-struct {
- const char *name;
- int (*func)();
-} commands[] = {
- { "list", cmd_list },
- { "add", cmd_add },
- { "remove", cmd_remove },
- { "check", cmd_check },
- { "set", cmd_set },
- { "unset", cmd_unset },
- { "get", cmd_get },
- { 0, 0 }
-};
-
-int
-main(int argc, char **_argv)
-{
- while (1)
- {
- int g = getopt (argc, _argv, "hvqisem");
- if (g == -1)
- break;
- switch (g)
- {
- case 'v':
- verbose ++;
- break;
- case 'q':
- quiet ++;
- break;
-
- case 'i':
- key_type = KT_INT;
- break;
- case 's':
- key_type = KT_STRING;
- break;
- case 'e':
- key_type = KT_EXPAND;
- break;
- case 'm':
- key_type = KT_MULTI;
- break;
-
- case '?':
- case 'h':
- usage();
- }
- }
- if (_argv[optind] == NULL)
- usage();
-
- argv = _argv+optind;
- int i;
- for (i=0; commands[i].name; i++)
- if (strcmp(commands[i].name, argv[0]) == 0)
- {
- argv++;
- return commands[i].func();
- }
- usage();
-
- return 0;
-}
diff --git a/winsup/utils/setfacl.c b/winsup/utils/setfacl.c
deleted file mode 100644
index c63b5d1af..000000000
--- a/winsup/utils/setfacl.c
+++ /dev/null
@@ -1,377 +0,0 @@
-
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <pwd.h>
-#include <grp.h>
-#include <sys/types.h>
-#include <sys/acl.h>
-
-#ifndef BOOL
-#define BOOL int
-#endif
-
-#ifndef TRUE
-#define TRUE (1)
-#endif
-
-#ifndef FALSE
-#define FALSE (0)
-#endif
-
-#ifndef ILLEGAL_MODE
-#define ILLEGAL_MODE ((mode_t)0xffffffff)
-#endif
-
-typedef enum {
- NoAction,
- Set,
- Modify,
- Delete,
- ModNDel,
- SetFromFile
-} action_t;
-
-char *myname;
-
-int usage ()
-{
- fprintf(stderr, "usage: %s [-r] -s acl_entries file...\n", myname);
- fprintf(stderr, " %s [-r] -md acl_entries file...\n", myname);
- fprintf(stderr, " %s [-r] -f acl_file file...\n", myname);
- return 1;
-}
-
-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)
- return ILLEGAL_MODE;
- if (!strchr ("r-", in[0])
- || !strchr ("w-", in[1])
- || !strchr ("x-", in[2]))
- return ILLEGAL_MODE;
- return (in[0] == 'r' ? S_IRUSR | S_IRGRP | S_IROTH : 0)
- | (in[1] == 'w' ? S_IWUSR | S_IWGRP | S_IWOTH : 0)
- | (in[2] == 'x' ? S_IXUSR | S_IXGRP | S_IXOTH : 0);
-}
-
-BOOL
-getaclentry (action_t action, char *c, aclent_t *ace)
-{
- char *c2;
-
- ace->a_type = 0;
- ace->a_id = 0;
- ace->a_perm = 0;
-
- if (!strncmp (c, "default:", 8)
- || !strncmp (c, "d:", 2))
- {
- ace->a_type = ACL_DEFAULT;
- c = strchr (c, ':') + 1;
- }
- if (!strncmp (c, "user:", 5)
- || !strncmp (c, "u:", 2))
- {
- ace->a_type |= USER_OBJ;
- c = strchr (c, ':') + 1;
- }
- else if (!strncmp (c, "group:", 6)
- || !strncmp (c, "g:", 2))
- {
- ace->a_type |= GROUP_OBJ;
- c = strchr (c, ':') + 1;
- }
- else if (!strncmp (c, "mask:", 5)
- || !strncmp (c, "m:", 2))
- {
- if (!(ace->a_type & ACL_DEFAULT))
- return FALSE;
- ace->a_type |= CLASS_OBJ;
- c = strchr (c, ':') + 1;
- }
- else if (!strncmp (c, "other:", 6)
- || !strncmp (c, "o:", 2))
- {
- if (!(ace->a_type & ACL_DEFAULT))
- return FALSE;
- 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 (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;
- }
- 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];
-
- if (! (fp = fopen (buf, "r")))
- return FALSE;
- while (fgets (fbuf, 256, fp))
- {
- if (!getaclentry (action, fbuf, acls + (*idx)++))
- {
- fclose (fp);
- return FALSE;
- }
- }
- fclose (fp);
- }
- else
- for (c = strtok (buf, ","); c; c = strtok (NULL, ","))
- if (!getaclentry (action, c, acls + (*idx)++))
- return FALSE;
- return TRUE;
-}
-
-int
-searchace (aclent_t *aclp, int nentries, int type, int id)
-{
- int i;
-
- for (i = 0; i < nentries; ++i)
- if ((aclp[i].a_type == type && (id < 0 || aclp[i].a_id == id))
- || !aclp[i].a_type)
- return i;
- return -1;
-}
-
-int
-modacl (aclent_t *tgt, int tcnt, aclent_t *src, int scnt)
-{
- int t, s, i;
-
- for (s = 0; s < scnt; ++s)
- {
- t = searchace (tgt, MAX_ACL_ENTRIES, src[s].a_type,
- (src[s].a_type & (USER | GROUP)) ? src[s].a_id : -1);
- if (t < 0)
- return -1;
- if (src[s].a_perm == ILLEGAL_MODE)
- {
- if (t < tcnt)
- {
- for (i = t + 1; i < tcnt; ++i)
- tgt[i - 1] = tgt[i];
- --tcnt;
- }
- }
- else
- {
- tgt[t] = src[s];
- if (t >= tcnt)
- ++tcnt;
- }
- }
- return tcnt;
-}
-
-void
-setfacl (action_t action, char *path, aclent_t *acls, int cnt)
-{
- aclent_t lacl[MAX_ACL_ENTRIES];
- int lcnt;
-
- memset (lacl, 0, sizeof lacl);
- if (action == Set)
- {
- if (acl (path, SETACL, cnt, acls))
- perror (myname);
- return;
- }
- if ((lcnt = acl (path, GETACL, MAX_ACL_ENTRIES, lacl)) < 0
- || (lcnt = modacl (lacl, lcnt, acls, cnt)) < 0
- || (lcnt = acl (path, SETACL, lcnt, lacl)) < 0)
- perror (myname);
-}
-
-int
-main (int argc, char **argv)
-{
- extern char *optarg;
- extern int optind;
- int c;
- action_t action = NoAction;
- int ropt = 0;
- aclent_t acls[MAX_ACL_ENTRIES];
- int aclidx = 0;
-
- myname = argv[0];
- memset (acls, 0, sizeof acls);
- while ((c = getopt (argc, argv, "d:f:m:rs:")) != EOF)
- switch (c)
- {
- case 'd':
- if (action == NoAction)
- action = Delete;
- else if (action == Modify)
- action = ModNDel;
- else
- return usage ();
- if (! getaclentries (Delete, optarg, acls, &aclidx))
- {
- fprintf (stderr, "%s: illegal acl entries\n", myname);
- return 2;
- }
- break;
- case 'f':
- if (action == NoAction)
- action = Set;
- else
- return usage ();
- if (! getaclentries (SetFromFile, optarg, acls, &aclidx))
- {
- fprintf (stderr, "%s: illegal acl entries\n", myname);
- return 2;
- }
- break;
- case 'm':
- if (action == NoAction)
- action = Modify;
- else if (action == Delete)
- action = ModNDel;
- else
- return usage ();
- if (! getaclentries (Modify, optarg, acls, &aclidx))
- {
- fprintf (stderr, "%s: illegal acl entries\n", myname);
- return 2;
- }
- break;
- case 'r':
- if (!ropt)
- ropt = 1;
- else
- return usage ();
- break;
- case 's':
- if (action == NoAction)
- action = Set;
- else
- return usage ();
- break;
- if (! getaclentries (Set, optarg, acls, &aclidx))
- {
- fprintf (stderr, "%s: illegal acl entries\n", myname);
- return 2;
- }
- default:
- return usage ();
- }
- if (action == NoAction)
- return usage ();
- if (optind > argc - 1)
- return usage ();
- if (action == Set)
- switch (aclcheck (acls, aclidx, NULL))
- {
- case GRP_ERROR:
- fprintf (stderr, "%s: more than one group entry.\n", myname);
- return 2;
- case USER_ERROR:
- fprintf (stderr, "%s: more than one user entry.\n", myname);
- return 2;
- case CLASS_ERROR:
- fprintf (stderr, "%s: more than one mask entry.\n", myname);
- return 2;
- case OTHER_ERROR:
- fprintf (stderr, "%s: more than one other entry.\n", myname);
- return 2;
- case DUPLICATE_ERROR:
- fprintf (stderr, "%s: duplicate additional user or group.\n", myname);
- return 2;
- case ENTRY_ERROR:
- fprintf (stderr, "%s: invalid entry type.\n", myname);
- return 2;
- case MISS_ERROR:
- fprintf (stderr, "%s: missing entries.\n", myname);
- return 2;
- case MEM_ERROR:
- fprintf (stderr, "%s: out of memory.\n", myname);
- return 2;
- default:
- break;
- }
- for (c = optind; c < argc; ++c)
- setfacl (action, argv[c], acls, aclidx);
- return 0;
-}
-
diff --git a/winsup/utils/ssp.c b/winsup/utils/ssp.c
deleted file mode 100644
index 1abde5394..000000000
--- a/winsup/utils/ssp.c
+++ /dev/null
@@ -1,802 +0,0 @@
-/*
- * Copyright (c) 2000, Red Hat, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * A copy of the GNU General Public License can be found at
- * http://www.gnu.org/
- *
- * Written by DJ Delorie <dj@redhat.com>
- *
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <time.h>
-#include <ctype.h>
-#include <windows.h>
-
-#ifdef __GNUC__
-const char *help_text = "
-Usage: ssp [options] low_pc high_pc command...
-
-The SSP is a `single-step profiler' - it uses the debug API to
-single-step your program, noting *everything* your program runs, not
-just random places hit by random timer interrupts. You must specify
-the range of EIP values to profile. For example, you could profile
-just a function, or just a line of code, or the whole thing.
-Use \"objdump -h\" to find the start of .text and the section following
-it; this is what you want.
-
-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.
-
--v = verbose messages about debug events.
-
--d, -e = disable/enable single-stepping by default. Use
-OutputDebugString (\"ssp on\") to enable stepping, or \"ssp off\" to
-disable it. Thus, you can profile a single function call or block.
-
--t = trace every EIP value to a file TRACE.SSP. This gets big *fast*.
-Use \"addr2line -C -f -s -e foo.exe < trace.ssp > lines.ssp\" and then
-\"perl cvttrace\" to convert to symbolic traces.
-
--tc = trace every EIP value to the console. *Lots* slower.
-
--s = trace sub-threads too. Dangerous if you have race conditions.
-
--dll = enable dll profiling. A chart of relative DLL usage is
-produced after the run.
-
-Examples:
- ssp 0x401000 0x403000 hello.exe
- ssp -v -d -dll 0x401000 0x440000 foo.exe
-
-The output is a file \"gmon.out\" that can be read with gprof:
- gprof -b foo.exe
-
-See ssp.txt in the cygwin sources for more information.
-";
-#else
-char *help_text = "Usage: get cygwin!\n";
-#endif
-
-#define KERNEL_ADDR 0x77000000
-
-#define TRACE_SSP 0
-
-#define VERBOSE 1
-#define TIMES 1000
-
-/* from winsup/gmon.h */
-struct gmonhdr {
- unsigned long lpc; /* base pc address of sample buffer */
- unsigned long hpc; /* max pc address of sampled buffer */
- int ncnt; /* size of sample buffer (plus this header) */
- int version; /* version number */
- int profrate; /* profiling clock rate */
- int spare[3]; /* reserved */
-};
-#define GMONVERSION 0x00051879
-#define HISTCOUNTER unsigned short
-
-typedef struct {
- unsigned int base_address;
- int pcount;
- int scount;
- char *name;
-} DllInfo;
-
-typedef struct {
- unsigned int address;
- unsigned char real_byte;
-} PendingBreakpoints;
-
-int low_pc=0, high_pc=0;
-unsigned int last_pc=0, pc, last_sp=0, sp;
-int total_cycles, count;
-char *cmd_line;
-HANDLE hProcess;
-PROCESS_INFORMATION procinfo;
-STARTUPINFO startup;
-CONTEXT context;
-HISTCOUNTER *hits=0;
-struct gmonhdr hdr;
-int running = 1, profiling = 1;
-char dll_name[1024], *dll_ptr, *cp;
-int eip;
-unsigned opcode_count = 0;
-
-int stepping_enabled = 1;
-int tracing_enabled = 0;
-int trace_console = 0;
-int trace_all_threads = 0;
-int dll_counts = 0;
-int verbose = 0;
-
-#define MAXTHREADS 100
-int active_thread_ids[MAXTHREADS];
-HANDLE active_threads[MAXTHREADS];
-int thread_step_flags[MAXTHREADS];
-int thread_return_address[MAXTHREADS];
-int num_active_threads = 0;
-int suspended_count=0;
-
-#define MAXDLLS 100
-DllInfo dll_info[MAXDLLS];
-int num_dlls=0;
-
-#define MAXPENDS 100
-PendingBreakpoints pending_breakpoints[MAXPENDS];
-int num_breakpoints=0;
-
-static void
-add_breakpoint (unsigned int address)
-{
- int i;
- DWORD rv;
- static char int3[] = { 0xcc };
- for (i=0; i<num_breakpoints; i++)
- {
- if (pending_breakpoints[i].address == address)
- return;
- if (pending_breakpoints[i].address == 0)
- break;
- }
- if (i == MAXPENDS)
- return;
- pending_breakpoints[i].address = address;
- ReadProcessMemory (hProcess,
- (void *)address,
- &(pending_breakpoints[i].real_byte),
- 1, &rv);
-
- WriteProcessMemory (hProcess,
- (void *)address,
- (LPVOID)int3, 1, &rv);
- if (i >= num_breakpoints)
- num_breakpoints = i+1;
-}
-
-static int
-remove_breakpoint (unsigned int address)
-{
- int i;
- DWORD rv;
- for (i=0; i<num_breakpoints; i++)
- {
- if (pending_breakpoints[i].address == address)
- {
- pending_breakpoints[i].address = 0;
- WriteProcessMemory (hProcess,
- (void *)address,
- &(pending_breakpoints[i].real_byte),
- 1, &rv);
- return 1;
- }
- }
- return 0;
-}
-
-static HANDLE
-lookup_thread_id (int threadId, int *tix)
-{
- int i;
- for (i=0; i<num_active_threads; i++)
- if (active_thread_ids[i] == threadId)
- {
- if (tix) *tix = i;
- return active_threads[i];
- }
- return 0;
-}
-
-static void
-set_step_threads (int threadId, int trace)
-{
- int rv, tix;
- HANDLE thread = lookup_thread_id (threadId, &tix);
-
- rv = GetThreadContext (thread, &context);
- if (rv != -1)
- {
- thread_step_flags[tix] = trace;
- if (trace)
- context.EFlags |= 0x100; /* TRAP (single step) flag */
- else
- context.EFlags &= ~0x100; /* TRAP (single step) flag */
- SetThreadContext (thread, &context);
- }
-}
-
-static void
-set_steps ()
-{
- int i, s;
- for (i=0; i<num_active_threads; i++)
- {
- GetThreadContext (active_threads[i], &context);
- s = context.EFlags & 0x0100;
- if (!s && thread_step_flags[i])
- {
- set_step_threads (active_thread_ids[i], 1);
- }
- }
-}
-
-static int
-dll_sort (const void *va, const void *vb)
-{
- DllInfo *a = (DllInfo *)va;
- DllInfo *b = (DllInfo *)vb;
- if (a->base_address < b->base_address)
- return -1;
- return 1;
-}
-
-static char *
-addr2dllname (unsigned int addr)
-{
- int i;
- for (i=num_dlls-1; i>=0; i--)
- {
- if (dll_info[i].base_address < addr)
- {
- return dll_info[i].name;
- }
- }
- return (char *)"";
-}
-
-static void
-dump_registers (HANDLE thread)
-{
- context.ContextFlags = CONTEXT_FULL;
- GetThreadContext (thread, &context);
- printf ("eax %08lx ebx %08lx ecx %08lx edx %08lx eip\n",
- context.Eax, context.Ebx, context.Ecx, context.Edx);
- printf ("esi %08lx edi %08lx ebp %08lx esp %08lx %08lx\n",
- context.Esi, context.Esi, context.Ebp, context.Esp, context.Eip);
-}
-
-typedef struct Edge {
- struct Edge *next;
- unsigned int from_pc;
- unsigned int to_pc;
- unsigned int count;
-} Edge;
-
-Edge *edges[4096];
-
-void
-store_call_edge (unsigned int from_pc, unsigned int to_pc)
-{
- Edge *e;
- unsigned int h = ((from_pc + to_pc)>>4) & 4095;
- for (e=edges[h]; e; e=e->next)
- if (e->from_pc == from_pc && e->to_pc == to_pc)
- break;
- if (!e)
- {
- e = (Edge *)malloc (sizeof (Edge));
- e->next = edges[h];
- edges[h] = e;
- e->from_pc = from_pc;
- e->to_pc = to_pc;
- e->count = 0;
- }
- e->count++;
-}
-
-void
-write_call_edges (FILE *f)
-{
- int h;
- Edge *e;
- for (h=0; h<4096; h++)
- for (e=edges[h]; e; e=e->next)
- fwrite (&(e->from_pc), 1, 3*sizeof (unsigned int), f);
-}
-
-char *
-wide_strdup (char *cp)
-{
- unsigned short *s = (unsigned short *)cp;
- int len;
- char *rv;
- for (len=0; s[len]; len++);
- rv = (char *)malloc (len+1);
- for (len=0; s[len]; len++)
- rv[len] = s[len];
- rv[len] = 0;
- return rv;
-}
-
-void
-run_program (char *cmdline)
-{
- FILE *tracefile = 0;
- int tix, i;
- HANDLE hThread;
- char *string;
-
- memset (&startup, 0, sizeof (startup));
- startup.cb = sizeof (startup);
-
- if (!CreateProcess (0, cmd_line, 0, 0, 0,
- CREATE_NEW_PROCESS_GROUP
- | CREATE_SUSPENDED
- | DEBUG_PROCESS
- | DEBUG_ONLY_THIS_PROCESS,
- 0, 0, &startup, &procinfo))
- {
- fprintf (stderr, "Can't create process: error %ld\n", GetLastError ());
- exit (1);
- }
-
- hProcess = procinfo.hProcess;
-#if 0
- printf ("procinfo: %08x %08x %08x %08x\n",
- hProcess, procinfo.hThread, procinfo.dwProcessId, procinfo.dwThreadId);
-#endif
-
- active_threads[0] = procinfo.hThread;
- active_thread_ids[0] = procinfo.dwThreadId;
- thread_step_flags[0] = stepping_enabled;
- num_active_threads = 1;
-
- dll_info[0].base_address = 0;
- dll_info[0].pcount = 0;
- dll_info[0].scount = 0;
- dll_info[0].name = cmd_line;
- num_dlls = 1;
-
- SetThreadPriority (procinfo.hThread, THREAD_PRIORITY_IDLE);
-
- context.ContextFlags = CONTEXT_FULL;
-
- ResumeThread (procinfo.hThread);
-
- total_cycles = 0;
-
- if (tracing_enabled)
- {
- tracefile = fopen ("trace.ssp", "w");
- if (!tracefile)
- {
- tracing_enabled = 0;
- perror ("trace.ssp");
- }
- }
-
- running = 1;
- while (running)
- {
- int src, dest;
- DWORD rv;
- DEBUG_EVENT event;
- int contv = DBG_CONTINUE;
-
- event.dwDebugEventCode = -1;
- if (!WaitForDebugEvent (&event, INFINITE))
- {
- printf ("idle...\n");
- }
-
- hThread = lookup_thread_id (event.dwThreadId, &tix);
-
-#if 0
- printf ("DE: %x/%d %d %d ",
- hThread, tix,
- event.dwDebugEventCode, num_active_threads);
- for (src=0; src<num_active_threads; src++)
- {
- int sc = SuspendThread (active_threads[src]);
- int rv = GetThreadContext (active_threads[src], &context);
- ResumeThread (active_threads[src]);
- printf (" [%x,%x,%x]",
- active_threads[src], context.Eip, active_thread_ids[src]);
- }
- printf ("\n");
-#endif
-
- switch (event.dwDebugEventCode)
- {
-
- case CREATE_PROCESS_DEBUG_EVENT:
- break;
-
- case CREATE_THREAD_DEBUG_EVENT:
- if (verbose)
- printf ("create thread %08lx at %08x %s\n",
- event.dwThreadId,
- (int)event.u.CreateThread.lpStartAddress,
- addr2dllname ((unsigned int)event.u.CreateThread.lpStartAddress));
-
- active_thread_ids[num_active_threads] = event.dwThreadId;
- active_threads[num_active_threads] = event.u.CreateThread.hThread;
- thread_return_address[num_active_threads] = 0;
- num_active_threads++;
-
- if (trace_all_threads && stepping_enabled)
- {
- thread_step_flags[num_active_threads-1] = stepping_enabled;
- add_breakpoint ((int)event.u.CreateThread.lpStartAddress);
- }
-
- break;
-
- case EXIT_THREAD_DEBUG_EVENT:
- if (verbose)
- printf ("exit thread %08lx, code=%ld\n",
- event.dwThreadId,
- event.u.ExitThread.dwExitCode);
-
- for (src=0, dest=0; src<num_active_threads; src++)
- if (active_thread_ids[src] != event.dwThreadId)
- {
- active_thread_ids[dest] = active_thread_ids[src];
- active_threads[dest] = active_threads[src];
- dest++;
- }
- num_active_threads = dest;
- break;
-
- case EXCEPTION_DEBUG_EVENT:
- rv = GetThreadContext (hThread, &context);
- switch (event.u.Exception.ExceptionRecord.ExceptionCode)
- {
- case STATUS_BREAKPOINT:
- if (remove_breakpoint ((int)event.u.Exception.ExceptionRecord.ExceptionAddress))
- {
- context.Eip --;
- if (rv != -1)
- SetThreadContext (hThread, &context);
- if (ReadProcessMemory (hProcess, (void *)context.Esp, &rv, 4, &rv))
- thread_return_address[tix] = rv;
- }
- set_step_threads (event.dwThreadId, stepping_enabled);
- case STATUS_SINGLE_STEP:
- opcode_count++;
- pc = (unsigned int)event.u.Exception.ExceptionRecord.ExceptionAddress;
- sp = (unsigned int)context.Esp;
- if (tracing_enabled)
- fprintf (tracefile, "%08x %08lx\n", pc, event.dwThreadId);
- if (trace_console)
- {
- printf ("%d %08x\n", tix, pc);
- fflush (stdout);
- }
-
- if (dll_counts)
- {
- int i;
- for (i=num_dlls-1; i>=0; i--)
- {
- if (dll_info[i].base_address < context.Eip)
- {
- if (hThread == procinfo.hThread)
- dll_info[i].pcount++;
- else
- dll_info[i].scount++;
- break;
- }
- }
- }
-
- if (pc < last_pc || pc > last_pc+10)
- {
- static int ncalls=0;
- static int qq=0;
- if (++qq % 100 == 0)
- fprintf (stderr, " %08x %d %d \r",
- pc, ncalls, opcode_count);
-
- if (sp == last_sp-4)
- {
- ncalls++;
- store_call_edge (last_pc, pc);
- if (last_pc < KERNEL_ADDR && pc > KERNEL_ADDR)
- {
- int retaddr;
- DWORD rv;
- ReadProcessMemory (hProcess,
- (void *)sp,
- (LPVOID)&(retaddr),
- 4, &rv);
-#if 0
- printf ("call last_pc = %08x pc = %08x rv = %08x\n",
- last_pc, pc, retaddr);
- /* experimental - try to skip kernel calls for speed */
- add_breakpoint (retaddr);
- set_step_threads (event.dwThreadId, 0);
-#endif
- }
- }
- }
-
- total_cycles++;
- last_sp = sp;
- last_pc = pc;
- if (pc >= low_pc && pc < high_pc)
- hits[(pc - low_pc)/2] ++;
- break;
- default:
- if (verbose)
- {
- printf ("exception %ld, ", event.u.Exception.dwFirstChance);
- printf ("code: %lx flags: %lx\n",
- event.u.Exception.ExceptionRecord.ExceptionCode,
- event.u.Exception.ExceptionRecord.ExceptionFlags);
- if (event.u.Exception.dwFirstChance == 1)
- dump_registers (hThread);
- }
- contv = DBG_EXCEPTION_NOT_HANDLED;
- running = 0;
- break;
- }
-
- if (rv != -1)
- {
- if (pc == thread_return_address[tix])
- {
- if (context.EFlags & 0x100)
- {
- context.EFlags &= ~0x100; /* TRAP (single step) flag */
- SetThreadContext (hThread, &context);
- }
- }
- else if (stepping_enabled)
- {
- if (!(context.EFlags & 0x100))
- {
- context.EFlags |= 0x100; /* TRAP (single step) flag */
- SetThreadContext (hThread, &context);
- }
- }
- }
- break;
-
- case OUTPUT_DEBUG_STRING_EVENT:
- string = (char *)malloc (event.u.DebugString.nDebugStringLength+1);
- i = ReadProcessMemory (hProcess,
- event.u.DebugString.lpDebugStringData,
- (LPVOID)string,
- event.u.DebugString.nDebugStringLength,
- &rv);
- if (!i)
- {
- printf ("error reading memory: %ld %ld\n", rv, GetLastError ());
- }
- if (verbose)
- printf ("ODS: %x/%d \"%s\"\n",
- (int)hThread, tix, string);
-
- if (strcmp (string, "ssp on") == 0)
- {
- stepping_enabled = 1;
- set_step_threads (event.dwThreadId, 1);
- }
-
- if (strcmp (string, "ssp off") == 0)
- {
- stepping_enabled = 0;
- set_step_threads (event.dwThreadId, 0);
- }
-
- break;
-
-
- case LOAD_DLL_DEBUG_EVENT:
- if (verbose)
- printf ("load dll %08x:",
- (int)event.u.LoadDll.lpBaseOfDll);
-
- dll_ptr = (char *)"( u n k n o w n ) \0\0";
- if (event.u.LoadDll.lpImageName)
- {
- ReadProcessMemory (hProcess,
- event.u.LoadDll.lpImageName,
- (LPVOID)&src,
- sizeof (src),
- &rv);
- if (src)
- {
- ReadProcessMemory (hProcess,
- (void *)src,
- (LPVOID)dll_name,
- sizeof (dll_name),
- &rv);
- dll_name[rv] = 0;
- dll_ptr = dll_name;
- for (cp=dll_name; *cp; cp++)
- {
- if (*cp == '\\' || *cp == '/')
- {
- dll_ptr = cp+1;
- }
- *cp = tolower (*cp);
- }
- }
- }
-
-
- dll_info[num_dlls].base_address
- = (unsigned int)event.u.LoadDll.lpBaseOfDll;
- dll_info[num_dlls].pcount = 0;
- dll_info[num_dlls].scount = 0;
- dll_info[num_dlls].name = wide_strdup (dll_ptr);
- if (verbose)
- printf (" %s\n", dll_info[num_dlls].name);
- num_dlls++;
- qsort (dll_info, num_dlls, sizeof (DllInfo), dll_sort);
-
- break;
-
- case UNLOAD_DLL_DEBUG_EVENT:
- if (verbose)
- printf ("unload dll\n");
- break;
-
- case EXIT_PROCESS_DEBUG_EVENT:
- if (verbose)
- printf ("process %08lx %08lx exit %ld\n",
- event.dwProcessId, event.dwThreadId,
- event.u.ExitProcess.dwExitCode);
-
- running = 0;
- break;
- }
-
- set_steps ();
- ContinueDebugEvent (event.dwProcessId, event.dwThreadId, contv);
- }
-
- count = 0;
- for (pc=low_pc; pc<high_pc; pc+=2)
- {
- count += hits[(pc - low_pc)/2];
- }
- printf ("total cycles: %d, counted cycles: %d\n", total_cycles, count);
-
- if (tracing_enabled)
- fclose (tracefile);
-
-}
-
-#define WHITE(s) while (isspace (*s)) s++
-
-int
-main (int argc, char **argv)
-{
- int i, n;
- int total_pcount, total_scount;
- FILE *gmon;
-
- setbuf (stdout, 0);
-
- cmd_line = GetCommandLine ();
-
- /* strip off the program part */
- n = sscanf (cmd_line, "%*s%n", &i);
- cmd_line += i;
- WHITE (cmd_line);
-
- /* parse arguments. Ugly, but we need to preserve the tail of the line */
- while (*cmd_line == '-')
- {
- char opt[100];
- n = sscanf (cmd_line, " %s%n", opt, &i);
- cmd_line += i;
- WHITE (cmd_line);
-
- if (strcmp (opt, "-d") == 0)
- {
- printf ("stepping disabled; enable via OutputDebugString (\"ssp on\")\n");
- stepping_enabled = 0;
- }
- if (strcmp (opt, "-e") == 0)
- {
- printf ("stepping enabled; disable via OutputDebugString (\"ssp off\")\n");
- stepping_enabled = 1;
- }
- if (strcmp (opt, "-t") == 0)
- {
- printf ("tracing all $eip to trace.ssp\n");
- tracing_enabled = 1;
- }
- if (strcmp (opt, "-tc") == 0)
- {
- printf ("tracing *all* $eip to the console\n");
- trace_console = 1;
- }
- if (strcmp (opt, "-s") == 0)
- {
- printf ("tracing all sub-threads too, not just the main one\n");
- trace_all_threads = 1;
- }
- if (strcmp (opt, "-dll") == 0)
- {
- printf ("profiling dll usage\n");
- dll_counts = 1;
- }
- if (strcmp (opt, "-v") == 0)
- {
- printf ("verbose messages enabled\n");
- verbose = 1;
- }
- }
-
- n = sscanf (cmd_line, " %i %i %n", &low_pc, &high_pc, &i);
- if (n < 2)
- {
- fputs (help_text, stderr);
- exit (1);
- }
- cmd_line += i;
-
- if (low_pc > high_pc-8)
- {
- fprintf (stderr, "Hey, low_pc must be lower than high_pc\n");
- exit (1);
- }
-
- hits = (HISTCOUNTER *)malloc (high_pc-low_pc+4);
- memset (hits, 0, high_pc-low_pc+4);
-
- fprintf (stderr, "prun: [%08x,%08x] Running `%s'\n",
- low_pc, high_pc, cmd_line);
-
- run_program (cmd_line);
-
- hdr.lpc = low_pc;
- hdr.hpc = high_pc;
- hdr.ncnt = high_pc-low_pc + sizeof (hdr);
- hdr.version = GMONVERSION;
- hdr.profrate = 100;
-
- gmon = fopen ("gmon.out", "wb");
- fwrite (&hdr, 1, sizeof (hdr), gmon);
- fwrite (hits, 1, high_pc-low_pc, gmon);
- write_call_edges (gmon);
- fclose (gmon);
-
- if (dll_counts)
- {
- /* 1234567 123% 1234567 123% 12345678 xxxxxxxxxxx */
- printf (" Main-Thread Other-Thread BaseAddr DLL Name\n");
-
- total_pcount = 0;
- total_scount = 0;
- for (i=0; i<num_dlls; i++)
- {
- total_pcount += dll_info[i].pcount;
- total_scount += dll_info[i].scount;
- }
-
- if (total_pcount == 0) total_pcount++;
- if (total_scount == 0) total_scount++;
-
- for (i=0; i<num_dlls; i++)
- if (dll_info[i].pcount || dll_info[i].scount)
- {
- printf ("%7d %3d%% %7d %3d%% %08x %s\n",
- dll_info[i].pcount,
- (dll_info[i].pcount*100)/opcode_count,
- dll_info[i].scount,
- (dll_info[i].scount*100)/opcode_count,
- dll_info[i].base_address,
- dll_info[i].name);
- }
- }
-
- exit (0);
-}
-
diff --git a/winsup/utils/ssp.txt b/winsup/utils/ssp.txt
deleted file mode 100644
index e73880e90..000000000
--- a/winsup/utils/ssp.txt
+++ /dev/null
@@ -1,125 +0,0 @@
-
-SSP - The Single Step Profiler
-
-Original Author: DJ Delorie <dj@redhat.com>
-
-The SSP is a program that uses the Win32 debug API to run a program
-one ASM instruction at a time. It records the location of each
-instruction used, how many times that instruction is used, and all
-function calls. The results are saved in a format that is usable by
-the profiling program "gprof", although gprof will claim the values
-are seconds, they really are instruction counts. More on that later.
-
-Because the SSP was originally designed to profile the cygwin DLL, it
-does not automatically select a block of code to report statistics on.
-You must specify the range of memory addresses to keep track of
-manually, but it's not hard to figure out what to specify. Use the
-"objdump" program to determine the bounds of the target's ".text"
-section. Let's say we're profiling cygwin1.dll. Make sure you've
-built it with debug symbols (else gprof won't run) and run objdump
-like this:
-
- objdump -h cygwin1.dll
-
-It will print a report like this:
-
-cygwin1.dll: file format pei-i386
-
-Sections:
-Idx Name Size VMA LMA File off Algn
- 0 .text 0007ea00 61001000 61001000 00000400 2**2
- CONTENTS, ALLOC, LOAD, READONLY, CODE, DATA
- 1 .data 00008000 61080000 61080000 0007ee00 2**2
- CONTENTS, ALLOC, LOAD, DATA
- . . .
-
-The only information we're concerned with are the VMA of the .text
-section and the VMA of the section after it (sections are usually
-contiguous; you can also add the Size to the VMA to get the end
-address). In this case, the VMA is 0x61001000 and the ending address
-is either 0x61080000 (start of .data method) or 0x0x6107fa00 (VMA+Size
-method).
-
-There are two basic ways to use SSP - either profiling a whole
-program, or selectively profiling parts of the program.
-
-To profile a whole program, just run ssp without options. By default,
-it will step the whole program. Here's a simple example, using the
-numbers above:
-
- ssp 0x61001000 0x61080000 hello.exe
-
-This will step the whole program. It will take at least 8 minutes on
-a PII/300 (yes, really). When it's done, it will create a file called
-"gmon.out". You can turn this data file into a readable report with
-gprof:
-
- gprof -b cygwin1.dll
-
-The "-b" means "skip the help pages". You can omit this until you're
-familiar with the report layout. The gprof documentation explains
-a lot about this report, but ssp changes a few things. For example,
-the first part of the report reports the amount of time spent in each
-function, like this:
-
-Each sample counts as 0.01 seconds.
- % cumulative self self total
- time seconds seconds calls ms/call ms/call name
- 10.02 231.22 72.43 46 1574.57 1574.57 strcspn
- 7.95 288.70 57.48 130 442.15 442.15 strncasematch
-
-The "seconds" columns are really CPU opcodes, 1/100 second per opcode.
-So, "231.22" above means 23,122 opcodes. The ms/call values are 10x
-too big; 1574.57 means 157.457 opcodes per call. Similar adjustments
-need to be made for the "self" and "children" columns in the second
-part of the report.
-
-OK, so now we've got a huge report that took a long time to generate,
-and we've identified a spot we want to work on optimizing. Let's say
-it's the time() function. We can use SSP to selectively profile this
-function by using OutputDebugString() to control SSP from within the
-program. Here's a sample program:
-
- #include <windows.h>
- main()
- {
- time_t t;
- OutputDebugString("ssp on");
- time(&t);
- OutputDebugString("ssp off");
- }
-
-Then, add the "-d" option to ssp to default to *disabling* profiling.
-The program will run at full speed until the first OutputDebugString,
-then step until the second.
-
- ssp -d 0x61001000 0x61080000 hello.exe
-
-You can then use gprof (as usual) to see the performance profile for
-just that portion of the program's execution.
-
-OK, now for the other ssp options, and when to use them:
-
-"-v" - verbose. This prints messages about threads starting and
-stopping, OutputDebugString calls, DLLs loading, etc.
-
-"-t" and "-tc" - tracing. With -t, *every* step's address is written
-to the file "trace.ssp". This can be used to help debug functions,
-since it can trace multiple threads. Clever use of scripts can match
-addresses with disassembled opcodes if needed. Warning: creates
-*huge* files, very quickly. "-tc" prints each address to the console,
-useful for debugging key chunks of assembler.
-
-"-s" - subthreads. Usually, you only need to trace the main thread,
-but sometimes you need to trace all threads, so this enables that.
-It's also needed when you want to profile a function that only a
-subthread calls. However, using OutputDebugString automatically
-enables profiling on the thread that called it, not the main thread.
-
-"-dll" - dll profiling. Generates a pretty table of how much time was
-spent in each dll the program used. No sense optimizing a function in
-your program if most of the time is spent in the DLL.
-
-I usually use the -v, -s, and -dll options:
-
- ssp -v -s -dll -d 0x61001000 0x61080000 hello.exe
diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc
deleted file mode 100644
index b9eb82a77..000000000
--- a/winsup/utils/strace.cc
+++ /dev/null
@@ -1,645 +0,0 @@
-#include <stdio.h>
-#include <fcntl.h>
-#include <getopt.h>
-#include <stdarg.h>
-#include <string.h>
-#include <stdlib.h>
-#include <windows.h>
-#include <signal.h>
-#include "sys/strace.h"
-
-/* GCC runtime library's C++ EH code unfortunately pulls in stdio, and we
- get undefine references to __impure_ptr, and hence the following
- hack. It should be reasonably safe however as long as this file
- is built using -mno-cygwin as is intended. */
-int _impure_ptr;
-
-/* we *know* we're being built with GCC */
-#define alloca __builtin_alloca
-
-static const char *pgm;
-static int forkdebug = 0;
-static int numerror = 1;
-static int usecs = 1;
-static int delta = 1;
-static int hhmmss = 0;
-static int bufsize = 0;
-
-static BOOL close_handle (HANDLE h, DWORD ok);
-
-#define CloseHandle(h) close_handle(h, 0)
-
-struct child_list
-{
- DWORD id;
- HANDLE hproc;
- int saw_stars;
- char nfields;
- long long start_time;
- DWORD last_usecs;
- struct child_list *next;
- child_list ():id (0), hproc (NULL), saw_stars (0), nfields (0),
- start_time (0), last_usecs (0), next (NULL)
- {
- }
-};
-
-child_list children;
-
-static void
-warn (int geterrno, const char *fmt, ...)
-{
- va_list args;
- char buf[4096];
-
- va_start (args, fmt);
- sprintf (buf, "%s: ", pgm);
- vsprintf (strchr (buf, '\0'), fmt, args);
- if (geterrno)
- perror (buf);
- else
- {
- fputs (buf, stderr);
- fputs ("\n", stderr);
- }
-}
-
-static void __attribute__ ((noreturn))
-error (int geterrno, const char *fmt, ...)
-{
- va_list args;
- char buf[4096];
-
- va_start (args, fmt);
- sprintf (buf, "%s: ", pgm);
- vsprintf (strchr (buf, '\0'), fmt, args);
- if (geterrno)
- perror (buf);
- else
- {
- fputs (buf, stderr);
- fputs ("\n", stderr);
- }
- ExitProcess (1);
-}
-
-DWORD lastid = 0;
-HANDLE lasth;
-
-#define PROCFLAGS \
- PROCESS_ALL_ACCESS /*(PROCESS_DUP_HANDLE | PROCESS_TERMINATE | PROCESS_VM_READ | PROCESS_VM_WRITE) */
-static void
-add_child (DWORD id, HANDLE hproc)
-{
- child_list *c = children.next;
- children.next = new (child_list);
- children.next->next = c;
- lastid = children.next->id = id;
- HANDLE me = GetCurrentProcess ();
- lasth = children.next->hproc = hproc;
-}
-
-static child_list *
-get_child (DWORD id)
-{
- child_list *c;
- for (c = &children; (c = c->next) != NULL;)
- if (c->id == id)
- return c;
-
- error (0, "no process id %d found", id);
-}
-
-static void
-remove_child (DWORD id)
-{
- child_list *c;
- if (id == lastid)
- lastid = 0;
- for (c = &children; c->next != NULL; c = c->next)
- if (c->next->id == id)
- {
- child_list *c1 = c->next;
- c->next = c1->next;
- delete c1;
- return;
- }
-
- error (0, "no process id %d found", id);
-}
-
-#define LINE_BUF_CHUNK 128
-
-class linebuf
-{
- size_t alloc;
-public:
- size_t ix;
- char *buf;
- linebuf ()
- {
- ix = 0;
- alloc = 0;
- buf = NULL;
- }
- ~linebuf ()
- {
- if (buf)
- free (buf);
- }
- void add (const char *what, int len);
- void add (const char *what)
- {
- add (what, strlen (what));
- }
- void prepend (const char *what, int len);
-};
-
-void
-linebuf::add (const char *what, int len)
-{
- size_t newix;
- if ((newix = ix + len) >= alloc)
- {
- alloc += LINE_BUF_CHUNK + len;
- buf = (char *) realloc (buf, alloc + 1);
- }
- memcpy (buf + ix, what, len);
- ix = newix;
- buf[ix] = '\0';
-}
-
-void
-linebuf::prepend (const char *what, int len)
-{
- int buflen;
- size_t newix;
- if ((newix = ix + len) >= alloc)
- {
- alloc += LINE_BUF_CHUNK + len;
- buf = (char *) realloc (buf, alloc + 1);
- buf[ix] = '\0';
- }
- if ((buflen = strlen (buf)))
- memmove (buf + len, buf, buflen + 1);
- else
- buf[newix] = '\0';
- memcpy (buf, what, len);
- ix = newix;
-}
-
-static void
-make_command_line (linebuf & one_line, char **argv)
-{
- for (; *argv; argv++)
- {
- char *p = NULL;
- const char *a = *argv;
-
- int len = strlen (a);
- if (len != 0 && !(p = strpbrk (a, " \t\n\r\"")))
- one_line.add (a, len);
- else
- {
- one_line.add ("\"", 1);
- for (; p; a = p, p = strchr (p, '"'))
- {
- one_line.add (a, ++p - a);
- if (p[-1] == '"')
- one_line.add ("\"", 1);
- }
- if (*a)
- one_line.add (a);
- one_line.add ("\"", 1);
- }
- one_line.add (" ", 1);
- }
-
- if (one_line.ix)
- one_line.buf[one_line.ix - 1] = '\0';
- else
- one_line.add ("", 1);
-}
-
-static DWORD child_pid;
-
-static BOOL WINAPI
-ctrl_c (DWORD)
-{
- static int tic = 1;
- if ((tic ^= 1) && !GenerateConsoleCtrlEvent (CTRL_C_EVENT, 0))
- error (0, "couldn't send CTRL-C to child, win32 error %d\n",
- GetLastError ());
- return TRUE;
-}
-
-static void
-create_child (char **argv)
-{
- linebuf one_line;
-
- STARTUPINFO si;
- PROCESS_INFORMATION pi;
- BOOL ret;
- DWORD flags;
-
- if (!*argv)
- error (0, "no program argument specified");
-
- memset (&si, 0, sizeof (si));
- si.cb = sizeof (si);
-
- /* cygwin32_conv_to_win32_path (exec_file, real_path); */
-
- flags = forkdebug ? 0 : DEBUG_ONLY_THIS_PROCESS;
- flags |=
- /*CREATE_NEW_PROCESS_GROUP | */ CREATE_DEFAULT_ERROR_MODE | DEBUG_PROCESS;
-
- make_command_line (one_line, argv);
-
- SetConsoleCtrlHandler (NULL, 0);
- ret = CreateProcess (0, one_line.buf, /* command line */
- NULL, /* Security */
- NULL, /* thread */
- TRUE, /* inherit handles */
- flags, /* start flags */
- NULL, NULL, /* current directory */
- &si, &pi);
- if (!ret)
- error (0, "error creating process %s, (error %d)", *argv,
- GetLastError ());
-
- CloseHandle (pi.hThread);
- CloseHandle (pi.hProcess);
- child_pid = pi.dwProcessId;
- SetConsoleCtrlHandler (ctrl_c, 1);
-}
-
-static int
-output_winerror (FILE *ofile, char *s)
-{
- char *winerr = strstr (s, "Win32 error ");
- if (!winerr)
- return 0;
-
- DWORD errnum = atoi (winerr + sizeof ("Win32 error ") - 1);
- if (!errnum)
- return 0;
-
- /*
- * NOTE: Currently there is no policy for how long the
- * the buffers are, and looks like 256 is a smallest one
- * (dlfcn.cc). Other than error 1395 (length 213) and
- * error 1015 (length 249), the rest are all under 188
- * characters, and so I'll use 189 as the buffer length.
- * For those longer error messages, FormatMessage will
- * return FALSE, and we'll get the old behaviour such as
- * ``Win32 error 1395'' etc.
- */
- char buf[4096];
- if (!FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM
- | FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- errnum,
- MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR) buf, sizeof (buf), NULL))
- return 0;
-
- /* Get rid the trailing CR/NL pair. */
- char *p = strchr (buf, '\0');
- p[-2] = '\n';
- p[-1] = '\0';
-
- *winerr = '\0';
- fputs (s, ofile);
- fputs (buf, ofile);
- return 1;
-}
-
-static SYSTEMTIME *
-syst (long long t)
-{
- FILETIME n;
- static SYSTEMTIME st;
- long long now = t + ((long long) usecs * 10);
- n.dwHighDateTime = now >> 32;
- n.dwLowDateTime = now & 0xffffffff;
- FileTimeToSystemTime (&n, &st);
- return &st;
-}
-
-static void __stdcall
-handle_output_debug_string (DWORD id, LPVOID p, unsigned mask, FILE *ofile)
-{
- int len;
- int special;
- char alen[3 + 8 + 1];
- DWORD nbytes;
- child_list *child = get_child (id);
- HANDLE hchild = child->hproc;
-#define INTROLEN (sizeof (alen) - 1)
-
- if (id == lastid && hchild != lasth)
- warn (0, "%p != %p", hchild, lasth);
-
- alen[INTROLEN] = '\0';
- if (!ReadProcessMemory (hchild, p, alen, INTROLEN, &nbytes))
-#ifndef DEBUGGING
- return;
-#else
- error (0,
- "couldn't get message length from subprocess %d<%p>, windows error %d",
- id, hchild, GetLastError ());
-#endif
-
- if (strncmp (alen, "cYg", 3))
- return;
- len = (int) strtoul (alen + 3, NULL, 16);
- if (!len)
- return;
-
- if (len > 0)
- special = 0;
- else
- {
- special = len;
- if (special == _STRACE_INTERFACE_ACTIVATE_ADDR)
- len = 17;
- }
-
- char *buf;
- buf = (char *) alloca (len + 65) + 10;
-
- if (!ReadProcessMemory (hchild, ((char *) p) + INTROLEN, buf, len, &nbytes))
- error (0, "couldn't get message from subprocess, windows error %d",
- GetLastError ());
-
- buf[len] = '\0';
- char *s = strtok (buf, " ");
-
- unsigned n = strtoul (s, NULL, 16);
-
- s = strchr (s, '\0') + 1;
-
- if (special == _STRACE_INTERFACE_ACTIVATE_ADDR)
- {
- DWORD new_flag = 1;
- if (!WriteProcessMemory (hchild, (LPVOID) n, &new_flag,
- sizeof (new_flag), &nbytes))
- error (0,
- "couldn't write strace flag to subprocess, windows error %d",
- GetLastError ());
- return;
- }
-
- char *origs = s;
-
- if (mask & n)
- /* got it */ ;
- else if (!(mask & _STRACE_ALL) || (n & _STRACE_NOTALL))
- return; /* This should not be included in "all" output */
-
- DWORD dusecs, usecs;
- char *ptusec, *ptrest;
-
- dusecs = strtoul (s, &ptusec, 10);
- char *q = ptusec;
- while (*q == ' ')
- q++;
- if (*q != '[')
- {
- usecs = strtoul (q, &ptrest, 10);
- while (*ptrest == ' ')
- ptrest++;
- }
- else
- {
- ptrest = q;
- ptusec = s;
- usecs = dusecs;
- }
-
- if (child->saw_stars == 0)
- {
- FILETIME st;
- char *news;
-
- GetSystemTimeAsFileTime (&st);
- FileTimeToLocalFileTime (&st, &st);
- child->start_time = st.dwHighDateTime;
- child->start_time <<= 32;
- child->start_time |= st.dwLowDateTime;
- if (*(news = ptrest) != '[')
- child->saw_stars = 2;
- else
- {
- child->saw_stars++;
- while ((news = strchr (news, ' ')) != NULL && *++news != '*')
- child->nfields++;
- if (news == NULL)
- child->saw_stars++;
- else
- {
- s = news;
- child->nfields++;
- }
- }
- }
- else if (child->saw_stars < 2)
- {
- int i;
- char *news;
- if (*(news = ptrest) != '[')
- child->saw_stars = 2;
- else
- {
- for (i = 0; i < child->nfields; i++)
- if ((news = strchr (news, ' ')) == NULL)
- break; // Should never happen
- else
- news++;
-
- if (news == NULL)
- child->saw_stars = 2;
- else
- {
- s = news;
- if (*s == '*')
- {
- SYSTEMTIME *st = syst (child->start_time);
- fprintf (ofile,
- "Date/Time: %d-%02d-%02d %02d:%02d:%02d\n",
- st->wYear, st->wMonth, st->wDay, st->wHour,
- st->wMinute, st->wSecond);
- child->saw_stars++;
- }
- }
- }
- }
-
- long long d = usecs - child->last_usecs;
- char intbuf[40];
-
- if (child->saw_stars < 2 || s != origs)
- /* Nothing */ ;
- else if (hhmmss)
- {
- s = ptrest - 9;
- SYSTEMTIME *st = syst (child->start_time + (long long) usecs * 10);
- sprintf (s, "%02d:%02d:%02d", st->wHour, st->wMinute, st->wSecond);
- *strchr (s, '\0') = ' ';
- }
- else if (!delta)
- s = ptusec;
- else
- {
- s = ptusec;
- sprintf (intbuf, "%5d ", (int) d);
- int len = strlen (intbuf);
-
- memcpy ((s -= len), intbuf, len);
- }
-
- child->last_usecs = usecs;
- if (numerror || !output_winerror (ofile, s))
- fputs (s, ofile);
- if (!bufsize)
- fflush (ofile);
-}
-
-static void
-proc_child (unsigned mask, FILE *ofile)
-{
- DEBUG_EVENT ev;
- int processes = 0;
- SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_HIGHEST);
- while (1)
- {
- BOOL debug_event = WaitForDebugEvent (&ev, 1000);
- DWORD status = DBG_CONTINUE;
- if (!debug_event)
- continue;
-
- switch (ev.dwDebugEventCode)
- {
- case CREATE_PROCESS_DEBUG_EVENT:
- if (ev.u.CreateProcessInfo.hFile)
- CloseHandle (ev.u.CreateProcessInfo.hFile);
- add_child (ev.dwProcessId, ev.u.CreateProcessInfo.hProcess);
- processes++;
- break;
-
- case CREATE_THREAD_DEBUG_EVENT:
- break;
-
- case LOAD_DLL_DEBUG_EVENT:
- if (ev.u.LoadDll.hFile)
- CloseHandle (ev.u.LoadDll.hFile);
- break;
-
- case OUTPUT_DEBUG_STRING_EVENT:
- handle_output_debug_string (ev.dwProcessId,
- ev.u.DebugString.lpDebugStringData,
- mask, ofile);
- break;
-
- case EXIT_PROCESS_DEBUG_EVENT:
- remove_child (ev.dwProcessId);
- break;
- case EXCEPTION_DEBUG_EVENT:
- if (ev.u.Exception.ExceptionRecord.ExceptionCode !=
- STATUS_BREAKPOINT)
- {
- status = DBG_EXCEPTION_NOT_HANDLED;
-#if 0
- fprintf (stderr, "exception %p at %p\n",
- ev.u.Exception.ExceptionRecord.ExceptionCode,
- ev.u.Exception.ExceptionRecord.ExceptionAddress);
-#endif
- }
- break;
- }
- if (!ContinueDebugEvent (ev.dwProcessId, ev.dwThreadId, status))
- error (0, "couldn't continue debug event, windows error %d",
- GetLastError ());
- if (ev.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT && --processes == 0)
- break;
- }
-}
-
-static void
-dostrace (unsigned mask, FILE *ofile, char **argv)
-{
- create_child (argv);
- proc_child (mask, ofile);
-
- return;
-}
-
-int
-main (int argc, char **argv)
-{
- unsigned mask = 0;
- FILE *ofile = NULL;
- int opt;
-
- if (!(pgm = strrchr (*argv, '\\')) && !(pgm = strrchr (*argv, '/')))
- pgm = *argv;
- else
- pgm++;
-
- while ((opt = getopt (argc, argv, "b:m:o:fndut")) != EOF)
- switch (opt)
- {
- case 'f':
- forkdebug ^= 1;
- break;
- case 'b':
- bufsize = atoi (optarg);
- break;
- case 'm':
- mask = strtoul (optarg, NULL, 16);
- break;
- case 'o':
- if ((ofile = fopen (optarg, "w")) == NULL)
- error (1, "can't open %s", optarg);
-#ifdef F_SETFD
- (void) fcntl (fileno (ofile), F_SETFD, 0);
-#endif
- break;
- case 'n':
- numerror ^= 1;
- break;
- case 't':
- hhmmss ^= 1;
- break;
- case 'd':
- delta ^= 1;
- break;
- case 'u':
- usecs ^= 1;
- }
-
- if (!mask)
- mask = 1;
-
- if (bufsize)
- setvbuf (ofile, (char *) alloca (bufsize), _IOFBF, bufsize);
-
- if (!ofile)
- ofile = stdout;
-
- dostrace (mask, ofile, argv + optind);
-}
-
-#undef CloseHandle
-
-static BOOL
-close_handle (HANDLE h, DWORD ok)
-{
- child_list *c;
- for (c = &children; (c = c->next) != NULL;)
- if (c->hproc == h && c->id != ok)
- error (0, "Closing child handle %p", h);
- return CloseHandle (h);
-}
diff --git a/winsup/utils/umount.cc b/winsup/utils/umount.cc
deleted file mode 100644
index 3c1e5f35f..000000000
--- a/winsup/utils/umount.cc
+++ /dev/null
@@ -1,205 +0,0 @@
-/* umount.cc
-
- Copyright 1996, 1998, 1999 Cygnus Solutions.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/mount.h>
-#include <mntent.h>
-#include <stdlib.h>
-#include <errno.h>
-
-static void remove_all_mounts ();
-static void remove_all_automounts ();
-static void remove_all_user_mounts ();
-static void remove_all_system_mounts ();
-static void remove_cygdrive_prefix (int flags);
-
-static const char *progname;
-
-static void
-usage (void)
-{
- fprintf (stderr, "Usage %s [-s] <posixpath>\n", progname);
- fprintf (stderr,
- "-s = remove mount point from system-wide registry location\n");
- fprintf (stderr, "\n");
- fprintf (stderr, "--remove-all-mounts = remove all mounts\n");
- fprintf (stderr,
- "--remove-auto-mounts = remove all automatically mounted mounts\n");
- fprintf (stderr,
- "--remove-user-mounts = remove all mounts in the current user mount registry area, including auto mounts\n");
- fprintf (stderr,
- "--remove-system-mounts = remove all mounts in the system-wide mount registry area\n");
- fprintf (stderr,
- "[-s] --remove-cygdrive-prefix = remove cygdrive path prefix\n");
- exit (1);
-}
-
-static void
-error (const char *path)
-{
- fprintf (stderr, "%s: %s: %s\n", progname, path, strerror (errno));
- exit (1);
-}
-
-int
-main (int argc, char **argv)
-{
- int i;
- int flags = 0;
- progname = argv[0];
-
- if (argc == 1)
- usage ();
-
- for (i = 1; i < argc; ++i)
- {
- if (argv[i][0] != '-')
- break;
-
- if (strcmp (argv[i], "-s") == 0)
- {
- flags |= MOUNT_SYSTEM;
- }
- else if (strcmp (argv[i], "--remove-all-mounts") == 0)
- {
- remove_all_mounts ();
- exit (0);
- }
- else if (strcmp (argv[i], "--remove-user-mounts") == 0)
- {
- remove_all_user_mounts ();
- exit (0);
- }
- else if (strcmp (argv[i], "--remove-system-mounts") == 0)
- {
- remove_all_system_mounts ();
- exit (0);
- }
- else if (strcmp (argv[i], "--remove-auto-mounts") == 0)
- {
- remove_all_automounts ();
- exit (0);
- }
- else if (strcmp (argv[i], "--remove-cygdrive-prefix") == 0)
- {
- remove_cygdrive_prefix (flags);
- exit (0);
- }
- else
- usage ();
- }
-
- if ((i + 1) != argc)
- usage ();
-
- if (cygwin_umount (argv[i], flags) != 0)
- error (argv[i]);
-
- return 0;
-}
-
-/* remove_all_mounts: Unmount all mounts. */
-static void
-remove_all_mounts ()
-{
- remove_all_user_mounts ();
- remove_all_system_mounts ();
-}
-
-/* remove_all_automounts: Unmount all automounts. */
-static void
-remove_all_automounts ()
-{
- FILE *m = setmntent ("/-not-used-", "r");
- struct mntent *p;
-
- while ((p = getmntent (m)) != NULL)
- {
- /* Remove the mount if it's an automount. */
- if (strcmp (p->mnt_type, "user,auto") == 0)
- {
- 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");
- }
- else if (strcmp (p->mnt_type, "system,auto") == 0)
- {
- if (cygwin_umount (p->mnt_dir, MOUNT_SYSTEM))
- error (p->mnt_dir);
-
- /* We've modified the table so we need to start over. */
- endmntent (m);
- m = setmntent ("/-not-used-", "r");
- }
- }
-
- endmntent (m);
-}
-
-/* remove_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)
- {
- if (cygwin_umount (p->mnt_dir, 0))
- error (p->mnt_dir);
-
- /* We've modified the table so we need to start over. */
- endmntent (m);
- m = setmntent ("/-not-used-", "r");
- }
- }
-
- endmntent (m);
-}
-
-/* remove_all_system_mounts: Unmount all system mounts. */
-static void
-remove_all_system_mounts ()
-{
- FILE *m = setmntent ("/-not-used-", "r");
- struct mntent *p;
-
- while ((p = getmntent (m)) != NULL)
- {
- /* Remove the mount if it's a system mount. */
- if (strncmp (p->mnt_type, "system", 6) == 0)
- {
- if (cygwin_umount (p->mnt_dir, MOUNT_SYSTEM))
- error (p->mnt_dir);
-
- /* We've modified the table so we need to start over. */
- endmntent (m);
- m = setmntent ("/-not-used-", "r");
- }
- }
-
- endmntent (m);
-}
-
-/* remove_cygdrive_prefix: Remove cygdrive user or system path prefix. */
-static void
-remove_cygdrive_prefix (int flags)
-{
- int res = cygwin_umount (NULL, flags | MOUNT_AUTO);
- if (res)
- error ("remove_cygdrive_prefix");
-}
diff --git a/winsup/utils/utils.sgml b/winsup/utils/utils.sgml
deleted file mode 100644
index e59c125cb..000000000
--- a/winsup/utils/utils.sgml
+++ /dev/null
@@ -1,676 +0,0 @@
-<sect1 id="using-utils"><title>Cygwin Utilities</title>
-
-<para>Cygwin comes with a number of command-line utilities that are
-used to manage the UNIX emulation portion of the Cygwin environment.
-While many of these reflect their UNIX counterparts, each was written
-specifically for Cygwin.</para>
-
-<sect2 id="cygcheck"><title>cygcheck</title>
-
-<screen>
-Usage: cygcheck [-s] [-v] [-r] [-h] [program ...]
- -s = system information
- -v = verbose output (indented) (for -s or programs)
- -r = registry search (requires -s)
- -h = give help about the info
-You must at least give either -s or a program name
-</screen>
-
-<para>The <command>cygcheck</command> program is a diagnostic utility
-that examines your system and reports the information that is
-significant to the proper operation of Cygwin programs. It can give
-information about a specific program (or program) you are trying to
-run, general system information, or both. If you list one or more
-programs on the command line, it will diagnose the runtime environment
-of that program or programs. If you specify the <literal>-s</literal>
-option, it will give general system information. If you specify
-<literal>-s</literal> and list one or more programs on the command line,
-it reports on both.</para>
-
-<para>The <command>cygcheck</command> program should be used to send
-information about your system to Cygnus for troubleshooting (if your
-support representative requests it). When asked to run this command,
-include all the options plus any commands you are having trouble with,
-and save the output so that you can mail it to Cygnus, like
-this:</para>
-
-<screen>
-<prompt>C:\Cygnus&gt;</prompt> <userinput>cygcheck -s -v -r -h &gt; tocygnus.txt</userinput>
-</screen>
-
-<para>The <literal>-v</literal> option causes the output to be more
-verbose. What this means is that additional information will be
-reported which is usually not interesting, such as the internal
-version numbers of DLLs, additional information about recursive DLL
-usage, and if a file in one directory in the PATH also occurs in other
-directories on the PATH. </para>
-
-<para>The <literal>-r</literal> option causes
-<command>cygcheck</command> to search your registry for information
-that is relevent to Cygnus programs. These registry entries are the
-ones that have "Cygnus" in the name. If you are paranoid about
-privacy, you may remove information from this report, but please keep
-in mind that doing so makes it harder for Cygnus to diagnose your
-problems.</para>
-
-<para>The <literal>-h</literal> option prints additional helpful
-messages in the report, at the beginning of each section. It also
-adds table column headings. While this is useful information, it also
-adds some to the size of the report, so if you want a compact report
-or if you know what everything is already, just leave this out.</para>
-
-</sect2>
-
-<sect2 id="cygpath"><title>cygpath</title>
-
-<screen>
-Usage: cygpath [-p|--path] (-u|--unix)|(-w|--windows [-s|--short-name]) filename
- cygpath [-v|--version]
- cygpath [-W|--windir|-S|--sysdir]
- -u|--unix print UNIX form of filename
- -w|--windows print Windows form of filename
- -s|--short-name print Windows short form of filename
- -p|--path filename argument is a path
- -v|--version print program version
- -W|--windir print Windows directory
- -S|--sysdir print Windows system directory
- -i|--ignore ignore missing filename argument
-</screen>
-
-<para>The <command>cygpath</command> program is a utility that
-converts Windows native filenames to Cygwin POSIX-style pathnames and
-back. It can be used when a Cygwin program needs to pass a file name
-to a native Windows program, or expects to get a file name from a
-native Windows program. You may use the long or short option names
-interchangeably, even though only the short ones are described
-here.</para>
-
-<para>The <literal>-u</literal> and <literal>-w</literal> options
-indicate whether you want a conversion from Windows to UNIX (POSIX)
-format (<literal>-u</literal>) or a conversion from UNIX (POSIX) to
-Windows format (<literal>-w</literal>). You must give exactly
-one of these. To give neither or both is an error. Use the
-<literal>-s</literal> option in combination with the <literal>-w
-</literal> option to convert to Windows short form.</para>
-
-<para>The <literal>-p</literal> option means that you want to convert
-a path-style string rather than a single filename. For example, the
-PATH environment variable is semicolon-delimited in Windows, but
-colon-delimited in UNIX. By giving <literal>-p</literal> you are
-instructing <command>cygpath</command> to convert between these
-formats.</para>
-
-<para>The <literal>-i</literal> option supresses the print out of the
-usage message if no filename argument was given. It can be used in
-make file rules converting variables to a proper format that may be
-omitted.</para>
-
-<example><title>Example cygpath usage</title>
-<screen>
-#!/bin/sh
-for i in `echo *.exe | sed 's/\.exe/cc/'`
-do
- notepad "`cygpath -w $i`"
-done
-</screen>
-</example>
-
-</sect2>
-
-<sect2 id="kill"><title>kill</title>
-
-<screen>
-Usage: kill [-sigN] pid1 [pid2 ...]
-</screen>
-
-<para>The <command>kill</command> program allows you to send arbitrary
-signals to other Cygwin programs. The usual purpose is to end a
-running program from some other window when ^C won't work, but you can
-also send program-specified signals such as SIGUSR1 to trigger actions
-within the program, like enabling debugging or re-opening log files.
-Each program defines the signals they understand.</para>
-
-<para>Note that the "pid" values are the Cygwin pids, not the Windows
-pids. To get a list of running programs and their Cygwin pids, use
-the Cygwin <command>ps</command> program.</para>
-
-<para>To send a specific signal, use the
-<literal>-signN</literal> option, either
-with a signal number or a signal name (minus the "SIG" part), like
-these examples:</para>
-
-<example><title>Specifying signals with 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>
-</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
-SIGCLD 20 System V name for SIGCHLD
-SIGTTIN 21 to readers pgrp upon background tty read
-SIGTTOU 22 like TTIN for output if (tp-&gt;t_local&amp;LTOSTOP)
-SIGIO 23 input/output possible signal
-SIGPOLL 23 System V name for SIGIO
-SIGXCPU 24 exceeded CPU time limit
-SIGXFSZ 25 exceeded file size limit
-SIGVTALRM 26 virtual time alarm
-SIGPROF 27 profiling time alarm
-SIGWINCH 28 window changed
-SIGLOST 29 resource lost (eg, record-lock lost)
-SIGUSR1 30 user defined signal 1
-SIGUSR2 31 user defined signal 2
-</screen>
-
-</sect2>
-
-<sect2 id="mkgroup"><title>mkgroup</title>
-
-<screen>
-usage: mkgroup &lt;options&gt; [domain]
-This program prints group information to stdout
-Options:\n");
- -l,--local print pseudo group information if there is
- no domain
- -d,--domain print global group information from the domain
- specified (or from the current domain if there is
- no domain specified)
- -?,--help print this message
-</screen>
-
-<para>The <command>mkgroup</command> program can be used to help
-configure your Windows system to be more UNIX-like by creating an
-initial <filename>/etc/group</filename> substitute (some commands need this
-file) from your system information. It only works on NT.
-To initially set up your machine,
-you'd do something like this:</para>
-
-<example><title>Setting up the groups file</title>
-<screen>
-<prompt>$</prompt> <userinput>mkdir /etc</userinput>
-<prompt>$</prompt> <userinput>mkgroup -l &gt; /etc/group</userinput>
-</screen>
-</example>
-
-<para>Note that this information is static. If you change the group
-information in your system, you'll need to regenerate the group file
-for it to have the new information.</para>
-
-<para>The <literal>-d</literal> and <literal>-l</literal> options
-allow you to specify where the information comes from, either the
-local machine or the default (or given) domain.</para>
-
-</sect2>
-
-<sect2 id="mkpasswd"><title>mkpasswd</title>
-
-<screen>
-Usage: mkpasswd [options] [domain]
-This program prints a /etc/passwd file to stdout
-Options are
- -l,--local print local accounts
- -d,--domain print domain accounts (from current domain
- if no domain specified
- -g,--local-groups print local group information too
- -?,--help displays this message
-This program does only work on Windows NT
-</screen>
-
-<para>The <command>mkpasswd</command> program can be used to help
-configure your Windows system to be more UNIX-like by creating an
-initial <filename>/etc/passwd</filename> substitute (some commands
-need this file) from your system information. It only works on NT.
-To initially set up your machine, you'd do something like this:</para>
-
-<example><title>Setting up the passwd file</title>
-<screen>
-<prompt>$</prompt> <userinput>mkdir /etc</userinput>
-<prompt>$</prompt> <userinput>mkpasswd -l &gt; /etc/passwd</userinput>
-</screen>
-</example>
-
-<para>Note that this information is static. If you change the user
-information in your system, you'll need to regenerate the passwd file
-for it to have the new information.</para>
-
-<para>The <literal>-d</literal> and <literal>-l</literal> options
-allow you to specify where the information comes from, either the
-local machine or the default (or given) domain.</para>
-
-</sect2>
-
-<sect2 id="passwd"><title>passwd</title>
-
-<screen>
-Usage passwd [name]
- passwd [-x max] [-n min] [-i inact] [-L len]
- passwd {-l|-u|-S} name
- -x max set max age of passwords
- -n min set min age of passwords
- -i inact disables account after inact days of expiry
- -L len set min password length
- -l lock an account
- -u unlock an account
- -S show account information
-</screen>
-
-<para> <command>passwd</command> changes passwords for user accounts.
-A normal user may only change the password for their own account,
-the administrators may change the password for any account.
-<command>passwd</command> also changes account information, such as
-password expiry dates and intervals.</para>
-
-<para>Password changes: The user is first prompted for their old
-password, if one is present. This password is then encrypted and
-compared against the stored password. The user has only one chance to
-enter the correct password. The administrators are permitted to
-bypass this step so that forgotten passwords may be changed.</para>
-
-<para>The user is then prompted for a replacement password.
-<command>passwd</command> will prompt again and compare the second entry
-against the first. Both entries are require to match in order for the
-password to be changed.</para>
-
-<para>After the password has been entered, password aging information
-is checked to see if the user is permitted to change their password
-at this time. If not, <command>passwd</command> refuses to change the
-password and exits.</para>
-
-<para>Password expiry and length: The password aging information may be
-changed by the administrators with the <literal>-x</literal>,
-<literal>-n</literal> and <literal>-i</literal> options. The
-<literal>-x</literal> option is used to set the maximum number of days
-a password remains valid. After <emphasis>max</emphasis> days, the
-password is required to be changed. The <literal>-n</literal> option is
-used to set the minimum number of days before a password may be changed.
-The user will not be permitted to change the password until
-<emphasis>min</emphasis> days have elapsed. The <literal>-i</literal>
-option is used to disable an account after the password has been expired
-for a number of days. After a user account has had an expired password
-for <emphasis>inact</emphasis> days, the user may no longer sign on to
-the account. Allowed values for the above options are 0 to 999. The
-<literal>-L</literal> option sets the minimum length of allowed passwords
-for users, which doesn't belong to the administrators group, to
-<emphasis>len</emphasis> characters. Allowed values for the minimum
-password length are 0 to 14. In any of the above cases, a value of 0
-means `no restrictions'.</para>
-
-<para>Account maintenance: User accounts may be locked and unlocked with the
-<literal>-l</literal> and <literal>-u</literal> flags. The
-<literal>-l</literal> option disables an account. The <literal>-u</literal>
-option re-enables an account.</para>
-
-<para>The account status may be given with the <literal>-S</literal>
-option. The status information is self explanatory.</para>
-
-<para>Limitations: Users may not be able to change their password on
-some systems.</para>
-
-</sect2>
-
-<sect2 id="mount"><title>mount</title>
-
-<screen>
-Usage mount
- mount [-bfs] &lt;win32path&gt; &lt;posixpath&gt;
- mount [-bs] --change-cygdrive-prefix&lt;posixpath&gt;
- mount --import-old-mounts
-
- -b = text files are equivalent to binary files (newline = \n)
- -x = files in the mounted directory are automatically given execute permission.
- -f = force mount, don't warn about missing mount point directories
- -s = add mount point to system-wide registry location
- --change-automount-prefix = change path prefix used for automatic mount points
- --import-old-mounts = copy old registry mount table mounts into the current mount areas
-
- When invoked without any arguments, mount displays the current mount table.
-</screen>
-
-<para>The <command>mount</command> program is used to map your drives
-and shares onto Cygwin's simulated POSIX directory tree, much like as is
-done by mount commands on typical UNIX systems. Please see
-<Xref Linkend="mount-table"> for more information on the concepts
-behind the Cygwin POSIX file system and strategies for using
-mounts.</para>
-
-<sect3><title>Using mount</title>
-
-<para>If you just type <command>mount</command> with no parameters, it
-will display the current mount table for you.</para>
-
-<example>
-<title>Displaying the current set of mount points</title>
-<screen>
-<prompt>c:\cygnus\&gt;</prompt> <userinput>mount</userinput>
-Device Directory Type Flags
-D: /d user textmode
-C: / system textmode
-</screen>
-</example>
-
-<para>In this example, the C
-drive is the POSIX root and D drive is mapped to
-<filename>/d</filename>. Note that in this case, the root mount is a
-system-wide mount point that is visible to all users running Cygwin
-programs, whereas the <filename>/d</filename> mount is only visible
-to the current user.</para>
-
-<para>The <command>mount</command> utility is also the mechanism for
-adding new mounts to the mount table. The following example
-demonstrates how to mount the directory
-<filename>C:\cygnus\cygwin-b20\H-i586-cygwin32\bin</filename>
-to <filename>/bin</filename> and the network directory
-<filename>\\pollux\home\joe\data</filename> to <filename>/data</filename>.
-<filename>/bin</filename> is assumed to already exist.</para>
-
-<example>
-<title>Adding mount points</title>
-<screen>
-<prompt>c:\cygnus\&gt;</prompt> <userinput>ls /bin /data</userinput>
-ls: /data: No such file or directory
-<prompt>c:\cygnus\&gt;</prompt> <userinput>mount C:\cygnus\cygwin-b20\H-i586-cygwin32\bin /bin</userinput>
-<prompt>c:\cygnus\&gt;</prompt> <userinput>mount \\pollux\home\joe\data /data</userinput>
-Warning: /data does not exist!
-<prompt>c:\cygnus\&gt;</prompt> <userinput>mount</userinput>
-Device Directory Type Flags
-\\pollux\home\joe\data /data user textmode
-C:\cygnus\cygwin-b20\H-i586-cygwin32\bin /bin user textmode
-D: /d user textmode
-\\.\tape1: /dev/st1 user textmode
-\\.\tape0: /dev/st0 user textmode
-\\.\b: /dev/fd1 user textmode
-\\.\a: /dev/fd0 user textmode
-C: / system textmode
-<prompt>c:\cygnus\&gt;</prompt> <userinput>ls /bin/sh</userinput>
-/bin/sh
-</screen>
-</example>
-
-<para>Note that <command>mount</command> was invoked from the Windows
-command shell in the previous example. In many Unix shells, including
-bash, it is legal and convenient to use the forward "/" in Win32
-pathnames since the "\" is the shell's escape character. </para>
-
-<para>The "-s" flag to <command>mount</command> is used to add a mount
-in the system-wide mount table used by all Cygwin users on the system,
-instead of the user-specific one. System-wide mounts are displayed
-by <command>mount</command> as being of the "system" type, as is the
-case for the <filename>/</filename> partition in the last example.
-Under Windows NT, only those users with Administrator priviledges are
-permitted to modify the system-wide mount table.</para>
-
-<para>Note that a given POSIX path may only exist once in the user
-table and once in the global, system-wide table. Attempts to replace
-the mount will fail with a busy error. The "-f" (force) flag causes
-the old mount to be silently replaced with the new one. It will also
-silence warnings about the non-existence of directories at the Win32
-path location.</para>
-
-<para>The "-b" flag is used to instruct Cygwin to treat binary and
-text files in the same manner by default. Binary mode mounts are
-marked as "binmode" in the Flags column of <command>mount</command>
-output. By default, mounts are in text mode ("textmode" in the Flags
-column).</para>
-
-<para>The "-x" flag is used to instruct Cygwin that the mounted file
-is "executable". If the "-x" flag is used with a directory then
-all files in the directory are executable. Files ending in certain
-extensions (.exe, .com, .bat, .cmd) are assumed to be executable
-by default. Files whose first two characters begin with '#!' are
-also considered to be executable. This option allows other files
-to be marked as executable and avoids the overhead of opening each
-file to check for a '#!'.</para>
-
-</sect3>
-
-<sect3><title>Cygdrive mount points</title>
-
-<para>Whenever Cygwin cannot use any of the existing mounts to convert
-from a particular Win32 path to a POSIX one, Cygwin will, instead,
-convert to a POSIX path using a default mount point:
-<filename>/cygdrive</filename>. For example, if Cygwin accesses
-<filename>Z:\foo</filename> and the Z drive is not currently in the
-mount table, then <filename>Z:\</filename> will be accessible as
-<filename>/cygdrive/Z</filename>. The default prefix of
-<filename>/cygdrive</filename> may be changed via the
-<Xref Linkend="mount"> command.</para>
-
-<para>The <command>mount</command> utility can be used to change this
-default automount prefix through the use of the
-"--change-cygdrive-prefix" flag. In the following example, we will
-set the automount prefix to <filename>/</filename>:</para>
-
-<example>
-<title>Changing the default prefix</title>
-<screen>
-<prompt>c:\cygnus\&gt;</prompt> <userinput>mount --change-cygdrive-prefix /</userinput>
-</screen>
-</example>
-
-<para>Note that you if you set a new prefix in this manner, you can
-specify the "-s" flag to make this the system-wide default prefix. By
-default, the cygdrive-prefix applies only to the current user. In the
-same way, you can specify the "-b" flag such that all new automounted
-filesystems default to binary mode file accesses.</para>
-
-</sect3>
-
-<sect3><title>Limitations</title>
-
-<para>Limitations: there is a hard-coded limit of 30 mount
-points. Also, although you can mount to pathnames that do not start
-with "/", there is no way to make use of such mount points.</para>
-
-<para>Normally the POSIX mount point in Cygwin is an existing empty
-directory, as in standard UNIX. If this is the case, or if there is a
-place-holder for the mount point (such as a file, a symbolic link
-pointing anywhere, or a non-empty directory), you will get the expected
-behavior. Files present in a mount point directory before the mount
-become invisible to Cygwin programs.
-</para>
-
-<para>It is sometimes desirable to mount to a non-existent directory,
-for example to avoid cluttering the root directory with names
-such as
-<filename>a</filename>, <filename>b</filename>, <filename>c</filename>
-pointing to disks.
-Although <command>mount</command> will give you a warning, most
-everything will work properly when you refer to the mount point
-explicitly. Some strange effects can occur however.
-For example if your current working directory is
-<filename>/dir</filename>,
-say, and <filename>/dir/mtpt</filename> is a mount point, then
-<filename>mtpt</filename> will not show up in an <command>ls</command>
-or
-<command>echo *</command> command and <command>find .</command> will
-not
-find <filename>mtpt</filename>.
-</para>
-
-</sect3>
-
-</sect2>
-
-<sect2 id="ps"><title>ps</title>
-
-<screen>
-Usage ps [-aefl] [-u uid]
- -a, -e show processes of all users
- -f show process uids, ppids
- -l show process uids, ppids, pgids, winpids
- -s short process listing
- -u uid show processes owned by uid
- -W show all windows processes, not just cygwin processes
-</screen>
-
-<para>The <command>ps</command> program gives the status of all the
-Cygwin processes running on the system (ps = "process status"). Due
-to the limitations of simulating a POSIX environment under Windows,
-there is little information to give. The PID column is the process ID
-you need to give to the <command>kill</command> command. The WINPID
-column is the process ID that's displayed by NT's Task Manager
-program.</para>
-
-</sect2>
-
-<sect2 id="umount"><title>umount</title>
-
-<screen>
-Usage umount [-s] &lt;posixpath&gt;
--s = remove mount point from system-wide registry location
-
---remove-all-mounts = remove all mounts
---remove-auto-mounts = remove all automatically mounted mounts
---remove-user-mounts = remove all mounts in the current user mount registry area, including auto mounts
---remove-system-mounts = Remove all mounts in the system-wide mount registry area
-</screen>
-
-<para>The <command>umount</command> program removes mounts from the
-mount table. If you specify a POSIX path that corresponds to a
-current mount point, <command>umount</command> will remove it from the
-user-specific registry area. The -s flag may be used to specify
-removing the mount from the system-wide registry area instead
-(Administrator priviledges are required).</para>
-
-<para>The <command>umount</command> utility may also be used to remove
-all mounts of a particular type. With the extended options it is
-possible to remove all mounts, all automatically-mounted mounts, all
-mounts in the current user's registry area, or all mounts in the
-system-wide registry area (with Administrator priviledges).</para>
-
-<para>See <Xref Linkend="mount">) for more information on the mount
-table.</para>
-</sect2>
-
-<sect2 id="strace"><title>strace</title>
-
-<screen>
-Usage strace [-m mask] [-o output-file] [ft] program [args...]
-
--b n use buffer of size 'n' when writing output file
--d include delta time in usecs for each line (default)
--f follow all forks and execs
--m mask mask for reporting cygwin events (default 1)
--n convert Win32 error messages to text
--o output-file output file to hold strace events (default stderr)
--f follow forked subprocesses
--u include time in usecs since start for each line (default)
-</screen>
-
-<para>The <command>strace</command> program executes a program, and
-optionally the children of the program, reporting any Cygwin DLL output
-from the program(s) to file. This program is mainly useful for debugging
-the Cygwin DLL itself.
-
-The mask argument is a hexadecimal string signifying which events should be
-reported. The valid bits to set are as follows:
-</para>
-
-<screen>
- Bit Explanation
-0x00000001 All strace output is collected
-0x00000008 Unusual or weird phenomenon
-0x00000010 System calls
-0x00000020 argv/envp printout at startup
-0x00000040 Information useful for DLL debugging
-0x00000080 Paranoid information
-0x00000100 Termios debbugging
-0x00000200 Select() function debugging
-0x00000400 Window message debugging
-0x00000800 Signal and process handling
-0x00001000 Very minimal strace output
-0x00020000 Malloc calls
-0x00040000 Thread locking calls
-</screen>
-</sect2>
-
-<sect2 id="regtool"><title>regtool</title>
-
-<screen>
-regtool -h - print this message
-regtool [-v] list [key] - list subkeys and values
-regtool [-v] add [key\subkey] - add new subkey
-regtool [-v] remove [key] - remove key
-regtool [-v|-q] check [key] - exit 0 if key exists, 1 if not
-regtool [-i|-s|-e|-m] set [key\value] [data ...] - set value
- -i=integer -s=string -e=expand-string -m=multi-string
-regtool [-v] unset [key\value] - removes value from key
-regtool [-q] get [key\value] - prints value to stdout
- -q=quiet, no error msg, just return nonzero exit if key/value missing
-keys are like \prefix\key\key\key\value, where prefix is any of:
- root HKCR HKEY_CLASSES_ROOT
- config HKCC HKEY_CURRENT_CONFIG
- user HKCU HKEY_CURRENT_USER
- machine HKLM HKEY_LOCAL_MACHINE
- users HKU HKEY_USERS
-example: \user\software\Microsoft\Clock\iFormat
-</screen>
-
-<para>The <command>regtool</command> program allows shell scripts
-to access and modify the Windows registry. Note that modifying the
-Windows registry is dangerous, and carelessness here can result
-in an unusable system. Be careful.</para>
-
-<para>The <literal>-v</literal> option means "verbose". For most
-commands, this causes additional or lengthier messages to be printed.
-Conversely, the <literal>-q</literal> option supresses error messages,
-so you can use the exit status of the program to detect if a key
-exists or not (for example).</para>
-
-<para>The <literal>list</literal> command lists the subkeys and values
-belonging to the given key. The <literal>add</literal> command adds a
-new key. The <literal>remove</literal> command removes a key. Note
-that you may need to remove everything in the key before you may
-remove it, but don't rely on this stopping you from accidentally
-removing too much. The <literal>check</literal> command checks to see
-if a key exists (the exit code of the program is zero if it does,
-nonzero if it does not).</para>
-
-<para>The <literal>set</literal> command sets a value within a key.
-<literal>-i</literal> means the value is an integer (DWORD).
-<literal>-s</literal> means the value is a string.
-<literal>-e</literal> means it's an expanding string (it contains
-embedded environment variables). <literal>-m</literal> means it's a
-multi-string (list). If you don't specify one of these, it tries to
-guess the type based on the value you give. If it looks like a
-number, it's a number. If it starts with a percent, it's an expanding
-string. If you give multiple values, it's a multi-string. Else, it's
-a regular string.</para>
-
-<para>The <literal>unset</literal> command removes a value from a key.
-The <literal>get</literal> command gets the value of a value of a key,
-and prints it (and nothing else) to stdout. Note: if the value
-doesn't exist, an error message is printed and the program returns a
-non-zero exit code. If you give <literal>-q</literal>, it doesn't
-print the message but does return the non-zero exit code.</para>
-
-</sect2>
-
-</sect1>
-
diff --git a/winsup/w32api/CONTRIBUTIONS b/winsup/w32api/CONTRIBUTIONS
deleted file mode 100644
index 1c3df0e14..000000000
--- 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 123ef8bb2..000000000
--- a/winsup/w32api/ChangeLog
+++ /dev/null
@@ -1,1320 +0,0 @@
-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 2e300f0a5..000000000
--- a/winsup/w32api/Makefile.in
+++ /dev/null
@@ -1,126 +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@
-
-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@
-
-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
-
-FLAGS_TO_PASS = \
- AS="$(AS)" \
- CC="$(CC)" \
- CPPFLAGS="$(CPPFLAGS)" \
- CFLAGS="$(CFLAGS)" \
- CXXFLAGS="$(CXXFLAGS)" \
- AR="$(AR)" \
- RANLIB="$(RANLIB)" \
- LD="$(LD)" \
- DLLTOOL="$(DLLTOOL)" \
- WINDRES="$(WINDRES)"
-
-# end config section
-
-SUBDIRS = lib
-
-PACKAGE = w32api
-VERSION = 0.4
-
-DIST_FILES = Makefile.in configure.in configure config.guess config.sub \
-install-sh README 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
-
-distdir = $(PACKAGE)-$(VERSION)
-
-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.tar.gz
- $(TAR) czf $(distdir)-src.tar.gz $(distdir)
-
-bindist:
- rm -rf $(distdir)
- mkdir $(distdir)
- chmod 755 $(distdir)
- $(MAKE) install prefix=../$(distdir)
- rm -f $(distdir).tar.gz
- cd $(distdir); $(TAR) czf ../$(distdir).tar.gz .
-
-Makefile: Makefile.in config.status configure
- $(SHELL) config.status
-
-mostlyclean-top:
- rm -f *~
-clean-top: mostlyclean-top
- rm -rf $(distdir)
- rm -f $(distdir)*.tar.gz
-maintainer-clean-top:
-
-mostlyclean: mostlyclean-top mostlyclean-subdirs
-clean: mostlyclean-top clean-subdirs
-distclean: clean-top
- rm -f Makefile config.status config.log config.cache TAGS *~
- $(MAKE) -C lib distclean
-maintainer-clean: maintainer-clean-subdirs
-
-.PHONY: lib test
diff --git a/winsup/w32api/README b/winsup/w32api/README
deleted file mode 100644
index a34153111..000000000
--- a/winsup/w32api/README
+++ /dev/null
@@ -1,94 +0,0 @@
- Free headers and libraries for the Win32 API
-
- Written by Anders Norlander <anorland@hem2.passagen.se>
- URL: http://www.acc.umu.se/~anorland/gnu-win32/
-
- Maintained by MinGW Developers
- Send bug reports and questions to MinGW-users@lists.sourceforge.net
- URL: http://www.mingw.org
-
-* License
-
- You are free to use, modify and copy this package. No restrictions
- are imposed on programs or object files compiled with this library.
-
- You may not restrict the the usage of this library.
-
- You may distribute this library as part of another package or as a
- modified package if and only if you do *not* restrict the usage of
- the portions consisting of this (optionally modified) library.
-
- If distributed as part of another package, please notify the author
- of what you are going to do. If distributed as a modified package,
- this file *must* be included.
-
- 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.
-
-* What is it?
-
- This is a free set of headers and import libraries for the Win32
- API. The library differs from the GNU Windows32 library in that I
- have tried to use a file structure that mirrors Microsoft's. I
- don't like having *all* definitions in one single header as in the
- GNU Windows32 library, I want a clean separation between different
- parts of the API.
-
- Daniel Guerrero Miralles contributed the DirectX 6.1 import
- libraries and DirectX GUID definitions.
-
- See the files NOTES and TODO for what needs to be done.
-
-* Size does matter
-
- Since the WIN32 API is severely bloated (as most MS products seem to
- be) the headers are designed to be as compact as possible, while
- still being readable, in order to minimize parsing time.
-
- The convention is to omit parameter names for function prototypes,
- no excessive white space. Struct/union members are indented with tab
- characters to make them readable. Comment only when necessary.
-
- If you are contributing a patch please follow the above mentioned
- convention. Make sure your editor does not convert tabs to spaces.
-
-* What do I need to use it?
-
- The library is intended for use with egcs 1.1 or later but it is
- possible to use with some other tools as well (although it is not
- very useful). LCC-Win32, MSVC and Borland C++ 5.01 or higher may
- work as well. The import libraries are for GNU tools only.
-
- The library requires egcs 1.1 or later, since the `#pragma pack'
- feature is used. Mumit Khan provides egcs patches and binaries for
- win32 at `http://www.xraylith.wisc.edu/~khan/software/gnu-win32/'.
-
- If you are going to use C++ COM objects, you will need a version of
- egcs that recognizes the `comobject' attribute and then define
- HAVE_COMOBJECT when compiling your program. Antonio Mendes de
- Oliveira Neto has a prebuilt version at
- `http://li.facens.br/EGCS-WIN32/english/index.html'. Note that this
- is very experimental. If you want to use COM objects in C++ but with
- C interfaces you must define CINTERFACE.
-
- Objective-C programs cannot use COM functionality because of
- conflicts between the interface define and the Objective-C
- @interface directive. There is also a conflict between the windows
- Obj-C BOOL types. To avoid this conflict you should use WINBOOL in
- all places where you would use BOOL in a C/C++ windows program. If
- you include any windows headers *after* `windows.h' you must use the
- method outlined below:
-
- /* non-windows includes */
- #include <objc/objc.h>
- ...
- /* windows specific headers */
- #include <windows.h>
- #define BOOL WINBOOL
- #include <commctrl.h>
- ...
- #undef BOOL
- ...
- /* include other headers */
-
diff --git a/winsup/w32api/TODO b/winsup/w32api/TODO
deleted file mode 100644
index 7ad7801b7..000000000
--- a/winsup/w32api/TODO
+++ /dev/null
@@ -1,65 +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
-=================================
-CS_ENABLE
-CS_DISABLE
-CS_DELETE_TRANSFORM
-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/config.guess b/winsup/w32api/config.guess
deleted file mode 100755
index 3b095eb31..000000000
--- a/winsup/w32api/config.guess
+++ /dev/null
@@ -1,1302 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
-# Free Software Foundation, Inc.
-
-version='2000-10-12'
-
-# 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.
-
-# Written by Per Bothner <bothner@cygnus.com>.
-# Please send patches to <config-patches@gnu.org>.
-#
-# 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 system type (host/target name).
-#
-# Only a few systems have been added to this list; please add others
-# (but try to keep the structure clean).
-#
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of this system.
-
-Operation modes:
- -h, --help print this help, then exit
- -V, --version print version number, then exit"
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case "$1" in
- --version | --vers* | -V )
- echo "$version" ; exit 0 ;;
- --help | --h* | -h )
- echo "$usage"; exit 0 ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- exec >&2
- echo "$me: invalid option $1"
- echo "$help"
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
-fi
-
-# Use $HOST_CC if defined. $CC may point to a cross-compiler
-if test x"$CC_FOR_BUILD" = x; then
- if test x"$HOST_CC" != x; then
- CC_FOR_BUILD="$HOST_CC"
- else
- if test x"$CC" != x; then
- CC_FOR_BUILD="$CC"
- else
- CC_FOR_BUILD=cc
- fi
- fi
-fi
-
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 8/24/94.)
-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
-
-dummy=dummy-$$
-trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
-
-# 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.
- # Determine the machine/vendor (is the vendor relevant).
- case "${UNAME_MACHINE}" in
- amiga) machine=m68k-unknown ;;
- arm32) machine=arm-unknown ;;
- atari*) machine=m68k-atari ;;
- sun3*) machine=m68k-sun ;;
- mac68k) machine=m68k-apple ;;
- macppc) machine=powerpc-apple ;;
- hp3[0-9][05]) machine=m68k-hp ;;
- ibmrt|romp-ibm) machine=romp-ibm ;;
- *) machine=${UNAME_MACHINE}-unknown ;;
- esac
- # The Operating System including object format.
- 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
- # The OS release
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- # 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 ;;
- alpha:OSF1:*:*)
- if test $UNAME_RELEASE = "V4.0"; then
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- fi
- # 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.
- cat <<EOF >$dummy.s
- .data
-\$Lformat:
- .byte 37,100,45,37,120,10,0 # "%d-%x\n"
-
- .text
- .globl main
- .align 4
- .ent main
-main:
- .frame \$30,16,\$26,0
- ldgp \$29,0(\$27)
- .prologue 1
- .long 0x47e03d80 # implver \$0
- lda \$2,-1
- .long 0x47e20c21 # amask \$2,\$1
- lda \$16,\$Lformat
- mov \$0,\$17
- not \$1,\$18
- jsr \$26,printf
- ldgp \$29,0(\$26)
- mov 0,\$16
- jsr \$26,exit
- .end main
-EOF
- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
- if test "$?" = 0 ; then
- case `./$dummy` in
- 0-0)
- UNAME_MACHINE="alpha"
- ;;
- 1-0)
- UNAME_MACHINE="alphaev5"
- ;;
- 1-1)
- UNAME_MACHINE="alphaev56"
- ;;
- 1-101)
- UNAME_MACHINE="alphapca56"
- ;;
- 2-303)
- UNAME_MACHINE="alphaev6"
- ;;
- 2-307)
- UNAME_MACHINE="alphaev67"
- ;;
- esac
- fi
- rm -f $dummy.s $dummy
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- 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;;
- amiga:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit 0 ;;
- arc64:OpenBSD:*:*)
- echo mips64el-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- arc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- hkmips:OpenBSD:*:*)
- echo mips-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- pmax:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sgi:OpenBSD:*:*)
- echo mips-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- wgrisc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- 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:*:*)
- 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 ;;
- 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=`(head -1 /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 ;;
- atari*:OpenBSD:*:*)
- echo m68k-unknown-openbsd${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 ;;
- sun3*:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mac68k:OpenBSD:*:*)
- echo m68k-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 ;;
- 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)
- 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 $dummy.c -o $dummy \
- && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && rm $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- echo mips-mips-riscos${UNAME_RELEASE}
- 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 ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- 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 $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- 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:*:4)
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
- if /usr/sbin/lsattr -EHl ${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=4.${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:*:*)
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/[678][0-9][0-9])
- 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 $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
- rm -f $dummy.c $dummy
- esac
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit 0 ;;
- 3050*:HI-UX:*:*)
- 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 $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- 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:*:*)
- 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 ;;
- hppa*:OpenBSD:*:*)
- echo hppa-unknown-openbsd
- 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*X-MP:*:*:*)
- echo xmp-cray-unicos
- exit 0 ;;
- CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE}
- 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/
- exit 0 ;;
- CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- CRAY*T3E:*:*:*)
- echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- CRAY-2:*:*:*)
- echo cray2-cray-unicos
- exit 0 ;;
- F300:UNIX_System_V:*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit 0 ;;
- F301:UNIX_System_V:*:*)
- echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
- exit 0 ;;
- hp300:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- 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:*:*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit 0 ;;
- *:OpenBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- 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 ;;
- 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 i386-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 ;;
- *: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.
- ld_supported_emulations=`cd /; ld --help 2>&1 \
- | sed -ne '/supported emulations:/!d
- s/[ ][ ]*/ /g
- s/.*supported emulations: *//
- s/ .*//
- p'`
- case "$ld_supported_emulations" in
- *ia64)
- echo "${UNAME_MACHINE}-unknown-linux"
- exit 0
- ;;
- i?86linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit 0
- ;;
- elf_i?86)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- i?86coff)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit 0
- ;;
- sparclinux)
- echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
- exit 0
- ;;
- armlinux)
- echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
- exit 0
- ;;
- elf32arm*)
- echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
- exit 0
- ;;
- armelf_linux*)
- echo "${UNAME_MACHINE}-unknown-linux-gnu"
- exit 0
- ;;
- m68klinux)
- echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
- exit 0
- ;;
- elf32ppc | elf32ppclinux)
- # Determine Lib Version
- cat >$dummy.c <<EOF
-#include <features.h>
-#if defined(__GLIBC__)
-extern char __libc_version[];
-extern char __libc_release[];
-#endif
-main(argc, argv)
- int argc;
- char *argv[];
-{
-#if defined(__GLIBC__)
- printf("%s %s\n", __libc_version, __libc_release);
-#else
- printf("unkown\n");
-#endif
- return 0;
-}
-EOF
- LIBC=""
- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
- if test "$?" = 0 ; then
- ./$dummy | grep 1\.99 > /dev/null
- if test "$?" = 0 ; then
- LIBC="libc1"
- fi
- fi
- rm -f $dummy.c $dummy
- echo powerpc-unknown-linux-gnu${LIBC}
- exit 0
- ;;
- shelf_linux)
- echo "${UNAME_MACHINE}-unknown-linux-gnu"
- exit 0
- ;;
- esac
-
- if test "${UNAME_MACHINE}" = "alpha" ; then
- cat <<EOF >$dummy.s
- .data
- \$Lformat:
- .byte 37,100,45,37,120,10,0 # "%d-%x\n"
-
- .text
- .globl main
- .align 4
- .ent main
- main:
- .frame \$30,16,\$26,0
- ldgp \$29,0(\$27)
- .prologue 1
- .long 0x47e03d80 # implver \$0
- lda \$2,-1
- .long 0x47e20c21 # amask \$2,\$1
- lda \$16,\$Lformat
- mov \$0,\$17
- not \$1,\$18
- jsr \$26,printf
- ldgp \$29,0(\$26)
- mov 0,\$16
- jsr \$26,exit
- .end main
-EOF
- LIBC=""
- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
- if test "$?" = 0 ; then
- case `./$dummy` in
- 0-0)
- UNAME_MACHINE="alpha"
- ;;
- 1-0)
- UNAME_MACHINE="alphaev5"
- ;;
- 1-1)
- UNAME_MACHINE="alphaev56"
- ;;
- 1-101)
- UNAME_MACHINE="alphapca56"
- ;;
- 2-303)
- UNAME_MACHINE="alphaev6"
- ;;
- 2-307)
- UNAME_MACHINE="alphaev67"
- ;;
- esac
-
- objdump --private-headers $dummy | \
- grep ld.so.1 > /dev/null
- if test "$?" = 0 ; then
- LIBC="libc1"
- fi
- fi
- rm -f $dummy.s $dummy
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
- elif test "${UNAME_MACHINE}" = "mips" ; then
- cat >$dummy.c <<EOF
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
-#ifdef __MIPSEB__
- printf ("%s-unknown-linux-gnu\n", argv[1]);
-#endif
-#ifdef __MIPSEL__
- printf ("%sel-unknown-linux-gnu\n", argv[1]);
-#endif
- return 0;
-}
-EOF
- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- elif test "${UNAME_MACHINE}" = "s390"; then
- echo s390-ibm-linux && exit 0
- elif test "${UNAME_MACHINE}" = "x86_64"; then
- echo x86_64-unknown-linux-gnu && exit 0
- elif test "${UNAME_MACHINE}" = "parisc" -o "${UNAME_MACHINE}" = "hppa"; then
- # 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
- else
- # Either a pre-BFD a.out linker (linux-gnuoldld)
- # or one that does not give us useful --help.
- # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
- # If ld does not provide *any* "supported emulations:"
- # that means it is gnuoldld.
- test -z "$ld_supported_emulations" \
- && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
-
- case "${UNAME_MACHINE}" in
- i?86)
- VENDOR=pc;
- ;;
- *)
- VENDOR=unknown;
- ;;
- esac
- # Determine whether the default compiler is a.out or elf
- cat >$dummy.c <<EOF
-#include <features.h>
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
-#ifdef __ELF__
-# ifdef __GLIBC__
-# if __GLIBC__ >= 2
- printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
-# else
- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
-# endif
-# else
- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
-# endif
-#else
- printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
-#endif
- return 0;
-}
-EOF
- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
- fi ;;
-# 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.
- i?86:DYNIX/ptx:4*:*)
- 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:*: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:7*)
- # Fixed at (any) Pentium or better
- UNAME_MACHINE=i586
- if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
- echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
- else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
- fi
- 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|egrep Release|sed -e 's/.*= //')`
- (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
- else
- echo ${UNAME_MACHINE}-pc-sysv32
- fi
- exit 0 ;;
- i?86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- 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 ;;
- 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 | 4850:*: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.*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit 0 ;;
- i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
- echo rs6000-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:CPunix: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 ;;
- 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 ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
- *:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
- *:Darwin:*:*)
- echo `uname -p`-apple-darwin${UNAME_RELEASE}
- exit 0 ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- if test "${UNAME_MACHINE}" = "x86pc"; then
- UNAME_MACHINE=pc
- fi
- echo `uname -p`-${UNAME_MACHINE}-nto-qnx
- exit 0 ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
- exit 0 ;;
- NSR-[KW]:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- 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 ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-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)
- printf ("vax-dec-bsd\n"); exit (0);
-#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 $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
-rm -f $dummy.c $dummy
-
-# 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
-
-The $version version of this script cannot recognize your system type.
-Please download the most up to date version of the config scripts:
-
- 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 version = $version
-
-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: "version='"
-# 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 66f8e2d85..000000000
--- a/winsup/w32api/config.sub
+++ /dev/null
@@ -1,1328 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script, version 1.1.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
-# Free Software Foundation, Inc.
-
-version='2000-10-09'
-
-# 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>.
-#
-# 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
- -V, --version print version number, then exit"
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case "$1" in
- --version | --vers* | -V )
- echo "$version" ; exit 0 ;;
- --help | --h* | -h )
- echo "$usage"; exit 0 ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- exec >&2
- echo "$me: invalid option $1"
- echo "$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*)
- 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
- ;;
- -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.
- tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
- | arme[lb] | armv[2345] | armv[345][lb] | pyramid | mn10200 | mn10300 | tron | a29k \
- | 580 | i960 | h8300 \
- | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
- | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
- | hppa64 \
- | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
- | alphaev6[78] \
- | we32k | ns16k | clipper | i370 | sh | sh[34] \
- | powerpc | powerpcle \
- | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
- | mips64orion | mips64orionel | mipstx39 | mipstx39el \
- | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
- | mips64vr5000 | miprs64vr5000el | mcore \
- | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
- | thumb | d10v | d30v | fr30 | avr)
- 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 | z8k | v70 | h8500 | w65 | pj | pjl)
- ;;
-
- # 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[234567]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.
- # FIXME: clean up the formatting here.
- vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
- | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
- | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
- | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
- | xmp-* | ymp-* \
- | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
- | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
- | hppa2.0n-* | hppa64-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
- | alphaev6[78]-* \
- | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
- | clipper-* | orion-* \
- | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
- | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
- | mips64el-* | mips64orion-* | mips64orionel-* \
- | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
- | mipstx39-* | mipstx39el-* | mcore-* \
- | f301-* | armv*-* | s390-* | sv1-* | t3e-* \
- | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
- | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
- | bs2000-* | tic54x-* | c54x-* | x86_64-*)
- ;;
- # 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
- ;;
- 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
- ;;
- 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 | ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
- cray2)
- basic_machine=cray2-cray
- os=-unicos
- ;;
- [ctj]90-cray)
- basic_machine=c90-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
- ;;
- 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
- ;;
- 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[34567]86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
- ;;
- i[34567]86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
- ;;
- i[34567]86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
- ;;
- i[34567]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
- ;;
- i386-go32 | go32)
- basic_machine=i386-unknown
- os=-go32
- ;;
- i386-mingw32 | mingw32)
- basic_machine=i386-unknown
- os=-mingw32
- ;;
- i[34567]86-pw32 | pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- 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
- ;;
- miniframe)
- basic_machine=m68000-convergent
- ;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
- mipsel*-linux*)
- basic_machine=mipsel-unknown
- os=-linux-gnu
- ;;
- mips*-linux*)
- basic_machine=mips-unknown
- os=-linux-gnu
- ;;
- 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
- ;;
- msdos)
- basic_machine=i386-unknown
- 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
- ;;
- np1)
- basic_machine=np1-gould
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
- ;;
- op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- 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 | nexen)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexen-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumii-* | pentium2-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pn)
- basic_machine=pn-gould
- ;;
- power) basic_machine=rs6000-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/^[^-]*-//'`
- ;;
- ps2)
- basic_machine=i386-ibm
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- rm[46]00)
- basic_machine=mips-siemens
- ;;
- rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
- ;;
- sequent)
- basic_machine=i386-sequent
- ;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
- sparclite-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=t3e-cray
- os=-unicos
- ;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tx39)
- basic_machine=mipstx39-unknown
- ;;
- tx39el)
- basic_machine=mipstx39el-unknown
- ;;
- 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
- ;;
- xmp)
- basic_machine=xmp-cray
- os=-unicos
- ;;
- xps | xps100)
- basic_machine=xps100-honeywell
- ;;
- 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
- ;;
- mips)
- if [ x$os = x-linux-gnu ]; then
- basic_machine=mips-unknown
- else
- basic_machine=mips-mips
- fi
- ;;
- romp)
- basic_machine=romp-ibm
- ;;
- rs6000)
- basic_machine=rs6000-ibm
- ;;
- vax)
- basic_machine=vax-dec
- ;;
- pdp11)
- basic_machine=pdp11-dec
- ;;
- we32k)
- basic_machine=we32k-att
- ;;
- sh3 | sh4)
- basic_machine=sh-unknown
- ;;
- sparc | sparcv9)
- 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
- ;;
- c4x*)
- basic_machine=c4x-none
- os=-coff
- ;;
- *)
- 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* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
- case $basic_machine in
- x86-* | i[34567]86-*)
- ;;
- *)
- os=-nto$os
- ;;
- esac
- ;;
- -nto*)
- os=-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
- ;;
- -386bsd)
- os=-bsd
- ;;
- -ctix* | -uts*)
- os=-sysv
- ;;
- -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)
- os=-mint
- ;;
- -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
- ;;
- 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
- ;;
- *-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
- ;;
- f301-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*)
- vendor=wrs
- ;;
- -aux*)
- vendor=apple
- ;;
- -hms*)
- vendor=hitachi
- ;;
- -mpw* | -macos*)
- vendor=apple
- ;;
- -*mint | -*MiNT)
- vendor=atari
- ;;
- 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: "version='"
-# 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 3d0556f2c..000000000
--- a/winsup/w32api/configure
+++ /dev/null
@@ -1,1479 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=lib/scrnsave.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:573: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:594: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:612: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:647: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-CFLAGS=${CFLAGS-"-O2 -g"}
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:710: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_CC"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:742: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="gcc"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- CC="gcc"
-fi
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:779: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_AR"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:811: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- AR="ar"
-fi
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:847: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_AS"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:879: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- AS="as"
-fi
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:915: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:947: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB="ranlib"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB="ranlib"
-fi
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ld; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:983: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$LD"; then
- ac_cv_prog_LD="$LD" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_LD="${ac_tool_prefix}ld"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-LD="$ac_cv_prog_LD"
-if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_LD"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ld", so it can be a program name with args.
-set dummy ld; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1015: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$LD"; then
- ac_cv_prog_LD="$LD" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_LD="ld"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_LD" && ac_cv_prog_LD="ld"
-fi
-fi
-LD="$ac_cv_prog_LD"
-if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- LD="ld"
-fi
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1051: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_DLLTOOL"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1083: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- DLLTOOL="dlltool"
-fi
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
-set dummy ${ac_tool_prefix}windres; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1119: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$WINDRES"; then
- ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-WINDRES="$ac_cv_prog_WINDRES"
-if test -n "$WINDRES"; then
- echo "$ac_t""$WINDRES" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_WINDRES"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "windres", so it can be a program name with args.
-set dummy windres; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1151: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$WINDRES"; then
- ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_WINDRES="windres"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
-fi
-fi
-WINDRES="$ac_cv_prog_WINDRES"
-if test -n "$WINDRES"; then
- echo "$ac_t""$WINDRES" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- WINDRES="windres"
-fi
-fi
-
-
-
-echo $ac_n "checking for build environment""... $ac_c" 1>&6
-echo "configure:1186: checking for build environment" >&5
-case "$build_alias" in
-*-mingw*) BUILDENV=mingw;;
-*-cygwin*) BUILDENV=cygwin;;
-esac
-if test -z "$BUILDENV"; then
- echo "$ac_t""standard" 1>&6
-else
- echo "$ac_t""$BUILDENV" 1>&6
-fi
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile lib/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@CC@%$CC%g
-s%@AR@%$AR%g
-s%@AS@%$AS%g
-s%@RANLIB@%$RANLIB%g
-s%@LD@%$LD%g
-s%@DLLTOOL@%$DLLTOOL%g
-s%@WINDRES@%$WINDRES%g
-s%@BUILDENV@%$BUILDENV%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile lib/Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/winsup/w32api/configure.in b/winsup/w32api/configure.in
deleted file mode 100644
index 2c6066e86..000000000
--- a/winsup/w32api/configure.in
+++ /dev/null
@@ -1,49 +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.12)
-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)
-
-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)
diff --git a/winsup/w32api/include/basetsd.h b/winsup/w32api/include/basetsd.h
deleted file mode 100644
index 7aaecb5b4..000000000
--- a/winsup/w32api/include/basetsd.h
+++ /dev/null
@@ -1,101 +0,0 @@
-#ifndef _BASETSD_H
-#define _BASETSD_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-typedef int LONG32, *PLONG32;
-typedef int INT32, *PINT32;
-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;
-#define __int3264 __int64
-#define ADDRESS_TAG_BIT 0x40000000000UI64
-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;
-#define __int3264 __int32
-#define ADDRESS_TAG_BIT 0x80000000UL
-typedef unsigned short UHALF_PTR, *PUHALF_PTR;
-typedef short HALF_PTR, *PHALF_PTR;
-typedef unsigned long HANDLE_PTR;
-#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)
-
-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 /* _BASETSD_H */
diff --git a/winsup/w32api/include/basetyps.h b/winsup/w32api/include/basetyps.h
deleted file mode 100644
index bcfad6f75..000000000
--- a/winsup/w32api/include/basetyps.h
+++ /dev/null
@@ -1,137 +0,0 @@
-#ifndef _BASETYPS_H
-#define _BASETYPS_H
-
-#ifndef __OBJC__
-#ifdef __cplusplus
-#define EXTERN_C extern "C"
-#else
-#define EXTERN_C extern
-#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
-#define interface struct
-#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
-#if defined(__GNUC__) && !defined(NOCOMATTRIBUTE)
-#define DECLARE_INTERFACE(i) interface __attribute__((com_interface)) i
-#define DECLARE_INTERFACE_(i,b) interface __attribute__((com_interface)) i : public b
-#else
-#define DECLARE_INTERFACE(i) interface i
-#define DECLARE_INTERFACE_(i,b) 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 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 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__ */
-
-#ifndef _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 */
-typedef GUID IID;
-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
-#ifdef __cplusplus
-#define REFGUID const GUID&
-#define REFIID const IID&
-#define REFCLSID const CLSID&
-#else
-#define REFGUID const GUID* const
-#define REFIID const IID* const
-#define REFCLSID const CLSID* const
-#endif
-#define _REFGUID_DEFINED
-#define _REFGIID_DEFINED
-#define _REFCLSID_DEFINED
-#endif
-#ifndef GUID_SECTION
-#define GUID_SECTION ".text"
-#endif
-#ifdef __GNUC__
-#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/cderr.h b/winsup/w32api/include/cderr.h
deleted file mode 100644
index f148fc4d3..000000000
--- a/winsup/w32api/include/cderr.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef _CDERR_H
-#define _CDERR_H
-#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 9f08f5a62..000000000
--- a/winsup/w32api/include/cguid.h
+++ /dev/null
@@ -1,78 +0,0 @@
-#ifndef _CGUID_H
-#define _CGUID_H
-#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 GUID GUID_TRISTATE;
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/commctrl.h b/winsup/w32api/include/commctrl.h
deleted file mode 100644
index 359761f83..000000000
--- a/winsup/w32api/include/commctrl.h
+++ /dev/null
@@ -1,2059 +0,0 @@
-#ifndef _COMMCTRL_H
-#define _COMMCTRL_H
-#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
-
-#define DRAGLISTMSGSTRING TEXT("commctrl_DragListMsg")
-#define ANIMATE_CLASSW L"SysAnimate32"
-#define ANIMATE_CLASSA "SysAnimate32"
-#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 TOOLBARCLASSNAMEW L"ToolbarWindow32"
-#define TOOLBARCLASSNAMEA "ToolbarWindow32"
-#define TOOLTIPS_CLASSW L"tooltips_class32"
-#define TOOLTIPS_CLASSA "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 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 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 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 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 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 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 HDS_HORZ 0
-#define HDS_BUTTONS 2
-#define HDS_HIDDEN 8
-#define NM_FIRST 0
-#define NM_LAST (-99)
-#define LVN_FIRST (-100)
-#define LVN_LAST (-199)
-#define HDN_FIRST (-300)
-#define HDN_LAST (-399)
-#define TVN_FIRST (-400)
-#define TVN_LAST (-499)
-#define TTN_FIRST (-520)
-#define TTN_LAST (-549)
-#define TCN_FIRST (-550)
-#define TCN_LAST (-580)
-#define CDN_FIRST (-601)
-#define CDN_LAST (-699)
-#define TBN_FIRST (-700)
-#define TBN_LAST (-720)
-#define UDN_FIRST (-721)
-#define UDN_LAST (-740)
-#if (_WIN32_IE >= 0x0300)
-#define RBN_FIRST (-831)
-#define RBN_LAST (-859)
-#define MCN_FIRST (-750)
-#define MCN_LAST (-759)
-#define DTN_FIRST (-760)
-#define DTN_LAST (-799)
-#define CBEN_FIRST (-800)
-#define CBEN_LAST (-830)
-#endif /* _WIN32_IE */
-#define HDI_WIDTH 1
-#define HDI_HEIGHT 1
-#define HDI_TEXT 2
-#define HDI_FORMAT 4
-#define HDI_LPARAM 8
-#define HDI_BITMAP 16
-#define HDF_LEFT 0
-#define HDF_RIGHT 1
-#define HDF_CENTER 2
-#define HDF_JUSTIFYMASK3
-#define HDF_RTLREADING 4
-#define HDF_OWNERDRAW 0x8000
-#define HDF_STRING 0x4000
-#define HDF_BITMAP 0x2000
-#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)
-#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)
-#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
-#define TBSTYLE_BUTTON 0
-#define TBSTYLE_SEP 1
-#define TBSTYLE_CHECK 2
-#define TBSTYLE_GROUP 4
-#define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP|TBSTYLE_CHECK)
-#define TBSTYLE_TOOLTIPS 256
-#define TBSTYLE_WRAPABLE 512
-#define TBSTYLE_ALTDRAG 1024
-#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)
-#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)
-#define TB_SETSTATE (WM_USER+17)
-#define TB_GETSTATE (WM_USER+18)
-#define TB_ADDBITMAP (WM_USER+19)
-#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
-#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_ADDBUTTONS (WM_USER+20)
-#define TB_INSERTBUTTON (WM_USER+21)
-#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_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 TBBF_LARGE 1
-#define TB_GETBITMAPFLAGS (WM_USER+41)
-#define TBN_GETBUTTONINFOA (TBN_FIRST-0)
-#define TBN_GETBUTTONINFOW (TBN_FIRST-20)
-#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)
-#define TTS_ALWAYSTIP 1
-#define TTS_NOPREFIX 2
-#define TTF_IDISHWND 1
-#define TTF_CENTERTIP 2
-#define TTF_RTLREADING 4
-#define TTF_SUBCLASS 16
-#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)
-#endif
-#define TTN_NEEDTEXTA (TTN_FIRST-0)
-#define TTN_NEEDTEXTW (TTN_FIRST-10)
-#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
-#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)
-#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
-#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
-#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 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
-#define LVSIL_NORMAL 0
-#define LVSIL_SMALL 1
-#define LVSIL_STATE 2
-#define LVS_OWNERDATA 4096
-#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 LVIF_TEXT 1
-#define LVIF_IMAGE 2
-#define LVIF_PARAM 4
-#define LVIF_STATE 8
-#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)
-#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
-#define LVCFMT_LEFT 0
-#define LVCFMT_RIGHT 1
-#define LVCFMT_CENTER 2
-#define LVCFMT_JUSTIFYMASK 3
-#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)
-#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)
-#define TVS_HASBUTTONS 1
-#define TVS_HASLINES 2
-#define TVS_LINESATROOT 4
-#define TVS_EDITLABELS 8
-#define TVS_DISABLEDRAGDROP 16
-#define TVS_SHOWSELALWAYS 32
-#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
-#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)
-#define TVE_COLLAPSE 1
-#define TVE_EXPAND 2
-#define TVE_TOGGLE 3
-#define TVE_COLLAPSERESET 0x8000
-#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
-#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)
-#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
-#endif
-#define TCIF_TEXT 1
-#define TCIF_IMAGE 2
-#define TCIF_RTLREADING 4
-#define TCIF_PARAM 8
-#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 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 SBARS_SIZEGRIP 256
-#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 ICC_LISTVIEW_CLASSES 1
-#define ICC_TREEVIEW_CLASSES 2
-#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
-#endif /* _WIN32_IE */
-#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
-#define MCS_DAYSTATE 1
-#define MCS_MULTISELECT 2
-#define MCS_WEEKNUMBERS 4
-#define MCS_NOTODAY 8
-#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 (-758)
-#define DTN_USERSTRINGW (-745)
-#define DTN_WMKEYDOWNA (-757)
-#define DTN_WMKEYDOWNW (-744)
-#define DTN_FORMATA (-756)
-#define DTN_FORMATW (-743)
-#define DTN_FORMATQUERYA (-755)
-#define DTN_FORMATQUERYW (-742)
-#define DTN_DROPDOWN (-754)
-#define DTN_CLOSEUP (-753)
-#define DTN_DATETIMECHANGE (-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 MCN_SELCHANGE (-749)
-#define MCN_GETDAYSTATE (-747)
-#define MCN_SELECT (-746)
-#define ODT_HEADER 100
-#define ODT_TAB 101
-#define ODT_LISTVIEW
-#define SB_SETBKCOLOR 0x2001
-#if (_WIN32_IE >= 0x0300)
-#define SB_ISSIMPLE 1038
-#endif
-#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 1
-#define RBBS_FIXEDSIZE 2
-#define RBBS_CHILDEDGE 4
-#define RBBS_HIDDEN 8
-#define RBBS_NOVERT 16
-#define RBBS_FIXEDBMP 32
-#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 UDM_SETRANGE32 1135
-#define UDM_GETRANGE32 1136
-#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 RBS_REGISTERDROP 4096
-#define RBS_AUTOSIZE 8192
-#define RBS_VERTICALGRIPPER 16384
-#define RBS_DBLCLKTOGGLE 32768
-#define RBBS_VARIABLEHEIGHT 64
-#define RBBS_GRIPPERALWAYS 128
-#define RBBS_NOGRIPPER 256
-#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 */
-
-#ifndef RC_INVOKED
-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;
-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;
-DECLARE_HANDLE(HIMAGELIST);
-typedef struct _HD_ITEMA {
- UINT mask;
- int cxy;
- LPSTR pszText;
- HBITMAP hbm;
- int cchTextMax;
- int fmt;
- LPARAM lParam;
-} HD_ITEMA;
-typedef struct _HD_ITEMW {
- UINT mask;
- int cxy;
- LPWSTR pszText;
- HBITMAP hbm;
- int cchTextMax;
- int fmt;
- LPARAM lParam;
-} HD_ITEMW;
-typedef struct _HD_LAYOUT {
- RECT *prc;
- WINDOWPOS *pwpos;
-} HD_LAYOUT;
-typedef struct _HD_HITTESTINFO {
- POINT pt;
- UINT flags;
- int iItem;
-} HD_HITTESTINFO;
-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 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 tagTBNOTIFYA {
- NMHDR hdr;
- int iItem;
- TBBUTTON tbButton;
- int cchText;
- LPSTR pszText;
-} TBNOTIFYA,*LPTBNOTIFYA;
-typedef struct tagTBNOTIFYW {
- NMHDR hdr;
- int iItem;
- TBBUTTON tbButton;
- int cchText;
- LPWSTR pszText;
-} TBNOTIFYW,*LPTBNOTIFYW;
-typedef struct tagTOOLINFOA {
- UINT cbSize;
- UINT uFlags;
- HWND hwnd;
- UINT uId;
- RECT rect;
- HINSTANCE hinst;
- LPSTR lpszText;
-} TOOLINFOA,*PTOOLINFOA,*LPTOOLINFOA;
-typedef struct tagTOOLINFOW {
- UINT cbSize;
- UINT uFlags;
- HWND hwnd;
- UINT uId;
- RECT rect;
- HINSTANCE hinst;
- LPWSTR lpszText;
-} TOOLINFOW,*PTOOLINFOW,*LPTOOLINFOW;
-typedef struct _TT_HITTESTINFOA {
- HWND hwnd;
- POINT pt;
- TOOLINFOA ti;
-} TTHITTESTINFOA,*LPHITTESTINFOA;
-typedef struct _TT_HITTESTINFOW {
- HWND hwnd;
- POINT pt;
- TOOLINFOW ti;
-} TTHITTESTINFOW,*LPHITTESTINFOW;
-typedef struct tagTOOLTIPTEXTA {
- NMHDR hdr;
- LPSTR lpszText;
- char szText[80];
- HINSTANCE hinst;
- UINT uFlags;
-} TOOLTIPTEXTA,*LPTOOLTIPTEXTA;
-typedef struct tagTOOLTIPTEXTW {
- NMHDR hdr;
- LPWSTR lpszText;
- WCHAR szText[80];
- HINSTANCE hinst;
- UINT uFlags;
-} TOOLTIPTEXTW,*LPTOOLTIPTEXTW;
-typedef struct _UDACCEL {
- UINT nSec;
- UINT nInc;
-} UDACCEL,*LPUDACCEL;
-typedef struct _NM_UPDOWN {
- NMHDR hdr;
- int iPos;
- int iDelta;
-} NM_UPDOWN,*LPNM_UPDOWN;
-typedef struct _LV_ITEMA {
- UINT mask;
- int iItem;
- int iSubItem;
- UINT state;
- UINT stateMask;
- LPSTR pszText;
- int cchTextMax;
- int iImage;
- LPARAM lParam;
-} LV_ITEMA;
-typedef struct _LV_ITEMW {
- UINT mask;
- int iItem;
- int iSubItem;
- UINT state;
- UINT stateMask;
- LPWSTR pszText;
- int cchTextMax;
- int iImage;
- LPARAM lParam;
-} LV_ITEMW;
-typedef struct _LV_FINDINFOA {
- UINT flags;
- LPCSTR psz;
- LPARAM lParam;
- POINT pt;
- UINT vkDirection;
-} LV_FINDINFOA;
-typedef struct _LV_FINDINFOW {
- UINT flags;
- LPCWSTR psz;
- LPARAM lParam;
- POINT pt;
- UINT vkDirection;
-} LV_FINDINFOW;
-typedef struct _LV_HITTESTINFO {
- POINT pt;
- UINT flags;
- int iItem;
-} LV_HITTESTINFO;
-typedef struct _LV_COLUMNA {
- UINT mask;
- int fmt;
- int cx;
- LPSTR pszText;
- int cchTextMax;
- int iSubItem;
-} LV_COLUMNA;
-typedef struct _LV_COLUMNW {
- UINT mask;
- int fmt;
- int cx;
- LPWSTR pszText;
- int cchTextMax;
- int iSubItem;
-} LV_COLUMNW;
-typedef int(CALLBACK *PFNLVCOMPARE)(LPARAM,LPARAM,LPARAM);
-typedef struct _NM_LISTVIEW {
- NMHDR hdr;
- int iItem;
- int iSubItem;
- UINT uNewState;
- UINT uOldState;
- UINT uChanged;
- POINT ptAction;
- LPARAM lParam;
-} NM_LISTVIEW,*LPNM_LISTVIEW;
-typedef struct _LV_DISPINFOA {
- NMHDR hdr;
- LV_ITEMA item;
-} LV_DISPINFOA;
-typedef struct _LV_DISPINFOW {
- NMHDR hdr;
- LV_ITEMW item;
-} LV_DISPINFOW;
-typedef struct _LV_KEYDOWN {
- NMHDR hdr;
- WORD wVKey;
- UINT flags;
-} LV_KEYDOWN;
-DECLARE_HANDLE(HTREEITEM);
-typedef struct _TV_ITEMA {
- UINT mask;
- HTREEITEM hItem;
- UINT state;
- UINT stateMask;
- LPSTR pszText;
- int cchTextMax;
- int iImage;
- int iSelectedImage;
- int cChildren;
- LPARAM lParam;
-} TV_ITEMA,*LPTV_ITEMA;
-typedef struct _TV_ITEMW {
- UINT mask;
- HTREEITEM hItem;
- UINT state;
- UINT stateMask;
- LPWSTR pszText;
- int cchTextMax;
- int iImage;
- int iSelectedImage;
- int cChildren;
- LPARAM lParam;
-} TV_ITEMW,*LPTV_ITEMW;
-typedef struct _TV_INSERTSTRUCTA {
- HTREEITEM hParent;
- HTREEITEM hInsertAfter;
- TV_ITEMA item;
-} TV_INSERTSTRUCTA,*LPTV_INSERTSTRUCTA;
-typedef struct _TV_INSERTSTRUCTW {
- HTREEITEM hParent;
- HTREEITEM hInsertAfter;
- TV_ITEMW item;
-} TV_INSERTSTRUCTW,*LPTV_INSERTSTRUCTW;
-typedef struct _TV_HITTESTINFO {
- POINT pt;
- UINT flags;
- HTREEITEM hItem;
-} TV_HITTESTINFO,*LPTV_HITTESTINFO;
-typedef int(CALLBACK *PFNTVCOMPARE)(LPARAM,LPARAM,LPARAM);
-typedef struct _TV_SORTCB {
- HTREEITEM hParent;
- PFNTVCOMPARE lpfnCompare;
- LPARAM lParam;
-} TV_SORTCB,*LPTV_SORTCB;
-typedef struct _NM_TREEVIEWA {
- NMHDR hdr;
- UINT action;
- TV_ITEMA itemOld;
- TV_ITEMA itemNew;
- POINT ptDrag;
-} NM_TREEVIEWA,*LPNM_TREEVIEWA;
-typedef struct _NM_TREEVIEWW {
- NMHDR hdr;
- UINT action;
- TV_ITEMW itemOld;
- TV_ITEMW itemNew;
- POINT ptDrag;
-} NM_TREEVIEWW,*LPNM_TREEVIEWW;
-typedef struct _TV_DISPINFOA {
- NMHDR hdr;
- TV_ITEMA item;
-} TV_DISPINFOA;
-typedef struct _TV_DISPINFOW {
- NMHDR hdr;
- TV_ITEMW item;
-} TV_DISPINFOW;
-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 _TC_ITEMA {
- UINT mask;
- UINT lpReserved1;
- UINT lpReserved2;
- LPSTR pszText;
- int cchTextMax;
- int iImage;
- LPARAM lParam;
-} TC_ITEMA;
-typedef struct _TC_ITEMW {
- UINT mask;
- UINT lpReserved1;
- UINT lpReserved2;
- LPWSTR pszText;
- int cchTextMax;
- int iImage;
- LPARAM lParam;
-} TC_ITEMW;
-typedef struct _TC_HITTESTINFO {
- POINT pt;
- UINT flags;
-} TC_HITTESTINFO,*LPTC_HITTESTINFO;
-typedef struct _TC_KEYDOWN {
- NMHDR hdr;
- WORD wVKey;
- UINT flags;
-} TC_KEYDOWN;
-typedef struct tagINITCOMMONCONTROLSEX {
- DWORD dwSize;
- DWORD dwICC;
-} INITCOMMONCONTROLSEX,*LPINITCOMMONCONTROLSEX;
-typedef struct tagPBRANGE {
- int iLow;
- int iHigh;
-} PBRANGE,*PPBRANGE;
-typedef struct tagCOLORSCHEME {
- DWORD dwSize;
- COLORREF clrBtnHighlight;
- COLORREF clrBtnShadow;
-} COLORSCHEME,*LPCOLORSCHEME;
-typedef struct tagTCITEM {
- UINT mask;
-#if (_WIN32_IE >= 0x0300)
- DWORD dwState;
- DWORD dwStateMask;
-#else
- UINT lpReserved1;
- UINT lpReserved2;
-#endif
-#ifdef UNICODE
- LPWSTR pszText;
-#else
- LPSTR pszText;
-#endif
- int cchTextMax;
- int iImage;
- LPARAM lParam;
-} TCITEM,*LPTCITEM;
-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 tagTCHITTESTINFO {
- POINT pt;
- UINT flags;
-} TCHITTESTINFO,*LPTCHITTESTINFO;
-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;
-} IMAGELISTDRAWPARAMS,*LPIMAGELISTDRAWPARAMS;
-#elif (_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;
-typedef struct _RB_HITTESTINFO {
- POINT pt;
- UINT flags;
- int iBand;
-} RBHITTESTINFO,*LPRBHITTESTINFO;
-#endif
-
-#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(n,m) (((int)((PBYTE)(&((s*)0)->m)-((PBYTE)((s*)0))))+sizeof(((s*)0)->m))
-#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)SendMessage(w,ACM_OPEN,0,(LPARAM)f)
-#define Animate_Play(w,f,t,r) (BOOL)SendMessage(w,ACM_PLAY,(r),(LPARAM)MAKELONG(f,t))
-#define Animate_Stop(w) (BOOL)SendMessage(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) SendMessage(hwnd, DTM_GETMONTHCAL, 0, 0)
-#define DateTime_GetMonthCalColor(hwnd, icolor) SendMessage(hwnd, DTM_GETMONTHCAL, (WPARAM)icolor,0)
-#define DateTime_GetMonthCalFont(hwnd) SendMessage(hwnd,DTM_GETMCFONT,0,0)
-#define DateTime_GetRange(hwnd,lpsystimearray) SendMessage(hwnd,DTM_GETRANGE,0,(LPARAM)lpsystimearray)
-#define DateTime_GetSystemTime(hwnd,lpsystime) SendMessage(hwnd,DTM_GETSYSTEMTIME,0,(LPARAM)lpsystime)
-#define DateTime_SetFormat(hwnd,lpszformat) SendMessage(hwnd,DTM_SETFORMAT,0,(LPARAM)lpszformat)
-#define DateTime_SetMonthCalColor(hwnd,icolor,clr) SendMessage(hwnd,DTM_SETMCCOLOR,(WPARAM)icolor,(LPARAM)clr)
-#define DateTime_SetMonthCalFont(hwnd,hfont,lparam) SendMessage(hwnd,DTM_SETMCFONT,(WPARAM)hfont,(LPARAM)lparam)
-#define DateTime_SetRange(hwnd,flags,lpsystimearray) SendMessage(hwnd,DTM_SETRANGE,(WPARAM)flags,(LPARAM)lpsystimearray)
-#define DateTime_SetSystemTime(hwnd,flag,lpsystime) SendMessage(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)SendMessage((w),HDM_GETITEMCOUNT,0,0)
-#define Header_InsertItem(w,i,phdi) (int)SendMessage((w),HDM_INSERTITEM,(WPARAM)(int)(i),(LPARAM)(const HD_ITEM*)(phdi))
-#define Header_DeleteItem(w,i) (BOOL)SendMessage((w),HDM_DELETEITEM,(WPARAM)(int)(i),0)
-#define Header_GetItem(w,i,phdi) (BOOL)SendMessage((w),HDM_GETITEM,(WPARAM)(int)(i),(LPARAM)(HD_ITEM*)(phdi))
-#define Header_SetItem(w,i,phdi) (BOOL)SendMessage((w),HDM_SETITEM,(WPARAM)(int)(i),(LPARAM)(const HD_ITEM*)(phdi))
-#define Header_Layout(w,l) (BOOL)SendMessage((w),HDM_LAYOUT,0,(LPARAM)(HD_LAYOUT*)(l))
-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
-void WINAPI InitCommonControls(void);
-BOOL WINAPI InitCommonControlsEx(LPINITCOMMONCONTROLSEX);
-WINBOOL WINAPI ImageList_DragShowNolock(BOOL);
-int WINAPI LBItemFromPt(HWND,POINT,BOOL);
-#define ListView_GetBkColor(w) (COLORREF)SendMessage((w),LVM_GETBKCOLOR,0,0)
-#define ListView_GetImageList(w,i) (HIMAGELIST)SendMessage((w),LVM_GETIMAGELIST,(i),0)
-#define ListView_GetItemCount(w) (int)SendMessage((w),LVM_GETITEMCOUNT,0,0)
-#define ListView_GetItem(w,i) (BOOL)SendMessage((w),LVM_GETITEM,0,(LPARAM)(i))
-#define ListView_SetBkColor(w,c) (BOOL)SendMessage((w),LVM_SETBKCOLOR,0,(LPARAM)c)
-#define ListView_SetImageList(w,h,i) (HIMAGELIST)(UINT)SendMessage((w),LVM_SETIMAGELIST,(i),(LPARAM)(h))
-#define ListView_SetItem(w,i) (BOOL)SendMessage((w),LVM_SETITEM,0,(LPARAM)(const LV_ITEM*)(i))
-#define ListView_InsertItem(w,i) (int)SendMessage((w),LVM_INSERTITEM,0,(LPARAM)(const LV_ITEM*)(i))
-#define ListView_DeleteItem(w,i) (BOOL)SendMessage((w),LVM_DELETEITEM,i,0)
-#define ListView_DeleteAllItems(w) (BOOL)SendMessage((w),LVM_DELETEALLITEMS,0,0)
-#define ListView_GetCallbackMask(w) (BOOL)SendMessage((w),LVM_GETCALLBACKMASK,0,0)
-#define ListView_SetCallbackMask(w,m) (BOOL)SendMessage((w),LVM_SETCALLBACKMASK,m,0)
-#define ListView_GetNextItem(w,i,f) (int)SendMessage((w),LVM_GETNEXTITEM,i,MAKELPARAM((f),0))
-#define ListView_FindItem(w,i,p) (int)SendMessage((w), LVM_FINDITEM,i,(LPARAM)(const LV_FINDINFO*)(p))
-#define ListView_GetItemRect(w,i,p,c) (BOOL)SendMessage((w),LVM_GETITEMRECT,i,((p)?(((LPRECT)(p))->left=(c),(LPARAM)(LPRECT)(p)):0))
-#define ListView_SetItemPosition(w,i,x,y) (BOOL)SendMessage((w),LVM_SETITEMPOSITION,i,MAKELPARAM(x,y))
-#define ListView_GetItemPosition(w,i,p) (BOOL)SendMessage((w),LVM_GETITEMPOSITION,i,(LPARAM)p)
-#define ListView_GetItemSpacing(w,f) (DWORD)SendMessage((w),LVM_GETITEMSPACING,f,0)
-#define ListView_GetStringWidth(w,s) (int)SendMessage((w),LVM_GETSTRINGWIDTH,0,(LPARAM)s)
-#define ListView_HitTest(w,p) (int)SendMessage((w),LVM_HITTEST,0,(LPARAM)(LV_HITTESTINFO*)(p))
-#define ListView_EnsureVisible(w,i,f) (BOOL)SendMessage((w),LVM_ENSUREVISIBLE,i,MAKELPARAM((f),0))
-#define ListView_Scroll(w,dx,dy) (BOOL)SendMessage((w),LVM_SCROLL,dx,dy)
-#define ListView_RedrawItems(w,f,l) (BOOL)SendMessage((w),LVM_REDRAWITEMS,f,l)
-#define ListView_Arrange(w,c) (BOOL)SendMessage((w),LVM_ARRANGE,c,0)
-#define ListView_EditLabel(w,i) (HWND)SendMessage((w),LVM_EDITLABEL,i,0)
-#define ListView_GetEditControl(w) (HWND)SendMessage((w),LVM_GETEDITCONTROL,0,0)
-#define ListView_GetColumn(w,i,p) (BOOL)SendMessage((w),LVM_GETCOLUMN,i,(LPARAM)(LV_COLUMN*)(p))
-#define ListView_SetColumn(w,i,p) (BOOL)SendMessage((w),LVM_SETCOLUMN,i,(LPARAM)(const LV_COLUMN*)(p))
-#define ListView_InsertColumn(w,i,p) (int)SendMessage((w),LVM_INSERTCOLUMN,i,(LPARAM)(const LV_COLUMN*)(p))
-#define ListView_DeleteColumn(w,i) (BOOL)SendMessage((w),LVM_DELETECOLUMN,i,0)
-#define ListView_GetColumnWidth(w,i) (int)SendMessage((w),LVM_GETCOLUMNWIDTH,i,0)
-#define ListView_SetColumnWidth(w,i,x) (BOOL)SendMessage((w),LVM_SETCOLUMNWIDTH,i,MAKELPARAM((x),0))
-#define ListView_CreateDragImage(w,i,p) (HIMAGELIST)SendMessage((w),LVM_CREATEDRAGIMAGE,i,(LPARAM)(LPPOINT)(p))
-#define ListView_GetViewRect(w,p) (BOOL)SendMessage((w),LVM_GETVIEWRECT,0,(LPARAM)(LPRECT)(p))
-#define ListView_GetTextColor(w) (COLORREF)SendMessage((w),LVM_GETTEXTCOLOR,0,0)
-#define ListView_SetTextColor(w,c) (BOOL)SendMessage((w),LVM_SETTEXTCOLOR,0,(LPARAM)(COLORREF)(c))
-#define ListView_GetTextBkColor(w) (COLORREF)SendMessage((w),LVM_GETTEXTBKCOLOR,0,0)
-#define ListView_SetTextBkColor(w,c) (BOOL)SendMessage((w),LVM_SETTEXTBKCOLOR,0,(LPARAM)(COLORREF)(c))
-#define ListView_GetTopIndex(w) (int)SendMessage((w),LVM_GETTOPINDEX,0,0)
-#define ListView_GetCountPerPage(w) (int)SendMessage((w),LVM_GETCOUNTPERPAGE,0,0)
-#define ListView_GetOrigin(w,p) (BOOL)SendMessage((w),LVM_GETORIGIN,0,(LPARAM)(POINT*)(p))
-#define ListView_GetOrigin(w,p) (BOOL)SendMessage((w),LVM_GETORIGIN,0,(LPARAM)(POINT*)(p))
-#define ListView_Update(w,i) (BOOL)SendMessage((w),LVM_UPDATE,i,0)
-#define ListView_SetItemState(w,i,d,m) \
-{ \
- LV_ITEM _lvi;\
- _lvi.stateMask=m;\
- _lvi.state=d;\
- SendMessage((w),LVM_SETITEMSTATE,i,(LPARAM)(LV_ITEM*)&_lvi);\
-}
-#define ListView_GetItemState(w,i,m) (UINT)SendMessage((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;\
- SendMessage((w),LVM_GETITEMTEXT,i,(LPARAM)(LV_ITEM*)&_lvi);\
-}
-#define ListView_SetItemText(w,i,iS,s) \
-{ \
- LV_ITEM _lvi;\
- _lvi.iSubItem=iS;\
- _lvi.pszText=s;\
- SendMessage((w),LVM_SETITEMTEXT,i,(LPARAM)(LV_ITEM*)&_lvi);\
-}
-#define ListView_SetItemCount(w,n) SendMessage((w),LVM_SETITEMCOUNT,n,0)
-#define ListView_SortItems(w,f,l) (BOOL)SendMessage((w),LVM_SORTITEMS,l,(LPARAM)f)
-#define ListView_SetItemPosition32(w,i,x,y) \
-{ \
- POINT p={x,y}; \
- SendMessage((w),LVM_SETITEMPOSITION32,i,(LPARAM)&p);\
-}
-#define ListView_GetSelectedCount(w) (UINT)SendMessage((w),LVM_GETSELECTEDCOUNT,0,0)
-
-BOOL WINAPI MakeDragList(HWND);
-void WINAPI MenuHelp(UINT,WPARAM,LPARAM,HMENU,HINSTANCE,HWND,PUINT);
-#define MonthCal_GetColor(hwnd,icolor) SendMessage(hwnd,MCM_GETCOLOR,(WPARAM)icolor,(LPARAM)0)
-#define MonthCal_GetCurSel(hwnd,lpsystime) SendMessage(hwnd,MCM_GETCURSEL,0,(LPARAM)lpsystime)
-#define MonthCal_GetFirstDayOfWeek(hwnd) SendMessage(hwnd,MCM_GETFIRSTDAYOFWEEK,0,0)
-#define MonthCal_GetMaxSelCount(hwnd) SendMessage(hwnd,MCM_GETMAXSELCOUNT,0,0)
-#define MonthCal_GetMaxTodayWidth(hwnd) SendMessage(hwnd,MCM_GETMAXTODAYWIDTH,0,0)
-#define MonthCal_GetMinReqRect(hwnd,lpRectInfo) SendMessage(hwnd,MCM_GETMINREQRECT,0,(LPARAM)lpRectInfo)
-#define MonthCal_GetMonthDelta(hwnd) SendMessage(hwnd,MCM_GETMONTHDELTA,0,0)
-#define MonthCal_GetMonthRange(hwnd,flag,systimearray) SendMessage(hwnd,MCM_GETMONTHRANGE,(WPARAM)flag,(LPARAM)systimearray)
-#define MonthCal_GetRange(hwnd,systimearray) SendMessage(hwnd,MCM_GETRANGE,0,(LPARAM)systimearray)
-#define MonthCal_GetSelRange(hwnd,systimearray) SendMessage(hwnd,MCM_GETSELRANGE,0,(LPARAM)systimearray)
-#define MonthCal_GetToday(hwnd,systime) SendMessage(hwnd,MCM_GETTODAY,0,(LPARAM)systime)
-#define MonthCal_GetUnicodeFormat(hwnd) SendMessage(hwnd,MCM_GETUNICODEFORMAT,0,0)
-#define MonthCal_HitTest(hwnd,pmchittest) SendMessage(hwnd,MCM_HITTEST,0,(LPARAM)pmchittest)
-#define MonthCal_SetColor(hwnd,icolor,clr) SendMessage(hwnd,MCM_SETCOLOR,(WPARAM)icolor,(LPARAM)clr)
-#define MonthCal_SetCurSel(hwnd,lpsystime) SendMessage(hwnd,MCM_SETCURSEL,0,(LPARAM)lpsystime)
-#define MonthCal_SetDayState(hwnd,imonths,lpdatestatearray) SendMessage(hwnd,MCM_SETDAYSTATE,(WPARAM)imonths,(LPARAM)lpdatestatearray)
-#define MonthCal_SetFirstDayOfWeek(hwnd,iday) SendMessage(hwnd,MCM_SETFIRSTDAYOFWEEK,0,(LPARAM)iday)
-#define MonthCal_SetMaxSelCount(hwnd,imax) SendMessage(hwnd,MCM_SETMAXSELCOUNT,(WPARAM)imax,0)
-#define MonthCal_SetMonthDelta(hwnd,idelta) SendMessage(hwnd,MCM_SETMONTHDELTA,(WPARAM)idelta,0)
-#define MonthCal_SetRange(hwnd,whichlimit,systimearray) SendMessage(hwnd,MCM_SETRANGE,whichlimit,systimearray)
-#define MonthCal_SetSelRange(hwnd,systimearray) SendMessage(hwnd,MCM_SETSELRANGE,0,(LPARAM)systimearray)
-#define MonthCal_SetToday(hwnd,systime) SendMessage(hwnd,MCM_SETTODAY,0,(LPARAM)systime)
-#define MonthCal_SetUnicodeFormat(hwnd,unicode) SendMessage(hwnd,MCM_SETUNICODEFORMAT,(WPARAM)unicode,0)
-BOOL WINAPI ShowHideMenuCtl(HWND,UINT,PINT);
-#define TabCtrl_GetItem(w,i,p) (BOOL)SendMessage((w),TCM_GETITEM,i,(LPARAM)(TC_ITEM*)(p))
-#define TabCtrl_SetItem(w,i,p) (BOOL)SendMessage((w),TCM_SETITEM,i,(LPARAM)(TC_ITEM*)(p))
-#define TabCtrl_InsertItem(w,i,p) (int)SendMessage((w),TCM_INSERTITEM,i,(LPARAM)(const TC_ITEM*)(p))
-#define TabCtrl_DeleteItem(w,i) (BOOL)SendMessage((w),TCM_DELETEITEM,i,0)
-#define TabCtrl_DeleteAllItems(w) (BOOL)SendMessage((w),TCM_DELETEALLITEMS,0,0)
-#define TabCtrl_GetItemRect(w,i,p) (BOOL)SendMessage((w),TCM_GETITEMRECT,i,(LPARAM)(LPRECT)(p))
-#define TabCtrl_GetCurSel(w) (int)SendMessage((w),TCM_GETCURSEL,0,0)
-#define TabCtrl_SetCurSel(w,i) (int)SendMessage((w),TCM_SETCURSEL,i,0)
-#define TabCtrl_HitTest(w,p) (int)SendMessage((w),TCM_HITTEST,0,(LPARAM)(TC_HITTESTINFO*)(p))
-#define TabCtrl_SetItemExtra(w,c) (BOOL)SendMessage((w),TCM_SETITEMEXTRA,c,0)
-#define TabCtrl_AdjustRect(w,b,p) (int)SendMessage((w),TCM_ADJUSTRECT,b,(LPARAM)(LPRECT)p)
-#define TabCtrl_SetItemSize(w,x,y) (DWORD)SendMessage((w),TCM_SETITEMSIZE,0,MAKELPARAM(x,y))
-#define TabCtrl_RemoveImage(w,i) (void)SendMessage((w),TCM_REMOVEIMAGE,i,0)
-#define TabCtrl_SetPadding(w,x,y) (void)SendMessage((w),TCM_SETPADDING,0,MAKELPARAM(x,y))
-#define TabCtrl_GetRowCount(w) (int)SendMessage((w),TCM_GETROWCOUNT,0,0)
-#define TabCtrl_GetToolTips(w) (HWND)SendMessage((w),TCM_GETTOOLTIPS,0,0)
-#define TabCtrl_SetToolTips(w,t) (void)SendMessage((w),TCM_SETTOOLTIPS,(WPARAM)t,0)
-#define TabCtrl_GetCurFocus(w) (int)SendMessage((w),TCM_GETCURFOCUS,0,0)
-#define TabCtrl_SetCurFocus(w,i) (void)SendMessage((w),TCM_SETCURFOCUS,i,0)
-#define TabCtrl_SetImageList(w,h) (HIMAGELIST)SendMessage((w),TCM_SETIMAGELIST,0,(LPARAM)(UINT)(h))
-#define TabCtrl_GetItemCount(w) (int)SendMessage((w),TCM_GETITEMCOUNT,0,0)
-BOOL WINAPI _TrackMouseEvent(LPTRACKMOUSEEVENT);
-#define TreeView_InsertItem(w,i) (HTREEITEM)SendMessage((w),TVM_INSERTITEM,0,(LPARAM)(LPTV_INSERTSTRUCT)(i))
-#define TreeView_DeleteItem(w,i) (BOOL)SendMessage((w),TVM_DELETEITEM,0,(LPARAM)(HTREEITEM)(i))
-#define TreeView_DeleteAllItems(w) (BOOL)SendMessage((w),TVM_DELETEITEM,0,(LPARAM)TVI_ROOT)
-#define TreeView_Expand(w,i,c) (BOOL)SendMessage((w),TVM_EXPAND,c,(LPARAM)(HTREEITEM)(i))
-#define TreeView_GetItemRect(w,i,p,c) (*(HTREEITEM*)p=(i),(BOOL)SendMessage((w),TVM_GETITEMRECT,c,(LPARAM)(LPRECT)(p)))
-#define TreeView_GetCount(w) (UINT)SendMessage((w),TVM_GETCOUNT,0,0)
-#define TreeView_GetIndent(w) (UINT)SendMessage((w),TVM_GETINDENT,0,0)
-#define TreeView_SetIndent(w,i) (BOOL)SendMessage((w),TVM_SETINDENT,indent,0)
-#define TreeView_GetImageList(w,i) (HIMAGELIST)SendMessage((w),TVM_GETIMAGELIST,i,0)
-#define TreeView_SetImageList(w,h,i) (HIMAGELIST)SendMessage((w),TVM_SETIMAGELIST,i,(LPARAM)(HIMAGELIST)(h))
-#define TreeView_GetNextItem(w,i,c) (HTREEITEM)SendMessage((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) (HTREEITEM)SendMessage((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)SendMessage((w),TVM_GETITEM,0,(LPARAM)(TV_ITEM*)(i))
-#define TreeView_SetItem(w,i) (BOOL)SendMessage((w),TVM_SETITEM,0,(LPARAM)(const TV_ITEM*)(i))
-#define TreeView_EditLabel(w,i) (HWND)SendMessage((w),TVM_EDITLABEL,0,(LPARAM)(HTREEITEM)(i))
-#define TreeView_GetEditControl(w) (HWND)SendMessage((w),TVM_GETEDITCONTROL,0,0)
-#define TreeView_GetVisibleCount(w) (UINT)SendMessage((w),TVM_GETVISIBLECOUNT,0,0)
-#define TreeView_HitTest(w,p) (HTREEITEM)SendMessage((w),TVM_HITTEST,0,(LPARAM)(LPTV_HITTESTINFO)(p))
-#define TreeView_CreateDragImage(w,i) (HIMAGELIST)SendMessage((w),TVM_CREATEDRAGIMAGE,0,(LPARAM)(HTREEITEM)(i))
-#define TreeView_SortChildren(w,i,r) (BOOL)SendMessage((w),TVM_SORTCHILDREN,r,(LPARAM)(HTREEITEM)(i))
-#define TreeView_EnsureVisible(w,i) (BOOL)SendMessage((w),TVM_ENSUREVISIBLE,0,(LPARAM)(HTREEITEM)(i))
-#define TreeView_SortChildrenCB(w,s,r) (BOOL)SendMessage((w),TVM_SORTCHILDRENCB,r,(LPARAM)(LPTV_SORTCB)(s))
-#define TreeView_EndEditLabelNow(w,f) (BOOL)SendMessage((w),TVM_ENDEDITLABELNOW,f,0)
-#define TreeView_GetISearchString(w,s) (BOOL)SendMessage((w),TVM_GETISEARCHSTRING,0,(LPARAM)s)
-
-#if (_WIN32_IE >= 0x0300)
-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) SendMessage((hwnd), TCM_SETMINTABWIDTH, 0, x)
-#define TabCtrl_DeselectAll(hwnd, fExcludeFocus) SendMessage((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
-#endif
-#if (_WIN32_IE >= 0x0400)
-#define TabCtrl_HighlightItem(hwnd, i, fHighlight) SendMessage((hwnd), TCM_HIGHLIGHTITEM, (WPARAM)i, (LPARAM)MAKELONG (fHighlight, 0))
-#define TabCtrl_SetExtendedStyle(hwnd, dw) SendMessage((hwnd), TCM_SETEXTENDEDSTYLE, 0, dw)
-#define TabCtrl_GetExtendedStyle(hwnd) SendMessage((hwnd), TCM_GETEXTENDEDSTYLE, 0, 0)
-#define TabCtrl_SetUnicodeFormat(hwnd, fUnicode) SendMessage((hwnd), TCM_SETUNICODEFORMAT, (WPARAM)(fUnicode), 0)
-#define TabCtrl_GetUnicodeFormat(hwnd) SendMessage((hwnd), TCM_GETUNICODEFORMAT, 0, 0)
-#endif
-
-#ifdef UNICODE
-#define ANIMATE_CLASS ANIMATE_CLASSW
-#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 WC_HEADER WC_HEADERW
-#define WC_LISTVIEW WC_LISTVIEWW
-#define WC_TABCONTROL WC_TABCONTROLW
-#define WC_TREEVIEW WC_TREEVIEWW
-typedef HD_ITEMW HD_ITEM;
-typedef TOOLINFOW TOOLINFO,*PTOOLINFO,*LPTOOLINFO;
-typedef TTHITTESTINFOW TTHITTESTINFO,*LPHITTESTINFO;
-typedef TOOLTIPTEXTW TOOLTIPTEXT,*LPTOOLTIPTEXT;
-typedef TV_ITEMW TV_ITEM,*LPTV_ITEM;
-typedef TV_INSERTSTRUCTW TV_INSERTSTRUCT,*LPTV_INSERTSTRUCT;
-typedef NM_TREEVIEWW NM_TREEVIEW,*LPNM_TREEVIEW;
-#define ACM_OPEN ACM_OPENW
-#define SB_GETTEXT SB_GETTEXTW
-#define SB_SETTEXT SB_SETTEXTW
-#define SB_GETTEXTLENGTH SB_GETTEXTLENGTHW
-#define STATUSCLASSNAME STATUSCLASSNAMEW
-#define WC_HEADER WC_HEADERW
-#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
-#define HD_NOTIFY HD_NOTIFYW
-#define TOOLBARCLASSNAME TOOLBARCLASSNAMEW
-#define TBSAVEPARAMS TBSAVEPARAMSW
-#define TB_GETBUTTONTEXT TB_GETBUTTONTEXTW
-#define TB_SAVERESTORE TB_SAVERESTOREW
-#define TB_ADDSTRING TB_ADDSTRINGW
-#define TBN_GETBUTTONINFO TBN_GETBUTTONINFOW
-#define TBNOTIFY TBNOTIFYW
-#define LPTBNOTIFY LPTBNOTIFYW
-#define TOOLTIPS_CLASS TOOLTIPS_CLASSW
-#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 SB_GETTEXT SB_GETTEXTW
-#define SB_SETTEXT SB_SETTEXTW
-#define SB_GETTEXTLENGTH SB_GETTEXTLENGTHW
-#define TRACKBAR_CLASS TRACKBAR_CLASSW
-#define UPDOWN_CLASS UPDOWN_CLASSW
-#define PROGRESS_CLASS PROGRESS_CLASSW
-#define HOTKEY_CLASS HOTKEY_CLASSW
-#define WC_LISTVIEW WC_LISTVIEWW
-#define LV_ITEM LV_ITEMW
-#define LPSTR_TEXTCALLBACK LPSTR_TEXTCALLBACKW
-#define LVM_GETITEM LVM_GETITEMW
-#define LVM_SETITEM LVM_SETITEMW
-#define LVM_INSERTITEM LVM_INSERTITEMW
-#define LV_FINDINFO LV_FINDINFOW
-#define LVM_FINDITEM LVM_FINDITEMW
-#define LVM_GETSTRINGWIDTH LVM_GETSTRINGWIDTHW
-#define LVM_EDITLABEL LVM_EDITLABELW
-#define LV_COLUMN LV_COLUMNW
-#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 LV_DISPINFO LV_DISPINFOW
-#define WC_TREEVIEW WC_TREEVIEWW
-#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 TV_DISPINFOW
-#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 WC_TABCONTROL WC_TABCONTROLW
-#define TC_ITEMHEADER TC_ITEMHEADERW
-#define TC_ITEM TC_ITEMW
-#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
-#define DATETIMEPICK_CLASS DATETIMEPICK_CLASSW
-#define MONTHCAL_CLASS MONTHCAL_CLASSW
-#define REBARCLASSNAME REBARCLASSNAMEW
-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
-#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 WC_HEADER WC_HEADERA
-#define WC_LISTVIEW WC_LISTVIEWA
-#define WC_TABCONTROL WC_TABCONTROLA
-#define WC_TREEVIEW WC_TREEVIEWA
-typedef HD_ITEMA HD_ITEM;
-typedef TOOLINFOA TOOLINFO,*PTOOLINFO,*LPTOOLINFO;
-typedef TTHITTESTINFOA TTHITTESTINFO,*LPHITTESTINFO;
-typedef TOOLTIPTEXTA TOOLTIPTEXT,*LPTOOLTIPTEXT;
-typedef TV_ITEMA TV_ITEM,*LPTV_ITEM;
-typedef TV_INSERTSTRUCTA TV_INSERTSTRUCT,*LPTV_INSERTSTRUCT;
-typedef NM_TREEVIEWA NM_TREEVIEW,*LPNM_TREEVIEW;
-#define ACM_OPEN ACM_OPENA
-#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
-#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
-#define TBNOTIFY TBNOTIFYA
-#define LPTBNOTIFY LPTBNOTIFYA
-#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 SB_GETTEXT SB_GETTEXTA
-#define SB_SETTEXT SB_SETTEXTA
-#define SB_GETTEXTLENGTH SB_GETTEXTLENGTHA
-#define LV_ITEM LV_ITEMA
-#define LPSTR_TEXTCALLBACK LPSTR_TEXTCALLBACKA
-#define LVM_GETITEM LVM_GETITEMA
-#define LVM_SETITEM LVM_SETITEMA
-#define LVM_INSERTITEM LVM_INSERTITEMA
-#define LV_FINDINFO LV_FINDINFOA
-#define LVM_FINDITEM LVM_FINDITEMA
-#define LVM_GETSTRINGWIDTH LVM_GETSTRINGWIDTHA
-#define LVM_EDITLABEL LVM_EDITLABELA
-#define LV_COLUMN LV_COLUMNA
-#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 LV_DISPINFO LV_DISPINFOA
-#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 TV_DISPINFOA
-#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 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
-#define DATETIMEPICK_CLASS DATETIMEPICK_CLASSA
-#define MONTHCAL_CLASS MONTHCAL_CLASSA
-#define REBARCLASSNAME REBARCLASSNAMEA
-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
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/commdlg.h b/winsup/w32api/include/commdlg.h
deleted file mode 100644
index 4d56ec225..000000000
--- a/winsup/w32api/include/commdlg.h
+++ /dev/null
@@ -1,503 +0,0 @@
-#ifndef _COMMDLG_H
-#define _COMMDLG_H
-#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"
-#define CDN_FIRST (-601)
-#define CDN_LAST (-699)
-#define CDN_INITDONE CDN_FIRST
-#define CDN_SELCHANGE (CDN_FIRST-1)
-#define CDN_FOLDERCHANGE (CDN_FIRST-2)
-#define CDN_SHAREVIOLATION (CDN_FIRST-3)
-#define CDN_HELP (CDN_FIRST-4)
-#define CDN_FILEOK (CDN_FIRST-5)
-#define CDN_TYPECHANGE (CDN_FIRST-6)
-#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_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
-#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_MATCHCASE 4
-#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 0
-#define PD_SELECTION 1
-#define PD_PAGENUMS 2
-#define PD_NOSELECTION 4
-#define PD_NOPAGENUMS 8
-#define PD_COLLATE 16
-#define PD_PRINTTOFILE 32
-#define PD_PRINTSETUP 64
-#define PD_NOWARNING 128
-#define PD_RETURNDC 256
-#define PD_RETURNIC 512
-#define PD_RETURNDEFAULT 1024
-#define PD_SHOWHELP 2048
-#define PD_ENABLEPRINTHOOK 4096
-#define PD_ENABLESETUPHOOK 8192
-#define PD_ENABLEPRINTTEMPLATE 16384
-#define PD_ENABLESETUPTEMPLATE 32768
-#define PD_ENABLEPRINTTEMPLATEHANDLE 65536
-#define PD_ENABLESETUPTEMPLATEHANDLE 0x20000
-#define PD_USEDEVMODECOPIES 0x40000
-#define PD_USEDEVMODECOPIESANDCOLLATE 0x40000
-#define PD_DISABLEPRINTTOFILE 0x80000
-#define PD_HIDEPRINTTOFILE 0x100000
-#define PD_NONETWORKBUTTON 0x200000
-#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
-
-#ifndef SNDMSG
-#define SNDMSG SendMessage
-#endif
-
-#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)SendMessage(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)SendMessage(d,CDM_GETFOLDERIDLIST,m,(LPARAM)i)
-#define CommDlg_OpenSave_SetControlText(d,i,t) (void)SendMessage(d,CDM_SETCONTROLTEXT,i,(LPARAM)t)
-#define CommDlg_OpenSave_HideControl(d,i) (void)SendMessage(d,CDM_HIDECONTROL,i,0)
-#define CommDlg_OpenSave_SetDefExt(d,e) (void)SendMessage(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;
-} 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;
-} 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;
-
-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);
-
-#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
-#else
-#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
-#endif
-#pragma pack(pop)
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/cpl.h b/winsup/w32api/include/cpl.h
deleted file mode 100644
index f5ce29d00..000000000
--- a/winsup/w32api/include/cpl.h
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifndef _CPL_H
-#define _CPL_H
-#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_STARTWPARMS 9
-#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
-typedef NEWCPLINFOW NEWCPLINFO,*LPNEWCPLINFO;
-#else
-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 8c2207d16..000000000
--- a/winsup/w32api/include/cplext.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _CPLEXT_H
-#define _CPLEXT_H
-#define CPLPAGE_MOUSE_BUTTONS 1
-#define CPLPAGE_MOUSE_PTRMOTION 2
-#define CPLPAGE_KEYBOARD_SPEED 1
-#endif
diff --git a/winsup/w32api/include/custcntl.h b/winsup/w32api/include/custcntl.h
deleted file mode 100644
index 8c3d463ab..000000000
--- a/winsup/w32api/include/custcntl.h
+++ /dev/null
@@ -1,98 +0,0 @@
-#ifndef _CUSTCNTL_H
-#define _CUSTCNTL_H
-#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 071b0077b..000000000
--- a/winsup/w32api/include/dbt.h
+++ /dev/null
@@ -1,86 +0,0 @@
-#ifndef _DBT_H
-#define _DBT_H
-#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
-#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
-#define BSM_ALLCOMPONENTS 0
-#define BSM_VXDS 1
-#define BSM_NETDRIVER 2
-#define BSM_INSTALLABLEDRIVERS 4
-#define BSM_APPLICATIONS 8
-#define BSF_QUERY 1
-#define BSF_IGNORECURRENTTASK 2
-#define BSF_FLUSHDISK 4
-#define BSF_NOHANG 8
-#define BSF_POSTMESSAGE 16
-#define BSF_FORCEIFHUNG 32
-#define BSF_NOTIMEOUTIFNOTHUNG 64
-#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 {
- DWORD dbcp_size;
- DWORD dbcp_devicetype;
- DWORD dbcp_reserved;
- char dbcp_name[1];
-} DEV_BROADCAST_PORT,*PDEV_BROADCAST_PORT;
-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 __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/dde.h b/winsup/w32api/include/dde.h
deleted file mode 100644
index 474f12691..000000000
--- a/winsup/w32api/include/dde.h
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef _DDE_H
-#define _DDE_H
-#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);
-LONG WINAPI PackDDElParam(UINT,UINT,UINT);
-BOOL WINAPI UnpackDDElParam(UINT,LONG,PUINT,PUINT);
-BOOL WINAPI FreeDDElParam(UINT,LONG);
-LONG WINAPI ReuseDDElParam(LONG,UINT,UINT,UINT,UINT);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/ddeml.h b/winsup/w32api/include/ddeml.h
deleted file mode 100644
index 3f44c76f3..000000000
--- a/winsup/w32api/include/ddeml.h
+++ /dev/null
@@ -1,241 +0,0 @@
-#ifndef _DDEML_H
-#define _DDEML_H
-#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
-
-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;
-
-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/dlgs.h b/winsup/w32api/include/dlgs.h
deleted file mode 100644
index d26e19156..000000000
--- a/winsup/w32api/include/dlgs.h
+++ /dev/null
@@ -1,182 +0,0 @@
-#ifndef _DLGS_H
-#define _DLGS_H
-#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/excpt.h b/winsup/w32api/include/excpt.h
deleted file mode 100644
index 39621a8f6..000000000
--- a/winsup/w32api/include/excpt.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef _EXCPT_H
-#define _EXCPT_H
-
-/* FIXME: This will make some code compile. The programs will most
- likely crash when an exception is raised, but at least they will
- compile. */
-#ifdef __GNUC__
-#define __try
-#define __except(x) if (0) /* don't execute handler */
-#define __finally
-
-#define _try __try
-#define _except __except
-#define _finally __finally
-#endif
-
-#endif
diff --git a/winsup/w32api/include/httpext.h b/winsup/w32api/include/httpext.h
deleted file mode 100644
index 4b6f9e282..000000000
--- a/winsup/w32api/include/httpext.h
+++ /dev/null
@@ -1,87 +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
-
-#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_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;
-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/imagehlp.h b/winsup/w32api/include/imagehlp.h
deleted file mode 100644
index 2a3eb6f08..000000000
--- a/winsup/w32api/include/imagehlp.h
+++ /dev/null
@@ -1,326 +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
-
-#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 30d97013c..000000000
--- a/winsup/w32api/include/imm.h
+++ /dev/null
@@ -1,420 +0,0 @@
-#ifndef _IMM_H
-#define _IMM_H
-#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
-#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 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 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);
-BOOL WINAPI ImmGetCompositionFontA(HIMC,LPLOGFONTA);
-BOOL WINAPI ImmGetCompositionFontW(HIMC,LPLOGFONTW);
-BOOL WINAPI ImmSetCompositionFontA(HIMC,LPLOGFONTA);
-BOOL WINAPI ImmSetCompositionFontW(HIMC,LPLOGFONTW);
-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
-#define ImmSetCompositionFont ImmSetCompositionFontW
-#define ImmGetCompositionFont ImmGetCompositionFontW
-#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
-#define ImmSetCompositionFont ImmSetCompositionFontA
-#define ImmGetCompositionFont ImmGetCompositionFontA
-#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 08092a299..000000000
--- a/winsup/w32api/include/initguid.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef _INITGUID_H
-#define _INITGUID_H
-#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) 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 a9d7ee008..000000000
--- a/winsup/w32api/include/intshcut.h
+++ /dev/null
@@ -1,78 +0,0 @@
-#ifndef _INTSHCUT_H
-#define _INTSHCUT_H
-#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;
-#undef INTERFACE
-#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;
-};
-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 bcff27268..000000000
--- a/winsup/w32api/include/ipexport.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef _IPEXPORT_H
-#define _IPEXPORT_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifndef ANY_SIZE
-#define ANY_SIZE 1
-#endif
-#define MAX_ADAPTER_NAME 128
-typedef unsigned long IPAddr, IPMask, IP_STATUS;
-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;
-#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 e71da0aab..000000000
--- a/winsup/w32api/include/iphlpapi.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef _IPHLPAPI_H
-#define _IPHLPAPI_H
-#include <iprtrmib.h>
-#include <ipexport.h>
-#include <iptypes.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-DWORD WINAPI CreateIpForwardEntry(PMIB_IPFORWARDROW);
-DWORD WINAPI CreateIpNetEntry(PMIB_IPNETROW);
-DWORD WINAPI DeleteIpForwardEntry(PMIB_IPFORWARDROW);
-DWORD WINAPI DeleteIpNetEntry(PMIB_IPNETROW);
-DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO,PULONG);
-DWORD WINAPI GetBestInterface(IPAddr,PDWORD);
-DWORD WINAPI GetBestRoute(DWORD,DWORD,PMIB_IPFORWARDROW);
-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);
-BOOL WINAPI GetRTTAndHopCount(IPAddr,PULONG,ULONG,PULONG);
-DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS);
-DWORD WINAPI GetTcpTable(PMIB_TCPTABLE,PDWORD,BOOL);
-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 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);
-#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 16ef16880..000000000
--- a/winsup/w32api/include/ipifcons.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef _IPIFCONS_H
-#define _IPIFCONS_H
-#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 /* _IPIFCONS_H */
diff --git a/winsup/w32api/include/iprtrmib.h b/winsup/w32api/include/iprtrmib.h
deleted file mode 100644
index c8c7bea7f..000000000
--- a/winsup/w32api/include/iprtrmib.h
+++ /dev/null
@@ -1,205 +0,0 @@
-#ifndef _IPRTRMIB_H
-#define _IPRTRMIB_H
-#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 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 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;
-#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 2b94553a7..000000000
--- a/winsup/w32api/include/iptypes.h
+++ /dev/null
@@ -1,66 +0,0 @@
-#ifndef _IPTYPES_H
-#define _IPTYPES_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
-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 _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;
-#ifdef __cplusplus
-}
-#endif
-#endif /* _IPTYPES_H */
diff --git a/winsup/w32api/include/isguids.h b/winsup/w32api/include/isguids.h
deleted file mode 100644
index 6518e66a6..000000000
--- a/winsup/w32api/include/isguids.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef _ISGUID_H
-#define _ISGUID_H
-#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/largeint.h b/winsup/w32api/include/largeint.h
deleted file mode 100644
index c36db31ef..000000000
--- a/winsup/w32api/include/largeint.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- largeint.h
-
- Header for 64 bit integer arithmetics library
-
- */
-#ifndef _LARGEINT_H
-#define _LARGEINT_H
-
-#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 040d13ae7..000000000
--- a/winsup/w32api/include/lm.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef _LM_H
-#define _LM_H
-
-#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 8a7b9ba88..000000000
--- a/winsup/w32api/include/lmaccess.h
+++ /dev/null
@@ -1,605 +0,0 @@
-#ifndef _LMACCESS_H
-#define _LMACCESS_H
-#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_LOCK 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_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_LOCK|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_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_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_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(LPTSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetAccessEnum(LPTSTR,LPTSTR,DWORD,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetAccessGetInfo(LPTSTR,LPTSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetAccessSetInfo(LPTSTR,LPTSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetAccessDel(LPTSTR,LPTSTR);
-NET_API_STATUS WINAPI NetAccessGetUserPerms(LPTSTR,LPTSTR,LPTSTR,PDWORD);
-#endif
-
-NET_API_STATUS WINAPI NetUserAdd(LPWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetUserEnum(LPWSTR,DWORD,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetUserGetInfo(LPWSTR,LPWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetUserSetInfo(LPWSTR,LPWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetUserDel(LPWSTR,LPWSTR);
-NET_API_STATUS WINAPI NetUserGetGroups(LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetUserSetGroups(LPWSTR,LPWSTR,DWORD,PBYTE,DWORD);
-NET_API_STATUS WINAPI NetUserGetLocalGroups(LPWSTR,LPWSTR,DWORD,DWORD,PBYTE*,DWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetUserModalsGet(LPWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetUserModalsSet(LPWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetUserChangePassword(LPWSTR,LPWSTR,LPWSTR,LPWSTR);
-NET_API_STATUS WINAPI NetGroupAdd(LPWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetGroupAddUser(LPWSTR,LPWSTR,LPWSTR);
-NET_API_STATUS WINAPI NetGroupEnum(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetGroupGetInfo(LPWSTR,LPWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetGroupSetInfo(LPWSTR,LPWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetGroupDel(LPWSTR,LPWSTR);
-NET_API_STATUS WINAPI NetGroupDelUser(LPWSTR,LPWSTR,LPWSTR);
-NET_API_STATUS WINAPI NetGroupGetUsers(LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetGroupSetUsers(LPWSTR,LPWSTR,DWORD,PBYTE,DWORD);
-NET_API_STATUS WINAPI NetLocalGroupAdd(LPWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetLocalGroupAddMember(LPWSTR,LPWSTR,PSID);
-NET_API_STATUS WINAPI NetLocalGroupEnum(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetLocalGroupGetInfo(LPWSTR,LPWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetLocalGroupSetInfo(LPWSTR,LPWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetLocalGroupDel(LPWSTR,LPWSTR);
-NET_API_STATUS WINAPI NetLocalGroupDelMember(LPWSTR,LPWSTR,PSID);
-NET_API_STATUS WINAPI NetLocalGroupGetMembers(LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,
-PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetLocalGroupSetMembers(LPWSTR,LPWSTR,DWORD,PBYTE,DWORD);
-NET_API_STATUS WINAPI NetLocalGroupAddMembers(LPWSTR,LPWSTR,DWORD,PBYTE,DWORD);
-NET_API_STATUS WINAPI NetLocalGroupDelMembers(LPWSTR,LPWSTR,DWORD,PBYTE,DWORD);
-NET_API_STATUS WINAPI NetQueryDisplayInformation(LPWSTR,DWORD,DWORD,DWORD,DWORD,PDWORD,PVOID*);
-NET_API_STATUS WINAPI NetGetDisplayInformationIndex(LPWSTR,DWORD,LPWSTR,PDWORD);
-NET_API_STATUS WINAPI NetGetDCName(LPWSTR,LPWSTR,PBYTE*);
-NET_API_STATUS WINAPI NetGetAnyDCName(LPWSTR,LPWSTR,PBYTE*);
-NET_API_STATUS WINAPI I_NetLogonControl(LPWSTR,DWORD,DWORD,PBYTE*);
-NET_API_STATUS WINAPI I_NetLogonControl2(LPWSTR,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 d4899bc30..000000000
--- a/winsup/w32api/include/lmalert.h
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef _LMALERT_H
-#define _LMALERT_H
-#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 2340d6d10..000000000
--- a/winsup/w32api/include/lmapibuf.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef _LMAPIBUF_H
-#define _LMAPIBUF_H
-#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 4d2cf8c11..000000000
--- a/winsup/w32api/include/lmat.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef _LMAT_H
-#define _LMAT_H
-#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 1d944b2cb..000000000
--- a/winsup/w32api/include/lmaudit.h
+++ /dev/null
@@ -1,246 +0,0 @@
-#ifndef _LMAUDIT_H
-#define _LMAUDIT_H
-#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 85e40bbdb..000000000
--- a/winsup/w32api/include/lmbrowsr.h
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifndef _LMBROWSR_H
-#define _LMBROWSR_H
-#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 c7a6814f7..000000000
--- a/winsup/w32api/include/lmchdev.h
+++ /dev/null
@@ -1,57 +0,0 @@
-#ifndef _LMCHDEV_H
-#define _LMCHDEV_H
-#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 746a5ddc8..000000000
--- a/winsup/w32api/include/lmconfig.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef _LMCONFIG_H
-#define _LMCONFIG_H
-#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 1adde204b..000000000
--- a/winsup/w32api/include/lmcons.h
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef _LMCONS_H
-#define _LMCONS_H
-#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
-#define CNLEN 15
-#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 UNCLEN (CNLEN+2)
-#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 308a91253..000000000
--- a/winsup/w32api/include/lmerr.h
+++ /dev/null
@@ -1,302 +0,0 @@
-#ifndef _LMERR_H
-#define _LMERR_H
-#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 7948af28f..000000000
--- a/winsup/w32api/include/lmerrlog.h
+++ /dev/null
@@ -1,207 +0,0 @@
-#ifndef _LMERRLOG_H
-#define _LMERRLOG_H
-#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 01689812e..000000000
--- a/winsup/w32api/include/lmmsg.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef _LMMSG_H
-#define _LMMSG_H
-#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 553bdbd5b..000000000
--- a/winsup/w32api/include/lmremutl.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef _LMREMUTL_H
-#define _LMREMUTL_H
-#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 f0ca544a7..000000000
--- a/winsup/w32api/include/lmrepl.h
+++ /dev/null
@@ -1,90 +0,0 @@
-#ifndef _LMREPL_H
-#define _LMREPL_H
-#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 f9445884c..000000000
--- a/winsup/w32api/include/lmserver.h
+++ /dev/null
@@ -1,602 +0,0 @@
-#ifndef _LMSERVER_H
-#define _LMSERVER_H
-#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 326ad8575..000000000
--- a/winsup/w32api/include/lmshare.h
+++ /dev/null
@@ -1,143 +0,0 @@
-#ifndef _LMSHARE_H
-#define _LMSHARE_H
-#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 2a0f42bcd..000000000
--- a/winsup/w32api/include/lmsname.h
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifndef _LMSNAME_H
-#define _LMSNAME_H
-#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 23820d72f..000000000
--- a/winsup/w32api/include/lmstats.h
+++ /dev/null
@@ -1,110 +0,0 @@
-#ifndef _LMSTATS_H
-#define _LMSTATS_H
-#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 a129bb0b4..000000000
--- a/winsup/w32api/include/lmsvc.h
+++ /dev/null
@@ -1,130 +0,0 @@
-#ifndef _LMSVC_H
-#define _LMSVC_H
-#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 528e1ff3f..000000000
--- a/winsup/w32api/include/lmuse.h
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef _LMUSE_H
-#define _LMUSE_H
-#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 7984b1969..000000000
--- a/winsup/w32api/include/lmuseflg.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _LMUSEFLG_H
-#define _LMUSEFLG_H
-#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 6538fc9d1..000000000
--- a/winsup/w32api/include/lmwksta.h
+++ /dev/null
@@ -1,229 +0,0 @@
-#ifndef _LMWKSTA_H
-#define _LMWKSTA_H
-#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 5c06d14e4..000000000
--- a/winsup/w32api/include/lzexpand.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef _LZEXPAND_H
-#define _LZEXPAND_H
-#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/mciavi.h b/winsup/w32api/include/mciavi.h
deleted file mode 100644
index b56bb8f1c..000000000
--- a/winsup/w32api/include/mciavi.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef _MCIAVI_H
-#define _MCIAVI_H
-#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 facc6d595..000000000
--- a/winsup/w32api/include/mcx.h
+++ /dev/null
@@ -1,73 +0,0 @@
-#ifndef _MCX_H
-#define _MCX_H
-#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/mmsystem.h b/winsup/w32api/include/mmsystem.h
deleted file mode 100644
index a35a78929..000000000
--- a/winsup/w32api/include/mmsystem.h
+++ /dev/null
@@ -1,1933 +0,0 @@
-
-#ifndef _MMSYSTEM_H
-#define _MMSYSTEM_H
-#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))
-#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 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 1
-#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
-#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 mmioFOURCC(c0,c1,c2,c3) MAKEFOURCC(c0,c1,c2,c3)
-#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 _WAVEFORMATEX_
-#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 {
- struct {
- LONG lMinimum;
- LONG lMaximum;
- }_STRUCT_NAME(s);
- 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 {
- struct {
- LONG lMinimum;
- LONG lMaximum;
- }_STRUCT_NAME(s);
- 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;
- union {
- DWORD dwControlID;
- DWORD dwControlType;
- } DUMMYUNIONNAME;
- DWORD cControls;
- DWORD cbmxctrl;
- LPMIXERCONTROLA pamxctrl;
-} MIXERLINECONTROLSA,*PMIXERLINECONTROLSA,*LPMIXERLINECONTROLSA;
-typedef struct tagMIXERLINECONTROLSW {
- DWORD cbStruct;
- DWORD dwLineID;
- union {
- DWORD dwControlID;
- DWORD dwControlType;
- } DUMMYUNIONNAME;
- DWORD cControls;
- DWORD cbmxctrl;
- LPMIXERCONTROLW pamxctrl;
-} MIXERLINECONTROLSW,*PMIXERLINECONTROLSW,*LPMIXERLINECONTROLSW;
-typedef struct tMIXERCONTROLDETAILS {
- DWORD cbStruct;
- DWORD dwControlID;
- DWORD cChannels;
- 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 MIXERCONTROLA 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/nb30.h b/winsup/w32api/include/nb30.h
deleted file mode 100644
index c12b94355..000000000
--- a/winsup/w32api/include/nb30.h
+++ /dev/null
@@ -1,182 +0,0 @@
-#ifndef _NB30_H
-#define _NB30_H
-#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 a4dc03bcf..000000000
--- a/winsup/w32api/include/nddeapi.h
+++ /dev/null
@@ -1,127 +0,0 @@
-#ifndef _NDDEAPI_H
-#define _NDDEAPI_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define CNLEN 15
-#define UNCLEN 17
-#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 97dde1639..000000000
--- a/winsup/w32api/include/nspapi.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef _NSPAPI_H
-#define _NSPAPI_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-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;
-#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 f4f990747..000000000
--- a/winsup/w32api/include/ntdef.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef _NTDEF_H
-#define _NTDEF_H
-#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 struct _STRING {
- USHORT Length;
- USHORT MaximumLength;
- PCHAR Buffer;
-} STRING, *PSTRING;
-#endif
-typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
-typedef enum _SECTION_INHERIT {
- ViewShare = 1,
- ViewUnmap = 2
-} SECTION_INHERIT;
-typedef struct _OBJECT_ATTRIBUTES {
- ULONG Length;
- HANDLE RootDirectory;
- PUNICODE_STRING ObjectName;
- ULONG Attributes;
- PVOID SecurityDescriptor;
- PVOID SecurityQualityOfService;
-} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
-#endif /* _NTDEF_H */
diff --git a/winsup/w32api/include/ntsecapi.h b/winsup/w32api/include/ntsecapi.h
deleted file mode 100644
index 0531f47c8..000000000
--- a/winsup/w32api/include/ntsecapi.h
+++ /dev/null
@@ -1,602 +0,0 @@
-#ifndef _NTSECAPI_H
-#define _NTSECAPI_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-#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 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 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;
-typedef struct _LSA_OBJECT_ATTRIBUTES {
- ULONG Length;
- HANDLE RootDirectory;
- PLSA_UNICODE_STRING ObjectName;
- ULONG Attributes;
- PVOID SecurityDescriptor;
- PVOID SecurityQualityOfService;
-} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
-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 DnsTreeName;
- 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)();
-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/oaidl.h b/winsup/w32api/include/oaidl.h
deleted file mode 100644
index cc0e932a5..000000000
--- a/winsup/w32api/include/oaidl.h
+++ /dev/null
@@ -1,513 +0,0 @@
-#ifndef _OAIDL_H
-#define _OAIDL_H
-#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_BSTR (256)
-#define FADF_UNKNOWN (512)
-#define FADF_DISPATCH (1024)
-#define FADF_VARIANT (2048)
-#define FADF_RESERVED (0xf0e8)
-#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 interface ITypeLib *LPTYPELIB;
-typedef interface ICreateTypeInfo *LPCREATETYPEINFO;
-typedef interface ICreateTypeInfo2 *LPCREATETYPEINFO2;
-typedef interface ICreateTypeLib *LPCREATETYPELIB;
-typedef interface ICreateTypeLib2 *LPCREATETYPELIB2;
-typedef interface ITypeComp *LPTYPECOMP;
-typedef interface ITypeInfo *LPTYPEINFO;
-typedef interface IErrorInfo *LPERRORINFO;
-typedef interface IDispatch *LPDISPATCH;
-typedef interface IEnumVARIANT *LPENUMVARIANT;
-typedef interface ICreateErrorInfo *LPCREATEERRORINFO;
-
-extern const IID IID_ITypeLib;
-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_IErrorInfo;
-extern const IID IID_IDispatch;
-extern const IID IID_IEnumVARIANT;
-extern const IID IID_ICreateErrorInfo;
-extern const GUID IID_ISupportErrorInfo;
-
-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 _wireSAFEARRAY_UNION {
- ULONG sfType;
- union {
- SAFEARR_BSTR BstrStr;
- SAFEARR_UNKNOWN UnknownStr;
- SAFEARR_DISPATCH DispatchStr;
- SAFEARR_VARIANT VariantStr;
- 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;
-typedef struct tagVARIANT {
- union {
- struct __tagVARIANT {
- VARTYPE vt;
- WORD wReserved1;
- WORD wReserved2;
- WORD wReserved3;
- union {
- long lVal;
- 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;
- float *pfltVal;
- double *pdblVal;
- VARIANT_BOOL *pboolVal;
- 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;
- INT intVal;
- UINT uintVal;
- DECIMAL *pdecVal;
- CHAR *pcVal;
- USHORT *puiVal;
- ULONG *pulVal;
- INT *pintVal;
- UINT *puintVal;
- 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;
- union {
- LONG lVal;
- BYTE bVal;
- SHORT iVal;
- FLOAT fltVal;
- DOUBLE dblVal;
- VARIANT_BOOL boolVal;
- SCODE scode;
- CY cyVal;
- DATE date;
- wireBSTR bstrVal;
- IUnknown *punkVal;
- LPDISPATCH pdispVal;
- wireSAFEARRAY parray;
- 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;
- wireSAFEARRAY *pparray;
- struct _wireVARIANT *pvarVal;
- CHAR cVal;
- USHORT uiVal;
- ULONG ulVal;
- 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 {
- 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;
- 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;
- 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;
-
-#undef INTERFACE
-#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
-#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
-#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;
-};
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/objbase.h b/winsup/w32api/include/objbase.h
deleted file mode 100644
index 5e83ad5ae..000000000
--- a/winsup/w32api/include/objbase.h
+++ /dev/null
@@ -1,151 +0,0 @@
-#ifndef _OBJBASE_H
-#define _OBJBASE_H
-#include <rpc.h>
-#include <rpcndr.h>
-#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_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
-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;
-
-WINOLEAPI_(DWORD) CoBuildVersion(void);
-WINOLEAPI CoInitialize(PVOID);
-WINOLEAPI_(void) CoUninitialize(void);
-WINOLEAPI CoGetMalloc(DWORD,LPMALLOC*);
-WINOLEAPI_(DWORD) CoGetCurrentProcess(void);
-WINOLEAPI CoRegisterMallocSpy(LPMALLOCSPY);
-WINOLEAPI CoRevokeMallocSpy(void);
-WINOLEAPI CoCreateStandardMalloc(DWORD,IMalloc**);
-#if DBG == 1
-WINOLEAPI_(ULONG) DebugCoGetRpcFault(void);
-WINOLEAPI_(void) DebugCoSetRpcFault(ULONG);
-#endif
-WINOLEAPI CoGetClassObject(REFCLSID,DWORD,PVOID,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_(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 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 BindMoniker(LPMONIKER,DWORD,REFIID,PVOID*);
-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*);
-#pragma pack(pop)
-#endif
diff --git a/winsup/w32api/include/objfwd.h b/winsup/w32api/include/objfwd.h
deleted file mode 100644
index ce567b6d9..000000000
--- a/winsup/w32api/include/objfwd.h
+++ /dev/null
@@ -1,51 +0,0 @@
-#ifndef _OBJFWD_H
-#define _OBJFWD_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-typedef interface IMoniker *LPMONIKER;
-typedef interface IStream *LPSTREAM;
-typedef interface IMarshal *LPMARSHAL;
-typedef interface IMalloc *LPMALLOC;
-typedef interface IMallocSpy *LPMALLOCSPY;
-typedef interface IMessageFilter *LPMESSAGEFILTER;
-typedef interface IPersist *LPPERSIST;
-typedef interface IPersistStream *LPPERSISTSTREAM;
-typedef interface IRunningObjectTable *LPRUNNINGOBJECTTABLE;
-typedef interface IBindCtx *LPBINDCTX,*LPBC;
-typedef interface IAdviseSink *LPADVISESINK;
-typedef interface IAdviseSink2 *LPADVISESINK2;
-typedef interface IDataObject *LPDATAOBJECT;
-typedef interface IDataAdviseHolder *LPDATAADVISEHOLDER;
-typedef interface IEnumMoniker *LPENUMMONIKER;
-typedef interface IEnumFORMATETC *LPENUMFORMATETC;
-typedef interface IEnumSTATDATA *LPENUMSTATDATA;
-typedef interface IEnumSTATSTG *LPENUMSTATSTG;
-typedef interface IEnumSTATPROPSTG LPENUMSTATPROPSTG;
-typedef interface IEnumString *LPENUMSTRING;
-typedef interface IEnumUnknown *LPENUMUNKNOWN;
-typedef interface IStorage *LPSTORAGE;
-typedef interface IPersistStorage *LPPERSISTSTORAGE;
-typedef interface ILockBytes *LPLOCKBYTES;
-typedef interface IStdMarshalInfo *LPSTDMARSHALINFO;
-typedef interface IExternalConnection *LPEXTERNALCONNECTION;
-typedef interface IRunnableObject *LPRUNNABLEOBJECT;
-typedef interface IROTData *LPROTDATA;
-typedef interface IPersistFile *LPPERSISTFILE;
-typedef interface IRootStorage *LPROOTSTORAGE;
-typedef interface IRpcChannelBuffer *LPRPCCHANNELBUFFER;
-typedef interface IRpcProxyBuffer *LPRPCPROXYBUFFER;
-typedef interface IRpcStubBuffer *LPRPCSTUBBUFFER;
-typedef interface IPropertyStorage *LPPROPERTYSTORAGE;
-typedef interface IEnumSTATPROPSETSTG *LPENUMSTATPROPSETSTG;
-typedef interface IPropertySetStorage *LPPROPERTYSETSTORAGE;
-typedef interface IClientSecurity *LPCLIENTSECURITY;
-typedef interface IServerSecurity *LPSERVERSECURITY;
-typedef interface IClassActivator *LPCLASSACTIVATOR;
-typedef interface IFillLockBytes *LPFILLLOCKBYTES;
-typedef interface IProgressNotify *LPPROGRESSNOTIFY;
-typedef 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 4c8eb07fc..000000000
--- a/winsup/w32api/include/objidl.h
+++ /dev/null
@@ -1,1660 +0,0 @@
-#ifndef _OBJIDL_H
-#define _OBJIDL_H
-
-#include <objfwd.h>
-
-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;
- union {
- HBITMAP hBitmap;
- PVOID hMetaFilePict;
- HENHMETAFILE hEnhMetaFile;
- HGLOBAL hGlobal;
- LPCSTR 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;
-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;
- union {
- UCHAR bVal;
- short iVal;
- USHORT uiVal;
- VARIANT_BOOL boolVal;
-#ifndef __cplusplus
- _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;
- 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;
-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,interface IMoniker);
-DECLARE_ENUMERATOR_(IEnumUnknown,IUnknown*);
-
-EXTERN_C const IID IID_ISequentialStream;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IStream;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IMarshal;
-#undef INTERFACE
-#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,DWORD,PVOID,DWORD,CLSID) PURE;
- STDMETHOD(GetMarshalSizeMax) (THIS_ REFIID,DWORD,PVOID,DWORD,PDWORD) PURE;
- STDMETHOD(MarshalInterface) (THIS_ REFIID,DWORD,DWORD) PURE;
- STDMETHOD(UnmarshalInterface) (THIS_ IStream*,void**) PURE;
- STDMETHOD(ReleaseMarshalData) (THIS_ IStream*) PURE;
- STDMETHOD(DisconnectObject) (THIS_ DWORD) PURE;
-};
-
-EXTERN_C const IID IID_IStdMarshalInfo;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IMalloc;
-#undef INTERFACE
-#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*) PURE;
- STDMETHOD_(void*,Free)(THIS_ void*) PURE;
- STDMETHOD_(ULONG,GetSize)(THIS_ void*) PURE;
- STDMETHOD_(int,DidAlloc)(THIS_ void*) PURE;
- STDMETHOD_(void,HeapMinimize)(THIS) PURE;
-};
-
-EXTERN_C const IID IID_IMallocSpy;
-#undef INTERFACE
-#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*) 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;
-};
-
-EXTERN_C const IID IID_IMessageFilter;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IPersist;
-#undef INTERFACE
-#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_ LPCLSID) PURE;
-};
-
-EXTERN_C const IID IID_IPersistStream;
-#undef INTERFACE
-#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_ CLSID*) PURE;
- STDMETHOD(IsDirty)(THIS) PURE;
- STDMETHOD(Load)(THIS_ IStream*) PURE;
- STDMETHOD(Save)(THIS_ IStream*,BOOL) PURE;
- STDMETHOD(GetSizeMax)(THIS_ PULARGE_INTEGER) PURE;
-};
-
-EXTERN_C const IID IID_IRunningObjectTable;
-#undef INTERFACE
-#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_ 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;
-};
-
-EXTERN_C const IID IID_IBindCtx;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IPersistStream;
-#undef INTERFACE
-#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_ CLSID*) 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;
-};
-
-EXTERN_C const IID IID_IPersistStorage;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IPersistFile;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IAdviseSink;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IAdviseSink2;
-#undef INTERFACE
-#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*);
-};
-
-EXTERN_C const IID IID_IDataObject;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IDataAdviseHolder;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IStorage;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IRootStorage;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IRpcChannelBuffer;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IRpcProxyBuffer;
-#undef INTERFACE
-#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;
-
-};
-
-EXTERN_C const IID IID_IRpcStubBuffer;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IPSFactoryBuffer;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_ILockBytes;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IExternalConnection;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IRunnableObject;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IROTData;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IChannelHook;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IPropertyStorage;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IPropertySetStorage;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IClientSecurity;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IServerSecurity;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IClassActivator;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IFillLockBytes;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IProgressNotify;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_ILayoutStorage;
-#undef INTERFACE
-#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;
-};
-
-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*);
-#ifdef 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) (This)->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(This,_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)
-#endif /* COBJMACROS */
-
-#endif
diff --git a/winsup/w32api/include/ocidl.h b/winsup/w32api/include/ocidl.h
deleted file mode 100644
index 2618d841d..000000000
--- a/winsup/w32api/include/ocidl.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _OCIDL_H
-#define _OCIDL_H
-
-#include <ole2.h>
-#include <olectl.h>
-
-#endif
diff --git a/winsup/w32api/include/ole.h b/winsup/w32api/include/ole.h
deleted file mode 100644
index f96745932..000000000
--- a/winsup/w32api/include/ole.h
+++ /dev/null
@@ -1,304 +0,0 @@
-#ifndef _OLE_H
-#define _OLE_H
-#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 0f5aa71fe..000000000
--- a/winsup/w32api/include/ole2.h
+++ /dev/null
@@ -1,106 +0,0 @@
-#ifndef _OLE2_H
-#define _OLE2_H
-#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 c7741dc19..000000000
--- a/winsup/w32api/include/ole2ver.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifndef _OLE2VER_H
-#define _OLE2VER_H
-#define rmm 23
-#define rup 639
-#endif
diff --git a/winsup/w32api/include/oleauto.h b/winsup/w32api/include/oleauto.h
deleted file mode 100644
index 7e3ba123a..000000000
--- a/winsup/w32api/include/oleauto.h
+++ /dev/null
@@ -1,253 +0,0 @@
-#ifndef _OLEAUTO_H
-#define _OLEAUTO_H
-#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 1
-#define VAR_TIMEVALUEONLY 0x0001
-#define VAR_DATEVALUEONLY 0x0002
-#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)->u.Y)
-#else
-#define V_UNION(X,Y) ((X)->Y)
-#endif
-#ifdef __cplusplus
-#define V_BOOL(X) V_UNION(X,boolVal)
-#else
-#define V_BOOL(X) V_UNION(X,bool)
-#endif
-#define V_VT(X) ((X)->vt)
-#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_I2REF(X) V_UNION(X,piVal)
-#define V_I4(X) V_UNION(X,lVal)
-#define V_I4REF(X) V_UNION(X,plVal)
-#define V_I8(X) V_UNION(X,hVal)
-#define V_I8REF(X) V_UNION(X,phVal)
-#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)
-#define V_DECIMAL(X) V_UNION(X,decVal)
-#define V_DECIMALREF(X) V_UNION(X,pdecVal)
-
-#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;
-
-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 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,UINT);
-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 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_(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 DeregisterTypeLib(REFGUID,WORD,WORD,LCID);
-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 VarAdd(LPVARIANT, LPVARIANT, LPVARIANT);
-WINOLEAUTAPI VarSub(LPVARIANT, LPVARIANT, LPVARIANT);
-WINOLEAUTAPI VarMul(LPVARIANT, LPVARIANT, LPVARIANT);
-WINOLEAUTAPI VarDiv(LPVARIANT, LPVARIANT, LPVARIANT);
-#pragma pack(pop)
-#endif
diff --git a/winsup/w32api/include/olectl.h b/winsup/w32api/include/olectl.h
deleted file mode 100644
index 97ea9f40d..000000000
--- a/winsup/w32api/include/olectl.h
+++ /dev/null
@@ -1,721 +0,0 @@
-#ifndef _OLECTL_H
-#define _OLECTL_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#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_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_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
-
-#pragma pack(push,8)
-#ifndef OLE2ANSI
-typedef TEXTMETRICW TEXTMETRICOLE;
-#else
-typedef TEXTMETRIC TEXTMETRICOLE;
-#endif
-typedef TEXTMETRICOLE *LPTEXTMETRICOLE;
-typedef interface IOleControl *LPOLECONTROL;
-typedef interface IOleControlSite *LPOLECONTROLSITE;
-typedef interface ISimpleFrameSite *LPSIMPLEFRAMESITE;
-typedef interface IErrorLog *LPERRORLOG;
-typedef interface IPropertyBag *LPPROPERTYBAG;
-typedef interface IPersistPropertyBag *LPPERSISTPROPERTYBAG;
-typedef interface IPersistStreamInit *LPPERSISTSTREAMINIT;
-typedef interface IPersistMemory *LPPERSISTMEMORY;
-typedef interface IPropertyNotifySink* LPPROPERTYNOTIFYSINK;
-typedef interface IProvideClassInfo *LPPROVIDECLASSINFO;
-typedef interface IProvideClassInfo2 *LPPROVIDECLASSINFO2;
-typedef interface IConnectionPointContainer *LPCONNECTIONPOINTCONTAINER;
-typedef interface IEnumConnectionPoints *LPENUMCONNECTIONPOINTS;
-typedef interface IConnectionPoint *LPCONNECTIONPOINT;
-typedef interface IEnumConnections *LPENUMCONNECTIONS;
-typedef interface IClassFactory2 *LPCLASSFACTORY2;
-typedef interface ISpecifyPropertyPages *LPSPECIFYPROPERTYPAGES;
-typedef interface IPerPropertyBrowsing *LPPERPROPERTYBROWSING;
-typedef interface IPropertyPageSite *LPPROPERTYPAGESITE;
-typedef interface IPropertyPage *LPPROPERTYPAGE;
-typedef interface IPropertyPage2 *LPPROPERTYPAGE2;
-typedef interface IFont *LPFONT;
-typedef interface IFontDisp *LPFONTDISP;
-typedef interface IPicture *LPPICTURE;
-typedef interface IPictureDisp *LPPICTUREDISP;
-typedef DWORD OLE_COLOR;
-typedef long OLE_XPOS_PIXELS;
-typedef long OLE_YPOS_PIXELS;
-typedef long OLE_XSIZE_PIXELS;
-typedef long OLE_YSIZE_PIXELS;
-typedef long OLE_XPOS_HIMETRIC;
-typedef long OLE_YPOS_HIMETRIC;
-typedef long OLE_XSIZE_HIMETRIC;
-typedef long OLE_YSIZE_HIMETRIC;
-typedef float OLE_XPOS_CONTAINER;
-typedef float OLE_YPOS_CONTAINER;
-typedef float OLE_XSIZE_CONTAINER;
-typedef float OLE_YSIZE_CONTAINER;
-typedef VARIANT_BOOL OLE_OPTEXCLUSIVE;
-typedef VARIANT_BOOL OLE_CANCELBOOL;
-typedef VARIANT_BOOL OLE_ENABLEDEFAULTBOOL;
-typedef UINT OLE_HANDLE;
-typedef enum { triUnchecked,triChecked1,triGray } OLE_TRISTATE;
-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 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 tagPROPPAGEINFO {
- size_t cb;
- LPOLESTR pszTitle;
- SIZE size;
- LPOLESTR pszDocString;
- LPOLESTR pszHelpFile;
- DWORD dwHelpContext;
-} PROPPAGEINFO,*LPPROPPAGEINFO;
-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;
- 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;
-
-EXTERN_C const IID IID_IOleControl;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IOleControlSite;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_ISimpleFrameSite;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IErrorLog;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IPropertyBag;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IPersistPropertyBag;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IPersistStreamInit;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IPersistMemory;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IPropertyNotifySink;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IProvideClassInfo;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IProvideClassInfo2;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IConnectionPointContainer;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IEnumConnectionPoints;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IConnectionPoint;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IEnumConnections;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IClassFactory2;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_ISpecifyPropertyPages;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IPerPropertyBrowsing;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IPropertyPageSite;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IPropertyPage;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IPropertyPage2;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IFont;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IFontDisp;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IPicture;
-#undef INTERFACE
-#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;
-};
-EXTERN_C const IID IID_IPictureDisp;
-#undef INTERFACE
-#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;
-};
-#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 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 2aefe9718..000000000
--- a/winsup/w32api/include/olectlid.h
+++ /dev/null
@@ -1,109 +0,0 @@
-#ifndef _OLECTLID_H
-#define _OLECTLID_H
-#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_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 24cfd4bc2..000000000
--- a/winsup/w32api/include/oledlg.h
+++ /dev/null
@@ -1,931 +0,0 @@
-#ifndef _OLEDLG_H
-#define _OLEDLG_H
-#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;
-#undef INTERFACE
-#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;
-};
-typedef IOleUILinkContainerW *LPOLEUILINKCONTAINERW;
-#undef INTERFACE
-#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;
-};
-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;
-#undef INTERFACE
-#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;
-};
-typedef IOleUIObjInfoW *LPOLEUIOBJINFOW;
-#undef INTERFACE
-#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;
-};
-typedef IOleUIObjInfoA *LPOLEUIOBJINFOA;
-#undef INTERFACE
-#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;
-};
-typedef IOleUILinkInfoW *LPOLEUILINKINFOW;
-#undef INTERFACE
-#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;
-};
-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 e6b951f1d..000000000
--- a/winsup/w32api/include/oleidl.h
+++ /dev/null
@@ -1,320 +0,0 @@
-#ifndef _OLEIDL_H
-#define _OLEIDL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <objfwd.h>
-typedef interface IParseDisplayname *LPPARSEDISPLAYNAME;
-typedef interface IOleContainer *LPOLECONTAINER;
-typedef interface IOleClientSite *LPOLECLIENTSITE;
-typedef interface IOleObject *LPOLEOBJECT;
-typedef interface IDropTarget *LPDROPTARGET;
-typedef interface IDropSource *LPDROPSOURCE;
-typedef interface IEnumOleDocumentViews *LPENUMOLEDOCUMENTVIEWS;
-typedef interface IEnumOleUndoUnits *LPENUMOLEUNDOUNITS;
-typedef interface IEnumOLEVERB *LPENUMOLEVERB;
-typedef interface IOleWindow *LPOLEWINDOW;
-typedef interface IOleInPlaceUIWindow *LPOLEINPLACEUIWINDOW;
-typedef interface IOleInPlaceActiveObject *LPOLEINPLACEACTIVEOBJECT;
-typedef interface IOleInPlaceFrame *LPOLEINPLACEFRAME;
-typedef interface IOleAdviseHolder *LPOLEADVISEHOLDER;
-typedef interface IViewObject *LPVIEWOBJECT;
-typedef interface IViewObject2 *LPVIEWOBJECT2;
-
-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 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_(IEnumOleDocumentViews,IOleDocumentView);*/
-DECLARE_ENUMERATOR(OLEVERB);
-typedef IEnumOLEVERB IEnumOleVerb;
-
-EXTERN_C const IID IID_IParseDisplayName;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IOleContainer;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IOleClientSite;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IOleObject;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IOleWindow;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IOleInPlaceUIWindow;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IOleInPlaceActiveObject;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IOleInPlaceFrame;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IOleAdviseHolder;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IDropSource;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IDropTarget;
-#undef INTERFACE
-#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;
-};
-
-typedef BOOL(CALLBACK *__IView_pfncont)(DWORD);
-EXTERN_C const IID IID_IViewObject;
-#undef INTERFACE
-#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;
-};
-
-EXTERN_C const IID IID_IViewObject2;
-#undef INTERFACE
-#define INTERFACE IViewObject2
-DECLARE_INTERFACE_(IViewObject2,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;
- STDMETHOD(GetExtent)(THIS_ DWORD,DWORD,DVTARGETDEVICE*,LPSIZEL) PURE;
-};
-
-EXTERN_C const IID IID_ISupportErrorInfo;
-#undef INTERFACE
-#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;
-
-};
-
-EXTERN_C const IID IID_IErrorInfo;
-#undef INTERFACE
-#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_ REFIID) PURE;
- STDMETHOD(GetSource)(THIS_ BSTR*) PURE;
- STDMETHOD(GetDescription)(THIS_ BSTR*) PURE;
- STDMETHOD(GetHelpContext)(THIS_ DWORD*) PURE;
-
- };
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-
diff --git a/winsup/w32api/include/pbt.h b/winsup/w32api/include/pbt.h
deleted file mode 100644
index fba11e3d0..000000000
--- a/winsup/w32api/include/pbt.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef _PBT_H
-#define _PBT_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 8
-#define PBT_APMRESUMESTANDBY 8
-#define PBTF_APMRESUMEFROMFAILURE 1
-#define PBT_APMBATTERYLOW 9
-#define PBT_APMPOWERSTATUSCHANGE 10
-#define PBT_APMOEMEVENT 11
-#endif
diff --git a/winsup/w32api/include/poppack.h b/winsup/w32api/include/poppack.h
deleted file mode 100644
index bb04d4524..000000000
--- 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/prsht.h b/winsup/w32api/include/prsht.h
deleted file mode 100644
index 8b2ab2de2..000000000
--- a/winsup/w32api/include/prsht.h
+++ /dev/null
@@ -1,244 +0,0 @@
-#ifndef _PRSHT_H
-#define _PRSHT_H
-#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 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_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 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;
- union {
- LPCSTR pszTemplate;
- LPCDLGTEMPLATE pResource;
- } DUMMYUNIONNAME;
- union {
- HICON hIcon;
- LPCSTR pszIcon;
- } DUMMYUNIONNAME2;
- LPCSTR pszTitle;
- DLGPROC pfnDlgProc;
- LPARAM lParam;
- UINT(CALLBACK *pfnCallback)(HWND,UINT,struct _PROPSHEETPAGEA*);
- UINT *pcRefParent;
-} PROPSHEETPAGEA,*LPPROPSHEETPAGEA;
-typedef const PROPSHEETPAGEA *LPCPROPSHEETPAGEA;
-typedef struct _PROPSHEETPAGEW {
- DWORD dwSize;
- DWORD dwFlags;
- HINSTANCE hInstance;
- union {
- LPCWSTR pszTemplate;
- LPCDLGTEMPLATE pResource;
- } DUMMYUNIONNAME;
- union {
- HICON hIcon;
- LPCWSTR pszIcon;
- } DUMMYUNIONNAME2;
- LPCWSTR pszTitle;
- DLGPROC pfnDlgProc;
- LPARAM lParam;
- UINT(CALLBACK *pfnCallback)(HWND,UINT,struct _PROPSHEETPAGEW*);
- UINT *pcRefParent;
-} PROPSHEETPAGEW,*LPPROPSHEETPAGEW;
-typedef const PROPSHEETPAGEA *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;
- union {
- HICON hIcon;
- LPCSTR pszIcon;
- }DUMMYUNIONNAME;
- LPCSTR pszCaption;
- UINT nPages;
- union {
- UINT nStartPage;
- LPCSTR pStartPage;
- }DUMMYUNIONNAME2;
- union {
- LPCPROPSHEETPAGEA ppsp;
- HPROPSHEETPAGE *phpage;
- }DUMMYUNIONNAME3;
- PFNPROPSHEETCALLBACK pfnCallback;
-} PROPSHEETHEADERA,*LPPROPSHEETHEADERA;
-typedef const PROPSHEETHEADERA *LPCPROPSHEETHEADERA;
-typedef struct _PROPSHEETHEADERW {
- DWORD dwSize;
- DWORD dwFlags;
- HWND hwndParent;
- HINSTANCE hInstance;
- union {
- HICON hIcon;
- LPCWSTR pszIcon;
- }DUMMYUNIONNAME;
- LPCWSTR pszCaption;
- UINT nPages;
- union {
- UINT nStartPage;
- LPCWSTR pStartPage;
- }DUMMYUNIONNAME2;
- union {
- LPCPROPSHEETPAGEW ppsp;
- HPROPSHEETPAGE *phpage;
- }DUMMYUNIONNAME3;
- PFNPROPSHEETCALLBACK pfnCallback;
-} 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 4c4827382..000000000
--- a/winsup/w32api/include/psapi.h
+++ /dev/null
@@ -1,92 +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
-
-#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);
-
-#endif /* not RC_INVOKED */
-
-#ifdef UNICODE
-#define GetModuleBaseName GetModuleBaseNameW
-#define GetModuleFileNameEx GetModuleFileNameExW
-#define GetMappedFilenameEx GetMappedFilenameExW
-#define GetDeviceDriverBaseName GetDeviceDriverBaseNameW
-#define GetDeviceDriverFileName GetDeviceDriverFileNameW
-#else
-#define GetModuleBaseName GetModuleBaseNameA
-#define GetModuleFileNameEx GetModuleFileNameExA
-#define GetMappedFilenameEx GetMappedFilenameExA
-#define GetDeviceDriverBaseName GetDeviceDriverBaseNameA
-#define GetDeviceDriverFileName GetDeviceDriverFileNameA
-#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 3cbcf238b..000000000
--- 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 4d88e004e..000000000
--- 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 c1c3cf959..000000000
--- 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 f0c4539b9..000000000
--- 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/rapi.h b/winsup/w32api/include/rapi.h
deleted file mode 100644
index 581fc8e6a..000000000
--- a/winsup/w32api/include/rapi.h
+++ /dev/null
@@ -1,51 +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
-
-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 ();
-STDAPI CeRapiInitEx (RAPIINIT*);
-STDAPI_(BOOL) CeCreateProcess (LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES,
- BOOL, DWORD, LPVOID, LPWSTR, LPSTARTUPINFO, LPPROCESS_INFORMATION);
-STDAPI CeRapiUninit ();
-
-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 d1225e72a..000000000
--- a/winsup/w32api/include/ras.h
+++ /dev/null
@@ -1,949 +0,0 @@
-#ifndef _RAS_H
-#define _RAS_H
-
-#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 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
-#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];
- WCHAR szDeviceType[RAS_MaxDeviceType + 1];
- WCHAR szDeviceName[RAS_MaxDeviceName + 1];
-#if (WINVER >= 0x401)
- WCHAR szPhonebook[MAX_PATH];
- DWORD dwSubEntry;
-#endif
-#if (WINVER >= 0x500)
- GUID guidEntry;
-#endif
-} RASCONNW, *LPRASCONNW;
-
-typedef struct tagRASCONNA {
- DWORD dwSize;
- HRASCONN hrasconn;
- CHAR szEntryName[RAS_MaxEntryName + 1];
- CHAR szDeviceType[RAS_MaxDeviceType + 1];
- CHAR szDeviceName[RAS_MaxDeviceName + 1];
-#if (WINVER >= 0x401)
- CHAR szPhonebook[MAX_PATH];
- DWORD dwSubEntry;
-#endif
-#if (WINVER >= 0x500)
- GUID guidEntry;
-#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
-} 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
-} 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/raserror.h b/winsup/w32api/include/raserror.h
deleted file mode 100644
index a5f7fe8b4..000000000
--- a/winsup/w32api/include/raserror.h
+++ /dev/null
@@ -1,206 +0,0 @@
-#ifndef _RASERROR_H
-#define _RASERROR_H
-#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 */ \ No newline at end of file
diff --git a/winsup/w32api/include/rassapi.h b/winsup/w32api/include/rassapi.h
deleted file mode 100644
index c5e8bb37d..000000000
--- a/winsup/w32api/include/rassapi.h
+++ /dev/null
@@ -1,178 +0,0 @@
-#ifndef _RASSAPI_H
-#define _RASSAPI_H
-#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/regstr.h b/winsup/w32api/include/regstr.h
deleted file mode 100644
index bec0a97a1..000000000
--- a/winsup/w32api/include/regstr.h
+++ /dev/null
@@ -1,763 +0,0 @@
-#ifndef _REGSTR_H
-#define _REGSTR_H
-#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")
-#define REGSTR_PATH_EXPLORER TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer")
-#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 5262b5089..000000000
--- a/winsup/w32api/include/richedit.h
+++ /dev/null
@@ -1,349 +0,0 @@
-#ifndef _RICHEDIT_H
-#define _RICHEDIT_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-#pragma pack(push,4)
-
-#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_SIZE 0x80000000
-#define CFM_COLOR 0x40000000
-#define CFM_FACE 0x20000000
-#define CFM_OFFSET 0x10000000
-#define CFM_CHARSET 0x08000000
-#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 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 PFN_BULLET 1
-#define PFA_LEFT 1
-#define PFA_RIGHT 2
-#define PFA_CENTER 3
-#define SF_TEXT 1
-#define SF_RTF 2
-#define SF_RTFNOOBJS 3
-#define SF_TEXTIZED 4
-#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_SAVESEL 32768
-#define ES_SELFIME 262144
-#define ES_SUNKEN 16384
-#define ES_VERTICAL 4194304
-#define ES_SELECTIONBAR 16777216
-#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)
-#define EN_CORRECTTEXT 1797
-#define EN_DROPFILES 1795
-#define EN_IMECHANGE 1799
-#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_DROPFILES 1048576
-#define ENM_KEYEVENTS 65536
-#define ENM_MOUSEEVENTS 131072
-#define ENM_PROTECTED 2097152
-#define ENM_REQUESTRESIZE 262144
-#define ENM_SCROLL 4
-#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 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 {
- 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 _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 LONG (*EDITWORDBREAKPROCEX)(char*,LONG,BYTE,INT);
-#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 90f390bde..000000000
--- a/winsup/w32api/include/richole.h
+++ /dev/null
@@ -1,103 +0,0 @@
-#ifndef _RICHOLE_H
-#define _RICHOLE_H
-#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;
-
-#undef INTERFACE
-#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;
-};
-typedef IRichEditOle *LPRICHEDITOLE;
-
-#undef INTERFACE
-#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;
-};
-typedef IRichEditOleCallback FAR * LPRICHEDITOLECALLBACK;
-#endif
-#pragma pack(pop)
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/rpc.h b/winsup/w32api/include/rpc.h
deleted file mode 100644
index eeb602f9f..000000000
--- a/winsup/w32api/include/rpc.h
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifndef _RPC_H
-#define _RPC_H
-#ifndef RPC_NO_WINDOWS_H
-#include <windows.h>
-#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define __RPC_WIN32__
-#ifndef _WIN95
-#define __RPC_NT__
-#define RPC_UNICODE_SUPPORTED
-#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();
-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 e07fa3a9d..000000000
--- a/winsup/w32api/include/rpcdce.h
+++ /dev/null
@@ -1,383 +0,0 @@
-#ifndef _RPCDCE_H
-#define _RPCDCE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <basetyps.h>
-
-#define IN
-#define OUT
-#ifndef OPTIONAL
-#define OPTIONAL
-#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
-
-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 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*);
-void RPC_ENTRY RpcRaiseException(RPC_STATUS);
-RPC_STATUS RPC_ENTRY RpcTestCancel();
-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);
-#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 ec0f62e35..000000000
--- a/winsup/w32api/include/rpcdce2.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef _RPCDCE2_H
-#define _RPCDCE2_H
-#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 8479360a9..000000000
--- a/winsup/w32api/include/rpcdcep.h
+++ /dev/null
@@ -1,124 +0,0 @@
-#ifndef _RPCDCEP_H
-#define _RPCDCEP_H
-#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 long(__stdcall *RPC_BLOCKING_FUNCTION)(void*,void*);
-
-long __stdcall I_RpcGetBuffer(RPC_MESSAGE*);
-long __stdcall I_RpcSendReceive(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);
-__stdcall 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_FUNCTION);
-long __stdcall I_RpcAsyncSendReceive(RPC_MESSAGE*,void*);
-long __stdcall I_RpcGetThreadWindowHandle(void**);
-long __stdcall I_RpcServerThreadPauseListening();
-long __stdcall I_RpcServerThreadContinueListening();
-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 6ae92dfdd..000000000
--- a/winsup/w32api/include/rpcndr.h
+++ /dev/null
@@ -1,469 +0,0 @@
-#ifndef __RPCNDR_H__
-#define __RPCNDR_H__
-#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;
-#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 Reserved[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 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;
-} 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)();
-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,...);
-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*);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/rpcnsi.h b/winsup/w32api/include/rpcnsi.h
deleted file mode 100644
index 69547c8e4..000000000
--- a/winsup/w32api/include/rpcnsi.h
+++ /dev/null
@@ -1,118 +0,0 @@
-#ifndef _RPCNSI_H
-#define _RPCNSI_H
-#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 4f05d297d..000000000
--- a/winsup/w32api/include/rpcnsip.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef _RPCNSIP_H
-#define _RPCNSIP_H
-#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();
-RPC_STATUS RPC_ENTRY I_NsClientBindSearch();
-void RPC_ENTRY I_NsClientBindDone();
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/rpcnterr.h b/winsup/w32api/include/rpcnterr.h
deleted file mode 100644
index 6b075ae07..000000000
--- a/winsup/w32api/include/rpcnterr.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _RPCNTERR_H
-#define _RPCNTERR_H
-#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
-#endif
diff --git a/winsup/w32api/include/rpcproxy.h b/winsup/w32api/include/rpcproxy.h
deleted file mode 100644
index fa968fc3a..000000000
--- a/winsup/w32api/include/rpcproxy.h
+++ /dev/null
@@ -1,185 +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
-#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() \
-{\
-return NdrDllRegisterProxy(hProxyDll, pProxyFileList, pClsID); \
-}\
-HRESULT STDAPICALLTYPE DllUnregisterServer()\
-{\
-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() \
-{ 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;
- void *Vtbl[0];
-} 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;
-} 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
-
diff --git a/winsup/w32api/include/scrnsave.h b/winsup/w32api/include/scrnsave.h
deleted file mode 100644
index 30889d0ea..000000000
--- a/winsup/w32api/include/scrnsave.h
+++ /dev/null
@@ -1,78 +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
-
-#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/shellapi.h b/winsup/w32api/include/shellapi.h
deleted file mode 100644
index 4e1c9a7dc..000000000
--- a/winsup/w32api/include/shellapi.h
+++ /dev/null
@@ -1,251 +0,0 @@
-#ifndef _SHELLAPI_H
-#define _SHELLAPI_H
-#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 SEE_MASK_CLASSNAME 1
-#define SEE_MASK_CLASSKEY 3
-#define SEE_MASK_IDLIST 4
-#define SEE_MASK_INVOKEIDLIST 12
-#define SEE_MASK_ICON 16
-#define SEE_MASK_HOTKEY 32
-#define SEE_MASK_NOCLOSEPROCESS 64
-#define SEE_MASK_CONNECTNETDRV 128
-#define SEE_MASK_FLAG_DDEWAIT 256
-#define SEE_MASK_DOENVSUBST 512
-#define SEE_MASK_FLAG_NO_UI 1024
-#define SEE_MASK_UNICODE 65536
-#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
-#define NIF_MESSAGE 1
-#define NIF_ICON 2
-#define NIF_TIP 4
-#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 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_LARGEICON 0
-#define SHGFI_SMALLICON 1
-#define SHGFI_OPENICON 2
-#define SHGFI_SHELLICONSIZE 4
-#define SHGFI_PIDL 8
-#define SHGFI_USEFILEATTRIBUTES 16
-
-typedef WORD FILEOP_FLAGS;
-typedef WORD PRINTEROP_FLAGS;
-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;
- CHAR szTip[64];
-} NOTIFYICONDATAA,*PNOTIFYICONDATAA;
-typedef struct _NOTIFYICONDATAW {
- DWORD cbSize;
- HWND hWnd;
- UINT uID;
- UINT uFlags;
- UINT uCallbackMessage;
- HICON hIcon;
- WCHAR szTip[64];
-} 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;
-
-LPWSTR *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 ExtractAssociatedIconA(HINSTANCE,LPCSTR,PWORD);
-HICON WINAPI ExtractAssociatedIconW(HINSTANCE,LPCWSTR,PWORD);
-HICON WINAPI ExtractIconA(HINSTANCE,LPCSTR,UINT);
-HICON WINAPI ExtractIconW(HINSTANCE,LPCWSTR,UINT);
-HICON WINAPI ExtractIconExA(LPCSTR,int,HICON*,HICON*,UINT);
-HICON 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);
-
-#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
-#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
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/shlguid.h b/winsup/w32api/include/shlguid.h
deleted file mode 100644
index d658e6ebc..000000000
--- a/winsup/w32api/include/shlguid.h
+++ /dev/null
@@ -1,73 +0,0 @@
-#ifndef _SHLGUID_H
-#define _SHLGUID_H
-#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 IID_INewShortcutHookA;
-extern const GUID IID_IShellBrowser;
-extern const GUID IID_IShellView;
-extern const GUID IID_IContextMenu;
-extern const GUID IID_IShellIcon;
-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_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;
-#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 0bac9e609..000000000
--- a/winsup/w32api/include/shlobj.h
+++ /dev/null
@@ -1,708 +0,0 @@
-#ifndef _SHLOBJ_H
-#define _SHLOBJ_H
-
-#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_BROWSEFORCOMPUTER 0x1000
-#define BIF_BROWSEFORPRINTER 0x2000
-#define BFFM_INITIALIZED 1
-#define BFFM_SELCHANGED 2
-#define BFFM_SETSTATUSTEXT (WM_USER + 100)
-#define BFFM_ENABLEOK (WM_USER + 101)
-#define BFFM_SETSELECTION (WM_USER + 102)
-#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 CMDSTR_NEWFOLDER "NewFolder"
-#define CMDSTR_VIEWLIST "ViewList"
-#define CMDSTR_VIEWDETAILS "ViewDetails"
-#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_PATH 1
-#define SHCNF_PRINTER 2
-#define SHCNF_DWORD 3
-#define SHCNF_TYPE 0xFF
-#define SHCNF_FLUSH 0x1000
-#define SHCNF_FLUSHNOWAIT 0x2000
-#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_LINK 0x00010000L
-#define SFGAO_SHARE 0x00020000L
-#define SFGAO_READONLY 0x00040000L
-#define SFGAO_GHOSTED 0x00080000L
-#define SFGAO_DISPLAYATTRMASK 0x000F0000L
-#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 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 "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer"
-#endif
-#define REGSTR_PATH_SPECIAL_FOLDERS REGSTR_PATH_EXPLORER "\\Shell Folders"
-#define CSIDL_DESKTOP 0
-#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_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_COMMON_ALTSTARTUP 30
-#define CSIDL_COMMON_FAVORITES 31
-#define CFSTR_SHELLIDLIST "Shell IDList Array"
-#define CFSTR_SHELLIDLISTOFFSET "Shell Object Offsets"
-#define CFSTR_NETRESOURCES "Net Resource"
-#define CFSTR_FILEDESCRIPTOR "FileGroupDescriptor"
-#define CFSTR_FILECONTENTS "FileContents"
-#define CFSTR_FILENAME "FileName"
-#define CFSTR_PRINTERGROUP "PrinterFriendlyName"
-#define CFSTR_FILENAMEMAP "FileNameMap"
-#define CMF_NORMAL 0
-#define CMF_DEFAULTONLY 1
-#define CMF_VERBSONLY 2
-#define CMF_EXPLORE 4
-#define CMF_RESERVED 0xffff0000
-#define GCS_VERB 0
-#define GCS_HELPTEXT 1
-#define GCS_VALIDATE 2
-#define CMDSTR_NEWFOLDER "NewFolder"
-#define CMDSTR_VIEWLIST "ViewList"
-#define CMDSTR_VIEWDETAILS "ViewDetails"
-#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 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 _browseinfo {
- HWND hwndOwner;
- LPCITEMIDLIST pidlRoot;
- LPSTR pszDisplayName;
- LPCSTR lpszTitle;
- UINT ulFlags;
- BFFCALLBACK lpfn;
- LPARAM lParam;
- int iImage;
-} BROWSEINFO,*PBROWSEINFO,*LPBROWSEINFO;
-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_FORPARSING=0x8000
-} SHGNO;
-typedef enum tagSHCONTF {
- SHCONTF_FOLDERS=32,
- SHCONTF_NONFOLDERS=64,
- SHCONTF_INCLUDEHIDDEN=128
-} SHCONTF;
-typedef struct _STRRET {
- UINT uType;
- 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 _FILEDESCRIPTOR {
- DWORD dwFlags;
- CLSID clsid;
- SIZEL sizel;
- POINTL pointl;
- DWORD dwFileAttributes;
- FILETIME ftCreationTime;
- FILETIME ftLastAccessTime;
- FILETIME ftLastWriteTime;
- DWORD nFileSizeHigh;
- DWORD nFileSizeLow;
- CHAR cFileName[MAX_PATH];
-} FILEDESCRIPTOR,*LPFILEDESCRIPTOR;
-typedef struct _FILEGROUPDESCRIPTOR {
- UINT cItems;
- FILEDESCRIPTOR fgd[1];
-} FILEGROUPDESCRIPTOR,*LPFILEGROUPDESCRIPTOR;
-typedef enum {
- SLR_NO_UI=1,
- SLR_ANY_MATCH=2,
- SLR_UPDATE=4
-} SLR_FLAGS;
-typedef enum {
- SLGP_SHORTPATH=1,
- SLGP_UNCPRIORITY
-} 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;
-
-DECLARE_ENUMERATOR_(IEnumIDList,LPITEMIDLIST);
-typedef IEnumIDList *LPENUMIDLIST;
-
-#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;
-};
-typedef IContextMenu *LPCONTEXTMENU;
-
-#undef INTERFACE
-#define INTERFACE IContextMenu2
-DECLARE_INTERFACE_(IContextMenu2,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(HandleMenuMsg)(THIS_ UINT,WPARAM,LPARAM) PURE;
- STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO) PURE;
- STDMETHOD(GetCommandString)(THIS_ UINT,UINT,PUINT,LPSTR,UINT) PURE;
-};
-typedef IContextMenu2 *LPCONTEXTMENU2;
-
-#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;
-};
-typedef IShellExtInit *LPSHELLEXTINIT;
-
-#undef INTERFACE
-#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;
-};
-typedef IShellPropSheetExt *LPSHELLPROPSHEETEXT;
-
-#undef INTERFACE
-#define INTERFACE IExtractIcon
-DECLARE_INTERFACE_(IExtractIcon, IUnknown) // exic
-{
- 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;
-};
-typedef IExtractIcon *LPEXTRACTICON;
-
-#undef INTERFACE
-#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
-#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_ LPSTR,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
-#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;
-};
-typedef IShellFolder *LPSHELLFOLDER;
-
-#undef INTERFACE
-#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;
-};
-typedef ICopyHook *LPCOPYHOOK;
-
-#undef INTERFACE
-#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;
-};
-typedef IFileViewerSite *LPFILEVIEWERSITE;
-
-#undef INTERFACE
-#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;
-};
-typedef IFileViewer *LPFILEVIEWER;
-
-#undef INTERFACE
-#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) PURE;
- STDMETHOD(OnStateChange)(THIS_ ULONG) PURE;
- STDMETHOD(IncludeObject)(THIS_ LPCITEMIDLIST) PURE;
-};
-typedef ICommDlgBrowser *LPCOMMDLGBROWSER;
-
-#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;
-};
-typedef IPersistFolder *LPPERSISTFOLDER;
-
-typedef interface IShellBrowser *LPSHELLBROWSER;
-typedef interface IShellView *LPSHELLVIEW;
-
-#undef INTERFACE
-#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
-#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;
-};
-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;
-#undef INTERFACE
-#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;
-};
-typedef IShellIcon *LPSHELLICON;
-
-void WINAPI SHAddToRecentDocs(UINT,PCVOID);
-LPITEMIDLIST WINAPI SHBrowseForFolder(PBROWSEINFO);
-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(LPUNKNOWN);
-HRESULT WINAPI SHGetMalloc(LPMALLOC*);
-BOOL WINAPI SHGetPathFromIDList(LPCITEMIDLIST,LPSTR);
-HRESULT WINAPI SHGetSpecialFolderLocation(HWND,int,LPITEMIDLIST*);
-HRESULT WINAPI SHLoadInProc(REFCLSID);
-/* FIXME/TODO: Only valid for _WIN32_IE >= 400? */
-BOOL WINAPI SHGetSpecialFolderPathA(HWND,LPSTR,int,BOOL);
-BOOL WINAPI SHGetSpecialFolderPathW(HWND,LPSTR,int,BOOL);
-
-#ifdef UNICODE
-typedef IShellExecuteHookW IShellExecuteHook;
-typedef IShellLinkW IShellLink;
-#define SHGetDataFromIDList SHGetDataFromIDListW
-/* FIXME/TODO: Only valid for _WIN32_IE >= 400? */
-#define SHGetSpecialFolderPath SHGetSpecialFolderPathW
-#else
-typedef IShellExecuteHookA IShellExecuteHook;
-typedef IShellLinkA IShellLink;
-#define SHGetDataFromIDList SHGetDataFromIDListA
-/* FIXME/TODO: Only valid for _WIN32_IE >= 400? */
-#define SHGetSpecialFolderPath SHGetSpecialFolderPathA
-#endif
-
-#pragma pack(pop)
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _SHLOBJ_H */
diff --git a/winsup/w32api/include/sql.h b/winsup/w32api/include/sql.h
deleted file mode 100644
index cbad41d3a..000000000
--- a/winsup/w32api/include/sql.h
+++ /dev/null
@@ -1,705 +0,0 @@
-#ifndef _SQL_H
-#define _SQL_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifndef ODBCVER
-#define ODBCVER 0x0250
-#endif
-#include "sqltypes.h"
-/* FIXME! */
-#define SQL_SPEC_MAJOR (ODBCVER/0x100)
-#define SQL_SPEC_MINOR (ODBCVER&0xFF00)
-#define SQL_SPEC_STRING "02.50"
-#define SQL_ACCESSIBLE_PROCEDURES 20
-#define SQL_ACCESSIBLE_TABLES 19
-#define SQL_ACCESS_MODE 101
-#define SQL_ACTIVE_CONNECTIONS 0
-#define SQL_ACTIVE_STATEMENTS 1
-#define SQL_ALL_EXCEPT_LIKE 2
-#define SQL_ALL_TYPES 0
-#define SQL_ALTER_TABLE 86
-#define SQL_API_ALL_FUNCTIONS 0
-#define SQL_API_LOADBYORDINAL 199
-#define SQL_API_SQLALLOCCONNECT 1
-#define SQL_API_SQLALLOCENV 2
-#define SQL_API_SQLALLOCSTMT 3
-#define SQL_API_SQLBINDCOL 4
-#define SQL_API_SQLBINDPARAMETER 72
-#define SQL_API_SQLBROWSECONNECT 55
-#define SQL_API_SQLCANCEL 5
-#define SQL_API_SQLCOLATTRIBUTES 6
-#define SQL_API_SQLCOLUMNPRIVILEGES 56
-#define SQL_API_SQLCOLUMNS 40
-#define SQL_API_SQLCONNECT 7
-#define SQL_API_SQLDATASOURCES 57
-#define SQL_API_SQLDESCRIBECOL 8
-#define SQL_API_SQLDESCRIBEPARAM 58
-#define SQL_API_SQLDISCONNECT 9
-#define SQL_API_SQLDRIVERCONNECT 41
-#define SQL_API_SQLDRIVERS 71
-#define SQL_API_SQLERROR 10
-#define SQL_API_SQLEXECDIRECT 11
-#define SQL_API_SQLEXECUTE 12
-#define SQL_API_SQLEXTENDEDFETCH 59
-#define SQL_API_SQLFETCH 13
-#define SQL_API_SQLFOREIGNKEYS 60
-#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_SQLMORERESULTS 61
-#define SQL_API_SQLNATIVESQL 62
-#define SQL_API_SQLNUMPARAMS 63
-#define SQL_API_SQLNUMRESULTCOLS 18
-#define SQL_API_SQLPARAMDATA 48
-#define SQL_API_SQLPARAMOPTIONS 64
-#define SQL_API_SQLPREPARE 19
-#define SQL_API_SQLPRIMARYKEYS 65
-#define SQL_API_SQLPROCEDURECOLUMNS 66
-#define SQL_API_SQLPROCEDURES 67
-#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_SQLSETPOS 68
-#define SQL_API_SQLSETSCROLLOPTIONS 69
-#define SQL_API_SQLSETSTMTOPTION 51
-#define SQL_API_SQLSPECIALCOLUMNS 52
-#define SQL_API_SQLSTATISTICS 53
-#define SQL_API_SQLTABLEPRIVILEGES 70
-#define SQL_API_SQLTABLES 54
-#define SQL_API_SQLTRANSACT 23
-#define SQL_ASYNC_ENABLE_OFF 0
-#define SQL_ASYNC_ENABLE_ON 1
-#define SQL_ASYNC_ENABLE 4
-#define SQL_ASYNC_ENABLE_DEFAULT SQL_ASYNC_ENABLE_OFF
-#define SQL_ATTR_READONLY 0
-#define SQL_ATTR_READWRITE_UNKNOWN 2
-#define SQL_ATTR_WRITE 1
-#define SQL_AT_ADD_COLUMN 1
-#define SQL_AT_DROP_COLUMN 2
-#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_CB_CLOSE 1
-#define SQL_CB_DELETE 0
-#define SQL_CB_NON_NULL 1
-#define SQL_CB_NULL 0
-#define SQL_CB_PRESERVE 2
-#define SQL_CC_CLOSE SQL_CB_CLOSE
-#define SQL_CC_DELETE SQL_CB_DELETE
-#define SQL_CC_PRESERVE SQL_CB_PRESERVE
-#define SQL_CHAR 1
-#define SQL_CLOSE 0
-#define SQL_CN_ANY 2
-#define SQL_CN_DIFFERENT 1
-#define SQL_CN_NONE 0
-#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_DRIVER_START 1000
-#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_COLATT_OPT_MAX SQL_COLUMN_LABEL
-#define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT
-#define SQL_COMMIT 0
-#define SQL_CONCAT_NULL_BEHAVIOR 22
-#define SQL_CONCURRENCY 7
-#define SQL_CONCUR_READ_ONLY 1
-#define SQL_CONCUR_ROWVER 3
-#define SQL_CONCUR_DEFAULT SQL_CONCUR_READ_ONLY
-#define SQL_CONCUR_LOCK 2
-#define SQL_CONCUR_TIMESTAMP SQL_CONCUR_ROWVER
-#define SQL_CONCUR_VALUES 4
-#define SQL_CONNECT_OPT_DRVR_START 1000
-#define SQL_PACKET_SIZE 112
-#define SQL_CONN_OPT_MAX SQL_PACKET_SIZE
-#define SQL_CONN_OPT_MIN SQL_ACCESS_MODE
-#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
-#define SQL_CR_DELETE SQL_CB_DELETE
-#define SQL_CR_PRESERVE SQL_CB_PRESERVE
-#define SQL_CURRENT_QUALIFIER 109
-#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_CURSOR_COMMIT_BEHAVIOR 23
-#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_CVT_BIGINT 0x00004000L
-#define SQL_CVT_BINARY 0x00000400L
-#define SQL_CVT_BIT 0x00001000L
-#define SQL_CVT_CHAR 1
-#define SQL_CVT_DATE 0x00008000L
-#define SQL_CVT_DECIMAL 4
-#define SQL_CVT_DOUBLE 128
-#define SQL_CVT_FLOAT 32
-#define SQL_CVT_INTEGER 8
-#define SQL_CVT_LONGVARBINARY 0x00040000L
-#define SQL_CVT_LONGVARCHAR 512
-#define SQL_CVT_NUMERIC 2
-#define SQL_CVT_REAL 64
-#define SQL_CVT_SMALLINT 16
-#define SQL_CVT_TIME 0x10000L
-#define SQL_CVT_TIMESTAMP 0x20000L
-#define SQL_CVT_TINYINT 0x2000L
-#define SQL_CVT_VARBINARY 0x800L
-#define SQL_CVT_VARCHAR 256
-#define SQL_DATABASE_NAME 16
-#define SQL_DATA_AT_EXEC (-2)
-#define SQL_DATA_SOURCE_NAME 2
-#define SQL_DATA_SOURCE_READ_ONLY 25
-#define SQL_DATE 9
-#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_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_ODBC_VER 77
-#define SQL_DRIVER_VER 7
-#define SQL_DROP 1
-#define SQL_ENSURE 1
-#define SQL_ERROR (-1)
-#define SQL_EXPRESSIONS_IN_ORDERBY 27
-#define SQL_EXT_API_LAST SQL_API_SQLBINDPARAMETER
-#define SQL_EXT_API_START 40
-#define SQL_FD_FETCH_ABSOLUTE 16
-#define SQL_FD_FETCH_BOOKMARK 128
-#define SQL_FD_FETCH_FIRST 2
-#define SQL_FD_FETCH_LAST 4
-#define SQL_FD_FETCH_NEXT 1
-#define SQL_FD_FETCH_PREV SQL_FD_FETCH_PRIOR
-#define SQL_FD_FETCH_PRIOR 8
-#define SQL_FD_FETCH_RELATIVE 32
-#define SQL_FD_FETCH_RESUME 64
-#define SQL_FETCH_DIRECTION 8
-#define SQL_FETCH_FIRST 2
-#define SQL_FETCH_NEXT 1
-#define SQL_FETCH_PREV SQL_FETCH_PRIOR
-#define SQL_FETCH_RESUME 7
-#define SQL_FILE_NOT_SUPPORTED 0
-#define SQL_FILE_QUALIFIER 2
-#define SQL_FILE_TABLE 1
-#define SQL_FILE_USAGE 84
-#define SQL_FLOAT 6
-#define SQL_FN_CVT_CONVERT 1
-#define SQL_FN_NUM_ABS 1
-#define SQL_FN_NUM_ACOS 2
-#define SQL_FN_NUM_ASIN 4
-#define SQL_FN_NUM_ATAN 8
-#define SQL_FN_NUM_ATAN2 16
-#define SQL_FN_NUM_CEILING 32
-#define SQL_FN_NUM_COS 64
-#define SQL_FN_NUM_COT 128
-#define SQL_FN_NUM_DEGREES 0x40000L
-#define SQL_FN_NUM_EXP 256
-#define SQL_FN_NUM_FLOOR 512
-#define SQL_FN_NUM_LOG 1024
-#define SQL_FN_NUM_LOG10 0x80000L
-#define SQL_FN_NUM_MOD 0x800L
-#define SQL_FN_NUM_PI 0x10000L
-#define SQL_FN_NUM_POWER 0x100000L
-#define SQL_FN_NUM_RADIANS 0x200000L
-#define SQL_FN_NUM_RAND 0x20000L
-#define SQL_FN_NUM_ROUND 0x400000L
-#define SQL_FN_NUM_SIGN 0x1000L
-#define SQL_FN_NUM_SIN 0x2000L
-#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 1
-#define SQL_FN_STR_DIFFERENCE 0x00008000L
-#define SQL_FN_STR_INSERT 2
-#define SQL_FN_STR_LCASE 64
-#define SQL_FN_STR_LEFT 4
-#define SQL_FN_STR_LENGTH 16
-#define SQL_FN_STR_LOCATE 32
-#define SQL_FN_STR_LOCATE_2 0x00010000L
-#define SQL_FN_STR_LTRIM 8
-#define SQL_FN_STR_REPEAT 128
-#define SQL_FN_STR_REPLACE 256
-#define SQL_FN_STR_RIGHT 512
-#define SQL_FN_STR_RTRIM 1024
-#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 32
-#define SQL_FN_TD_MONTHNAME 0x00010000L
-#define SQL_FN_TD_NOW 1
-#define SQL_FN_TD_QUARTER 64
-#define SQL_FN_TD_SECOND 0x00001000L
-#define SQL_FN_TD_TIMESTAMPADD 0x00002000L
-#define SQL_FN_TD_TIMESTAMPDIFF 0x00004000L
-#define SQL_FN_TD_WEEK 128
-#define SQL_FN_TD_YEAR 256
-#define SQL_FN_TSI_DAY 16
-#define SQL_FN_TSI_FRAC_SECOND 1
-#define SQL_FN_TSI_HOUR 8
-#define SQL_FN_TSI_MINUTE 4
-#define SQL_FN_TSI_MONTH 64
-#define SQL_FN_TSI_QUARTER 128
-#define SQL_FN_TSI_SECOND 2
-#define SQL_FN_TSI_WEEK 32
-#define SQL_FN_TSI_YEAR 256
-#define SQL_GB_GROUP_BY_CONTAINS_SELECT 2
-#define SQL_GB_GROUP_BY_EQUALS_SELECT 1
-#define SQL_GB_NOT_SUPPORTED 0
-#define SQL_GB_NO_RELATION 3
-#define SQL_GD_ANY_COLUMN 1
-#define SQL_GD_ANY_ORDER 2
-#define SQL_GD_BLOCK 4
-#define SQL_GD_BOUND 8
-#define SQL_GETDATA_EXTENSIONS 81
-#define SQL_GET_BOOKMARK 13
-#define SQL_GROUP_BY 88
-#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_INFO_DRIVER_START 1000
-#define SQL_INFO_FIRST 0
-#define SQL_INFO_LAST SQL_QUALIFIER_LOCATION
-#define SQL_INTEGER 4
-#define SQL_INTERVAL_DAY (-83)
-#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 (-84)
-#define SQL_INTERVAL_HOUR_TO_MINUTE (-90)
-#define SQL_INTERVAL_HOUR_TO_SECOND (-91)
-#define SQL_INTERVAL_MINUTE (-85)
-#define SQL_INTERVAL_MINUTE_TO_SECOND (-92)
-#define SQL_INTERVAL_MONTH (-81)
-#define SQL_INTERVAL_SECOND (-86)
-#define SQL_INTERVAL_YEAR (-80)
-#define SQL_INTERVAL_YEAR_TO_MONTH (-82)
-#define SQL_INVALID_HANDLE (-2)
-#define SQL_KEYSET_SIZE 8
-#define SQL_KEYSET_SIZE_DEFAULT 0
-#define SQL_KEYWORDS 89
-#define SQL_LCK_EXCLUSIVE 2
-#define SQL_LCK_NO_CHANGE 1
-#define SQL_LCK_UNLOCK 4
-#define SQL_LIKE_ESCAPE_CLAUSE 113
-#define SQL_LIKE_ONLY 1
-#define SQL_LOCK_TYPES 78
-#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_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_COLUMN_NAME_LEN 30
-#define SQL_MAX_CURSOR_NAME_LEN 31
-#define SQL_MAX_DSN_LENGTH 32
-#define SQL_MAX_INDEX_SIZE 102
-#define SQL_MAX_LENGTH 3
-#define SQL_MAX_LENGTH_DEFAULT 0
-#define SQL_MAX_MESSAGE_LENGTH 512
-#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_ROWS 1
-#define SQL_MAX_ROWS_DEFAULT 0UL
-#define SQL_MAX_ROW_SIZE 104
-#define SQL_MAX_ROW_SIZE_INCLUDES_LONG 103
-#define SQL_MAX_STATEMENT_LEN 105
-#define SQL_MAX_TABLES_IN_SELECT 106
-#define SQL_MAX_TABLE_NAME_LEN 35
-#define SQL_MAX_USER_NAME_LEN 107
-#define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE
-#define SQL_MODE_READ_ONLY 1UL
-#define SQL_MODE_READ_WRITE 0UL
-#define SQL_MULTIPLE_ACTIVE_TXN 37
-#define SQL_MULT_RESULT_SETS 36
-#define SQL_NC_END 4
-#define SQL_NC_HIGH 0
-#define SQL_NC_LOW 1
-#define SQL_NC_START 2
-#define SQL_NEED_DATA 99
-#define SQL_NEED_LONG_DATA_LEN 111
-#define SQL_NNC_NON_NULL 1
-#define SQL_NNC_NULL 0
-#define SQL_NON_NULLABLE_COLUMNS 75
-#define SQL_NOSCAN 2
-#define SQL_NOSCAN_DEFAULT SQL_NOSCAN_OFF
-#define SQL_NOSCAN_OFF 0
-#define SQL_NOSCAN_ON 1
-#define SQL_NO_DATA 100
-#define SQL_NO_NULLS 0
-#define SQL_NO_TOTAL (-4)
-#define SQL_NTS (-3)
-#define SQL_NULLABLE 1
-#define SQL_NULLABLE_UNKNOWN 2
-#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_NUMERIC 2
-#define SQL_NUMERIC_FUNCTIONS 49
-#define SQL_NUM_EXTENSIONS (SQL_EXT_API_LAST-SQL_EXT_API_START+1)
-#define SQL_NUM_FUNCTIONS 23
-#define SQL_OAC_LEVEL1 1
-#define SQL_OAC_LEVEL2 2
-#define SQL_OAC_NONE 0
-#define SQL_ODBC_API_CONFORMANCE 9
-#define SQL_ODBC_CURSORS 110
-#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,"\
-"COBOL,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,INTEGER,INTERSECT,INTERVAL,INTO,IS,ISOLATION,"\
-"JOIN,KEY,LANGUAGE,LAST,LEADING,LEFT,LEVEL,LIKE,LOCAL,LOWER,"\
-"MATCH,MAX,MIN,MINUTE,MODULE,MONTH,MUMPS,"\
-"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,"\
-"REFERENCES,RELATIVE,RESTRICT,REVOKE,RIGHT,ROLLBACK,ROWS,"\
-"SCHEMA,SCROLL,SECOND,SECTION,SELECT,SEQUENCE,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,YEAR"
-#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_OJ_ALL_COMPARISON_OPS 64
-#define SQL_OJ_CAPABILITIES 65003
-#define SQL_OJ_FULL 4
-#define SQL_OJ_INNER 32
-#define SQL_OJ_LEFT 1
-#define SQL_OJ_NESTED 8
-#define SQL_OJ_NOT_ORDERED 16
-#define SQL_OJ_RIGHT 2
-#define SQL_OPT_TRACE_OFF 0
-#define SQL_OPT_TRACE_ON 1
-#define SQL_OPT_TRACE 104
-#define SQL_OPT_TRACEFILE 105
-#define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF
-#define SQL_OPT_TRACE_FILE_DEFAULT "\\SQL.LOG"
-#define SQL_ORDER_BY_COLUMNS_IN_SELECT 90
-#define SQL_OSCC_COMPLIANT 1
-#define SQL_OSCC_NOT_COMPLIANT 0
-#define SQL_OSC_CORE 1
-#define SQL_OSC_EXTENDED 2
-#define SQL_OSC_MINIMUM 0
-#define SQL_OUTER_JOINS 38
-#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_OWNER_TERM 39
-#define SQL_OWNER_USAGE 91
-#define SQL_PC_NOT_PSEUDO 1
-#define SQL_PC_PSEUDO 2
-#define SQL_PC_UNKNOWN 0
-#define SQL_PC_NON_PSEUDO SQL_PC_NOT_PSEUDO
-#define SQL_POSITIONED_STATEMENTS 80
-#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_PROCEDURES 21
-#define SQL_PROCEDURE_TERM 40
-#define SQL_PS_POSITIONED_DELETE 1
-#define SQL_PS_POSITIONED_UPDATE 2
-#define SQL_PS_SELECT_FOR_UPDATE 4
-#define SQL_QL_END 2
-#define SQL_QL_START 1
-#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_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_RD_DEFAULT SQL_RD_ON
-#define SQL_RD_OFF 0
-#define SQL_RD_ON 1
-#define SQL_REAL 7
-#define SQL_RESET_PARAMS 3
-#define SQL_RETRIEVE_DATA 11
-#define SQL_ROLLBACK 1
-#define SQL_ROWSET_SIZE 9
-#define SQL_ROWSET_SIZE_DEFAULT 1UL
-#define SQL_ROWVER 2
-#define SQL_ROW_NUMBER 14
-#define SQL_ROW_UPDATES 11
-#define SQL_SCCO_LOCK 2
-#define SQL_SCCO_OPT_ROWVER 4
-#define SQL_SCCO_OPT_TIMESTAMP SQL_SCCO_OPT_ROWVER
-#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_SCROLL_DYNAMIC (-2L)
-#define SQL_SCROLL_FORWARD_ONLY 0
-#define SQL_SCROLL_KEYSET_DRIVEN (-1L)
-#define SQL_SCROLL_OPTIONS 44
-#define SQL_SCROLL_STATIC (-3L)
-#define SQL_SC_NON_UNIQUE 0
-#define SQL_SC_TRY_UNIQUE 1
-#define SQL_SC_UNIQUE 2
-#define SQL_SEARCHABLE 3
-#define SQL_SEARCH_PATTERN_ESCAPE 14
-#define SQL_SERVER_NAME 13
-#define SQL_SIGNED_OFFSET (-20)
-#define SQL_SIMULATE_CURSOR 10
-#define SQL_SMALLINT 5
-#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_SPECIAL_CHARACTERS 94
-#define SQL_SQLSTATE_SIZE 5
-#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_SS_ADDITIONS 1
-#define SQL_SS_DELETIONS 2
-#define SQL_SS_UPDATES 4
-#define SQL_STATIC_SENSITIVITY 83
-#define SQL_STILL_EXECUTING 2
-#define SQL_STMT_OPT_MAX SQL_ROW_NUMBER
-#define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT
-#define SQL_STRING_FUNCTIONS 50
-#define SQL_SUBQUERIES 95
-#define SQL_SUCCESS 0
-#define SQL_SUCCESS_WITH_INFO 1
-#define SQL_SYSTEM_FUNCTIONS 51
-#define SQL_TABLE_STAT 0
-#define SQL_TABLE_TERM 45
-#define SQL_TC_ALL 0x0002
-#define SQL_TC_DDL_COMMIT 3
-#define SQL_TC_DDL_IGNORE 4
-#define SQL_TC_DML 1
-#define SQL_TC_NONE 0
-#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_CAPABLE 46
-#define SQL_TXN_ISOLATION 108
-#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_TXN_VERSIONING 16
-#define SQL_TYPE_NULL 0
-#define SQL_UB_OFF 0
-#define SQL_UB_ON 1
-#define SQL_UNBIND 2
-#define SQL_UNICODE (-95)
-#define SQL_UNICODE_CHAR SQL_UNICODE
-#define SQL_UNICODE_LONGVARCHAR (-97)
-#define SQL_UNICODE_VARCHAR (-96)
-#define SQL_UNION 96
-#define SQL_UNSEARCHABLE 0
-#define SQL_UNSIGNED_OFFSET (-22)
-#define SQL_USER_NAME 47
-#define SQL_USE_BOOKMARKS 12
-#define SQL_U_UNION 1
-#define SQL_U_UNION_ALL 2
-#define SQL_VARBINARY (-3)
-#define SQL_VARCHAR 12
-#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_TYPE_DRIVER_END SQL_UNICODE_LONGVARCHAR
-#define SQL_TYPE_DRIVER_START SQL_INTERVAL_YEAR
-#define SQL_TYPE_MAX SQL_VARCHAR
-#define SQL_TYPE_MIN SQL_BIT
-#define SQL_UB_DEFAULT SQL_UB_OFF
-
-SQLRETURN SQL_API SQLAllocConnect(SQLHENV,SQLHDBC*);
-SQLRETURN SQL_API SQLAllocEnv(SQLHENV *);
-SQLRETURN SQL_API SQLAllocStmt(SQLHDBC,SQLHSTMT*);
-SQLRETURN SQL_API SQLAllocHandle(SQLSMALLINT,SQLHANDLE,SQLHANDLE*);
-SQLRETURN SQL_API SQLBindCol(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT,SQLPOINTER,SQLINTEGER,SQLINTEGER*);
-SQLRETURN SQL_API SQLCancel(SQLHSTMT);
-SQLRETURN SQL_API SQLColAttributes(SQLHSTMT,SQLUSMALLINT,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*,SQLINTEGER*);
-SQLRETURN SQL_API SQLConnect(SQLHDBC,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLDescribeCol(SQLHSTMT,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLSMALLINT*,SQLUINTEGER*,SQLSMALLINT*,SQLSMALLINT*);
-SQLRETURN SQL_API SQLDisconnect(SQLHDBC);
-SQLRETURN SQL_API SQLError(SQLHENV,SQLHDBC,SQLHSTMT,SQLCHAR*,SQLINTEGER*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLExecDirect(SQLHSTMT,SQLCHAR*,SQLINTEGER);
-SQLRETURN SQL_API SQLExecute(SQLHSTMT);
-SQLRETURN SQL_API SQLFetch(SQLHSTMT);
-SQLRETURN SQL_API SQLFreeConnect(SQLHDBC);
-SQLRETURN SQL_API SQLFreeEnv(SQLHENV);
-SQLRETURN SQL_API SQLFreeStmt(SQLHSTMT,SQLUSMALLINT);
-SQLRETURN SQL_API SQLFreeHandle(SQLSMALLINT,SQLHANDLE);
-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,SQLINTEGER*);
-SQLRETURN SQL_API SQLSetCursorName(SQLHSTMT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLTransact(SQLHENV,SQLHDBC,SQLUSMALLINT);
-SQLRETURN SQL_API SQLSetParam(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT,SQLSMALLINT,SQLUINTEGER,SQLSMALLINT,SQLPOINTER,SQLINTEGER*);
-SQLRETURN SQL_API SQLColumns(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLGetConnectOption(SQLHDBC,SQLUSMALLINT,SQLPOINTER);
-SQLRETURN SQL_API SQLGetData(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT,SQLPOINTER,SQLINTEGER,SQLINTEGER*);
-SQLRETURN SQL_API SQLGetFunctions(SQLHDBC,SQLUSMALLINT,SQLUSMALLINT*);
-SQLRETURN SQL_API SQLGetInfo(SQLHDBC,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLGetStmtOption(SQLHSTMT,SQLUSMALLINT,SQLPOINTER);
-SQLRETURN SQL_API SQLGetTypeInfo(SQLHSTMT,SQLSMALLINT);
-SQLRETURN SQL_API SQLParamData(SQLHSTMT,SQLPOINTER*);
-SQLRETURN SQL_API SQLPutData(SQLHSTMT,SQLPOINTER,SQLINTEGER);
-SQLRETURN SQL_API SQLSetConnectOption(SQLHDBC,SQLUSMALLINT,SQLUINTEGER);
-SQLRETURN SQL_API SQLSetStmtOption(SQLHSTMT,SQLUSMALLINT,SQLUINTEGER);
-SQLRETURN SQL_API SQLSpecialColumns(SQLHSTMT,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLUSMALLINT,SQLUSMALLINT fNullable);
-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*);
-SQLRETURN SQL_API SQLSetScrollOptions(SQLHSTMT,SQLUSMALLINT,SQLINTEGER,SQLUSMALLINT);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/sqlext.h b/winsup/w32api/include/sqlext.h
deleted file mode 100644
index fc0538601..000000000
--- a/winsup/w32api/include/sqlext.h
+++ /dev/null
@@ -1,79 +0,0 @@
-#ifndef _SQLEXT_H
-#define _SQLEXT_H
-#include <sql.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define SQL_DEFAULT_PARAM (-5)
-#define SQL_IGNORE (-6)
-#define SQL_LEN_DATA_AT_EXEC_OFFSET (-100)
-#define SQL_LEN_DATA_AT_EXEC(l) (-l+SQL_LEN_DATA_AT_EXEC_OFFSET)
-#define SQL_ENTIRE_ROWSET 0
-#define SQL_POSITION 0
-#define SQL_REFRESH 1
-#define SQL_UPDATE 2
-#define SQL_DELETE 3
-#define SQL_ADD 4
-#define SQL_LOCK_NO_CHANGE 0
-#define SQL_LOCK_EXCLUSIVE 1
-#define SQL_LOCK_UNLOCK 2
-#define SQL_POSITION_TO(s,r) SQLSetPos(s,r,SQL_POSITION,SQL_LOCK_NO_CHANGE)
-#define SQL_LOCK_RECORD(s,i,l) SQLSetPos(s,r,SQL_POSITION,l)
-#define SQL_REFRESH_RECORD(s,i,f) SQLSetPos(s,r,SQL_REFRESH,fLock)
-#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)
-#define SQL_DRIVER_NOPROMPT 0
-#define SQL_DRIVER_COMPLETE 1
-#define SQL_DRIVER_PROMPT 2
-#define SQL_DRIVER_COMPLETE_REQUIRED 3
-#define SQL_FETCH_LAST 3
-#define SQL_FETCH_PRIOR 4
-#define SQL_FETCH_ABSOLUTE 5
-#define SQL_FETCH_RELATIVE 6
-#define SQL_FETCH_BOOKMARK 8
-#define SQL_ROW_SUCCESS 0
-#define SQL_ROW_DELETED 1
-#define SQL_ROW_UPDATED 2
-#define SQL_ROW_NOROW 3
-#define SQL_ROW_ADDED 4
-#define SQL_ROW_ERROR 5
-#define SQL_CASCADE 0
-#define SQL_RESTRICT 1
-#define SQL_SET_NULL 2
-#define SQL_NO_ACTION 3
-#define SQL_SET_DEFAULT 4
-#define SQL_PARAM_TYPE_UNKNOWN 0
-#define SQL_PARAM_INPUT 1
-#define SQL_PARAM_INPUT_OUTPUT 2
-#define SQL_RESULT_COL 3
-#define SQL_PARAM_OUTPUT 4
-#define SQL_RETURN_VALUE 5
-#define SQL_PT_UNKNOWN 0
-#define SQL_PT_PROCEDURE 1
-#define SQL_PT_FUNCTION 2
-#define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT
-#define SQL_SETPARAM_VALUE_MAX (-1L)
-#define SQL_NO_DATA_FOUND SQL_NO_DATA
-
-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 SQLDescribeParam(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT*,SQLUINTEGER*,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,SQLUINTEGER,SQLSMALLINT,SQLPOINTER,SQLINTEGER,SQLINTEGER*);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/sqltypes.h b/winsup/w32api/include/sqltypes.h
deleted file mode 100644
index 4d9529d9d..000000000
--- a/winsup/w32api/include/sqltypes.h
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef _SQLTYPES_H
-#define _SQLTYPES_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define SQL_API __stdcall
-#pragma pack(push,1)
-typedef signed char SCHAR;
-typedef long SDWORD;
-typedef short SWORD;
-typedef ULONG UDWORD;
-typedef USHORT UWORD;
-typedef long SLONG;
-typedef 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;
-typedef UDWORD SQLUINTEGER;
-typedef UWORD SQLUSMALLINT;
-typedef PVOID SQLPOINTER;
-typedef HENV SQLHENV;
-typedef HDBC SQLHDBC;
-typedef HSTMT SQLHSTMT;
-typedef SQLSMALLINT SQLRETURN;
-typedef HWND SQLHWND;
-typedef ULONG BOOKMARK;
-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;
-typedef void* SQLHANDLE;
-typedef SQLHANDLE SQLHDESC;
-#pragma pack(pop)
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/subauth.h b/winsup/w32api/include/subauth.h
deleted file mode 100644
index b31a4bab7..000000000
--- a/winsup/w32api/include/subauth.h
+++ /dev/null
@@ -1,205 +0,0 @@
-#ifndef _SUBAUTH_H
-#define _SUBAUTH_H
-#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/tlhelp32.h b/winsup/w32api/include/tlhelp32.h
deleted file mode 100644
index 8f4222e34..000000000
--- a/winsup/w32api/include/tlhelp32.h
+++ /dev/null
@@ -1,136 +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
-#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/unknwn.h b/winsup/w32api/include/unknwn.h
deleted file mode 100644
index 48cea3bc1..000000000
--- a/winsup/w32api/include/unknwn.h
+++ /dev/null
@@ -1,67 +0,0 @@
-#ifndef _UNKNWN_H
-#define _UNKNWN_H
-#include <windows.h>
-#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__
-#undef INTERFACE
-#define INTERFACE IUnknown
-DECLARE_INTERFACE(IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
-};
-typedef IUnknown *LPUNKNOWN;
-#endif
-#ifndef __IClassFactory_INTERFACE_DEFINED__
-#define __IClassFactory_INTERFACE_DEFINED__
-#undef INTERFACE
-#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;
-};
-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);
-#ifdef 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
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/userenv.h b/winsup/w32api/include/userenv.h
deleted file mode 100644
index a073b7923..000000000
--- a/winsup/w32api/include/userenv.h
+++ /dev/null
@@ -1,53 +0,0 @@
-#ifndef _USERENV_H
-#define _USERENV_H
-#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/winbase.h b/winsup/w32api/include/winbase.h
deleted file mode 100644
index d147bb89b..000000000
--- a/winsup/w32api/include/winbase.h
+++ /dev/null
@@ -1,1850 +0,0 @@
-#ifndef _WINBASE_H
-#define _WINBASE_H
-#define WINBASEAPI DECLSPEC_IMPORT
-#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 (-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 DUPLICATE_CLOSE_SOURCE 1
-#define DUPLICATE_SAME_ACCESS 2
-#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 CREATE_DEFAULT_ERROR_MODE 67108864
-#define DEBUG_PROCESS 1
-#define DEBUG_ONLY_THIS_PROCESS 2
-#define CREATE_SUSPENDED 4
-#define DETACHED_PROCESS 8
-#define CREATE_NEW_CONSOLE 16
-#define NORMAL_PRIORITY_CLASS 32
-#define IDLE_PRIORITY_CLASS 64
-#define HIGH_PRIORITY_CLASS 128
-#define REALTIME_PRIORITY_CLASS 256
-#define CREATE_NEW_PROCESS_GROUP 512
-#define CREATE_UNICODE_ENVIRONMENT 1024
-#define CREATE_SEPARATE_WOW_VDM 2048
-#define CREATE_SHARED_WOW_VDM 4096
-#define CREATE_FORCEDOS 8192
-#define CREATE_NO_WINDOW 0x8000000
-#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
-#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
-#define HANDLE_FLAG_INHERIT 1
-#define HANDLE_FLAG_PROTECT_FROM_CLOSE 2
-#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 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 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
-#define LOGON32_LOGON_INTERACTIVE 2
-#define LOGON32_LOGON_BATCH 4
-#define LOGON32_LOGON_SERVICE 5
-#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
-#define WAIT_TIMEOUT 0x102
-#define WAIT_IO_COMPLETION 0xC0
-#define WAIT_ABANDONED 128
-#define WAIT_FAILED 0xFFFFFFFF
-#define PURGE_TXABORT 1
-#define PURGE_RXABORT 2
-#define PURGE_TXCLEAR 4
-#define PURGE_RXCLEAR 8
-#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
-#define SEM_FAILCRITICALERRORS 1
-#define SEM_NOALIGNMENTFAULTEXCEPT 4
-#define SEM_NOGPFAULTERRORBOX 2
-#define SEM_NOOPENFILEERRORBOX 32768
-#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 VER_PLATFORM_WIN32s 0
-#define VER_PLATFORM_WIN32_WINDOWS 1
-#define VER_PLATFORM_WIN32_NT 2
-#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 PROFILE_USER 0x10000000
-#define PROFILE_KERNEL 0x20000000
-#define PROFILE_SERVER 0x40000000
-#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
-
-#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 {
- DWORD Internal;
- DWORD 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,*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;
- DWORD dwReserved0;
- DWORD dwReserved1;
- CHAR cFileName[MAX_PATH];
- CHAR cAlternateFileName[14];
-} WIN32_FIND_DATAA,*LPWIN32_FIND_DATAA;
-typedef struct _WIN32_FIND_DATAW {
- DWORD dwFileAttributes;
- FILETIME ftCreationTime;
- FILETIME ftLastAccessTime;
- FILETIME ftLastWriteTime;
- DWORD nFileSizeHigh;
- DWORD nFileSizeLow;
- DWORD dwReserved0;
- DWORD dwReserved1;
- WCHAR cFileName[MAX_PATH];
- WCHAR cAlternateFileName[14];
-} WIN32_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;
-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 {
- union {
- DWORD dwOemId;
- 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 _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 _MEMORYSTATUS {
- DWORD dwLength;
- DWORD dwMemoryLoad;
- DWORD dwTotalPhys;
- DWORD dwAvailPhys;
- DWORD dwTotalPageFile;
- DWORD dwAvailPageFile;
- DWORD dwTotalVirtual;
- DWORD dwAvailVirtual;
-} MEMORYSTATUS,*LPMEMORYSTATUS;
-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;
- 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;
-
-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 *ENUMRESLANGPROC)(HMODULE,LPCTSTR,LPCTSTR,WORD,LONG);
-typedef BOOL(CALLBACK *ENUMRESNAMEPROC)(HMODULE,LPCTSTR,LPTSTR,LONG);
-typedef BOOL(CALLBACK *ENUMRESTYPEPROC)(HMODULE,LPTSTR,LONG);
-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)(DWORD);
-typedef void(CALLBACK *PTIMERAPCROUTINE)(PVOID,DWORD,DWORD);
-#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);
-long WINAPI _hread(HFILE,LPVOID,long);
-long WINAPI _hwrite(HFILE,LPCSTR,long);
-HFILE WINAPI _lclose(HFILE);
-HFILE WINAPI _lcreat(LPCSTR,int);
-LONG WINAPI _llseek(HFILE,LONG,int);
-HFILE WINAPI _lopen(LPCSTR,int);
-UINT WINAPI _lread(HFILE,LPVOID,UINT);
-UINT WINAPI _lwrite(HFILE,LPCSTR,UINT);
-#define AbnormalTermination() FALSE
-BOOL WINAPI AccessCheck(PSECURITY_DESCRIPTOR,HANDLE,DWORD,PGENERIC_MAPPING,PPRIVILEGE_SET,PDWORD,PDWORD,PBOOL);
-BOOL WINAPI AccessCheckAndAuditAlarmA(LPCSTR,LPVOID,LPSTR,LPSTR,PSECURITY_DESCRIPTOR,DWORD,PGENERIC_MAPPING,BOOL,PDWORD,PBOOL,PBOOL);
-BOOL WINAPI AccessCheckAndAuditAlarmW(LPCWSTR,LPVOID,LPWSTR,LPWSTR,PSECURITY_DESCRIPTOR,DWORD,PGENERIC_MAPPING,BOOL,PDWORD,PBOOL,PBOOL);
-BOOL WINAPI AddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
-BOOL WINAPI AddAccessDeniedAce(PACL,DWORD,DWORD,PSID);
-BOOL WINAPI AddAce(PACL,DWORD,DWORD,PVOID,DWORD);
-ATOM WINAPI AddAtomA(LPCSTR);
-ATOM WINAPI AddAtomW(LPCWSTR);
-BOOL WINAPI AddAuditAccessAce(PACL,DWORD,DWORD,PSID,BOOL,BOOL);
-BOOL WINAPI AdjustTokenGroups(HANDLE,BOOL,PTOKEN_GROUPS,DWORD,PTOKEN_GROUPS,PDWORD);
-BOOL WINAPI AdjustTokenPrivileges(HANDLE,BOOL,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD);
-BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID*);
-BOOL WINAPI AllocateLocallyUniqueId(PLUID);
-BOOL WINAPI AreAllAccessesGranted(DWORD,DWORD);
-BOOL WINAPI AreAnyAccessesGranted(DWORD,DWORD);
-BOOL WINAPI AreFileApisANSI(void);
-BOOL WINAPI BackupEventLogA(HANDLE,LPCSTR);
-BOOL WINAPI BackupEventLogW(HANDLE,LPCWSTR);
-BOOL WINAPI BackupRead(HANDLE,PBYTE,DWORD,PDWORD,BOOL,BOOL,PVOID);
-BOOL WINAPI BackupSeek(HANDLE,DWORD,DWORD,PDWORD,PDWORD,PVOID);
-BOOL WINAPI BackupWrite(HANDLE,PBYTE,DWORD,PDWORD,BOOL,BOOL,PVOID);
-BOOL WINAPI Beep(DWORD,DWORD);
-HANDLE WINAPI BeginUpdateResourceA(LPCSTR,BOOL);
-HANDLE WINAPI BeginUpdateResourceW(LPCWSTR,BOOL);
-BOOL WINAPI BuildCommDCBA(LPCSTR,LPDCB);
-BOOL WINAPI BuildCommDCBW(LPCWSTR,LPDCB);
-BOOL WINAPI BuildCommDCBAndTimeoutsA(LPCSTR,LPDCB,LPCOMMTIMEOUTS);
-BOOL WINAPI BuildCommDCBAndTimeoutsW(LPCWSTR,LPDCB,LPCOMMTIMEOUTS);
-BOOL WINAPI CallNamedPipeA(LPCSTR,PVOID,DWORD,PVOID,DWORD,PDWORD,DWORD);
-BOOL WINAPI CallNamedPipeW(LPCWSTR,PVOID,DWORD,PVOID,DWORD,PDWORD,DWORD);
-BOOL WINAPI CancelIo(HANDLE);
-BOOL WINAPI CancelWaitableTimer(HANDLE);
-BOOL WINAPI ClearCommBreak(HANDLE);
-BOOL WINAPI ClearCommError(HANDLE,PDWORD,LPCOMSTAT);
-BOOL WINAPI ClearEventLogA(HANDLE,LPCSTR);
-BOOL WINAPI ClearEventLogW(HANDLE,LPCWSTR);
-BOOL WINAPI CloseEventLog(HANDLE);
-BOOL WINAPI CloseHandle(HANDLE);
-BOOL WINAPI CommConfigDialogA(LPCSTR,HWND,LPCOMMCONFIG);
-BOOL WINAPI CommConfigDialogW(LPCWSTR,HWND,LPCOMMCONFIG);
-LONG WINAPI CompareFileTime(CONST FILETIME*,CONST FILETIME*);
-BOOL WINAPI ConnectNamedPipe(HANDLE,LPOVERLAPPED);
-BOOL WINAPI ContinueDebugEvent(DWORD,DWORD,DWORD);
-PVOID WINAPI ConvertThreadToFiber(PVOID);
-BOOL WINAPI CopyFileA(LPCSTR,LPCSTR,BOOL);
-BOOL WINAPI CopyFileW(LPCWSTR,LPCWSTR,BOOL);
-BOOL WINAPI CopyFileExA(LPCSTR,LPCSTR,LPPROGRESS_ROUTINE,LPVOID,LPBOOL,DWORD);
-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
-BOOL WINAPI CopySid(DWORD,PSID,PSID);
-BOOL WINAPI CreateDirectoryA(LPCSTR,LPSECURITY_ATTRIBUTES);
-BOOL WINAPI CreateDirectoryW(LPCWSTR,LPSECURITY_ATTRIBUTES);
-BOOL WINAPI CreateDirectoryExA(LPCSTR,LPCSTR,LPSECURITY_ATTRIBUTES);
-BOOL WINAPI CreateDirectoryExW(LPCWSTR,LPCWSTR,LPSECURITY_ATTRIBUTES);
-HANDLE WINAPI CreateEventA(LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCSTR);
-HANDLE WINAPI CreateEventW(LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCWSTR);
-LPVOID WINAPI CreateFiber(DWORD,LPFIBER_START_ROUTINE,LPVOID);
-HANDLE WINAPI CreateFileA(LPCSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,DWORD,HANDLE);
-HANDLE WINAPI CreateFileW(LPCWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,DWORD,HANDLE);
-HANDLE WINAPI CreateFileMappingA(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,DWORD,DWORD,LPCSTR);
-HANDLE WINAPI CreateFileMappingW(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,DWORD,DWORD,LPCWSTR);
-HANDLE WINAPI CreateHardLinkA(LPCSTR,LPCSTR,LPSECURITY_ATTRIBUTES);
-HANDLE WINAPI CreateHardLinkW(LPCWSTR,LPCWSTR,LPSECURITY_ATTRIBUTES);
-HANDLE WINAPI CreateIoCompletionPort(HANDLE,HANDLE,DWORD,DWORD);
-HANDLE WINAPI CreateMailslotA(LPCSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
-HANDLE WINAPI CreateMailslotW(LPCWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
-HANDLE WINAPI CreateMutexA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR);
-HANDLE WINAPI CreateMutexW(LPSECURITY_ATTRIBUTES,BOOL,LPCWSTR);
-HANDLE WINAPI CreateNamedPipeA(LPCSTR,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
-HANDLE WINAPI CreateNamedPipeW(LPCWSTR,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
-BOOL WINAPI CreatePipe(PHANDLE,PHANDLE,LPSECURITY_ATTRIBUTES,DWORD);
-BOOL WINAPI CreatePrivateObjectSecurity(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR*,BOOL,HANDLE,PGENERIC_MAPPING);
-BOOL WINAPI CreateProcessA(LPCSTR,LPSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,PVOID,LPCSTR,LPSTARTUPINFOA,LPPROCESS_INFORMATION);
-BOOL WINAPI CreateProcessW(LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,PVOID,LPCWSTR,LPSTARTUPINFOW,LPPROCESS_INFORMATION);
-BOOL WINAPI CreateProcessAsUserA(HANDLE,LPCSTR,LPSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,PVOID,LPCSTR,LPSTARTUPINFOA,LPPROCESS_INFORMATION);
-BOOL WINAPI CreateProcessAsUserW(HANDLE,LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,PVOID,LPCWSTR,LPSTARTUPINFOW,LPPROCESS_INFORMATION);
-HANDLE WINAPI CreateRemoteThread(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD);
-HANDLE WINAPI CreateSemaphoreA(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCSTR);
-HANDLE WINAPI CreateSemaphoreW(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCWSTR);
-DWORD WINAPI CreateTapePartition(HANDLE,DWORD,DWORD,DWORD);
-HANDLE WINAPI CreateThread(LPSECURITY_ATTRIBUTES,DWORD,LPTHREAD_START_ROUTINE,PVOID,DWORD,PDWORD);
-HANDLE WINAPI CreateWaitableTimerA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR);
-HANDLE WINAPI CreateWaitableTimerW(LPSECURITY_ATTRIBUTES,BOOL,LPCWSTR);
-BOOL WINAPI DebugActiveProcess(DWORD);
-void WINAPI DebugBreak(void);
-BOOL WINAPI DefineDosDeviceA(DWORD,LPCSTR,LPCSTR);
-BOOL WINAPI DefineDosDeviceW(DWORD,LPCWSTR,LPCWSTR);
-#define DefineHandleTable(w) ((w),TRUE)
-BOOL WINAPI DeleteAce(PACL,DWORD);
-ATOM WINAPI DeleteAtom(ATOM);
-void WINAPI DeleteCriticalSection(PCRITICAL_SECTION);
-void WINAPI DeleteFiber(PVOID);
-BOOL WINAPI DeleteFileA(LPCSTR);
-BOOL WINAPI DeleteFileW(LPCWSTR);
-BOOL WINAPI DeregisterEventSource(HANDLE);
-BOOL WINAPI DestroyPrivateObjectSecurity(PSECURITY_DESCRIPTOR*);
-BOOL WINAPI DeviceIoControl(HANDLE,DWORD,PVOID,DWORD,PVOID,DWORD,PDWORD,POVERLAPPED);
-BOOL WINAPI DisableThreadLibraryCalls(HMODULE);
-BOOL WINAPI DisconnectNamedPipe(HANDLE);
-BOOL WINAPI DosDateTimeToFileTime(WORD,WORD,LPFILETIME);
-BOOL WINAPI DuplicateHandle(HANDLE,HANDLE,HANDLE,PHANDLE,DWORD,BOOL,DWORD);
-BOOL WINAPI DuplicateToken(HANDLE,SECURITY_IMPERSONATION_LEVEL,PHANDLE);
-BOOL WINAPI DuplicateTokenEx(HANDLE,DWORD,LPSECURITY_ATTRIBUTES,SECURITY_IMPERSONATION_LEVEL,TOKEN_TYPE,PHANDLE);
-BOOL WINAPI EndUpdateResourceA(HANDLE,BOOL);
-BOOL WINAPI EndUpdateResourceW(HANDLE,BOOL);
-void WINAPI EnterCriticalSection(LPCRITICAL_SECTION);
-BOOL WINAPI EnumResourceLanguagesA(HINSTANCE,LPCSTR,LPCSTR,ENUMRESLANGPROC,LONG);
-BOOL WINAPI EnumResourceLanguagesW(HINSTANCE,LPCWSTR,LPCWSTR,ENUMRESLANGPROC,LONG);
-BOOL WINAPI EnumResourceNamesA(HINSTANCE,LPCSTR,ENUMRESNAMEPROC,LONG);
-BOOL WINAPI EnumResourceNamesW(HINSTANCE,LPCWSTR,ENUMRESNAMEPROC,LONG);
-BOOL WINAPI EnumResourceTypesA(HINSTANCE,ENUMRESTYPEPROC,LONG);
-BOOL WINAPI EnumResourceTypesW(HINSTANCE,ENUMRESTYPEPROC,LONG);
-BOOL WINAPI EqualPrefixSid(PSID,PSID);
-BOOL WINAPI EqualSid(PSID,PSID);
-DWORD WINAPI EraseTape(HANDLE,DWORD,BOOL);
-BOOL WINAPI EscapeCommFunction(HANDLE,DWORD);
-DECLSPEC_NORETURN void WINAPI ExitProcess(UINT);
-DECLSPEC_NORETURN void WINAPI ExitThread(DWORD);
-DWORD WINAPI ExpandEnvironmentStringsA(LPCSTR,LPSTR,DWORD);
-DWORD WINAPI ExpandEnvironmentStringsW(LPCWSTR,LPWSTR,DWORD);
-void WINAPI FatalAppExitA(UINT,LPCSTR);
-void WINAPI FatalAppExitW(UINT,LPCWSTR);
-void WINAPI FatalExit(int);
-BOOL WINAPI FileTimeToDosDateTime(CONST FILETIME *,LPWORD,LPWORD);
-BOOL WINAPI FileTimeToLocalFileTime(FILETIME *,LPFILETIME);
-BOOL WINAPI FileTimeToSystemTime(CONST FILETIME *,LPSYSTEMTIME);
-ATOM WINAPI FindAtomA(LPCSTR);
-ATOM WINAPI FindAtomW(LPCWSTR);
-BOOL WINAPI FindClose(HANDLE);
-BOOL WINAPI FindCloseChangeNotification(HANDLE);
-HANDLE WINAPI FindFirstChangeNotificationA(LPCSTR,BOOL,DWORD);
-HANDLE WINAPI FindFirstChangeNotificationW(LPCWSTR,BOOL,DWORD);
-HANDLE WINAPI FindFirstFileA(LPCSTR,LPWIN32_FIND_DATAA);
-HANDLE WINAPI FindFirstFileW(LPCWSTR,LPWIN32_FIND_DATAW);
-HANDLE WINAPI FindFirstFileExA(LPCSTR,FINDEX_INFO_LEVELS,PVOID,FINDEX_SEARCH_OPS,PVOID,DWORD);
-HANDLE WINAPI FindFirstFileExW(LPCWSTR,FINDEX_INFO_LEVELS,PVOID,FINDEX_SEARCH_OPS,PVOID,DWORD);
-BOOL WINAPI FindFirstFreeAce(PACL,PVOID*);
-BOOL WINAPI FindNextChangeNotification(HANDLE);
-BOOL WINAPI FindNextFileA(HANDLE,LPWIN32_FIND_DATAA);
-BOOL WINAPI FindNextFileW(HANDLE,LPWIN32_FIND_DATAW);
-HRSRC WINAPI FindResourceA(HMODULE,LPCSTR,LPCSTR);
-HRSRC WINAPI FindResourceW(HINSTANCE,LPCWSTR,LPCWSTR);
-HRSRC WINAPI FindResourceExA(HINSTANCE,LPCSTR,LPCSTR,WORD);
-HRSRC WINAPI FindResourceExW(HINSTANCE,LPCWSTR,LPCWSTR,WORD);
-BOOL WINAPI FlushFileBuffers(HANDLE);
-BOOL WINAPI FlushInstructionCache(HANDLE,PCVOID,DWORD);
-BOOL WINAPI FlushViewOfFile(PCVOID,DWORD);
-DWORD WINAPI FormatMessageA(DWORD,PCVOID,DWORD,DWORD,LPSTR,DWORD,va_list*);
-DWORD WINAPI FormatMessageW(DWORD,PCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list*);
-BOOL WINAPI FreeEnvironmentStringsA(LPSTR);
-BOOL WINAPI FreeEnvironmentStringsW(LPWSTR);
-BOOL WINAPI FreeLibrary(HMODULE);
-void WINAPI FreeLibraryAndExitThread(HMODULE,DWORD);
-#define FreeModule(m) FreeLibrary(m)
-#define FreeProcInstance(p) (void)(p)
-BOOL WINAPI FreeResource(HGLOBAL);
-PVOID WINAPI FreeSid(PSID);
-BOOL WINAPI GetAce(PACL,DWORD,PVOID);
-BOOL WINAPI GetAclInformation(PACL,PVOID,DWORD,ACL_INFORMATION_CLASS);
-UINT WINAPI GetAtomNameA(ATOM,LPSTR,int);
-UINT WINAPI GetAtomNameW(ATOM,LPWSTR,int);
-BOOL WINAPI GetBinaryTypeA(LPCSTR,PDWORD);
-BOOL WINAPI GetBinaryTypeW(LPCWSTR,PDWORD);
-LPSTR WINAPI GetCommandLineA(VOID);
-LPWSTR WINAPI GetCommandLineW(VOID);
-BOOL WINAPI GetCommConfig(HANDLE,LPCOMMCONFIG,PDWORD);
-BOOL WINAPI GetCommMask(HANDLE,PDWORD);
-BOOL WINAPI GetCommModemStatus(HANDLE,PDWORD);
-BOOL WINAPI GetCommProperties(HANDLE,LPCOMMPROP);
-BOOL WINAPI GetCommState(HANDLE,LPDCB);
-BOOL WINAPI GetCommTimeouts(HANDLE,LPCOMMTIMEOUTS);
-DWORD WINAPI GetCompressedFileSizeA(LPCSTR,PDWORD);
-DWORD WINAPI GetCompressedFileSizeW(LPCWSTR,PDWORD);
-BOOL WINAPI GetComputerNameA(LPSTR,PDWORD);
-BOOL WINAPI GetComputerNameW(LPWSTR,PDWORD);
-DWORD WINAPI GetCurrentDirectoryA(DWORD,LPSTR);
-DWORD WINAPI GetCurrentDirectoryW(DWORD,LPWSTR);
-BOOL WINAPI GetCurrentHwProfileA(LPHW_PROFILE_INFOA);
-BOOL WINAPI GetCurrentHwProfileW(LPHW_PROFILE_INFOW);
-HANDLE WINAPI GetCurrentProcess(void);
-DWORD WINAPI GetCurrentProcessId(void);
-HANDLE WINAPI GetCurrentThread(void);
-DWORD WINAPI GetCurrentThreadId(void);
-#define GetCurrentTime GetTickCount
-BOOL WINAPI GetDefaultCommConfigA(LPCSTR,LPCOMMCONFIG,PDWORD);
-BOOL WINAPI GetDefaultCommConfigW(LPCWSTR,LPCOMMCONFIG,PDWORD);
-BOOL WINAPI GetDiskFreeSpaceA(LPCSTR,PDWORD,PDWORD,PDWORD,PDWORD);
-BOOL WINAPI GetDiskFreeSpaceW(LPCWSTR,PDWORD,PDWORD,PDWORD,PDWORD);
-BOOL WINAPI GetDiskFreeSpaceExA(LPCSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER);
-BOOL WINAPI GetDiskFreeSpaceExW(LPCWSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER);
-UINT WINAPI GetDriveTypeA(LPCSTR);
-UINT WINAPI GetDriveTypeW(LPCWSTR);
-LPSTR WINAPI GetEnvironmentStrings(void);
-LPSTR WINAPI GetEnvironmentStringsA(void);
-LPWSTR WINAPI GetEnvironmentStringsW(void);
-DWORD WINAPI GetEnvironmentVariableA(LPCSTR,LPSTR,DWORD);
-DWORD WINAPI GetEnvironmentVariableW(LPCWSTR,LPWSTR,DWORD);
-BOOL WINAPI GetExitCodeProcess(HANDLE,PDWORD);
-BOOL WINAPI GetExitCodeThread(HANDLE,PDWORD);
-DWORD WINAPI GetFileAttributesA(LPCSTR);
-DWORD WINAPI GetFileAttributesW(LPCWSTR);
-BOOL WINAPI GetFileAttributesExA(LPCSTR,GET_FILEEX_INFO_LEVELS,PVOID);
-BOOL WINAPI GetFileAttributesExW(LPCSTR,GET_FILEEX_INFO_LEVELS,PVOID);
-BOOL WINAPI GetFileInformationByHandle(HANDLE,LPBY_HANDLE_FILE_INFORMATION);
-BOOL WINAPI GetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
-BOOL WINAPI GetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
-DWORD WINAPI GetFileSize(HANDLE,PDWORD);
-BOOL WINAPI GetFileTime(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME);
-DWORD WINAPI GetFileType(HANDLE);
-#define GetFreeSpace(w) (0x100000L)
-DWORD WINAPI GetFullPathNameA(LPCSTR,DWORD,LPSTR,LPSTR*);
-DWORD WINAPI GetFullPathNameW(LPCWSTR,DWORD,LPWSTR,LPWSTR*);
-BOOL WINAPI GetHandleInformation(HANDLE,PDWORD);
-BOOL WINAPI GetKernelObjectSecurity(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
-DWORD WINAPI GetLengthSid(PSID);
-void WINAPI GetLocalTime(LPSYSTEMTIME);
-DWORD WINAPI GetLogicalDrives(void);
-DWORD WINAPI GetLogicalDriveStringsA(DWORD,LPSTR);
-DWORD WINAPI GetLogicalDriveStringsW(DWORD,LPWSTR);
-DWORD WINAPI GetLongPathNameA(LPCSTR,LPSTR,DWORD);
-DWORD WINAPI GetLongPathNameW(LPCWSTR,LPWSTR,DWORD);
-BOOL WINAPI GetMailslotInfo(HANDLE,PDWORD,PDWORD,PDWORD,PDWORD);
-DWORD WINAPI GetModuleFileNameA(HINSTANCE,LPSTR,DWORD);
-DWORD WINAPI GetModuleFileNameW(HINSTANCE,LPWSTR,DWORD);
-HMODULE WINAPI GetModuleHandleA(LPCSTR);
-HMODULE WINAPI GetModuleHandleW(LPCWSTR);
-BOOL WINAPI GetNamedPipeHandleStateA(HANDLE,PDWORD,PDWORD,PDWORD,PDWORD,LPSTR,DWORD);
-BOOL WINAPI GetNamedPipeHandleStateW(HANDLE,PDWORD,PDWORD,PDWORD,PDWORD,LPWSTR,DWORD);
-BOOL WINAPI GetNamedPipeInfo(HANDLE,PDWORD,PDWORD,PDWORD,PDWORD);
-BOOL WINAPI GetNumberOfEventLogRecords(HANDLE,PDWORD);
-BOOL WINAPI GetOldestEventLogRecord(HANDLE,PDWORD);
-BOOL WINAPI GetOverlappedResult(HANDLE,LPOVERLAPPED,PDWORD,BOOL);
-DWORD WINAPI GetPriorityClass(HANDLE);
-BOOL WINAPI GetPrivateObjectSecurity(PSECURITY_DESCRIPTOR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
-UINT WINAPI GetPrivateProfileIntA(LPCSTR,LPCSTR,INT,LPCSTR);
-UINT WINAPI GetPrivateProfileIntW(LPCWSTR,LPCWSTR,INT,LPCWSTR);
-DWORD WINAPI GetPrivateProfileSectionA(LPCSTR,LPSTR,DWORD,LPCSTR);
-DWORD WINAPI GetPrivateProfileSectionW(LPCWSTR,LPWSTR,DWORD,LPCWSTR);
-DWORD WINAPI GetPrivateProfileSectionNamesA(LPSTR,DWORD,LPCSTR);
-DWORD WINAPI GetPrivateProfileSectionNamesW(LPWSTR,DWORD,LPCWSTR);
-DWORD WINAPI GetPrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPSTR,DWORD,LPCSTR);
-DWORD WINAPI GetPrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,DWORD,LPCWSTR);
-BOOL WINAPI GetPrivateProfileStructA(LPCSTR,LPCSTR,PVOID,UINT,LPCSTR);
-BOOL WINAPI GetPrivateProfileStructW(LPCWSTR,LPCWSTR,PVOID,UINT,LPCWSTR);
-FARPROC WINAPI GetProcAddress(HINSTANCE,LPCSTR);
-BOOL WINAPI GetProcessAffinityMask(HANDLE,PDWORD,PDWORD);
-HANDLE WINAPI GetProcessHeap(VOID);
-DWORD WINAPI GetProcessHeaps(DWORD,PHANDLE);
-BOOL WINAPI GetProcessPriorityBoost(HANDLE,PBOOL);
-BOOL WINAPI GetProcessShutdownParameters(PDWORD,PDWORD);
-BOOL WINAPI GetProcessTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME);
-DWORD WINAPI GetProcessVersion(DWORD);
-HWINSTA WINAPI GetProcessWindowStation(void);
-BOOL WINAPI GetProcessWorkingSetSize(HANDLE,PDWORD,PDWORD);
-UINT WINAPI GetProfileIntA(LPCSTR,LPCSTR,INT);
-UINT WINAPI GetProfileIntW(LPCWSTR,LPCWSTR,INT);
-DWORD WINAPI GetProfileSectionA(LPCSTR,LPSTR,DWORD);
-DWORD WINAPI GetProfileSectionW(LPCWSTR,LPWSTR,DWORD);
-DWORD WINAPI GetProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPSTR,DWORD);
-DWORD WINAPI GetProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,DWORD);
-BOOL WINAPI GetQueuedCompletionStatus(HANDLE,PDWORD,PDWORD,LPOVERLAPPED*,DWORD);
-BOOL WINAPI GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR_CONTROL,PDWORD);
-BOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL*,LPBOOL);
-BOOL WINAPI GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID*,LPBOOL);
-DWORD WINAPI GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR);
-BOOL WINAPI GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID*,LPBOOL);
-BOOL WINAPI GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL*,LPBOOL);
-DWORD WINAPI GetShortPathNameA(LPCSTR,LPSTR,DWORD);
-DWORD WINAPI GetShortPathNameW(LPCWSTR,LPWSTR,DWORD);
-PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID);
-DWORD WINAPI GetSidLengthRequired(UCHAR);
-PDWORD WINAPI GetSidSubAuthority(PSID,DWORD);
-PUCHAR WINAPI GetSidSubAuthorityCount(PSID);
-VOID WINAPI GetStartupInfoA(LPSTARTUPINFOA);
-VOID WINAPI GetStartupInfoW(LPSTARTUPINFOW);
-HANDLE WINAPI GetStdHandle(DWORD);
-UINT WINAPI GetSystemDirectoryA(LPSTR,UINT);
-UINT WINAPI GetSystemDirectoryW(LPWSTR,UINT);
-VOID WINAPI GetSystemInfo(LPSYSTEM_INFO);
-BOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS);
-VOID WINAPI GetSystemTime(LPSYSTEMTIME);
-BOOL WINAPI GetSystemTimeAdjustment(PDWORD,PDWORD,PBOOL);
-void WINAPI GetSystemTimeAsFileTime(LPFILETIME);
-DWORD WINAPI GetTapeParameters(HANDLE,DWORD,PDWORD,PVOID);
-DWORD WINAPI GetTapePosition(HANDLE,DWORD,PDWORD,PDWORD,PDWORD);
-DWORD WINAPI GetTapeStatus(HANDLE);
-UINT WINAPI GetTempFileNameA(LPCSTR,LPCSTR,UINT,LPSTR);
-UINT WINAPI GetTempFileNameW(LPCWSTR,LPCWSTR,UINT,LPWSTR);
-DWORD WINAPI GetTempPathA(DWORD,LPSTR);
-DWORD WINAPI GetTempPathW(DWORD,LPWSTR);
-BOOL WINAPI GetThreadContext(HANDLE,LPCONTEXT);
-int WINAPI GetThreadPriority(HANDLE);
-BOOL WINAPI GetThreadPriorityBoost(HANDLE,PBOOL);
-BOOL WINAPI GetThreadSelectorEntry(HANDLE,DWORD,LPLDT_ENTRY);
-BOOL WINAPI GetThreadTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME);
-DWORD WINAPI GetTickCount(void);
-DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION);
-BOOL WINAPI GetTokenInformation(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,DWORD,PDWORD);
-BOOL WINAPI GetUserNameA (LPSTR,PDWORD);
-BOOL WINAPI GetUserNameW(LPWSTR,PDWORD);
-DWORD WINAPI GetVersion(void);
-BOOL WINAPI GetVersionExA(LPOSVERSIONINFOA);
-BOOL WINAPI GetVersionExW(LPOSVERSIONINFOW);
-BOOL WINAPI GetVolumeInformationA(LPCSTR,LPSTR,DWORD,PDWORD,PDWORD,PDWORD,LPSTR,DWORD);
-BOOL WINAPI GetVolumeInformationW(LPCWSTR,LPWSTR,DWORD,PDWORD,PDWORD,PDWORD,LPWSTR,DWORD);
-UINT WINAPI GetWindowsDirectoryA(LPSTR,UINT);
-UINT WINAPI GetWindowsDirectoryW(LPWSTR,UINT);
-DWORD WINAPI GetWindowThreadProcessId(HWND,PDWORD);
-ATOM WINAPI GlobalAddAtomA(LPCSTR);
-ATOM WINAPI GlobalAddAtomW( LPCWSTR);
-HGLOBAL WINAPI GlobalAlloc(UINT,DWORD);
-UINT WINAPI GlobalCompact(DWORD);
-ATOM WINAPI GlobalDeleteAtom(ATOM);
-HGLOBAL GlobalDiscard(HGLOBAL);
-ATOM WINAPI GlobalFindAtomA(LPCSTR);
-ATOM WINAPI GlobalFindAtomW(LPCWSTR);
-VOID WINAPI GlobalFix(HGLOBAL);
-UINT WINAPI GlobalFlags(HGLOBAL);
-HGLOBAL WINAPI GlobalFree(HGLOBAL);
-UINT WINAPI GlobalGetAtomNameA(ATOM,LPSTR,int);
-UINT WINAPI GlobalGetAtomNameW(ATOM,LPWSTR,int);
-HGLOBAL WINAPI GlobalHandle(PCVOID);
-LPVOID WINAPI GlobalLock(HGLOBAL);
-VOID WINAPI GlobalMemoryStatus(LPMEMORYSTATUS);
-HGLOBAL WINAPI GlobalReAlloc(HGLOBAL,DWORD,UINT);
-DWORD WINAPI GlobalSize(HGLOBAL);
-VOID WINAPI GlobalUnfix(HGLOBAL);
-BOOL WINAPI GlobalUnlock(HGLOBAL);
-BOOL WINAPI GlobalUnWire(HGLOBAL);
-PVOID WINAPI GlobalWire(HGLOBAL);
-PVOID WINAPI HeapAlloc(HANDLE,DWORD,DWORD);
-UINT WINAPI HeapCompact(HANDLE,DWORD);
-HANDLE WINAPI HeapCreate(DWORD,DWORD,DWORD);
-BOOL WINAPI HeapDestroy(HANDLE);
-BOOL WINAPI HeapFree(HANDLE,DWORD,PVOID);
-BOOL WINAPI HeapLock(HANDLE);
-PVOID WINAPI HeapReAlloc(HANDLE,DWORD,PVOID,DWORD);
-DWORD WINAPI HeapSize(HANDLE,DWORD,PCVOID);
-BOOL WINAPI HeapUnlock(HANDLE);
-BOOL WINAPI HeapValidate(HANDLE,DWORD,PCVOID);
-BOOL WINAPI HeapWalk(HANDLE,LPPROCESS_HEAP_ENTRY);
-BOOL WINAPI ImpersonateLoggedOnUser(HANDLE);
-BOOL WINAPI ImpersonateNamedPipeClient(HANDLE);
-BOOL WINAPI ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL);
-BOOL WINAPI InitAtomTable(DWORD);
-BOOL WINAPI InitializeAcl(PACL,DWORD,DWORD);
-VOID WINAPI InitializeCriticalSection(LPCRITICAL_SECTION);
-BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
-BOOL WINAPI InitializeSid (PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
-PVOID WINAPI InterlockedCompareExchange(PVOID*,PVOID,PVOID);
-LONG WINAPI InterlockedDecrement(LPLONG);
-LONG WINAPI InterlockedExchange(PLONG,LONG);
-LONG WINAPI InterlockedExchangeAdd(PLONG,LONG);
-LONG WINAPI InterlockedIncrement(LPLONG);
-BOOL WINAPI IsBadCodePtr(FARPROC);
-BOOL WINAPI IsBadHugeReadPtr(PCVOID,UINT);
-BOOL WINAPI IsBadHugeWritePtr(PVOID,UINT);
-BOOL WINAPI IsBadReadPtr(PCVOID,UINT);
-BOOL WINAPI IsBadStringPtrA(LPCSTR,UINT);
-BOOL WINAPI IsBadStringPtrW(LPCWSTR,UINT);
-BOOL WINAPI IsBadWritePtr(PVOID,UINT);
-BOOL WINAPI IsDebuggerPresent(void);
-BOOL WINAPI IsProcessorFeaturePresent(DWORD);
-BOOL WINAPI IsTextUnicode(PCVOID,int,LPINT);
-BOOL WINAPI IsValidAcl(PACL);
-BOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
-BOOL WINAPI IsValidSid(PSID);
-void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION);
-#define LimitEmsPages(n)
-HINSTANCE WINAPI LoadLibraryA(LPCSTR);
-HINSTANCE WINAPI LoadLibraryExA(LPCSTR,HANDLE,DWORD);
-HINSTANCE WINAPI LoadLibraryExW(LPCWSTR,HANDLE,DWORD);
-HINSTANCE WINAPI LoadLibraryW(LPCWSTR);
-DWORD WINAPI LoadModule(LPCSTR,PVOID);
-HGLOBAL WINAPI LoadResource(HINSTANCE,HRSRC);
-HLOCAL WINAPI LocalAlloc(UINT,UINT);
-UINT WINAPI LocalCompact(UINT);
-HLOCAL LocalDiscard(HLOCAL);
-BOOL WINAPI LocalFileTimeToFileTime(CONST FILETIME *,LPFILETIME);
-UINT WINAPI LocalFlags(HLOCAL);
-HLOCAL WINAPI LocalFree(HLOCAL);
-HLOCAL WINAPI LocalHandle(LPCVOID);
-PVOID WINAPI LocalLock(HLOCAL);
-HLOCAL WINAPI LocalReAlloc(HLOCAL,UINT,UINT);
-UINT WINAPI LocalShrink(HLOCAL,UINT);
-UINT WINAPI LocalSize(HLOCAL);
-BOOL WINAPI LocalUnlock(HLOCAL);
-BOOL WINAPI LockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
-BOOL WINAPI LockFileEx(HANDLE,DWORD,DWORD,DWORD,DWORD,LPOVERLAPPED);
-PVOID WINAPI LockResource(HGLOBAL);
-#define LockSegment(w) GlobalFix((HANDLE)(w))
-BOOL WINAPI LogonUserA(LPSTR,LPSTR,LPSTR,DWORD,DWORD,PHANDLE);
-BOOL WINAPI LogonUserW(LPWSTR,LPWSTR,LPWSTR,DWORD,DWORD,PHANDLE);
-BOOL WINAPI LookupAccountNameA(LPCSTR,LPCSTR,PSID,PDWORD,LPSTR,PDWORD,PSID_NAME_USE);
-BOOL WINAPI LookupAccountNameW(LPCWSTR,LPCWSTR,PSID,PDWORD,LPWSTR,PDWORD,PSID_NAME_USE);
-BOOL WINAPI LookupAccountSidA(LPCSTR,PSID,LPSTR,PDWORD,LPSTR,PDWORD,PSID_NAME_USE);
-BOOL WINAPI LookupAccountSidW(LPCWSTR,PSID,LPWSTR,PDWORD,LPWSTR,PDWORD,PSID_NAME_USE);
-BOOL WINAPI LookupPrivilegeDisplayNameA(LPCSTR,LPCSTR,LPSTR,PDWORD,PDWORD);
-BOOL WINAPI LookupPrivilegeDisplayNameW(LPCWSTR,LPCWSTR,LPWSTR,PDWORD,PDWORD);
-BOOL WINAPI LookupPrivilegeNameA(LPCSTR,PLUID,LPSTR,PDWORD);
-BOOL WINAPI LookupPrivilegeNameW(LPCWSTR,PLUID,LPWSTR,PDWORD);
-BOOL WINAPI LookupPrivilegeValueA(LPCSTR,LPCSTR,PLUID);
-BOOL WINAPI LookupPrivilegeValueW(LPCWSTR,LPCWSTR,PLUID);
-LPSTR WINAPI lstrcatA(LPSTR,LPCSTR);
-LPWSTR WINAPI lstrcatW(LPWSTR,LPCWSTR);
-int WINAPI lstrcmpA(LPCSTR,LPCSTR);
-int WINAPI lstrcmpiA(LPCSTR,LPCSTR);
-int WINAPI lstrcmpiW( LPCWSTR,LPCWSTR);
-int WINAPI lstrcmpW(LPCWSTR,LPCWSTR);
-LPSTR WINAPI lstrcpyA(LPSTR,LPCSTR);
-LPSTR WINAPI lstrcpynA(LPSTR,LPCSTR,int);
-LPWSTR WINAPI lstrcpynW(LPWSTR,LPCWSTR,int);
-LPWSTR WINAPI lstrcpyW(LPWSTR,LPCWSTR);
-int WINAPI lstrlenA(LPCSTR);
-int WINAPI lstrlenW(LPCWSTR);
-BOOL WINAPI MakeAbsoluteSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PDWORD,PACL,PDWORD,PACL,PDWORD,PSID,PDWORD,PSID,PDWORD);
-#define MakeProcInstance(p,i) (p)
-BOOL WINAPI MakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PDWORD);
-VOID WINAPI MapGenericMask(PDWORD,PGENERIC_MAPPING);
-PVOID WINAPI MapViewOfFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
-PVOID WINAPI MapViewOfFileEx(HANDLE,DWORD,DWORD,DWORD,DWORD,PVOID);
-BOOL WINAPI MoveFileA(LPCSTR,LPCSTR);
-BOOL WINAPI MoveFileExA(LPCSTR,LPCSTR,DWORD);
-BOOL WINAPI MoveFileExW(LPCWSTR,LPCWSTR,DWORD);
-BOOL WINAPI MoveFileW(LPCWSTR,LPCWSTR);
-int WINAPI MulDiv(int,int,int);
-BOOL WINAPI NotifyChangeEventLog(HANDLE,HANDLE);
-BOOL WINAPI ObjectCloseAuditAlarmA(LPCSTR,PVOID,BOOL);
-BOOL WINAPI ObjectCloseAuditAlarmW(LPCWSTR,PVOID,BOOL);
-BOOL WINAPI ObjectDeleteAuditAlarmA(LPCSTR,PVOID,BOOL);
-BOOL WINAPI ObjectDeleteAuditAlarmW(LPCWSTR,PVOID,BOOL);
-BOOL WINAPI ObjectOpenAuditAlarmA(LPCSTR,PVOID,LPSTR,LPSTR,PSECURITY_DESCRIPTOR,HANDLE,DWORD,DWORD,PPRIVILEGE_SET,BOOL,BOOL,PBOOL);
-BOOL WINAPI ObjectOpenAuditAlarmW(LPCWSTR,PVOID,LPWSTR,LPWSTR,PSECURITY_DESCRIPTOR,HANDLE,DWORD,DWORD,PPRIVILEGE_SET,BOOL,BOOL,PBOOL);
-BOOL WINAPI ObjectPrivilegeAuditAlarmA(LPCSTR,PVOID,HANDLE,DWORD,PPRIVILEGE_SET,BOOL);
-BOOL WINAPI ObjectPrivilegeAuditAlarmW(LPCWSTR,PVOID,HANDLE,DWORD,PPRIVILEGE_SET,BOOL);
-HANDLE WINAPI OpenBackupEventLogA(LPCSTR,LPCSTR);
-HANDLE WINAPI OpenBackupEventLogW(LPCWSTR,LPCWSTR);
-HANDLE WINAPI OpenEventA(DWORD,BOOL,LPCSTR);
-HANDLE WINAPI OpenEventLogA (LPCSTR,LPCSTR);
-HANDLE WINAPI OpenEventLogW(LPCWSTR,LPCWSTR);
-HANDLE WINAPI OpenEventW(DWORD,BOOL,LPCWSTR);
-HFILE WINAPI OpenFile(LPCSTR,LPOFSTRUCT,UINT);
-HANDLE WINAPI OpenFileMappingA(DWORD,BOOL,LPCSTR);
-HANDLE WINAPI OpenFileMappingW(DWORD,BOOL,LPCWSTR);
-HANDLE WINAPI OpenMutexA(DWORD,BOOL,LPCSTR);
-HANDLE WINAPI OpenMutexW(DWORD,BOOL,LPCWSTR);
-HANDLE WINAPI OpenProcess(DWORD,BOOL,DWORD);
-BOOL WINAPI OpenProcessToken(HANDLE,DWORD,PHANDLE);
-HANDLE WINAPI OpenSemaphoreA(DWORD,BOOL,LPCSTR);
-HANDLE WINAPI OpenSemaphoreW(DWORD,BOOL,LPCWSTR);
-BOOL WINAPI OpenThreadToken(HANDLE,DWORD,BOOL,PHANDLE);
-HANDLE WINAPI OpenWaitableTimerA(DWORD,BOOL,LPCSTR);
-HANDLE WINAPI OpenWaitableTimerW(DWORD,BOOL,LPCWSTR);
-void WINAPI OutputDebugStringA(LPCSTR);
-void WINAPI OutputDebugStringW(LPCWSTR);
-BOOL WINAPI PeekNamedPipe(HANDLE,PVOID,DWORD,PDWORD,PDWORD,PDWORD);
-BOOL WINAPI PostQueuedCompletionStatus(HANDLE,DWORD,DWORD,LPOVERLAPPED);
-DWORD WINAPI PrepareTape(HANDLE,DWORD,BOOL);
-BOOL WINAPI PrivilegeCheck (HANDLE,PPRIVILEGE_SET,PBOOL);
-BOOL WINAPI PrivilegedServiceAuditAlarmA(LPCSTR,LPCSTR,HANDLE,PPRIVILEGE_SET,BOOL);
-BOOL WINAPI PrivilegedServiceAuditAlarmW(LPCWSTR,LPCWSTR,HANDLE,PPRIVILEGE_SET,BOOL);
-BOOL WINAPI PulseEvent(HANDLE);
-BOOL WINAPI PurgeComm(HANDLE,DWORD);
-DWORD WINAPI QueryDosDeviceA(LPCSTR,LPSTR,DWORD);
-DWORD WINAPI QueryDosDeviceW(LPCWSTR,LPWSTR,DWORD);
-BOOL WINAPI QueryPerformanceCounter(PLARGE_INTEGER);
-BOOL WINAPI QueryPerformanceFrequency(PLARGE_INTEGER);
-DWORD WINAPI QueueUserAPC(PAPCFUNC,HANDLE,DWORD);
-void WINAPI RaiseException(DWORD,DWORD,DWORD,const DWORD*);
-BOOL WINAPI ReadDirectoryChangesW(HANDLE,PVOID,DWORD,BOOL,DWORD,PDWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
-BOOL WINAPI ReadEventLogA(HANDLE,DWORD,DWORD,PVOID,DWORD,DWORD *,DWORD *);
-BOOL WINAPI ReadEventLogW(HANDLE,DWORD,DWORD,PVOID,DWORD,DWORD *,DWORD *);
-BOOL WINAPI ReadFile(HANDLE,PVOID,DWORD,PDWORD,LPOVERLAPPED);
-BOOL WINAPI ReadFileEx(HANDLE,PVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
-BOOL WINAPI ReadProcessMemory(HANDLE,PCVOID,PVOID,DWORD,PDWORD);
-HANDLE WINAPI RegisterEventSourceA (LPCSTR,LPCSTR);
-HANDLE WINAPI RegisterEventSourceW(LPCWSTR,LPCWSTR);
-BOOL WINAPI ReleaseMutex(HANDLE);
-BOOL WINAPI ReleaseSemaphore(HANDLE,LONG,LPLONG);
-BOOL WINAPI RemoveDirectoryA(LPCSTR);
-BOOL WINAPI RemoveDirectoryW(LPCWSTR);
-BOOL WINAPI ReportEventA(HANDLE,WORD,WORD,DWORD,PSID,WORD,DWORD,LPCSTR*,PVOID);
-BOOL WINAPI ReportEventW(HANDLE,WORD,WORD,DWORD,PSID,WORD,DWORD,LPCWSTR*,PVOID);
-BOOL WINAPI ResetEvent(HANDLE);
-DWORD WINAPI ResumeThread(HANDLE);
-BOOL WINAPI RevertToSelf(void);
-DWORD WINAPI SearchPathA(LPCSTR,LPCSTR,LPCSTR,DWORD,LPSTR,LPSTR*);
-DWORD WINAPI SearchPathW(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,LPWSTR,LPWSTR*);
-BOOL WINAPI SetAclInformation(PACL,PVOID,DWORD,ACL_INFORMATION_CLASS);
-BOOL WINAPI SetCommBreak(HANDLE);
-BOOL WINAPI SetCommConfig(HANDLE,LPCOMMCONFIG,DWORD);
-BOOL WINAPI SetCommMask(HANDLE,DWORD);
-BOOL WINAPI SetCommState(HANDLE,LPDCB);
-BOOL WINAPI SetCommTimeouts(HANDLE,LPCOMMTIMEOUTS);
-BOOL WINAPI SetComputerNameA(LPCSTR);
-BOOL WINAPI SetComputerNameW(LPCWSTR);
-BOOL WINAPI SetCurrentDirectoryA(LPCSTR);
-BOOL WINAPI SetCurrentDirectoryW(LPCWSTR);
-BOOL WINAPI SetDefaultCommConfigA(LPCSTR,LPCOMMCONFIG,DWORD);
-BOOL WINAPI SetDefaultCommConfigW(LPCWSTR,LPCOMMCONFIG,DWORD);
-BOOL WINAPI SetEndOfFile(HANDLE);
-BOOL WINAPI SetEnvironmentVariableA(LPCSTR,LPCSTR);
-BOOL WINAPI SetEnvironmentVariableW(LPCWSTR,LPCWSTR);
-UINT WINAPI SetErrorMode(UINT);
-BOOL WINAPI SetEvent(HANDLE);
-VOID WINAPI SetFileApisToANSI(void);
-VOID WINAPI SetFileApisToOEM(void);
-BOOL WINAPI SetFileAttributesA(LPCSTR,DWORD);
-BOOL WINAPI SetFileAttributesW(LPCWSTR,DWORD);
-DWORD WINAPI SetFilePointer(HANDLE,LONG,PLONG,DWORD);
-BOOL WINAPI SetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
-BOOL WINAPI SetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
-BOOL WINAPI SetFileTime(HANDLE,const FILETIME*,const FILETIME*,const FILETIME*);
-UINT WINAPI SetHandleCount(UINT);
-BOOL WINAPI SetHandleInformation(HANDLE,DWORD,DWORD);
-BOOL WINAPI SetKernelObjectSecurity(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
-void WINAPI SetLastError(DWORD);
-void WINAPI SetLastErrorEx(DWORD,DWORD);
-BOOL WINAPI SetLocalTime(const SYSTEMTIME*);
-BOOL WINAPI SetMailslotInfo(HANDLE,DWORD);
-BOOL WINAPI SetNamedPipeHandleState(HANDLE,PDWORD,PDWORD,PDWORD);
-BOOL WINAPI SetPriorityClass(HANDLE,DWORD);
-BOOL WINAPI SetPrivateObjectSecurity(SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR *,PGENERIC_MAPPING,HANDLE);
-BOOL WINAPI SetProcessAffinityMask(HANDLE,DWORD);
-BOOL WINAPI SetProcessPriorityBoost(HANDLE,BOOL);
-BOOL WINAPI SetProcessShutdownParameters(DWORD,DWORD);
-BOOL WINAPI SetProcessWorkingSetSize(HANDLE,DWORD,DWORD);
-BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL);
-BOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID,BOOL);
-BOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID,BOOL);
-BOOL WINAPI SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL);
-BOOL WINAPI SetStdHandle(DWORD,HANDLE);
-#define SetSwapAreaSize(w) (w)
-BOOL WINAPI SetSystemPowerState(BOOL,BOOL);
-BOOL WINAPI SetSystemTime(const SYSTEMTIME*);
-BOOL WINAPI SetSystemTimeAdjustment(DWORD,BOOL);
-DWORD WINAPI SetTapeParameters(HANDLE,DWORD,PVOID);
-DWORD WINAPI SetTapePosition(HANDLE,DWORD,DWORD,DWORD,DWORD,BOOL);
-DWORD WINAPI SetThreadAffinityMask(HANDLE,DWORD);
-BOOL WINAPI SetThreadContext(HANDLE,const CONTEXT*);
-DWORD WINAPI SetThreadIdealProcessor(HANDLE,DWORD);
-BOOL WINAPI SetThreadPriority(HANDLE,int);
-BOOL WINAPI SetThreadPriorityBoost(HANDLE,BOOL);
-BOOL WINAPI SetThreadToken (PHANDLE,HANDLE);
-BOOL WINAPI SetTimeZoneInformation(const TIME_ZONE_INFORMATION *);
-BOOL WINAPI SetTokenInformation(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,DWORD);
-LPTOP_LEVEL_EXCEPTION_FILTER WINAPI SetUnhandledExceptionFilter(LPTOP_LEVEL_EXCEPTION_FILTER);
-BOOL WINAPI SetupComm(HANDLE,DWORD,DWORD);
-BOOL WINAPI SetVolumeLabelA(LPCSTR,LPCSTR);
-BOOL WINAPI SetVolumeLabelW(LPCWSTR,LPCWSTR);
-BOOL WINAPI SetWaitableTimer(HANDLE,const LARGE_INTEGER*,LONG,PTIMERAPCROUTINE,PVOID,BOOL);
-BOOL WINAPI SignalObjectAndWait(HANDLE,HANDLE,DWORD,BOOL);
-DWORD WINAPI SizeofResource(HINSTANCE,HRSRC);
-void WINAPI Sleep(DWORD);
-DWORD WINAPI SleepEx(DWORD,BOOL);
-DWORD WINAPI SuspendThread(HANDLE);
-void WINAPI SwitchToFiber(PVOID);
-BOOL WINAPI SwitchToThread(void);
-BOOL WINAPI SystemTimeToFileTime(const SYSTEMTIME*,LPFILETIME);
-BOOL WINAPI SystemTimeToTzSpecificLocalTime(LPTIME_ZONE_INFORMATION,LPSYSTEMTIME,LPSYSTEMTIME);
-BOOL WINAPI TerminateProcess(HANDLE,UINT);
-BOOL WINAPI TerminateThread(HANDLE,DWORD);
-DWORD WINAPI TlsAlloc(VOID);
-BOOL WINAPI TlsFree(DWORD);
-PVOID WINAPI TlsGetValue(DWORD);
-BOOL WINAPI TlsSetValue(DWORD,PVOID);
-BOOL WINAPI TransactNamedPipe(HANDLE,PVOID,DWORD,PVOID,DWORD,PDWORD,LPOVERLAPPED);
-BOOL WINAPI TransmitCommChar(HANDLE,char);
-BOOL WINAPI TryEnterCriticalSection(LPCRITICAL_SECTION);
-LONG WINAPI UnhandledExceptionFilter(LPEXCEPTION_POINTERS);
-BOOL WINAPI UnlockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
-BOOL WINAPI UnlockFileEx(HANDLE,DWORD,DWORD,DWORD,LPOVERLAPPED);
-#define UnlockResource(h) (h)
-#define UnlockSegment(w) GlobalUnfix((HANDLE)(w))
-BOOL WINAPI UnmapViewOfFile(PVOID);
-BOOL WINAPI UpdateResourceA(HANDLE,LPCSTR,LPCSTR,WORD,PVOID,DWORD);
-BOOL WINAPI UpdateResourceW(HANDLE,LPCWSTR,LPCWSTR,WORD,PVOID,DWORD);
-PVOID WINAPI VirtualAlloc(PVOID,DWORD,DWORD,DWORD);
-BOOL WINAPI VirtualFree(PVOID,DWORD,DWORD);
-BOOL WINAPI VirtualFreeEx(HANDLE,PVOID,DWORD,DWORD);
-BOOL WINAPI VirtualLock(PVOID,DWORD);
-BOOL WINAPI VirtualProtect(PVOID,DWORD,DWORD,PDWORD);
-BOOL WINAPI VirtualProtectEx(HANDLE,PVOID,DWORD,DWORD,PDWORD);
-DWORD WINAPI VirtualQuery(LPCVOID,PMEMORY_BASIC_INFORMATION,DWORD);
-DWORD WINAPI VirtualQueryEx(HANDLE,LPCVOID,PMEMORY_BASIC_INFORMATION,DWORD);
-BOOL WINAPI VirtualUnlock(PVOID,DWORD);
-BOOL WINAPI WaitCommEvent(HANDLE,PDWORD,LPOVERLAPPED);
-BOOL WINAPI WaitForDebugEvent(LPDEBUG_EVENT,DWORD);
-DWORD WINAPI WaitForMultipleObjects(DWORD,const HANDLE*,BOOL,DWORD);
-DWORD WINAPI WaitForMultipleObjectsEx(DWORD,const HANDLE*,BOOL,DWORD,BOOL);
-DWORD WINAPI WaitForSingleObject(HANDLE,DWORD);
-DWORD WINAPI WaitForSingleObjectEx(HANDLE,DWORD,BOOL);
-BOOL WINAPI WaitNamedPipeA(LPCSTR,DWORD);
-BOOL WINAPI WaitNamedPipeW(LPCWSTR,DWORD);
-BOOL WINAPI WinLoadTrustProvider(GUID*);
-BOOL WINAPI WriteFile(HANDLE,PCVOID,DWORD,PDWORD,LPOVERLAPPED);
-BOOL WINAPI WriteFileEx(HANDLE,PCVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
-BOOL WINAPI WritePrivateProfileSectionA(LPCSTR,LPCSTR,LPCSTR);
-BOOL WINAPI WritePrivateProfileSectionW(LPCWSTR,LPCWSTR,LPCWSTR);
-BOOL WINAPI WritePrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
-BOOL WINAPI WritePrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
-BOOL WINAPI WritePrivateProfileStructA(LPCSTR,LPCSTR,PVOID,UINT,LPCSTR);
-BOOL WINAPI WritePrivateProfileStructW(LPCWSTR,LPCWSTR,PVOID,UINT,LPCWSTR);
-BOOL WINAPI WriteProcessMemory(HANDLE,PVOID,PVOID,DWORD,PDWORD);
-BOOL WINAPI WriteProfileSectionA(LPCSTR,LPCSTR);
-BOOL WINAPI WriteProfileSectionW(LPCWSTR,LPCWSTR);
-BOOL WINAPI WriteProfileStringA(LPCSTR,LPCSTR,LPCSTR);
-BOOL WINAPI WriteProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR);
-DWORD WINAPI WriteTapemark(HANDLE,DWORD,DWORD,BOOL);
-#define Yield()
-
-#ifdef UNICODE
-typedef STARTUPINFOW STARTUPINFO,*LPSTARTUPINFO;
-typedef WIN32_FIND_DATAW WIN32_FIND_DATA,*LPWIN32_FIND_DATA;
-typedef HW_PROFILE_INFOW HW_PROFILE_INFO,*LPHW_PROFILE_INFO;
-typedef OSVERSIONINFOW OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO;
-#define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmW
-#define AddAtom AddAtomW
-#define BackupEventLog BackupEventLogW
-#define BeginUpdateResource BeginUpdateResourceW
-#define BuildCommDCB BuildCommDCBW
-#define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsW
-#define CallNamedPipe CallNamedPipeW
-#define ClearEventLog ClearEventLogW
-#define CommConfigDialog CommConfigDialogW
-#define CopyFile CopyFileW
-#define CopyFileEx CopyFileExW
-#define CreateDirectory CreateDirectoryW
-#define CreateDirectoryEx CreateDirectoryExW
-#define CreateEvent CreateEventW
-#define CreateFile CreateFileW
-#define CreateFileMapping CreateFileMappingW
-#define CreateCreateHardLink CreateCreateHardLinkW
-#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
-#define EndUpdateResource EndUpdateResourceW
-#define EnumResourceLanguages EnumResourceLanguagesW
-#define EnumResourceNames EnumResourceNamesW
-#define EnumResourceTypes EnumResourceTypesW
-#define ExpandEnvironmentStrings ExpandEnvironmentStringsW
-#define FatalAppExit FatalAppExitW
-#define FindAtom FindAtomW
-#define FindFirstChangeNotification FindFirstChangeNotificationW
-#define FindFirstFile FindFirstFileW
-#define FindFirstFileEx FindFirstFileExW
-#define FindNextFile FindNextFileW
-#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
-#define GetDriveType GetDriveTypeW
-#define GetEnvironmentStrings GetEnvironmentStringsW
-#define GetEnvironmentVariable GetEnvironmentVariableW
-#define GetFileAttributes GetFileAttributesW
-#define GetFileSecurity GetFileSecurityW
-#define GetFileAttributesEx GetFileAttributesExW
-#define GetFullPathName GetFullPathNameW
-#define GetLogicalDriveStrings GetLogicalDriveStringsW
-#define GetLongPathName GetLongPathNameW
-#define GetModuleFileName GetModuleFileNameW
-#define GetModuleHandle GetModuleHandleW
-#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
-#define GetTempFileName GetTempFileNameW
-#define GetTempPath GetTempPathW
-#define GetUserName GetUserNameW
-#define GetVersionEx GetVersionExW
-#define GetVolumeInformation GetVolumeInformationW
-#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
-#define ReportEvent ReportEventW
-#define SearchPath SearchPathW
-#define SetComputerName SetComputerNameW
-#define SetCurrentDirectory SetCurrentDirectoryW
-#define SetDefaultCommConfig SetDefaultCommConfigW
-#define SetEnvironmentVariable SetEnvironmentVariableW
-#define SetFileAttributes SetFileAttributesW
-#define SetFileSecurity SetFileSecurityW
-#define SetVolumeLabel SetVolumeLabelW
-#define UpdateResource UpdateResourceW
-#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,*LPWIN32_FIND_DATA;
-typedef HW_PROFILE_INFOA HW_PROFILE_INFO,*LPHW_PROFILE_INFO;
-typedef OSVERSIONINFOA OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO;
-#define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmA
-#define AddAtom AddAtomA
-#define BackupEventLog BackupEventLogA
-#define BeginUpdateResource BeginUpdateResourceA
-#define BuildCommDCB BuildCommDCBA
-#define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsA
-#define CallNamedPipe CallNamedPipeA
-#define ClearEventLog ClearEventLogA
-#define CommConfigDialog CommConfigDialogA
-#define CopyFile CopyFileA
-#define CopyFileEx CopyFileExA
-#define CreateDirectory CreateDirectoryA
-#define CreateDirectoryEx CreateDirectoryExA
-#define CreateEvent CreateEventA
-#define CreateFile CreateFileA
-#define CreateFileMapping CreateFileMappingA
-#define CreateCreateHardLink CreateCreateHardLinkA
-#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
-#define EndUpdateResource EndUpdateResourceA
-#define EnumResourceLanguages EnumResourceLanguagesA
-#define EnumResourceNames EnumResourceNamesA
-#define EnumResourceTypes EnumResourceTypesA
-#define ExpandEnvironmentStrings ExpandEnvironmentStringsA
-#define FatalAppExit FatalAppExitA
-#define FindAtom FindAtomA
-#define FindFirstChangeNotification FindFirstChangeNotificationA
-#define FindFirstFile FindFirstFileA
-#define FindFirstFileEx FindFirstFileExW
-#define FindNextFile FindNextFileA
-#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
-#define GetDriveType GetDriveTypeA
-#define GetEnvironmentStringsA GetEnvironmentStrings
-#define GetEnvironmentVariable GetEnvironmentVariableA
-#define GetFileAttributes GetFileAttributesA
-#define GetFileSecurity GetFileSecurityA
-#define GetFileAttributesEx GetFileAttributesExA
-#define GetFullPathName GetFullPathNameA
-#define GetLogicalDriveStrings GetLogicalDriveStringsA
-#define GetLongPathName GetLongPathNameA
-#define GetNamedPipeHandleState GetNamedPipeHandleStateA
-#define GetModuleHandle GetModuleHandleA
-#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
-#define GetTempFileName GetTempFileNameA
-#define GetTempPath GetTempPathA
-#define GetUserName GetUserNameA
-#define GetVersionEx GetVersionExA
-#define GetVolumeInformation GetVolumeInformationA
-#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
-#define ReportEvent ReportEventA
-#define SearchPath SearchPathA
-#define SetComputerName SetComputerNameA
-#define SetCurrentDirectory SetCurrentDirectoryA
-#define SetDefaultCommConfig SetDefaultCommConfigA
-#define SetEnvironmentVariable SetEnvironmentVariableA
-#define SetFileAttributes SetFileAttributesA
-#define SetFileSecurity SetFileSecurityA
-#define SetVolumeLabel SetVolumeLabelA
-#define UpdateResource UpdateResourceA
-#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/wincon.h b/winsup/w32api/include/wincon.h
deleted file mode 100644
index 4ed04abf1..000000000
--- a/winsup/w32api/include/wincon.h
+++ /dev/null
@@ -1,203 +0,0 @@
-#ifndef _WINCON_H
-#define _WINCON_H
-
-#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
-#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_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;
-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);
-HANDLE WINAPI CreateConsoleScreenBuffer(DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,PVOID);
-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);
-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);
-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 0feba9630..000000000
--- a/winsup/w32api/include/wincrypt.h
+++ /dev/null
@@ -1,185 +0,0 @@
-#ifndef _WINCRYPT_H
-#define _WINCRYPT_H
-#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 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_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_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_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_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_MAC (ALG_CLASS_HASH|ALG_TYPE_ANY|ALG_SID_MAC)
-#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 CRYPT_VERIFYCONTEXT 0xF0000000
-#define CRYPT_NEWKEYSET 8
-#define CRYPT_DELETEKEYSET 16
-#define CRYPT_MACHINE_KEYSET 32
-#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 AT_KEYEXCHANGE 1
-#define AT_SIGNATURE 2
-#define CRYPT_USERDATA 1
-#define KP_IV 1
-#define KP_SALT 2
-#define KP_PADDING 3
-#define KP_MODE 4
-#define KP_MODE_BITS 5
-#define KP_PERMISSIONS 6
-#define KP_ALGID 7
-#define KP_BLOCKLEN 8
-#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_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 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 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_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 MAXUIDLEN 64
-#define CUR_BLOB_VERSION 2
-typedef UINT ALG_ID;
-typedef struct _VTableProvStruc {FARPROC FuncVerifyImage;} VTableProvStruc,*PVTableProvStruc;
-typedef ULONG HCRYPTPROV;
-typedef ULONG HCRYPTKEY;
-typedef ULONG HCRYPTHASH;
-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;
-} PUBLICKEYSTRUC;
-typedef struct _RSAPUBKEY {
- DWORD magic;
- DWORD bitlen;
- DWORD pubexp;
-} RSAPUBKEY;
-BOOL WINAPI CryptAcquireContextA(HCRYPTPROV*,LPCSTR,LPCSTR,DWORD,DWORD);
-BOOL WINAPI CryptAcquireContextW(HCRYPTPROV*,LPCWSTR,LPCWSTR,DWORD,DWORD);
-BOOL WINAPI CryptReleaseContext(HCRYPTPROV,DWORD);
-BOOL WINAPI CryptGenKey(HCRYPTPROV,ALG_ID,DWORD,HCRYPTKEY*);
-BOOL WINAPI CryptDeriveKey(HCRYPTPROV,ALG_ID,HCRYPTHASH,DWORD,HCRYPTKEY*);
-BOOL WINAPI CryptDestroyKey(HCRYPTKEY);
-BOOL WINAPI CryptSetKeyParam(HCRYPTKEY,DWORD,PBYTE,DWORD);
-BOOL WINAPI CryptGetKeyParam(HCRYPTKEY,DWORD,PBYTE,PDWORD,DWORD);
-BOOL WINAPI CryptSetHashParam(HCRYPTHASH,DWORD,PBYTE,DWORD);
-BOOL WINAPI CryptGetHashParam(HCRYPTHASH,DWORD,PBYTE,PDWORD,DWORD);
-BOOL WINAPI CryptSetProvParam(HCRYPTPROV,DWORD,PBYTE,DWORD);
-BOOL WINAPI CryptGetProvParam(HCRYPTPROV,DWORD,PBYTE,PDWORD,DWORD);
-BOOL WINAPI CryptGenRandom(HCRYPTPROV,DWORD,PBYTE);
-BOOL WINAPI CryptGetUserKey(HCRYPTPROV,DWORD,HCRYPTKEY*);
-BOOL WINAPI CryptExportKey(HCRYPTKEY,HCRYPTKEY,DWORD,DWORD,PBYTE,PDWORD);
-BOOL WINAPI CryptImportKey(HCRYPTPROV,PBYTE,DWORD,HCRYPTKEY,DWORD,HCRYPTKEY*);
-BOOL WINAPI CryptEncrypt(HCRYPTKEY,HCRYPTHASH,BOOL,DWORD,PBYTE,PDWORD,DWORD);
-BOOL WINAPI CryptDecrypt(HCRYPTKEY,HCRYPTHASH,BOOL,DWORD,PBYTE,PDWORD);
-BOOL WINAPI CryptCreateHash(HCRYPTPROV,ALG_ID,HCRYPTKEY,DWORD,HCRYPTHASH*);
-BOOL WINAPI CryptHashData(HCRYPTHASH,PBYTE,DWORD,DWORD);
-BOOL WINAPI CryptHashSessionKey(HCRYPTHASH,HCRYPTKEY,DWORD);
-BOOL WINAPI CryptGetHashValue(HCRYPTHASH,DWORD,PBYTE,PDWORD);
-BOOL WINAPI CryptDestroyHash(HCRYPTHASH);
-BOOL WINAPI CryptSignHashA(HCRYPTHASH,DWORD,LPCSTR,DWORD,PBYTE,PDWORD);
-BOOL WINAPI CryptSignHashW(HCRYPTHASH,DWORD,LPCWSTR,DWORD,PBYTE,PDWORD);
-BOOL WINAPI CryptVerifySignatureA(HCRYPTHASH,PBYTE,DWORD,HCRYPTKEY,LPCSTR,DWORD);
-BOOL WINAPI CryptVerifySignatureW(HCRYPTHASH,PBYTE,DWORD,HCRYPTKEY,LPCWSTR,DWORD);
-BOOL WINAPI CryptSetProviderA(LPCSTR,DWORD);
-BOOL WINAPI CryptSetProviderW(LPCWSTR,DWORD);
-#ifdef UNICODE
-#define CryptAcquireContext CryptAcquireContextW
-#define CryptSignHash CryptSignHashW
-#define CryptVerifySignature CryptVerifySignatureW
-#define CryptSetProvider CryptSetProviderW
-#define MS_DEF_PROV MS_DEF_PROV_W
-#else
-#define CryptAcquireContext CryptAcquireContextA
-#define CryptSignHash CryptSignHashA
-#define CryptVerifySignature CryptVerifySignatureA
-#define CryptSetProvider CryptSetProviderA
-#define MS_DEF_PROV MS_DEF_PROV_A
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/windef.h b/winsup/w32api/include/windef.h
deleted file mode 100644
index 129a9a7d7..000000000
--- a/winsup/w32api/include/windef.h
+++ /dev/null
@@ -1,225 +0,0 @@
-#ifndef _WINDEF_H
-#define _WINDEF_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef WINVER
-#define WINVER 0x0400
-#endif
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT WINVER
-#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
-#define IN
-#define OUT
-#ifndef OPTIONAL
-#define OPTIONAL
-#endif
-
-#ifdef __GNUC__
-#define PACKED __attribute__((packed))
-#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
-#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 WINAPI __stdcall
-#define WINAPIV __cdecl
-#define APIENTRY __stdcall
-#define CALLBACK __stdcall
-#define APIPRIVATE __stdcall
-
-#define DECLSPEC_IMPORT __declspec(dllimport)
-#define DECLSPEC_EXPORT __declspec(dllexport)
-#define DECLSPEC_NORETURN __declspec(noreturn)
-#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 _export
-#define _export
-#endif
-#ifndef __export
-#define __export
-#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)
-
-typedef unsigned long DWORD;
-typedef int WINBOOL,*PWINBOOL,*LPWINBOOL;
-/* FIXME: Is there a good solution to this? */
-#ifndef __OBJC__
-typedef WINBOOL BOOL;
-#else
-#define BOOL WINBOOL
-#endif
-typedef BOOL *PBOOL,*LPBOOL;
-typedef unsigned char BYTE;
-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 void *PVOID,*LPVOID;
-typedef CONST void *PCVOID,*LPCVOID;
-typedef int INT;
-typedef unsigned int UINT,*PUINT,*LPUINT;
-
-#include <winnt.h>
-
-typedef UINT WPARAM;
-typedef LONG LPARAM;
-typedef LONG LRESULT;
-#ifndef _HRESULT_DEFINED
-typedef LONG HRESULT;
-#define _HRESULT_DEFINED
-#endif
-typedef WORD ATOM;
-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. */
-/* #if (WINVER >= 0x0500) */
-DECLARE_HANDLE(HMONITOR);
-DECLARE_HANDLE(HTERMINAL);
-DECLARE_HANDLE(HWINEVENTHOOK);
-/* #endif */
-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/windows.h b/winsup/w32api/include/windows.h
deleted file mode 100644
index 8fe9211c9..000000000
--- a/winsup/w32api/include/windows.h
+++ /dev/null
@@ -1,151 +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
-/* 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
-
-#ifdef __GNUC__
-#ifndef NONAMELESSUNION
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
-#define _ANONYMOUS_UNION
-#define _ANONYMOUS_STRUCT
-#else
-#if defined(__cplusplus)
-#define _ANONYMOUS_UNION
-#endif
-#endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) */
-#endif /* NONAMELESSUNION */
-#endif /* __GNUC__ */
-
-#ifndef _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 _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
-
-#include <stdarg.h>
-#include <windef.h>
-#include <wincon.h>
-#include <basetyps.h>
-#include <excpt.h>
-#include <winbase.h>
-#ifndef _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 <commdlg.h>
-#include <cderr.h>
-#include <dde.h>
-#include <ddeml.h>
-#include <dlgs.h>
-#include <lzexpand.h>
-#include <mmsystem.h>
-#include <nb30.h>
-#include <rpc.h>
-#include <shellapi.h>
-#include <winperf.h>
-#include <winspool.h>
-#if defined(Win32_Winsock) || !(defined(__INSIDE_CYGWIN__) || defined(__CYGWIN__) || defined(__CYGWIN32__) || defined(_UWIN))
-#include <winsock.h>
-#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 37a439a37..000000000
--- a/winsup/w32api/include/windowsx.h
+++ /dev/null
@@ -1,540 +0,0 @@
-#ifndef _WINDOWSX_H
-#define _WINDOWSX_H
-#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 e9392c2cf..000000000
--- a/winsup/w32api/include/winerror.h
+++ /dev/null
@@ -1,1012 +0,0 @@
-#ifndef _WINERROR_H
-#define _WINERROR_H
-#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_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
-#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_MR_MID_NOT_FOUND 317L
-#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_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_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_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_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_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_EVENTLOG_FILE_CORRUPT 1500L
-#define ERROR_EVENTLOG_CANT_START 1501L
-#define ERROR_LOG_FILE_FULL 1502L
-#define ERROR_EVENTLOG_FILE_CHANGED 1503L
-#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_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 ERROR_NO_BROWSER_SERVERS_FOUND 6118L
-#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_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_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 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 0x8000FFFFL
-#define E_NOTIMPL 0x80004001L
-#define E_OUTOFMEMORY 0x8007000EL
-#define E_INVALIDARG 0x80070057L
-#define E_NOINTERFACE 0x80004002L
-#define E_POINTER 0x80004003L
-#define E_HANDLE 0x80070006L
-#define E_ABORT 0x80004004L
-#define E_FAIL 0x80004005L
-#define E_ACCESSDENIED 0x80070005L
-#define CO_E_INIT_TLS 0x80004006L
-#define CO_E_INIT_SHARED_ALLOCATOR 0x80004007L
-#define CO_E_INIT_MEMORY_ALLOCATOR 0x80004008L
-#define CO_E_INIT_CLASS_CACHE 0x80004009L
-#define CO_E_INIT_RPC_CHANNEL 0x8000400AL
-#define CO_E_INIT_TLS_SET_CHANNEL_CONTROL 0x8000400BL
-#define CO_E_INIT_TLS_CHANNEL_CONTROL 0x8000400CL
-#define CO_E_INIT_UNACCEPTED_USER_ALLOCATOR 0x8000400DL
-#define CO_E_INIT_SCM_MUTEX_EXISTS 0x8000400EL
-#define CO_E_INIT_SCM_FILE_MAPPING_EXISTS 0x8000400FL
-#define CO_E_INIT_SCM_MAP_VIEW_OF_FILE 0x80004010L
-#define CO_E_INIT_SCM_EXEC_FAILURE 0x80004011L
-#define CO_E_INIT_ONLY_SINGLE_THREADED 0x80004012L
-#define S_OK (0x00000000L)
-#define S_FALSE (0x00000001L)
-#define OLE_E_FIRST 0x80040000L
-#define OLE_E_LAST 0x800400FFL
-#define OLE_S_FIRST 0x00040000L
-#define OLE_S_LAST 0x000400FFL
-#define OLE_E_OLEVERB 0x80040000L
-#define OLE_E_ADVF 0x80040001L
-#define OLE_E_ENUM_NOMORE 0x80040002L
-#define OLE_E_ADVISENOTSUPPORTED 0x80040003L
-#define OLE_E_NOCONNECTION 0x80040004L
-#define OLE_E_NOTRUNNING 0x80040005L
-#define OLE_E_NOCACHE 0x80040006L
-#define OLE_E_BLANK 0x80040007L
-#define OLE_E_CLASSDIFF 0x80040008L
-#define OLE_E_CANT_GETMONIKER 0x80040009L
-#define OLE_E_CANT_BINDTOSOURCE 0x8004000AL
-#define OLE_E_STATIC 0x8004000BL
-#define OLE_E_PROMPTSAVECANCELLED 0x8004000CL
-#define OLE_E_INVALIDRECT 0x8004000DL
-#define OLE_E_WRONGCOMPOBJ 0x8004000EL
-#define OLE_E_INVALIDHWND 0x8004000FL
-#define OLE_E_NOT_INPLACEACTIVE 0x80040010L
-#define OLE_E_CANTCONVERT 0x80040011L
-#define OLE_E_NOSTORAGE 0x80040012L
-#define DV_E_FORMATETC 0x80040064L
-#define DV_E_DVTARGETDEVICE 0x80040065L
-#define DV_E_STGMEDIUM 0x80040066L
-#define DV_E_STATDATA 0x80040067L
-#define DV_E_LINDEX 0x80040068L
-#define DV_E_TYMED 0x80040069L
-#define DV_E_CLIPFORMAT 0x8004006AL
-#define DV_E_DVASPECT 0x8004006BL
-#define DV_E_DVTARGETDEVICE_SIZE 0x8004006CL
-#define DV_E_NOIVIEWOBJECT 0x8004006DL
-#define DRAGDROP_E_FIRST 0x80040100L
-#define DRAGDROP_E_LAST 0x8004010FL
-#define DRAGDROP_S_FIRST 0x00040100L
-#define DRAGDROP_S_LAST 0x0004010FL
-#define DRAGDROP_E_NOTREGISTERED 0x80040100L
-#define DRAGDROP_E_ALREADYREGISTERED 0x80040101L
-#define DRAGDROP_E_INVALIDHWND 0x80040102L
-#define CLASSFACTORY_E_FIRST 0x80040110L
-#define CLASSFACTORY_E_LAST 0x8004011FL
-#define CLASSFACTORY_S_FIRST 0x00040110L
-#define CLASSFACTORY_S_LAST 0x0004011FL
-#define CLASS_E_NOAGGREGATION 0x80040110L
-#define CLASS_E_CLASSNOTAVAILABLE 0x80040111L
-#define MARSHAL_E_FIRST 0x80040120L
-#define MARSHAL_E_LAST 0x8004012FL
-#define MARSHAL_S_FIRST 0x00040120L
-#define MARSHAL_S_LAST 0x0004012FL
-#define DATA_E_FIRST 0x80040130L
-#define DATA_E_LAST 0x8004013FL
-#define DATA_S_FIRST 0x00040130L
-#define DATA_S_LAST 0x0004013FL
-#define VIEW_E_FIRST 0x80040140L
-#define VIEW_E_LAST 0x8004014FL
-#define VIEW_S_FIRST 0x00040140L
-#define VIEW_S_LAST 0x0004014FL
-#define VIEW_E_DRAW 0x80040140L
-#define REGDB_E_FIRST 0x80040150L
-#define REGDB_E_LAST 0x8004015FL
-#define REGDB_S_FIRST 0x00040150L
-#define REGDB_S_LAST 0x0004015FL
-#define REGDB_E_READREGDB 0x80040150L
-#define REGDB_E_WRITEREGDB 0x80040151L
-#define REGDB_E_KEYMISSING 0x80040152L
-#define REGDB_E_INVALIDVALUE 0x80040153L
-#define REGDB_E_CLASSNOTREG 0x80040154L
-#define REGDB_E_IIDNOTREG 0x80040155L
-#define CACHE_E_FIRST 0x80040170L
-#define CACHE_E_LAST 0x8004017FL
-#define CACHE_S_FIRST 0x00040170L
-#define CACHE_S_LAST 0x0004017FL
-#define CACHE_E_NOCACHE_UPDATED 0x80040170L
-#define OLEOBJ_E_FIRST 0x80040180L
-#define OLEOBJ_E_LAST 0x8004018FL
-#define OLEOBJ_S_FIRST 0x00040180L
-#define OLEOBJ_S_LAST 0x0004018FL
-#define OLEOBJ_E_NOVERBS 0x80040180L
-#define OLEOBJ_E_INVALIDVERB 0x80040181L
-#define CLIENTSITE_E_FIRST 0x80040190L
-#define CLIENTSITE_E_LAST 0x8004019FL
-#define CLIENTSITE_S_FIRST 0x00040190L
-#define CLIENTSITE_S_LAST 0x0004019FL
-#define INPLACE_E_NOTUNDOABLE 0x800401A0L
-#define INPLACE_E_NOTOOLSPACE 0x800401A1L
-#define INPLACE_E_FIRST 0x800401A0L
-#define INPLACE_E_LAST 0x800401AFL
-#define INPLACE_S_FIRST 0x000401A0L
-#define INPLACE_S_LAST 0x000401AFL
-#define ENUM_E_FIRST 0x800401B0L
-#define ENUM_E_LAST 0x800401BFL
-#define ENUM_S_FIRST 0x000401B0L
-#define ENUM_S_LAST 0x000401BFL
-#define CONVERT10_E_FIRST 0x800401C0L
-#define CONVERT10_E_LAST 0x800401CFL
-#define CONVERT10_S_FIRST 0x000401C0L
-#define CONVERT10_S_LAST 0x000401CFL
-#define CONVERT10_E_OLESTREAM_GET 0x800401C0L
-#define CONVERT10_E_OLESTREAM_PUT 0x800401C1L
-#define CONVERT10_E_OLESTREAM_FMT 0x800401C2L
-#define CONVERT10_E_OLESTREAM_BITMAP_TO_DIB 0x800401C3L
-#define CONVERT10_E_STG_FMT 0x800401C4L
-#define CONVERT10_E_STG_NO_STD_STREAM 0x800401C5L
-#define CONVERT10_E_STG_DIB_TO_BITMAP 0x800401C6L
-#define CLIPBRD_E_FIRST 0x800401D0L
-#define CLIPBRD_E_LAST 0x800401DFL
-#define CLIPBRD_S_FIRST 0x000401D0L
-#define CLIPBRD_S_LAST 0x000401DFL
-#define CLIPBRD_E_CANT_OPEN 0x800401D0L
-#define CLIPBRD_E_CANT_EMPTY 0x800401D1L
-#define CLIPBRD_E_CANT_SET 0x800401D2L
-#define CLIPBRD_E_BAD_DATA 0x800401D3L
-#define CLIPBRD_E_CANT_CLOSE 0x800401D4L
-#define MK_E_FIRST 0x800401E0L
-#define MK_E_LAST 0x800401EFL
-#define MK_S_FIRST 0x000401E0L
-#define MK_S_LAST 0x000401EFL
-#define MK_E_CONNECTMANUALLY 0x800401E0L
-#define MK_E_EXCEEDEDDEADLINE 0x800401E1L
-#define MK_E_NEEDGENERIC 0x800401E2L
-#define MK_E_UNAVAILABLE 0x800401E3L
-#define MK_E_SYNTAX 0x800401E4L
-#define MK_E_NOOBJECT 0x800401E5L
-#define MK_E_INVALIDEXTENSION 0x800401E6L
-#define MK_E_INTERMEDIATEINTERFACENOTSUPPORTED 0x800401E7L
-#define MK_E_NOTBINDABLE 0x800401E8L
-#define MK_E_NOTBOUND 0x800401E9L
-#define MK_E_CANTOPENFILE 0x800401EAL
-#define MK_E_MUSTBOTHERUSER 0x800401EBL
-#define MK_E_NOINVERSE 0x800401ECL
-#define MK_E_NOSTORAGE 0x800401EDL
-#define MK_E_NOPREFIX 0x800401EEL
-#define MK_E_ENUMERATION_FAILED 0x800401EFL
-#define CO_E_FIRST 0x800401F0L
-#define CO_E_LAST 0x800401FFL
-#define CO_S_FIRST 0x000401F0L
-#define CO_S_LAST 0x000401FFL
-#define CO_E_NOTINITIALIZED 0x800401F0L
-#define CO_E_ALREADYINITIALIZED 0x800401F1L
-#define CO_E_CANTDETERMINECLASS 0x800401F2L
-#define CO_E_CLASSSTRING 0x800401F3L
-#define CO_E_IIDSTRING 0x800401F4L
-#define CO_E_APPNOTFOUND 0x800401F5L
-#define CO_E_APPSINGLEUSE 0x800401F6L
-#define CO_E_ERRORINAPP 0x800401F7L
-#define CO_E_DLLNOTFOUND 0x800401F8L
-#define CO_E_ERRORINDLL 0x800401F9L
-#define CO_E_WRONGOSFORAPP 0x800401FAL
-#define CO_E_OBJNOTREG 0x800401FBL
-#define CO_E_OBJISREG 0x800401FCL
-#define CO_E_OBJNOTCONNECTED 0x800401FDL
-#define CO_E_APPDIDNTREG 0x800401FEL
-#define CO_E_RELEASED 0x800401FFL
-#define OLE_S_USEREG 0x00040000L
-#define OLE_S_STATIC 0x00040001L
-#define OLE_S_MAC_CLIPFORMAT 0x00040002L
-#define DRAGDROP_S_DROP 0x00040100L
-#define DRAGDROP_S_CANCEL 0x00040101L
-#define DRAGDROP_S_USEDEFAULTCURSORS 0x00040102L
-#define DATA_S_SAMEFORMATETC 0x00040130L
-#define VIEW_S_ALREADY_FROZEN 0x00040140L
-#define CACHE_S_FORMATETC_NOTSUPPORTED 0x00040170L
-#define CACHE_S_SAMECACHE 0x00040171L
-#define CACHE_S_SOMECACHES_NOTUPDATED 0x00040172L
-#define OLEOBJ_S_INVALIDVERB 0x00040180L
-#define OLEOBJ_S_CANNOT_DOVERB_NOW 0x00040181L
-#define OLEOBJ_S_INVALIDHWND 0x00040182L
-#define INPLACE_S_TRUNCATED 0x000401A0L
-#define CONVERT10_S_NO_PRESENTATION 0x000401C0L
-#define MK_S_REDUCED_TO_SELF 0x000401E2L
-#define MK_S_ME 0x000401E4L
-#define MK_S_HIM 0x000401E5L
-#define MK_S_US 0x000401E6L
-#define MK_S_MONIKERALREADYREGISTERED 0x000401E7L
-#define CO_E_CLASS_CREATE_FAILED 0x80080001L
-#define CO_E_SCM_ERROR 0x80080002L
-#define CO_E_SCM_RPC_FAILURE 0x80080003L
-#define CO_E_BAD_PATH 0x80080004L
-#define CO_E_SERVER_EXEC_FAILURE 0x80080005L
-#define CO_E_OBJSRV_RPC_FAILURE 0x80080006L
-#define MK_E_NO_NORMALIZED 0x80080007L
-#define CO_E_SERVER_STOPPING 0x80080008L
-#define MEM_E_INVALID_ROOT 0x80080009L
-#define MEM_E_INVALID_LINK 0x80080010L
-#define MEM_E_INVALID_SIZE 0x80080011L
-#define DISP_E_UNKNOWNINTERFACE 0x80020001L
-#define DISP_E_MEMBERNOTFOUND 0x80020003L
-#define DISP_E_PARAMNOTFOUND 0x80020004L
-#define DISP_E_TYPEMISMATCH 0x80020005L
-#define DISP_E_UNKNOWNNAME 0x80020006L
-#define DISP_E_NONAMEDARGS 0x80020007L
-#define DISP_E_BADVARTYPE 0x80020008L
-#define DISP_E_EXCEPTION 0x80020009L
-#define DISP_E_OVERFLOW 0x8002000AL
-#define DISP_E_BADINDEX 0x8002000BL
-#define DISP_E_UNKNOWNLCID 0x8002000CL
-#define DISP_E_ARRAYISLOCKED 0x8002000DL
-#define DISP_E_BADPARAMCOUNT 0x8002000EL
-#define DISP_E_PARAMNOTOPTIONAL 0x8002000FL
-#define DISP_E_BADCALLEE 0x80020010L
-#define DISP_E_NOTACOLLECTION 0x80020011L
-#define TYPE_E_BUFFERTOOSMALL 0x80028016L
-#define TYPE_E_INVDATAREAD 0x80028018L
-#define TYPE_E_UNSUPFORMAT 0x80028019L
-#define TYPE_E_REGISTRYACCESS 0x8002801CL
-#define TYPE_E_LIBNOTREGISTERED 0x8002801DL
-#define TYPE_E_UNDEFINEDTYPE 0x80028027L
-#define TYPE_E_QUALIFIEDNAMEDISALLOWED 0x80028028L
-#define TYPE_E_INVALIDSTATE 0x80028029L
-#define TYPE_E_WRONGTYPEKIND 0x8002802AL
-#define TYPE_E_ELEMENTNOTFOUND 0x8002802BL
-#define TYPE_E_AMBIGUOUSNAME 0x8002802CL
-#define TYPE_E_NAMECONFLICT 0x8002802DL
-#define TYPE_E_UNKNOWNLCID 0x8002802EL
-#define TYPE_E_DLLFUNCTIONNOTFOUND 0x8002802FL
-#define TYPE_E_BADMODULEKIND 0x800288BDL
-#define TYPE_E_SIZETOOBIG 0x800288C5L
-#define TYPE_E_DUPLICATEID 0x800288C6L
-#define TYPE_E_INVALIDID 0x800288CFL
-#define TYPE_E_TYPEMISMATCH 0x80028CA0L
-#define TYPE_E_OUTOFBOUNDS 0x80028CA1L
-#define TYPE_E_IOERROR 0x80028CA2L
-#define TYPE_E_CANTCREATETMPFILE 0x80028CA3L
-#define TYPE_E_CANTLOADLIBRARY 0x80029C4AL
-#define TYPE_E_INCONSISTENTPROPFUNCS 0x80029C83L
-#define TYPE_E_CIRCULARTYPE 0x80029C84L
-#define STG_E_INVALIDFUNCTION 0x80030001L
-#define STG_E_FILENOTFOUND 0x80030002L
-#define STG_E_PATHNOTFOUND 0x80030003L
-#define STG_E_TOOMANYOPENFILES 0x80030004L
-#define STG_E_ACCESSDENIED 0x80030005L
-#define STG_E_INVALIDHANDLE 0x80030006L
-#define STG_E_INSUFFICIENTMEMORY 0x80030008L
-#define STG_E_INVALIDPOINTER 0x80030009L
-#define STG_E_NOMOREFILES 0x80030012L
-#define STG_E_DISKISWRITEPROTECTED 0x80030013L
-#define STG_E_SEEKERROR 0x80030019L
-#define STG_E_WRITEFAULT 0x8003001DL
-#define STG_E_READFAULT 0x8003001EL
-#define STG_E_SHAREVIOLATION 0x80030020L
-#define STG_E_LOCKVIOLATION 0x80030021L
-#define STG_E_FILEALREADYEXISTS 0x80030050L
-#define STG_E_INVALIDPARAMETER 0x80030057L
-#define STG_E_MEDIUMFULL 0x80030070L
-#define STG_E_ABNORMALAPIEXIT 0x800300FAL
-#define STG_E_INVALIDHEADER 0x800300FBL
-#define STG_E_INVALIDNAME 0x800300FCL
-#define STG_E_UNKNOWN 0x800300FDL
-#define STG_E_UNIMPLEMENTEDFUNCTION 0x800300FEL
-#define STG_E_INVALIDFLAG 0x800300FFL
-#define STG_E_INUSE 0x80030100L
-#define STG_E_NOTCURRENT 0x80030101L
-#define STG_E_REVERTED 0x80030102L
-#define STG_E_CANTSAVE 0x80030103L
-#define STG_E_OLDFORMAT 0x80030104L
-#define STG_E_OLDDLL 0x80030105L
-#define STG_E_SHAREREQUIRED 0x80030106L
-#define STG_E_NOTFILEBASEDSTORAGE 0x80030107L
-#define STG_E_EXTANTMARSHALLINGS 0x80030108L
-#define STG_S_CONVERTED 0x00030200L
-#define RPC_E_CALL_REJECTED 0x80010001L
-#define RPC_E_CALL_CANCELED 0x80010002L
-#define RPC_E_CANTPOST_INSENDCALL 0x80010003L
-#define RPC_E_CANTCALLOUT_INASYNCCALL 0x80010004L
-#define RPC_E_CANTCALLOUT_INEXTERNALCALL 0x80010005L
-#define RPC_E_CONNECTION_TERMINATED 0x80010006L
-#define RPC_E_SERVER_DIED 0x80010007L
-#define RPC_E_CLIENT_DIED 0x80010008L
-#define RPC_E_INVALID_DATAPACKET 0x80010009L
-#define RPC_E_CANTTRANSMIT_CALL 0x8001000AL
-#define RPC_E_CLIENT_CANTMARSHAL_DATA 0x8001000BL
-#define RPC_E_CLIENT_CANTUNMARSHAL_DATA 0x8001000CL
-#define RPC_E_SERVER_CANTMARSHAL_DATA 0x8001000DL
-#define RPC_E_SERVER_CANTUNMARSHAL_DATA 0x8001000EL
-#define RPC_E_INVALID_DATA 0x8001000FL
-#define RPC_E_INVALID_PARAMETER 0x80010010L
-#define RPC_E_CANTCALLOUT_AGAIN 0x80010011L
-#define RPC_E_SERVER_DIED_DNE 0x80010012L
-#define RPC_E_SYS_CALL_FAILED 0x80010100L
-#define RPC_E_OUT_OF_RESOURCES 0x80010101L
-#define RPC_E_ATTEMPTED_MULTITHREAD 0x80010102L
-#define RPC_E_NOT_REGISTERED 0x80010103L
-#define RPC_E_FAULT 0x80010104L
-#define RPC_E_SERVERFAULT 0x80010105L
-#define RPC_E_CHANGED_MODE 0x80010106L
-#define RPC_E_INVALIDMETHOD 0x80010107L
-#define RPC_E_DISCONNECTED 0x80010108L
-#define RPC_E_RETRY 0x80010109L
-#define RPC_E_SERVERCALL_RETRYLATER 0x8001010AL
-#define RPC_E_SERVERCALL_REJECTED 0x8001010BL
-#define RPC_E_INVALID_CALLDATA 0x8001010CL
-#define RPC_E_CANTCALLOUT_ININPUTSYNCCALL 0x8001010DL
-#define RPC_E_WRONG_THREAD 0x8001010EL
-#define RPC_E_THREAD_NOT_INIT 0x8001010FL
-#define RPC_E_UNEXPECTED 0x8001FFFFL
-#endif
diff --git a/winsup/w32api/include/wingdi.h b/winsup/w32api/include/wingdi.h
deleted file mode 100644
index f155d2329..000000000
--- a/winsup/w32api/include/wingdi.h
+++ /dev/null
@@ -1,2811 +0,0 @@
-#ifndef _WINGDI_H
-#define _WINGDI_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define WINGDIAPI
-#define BI_RGB 0
-#define BI_RLE8 1
-#define BI_RLE4 2
-#define BI_BITFIELDS 3
-#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
-#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_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 0x42
-#define NOTSRCERASE 0x1100A6
-#define NOTSRCCOPY 0x330008
-#define SRCERASE 0x440328
-#define DSTINVERT 0x550009
-#define PATINVERT 0x5A0049
-#define SRCINVERT 0x660046
-#define SRCAND 0x8800C6
-#define MERGEPAINT 0xBB0226
-#define MERGECOPY 0xC000CA
-#define SRCCOPY 0xCC0020
-#define SRCPAINT 0xEE0086
-#define PATCOPY 0xF00021
-#define PATPAINT 0xFB0A09
-#define WHITENESS 0xFF0062
-#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 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 BALTIC_CHARSET 186
-#define JOHAB_CHARSET 130
-#define VIETNAMESE_CHARSET 163
-#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
-#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
-#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 4
-#define ETO_GLYPH_INDEX 16
-#define ETO_OPAQUE 2
-#define ETO_RTLREADING 128
-#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
-#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_BITMAP 1
-#define GGO_NATIVE 2
-#define GGO_METRICS 0
-#define GGO_GRAY2_BITMAP 4
-#define GGO_GRAY4_BITMAP 5
-#define GGO_GRAY8_BITMAP 6
-#define GGO_GLYPH_INDEX 128
-#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
-#define SYSPAL_NOSTATIC 2
-#define SYSPAL_STATIC 1
-#define SYSPAL_ERROR 0
-#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
-#define DMPAPER_LAST 68
-#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_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 1
-#define DM_PAPERSIZE 2
-#define DM_PAPERLENGTH 4
-#define DM_PAPERWIDTH 8
-#define DM_SCALE 16
-#define DM_COPIES 256
-#define DM_DEFAULTSOURCE 512
-#define DM_PRINTQUALITY 1024
-#define DM_COLOR 2048
-#define DM_DUPLEX 4096
-#define DM_YRESOLUTION 8192
-#define DM_TTOPTION 16384
-#define DM_COLLATE 32768
-#define DM_FORMNAME 65536
-#define DM_LOGPIXELS 0x20000
-#define DM_BITSPERPEL 0x40000
-#define DM_PELSWIDTH 0x80000
-#define DM_PELSHEIGHT 0x100000
-#define DM_DISPLAYFLAGS 0x200000
-#define DM_DISPLAYFREQUENCY 0x400000
-#define DM_ICMMETHOD 0x800000
-#define DM_ICMINTENT 0x1000000
-#define DM_MEDIATYPE 0x2000000
-#define DM_DITHERTYPE 0x4000000
-#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 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
-
-#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;
-#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;
-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 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;
- short dmOrientation;
- short dmPaperSize;
- short dmPaperLength;
- short dmPaperWidth;
- short dmScale;
- short dmCopies;
- short dmDefaultSource;
- short dmPrintQuality;
- short dmColor;
- short dmDuplex;
- short dmYResolution;
- short dmTTOption;
- short dmCollate;
- BYTE dmFormName[CCHFORMNAME];
- WORD dmLogPixels;
- DWORD dmBitsPerPel;
- DWORD dmPelsWidth;
- DWORD dmPelsHeight;
- DWORD dmDisplayFlags;
- DWORD dmDisplayFrequency;
- DWORD dmICMMethod;
- DWORD dmICMIntent;
- DWORD dmMediaType;
- DWORD dmDitherType;
- DWORD dmICCManufacturer;
- DWORD dmICCModel;
-} DEVMODEA,*LPDEVMODEA,*PDEVMODEA;
-typedef struct _devicemodeW {
- WCHAR dmDeviceName[CCHDEVICENAME];
- WORD dmSpecVersion;
- WORD dmDriverVersion;
- WORD dmSize;
- WORD dmDriverExtra;
- DWORD dmFields;
- short dmOrientation;
- short dmPaperSize;
- short dmPaperLength;
- short dmPaperWidth;
- short dmScale;
- short dmCopies;
- short dmDefaultSource;
- short dmPrintQuality;
- short dmColor;
- short dmDuplex;
- short dmYResolution;
- short dmTTOption;
- short dmCollate;
- WCHAR dmFormName[CCHFORMNAME];
- WORD dmLogPixels;
- DWORD dmBitsPerPel;
- DWORD dmPelsWidth;
- DWORD dmPelsHeight;
- DWORD dmDisplayFlags;
- DWORD dmDisplayFrequency;
- DWORD dmICMMethod;
- DWORD dmICMIntent;
- DWORD dmMediaType;
- DWORD dmDitherType;
- DWORD dmICCManufacturer;
- DWORD dmICCModel;
-} DEVMODEW,*LPDEVMODEW,*PDEVMODEW;
-typedef struct tagDIBSECTION {
- BITMAP dsBm;
- BITMAPINFOHEADER dsBmih;
- DWORD dsBitfields[3];
- HANDLE dshSection;
- DWORD dsOffset;
-} DIBSECTION;
-typedef struct {
- int cbSize;
- LPCTSTR lpszDocName;
- LPCTSTR lpszOutput;
- LPCTSTR lpszDatatype;
- DWORD fwType;
-} DOCINFO,*LPDOCINFO;
-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,*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,*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,*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;
-} 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,*LPRGNDATA;
-typedef struct tagGCP_RESULTSA {
- DWORD lStructSize;
- LPSTR lpOutString;
- UINT *lpOrder;
- INT *lpDx;
- INT *lpCaretPos;
- LPSTR lpClass;
- UINT *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;
- UINT *lpGlyphs;
- UINT nGlyphs;
- UINT nMaxFit;
-} GCP_RESULTSW,*LPGCP_RESULTSW;
-typedef struct _GLYPHMETRICS {
- UINT gmBlackBoxX;
- UINT gmBlackBoxY;
- POINT gmptGlyphOrigin;
- short gmCellIncX;
- short gmCellIncY;
-} GLYPHMETRICS,*LPGLYPHMETRICS;
-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;
-typedef struct _POLYTEXTW {
- int x;
- int y;
- UINT n;
- LPCWSTR lpstr;
- UINT uiFlags;
- RECT rcl;
- int *pdx;
-} POLYTEXTW;
-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];
- BYTE elfStyle[LF_FACESIZE];
- BYTE 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 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 RGB(r,g,b) ((DWORD)(((BYTE)(r)|((WORD)(g)<<8))|(((DWORD)(BYTE)(b))<<16)))
-#define MAKEPOINTS(l) (*((POINTS*)&(l)))
-#define MAKEROP4(f,b) (DWORD)((((b)<<8)&0xFF000000)|(f))
-#define PALETTEINDEX(i) ((0x01000000|(COLORREF)(WORD)(i)))
-#define PALETTERGB(r,g,b) (0x02000000|RGB(r,g,b))
-int WINAPI AbortDoc(HDC);
-BOOL WINAPI AbortPath(HDC);
-int WINAPI AddFontResourceA(LPCSTR);
-int WINAPI AddFontResourceW(LPCWSTR);
-BOOL WINAPI AngleArc(HDC,int,int,DWORD,FLOAT,FLOAT);
-BOOL WINAPI AnimatePalette(HPALETTE,UINT,UINT,const PALETTEENTRY*);
-BOOL WINAPI Arc(HDC,int,int,int,int,int,int,int,int);
-BOOL WINAPI ArcTo(HDC,int,int,int,int,int,int,int,int);
-BOOL WINAPI BeginPath(HDC);
-BOOL WINAPI BitBlt(HDC,int,int,int,int,HDC,int,int,DWORD);
-BOOL WINAPI CancelDC(HDC);
-BOOL WINAPI CheckColorsInGamut(HDC,PVOID,PVOID,DWORD);
-BOOL WINAPI Chord(HDC,int,int,int,int,int,int,int,int);
-int WINAPI ChoosePixelFormat(HDC,CONST PIXELFORMATDESCRIPTOR*);
-HENHMETAFILE WINAPI CloseEnhMetaFile(HDC);
-BOOL WINAPI CloseFigure(HDC);
-HMETAFILE WINAPI CloseMetaFile(HDC);
-BOOL WINAPI ColorMatchToTarget(HDC,HDC,DWORD);
-int WINAPI CombineRgn(HRGN,HRGN,HRGN,int);
-BOOL WINAPI CombineTransform(LPXFORM,const XFORM*,const XFORM*);
-HENHMETAFILE WINAPI CopyEnhMetaFileA(HENHMETAFILE,LPCSTR);
-HENHMETAFILE WINAPI CopyEnhMetaFileW(HENHMETAFILE,LPCWSTR);
-HMETAFILE WINAPI CopyMetaFileA(HMETAFILE,LPCSTR);
-HMETAFILE WINAPI CopyMetaFileW(HMETAFILE,LPCWSTR);
-HBITMAP WINAPI CreateBitmap(int,int,UINT,UINT,PCVOID);
-HBITMAP WINAPI CreateBitmapIndirect(const BITMAP*);
-HBRUSH WINAPI CreateBrushIndirect(const LOGBRUSH*);
-HCOLORSPACE WINAPI CreateColorSpaceA(LPLOGCOLORSPACEA);
-HCOLORSPACE WINAPI CreateColorSpaceW(LPLOGCOLORSPACEW);
-HBITMAP WINAPI CreateCompatibleBitmap(HDC,int,int);
-HDC WINAPI CreateCompatibleDC(HDC);
-HDC WINAPI CreateDCA(LPCSTR,LPCSTR,LPCSTR,const DEVMODEA*);
-HDC WINAPI CreateDCW(LPCWSTR,LPCWSTR,LPCWSTR,const DEVMODEW*);
-HBITMAP WINAPI CreateDIBitmap(HDC,const BITMAPINFOHEADER*,DWORD,PCVOID,const BITMAPINFO*,UINT);
-HBRUSH WINAPI CreateDIBPatternBrush(HGLOBAL,UINT);
-HBRUSH WINAPI CreateDIBPatternBrushPt(PCVOID,UINT);
-HBITMAP WINAPI CreateDIBSection(HDC,const BITMAPINFO*,UINT,void**,HANDLE,DWORD);
-HBITMAP WINAPI CreateDiscardableBitmap(HDC,int,int);
-HRGN WINAPI CreateEllipticRgn(int,int,int,int);
-HRGN WINAPI CreateEllipticRgnIndirect(LPCRECT);
-HDC WINAPI CreateEnhMetaFileA(HDC,LPCSTR,LPCRECT,LPCSTR);
-HDC WINAPI CreateEnhMetaFileW(HDC,LPCWSTR,LPCRECT,LPCWSTR);
-HFONT WINAPI CreateFontA(int,int,int,int,int,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPCSTR);
-HFONT WINAPI CreateFontW(int,int,int,int,int,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPCWSTR);
-HFONT WINAPI CreateFontIndirectA(const LOGFONTA*);
-HFONT WINAPI CreateFontIndirectW(const LOGFONTW*);
-HPALETTE WINAPI CreateHalftonePalette(HDC);
-HBRUSH WINAPI CreateHatchBrush(int,COLORREF);
-HDC WINAPI CreateICA(LPCSTR,LPCSTR,LPCSTR,const DEVMODEA*);
-HDC WINAPI CreateICW(LPCWSTR,LPCWSTR,LPCWSTR,const DEVMODEW*);
-HDC WINAPI CreateMetaFileA(LPCSTR);
-HDC WINAPI CreateMetaFileW(LPCWSTR);
-HPALETTE WINAPI CreatePalette(const LOGPALETTE*);
-HBRUSH WINAPI CreatePatternBrush(HBITMAP);
-HPEN WINAPI CreatePen(int,int,COLORREF);
-HPEN WINAPI CreatePenIndirect(const LOGPEN*);
-HRGN WINAPI CreatePolygonRgn(const POINT*,int,int);
-HRGN WINAPI CreatePolyPolygonRgn(const POINT*,const INT*,int,int);
-HRGN WINAPI CreateRectRgn(int,int,int,int);
-HRGN WINAPI CreateRectRgnIndirect(LPCRECT);
-HRGN WINAPI CreateRoundRectRgn(int,int,int,int,int,int);
-BOOL WINAPI CreateScalableFontResourceA(DWORD,LPCSTR,LPCSTR,LPCSTR);
-BOOL WINAPI CreateScalableFontResourceW(DWORD,LPCWSTR,LPCWSTR,LPCWSTR);
-HBRUSH WINAPI CreateSolidBrush(COLORREF);
-BOOL WINAPI DeleteColorSpace(HCOLORSPACE);
-BOOL WINAPI DeleteDC(HDC);
-BOOL WINAPI DeleteEnhMetaFile(HENHMETAFILE);
-BOOL WINAPI DeleteMetaFile(HMETAFILE);
-BOOL WINAPI DeleteObject(HGDIOBJ);
-int WINAPI DescribePixelFormat(HDC,int,UINT,LPPIXELFORMATDESCRIPTOR);
-DWORD WINAPI DeviceCapabilitiesA(LPCSTR,LPCSTR,WORD,LPSTR,const DEVMODEA*);
-DWORD WINAPI DeviceCapabilitiesW(LPCWSTR,LPCWSTR,WORD,LPWSTR,const DEVMODEW*);
-BOOL WINAPI DPtoLP(HDC,LPPOINT,int);
-int WINAPI DrawEscape(HDC,int,int,LPCSTR);
-BOOL WINAPI Ellipse(HDC,int,int,int,int);
-int WINAPI EndDoc(HDC);
-int WINAPI EndPage(HDC);
-BOOL WINAPI EndPath(HDC);
-BOOL WINAPI EnumEnhMetaFile(HDC,HENHMETAFILE,ENHMFENUMPROC,PVOID,LPCRECT);
-int WINAPI EnumFontFamiliesA(HDC,LPCSTR,FONTENUMPROCA,LPARAM);
-int WINAPI EnumFontFamiliesW(HDC,LPCWSTR,FONTENUMPROCW,LPARAM);
-int WINAPI EnumFontFamiliesExA(HDC,PLOGFONTA,FONTENUMPROCA,LPARAM,DWORD);
-int WINAPI EnumFontFamiliesExW(HDC,PLOGFONTW,FONTENUMPROCW,LPARAM,DWORD);
-int WINAPI EnumFontsA(HDC,LPCSTR,FONTENUMPROCA,LPARAM);
-int WINAPI EnumFontsW(HDC,LPCWSTR,FONTENUMPROCA,LPARAM);
-int WINAPI EnumICMProfilesA(HDC,ICMENUMPROCA,LPARAM);
-int WINAPI EnumICMProfilesW(HDC,ICMENUMPROCW,LPARAM);
-BOOL WINAPI EnumMetaFile(HDC,HMETAFILE,MFENUMPROC,LPARAM);
-int WINAPI EnumObjects(HDC,int,GOBJENUMPROC,LPARAM);
-BOOL WINAPI EqualRgn(HRGN,HRGN);
-int WINAPI Escape(HDC,int,int,LPCSTR,PVOID);
-int WINAPI ExcludeClipRect(HDC,int,int,int,int);
-int WINAPI ExcludeUpdateRgn(HDC,HWND);
-HPEN WINAPI ExtCreatePen(DWORD,DWORD,const LOGBRUSH*,DWORD,const DWORD*);
-HRGN WINAPI ExtCreateRegion(const XFORM*,DWORD,const RGNDATA*);
-int WINAPI ExtEscape(HDC,int,int,LPCSTR,int,LPSTR);
-BOOL WINAPI ExtFloodFill(HDC,int,int,COLORREF,UINT);
-int WINAPI ExtSelectClipRgn(HDC,HRGN,int);
-BOOL WINAPI ExtTextOutA(HDC,int,int,UINT,LPCRECT,LPCSTR,UINT,const INT*);
-BOOL WINAPI ExtTextOutW(HDC,int,int,UINT,LPCRECT,LPCWSTR,UINT,const INT*);
-BOOL WINAPI FillPath(HDC);
-int WINAPI FillRect(HDC,LPCRECT,HBRUSH);
-int WINAPI FillRgn(HDC,HRGN,HBRUSH);
-BOOL WINAPI FixBrushOrgEx(HDC,int,int,LPPOINT);
-BOOL WINAPI FlattenPath(HDC);
-BOOL WINAPI FloodFill(HDC,int,int,COLORREF);
-BOOL WINAPI GdiComment(HDC,UINT,const BYTE*);
-BOOL WINAPI GdiFlush(void);
-DWORD WINAPI GdiGetBatchLimit(void);
-DWORD WINAPI GdiSetBatchLimit(DWORD);
-#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)(c)|((WORD)((BYTE)(m))<<8))|(((DWORD)(BYTE)(y))<<16))|(((DWORD)(BYTE)(k))<<24)))
-#define GetRValue(c) ((BYTE)(c))
-#define GetGValue(c) ((BYTE)(((WORD)(c))>>8))
-#define GetBValue(c) ((BYTE)((c)>>16))
-int WINAPI GetArcDirection(HDC);
-BOOL WINAPI GetAspectRatioFilterEx(HDC,LPSIZE);
-LONG WINAPI GetBitmapBits(HBITMAP,LONG,PVOID);
-BOOL WINAPI GetBitmapDimensionEx(HBITMAP,LPSIZE);
-COLORREF WINAPI GetBkColor(HDC);
-int WINAPI GetBkMode(HDC);
-UINT WINAPI GetBoundsRect(HDC,LPRECT,UINT);
-BOOL WINAPI GetBrushOrgEx(HDC,LPPOINT);
-BOOL WINAPI GetCharABCWidthsA(HDC,UINT,UINT,LPABC);
-BOOL WINAPI GetCharABCWidthsW(HDC,UINT,UINT,LPABC);
-BOOL WINAPI GetCharABCWidthsFloatA(HDC,UINT,UINT,LPABCFLOAT);
-BOOL WINAPI GetCharABCWidthsFloatW(HDC,UINT,UINT,LPABCFLOAT);
-DWORD WINAPI GetCharacterPlacementA(HDC,LPCSTR,int,int,LPGCP_RESULTSA,DWORD);
-DWORD WINAPI GetCharacterPlacementW(HDC,LPCWSTR,int,int,LPGCP_RESULTSW,DWORD);
-BOOL WINAPI GetCharWidth32A(HDC,UINT,UINT,LPINT);
-BOOL WINAPI GetCharWidth32W(HDC,UINT,UINT,LPINT);
-BOOL WINAPI GetCharWidthA(HDC,UINT,UINT,LPINT);
-BOOL WINAPI GetCharWidthW(HDC,UINT,UINT,LPINT);
-BOOL WINAPI GetCharWidthFloatA(HDC,UINT,UINT,PFLOAT);
-BOOL WINAPI GetCharWidthFloatW(HDC,UINT,UINT,PFLOAT);
-int WINAPI GetClipBox(HDC,LPRECT);
-int WINAPI GetClipRgn(HDC,HRGN);
-BOOL WINAPI GetColorAdjustment(HDC,LPCOLORADJUSTMENT);
-HANDLE WINAPI GetColorSpace(HDC);
-HGDIOBJ WINAPI GetCurrentObject(HDC,UINT);
-BOOL WINAPI GetCurrentPositionEx(HDC,LPPOINT);
-HCURSOR WINAPI GetCursor(void);
-BOOL WINAPI GetDCOrgEx(HDC,LPPOINT);
-int WINAPI GetDeviceCaps(HDC,int);
-BOOL WINAPI GetDeviceGammaRamp(HDC,PVOID);
-UINT WINAPI GetDIBColorTable(HDC,UINT,UINT,RGBQUAD*);
-int WINAPI GetDIBits(HDC,HBITMAP,UINT,UINT,PVOID,LPBITMAPINFO,UINT);
-HENHMETAFILE WINAPI GetEnhMetaFileA(LPCSTR);
-HENHMETAFILE WINAPI GetEnhMetaFileW(LPCWSTR);
-UINT WINAPI GetEnhMetaFileDescriptionA(HENHMETAFILE,UINT,LPSTR);
-UINT WINAPI GetEnhMetaFileDescriptionW(HENHMETAFILE,UINT,LPWSTR);
-UINT WINAPI GetEnhMetaFileHeader(HENHMETAFILE,UINT,LPENHMETAHEADER);
-UINT WINAPI GetEnhMetaFilePaletteEntries(HENHMETAFILE,UINT,LPPALETTEENTRY);
-UINT WINAPI GetEnhMetaFilePixelFormat(HENHMETAFILE,DWORD,PIXELFORMATDESCRIPTOR*);
-DWORD WINAPI GetFontData(HDC,DWORD,DWORD,PVOID,DWORD);
-DWORD WINAPI GetFontLanguageInfo(HDC);
-DWORD WINAPI GetGlyphOutlineA(HDC,UINT,UINT,LPGLYPHMETRICS,DWORD,PVOID,const MAT2*);
-DWORD WINAPI GetGlyphOutlineW(HDC,UINT,UINT,LPGLYPHMETRICS,DWORD,PVOID,const MAT2*);
-int WINAPI GetGraphicsMode(HDC);
-BOOL WINAPI GetICMProfileA(HDC,DWORD,LPSTR);
-BOOL WINAPI GetICMProfileW(HDC,DWORD,LPWSTR);
-DWORD WINAPI GetKerningPairsA(HDC,DWORD,LPKERNINGPAIR);
-DWORD WINAPI GetKerningPairsW(HDC,DWORD,LPKERNINGPAIR);
-BOOL WINAPI GetLogColorSpaceA(HCOLORSPACE,LPLOGCOLORSPACEA,DWORD);
-BOOL WINAPI GetLogColorSpaceW(HCOLORSPACE,LPLOGCOLORSPACEW,DWORD);
-int WINAPI GetMapMode(HDC);
-HMETAFILE WINAPI GetMetaFileA(LPCSTR);
-HMETAFILE WINAPI GetMetaFileW(LPCWSTR);
-UINT WINAPI GetMetaFileBitsEx(HMETAFILE,UINT,PVOID);
-int WINAPI GetMetaRgn(HDC,HRGN);
-BOOL WINAPI GetMiterLimit(HDC,PFLOAT);
-COLORREF WINAPI GetNearestColor(HDC,COLORREF);
-UINT WINAPI GetNearestPaletteIndex(HPALETTE,COLORREF);
-int WINAPI GetObjectA(HGDIOBJ,int,PVOID);
-int WINAPI GetObjectW(HGDIOBJ,int,PVOID);
-DWORD WINAPI GetObjectType(HGDIOBJ);
-UINT WINAPI GetOutlineTextMetricsA(HDC,UINT,LPOUTLINETEXTMETRICA);
-UINT WINAPI GetOutlineTextMetricsW(HDC,UINT,LPOUTLINETEXTMETRICW);
-UINT WINAPI GetPaletteEntries(HPALETTE,UINT,UINT,LPPALETTEENTRY);
-int WINAPI GetPath(HDC,LPPOINT,PBYTE,int);
-COLORREF WINAPI GetPixel(HDC,int,int);
-int WINAPI GetPixelFormat(HDC);
-int WINAPI GetPolyFillMode(HDC);
-BOOL WINAPI GetRasterizerCaps(LPRASTERIZER_STATUS,UINT);
-DWORD WINAPI GetRegionData(HRGN,DWORD,LPRGNDATA);
-int WINAPI GetRgnBox(HRGN,LPRECT);
-int WINAPI GetROP2(HDC);
-HGDIOBJ WINAPI GetStockObject(int);
-int WINAPI GetStretchBltMode(HDC);
-UINT WINAPI GetSystemPaletteEntries(HDC,UINT,UINT,LPPALETTEENTRY);
-UINT WINAPI GetSystemPaletteUse(HDC);
-UINT WINAPI GetTextAlign(HDC);
-int WINAPI GetTextCharacterExtra(HDC);
-int WINAPI GetTextCharset(HDC);
-int WINAPI GetTextCharsetInfo(HDC,LPFONTSIGNATURE,DWORD);
-COLORREF WINAPI GetTextColor(HDC);
-BOOL WINAPI GetTextExtentExPointA(HDC,LPCSTR,int,int,LPINT,LPINT,LPSIZE);
-BOOL WINAPI GetTextExtentExPointW( HDC,LPCWSTR,int,int,LPINT,LPINT,LPSIZE );
-BOOL WINAPI GetTextExtentPointA(HDC,LPCSTR,int,LPSIZE);
-BOOL WINAPI GetTextExtentPointW(HDC,LPCWSTR,int,LPSIZE);
-BOOL WINAPI GetTextExtentPoint32A(HDC,LPCSTR,int,LPSIZE);
-BOOL WINAPI GetTextExtentPoint32W( HDC,LPCWSTR,int,LPSIZE);
-int WINAPI GetTextFaceA(HDC,int,LPSTR);
-int WINAPI GetTextFaceW(HDC,int,LPWSTR);
-BOOL WINAPI GetTextMetricsA(HDC,LPTEXTMETRICA);
-BOOL WINAPI GetTextMetricsW(HDC,LPTEXTMETRICW);
-BOOL WINAPI GetViewportExtEx(HDC,LPSIZE);
-BOOL WINAPI GetViewportOrgEx(HDC,LPPOINT);
-BOOL WINAPI GetWindowExtEx(HDC,LPSIZE);
-BOOL WINAPI GetWindowOrgEx(HDC,LPPOINT);
-UINT WINAPI GetWinMetaFileBits(HENHMETAFILE,UINT,LPBYTE,INT,HDC);
-BOOL WINAPI GetWorldTransform(HDC,LPXFORM);
-int WINAPI IntersectClipRect(HDC,int,int,int,int);
-BOOL WINAPI InvertRgn(HDC,HRGN);
-BOOL WINAPI LineDDA(int,int,int,int,LINEDDAPROC,LPARAM);
-BOOL WINAPI LineTo(HDC,int,int);
-BOOL WINAPI LPtoDP(HDC,LPPOINT,int);
-BOOL WINAPI MaskBlt(HDC,int,int,int,int,HDC,int,int,HBITMAP,int,int,DWORD);
-BOOL WINAPI ModifyWorldTransform(HDC,const XFORM*,DWORD);
-BOOL WINAPI MoveToEx(HDC,int,int,LPPOINT);
-int WINAPI OffsetClipRgn(HDC,int,int);
-int WINAPI OffsetRgn(HRGN,int,int);
-BOOL WINAPI OffsetViewportOrgEx(HDC,int,int,LPPOINT);
-BOOL WINAPI OffsetWindowOrgEx(HDC,int,int,LPPOINT);
-BOOL WINAPI PaintRgn(HDC,HRGN);
-BOOL WINAPI PatBlt(HDC,int,int,int,int,DWORD);
-HRGN WINAPI PathToRegion(HDC);
-BOOL WINAPI Pie(HDC,int,int,int,int,int,int,int,int);
-BOOL WINAPI PlayEnhMetaFile(HDC,HENHMETAFILE,LPCRECT);
-BOOL WINAPI PlayEnhMetaFileRecord(HDC,LPHANDLETABLE,const ENHMETARECORD*,UINT);
-BOOL WINAPI PlayMetaFile(HDC,HMETAFILE);
-BOOL WINAPI PlayMetaFileRecord(HDC,LPHANDLETABLE,LPMETARECORD,UINT);
-BOOL WINAPI PlgBlt(HDC,const POINT*,HDC,int,int,int,int,HBITMAP,int,int);
-BOOL WINAPI PolyBezier(HDC,const POINT*,DWORD);
-BOOL WINAPI PolyBezierTo(HDC,const POINT*,DWORD);
-BOOL WINAPI PolyDraw(HDC,const POINT*,const BYTE*,int);
-BOOL WINAPI Polygon(HDC,const POINT*,int);
-BOOL WINAPI Polyline(HDC,const POINT*,int);
-BOOL WINAPI PolylineTo(HDC,const POINT*,DWORD);
-BOOL WINAPI PolyPolygon(HDC,const POINT*,const INT*,int);
-BOOL WINAPI PolyPolyline(HDC,const POINT*,const DWORD*,DWORD);
-BOOL WINAPI PolyTextOutA(HDC,const POLYTEXTA*,int);
-BOOL WINAPI PolyTextOutW(HDC,const POLYTEXTW*,int);
-BOOL WINAPI PtInRegion(HRGN,int,int);
-BOOL WINAPI PtVisible(HDC,int,int);
-UINT WINAPI RealizePalette(HDC);
-BOOL WINAPI Rectangle(HDC,int,int,int,int);
-BOOL WINAPI RectInRegion(HRGN,LPCRECT);
-BOOL WINAPI RectVisible(HDC,LPCRECT);
-BOOL WINAPI RemoveFontResourceA(LPCSTR);
-BOOL WINAPI RemoveFontResourceW(LPCWSTR);
-HDC WINAPI ResetDCA(HDC,const DEVMODEA*);
-HDC WINAPI ResetDCW(HDC,const DEVMODEW*);
-BOOL WINAPI ResizePalette(HPALETTE,UINT);
-BOOL WINAPI RestoreDC(HDC,int);
-BOOL WINAPI RoundRect(HDC,int,int,int,int,int,int);
-int WINAPI SaveDC(HDC);
-BOOL WINAPI ScaleViewportExtEx(HDC,int,int,int,int,LPSIZE);
-BOOL WINAPI ScaleWindowExtEx(HDC,int,int,int,int,LPSIZE);
-BOOL WINAPI SelectClipPath(HDC,int);
-int WINAPI SelectClipRgn(HDC,HRGN);
-HGDIOBJ WINAPI SelectObject(HDC,HGDIOBJ);
-HPALETTE WINAPI SelectPalette(HDC,HPALETTE,BOOL);
-int WINAPI SetAbortProc(HDC,ABORTPROC);
-int WINAPI SetArcDirection(HDC,int);
-LONG WINAPI SetBitmapBits(HBITMAP,DWORD,PCVOID);
-BOOL WINAPI SetBitmapDimensionEx(HBITMAP,int,int,LPSIZE);
-COLORREF WINAPI SetBkColor(HDC,COLORREF);
-int WINAPI SetBkMode(HDC,int);
-UINT WINAPI SetBoundsRect(HDC,LPCRECT,UINT);
-BOOL WINAPI SetBrushOrgEx(HDC,int,int,LPPOINT);
-BOOL WINAPI SetColorAdjustment(HDC,const COLORADJUSTMENT*);
-BOOL WINAPI SetColorSpace(HDC,HCOLORSPACE);
-BOOL WINAPI SetDeviceGammaRamp(HDC,PVOID);
-UINT WINAPI SetDIBColorTable(HDC,UINT,UINT,const RGBQUAD*);
-int WINAPI SetDIBits(HDC,HBITMAP,UINT,UINT,PCVOID,const BITMAPINFO*,UINT);
-int WINAPI SetDIBitsToDevice(HDC,int,int,DWORD,DWORD,int,int,UINT,UINT,PCVOID,const BITMAPINFO*,UINT);
-HENHMETAFILE WINAPI SetEnhMetaFileBits(UINT,const BYTE*);
-int WINAPI SetGraphicsMode(HDC,int);
-int WINAPI SetICMMode(HDC,int);
-BOOL WINAPI SetICMProfileA(HDC,LPSTR);
-BOOL WINAPI SetICMProfileW(HDC,LPWSTR);
-int WINAPI SetMapMode(HDC,int);
-DWORD WINAPI SetMapperFlags(HDC,DWORD);
-HMETAFILE WINAPI SetMetaFileBitsEx(UINT,const BYTE *);
-int WINAPI SetMetaRgn(HDC);
-BOOL WINAPI SetMiterLimit(HDC,FLOAT,PFLOAT);
-UINT WINAPI SetPaletteEntries(HPALETTE,UINT,UINT,const PALETTEENTRY*);
-COLORREF WINAPI SetPixel(HDC,int,int,COLORREF);
-BOOL WINAPI SetPixelFormat(HDC,int,PIXELFORMATDESCRIPTOR*);
-BOOL WINAPI SetPixelV(HDC,int,int,COLORREF);
-int WINAPI SetPolyFillMode(HDC,int);
-BOOL WINAPI SetRectRgn(HRGN,int,int,int,int);
-int WINAPI SetROP2(HDC,int);
-int WINAPI SetStretchBltMode(HDC,int);
-UINT WINAPI SetSystemPaletteUse(HDC,UINT);
-UINT WINAPI SetTextAlign(HDC,UINT);
-int WINAPI SetTextCharacterExtra(HDC,int);
-COLORREF WINAPI SetTextColor(HDC,COLORREF);
-BOOL WINAPI SetTextJustification(HDC,int,int);
-BOOL WINAPI SetViewportExtEx(HDC,int,int,LPSIZE);
-BOOL WINAPI SetViewportOrgEx(HDC,int,int,LPPOINT);
-BOOL WINAPI SetWindowExtEx(HDC,int,int,LPSIZE);
-BOOL WINAPI SetWindowOrgEx(HDC,int,int,LPPOINT);
-HENHMETAFILE WINAPI SetWinMetaFileBits(UINT,const BYTE*,HDC,const METAFILEPICT*);
-BOOL WINAPI SetWorldTransform(HDC,const XFORM *);
-int WINAPI StartDocA(HDC,const DOCINFO*);
-int WINAPI StartDocW(HDC,const DOCINFO*);
-int WINAPI StartPage(HDC);
-BOOL WINAPI StretchBlt(HDC,int,int,int,int,HDC,int,int,int,int,DWORD);
-int WINAPI StretchDIBits(HDC,int,int,int,int,int,int,int,int,const VOID *,const BITMAPINFO *,UINT,DWORD);
-BOOL WINAPI StrokeAndFillPath(HDC);
-BOOL WINAPI StrokePath(HDC);
-BOOL WINAPI SwapBuffers(HDC);
-BOOL WINAPI TextOutA(HDC,int,int,LPCSTR,int);
-BOOL WINAPI TextOutW(HDC,int,int,LPCWSTR,int);
-BOOL WINAPI TranslateCharsetInfo(PDWORD,LPCHARSETINFO,DWORD);
-BOOL WINAPI UnrealizeObject(HGDIOBJ);
-BOOL WINAPI UpdateColors(HDC);
-BOOL WINAPI UpdateICMRegKeyA(DWORD,DWORD,LPSTR,UINT);
-BOOL WINAPI UpdateICMRegKeyW(DWORD,DWORD,LPWSTR,UINT);
-BOOL WINAPI WidenPath(HDC);
-BOOL WINAPI wglCopyContext(HGLRC,HGLRC,UINT);
-HGLRC WINAPI wglCreateContext(HDC);
-HGLRC WINAPI wglCreateLayerContext(HDC,int);
-BOOL WINAPI wglDeleteContext(HGLRC);
-BOOL WINAPI wglDescribeLayerPlane(HDC,int,int,UINT,LPLAYERPLANEDESCRIPTOR);
-HGLRC WINAPI wglGetCurrentContext(void);
-HDC WINAPI wglGetCurrentDC(void);
-int WINAPI wglGetLayerPaletteEntries(HDC,int,int,int,COLORREF*);
-PROC WINAPI wglGetProcAddress(LPCSTR);
-BOOL WINAPI wglMakeCurrent(HDC,HGLRC);
-BOOL WINAPI wglRealizeLayerPalette(HDC,int,BOOL);
-int WINAPI wglSetLayerPaletteEntries(HDC,int,int,int,const COLORREF*);
-BOOL WINAPI wglShareLists(HGLRC,HGLRC);
-BOOL WINAPI wglSwapLayerBuffers(HDC,UINT);
-BOOL WINAPI wglUseFontBitmapsA(HDC,DWORD,DWORD,DWORD);
-BOOL WINAPI wglUseFontBitmapsW(HDC,DWORD,DWORD,DWORD);
-BOOL WINAPI wglUseFontOutlinesA(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,int,LPGLYPHMETRICSFLOAT);
-BOOL WINAPI wglUseFontOutlinesW(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,int,LPGLYPHMETRICSFLOAT);
-
-#ifdef UNICODE
-typedef WCHAR BCHAR;
-typedef LOGFONTW LOGFONT,*PLOGFONT,*LPLOGFONT;
-typedef TEXTMETRICW TEXTMETRIC,*PTEXTMETRIC,*LPTEXTMETRIC;
-#define ICMENUMPROC ICMENUMPROCW
-#define FONTENUMPROC FONTENUMPROCW
-typedef DEVMODEW DEVMODE,*PDEVMODE,*LPDEVMODE;
-typedef EXTLOGFONTW EXTLOGFONT,*PEXTLOGFONT,*LPEXTLOGFONT;
-typedef GCP_RESULTSW GCP_RESULTS,*LPGCP_RESULTS;
-typedef OUTLINETEXTMETRICW OUTLINETEXTMETRIC,*POUTLINETEXTMETRIC,*LPOUTLINETEXTMETRIC;
-typedef POLYTEXTW POLYTEXT;
-typedef LOGCOLORSPACEW LOGCOLORSPACE,*LPLOGCOLORSPACE;
-typedef NEWTEXTMETRICW NEWTEXTMETRIC,*PNEWTEXTMETRIC,*LPNEWTEXTMETRIC;
-typedef NEWTEXTMETRICEXW NEWTEXTMETRICEX;
-typedef ENUMLOGFONTW ENUMLOGFONT,*LPENUMLOGFONT;
-typedef ENUMLOGFONTEXW ENUMLOGFONTEX,*LPENUMLOGFONTEX;
-#define AddFontResource AddFontResourceW
-#define CopyEnhMetaFile CopyEnhMetaFileW
-#define CopyMetaFile CopyMetaFileW
-#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
-#define ResetDC ResetDCW
-#define SetICMProfile SetICMProfileW
-#define StartDoc StartDocW
-#define TextOut TextOutW
-#define UpdateICMRegKey UpdateICMRegKeyW
-#define wglUseFontBitmaps wglUseFontBitmapsW
-#define wglUseFontOutlines wglUseFontOutlinesW
-#else
-typedef BYTE BCHAR;
-typedef LOGFONTA LOGFONT,*PLOGFONT,*LPLOGFONT;
-typedef TEXTMETRICA TEXTMETRIC,*PTEXTMETRIC,*LPTEXTMETRIC;
-#define ICMENUMPROC ICMENUMPROCA
-#define FONTENUMPROC FONTENUMPROCA
-typedef DEVMODEA DEVMODE,*PDEVMODE,*LPDEVMODE;
-typedef EXTLOGFONTA EXTLOGFONT,*PEXTLOGFONT,*LPEXTLOGFONT;
-typedef GCP_RESULTSA GCP_RESULTS,*LPGCP_RESULTS;
-typedef OUTLINETEXTMETRICA OUTLINETEXTMETRIC,*POUTLINETEXTMETRIC,*LPOUTLINETEXTMETRIC;
-typedef POLYTEXTA POLYTEXT;
-typedef LOGCOLORSPACEA LOGCOLORSPACE,*LPLOGCOLORSPACE;
-typedef NEWTEXTMETRICA NEWTEXTMETRIC,*PNEWTEXTMETRIC,*LPNEWTEXTMETRIC;
-typedef NEWTEXTMETRICEXA NEWTEXTMETRICEX;
-typedef ENUMLOGFONTA ENUMLOGFONT,*LPENUMLOGFONT;
-typedef ENUMLOGFONTEXA ENUMLOGFONTEX,*LPENUMLOGFONTEX;
-#define AddFontResource AddFontResourceA
-#define CopyEnhMetaFile CopyEnhMetaFileA
-#define CopyMetaFile CopyMetaFileA
-#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
-#define ResetDC ResetDCA
-#define SetICMProfile SetICMProfileA
-#define StartDoc StartDocA
-#define TextOut TextOutA
-#define UpdateICMRegKey UpdateICMRegKeyA
-#define wglUseFontBitmaps wglUseFontBitmapsA
-#define wglUseFontOutlines wglUseFontOutlinesA
-#endif
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/wininet.h b/winsup/w32api/include/wininet.h
deleted file mode 100644
index ec1e69574..000000000
--- a/winsup/w32api/include/wininet.h
+++ /dev/null
@@ -1,885 +0,0 @@
-#ifndef _WININET_H
-#define _WININET_H
-#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_FIRST_OPTION INTERNET_OPTION_CALLBACK
-#define INTERNET_LAST_OPTION INTERNET_OPTION_USER_AGENT
-#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_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 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
-
-typedef PVOID HINTERNET;
-typedef HINTERNET *LPHINTERNET;
-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;
-
-#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;
-#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;
-#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 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);
-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);
-BOOL WINAPI FtpCommandW( HINTERNET,BOOL,DWORD,LPCWSTR,DWORD);
-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);
-#ifdef UNICODE
-#define InternetCrackUrl InternetCrackUrlW
-#define InternetCreateUrl InternetCreateUrlW
-#define InternetCanonicalizeUrl InternetCanonicalizeUrlW
-#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 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
-#else
-#define GopherGetAttribute GopherGetAttributeA
-#define InternetCrackUrl InternetCrackUrlA
-#define InternetCreateUrl InternetCreateUrlA
-#define InternetCanonicalizeUrl InternetCanonicalizeUrlA
-#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 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
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/winioctl.h b/winsup/w32api/include/winioctl.h
deleted file mode 100644
index 7cc1be628..000000000
--- a/winsup/w32api/include/winioctl.h
+++ /dev/null
@@ -1,291 +0,0 @@
-#ifndef _WINIOCTL_H
-#define _WINIOCTL_H
-#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 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_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_SERIAL_LSRMST_INSERT CTL_CODE(FILE_DEVICE_SERIAL_PORT,31,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_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_WRITE_DATA)
-#define FSCTL_DELETE_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 43, METHOD_BUFFERED, FILE_WRITE_DATA)
-#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_PREP 0x41
-#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
-#define FILE_ANY_ACCESS 0
-#define FILE_READ_ACCESS 1
-#define FILE_WRITE_ACCESS 2
-#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 _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
-} MEDIA_TYPE;
-typedef struct _DISK_GEOMETRY {
- LARGE_INTEGER Cylinders;
- MEDIA_TYPE MediaType;
- DWORD TracksPerCylinder;
- DWORD SectorsPerTrack;
- DWORD BytesPerSector;
-} DISK_GEOMETRY;
-typedef struct _DISK_PERFORMANCE {
- LARGE_INTEGER BytesRead;
- LARGE_INTEGER BytesWritten;
- LARGE_INTEGER ReadTime;
- LARGE_INTEGER WriteTime;
- DWORD ReadCount;
- DWORD WriteCount;
- DWORD QueueDepth;
-} DISK_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 _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 _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 _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;
-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 _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 _VERIFY_INFORMATION {
- LARGE_INTEGER StartingOffset;
- DWORD Length;
-} VERIFY_INFORMATION,*PVERIFY_INFORMATION;
-#define IsRecognizedPartition(t) (((t&PARTITION_NTFT)&&((t&~0xC0)==PARTITION_FAT_12))||\
- ((t&PARTITION_NTFT)&&((t&~0xC0)==PARTITION_FAT_16))||\
- ((t&PARTITION_NTFT)&&((t&~0xC0)==PARTITION_IFS))||\
- ((t&PARTITION_NTFT)&&((t&~0xC0)==PARTITION_HUGE))||\
- ((t&~PARTITION_NTFT)==PARTITION_FAT_12)||\
- ((t&~PARTITION_NTFT)==PARTITION_FAT_16)||\
- ((t&~PARTITION_NTFT)==PARTITION_IFS)||\
- ((t&~PARTITION_NTFT)==PARTITION_HUGE))
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/winnetwk.h b/winsup/w32api/include/winnetwk.h
deleted file mode 100644
index 2fc39ceb0..000000000
--- a/winsup/w32api/include/winnetwk.h
+++ /dev/null
@@ -1,338 +0,0 @@
-#ifndef _WINNETWK_H
-#define _WINNETWK_H
-#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 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 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 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 ea72eda7b..000000000
--- a/winsup/w32api/include/winnls.h
+++ /dev/null
@@ -1,647 +0,0 @@
-#ifndef _WINNLS_H
-#define _WINNLS_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define MAX_LEADBYTES 12
-#define MAX_DEFAULTCHAR 2
-#define LOCALE_NOUSEROVERRIDE 0x80000000
-#define LOCALE_USE_CP_ACP 0x40000000
-#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_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_MEXICO 52
-#define CTRY_MONACO 33
-#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 >= 0x0500)
-#define LOCALE_SYEARMONTH 0x1006
-#define LOCALE_SENGCURRNAME 0x1007
-#define LOCALE_SNATIVECURRNAME 0x1008
-#define LOCALE_IDEFAULTEBCDICCODEPAGE 0x1012
-#define LOCALE_SSORTNAME 0x1013
-#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
-#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
-#endif /* WINVER >= 0x0500 */
-#ifndef _BASETSD_H
-typedef long LONG_PTR;
-#endif
-
-#ifndef RC_INVOKED
-typedef DWORD LCTYPE;
-typedef DWORD CALTYPE;
-typedef DWORD CALID;
-typedef DWORD LGRPID;
-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 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 _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;
-
-int WINAPI CompareStringA(LCID,DWORD,LPCSTR,int,LPCSTR,int);
-int WINAPI CompareStringW(LCID,DWORD,LPCWSTR,int,LPCWSTR,int);
-LCID WINAPI ConvertDefaultLocale(LCID);
-BOOL WINAPI EnumCalendarInfoA(CALINFO_ENUMPROCA,LCID,CALID,CALTYPE);
-BOOL WINAPI EnumCalendarInfoW(CALINFO_ENUMPROCW,LCID,CALID,CALTYPE);
-BOOL WINAPI EnumDateFormatsA(DATEFMT_ENUMPROCA,LCID,DWORD);
-BOOL WINAPI EnumDateFormatsW(DATEFMT_ENUMPROCW,LCID,DWORD);
-BOOL WINAPI EnumSystemCodePagesA(CODEPAGE_ENUMPROCA,DWORD);
-BOOL WINAPI EnumSystemCodePagesW(CODEPAGE_ENUMPROCW,DWORD);
-BOOL WINAPI EnumSystemLocalesA(LOCALE_ENUMPROCA,DWORD);
-BOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW,DWORD);
-BOOL WINAPI EnumTimeFormatsA(TIMEFMT_ENUMPROCA,LCID,DWORD);
-BOOL WINAPI EnumTimeFormatsW(TIMEFMT_ENUMPROCW,LCID,DWORD);
-int WINAPI FoldStringA(DWORD,LPCSTR,int,LPSTR,int);
-int WINAPI FoldStringW(DWORD,LPCWSTR,int,LPWSTR,int);
-UINT WINAPI GetACP(void);
-BOOL WINAPI GetCPInfo(UINT,LPCPINFO);
-BOOL WINAPI GetCPInfoExA(UINT,DWORD,LPCPINFOEXA);
-BOOL WINAPI GetCPInfoExW(UINT,DWORD,LPCPINFOEXW);
-int WINAPI GetCurrencyFormatA(LCID,DWORD,LPCSTR,const CURRENCYFMTA*,LPSTR,int);
-int WINAPI GetCurrencyFormatW(LCID,DWORD,LPCWSTR,const CURRENCYFMTW*,LPWSTR,int);
-int WINAPI GetDateFormatA(LCID,DWORD,const SYSTEMTIME*,LPCSTR,LPSTR,int);
-int WINAPI GetDateFormatW(LCID,DWORD,const SYSTEMTIME*,LPCWSTR,LPWSTR,int);
-int WINAPI GetLocaleInfoA(LCID,LCTYPE,LPSTR,int);
-int WINAPI GetLocaleInfoW(LCID,LCTYPE,LPWSTR,int);
-int WINAPI GetNumberFormatA(LCID,DWORD,LPCSTR,const NUMBERFMTA*,LPSTR,int);
-int WINAPI GetNumberFormatW(LCID,DWORD,LPCWSTR,const NUMBERFMTW*,LPWSTR,int);
-UINT WINAPI GetOEMCP(void);
-BOOL WINAPI GetStringTypeA(LCID,DWORD,LPCSTR,int,LPWORD);
-BOOL WINAPI GetStringTypeW(DWORD,LPCWSTR,int,LPWORD);
-BOOL WINAPI GetStringTypeExA(LCID,DWORD,LPCSTR,int,LPWORD);
-BOOL WINAPI GetStringTypeExW(LCID,DWORD,LPCWSTR,int,LPWORD);
-LANGID WINAPI GetSystemDefaultLangID(void);
-LCID WINAPI GetSystemDefaultLCID(void);
-LCID WINAPI GetThreadLocale(void);
-int WINAPI GetTimeFormatA(LCID,DWORD,const SYSTEMTIME*,LPCSTR,LPSTR,int);
-int WINAPI GetTimeFormatW(LCID,DWORD,const SYSTEMTIME*,LPCWSTR,LPWSTR,int);
-LANGID WINAPI GetUserDefaultLangID(void);
-LCID WINAPI GetUserDefaultLCID(void);
-BOOL WINAPI IsDBCSLeadByte(BYTE);
-BOOL WINAPI IsDBCSLeadByteEx(UINT,BYTE);
-BOOL WINAPI IsValidCodePage(UINT);
-BOOL WINAPI IsValidLocale(LCID,DWORD);
-int WINAPI LCMapStringA(LCID,DWORD,LPCSTR,int,LPSTR,int);
-int WINAPI LCMapStringW(LCID,DWORD,LPCWSTR,int,LPWSTR,int);
-int WINAPI MultiByteToWideChar(UINT,DWORD,LPCSTR,int,LPWSTR,int);
-BOOL WINAPI SetLocaleInfoA(LCID,LCTYPE,LPCSTR);
-BOOL WINAPI SetLocaleInfoW(LCID,LCTYPE,LPCWSTR);
-BOOL WINAPI SetThreadLocale(LCID);
-int WINAPI WideCharToMultiByte(UINT,DWORD,LPCWSTR,int,LPSTR,int,LPCSTR,LPBOOL);
-#if (WINVER >= 0x0500)
-BOOL WINAPI EnumCalendarInfoExA(CALINFO_ENUMPROCEXA,LCID,CALID,CALTYPE);
-BOOL WINAPI EnumCalendarInfoExW(CALINFO_ENUMPROCEXW,LCID,CALID,CALTYPE);
-BOOL WINAPI EnumDateFormatsExA(DATEFMT_ENUMPROCEXA,LCID,DWORD);
-BOOL WINAPI EnumDateFormatsExW(DATEFMT_ENUMPROCEXW,LCID,DWORD);
-BOOL WINAPI EnumSystemLanguageGroupsA(LANGUAGEGROUP_ENUMPROCA,DWORD,LONG_PTR);
-BOOL WINAPI EnumSystemLanguageGroupsW(LANGUAGEGROUP_ENUMPROCW,DWORD,LONG_PTR);
-BOOL WINAPI EnumLanguageGroupLocalesA(LANGGROUPLOCALE_ENUMPROCA,LGRPID,DWORD,LONG_PTR);
-BOOL WINAPI EnumLanguageGroupLocalesW(LANGGROUPLOCALE_ENUMPROCW,LGRPID,DWORD,LONG_PTR);
-BOOL WINAPI EnumUILanguagesA(UILANGUAGE_ENUMPROCA,DWORD,LONG_PTR);
-BOOL WINAPI EnumUILanguagesW(UILANGUAGE_ENUMPROCW,DWORD,LONG_PTR);
-LANGID WINAPI GetSystemDefaultUILanguage(void);
-LANGID WINAPI GetUserDefaultUILanguage(void);
-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 GetCPInfoEx GetCPInfoExW
-#define GetCurrencyFormat GetCurrencyFormatW
-#define GetDateFormat GetDateFormatW
-#define GetLocaleInfo GetLocaleInfoW
-#define GetNumberFormat GetNumberFormatW
-#define GetStringTypeEx GetStringTypeExW
-#define GetTimeFormat GetTimeFormatW
-#define LCMapString LCMapStringW
-#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 GetCPInfoEx GetCPInfoExA
-#define GetCurrencyFormat GetCurrencyFormatA
-#define GetDateFormat GetDateFormatA
-#define GetLocaleInfo GetLocaleInfoA
-#define GetNumberFormat GetNumberFormatA
-#define GetStringTypeEx GetStringTypeExA
-#define GetTimeFormat GetTimeFormatA
-#define LCMapString LCMapStringA
-#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 235244ece..000000000
--- a/winsup/w32api/include/winnt.h
+++ /dev/null
@@ -1,2494 +0,0 @@
-#ifndef _WINNT_H
-#define _WINNT_H
-/* 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 VOID
-#define VOID void
-typedef char CHAR;
-typedef short SHORT;
-typedef long LONG;
-#endif
-typedef CHAR CCHAR;
-typedef unsigned char UCHAR,*PUCHAR;
-typedef unsigned short USHORT,*PUSHORT;
-typedef unsigned long ULONG,*PULONG;
-typedef char *PSZ;
-
-#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
-typedef WCHAR TCHAR;
-#else
-typedef CHAR TCHAR;
-#endif
-#endif
-typedef TCHAR TBYTE,*PTCH,*PTBYTE;
-typedef TCHAR *LPTCH,*PTSTR,*LPTSTR,*LP,*PTCHAR;
-typedef const TCHAR *LPCTSTR;
-#ifdef UNICODE
-#define TEXT(q) L##q
-#else
-#define TEXT(q) q
-#endif
-#ifndef _T
-#define _T TEXT
-#endif
-typedef SHORT *PSHORT;
-typedef LONG *PLONG;
-typedef void *HANDLE;
-typedef HANDLE *PHANDLE,*LPHANDLE;
-#ifdef STRICT
-#define DECLARE_HANDLE(n) typedef struct n##__{int i;}*n
-#else
-#define DECLARE_HANDLE(n) typedef HANDLE n
-#endif
-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
-#endif
-#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
-
-#define NTAPI __stdcall
-#include <basetsd.h>
-#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
-#define COMPRESSION_FORMAT_NONE 0
-#define COMPRESSION_FORMAT_DEFAULT 1
-#define COMPRESSION_FORMAT_LZNT1 2
-#define COMPRESSION_ENGINE_STANDARD 0
-#define COMPRESSION_ENGINE_MAXIMUM 256
-#define ACCESS_ALLOWED_ACE_TYPE 0
-#define ACCESS_DENIED_ACE_TYPE 1
-#define ANYSIZE_ARRAY 1
-#define SYSTEM_AUDIT_ACE_TYPE 2
-#define SYSTEM_ALARM_ACE_TYPE 3
-#define OBJECT_INHERIT_ACE 1
-#define CONTAINER_INHERIT_ACE 2
-#define NO_PROPAGATE_INHERIT_ACE 4
-#define INHERIT_ONLY_ACE 8
-#define VALID_INHERIT_FLAGS 16
-#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 FILE_READ_DATA 1
-#define FILE_LIST_DIRECTORY 1
-#define FILE_WRITE_DATA 2
-#define FILE_ADD_FILE 2
-#define FILE_APPEND_DATA 4
-#define FILE_ADD_SUBDIRECTORY 4
-#define FILE_CREATE_PIPE_INSTANCE 4
-#define FILE_READ_EA 8
-#define FILE_READ_PROPERTIES 8
-#define FILE_WRITE_EA 16
-#define FILE_WRITE_PROPERTIES 16
-#define FILE_EXECUTE 32
-#define FILE_TRAVERSE 32
-#define FILE_DELETE_CHILD 64
-#define FILE_READ_ATTRIBUTES 128
-#define FILE_WRITE_ATTRIBUTES 256
-#define FILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x1FF)
-#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)
-#define FILE_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE|FILE_READ_ATTRIBUTES|FILE_EXECUTE|SYNCHRONIZE)
-#define FILE_SHARE_READ 1
-#define FILE_SHARE_WRITE 2
-#define FILE_SHARE_DELETE 4
-#define FILE_ATTRIBUTE_READONLY 1
-#define FILE_ATTRIBUTE_HIDDEN 2
-#define FILE_ATTRIBUTE_SYSTEM 4
-#define FILE_ATTRIBUTE_DIRECTORY 16
-#define FILE_ATTRIBUTE_ARCHIVE 32
-#define FILE_ATTRIBUTE_ENCRYPTED 64
-#define FILE_ATTRIBUTE_NORMAL 128
-#define FILE_ATTRIBUTE_TEMPORARY 256
-#define FILE_ATTRIBUTE_SPARSE_FILE 512
-#define FILE_ATTRIBUTE_REPARSE_POINT 1024
-#define FILE_ATTRIBUTE_COMPRESSED 2048
-#define FILE_ATTRIBUTE_OFFLINE 0x1000
-#define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x2000
-#define FILE_NOTIFY_CHANGE_FILE_NAME 1
-#define FILE_NOTIFY_CHANGE_DIR_NAME 2
-#define FILE_NOTIFY_CHANGE_ATTRIBUTES 4
-#define FILE_NOTIFY_CHANGE_SIZE 8
-#define FILE_NOTIFY_CHANGE_LAST_WRITE 16
-#define FILE_NOTIFY_CHANGE_LAST_ACCESS 32
-#define FILE_NOTIFY_CHANGE_CREATION 64
-#define FILE_NOTIFY_CHANGE_SECURITY 256
-#define MAILSLOT_NO_MESSAGE ((DWORD)-1)
-#define MAILSLOT_WAIT_FOREVER ((DWORD)-1)
-#define FILE_CASE_SENSITIVE_SEARCH 1
-#define FILE_CASE_PRESERVED_NAMES 2
-#define FILE_UNICODE_ON_DISK 4
-#define FILE_PERSISTENT_ACLS 8
-#define FILE_FILE_COMPRESSION 16
-#define FILE_VOLUME_QUOTAS 32
-#define FILE_SUPPORTS_SPARSE_FILES 64
-#define FILE_SUPPORTS_REPARSE_POINTS 128
-#define FILE_SUPPORTS_REMOTE_STORAGE 256
-#define FILE_VOLUME_IS_COMPRESSED 0x8000
-#define FILE_SUPPORTS_OBJECT_IDS 0x10000
-#define FILE_SUPPORTS_ENCRYPTION 0x20000
-#define FILE_NAMED_STREAMS 0x40000
-#define IO_COMPLETION_MODIFY_STATE 2
-#define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|3)
-#define DUPLICATE_CLOSE_SOURCE 1
-#define DUPLICATE_SAME_ACCESS 2
-#define PROCESS_TERMINATE 1
-#define PROCESS_CREATE_THREAD 2
-#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 EXCEPTION_NONCONTINUABLE 1
-#define EXCEPTION_MAXIMUM_PARAMETERS 15
-#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_NULL_RID 0
-#define SECURITY_WORLD_RID 0
-#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 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 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 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_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_FARSI 0x29
-#define LANG_VIETNAMESE 0x2a
-#define LANG_ARMENIAN 0x2b
-#define LANG_AZERI 0x2c
-#define LANG_BASQUE 0x2d
-#define LANG_MACEDONIAN 0x2f
-#define LANG_AFRIKAANS 0x36
-#define LANG_GEORGIAN 0x37
-#define LANG_FAEROESE 0x38
-#define LANG_HINDI 0x39
-#define LANG_MALAY 0x3e
-#define LANG_KAZAK 0x3f
-#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_KONKANI 0x57
-#define LANG_MANIPURI 0x58
-#define LANG_SINDHI 0x59
-#define LANG_KASHMIRI 0x60
-#define LANG_NEPALI 0x61
-#define SUBLANG_NEUTRAL 0x00
-#define SUBLANG_DEFAULT 0x01
-#define SUBLANG_SYS_DEFAULT 0x02
-#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_AZERI_CYRILLIC 0x01
-#define SUBLANG_AZERI_LATIN 0x02
-#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_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
-#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_PHILIPPINES 0x0c
-#define SUBLANG_ENGLISH_ZIMBABWE 0x0d
-#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_GERMAN 0x01
-#define SUBLANG_GERMAN_SWISS 0x02
-#define SUBLANG_GERMAN_AUSTRIAN 0x03
-#define SUBLANG_GERMAN_LUXEMBOURG 0x04
-#define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
-#define SUBLANG_ITALIAN 0x01
-#define SUBLANG_ITALIAN_SWISS 0x02
-#define SUBLANG_KASHMIRI_INDIA 0x02
-#define SUBLANG_KOREAN 0x01
-#define SUBLANG_LITHUANIAN 0x01
-#define SUBLANG_MALAY_MALAYSIA 0x01
-#define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
-#define SUBLANG_NEPALI_INDIA 0x02
-#define SUBLANG_NORWEGIAN_BOKMAL 0x01
-#define SUBLANG_NORWEGIAN_NYNORSK 0x02
-#define SUBLANG_PORTUGUESE 0x01
-#define SUBLANG_PORTUGUESE_BRAZILIAN 0x02
-#define SUBLANG_SERBIAN_LATIN 0x02
-#define SUBLANG_SERBIAN_CYRILLIC 0x03
-#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_SWEDISH 0x01
-#define SUBLANG_SWEDISH_FINLAND 0x02
-#define SUBLANG_URDU_PAKISTAN 0x01
-#define SUBLANG_URDU_INDIA 0x02
-#define SUBLANG_UZBEK_LATIN 0x01
-#define SUBLANG_UZBEK_CYRILLIC 0x02
-#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_ARCHITECTURE_INTEL 0
-#define PROCESSOR_ARCHITECTURE_MIPS 1
-#define PROCESSOR_ARCHITECTURE_ALPHA 2
-#define PROCESSOR_ARCHITECTURE_PPC 3
-#define PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF
-#define PAGE_READONLY 2
-#define PAGE_READWRITE 4
-#define PAGE_WRITECOPY 8
-#define FILE_ACTION_ADDED 1
-#define FILE_ACTION_REMOVED 2
-#define FILE_ACTION_MODIFIED 3
-#define FILE_ACTION_RENAMED_OLD_NAME 4
-#define FILE_ACTION_RENAMED_NEW_NAME 5
-#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
-#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 1
-#define GROUP_SECURITY_INFORMATION 2
-#define DACL_SECURITY_INFORMATION 4
-#define SACL_SECURITY_INFORMATION 8
-#define MAXIMUM_PROCESSORS 32
-#define PAGE_EXECUTE 16
-#define PAGE_EXECUTE_READ 32
-#define PAGE_EXECUTE_READWRITE 64
-#define PAGE_GUARD 256
-#define PAGE_NOACCESS 1
-#define PAGE_NOCACHE 512
-#define MEM_COMMIT 4096
-#define MEM_FREE 65536
-#define MEM_RESERVE 8192
-#define MEM_IMAGE 16777216
-#define MEM_MAPPED 262144
-#define MEM_PRIVATE 131072
-#define MEM_DECOMMIT 16384
-#define MEM_RELEASE 32768
-#define SEC_FILE 0x800000
-#define SEC_IMAGE 0x1000000
-#define SEC_VLM 0x2000000
-#define SEC_RESERVE 0x4000000
-#define SEC_COMMIT 0x8000000
-#define SEC_NOCACHE 0x10000000
-#define PAGE_EXECUTE_WRITECOPY 128
-#define SECTION_EXTEND_SIZE 16
-#define SECTION_MAP_READ 4
-#define SECTION_MAP_WRITE 2
-#define SECTION_QUERY 1
-#define SECTION_ALL_ACCESS 0xf001f
-#define MESSAGE_RESOURCE_UNICODE 1
-#define RTL_CRITSECT_TYPE 0
-#define RTL_RESOURCE_TYPE 1
-#define FIELD_OFFSET(t,f) ((LONG)&(((t*)0)->f))
-#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_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 0
-#define IMAGE_FILE_MACHINE_I386 332
-#define IMAGE_FILE_MACHINE_R3000 354
-#define IMAGE_FILE_MACHINE_R4000 358
-#define IMAGE_FILE_MACHINE_R10000 360
-#define IMAGE_FILE_MACHINE_ALPHA 388
-#define IMAGE_FILE_MACHINE_POWERPC 496
-#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_HDR_MAGIC 0x10b
-#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
-#define IMAGE_SUBSYSTEM_POSIX_CUI 7
-#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_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_SCN_TYPE_NO_PAD 8
-#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_LNK_REMOVE 2048
-#define IMAGE_SCN_LNK_COMDAT 4096
-#define IMAGE_SCN_MEM_FARDATA 0x8000
-#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_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
-#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_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
-#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 0
-#define IMAGE_REL_I386_DIR16 1
-#define IMAGE_REL_I386_REL16 2
-#define IMAGE_REL_I386_DIR32 6
-#define IMAGE_REL_I386_DIR32NB 7
-#define IMAGE_REL_I386_SEG12 9
-#define IMAGE_REL_I386_SECTION 10
-#define IMAGE_REL_I386_SECREL 11
-#define IMAGE_REL_I386_REL32 20
-#define IMAGE_REL_MIPS_ABSOLUTE 0
-#define IMAGE_REL_MIPS_REFHALF 1
-#define IMAGE_REL_MIPS_REFWORD 2
-#define IMAGE_REL_MIPS_JMPADDR 3
-#define IMAGE_REL_MIPS_REFHI 4
-#define IMAGE_REL_MIPS_REFLO 5
-#define IMAGE_REL_MIPS_GPREL 6
-#define IMAGE_REL_MIPS_LITERAL 7
-#define IMAGE_REL_MIPS_SECTION 10
-#define IMAGE_REL_MIPS_SECREL 11
-#define IMAGE_REL_MIPS_SECRELLO 12
-#define IMAGE_REL_MIPS_SECRELHI 13
-#define IMAGE_REL_MIPS_REFWORDNB 34
-#define IMAGE_REL_MIPS_PAIR 35
-#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_FLAG 0x80000000
-#define IMAGE_SNAP_BY_ORDINAL(o) ((o&IMAGE_ORDINAL_FLAG)!=0)
-#define IMAGE_ORDINAL(o) (o&0xffff)
-#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 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
-#define TOKEN_SOURCE_LENGTH 8
-#define TOKEN_ADJUST_DEFAULT 128
-#define TOKEN_ADJUST_GROUPS 64
-#define TOKEN_ADJUST_PRIVILEGES 32
-#define TOKEN_ALL_ACCESS 0xf00ff
-#define TOKEN_ASSIGN_PRIMARY 1
-#define TOKEN_DUPLICATE 2
-#define TOKEN_EXECUTE 0x20000
-#define TOKEN_IMPERSONATE 4
-#define TOKEN_QUERY 8
-#define TOKEN_QUERY_SOURCE 16
-#define TOKEN_READ 0x20008
-#define TOKEN_WRITE 0x200e0
-#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
-#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
-#ifndef RC_INVOKED
-typedef DWORD ACCESS_MASK;
-#ifndef _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;
-#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;
-typedef struct _ACCESS_ALLOWED_ACE {
- ACE_HEADER Header;
- ACCESS_MASK Mask;
- DWORD SidStart;
-} ACCESS_ALLOWED_ACE;
-typedef struct _ACCESS_DENIED_ACE {
- ACE_HEADER Header;
- ACCESS_MASK Mask;
- DWORD SidStart;
-} ACCESS_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_FULL (CONTEXT_CONTROL|CONTEXT_INTEGER|CONTEXT_SEGMENTS)
-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;
-} 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;
-typedef struct _EXCEPTION_POINTERS {
- PEXCEPTION_RECORD ExceptionRecord;
- PCONTEXT ContextRecord;
-} EXCEPTION_POINTERS,*PEXCEPTION_POINTERS,*LPEXCEPTION_POINTERS;
-typedef union _LARGE_INTEGER {
- struct {
- DWORD LowPart;
- LONG HighPart;
- }_STRUCT_NAME(u);
- LONGLONG QuadPart;
-} LARGE_INTEGER;
-typedef LARGE_INTEGER *PLARGE_INTEGER;
-typedef union _ULARGE_INTEGER {
- struct {
- DWORD LowPart;
- DWORD HighPart;
- }_STRUCT_NAME(u);
- DWORDLONG QuadPart;
-} ULARGE_INTEGER;
-typedef ULARGE_INTEGER *PULARGE_INTEGER;
-typedef LARGE_INTEGER LUID,*PLUID;
-#pragma pack(push,4)
-typedef struct _LUID_AND_ATTRIBUTES {
- LUID Luid;
- DWORD Attributes;
-} LUID_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;
-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;
-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;
-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;
-typedef struct _TOKEN_PRIMARY_GROUP {
- PSID PrimaryGroup;
-} TOKEN_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;
-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;
-typedef struct _TOKEN_USER {
- SID_AND_ATTRIBUTES User;
-} TOKEN_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
-} TOKEN_INFORMATION_CLASS;
-typedef enum _SID_NAME_USE {
- SidTypeUser=1,SidTypeGroup,SidTypeDomain,SidTypeAlias,SidTypeWellKnownGroup,
- SidTypeDeletedAccount,SidTypeInvalid,SidTypeUnknown
-} 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 _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;
-#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 Reserved1;
- 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_HEADER,*PIMAGE_OPTIONAL_HEADER;
-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_HEADERS,*PIMAGE_NT_HEADERS;
-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 {
- 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;
- PDWORD *AddressOfFunctions;
- PDWORD *AddressOfNames;
- PWORD *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_DATA {
- union {
- PBYTE ForwarderString;
- PDWORD Function;
- DWORD Ordinal;
- PIMAGE_IMPORT_BY_NAME AddressOfData;
- } u1;
-} IMAGE_THUNK_DATA,*PIMAGE_THUNK_DATA;
-typedef struct _IMAGE_IMPORT_DESCRIPTOR {
- union {
- DWORD Characteristics;
- PIMAGE_THUNK_DATA OriginalFirstThunk;
- } DUMMYUNIONNAME;
- DWORD TimeDateStamp;
- DWORD ForwarderChain;
- DWORD Name;
- PIMAGE_THUNK_DATA 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_DIRECTORY {
- DWORD StartAddressOfRawData;
- DWORD EndAddressOfRawData;
- PDWORD AddressOfIndex;
- PIMAGE_TLS_CALLBACK *AddressOfCallBacks;
- DWORD SizeOfZeroFill;
- DWORD Characteristics;
-} IMAGE_TLS_DIRECTORY,*PIMAGE_TLS_DIRECTORY;
-typedef struct _IMAGE_RESOURCE_DIRECTORY {
- DWORD Characteristics;
- DWORD TimeDateStamp;
- WORD MajorVersion;
- WORD MinorVersion;
- WORD NumberOfNamedEntries;
- WORD NumberOfIdEntries;
-} IMAGE_RESOURCE_DIRECTORY,*PIMAGE_RESOURCE_DIRECTORY;
-typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY {
- union {
- struct {
- DWORD NameOffset:31;
- DWORD NameIsString:1;
- }DUMMYSTRUCTNAME;
- DWORD Name;
- WORD Id;
- } DUMMYUNIONNAME;
- union {
- DWORD OffsetToData;
- 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 _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_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_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 Reserved[3];
-} 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;
- 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;
- union {
- struct {
- WORD SubstituteNameOffset;
- WORD SubstituteNameLength;
- WORD PrintNameOffset;
- WORD PrintNameLength;
- WCHAR PathBuffer[1];
- } SymbolicLinkReparseBuffer;
- struct {
- WORD SubstituteNameOffset;
- WORD SubstituteNameLength;
- WORD PrintNameOffset;
- WORD PrintNameLength;
- WCHAR PathBuffer[1];
- } MountPointReparseBuffer;
- struct {
- BYTE DataBuffer[1];
- } GenericReparseBuffer;
- };
-} 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;
-PVOID GetCurrentFiber(void);
-PVOID GetFiberData(void);
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-
diff --git a/winsup/w32api/include/winperf.h b/winsup/w32api/include/winperf.h
deleted file mode 100644
index 99620e47e..000000000
--- a/winsup/w32api/include/winperf.h
+++ /dev/null
@@ -1,135 +0,0 @@
-#ifndef _WINPERF_H
-#define _WINPERF_H
-#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 aae020a39..000000000
--- a/winsup/w32api/include/winreg.h
+++ /dev/null
@@ -1,155 +0,0 @@
-#ifndef _WINREG_H
-#define _WINREG_H
-#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 4
-#define REG_DWORD_BIG_ENDIAN 5
-#define REG_DWORD_LITTLE_ENDIAN 4
-#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_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;
-BOOL WINAPI AbortSystemShutdownA(LPCSTR);
-BOOL WINAPI AbortSystemShutdownW(LPCWSTR);
-BOOL WINAPI InitiateSystemShutdownA(LPSTR,LPSTR,DWORD,BOOL,BOOL);
-BOOL WINAPI InitiateSystemShutdownW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL);
-LONG WINAPI RegCloseKey(HKEY);
-LONG WINAPI RegConnectRegistryA(LPSTR,HKEY,PHKEY);
-LONG WINAPI RegConnectRegistryW(LPWSTR,HKEY,PHKEY);
-LONG WINAPI RegCreateKeyA(HKEY,LPCSTR,PHKEY);
-LONG WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
-LONG WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
-LONG WINAPI RegCreateKeyW(HKEY,LPCWSTR,PHKEY);
-LONG WINAPI RegDeleteKeyA(HKEY,LPCSTR);
-LONG WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
-LONG WINAPI RegDeleteValueA (HKEY,LPCSTR);
-LONG WINAPI RegDeleteValueW(HKEY,LPCWSTR);
-LONG WINAPI RegEnumKeyA (HKEY,DWORD,LPSTR,DWORD);
-LONG WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
-LONG WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,LPSTR,PDWORD,PFILETIME);
-LONG WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,LPWSTR,PDWORD,PFILETIME);
-LONG WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
-LONG WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
-LONG WINAPI RegFlushKey(HKEY);
-LONG WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PDWORD);
-LONG WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
-LONG WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
-LONG WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
-LONG WINAPI RegOpenKeyA(HKEY,LPCSTR,PHKEY);
-LONG WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
-LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
-LONG WINAPI RegOpenKeyW(HKEY,LPCWSTR,PHKEY);
-LONG WINAPI RegQueryInfoKeyA(HKEY,LPSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
-LONG WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
-LONG WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,PDWORD);
-LONG WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,PDWORD);
-LONG WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,PLONG);
-LONG WINAPI RegQueryValueExA (HKEY,LPCSTR,PDWORD,PDWORD,LPBYTE,PDWORD);
-LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,PDWORD,PDWORD,LPBYTE,PDWORD);
-LONG WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,PLONG);
-LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
-LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
-LONG WINAPI RegRestoreKeyA (HKEY,LPCSTR,DWORD);
-LONG WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
-LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
-LONG WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
-LONG WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
-LONG WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
-LONG WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,const BYTE*,DWORD);
-LONG WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,const BYTE*,DWORD);
-LONG WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
-LONG WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
-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
-#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
-#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 59e0cd062..000000000
--- a/winsup/w32api/include/winresrc.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _WINRESRC_H
-#define _WINRESRC_H
-#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/winsock.h b/winsup/w32api/include/winsock.h
deleted file mode 100644
index 85917e388..000000000
--- a/winsup/w32api/include/winsock.h
+++ /dev/null
@@ -1,523 +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
-#define _GNU_H_WINDOWS32_SOCKETS
-#include <windows.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined ( _BSDTYPES_DEFINED ) && !defined ( _SYS_TYPES_H )
-/* 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 /* ndef _BSDTYPES_ _SYS_TYPES_H */
-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_H
-/* fd_set may have been defined by the newlib <sys/types.h>. */
-#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
-#endif /* ndef _SYS_TYPES_H */
-#ifndef __INSIDE_CYGWIN__
-struct timeval {
- long tv_sec;
- long tv_usec;
-};
-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 /* ndef __INSIDE_CYGWIN__ */
-#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
-#define IOCPARM_MASK 0x7f
-#define IOC_VOID 0x20000000
-#define IOC_OUT 0x40000000
-#define IOC_IN 0x80000000
-#define IOC_INOUT (IOC_IN|IOC_OUT)
-
-#ifndef __INSIDE_CYGWIN__
-#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 /* ndef __INSIDE_CYGWIN__ */
-
-#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)
-
-#ifndef __INSIDE_CYGWIN__
-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__ */
-
-#define IPPROTO_IP 0
-#define IPPROTO_ICMP 1
-#define IPPROTO_GGP 2
-#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)
-#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;
-
-#ifndef __INSIDE_CYGWIN__
-#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
-#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
-#endif
-#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 TCP_BSDURGENT 0x7000
-#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
-#ifndef __INSIDE_CYGWIN__
-#define AF_MAX 24
-struct sockaddr {
- u_short sa_family;
- char sa_data[14];
-};
-#endif /* ndef __INSIDE_CYGWIN__ */
-
-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
-#ifndef __INSIDE_CYGWIN__
-#define MSG_OOB 1
-#define MSG_PEEK 2
-#define MSG_DONTROUTE 4
-#endif /* ndef __INSIDE_CYGWIN__ */
-#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
-#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)
-#define WSANO_ADDRESS WSANO_DATA
-#ifndef __INSIDE_CYGWIN__
-#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
-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*);
-PASCAL 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);
-PASCAL struct hostent *gethostbyaddr(const char*,int,int);
-PASCAL struct hostent *gethostbyname(const char*);
-PASCAL struct servent *getservbyport(int,const char*);
-PASCAL struct servent *getservbyname(const char*,const char*);
-PASCAL struct protoent *getprotobynumber(int);
-PASCAL 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);
-int PASCAL WSARecvEx(SOCKET,char*,int,int*);
-typedef struct _TRANSMIT_FILE_BUFFERS {
- PVOID Head;
- DWORD HeadLength;
- PVOID Tail;
- DWORD TailLength;
-} TRANSMIT_FILE_BUFFERS, *PTRANSMIT_FILE_BUFFERS, *LPTRANSMIT_FILE_BUFFERS;
-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);
-#ifndef __INSIDE_CYGWIN__
-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 /* ndef __INSIDE_CYGWIN__ */
-
-#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
-#endif
diff --git a/winsup/w32api/include/winsock2.h b/winsup/w32api/include/winsock2.h
deleted file mode 100644
index 180b43cb3..000000000
--- a/winsup/w32api/include/winsock2.h
+++ /dev/null
@@ -1,624 +0,0 @@
-/*
-
- Definitions for winsock 2
-
- Initially taken from 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.
- */
-
-#ifndef _WINSOCK2_H
-#define _WINSOCK2_H
-
-/* Macros that are also defined in winsock.h, and need to be overridden.
- These will go away once we have a completely standalone winsock2.h. */
-#ifdef FD_SET
-#define _FD_SET_DEFINED
-#endif
-#include <winsock.h>
-
-#ifndef _NSPAPI_H
-#include <nspapi.h>
-#endif
-#ifndef _WTYPES_H
-#include <wtypes.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#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
-/* FIXME/TODO: need this because we also include winsock.h. */
-#undef SOMAXCONN
-#define SOMAXCONN 0x7fffffff
-#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 FD_READ_BIT 0
-#define FD_WRITE_BIT 1
-#define FD_OOB_BIT 2
-#define FD_ACCEPT_BIT 3
-#define FD_CONNECT_BIT 4
-#define FD_CLOSE_BIT 5
-#define FD_QOS_BIT 6
-#define FD_GROUP_QOS_BIT 7
-#define FD_MAX_EVENTS 8
-#define FD_ALL_EVENTS (255)
-
-#if !defined(_FD_SET_DEFINED)
-#undef FD_SET
-#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)
-#else
-#undef _FD_SET_DEFINED
-#endif
-
-#define MSG_INTERRUPT 0x10
-#define MSG_MAXIOVLEN 16
-
-#define WSAEDISCON (WSABASEERR+101)
-#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)
-
-#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;
-
-typedef long int32;
-
-typedef struct _flowspec
-{
- int32 TokenRate;
- int32 TokenBucketSize;
- int32 PeakBandwidth;
- int32 Latency;
- int32 DelayVariation;
- GUARANTEE LevelOfGuarantee;
- int32 CostOfCall;
- int32 NetworkAvailability;
-} FLOWSPEC, *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;
-
-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
-
-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
-
-#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 TH_NETDEV 0x00000001
-#define TH_TAPI 0x00000002
-
-#define WSAMAKEASYNCREPLY(buflen,error) MAKELONG(buflen,error)
-#define WSAMAKESELECTREPLY(event,error) MAKELONG(event,error)
-#define WSAGETASYNCBUFLEN(lParam) LOWORD(lParam)
-#define WSAGETASYNCERROR(lParam) HIWORD(lParam)
-#define WSAGETSELECTEVENT(lParam) LOWORD(lParam)
-#define WSAGETSELECTERROR(lParam) HIWORD(lParam)
-
-SOCKET WINAPI WSAAccept(SOCKET, struct sockaddr *, LPINT, LPCONDITIONPROC, DWORD);
-INT WINAPI WSAAddressToStringA(LPSOCKADDR, DWORD, LPWSAPROTOCOL_INFOA, LPSTR, LPDWORD);
-INT WINAPI WSAAddressToStringW(LPSOCKADDR, DWORD, LPWSAPROTOCOL_INFOW, LPWSTR, LPDWORD);
-BOOL WINAPI WSACloseEvent(WSAEVENT);
-int WINAPI WSAConnect(SOCKET, const struct sockaddr *, int, LPWSABUF, LPWSABUF, LPQOS, LPQOS);
-WSAEVENT WINAPI WSACreateEvent(void);
-int WINAPI WSADuplicateSocketA(SOCKET, DWORD, LPWSAPROTOCOL_INFOA);
-int WINAPI WSADuplicateSocketW(SOCKET, DWORD, LPWSAPROTOCOL_INFOW);
-INT WINAPI WSAEnumNameSpaceProvidersA(LPDWORD, LPWSANAMESPACE_INFOA);
-INT WINAPI WSAEnumNameSpaceProvidersW(LPDWORD, LPWSANAMESPACE_INFOW);
-int WINAPI WSAEnumNetworkEvents(SOCKET, WSAEVENT, LPWSANETWORKEVENTS);
-int WINAPI WSAEnumProtocolsA(LPINT, LPWSAPROTOCOL_INFOA, LPDWORD);
-int WINAPI WSAEnumProtocolsW(LPINT, LPWSAPROTOCOL_INFOW, LPDWORD);
-int WINAPI WSAEventSelect(SOCKET, WSAEVENT, long);
-BOOL WINAPI WSAGetOverlappedResult(SOCKET, LPWSAOVERLAPPED, LPDWORD, BOOL, LPDWORD);
-BOOL WINAPI WSAGetQOSByName(SOCKET, LPWSABUF, LPQOS);
-INT WINAPI WSAGetServiceClassInfoA(LPGUID, LPGUID, LPDWORD, LPWSASERVICECLASSINFOA);
-INT WINAPI WSAGetServiceClassInfoW(LPGUID, LPGUID, LPDWORD, LPWSASERVICECLASSINFOW);
-INT WINAPI WSAGetServiceClassNameByClassIdA(LPGUID, LPSTR, LPDWORD);
-INT WINAPI WSAGetServiceClassNameByClassIdW(LPGUID, LPWSTR, LPDWORD);
-int WINAPI WSAHtonl(SOCKET, unsigned long, unsigned long *);
-int WINAPI WSAHtons(SOCKET, unsigned short, unsigned short *);
-INT WINAPI WSAInstallServiceClassA(LPWSASERVICECLASSINFOA);
-INT WINAPI WSAInstallServiceClassW(LPWSASERVICECLASSINFOW);
-int WINAPI WSAIoctl(SOCKET, DWORD, LPVOID, DWORD, LPVOID, DWORD, LPDWORD, LPWSAOVERLAPPED, LPWSAOVERLAPPED_COMPLETION_ROUTINE);
-SOCKET WINAPI WSAJoinLeaf(SOCKET, const struct sockaddr *, int, LPWSABUF, LPWSABUF, LPQOS, LPQOS, DWORD);
-INT WINAPI WSALookupServiceBeginA(LPWSAQUERYSETA, DWORD, LPHANDLE);
-INT WINAPI WSALookupServiceBeginW(LPWSAQUERYSETW lpqsRestrictions, DWORD, LPHANDLE);
-INT WINAPI WSALookupServiceNextA(HANDLE, DWORD, LPDWORD, LPWSAQUERYSETA);
-INT WINAPI WSALookupServiceNextW(HANDLE, DWORD, LPDWORD, LPWSAQUERYSETW);
-INT WINAPI WSALookupServiceEnd(HANDLE);
-int WINAPI WSANtohl(SOCKET, unsigned long, unsigned long *);
-int WINAPI WSANtohs(SOCKET, unsigned short, unsigned short *);
-int WINAPI WSARecv(SOCKET, LPWSABUF, DWORD, LPDWORD, LPDWORD, LPWSAOVERLAPPED, LPWSAOVERLAPPED_COMPLETION_ROUTINE);
-int WINAPI WSARecvDisconnect(SOCKET, LPWSABUF);
-int WINAPI WSARecvFrom(SOCKET, LPWSABUF, DWORD, LPDWORD, LPDWORD, struct sockaddr *, LPINT, LPWSAOVERLAPPED, LPWSAOVERLAPPED_COMPLETION_ROUTINE);
-INT WINAPI WSARemoveServiceClass(LPGUID);
-BOOL WINAPI WSAResetEvent(WSAEVENT);
-int WINAPI WSASend(SOCKET, LPWSABUF, DWORD, LPDWORD, DWORD, LPWSAOVERLAPPED, LPWSAOVERLAPPED_COMPLETION_ROUTINE);
-int WINAPI WSASendDisconnect(SOCKET, LPWSABUF);
-int WINAPI WSASendTo(SOCKET, LPWSABUF, DWORD, LPDWORD, DWORD, const struct sockaddr *, int, LPWSAOVERLAPPED, LPWSAOVERLAPPED_COMPLETION_ROUTINE);
-BOOL WINAPI WSASetEvent(WSAEVENT);
-INT WSAAPI WSASetServiceA(LPWSAQUERYSETA, WSAESETSERVICEOP, DWORD);
-INT WINAPI WSASetServiceW(LPWSAQUERYSETW, WSAESETSERVICEOP, DWORD);
-SOCKET WINAPI WSASocketA(int, int, int, LPWSAPROTOCOL_INFOA, GROUP, DWORD);
-SOCKET WINAPI WSASocketW(int, int, int, LPWSAPROTOCOL_INFOW, GROUP, DWORD);
-INT WINAPI WSAStringToAddressA(LPSTR, INT, LPWSAPROTOCOL_INFOA, LPSOCKADDR, LPINT);
-INT WINAPI WSAStringToAddressW(LPWSTR, INT, LPWSAPROTOCOL_INFOW, LPSOCKADDR, LPINT);
-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_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 b4a909e90..000000000
--- a/winsup/w32api/include/winspool.h
+++ /dev/null
@@ -1,778 +0,0 @@
-#ifndef _WINSPOOL_H
-#define _WINSPOOL_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define DI_CHANNEL 1
-#define DI_CHANNEL_WRITE 2
-#define DI_READ_SPOOL_JOB 3
-#define FORM_BUILTIN 1
-#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_STATUS_PAUSED 1
-#define JOB_STATUS_ERROR 2
-#define JOB_STATUS_DELETING 4
-#define JOB_STATUS_SPOOLING 8
-#define JOB_STATUS_PRINTING 16
-#define JOB_STATUS_OFFLINE 32
-#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_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 _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;
-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;
-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 _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;
-
-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,PDEVMODEA,PDEVMODEA,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);
-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_2W DRIVER_INFO_2,*PDRIVER_INFO_2,*LPDRIVER_INFO_2;
-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;
-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;
-#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 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_2A DRIVER_INFO_2,*PDRIVER_INFO_2,*LPDRIVER_INFO_2;
-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;
-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;
-#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 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 11b136145..000000000
--- a/winsup/w32api/include/winsvc.h
+++ /dev/null
@@ -1,202 +0,0 @@
-#ifndef _WINSVC_H
-#define _WINSVC_H
-#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 (-1)
-#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_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_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)
-
-
-typedef struct _SERVICE_STATUS {
- DWORD dwServiceType;
- DWORD dwCurrentState;
- DWORD dwControlsAccepted;
- DWORD dwWin32ExitCode;
- DWORD dwServiceSpecificExitCode;
- DWORD dwCheckPoint;
- DWORD dwWaitHint;
-} SERVICE_STATUS,*LPSERVICE_STATUS;
-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 _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);
-
-BOOL WINAPI ChangeServiceConfigA(SC_HANDLE,DWORD,DWORD,DWORD,LPCSTR,LPCSTR,LPDWORD,LPCSTR,LPCSTR,LPCSTR,LPCSTR);
-BOOL WINAPI ChangeServiceConfigW(SC_HANDLE,DWORD,DWORD,DWORD,LPCWSTR,LPCWSTR,LPDWORD,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
-BOOL WINAPI CloseServiceHandle(SC_HANDLE);
-BOOL WINAPI ControlService(SC_HANDLE,DWORD,LPSERVICE_STATUS);
-SC_HANDLE WINAPI CreateServiceA(SC_HANDLE,LPCSTR,LPCSTR,DWORD,DWORD,DWORD,DWORD,LPCSTR,LPCSTR,PDWORD,LPCSTR,LPCSTR,LPCSTR);
-SC_HANDLE WINAPI CreateServiceW(SC_HANDLE,LPCWSTR,LPCWSTR,DWORD,DWORD,DWORD,DWORD,LPCWSTR,LPCWSTR,PDWORD,LPCWSTR,LPCWSTR,LPCWSTR);
-BOOL WINAPI DeleteService(SC_HANDLE);
-BOOL WINAPI EnumDependentServicesA(SC_HANDLE,DWORD,LPENUM_SERVICE_STATUSA,DWORD,PDWORD,PDWORD);
-BOOL WINAPI EnumDependentServicesW(SC_HANDLE,DWORD,LPENUM_SERVICE_STATUSW,DWORD,PDWORD,PDWORD);
-BOOL WINAPI EnumServicesStatusA(SC_HANDLE,DWORD,DWORD,LPENUM_SERVICE_STATUSA,DWORD,PDWORD,PDWORD,PDWORD);
-BOOL WINAPI EnumServicesStatusW(SC_HANDLE,DWORD,DWORD,LPENUM_SERVICE_STATUSW,DWORD,PDWORD,PDWORD,PDWORD);
-BOOL WINAPI GetServiceDisplayNameA(SC_HANDLE,LPCSTR,LPSTR,PDWORD);
-BOOL WINAPI GetServiceDisplayNameW(SC_HANDLE,LPCWSTR,LPWSTR,PDWORD);
-BOOL WINAPI GetServiceKeyNameA(SC_HANDLE,LPCSTR,LPSTR,PDWORD);
-BOOL WINAPI GetServiceKeyNameW(SC_HANDLE,LPCWSTR,LPWSTR,PDWORD);
-SC_LOCK WINAPI LockServiceDatabase(SC_HANDLE);
-BOOL WINAPI NotifyBootConfigStatus(BOOL);
-SC_HANDLE WINAPI OpenSCManagerA(LPCSTR,LPCSTR,DWORD);
-SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR,LPCWSTR,DWORD);
-SC_HANDLE WINAPI OpenServiceA(SC_HANDLE,LPCSTR,DWORD);
-SC_HANDLE WINAPI OpenServiceW(SC_HANDLE,LPCWSTR,DWORD);
-BOOL WINAPI QueryServiceConfigA(SC_HANDLE,LPQUERY_SERVICE_CONFIGA,DWORD,PDWORD);
-BOOL WINAPI QueryServiceConfigW(SC_HANDLE,LPQUERY_SERVICE_CONFIGW,DWORD,PDWORD);
-BOOL WINAPI QueryServiceLockStatusA(SC_HANDLE,LPQUERY_SERVICE_LOCK_STATUSA,DWORD,PDWORD);
-BOOL WINAPI QueryServiceLockStatusW(SC_HANDLE,LPQUERY_SERVICE_LOCK_STATUSW,DWORD,PDWORD);
-BOOL WINAPI QueryServiceObjectSecurity(SC_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
-BOOL WINAPI QueryServiceStatus(SC_HANDLE,LPSERVICE_STATUS);
-SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerA(LPCSTR,LPHANDLER_FUNCTION);
-SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerW(LPCWSTR,LPHANDLER_FUNCTION);
-BOOL WINAPI SetServiceObjectSecurity(SC_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
-BOOL WINAPI SetServiceStatus(SERVICE_STATUS_HANDLE,LPSERVICE_STATUS);
-BOOL WINAPI StartServiceA(SC_HANDLE,DWORD,LPCSTR*);
-BOOL WINAPI StartServiceCtrlDispatcherA(LPSERVICE_TABLE_ENTRYA);
-BOOL WINAPI StartServiceCtrlDispatcherW(LPSERVICE_TABLE_ENTRYW);
-BOOL WINAPI StartServiceW(SC_HANDLE,DWORD,LPCWSTR);
-BOOL WINAPI UnlockServiceDatabase(SC_LOCK);
-
-#ifdef UNICODE
-typedef ENUM_SERVICE_STATUSW ENUM_SERVICE_STATUS,*LPENUM_SERVICE_STATUS;
-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;
-#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 CreateService CreateServiceW
-#define EnumDependentServices EnumDependentServicesW
-#define EnumServicesStatus EnumServicesStatusW
-#define GetServiceDisplayName GetServiceDisplayNameW
-#define GetServiceKeyName GetServiceKeyNameW
-#define OpenSCManager OpenSCManagerW
-#define OpenService OpenServiceW
-#define QueryServiceConfig QueryServiceConfigW
-#define QueryServiceLockStatus QueryServiceLockStatusW
-#define RegisterServiceCtrlHandler RegisterServiceCtrlHandlerW
-#define StartService StartServiceW
-#define StartServiceCtrlDispatcher StartServiceCtrlDispatcherW
-#else
-typedef ENUM_SERVICE_STATUSA ENUM_SERVICE_STATUS,*LPENUM_SERVICE_STATUS;
-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;
-#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 CreateService CreateServiceA
-#define EnumDependentServices EnumDependentServicesA
-#define EnumServicesStatus EnumServicesStatusA
-#define GetServiceDisplayName GetServiceDisplayNameA
-#define GetServiceKeyName GetServiceKeyNameA
-#define OpenSCManager OpenSCManagerA
-#define OpenService OpenServiceA
-#define QueryServiceConfig QueryServiceConfigA
-#define QueryServiceLockStatus QueryServiceLockStatusA
-#define RegisterServiceCtrlHandler RegisterServiceCtrlHandlerA
-#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 30ca13aa4..000000000
--- a/winsup/w32api/include/winuser.h
+++ /dev/null
@@ -1,3256 +0,0 @@
-#ifndef _WINUSER_H
-#define _WINUSER_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-#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 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
-#define BSF_IGNORECURRENTTASK 2
-#define BSF_QUERY 1
-#define BSF_FLUSHDISK 4
-#define BSF_NOHANG 8
-#define BSF_POSTMESSAGE 16
-#define BSF_FORCEIFHUNG 32
-#define BSF_NOTIMEOUTIFNOTHUNG 64
-#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 BROADCAST_QUERY_DENY 1112363332
-#define DM_BITSPERPEL 0x40000
-#define DM_PELSWIDTH 0x80000
-#define DM_PELSHEIGHT 0x100000
-#define DM_DISPLAYFLAGS 0x200000
-#define DM_DISPLAYFREQUENCY 0x400000
-#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_BADFLAGS (-4)
-#define DISP_CHANGE_BADPARAM (-5)
-#define DISP_CHANGE_FAILED (-1)
-#define DISP_CHANGE_BADMODE (-2)
-#define DISP_CHANGE_NOTUPDATED (-3)
-#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 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 WS_EX_ACCEPTFILES 16
-#define WS_EX_APPWINDOW 0x40000
-#define WS_EX_CLIENTEDGE 512
-#define WS_EX_CONTEXTHELP 0x400
-#define WS_EX_CONTROLPARENT 0x10000
-#define WS_EX_DLGMODALFRAME 1
-#define WS_EX_LEFT 0
-#define WS_EX_LEFTSCROLLBAR 0x4000
-#define WS_EX_LTRREADING 0
-#define WS_EX_MDICHILD 64
-#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_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 1
-#define DC_SMALLCAP 2
-#define DC_ICON 4
-#define DC_TEXT 8
-#define DC_INBUTTON 16
-#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
-#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
-#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 MAKEINTRESOURCEA(i) (LPSTR)((DWORD)((WORD)(i)))
-#define MAKEINTRESOURCEW(i) (LPWSTR)((DWORD)((WORD)(i)))
-#define RT_CURSOR MAKEINTRESOURCE(1)
-#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_FONT MAKEINTRESOURCE(8)
-#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)
-#define EWX_FORCE 4
-#define EWX_LOGOFF 0
-#define EWX_POWEROFF 8
-#define EWX_REBOOT 2
-#define EWX_SHUTDOWN 1
-#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
-#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 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_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
-#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
-#define MB_SERVICE_NOTIFICATION 0x40000
-#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
-#define IDABORT 3
-#define IDCANCEL 2
-#define IDCLOSE 8
-#define IDHELP 9
-#define IDIGNORE 5
-#define IDNO 7
-#define IDOK 1
-#define IDRETRY 4
-#define IDYES 6
-#define GWL_EXSTYLE (-20)
-#define GWL_STYLE (-16)
-#define GWL_WNDPROC (-4)
-#define GWL_HINSTANCE (-6)
-#define GWL_HWNDPARENT (-8)
-#define GWL_ID (-12)
-#define GWL_USERDATA (-21)
-#define DWL_DLGPROC 4
-#define DWL_MSGRESULT 0
-#define DWL_USER 8
-#define QS_ALLEVENTS 191
-#define QS_ALLINPUT 255
-#define QS_HOTKEY 128
-#define QS_INPUT 7
-#define QS_KEY 1
-#define QS_MOUSE 6
-#define QS_MOUSEBUTTON 4
-#define QS_MOUSEMOVE 2
-#define QS_PAINT 32
-#define QS_POSTMESSAGE 8
-#define QS_SENDMESSAGE 64
-#define QS_TIMER 16
-#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 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 LR_DEFAULTSIZE 64
-#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
-#if (_WIN32_WINNT < 0x0400)
-#define SM_CMETRICS 76
-#else
-#define SM_CMETRICS 83
-#endif
-#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_LOADMAP3DCOLORS 4096
-#define LR_CREATEDIBSECTION 8192
-#define LR_COPYFROMRESOURCE 0x4000
-#define LR_SHARED 32768
-#define KEYEVENTF_EXTENDEDKEY 1
-#define KEYEVENTF_KEYUP 2
-#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 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 1
-#define MOUSEEVENTF_LEFTDOWN 2
-#define MOUSEEVENTF_LEFTUP 4
-#define MOUSEEVENTF_RIGHTDOWN 8
-#define MOUSEEVENTF_RIGHTUP 16
-#define MOUSEEVENTF_MIDDLEDOWN 32
-#define MOUSEEVENTF_MIDDLEUP 64
-#define MOUSEEVENTF_ABSOLUTE 32768
-#define PM_NOREMOVE 0
-#define PM_REMOVE 1
-#define PM_NOYIELD 2
-#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
-#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 2
-#define SMTO_BLOCK 1
-#define SMTO_NORMAL 0
-#define SIF_ALL 23
-#define SIF_PAGE 2
-#define SIF_POS 4
-#define SIF_RANGE 1
-#define SIF_DISABLENOSCROLL 8
-#define SIF_TRACKPOS 16
-#define SWP_DRAWFRAME 32
-#define SWP_FRAMECHANGED 32
-#define SWP_HIDEWINDOW 128
-#define SWP_NOACTIVATE 16
-#define SWP_NOCOPYBITS 256
-#define SWP_NOMOVE 2
-#define SWP_NOSIZE 1
-#define SWP_NOREDRAW 8
-#define SWP_NOZORDER 4
-#define SWP_SHOWWINDOW 64
-#define SWP_NOOWNERZORDER 512
-#define SWP_NOREPOSITION 512
-#define SWP_NOSENDCHANGING 1024
-#define SWP_DEFERERASE 8192
-#define SWP_ASYNCWINDOWPOS 16384
-#define HSHELL_ACTIVATESHELLWINDOW 3
-#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
-#define SPI_GETACCESSTIMEOUT 60
-#define SPI_GETANIMATION 72
-#define SPI_GETBEEP 1
-#define SPI_GETBORDER 5
-#define SPI_GETDEFAULTINPUTLANG 89
-#define SPI_GETDRAGFULLWINDOWS 38
-#define SPI_GETFASTTASKSWITCH 35
-#define SPI_GETFILTERKEYS 50
-#define SPI_GETFONTSMOOTHING 74
-#define SPI_GETGRIDGRANULARITY 18
-#define SPI_GETHIGHCONTRAST 66
-#define SPI_GETICONMETRICS 45
-#define SPI_GETICONTITLELOGFONT 31
-#define SPI_GETICONTITLEWRAP 25
-#define SPI_GETKEYBOARDDELAY 22
-#define SPI_GETKEYBOARDPREF 68
-#define SPI_GETKEYBOARDSPEED 10
-#define SPI_GETLOWPOWERACTIVE 83
-#define SPI_GETLOWPOWERTIMEOUT 79
-#define SPI_GETMENUDROPALIGNMENT 27
-#define SPI_GETMINIMIZEDMETRICS 43
-#define SPI_GETMOUSE 3
-#define SPI_GETMOUSEKEYS 54
-#define SPI_GETMOUSETRAILS 94
-#define SPI_GETNONCLIENTMETRICS 41
-#define SPI_GETPOWEROFFACTIVE 84
-#define SPI_GETPOWEROFFTIMEOUT 80
-#define SPI_GETSCREENREADER 70
-#define SPI_GETSCREENSAVEACTIVE 16
-#define SPI_GETSCREENSAVETIMEOUT 14
-#define SPI_GETSERIALKEYS 62
-#define SPI_GETSHOWSOUNDS 56
-#define SPI_GETSOUNDSENTRY 64
-#define SPI_GETSTICKYKEYS 58
-#define SPI_GETTOGGLEKEYS 52
-#define SPI_GETWINDOWSEXTENSION 92
-#define SPI_GETWORKAREA 48
-#define SPI_ICONHORIZONTALSPACING 13
-#define SPI_ICONVERTICALSPACING 24
-#define SPI_LANGDRIVER 12
-#define SPI_SCREENSAVERRUNNING 97
-#define SPI_SETACCESSTIMEOUT 61
-#define SPI_SETANIMATION 73
-#define SPI_SETBEEP 2
-#define SPI_SETBORDER 6
-#define SPI_SETDEFAULTINPUTLANG 90
-#define SPI_SETDESKPATTERN 21
-#define SPI_SETDESKWALLPAPER 20
-#define SPI_SETDOUBLECLICKTIME 32
-#define SPI_SETDOUBLECLKHEIGHT 30
-#define SPI_SETDOUBLECLKWIDTH 29
-#define SPI_SETDRAGFULLWINDOWS 37
-#define SPI_SETDRAGHEIGHT 77
-#define SPI_SETDRAGWIDTH 76
-#define SPI_SETFASTTASKSWITCH 36
-#define SPI_SETFILTERKEYS 51
-#define SPI_SETFONTSMOOTHING 75
-#define SPI_SETGRIDGRANULARITY 19
-#define SPI_SETHANDHELD 78
-#define SPI_SETHIGHCONTRAST 67
-#define SPI_SETICONMETRICS 46
-#define SPI_SETICONTITLELOGFONT 34
-#define SPI_SETICONTITLEWRAP 26
-#define SPI_SETKEYBOARDDELAY 23
-#define SPI_SETKEYBOARDPREF 69
-#define SPI_SETKEYBOARDSPEED 11
-#define SPI_SETLANGTOGGLE 91
-#define SPI_SETLOWPOWERACTIVE 85
-#define SPI_SETLOWPOWERTIMEOUT 81
-#define SPI_SETMENUDROPALIGNMENT 28
-#define SPI_SETMINIMIZEDMETRICS 44
-#define SPI_SETMOUSE 4
-#define SPI_SETMOUSEBUTTONSWAP 33
-#define SPI_SETMOUSEKEYS 55
-#define SPI_SETMOUSETRAILS 93
-#define SPI_SETNONCLIENTMETRICS 42
-#define SPI_SETPENWINDOWS 49
-#define SPI_SETPOWEROFFACTIVE 86
-#define SPI_SETPOWEROFFTIMEOUT 82
-#define SPI_SETSCREENREADER 71
-#define SPI_SETSCREENSAVEACTIVE 17
-#define SPI_SETSCREENSAVETIMEOUT 15
-#define SPI_SETSERIALKEYS 63
-#define SPI_SETSHOWSOUNDS 57
-#define SPI_SETSOUNDSENTRY 65
-#define SPI_SETSTICKYKEYS 59
-#define SPI_SETTOGGLEKEYS 53
-#define SPI_SETWORKAREA 47
-#define SPIF_UPDATEINIFILE 1
-#define SPIF_SENDWININICHANGE 2
-#define SPIF_SENDCHANGE 2
-#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
-/* FIXME/CHECK: Are WM_IME_* valid for WINVER < 0x400? */
-#define WM_IME_STARTCOMPOSITION 269
-#define WM_IME_ENDCOMPOSITION 270
-#define WM_IME_COMPOSITION 271
-#define WM_IME_KEYLAST 271
-#define WM_IME_SETCONTEXT 641
-#define WM_IME_NOTIFY 642
-#define WM_IME_CONTROL 643
-#define WM_IME_COMPOSITIONFULL 644
-#define WM_IME_SELECT 645
-#define WM_IME_CHAR 646
-#define WM_IME_KEYDOWN 656
-#define WM_IME_KEYUP 657
-#define WM_INITDIALOG 272
-#define WM_INITMENU 278
-#define WM_INITMENUPOPUP 279
-#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
-#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
-#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_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
-#define WM_MOUSELAST 522
-#define WM_MOUSEHOVER 0x2A1
-#define WM_MOUSELEAVE 0x2A3
-#define WHEEL_DELTA 120
-#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
-#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
-#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_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_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
-#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_ESCAPE 0x1B
-#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_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
-#define VK_PROCESSKEY 0xE5
-#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
-#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
-#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_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
-#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
-#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
-#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 *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);
-typedef struct tagACCEL {
- BYTE fVirt;
- WORD key;
- WORD cmd;
-} ACCEL,*LPACCEL;
-typedef struct tagACCESSTIMEOUT {
- UINT cbSize;
- DWORD dwFlags;
- DWORD iTimeOutMSec;
-} ACCESSTIMEOUT;
-typedef struct tagANIMATIONINFO {
- UINT cbSize;
- int iMinAnimate;
-} ANIMATIONINFO,*LPANIMATIONINFO;
-typedef struct tagCREATESTRUCT {
- LPVOID lpCreateParams;
- HINSTANCE hInstance;
- HMENU hMenu;
- HWND hwndParent;
- int cy;
- int cx;
- int y;
- int x;
- LONG style;
- LPCTSTR lpszName;
- LPCTSTR lpszClass;
- DWORD dwExStyle;
-} CREATESTRUCT,*LPCREATESTRUCT;
-typedef struct tagCBT_CREATEWND {
- LPCREATESTRUCT lpcs;
- HWND hwndInsertAfter;
-} CBT_CREATEWND;
-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;
-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;
- HANDLE 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;
- HANDLE 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;
- HANDLE 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;
- HANDLE 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;
-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;
-typedef struct tagMINIMIZEDMETRICS {
- UINT cbSize;
- int iWidth;
- int iHorzGap;
- int iVertGap;
- int iArrange;
-} MINIMIZEDMETRICS,*LPMINIMIZEDMETRICS;
-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;
-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 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 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;
-
-#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(pts);(ps).y=HIWORD(ps);}
-#define POINTTOPOINTS(p) ((POINTS)MAKELONG((p).x,(p).y))
-
-HKL WINAPI ActivateKeyboardLayout(HKL,UINT);
-BOOL WINAPI AdjustWindowRect(LPRECT,DWORD,BOOL);
-BOOL WINAPI AdjustWindowRectEx(LPRECT,DWORD,BOOL,DWORD);
-BOOL WINAPI AnyPopup(void);
-BOOL WINAPI AppendMenuA(HMENU,UINT,UINT,LPCSTR);
-BOOL WINAPI AppendMenuW(HMENU,UINT,UINT,LPCWSTR);
-UINT WINAPI ArrangeIconicWindows(HWND);
-BOOL WINAPI AttachThreadInput(DWORD,DWORD,BOOL);
-HDWP WINAPI BeginDeferWindowPos(int);
-HDC WINAPI BeginPaint(HWND,LPPAINTSTRUCT);
-BOOL WINAPI BringWindowToTop(HWND);
-long WINAPI BroadcastSystemMessage(DWORD,LPDWORD,UINT,WPARAM,LPARAM);
-BOOL WINAPI CallMsgFilter(PMSG,int);
-LRESULT WINAPI CallNextHookEx(HHOOK,int,WPARAM,LPARAM);
-LRESULT WINAPI CallWindowProcA(WNDPROC,HWND,UINT,WPARAM,LPARAM);
-LRESULT WINAPI CallWindowProcW(WNDPROC,HWND,UINT,WPARAM,LPARAM);
-WORD WINAPI CascadeWindows(HWND,UINT,LPCRECT,UINT,const HWND*);
-BOOL WINAPI ChangeClipboardChain(HWND,HWND);
-LONG WINAPI ChangeDisplaySettingsA(PDEVMODEA,DWORD);
-LONG WINAPI ChangeDisplaySettingsW(PDEVMODEW,DWORD);
-BOOL WINAPI ChangeMenuA(HMENU,UINT,LPCSTR,UINT,UINT);
-BOOL WINAPI ChangeMenuW(HMENU,UINT,LPCWSTR,UINT,UINT);
-LPSTR WINAPI CharLowerA(LPSTR);
-LPWSTR WINAPI CharLowerW(LPWSTR);
-DWORD WINAPI CharLowerBuffA(LPSTR,DWORD);
-DWORD WINAPI CharLowerBuffW(LPWSTR,DWORD);
-LPSTR WINAPI CharNextA(LPCSTR);
-LPWSTR WINAPI CharNextW(LPCWSTR);
-LPSTR WINAPI CharNextExA(WORD,LPCSTR,DWORD);
-LPWSTR WINAPI CharNextExW(WORD,LPCWSTR,DWORD);
-LPSTR WINAPI CharPrevA(LPCSTR,LPCSTR);
-LPWSTR WINAPI CharPrevW(LPCWSTR,LPCWSTR);
-LPSTR WINAPI CharPrevExA(WORD,LPCSTR,LPCSTR,DWORD);
-LPWSTR WINAPI CharPrevExW(WORD,LPCWSTR,LPCWSTR,DWORD);
-BOOL WINAPI CharToOemA(LPCSTR,LPSTR);
-BOOL WINAPI CharToOemW(LPCWSTR,LPSTR);
-BOOL WINAPI CharToOemBuffA(LPCSTR,LPSTR,DWORD);
-BOOL WINAPI CharToOemBuffW(LPCWSTR,LPSTR,DWORD);
-LPSTR WINAPI CharUpperA(LPSTR);
-LPWSTR WINAPI CharUpperW(LPWSTR);
-DWORD WINAPI CharUpperBuffA(LPSTR,DWORD);
-DWORD WINAPI CharUpperBuffW(LPWSTR,DWORD);
-BOOL WINAPI CheckDlgButton(HWND,int,UINT);
-DWORD WINAPI CheckMenuItem(HMENU,UINT,UINT);
-BOOL WINAPI CheckMenuRadioItem(HMENU,UINT,UINT,UINT,UINT);
-BOOL WINAPI CheckRadioButton(HWND,int,int,int);
-HWND WINAPI ChildWindowFromPoint(HWND,POINT);
-HWND WINAPI ChildWindowFromPointEx(HWND,POINT,UINT);
-BOOL WINAPI ClientToScreen(HWND,LPPOINT);
-BOOL WINAPI ClipCursor(LPCRECT);
-BOOL WINAPI CloseClipboard(void);
-BOOL WINAPI CloseDesktop(HDESK);
-BOOL WINAPI CloseWindow(HWND);
-BOOL WINAPI CloseWindowStation(HWINSTA);
-int WINAPI CopyAcceleratorTableA(HACCEL,LPACCEL,int);
-int WINAPI CopyAcceleratorTableW(HACCEL,LPACCEL,int);
-HCURSOR WINAPI CopyCursor(HCURSOR);
-HICON WINAPI CopyIcon(HICON);
-HANDLE WINAPI CopyImage(HANDLE,UINT,int,int,UINT);
-BOOL WINAPI CopyRect(LPRECT,LPCRECT);
-int WINAPI CountClipboardFormats(void);
-HACCEL WINAPI CreateAcceleratorTableA(LPACCEL,int);
-HACCEL WINAPI CreateAcceleratorTableW(LPACCEL,int);
-BOOL WINAPI CreateCaret(HWND,HBITMAP,int,int);
-HCURSOR WINAPI CreateCursor(HINSTANCE,int,int,int,int,PCVOID,PCVOID);
-HDESK WINAPI CreateDesktopA(LPSTR,LPSTR,LPDEVMODEA,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
-HDESK WINAPI CreateDesktopW(LPWSTR,LPWSTR,LPDEVMODEW,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
-#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)
-HWND WINAPI CreateDialogIndirectParamA(HINSTANCE,LPCDLGTEMPLATE,HWND,DLGPROC,LPARAM);
-HWND WINAPI CreateDialogIndirectParamW(HINSTANCE,LPCDLGTEMPLATE,HWND,DLGPROC,LPARAM);
-HWND WINAPI CreateDialogParamA(HINSTANCE,LPCSTR,HWND,DLGPROC,LPARAM);
-HWND WINAPI CreateDialogParamW(HINSTANCE,LPCWSTR,HWND,DLGPROC,LPARAM);
-HICON WINAPI CreateIcon(HINSTANCE,int,int,BYTE,BYTE,const BYTE*,const BYTE*);
-HICON WINAPI CreateIconFromResource(PBYTE,DWORD,BOOL,DWORD);
-HICON WINAPI CreateIconFromResourceEx(PBYTE,DWORD,BOOL,DWORD,int,int,UINT);
-HICON WINAPI CreateIconIndirect(PICONINFO);
-HWND WINAPI CreateMDIWindowA(LPSTR,LPSTR,DWORD,int,int,int,int,HWND,HINSTANCE,LPARAM);
-HWND WINAPI CreateMDIWindowW(LPWSTR,LPWSTR,DWORD,int,int,int,int,HWND,HINSTANCE,LPARAM);
-HMENU WINAPI CreateMenu(void);
-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)
-HWND WINAPI CreateWindowExA(DWORD,LPCSTR,LPCSTR,DWORD,int,int,int,int,HWND,HMENU,HINSTANCE,LPVOID);
-HWND WINAPI CreateWindowExW(DWORD,LPCWSTR,LPCWSTR,DWORD,int,int,int,int,HWND,HMENU,HINSTANCE,LPVOID);
-HWINSTA WINAPI CreateWindowStationA(LPSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
-HWINSTA WINAPI CreateWindowStationW(LPWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
-LRESULT WINAPI DefDlgProcA(HWND,UINT,WPARAM,LPARAM);
-LRESULT WINAPI DefDlgProcW(HWND,UINT,WPARAM,LPARAM);
-HDWP WINAPI DeferWindowPos(HDWP,HWND,HWND,int,int,int,int,UINT);
-LRESULT WINAPI DefFrameProcA(HWND,HWND,UINT,WPARAM,LPARAM);
-LRESULT WINAPI DefFrameProcW(HWND,HWND,UINT,WPARAM,LPARAM);
-#define DefHookProc(c,p,lp,h) CallNextHookEx((HHOOK)*h,c,p,lp)
-LRESULT WINAPI DefMDIChildProcA(HWND,UINT,WPARAM,LPARAM);
-LRESULT WINAPI DefMDIChildProcW(HWND,UINT,WPARAM,LPARAM);
-LRESULT WINAPI DefWindowProcA(HWND,UINT,WPARAM,LPARAM);
-LRESULT WINAPI DefWindowProcW(HWND,UINT,WPARAM,LPARAM);
-BOOL WINAPI DeleteMenu(HMENU,UINT,UINT);
-BOOL WINAPI DestroyAcceleratorTable(HACCEL);
-BOOL WINAPI DestroyCaret(void);
-BOOL WINAPI DestroyCursor(HCURSOR);
-BOOL WINAPI DestroyIcon(HICON);
-BOOL WINAPI DestroyMenu(HMENU);
-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)
-int WINAPI DialogBoxIndirectParamA(HINSTANCE,LPCDLGTEMPLATE,HWND,DLGPROC,LPARAM);
-int WINAPI DialogBoxIndirectParamW(HINSTANCE,LPCDLGTEMPLATE,HWND,DLGPROC,LPARAM);
-int WINAPI DialogBoxParamA(HINSTANCE,LPCSTR,HWND,DLGPROC,LPARAM);
-int WINAPI DialogBoxParamW(HINSTANCE,LPCWSTR,HWND,DLGPROC,LPARAM);
-LONG WINAPI DispatchMessageA(const MSG*);
-LONG WINAPI DispatchMessageW(const MSG*);
-int WINAPI DlgDirListA(HWND,LPSTR,int,int,UINT);
-int WINAPI DlgDirListW(HWND,LPWSTR,int,int,UINT);
-int WINAPI DlgDirListComboBoxA(HWND,LPSTR,int,int,UINT);
-int WINAPI DlgDirListComboBoxW(HWND,LPWSTR,int,int,UINT);
-BOOL WINAPI DlgDirSelectComboBoxExA(HWND,LPSTR,int,int);
-BOOL WINAPI DlgDirSelectComboBoxExW(HWND,LPWSTR,int,int);
-BOOL WINAPI DlgDirSelectExA(HWND,LPSTR,int,int);
-BOOL WINAPI DlgDirSelectExW(HWND,LPWSTR,int,int);
-BOOL WINAPI DragDetect(HWND,POINT);
-DWORD WINAPI DragObject(HWND,HWND,UINT,DWORD,HCURSOR);
-BOOL WINAPI DrawAnimatedRects(HWND,int,LPCRECT,LPCRECT);
-BOOL WINAPI DrawCaption(HWND,HDC,LPCRECT,UINT);
-BOOL WINAPI DrawEdge(HDC,LPRECT,UINT,UINT);
-BOOL WINAPI DrawFocusRect(HDC,LPCRECT);
-BOOL WINAPI DrawFrameControl(HDC,LPRECT,UINT,UINT);
-BOOL WINAPI DrawIcon(HDC,int,int,HICON);
-BOOL WINAPI DrawIconEx(HDC,int,int,HICON,int,int,UINT,HBRUSH,UINT);
-BOOL WINAPI DrawMenuBar(HWND);
-BOOL WINAPI DrawStateA(HDC,HBRUSH,DRAWSTATEPROC,LPARAM,WPARAM,int,int,int,int,UINT);
-BOOL WINAPI DrawStateW(HDC,HBRUSH,DRAWSTATEPROC,LPARAM,WPARAM,int,int,int,int,UINT);
-int WINAPI DrawTextA(HDC,LPCSTR,int,LPRECT,UINT);
-int WINAPI DrawTextW(HDC,LPCWSTR,int,LPRECT,UINT);
-int WINAPI DrawTextExA(HDC,LPSTR,int,LPRECT,UINT,LPDRAWTEXTPARAMS);
-int WINAPI DrawTextExW(HDC,LPWSTR,int,LPRECT,UINT,LPDRAWTEXTPARAMS);
-BOOL WINAPI EmptyClipboard(void);
-BOOL WINAPI EnableMenuItem(HMENU,UINT,UINT);
-BOOL WINAPI EnableScrollBar(HWND,UINT,UINT);
-BOOL WINAPI EnableWindow(HWND,BOOL);
-BOOL WINAPI EndDeferWindowPos(HDWP);
-BOOL WINAPI EndDialog(HWND,int);
-BOOL WINAPI EndPaint(HWND,const PAINTSTRUCT*);
-BOOL WINAPI EnumChildWindows(HWND,ENUMWINDOWSPROC,LPARAM);
-UINT WINAPI EnumClipboardFormats(UINT);
-BOOL WINAPI EnumDesktopsA(HWINSTA,DESKTOPENUMPROCA,LPARAM);
-BOOL WINAPI EnumDesktopsW(HWINSTA,DESKTOPENUMPROCW,LPARAM);
-BOOL WINAPI EnumDesktopWindows(HDESK,ENUMWINDOWSPROC,LPARAM);
-BOOL WINAPI EnumDisplaySettingsA(LPCSTR,DWORD,PDEVMODEA);
-BOOL WINAPI EnumDisplaySettingsW(LPCWSTR,DWORD,PDEVMODEW);
-int WINAPI EnumPropsA(HWND,PROPENUMPROCA);
-int WINAPI EnumPropsW(HWND,PROPENUMPROCW);
-int WINAPI EnumPropsExA(HWND,PROPENUMPROCEXA,LPARAM);
-int WINAPI EnumPropsExW(HWND,PROPENUMPROCEXW,LPARAM);
-#define EnumTaskWindows(h,f,p) EnumThreadWindows((DWORD)h,f,p)
-BOOL WINAPI EnumThreadWindows(DWORD,WNDENUMPROC,LPARAM);
-BOOL WINAPI EnumWindows(WNDENUMPROC,LPARAM);
-BOOL WINAPI EnumWindowStationsA(WINSTAENUMPROCA,LPARAM);
-BOOL WINAPI EnumWindowStationsW(WINSTAENUMPROCW,LPARAM);
-BOOL WINAPI EqualRect(LPCRECT,LPCRECT);
-#define ExitWindows(r,c) ExitWindowsEx(EWX_LOGOFF,0)
-BOOL WINAPI ExitWindowsEx(UINT,DWORD);
-HWND WINAPI FindWindowA(LPCSTR,LPCSTR);
-HWND WINAPI FindWindowExA(HWND,HWND,LPCSTR,LPCSTR);
-HWND WINAPI FindWindowExW(HWND,HWND,LPCWSTR,LPCWSTR);
-HWND WINAPI FindWindowW(LPCWSTR,LPCWSTR);
-BOOL WINAPI FlashWindow(HWND,BOOL);
-int WINAPI FrameRect(HDC,LPCRECT,HBRUSH);
-BOOL WINAPI FrameRgn(HDC,HRGN,HBRUSH,int,int);
-HWND WINAPI GetActiveWindow(void);
-SHORT WINAPI GetAsyncKeyState(int);
-HWND WINAPI GetCapture(void);
-UINT WINAPI GetCaretBlinkTime(void);
-BOOL WINAPI GetCaretPos(LPPOINT);
-BOOL WINAPI GetClassInfoA(HINSTANCE,LPCSTR,PWNDCLASSA);
-BOOL WINAPI GetClassInfoExA(HINSTANCE,LPCSTR,PWNDCLASSEXA);
-BOOL WINAPI GetClassInfoW(HINSTANCE,LPCWSTR,PWNDCLASSW);
-BOOL WINAPI GetClassInfoExW(HINSTANCE,LPCWSTR,PWNDCLASSEXW);
-DWORD WINAPI GetClassLongA(HWND,int);
-DWORD WINAPI GetClassLongW(HWND,int);
-int WINAPI GetClassNameA(HWND,LPSTR,int);
-int WINAPI GetClassNameW(HWND,LPWSTR,int);
-WORD WINAPI GetClassWord(HWND,int);
-BOOL WINAPI GetClientRect(HWND,LPRECT);
-HANDLE WINAPI GetClipboardData(UINT);
-int WINAPI GetClipboardFormatNameA(UINT,LPSTR,int);
-int WINAPI GetClipboardFormatNameW(UINT,LPWSTR,int);
-HWND WINAPI GetClipboardOwner(void);
-HWND WINAPI GetClipboardViewer(void);
-BOOL WINAPI GetClipCursor(LPRECT);
-BOOL WINAPI GetCursorPos(LPPOINT);
-HDC WINAPI GetDC(HWND);
-HDC WINAPI GetDCEx(HWND,HRGN,DWORD);
-HWND WINAPI GetDesktopWindow(void);
-long WINAPI GetDialogBaseUnits(void);
-int WINAPI GetDlgCtrlID(HWND);
-HWND WINAPI GetDlgItem(HWND,int);
-UINT WINAPI GetDlgItemInt(HWND,int,PBOOL,BOOL);
-UINT WINAPI GetDlgItemTextA(HWND,int,LPSTR,int);
-UINT WINAPI GetDlgItemTextW(HWND,int,LPWSTR,int);
-UINT WINAPI GetDoubleClickTime(void);
-HWND WINAPI GetFocus(void);
-HWND WINAPI GetForegroundWindow(void);
-BOOL WINAPI GetIconInfo(HICON,PICONINFO);
-BOOL WINAPI GetInputState(void);
-UINT WINAPI GetKBCodePage(void);
-HKL WINAPI GetKeyboardLayout(DWORD);
-int WINAPI GetKeyboardLayoutList(int,HKL*);
-BOOL WINAPI GetKeyboardLayoutNameA(LPSTR);
-BOOL WINAPI GetKeyboardLayoutNameW(LPWSTR);
-BOOL WINAPI GetKeyboardState(PBYTE);
-int WINAPI GetKeyboardType(int);
-int WINAPI GetKeyNameTextA(LONG,LPSTR,int);
-int WINAPI GetKeyNameTextW(LONG,LPWSTR,int);
-SHORT WINAPI GetKeyState(int);
-HWND WINAPI GetLastActivePopup(HWND);
-DWORD WINAPI GetLastError(void);
-HMENU WINAPI GetMenu(HWND);
-LONG WINAPI GetMenuCheckMarkDimensions(void);
-DWORD WINAPI GetMenuContextHelpId(HMENU);
-UINT WINAPI GetMenuDefaultItem(HMENU,UINT,UINT);
-int WINAPI GetMenuItemCount(HMENU);
-UINT WINAPI GetMenuItemID(HMENU,int);
-BOOL WINAPI GetMenuItemInfoA(HMENU,UINT,BOOL,LPMENUITEMINFOA);
-BOOL WINAPI GetMenuItemInfoW(HMENU,UINT,BOOL,LPMENUITEMINFOW);
-BOOL WINAPI GetMenuItemRect(HWND,HMENU,UINT,LPRECT);
-UINT WINAPI GetMenuState(HMENU,UINT,UINT);
-int WINAPI GetMenuStringA(HMENU,UINT,LPSTR,int,UINT);
-int WINAPI GetMenuStringW(HMENU,UINT,LPWSTR,int,UINT);
-BOOL WINAPI GetMessageA(LPMSG,HWND,UINT,UINT);
-BOOL WINAPI GetMessageW(LPMSG,HWND,UINT,UINT);
-LONG WINAPI GetMessageExtraInfo(void);
-DWORD WINAPI GetMessagePos(void);
-LONG WINAPI GetMessageTime(void);
-HWND WINAPI GetNextDlgGroupItem(HWND,HWND,BOOL);
-HWND WINAPI GetNextDlgTabItem(HWND,HWND,BOOL);
-#define GetNextWindow(h,c) GetWindow(h,c)
-HWND WINAPI GetOpenClipboardWindow(void);
-HWND WINAPI GetParent(HWND);
-int WINAPI GetPriorityClipboardFormat(UINT*,int);
-HANDLE WINAPI GetPropA(HWND,LPCSTR);
-HANDLE WINAPI GetPropW(HWND,LPCWSTR);
-DWORD WINAPI GetQueueStatus(UINT);
-BOOL WINAPI GetScrollInfo(HWND,int,LPSCROLLINFO);
-int WINAPI GetScrollPos(HWND,int);
-BOOL WINAPI GetScrollRange(HWND,int,LPINT,LPINT);
-HMENU WINAPI GetSubMenu(HMENU,int);
-DWORD WINAPI GetSysColor(int);
-HBRUSH WINAPI GetSysColorBrush(int);
-#define GetSysModalWindow() (NULL)
-HMENU WINAPI GetSystemMenu(HWND,BOOL);
-int WINAPI GetSystemMetrics(int);
-DWORD WINAPI GetTabbedTextExtentA(HDC,LPCSTR,int,int,LPINT);
-DWORD WINAPI GetTabbedTextExtentW(HDC,LPCWSTR,int,int,LPINT);
-LONG WINAPI GetWindowLongA(HWND,int);
-LONG WINAPI GetWindowLongW(HWND,int);
-HDESK WINAPI GetThreadDesktop(DWORD);
-HWND WINAPI GetTopWindow(HWND);
-BOOL WINAPI GetUpdateRect(HWND,LPRECT,BOOL);
-int WINAPI GetUpdateRgn(HWND,HRGN,BOOL);
-BOOL WINAPI GetUserObjectInformationA(HANDLE,int,PVOID,DWORD,PDWORD);
-BOOL WINAPI GetUserObjectInformationW(HANDLE,int,PVOID,DWORD,PDWORD);
-BOOL WINAPI GetUserObjectSecurity(HANDLE,PSECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
-HWND WINAPI GetWindow(HWND,UINT);
-DWORD WINAPI GetWindowContextHelpId(HWND);
-HDC WINAPI GetWindowDC(HWND);
-BOOL WINAPI GetWindowExtEx(HDC,LPSIZE);
-BOOL WINAPI GetWindowPlacement(HWND,WINDOWPLACEMENT*);
-BOOL WINAPI GetWindowRect(HWND,LPRECT);
-int WINAPI GetWindowRgn(HWND,HRGN);
-#define GetWindowTask(hWnd) ((HANDLE)GetWindowThreadProcessId(hWnd, NULL))
-int WINAPI GetWindowTextA(HWND,LPSTR,int);
-int WINAPI GetWindowTextLengthA(HWND);
-int WINAPI GetWindowTextLengthW(HWND);
-int WINAPI GetWindowTextW(HWND,LPWSTR,int);
-WORD WINAPI GetWindowWord(HWND,int);
-BOOL WINAPI GrayStringA(HDC,HBRUSH,GRAYSTRINGPROC,LPARAM,int,int,int,int,int);
-BOOL WINAPI GrayStringW(HDC,HBRUSH,GRAYSTRINGPROC,LPARAM,int,int,int,int,int);
-BOOL WINAPI HideCaret(HWND);
-BOOL WINAPI HiliteMenuItem(HWND,HMENU,UINT,UINT);
-BOOL WINAPI InflateRect(LPRECT,int,int);
-BOOL WINAPI InSendMessage(VOID);
-BOOL WINAPI InsertMenuA(HMENU,UINT,UINT,UINT,LPCSTR);
-BOOL WINAPI InsertMenuW(HMENU,UINT,UINT,UINT,LPCWSTR);
-BOOL WINAPI InsertMenuItemA(HMENU,UINT,BOOL,LPCMENUITEMINFOA);
-BOOL WINAPI InsertMenuItemW(HMENU,UINT,BOOL,LPCMENUITEMINFOW);
-BOOL WINAPI IntersectRect(LPRECT,LPCRECT,LPCRECT);
-BOOL WINAPI InvalidateRect(HWND,LPCRECT,BOOL);
-BOOL WINAPI InvalidateRgn(HWND,HRGN,BOOL);
-BOOL WINAPI InvertRect(HDC,LPCRECT);
-BOOL WINAPI IsCharAlphaA(CHAR ch);
-BOOL WINAPI IsCharAlphaNumericA(CHAR);
-BOOL WINAPI IsCharAlphaNumericW(WCHAR);
-BOOL WINAPI IsCharAlphaW(WCHAR);
-BOOL WINAPI IsCharLowerA(CHAR);
-BOOL WINAPI IsCharLowerW(WCHAR);
-BOOL WINAPI IsCharUpperA(CHAR);
-BOOL WINAPI IsCharUpperW(WCHAR);
-BOOL WINAPI IsChild(HWND,HWND);
-BOOL WINAPI IsClipboardFormatAvailable(UINT);
-BOOL WINAPI IsDialogMessageA(HWND,LPMSG);
-BOOL WINAPI IsDialogMessageW(HWND,LPMSG);
-UINT WINAPI IsDlgButtonChecked(HWND,int);
-BOOL WINAPI IsIconic(HWND);
-BOOL WINAPI IsMenu(HMENU);
-BOOL WINAPI IsRectEmpty(LPCRECT);
-BOOL WINAPI IsWindow(HWND);
-BOOL WINAPI IsWindowEnabled(HWND);
-BOOL WINAPI IsWindowUnicode(HWND);
-BOOL WINAPI IsWindowVisible(HWND);
-BOOL WINAPI IsZoomed(HWND);
-VOID WINAPI keybd_event(BYTE,BYTE,DWORD,DWORD);
-BOOL WINAPI KillTimer(HWND,UINT);
-HACCEL WINAPI LoadAcceleratorsA(HINSTANCE,LPCSTR);
-HACCEL WINAPI LoadAcceleratorsW(HINSTANCE,LPCWSTR);
-HBITMAP WINAPI LoadBitmapA(HINSTANCE,LPCSTR);
-HBITMAP WINAPI LoadBitmapW(HINSTANCE,LPCWSTR);
-HCURSOR WINAPI LoadCursorA(HINSTANCE,LPCSTR);
-HCURSOR WINAPI LoadCursorFromFileA(LPCSTR);
-HCURSOR WINAPI LoadCursorFromFileW(LPCWSTR);
-HCURSOR WINAPI LoadCursorW(HINSTANCE,LPCWSTR);
-HICON WINAPI LoadIconA(HINSTANCE,LPCSTR);
-HICON WINAPI LoadIconW(HINSTANCE,LPCWSTR);
-HANDLE WINAPI LoadImageA(HINSTANCE,LPCSTR,UINT,int,int,UINT);
-HANDLE WINAPI LoadImageW(HINSTANCE,LPCWSTR,UINT,int,int,UINT);
-HKL WINAPI LoadKeyboardLayoutA(LPCSTR,UINT);
-HKL WINAPI LoadKeyboardLayoutW(LPCWSTR,UINT);
-HMENU WINAPI LoadMenuA(HINSTANCE,LPCSTR);
-HMENU WINAPI LoadMenuIndirectA(const MENUTEMPLATE*);
-HMENU WINAPI LoadMenuIndirectW(const MENUTEMPLATE*);
-HMENU WINAPI LoadMenuW(HINSTANCE,LPCWSTR);
-int WINAPI LoadStringA(HINSTANCE,UINT,LPSTR,int);
-int WINAPI LoadStringW(HINSTANCE,UINT,LPWSTR,int);
-BOOL WINAPI LockWindowUpdate(HWND);
-int WINAPI LookupIconIdFromDirectory(PBYTE,BOOL);
-int WINAPI LookupIconIdFromDirectoryEx(PBYTE,BOOL,int,int,UINT);
-BOOL WINAPI MapDialogRect(HWND,LPRECT);
-UINT WINAPI MapVirtualKeyA(UINT,UINT);
-UINT WINAPI MapVirtualKeyExA(UINT,UINT,HKL);
-UINT WINAPI MapVirtualKeyExW(UINT,UINT,HKL);
-UINT WINAPI MapVirtualKeyW(UINT,UINT);
-int WINAPI MapWindowPoints(HWND,HWND,LPPOINT,UINT);
-int WINAPI MenuItemFromPoint(HWND,HMENU,POINT);
-BOOL WINAPI MessageBeep(UINT);
-int WINAPI MessageBoxA(HWND,LPCSTR,LPCSTR,UINT);
-int WINAPI MessageBoxW(HWND,LPCWSTR,LPCWSTR,UINT);
-int WINAPI MessageBoxExA(HWND,LPCSTR,LPCSTR,UINT,WORD);
-int WINAPI MessageBoxExW(HWND,LPCWSTR,LPCWSTR,UINT,WORD);
-int WINAPI MessageBoxIndirectA(LPMSGBOXPARAMSA);
-int WINAPI MessageBoxIndirectW(LPMSGBOXPARAMSW);
-BOOL WINAPI ModifyMenuA(HMENU,UINT,UINT,UINT,LPCSTR);
-BOOL WINAPI ModifyMenuW(HMENU,UINT,UINT,UINT,LPCWSTR);
-void WINAPI mouse_event(DWORD,DWORD,DWORD,DWORD,DWORD);
-BOOL WINAPI MoveWindow(HWND,int,int,int,int,BOOL);
-DWORD WINAPI MsgWaitForMultipleObjects(DWORD,LPHANDLE,BOOL,DWORD,DWORD);
-DWORD WINAPI MsgWaitForMultipleObjectsEx(DWORD,LPHANDLE,DWORD,DWORD,DWORD);
-DWORD WINAPI OemKeyScan(WORD);
-BOOL WINAPI OemToCharA(LPCSTR,LPSTR);
-BOOL WINAPI OemToCharBuffA(LPCSTR,LPSTR,DWORD);
-BOOL WINAPI OemToCharBuffW(LPCSTR,LPWSTR,DWORD);
-BOOL WINAPI OemToCharW(LPCSTR,LPWSTR);
-BOOL WINAPI OffsetRect(LPRECT,int,int);
-BOOL WINAPI OpenClipboard(HWND);
-HDESK WINAPI OpenDesktopA(LPSTR,DWORD,BOOL,DWORD);
-HDESK WINAPI OpenDesktopW(LPWSTR,DWORD,BOOL,DWORD);
-BOOL WINAPI OpenIcon(HWND);
-HDESK WINAPI OpenInputDesktop(DWORD,BOOL,DWORD);
-HWINSTA WINAPI OpenWindowStationA(LPSTR,BOOL,DWORD);
-HWINSTA WINAPI OpenWindowStationW(LPWSTR,BOOL,DWORD);
-BOOL WINAPI PaintDesktop(HDC);
-BOOL WINAPI PeekMessageA(LPMSG,HWND,UINT,UINT,UINT);
-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)
-BOOL WINAPI PostMessageA(HWND,UINT,WPARAM,LPARAM);
-BOOL WINAPI PostMessageW(HWND,UINT,WPARAM,LPARAM);
-void WINAPI PostQuitMessage(int);
-BOOL WINAPI PostThreadMessageA(DWORD,UINT,WPARAM,LPARAM);
-BOOL WINAPI PostThreadMessageW(DWORD,UINT,WPARAM,LPARAM);
-BOOL WINAPI PtInRect(LPCRECT,POINT);
-BOOL WINAPI RedrawWindow(HWND,LPCRECT,HRGN,UINT);
-ATOM WINAPI RegisterClassA(const WNDCLASSA*);
-ATOM WINAPI RegisterClassW(const WNDCLASSW*);
-ATOM WINAPI RegisterClassExA(const WNDCLASSEXA*);
-ATOM WINAPI RegisterClassExW(const WNDCLASSEXW*);
-UINT WINAPI RegisterClipboardFormatA(LPCSTR);
-UINT WINAPI RegisterClipboardFormatW(LPCWSTR);
-BOOL WINAPI RegisterHotKey(HWND,int,UINT,UINT);
-UINT WINAPI RegisterWindowMessageA(LPCSTR);
-UINT WINAPI RegisterWindowMessageW(LPCWSTR);
-BOOL WINAPI ReleaseCapture(void);
-int WINAPI ReleaseDC(HWND,HDC);
-BOOL WINAPI RemoveMenu(HMENU,UINT,UINT);
-HANDLE WINAPI RemovePropA(HWND,LPCSTR);
-HANDLE WINAPI RemovePropW(HWND,LPCWSTR);
-BOOL WINAPI ReplyMessage(LRESULT);
-BOOL WINAPI ScreenToClient(HWND,LPPOINT);
-BOOL WINAPI ScrollDC(HDC,int,int,LPCRECT,LPCRECT,HRGN,LPRECT);
-BOOL WINAPI ScrollWindow(HWND,int,int,LPCRECT,LPCRECT);
-int WINAPI ScrollWindowEx(HWND,int,int,LPCRECT,LPCRECT,HRGN,LPRECT,UINT);
-LONG WINAPI SendDlgItemMessageA(HWND,int,UINT,WPARAM,LPARAM);
-LONG WINAPI SendDlgItemMessageW(HWND,int,UINT,WPARAM,LPARAM);
-LRESULT WINAPI SendMessageA(HWND,UINT,WPARAM,LPARAM);
-BOOL WINAPI SendMessageCallbackA(HWND,UINT,WPARAM,LPARAM,SENDASYNCPROC,DWORD);
-BOOL WINAPI SendMessageCallbackW(HWND,UINT,WPARAM,LPARAM,SENDASYNCPROC,DWORD);
-LRESULT WINAPI SendMessageTimeoutA(HWND,UINT,WPARAM,LPARAM,UINT,UINT,PDWORD);
-LRESULT WINAPI SendMessageTimeoutW(HWND,UINT,WPARAM,LPARAM,UINT,UINT,PDWORD);
-LRESULT WINAPI SendMessageW(HWND,UINT,WPARAM,LPARAM);
-BOOL WINAPI SendNotifyMessageA(HWND,UINT,WPARAM,LPARAM);
-BOOL WINAPI SendNotifyMessageW(HWND,UINT,WPARAM,LPARAM);
-HWND WINAPI SetActiveWindow(HWND);
-HWND WINAPI SetCapture(HWND hWnd);
-BOOL WINAPI SetCaretBlinkTime(UINT);
-BOOL WINAPI SetCaretPos(int,int);
-DWORD WINAPI SetClassLongA(HWND,int,LONG);
-DWORD WINAPI SetClassLongW(HWND,int,LONG);
-WORD WINAPI SetClassWord(HWND,int,WORD);
-HANDLE WINAPI SetClipboardData(UINT,HANDLE);
-HWND WINAPI SetClipboardViewer(HWND);
-HCURSOR WINAPI SetCursor(HCURSOR);
-BOOL WINAPI SetCursorPos(int,int);
-VOID WINAPI SetDebugErrorLevel(DWORD);
-BOOL WINAPI SetDlgItemInt(HWND,int,UINT,BOOL);
-BOOL WINAPI SetDlgItemTextA(HWND,int,LPCSTR);
-BOOL WINAPI SetDlgItemTextW(HWND,int,LPCWSTR);
-BOOL WINAPI SetDoubleClickTime(UINT);
-HWND WINAPI SetFocus(HWND);
-BOOL WINAPI SetForegroundWindow(HWND);
-BOOL WINAPI SetKeyboardState(PBYTE);
-BOOL WINAPI SetMenu(HWND,HMENU);
-BOOL WINAPI SetMenuContextHelpId(HMENU,DWORD);
-BOOL WINAPI SetMenuDefaultItem(HMENU,UINT,UINT);
-BOOL WINAPI SetMenuItemBitmaps(HMENU,UINT,UINT,HBITMAP,HBITMAP);
-BOOL WINAPI SetMenuItemInfoA(HMENU,UINT,BOOL,LPCMENUITEMINFOA);
-BOOL WINAPI SetMenuItemInfoW( HMENU,UINT,BOOL,LPCMENUITEMINFOW);
-LPARAM WINAPI SetMessageExtraInfo(LPARAM);
-BOOL WINAPI SetMessageQueue(int);
-HWND WINAPI SetParent(HWND,HWND);
-BOOL WINAPI SetProcessWindowStation(HWINSTA);
-BOOL WINAPI SetPropA(HWND,LPCSTR,HANDLE);
-BOOL WINAPI SetPropW(HWND,LPCWSTR,HANDLE);
-BOOL WINAPI SetRect(LPRECT,int,int,int,int);
-BOOL WINAPI SetRectEmpty(LPRECT);
-int WINAPI SetScrollInfo(HWND,int,LPCSCROLLINFO,BOOL);
-int WINAPI SetScrollPos(HWND,int,int,BOOL);
-BOOL WINAPI SetScrollRange(HWND,int,int,int,BOOL);
-BOOL WINAPI SetSysColors(int,const INT *,const COLORREF *);
-#define SetSysModalWindow(h) (NULL)
-BOOL WINAPI SetSystemCursor(HCURSOR,DWORD);
-BOOL WINAPI SetThreadDesktop(HDESK);
-UINT WINAPI SetTimer(HWND,UINT,UINT,TIMERPROC);
-BOOL WINAPI SetUserObjectInformationA(HANDLE,int,PVOID,DWORD);
-BOOL WINAPI SetUserObjectInformationW(HANDLE,int,PVOID,DWORD);
-BOOL WINAPI SetUserObjectSecurity(HANDLE,PSECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
-BOOL WINAPI SetWindowContextHelpId(HWND,DWORD);
-LONG WINAPI SetWindowLongA(HWND,int,LONG);
-LONG WINAPI SetWindowLongW(HWND,int,LONG);
-BOOL WINAPI SetWindowPlacement(HWND hWnd,const WINDOWPLACEMENT*);
-BOOL WINAPI SetWindowPos(HWND,HWND,int,int,int,int,UINT);
-int WINAPI SetWindowRgn(HWND,HRGN,BOOL);
-HOOKPROC WINAPI SetWindowsHookA(int,HOOKPROC);
-HHOOK WINAPI SetWindowsHookExA(int,HOOKPROC,HINSTANCE,DWORD);
-HHOOK WINAPI SetWindowsHookExW(int,HOOKPROC,HINSTANCE,DWORD);
-BOOL WINAPI SetWindowTextA(HWND,LPCSTR);
-BOOL WINAPI SetWindowTextW(HWND,LPCWSTR);
-WORD WINAPI SetWindowWord(HWND,int,WORD);
-BOOL WINAPI ShowCaret(HWND);
-int WINAPI ShowCursor(BOOL);
-BOOL WINAPI ShowOwnedPopups(HWND,BOOL);
-BOOL WINAPI ShowScrollBar(HWND,int,BOOL);
-BOOL WINAPI ShowWindow(HWND,int);
-BOOL WINAPI ShowWindowAsync(HWND,int);
-BOOL WINAPI SubtractRect(LPRECT,LPCRECT,LPCRECT);
-BOOL WINAPI SwapMouseButton(BOOL);
-BOOL WINAPI SwitchDesktop(HDESK);
-BOOL WINAPI SystemParametersInfoA(UINT,UINT,PVOID,UINT);
-BOOL WINAPI SystemParametersInfoW(UINT,UINT,PVOID,UINT);
-LONG WINAPI TabbedTextOutA(HDC,int,int,LPCSTR,int,int,LPINT,int);
-LONG WINAPI TabbedTextOutW(HDC,int,int,LPCWSTR,int,int,LPINT,int);
-WORD WINAPI TileWindows(HWND,UINT,LPCRECT,UINT,const HWND *);
-int WINAPI ToAscii(UINT,UINT,PBYTE,LPWORD,UINT);
-int WINAPI ToAsciiEx(UINT,UINT,PBYTE,LPWORD,UINT,HKL);
-int WINAPI ToUnicode(UINT,UINT,PBYTE,LPWSTR,int,UINT);
-int WINAPI ToUnicodeEx(UINT,UINT,PBYTE,LPWSTR,int,UINT,HKL);
-BOOL WINAPI TrackMouseEvent(LPTRACKMOUSEEVENT);
-BOOL WINAPI TrackPopupMenu(HMENU,UINT,int,int,int,HWND,LPCRECT);
-BOOL WINAPI TrackPopupMenuEx(HMENU,UINT,int,int,HWND,LPTPMPARAMS);
-int WINAPI TranslateAcceleratorA(HWND,HACCEL,LPMSG);
-int WINAPI TranslateAcceleratorW(HWND,HACCEL,LPMSG);
-BOOL WINAPI TranslateMDISysAccel(HWND,LPMSG);
-BOOL WINAPI TranslateMessage(const MSG*);
-BOOL WINAPI UnhookWindowsHook(int,HOOKPROC);
-BOOL WINAPI UnhookWindowsHookEx(HHOOK);
-BOOL WINAPI UnionRect(LPRECT,LPCRECT,LPCRECT);
-BOOL WINAPI UnloadKeyboardLayout(HKL);
-BOOL WINAPI UnregisterClassA(LPCSTR,HINSTANCE);
-BOOL WINAPI UnregisterClassW(LPCWSTR,HINSTANCE);
-BOOL WINAPI UnregisterHotKey(HWND,int);
-BOOL WINAPI UpdateWindow(HWND);
-BOOL WINAPI ValidateRect(HWND,LPCRECT);
-BOOL WINAPI ValidateRgn(HWND,HRGN);
-SHORT WINAPI VkKeyScanA(CHAR);
-SHORT WINAPI VkKeyScanExA(CHAR,HKL);
-SHORT WINAPI VkKeyScanExW(WCHAR,HKL);
-SHORT WINAPI VkKeyScanW(WCHAR);
-DWORD WINAPI WaitForInputIdle(HANDLE,DWORD);
-BOOL WINAPI WaitMessage(void);
-HWND WINAPI WindowFromDC(HDC hDC);
-HWND WINAPI WindowFromPoint(POINT);
-UINT WINAPI WinExec(LPCSTR,UINT);
-BOOL WINAPI WinHelpA(HWND,LPCSTR,UINT,DWORD);
-BOOL WINAPI WinHelpW(HWND,LPCWSTR,UINT,DWORD);
-int WINAPIV wsprintfA(LPSTR,LPCSTR,...);
-int WINAPIV wsprintfW(LPWSTR,LPCWSTR,...);
-int WINAPI wvsprintfA(LPSTR,LPCSTR,va_list arglist);
-int WINAPI wvsprintfW(LPWSTR,LPCWSTR,va_list arglist);
-
-#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 ICONMETRICSW ICONMETRICS,*LPICONMETRICS;
-typedef NONCLIENTMETRICSW NONCLIENTMETRICS,*LPNONCLIENTMETRICS;
-typedef SERIALKEYSW SERIALKEYS,*LPSERIALKEYS;
-typedef SOUNDSENTRYW SOUNDSENTRY,*LPSOUNDSENTRY;
-typedef MDICREATESTRUCTW MDICREATESTRUCT,*LPMDICREATESTRUCT;
-typedef MULTIKEYHELPW MULTIKEYHELP,*PMULTIKEYHELP,*LPMULTIKEYHELP;
-#define AppendMenu AppendMenuW
-#define CallWindowProc CallWindowProcW
-#define ChangeDisplaySettings ChangeDisplaySettingsW
-#define ChangeMenu ChangeMenuW
-#define CharLower CharLowerW
-#define CharLowerBuff CharLowerBuffW
-#define CharNext CharNextW
-#define CharNextEx CharNextExW
-#define CharPrev CharPrevW
-#define CharPrevEx CharPrevExW
-#define CharToOem CharToOemW
-#define CharToOemBuff CharToOemBuffW
-#define CharUpper CharUpperW
-#define CharUpperBuff CharUpperBuffW
-#define CopyAcceleratorTable CopyAcceleratorTableW
-#define CreateAcceleratorTable CreateAcceleratorTableW
-#define CreateDesktop CreateDesktopW
-#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 EnumDisplaySettings EnumDisplaySettingsW
-#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 GetClassName GetClassNameW
-#define GetClipboardFormatName GetClipboardFormatNameW
-#define GetDlgItemText GetDlgItemTextW
-#define GetKeyboardLayoutName GetKeyboardLayoutNameW
-#define GetKeyNameText GetKeyNameTextW
-#define GetMenuItemInfo GetMenuItemInfoW
-#define GetMenuString GetMenuStringW
-#define GetMessage GetMessageW
-#define GetProp GetPropW
-#define GetTabbedTextExtent GetTabbedTextExtentW
-#define GetUserObjectInformation GetUserObjectInformationW
-#define GetWindowLong GetWindowLongW
-#define GetWindowText GetWindowTextW
-#define GetWindowTextLength GetWindowTextLengthW
-#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 RegisterClass RegisterClassW
-#define RegisterClassEx RegisterClassExW
-#define RegisterClipboardFormat RegisterClipboardFormatW
-#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 SetDlgItemText SetDlgItemTextW
-#define SetMenuItemInfo SetMenuItemInfoW
-#define SetProp SetPropW
-#define SetUserObjectInformation SetUserObjectInformationW
-#define SetWindowLong SetWindowLongW
-#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
-#else
-#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 ICONMETRICSA ICONMETRICS,*LPICONMETRICS;
-typedef NONCLIENTMETRICSA NONCLIENTMETRICS,*LPNONCLIENTMETRICS;
-typedef SERIALKEYSA SERIALKEYS,*LPSERIALKEYS;
-typedef SOUNDSENTRYA SOUNDSENTRY,*LPSOUNDSENTRY;
-typedef MDICREATESTRUCTA MDICREATESTRUCT,*LPMDICREATESTRUCT;
-typedef MULTIKEYHELPA MULTIKEYHELP,*PMULTIKEYHELP,*LPMULTIKEYHELP;
-#define AppendMenu AppendMenuA
-#define CallWindowProc CallWindowProcA
-#define ChangeDisplaySettings ChangeDisplaySettingsA
-#define ChangeMenu ChangeMenuA
-#define CharLower CharLowerA
-#define CharLowerBuff CharLowerBuffA
-#define CharNext CharNextA
-#define CharNextEx CharNextExA
-#define CharPrev CharPrevA
-#define CharPrevEx CharPrevExA
-#define CharToOem CharToOemA
-#define CharToOemBuff CharToOemBuffA
-#define CharUpper CharUpperA
-#define CharUpperBuff CharUpperBuffA
-#define CopyAcceleratorTable CopyAcceleratorTableA
-#define CreateAcceleratorTable CreateAcceleratorTableA
-#define CreateDesktop CreateDesktopA
-#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 EnumDisplaySettings EnumDisplaySettingsA
-#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 GetClassName GetClassNameA
-#define GetClipboardFormatName GetClipboardFormatNameA
-#define GetDlgItemText GetDlgItemTextA
-#define GetKeyboardLayoutName GetKeyboardLayoutNameA
-#define GetKeyNameText GetKeyNameTextA
-#define GetMenuItemInfo GetMenuItemInfoA
-#define GetMenuString GetMenuStringA
-#define GetMessage GetMessageA
-#define GetProp GetPropA
-#define GetTabbedTextExtent GetTabbedTextExtentA
-#define GetUserObjectInformation GetUserObjectInformationA
-#define GetWindowLong GetWindowLongA
-#define GetWindowText GetWindowTextA
-#define GetWindowTextLength GetWindowTextLengthA
-#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 RegisterClass RegisterClassA
-#define RegisterClassEx RegisterClassExA
-#define RegisterClipboardFormat RegisterClipboardFormatA
-#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 SetDlgItemText SetDlgItemTextA
-#define SetMenuItemInfo SetMenuItemInfoA
-#define SetProp SetPropA
-#define SetUserObjectInformation SetUserObjectInformationA
-#define SetWindowLong SetWindowLongA
-#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
-#endif
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif /* _WINUSER_H */
diff --git a/winsup/w32api/include/winver.h b/winsup/w32api/include/winver.h
deleted file mode 100644
index 93f5e533d..000000000
--- a/winsup/w32api/include/winver.h
+++ /dev/null
@@ -1,129 +0,0 @@
-#ifndef _WINVER_H
-#define _WINVER_H
-#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(LPSTR,PDWORD);
-DWORD WINAPI GetFileVersionInfoSizeW(LPWSTR,PDWORD);
-BOOL WINAPI GetFileVersionInfoA(LPSTR,DWORD,DWORD,PVOID);
-BOOL WINAPI GetFileVersionInfoW(LPWSTR,DWORD,DWORD,PVOID);
-DWORD WINAPI VerLanguageNameA(DWORD,LPSTR,DWORD);
-DWORD WINAPI VerLanguageNameW(DWORD,LPWSTR,DWORD);
-BOOL WINAPI VerQueryValueA(PCVOID,LPSTR,PVOID*,PUINT);
-BOOL WINAPI VerQueryValueW(PCVOID,LPWSTR,PVOID*,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/wtypes.h b/winsup/w32api/include/wtypes.h
deleted file mode 100644
index c35dcec3a..000000000
--- a/winsup/w32api/include/wtypes.h
+++ /dev/null
@@ -1,160 +0,0 @@
-#ifndef _WTYPES_H
-#define _WTYPES_H
-#include <rpc.h>
-#include <rpcndr.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define IID_NULL GUID_NULL
-#define CLSID_NULL GUID_NULL
-#define CBPCLIPDATA(d) ((d).cbSize-sizeof((d).ulClipFmt))
-#define DECIMAL_NEG ((BYTE)0x80)
-#define DECIMAL_SETZERO(d) {(dec).Lo64=(dec).Hi32=(dec).signscale=0;}
-typedef struct _BLOB {
- ULONG cbSize;
- BYTE *pBlobData;
-} BLOB,*PBLOB,*LPBLOB;
-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_TASK=1,
- MEMCTX_SHARED,
- MEMCTX_MACSYSTEM,
- MEMCTX_UNKNOWN=-1,
- MEMCTX_SAME=-2
-} MEMCTX;
-typedef enum tagMSHCTX {
- MSHCTX_LOCAL,
- MSHCTX_NOSHAREDMEM,
- MSHCTX_DIFFERENTMACHINE,
- MSHCTX_INPROC
-} 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 {
- 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_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
-};
-#ifdef _WIN64
-#define VT_INT_PTR VT_I8
-#define VT_UINT_PTR VT_UI8
-#else
-#define VT_INT_PTR VT_I4
-#define VT_UINT_PTR VT_UI4
-#endif
-
-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;
- union {
- struct {
- BYTE scale;
- BYTE sign;
- }_STRUCT_NAME(s);
- USHORT signscale;
- } DUMMYUNIONNAME;
- ULONG Hi32;
- union {
- struct {
- ULONG Lo32;
- ULONG Mid32;
- }_STRUCT_NAME(s2);
- ULONGLONG Lo64;
- } DUMMYUNIONNAME2;
-} DECIMAL;
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/zmouse.h b/winsup/w32api/include/zmouse.h
deleted file mode 100644
index aa6073c7e..000000000
--- a/winsup/w32api/include/zmouse.h
+++ /dev/null
@@ -1,24 +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
-
-#ifndef WM_MOUSEWHEEL
-# define WM_MOUSEWHEEL (WM_MOUSELAST + 1)
-#endif
-
-#define WHEEL_DELTA 120
-#define WHEEL_PAGESCROLL UINT_MAX
-
-#endif /* _ZMOUSE_H */
diff --git a/winsup/w32api/install-sh b/winsup/w32api/install-sh
deleted file mode 100755
index e9de23842..000000000
--- 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 077f3cef9..000000000
--- a/winsup/w32api/lib/Makefile.in
+++ /dev/null
@@ -1,221 +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@
-
-target_alias = @target_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_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/*.h))
-
-# libraries
-
-DEF_FILES = $(notdir $(wildcard $(srcdir)/*.def))
-IMPLIBS = $(addprefix lib,$(subst .def,.a,$(DEF_FILES)))
-EXTRA_LIBS=libuuid.a libscrnsave.a libscrnsavw.a libdxguid.a liblargeint.a
-LIBS = $(IMPLIBS) $(EXTRA_LIBS)
-EXTRA_OBJS=uuid.o shell32.o dxguid.o scrnsave.o scrnsavw.o largeint.o $(UUID_OBJS) dinput.o
-SOURCES = scrnsave.c shell32.c uuid.c largeint.c dinput.c dxguid.c \
-res.rc test.c
-
-DISTFILES = Makefile.in $(DEF_FILES) $(SOURCES)
-
-# targets
-all: $(LIBS) $(EXTRA_OBJS)
-
-TEST_OPTIONS = $(ALL_CFLAGS) -Wall -c $(srcdir)/test.c -o test.o
-.PHONY: test
-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 $@ $<
-
-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.
-xinstall: xinstall-libraries xinstall-headers
-
-xinstall-libraries: all
- $(mkinstalldirs) $(tooldir)/lib
- for i in $(LIBS); do \
- $(INSTALL_DATA) $$i $(tooldir)/lib/$$i ; \
- done
-
-xinstall-headers:
- $(mkinstalldirs) $(tooldir)/include/w32api
- for i in $(HEADERS); do \
- $(INSTALL_DATA) $(srcdir)/../include/$$i $(tooldir)/include/w32api/$$i ; \
- echo "#include <w32api/$$i>" > $(tooldir)/include/$$i ; \
- done
-
-# uninstall headers and libraries from a target specified directory
-xuninstall: xuninstall-libraries xuninstall-headers
-
-xuninstall-libraries:
- @for i in $(LIBS); do \
- rm -f $(tooldir)/lib/$$i ; \
- done
-
-xuninstall-headers:
- @for i in $(HEADERS); do \
- rm -r $(tooldir)/include/w32api/$$i ; \
- done
- rmdir $(tooldir)/include/w32api
-
-# install headers and libraries
-install: install-libraries install-headers
-
-install-libraries: all
- $(mkinstalldirs) $(tooldir)/lib
- for i in $(LIBS); do \
- $(INSTALL_DATA) $$i $(tooldir)/lib/$$i ; \
- done
-
-install-headers:
- $(mkinstalldirs) $(tooldir)/include/w32api
- for i in $(HEADERS); do \
- $(INSTALL_DATA) $(srcdir)/../include/$$i $(tooldir)/include/w32api/$$i ; \
- echo "#include <w32api/$$i>" > $(tooldir)/include/$$i ; \
- done
-
-# uninstall headers and libraries
-uninstall: uninstall-libraries uninstall-headers
-
-uninstall-libraries:
- @for i in $(LIBS); do \
- rm -f $(tooldir)/lib/$$i ; \
- done
-
-uninstall-headers:
- @for i in $(HEADERS); do \
- rm -f $(tooldir)/include/w32api/$$i ; \
- done
- rmdir $(tooldir)/include/w32api
-
-dist:
- mkdir $(distdir)/include
- chmod 755 $(distdir)/include
- @for i in $(HEADERS); do \
- cp -p $(srcdir)/../include/$$i $(distdir)/include/$$i ; \
- done
- mkdir $(distdir)/lib
- chmod 755 $(distdir)/lib
- @for i in $(DISTFILES); do \
- cp -p $(srcdir)/$$i $(distdir)/lib/$$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/advapi32.def b/winsup/w32api/lib/advapi32.def
deleted file mode 100644
index 7cceaa1de..000000000
--- a/winsup/w32api/lib/advapi32.def
+++ /dev/null
@@ -1,350 +0,0 @@
-LIBRARY "ADVAPI32.DLL"
-EXPORTS
-AbortSystemShutdownA@4
-AbortSystemShutdownW@4
-AccessCheck@32
-AccessCheckAndAuditAlarmA@44
-AccessCheckAndAuditAlarmW@44
-AddAccessAllowedAce@16
-AddAccessDeniedAce@16
-AddAce@20
-AddAuditAccessAce@24
-AdjustTokenGroups@24
-AdjustTokenPrivileges@24
-AllocateAndInitializeSid@44
-AllocateLocallyUniqueId@4
-AreAllAccessesGranted@8
-AreAnyAccessesGranted@8
-BackupEventLogA@8
-BackupEventLogW@8
-BuildExplicitAccessWithName@20
-BuildSecurityDescriptor@36
-BuildTrusteeWithName@8
-BuildTrusteeWithSid@8
-ChangeServiceConfigA@44
-ChangeServiceConfigW@44
-ClearEventLogA@8
-ClearEventLogW@8
-CloseEventLog@4
-CloseServiceHandle@4
-ControlService@12
-CopySid@12
-CreatePrivateObjectSecurity@24
-CreateProcessAsUserA@44
-CreateProcessAsUserW@44
-CreateServiceA@52
-CreateServiceW@52
-CryptAcquireContextA@20
-CryptAcquireContextW@20
-CryptCreateHash@20
-CryptDecrypt@24
-CryptDeriveKey@20
-CryptDestroyHash@4
-CryptDestroyKey@4
-CryptEncrypt@28
-CryptExportKey@24
-CryptGenKey@16
-CryptGenRandom@12
-CryptGetHashParam@20
-CryptGetKeyParam@20
-CryptGetProvParam@20
-CryptGetUserKey@12
-CryptHashData@16
-CryptHashSessionKey@12
-CryptImportKey@24
-CryptReleaseContext@8
-CryptSetHashParam@16
-CryptSetKeyParam@16
-CryptSetProvParam@16
-CryptSetProviderA@8
-CryptSetProviderW@8
-CryptSignHashA@24
-CryptSignHashW@24
-CryptVerifySignatureA@24
-CryptVerifySignatureW@24
-DeleteAce@8
-DeleteService@4
-DeregisterEventSource@4
-DestroyPrivateObjectSecurity@4
-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
-EnumDependentServicesA@24
-EnumDependentServicesW@24
-EnumServicesStatusA@32
-EnumServicesStatusW@32
-EqualPrefixSid@8
-EqualSid@8
-FindFirstFreeAce@8
-FreeSid@4
-GetAce@12
-GetAclInformation@16
-GetFileSecurityA@20
-GetFileSecurityW@20
-GetKernelObjectSecurity@20
-GetLengthSid@4
-GetNamedSecurityInfo@32
-GetNumberOfEventLogRecords@8
-GetOldestEventLogRecord@8
-GetPrivateObjectSecurity@20
-GetSecurityDescriptorControl@12
-GetSecurityDescriptorDacl@16
-GetSecurityDescriptorGroup@12
-GetSecurityDescriptorLength@4
-GetSecurityDescriptorOwner@12
-GetSecurityDescriptorSacl@16
-GetSecurityInfo@32
-GetServiceDisplayNameA@16
-GetServiceDisplayNameW@16
-GetServiceKeyNameA@16
-GetServiceKeyNameW@16
-GetSidIdentifierAuthority@4
-GetSidLengthRequired@4
-GetSidSubAuthority@8
-GetSidSubAuthorityCount@4
-GetTokenInformation@20
-GetTrusteeForm@4
-GetTrusteeName@4
-GetTrusteeType@4
-GetUserNameA@8
-GetUserNameW@8
-I_ScSetServiceBitsA@20
-I_ScSetServiceBitsW@20
-ImpersonateLoggedOnUser@4
-ImpersonateNamedPipeClient@4
-ImpersonateSelf@4
-InitializeAcl@12
-InitializeSecurityDescriptor@8
-InitializeSid@12
-InitiateSystemShutdownA@20
-InitiateSystemShutdownW@20
-IsTextUnicode@12
-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
-LookupSecurityDescriptorParts@28
-LsaAddAccountRights@16
-LsaAddPrivilegesToAccount@8
-LsaClearAuditLog@4
-LsaClose@4
-LsaCreateAccount@16
-LsaCreateSecret@16
-LsaCreateTrustedDomain@16
-LsaDelete@4
-LsaDeleteTrustedDomain@8
-LsaEnumerateAccountRights@16
-LsaEnumerateAccounts@20
-LsaEnumerateAccountsWithUserRight@16
-LsaEnumeratePrivileges@20
-LsaEnumeratePrivilegesOfAccount@8
-LsaEnumerateTrustedDomains@20
-LsaFreeMemory@4
-LsaGetQuotasForAccount@8
-LsaGetSystemAccessAccount@8
-LsaICLookupNames@28
-LsaICLookupSids@28
-LsaLookupNames@20
-LsaLookupPrivilegeDisplayName@16
-LsaLookupPrivilegeName@12
-LsaLookupPrivilegeValue@12
-LsaLookupSids@20
-LsaNtStatusToWinError@4
-LsaOpenAccount@16
-LsaOpenPolicy@16
-LsaOpenSecret@16
-LsaOpenTrustedDomain@16
-LsaQueryInfoTrustedDomain@12
-LsaQueryInformationPolicy@12
-LsaQuerySecret@20
-LsaQuerySecurityObject@12
-LsaQueryTrustedDomainInfo@16
-LsaRemoveAccountRights@20
-LsaRemovePrivilegesFromAccount@12
-LsaRetrievePrivateData@12
-LsaSetInformationPolicy@12
-LsaSetInformationTrustedDomain@12
-LsaSetQuotasForAccount@8
-LsaSetSecret@12
-LsaSetSecurityObject@12
-LsaSetSystemAccessAccount@8
-LsaSetTrustedDomainInformation@16
-LsaStorePrivateData@12
-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
-OpenEventLogA@8
-OpenEventLogW@8
-OpenProcessToken@12
-OpenSCManagerA@12
-OpenSCManagerW@12
-OpenServiceA@12
-OpenServiceW@12
-OpenThreadToken@16
-PrivilegeCheck@12
-PrivilegedServiceAuditAlarmA@20
-PrivilegedServiceAuditAlarmW@20
-QueryServiceConfigA@16
-QueryServiceConfigW@16
-QueryServiceLockStatusA@16
-QueryServiceLockStatusW@16
-QueryServiceObjectSecurity@20
-QueryServiceStatus@8
-QueryWindows31FilesMigration@4
-ReadEventLogA@28
-ReadEventLogW@28
-RegCloseKey@4
-RegConnectRegistryA@12
-RegConnectRegistryW@12
-RegCreateKeyA@12
-RegCreateKeyExA@36
-RegCreateKeyExW@36
-RegCreateKeyW@12
-RegDeleteKeyA@8
-RegDeleteKeyW@8
-RegDeleteValueA@8
-RegDeleteValueW@8
-RegEnumKeyA@16
-RegEnumKeyExA@32
-RegEnumKeyExW@32
-RegEnumKeyW@16
-RegEnumValueA@32
-RegEnumValueW@32
-RegFlushKey@4
-RegGetKeySecurity@16
-RegLoadKeyA@12
-RegLoadKeyW@12
-RegNotifyChangeKeyValue@20
-RegOpenKeyA@12
-RegOpenKeyExA@20
-RegOpenKeyExW@20
-RegOpenKeyW@12
-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
-RegisterServiceCtrlHandlerW@8
-ReportEventA@36
-ReportEventW@36
-RevertToSelf@0
-SetAclInformation@16
-SetEntriesInAcl@16
-SetFileSecurityA@12
-SetFileSecurityW@12
-SetKernelObjectSecurity@12
-SetNamedSecurityInfo@28
-SetPrivateObjectSecurity@20
-SetSecurityDescriptorDacl@16
-SetSecurityDescriptorGroup@12
-SetSecurityDescriptorOwner@12
-SetSecurityDescriptorSacl@16
-SetSecurityInfo@@28
-SetServiceBits@16
-SetServiceObjectSecurity@12
-SetServiceStatus@8
-SetThreadToken@8
-SetTokenInformation@16
-StartServiceA@12
-StartServiceCtrlDispatcherA@4
-StartServiceCtrlDispatcherW@4
-StartServiceW@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
-UnlockServiceDatabase@4
-WinLoadTrustProvider@4
-WinSubmitCertificate@4
-WinVerifyTrust@12
diff --git a/winsup/w32api/lib/cap.def b/winsup/w32api/lib/cap.def
deleted file mode 100644
index f34d9f7e7..000000000
--- 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/comctl32.def b/winsup/w32api/lib/comctl32.def
deleted file mode 100644
index f61ac3831..000000000
--- a/winsup/w32api/lib/comctl32.def
+++ /dev/null
@@ -1,128 +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_Create@20
-ImageList_Destroy@4
-ImageList_DragEnter@12
-ImageList_DragLeave@4
-ImageList_DragMove@8
-ImageList_DragShowNolock@4
-ImageList_Draw@24
-ImageList_DrawEx@40
-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_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
-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 49d94a79d..000000000
--- a/winsup/w32api/lib/comdlg32.def
+++ /dev/null
@@ -1,25 +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
-PrintDlgW@4
-ReplaceTextA@4
-ReplaceTextW@4
-WantArrows@16
-dwLBSubclass@16
-dwOKSubclass@16
diff --git a/winsup/w32api/lib/ctl3d32.def b/winsup/w32api/lib/ctl3d32.def
deleted file mode 100644
index 130c0a567..000000000
--- 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/d3dim.def b/winsup/w32api/lib/d3dim.def
deleted file mode 100644
index 3956d1552..000000000
--- a/winsup/w32api/lib/d3dim.def
+++ /dev/null
@@ -1,8 +0,0 @@
-; from DirectX 6.1
-LIBRARY "d3dim.dll"
-EXPORTS
-Direct3DCreate@12
-Direct3D_HALCleanUp@8
-SpanInit
-g_fOneMinusEps
-g_fTwoPow31
diff --git a/winsup/w32api/lib/d3drm.def b/winsup/w32api/lib/d3drm.def
deleted file mode 100644
index f55c4fd63..000000000
--- a/winsup/w32api/lib/d3drm.def
+++ /dev/null
@@ -1,24 +0,0 @@
-; from DirectX 6.1
-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/d3dxof.def b/winsup/w32api/lib/d3dxof.def
deleted file mode 100644
index d12e2048b..000000000
--- a/winsup/w32api/lib/d3dxof.def
+++ /dev/null
@@ -1,4 +0,0 @@
-; from DirectX 6.1
-LIBRARY "d3dxof.dll"
-EXPORTS
-DirectXFileCreate@4
diff --git a/winsup/w32api/lib/ddraw.def b/winsup/w32api/lib/ddraw.def
deleted file mode 100644
index ea49045c1..000000000
--- a/winsup/w32api/lib/ddraw.def
+++ /dev/null
@@ -1,28 +0,0 @@
-; from DirectX 6.1
-LIBRARY "DDRAW.dll"
-EXPORTS
-D3DParseUnknownCommand@8
-DDHAL32_VidMemAlloc@16
-DDHAL32_VidMemFree@12
-DDInternalLock@8
-DDInternalUnlock@4
-DSoundHelp@12
-DirectDrawCreate@12
-DirectDrawCreateClipper@12
-DirectDrawEnumerateA@8
-DirectDrawEnumerateExA@12
-DirectDrawEnumerateExW@12
-DirectDrawEnumerateW@8
-GetAliasedVidMem
-GetNextMipMap
-GetSurfaceFromDC@12
-HeapVidMemAllocAligned@20
-InternalLock
-InternalUnlock
-LateAllocateSurfaceMem@16
-VidMemAlloc@12
-VidMemAmountFree@4
-VidMemFini@4
-VidMemFree@8
-VidMemInit@20
-VidMemLargestFree@4
diff --git a/winsup/w32api/lib/dinput.c b/winsup/w32api/lib/dinput.c
deleted file mode 100644
index 16580fbd6..000000000
--- a/winsup/w32api/lib/dinput.c
+++ /dev/null
@@ -1,2488 +0,0 @@
-/*
- DINPUT.C
-
- Author: Daniel Guerrero Miralles (daguer@geocities.com)
- Version: 1.1.2
- Date: 12/98
-
- ABSTRACT:
- DirectInput library static data source code. For DirectX 6.1 and
- earlier versions.
-
- LEGAL INFORMATION:
- This is PUBLIC DOMAIN source code. The source code in this file is
- provided "as is", without any warranty, including but not limited to,
- fitness for any particular purpose.
-
- REMARKS:
- - Fixed bug in c_dfDIMouse definition.
-
- TODO:
- Nothing.
-*/
-
-#if defined(__LCC__) || defined(__GNUC__)
-#include <windows.h>
-#include <objbase.h>
-#else
-#include <basetyps.h>
-#endif
-
-/* --- Types and constants --- */
-
-typedef struct DIOBJECTDATAFORMAT_TAG
-{
- const GUID * pguid;
- DWORD dwOfw;
- DWORD dwType;
- DWORD dwFlags;
-} DIOBJECTDATAFORMAT;
-
-typedef struct DIDATAFORMAT_TAG {
- DWORD dwSize;
- DWORD dwObjSize;
- DWORD dwFlags;
- DWORD dwDataSize;
- DWORD dwNumObjs;
- DIOBJECTDATAFORMAT * rgodf;
-} DIDATAFORMAT;
-
-#define DIDF_ABSAXIS 1L
-#define DIDF_RELAXIS 2L
-#define DIDFT_AXIS 3L
-#define DIDFT_BUTTON 12L
-#define DIDFT_POV 16L
-#define DIDFT_MAKEINSTANCE(x) ((WORD)(x)<<8)
-#define DIDFT_ANYINSTANCE (DIDFT_MAKEINSTANCE(-1))
-#define DIDOI_ASPECTPOSITION (1L<<8)
-#define DIDOI_ASPECTVELOCITY (2L<<8)
-#define DIDOI_ASPECTACCEL (3L<<8)
-#define DIDOI_ASPECTFORCE (4L<<8)
-
-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;
-
-/* --- Static data --- */
-
-static DIOBJECTDATAFORMAT diodfKeyData[] =
-{
- {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 0,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 1,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(1),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 2,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(2),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 3,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(3),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 4,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(4),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 5,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(5),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 6,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(6),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 7,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(7),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 8,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(8),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 9,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(9),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 10,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(10),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 11,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(11),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 12,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(12),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 13,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(13),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 14,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(14),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 15,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(15),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 16,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(16),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 17,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(17),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 18,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(18),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 19,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(19),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 20,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(20),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 21,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(21),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 22,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(22),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 23,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(23),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 24,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(24),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 25,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(25),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 26,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(26),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 27,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(27),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 28,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(28),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 29,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(29),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 30,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(30),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 31,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(31),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 32,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(32),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 33,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(33),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 34,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(34),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 35,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(35),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 36,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(36),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 37,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(37),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 38,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(38),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 39,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(39),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 40,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(40),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 41,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(41),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 42,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(42),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 43,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(43),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 44,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(44),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 45,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(45),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 46,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(46),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 47,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(47),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 48,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(48),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 49,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(49),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 50,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(50),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 51,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(51),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 52,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(52),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 53,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(53),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 54,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(54),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 55,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(55),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 56,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(56),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 57,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(57),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 58,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(58),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 59,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(59),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 60,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(60),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 61,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(61),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 62,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(62),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 63,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(63),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 64,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(64),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 65,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(65),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 66,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(66),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 67,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(67),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 68,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(68),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 69,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(69),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 70,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(70),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 71,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(71),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 72,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(72),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 73,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(73),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 74,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(74),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 75,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(75),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 76,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(76),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 77,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(77),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 78,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(78),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 79,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(79),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 80,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(80),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 81,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(81),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 82,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(82),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 83,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(83),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 84,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(84),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 85,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(85),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 86,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(86),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 87,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(87),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 88,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(88),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 89,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(89),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 90,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(90),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 91,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(91),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 92,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(92),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 93,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(93),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 94,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(94),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 95,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(95),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 96,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(96),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 97,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(97),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 98,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(98),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 99,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(99),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 100,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(100),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 101,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(101),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 102,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(102),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 103,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(103),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 104,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(104),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 105,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(105),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 106,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(106),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 107,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(107),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 108,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(108),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 109,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(109),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 110,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(110),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 111,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(111),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 112,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(112),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 113,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(113),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 114,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(114),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 115,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(115),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 116,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(116),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 117,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(117),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 118,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(118),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 119,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(119),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 120,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(120),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 121,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(121),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 122,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(122),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 123,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(123),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 124,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(124),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 125,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(125),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 126,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(126),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 127,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(127),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 128,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(128),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 129,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(129),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 130,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(130),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 131,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(131),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 132,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(132),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 133,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(133),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 134,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(134),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 135,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(135),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 136,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(136),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 137,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(137),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 138,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(138),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 139,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(139),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 140,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(140),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 141,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(141),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 142,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(142),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 143,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(143),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 144,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(144),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 145,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(145),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 146,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(146),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 147,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(147),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 148,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(148),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 149,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(149),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 150,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(150),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 151,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(151),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 152,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(152),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 153,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(153),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 154,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(154),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 155,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(155),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 156,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(156),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 157,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(157),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 158,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(158),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 159,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(159),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 160,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(160),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 161,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(161),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 162,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(162),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 163,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(163),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 164,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(164),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 165,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(165),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 166,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(166),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 167,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(167),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 168,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(168),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 169,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(169),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 170,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(170),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 171,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(171),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 172,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(172),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 173,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(173),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 174,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(174),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 175,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(175),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 176,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(176),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 177,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(177),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 178,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(178),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 179,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(179),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 180,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(180),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 181,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(181),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 182,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(182),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 183,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(183),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 184,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(184),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 185,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(185),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 186,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(186),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 187,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(187),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 188,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(188),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 189,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(189),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 190,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(190),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 191,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(191),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 192,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(192),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 193,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(193),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 194,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(194),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 195,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(195),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 196,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(196),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 197,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(197),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 198,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(198),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 199,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(199),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 200,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(200),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 201,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(201),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 202,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(202),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 203,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(203),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 204,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(204),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 205,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(205),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 206,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(206),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 207,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(207),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 208,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(208),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 209,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(209),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 210,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(210),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 211,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(211),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 212,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(212),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 213,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(213),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 214,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(214),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 215,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(215),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 216,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(216),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 217,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(217),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 218,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(218),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 219,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(219),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 220,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(220),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 221,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(221),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 222,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(222),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 223,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(223),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 224,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(224),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 225,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(225),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 226,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(226),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 227,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(227),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 228,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(228),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 229,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(229),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 230,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(230),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 231,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(231),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 232,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(232),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 233,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(233),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 234,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(234),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 235,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(235),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 236,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(236),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 237,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(237),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 238,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(238),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 239,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(239),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 240,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(240),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 241,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(241),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 242,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(242),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 243,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(243),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 244,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(244),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 245,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(245),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 246,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(246),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 247,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(247),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 248,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(248),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 249,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(249),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 250,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(250),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 251,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(251),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 252,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(252),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 253,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(253),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 254,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(254),
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_Key,
- /* dwOfw = */ 255,
- /* dwType = */ 0x80000000|DIDFT_BUTTON|DIDFT_MAKEINSTANCE(255),
- /* dwFlags = */ 0
- }
-};
-
-static DIOBJECTDATAFORMAT diodfJoyData[] =
-{
- {
- /* pguid = */ &GUID_XAxis,
- /* dwOfw = */ 0,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTPOSITION
- }, {
- /* pguid = */ &GUID_YAxis,
- /* dwOfw = */ 4,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTPOSITION
- }, {
- /* pguid = */ &GUID_ZAxis,
- /* dwOfw = */ 8,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTPOSITION
- }, {
- /* pguid = */ &GUID_RxAxis,
- /* dwOfw = */ 12,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTPOSITION
- }, {
- /* pguid = */ &GUID_RyAxis,
- /* dwOfw = */ 16,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTPOSITION
- }, {
- /* pguid = */ &GUID_RzAxis,
- /* dwOfw = */ 20,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTPOSITION
- }, {
- /* pguid = */ &GUID_Slider,
- /* dwOfw = */ 24,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTPOSITION
- }, {
- /* pguid = */ &GUID_Slider,
- /* dwOfw = */ 28,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTPOSITION
- }, {
- /* pguid = */ &GUID_POV,
- /* dwOfw = */ 32,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_POV,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_POV,
- /* dwOfw = */ 36,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_POV,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_POV,
- /* dwOfw = */ 40,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_POV,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_POV,
- /* dwOfw = */ 44,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_POV,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 48,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 49,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 50,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 51,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 52,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 53,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 54,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 55,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 56,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 57,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 58,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 59,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 60,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 61,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 62,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 63,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 64,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 65,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 66,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 67,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 68,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 69,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 70,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 71,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 72,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 73,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 74,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 75,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 76,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 77,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 78,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 79,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }
-};
-
-static DIOBJECTDATAFORMAT diodfJoy2Data[] =
-{
- {
- /* pguid = */ &GUID_XAxis,
- /* dwOfw = */ 0,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTPOSITION
- }, {
- /* pguid = */ &GUID_YAxis,
- /* dwOfw = */ 4,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTPOSITION
- }, {
- /* pguid = */ &GUID_ZAxis,
- /* dwOfw = */ 8,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTPOSITION
- }, {
- /* pguid = */ &GUID_RxAxis,
- /* dwOfw = */ 12,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTPOSITION
- }, {
- /* pguid = */ &GUID_RyAxis,
- /* dwOfw = */ 16,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTPOSITION
- }, {
- /* pguid = */ &GUID_RzAxis,
- /* dwOfw = */ 20,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTPOSITION
- }, {
- /* pguid = */ &GUID_Slider,
- /* dwOfw = */ 24,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTPOSITION
- }, {
- /* pguid = */ &GUID_Slider,
- /* dwOfw = */ 28,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTPOSITION
- }, {
- /* pguid = */ &GUID_POV,
- /* dwOfw = */ 32,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_POV,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_POV,
- /* dwOfw = */ 36,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_POV,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_POV,
- /* dwOfw = */ 40,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_POV,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_POV,
- /* dwOfw = */ 44,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_POV,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 48,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 49,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 50,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 51,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 52,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 53,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 54,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 55,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 56,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 57,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 58,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 59,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 60,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 61,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 62,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 63,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 64,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 65,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 66,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 67,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 68,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 69,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 70,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 71,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 72,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 73,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 74,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 75,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 76,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 77,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 78,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 79,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 80,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 81,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 82,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 83,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 84,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 85,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 86,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 87,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 88,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 89,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 90,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 91,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 92,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 93,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 94,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 95,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 96,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 97,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 98,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 99,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 100,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 101,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 102,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 103,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 104,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 105,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 106,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 107,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 108,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 109,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 110,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 111,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 112,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 113,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 114,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 115,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 116,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 117,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 118,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 119,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 120,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 121,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 122,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 123,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 124,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 125,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 126,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 127,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 128,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 129,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 130,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 131,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 132,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 133,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 134,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 135,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 136,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 137,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 138,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 139,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 140,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 141,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 142,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 143,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 144,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 145,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 146,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 147,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 148,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 149,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 150,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 151,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 152,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 153,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 154,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 155,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 156,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 157,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 158,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 159,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 160,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 161,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 162,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 163,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 164,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 165,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 166,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 167,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 168,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 169,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 170,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 171,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 172,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 173,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 174,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 175,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_XAxis,
- /* dwOfw = */ 176,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTVELOCITY
- }, {
- /* pguid = */ &GUID_YAxis,
- /* dwOfw = */ 180,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTVELOCITY
- }, {
- /* pguid = */ &GUID_ZAxis,
- /* dwOfw = */ 184,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTVELOCITY
- }, {
- /* pguid = */ &GUID_RxAxis,
- /* dwOfw = */ 188,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTVELOCITY
- }, {
- /* pguid = */ &GUID_RyAxis,
- /* dwOfw = */ 192,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTVELOCITY
- }, {
- /* pguid = */ &GUID_RzAxis,
- /* dwOfw = */ 196,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTVELOCITY
- }, {
- /* pguid = */ &GUID_Slider,
- /* dwOfw = */ 24,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTVELOCITY
- }, {
- /* pguid = */ &GUID_Slider,
- /* dwOfw = */ 28,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTVELOCITY
- }, {
- /* pguid = */ &GUID_XAxis,
- /* dwOfw = */ 208,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTACCEL
- }, {
- /* pguid = */ &GUID_YAxis,
- /* dwOfw = */ 212,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTACCEL
- }, {
- /* pguid = */ &GUID_ZAxis,
- /* dwOfw = */ 216,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTACCEL
- }, {
- /* pguid = */ &GUID_RxAxis,
- /* dwOfw = */ 220,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTACCEL
- }, {
- /* pguid = */ &GUID_RyAxis,
- /* dwOfw = */ 224,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTACCEL
- }, {
- /* pguid = */ &GUID_RzAxis,
- /* dwOfw = */ 228,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTACCEL
- }, {
- /* pguid = */ &GUID_Slider,
- /* dwOfw = */ 24,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTACCEL
- }, {
- /* pguid = */ &GUID_Slider,
- /* dwOfw = */ 28,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTACCEL
- }, {
- /* pguid = */ &GUID_XAxis,
- /* dwOfw = */ 240,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTFORCE
- }, {
- /* pguid = */ &GUID_YAxis,
- /* dwOfw = */ 244,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTFORCE
- }, {
- /* pguid = */ &GUID_ZAxis,
- /* dwOfw = */ 248,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTFORCE
- }, {
- /* pguid = */ &GUID_RxAxis,
- /* dwOfw = */ 252,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTFORCE
- }, {
- /* pguid = */ &GUID_RyAxis,
- /* dwOfw = */ 256,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTFORCE
- }, {
- /* pguid = */ &GUID_RzAxis,
- /* dwOfw = */ 260,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTFORCE
- }, {
- /* pguid = */ &GUID_Slider,
- /* dwOfw = */ 24,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTFORCE
- }, {
- /* pguid = */ &GUID_Slider,
- /* dwOfw = */ 28,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ DIDOI_ASPECTFORCE
- }
-};
-
-static DIOBJECTDATAFORMAT diodfMouseData[] =
-{
- {
- /* pguid = */ &GUID_XAxis,
- /* dwOfw = */ 0,
- /* dwType = */ DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_YAxis,
- /* dwOfw = */ 4,
- /* dwType = */ DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ &GUID_ZAxis,
- /* dwOfw = */ 8,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_AXIS,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 12,
- /* dwType = */ DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 13,
- /* dwType = */ DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 14,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }, {
- /* pguid = */ NULL,
- /* dwOfw = */ 15,
- /* dwType = */ 0x80000000|DIDFT_ANYINSTANCE|DIDFT_BUTTON,
- /* dwFlags = */ 0
- }
-};
-
-/* --- Library global variables --- */
-
-const DIDATAFORMAT c_dfDIKeyboard =
-{
- /* dwSize = */ 24,
- /* dwObjSize = */ 16,
- /* dwFlags = */ DIDF_RELAXIS,
- /* dwDataSize = */ 256,
- /* dwNumObjs = */ 256,
- /* rgodf = */ &diodfKeyData[0]
-};
-
-const DIDATAFORMAT c_dfDIJoystick =
-{
- /* dwSize = */ 24,
- /* dwObjSize = */ 16,
- /* dwFlags = */ DIDF_ABSAXIS,
- /* dwDataSize = */ 80,
- /* dwNumObjs = */ 44,
- /* rgodf = */ &diodfJoyData[0]
-};
-
-const DIDATAFORMAT c_dfDIJoystick2 = {
- /* dwSize = */ 24,
- /* dwObjSize = */ 16,
- /* dwFlags = */ DIDF_ABSAXIS,
- /* dwDataSize = */ 272,
- /* dwNumObjs = */ 164,
- /* rgodf = */ &diodfJoy2Data[0]
-};
-
-const DIDATAFORMAT c_dfDIMouse =
-{
- /* dwSize = */ 24,
- /* dwObjSize = */ 16,
- /* dwFlags = */ DIDF_RELAXIS,
- /* dwDataSize = */ 16,
- /* dwNumObjs = */ 7,
- /* rgodf = */ &diodfMouseData[0]
-};
diff --git a/winsup/w32api/lib/dinput.def b/winsup/w32api/lib/dinput.def
deleted file mode 100644
index fe7d2d498..000000000
--- a/winsup/w32api/lib/dinput.def
+++ /dev/null
@@ -1,5 +0,0 @@
-; from DirectX 6.1
-LIBRARY "DINPUT.dll"
-EXPORTS
-DirectInputCreateA@16
-DirectInputCreateW@16
diff --git a/winsup/w32api/lib/dlcapi.def b/winsup/w32api/lib/dlcapi.def
deleted file mode 100644
index 501ecd766..000000000
--- 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/dplayx.def b/winsup/w32api/lib/dplayx.def
deleted file mode 100644
index 058e00db7..000000000
--- a/winsup/w32api/lib/dplayx.def
+++ /dev/null
@@ -1,10 +0,0 @@
-; from DirectX 6.1
-LIBRARY "DPLAYX.dll"
-EXPORTS
-DirectPlayCreate@12
-DirectPlayEnumerate@8
-DirectPlayEnumerateA@8
-DirectPlayEnumerateW@8
-DirectPlayLobbyCreateA@20
-DirectPlayLobbyCreateW@20
-gdwDPlaySPRefCount
diff --git a/winsup/w32api/lib/dsetup.def b/winsup/w32api/lib/dsetup.def
deleted file mode 100644
index b417432ca..000000000
--- a/winsup/w32api/lib/dsetup.def
+++ /dev/null
@@ -1,18 +0,0 @@
-; from DirectX 6.1
-LIBRARY "DSETUP.dll"
-EXPORTS
-DirectXDeviceDriverSetupA@16
-DirectXDeviceDriverSetupW@16
-DirectXLoadString@12
-DirectXRegisterApplicationA@8
-DirectXRegisterApplicationW@8
-DirectXSetupA@12
-DirectXSetupCallback@20
-DirectXSetupGetFileVersion
-DirectXSetupGetVersion@8
-DirectXSetupIsEng@0
-DirectXSetupIsJapan@0
-DirectXSetupIsJapanNec@0
-DirectXSetupSetCallback@4
-DirectXSetupW@12
-DirectXUnRegisterApplication@8
diff --git a/winsup/w32api/lib/dsound.def b/winsup/w32api/lib/dsound.def
deleted file mode 100644
index 68ebdf6f6..000000000
--- a/winsup/w32api/lib/dsound.def
+++ /dev/null
@@ -1,9 +0,0 @@
-; from DirectX 6.1
-LIBRARY "DSOUND.dll"
-EXPORTS
-DirectSoundCaptureCreate@12
-DirectSoundCaptureEnumerateA@8
-DirectSoundCaptureEnumerateW@8
-DirectSoundCreate@12
-DirectSoundEnumerateA@8
-DirectSoundEnumerateW@8
diff --git a/winsup/w32api/lib/dxguid.c b/winsup/w32api/lib/dxguid.c
deleted file mode 100644
index 5dd50328e..000000000
--- a/winsup/w32api/lib/dxguid.c
+++ /dev/null
@@ -1,461 +0,0 @@
-/*
- DXGUID.C
-
- Author: Daniel Guerrero Miralles (daguer@geocities.com)
- Version: 1.0.0
- Date: April 27, 1999
-
- ABSTRACT:
- Source code to generate a library with DirectX GUIDs. For DirectX 6.1
- and earlier versions.
-
- LEGAL INFORMATION:
- This is PUBLIC DOMAIN source code. The source code in this file is
- provided "as is", without any warranty, including but not limited to,
- fitness for any particular purpose.
-
- REMARKS:
- - This file may have more GUIDs than the original one. It was made by
- recollecting GUIDs defined in the DirectX header files.
-
- TODO:
- Nothing.
-*/
-
-#if defined(__LCC__) || defined(__GNUC__)
-#define INITGUID 1
-#include <windows.h>
-#include <objbase.h>
-#else
-#include <basetyps.h>
-#endif
-
-/////////////////////////////////////////////////////////////////////
-// File D3D.H:
-/////////////////////////////////////////////////////////////////////
-
-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_IDirect3DRampDevice,0xF2086B20,0x259F,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
-DEFINE_GUID(IID_IDirect3DRGBDevice,0xA4665C60,0x2673,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
-DEFINE_GUID(IID_IDirect3DHALDevice,0x84E63dE0,0x46AA,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
-DEFINE_GUID(IID_IDirect3DMMXDevice,0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29);
-DEFINE_GUID(IID_IDirect3DRefDevice,0x50936643,0x13e9,0x11d1,0x89,0xaa,0x0,0xa0,0xc9,0x5,0x41,0x29);
-DEFINE_GUID(IID_IDirect3DNullDevice,0x8767df22,0xbacc,0x11d1,0x89,0x69,0x0,0xa0,0xc9,0x6,0x29,0xa8);
-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_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_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_IDirect3DExecuteBuffer,0x4417C145,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
-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_IDirect3DVertexBuffer,0x7a503555,0x4a83,0x11d1,0xa5,0xdb,0x0,0xa0,0xc9,0x3,0x67,0xf8);
-
-/////////////////////////////////////////////////////////////////////
-// File D3DRM.H:
-/////////////////////////////////////////////////////////////////////
-
-
-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(CLSID_CDirect3DRM,0x4516ec41,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3);
-
-/////////////////////////////////////////////////////////////////////
-// File D3DRMOBJ.H:
-/////////////////////////////////////////////////////////////////////
-
-DEFINE_GUID(CLSID_CDirect3DRMDevice,0x4fa3568e,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_CDirect3DRMFrame,0x4fa35690,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-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_CDirect3DRMFace,0x4fa35693,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(CLSID_CDirect3DRMLight,0x4fa35694,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_CDirect3DRMWrap,0x4fa35696,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(CLSID_CDirect3DRMMaterial,0x4fa35697,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-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_CDirect3DRMUserVisual,0x4fa3569a,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(CLSID_CDirect3DRMShadow,0x4fa3569b,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_CDirect3DRMFrameInterpolator,0xde9eaa2,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(CLSID_CDirect3DRMMeshInterpolator,0xde9eaa3,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(CLSID_CDirect3DRMLightInterpolator,0xde9eaa6,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(CLSID_CDirect3DRMMaterialInterpolator,0xde9eaa7,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(CLSID_CDirect3DRMTextureInterpolator,0xde9eaa8,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(CLSID_CDirect3DRMProgressiveMesh,0x4516ec40,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(CLSID_CDirect3DRMClippedVisual,0x5434e72d,0x6d66,0x11d1,0xbb,0xb,0x0,0x0,0xf8,0x75,0x86,0x5a);
-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_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_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_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_IDirect3DRMVisual,0xeb16cb04,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-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_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_IDirect3DRMLight,0xeb16cb08,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-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_IDirect3DRMWrap,0xeb16cb0a,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_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_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_IDirect3DRMObjectArray,0x242f6bc2,0x3849,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(IID_IDirect3DRMDeviceArray,0xeb16cb10,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMViewportArray,0xeb16cb11,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMFrameArray,0xeb16cb12,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_IDirect3DRMLightArray,0xeb16cb14,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMPickedArray,0xeb16cb16,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMFaceArray,0xeb16cb17,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMAnimationArray,0xd5f1cae0,0x4bd7,0x11d1,0xb9,0x74,0x0,0x60,0x8,0x3e,0x45,0xf3);
-DEFINE_GUID(IID_IDirect3DRMUserVisual,0x59163de0,0x6d43,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-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_IDirect3DRMInterpolator,0x242f6bc1,0x3849,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(IID_IDirect3DRMProgressiveMesh,0x4516ec79,0x8f20,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_IDirect3DRMClippedVisual,0x5434e733,0x6d66,0x11d1,0xbb,0xb,0x0,0x0,0xf8,0x75,0x86,0x5a);
-
-/////////////////////////////////////////////////////////////////////
-// File D3DRMWIN.H:
-/////////////////////////////////////////////////////////////////////
-
-DEFINE_GUID(IID_IDirect3DRMWinDevice,0xc5016cc0,0xd273,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-
-/////////////////////////////////////////////////////////////////////
-// File DDRAW.H:
-/////////////////////////////////////////////////////////////////////
-
-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(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_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_IDirectDrawPalette,0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
-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_IDirectDrawGammaControl,0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E);
-
-/////////////////////////////////////////////////////////////////////
-// File DINPUT.H:
-/////////////////////////////////////////////////////////////////////
-
-DEFINE_GUID(CLSID_DirectInput,0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(CLSID_DirectInputDevice,0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectInputA,0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectInputW,0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-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_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_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_IDirectInputEffect,0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-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_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_Slider,0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_Button,0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_Key,0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_POV,0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_Unknown,0xA36D02F3,0xC9F3,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_SysKeyboard,0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_Joystick,0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_ConstantForce,0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-DEFINE_GUID(GUID_RampForce,0x13541C21,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_Sine,0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-DEFINE_GUID(GUID_Triangle,0x13541C24,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_SawtoothDown,0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-DEFINE_GUID(GUID_Spring,0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-DEFINE_GUID(GUID_Damper,0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-DEFINE_GUID(GUID_Inertia,0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
-DEFINE_GUID(GUID_Friction,0x13541C2A,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);
-
-/////////////////////////////////////////////////////////////////////
-// File DMKSCTRL.H:
-/////////////////////////////////////////////////////////////////////
-
-DEFINE_GUID(IID_IKsControl,0x28F54685,0x06FD,0x11D2,0xB2,0x7A,0x00,0xA0,0xC9,0x22,0x31,0x96);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_MIDI,0x1D262760L,0xE957,0x11CF,0xA5,0xD6,0x28,0xDB,0x04,0xC1,0x00,0x00);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_DIRECTMUSIC,0x1a82f8bc,0x3f8b,0x11d2,0xb7,0x74,0x00,0x60,0x08,0x33,0x16,0xc1);
-
-/////////////////////////////////////////////////////////////////////
-// File DMUSICC.H:
-/////////////////////////////////////////////////////////////////////
-
-DEFINE_GUID(IID_IReferenceClock,0x56a86897,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(CLSID_DirectMusic,0x636b9f10,0x0c7d,0x11d1,0x95,0xb2,0x00,0x20,0xaf,0xdc,0x74,0x21);
-DEFINE_GUID(CLSID_DirectMusicCollection,0x480ff4b0,0x28b2,0x11d1,0xbe,0xf7,0x0,0xc0,0x4f,0xbf,0x8f,0xef);
-DEFINE_GUID(CLSID_DirectMusicSynth,0x58C2B4D0,0x46E7,0x11D1,0x89,0xAC,0x00,0xA0,0xC9,0x05,0x41,0x29);
-DEFINE_GUID(IID_IDirectMusic,0x6536115a,0x7b2d,0x11d2,0xba,0x18,0x00,0x00,0xf8,0x75,0xac,0x12);
-DEFINE_GUID(IID_IDirectMusicBuffer,0xd2ac2878,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicPort,0x08f2d8c9,0x37c2,0x11d2,0xb9,0xf9,0x00,0x00,0xf8,0x75,0xac,0x12);
-DEFINE_GUID(IID_IDirectMusicThru,0xced153e7,0x3606,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_IDirectMusicDownload,0xd2ac287b,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_IDirectMusicInstrument,0xd2ac287d,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(GUID_DMUS_PROP_GM_Hardware,0x178f2f24,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
-DEFINE_GUID(GUID_DMUS_PROP_GS_Hardware,0x178f2f25,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
-DEFINE_GUID(GUID_DMUS_PROP_XG_Hardware,0x178f2f26,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
-DEFINE_GUID(GUID_DMUS_PROP_XG_Capable,0x6496aba1,0x61b0,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
-DEFINE_GUID(GUID_DMUS_PROP_GS_Capable,0x6496aba2,0x61b0,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
-DEFINE_GUID(GUID_DMUS_PROP_DLS1,0x178f2f27,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
-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_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_MemorySize,0x178f2f28,0xc364,0x11d1,0xa7,0x60,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_Effects,0xcda8d611,0x684a,0x11d2,0x87,0x1e,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_Volume,0xfedfae25L,0xe46e,0x11d1,0xaa,0xce,0x00,0x00,0xf8,0x75,0xac,0x12);
-
-/////////////////////////////////////////////////////////////////////
-// File DMUSICI.H:
-/////////////////////////////////////////////////////////////////////
-
-DEFINE_GUID(CLSID_DirectMusicPerformance,0xd2ac2881,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-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_DirectMusicGraph,0xd2ac2884,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_DirectMusicSeqTrack,0xd2ac2886,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicSysExTrack,0xd2ac2887,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_DirectMusicStyle,0xd2ac288a,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_DirectMusicCommandTrack,0xd2ac288c,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_DirectMusicMotifTrack,0xd2ac288e,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_DirectMusicComposer,0xd2ac2890,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_DirectMusicLoader,0xd2ac2892,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicBandTrack,0xd2ac2894,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicBand,0x79ba9e00,0xb6ee,0x11d1,0x86,0xbe,0x0,0xc0,0x4f,0xbf,0x8f,0xef);
-DEFINE_GUID(CLSID_DirectMusicChordMapTrack,0xd2ac2896,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(GUID_DirectMusicAllTypes,0xd2ac2893,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_NOTIFICATION_SEGMENT,0xd2ac2899,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_MEASUREANDBEAT,0xd2ac289a,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_COMMAND,0xd2ac289c,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_CommandParam,0xd2ac289d,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_ChordParam,0xd2ac289e,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_RhythmParam,0xd2ac289f,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_TimeSignature,0xd2ac28a4,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_TempoParam,0xd2ac28a5,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_MuteParam,0xd2ac28af,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_Download,0xd2ac28a7,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_Unload,0xd2ac28a8,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_ConnectToDLSCollection,0x1db1ae6b,0xe92e,0x11d1,0xa8,0xc5,0x0,0xc0,0x4f,0xa3,0x72,0x6e);
-DEFINE_GUID(GUID_Enable_Auto_Download,0xd2ac28a9,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_Clear_All_Bands,0xd2ac28ab,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_StandardMIDIFile,0x6621075,0xe92e,0x11d1,0xa8,0xc5,0x0,0xc0,0x4f,0xa3,0x72,0x6e);
-DEFINE_GUID(GUID_DisableTimeSig,0x45fc707b,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_DisableTempo,0x45fc707d,0x1db4,0x11d2,0xbc,0xac,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
-DEFINE_GUID(GUID_EnableTempo,0x45fc707e,0x1db4,0x11d2,0xbc,0xac,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
-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_PerfMasterGrooveLevel,0xd2ac28b2,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_PerfAutoDownload,0xfb09565b,0x3631,0x11d2,0xbc,0xb8,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
-DEFINE_GUID(GUID_DefaultGMCollection,0xf17e8673,0xc3b4,0x11d1,0x87,0xb,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicLoader,0x2ffaaca2,0x5dca,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
-DEFINE_GUID(IID_IDirectMusicGetLoader,0x68a04844,0xd13d,0x11d1,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
-DEFINE_GUID(IID_IDirectMusicObject,0xd2ac28b5,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicSegment,0xf96029a2,0x4282,0x11d2,0x87,0x17,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicSegmentState,0xa3afdcc7,0xd3ee,0x11d1,0xbc,0x8d,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
-DEFINE_GUID(IID_IDirectMusicTrack,0xf96029a1,0x4282,0x11d2,0x87,0x17,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicPerformance,0x7d43d03,0x6523,0x11d2,0x87,0x1d,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicTool,0xd2ac28ba,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicGraph,0x2befc277,0x5497,0x11d2,0xbc,0xcb,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
-DEFINE_GUID(IID_IDirectMusicStyle,0xd2ac28bd,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicChordMap,0xd2ac28be,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_IDirectMusicBand,0xd2ac28c0,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-
-/////////////////////////////////////////////////////////////////////
-// File DPLAY.H:
-/////////////////////////////////////////////////////////////////////
-
-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(CLSID_DirectPlay,0xd1eb6d20,0x8923,0x11d0,0x9d,0x97,0x0,0xa0,0xc9,0xa,0x43,0xcb);
-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(IID_IDirectPlay,0x5454e9a0,0xdb65,0x11ce,0x92,0x1c,0x00,0xaa,0x00,0x6c,0x49,0x72);
-
-/////////////////////////////////////////////////////////////////////
-// File DPLOBBY.H:
-/////////////////////////////////////////////////////////////////////
-
-DEFINE_GUID(IID_IDirectPlayLobby,0xaf465c71,0x9588,0x11cf,0xa0,0x20,0x0,0xaa,0x0,0x61,0x57,0xac);
-DEFINE_GUID(IID_IDirectPlayLobbyA,0x26c66a70,0xb367,0x11cf,0xa0,0x24,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(CLSID_DirectPlayLobby,0x2fe8f810,0xb2a5,0x11d0,0xa7,0x87,0x0,0x0,0xf8,0x3,0xab,0xfc);
-DEFINE_GUID(DPLPROPERTY_MessagesSupported,0x762ccda1,0xd916,0x11d0,0xba,0x39,0x0,0xc0,0x4f,0xd7,0xed,0x67);
-DEFINE_GUID(DPLPROPERTY_LobbyGuid,0xf56920a0,0xd218,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(DPAID_TotalSize,0x1318f560,0x912c,0x11d0,0x9d,0xaa,0x0,0xa0,0xc9,0xa,0x43,0xcb);
-DEFINE_GUID(DPAID_ServiceProvider,0x7d916c0,0xe0af,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e);
-DEFINE_GUID(DPAID_LobbyProvider,0x59b95640,0x9667,0x11d0,0xa7,0x7d,0x0,0x0,0xf8,0x3,0xab,0xfc);
-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_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_INet,0xc4a54da0,0xe0af,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e);
-DEFINE_GUID(DPAID_INetW,0xe63232a0,0x9dbf,0x11d0,0x9c,0xc1,0x0,0xa0,0xc9,0x5,0x42,0x5e);
-DEFINE_GUID(DPAID_INetPort,0xe4524541,0x8ea5,0x11d1,0x8a,0x96,0x0,0x60,0x97,0xb0,0x14,0x11);
-DEFINE_GUID(DPAID_ComPort,0xf2f0ce00,0xe0af,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e);
-
-/////////////////////////////////////////////////////////////////////
-// File DSOUND.H:
-/////////////////////////////////////////////////////////////////////
-
-DEFINE_GUID(CLSID_DirectSound,0x47d4d946,0x62e8,0x11cf,0x93,0xbc,0x44,0x45,0x53,0x54,0x0,0x0);
-DEFINE_GUID(CLSID_DirectSoundCapture,0xb0210780,0x89cd,0x11d0,0xaf,0x8,0x0,0xa0,0xc9,0x25,0xcd,0x16);
-DEFINE_GUID(IID_IDirectSound,0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
-DEFINE_GUID(IID_IDirectSoundBuffer,0x279AFA85,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_IDirectSound3DBuffer,0x279AFA86,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
-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_IDirectSoundNotify,0xb0210783,0x89cd,0x11d0,0xaf,0x8,0x0,0xa0,0xc9,0x25,0xcd,0x16);
-DEFINE_GUID(IID_IKsPropertySet,0x31efac30,0x515c,0x11d0,0xa9,0xaa,0x00,0xaa,0x00,0x61,0xbe,0x93);
-
-/////////////////////////////////////////////////////////////////////
-// File DVP.H:
-/////////////////////////////////////////////////////////////////////
-
-DEFINE_GUID(IID_IDDVideoPortContainer,0x6C142760,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
-DEFINE_GUID(IID_IDirectDrawVideoPort,0xB36D93E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56);
-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_CCIR656,0xFCA326A0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
-DEFINE_GUID(DDVPTYPE_BROOKTREE,0x1352A560L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
-DEFINE_GUID(DDVPTYPE_PHILIPS,0x332CF160L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
-
-/////////////////////////////////////////////////////////////////////
-// File DXFILE.H:
-/////////////////////////////////////////////////////////////////////
-
-DEFINE_GUID(CLSID_CDirectXFile,0x4516ec43,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(IID_IDirectXFile,0x3d82ab40,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_IDirectXFileSaveObject,0x3d82ab42,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_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_IDirectXFileBinary,0x3d82ab46,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);
-
-/////////////////////////////////////////////////////////////////////
-// File RMXFGUID.H:
-/////////////////////////////////////////////////////////////////////
-
-DEFINE_GUID(TID_D3DRMInfo,0x2b957100,0x9e9a,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_D3DRMMesh,0x3d82ab44,0x62da,0x11cf,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_D3DRMMeshFace,0x3d82ab5f,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_D3DRMMaterial,0x3d82ab4d,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_D3DRMMaterialArray,0x35ff44e1,0x6c7c,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_D3DRMFrameTransformMatrix,0xf6f23f41,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMMeshMaterialList,0xf6f23f42,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_D3DRMMeshNormals,0xf6f23f43,0x7686,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_D3DRMMatrix4x4,0xf6f23f45,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMAnimation,0x3d82ab4f,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_D3DRMAnimationSet,0x3d82ab50,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_D3DRMFloatKeys,0x10dd46a9,0x775b,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xA3);
-DEFINE_GUID(TID_D3DRMMaterialAmbientColor,0x01411840,0x7786,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_D3DRMMaterialSpecularColor,0x01411842,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_D3DRMColorRGBA,0x35ff44e0,0x6c7c,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xA3);
-DEFINE_GUID(TID_D3DRMColorRGB,0xd3e16e81,0x7835,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_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_D3DRMIndexedColor,0x1630b820,0x7842,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_D3DRMMaterialWrap,0x4885ae60,0x78e8,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMBoolean,0x537da6a0,0xca37,0x11d0,0x94,0x1c,0x0,0x80,0xc8,0xc,0xfa,0x7b);
-DEFINE_GUID(TID_D3DRMMeshFaceWraps,0xed1ec5c0,0xc0a8,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_D3DRMTimedFloatKeys,0xf406b180,0x7b3b,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_D3DRMFramePosition,0xe2bf56c1,0x840f,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_D3DRMFrameRotation,0xe2bf56c3,0x840f,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMLight,0x3d82ab4a,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_D3DRMCamera,0x3d82ab51,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_D3DRMLightUmbra,0xaed22740,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_D3DRMLightPenumbra,0xaed22741,0xb31f,0x11cf,0x9d,0xd5,0x0,0xaa,0x0,0xa7,0x1a,0x2f);
-DEFINE_GUID(TID_D3DRMLightAttenuation,0xa8a98ba0,0xc5e5,0x11cf,0xb9,0x41,0x0,0x80,0xc8,0xc,0xfa,0x7b);
-DEFINE_GUID(TID_D3DRMInlineData,0x3a23eea0,0x94b1,0x11d0,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_D3DRMUrl,0x3a23eea1,0x94b1,0x11d0,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_D3DRMProgressiveMesh,0x8A63C360,0x997D,0x11d0,0x94,0x1C,0x0,0x80,0xC8,0x0C,0xFA,0x7B);
-DEFINE_GUID(TID_D3DRMExternalVisual,0x98116AA0,0xBDBA,0x11d1,0x82,0xC0,0x00,0xA0,0xC9,0x69,0x72,0x71);
-DEFINE_GUID(TID_D3DRMStringProperty,0x7f0f21e0,0xbfe1,0x11d1,0x82,0xc0,0x0,0xa0,0xc9,0x69,0x72,0x71);
-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);
diff --git a/winsup/w32api/lib/gdi32.def b/winsup/w32api/lib/gdi32.def
deleted file mode 100644
index d3b3d9c35..000000000
--- a/winsup/w32api/lib/gdi32.def
+++ /dev/null
@@ -1,334 +0,0 @@
-LIBRARY GDI32.dll
-EXPORTS
-AbortDoc@4
-AbortPath@4
-AddFontResourceA@4
-AddFontResourceW@4
-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
-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
-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
-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
-RemoveFontResourceA@4
-RemoveFontResourceW@4
-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
-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
diff --git a/winsup/w32api/lib/glaux.def b/winsup/w32api/lib/glaux.def
deleted file mode 100644
index 87f72371e..000000000
--- 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 d0f091fd1..000000000
--- 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/glut.def b/winsup/w32api/lib/glut.def
deleted file mode 100644
index 369ca5d14..000000000
--- a/winsup/w32api/lib/glut.def
+++ /dev/null
@@ -1,116 +0,0 @@
-LIBRARY glut.dll
-EXPORTS
-glutAddMenuEntry@8
-glutAddSubMenu@8
-glutAttachMenu@4
-glutBitmapCharacter@8
-glutBitmapLength@8
-glutBitmapWidth@8
-glutButtonBoxFunc@4
-glutChangeToMenuEntry@12
-glutChangeToSubMenu@12
-glutCopyColormap@4
-glutCreateMenu@4
-glutCreateSubWindow@20
-glutCreateWindow@4
-glutDestroyMenu@4
-glutDestroyWindow@4
-glutDetachMenu@4
-glutDeviceGet@4
-glutDialsFunc@4
-glutDisplayFunc@4
-glutEnterGameMode@0
-glutEntryFunc@4
-glutEstablishOverlay@0
-glutExtensionSupported@4
-glutForceJoystickFunc@0
-glutFullScreen@0
-glutGameModeGet@4
-glutGameModeString@4
-glutGet@4
-glutGetColor@8
-glutGetMenu@0
-glutGetModifiers@0
-glutGetWindow@0
-glutHideOverlay@0
-glutHideWindow@0
-glutIconifyWindow@0
-glutIdleFunc@4
-glutIgnoreKeyRepeat@4
-glutInit@8
-glutInitDisplayMode@4
-glutInitDisplayString@4
-glutInitWindowPosition@8
-glutInitWindowSize@8
-glutJoystickFunc@8
-glutKeyboardFunc@4
-glutKeyboardUpFunc@4
-glutLayerGet@4
-glutLeaveGameMode@0
-glutMainLoop@0
-glutMenuStateFunc@4
-glutMenuStatusFunc@4
-glutMotionFunc@4
-glutMouseFunc@4
-glutOverlayDisplayFunc@4
-glutPassiveMotionFunc@4
-glutPopWindow@0
-glutPositionWindow@8
-glutPostOverlayRedisplay@0
-glutPostRedisplay@0
-glutPostWindowOverlayRedisplay@4
-glutPostWindowRedisplay@4
-glutPushWindow@0
-glutRemoveMenuItem@4
-glutRemoveOverlay@0
-glutReportErrors@0
-glutReshapeFunc@4
-glutReshapeWindow@8
-glutSetColor@16
-glutSetCursor@4
-glutSetIconTitle@4
-glutSetKeyRepeat@4
-glutSetMenu@4
-glutSetWindow@4
-glutSetWindowTitle@4
-glutSetupVideoResizing@0
-glutShowOverlay@0
-glutShowWindow@0
-glutSolidCone@24
-glutSolidCube@8
-glutSolidDodecahedron@0
-glutSolidIcosahedron@0
-glutSolidOctahedron@0
-glutSolidSphere@16
-glutSolidTeapot@8
-glutSolidTetrahedron@0
-glutSolidTorus@24
-glutSpaceballButtonFunc@4
-glutSpaceballMotionFunc@4
-glutSpaceballRotateFunc@4
-glutSpecialFunc@4
-glutSpecialUpFunc@4
-glutStopVideoResizing@0
-glutStrokeCharacter@8
-glutStrokeLength@8
-glutStrokeWidth@8
-glutSwapBuffers@0
-glutTabletButtonFunc@4
-glutTabletMotionFunc@4
-glutTimerFunc@12
-glutUseLayer@4
-glutVideoPan@16
-glutVideoResize@16
-glutVideoResizeGet@4
-glutVisibilityFunc@4
-glutWarpPointer@8
-glutWindowStatusFunc@4
-glutWireCone@24
-glutWireCube@8
-glutWireDodecahedron@0
-glutWireIcosahedron@0
-glutWireOctahedron@0
-glutWireSphere@16
-glutWireTeapot@8
-glutWireTetrahedron@0
-glutWireTorus@24
diff --git a/winsup/w32api/lib/glut32.def b/winsup/w32api/lib/glut32.def
deleted file mode 100644
index 427e32bc3..000000000
--- a/winsup/w32api/lib/glut32.def
+++ /dev/null
@@ -1,116 +0,0 @@
-LIBRARY glut32.dll
-EXPORTS
-glutAddMenuEntry@8
-glutAddSubMenu@8
-glutAttachMenu@4
-glutBitmapCharacter@8
-glutBitmapLength@8
-glutBitmapWidth@8
-glutButtonBoxFunc@4
-glutChangeToMenuEntry@12
-glutChangeToSubMenu@12
-glutCopyColormap@4
-glutCreateMenu@4
-glutCreateSubWindow@20
-glutCreateWindow@4
-glutDestroyMenu@4
-glutDestroyWindow@4
-glutDetachMenu@4
-glutDeviceGet@4
-glutDialsFunc@4
-glutDisplayFunc@4
-glutEnterGameMode@0
-glutEntryFunc@4
-glutEstablishOverlay@0
-glutExtensionSupported@4
-glutForceJoystickFunc@0
-glutFullScreen@0
-glutGameModeGet@4
-glutGameModeString@4
-glutGet@4
-glutGetColor@8
-glutGetMenu@0
-glutGetModifiers@0
-glutGetWindow@0
-glutHideOverlay@0
-glutHideWindow@0
-glutIconifyWindow@0
-glutIdleFunc@4
-glutIgnoreKeyRepeat@4
-glutInit@8
-glutInitDisplayMode@4
-glutInitDisplayString@4
-glutInitWindowPosition@8
-glutInitWindowSize@8
-glutJoystickFunc@8
-glutKeyboardFunc@4
-glutKeyboardUpFunc@4
-glutLayerGet@4
-glutLeaveGameMode@0
-glutMainLoop@0
-glutMenuStateFunc@4
-glutMenuStatusFunc@4
-glutMotionFunc@4
-glutMouseFunc@4
-glutOverlayDisplayFunc@4
-glutPassiveMotionFunc@4
-glutPopWindow@0
-glutPositionWindow@8
-glutPostOverlayRedisplay@0
-glutPostRedisplay@0
-glutPostWindowOverlayRedisplay@4
-glutPostWindowRedisplay@4
-glutPushWindow@0
-glutRemoveMenuItem@4
-glutRemoveOverlay@0
-glutReportErrors@0
-glutReshapeFunc@4
-glutReshapeWindow@8
-glutSetColor@16
-glutSetCursor@4
-glutSetIconTitle@4
-glutSetKeyRepeat@4
-glutSetMenu@4
-glutSetWindow@4
-glutSetWindowTitle@4
-glutSetupVideoResizing@0
-glutShowOverlay@0
-glutShowWindow@0
-glutSolidCone@24
-glutSolidCube@8
-glutSolidDodecahedron@0
-glutSolidIcosahedron@0
-glutSolidOctahedron@0
-glutSolidSphere@16
-glutSolidTeapot@8
-glutSolidTetrahedron@0
-glutSolidTorus@24
-glutSpaceballButtonFunc@4
-glutSpaceballMotionFunc@4
-glutSpaceballRotateFunc@4
-glutSpecialFunc@4
-glutSpecialUpFunc@4
-glutStopVideoResizing@0
-glutStrokeCharacter@8
-glutStrokeLength@8
-glutStrokeWidth@8
-glutSwapBuffers@0
-glutTabletButtonFunc@4
-glutTabletMotionFunc@4
-glutTimerFunc@12
-glutUseLayer@4
-glutVideoPan@16
-glutVideoResize@16
-glutVideoResizeGet@4
-glutVisibilityFunc@4
-glutWarpPointer@8
-glutWindowStatusFunc@4
-glutWireCone@24
-glutWireCube@8
-glutWireDodecahedron@0
-glutWireIcosahedron@0
-glutWireOctahedron@0
-glutWireSphere@16
-glutWireTeapot@8
-glutWireTetrahedron@0
-glutWireTorus@24
diff --git a/winsup/w32api/lib/imagehlp.def b/winsup/w32api/lib/imagehlp.def
deleted file mode 100644
index 411a360bd..000000000
--- 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 1d8ee8fcc..000000000
--- a/winsup/w32api/lib/imm32.def
+++ /dev/null
@@ -1,77 +0,0 @@
-LIBRARY IMM32.DLL
-EXPORTS
-ImmAssociateContext@8
-ImmConfigureIMEA@16
-ImmConfigureIMEW@16
-ImmCreateContext@0
-ImmCreateIMCC@4
-ImmCreateSoftKeyboard@16
-ImmDestroyContext@4
-ImmDestroyIMCC@4
-ImmDestroySoftKeyboard@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 294c752ab..000000000
--- a/winsup/w32api/lib/iphlpapi.def
+++ /dev/null
@@ -1,33 +0,0 @@
-LIBRARY "IPHLPAPI.DLL"
-EXPORTS
-CreateIpForwardEntry@4
-CreateIpNetEntry@4
-DeleteIpForwardEntry@4
-DeleteIpNetEntry@4
-GetAdaptersInfo@8
-GetBestInterface@8
-GetBestRoute@12
-GetFriendlyIfIndex@4
-GetIcmpStatistics@4
-GetIfEntry@4
-GetIfTable@12
-GetInterfaceInfo@8
-GetIpAddrTable@12
-GetIpForwardTable@12
-GetIpNetTable@12
-GetIpStatistics@4
-GetNetworkParams@8
-GetNumberOfInterfaces@4
-GetRTTAndHopCount@16
-GetTcpStatistics@4
-GetTcpTable@12
-GetUdpStatistics@4
-GetUdpTable@12
-IpReleaseAddress@4
-IpRenewAddress@4
-SetIfEntry@4
-SetIpForwardEntry@4
-SetIpNetEntry@4
-SetIpStatistics@4
-SetIpTTL@4
-SetTcpEntry@4
diff --git a/winsup/w32api/lib/kernel32.def b/winsup/w32api/lib/kernel32.def
deleted file mode 100644
index 9b2ab892e..000000000
--- a/winsup/w32api/lib/kernel32.def
+++ /dev/null
@@ -1,758 +0,0 @@
-LIBRARY KERNEL32.dll
-EXPORTS
-AddAtomA@4
-AddAtomW@4
-AddConsoleAliasA@12
-AddConsoleAliasW@12
-AllocConsole@0
-AreFileApisANSI@0
-AssignProcessToJobObject@8
-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
-CancelIo@4
-CancelTimerQueueTimer@8
-CancelWaitableTimer@4
-ChangeTimerQueueTimer@16
-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
-ConvertThreadToFiber@4
-CopyFileA@12
-CopyFileW@12
-CopyFileExA@24
-CopyFileExW@24
-CreateConsoleScreenBuffer@20
-CreateDirectoryA@8
-CreateDirectoryExA@12
-CreateDirectoryExW@12
-CreateDirectoryW@8
-CreateEventA@16
-CreateEventW@16
-CreateFiber@12
-CreateFileA@28
-CreateFileMappingA@24
-CreateFileMappingW@24
-CreateFileW@28
-CreateHardLinkA@12
-CreateHardLinkW@12
-CreateIoCompletionPort@16
-CreateJobObjectA@8
-CreateJobObjectW@8
-CreateMailslotA@16
-CreateMailslotW@16
-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
-CreateToolhelp32Snapshot@8
-CreateVirtualBuffer@12
-CreateWaitableTimerA@12
-CreateWaitableTimerW@12
-DebugActiveProcess@4
-DebugBreak@0
-DefineDosDeviceA@12
-DefineDosDeviceW@12
-DeleteAtom@4
-DeleteCriticalSection@4
-DeleteFiber@4
-DeleteFileA@4
-DeleteFileW@4
-DeleteTimerQueue@4
-DeleteVolumeMountPointA@4
-DeleteVolumeMountPointW@4
-DeviceIoControl@32
-DisableThreadLibraryCalls@4
-DisconnectNamedPipe@4
-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
-EnumResourceLanguagesA@20
-EnumResourceLanguagesW@20
-EnumResourceNamesA@16
-EnumResourceNamesW@16
-EnumResourceTypesA@12
-EnumResourceTypesW@12
-EnumSystemCodePagesA@8
-EnumSystemCodePagesW@8
-EnumSystemLocalesA@8
-EnumSystemLocalesW@8
-EnumTimeFormatsA@12
-EnumTimeFormatsW@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
-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
-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
-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
-GetConsoleScreenBufferInfo@8
-GetConsoleTitleA@8
-GetConsoleTitleW@8
-GetConsoleWindow@0
-GetCurrencyFormatA@24
-GetCurrencyFormatW@24
-GetCurrentConsoleFont@12
-GetCurrentDirectoryA@8
-GetCurrentDirectoryW@8
-GetCurrentProcess@0
-GetCurrentProcessId@0
-GetCurrentThread@0
-GetCurrentThreadId@0
-GetDateFormatA@24
-GetDateFormatW@24
-GetDefaultCommConfigA@12
-GetDefaultCommConfigW@12
-GetDevicePowerState@4
-GetDiskFreeSpaceA@20
-GetDiskFreeSpaceW@20
-GetDiskFreeSpaceExA@16
-GetDiskFreeSpaceExW@16
-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
-GetFullPathNameA@16
-GetFullPathNameW@16
-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
-GetNamedPipeHandleStateA@28
-GetNamedPipeHandleStateW@28
-GetNamedPipeInfo@20
-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
-GetProcessHeap@0
-GetProcessHeaps@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
-GetSystemDirectoryA@8
-GetSystemDirectoryW@8
-GetSystemInfo@4
-GetSystemPowerStatus@4
-GetSystemTime@4
-GetSystemTimeAdjustment@12
-GetSystemTimeAsFileTime@4
-GetTapeParameters@16
-GetTapePosition@20
-GetTapeStatus@4
-GetTempFileNameA@16
-GetTempFileNameW@16
-GetTempPathA@8
-GetTempPathW@8
-GetThreadContext@8
-GetThreadLocale@0
-GetThreadPriority@4
-GetThreadPriorityBoost@8
-GetThreadSelectorEntry@12
-GetThreadTimes@20
-GetTickCount@0
-GetTimeFormatA@24
-GetTimeFormatW@24
-GetTimeZoneInformation@4
-GetUserDefaultLCID@0
-GetUserDefaultLangID@0
-GetVDMCurrentDirectories@8
-GetVersion@0
-GetVersionExA@4
-GetVersionExW@4
-GetVolumeInformationA@32
-GetVolumeInformationW@32
-GetVolumeNameForVolumeMountPointA@12
-GetVolumeNameForVolumeMountPointW@12
-GetVolumePathNameA@12
-GetVolumePathNameW@12
-GetWindowsDirectoryA@8
-GetWindowsDirectoryW@8
-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
-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
-HeapQueryTagW@20
-HeapReAlloc@16
-HeapSize@12
-HeapSummary@12
-HeapUnlock@4
-HeapUsage@20
-HeapValidate@12
-HeapWalk@8
-InitAtomTable@4
-InitializeCriticalSection@4
-InitializeCriticalSectionAndSpinCount@8
-InterlockedCompareExchange@12
-InterlockedDecrement@4
-InterlockedExchange@8
-InterlockedExchangeAdd@8
-InterlockedIncrement@4
-InvalidateConsoleDIBits@8
-IsBadCodePtr@4
-IsBadHugeReadPtr@8
-IsBadHugeWritePtr@8
-IsBadReadPtr@8
-IsBadStringPtrA@8
-IsBadStringPtrW@8
-IsBadWritePtr@8
-IsDBCSLeadByte@4
-IsDBCSLeadByteEx@8
-IsDebuggerPresent@0
-IsProcessorFeaturePresent@4
-IsValidCodePage@4
-IsValidLocale@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
-MapViewOfFile@20
-MapViewOfFileEx@24
-MapViewOfFileVlm@28
-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
-OpenWaitableTimerA@12
-OpenWaitableTimerW@12
-OutputDebugStringA@4
-OutputDebugStringW@4
-PeekConsoleInputA@16
-PeekConsoleInputW@16
-PeekNamedPipe@24
-PostQueuedCompletionStatus@16
-PrepareTape@12
-PulseEvent@4
-PurgeComm@8
-QueryDosDeviceA@12
-QueryDosDeviceW@12
-QueryInformationJobObject@20
-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@16
-RegisterWowBaseHandlers@4
-RegisterWowExec@4
-ReleaseMutex@4
-ReleaseSemaphore@12
-RemoveDirectoryA@4
-RemoveDirectoryW@4
-ReplaceFile@24
-RequestWakeupLatency@4
-ResetEvent@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
-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
-SetEndOfFile@4
-SetEnvironmentVariableA@8
-SetEnvironmentVariableW@8
-SetErrorMode@4
-SetEvent@4
-SetFileApisToANSI@0
-SetFileApisToOEM@0
-SetFileAttributesA@8
-SetFileAttributesW@8
-SetFilePointer@16
-SetFilePointerEx@20
-SetFileTime@16
-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
-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
-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
-UpdateResourceA@24
-UpdateResourceW@24
-VDMConsoleOperation@8
-VDMOperationStarted@4
-VerLanguageNameA@12
-VerLanguageNameW@12
-VerifyConsoleIoHandle@4
-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
-_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 1761dd48f..000000000
--- 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 7ea621312..000000000
--- 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 38bff4740..000000000
--- a/winsup/w32api/lib/mapi32.def
+++ /dev/null
@@ -1,150 +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
-MAPIAdminProfiles
-MAPIAdminProfiles@8
-MAPIAllocateBuffer
-MAPIAllocateBuffer@8
-MAPIAllocateMore
-MAPIAllocateMore@12
-MAPIDeinitIdle@0
-MAPIFreeBuffer
-MAPIFreeBuffer@4
-MAPIGetDefaultMalloc@0
-MAPIInitIdle@4
-MAPIInitialize
-MAPIInitialize@4
-MAPILogonEx
-MAPILogonEx@20
-MAPIOpenFormMgr
-MAPIOpenFormMgr@8
-MAPIOpenLocalFormContainer
-MAPIOpenLocalFormContainer@4
-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 fb954e367..000000000
--- 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 2e4619375..000000000
--- a/winsup/w32api/lib/mgmtapi.def
+++ /dev/null
@@ -1,12 +0,0 @@
-LIBRARY MGMTAPI.DLL
-EXPORTS
-SnmpMgrClose@4
-SnmpMgrGetTrap@24
-SnmpMgrMIB2Disk@8
-SnmpMgrOidToStr@8
-SnmpMgrOpen@16
-SnmpMgrRequest@20
-SnmpMgrStrToOid@8
-SnmpMgrTrapListen@4
-dbginit@8
-serverTrapThread@4
diff --git a/winsup/w32api/lib/mpr.def b/winsup/w32api/lib/mpr.def
deleted file mode 100644
index f8dde41f7..000000000
--- 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/msacm32.def b/winsup/w32api/lib/msacm32.def
deleted file mode 100644
index 356b3aff1..000000000
--- 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/mswsock.def b/winsup/w32api/lib/mswsock.def
deleted file mode 100644
index 318026e63..000000000
--- 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/nddeapi.def b/winsup/w32api/lib/nddeapi.def
deleted file mode 100644
index 4016baf53..000000000
--- 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 e8d0ef438..000000000
--- a/winsup/w32api/lib/netapi32.def
+++ /dev/null
@@ -1,247 +0,0 @@
-LIBRARY NETAPI32.DLL
-EXPORTS
-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/odbc32.def b/winsup/w32api/lib/odbc32.def
deleted file mode 100644
index e10adc823..000000000
--- a/winsup/w32api/lib/odbc32.def
+++ /dev/null
@@ -1,62 +0,0 @@
-LIBRARY ODBC32.DLL
-EXPORTS
-ConnectDlg@16
-PostError@20
-PostODBCError@16
-SQLAllocConnect@8
-SQLAllocEnv@4
-SQLAllocStmt@8
-SQLBindCol@24
-SQLBindParameter@40
-SQLBrowseConnect@24
-SQLCancel@4
-SQLColAttributes@28
-SQLColumnPrivileges@36
-SQLColumns@36
-SQLConnect@28
-SQLDataSources@32
-SQLDescribeCol@36
-SQLDescribeParam@24
-SQLDisconnect@4
-SQLDriverConnect@32
-SQLDrivers@32
-SQLError@32
-SQLExecDirect@12
-SQLExecute@4
-SQLExtendedFetch@20
-SQLFetch@4
-SQLForeignKeys@52
-SQLFreeConnect@4
-SQLFreeEnv@4
-SQLFreeHandle@8
-SQLFreeStmt@8
-SQLGetConnectOption@12
-SQLGetCursorName@16
-SQLGetData@24
-SQLGetFunctions@12
-SQLGetInfo@20
-SQLGetStmtOption@12
-SQLGetTypeInfo@8
-SQLMoreResults@4
-SQLNativeSql@24
-SQLNumParams@8
-SQLNumResultCols@8
-SQLParamData@8
-SQLParamOptions@12
-SQLPrepare@12
-SQLPrimaryKeys@28
-SQLProcedureColumns@36
-SQLProcedures@28
-SQLPutData@12
-SQLRowCount@8
-SQLSetConnectOption@12
-SQLSetCursorName@12
-SQLSetParam@32
-SQLSetPos@16
-SQLSetScrollOptions@16
-SQLSetStmtOption@12
-SQLSpecialColumns@40
-SQLStatistics@36
-SQLTablePrivileges@28
-SQLTables@36
-SQLTransact@12
diff --git a/winsup/w32api/lib/ole32.def b/winsup/w32api/lib/ole32.def
deleted file mode 100644
index ebac6bf7f..000000000
--- a/winsup/w32api/lib/ole32.def
+++ /dev/null
@@ -1,253 +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
-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/oleaut32.def b/winsup/w32api/lib/oleaut32.def
deleted file mode 100644
index b43c0fd92..000000000
--- a/winsup/w32api/lib/oleaut32.def
+++ /dev/null
@@ -1,146 +0,0 @@
-LIBRARY OLEAUT32.DLL
-EXPORTS
-CreateDispTypeInfo@12
-CreateErrorInfo@4
-CreateStdDispatch@16
-CreateTypeLib@12
-DispGetIDsOfNames@16
-DispGetParam@20
-DispInvoke@32
-DllCanUnloadNow@0
-DllGetClassObject@12
-DosDateTimeToVariantTime@12
-GetActiveObject@12
-GetErrorInfo@8
-LHashValOfNameSys@12
-LHashValOfNameSysA@12
-LoadRegTypeLib@20
-LoadTypeLib@8
-LoadTypeLibEx@12
-OaBuildVersion@0
-QueryPathOfRegTypeLib@20
-RegisterActiveObject@16
-RegisterTypeLib@12
-RevokeActiveObject@8
-SafeArrayAccessData@8
-SafeArrayAllocData@4
-SafeArrayAllocDescriptor@8
-SafeArrayCopy@8
-SafeArrayCreate@12
-SafeArrayDestroy@4
-SafeArrayDestroyData@4
-SafeArrayDestroyDescriptor@4
-SafeArrayGetDim@4
-SafeArrayGetElement@12
-SafeArrayGetElemsize@4
-SafeArrayGetLBound@12
-SafeArrayGetUBound@12
-SafeArrayLock@4
-SafeArrayPtrOfIndex@12
-SafeArrayPutElement@12
-SafeArrayRedim@8
-SafeArrayUnaccessData@4
-SafeArrayUnlock@4
-SafeArrayCreateVector@12
-SetErrorInfo@8
-SysAllocString@4
-SysAllocStringByteLen@8
-SysAllocStringLen@8
-SysFreeString@4
-SysReAllocString@8
-SysReAllocStringLen@12
-SysStringByteLen@4
-SysStringLen@4
-VarBoolFromCy@12
-VarBoolFromDate@12
-VarBoolFromDisp@12
-VarBoolFromI2@8
-VarBoolFromI4@8
-VarBoolFromR4@8
-VarBoolFromR8@12
-VarBoolFromStr@16
-VarBoolFromUI1@8
-VarBstrFromBool@16
-VarBstrFromCy@20
-VarBstrFromDate@20
-VarBstrFromDisp@16
-VarBstrFromI2@16
-VarBstrFromI4@16
-VarBstrFromR4@16
-VarBstrFromR8@20
-VarBstrFromUI1@16
-VarCyFromBool@8
-VarCyFromDate@12
-VarCyFromDisp@12
-VarCyFromI2@8
-VarCyFromI4@8
-VarCyFromR4@8
-VarCyFromR8@12
-VarCyFromStr@16
-VarCyFromUI1@8
-VarDateFromBool@8
-VarDateFromCy@12
-VarDateFromDisp@12
-VarDateFromI2@8
-VarDateFromI4@8
-VarDateFromR4@8
-VarDateFromR8@12
-VarDateFromStr@16
-VarDateFromUI1@8
-VarI2FromBool@8
-VarI2FromCy@12
-VarI2FromDate@12
-VarI2FromDisp@12
-VarI2FromI4@8
-VarI2FromR4@8
-VarI2FromR8@12
-VarI2FromStr@16
-VarI2FromUI1@8
-VarI4FromBool@8
-VarI4FromCy@12
-VarI4FromDate@12
-VarI4FromDisp@12
-VarI4FromI2@8
-VarI4FromR4@8
-VarI4FromR8@12
-VarI4FromStr@16
-VarI4FromUI1@8
-VarR4FromBool@8
-VarR4FromCy@12
-VarR4FromDate@12
-VarR4FromDisp@12
-VarR4FromI2@8
-VarR4FromI4@8
-VarR4FromR8@12
-VarR4FromStr@16
-VarR4FromUI1@8
-VarR8FromBool@8
-VarR8FromCy@12
-VarR8FromDate@12
-VarR8FromDisp@12
-VarR8FromI2@8
-VarR8FromI4@8
-VarR8FromR4@8
-VarR8FromStr@16
-VarR8FromUI1@8
-VarUI1FromBool@8
-VarUI1FromCy@12
-VarUI1FromDate@12
-VarUI1FromDisp@12
-VarUI1FromI2@8
-VarUI1FromI4@8
-VarUI1FromR4@8
-VarUI1FromR8@12
-VarUI1FromStr@16
-VariantChangeType@16
-VariantChangeTypeEx@20
-VariantClear@4
-VariantCopy@8
-VariantCopyInd@8
-VariantInit@4
-VariantTimeToDosDateTime@16
-VariantTimeToSystemTime@12
-VarAdd@12
-VarSub@12
-VarMul@12
-VarDiv@12
diff --git a/winsup/w32api/lib/olecli32.def b/winsup/w32api/lib/olecli32.def
deleted file mode 100644
index f02f35e00..000000000
--- 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/oledlg.def b/winsup/w32api/lib/oledlg.def
deleted file mode 100644
index 6ae8ace10..000000000
--- 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/olepro32.def b/winsup/w32api/lib/olepro32.def
deleted file mode 100644
index ebfbbc588..000000000
--- 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 04d5ba699..000000000
--- 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 e612a5753..000000000
--- 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 0efc7f73a..000000000
--- 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 58fbc27ab..000000000
--- 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/psapi.def b/winsup/w32api/lib/psapi.def
deleted file mode 100644
index 9d79fe82c..000000000
--- a/winsup/w32api/lib/psapi.def
+++ /dev/null
@@ -1,21 +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
-GetWsChanges@12
-InitializeProcessForWsWatch@4
-QueryWorkingSet@12
diff --git a/winsup/w32api/lib/rapi.def b/winsup/w32api/lib/rapi.def
deleted file mode 100644
index 730faa294..000000000
--- 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 62508f65e..000000000
--- a/winsup/w32api/lib/rasapi32.def
+++ /dev/null
@@ -1,35 +0,0 @@
-LIBRARY RASAPI32.dll
-EXPORTS
-RasCreatePhonebookEntryA@8
-RasCreatePhonebookEntryW@8
-RasDialA@24
-RasDialW@24
-RasDialWow@20
-RasEditPhonebookEntryA@12
-RasEditPhonebookEntryW@12
-RasEnumConnectionsA@12
-RasEnumConnectionsW@12
-RasEnumConnectionsWow@12
-RasEnumDevicesA@12
-RasEnumDevicesW@12
-RasEnumEntriesA@20
-RasEnumEntriesW@20
-RasEnumEntriesWow@20
-RasGetConnectResponse@8
-RasGetConnectStatusA@8
-RasGetConnectStatusW@8
-RasGetConnectStatusWow@8
-RasGetEntryDialParamsA@12
-RasGetEntryDialParamsW@12
-RasGetErrorStringA@12
-RasGetErrorStringW@12
-RasGetErrorStringWow@12
-RasGetHport@4
-RasGetProjectionInfoA@16
-RasGetProjectionInfoW@16
-RasHangUpA@4
-RasHangUpW@4
-RasHangUpWow@4
-RasSetEntryDialParamsA@12
-RasSetEntryDialParamsW@12
-RasSetOldPassword@8
diff --git a/winsup/w32api/lib/res.rc b/winsup/w32api/lib/res.rc
deleted file mode 100644
index 1a3f751de..000000000
--- 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 43e96a7f3..000000000
--- 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 7d005c365..000000000
--- 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 d51bc723c..000000000
--- a/winsup/w32api/lib/rpcrt4.def
+++ /dev/null
@@ -1,372 +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
-_imp__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
-_imp__I_RpcSetAssociationContext@4
-I_RpcSsDontSerializeContext@0
-_imp__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
-_imp__NDRCContextBinding@4
-NDRCContextMarshall@8
-_imp__NDRCContextMarshall@8
-NDRCContextUnmarshall@16
-_imp__NDRCContextUnmarshall@16
-NDRSContextMarshall@12
-_imp__NDRSContextMarshall@12
-NDRSContextUnmarshall@8
-_imp__NDRSContextUnmarshall@8
-NDRcopy@12
-NdrAllocate@8
-NdrByteCountPointerBufferSize@12
-NdrByteCountPointerFree@12
-NdrByteCountPointerMarshall@12
-NdrByteCountPointerUnmarshall@16
-NdrCStdStubBuffer2_Release@8
-NdrCStdStubBuffer_Release@8
-NdrClearOutParameters@12
-NdrClientCall
-NdrClientContextMarshall@12
-_imp__NdrClientContextMarshall@12
-NdrClientContextUnmarshall@12
-_imp__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
-_imp__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
-_imp__NdrServerContextMarshall@12
-NdrServerContextUnmarshall@4
-_imp__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
-_imp__RpcSmDestroyClientContext@4
-RpcSmDisableAllocate@0
-RpcSmEnableAllocate@0
-RpcSmFree@4
-RpcSmGetThreadHandle@4
-RpcSmSetClientAllocFree@8
-RpcSmSetThreadHandle@4
-RpcSmSwapClientAllocFree@16
-RpcSsAllocate@4
-RpcSsDestroyClientContext@4
-_imp__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
-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/scrnsave.c b/winsup/w32api/lib/scrnsave.c
deleted file mode 100644
index ddad88409..000000000
--- a/winsup/w32api/lib/scrnsave.c
+++ /dev/null
@@ -1,406 +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:
- }
- }
- 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_SCREENSAVERRUNNING, 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.right = GetSystemMetrics(SM_CXSCREEN);
- rc.bottom = GetSystemMetrics(SM_CYSCREEN);
- style |= WS_VISIBLE;
- }
-
- /* create main screen saver window */
- hMainWindow = CreateWindowEx(hParent ? 0 : WS_EX_TOPMOST, CLASS_SCRNSAVE,
- TEXT("SCREENSAVER"), style,
- 0, 0, 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_SCREENSAVERRUNNING, 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 129cec8fe..000000000
--- a/winsup/w32api/lib/secur32.def
+++ /dev/null
@@ -1,8 +0,0 @@
-LIBRARY SECUR32.dll
-EXPORTS
-LsaCallAuthenticationPackage@28
-LsaDeregisterLogonProcess@4
-LsaFreeReturnBuffer@4
-LsaLogonUser@56
-LsaLookupAuthenticationPackage@12
-LsaRegisterLogonProcess@12
diff --git a/winsup/w32api/lib/shell32.c b/winsup/w32api/lib/shell32.c
deleted file mode 100644
index 3525ed9d7..000000000
--- a/winsup/w32api/lib/shell32.c
+++ /dev/null
@@ -1,51 +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(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_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_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(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);
diff --git a/winsup/w32api/lib/shell32.def b/winsup/w32api/lib/shell32.def
deleted file mode 100644
index 81e02387b..000000000
--- a/winsup/w32api/lib/shell32.def
+++ /dev/null
@@ -1,123 +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
-Shell_NotifyIconW@8
-Shell_NotifyIconA@8
-Shell_NotifyIcon@8
-ShellHookProc@12
-ShellExecuteW@24
-ShellExecuteExW@4
-ShellExecuteExA@4
-ShellExecuteEx@4
-ShellExecuteA@24
-ShellAboutW@16
-ShellAboutA@16
-SheShortenPathW@8
-SheShortenPathA@8
-SheSetCurDrive@4
-SheRemoveQuotesW@4
-SheRemoveQuotesA@4
-SheGetPathOffsetW@4
-SheGetDirW@8
-SheGetDirExW@12
-SheGetDirA@8
-SheGetCurDrive@0
-SheFullPathW@12
-SheFullPathA@12
-SheConvertPathW@12
-SheChangeDirW@4
-SheChangeDirExW@4
-SheChangeDirExA@4
-SheChangeDirA@4
-SHLoadInProc@4
-SHHelpShortcuts_RunDLL@16
-SHGetSpecialFolderLocation@12
-SHGetPathFromIDListW@8
-SHGetPathFromIDListA@8
-SHGetPathFromIDList@8
-SHGetMalloc@4
-SHGetInstanceExplorer@4
-SHGetFileInfoW@20
-SHGetFileInfoA@20
-SHGetFileInfo@20
-SHGetDesktopFolder@4
-SHFreeNameMappings@4
-SHFormatDrive@16
-SHFileOperationW@4
-SHFileOperationA@4
-SHFileOperation@4
-SHChangeNotify@16
-SHBrowseForFolderW@4
-SHBrowseForFolderA@4
-SHBrowseForFolder@4
-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
-FindExecutableW@12
-FindExecutableA@12
-FindExeDlgProc@16
-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
diff --git a/winsup/w32api/lib/svrapi.def b/winsup/w32api/lib/svrapi.def
deleted file mode 100644
index 4a7b0dba6..000000000
--- 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 e4f0d9c8d..000000000
--- 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 9aa6dd978..000000000
--- a/winsup/w32api/lib/test.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Perform simple test of headers to avoid typos and such */
-#define Win32_Winsock
-#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>
-
-#ifndef __OBJC__
-#include <ole2.h>
-#include <shlobj.h>
-#else
-#undef BOOL
-#endif
-
-#include <stdio.h>
-
-int main()
-{
- return 0;
-}
diff --git a/winsup/w32api/lib/th32.def b/winsup/w32api/lib/th32.def
deleted file mode 100644
index 4137bf61f..000000000
--- 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 6252ada42..000000000
--- a/winsup/w32api/lib/thunk32.def
+++ /dev/null
@@ -1,68 +0,0 @@
-LIBRARY THUNK32.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/url.def b/winsup/w32api/lib/url.def
deleted file mode 100644
index 202073259..000000000
--- 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/user32.def b/winsup/w32api/lib/user32.def
deleted file mode 100644
index b5acc474d..000000000
--- a/winsup/w32api/lib/user32.def
+++ /dev/null
@@ -1,561 +0,0 @@
-LIBRARY USER32.dll
-EXPORTS
-ActivateKeyboardLayout@8
-AdjustWindowRect@12
-AdjustWindowRectEx@16
-AnyPopup@0
-AppendMenuA@16
-AppendMenuW@16
-ArrangeIconicWindows@4
-AttachThreadInput@12
-BeginDeferWindowPos@4
-BeginPaint@8
-BringWindowToTop@4
-BroadcastSystemMessage@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
-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
-DefWindowProcA@16
-DefWindowProcW@16
-DeferWindowPos@32
-DeleteMenu@12
-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
-EndPaint@8
-EnumChildWindows@12
-EnumClipboardFormats@4
-EnumDesktopWindows@12
-EnumDesktopsA@12
-EnumDesktopsW@12
-EnumDisplaySettingsA@12
-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
-FrameRect@12
-FreeDDElParam@8
-GetActiveWindow@0
-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
-GetClipboardViewer@0
-GetCursor@0
-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
-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
-GetMenu@4
-GetMenuCheckMarkDimensions@0
-GetMenuContextHelpId@4
-GetMenuDefaultItem@12
-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
-GetNextDlgGroupItem@12
-GetNextDlgTabItem@12
-GetOpenClipboardWindow@0
-GetParent@4
-GetPriorityClipboardFormat@8
-GetProcessWindowStation@0
-GetPropA@8
-GetPropW@8
-GetQueueStatus@4
-GetScrollInfo@12
-GetScrollPos@8
-GetScrollRange@16
-GetShellWindow@0
-GetSubMenu@8
-GetSysColor@4
-GetSysColorBrush@4
-GetSystemMenu@8
-GetSystemMetrics@4
-GetTabbedTextExtentA@20
-GetTabbedTextExtentW@20
-GetThreadDesktop@4
-GetTopWindow@4
-GetUpdateRect@12
-GetUpdateRgn@12
-GetUserObjectInformationA@20
-GetUserObjectInformationW@20
-GetUserObjectSecurity@20
-GetWindow@8
-GetWindowContextHelpId@4
-_imp__GetWindowContextHelpId@4
-GetWindowDC@4
-GetWindowLongA@8
-GetWindowLongW@8
-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
-InflateRect@12
-InsertMenuA@20
-InsertMenuItemA@16
-InsertMenuItemW@16
-InsertMenuW@20
-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
-IsIconic@4
-IsMenu@4
-IsRectEmpty@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
-LockWindowUpdate@4
-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
-MoveWindow@24
-MsgWaitForMultipleObjects@20
-MsgWaitForMultipleObjectsEx@20
-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
-PtInRect@12
-RedrawWindow@16
-RegisterClassA@4
-RegisterClassExA@4
-RegisterClassExW@4
-RegisterClassW@4
-RegisterClipboardFormatA@4
-RegisterClipboardFormatW@4
-RegisterHotKey@16
-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
-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
-SetMenu@8
-SetMenuContextHelpId@8
-_imp__SetMenuContextHelpId@8
-SetMenuDefaultItem@12
-SetMenuItemBitmaps@20
-SetMenuItemInfoA@16
-SetMenuItemInfoW@16
-SetMessageExtraInfo@4
-SetMessageQueue@4
-SetParent@8
-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
-SetWindowContextHelpId@8
-_imp__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
-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
-UnhookWindowsHook@8
-UnhookWindowsHookEx@4
-UnionRect@12
-UnloadKeyboardLayout@4
-UnpackDDElParam@16
-UnregisterClassA@8
-UnregisterClassW@8
-UnregisterHotKey@8
-UpdateWindow@4
-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 b74cb9236..000000000
--- 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/uuid.c b/winsup/w32api/lib/uuid.c
deleted file mode 100644
index 921887c1a..000000000
--- a/winsup/w32api/lib/uuid.c
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
- Generate GUIDs for OLE and other interfaces.
-
- This file was generated by extracting the names of all GUIDs
- from uuid.lib. The names were in turn processed by a script
- to build a C program that when run generated this file.
- Some definitions were added by hand afterwards.
-*/
-#define INITGUID
-#include <basetyps.h>
-DEFINE_GUID(ARRAYID_PathProperties,0x7ecbba04,0x2d97,0x11cf,0xa2,0x29,0,0xaa,0,0x3d,0x73,0x52);
-DEFINE_GUID(CATID_Control,0x40fc6ed4,0x2438,0x11cf,0xa3,0xdb,0x8,0,0x36,0xf1,0x25,0x2);
-DEFINE_GUID(CATID_DocObject,0x40fc6ed8,0x2438,0x11cf,0xa3,0xdb,0x8,0,0x36,0xf1,0x25,0x2);
-DEFINE_GUID(CATID_Insertable,0x40fc6ed3,0x2438,0x11cf,0xa3,0xdb,0x8,0,0x36,0xf1,0x25,0x2);
-DEFINE_GUID(CATID_InternetAware58,0xaa0de86a,0xcf2b,0xa211,0x29,0,0xaa,0,0x3d,0x73,0x52,0);
-DEFINE_GUID(CATID_IsShortcut,0x40fc6ed6,0x2438,0x11cf,0xa3,0xdb,0x8,0,0x36,0xf1,0x25,0x2);
-DEFINE_GUID(CATID_NeverShowExt,0x40fc6ed7,0x2438,0x11cf,0xa3,0xdb,0x8,0,0x36,0xf1,0x25,0x2);
-DEFINE_GUID(CATID_PersistsToFile,0xde86a56,0x2baa,0x11cf,0xa2,0x29,0,0xaa,0,0x3d,0x73,0x52);
-DEFINE_GUID(CATID_PersistsToMemory,0xde86a55,0x2baa,0x11cf,0xa2,0x29,0,0xaa,0,0x3d,0x73,0x52);
-DEFINE_GUID(CATID_PersistsToMoniker,0xde86a51,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_PersistsToStorage,0xde86a52,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);
-DEFINE_GUID(CATID_Printable,0x40fc6ed9,0x2438,0x11cf,0xa3,0xdb,0x8,0,0x36,0xf1,0x25,0x2);
-DEFINE_GUID(CATID_Programmable,0x40fc6ed5,0x2438,0x11cf,0xa3,0xdb,0x8,0,0x36,0xf1,0x25,0x2);
-DEFINE_GUID(CATID_RequiresDataPathHost,0xde86a50,0x2baa,0x11cf,0xa2,0x29,0,0xaa,0,0x3d,0x73,0x52);
-DEFINE_GUID(CATID_SafeForInitializing,0x7dd95802,0x9882,0x11cf,0x9f,0xa9,0,0xaa,0,0x6c,0x42,0xc4);
-DEFINE_GUID(CATID_SafeForScripting,0x7dd95801,0x9882,0x11cf,0x9f,0xa9,0,0xaa,0,0x6c,0x42,0xc4);
-DEFINE_GUID(CLSID_AllClasses,0x330,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(CLSID_CColorPropPage,0xbe35201,0x8f91,0x11ce,0x9d,0xe3,0,0xaa,0,0x4b,0xb8,0x51);
-DEFINE_GUID(CLSID_CFontPropPage, 0x0be35200,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
-DEFINE_GUID(CLSID_CFontPropPage00,0x910be352,0xce8f,0x9d11,0xe3,0,0xaa,0,0x4b,0xb8,0x51,0);
-DEFINE_GUID(CLSID_CPicturePropPage,0xbe35202,0x8f91,0x11ce,0x9d,0xe3,0,0xaa,0,0x4b,0xb8,0x51);
-DEFINE_GUID(CLSID_ConvertVBX,0xfb8f0822,0x164,0x101b,0x84,0xed,0x8,0,0x2b,0x2e,0xc7,0x13);
-DEFINE_GUID(CLSID_CurrentUserClasses,0x332,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(CLSID_FileProtocol,0x79eac9e7,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(CLSID_FtpProtocol,0x79eac9e3,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(CLSID_GopherProtocol,0x79eac9e4,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(CLSID_HttpProtocol,0x79eac9e2,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(CLSID_HttpSProtocolE5,0xf979eac9,0xceba,0x8c11,0x82,0,0xaa,0,0x4b,0xa9,0xb,0);
-DEFINE_GUID(CLSID_IdentityUnmarshal,0x1b,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(CLSID_InProcFreeMarshaler,0x1c,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(CLSID_LocalMachineClasses,0x331,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(CLSID_MkProtocol,0x79eac9e6,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(CLSID_PSBindCtx,0x312,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(CLSID_PSClassObject0E,0x3,0,0xc000,0,0,0,0,0,0,0x46,0);
-DEFINE_GUID(CLSID_PSClientSite,0x30d,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(CLSID_PSDragDrop,0x311,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(CLSID_PSEnumerators13,0x3,0,0xc000,0,0,0,0,0,0,0x46,0);
-DEFINE_GUID(CLSID_PSGenObject,0x30c,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(CLSID_PSInPlaceActive,0x30f,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(CLSID_PSInPlaceFrame,0x310,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(CLSID_PSUrlMonProxyF1,0xf979eac9,0xceba,0x8c11,0x82,0,0xaa,0,0x4b,0xa9,0xb,0);
-DEFINE_GUID(CLSID_PersistPropset,0xfb8f0821,0x164,0x101b,0x84,0xed,0x8,0,0x2b,0x2e,0xc7,0x13);
-DEFINE_GUID(CLSID_Picture_Dib,0x316,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(CLSID_Picture_EnhMetafile,0x319,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(CLSID_Picture_Metafile,0x315,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(CLSID_StaticDib,0x316,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(CLSID_StaticMetafile,0x315,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(CLSID_StdComponentCategoriesMgr,0x2e005,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(CLSID_StdFont,0xbe35203,0x8f91,0x11ce,0x9d,0xe3,0,0xaa,0,0x4b,0xb8,0x51);
-DEFINE_GUID(CLSID_StdHlink,0x79eac9d0,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(CLSID_StdHlinkBrowseContext,0x79eac9d1,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(CLSID_StdMarshal,0x17,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(CLSID_StdPicture,0xbe35204,0x8f91,0x11ce,0x9d,0xe3,0,0xaa,0,0x4b,0xb8,0x51);
-DEFINE_GUID(CLSID_StdURLMonikerE0,0xf979eac9,0xceba,0x8c11,0x82,0,0xaa,0,0x4b,0xa9,0xb,0);
-DEFINE_GUID(CLSID_StdURLProtocol,0x79eac9e1,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(FLAGID_Internet,0x96300da0,0x2bab,0x11cf,0xa2,0x29,0,0xaa,0,0x3d,0x73,0x52);
-DEFINE_GUID(FMTID_DocSummaryInformation,0xd5cdd502,0x2e9c,0x101b,0x93,0x97,0x8,0,0x2b,0x2c,0xf9,0xae);
-DEFINE_GUID(FMTID_SummaryInformation,0xf29f85e0,0x4ff9,0x1068,0xab,0x91,0x8,0,0x2b,0x27,0xb3,0xd9);
-DEFINE_GUID(FMTID_UserDefinedProperties,0xd5cdd505,0x2e9c,0x101b,0x93,0x97,0x8,0,0x2b,0x2c,0xf9,0xae);
-DEFINE_GUID(GUID_CHECKVALUEEXCLUSIVE,0x6650430c,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(GUID_COLOR,0x66504301,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(GUID_FONTBOLD,0x6650430f,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(GUID_FONTITALIC,0x66504310,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(GUID_FONTNAME,0x6650430d,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(GUID_FONTSIZE,0x6650430e,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(GUID_FONTSTRIKETHROUGH,0x66504312,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(GUID_FONTUNDERSCORE,0x66504311,0xBE0F,0x101A,0x8B,0xBB,0x00,0xAA,0x00,0x30,0x0C,0xAB);
-DEFINE_GUID(GUID_FONTUNDERSCORE11,0xf665043,0x1abe,0x8b10,0xbb,0,0xaa,0,0x30,0xc,0xab,0);
-DEFINE_GUID(GUID_HANDLE,0x66504313,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(GUID_HIMETRIC,0x66504300,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(GUID_HasPathProperties,0x2de81,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
-DEFINE_GUID(GUID_OPTIONVALUEEXCLUSIVE,0x6650430b,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(GUID_PathProperty,0x2de80,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(GUID_TRISTATE,0x6650430a,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(GUID_XPOS,0x66504306,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(GUID_XPOSPIXEL,0x66504302,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(GUID_XSIZE,0x66504308,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(GUID_XSIZEPIXEL,0x66504304,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(GUID_YPOS,0x66504307,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(GUID_YPOSPIXEL,0x66504303,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(GUID_YSIZE,0x66504309,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(GUID_YSIZEPIXEL,0x66504305,0xbe0f,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-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);
-DEFINE_GUID(IID_IAdviseSink,0x10f,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IAdviseSink2,0x125,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IAdviseSinkEx,0x3af24290,0xc96,0x11ce,0xa0,0xcf,0,0xaa,0,0x60,0xa,0xb8);
-DEFINE_GUID(IID_IAsyncMoniker,0x79eac9d3,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);
-DEFINE_GUID(IID_IBindCtx,0xe,0,0,0xc0,0,0,0,0,0,0,0x46);
-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_ICatInformation13,0x2e0,0,0xc000,0,0,0,0,0,0,0x46,0);
-DEFINE_GUID(IID_ICatRegister,0x2e012,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IChannelHook,0x1008c4a0,0x7613,0x11cf,0x9a,0xf1,0,0x20,0xaf,0x6e,0x72,0xf4);
-DEFINE_GUID(IID_IClassActivator40,0x1,0,0xc000,0,0,0,0,0,0,0x46,0);
-DEFINE_GUID(IID_IClassFactory,0x1,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IClassFactory2,0xb196b28f,0xbab4,0x101a,0xb6,0x9c,0,0xaa,0,0x34,0x1d,0x7);
-DEFINE_GUID(IID_IClientSecurity3D,0x1,0,0xc000,0,0,0,0,0,0,0x46,0);
-DEFINE_GUID(IID_IClientSiteHandler,0xf4f569d1,0x593b,0x101a,0xb5,0x69,0x8,0,0x2b,0x2d,0xbf,0x7a);
-DEFINE_GUID(IID_ICodeInstall,0x79eac9d1,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-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_IContinue,0x12a,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IContinueCallback,0xb722bcca,0x4e68,0x101b,0xa2,0xbc,0,0xaa,0,0x40,0x47,0x70);
-DEFINE_GUID(IID_ICreateErrorInfo,0x22f03340,0x547d,0x101b,0x8e,0x65,0x8,0,0x2b,0x2b,0xd1,0x19);
-DEFINE_GUID(IID_ICreateTypeInfo05,0x204,0,0xc000,0,0,0,0,0,0,0x46,0);
-DEFINE_GUID(IID_ICreateTypeInfo2,0x2040e,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_ICreateTypeLib,0x20406,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_ICreateTypeLib20F,0x204,0,0xc000,0,0,0,0,0,0,0x46,0);
-DEFINE_GUID(IID_IDataAdviseHolder,0x110,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IDataObject,0x10e,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IDebug,0x123,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IDebugStream,0x124,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IDfReserved1,0x13,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IDfReserved2,0x14,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IDfReserved3,0x15,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IDispatch,0x20400,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IDropSource,0x121,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IDropTarget,0x122,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IEnumCATEGORYINFO,0x2e011,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IEnumCallback,0x108,0,0,0xc0,0,0,0,0,0,0,0x46);
-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_IEnumFORMATETC,0x103,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IEnumGUID,0x2e000,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IEnumGeneric,0x106,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IEnumHLITEM,0x79eac9c6,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(IID_IEnumHolder,0x107,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IEnumMoniker,0x102,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IEnumOLEVERB,0x104,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IEnumOleDocumentViews,0xb722bcc8,0x4e68,0x101b,0xa2,0xbc,0,0xaa,0,0x40,0x47,0x70);
-DEFINE_GUID(IID_IEnumOleUndoUnits,0xb3e7c340,0xef97,0x11ce,0x9b,0xc9,0,0xaa,0,0x60,0x8e,0x1);
-DEFINE_GUID(IID_IEnumSTATDATA,0x105,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IEnumSTATPROPSETSTG,0x13b,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IEnumSTATPROPSTG,0x139,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IEnumSTATSTG,0xd,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IEnumSTATURL,0x3c374a42,0xbae4,0x11cf,0xbf,0x7d,0,0xaa,0,0x69,0x46,0xee);
-DEFINE_GUID(IID_IEnumString,0x101,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IEnumUnknown,0x100,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IEnumVARIANT,0x20404,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IErrorInfo,0x1cf2b120,0x547d,0x101b,0x8e,0x65,0x8,0,0x2b,0x2b,0xd1,0x19);
-DEFINE_GUID(IID_IErrorLog,0x3127ca40,0x446e,0x11ce,0x81,0x35,0,0xaa,0,0x4b,0xb8,0x51);
-DEFINE_GUID(IID_IExternalConnection,0x19,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IFillLockBytes,0x99caf010,0x415e,0x11cf,0x88,0x14,0,0xaa,0,0xb5,0x69,0xf5);
-DEFINE_GUID(IID_IFilter,0x89bcb740,0x6119,0x101a,0xbc,0xb7,0,0xdd,0x1,0x6,0x55,0xaf);
-DEFINE_GUID(IID_IFont,0xbef6e002,0xa874,0x101a,0x8b,0xba,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(IID_IFontDisp,0xbef6e003,0xa874,0x101a,0x8b,0xba,0,0xaa,0,0x30,0xc,0xab);
-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);
-DEFINE_GUID(IID_IHttpNegotiate,0x79eac9d2,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(IID_IHttpSecurity,0x79eac9d7,0xbafa,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(IID_IInternalMoniker,0x11,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_ILayoutStorage,0xe6d4d90,0x6738,0x11cf,0x96,0x8,0,0xaa,0,0x68,0xd,0xb4);
-DEFINE_GUID(IID_ILockBytes,0xa,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IMalloc,0x2,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IMallocSpy,0x1d,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IMarshal,0x3,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IMessageFilter,0x16,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IMimeInfo,0xf77459a0,0xbf9a,0x11cf,0xba,0x4e,0,0xc0,0x4f,0xd7,0x8,0x16);
-DEFINE_GUID(IID_IMoniker,0xf,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IMultiQI,0x20,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IObjectSafety,0xcb5bdc81,0x93c1,0x11cf,0x8f,0x20,0,0x80,0x5f,0x2c,0xd0,0x64);
-DEFINE_GUID(IID_IObjectWithSiteA3,0xa9fc4801,0xcf2b,0xa211,0x29,0,0xaa,0,0x3d,0x73,0x52,0);
-DEFINE_GUID(IID_IOleAdviseHolder,0x111,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IOleCache,0x11e,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IOleCache2,0x128,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IOleCacheControl,0x129,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IOleClientSite,0x118,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IOleCommandTarget,0xb722bccb,0x4e68,0x101b,0xa2,0xbc,0,0xaa,0,0x40,0x47,0x70);
-DEFINE_GUID(IID_IOleContainer,0x11b,0,0,0xc0,0,0,0,0,0,0,0x46);
-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_IOleControlSite89,0xb4b196b2,0x1aba,0xb610,0x9c,0,0xaa,0,0x34,0x1d,0x7,0);
-DEFINE_GUID(IID_IOleDocument,0xb722bcc5,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_IOleDocumentView,0xb722bcc6,0x4e68,0x101b,0xa2,0xbc,0,0xaa,0,0x40,0x47,0x70);
-DEFINE_GUID(IID_IOleInPlaceActiveObject,0x117,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IOleInPlaceFrame,0x116,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IOleInPlaceObject,0x113,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IOleInPlaceObjectWindowless,0x1c2056cc,0x5ef4,0x101b,0x8b,0xc8,0,0xaa,0,0x3e,0x3b,0x29);
-DEFINE_OLEGUID(IID_IOleInPlaceSite,0x00000119,0,0);
-DEFINE_GUID(IID_IOleInPlaceSite19,0x1,0,0xc000,0,0,0,0,0,0,0x46,0);
-DEFINE_GUID(IID_IOleInPlaceSiteEx,0x9c2cad80,0x3424,0x11cf,0xb6,0x70,0,0xaa,0,0x4c,0xd6,0xd8);
-DEFINE_GUID(IID_IOleInPlaceSiteWindowless,0x922eada0,0x3424,0x11cf,0xb6,0x70,0,0xaa,0,0x4c,0xd6,0xd8);
-DEFINE_GUID(IID_IOleInPlaceUIWindow,0x115,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IOleItemContainer,0x11c,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IOleLink,0x11d,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IOleManager,0x11f,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IOleObject,0x112,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IOleParentUndoUnit,0xa1faf330,0xef97,0x11ce,0x9b,0xc9,0,0xaa,0,0x60,0x8e,0x1);
-DEFINE_GUID(IID_IOlePresObj,0x120,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IOleUndoManager00,0x97d001f2,0xceef,0x9b11,0xc9,0,0xaa,0,0x60,0x8e,0x1,0);
-DEFINE_GUID(IID_IOleUndoUnit,0x894ad3b0,0xef97,0x11ce,0x9b,0xc9,0,0xaa,0,0x60,0x8e,0x1);
-DEFINE_GUID(IID_IOleWindow,0x114,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IOverlappedCompletion,0x521a28f0,0xe40b,0x11ce,0xb2,0xc9,0,0xaa,0,0x68,0x9,0x37);
-DEFINE_GUID(IID_IOverlappedStream,0x49384070,0xe40a,0x11ce,0xb2,0xc9,0,0xaa,0,0x68,0x9,0x37);
-DEFINE_GUID(IID_IPSFactory,0x9,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IPSFactoryBuffer,0xd5f569d0,0x593b,0x101a,0xb5,0x69,0x8,0,0x2b,0x2d,0xbf,0x7a);
-DEFINE_GUID(IID_IParseDisplayName,0x11a,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IPerPropertyBrowsing,0x376bd3aa,0x3845,0x101b,0x84,0xed,0x8,0,0x2b,0x2e,0xc7,0x13);
-DEFINE_GUID(IID_IPersist,0x10c,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IPersistFile,0x10b,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IPersistMemory,0xbd1ae5e0,0xa6ae,0x11ce,0xbd,0x37,0x50,0x42,0,0xc1,0,0);
-DEFINE_GUID(IID_IPersistMonikerC9,0xf979eac9,0xceba,0x8c11,0x82,0,0xaa,0,0x4b,0xa9,0xb,0);
-DEFINE_GUID(IID_IPersistPropertyBag,0x37d84f60,0x42cb,0x11ce,0x81,0x35,0,0xaa,0,0x4b,0xb8,0x51);
-DEFINE_OLEGUID(IID_IPersistStorage,0x0000010a,0,0);
-DEFINE_GUID(IID_IPersistStorage0A,0x1,0,0xc000,0,0,0,0,0,0,0x46,0);
-DEFINE_GUID(IID_IPersistStream,0x109,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IPersistStreamInit,0x7fd52380,0x4e07,0x101b,0xae,0x2d,0x8,0,0x2b,0x2e,0xc7,0x13);
-DEFINE_GUID(IID_IPicture,0x7bf80980,0xbf32,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(IID_IPictureDisp,0x7bf80981,0xbf32,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(IID_IPointerInactive,0x55980ba0,0x35aa,0x11cf,0xb6,0x71,0,0xaa,0,0x4c,0xd6,0xd8);
-DEFINE_GUID(IID_IPrint,0xb722bcc9,0x4e68,0x101b,0xa2,0xbc,0,0xaa,0,0x40,0x47,0x70);
-DEFINE_GUID(IID_IProgressNotifyA0,0x17a9d758,0xcf46,0x9511,0xfc,0,0xaa,0,0x68,0xd,0xb4,0);
-DEFINE_GUID(IID_IPropertyBag,0x55272a00,0x42cb,0x11ce,0x81,0x35,0,0xaa,0,0x4b,0xb8,0x51);
-DEFINE_GUID(IID_IPropertyFrame,0xb196b28a,0xbab4,0x101a,0xb6,0x9c,0,0xaa,0,0x34,0x1d,0x7);
-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_IPropertySetStorage,0x13a,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IPropertyStorage,0x138,0,0,0xc0,0,0,0,0,0,0,0x46);
-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_IProxy,0x27,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IProxyManager,0x8,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IQuickActivate,0xcf51ed10,0x62fe,0x11cf,0xbf,0x86,0,0xa0,0xc9,0x3,0x48,0x36);
-DEFINE_GUID(IID_IROTData,0xf29f6bc0,0x5021,0x11ce,0xaa,0x15,0,0,0x69,0x1,0x29,0x3f);
-DEFINE_GUID(IID_IRichEditOle,0x20d00,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IRichEditOleCallback,0x20d03,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IRootStorage,0x12,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IRpcChannel,0x4,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IRpcChannelBuffer,0xd5f56b60,0x593b,0x101a,0xb5,0x69,0x8,0,0x2b,0x2d,0xbf,0x7a);
-DEFINE_GUID(IID_IRpcProxy,0x7,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IRpcProxyBuffer34,0x3bd5f56a,0x1a59,0xb510,0x69,0x8,0,0x2b,0x2d,0xbf,0x7a,0);
-DEFINE_GUID(IID_IRpcStub,0x5,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IRpcStubBuffer,0xd5f56afc,0x593b,0x101a,0xb5,0x69,0x8,0,0x2b,0x2d,0xbf,0x7a);
-DEFINE_OLEGUID(IID_IRunnableObject,0x00000126,0,0);
-DEFINE_GUID(IID_IRunnableObject26,0x1,0,0xc000,0,0,0,0,0,0,0x46,0);
-DEFINE_GUID(IID_IRunningObjectTable,0x10,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_ISequentialStream,0xc733a30,0x2a1c,0x11ce,0xad,0xe5,0,0xaa,0,0x44,0x77,0x3d);
-DEFINE_GUID(IID_IServerHandler,0xf4f569d0,0x593b,0x101a,0xb5,0x69,0x8,0,0x2b,0x2d,0xbf,0x7a);
-DEFINE_GUID(IID_IServerSecurity3E,0x1,0,0xc000,0,0,0,0,0,0,0x46,0);
-DEFINE_GUID(IID_IServiceProvider,0x6d5140c1,0x7436,0x11ce,0x80,0x34,0,0xaa,0,0x60,0x9,0xfa);
-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);
-DEFINE_OLEGUID(IID_IStdMarshalInfo,24,0,0);
-DEFINE_GUID(IID_IStdMarshalInfo18,0,0,0xc000,0,0,0,0,0,0,0x46,0);
-DEFINE_GUID(IID_IStorage,0xb,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IStream,0xc,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IStub,0x26,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IStubManager,0x6,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_ISupportErrorInfo,0xdf0b3d60,0x548f,0x101b,0x8e,0x65,0x8,0,0x2b,0x2b,0xd1,0x19);
-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_GUID(IID_ITypeChangeEvents,0x20410,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_ITypeComp,0x20403,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_ITypeInfo,0x20401,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_ITypeInfo2,0x20412,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_ITypeLib,0x20402,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_ITypeLib2,0x20411,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IUnknown,0,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IUrlHistoryStg,0x3c374a41,0xbae4,0x11cf,0xbf,0x7d,0,0xaa,0,0x69,0x46,0xee);
-DEFINE_GUID(IID_IViewObject,0x10d,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IViewObject2,0x127,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(IID_IViewObjectEx,0x3af24292,0xc96,0x11ce,0xa0,0xcf,0,0xaa,0,0x60,0xa,0xb8);
-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_GUID(IID_IWindowForBindingUI,0x79eac9d5,0xbafa,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(IID_StdOle,0x20430,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_ALLIMAGE,0x2de0e,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_ALLMM,0x2de18,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_ALLTEXT,0x2de1e,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_ANSITEXT,0x2de19,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_AVI,0x2de0f,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_BASICAUDIO,0x2de12,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_BIFF,0x2de21,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_BMP,0x2de01,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_CGM,0x2de0b,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_COMMONIMAGE,0x2de0d,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_DIB,0x2de02,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_DIF,0x2de1f,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_ENHMF,0x2de04,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_EPS,0x2de0c,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_GIF,0x2de05,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_HTML,0x2de1c,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_JPEG,0x2de06,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_MIDI,0x2de13,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_MPEG,0x2de10,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_PALETTE,0x2de22,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_PCX,0x2de09,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_PENDATA,0x2de23,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_PICT,0x2de0a,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_POSTSCRIPT,0x2de1d,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_QUICKTIME,0x2de11,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_RIFF,0x2de15,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_RTF,0x2de1b,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_SOUND,0x2de16,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_SYLK,0x2de20,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_TIFF,0x2de07,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_UNICODE,0x2de1a,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_VIDEO,0x2de17,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_WAV,0x2de14,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_WMF,0x2de03,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(OLE_DATAPATH_XBM,0x2de08,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(SID_SContainerDispatch,0xb722be00,0x4e68,0x101b,0xa2,0xbc,0,0xaa,0,0x40,0x47,0x70);
-DEFINE_GUID(SID_SDataPathBrowser,0xfc4801a5,0x2ba9,0x11cf,0xa2,0x29,0,0xaa,0,0x3d,0x73,0x52);
diff --git a/winsup/w32api/lib/vdmdbg.def b/winsup/w32api/lib/vdmdbg.def
deleted file mode 100644
index fbd1b4fe6..000000000
--- 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 35a087e5d..000000000
--- 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.def b/winsup/w32api/lib/vfw32.def
deleted file mode 100644
index 62c2ab4aa..000000000
--- a/winsup/w32api/lib/vfw32.def
+++ /dev/null
@@ -1,131 +0,0 @@
-LIBRARY VFW32.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
-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
-DllGetClassObject@12
-DllCanUnloadNow@0
-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
-videoThunk32@20
-capGetDriverDescriptionW@20
-capGetDriverDescriptionA@20
-capCreateCaptureWindowW@32
-capCreateCaptureWindowA@32
-AppCleanup@4
diff --git a/winsup/w32api/lib/win32spl.def b/winsup/w32api/lib/win32spl.def
deleted file mode 100644
index ea00cad1c..000000000
--- 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 8ad4d06f0..000000000
--- a/winsup/w32api/lib/wininet.def
+++ /dev/null
@@ -1,159 +0,0 @@
-; Which header declares the functions not in wininet?
-LIBRARY WININET.DLL
-EXPORTS
-CommitUrlCacheEntryA@44
-CommitUrlCacheEntryW@44
-CreateUrlCacheContainerA@32
-CreateUrlCacheContainerW@32
-CreateUrlCacheEntryA@20
-CreateUrlCacheEntryW@20
-CreateUrlCacheGroup@8
-DeleteIE3Cache@16
-DeleteUrlCacheContainerA@8
-DeleteUrlCacheContainerW@8
-DeleteUrlCacheEntry@4
-DeleteUrlCacheGroup@16
-FindCloseUrlCache@4
-FindFirstUrlCacheContainerA@16
-FindFirstUrlCacheContainerW@16
-FindFirstUrlCacheEntryA@12
-FindFirstUrlCacheEntryExA@40
-FindFirstUrlCacheEntryExW@40
-FindFirstUrlCacheEntryW@12
-FindNextUrlCacheContainerA@12
-FindNextUrlCacheContainerW@12
-FindNextUrlCacheEntryA@12
-FindNextUrlCacheEntryExA@24
-FindNextUrlCacheEntryExW@24
-FindNextUrlCacheEntryW@12
-FreeUrlCacheSpaceA@12
-FreeUrlCacheSpaceW@12
-FtpCreateDirectoryA@8
-FtpCreateDirectoryW@8
-FtpDeleteFileA@8
-FtpDeleteFileW@8
-FtpFindFirstFileA@20
-FtpFindFirstFileW@20
-FtpGetCurrentDirectoryA@12
-FtpGetCurrentDirectoryW@12
-FtpGetFileA@28
-FtpGetFileW@28
-FtpOpenFileA@20
-FtpOpenFileW@20
-FtpPutFileA@20
-FtpPutFileW@20
-FtpRemoveDirectoryA@8
-FtpRemoveDirectoryW@8
-FtpRenameFileA@12
-FtpRenameFileW@12
-FtpSetCurrentDirectoryA@8
-FtpSetCurrentDirectoryW@8
-GetUrlCacheConfigInfoA@12
-GetUrlCacheConfigInfoW@12
-GetUrlCacheEntryInfoA@12
-GetUrlCacheEntryInfoExA@28
-GetUrlCacheEntryInfoExW@28
-GetUrlCacheEntryInfoW@12
-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
-HttpEndRequestA@16
-HttpEndRequestW@16
-HttpOpenRequestA@32
-HttpOpenRequestW@32
-HttpQueryInfoA@20
-HttpQueryInfoW@20
-HttpSendRequestA@20
-HttpSendRequestExA@20
-HttpSendRequestExW@20
-HttpSendRequestW@20
-IncrementUrlCacheHeaderData@8
-InternetAttemptConnect@4
-InternetAutodial@8
-InternetAutodialCallback@8
-InternetAutodialHangup@4
-InternetCanonicalizeUrlA@16
-InternetCanonicalizeUrlW@16
-InternetCheckConnectionA@12
-InternetCheckConnectionW@12
-InternetCloseHandle@4
-InternetCombineUrlA@20
-InternetCombineUrlW@20
-InternetConfirmZoneCrossing@16
-InternetConnectA@32
-InternetConnectW@32
-InternetCrackUrlA@16
-InternetCrackUrlW@16
-InternetCreateUrlA@16
-InternetCreateUrlW@16
-InternetDebugGetLocalTime@8
-InternetDial@20
-InternetErrorDlg@20
-InternetFindNextFileA@8
-InternetFindNextFileW@8
-InternetGetCertByURL@12
-InternetGetConnectedState@8
-InternetGetCookieA@16
-InternetGetCookieW@16
-InternetGetLastResponseInfoA@12
-InternetGetLastResponseInfoW@12
-InternetGoOnline@12
-InternetHangUp@8
-InternetLockRequestFile@8
-InternetOpenA@20
-InternetOpenUrlA@24
-InternetOpenUrlW@24
-InternetOpenW@20
-InternetQueryDataAvailable@16
-InternetQueryOptionA@16
-InternetQueryOptionW@16
-InternetReadFile@16
-InternetReadFileExA@16
-InternetReadFileExW@16
-InternetSetCookieA@12
-InternetSetCookieW@12
-InternetSetDialState@12
-InternetSetFilePointer@20
-InternetSetOptionA@16
-InternetSetOptionExA@20
-InternetSetOptionExW@20
-InternetSetOptionW@16
-InternetSetStatusCallback@8
-InternetShowSecurityInfoByURL@8
-InternetTimeFromSystemTime@16
-InternetTimeToSystemTime@12
-InternetUnlockRequestFile@4
-InternetWriteFile@16
-InternetWriteFileExA@16
-InternetWriteFileExW@16
-IsHostInProxyBypassList@12
-LoadUrlCacheContent@0
-ParseX509EncodedCertificateForListBoxEntry@16
-ReadUrlCacheEntryStream@20
-RetrieveUrlCacheEntryFileA@16
-RetrieveUrlCacheEntryFileW@16
-RetrieveUrlCacheEntryStreamA@20
-RetrieveUrlCacheEntryStreamW@20
-RunOnceUrlCache@16
-SetUrlCacheConfigInfoA@8
-SetUrlCacheConfigInfoW@8
-SetUrlCacheEntryGroup@28
-SetUrlCacheEntryInfoA@12
-SetUrlCacheEntryInfoW@12
-SetUrlCacheHeaderData@8
-ShowClientAuthCerts@4
-ShowSecurityInfo@8
-ShowX509EncodedCertificate@12
-UnlockUrlCacheEntryFile@8
-UnlockUrlCacheEntryStream@8
-UpdateUrlCacheContentPath@4
diff --git a/winsup/w32api/lib/winmm.def b/winsup/w32api/lib/winmm.def
deleted file mode 100644
index 4de3638e5..000000000
--- 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 367869c6a..000000000
--- a/winsup/w32api/lib/winspool.def
+++ /dev/null
@@ -1,131 +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
-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 27531a0b9..000000000
--- 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/wow32.def b/winsup/w32api/lib/wow32.def
deleted file mode 100644
index cd814c633..000000000
--- 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.def b/winsup/w32api/lib/ws2_32.def
deleted file mode 100644
index f78313e21..000000000
--- a/winsup/w32api/lib/ws2_32.def
+++ /dev/null
@@ -1,108 +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
-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
-gethostbyaddr@12
-gethostbyname@4
-gethostname@8
-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/wsock32.def b/winsup/w32api/lib/wsock32.def
deleted file mode 100644
index 67a8a750f..000000000
--- 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 e80170ada..000000000
--- a/winsup/w32api/lib/wst.def
+++ /dev/null
@@ -1,3 +0,0 @@
-LIBRARY WST.DLL
-EXPORTS
-_penter