Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r--winsup/cygwin/include/a.out.h455
-rw-r--r--winsup/cygwin/include/arpa/ftp.h109
-rw-r--r--winsup/cygwin/include/arpa/inet.h37
-rwxr-xr-xwinsup/cygwin/include/arpa/nameser.h563
-rwxr-xr-xwinsup/cygwin/include/arpa/nameser_compat.h188
-rw-r--r--winsup/cygwin/include/arpa/telnet.h322
-rw-r--r--winsup/cygwin/include/asm/byteorder.h88
-rw-r--r--winsup/cygwin/include/asm/socket.h76
-rw-r--r--winsup/cygwin/include/asm/types.h23
-rw-r--r--winsup/cygwin/include/attr/xattr.h46
-rw-r--r--winsup/cygwin/include/bits/endian.h25
-rw-r--r--winsup/cygwin/include/bits/wordsize.h11
-rw-r--r--winsup/cygwin/include/byteswap.h39
-rw-r--r--winsup/cygwin/include/cygwin/_types.h16
-rw-r--r--winsup/cygwin/include/cygwin/acl.h93
-rw-r--r--winsup/cygwin/include/cygwin/config.h102
-rw-r--r--winsup/cygwin/include/cygwin/core_dump.h73
-rw-r--r--winsup/cygwin/include/cygwin/cygwin_dll.h98
-rw-r--r--winsup/cygwin/include/cygwin/fs.h24
-rw-r--r--winsup/cygwin/include/cygwin/grp.h44
-rw-r--r--winsup/cygwin/include/cygwin/hdreg.h24
-rw-r--r--winsup/cygwin/include/cygwin/icmp.h1
-rw-r--r--winsup/cygwin/include/cygwin/if.h125
-rw-r--r--winsup/cygwin/include/cygwin/in.h271
-rw-r--r--winsup/cygwin/include/cygwin/in6.h127
-rw-r--r--winsup/cygwin/include/cygwin/in_systm.h34
-rw-r--r--winsup/cygwin/include/cygwin/ipc.h72
-rw-r--r--winsup/cygwin/include/cygwin/kd.h20
-rw-r--r--winsup/cygwin/include/cygwin/msg.h102
-rw-r--r--winsup/cygwin/include/cygwin/mtio.h316
-rw-r--r--winsup/cygwin/include/cygwin/rdevio.h42
-rw-r--r--winsup/cygwin/include/cygwin/sem.h128
-rw-r--r--winsup/cygwin/include/cygwin/shm.h109
-rw-r--r--winsup/cygwin/include/cygwin/signal.h407
-rw-r--r--winsup/cygwin/include/cygwin/socket.h323
-rw-r--r--winsup/cygwin/include/cygwin/sockios.h1
-rw-r--r--winsup/cygwin/include/cygwin/stat.h82
-rw-r--r--winsup/cygwin/include/cygwin/stdlib.h91
-rw-r--r--winsup/cygwin/include/cygwin/sys_time.h27
-rw-r--r--winsup/cygwin/include/cygwin/sysproto.h94
-rw-r--r--winsup/cygwin/include/cygwin/time.h42
-rw-r--r--winsup/cygwin/include/cygwin/types.h225
-rw-r--r--winsup/cygwin/include/cygwin/utmp.h40
-rw-r--r--winsup/cygwin/include/cygwin/version.h541
-rw-r--r--winsup/cygwin/include/cygwin/wait.h44
-rw-r--r--winsup/cygwin/include/dlfcn.h51
-rw-r--r--winsup/cygwin/include/elf.h41
-rw-r--r--winsup/cygwin/include/endian.h77
-rw-r--r--winsup/cygwin/include/err.h33
-rw-r--r--winsup/cygwin/include/error.h36
-rw-r--r--winsup/cygwin/include/fcntl.h55
-rw-r--r--winsup/cygwin/include/features.h35
-rwxr-xr-xwinsup/cygwin/include/fenv.h177
-rw-r--r--winsup/cygwin/include/fnmatch.h63
-rw-r--r--winsup/cygwin/include/fts.h147
-rw-r--r--winsup/cygwin/include/ftw.h63
-rw-r--r--winsup/cygwin/include/getopt.h92
-rw-r--r--winsup/cygwin/include/glob.h111
-rw-r--r--winsup/cygwin/include/icmp.h1
-rw-r--r--winsup/cygwin/include/ifaddrs.h57
-rw-r--r--winsup/cygwin/include/inttypes.h274
-rw-r--r--winsup/cygwin/include/io.h30
-rw-r--r--winsup/cygwin/include/lastlog.h22
-rw-r--r--winsup/cygwin/include/libgen.h23
-rw-r--r--winsup/cygwin/include/limits.h504
-rw-r--r--winsup/cygwin/include/machine/elf.h117
-rw-r--r--winsup/cygwin/include/machine/stdlib.h22
-rw-r--r--winsup/cygwin/include/mapi.h102
-rw-r--r--winsup/cygwin/include/memory.h17
-rw-r--r--winsup/cygwin/include/mntent.h59
-rw-r--r--winsup/cygwin/include/monetary.h39
-rw-r--r--winsup/cygwin/include/mqueue.h45
-rw-r--r--winsup/cygwin/include/net/if.h16
-rw-r--r--winsup/cygwin/include/netdb.h265
-rw-r--r--winsup/cygwin/include/netinet/in.h28
-rw-r--r--winsup/cygwin/include/netinet/in_systm.h16
-rw-r--r--winsup/cygwin/include/netinet/ip.h253
-rw-r--r--winsup/cygwin/include/netinet/ip6.h352
-rw-r--r--winsup/cygwin/include/netinet/ip_icmp.h16
-rw-r--r--winsup/cygwin/include/netinet/tcp.h137
-rw-r--r--winsup/cygwin/include/netinet/udp.h51
-rw-r--r--winsup/cygwin/include/paths.h35
-rw-r--r--winsup/cygwin/include/poll.h11
-rw-r--r--winsup/cygwin/include/process.h43
-rw-r--r--winsup/cygwin/include/pthread.h215
-rw-r--r--winsup/cygwin/include/pty.h20
-rw-r--r--winsup/cygwin/include/regex.h131
-rwxr-xr-xwinsup/cygwin/include/resolv.h461
-rw-r--r--winsup/cygwin/include/search.h76
-rw-r--r--winsup/cygwin/include/semaphore.h45
-rw-r--r--winsup/cygwin/include/stdint.h290
-rw-r--r--winsup/cygwin/include/sys/acl.h17
-rw-r--r--winsup/cygwin/include/sys/copying.dj41
-rw-r--r--winsup/cygwin/include/sys/cygwin.h435
-rw-r--r--winsup/cygwin/include/sys/dirent.h120
-rw-r--r--winsup/cygwin/include/sys/elf.h41
-rw-r--r--winsup/cygwin/include/sys/elf32.h245
-rw-r--r--winsup/cygwin/include/sys/elf64.h248
-rw-r--r--winsup/cygwin/include/sys/elf_common.h1110
-rw-r--r--winsup/cygwin/include/sys/elf_generic.h88
-rw-r--r--winsup/cygwin/include/sys/file.h55
-rw-r--r--winsup/cygwin/include/sys/ioctl.h69
-rw-r--r--winsup/cygwin/include/sys/ipc.h18
-rw-r--r--winsup/cygwin/include/sys/kd.h20
-rw-r--r--winsup/cygwin/include/sys/lock.h54
-rw-r--r--winsup/cygwin/include/sys/mman.h98
-rw-r--r--winsup/cygwin/include/sys/mount.h58
-rw-r--r--winsup/cygwin/include/sys/msg.h18
-rw-r--r--winsup/cygwin/include/sys/mtio.h18
-rw-r--r--winsup/cygwin/include/sys/param.h71
-rw-r--r--winsup/cygwin/include/sys/poll.h50
-rw-r--r--winsup/cygwin/include/sys/procfs.h18
-rw-r--r--winsup/cygwin/include/sys/quota.h239
-rw-r--r--winsup/cygwin/include/sys/resource.h84
-rw-r--r--winsup/cygwin/include/sys/select.h41
-rw-r--r--winsup/cygwin/include/sys/sem.h18
-rw-r--r--winsup/cygwin/include/sys/shm.h18
-rw-r--r--winsup/cygwin/include/sys/smallprint.h27
-rw-r--r--winsup/cygwin/include/sys/socket.h55
-rw-r--r--winsup/cygwin/include/sys/soundcard.h1287
-rw-r--r--winsup/cygwin/include/sys/statfs.h11
-rw-r--r--winsup/cygwin/include/sys/statvfs.h44
-rw-r--r--winsup/cygwin/include/sys/stdio.h42
-rw-r--r--winsup/cygwin/include/sys/strace.h147
-rw-r--r--winsup/cygwin/include/sys/sysinfo.h44
-rw-r--r--winsup/cygwin/include/sys/syslimits.h20
-rw-r--r--winsup/cygwin/include/sys/syslog.h143
-rw-r--r--winsup/cygwin/include/sys/sysmacros.h42
-rw-r--r--winsup/cygwin/include/sys/sysproto.h18
-rw-r--r--winsup/cygwin/include/sys/termio.h12
-rw-r--r--winsup/cygwin/include/sys/termios.h372
-rw-r--r--winsup/cygwin/include/sys/ttychars.h1
-rw-r--r--winsup/cygwin/include/sys/uio.h38
-rw-r--r--winsup/cygwin/include/sys/un.h29
-rw-r--r--winsup/cygwin/include/sys/utime.h30
-rw-r--r--winsup/cygwin/include/sys/utmp.h54
-rw-r--r--winsup/cygwin/include/sys/utsname.h33
-rw-r--r--winsup/cygwin/include/sys/vfs.h38
-rw-r--r--winsup/cygwin/include/sys/wait.h98
-rw-r--r--winsup/cygwin/include/sys/xattr.h18
-rw-r--r--winsup/cygwin/include/sysexits.h118
-rw-r--r--winsup/cygwin/include/syslog.h16
-rw-r--r--winsup/cygwin/include/termio.h16
-rw-r--r--winsup/cygwin/include/tzfile.h51
-rw-r--r--winsup/cygwin/include/utmpx.h55
-rw-r--r--winsup/cygwin/include/wait.h16
146 files changed, 0 insertions, 16641 deletions
diff --git a/winsup/cygwin/include/a.out.h b/winsup/cygwin/include/a.out.h
deleted file mode 100644
index ad9b5a56f..000000000
--- a/winsup/cygwin/include/a.out.h
+++ /dev/null
@@ -1,455 +0,0 @@
-/* a.out.h
-
- Copyright 1997, 1998, 1999, 2000, 2001, 2013 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _A_OUT_H_
-#define _A_OUT_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-
-#define COFF_IMAGE_WITH_PE
-#define COFF_LONG_SECTION_NAMES
-
-/*** coff information for Intel 386/486 and AMD64. */
-
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- uint16_t f_magic; /* magic number */
- uint16_t f_nscns; /* number of sections */
- uint32_t f_timdat; /* time & date stamp */
- uint32_t f_symptr; /* file pointer to symtab */
- uint32_t f_nsyms; /* number of symtab entries */
- uint16_t f_opthdr; /* sizeof(optional hdr) */
- uint16_t 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
-#define AMD64MAGIC 0x8664
-
-/* 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
-{
- uint16_t magic; /* type of file */
- uint16_t vstamp; /* version stamp */
- uint32_t tsize; /* text size in bytes, padded to FW bdry*/
- uint32_t dsize; /* initialized data " " */
- uint32_t bsize; /* uninitialized data " " */
- uint32_t entry; /* entry pt. */
- uint32_t text_start; /* base of text used for this file */
- uint32_t 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 */
- uint32_t s_paddr; /* physical address, offset
- of last addr in scn */
- uint32_t s_vaddr; /* virtual address */
- uint32_t s_size; /* section size */
- uint32_t s_scnptr; /* file ptr to raw data for section */
- uint32_t s_relptr; /* file ptr to relocation */
- uint32_t s_lnnoptr; /* file ptr to line numbers */
- uint16_t s_nreloc; /* number of relocation entries */
- uint16_t s_nlnno; /* number of line number entries*/
- uint32_t 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 {
- uint32_t l_symndx; /* function name symbol index, iff l_lnno 0 */
- uint32_t l_paddr; /* (physical) address of line number */
- } l_addr;
- uint16_t 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 {
- uint32_t e_zeroes;
- uint32_t e_offset;
- } e;
- } e;
- uint32_t e_value;
- uint16_t e_scnum;
- uint16_t 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 {
- uint32_t x_tagndx; /* str, un, or enum tag indx */
- union {
- struct {
- uint16_t x_lnno; /* declaration line number */
- uint16_t x_size; /* str/union/array size */
- } x_lnsz;
- uint32_t x_fsize; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- uint32_t x_lnnoptr; /* ptr to fcn line # */
- uint32_t 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;
- uint16_t x_tvndx; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- uint32_t x_zeroes;
- uint32_t x_offset;
- } x_n;
- } x_file;
-
- struct {
- uint32_t x_scnlen; /* section length */
- uint16_t x_nreloc; /* # relocation entries */
- uint16_t x_nlinno; /* # line numbers */
- uint32_t x_checksum; /* section COMDAT checksum */
- uint16_t x_associated; /* COMDAT associated section index */
- char x_comdat[1]; /* COMDAT selection number */
- } x_scn;
-
- struct {
- uint32_t x_tvfill; /* tv fill value */
- uint16_t 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
-
-#define IMAGE_FILE_MACHINE_I386 0x014c
-#define IMAGE_FILE_MACHINE_AMD64 0x8664
-
-#define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b
-#define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b
-
-#define IMAGE_SIZEOF_STD_OPTIONAL_HEADER 28
-#define IMAGE_SIZEOF_NT_OPTIONAL32_HEADER 224
-#define IMAGE_SIZEOF_NT_OPTIONAL64_HEADER 240
-
-#define IMAGE_SUBSYSTEM_NATIVE 1
-#define IMAGE_SUBSYSTEM_WINDOWS_GUI 2
-#define IMAGE_SUBSYSTEM_WINDOWS_CUI 3
-
-/* 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 weird in images */
-
-#undef FILHDR
-struct external_PE_filehdr
-{
- /* DOS header fields */
- uint16_t e_magic; /* Magic number, 0x5a4d */
- uint16_t e_cblp; /* Bytes on last page of file, 0x90 */
- uint16_t e_cp; /* Pages in file, 0x3 */
- uint16_t e_crlc; /* Relocations, 0x0 */
- uint16_t e_cparhdr; /* Size of header in paragraphs, 0x4 */
- uint16_t e_minalloc; /* Minimum extra paragraphs needed, 0x0 */
- uint16_t e_maxalloc; /* Maximum extra paragraphs needed, 0xFFFF */
- uint16_t e_ss; /* Initial (relative) SS value, 0x0 */
- uint16_t e_sp; /* Initial SP value, 0xb8 */
- uint16_t e_csum; /* Checksum, 0x0 */
- uint16_t e_ip; /* Initial IP value, 0x0 */
- uint16_t e_cs; /* Initial (relative) CS value, 0x0 */
- uint16_t e_lfarlc; /* File address of relocation table, 0x40 */
- uint16_t e_ovno; /* Overlay number, 0x0 */
- char e_res[4][2]; /* Reserved words, all 0x0 */
- uint16_t e_oemid; /* OEM identifier (for e_oeminfo), 0x0 */
- uint16_t e_oeminfo; /* OEM information; e_oemid specific, 0x0 */
- char e_res2[10][2]; /* Reserved words, all 0x0 */
- uint32_t e_lfanew; /* File address of new exe header, 0x80 */
- char dos_message[16][4]; /* other stuff, always follow DOS header */
- uint32_t nt_signature; /* required NT signature, 0x4550 */
-
- /* From standard header */
-
- uint16_t f_magic; /* magic number */
- uint16_t f_nscns; /* number of sections */
- uint32_t f_timdat; /* time & date stamp */
- uint32_t f_symptr; /* file pointer to symtab */
- uint32_t f_nsyms; /* number of symtab entries */
- uint16_t f_opthdr; /* sizeof(optional hdr) */
- uint16_t f_flags; /* flags */
-};
-
-
-#define FILHDR struct external_PE_filehdr
-#undef FILHSZ
-#define FILHSZ 152
-
-#endif
-
-typedef struct
-{
- uint16_t magic; /* type of file */
- uint16_t vstamp; /* version stamp */
- uint32_t tsize; /* text size in bytes, padded to FW bdry*/
- uint32_t dsize; /* initialized data " " */
- uint32_t bsize; /* uninitialized data " " */
- uint32_t entry; /* entry pt. */
- uint32_t text_start; /* base of text used for this file */
-#ifndef __x86_64__
- uint32_t data_start; /* base of all data used for this file */
-#endif
-
- /* NT extra fields; see internal.h for descriptions */
- uintptr_t ImageBase;
- uint32_t SectionAlignment;
- uint32_t FileAlignment;
- uint16_t MajorOperatingSystemVersion;
- uint16_t MinorOperatingSystemVersion;
- uint16_t MajorImageVersion;
- uint16_t MinorImageVersion;
- uint16_t MajorSubsystemVersion;
- uint16_t MinorSubsystemVersion;
- char Reserved1[4];
- uint32_t SizeOfImage;
- uint32_t SizeOfHeaders;
- uint32_t CheckSum;
- uint16_t Subsystem;
- uint16_t DllCharacteristics;
- uintptr_t SizeOfStackReserve;
- uintptr_t SizeOfStackCommit;
- uintptr_t SizeOfHeapReserve;
- uintptr_t SizeOfHeapCommit;
- uint32_t LoaderFlags;
- uint32_t NumberOfRvaAndSizes;
- /* IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; */
- char DataDirectory[16][2][4]; /* 16 entries, 2 elements/entry, 4 chars */
-
-} PEAOUTHDR;
-
-
-#undef AOUTSZ
-#ifdef __x86_64__
-#define AOUTSZ (AOUTHDRSZ + 212)
-#else
-#define AOUTSZ (AOUTHDRSZ + 196)
-#endif
-
-#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 4a3ee90e2..000000000
--- a/winsup/cygwin/include/arpa/inet.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* arpa/inet.h
-
- Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2005 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _ARPA_INET_H
-#define _ARPA_INET_H
-
-#include <netinet/in.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#ifndef __INSIDE_CYGWIN_NET__
-in_addr_t inet_addr (const char *);
-int inet_aton (const char *, struct in_addr *);
-in_addr_t inet_lnaof (struct in_addr);
-struct in_addr inet_makeaddr (unsigned long , unsigned long);
-in_addr_t inet_netof (struct in_addr);
-in_addr_t inet_network (const char *);
-char *inet_ntoa (struct in_addr);
-int inet_pton (int, const char *, void *);
-const char *inet_ntop (int, const void *, char *, socklen_t);
-#endif
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _ARPA_INET_H */
diff --git a/winsup/cygwin/include/arpa/nameser.h b/winsup/cygwin/include/arpa/nameser.h
deleted file mode 100755
index ddb32302b..000000000
--- a/winsup/cygwin/include/arpa/nameser.h
+++ /dev/null
@@ -1,563 +0,0 @@
-/*
- * Copyright (c) 1983, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1996-1999 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * $Id$
- */
-
-#ifndef _ARPA_NAMESER_H_
-#define _ARPA_NAMESER_H_
-
-#ifdef __CYGWIN__
-#define BSD 199903 /* Used inside the .h file */
-#endif
-
-#define BIND_4_COMPAT
-
-#include <sys/param.h>
-#if (!defined(BSD)) || (BSD < 199306)
-# include <sys/bitypes.h>
-#else
-# include <sys/types.h>
-#endif
-#include <sys/cdefs.h>
-
-/*
- * Revision information. This is the release date in YYYYMMDD format.
- * It can change every day so the right thing to do with it is use it
- * in preprocessor commands such as "#if (__NAMESER > 19931104)". Do not
- * compare for equality; rather, use it to determine whether your libbind.a
- * contains a new enough lib/nameser/ to support the feature you need.
- */
-
-#define __NAMESER 19991006 /* New interface version stamp. */
-
-/*
- * Define constants based on RFC 883, RFC 1034, RFC 1035
- */
-#define NS_PACKETSZ 512 /* maximum packet size */
-#define NS_MAXDNAME 1025 /* maximum domain name */
-#define NS_MAXCDNAME 255 /* maximum compressed domain name */
-#define NS_MAXLABEL 63 /* maximum length of domain label */
-#define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */
-#define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */
-#define NS_RRFIXEDSZ 10 /* #/bytes of fixed data in r record */
-#define NS_INT32SZ 4 /* #/bytes of data in a u_int32_t */
-#define NS_INT16SZ 2 /* #/bytes of data in a u_int16_t */
-#define NS_INT8SZ 1 /* #/bytes of data in a u_int8_t */
-#define NS_INADDRSZ 4 /* IPv4 T_A */
-#define NS_IN6ADDRSZ 16 /* IPv6 T_AAAA */
-#define NS_CMPRSFLGS 0xc0 /* Flag bits indicating name compression. */
-#define NS_DEFAULTPORT 53 /* For both TCP and UDP. */
-
-/*
- * These can be expanded with synonyms, just keep ns_parse.c:ns_parserecord()
- * in synch with it.
- */
-typedef enum __ns_sect {
- ns_s_qd = 0, /* Query: Question. */
- ns_s_zn = 0, /* Update: Zone. */
- ns_s_an = 1, /* Query: Answer. */
- ns_s_pr = 1, /* Update: Prerequisites. */
- ns_s_ns = 2, /* Query: Name servers. */
- ns_s_ud = 2, /* Update: Update. */
- ns_s_ar = 3, /* Query|Update: Additional records. */
- ns_s_max = 4
-} ns_sect;
-
-/*
- * This is a message handle. It is caller allocated and has no dynamic data.
- * This structure is intended to be opaque to all but ns_parse.c, thus the
- * leading _'s on the member names. Use the accessor functions, not the _'s.
- */
-typedef struct __ns_msg {
- const u_char *_msg, *_eom;
- u_int16_t _id, _flags, _counts[ns_s_max];
- const u_char *_sections[ns_s_max];
- ns_sect _sect;
- int _rrnum;
- const u_char *_msg_ptr;
-} ns_msg;
-
-/* Private data structure - do not use from outside library. */
-struct _ns_flagdata { int mask, shift; };
-extern struct _ns_flagdata _ns_flagdata[];
-
-/* Accessor macros - this is part of the public interface. */
-
-#define ns_msg_id(handle) ((handle)._id + 0)
-#define ns_msg_base(handle) ((handle)._msg + 0)
-#define ns_msg_end(handle) ((handle)._eom + 0)
-#define ns_msg_size(handle) ((handle)._eom - (handle)._msg)
-#define ns_msg_count(handle, section) ((handle)._counts[section] + 0)
-
-/*
- * This is a parsed record. It is caller allocated and has no dynamic data.
- */
-typedef struct __ns_rr {
- char name[NS_MAXDNAME];
- u_int16_t type;
- u_int16_t rr_class;
- u_int32_t ttl;
- u_int16_t rdlength;
- const u_char * rdata;
-} ns_rr;
-
-/* Accessor macros - this is part of the public interface. */
-#define ns_rr_name(rr) (((rr).name[0] != '\0') ? (rr).name : ".")
-#define ns_rr_type(rr) ((ns_type)((rr).type + 0))
-#define ns_rr_class(rr) ((ns_class)((rr).rr_class + 0))
-#define ns_rr_ttl(rr) ((rr).ttl + 0)
-#define ns_rr_rdlen(rr) ((rr).rdlength + 0)
-#define ns_rr_rdata(rr) ((rr).rdata + 0)
-
-/*
- * These don't have to be in the same order as in the packet flags word,
- * and they can even overlap in some cases, but they will need to be kept
- * in synch with ns_parse.c:ns_flagdata[].
- */
-typedef enum __ns_flag {
- ns_f_qr, /* Question/Response. */
- ns_f_opcode, /* Operation code. */
- ns_f_aa, /* Authoritative Answer. */
- ns_f_tc, /* Truncation occurred. */
- ns_f_rd, /* Recursion Desired. */
- ns_f_ra, /* Recursion Available. */
- ns_f_z, /* MBZ. */
- ns_f_ad, /* Authentic Data (DNSSEC). */
- ns_f_cd, /* Checking Disabled (DNSSEC). */
- ns_f_rcode, /* Response code. */
- ns_f_max
-} ns_flag;
-
-/*
- * Currently defined opcodes.
- */
-typedef enum __ns_opcode {
- ns_o_query = 0, /* Standard query. */
- ns_o_iquery = 1, /* Inverse query (deprecated/unsupported). */
- ns_o_status = 2, /* Name server status query (unsupported). */
- /* Opcode 3 is undefined/reserved. */
- ns_o_notify = 4, /* Zone change notification. */
- ns_o_update = 5, /* Zone update message. */
- ns_o_max = 6
-} ns_opcode;
-
-/*
- * Currently defined response codes.
- */
-typedef enum __ns_rcode {
- ns_r_noerror = 0, /* No error occurred. */
- ns_r_formerr = 1, /* Format error. */
- ns_r_servfail = 2, /* Server failure. */
- ns_r_nxdomain = 3, /* Name error. */
- ns_r_notimpl = 4, /* Unimplemented. */
- ns_r_refused = 5, /* Operation refused. */
- /* these are for BIND_UPDATE */
- ns_r_yxdomain = 6, /* Name exists */
- ns_r_yxrrset = 7, /* RRset exists */
- ns_r_nxrrset = 8, /* RRset does not exist */
- ns_r_notauth = 9, /* Not authoritative for zone */
- ns_r_notzone = 10, /* Zone of record different from zone section */
- ns_r_max = 11,
- /* The following are TSIG extended errors */
- ns_r_badsig = 16,
- ns_r_badkey = 17,
- ns_r_badtime = 18
-} ns_rcode;
-
-/* BIND_UPDATE */
-typedef enum __ns_update_operation {
- ns_uop_delete = 0,
- ns_uop_add = 1,
- ns_uop_max = 2
-} ns_update_operation;
-
-/*
- * This structure is used for TSIG authenticated messages
- */
-struct ns_tsig_key {
- char name[NS_MAXDNAME], alg[NS_MAXDNAME];
- unsigned char *data;
- int len;
-};
-typedef struct ns_tsig_key ns_tsig_key;
-
-/*
- * This structure is used for TSIG authenticated TCP messages
- */
-struct ns_tcp_tsig_state {
- int counter;
- struct dst_key *key;
- void *ctx;
- unsigned char sig[NS_PACKETSZ];
- int siglen;
-};
-typedef struct ns_tcp_tsig_state ns_tcp_tsig_state;
-
-#define NS_TSIG_FUDGE 300
-#define NS_TSIG_TCP_COUNT 100
-#define NS_TSIG_ALG_HMAC_MD5 "HMAC-MD5.SIG-ALG.REG.INT"
-
-#define NS_TSIG_ERROR_NO_TSIG -10
-#define NS_TSIG_ERROR_NO_SPACE -11
-#define NS_TSIG_ERROR_FORMERR -12
-
-/*
- * Currently defined type values for resources and queries.
- */
-typedef enum __ns_type {
- ns_t_invalid = 0, /* Cookie. */
- ns_t_a = 1, /* Host address. */
- ns_t_ns = 2, /* Authoritative server. */
- ns_t_md = 3, /* Mail destination. */
- ns_t_mf = 4, /* Mail forwarder. */
- ns_t_cname = 5, /* Canonical name. */
- ns_t_soa = 6, /* Start of authority zone. */
- ns_t_mb = 7, /* Mailbox domain name. */
- ns_t_mg = 8, /* Mail group member. */
- ns_t_mr = 9, /* Mail rename name. */
- ns_t_null = 10, /* Null resource record. */
- ns_t_wks = 11, /* Well known service. */
- ns_t_ptr = 12, /* Domain name pointer. */
- ns_t_hinfo = 13, /* Host information. */
- ns_t_minfo = 14, /* Mailbox information. */
- ns_t_mx = 15, /* Mail routing information. */
- ns_t_txt = 16, /* Text strings. */
- ns_t_rp = 17, /* Responsible person. */
- ns_t_afsdb = 18, /* AFS cell database. */
- ns_t_x25 = 19, /* X_25 calling address. */
- ns_t_isdn = 20, /* ISDN calling address. */
- ns_t_rt = 21, /* Router. */
- ns_t_nsap = 22, /* NSAP address. */
- ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */
- ns_t_sig = 24, /* Security signature. */
- ns_t_key = 25, /* Security key. */
- ns_t_px = 26, /* X.400 mail mapping. */
- ns_t_gpos = 27, /* Geographical position (withdrawn). */
- ns_t_aaaa = 28, /* Ip6 Address. */
- ns_t_loc = 29, /* Location Information. */
- ns_t_nxt = 30, /* Next domain (security). */
- ns_t_eid = 31, /* Endpoint identifier. */
- ns_t_nimloc = 32, /* Nimrod Locator. */
- ns_t_srv = 33, /* Server Selection. */
- ns_t_atma = 34, /* ATM Address */
- ns_t_naptr = 35, /* Naming Authority PoinTeR */
- ns_t_kx = 36, /* Key Exchange */
- ns_t_cert = 37, /* Certification record */
- ns_t_a6 = 38, /* IPv6 address (deprecates AAAA) */
- ns_t_dname = 39, /* Non-terminal DNAME (for IPv6) */
- ns_t_sink = 40, /* Kitchen sink (experimentatl) */
- ns_t_opt = 41, /* EDNS0 option (meta-RR) */
- ns_t_tkey = 249, /* Transaction key */
- ns_t_tsig = 250, /* Transaction signature. */
- ns_t_ixfr = 251, /* Incremental zone transfer. */
- ns_t_axfr = 252, /* Transfer zone of authority. */
- ns_t_mailb = 253, /* Transfer mailbox records. */
- ns_t_maila = 254, /* Transfer mail agent records. */
- ns_t_any = 255, /* Wildcard match. */
- ns_t_zxfr = 256, /* BIND-specific, nonstandard. */
- ns_t_max = 65536
-} ns_type;
-
-/* Exclusively a QTYPE? (not also an RTYPE) */
-#define ns_t_qt_p(t) (ns_t_xfr_p(t) || (t) == ns_t_any || \
- (t) == ns_t_mailb || (t) == ns_t_maila)
-/* Some kind of meta-RR? (not a QTYPE, but also not an RTYPE) */
-#define ns_t_mrr_p(t) ((t) == ns_t_tsig || (t) == ns_t_opt)
-/* Exclusively an RTYPE? (not also a QTYPE or a meta-RR) */
-#define ns_t_rr_p(t) (!ns_t_qt_p(t) && !ns_t_mrr_p(t))
-#define ns_t_udp_p(t) ((t) != ns_t_axfr && (t) != ns_t_zxfr)
-#define ns_t_xfr_p(t) ((t) == ns_t_axfr || (t) == ns_t_ixfr || \
- (t) == ns_t_zxfr)
-
-/*
- * Values for class field
- */
-typedef enum __ns_class {
- ns_c_invalid = 0, /* Cookie. */
- ns_c_in = 1, /* Internet. */
- ns_c_2 = 2, /* unallocated/unsupported. */
- ns_c_chaos = 3, /* MIT Chaos-net. */
- ns_c_hs = 4, /* MIT Hesiod. */
- /* Query class values which do not appear in resource records */
- ns_c_none = 254, /* for prereq. sections in update requests */
- ns_c_any = 255, /* Wildcard match. */
- ns_c_max = 65536
-} ns_class;
-
-/* DNSSEC constants. */
-
-typedef enum __ns_key_types {
- ns_kt_rsa = 1, /* key type RSA/MD5 */
- ns_kt_dh = 2, /* Diffie Hellman */
- ns_kt_dsa = 3, /* Digital Signature Standard (MANDATORY) */
- ns_kt_private = 254 /* Private key type starts with OID */
-} ns_key_types;
-
-typedef enum __ns_cert_types {
- cert_t_pkix = 1, /* PKIX (X.509v3) */
- cert_t_spki = 2, /* SPKI */
- cert_t_pgp = 3, /* PGP */
- cert_t_url = 253, /* URL private type */
- cert_t_oid = 254 /* OID private type */
-} ns_cert_types;
-
-/* Flags field of the KEY RR rdata. */
-#define NS_KEY_TYPEMASK 0xC000 /* Mask for "type" bits */
-#define NS_KEY_TYPE_AUTH_CONF 0x0000 /* Key usable for both */
-#define NS_KEY_TYPE_CONF_ONLY 0x8000 /* Key usable for confidentiality */
-#define NS_KEY_TYPE_AUTH_ONLY 0x4000 /* Key usable for authentication */
-#define NS_KEY_TYPE_NO_KEY 0xC000 /* No key usable for either; no key */
-/* The type bits can also be interpreted independently, as single bits: */
-#define NS_KEY_NO_AUTH 0x8000 /* Key unusable for authentication */
-#define NS_KEY_NO_CONF 0x4000 /* Key unusable for confidentiality */
-#define NS_KEY_RESERVED2 0x2000 /* Security is *mandatory* if bit=0 */
-#define NS_KEY_EXTENDED_FLAGS 0x1000 /* reserved - must be zero */
-#define NS_KEY_RESERVED4 0x0800 /* reserved - must be zero */
-#define NS_KEY_RESERVED5 0x0400 /* reserved - must be zero */
-#define NS_KEY_NAME_TYPE 0x0300 /* these bits determine the type */
-#define NS_KEY_NAME_USER 0x0000 /* key is assoc. with user */
-#define NS_KEY_NAME_ENTITY 0x0200 /* key is assoc. with entity eg host */
-#define NS_KEY_NAME_ZONE 0x0100 /* key is zone key */
-#define NS_KEY_NAME_RESERVED 0x0300 /* reserved meaning */
-#define NS_KEY_RESERVED8 0x0080 /* reserved - must be zero */
-#define NS_KEY_RESERVED9 0x0040 /* reserved - must be zero */
-#define NS_KEY_RESERVED10 0x0020 /* reserved - must be zero */
-#define NS_KEY_RESERVED11 0x0010 /* reserved - must be zero */
-#define NS_KEY_SIGNATORYMASK 0x000F /* key can sign RR's of same name */
-#define NS_KEY_RESERVED_BITMASK ( NS_KEY_RESERVED2 | \
- NS_KEY_RESERVED4 | \
- NS_KEY_RESERVED5 | \
- NS_KEY_RESERVED8 | \
- NS_KEY_RESERVED9 | \
- NS_KEY_RESERVED10 | \
- NS_KEY_RESERVED11 )
-#define NS_KEY_RESERVED_BITMASK2 0xFFFF /* no bits defined here */
-
-/* The Algorithm field of the KEY and SIG RR's is an integer, {1..254} */
-#define NS_ALG_MD5RSA 1 /* MD5 with RSA */
-#define NS_ALG_DH 2 /* Diffie Hellman KEY */
-#define NS_ALG_DSA 3 /* DSA KEY */
-#define NS_ALG_DSS NS_ALG_DSA
-#define NS_ALG_EXPIRE_ONLY 253 /* No alg, no security */
-#define NS_ALG_PRIVATE_OID 254 /* Key begins with OID giving alg */
-
-/* Protocol values */
-/* value 0 is reserved */
-#define NS_KEY_PROT_TLS 1
-#define NS_KEY_PROT_EMAIL 2
-#define NS_KEY_PROT_DNSSEC 3
-#define NS_KEY_PROT_IPSEC 4
-#define NS_KEY_PROT_ANY 255
-
-/* Signatures */
-#define NS_MD5RSA_MIN_BITS 512 /* Size of a mod or exp in bits */
-#define NS_MD5RSA_MAX_BITS 2552
- /* Total of binary mod and exp */
-#define NS_MD5RSA_MAX_BYTES ((NS_MD5RSA_MAX_BITS+7/8)*2+3)
- /* Max length of text sig block */
-#define NS_MD5RSA_MAX_BASE64 (((NS_MD5RSA_MAX_BYTES+2)/3)*4)
-#define NS_MD5RSA_MIN_SIZE ((NS_MD5RSA_MIN_BITS+7)/8)
-#define NS_MD5RSA_MAX_SIZE ((NS_MD5RSA_MAX_BITS+7)/8)
-
-#define NS_DSA_SIG_SIZE 41
-#define NS_DSA_MIN_SIZE 213
-#define NS_DSA_MAX_BYTES 405
-
-/* Offsets into SIG record rdata to find various values */
-#define NS_SIG_TYPE 0 /* Type flags */
-#define NS_SIG_ALG 2 /* Algorithm */
-#define NS_SIG_LABELS 3 /* How many labels in name */
-#define NS_SIG_OTTL 4 /* Original TTL */
-#define NS_SIG_EXPIR 8 /* Expiration time */
-#define NS_SIG_SIGNED 12 /* Signature time */
-#define NS_SIG_FOOT 16 /* Key footprint */
-#define NS_SIG_SIGNER 18 /* Domain name of who signed it */
-
-/* How RR types are represented as bit-flags in NXT records */
-#define NS_NXT_BITS 8
-#define NS_NXT_BIT_SET( n,p) (p[(n)/NS_NXT_BITS] |= (0x80>>((n)%NS_NXT_BITS)))
-#define NS_NXT_BIT_CLEAR(n,p) (p[(n)/NS_NXT_BITS] &= ~(0x80>>((n)%NS_NXT_BITS)))
-#define NS_NXT_BIT_ISSET(n,p) (p[(n)/NS_NXT_BITS] & (0x80>>((n)%NS_NXT_BITS)))
-#define NS_NXT_MAX 127
-
-/*
- * Inline versions of get/put short/long. Pointer is advanced.
- */
-#define NS_GET16(s, cp) do { \
- register const u_char *t_cp = (const u_char *)(cp); \
- (s) = ((u_int16_t)t_cp[0] << 8) \
- | ((u_int16_t)t_cp[1]) \
- ; \
- (cp) += NS_INT16SZ; \
-} while (0)
-
-#define NS_GET32(l, cp) do { \
- register const u_char *t_cp = (const u_char *)(cp); \
- (l) = ((u_int32_t)t_cp[0] << 24) \
- | ((u_int32_t)t_cp[1] << 16) \
- | ((u_int32_t)t_cp[2] << 8) \
- | ((u_int32_t)t_cp[3]) \
- ; \
- (cp) += NS_INT32SZ; \
-} while (0)
-
-#define NS_PUT16(s, cp) do { \
- register u_int16_t t_s = (u_int16_t)(s); \
- register u_char *t_cp = (u_char *)(cp); \
- *t_cp++ = t_s >> 8; \
- *t_cp = t_s; \
- (cp) += NS_INT16SZ; \
-} while (0)
-
-#define NS_PUT32(l, cp) do { \
- register u_int32_t t_l = (u_int32_t)(l); \
- register u_char *t_cp = (u_char *)(cp); \
- *t_cp++ = t_l >> 24; \
- *t_cp++ = t_l >> 16; \
- *t_cp++ = t_l >> 8; \
- *t_cp = t_l; \
- (cp) += NS_INT32SZ; \
-} while (0)
-
-/*
- * ANSI C identifier hiding for bind's lib/nameser.
- */
-#define ns_msg_getflag __ns_msg_getflag
-#define ns_get16 __ns_get16
-#define ns_get32 __ns_get32
-#define ns_put16 __ns_put16
-#define ns_put32 __ns_put32
-#define ns_initparse __ns_initparse
-#define ns_skiprr __ns_skiprr
-#define ns_parserr __ns_parserr
-#define ns_sprintrr __ns_sprintrr
-#define ns_sprintrrf __ns_sprintrrf
-#define ns_format_ttl __ns_format_ttl
-#define ns_parse_ttl __ns_parse_ttl
-#define ns_datetosecs __ns_datetosecs
-#define ns_name_ntol __ns_name_ntol
-#define ns_name_ntop __ns_name_ntop
-#define ns_name_pton __ns_name_pton
-#define ns_name_unpack __ns_name_unpack
-#define ns_name_pack __ns_name_pack
-#define ns_name_compress __ns_name_compress
-#define ns_name_uncompress __ns_name_uncompress
-#define ns_name_skip __ns_name_skip
-#define ns_name_rollback __ns_name_rollback
-#define ns_sign __ns_sign
-#define ns_sign_tcp __ns_sign_tcp
-#define ns_sign_tcp_init __ns_sign_tcp_init
-#define ns_find_tsig __ns_find_tsig
-#define ns_verify __ns_verify
-#define ns_verify_tcp __ns_verify_tcp
-#define ns_verify_tcp_init __ns_verify_tcp_init
-#define ns_samedomain __ns_samedomain
-#define ns_subdomain __ns_subdomain
-#define ns_makecanon __ns_makecanon
-#define ns_samename __ns_samename
-
-__BEGIN_DECLS
-int ns_msg_getflag __P((ns_msg, int));
-u_int ns_get16 __P((const u_char *));
-u_long ns_get32 __P((const u_char *));
-void ns_put16 __P((u_int, u_char *));
-void ns_put32 __P((u_long, u_char *));
-int ns_initparse __P((const u_char *, int, ns_msg *));
-int ns_skiprr __P((const u_char *, const u_char *, ns_sect, int));
-int ns_parserr __P((ns_msg *, ns_sect, int, ns_rr *));
-int ns_sprintrr __P((const ns_msg *, const ns_rr *,
- const char *, const char *, char *, size_t));
-int ns_sprintrrf __P((const u_char *, size_t, const char *,
- ns_class, ns_type, u_long, const u_char *,
- size_t, const char *, const char *,
- char *, size_t));
-int ns_format_ttl __P((u_long, char *, size_t));
-int ns_parse_ttl __P((const char *, u_long *));
-u_int32_t ns_datetosecs __P((const char *cp, int *errp));
-int ns_name_ntol __P((const u_char *, u_char *, size_t));
-int ns_name_ntop __P((const u_char *, char *, size_t));
-int ns_name_pton __P((const char *, u_char *, size_t));
-int ns_name_unpack __P((const u_char *, const u_char *,
- const u_char *, u_char *, size_t));
-int ns_name_pack __P((const u_char *, u_char *, int,
- const u_char **, const u_char **));
-int ns_name_uncompress __P((const u_char *, const u_char *,
- const u_char *, char *, size_t));
-int ns_name_compress __P((const char *, u_char *, size_t,
- const u_char **, const u_char **));
-int ns_name_skip __P((const u_char **, const u_char *));
-void ns_name_rollback __P((const u_char *, const u_char **,
- const u_char **));
-int ns_sign __P((u_char *, int *, int, int, void *,
- const u_char *, int, u_char *, int *, time_t));
-int ns_sign_tcp __P((u_char *, int *, int, int,
- ns_tcp_tsig_state *, int));
-int ns_sign_tcp_init __P((void *, const u_char *, int,
- ns_tcp_tsig_state *));
-u_char *ns_find_tsig __P((u_char *, u_char *));
-int ns_verify __P((u_char *, int *, void *,
- const u_char *, int, u_char *, int *,
- time_t *, int));
-int ns_verify_tcp __P((u_char *, int *, ns_tcp_tsig_state *, int));
-int ns_verify_tcp_init __P((void *, const u_char *, int,
- ns_tcp_tsig_state *));
-int ns_samedomain __P((const char *, const char *));
-int ns_subdomain __P((const char *, const char *));
-int ns_makecanon __P((const char *, char *, size_t));
-int ns_samename __P((const char *, const char *));
-__END_DECLS
-
-#ifdef BIND_4_COMPAT
-#include <arpa/nameser_compat.h>
-#endif
-
-#endif /* !_ARPA_NAMESER_H_ */
diff --git a/winsup/cygwin/include/arpa/nameser_compat.h b/winsup/cygwin/include/arpa/nameser_compat.h
deleted file mode 100755
index 9579913be..000000000
--- a/winsup/cygwin/include/arpa/nameser_compat.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/* Copyright (c) 1983, 1989
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * from nameser.h 8.1 (Berkeley) 6/2/93
- * $Id$
- */
-
-#ifndef _ARPA_NAMESER_COMPAT_
-#define _ARPA_NAMESER_COMPAT_
-
-#define __BIND 19950621 /* (DEAD) interface version stamp. */
-
-#include <endian.h>
-
-/*
- * Structure for query header. The order of the fields is machine- and
- * compiler-dependent, depending on the byte/bit order and the layout
- * of bit fields. We use bit fields only in int variables, as this
- * is all ANSI requires. This requires a somewhat confusing rearrangement.
- */
-
-typedef struct {
- unsigned id :16; /* query identification number */
-#if BYTE_ORDER == BIG_ENDIAN
- /* fields in third byte */
- unsigned qr: 1; /* response flag */
- unsigned opcode: 4; /* purpose of message */
- unsigned aa: 1; /* authoritive answer */
- unsigned tc: 1; /* truncated message */
- unsigned rd: 1; /* recursion desired */
- /* fields in fourth byte */
- unsigned ra: 1; /* recursion available */
- unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
- unsigned ad: 1; /* authentic data from named */
- unsigned cd: 1; /* checking disabled by resolver */
- unsigned rcode :4; /* response code */
-#endif
-#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN
- /* fields in third byte */
- unsigned rd :1; /* recursion desired */
- unsigned tc :1; /* truncated message */
- unsigned aa :1; /* authoritive answer */
- unsigned opcode :4; /* purpose of message */
- unsigned qr :1; /* response flag */
- /* fields in fourth byte */
- unsigned rcode :4; /* response code */
- unsigned cd: 1; /* checking disabled by resolver */
- unsigned ad: 1; /* authentic data from named */
- unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
- unsigned ra :1; /* recursion available */
-#endif
- /* remaining bytes */
- unsigned qdcount :16; /* number of question entries */
- unsigned ancount :16; /* number of answer entries */
- unsigned nscount :16; /* number of authority entries */
- unsigned arcount :16; /* number of resource entries */
-} HEADER;
-
-#define PACKETSZ NS_PACKETSZ
-#define MAXDNAME NS_MAXDNAME
-#define MAXCDNAME NS_MAXCDNAME
-#define MAXLABEL NS_MAXLABEL
-#define HFIXEDSZ NS_HFIXEDSZ
-#define QFIXEDSZ NS_QFIXEDSZ
-#define RRFIXEDSZ NS_RRFIXEDSZ
-#define INT32SZ NS_INT32SZ
-#define INT16SZ NS_INT16SZ
-#define INADDRSZ NS_INADDRSZ
-#define IN6ADDRSZ NS_IN6ADDRSZ
-#define INDIR_MASK NS_CMPRSFLGS
-#define NAMESERVER_PORT NS_DEFAULTPORT
-
-#define S_ZONE ns_s_zn
-#define S_PREREQ ns_s_pr
-#define S_UPDATE ns_s_ud
-#define S_ADDT ns_s_ar
-
-#define QUERY ns_o_query
-#define IQUERY ns_o_iquery
-#define STATUS ns_o_status
-#define NS_NOTIFY_OP ns_o_notify
-#define NS_UPDATE_OP ns_o_update
-
-#define NOERROR ns_r_noerror
-#define FORMERR ns_r_formerr
-#define SERVFAIL ns_r_servfail
-#define NXDOMAIN ns_r_nxdomain
-#define NOTIMP ns_r_notimpl
-#define REFUSED ns_r_refused
-#define YXDOMAIN ns_r_yxdomain
-#define YXRRSET ns_r_yxrrset
-#define NXRRSET ns_r_nxrrset
-#define NOTAUTH ns_r_notauth
-#define NOTZONE ns_r_notzone
-/*#define BADSIG ns_r_badsig*/
-/*#define BADKEY ns_r_badkey*/
-/*#define BADTIME ns_r_badtime*/
-
-
-#define DELETE ns_uop_delete
-#define ADD ns_uop_add
-
-#define T_A ns_t_a
-#define T_NS ns_t_ns
-#define T_MD ns_t_md
-#define T_MF ns_t_mf
-#define T_CNAME ns_t_cname
-#define T_SOA ns_t_soa
-#define T_MB ns_t_mb
-#define T_MG ns_t_mg
-#define T_MR ns_t_mr
-#define T_NULL ns_t_null
-#define T_WKS ns_t_wks
-#define T_PTR ns_t_ptr
-#define T_HINFO ns_t_hinfo
-#define T_MINFO ns_t_minfo
-#define T_MX ns_t_mx
-#define T_TXT ns_t_txt
-#define T_RP ns_t_rp
-#define T_AFSDB ns_t_afsdb
-#define T_X25 ns_t_x25
-#define T_ISDN ns_t_isdn
-#define T_RT ns_t_rt
-#define T_NSAP ns_t_nsap
-#define T_NSAP_PTR ns_t_nsap_ptr
-#define T_SIG ns_t_sig
-#define T_KEY ns_t_key
-#define T_PX ns_t_px
-#define T_GPOS ns_t_gpos
-#define T_AAAA ns_t_aaaa
-#define T_LOC ns_t_loc
-#define T_NXT ns_t_nxt
-#define T_EID ns_t_eid
-#define T_NIMLOC ns_t_nimloc
-#define T_SRV ns_t_srv
-#define T_ATMA ns_t_atma
-#define T_NAPTR ns_t_naptr
-#define T_A6 ns_t_a6
-#define T_TSIG ns_t_tsig
-#define T_IXFR ns_t_ixfr
-#define T_AXFR ns_t_axfr
-#define T_MAILB ns_t_mailb
-#define T_MAILA ns_t_maila
-#define T_ANY ns_t_any
-
-#define C_IN ns_c_in
-#define C_CHAOS ns_c_chaos
-#define C_HS ns_c_hs
-/* BIND_UPDATE */
-#define C_NONE ns_c_none
-#define C_ANY ns_c_any
-
-#define GETSHORT NS_GET16
-#define GETLONG NS_GET32
-#define PUTSHORT NS_PUT16
-#define PUTLONG NS_PUT32
-
-#endif /* _ARPA_NAMESER_COMPAT_ */
diff --git a/winsup/cygwin/include/arpa/telnet.h b/winsup/cygwin/include/arpa/telnet.h
deleted file mode 100644
index 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 4f5d7cb59..000000000
--- a/winsup/cygwin/include/asm/byteorder.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* asm/byteorder.h
-
- Copyright 1996, 1998, 2001, 2006, 2009, 2011, 2012 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _I386_BYTEORDER_H
-#define _I386_BYTEORDER_H
-
-#include <_ansi.h>
-#include <stdint.h>
-#include <bits/endian.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef __LITTLE_ENDIAN_BITFIELD
-#define __LITTLE_ENDIAN_BITFIELD
-#endif
-
-extern uint32_t ntohl(uint32_t);
-extern uint16_t ntohs(uint16_t);
-extern uint32_t htonl(uint32_t);
-extern uint16_t htons(uint16_t);
-
-_ELIDABLE_INLINE uint32_t __ntohl(uint32_t);
-_ELIDABLE_INLINE uint16_t __ntohs(uint16_t);
-
-_ELIDABLE_INLINE uint32_t
-__ntohl(uint32_t x)
-{
- __asm__("bswap %0" : "=r" (x) : "0" (x));
- return x;
-}
-
-#define __constant_ntohl(x) \
- ((uint32_t)((((uint32_t)(x) & 0x000000ffU) << 24) | \
- (((uint32_t)(x) & 0x0000ff00U) << 8) | \
- (((uint32_t)(x) & 0x00ff0000U) >> 8) | \
- (((uint32_t)(x) & 0xff000000U) >> 24)))
-
-_ELIDABLE_INLINE uint16_t
-__ntohs(uint16_t x)
-{
- __asm__("xchgb %b0,%h0" /* swap bytes */
- : "=Q" (x)
- : "0" (x));
- return x;
-}
-
-#define __constant_ntohs(x) \
- ((uint16_t)((((uint16_t)(x) & 0x00ff) << 8) | \
- (((uint16_t)(x) & 0xff00) >> 8))) \
-
-#define __htonl(x) __ntohl(x)
-#define __htons(x) __ntohs(x)
-#define __constant_htonl(x) __constant_ntohl(x)
-#define __constant_htons(x) __constant_ntohs(x)
-
-#if defined (__OPTIMIZE__) && !defined (__NO_INLINE__)
-# define ntohl(x) \
-(__builtin_constant_p((long)(x)) ? \
- __constant_ntohl((x)) : \
- __ntohl((x)))
-# define ntohs(x) \
-(__builtin_constant_p((short)(x)) ? \
- __constant_ntohs((x)) : \
- __ntohs((x)))
-# define htonl(x) \
-(__builtin_constant_p((long)(x)) ? \
- __constant_htonl((x)) : \
- __htonl((x)))
-# define htons(x) \
-(__builtin_constant_p((short)(x)) ? \
- __constant_htons((x)) : \
- __htons((x)))
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/winsup/cygwin/include/asm/socket.h b/winsup/cygwin/include/asm/socket.h
deleted file mode 100644
index d5d91f495..000000000
--- a/winsup/cygwin/include/asm/socket.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* asm/socket.h
-
- Copyright 1996, 1997, 1998, 2000, 2001, 2005, 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _ASM_SOCKET_H
-#define _ASM_SOCKET_H
-
-#include <cygwin/if.h>
-
-#define IOCPARM_MASK 0x7f /* parameters must be < 128 bytes */
-#define IOC_VOID 0x20000000 /* no parameters */
-#define IOC_OUT 0x40000000 /* copy out parameters */
-#define IOC_IN 0x80000000 /* copy in parameters */
-
-#define _IO(x,y) (IOC_VOID|(x<<8)|y)
-#define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
-#define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
-
-#define SIOCATMARK _IOR('s', 7, u_long) /* at oob mark? */
-#define FIONREAD _IOR('f', 127, u_long) /* get # bytes to read */
-#define FIONBIO 0x8004667e /* To be compatible with termiost version */
-#define REAL_FIONBIO _IOW('f', 126, u_long) /* set/clear non-blocking i/o */
-#define FIOASYNC _IOW('f', 125, u_long) /* set/clear async i/o */
-#define SIOCSHIWAT _IOW('s', 0, u_long) /* set high watermark */
-#define SIOCGHIWAT _IOR('s', 1, u_long) /* get high watermark */
-#define SIOCSLOWAT _IOW('s', 2, u_long) /* set low watermark */
-#define SIOCGLOWAT _IOR('s', 3, u_long) /* get low watermark */
-
-/* Needed for if queries */
-#define SIOCGIFCONF _IOW('s', 100, struct ifconf) /* get if list */
-#define SIOCGIFFLAGS _IOW('s', 101, struct ifreq) /* Get if flags */
-#define SIOCGIFADDR _IOW('s', 102, struct ifreq) /* Get if addr */
-#define SIOCGIFBRDADDR _IOW('s', 103, struct ifreq) /* Get if broadcastaddr */
-#define SIOCGIFNETMASK _IOW('s', 104, struct ifreq) /* Get if netmask */
-#define SIOCGIFHWADDR _IOW('s', 105, struct ifreq) /* Get hw addr */
-#define SIOCGIFMETRIC _IOW('s', 106, struct ifreq) /* get metric */
-#define SIOCGIFMTU _IOW('s', 107, struct ifreq) /* get MTU size */
-#define SIOCGIFINDEX _IOW('s', 108, struct ifreq) /* get if index */
-#define SIOGIFINDEX SIOCGIFINDEX /* backward compatibility w/ Linux typo. */
-#define SIOCGIFFRNDLYNAM _IOW('s', 109, struct ifreq) /* get friendly if name */
-#define SIOCGIFDSTADDR _IOW('s', 110, struct ifreq) /* Get if dstaddr */
-
-#define SOL_SOCKET 0xffff /* options for socket level */
-
-#define SO_DEBUG 0x0001 /* turn on debugging info recording */
-#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */
-#define SO_REUSEADDR 0x0004 /* allow local address reuse */
-#define SO_KEEPALIVE 0x0008 /* keep connections alive */
-#define SO_DONTROUTE 0x0010 /* just use interface addresses */
-#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */
-#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */
-#define SO_LINGER 0x0080 /* linger on close if data present */
-#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */
-#define SO_DONTLINGER (u_int)(~SO_LINGER)
-#define SO_PEERCRED 0x0200 /* same as getpeereid */
-
-/*
- * Additional options.
- */
-#define SO_SNDBUF 0x1001 /* send buffer size */
-#define SO_RCVBUF 0x1002 /* receive buffer size */
-#define SO_SNDLOWAT 0x1003 /* send low-water mark */
-#define SO_RCVLOWAT 0x1004 /* receive low-water mark */
-#define SO_SNDTIMEO 0x1005 /* send timeout */
-#define SO_RCVTIMEO 0x1006 /* receive timeout */
-#define SO_ERROR 0x1007 /* get error status and clear */
-#define SO_TYPE 0x1008 /* get socket type */
-
-#endif /* _ASM_SOCKET_H */
-
diff --git a/winsup/cygwin/include/asm/types.h b/winsup/cygwin/include/asm/types.h
deleted file mode 100644
index 19cc2ca60..000000000
--- a/winsup/cygwin/include/asm/types.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* asm/types.h
-
- Copyright 1998, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _ASM_TYPES_H
-#define _ASM_TYPES_H
-
-typedef __signed__ char __s8;
-typedef unsigned char __u8;
-
-typedef __signed__ short __s16;
-typedef unsigned short __u16;
-
-typedef __signed__ int __s32;
-typedef unsigned int __u32;
-
-#endif /* _ASM_TYPES_H */
diff --git a/winsup/cygwin/include/attr/xattr.h b/winsup/cygwin/include/attr/xattr.h
deleted file mode 100644
index 421e6871d..000000000
--- a/winsup/cygwin/include/attr/xattr.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* attr/xattr.h
-
- Copyright 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _ATTR_XATTR_H
-#define _ATTR_XATTR_H
-
-#include "_ansi.h"
-#if 0
-/* Per man pages you have to include <sys/types.h> explicitely before
- including <attr/xattr.h>. That's how it works on Linux, too. */
-#include <sys/types.h>
-#endif
-#include <sys/errno.h>
-
-#define XATTR_CREATE 1
-#define XATTR_REPLACE 2
-
-#ifndef ENOATTR
-#define ENOATTR ENODATA
-#endif
-
-_BEGIN_STD_C
-
-ssize_t _EXFUN(getxattr,(const char *, const char *, void *, size_t ));
-ssize_t _EXFUN(lgetxattr,(const char *, const char *, void *, size_t ));
-ssize_t _EXFUN(fgetxattr,(int , const char *, void *, size_t ));
-ssize_t _EXFUN(listxattr,(const char *, char *, size_t ));
-ssize_t _EXFUN(llistxattr,(const char *, char *, size_t ));
-ssize_t _EXFUN(flistxattr,(int , char *, size_t ));
-int _EXFUN(setxattr,(const char *, const char *, const void *, size_t , int ));
-int _EXFUN(lsetxattr,(const char *, const char *, const void *, size_t , int ));
-int _EXFUN(fsetxattr,(int , const char *, const void *, size_t , int ));
-int _EXFUN(removexattr,(const char *, const char *));
-int _EXFUN(lremovexattr,(const char *, const char *));
-int _EXFUN(fremovexattr,(int , const char *));
-
-_END_STD_C
-
-#endif /* _ATTR_XATTR_H */
diff --git a/winsup/cygwin/include/bits/endian.h b/winsup/cygwin/include/bits/endian.h
deleted file mode 100644
index 492932990..000000000
--- a/winsup/cygwin/include/bits/endian.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* bits/endian.h
-
- Copyright 2011 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _BITS_ENDIAN_H_
-#define _BITS_ENDIAN_H_
-
-#ifndef __BIG_ENDIAN
-# define __BIG_ENDIAN 4321
-#endif
-#ifndef __LITTLE_ENDIAN
-# define __LITTLE_ENDIAN 1234
-#endif
-
-#ifndef __BYTE_ORDER
-# define __BYTE_ORDER __LITTLE_ENDIAN
-#endif
-
-#endif /* _BITS_ENDIAN_H_ */
diff --git a/winsup/cygwin/include/bits/wordsize.h b/winsup/cygwin/include/bits/wordsize.h
deleted file mode 100644
index b0ee337f8..000000000
--- a/winsup/cygwin/include/bits/wordsize.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* wordsize.h - Linux compatibility */
-
-#ifndef _WORDSIZE_H
-#define _WORDSIZE_H 1
-#ifdef __x86_64__
-# define __WORDSIZE 64
-# define __WORDSIZE_COMPAT32 1
-#else
-# define __WORDSIZE 32
-#endif
-#endif /*_WORDSIZE_H*/
diff --git a/winsup/cygwin/include/byteswap.h b/winsup/cygwin/include/byteswap.h
deleted file mode 100644
index cd5a726d4..000000000
--- a/winsup/cygwin/include/byteswap.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* byteswap.h
-
-Copyright 2005 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _BYTESWAP_H
-#define _BYTESWAP_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-static __inline unsigned short
-bswap_16 (unsigned short __x)
-{
- return (__x >> 8) | (__x << 8);
-}
-
-static __inline unsigned int
-bswap_32 (unsigned int __x)
-{
- return (bswap_16 (__x & 0xffff) << 16) | (bswap_16 (__x >> 16));
-}
-
-static __inline unsigned long long
-bswap_64 (unsigned long long __x)
-{
- return (((unsigned long long) bswap_32 (__x & 0xffffffffull)) << 32) | (bswap_32 (__x >> 32));
-}
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _BYTESWAP_H */
diff --git a/winsup/cygwin/include/cygwin/_types.h b/winsup/cygwin/include/cygwin/_types.h
deleted file mode 100644
index b96267622..000000000
--- a/winsup/cygwin/include/cygwin/_types.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* cygwin/_types.h
-
- Copyright 2004 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN__TYPES_H
-#define _CYGWIN__TYPES_H
-
-typedef void *_flock_t;
-
-#endif /* _CYGWIN__TYPES_H */
diff --git a/winsup/cygwin/include/cygwin/acl.h b/winsup/cygwin/include/cygwin/acl.h
deleted file mode 100644
index 8fa5a65a5..000000000
--- a/winsup/cygwin/include/cygwin/acl.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* cygwin/acl.h header file for Cygwin.
-
- Copyright 1999, 2000, 2001, 2002, 2010, 2014 Red Hat, Inc.
- Written by C. Vinschen.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_ACL_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define _CYGWIN_ACL_H
-
-#include <_ansi.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-/* Values for `cmd' in calls to acl(2) and facl(2) */
-#define SETACL (0x0)
-#define GETACL (0x1)
-#define GETACLCNT (0x2)
-
-#define MIN_ACL_ENTRIES (3) // minimal acl entries from GETACLCNT
-#define MAX_ACL_ENTRIES (256) // max entries of each type
-
-// Return values of aclcheck(3) in case of error */
-#define GRP_ERROR (0x1)
-#define USER_ERROR (0x2)
-#define CLASS_ERROR (0x3)
-#define OTHER_ERROR (0x4)
-#define DUPLICATE_ERROR (0x5)
-#define ENTRY_ERROR (0x6)
-#define MISS_ERROR (0x7) // which = -1
-#define MEM_ERROR (0x8) // which = -1
-
-// Values for entry type of struct acl
-#define USER_OBJ (0x0001) // owner
-#define USER (0x0002) // additional user
-#define GROUP_OBJ (0x0004) // owning group
-#define GROUP (0x0008) // additional group
-#define CLASS_OBJ (0x0010) // mask entry
-#define OTHER_OBJ (0x0020) // others
-#define ACL_DEFAULT (0x1000) // default flag
-#define DEF_USER_OBJ (ACL_DEFAULT|USER_OBJ) // default owner
-#define DEF_USER (ACL_DEFAULT|USER) // default additional user
-#define DEF_GROUP_OBJ (ACL_DEFAULT|GROUP_OBJ) // default owning group
-#define DEF_GROUP (ACL_DEFAULT|GROUP) // default additional group
-#define DEF_CLASS_OBJ (ACL_DEFAULT|CLASS_OBJ) // default mask entry
-#define DEF_OTHER_OBJ (ACL_DEFAULT|OTHER_OBJ) // default others
-// Values with equivalent meanings
-#define USER_OWNER USER_OBJ
-#define GROUP_OWNER GROUP_OBJ
-#define MASK CLASS_OBJ
-#define OTHER OTHER_OBJ
-
-#ifdef __INSIDE_CYGWIN__
-#ifndef __x86_64__
-typedef struct __acl16 {
- int a_type;
- __uid16_t a_id;
- mode_t a_perm;
-} __aclent16_t;
-#endif
-#endif
-
-typedef struct acl {
- int a_type; /* entry type */
- uid_t a_id; /* UID | GID */
- mode_t a_perm; /* permissions */
-} aclent_t;
-
-#ifndef __INSIDE_CYGWIN__
-int _EXFUN(acl,(const char *path, int cmd, int nentries, aclent_t *aclbufp));
-int _EXFUN(facl,(int fd, int cmd, int nentries, aclent_t *aclbufp));
-int _EXFUN(aclcheck,(aclent_t *aclbufp, int nentries, int *which));
-int _EXFUN(aclsort,(int nentries, int calclass, aclent_t *aclbufp));
-int _EXFUN(acltomode,(aclent_t *aclbufp, int nentries, mode_t *modep));
-int _EXFUN(aclfrommode,(aclent_t *aclbufp, int nentries, mode_t *modep));
-int _EXFUN(acltopbits,(aclent_t *aclbufp, int nentries, mode_t *pbitsp));
-int _EXFUN(aclfrompbits,(aclent_t *aclbufp, int nentries, mode_t *pbitsp));
-char *_EXFUN(acltotext,(aclent_t *aclbufp, int aclcnt));
-aclent_t *_EXFUN(aclfromtext,(char *acltextp, int *aclcnt));
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _CYGWIN_ACL_H */
diff --git a/winsup/cygwin/include/cygwin/config.h b/winsup/cygwin/include/cygwin/config.h
deleted file mode 100644
index d3c68a502..000000000
--- a/winsup/cygwin/include/cygwin/config.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* cygwin/config.h header file for Cygwin.
-
- This wraps Cygwin configuration setting which were in newlib's
- sys/config.h before. This way we can manaage our configuration
- setting without bothering newlib.
-
- Copyright 2003, 2007, 2008, 2009, 2010, 2012, 2013, 2014 Red Hat, Inc.
- Written by C. Vinschen.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_CONFIG_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define _CYGWIN_CONFIG_H
-
-#define __DYNAMIC_REENT__
-
-/* The following provides an inline version of __getreent() for newlib,
- which will be used throughout the library whereever there is a _r
- version of a function that takes _REENT. This saves the overhead
- of a function call for what amounts to a simple computation.
-
- The definition below is essentially equivalent to the one in cygtls.h
- (&_my_tls.local_clib) however it uses a fixed precomputed
- offset rather than dereferencing a field of a structure.
-
- Including tlsoffets.h here in order to get this constant offset
- tls_local_clib is a bit of a hack, but the alternative would require
- dragging the entire definition of struct _cygtls (a large and complex
- Cygwin internal data structure) into newlib. The machinery to
- compute these offsets already exists for the sake of gendef so
- we might as well just use it here. */
-
-#ifdef _COMPILING_NEWLIB
-#ifdef __x86_64__
-#include "../tlsoffsets64.h"
-/* We would like to use just "%gs:8", but on x86_64 gcc uses pc-relative
- addressing and translates "gs:8" into the wrong addressing mode. */
-static inline char *___getreent (void)
-{
- register char *ret;
- __asm __volatile__ ("movq %%gs:8,%0" : "=r" (ret));
- return ret + tls_local_clib;
-}
-#define __getreent() ((struct _reent *) ___getreent())
-#else
-#include "../tlsoffsets.h"
-extern char *_tlsbase __asm__ ("%fs:4");
-#define __getreent() (struct _reent *)(_tlsbase + tls_local_clib)
-#endif
-#endif /* _COMPILING_NEWLIB */
-
-#ifdef __x86_64__
-# define __SYMBOL_PREFIX
-#else
-# define __SYMBOL_PREFIX "_"
-#endif
-#define _SYMSTR(x) __SYMBOL_PREFIX #x
-
-#define __FILENAME_MAX__ 4096 /* Keep in sync with PATH_MAX in limits.h. */
-
-/* The following block of macros is required to build newlib correctly for
- Cygwin. Changing them in applications has no or not the desired effect.
- Just leave them alone. */
-#define _READ_WRITE_RETURN_TYPE _ssize_t
-#define _READ_WRITE_BUFSIZE_TYPE size_t
-#define __LARGE64_FILES 1
-#define __USE_INTERNAL_STAT64 1
-#define __LINUX_ERRNO_EXTENSIONS__ 1
-#define _MB_EXTENDED_CHARSETS_ALL 1
-#define __HAVE_LOCALE_INFO__ 1
-#define __HAVE_LOCALE_INFO_EXTENDED__ 1
-#define _WANT_C99_TIME_FORMATS 1
-#define _GLIBC_EXTENSION 1
-#define _STDIO_BSD_SEMANTICS 1
-#define __TM_GMTOFF tm_gmtoff
-#define __TM_ZONE tm_zone
-
-#if defined(__INSIDE_CYGWIN__) || defined(_COMPILING_NEWLIB)
-#define __EXPORT __declspec(dllexport)
-#define __IMPORT
-#else
-#define __EXPORT
-#define __IMPORT __declspec(dllimport)
-#endif
-
-#ifndef __WCHAR_MAX__
-#define __WCHAR_MAX__ 0xffffu
-#endif
-
-#define DEFAULT_LOCALE "C.UTF-8"
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _CYGWIN_CONFIG_H */
diff --git a/winsup/cygwin/include/cygwin/core_dump.h b/winsup/cygwin/include/cygwin/core_dump.h
deleted file mode 100644
index 57d90b750..000000000
--- a/winsup/cygwin/include/cygwin/core_dump.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* core_dump.h
-
- Copyright 1999, 2000, 2001, 2014 Red Hat, Inc.
-
- Written by Egor Duda <deo@logos-m.ru>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_CORE_DUMP_H
-#define _CYGWIN_CORE_DUMP_H
-
-#include <windows.h>
-
-#define NOTE_INFO_PROCESS 1
-#define NOTE_INFO_THREAD 2
-#define NOTE_INFO_MODULE 3
-
-struct win32_core_process_info
-{
- DWORD pid;
- int signal;
- int command_line_size;
- char command_line[1];
-}
-#ifdef __GNUC__
- __attribute__ ((__packed__))
-#endif
-;
-
-struct win32_core_thread_info
-{
- DWORD tid;
- BOOL is_active_thread;
- CONTEXT thread_context;
-}
-#ifdef __GNUC__
- __attribute__ ((__packed__))
-#endif
-;
-
-struct win32_core_module_info
-{
- void* base_address;
- int module_name_size;
- char module_name[1];
-}
-#ifdef __GNUC__
- __attribute__ ((__packed__))
-#endif
-;
-
-struct win32_pstatus
-{
- unsigned long data_type;
- union
- {
- struct win32_core_process_info process_info;
- struct win32_core_thread_info thread_info;
- struct win32_core_module_info module_info;
- } data ;
-}
-#ifdef __GNUC__
- __attribute__ ((__packed__))
-#endif
-;
-
-typedef struct win32_pstatus win32_pstatus_t ;
-
-#endif /* _CYGWIN_CORE_DUMP_H */
diff --git a/winsup/cygwin/include/cygwin/cygwin_dll.h b/winsup/cygwin/include/cygwin/cygwin_dll.h
deleted file mode 100644
index 908858c17..000000000
--- a/winsup/cygwin/include/cygwin/cygwin_dll.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* cygwin_dll.h
-
- Copyright 1998, 1999, 2000, 2001, 2009, 2011, 2012, 2013, 2014 Red Hat, Inc.
-
-This file is part 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 PVOID cygwin_attach_dll (HMODULE, mainfunc); \
- extern void cygwin_detach_dll (PVOID); \
-CDECL_END \
- \
-static HINSTANCE storedHandle; \
-static DWORD storedReason; \
-static void* storedPtr; \
-int __dynamically_loaded; \
- \
-static int __dllMain (int a __attribute__ ((__unused__)), \
- char **b __attribute__ ((__unused__)), \
- char **c __attribute__ ((__unused__))) \
-{ \
- return Entry (storedHandle, storedReason, storedPtr); \
-} \
- \
-static PVOID 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; \
- __dynamically_loaded = (ptr == NULL); \
- dll_index = cygwin_attach_dll (h, &__dllMain); \
- if (dll_index == (PVOID) -1) \
- ret = 0; \
- } \
- break; \
- \
- case DLL_PROCESS_DETACH: \
- { \
- ret = Entry (h, reason, ptr); \
- if (ret) \
- { \
- cygwin_detach_dll (dll_index); \
- dll_index = (PVOID) -1; \
- } \
- } \
- break; \
- \
- case DLL_THREAD_ATTACH: \
- { \
- ret = Entry (h, reason, ptr); \
- } \
- break; \
- \
- case DLL_THREAD_DETACH: \
- { \
- ret = Entry (h, reason, ptr); \
- } \
- break; \
- } \
- return ret; \
-} \
- \
-/* OBSOLETE: This is only provided for source level compatibility. */ \
-int WINAPI _cygwin_noncygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \
-{ \
- return _cygwin_dll_entry (h, reason, ptr); \
-} \
-
-#endif /* __CYGWIN_CYGWIN_DLL_H__ */
diff --git a/winsup/cygwin/include/cygwin/fs.h b/winsup/cygwin/include/cygwin/fs.h
deleted file mode 100644
index 509b9c555..000000000
--- a/winsup/cygwin/include/cygwin/fs.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* cygwin/fs.h
-
- Copyright 2002, 2003, 2012 Red Hat Inc.
- Written by Chris January <chris@atomice.net>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_FS_H_
-#define _CYGWIN_FS_H_
-
-#define BLKRRPART 0x0000125f
-#define BLKGETSIZE 0x00001260
-#define BLKSSZGET 0x00001268
-#define BLKIOMIN 0x00001278
-#define BLKIOOPT 0x00001279
-#define BLKALIGNOFF 0x0000127a
-#define BLKPBSZGET 0x0000127b
-#define BLKGETSIZE64 0x00041268
-
-#endif
diff --git a/winsup/cygwin/include/cygwin/grp.h b/winsup/cygwin/include/cygwin/grp.h
deleted file mode 100644
index 056c5f618..000000000
--- a/winsup/cygwin/include/cygwin/grp.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* cygwin/grp.h
-
- Copyright 2002, 2011 Red Hat Inc.
- Written by Corinna Vinschen <corinna@vinschen.de>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_GRP_H_
-#define _CYGWIN_GRP_H_
-
-#include <sys/types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __INSIDE_CYGWIN__
-#ifndef __x86_64__
-struct __group16
-{
- char *gr_name;
- char *gr_passwd;
- __gid16_t gr_gid;
- char **gr_mem;
-};
-#endif
-
-struct group * getgrgid32 (gid_t gid);
-struct group * getgrnam32 (const char *name);
-gid_t getgid32 ();
-gid_t getegid32 ();
-#endif
-
-extern int getgrouplist (const char *, gid_t, gid_t *, int *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CYGWIN_GRP_H_ */
diff --git a/winsup/cygwin/include/cygwin/hdreg.h b/winsup/cygwin/include/cygwin/hdreg.h
deleted file mode 100644
index dc8157838..000000000
--- a/winsup/cygwin/include/cygwin/hdreg.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* cygwin/hdreg.h
-
- Copyright 2002 Red Hat Inc.
- Written by Chris January <chris@atomice.net>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_HDREG_H_
-#define _CYGWIN_HDREG_H_
-
-struct hd_geometry {
- unsigned char heads;
- unsigned char sectors;
- unsigned short cylinders;
- unsigned long start;
-};
-
-#define HDIO_GETGEO 0x301
-
-#endif
diff --git a/winsup/cygwin/include/cygwin/icmp.h b/winsup/cygwin/include/cygwin/icmp.h
deleted file mode 100644
index 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 2cd6ac5f3..000000000
--- a/winsup/cygwin/include/cygwin/if.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* cygwin/if.h
-
- Copyright 1996, 2000, 2001, 2007, 2012, 2013 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_IF_H_
-#define _CYGWIN_IF_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include <sys/types.h>
-#include <cygwin/socket.h>
-
-/* Standard interface flags. */
-#define IFF_UP 0x1 /* interface is up */
-#define IFF_BROADCAST 0x2 /* broadcast address valid */
-#define IFF_LOOPBACK 0x8 /* is a loopback net */
-#define IFF_POINTOPOINT 0x10 /* is a point-to-point interface */
-#define IFF_NOTRAILERS 0x20 /* avoid use of trailers */
-#define IFF_RUNNING 0x40 /* resources allocated */
-#define IFF_NOARP 0x80 /* no ARP protocol */
-#define IFF_PROMISC 0x100 /* receive all packets */
-#define IFF_MULTICAST 0x1000 /* Supports multicast */
-#define IFF_LOWER_UP 0x10000 /* driver signals L1 up */
-#define IFF_DORMANT 0x20000 /* driver signals dormant */
-
-struct if_nameindex {
- unsigned if_index;
- char *if_name;
-};
-
-/* This is the structure expected by ioctl when the application requests
- the friendly adapter name (>= XP SP1). ifru_data should point to such
- a structure when ioctl is called with SIOCGIFFRNDLYNAM. */
-#define IFRF_FRIENDLYNAMESIZ 260
-
-struct ifreq_frndlyname {
- int ifrf_len;
- char ifrf_friendlyname[IFRF_FRIENDLYNAMESIZ];
-};
-
-/*
- * Interface request structure used for socket
- * ioctl's. All interface ioctl's must have parameter
- * definitions which begin with ifr_name. The
- * remainder may be interface specific.
- */
-#define IFNAMSIZ 44
-#define IF_NAMESIZE IFNAMSIZ
-#define IFHWADDRLEN 6
-
-struct ifreq {
- union {
- char ifrn_name[IFNAMSIZ]; /* Unique Windows Adapter name (A GUID) */
- } ifr_ifrn;
-
- union {
- struct sockaddr ifru_addr;
- struct sockaddr ifru_broadaddr;
- struct sockaddr ifru_dstaddr;
- struct sockaddr ifru_netmask;
- struct sockaddr ifru_hwaddr;
- int ifru_flags;
- int ifru_metric;
- int ifru_mtu;
- int ifru_ifindex;
- /* The space must be preallocated by the application. */
- void *ifru_data;
- /* Pad to sizeof sockaddr_in6 for further extensions. */
- char __ifru_pad[28];
- } ifr_ifru;
-};
-
-#define ifr_name ifr_ifrn.ifrn_name /* interface name */
-#define ifr_addr ifr_ifru.ifru_addr /* address */
-#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
-#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* destination address */
-#define ifr_netmask ifr_ifru.ifru_netmask /* interface net mask */
-#define ifr_flags ifr_ifru.ifru_flags /* flags */
-#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */
-#define ifr_metric ifr_ifru.ifru_metric /* metric */
-#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
-#define ifr_ifindex ifr_ifru.ifru_ifindex /* interface index */
-#define ifr_data ifr_ifru.ifru_data /* for use by interface */
-#define ifr_frndlyname ifr_ifru.ifru_data /* Windows friendly if name */
-
-/*
- * Structure used in SIOCGIFCONF request.
- * Used to retrieve interface configuration
- * for machine (useful for programs which
- * must know all networks accessible).
- */
-
-struct ifconf
-{
- int ifc_len; /* size of buffer */
- union
- {
- caddr_t ifcu_buf;
- struct ifreq *ifcu_req;
- } ifc_ifcu;
-};
-
-#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
-#define ifc_req ifc_ifcu.ifcu_req /* array of structures */
-
-#ifndef __INSIDE_CYGWIN_NET__
-extern unsigned if_nametoindex (const char *);
-extern char *if_indextoname (unsigned, char *);
-extern struct if_nameindex *if_nameindex (void);
-extern void if_freenameindex (struct if_nameindex *);
-#endif
-
-#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 a64160e8f..000000000
--- a/winsup/cygwin/include/cygwin/in.h
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. INET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Definitions of the Internet Protocol.
- *
- * Version: @(#)in.h 1.0.1 04/21/93
- *
- * Authors: Original taken from the GNU Project <netinet/in.h> file.
- * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-#ifndef _CYGWIN_IN_H
-#define _CYGWIN_IN_H
-
-#include <cygwin/socket.h>
-
-typedef uint16_t in_port_t;
-typedef uint32_t in_addr_t;
-
-#ifndef __INSIDE_CYGWIN_NET__
-
-/* Standard well-defined IP protocols. If you ever add one here, don't
- forget to define it below. */
-enum
-{
- IPPROTO_IP = 0, /* Dummy protocol for TCP */
- IPPROTO_HOPOPTS = 0, /* IPv6 Hop-by-Hop options */
- IPPROTO_ICMP = 1, /* Internet Control Message Protocol */
- IPPROTO_IGMP = 2, /* Internet Gateway Management Protocol */
- IPPROTO_IPIP = 4, /* IPIP tunnels (older KA9Q tunnels use 94) */
- IPPROTO_TCP = 6, /* Transmission Control Protocol */
- IPPROTO_EGP = 8, /* Exterior Gateway Protocol */
- IPPROTO_PUP = 12, /* PUP protocol */
- IPPROTO_UDP = 17, /* User Datagram Protocol */
- IPPROTO_IDP = 22, /* XNS IDP protocol */
- IPPROTO_IPV6 = 41, /* IPv6 header */
- IPPROTO_ROUTING = 43, /* IPv6 Routing header */
- IPPROTO_FRAGMENT = 44, /* IPv6 fragmentation header */
- IPPROTO_ESP = 50, /* encapsulating security payload */
- IPPROTO_AH = 51, /* authentication header */
- IPPROTO_ICMPV6 = 58, /* ICMPv6 */
- IPPROTO_NONE = 59, /* IPv6 no next header */
- IPPROTO_DSTOPTS = 60, /* IPv6 Destination options */
- IPPROTO_RAW = 255, /* Raw IP packets */
- IPPROTO_MAX
-};
-
-/* Define IPPROTO_xxx values to accomodate SUSv3 */
-#define IPPROTO_IP IPPROTO_IP
-#define IPPROTO_HOPOPTS IPPROTO_HOPOPTS
-#define IPPROTO_ICMP IPPROTO_ICMP
-#define IPPROTO_IGMP IPPROTO_IGMP
-#define IPPROTO_IPIP IPPROTO_IPIP
-#define IPPROTO_TCP IPPROTO_TCP
-#define IPPROTO_EGP IPPROTO_EGP
-#define IPPROTO_PUP IPPROTO_PUP
-#define IPPROTO_UDP IPPROTO_UDP
-#define IPPROTO_IDP IPPROTO_IDP
-#define IPPROTO_RAW IPPROTO_RAW
-#define IPPROTO_IPV6 IPPROTO_IPV6
-#define IPPROTO_ROUTING IPPROTO_ROUTING
-#define IPPROTO_FRAGMENT IPPROTO_FRAGMENT
-#define IPPROTO_ESP IPPROTO_ESP
-#define IPPROTO_AH IPPROTO_AH
-#define IPPROTO_ICMPV6 IPPROTO_ICMPV6
-#define IPPROTO_NONE IPPROTO_NONE
-#define IPPROTO_DSTOPTS IPPROTO_DSTOPTS
-
-/* Standard well-known ports. *//* from winsup/include/netinet/in.h */
-enum
-{
- IPPORT_ECHO = 7, /* Echo service. */
- IPPORT_DISCARD = 9, /* Discard transmissions service. */
- IPPORT_SYSTAT = 11, /* System status service. */
- IPPORT_DAYTIME = 13, /* Time of day service. */
- IPPORT_NETSTAT = 15, /* Network status service. */
- IPPORT_FTP = 21, /* File Transfer Protocol. */
- IPPORT_TELNET = 23, /* Telnet protocol. */
- IPPORT_SMTP = 25, /* Simple Mail Transfer Protocol. */
- IPPORT_TIMESERVER = 37, /* Timeserver service. */
- IPPORT_NAMESERVER = 42, /* Domain Name Service. */
- IPPORT_WHOIS = 43, /* Internet Whois service. */
- IPPORT_MTP = 57,
-
- IPPORT_TFTP = 69, /* Trivial File Transfer Protocol. */
- IPPORT_RJE = 77,
- IPPORT_FINGER = 79, /* Finger service. */
- IPPORT_TTYLINK = 87,
- IPPORT_SUPDUP = 95, /* SUPDUP protocol. */
-
-
- IPPORT_EXECSERVER = 512, /* execd service. */
- IPPORT_LOGINSERVER = 513, /* rlogind service. */
- IPPORT_CMDSERVER = 514,
- IPPORT_EFSSERVER = 520,
-
- /* UDP ports. */
- IPPORT_BIFFUDP = 512,
- IPPORT_WHOSERVER = 513,
- IPPORT_ROUTESERVER = 520,
-
- /* Ports less than this value are reserved for privileged processes. */
- IPPORT_RESERVED = 1024,
-
- /* Ports greater this value are reserved for (non-privileged) servers. */
- IPPORT_USERRESERVED = 5000
-};
-
-/* Avoid collision with Mingw64 headers. */
-#ifndef s_addr
-/* Internet address. */
-struct in_addr
-{
- in_addr_t s_addr;
-};
-#define s_addr s_addr
-#endif
-
-/* Request struct for IPv4 multicast socket ops */
-
-struct ip_mreq
-{
- struct in_addr imr_multiaddr; /* IP multicast address of group */
- struct in_addr imr_interface; /* local IP address of interface */
-};
-
-struct ip_mreq_source
-{
- struct in_addr imr_multiaddr;
- struct in_addr imr_sourceaddr;
- struct in_addr imr_interface;
-};
-
-struct ip_msfilter
-{
- struct in_addr imsf_multiaddr;
- struct in_addr imsf_interface;
- uint32_t imsf_fmode;
- uint32_t imsf_numsrc;
- struct in_addr imsf_slist[1];
-};
-
-#define IP_MSFILTER_SIZE(numsrc) (sizeof (struct ip_msfilter) \
- - sizeof (struct in_addr) \
- + (numsrc) * sizeof (struct in_addr))
-
-struct in_pktinfo
-{
- struct in_addr ipi_addr;
- uint32_t ipi_ifindex;
-};
-
-/* Request struct for IP agnostic multicast socket ops */
-
-struct group_req
-{
- uint32_t gr_interface;
- struct sockaddr_storage gr_group;
-};
-
-struct group_source_req
-{
- uint32_t gsr_interface;
- struct sockaddr_storage gsr_group;
- struct sockaddr_storage gsr_source;
-};
-
-struct group_filter
-{
- uint32_t gf_interface;
- struct sockaddr_storage gf_group;
- uint32_t gf_fmode;
- uint32_t gf_numsrc;
- struct sockaddr_storage gf_slist[1];
-};
-
-#define GROUP_FILTER_SIZE(numsrc) (sizeof (struct group_filter) \
- - sizeof (struct sockaddr_storage) \
- + (numsrc) * sizeof (struct sockaddr_storage))
-
-/* Structure describing an Internet (IP) socket address. */
-#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */
-struct sockaddr_in
-{
- sa_family_t sin_family; /* Address family */
- in_port_t sin_port; /* Port number */
- struct in_addr sin_addr; /* Internet address */
-
- /* Pad to size of `struct sockaddr'. */
- unsigned char __pad[__SOCK_SIZE__ - sizeof(short int)
- - sizeof(unsigned short int) - sizeof(struct in_addr)];
-};
-#define sin_zero __pad /* for BSD UNIX comp. -FvK */
-
-/*
- * Definitions of the bits in an Internet address integer.
- * On subnets, host and network parts are found according
- * to the subnet mask, not these masks.
- */
-#define IN_CLASSA(a) ((((in_addr_t) (a)) & 0x80000000) == 0)
-#define IN_CLASSA_NET 0xff000000
-#define IN_CLASSA_NSHIFT 24
-#define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET)
-#define IN_CLASSA_MAX 128
-
-#define IN_CLASSB(a) ((((in_addr_t) (a)) & 0xc0000000) == 0x80000000)
-#define IN_CLASSB_NET 0xffff0000
-#define IN_CLASSB_NSHIFT 16
-#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET)
-#define IN_CLASSB_MAX 65536
-
-#define IN_CLASSC(a) ((((in_addr_t) (a)) & 0xe0000000) == 0xc0000000)
-#define IN_CLASSC_NET 0xffffff00
-#define IN_CLASSC_NSHIFT 8
-#define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET)
-
-#define IN_CLASSD(a) ((((in_addr_t) (a)) & 0xf0000000) == 0xe0000000)
-#define IN_MULTICAST(a) IN_CLASSD(a)
-#define IN_MULTICAST_NET 0xF0000000
-
-#define IN_EXPERIMENTAL(a) ((((in_addr_t) (a)) & 0xe0000000) == 0xe0000000)
-#define IN_BADCLASS(a) ((((in_addr_t) (a)) & 0xf0000000) == 0xf0000000)
-
-/* Address to accept any incoming messages. */
-#define INADDR_ANY ((in_addr_t) 0x00000000)
-
-/* Address to send to all hosts. */
-#define INADDR_BROADCAST ((in_addr_t) 0xffffffff)
-
-/* Address indicating an error return. */
-#define INADDR_NONE 0xffffffff
-
-/* Network number for local host loopback. */
-#define IN_LOOPBACKNET 127
-
-/* Address to loopback in software to local host. */
-#define INADDR_LOOPBACK 0x7f000001 /* 127.0.0.1 */
-#define IN_LOOPBACK(a) ((((in_addr_t) (a)) & 0xff000000) == 0x7f000000)
-
-/* Defines for Multicast INADDR */
-#define INADDR_UNSPEC_GROUP 0xe0000000 /* 224.0.0.0 */
-#define INADDR_ALLHOSTS_GROUP 0xe0000001 /* 224.0.0.1 */
-#define INADDR_ALLRTRS_GROUP 0xe0000002 /* 224.0.0.2 */
-#define INADDR_MAX_LOCAL_GROUP 0xe00000ff /* 224.0.0.255 */
-
-#define INET_ADDRSTRLEN 16
-
-/* <asm/byteorder.h> contains the htonl type stuff.. */
-
-#include <asm/byteorder.h>
-
-/* Some random defines to make it easier in the kernel.. */
-#ifdef __KERNEL__
-
-#define LOOPBACK(x) (((x) & htonl(0xff000000)) == htonl(0x7f000000))
-#define MULTICAST(x) (((x) & htonl(0xf0000000)) == htonl(0xe0000000))
-
-#endif
-
-#ifdef AF_INET6
-#include <cygwin/in6.h>
-#endif
-#endif
-
-#endif /* _CYGWIN_IN_H */
diff --git a/winsup/cygwin/include/cygwin/in6.h b/winsup/cygwin/include/cygwin/in6.h
deleted file mode 100644
index 896e1ec19..000000000
--- a/winsup/cygwin/include/cygwin/in6.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* cygwin/in6.h
-
- Copyright 2006, 2007, 2014 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* NOTE: This file is NOT for direct inclusion. Use netinet/in.h. */
-
-#ifndef _CYGWIN_IN6_H
-#define _CYGWIN_IN6_H
-
-#define INET6_ADDRSTRLEN 46
-
-#define IN6_ARE_ADDR_EQUAL(a, b) \
- (((const uint32_t *)(a))[0] == ((const uint32_t *)(b))[0] \
- && ((const uint32_t *)(a))[1] == ((const uint32_t *)(b))[1] \
- && ((const uint32_t *)(a))[2] == ((const uint32_t *)(b))[2] \
- && ((const uint32_t *)(a))[3] == ((const uint32_t *)(b))[3])
-
-#define IN6_IS_ADDR_UNSPECIFIED(addr) \
- (((const uint32_t *)(addr))[0] == 0 \
- && ((const uint32_t *)(addr))[1] == 0 \
- && ((const uint32_t *)(addr))[2] == 0 \
- && ((const uint32_t *)(addr))[3] == 0)
-
-#define IN6_IS_ADDR_LOOPBACK(addr) \
- (((const uint32_t *)(addr))[0] == 0 \
- && ((const uint32_t *)(addr))[1] == 0 \
- && ((const uint32_t *)(addr))[2] == 0 \
- && ((const uint32_t *)(addr))[3] == htonl (1))
-
-#define IN6_IS_ADDR_MULTICAST(addr) (((const uint8_t *) (addr))[0] == 0xff)
-
-#define IN6_IS_ADDR_LINKLOCAL(addr) \
- ((((const uint16_t *)(addr))[0] & htons (0xffc0)) == htons (0xfe80))
-
-#define IN6_IS_ADDR_SITELOCAL(addr) \
- ((((const uint16_t *)(addr))[0] & htons (0xffc0)) == htons (0xfec0))
-
-#define IN6_IS_ADDR_V4MAPPED(addr) \
- (((const uint32_t *)(addr))[0] == 0 \
- && ((const uint32_t *)(addr))[1] == 0 \
- && ((const uint32_t *)(addr))[2] == htonl (0xffff))
-
-#define IN6_IS_ADDR_V4COMPAT(addr) \
- (((const uint32_t *)(addr))[0] == 0 \
- && ((const uint32_t *)(addr))[1] == 0 \
- && ((const uint32_t *)(addr))[2] == 0 \
- && ntohl (((const uint32_t *)(addr))[3]) > 1)
-
-#define IN6_IS_ADDR_MC_NODELOCAL(addr) \
- (IN6_IS_ADDR_MULTICAST(addr) \
- && (((const uint8_t *)(addr))[1] & 0xf) == 0x1)
-
-#define IN6_IS_ADDR_MC_LINKLOCAL(addr) \
- (IN6_IS_ADDR_MULTICAST (addr) \
- && (((const uint8_t *)(addr))[1] & 0xf) == 0x2)
-
-#define IN6_IS_ADDR_MC_SITELOCAL(addr) \
- (IN6_IS_ADDR_MULTICAST(addr) \
- && (((const uint8_t *)(addr))[1] & 0xf) == 0x5)
-
-#define IN6_IS_ADDR_MC_ORGLOCAL(addr) \
- (IN6_IS_ADDR_MULTICAST(addr) \
- && (((const uint8_t *)(addr))[1] & 0xf) == 0x8)
-
-#define IN6_IS_ADDR_MC_GLOBAL(addr) \
- (IN6_IS_ADDR_MULTICAST(addr) \
- && (((const uint8_t *)(addr))[1] & 0xf) == 0xe)
-
-struct in6_addr
-{
- union
- {
- uint8_t __s6_addr[16];
- uint16_t __s6_addr16[8];
- uint32_t __s6_addr32[4];
- } __u6;
-#define s6_addr __u6.__s6_addr
-#define s6_addr16 __u6.__s6_addr16
-#define s6_addr32 __u6.__s6_addr32
-};
-
-struct ipv6_mreq
-{
- struct in6_addr ipv6mr_multiaddr;
- uint32_t ipv6mr_interface;
-};
-
-struct ipv6_rt_hdr {
- uint8_t nexthdr;
- uint8_t hdrlen;
- uint8_t type;
- uint8_t segments_left;
- /* type specific data, variable length */
-};
-
-struct in6_pktinfo
-{
- struct in6_addr ipi6_addr;
- uint32_t ipi6_ifindex;
-};
-
-#if defined (__INSIDE_CYGWIN__) && !defined (_CYGWIN_IN_H)
-typedef uint16_t in_port_t;
-#endif
-
-struct sockaddr_in6
-{
- sa_family_t sin6_family; /* AF_INET6 */
- in_port_t sin6_port; /* Port number. */
- uint32_t sin6_flowinfo; /* Traffic class and flow inf. */
- struct in6_addr sin6_addr; /* IPv6 address. */
- uint32_t sin6_scope_id; /* Set of interfaces for a scope. */
-};
-
-#define IN6ADDR_ANY_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
-#define IN6ADDR_LOOPBACK_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }
-
-extern const struct in6_addr in6addr_any;
-extern const struct in6_addr in6addr_loopback;
-
-#endif /* _CYGWIN_IN6_H */
diff --git a/winsup/cygwin/include/cygwin/in_systm.h b/winsup/cygwin/include/cygwin/in_systm.h
deleted file mode 100644
index 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/ipc.h b/winsup/cygwin/include/cygwin/ipc.h
deleted file mode 100644
index c660d960a..000000000
--- a/winsup/cygwin/include/cygwin/ipc.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* sys/ipc.h
-
- Copyright 2001, 2002, 2012, 2013 Red Hat Inc.
- Written by Robert Collins <rbtcollins@hotmail.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_IPC_H
-#define _CYGWIN_IPC_H
-
-#include <sys/types.h>
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-struct ipc_perm
-{
- uid_t uid; /* Owner's user ID. */
- gid_t gid; /* Owner's group ID. */
- uid_t cuid; /* Creator's user ID. */
- gid_t cgid; /* Creator's group ID. */
- mode_t mode; /* Read/write permission. */
- key_t key;
- unsigned short seq;
-};
-
-/* Mode bits:
- */
-#define IPC_CREAT 0x0200 /* Create entry if key does not exist. */
-#define IPC_EXCL 0x0400 /* Fail if key exists. */
-#define IPC_NOWAIT 0x0800 /* Error if request must wait. */
-#ifdef _KERNEL
-#define IPC_KEY_IS_SHMID 0x1000 /* Used in shmget when called from shmat. */
-#endif
-
-/* Keys:
- */
-#define IPC_PRIVATE ((key_t) 0) /* Private key. */
-
-/* Control commands:
- */
-#define IPC_RMID 0x1000 /* Remove identifier. */
-#define IPC_SET 0x1001 /* Set options. */
-#define IPC_STAT 0x1002 /* Get options. */
-#ifdef _KERNEL
-#define IPC_INFO 0x1003 /* For ipcs(8). */
-#endif
-
-#ifdef _KERNEL
-#define IPCID_TO_IX(id) ((id) & 0xffff)
-#define IPCID_TO_SEQ(id) (((id) >> 16) & 0xffff)
-#define IXSEQ_TO_IPCID(ix,perm) (((perm.seq) << 16) | (ix & 0xffff))
-
-#define IPC_R 000400 /* read permission */
-#define IPC_W 000200 /* write/alter permission */
-#define IPC_M 010000 /* permission to change control info */
-#endif
-
-key_t ftok (const char *path, int id);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CYGWIN_IPC_H */
diff --git a/winsup/cygwin/include/cygwin/kd.h b/winsup/cygwin/include/cygwin/kd.h
deleted file mode 100644
index b4ec7c523..000000000
--- a/winsup/cygwin/include/cygwin/kd.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* cygwin/kd.h
-
- Copyright 2006 Red Hat Inc.
- Written by Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_KD_H_
-#define _CYGWIN_KD_H_
-
-#define KDGKBMETA 0x4b62
-#define KDSKBMETA 0x4b63
-#define K_METABIT 0x03
-#define K_ESCPREFIX 0x04
-
-#endif /* _CYGWIN_KD_H_ */
diff --git a/winsup/cygwin/include/cygwin/msg.h b/winsup/cygwin/include/cygwin/msg.h
deleted file mode 100644
index c737971ea..000000000
--- a/winsup/cygwin/include/cygwin/msg.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* sys/msg.h
-
- Copyright 2002, 2012, 2013 Red Hat Inc.
- Written by Conrad Scott <conrad.scott@dsl.pipex.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_MSG_H
-#define _CYGWIN_MSG_H
-
-#include <cygwin/ipc.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* Message operation flags:
- */
-#define MSG_NOERROR 0x01 /* No error if big message. */
-
-#ifdef _KERNEL
-/* Command definitions for the semctl () function:
- */
-#define MSG_STAT 0x2000 /* For ipcs(8) */
-#define MSG_INFO 0x2001 /* For ipcs(8) */
-#endif /* _KERNEL */
-
-/* Used for the number of messages in the message queue.
- */
-typedef uint32_t msgqnum_t;
-
-/* Used for the number of bytes allowed in a message queue.
- */
-typedef uint32_t msglen_t;
-
-struct msqid_ds
-{
- struct ipc_perm msg_perm; /* Operation permission structure. */
- msglen_t msg_cbytes; /* Number of bytes currently on queue. */
- msgqnum_t msg_qnum; /* Number of messages currently on queue. */
- msglen_t msg_qbytes; /* Maximum number of bytes allowed on queue. */
- pid_t msg_lspid; /* Process ID of last msgsnd (). */
- pid_t msg_lrpid; /* Process ID of last msgrcv (). */
- timestruc_t msg_stim; /* Time of last msgsnd (). */
- timestruc_t msg_rtim; /* Time of last msgrcv (). */
- timestruc_t msg_ctim; /* Time of last change. */
-#ifdef _KERNEL
- struct msg *msg_first;
- struct msg *msg_last;
-#else
- long msg_spare4[2];
-#endif /* _KERNEL */
-};
-
-#define msg_stime msg_stim.tv_sec
-#define msg_rtime msg_rtim.tv_sec
-#define msg_ctime msg_ctim.tv_sec
-
-#ifdef _KERNEL
-/* Buffer type for msgctl (IPC_INFO, ...) as used by ipcs(8).
- */
-struct msginfo
-{
- int32_t msgmax; /* Maximum number of bytes per
- message. */
- int32_t msgmnb; /* Maximum number of bytes on any one
- message queue. */
- int32_t msgmni; /* Maximum number of message queues,
- system wide. */
- int32_t msgtql; /* Maximum number of messages, system
- wide. */
- int32_t msgssz; /* Size of a message segment, must be
- small power of 2 greater than 4. */
- int32_t msgseg; /* Number of message segments */
- int32_t msg_spare[2];
-};
-
-/* Buffer type for msgctl (MSG_INFO, ...) as used by ipcs(8).
- */
-struct msg_info
-{
- int32_t msg_ids; /* Number of allocated queues. */
- int32_t msg_num; /* Number of messages, system wide. */
- int32_t msg_tot; /* Size in bytes of messages, system wide. */
-};
-#endif /* _KERNEL */
-
-int msgctl (int msqid, int cmd, struct msqid_ds *buf);
-int msgget (key_t key, int msgflg);
-ssize_t msgrcv (int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg);
-int msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CYGWIN_MSG_H */
diff --git a/winsup/cygwin/include/cygwin/mtio.h b/winsup/cygwin/include/cygwin/mtio.h
deleted file mode 100644
index ae3aa8d33..000000000
--- a/winsup/cygwin/include/cygwin/mtio.h
+++ /dev/null
@@ -1,316 +0,0 @@
-/* cygwin/mtio.h
-
- Copyright 1999, 2000, 2001, 2004, 2013 Red Hat, Inc.
-
- Written by Corinna Vinschen <corinna@vinschen.de>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* cygwin/mtio.h header file for Cygwin.
-
- by C. Vinschen. */
-
-#ifndef _CYGWIN_MTIO_H
-#define _CYGWIN_MTIO_H
-
-#include <sys/ioctl.h>
-#include <asm/socket.h>
-
-#ifndef DEFTAPE
-#define DEFTAPE "/dev/tape"
-#endif
-
-/*
- * Structures and definitions for mag tape io control commands
- */
-
-/* structure for MTIOCTOP - mag tape op command */
-struct mtop {
- short mt_op; /* operations defined below */
- int mt_count; /* how many of them */
-};
-
-/* Magnetic Tape operations [Not all operations supported by all drivers]: */
-#define MTRESET 0 /* reset drive in case of problems */
-#define MTFSF 1 /* forward space over FileMark,
- * position at first record of next file
- */
-#define MTBSF 2 /* backward space FileMark (position before FM) */
-#define MTFSR 3 /* forward space record */
-#define MTBSR 4 /* backward space record */
-#define MTWEOF 5 /* write an end-of-file record (mark) */
-#define MTREW 6 /* rewind */
-#define MTOFFL 7 /* rewind and put the drive offline (eject?) */
-#define MTNOP 8 /* no op, set status only (read with MTIOCGET) */
-#define MTRETEN 9 /* retension tape */
-#define MTBSFM 10 /* +backward space FileMark, position at FM */
-#define MTFSFM 11 /* +forward space FileMark, position at FM */
-#define MTEOM 12 /* goto end of recorded media (for appending files).
- * MTEOM positions after the last FM, ready for
- * appending another file.
- */
-#define MTERASE 13 /* erase tape -- be careful! */
-
-#define MTRAS1 14 /* run self test 1 (nondestructive) */
-#define MTRAS2 15 /* run self test 2 (destructive) */
-#define MTRAS3 16 /* reserved for self test 3 */
-
-#define MTSETBLK 20 /* set block length (SCSI) */
-#define MTSETDENSITY 21 /* set tape density (SCSI) */
-#define MTSEEK 22 /* seek to block (Tandberg, etc.) */
-#define MTTELL 23 /* tell block (Tandberg, etc.) */
-#define MTSETDRVBUFFER 24 /* set the drive buffering according to SCSI-2 */
- /* ordinary buffered operation with code 1 */
-#define MTFSS 25 /* space forward over setmarks */
-#define MTBSS 26 /* space backward over setmarks */
-#define MTWSM 27 /* write setmarks */
-
-#define MTLOCK 28 /* lock the drive door */
-#define MTUNLOCK 29 /* unlock the drive door */
-#define MTLOAD 30 /* execute the SCSI load command */
-#define MTUNLOAD 31 /* execute the SCSI unload command */
-#define MTCOMPRESSION 32/* control compression with SCSI mode page 15 */
-#define MTSETPART 33 /* Change the active tape partition */
-#define MTMKPART 34 /* Format the tape with one or two partitions */
-
-/* structure for MTIOCGET - mag tape get status command */
-
-struct mtget {
- long mt_type; /* type of magtape device */
- long mt_resid; /* residual count: (not sure)
- * number of bytes ignored, or
- * number of files not skipped, or
- * number of records not skipped.
- * Cygwin:
- * remaining KB until 1.5.7.
- * active partition until 1.7.24.
- * active partition in low 16 bits,
- * number of partitions on this tape
- * in next 16 bits, since 1.7.25.
- */
- /* the following registers are device dependent */
- long mt_dsreg; /* status register, Contains blocksize and
- density code. See MT_ST_xxx macros below */
- long mt_gstat; /* generic (device independent) status */
- long mt_erreg; /* error register */
- /* The next two fields are not always used */
- long mt_fileno; /* number of current file on tape */
- long mt_blkno; /* current block number */
- /* The next are Windows NT specific */
- long long mt_capacity; /* Tape capacity in bytes */
- long long mt_remaining; /* Remaining bytes */
- int mt_minblksize;
- int mt_maxblksize;
- int mt_defblksize;
- unsigned long mt_featureslow;
- unsigned long mt_featureshigh;
- unsigned long mt_eotwarningzonesize;
-};
-
-/* structure for MTIOCPOS - mag tape get position command */
-
-struct mtpos {
- long mt_blkno; /* current block number */
-};
-
-
-/* mag tape io control commands */
-#define MTIOCTOP _IOW('m', 1, struct mtop) /* do a mag tape op */
-#define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */
-#define MTIOCPOS _IOR('m', 3, struct mtpos) /* get tape position */
-
-/* Generic Mag Tape (device independent) status macros for examining
- * mt_gstat -- HP-UX compatible.
- * There is room for more generic status bits here, but I don't
- * know which of them are reserved. At least three or so should
- * be added to make this really useful.
- */
-#define GMT_EOF(x) ((x) & 0x80000000)
-#define GMT_BOT(x) ((x) & 0x40000000)
-#define GMT_EOT(x) ((x) & 0x20000000)
-#define GMT_SM(x) ((x) & 0x10000000) /* DDS setmark */
-#define GMT_EOD(x) ((x) & 0x08000000) /* DDS EOD */
-#define GMT_WR_PROT(x) ((x) & 0x04000000)
-#define GMT_REP_SM(x) ((x) & 0x02000000) /* Cygwin: rep. setmarks */
-#define GMT_ONLINE(x) ((x) & 0x01000000)
-#define GMT_D_6250(x) ((x) & 0x00800000)
-#define GMT_D_1600(x) ((x) & 0x00400000)
-#define GMT_D_800(x) ((x) & 0x00200000)
-#define GMT_PADDING(x) ((x) & 0x00100000) /* Cygwin: data padding */
-#define GMT_HW_ECC(x) ((x) & 0x00080000) /* Cygwin: HW error corr. */
-#define GMT_DR_OPEN(x) ((x) & 0x00040000) /* door open (no tape) */
-#define GMT_HW_COMP(x) ((x) & 0x00020000) /* Cygwin: HW compression */
-#define GMT_IM_REP_EN(x) ((x) & 0x00010000) /* immediate report mode */
-#define GMT_CLN(x) ((x) & 0x00008000) /* cleaning requested */
-/* 15 generic status bits unused */
-/* Cygwin only: The below settings are also used by the GNU-Linux SCSI tape
- driver but they aren't usually reported here. Unfortunately, there's no
- other official method to retrieve the values of these settings and
- reporting them here apparently doesn't hurt. */
-#define GMT_TWO_FM(x) ((x) & 0x00000080) /* two fm after write */
-#define GMT_FAST_MTEOM(x) ((x) & 0x00000040) /* fast seek to eom */
-#define GMT_AUTO_LOCK(x) ((x) & 0x00000020) /* auto door lock on r/w */
-#define GMT_SYSV(x) ((x) & 0x00000010) /* SYSV read semantics */
-#define GMT_NOWAIT(x) ((x) & 0x00000008) /* don't wait for positioning commands */
-#define GMT_ASYNC(x) ((x) & 0x00000004) /* asynchronous writes */
-
-
-/* SCSI-tape specific definitions */
-/* Bitfield shifts in the status mt_dsreg */
-#define MT_ST_BLKSIZE_SHIFT 0
-#define MT_ST_BLKSIZE_MASK 0xffffff
-#define MT_ST_DENSITY_SHIFT 24
-#define MT_ST_DENSITY_MASK 0xff000000
-
-#define MT_ST_SOFTERR_SHIFT 0
-#define MT_ST_SOFTERR_MASK 0xffff
-
-/* Bitfields for the MTSETDRVBUFFER ioctl. */
-#define MT_ST_OPTIONS 0xf0000000
-#define MT_ST_BOOLEANS 0x10000000
-#define MT_ST_SETBOOLEANS 0x30000000
-#define MT_ST_CLEARBOOLEANS 0x40000000
-#define MT_ST_WRITE_THRESHOLD 0x20000000 /* Not supported */
-#define MT_ST_DEF_OPTIONS 0x60000000 /* Not supported */
-#define MT_ST_EOT_WZ_SIZE 0xf0000000 /* Cygwin only */
-
-#define MT_ST_BUFFER_WRITES 0x00000001
-#define MT_ST_ASYNC_WRITES 0x00000002
-#define MT_ST_READ_AHEAD 0x00000004 /* Not supported */
-#define MT_ST_DEBUGGING 0x00000008 /* Not supported */
-#define MT_ST_TWO_FM 0x00000010
-#define MT_ST_FAST_MTEOM 0x00000020
-#define MT_ST_AUTO_LOCK 0x00000040
-#define MT_ST_DEF_WRITES 0x00000080 /* Not supported */
-#define MT_ST_CAN_BSR 0x00000100 /* Not supported */
-#define MT_ST_NO_BLKLIMS 0x00000200 /* Not supported */
-#define MT_ST_CAN_PARTITIONS 0x00000400 /* Not supported */
-#define MT_ST_SCSI2LOGICAL 0x00000800 /* Not supported */
-#define MT_ST_SYSV 0x00001000
-#define MT_ST_NOWAIT 0x00002000
-#define MT_ST_ECC 0x00010000 /* Cygwin only */
-#define MT_ST_PADDING 0x00020000 /* Cygwin only */
-#define MT_ST_REPORT_SM 0x00040000 /* Cygwin only */
-
-/*
- * Constants for mt_type. Not all of these are supported,
- * and these are not all of the ones that are supported.
- *
- * Only used when not colliding with Windows codes (see below)
- */
-#define MT_ISUNKNOWN 0x01
-#define MT_ISQIC02 0x02 /* Generic QIC-02 tape streamer */
-#define MT_ISWT5150 0x03 /* Wangtek 5150EQ, QIC-150, QIC-02 */
-#define MT_ISARCHIVE_5945L2 0x04 /* Archive 5945L-2, QIC-24, QIC-02? */
-#define MT_ISCMSJ500 0x05 /* CMS Jumbo 500 (QIC-02?) */
-#define MT_ISTDC3610 0x06 /* Tandberg 6310, QIC-24 */
-#define MT_ISARCHIVE_VP60I 0x07 /* Archive VP60i, QIC-02 */
-#define MT_ISARCHIVE_2150L 0x08 /* Archive Viper 2150L */
-#define MT_ISARCHIVE_2060L 0x09 /* Archive Viper 2060L */
-#define MT_ISARCHIVESC499 0x0A /* Archive SC-499 QIC-36 controller */
-#define MT_ISQIC02_ALL_FEATURES 0x0F /* Generic QIC-02 with all features */
-#define MT_ISWT5099EEN24 0x11 /* Wangtek 5099-een24, 60MB, QIC-24 */
-#define MT_ISTEAC_MT2ST 0x12 /* Teac MT-2ST 155mb drive, Teac DC-1 card (Wangtek type) */
-#define MT_ISEVEREX_FT40A 0x32 /* Everex FT40A (QIC-40) */
-#define MT_ISDDS1 0x51 /* DDS device without partitions */
-#define MT_ISDDS2 0x52 /* DDS device with partitions */
-#define MT_ISSCSI1 0x71 /* Generic ANSI SCSI-1 tape unit */
-#define MT_ISSCSI2 0x72 /* Generic ANSI SCSI-2 tape unit */
-
-/* More constants for mt_type. These are the codes used by Windows >= 5.1 */
-#define MT_ISDDS_4mm 0x20
-#define MT_ISMiniQic 0x21
-#define MT_ISTravan 0x22
-#define MT_ISQIC 0x23
-#define MT_ISMP_8mm 0x24
-#define MT_ISAME_8mm 0x25
-#define MT_ISAIT1_8mm 0x26
-#define MT_ISDLT 0x27
-#define MT_ISNCTP 0x28
-#define MT_ISIBM_3480 0x29
-#define MT_ISIBM_3490E 0x2a
-#define MT_ISIBM_Magstar_3590 0x2b
-#define MT_ISIBM_Magstar_MP 0x2c
-#define MT_ISSTK_DATA_D3 0x2d
-#define MT_ISSONY_DTF 0x2e
-#define MT_ISDV_6mm 0x2f
-#define MT_ISDMI 0x30
-#define MT_ISSONY_D2 0x31
-#define MT_ISCLEANER_CARTRIDGE 0x32
-#define MT_ISAVATAR_F2 0x4f
-#define MT_ISMP2_8mm 0x50
-#define MT_ISDST_S 0x51
-#define MT_ISDST_M 0x52
-#define MT_ISDST_L 0x53
-#define MT_ISVXATape_1 0x54
-#define MT_ISVXATape_2 0x55
-#define MT_ISSTK_9840 0x56
-#define MT_ISLTO_Ultrium 0x57
-#define MT_ISLTO_Accelis 0x58
-#define MT_ISAIT_8mm 0x5a
-#define MT_ISADR_1 0x5b
-#define MT_ISADR_2 0x5c
-#define MT_ISSTK_9940 0x5d
-
-struct mt_tape_info {
- long t_type; /* device type id (mt_type) */
- char *t_name; /* descriptive name */
-};
-
-#define MT_TAPE_INFO { \
- {MT_ISUNKNOWN, "Unknown type of tape device"}, \
- {MT_ISQIC02, "Generic QIC-02 tape streamer"}, \
- {MT_ISWT5150, "Wangtek 5150, QIC-150"}, \
- {MT_ISARCHIVE_5945L2, "Archive 5945L-2"}, \
- {MT_ISCMSJ500, "CMS Jumbo 500"}, \
- {MT_ISTDC3610, "Tandberg TDC 3610, QIC-24"}, \
- {MT_ISARCHIVE_VP60I, "Archive VP60i, QIC-02"}, \
- {MT_ISARCHIVE_2150L, "Archive Viper 2150L"}, \
- {MT_ISARCHIVE_2060L, "Archive Viper 2060L"}, \
- {MT_ISARCHIVESC499, "Archive SC-499 QIC-36 controller"}, \
- {MT_ISQIC02_ALL_FEATURES, "Generic QIC-02 tape, all features"}, \
- {MT_ISWT5099EEN24, "Wangtek 5099-een24, 60MB"}, \
- {MT_ISTEAC_MT2ST, "Teac MT-2ST 155mb data cassette drive"}, \
- {MT_ISDDS_4mm, "DDS"}, \
- {MT_ISMiniQic, "MiniQic"}, \
- {MT_ISTravan, "Travan tape"}, \
- {MT_ISQIC, "QIC tape"}, \
- {MT_ISMP_8mm, "8mm Exabyte metal particle tape"}, \
- {MT_ISAME_8mm, "8mm Exabyte advanced metal evap tape"}, \
- {MT_ISAIT1_8mm, "8mm Sony AIT1 tape"}, \
- {MT_ISDLT, "DLT compact tape)"}, \
- {MT_ISNCTP, "Philips NCTP tape"}, \
- {MT_ISIBM_3480, "IBM 3480 tape"}, \
- {MT_ISIBM_3490E, "IBM 3490E tape"}, \
- {MT_ISIBM_Magstar_3590, "IBM Magstar 3590 tape"}, \
- {MT_ISIBM_Magstar_MP, "IBM Magstar MP tape"}, \
- {MT_ISSTK_DATA_D3, "STK data D3 tape"}, \
- {MT_ISSONY_DTF, "Sony DTF tape"}, \
- {MT_ISDV_6mm, "6mm digital video tape"}, \
- {MT_ISDMI, "Exabyte DMI tape"}, \
- {MT_ISSONY_D2, "Sony D2S or D2L tape"}, \
- {MT_ISCLEANER_CARTRIDGE, "Cleaner (all drive types that support cleaners)"}, \
- {MT_ISAVATAR_F2, "Avatar 2"}, \
- {MT_ISMP2_8mm, "8mm Hitachi tape"}, \
- {MT_ISDST_S, "Ampex DST small tape"}, \
- {MT_ISDST_M, "Ampex DST medium tape"}, \
- {MT_ISDST_L, "Ampex DST large tape"}, \
- {MT_ISVXATape_1, "Ecrix 8mm tape"}, \
- {MT_ISVXATape_2, "Ecrix 8mm tape"}, \
- {MT_ISSTK_9840, "STK 9840"}, \
- {MT_ISLTO_Ultrium, "LTO Ultrium (IBM, HP, Seagate)"}, \
- {MT_ISLTO_Accelis, "LTO Accelis (IBM, HP, Seagate)"}, \
- {MT_ISAIT_8mm, "AIT tape (AIT2 or higher)"}, \
- {MT_ISADR_1, "OnStream ADR1"}, \
- {MT_ISADR_2, "OnStream ADR2"}, \
- {MT_ISSTK_9940, "STK 9940"}, \
- {MT_ISSCSI1, "Generic SCSI-1 tape"}, \
- {MT_ISSCSI2, "Generic SCSI-2 tape"}, \
- {0, NULL} \
-}
-
-#endif /* _CYGWIN_MTIO_H */
diff --git a/winsup/cygwin/include/cygwin/rdevio.h b/winsup/cygwin/include/cygwin/rdevio.h
deleted file mode 100644
index 2333abe43..000000000
--- a/winsup/cygwin/include/cygwin/rdevio.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* cygwin/rdevio.h
-
- Copyright 1999, 2000, 2001 Red Hat, Inc.
-
- Written by Corinna Vinschen <corinna@vinschen.de>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/*
- * cygwin/rdevio.h header file for Cygwin.
- *
- * Written by C. Vinschen.
- */
-
-#ifndef _CYGWIN_RDEVIO_H
-#define _CYGWIN_RDEVIO_H
-
-/* structure for RDIOCDOP - raw device operation */
-struct rdop {
- short rd_op;
- unsigned long rd_parm;
-};
-
-/* Raw device operations */
-#define RDSETBLK 1 /* set buffer for driver */
-
-/* structure for RDIOCGET - get raw device */
-struct rdget {
- unsigned long bufsiz;
-};
-
-/*
- * ioctl commands
-*/
-#define RDIOCDOP _IOW('r', 128, struct rdop)
-#define RDIOCGET _IOR('r', 129, struct rdget)
-
-#endif /* _CYGWIN_RDEVIO_H */
diff --git a/winsup/cygwin/include/cygwin/sem.h b/winsup/cygwin/include/cygwin/sem.h
deleted file mode 100644
index 71592e52f..000000000
--- a/winsup/cygwin/include/cygwin/sem.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* sys/sem.h
-
- Copyright 2002, 2012, 2013 Red Hat Inc.
- Written by Conrad Scott <conrad.scott@dsl.pipex.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_SEM_H
-#define _CYGWIN_SEM_H
-
-#include <cygwin/ipc.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* Semaphore operation flags:
- */
-#define SEM_UNDO 010000 /* Set up adjust on exit entry. */
-
-/* Command definitions for the semctl () function:
- */
-#define GETNCNT 0x3000 /* Get semncnt. */
-#define GETPID 0x3001 /* Get sempid. */
-#define GETVAL 0x3002 /* Get semval. */
-#define GETALL 0x3003 /* Get all cases of semval. */
-#define GETZCNT 0x3004 /* Get semzcnt. */
-#define SETVAL 0x3005 /* Set semval. */
-#define SETALL 0x3006 /* Set all cases of semval. */
-
-#ifdef _KERNEL
-#define SEM_STAT 0x3010 /* For ipcs(8). */
-#define SEM_INFO 0x3011 /* For ipcs(8). */
-#endif /* _KERNEL */
-
-struct semid_ds
-{
- struct ipc_perm sem_perm; /* Operation permission structure. */
- unsigned short sem_nsems; /* Number of semaphores in set. */
- timestruc_t sem_otim; /* Last semop () time. */
- timestruc_t sem_ctim; /* Last time changed by semctl (). */
-#ifdef _KERNEL
- struct sem *sem_base; /* pointer to first semaphore in set */
- long sem_spare4[1];
-#else
- long sem_spare4[2];
-#endif /* _KERNEL */
-};
-
-#define sem_otime sem_otim.tv_sec
-#define sem_ctime sem_ctim.tv_sec
-
-struct sembuf
-{
- unsigned short sem_num; /* Semaphore number. */
- short sem_op; /* Semaphore operation. */
- short sem_flg; /* Operation flags. */
-};
-
-#ifdef _KERNEL
-/* Buffer type for semctl (IPC_INFO, ...) as used by ipcs(8).
- */
-struct seminfo
-{
- int32_t semmni; /* Maximum number of unique semaphore
- sets, system wide. */
- int32_t semmns; /* Maximum number of semaphores,
- system wide. */
- int32_t semmsl; /* Maximum number of semaphores per
- semaphore set. */
- int32_t semopm; /* Maximum number of operations per
- semop call. */
- int32_t semmnu; /* Maximum number of undo structures,
- system wide. */
- int32_t semume; /* Maximum number of undo entries per
- undo structure. */
- int32_t semvmx; /* Maximum semaphore value. */
- int32_t semaem; /* Maximum adjust-on-exit value. */
- int32_t semmap; /* # of entries in semaphore map */
- int32_t semusz; /* size in bytes of undo structure */
- int32_t sem_spare[2];
-};
-
-/* Buffer type for semctl (SEM_INFO, ...) as used by ipcs(8).
- */
-struct sem_info
-{
- long sem_ids; /* Number of allocated semaphore sets. */
- long sem_num; /* Number of allocated semaphores. */
-};
-
-/* Permission flags */
-#define SEM_A IPC_W /* alter permission */
-#define SEM_R IPC_R /* read permission */
-
-/* Internally used mode bits. */
-#define SEM_ALLOC 01000 /* semaphore is allocated */
-
-#endif /* _KERNEL */
-
-#ifdef _KERNEL
-/* According to SUSv3, "the fourth argument [to semctl()] is optional and
- depends upon the operation requested. If required, it is of type
- union semun, which the application shall explicitly declare:" */
-union semun {
- int val; /* value for SETVAL */
- struct semid_ds *buf; /* buffer for IPC_STAT, IPC_SET */
- unsigned short *array; /* array for GETALL, SETALL */
-};
-/* Therefore this union is only declared here if building internal code.
- _KERNEL must not be defined in exernal applications! Declare union
- semun explicitely as required by SUSv3, please. */
-#endif /* _KERNEL */
-
-int semctl (int semid, int semnum, int cmd, ...);
-int semget (key_t key, int nsems, int semflg);
-int semop (int semid, struct sembuf *sops, size_t nsops);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CYGWIN_SEM_H */
diff --git a/winsup/cygwin/include/cygwin/shm.h b/winsup/cygwin/include/cygwin/shm.h
deleted file mode 100644
index c58599379..000000000
--- a/winsup/cygwin/include/cygwin/shm.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* sys/shm.h
-
- Copyright 2001, 2002, 2012, 2013 Red Hat Inc.
- Written by Robert Collins <rbtcollins@hotmail.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_SHM_H
-#define _CYGWIN_SHM_H
-
-#include <cygwin/ipc.h>
-#include <sys/cygwin.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* Segment low boundary address multiple.
- *
- * 64 Kb was hardcoded for x86. MS states this may change so the constant
- * expression is replaced by a function call returning the correct value. */
-#define SHMLBA (cygwin_internal (CW_GET_SHMLBA))
-
-/* Shared memory operation flags:
- */
-#define SHM_RDONLY 0x01 /* Attach read-only (else read-write). */
-#define SHM_RND 0x02 /* Round attach address to SHMLBA. */
-
-#ifdef _KERNEL
-/* Command definitions for the semctl () function:
- */
-#define SHM_STAT 0x4000 /* For ipcs(8) */
-#define SHM_INFO 0x4001 /* For ipcs(8) */
-#endif /* _KERNEL */
-
-/* Unsigned integer used for the number of current attaches.
- */
-typedef uint32_t shmatt_t;
-
-struct shmid_ds
-{
- struct ipc_perm shm_perm; /* Operation permission structure. */
- uint32_t shm_segsz; /* Size of segment in bytes. */
- pid_t shm_lpid; /* Process ID of last operation. */
- pid_t shm_cpid; /* Process ID of creator. */
- shmatt_t shm_nattch;/* Number of current attaches. */
- timestruc_t shm_atim; /* Time of last shmat (). */
- timestruc_t shm_dtim; /* Time of last shmdt (). */
- timestruc_t shm_ctim; /* Time of last change by shmctl (). */
-#ifdef _KERNEL
- struct shm_handle *shm_internal;
- long shm_spare4[1];
-#else
- long shm_spare4[2];
-#endif /* _KERNEL */
-};
-
-#define shm_atime shm_atim.tv_sec
-#define shm_dtime shm_dtim.tv_sec
-#define shm_ctime shm_ctim.tv_sec
-
-#ifdef _KERNEL
-/* Buffer type for shmctl (IPC_INFO, ...) as used by ipcs(8).
- */
-struct shminfo
-{
- int32_t shmmax; /* Maximum size in bytes of a shared
- memory segment. */
- int32_t shmmin; /* Minimum size in bytes of a shared
- memory segment. */
- int32_t shmmni; /* Maximum number of shared memory
- segments, system wide. */
- int32_t shmseg; /* Maximum number of shared memory
- segments attached per process. */
- int32_t shmall; /* Maximum number of bytes of shared
- memory, system wide.
- Note that XSI IPC shared memory allocation is
- restricted to a bit less than 2 Gigs, even on
- 64 bit, so using an int32_t here is sufficient. */
- int32_t shm_spare[4];
-};
-
-/* Buffer type for shmctl (SHM_INFO, ...) as used by ipcs(8).
- */
-struct shm_info
-{
-#define shm_ids used_ids
- int32_t used_ids; /* Number of allocated segments. */
- int32_t shm_tot; /* Size in bytes of allocated segments. */
- int32_t shm_atts; /* Number of attached segments, system
- wide. */
-};
-#endif /* _KERNEL */
-
-void *shmat (int shmid, const void *shmaddr, int shmflg);
-int shmctl (int shmid, int cmd, struct shmid_ds *buf);
-int shmdt (const void *shmaddr);
-int shmget (key_t key, size_t size, int shmflg);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CYGWIN_SHM_H */
diff --git a/winsup/cygwin/include/cygwin/signal.h b/winsup/cygwin/include/cygwin/signal.h
deleted file mode 100644
index 3d74c9c8d..000000000
--- a/winsup/cygwin/include/cygwin/signal.h
+++ /dev/null
@@ -1,407 +0,0 @@
-/* signal.h
-
- Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2012, 2013
- Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#ifndef _CYGWIN_SIGNAL_H
-#define _CYGWIN_SIGNAL_H
-
-#include <bits/wordsize.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __x86_64__
-
-struct _uc_fpxreg {
- __uint16_t significand[4];
- __uint16_t exponent;
- __uint16_t padding[3];
-};
-
-struct _uc_xmmreg {
- __uint32_t element[4];
-};
-
-struct _fpstate
-{
- __uint16_t cwd;
- __uint16_t swd;
- __uint16_t ftw;
- __uint16_t fop;
- __uint64_t rip;
- __uint64_t rdp;
- __uint32_t mxcsr;
- __uint32_t mxcr_mask;
- struct _uc_fpxreg st[8];
- struct _uc_xmmreg xmm[16];
- __uint32_t padding[24];
-};
-
-struct ucontext
-{
- __uint64_t p1home;
- __uint64_t p2home;
- __uint64_t p3home;
- __uint64_t p4home;
- __uint64_t p5home;
- __uint64_t p6home;
- __uint32_t cr2;
- __uint32_t mxcsr;
- __uint16_t cs;
- __uint16_t ds;
- __uint16_t es;
- __uint16_t fs;
- __uint16_t gs;
- __uint16_t ss;
- __uint32_t eflags;
- __uint64_t dr0;
- __uint64_t dr1;
- __uint64_t dr2;
- __uint64_t dr3;
- __uint64_t dr6;
- __uint64_t dr7;
- __uint64_t rax;
- __uint64_t rcx;
- __uint64_t rdx;
- __uint64_t rbx;
- __uint64_t rsp;
- __uint64_t rbp;
- __uint64_t rsi;
- __uint64_t rdi;
- __uint64_t r8;
- __uint64_t r9;
- __uint64_t r10;
- __uint64_t r11;
- __uint64_t r12;
- __uint64_t r13;
- __uint64_t r14;
- __uint64_t r15;
- __uint64_t rip;
- struct _fpstate fpregs;
- __uint64_t vcx;
- __uint64_t dbc;
- __uint64_t btr;
- __uint64_t bfr;
- __uint64_t etr;
- __uint64_t efr;
- __uint8_t _internal;
- __uint64_t oldmask;
-};
-
-#else /* !x86_64 */
-
-struct _uc_fpreg
-{
- __uint16_t significand[4];
- __uint16_t exponent;
-};
-
-struct _fpstate
-{
- __uint32_t cw;
- __uint32_t sw;
- __uint32_t tag;
- __uint32_t ipoff;
- __uint32_t cssel;
- __uint32_t dataoff;
- __uint32_t datasel;
- struct _uc_fpreg _st[8];
- __uint32_t nxst;
-};
-
-struct ucontext
-{
- __uint32_t cr2;
- __uint32_t dr0;
- __uint32_t dr1;
- __uint32_t dr2;
- __uint32_t dr3;
- __uint32_t dr6;
- __uint32_t dr7;
- struct _fpstate fpstate;
- __uint32_t gs;
- __uint32_t fs;
- __uint32_t es;
- __uint32_t ds;
- __uint32_t edi;
- __uint32_t esi;
- __uint32_t ebx;
- __uint32_t edx;
- __uint32_t ecx;
- __uint32_t eax;
- __uint32_t ebp;
- __uint32_t eip;
- __uint32_t cs;
- __uint32_t eflags;
- __uint32_t esp;
- __uint32_t ss;
- __uint8_t _internal;
- __uint32_t oldmask;
-};
-
-#endif /* !x86_64 */
-
-#define __COPY_CONTEXT_SIZE ((size_t) (uintptr_t) &((struct ucontext *) 0)->_internal)
-
-typedef union sigval
-{
- int sival_int; /* integer signal value */
- void *sival_ptr; /* pointer signal value */
-} sigval_t;
-
-typedef struct sigevent
-{
- sigval_t sigev_value; /* signal value */
- int sigev_signo; /* signal number */
- int sigev_notify; /* notification type */
- void (*sigev_notify_function) (sigval_t); /* notification function */
- pthread_attr_t *sigev_notify_attributes; /* notification attributes */
-} sigevent_t;
-
-#pragma pack(push,4)
-struct _sigcommune
-{
- __uint32_t _si_code;
- void *_si_read_handle;
- void *_si_write_handle;
- void *_si_process_handle;
- __extension__ union
- {
- int _si_fd;
- void *_si_pipe_fhandler;
- char *_si_str;
- };
-};
-
-#define __SI_PAD_SIZE 32
-#ifdef __INSIDE_CYGWIN__
-# ifndef max
-# define max(a,b) (((a) > (b)) ? (a) : (b))
-# endif /*max*/
-# define __uint32_size(__x) (max(sizeof (__x) / sizeof (uint32_t), 1))
-
-/* This padding represents the elements of the last struct in siginfo_t,
- aligning the elements to the end to avoid conflicts with other struct
- members. */
-# define __SI_CYG_PAD (__SI_PAD_SIZE - __uint32_size (void *))
-#endif /*__INSIDE_CYGWIN__*/
-
-typedef struct
-{
- int si_signo; /* signal number */
- int si_code; /* signal code */
- pid_t si_pid; /* sender's pid */
- uid_t si_uid; /* sender's uid */
- int si_errno; /* errno associated with signal */
-
- __extension__ union
- {
- __uint32_t __pad[__SI_PAD_SIZE]; /* plan for future growth */
- struct _sigcommune _si_commune; /* cygwin ipc */
- __extension__ struct
- {
- __extension__ union
- {
- sigval_t si_sigval; /* signal value */
- sigval_t si_value; /* signal value */
- };
- __extension__ struct
- {
- timer_t si_tid; /* timer id */
- unsigned int si_overrun; /* overrun count */
- };
- };
- /* SIGCHLD */
- __extension__ struct
- {
- int si_status; /* exit code */
- clock_t si_utime; /* user time */
- clock_t si_stime; /* system time */
- };
-
- void *si_addr; /* faulting address for core dumping
- signals */
- /* Cygwin internal fields */
-#ifdef __INSIDE_CYGWIN__
- __extension__ struct
- {
- __uint32_t __pad2[__SI_CYG_PAD]; /* Locate at end of struct */
- void *si_cyg; /* pointer to block containing
- cygwin-special info */
- };
-#endif /*__INSIDE_CYGWIN__*/
- };
-} siginfo_t;
-#pragma pack(pop)
-
-enum
-{
- SI_USER = 0, /* sent by kill, raise, pthread_kill */
- SI_ASYNCIO = 2, /* sent by AIO completion (currently
- unimplemented) */
- SI_MESGQ, /* sent by real time mesq state change
- (currently unimplemented) */
- SI_TIMER, /* sent by timer expiration */
- SI_QUEUE, /* sent by sigqueue (currently
- unimplemented) */
- SI_KERNEL, /* sent by system */
-
- ILL_ILLOPC, /* illegal opcode */
- ILL_ILLOPN, /* illegal operand */
- ILL_ILLADR, /* illegal addressing mode */
- ILL_ILLTRP, /* illegal trap*/
- ILL_PRVOPC, /* privileged opcode */
- ILL_PRVREG, /* privileged register */
- ILL_COPROC, /* coprocessor error */
- ILL_BADSTK, /* internal stack error */
-
- FPE_INTDIV, /* integer divide by zero */
- FPE_INTOVF, /* integer overflow */
- FPE_FLTDIV, /* floating point divide by zero */
- FPE_FLTOVF, /* floating point overflow */
- FPE_FLTUND, /* floating point underflow */
- FPE_FLTRES, /* floating point inexact result */
- FPE_FLTINV, /* floating point invalid operation */
- FPE_FLTSUB, /* subscript out of range */
-
- SEGV_MAPERR, /* address not mapped to object */
- SEGV_ACCERR, /* invalid permissions for mapped object */
-
- BUS_ADRALN, /* invalid address alignment. */
- BUS_ADRERR, /* non-existant physical address. */
- BUS_OBJERR, /* object specific hardware error. */
-
- CLD_EXITED, /* child has exited */
- CLD_KILLED, /* child was killed */
- CLD_DUMPED, /* child terminated abnormally */
- CLD_TRAPPED, /* traced child has trapped */
- CLD_STOPPED, /* child has stopped */
- CLD_CONTINUED /* stopped child has continued */
-};
-
-enum
-{
- SIGEV_SIGNAL = 0, /* a queued signal, with an application
- defined value, is generated when the
- event of interest occurs */
- SIGEV_NONE, /* no asynchronous notification is
- delivered when the event of interest
- occurs */
- SIGEV_THREAD /* a notification function is called to
- perform notification */
-};
-
-#if __WORDSIZE == 64
-typedef __uint64_t sigset_t;
-#else
-/* FIXME: We should probably raise the # of signals for 32 bit as well.
- Unfortunately this is an ABI change so requires some forethought. */
-typedef __uint32_t sigset_t;
-#endif
-
-typedef void (*_sig_func_ptr)(int);
-
-struct sigaction
-{
- __extension__ union
- {
- _sig_func_ptr sa_handler; /* SIG_DFL, SIG_IGN, or pointer to a function */
- void (*sa_sigaction) ( int, siginfo_t *, void * );
- };
- sigset_t sa_mask;
- int sa_flags;
-};
-
-#define SA_NOCLDSTOP 1 /* Do not generate SIGCHLD when children
- stop */
-#define SA_SIGINFO 2 /* Invoke the signal catching function
- with three arguments instead of one
- */
-#define SA_RESTART 0x10000000 /* Restart syscall on signal return */
-#define SA_NODEFER 0x40000000 /* Don't automatically block the signal
- when its handler is being executed */
-#define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler */
-#define SA_ONESHOT SA_RESETHAND /* Historical linux name */
-#define SA_NOMASK SA_NODEFER /* Historical linux name */
-
-/* Used internally by cygwin. Included here to group everything in one place.
- Do not use. */
-#define _SA_INTERNAL_MASK 0xf000 /* bits in this range are internal */
-
-#define SIGHUP 1 /* hangup */
-#define SIGINT 2 /* interrupt */
-#define SIGQUIT 3 /* quit */
-#define SIGILL 4 /* illegal instruction (not reset when caught) */
-#define SIGTRAP 5 /* trace trap (not reset when caught) */
-#define SIGABRT 6 /* used by abort */
-#define SIGEMT 7 /* EMT instruction */
-#define SIGFPE 8 /* floating point exception */
-#define SIGKILL 9 /* kill (cannot be caught or ignored) */
-#define SIGBUS 10 /* bus error */
-#define SIGSEGV 11 /* segmentation violation */
-#define SIGSYS 12 /* bad argument to system call */
-#define SIGPIPE 13 /* write on a pipe with no one to read it */
-#define SIGALRM 14 /* alarm clock */
-#define SIGTERM 15 /* software termination signal from kill */
-#define SIGURG 16 /* urgent condition on IO channel */
-#define SIGSTOP 17 /* sendable stop signal not from tty */
-#define SIGTSTP 18 /* stop signal from tty */
-#define SIGCONT 19 /* continue a stopped process */
-#define SIGCHLD 20 /* to parent on child stop or exit */
-#define SIGCLD 20 /* System V name for SIGCHLD */
-#define SIGTTIN 21 /* to readers pgrp upon background tty read */
-#define SIGTTOU 22 /* like TTIN for output if (tp->t_local&LTOSTOP) */
-#define SIGIO 23 /* input/output possible signal */
-#define SIGPOLL SIGIO /* System V name for SIGIO */
-#define SIGXCPU 24 /* exceeded CPU time limit */
-#define SIGXFSZ 25 /* exceeded file size limit */
-#define SIGVTALRM 26 /* virtual time alarm */
-#define SIGPROF 27 /* profiling time alarm */
-#define SIGWINCH 28 /* window changed */
-#define SIGLOST 29 /* resource lost (eg, record-lock lost) */
-#define SIGPWR SIGLOST /* power failure */
-#define SIGUSR1 30 /* user defined signal 1 */
-#define SIGUSR2 31 /* user defined signal 2 */
-
-#if __WORDSIZE == 64
-#define NSIG 65 /* signal 0 implied */
-#else
-#define NSIG 33 /* signal 0 implied */
-#endif
-
-/* Real-Time signals per SUSv3. RT_SIGMAX is defined as 8 in limits.h */
-#define SIGRTMIN 32
-#define SIGRTMAX (NSIG - 1)
-
-#define SIG_HOLD ((_sig_func_ptr)2) /* Signal in signal mask */
-
-void psiginfo (const siginfo_t *, const char *);
-int sigwait (const sigset_t *, int *);
-int sigwaitinfo (const sigset_t *, siginfo_t *);
-int sighold (int);
-int sigignore (int);
-int sigrelse (int);
-_sig_func_ptr sigset (int, _sig_func_ptr);
-
-int sigqueue(pid_t, int, const union sigval);
-int siginterrupt (int, int);
-#ifdef __INSIDE_CYGWIN__
-extern const char *sys_sigabbrev[];
-extern const char *sys_siglist[];
-#else
-extern const char __declspec(dllimport) *sys_sigabbrev[];
-extern const char __declspec(dllimport) *sys_siglist[];
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif /*_CYGWIN_SIGNAL_H*/
diff --git a/winsup/cygwin/include/cygwin/socket.h b/winsup/cygwin/include/cygwin/socket.h
deleted file mode 100644
index 8288c8320..000000000
--- a/winsup/cygwin/include/cygwin/socket.h
+++ /dev/null
@@ -1,323 +0,0 @@
-/* cygwin/socket.h
-
- Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2009, 2010, 2012,
- 2013, 2014 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_SOCKET_H
-#define _CYGWIN_SOCKET_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include <stdint.h>
-
-/* Not unsigned for backward compatibility. Keep #define for backward
- compatibility. */
-#ifndef socklen_t
-typedef int socklen_t;
-#define socklen_t socklen_t
-#endif
-
-typedef uint16_t sa_family_t;
-
-#ifndef __INSIDE_CYGWIN_NET__
-struct sockaddr {
- sa_family_t sa_family; /* address family, AF_xxx */
- char sa_data[14]; /* 14 bytes of protocol address */
-};
-
-/* Definition of sockaddr_storage according to SUSv3. */
-#define _SS_MAXSIZE 128 /* Maximum size. */
-#define _SS_ALIGNSIZE (sizeof (int64_t))/* Desired alignment. */
-#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof (sa_family_t))
-#define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof (sa_family_t) \
- + _SS_PAD1SIZE + _SS_ALIGNSIZE))
-
-struct sockaddr_storage {
- sa_family_t ss_family;
- char _ss_pad1[_SS_PAD1SIZE];
- int64_t __ss_align;
- char _ss_pad2[_SS_PAD2SIZE];
-};
-#endif
-
-#include <asm/socket.h> /* arch-dependent defines */
-#include <cygwin/sockios.h> /* the SIOCxxx I/O controls */
-#include <sys/uio.h> /* iovec support */
-#include <sys/types.h>
-
-struct ucred {
- pid_t pid;
- uid_t uid;
- gid_t gid;
-};
-
-struct linger {
- unsigned short l_onoff; /* Linger active */
- unsigned short l_linger; /* How long to linger for */
-};
-
-struct msghdr
-{
- void * msg_name; /* Socket name */
- socklen_t msg_namelen; /* Length of name */
- struct iovec * msg_iov; /* Data blocks */
- int msg_iovlen; /* Number of blocks */
- void * msg_control; /* Ancillary data */
- socklen_t msg_controllen; /* Ancillary data buffer length */
- int msg_flags; /* Received flags on recvmsg */
-};
-
-struct cmsghdr
-{
- socklen_t cmsg_len; /* Length of cmsghdr + data */
- int cmsg_level; /* Protocol */
- int cmsg_type; /* Protocol type */
-};
-
-#define CMSG_ALIGN(len) \
- (((len) + __alignof__ (struct cmsghdr) - 1) \
- & ~(__alignof__ (struct cmsghdr) - 1))
-#define CMSG_LEN(len) \
- (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
-#define CMSG_SPACE(len) \
- (CMSG_ALIGN (sizeof (struct cmsghdr)) + CMSG_ALIGN(len))
-#define CMSG_FIRSTHDR(mhdr) \
- ({ \
- struct msghdr *_m = (struct msghdr *) mhdr; \
- (unsigned) (_m)->msg_controllen >= sizeof (struct cmsghdr) \
- ? (struct cmsghdr *) (_m)->msg_control \
- : (struct cmsghdr *) NULL; \
- })
-#define CMSG_NXTHDR(mhdr,cmsg) \
- ({ \
- struct msghdr *_m = (struct msghdr *) mhdr; \
- struct cmsghdr *_c = (struct cmsghdr *) cmsg; \
- ((char *) _c + CMSG_SPACE (_c->cmsg_len) \
- > (char *) _m->msg_control + _m->msg_controllen) \
- ? (struct cmsghdr *) NULL \
- : (struct cmsghdr *) ((char *) _c + CMSG_ALIGN (_c->cmsg_len)); \
- })
-#define CMSG_DATA(cmsg) \
- ((unsigned char *) ((struct cmsghdr *)(cmsg) + 1))
-
-/* "Socket"-level control message types: */
-#define SCM_RIGHTS 0x01 /* access rights (array of int) */
-
-#ifdef __INSIDE_CYGWIN__
-/* Definition of struct msghdr up to release 1.5.18 */
-struct OLD_msghdr
-{
- void * msg_name; /* Socket name */
- int msg_namelen; /* Length of name */
- struct iovec * msg_iov; /* Data blocks */
- int msg_iovlen; /* Number of blocks */
- void * msg_accrights; /* Per protocol magic */
- /* (eg BSD descriptor passing) */
- int msg_accrightslen; /* Length of rights list */
-};
-#endif
-
-/* Socket types. */
-#define SOCK_STREAM 1 /* stream (connection) socket */
-#define SOCK_DGRAM 2 /* datagram (conn.less) socket */
-#define SOCK_RAW 3 /* raw socket */
-#define SOCK_RDM 4 /* reliably-delivered message */
-#define SOCK_SEQPACKET 5 /* sequential packet socket */
-
-/* GNU extension flags. Or them to the type parameter in calls to
- socket(2) to mark socket as nonblocking and/or close-on-exec. */
-#define SOCK_NONBLOCK 0x01000000
-#define SOCK_CLOEXEC 0x02000000
-#ifdef __INSIDE_CYGWIN__
-#define _SOCK_FLAG_MASK 0xff000000 /* Bits left for more extensions */
-#endif
-
-/* Supported address families. */
-/*
- * Address families.
- */
-#define AF_UNSPEC 0 /* unspecified */
-#define AF_UNIX 1 /* local to host (pipes, portals) */
-#define AF_LOCAL 1 /* POSIX name for AF_UNIX */
-#define AF_INET 2 /* internetwork: UDP, TCP, etc. */
-#define AF_IMPLINK 3 /* arpanet imp addresses */
-#define AF_PUP 4 /* pup protocols: e.g. BSP */
-#define AF_CHAOS 5 /* mit CHAOS protocols */
-#define AF_NS 6 /* XEROX NS protocols */
-#define AF_ISO 7 /* ISO protocols */
-#define AF_OSI AF_ISO /* OSI is ISO */
-#define AF_ECMA 8 /* european computer manufacturers */
-#define AF_DATAKIT 9 /* datakit protocols */
-#define AF_CCITT 10 /* CCITT protocols, X.25 etc */
-#define AF_SNA 11 /* IBM SNA */
-#define AF_DECnet 12 /* DECnet */
-#define AF_DLI 13 /* Direct data link interface */
-#define AF_LAT 14 /* LAT */
-#define AF_HYLINK 15 /* NSC Hyperchannel */
-#define AF_APPLETALK 16 /* AppleTalk */
-#define AF_NETBIOS 17 /* NetBios-style addresses */
-#define AF_INET6 23 /* IP version 6 */
-
-#define AF_MAX 32
-/*
- * Protocol families, same as address families for now.
- */
-#define PF_UNSPEC AF_UNSPEC
-#define PF_UNIX AF_UNIX
-#define PF_LOCAL AF_LOCAL
-#define PF_INET AF_INET
-#define PF_IMPLINK AF_IMPLINK
-#define PF_PUP AF_PUP
-#define PF_CHAOS AF_CHAOS
-#define PF_NS AF_NS
-#define PF_ISO AF_ISO
-#define PF_OSI AF_OSI
-#define PF_ECMA AF_ECMA
-#define PF_DATAKIT AF_DATAKIT
-#define PF_CCITT AF_CCITT
-#define PF_SNA AF_SNA
-#define PF_DECnet AF_DECnet
-#define PF_DLI AF_DLI
-#define PF_LAT AF_LAT
-#define PF_HYLINK AF_HYLINK
-#define PF_APPLETALK AF_APPLETALK
-#define PF_NETBIOS AF_NETBIOS
-#define PF_INET6 AF_INET6
-
-#define PF_MAX AF_MAX
-
-/* Maximum queue length specificable by listen. */
-#define SOMAXCONN 0x7fffffff
-
-/* Flags we can use with send/ and recv. */
-#define MSG_OOB 0x1 /* process out-of-band data */
-#define MSG_PEEK 0x2 /* peek at incoming message */
-#define MSG_DONTROUTE 0x4 /* send without using routing tables */
-#define MSG_WAITALL 0x8 /* wait for all requested bytes */
-#define MSG_DONTWAIT 0x10 /* selective non-blocking operation */
-#define MSG_NOSIGNAL 0x20 /* Don't raise SIGPIPE */
-#define MSG_TRUNC 0x0100 /* Normal data truncated */
-#define MSG_CTRUNC 0x0200 /* Control data truncated */
-/* Windows-specific flag values returned by recvmsg. */
-#define MSG_BCAST 0x0400 /* Broadcast datagram */
-#define MSG_MCAST 0x0800 /* Multicast datagram */
-
-/* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx */
-#define SOL_IP 0
-#define SOL_IPV6 41
-#define SOL_IPX 256
-#define SOL_AX25 257
-#define SOL_ATALK 258
-#define SOL_NETROM 259
-#define SOL_TCP 6
-#define SOL_UDP 17
-
-/* IP options */
-#ifndef IPTOS_LOWDELAY
-#define IPTOS_LOWDELAY 0x10
-#define IPTOS_THROUGHPUT 0x08
-#define IPTOS_RELIABILITY 0x04
-#endif
-
-/* These need to appear somewhere around here */
-#define IP_DEFAULT_MULTICAST_TTL 1
-#define IP_DEFAULT_MULTICAST_LOOP 1
-#define IP_MAX_MEMBERSHIPS 20
-
-/* IP options for use with getsockopt/setsockopt */
-#define IP_OPTIONS 1
-#define IP_HDRINCL 2
-#define IP_TOS 3
-#define IP_TTL 4
-#define IP_MULTICAST_IF 9
-#define IP_MULTICAST_TTL 10
-#define IP_MULTICAST_LOOP 11
-#define IP_ADD_MEMBERSHIP 12
-#define IP_DROP_MEMBERSHIP 13
-#define IP_DONTFRAGMENT 14
-#define IP_ADD_SOURCE_MEMBERSHIP 15
-#define IP_DROP_SOURCE_MEMBERSHIP 16
-#define IP_BLOCK_SOURCE 17
-#define IP_UNBLOCK_SOURCE 18
-#define IP_PKTINFO 19
-#define IP_UNICAST_IF 31
-
-/* IPv6 options for use with getsockopt/setsockopt */
-#define IPV6_HOPOPTS 1
-#define IPV6_UNICAST_HOPS 4
-#define IPV6_MULTICAST_IF 9
-#define IPV6_MULTICAST_HOPS 10
-#define IPV6_MULTICAST_LOOP 11
-#define IPV6_ADD_MEMBERSHIP 12
-#define IPV6_DROP_MEMBERSHIP 13
-#define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
-#define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
-#define IPV6_DONTFRAG 14
-#define IPV6_PKTINFO 19
-#define IPV6_HOPLIMIT 21
-#define IPV6_CHECKSUM 26
-#define IPV6_V6ONLY 27
-#define IPV6_UNICAST_IF 31
-#define IPV6_RTHDR 32
-#define IPV6_RECVRTHDR 38
-#define IPV6_TCLASS 39
-#define IPV6_RECVTCLASS 40
-
-/* IP agnostic options for use with getsockopt/setsockopt */
-#define MCAST_JOIN_GROUP 41
-#define MCAST_LEAVE_GROUP 42
-#define MCAST_BLOCK_SOURCE 43
-#define MCAST_UNBLOCK_SOURCE 44
-#define MCAST_JOIN_SOURCE_GROUP 45
-#define MCAST_LEAVE_SOURCE_GROUP 46
-
-#ifndef __INSIDE_CYGWIN_NET__
-#define MCAST_INCLUDE 0
-#define MCAST_EXCLUDE 1
-#endif
-
-/* Old WinSock1 values, needed internally */
-#ifdef __INSIDE_CYGWIN__
-#define _WS1_IP_OPTIONS 1
-#define _WS1_IP_MULTICAST_IF 2
-#define _WS1_IP_MULTICAST_TTL 3
-#define _WS1_IP_MULTICAST_LOOP 4
-#define _WS1_IP_ADD_MEMBERSHIP 5
-#define _WS1_IP_DROP_MEMBERSHIP 6
-#define _WS1_IP_TTL 7
-#define _WS1_IP_TOS 8
-#define _WS1_IP_DONTFRAGMENT 9
-#endif
-
-/* IPX options */
-#define IPX_TYPE 1
-
-/* TCP options - this way around because someone left a set in the c library includes */
-#ifndef TCP_NODELAY
-#define TCP_NODELAY 0x0001
-#define TCP_MAXSEG 2
-#endif
-
-/* 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 */
-
-/* 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/stat.h b/winsup/cygwin/include/cygwin/stat.h
deleted file mode 100644
index 73f3e9310..000000000
--- a/winsup/cygwin/include/cygwin/stat.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* cygwin/stat.h
-
- Copyright 2002, 2007, 2010, 2013 Red Hat Inc.
- Written by Corinna Vinschen <corinna@vinschen.de>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_STAT_H
-#define _CYGWIN_STAT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct stat
-{
- dev_t st_dev;
- ino_t st_ino;
- mode_t st_mode;
- nlink_t st_nlink;
- uid_t st_uid;
- gid_t st_gid;
- dev_t st_rdev;
- off_t st_size;
- timestruc_t st_atim;
- timestruc_t st_mtim;
- timestruc_t st_ctim;
- blksize_t st_blksize;
- blkcnt_t st_blocks;
- timestruc_t st_birthtim;
-};
-
-#if defined (__INSIDE_CYGWIN__) || defined (_COMPILING_NEWLIB)
-#ifndef __x86_64__
-struct __stat32
-{
- __dev16_t st_dev;
- __ino32_t st_ino;
- mode_t st_mode;
- nlink_t st_nlink;
- __uid16_t st_uid;
- __gid16_t st_gid;
- __dev16_t st_rdev;
- _off_t st_size;
- timestruc_t st_atim;
- timestruc_t st_mtim;
- timestruc_t st_ctim;
- blksize_t st_blksize;
- __blkcnt32_t st_blocks;
- long st_spare4[2];
-};
-#endif
-
-extern int fstat64 (int fd, struct stat *buf);
-extern int stat64 (const char *__restrict file_name,
- struct stat *__restrict buf);
-extern int lstat64 (const char *__restrict file_name,
- struct stat *__restrict buf);
-
-#endif
-
-#define st_atime st_atim.tv_sec
-#define st_mtime st_mtim.tv_sec
-#define st_ctime st_ctim.tv_sec
-#define st_birthtime st_birthtim.tv_sec
-
-/* POSIX IPC objects are not implemented as distinct file types, so the
- below macros have to return 0. The expression is supposed to catch
- illegal usage with non-stat parameters. */
-#define S_TYPEISMQ(buf) ((void)(buf)->st_mode,0)
-#define S_TYPEISSEM(buf) ((void)(buf)->st_mode,0)
-#define S_TYPEISSHM(buf) ((void)(buf)->st_mode,0)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CYGWIN_STAT_H */
diff --git a/winsup/cygwin/include/cygwin/stdlib.h b/winsup/cygwin/include/cygwin/stdlib.h
deleted file mode 100644
index 4d652fd5f..000000000
--- a/winsup/cygwin/include/cygwin/stdlib.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* stdlib.h
-
- Copyright 2005, 2006, 2007, 2008, 2009, 2011, 2013 Red Hat Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_STDLIB_H
-#define _CYGWIN_STDLIB_H
-
-#include <cygwin/wait.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-__uint32_t arc4random(void);
-void arc4random_addrandom(unsigned char *, int);
-void arc4random_buf(void *, size_t);
-void arc4random_stir(void);
-__uint32_t arc4random_uniform(__uint32_t);
-
-const char *getprogname (void);
-void setprogname (const char *);
-
-#ifndef __STRICT_ANSI__
-char *canonicalize_file_name (const char *);
-int unsetenv (const char *);
-#endif /*__STRICT_ANSI__*/
-#if !defined(__STRICT_ANSI__) \
- || (defined(_XOPEN_SOURCE) \
- && ((_XOPEN_SOURCE - 0 >= 500) || defined(_XOPEN_SOURCE_EXTENDED)))
-char *initstate (unsigned seed, char *state, size_t size);
-long random (void);
-char *setstate (const char *state);
-void srandom (unsigned);
-#endif
-#ifndef __STRICT_ANSI__
-char *ptsname (int);
-int ptsname_r(int, char *, size_t);
-int getpt (void);
-int grantpt (int);
-int unlockpt (int);
-#endif /*__STRICT_ANSI__*/
-
-int posix_openpt (int);
-int posix_memalign (void **, size_t, size_t);
-
-#ifdef _COMPILING_NEWLIB
-#define unsetenv UNUSED_unsetenv
-#define _unsetenv_r UNUSED__unsetenv_r
-#endif
-
-extern _PTR memalign _PARAMS ((size_t, size_t));
-extern _PTR valloc _PARAMS ((size_t));
-
-#undef _malloc_r
-#define _malloc_r(r, s) malloc (s)
-#undef _free_r
-#define _free_r(r, p) free (p)
-#undef _realloc_r
-#define _realloc_r(r, p, s) realloc (p, s)
-#undef _calloc_r
-#define _calloc_r(r, s1, s2) calloc (s1, s2);
-#undef _memalign_r
-#define _memalign_r(r, s1, s2) memalign (s1, s2);
-#undef _mallinfo_r
-#define _mallinfo_r(r) mallinfo ()
-#undef _malloc_stats_r
-#define _malloc_stats_r(r) malloc_stats ()
-#undef _mallopt_r
-#define _mallopt_r(i1, i2) mallopt (i1, i2)
-#undef _malloc_usable_size_r
-#define _malloc_usable_size_r(r, p) malloc_usable_size (p)
-#undef _valloc_r
-#define _valloc_r(r, s) valloc (s)
-#undef _pvalloc_r
-#define _pvalloc_r(r, s) pvalloc (s)
-#undef _malloc_trim_r
-#define _malloc_trim_r(r, s) malloc_trim (s)
-#undef _mstats_r
-#define _mstats_r(r, p) mstats (p)
-
-#ifdef __cplusplus
-}
-#endif
-#endif /*_CYGWIN_STDLIB_H*/
diff --git a/winsup/cygwin/include/cygwin/sys_time.h b/winsup/cygwin/include/cygwin/sys_time.h
deleted file mode 100644
index 1cbd8ae59..000000000
--- a/winsup/cygwin/include/cygwin/sys_time.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* sys_time.h
-
- Copyright 2005 Red Hat Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_SYS_TIME_H
-#define _CYGWIN_SYS_TIME_H
-#include <sys/select.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-int futimes (int, const struct timeval *);
-int lutimes (const char *, const struct timeval *);
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif /*_CYGWIN_SYS_TIME_H*/
diff --git a/winsup/cygwin/include/cygwin/sysproto.h b/winsup/cygwin/include/cygwin/sysproto.h
deleted file mode 100644
index 838555002..000000000
--- a/winsup/cygwin/include/cygwin/sysproto.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* cygwin/sysproto.h
-
- Copyright 2003, 2005, 2012, 2013 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* cygwin/sysproto.h header file for Cygwin. */
-
-#ifndef _CYGWIN_SYSPROTO_H
-#define _CYGWIN_SYSPROTO_H
-#define _SYS_SYSPROTO_H_ /* Keep it, used by BSD files */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-
-struct msgctl_args {
- int msqid;
- int cmd;
- struct msqid_ds *buf;
-};
-
-struct msgget_args {
- key_t key;
- int msgflg;
-};
-
-struct msgrcv_args {
- int msqid;
- void *msgp;
- size_t msgsz;
- long msgtyp;
- int msgflg;
-};
-
-struct msgsnd_args {
- int msqid;
- const void *msgp;
- size_t msgsz;
- int msgflg;
-};
-
-struct semctl_args {
- int semid;
- int semnum;
- int cmd;
- union semun *arg;
-};
-
-struct semget_args {
- key_t key;
- int nsems;
- int semflg;
-};
-
-struct semop_args {
- int semid;
- struct sembuf *sops;
- size_t nsops;
-};
-
-struct shmat_args {
- int shmid;
- const void *shmaddr;
- int shmflg;
-};
-
-struct shmctl_args {
- int shmid;
- int cmd;
- struct shmid_ds *buf;
-};
-
-struct shmdt_args {
- const void *shmaddr;
-};
-
-struct shmget_args {
- key_t key;
- size_t size;
- int shmflg;
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CYGWIN_SYSPROTO_H */
diff --git a/winsup/cygwin/include/cygwin/time.h b/winsup/cygwin/include/cygwin/time.h
deleted file mode 100644
index 6a82ae657..000000000
--- a/winsup/cygwin/include/cygwin/time.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* time.h
-
- Copyright 2005, 2007 Red Hat Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_TIME_H
-#define _CYGWIN_TIME_H
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* Not defined in main time.h */
-int __cdecl clock_setres (clockid_t, struct timespec *);
-
-/* GNU extensions. */
-time_t __cdecl timelocal (struct tm *);
-time_t __cdecl timegm (struct tm *);
-
-#define TIMER_RELTIME 0 /* For compatibility with HP/UX, Solaris, others? */
-
-#ifndef __STRICT_ANSI__
-
-extern int stime (const time_t *);
-
-extern int daylight __asm__ (_SYMSTR (_daylight));
-
-#ifndef __timezonefunc__
-extern long timezone __asm__ (_SYMSTR (_timezone));
-#endif
-
-#endif /*__STRICT_ANSI__*/
-
-#ifdef __cplusplus
-}
-#endif
-#endif /*_CYGWIN_TIME_H*/
diff --git a/winsup/cygwin/include/cygwin/types.h b/winsup/cygwin/include/cygwin/types.h
deleted file mode 100644
index 54c0c5ba5..000000000
--- a/winsup/cygwin/include/cygwin/types.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/* types.h
-
- Copyright 2001, 2002, 2003, 2005, 2006, 2010, 2011 Red Hat Inc.
- Written by Robert Collins <rbtcollins@hotmail.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_TYPES_H
-#define _CYGWIN_TYPES_H
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#include <stdint.h>
-#include <endian.h>
-#include <bits/wordsize.h>
-
-#ifndef __timespec_t_defined
-#define __timespec_t_defined
-typedef struct timespec timespec_t;
-#endif /*__timespec_t_defined*/
-
-#ifndef __timestruc_t_defined
-#define __timestruc_t_defined
-typedef struct timespec timestruc_t;
-#endif /*__timestruc_t_defined*/
-
-#ifndef __off_t_defined
-#define __off_t_defined
-/* Based on the newlib definitions. */
-#if __WORDSIZE == 64
-typedef _off_t off_t;
-#else
-typedef _off64_t off_t;
-#endif
-#endif /*__off_t_defined*/
-
-typedef __loff_t loff_t;
-
-#ifndef __dev_t_defined
-#define __dev_t_defined
-typedef __int16_t __dev16_t;
-typedef __uint32_t dev_t;
-#endif /*__dev_t_defined*/
-
-#ifndef __blksize_t_defined
-#define __blksize_t_defined
-typedef __int32_t blksize_t;
-#endif /*__blksize_t_defined*/
-
-#ifndef __blkcnt_t_defined
-#define __blkcnt_t_defined
-typedef __int32_t __blkcnt32_t;
-typedef __int64_t blkcnt_t;
-#endif /*__blkcnt_t_defined*/
-
-#ifndef __fsblkcnt_t_defined
-#define __fsblkcnt_t_defined
-/* Keep as is. 32 bit on i386, 64 bit on x86_64. */
-typedef unsigned long fsblkcnt_t;
-#endif /* __fsblkcnt_t_defined */
-
-#ifndef __fsfilcnt_t_defined
-#define __fsfilcnt_t_defined
-/* Keep as is. 32 bit on i386, 64 bit on x86_64. */
-typedef unsigned long fsfilcnt_t;
-#endif /* __fsfilcnt_t_defined */
-
-#ifndef __uid_t_defined
-#define __uid_t_defined
-typedef unsigned short __uid16_t;
-typedef __uint32_t uid_t;
-#endif /*__uid_t_defined*/
-
-#ifndef __gid_t_defined
-#define __gid_t_defined
-typedef unsigned short __gid16_t;
-typedef __uint32_t gid_t;
-#endif /*__gid_t_defined*/
-
-#ifndef __ino_t_defined
-#define __ino_t_defined
-#ifndef __x86_64__
-typedef __uint32_t __ino32_t;
-#endif
-typedef __uint64_t ino_t;
-#endif /*__ino_t_defined*/
-
-/* Generic ID type, must match at least pid_t, uid_t and gid_t in size. */
-#ifndef __id_t_defined
-#define __id_t_defined
-typedef __uint32_t id_t;
-#endif /* __id_t_defined */
-
-#if defined (__INSIDE_CYGWIN__) && !defined (__x86_64__)
-struct __flock32 {
- short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */
- short l_whence; /* flag to choose starting offset */
- _off_t l_start; /* relative offset, in bytes */
- _off_t l_len; /* length, in bytes; 0 means lock to EOF */
- short l_pid; /* returned with F_GETLK */
- short l_xxx; /* reserved for future use */
-};
-#endif
-
-struct flock {
- short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */
- short l_whence; /* flag to choose starting offset */
- off_t l_start; /* relative offset, in bytes */
- off_t l_len; /* length, in bytes; 0 means lock to EOF */
- pid_t l_pid; /* returned with F_GETLK */
-};
-
-#ifndef __key_t_defined
-#define __key_t_defined
-typedef long long key_t;
-#endif /* __key_t_defined */
-
-#ifndef __BIT_TYPES_DEFINED
-#define __BIT_TYPES_DEFINED__ 1
-
-#ifndef __vm_offset_t_defined
-#define __vm_offset_t_defined
-typedef unsigned long vm_offset_t;
-#endif /*__vm_offset_t_defined*/
-
-#ifndef __vm_size_t_defined
-#define __vm_size_t_defined
-typedef unsigned long vm_size_t;
-#endif /*__vm_size_t_defined*/
-
-#ifndef __vm_object_t_defined
-#define __vm_object_t_defined
-typedef void *vm_object_t;
-#endif /* __vm_object_t_defined */
-
-#ifndef __u_int8_t_defined
-#define __u_int8_t_defined
-typedef unsigned char u_int8_t;
-#endif
-#ifndef __u_int16_t_defined
-#define __u_int16_t_defined
-typedef __uint16_t u_int16_t;
-#endif
-#ifndef __u_int32_t_defined
-#define __u_int32_t_defined
-typedef __uint32_t u_int32_t;
-#endif
-#ifndef __u_int64_t_defined
-#define __u_int64_t_defined
-typedef __uint64_t u_int64_t;
-#endif
-
-#ifndef __register_t_defined
-#define __register_t_defined
-typedef __int32_t register_t;
-#endif
-
-#ifndef __addr_t_defined
-#define __addr_t_defined
-typedef char *addr_t;
-#endif
-
-#ifndef __mode_t_defined
-#define __mode_t_defined
-typedef unsigned mode_t;
-#endif
-#endif /*__BIT_TYPES_DEFINED*/
-
-#if !defined(__INSIDE_CYGWIN__) || !defined(__cplusplus)
-
-typedef struct __pthread_t {char __dummy;} *pthread_t;
-typedef struct __pthread_mutex_t {char __dummy;} *pthread_mutex_t;
-
-typedef struct __pthread_key_t {char __dummy;} *pthread_key_t;
-typedef struct __pthread_attr_t {char __dummy;} *pthread_attr_t;
-typedef struct __pthread_mutexattr_t {char __dummy;} *pthread_mutexattr_t;
-typedef struct __pthread_condattr_t {char __dummy;} *pthread_condattr_t;
-typedef struct __pthread_cond_t {char __dummy;} *pthread_cond_t;
-
- /* These variables are not user alterable. This means you!. */
-typedef struct
-{
- pthread_mutex_t mutex;
- int state;
-}
-pthread_once_t;
-typedef struct __pthread_spinlock_t {char __dummy;} *pthread_spinlock_t;
-typedef struct __pthread_rwlock_t {char __dummy;} *pthread_rwlock_t;
-typedef struct __pthread_rwlockattr_t {char __dummy;} *pthread_rwlockattr_t;
-
-#else
-
-/* pthreads types */
-
-typedef class pthread *pthread_t;
-typedef class pthread_mutex *pthread_mutex_t;
-typedef class pthread_key *pthread_key_t;
-typedef class pthread_attr *pthread_attr_t;
-typedef class pthread_mutexattr *pthread_mutexattr_t;
-typedef class pthread_condattr *pthread_condattr_t;
-typedef class pthread_cond *pthread_cond_t;
-typedef class pthread_once pthread_once_t;
-typedef class pthread_spinlock *pthread_spinlock_t;
-typedef class pthread_rwlock *pthread_rwlock_t;
-typedef class pthread_rwlockattr *pthread_rwlockattr_t;
-
-/* semaphores types */
-typedef class semaphore *sem_t;
-#endif /* __INSIDE_CYGWIN__ */
-
-/* this header needs the dev_t typedef */
-#include <sys/sysmacros.h>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CYGWIN_TYPES_H */
diff --git a/winsup/cygwin/include/cygwin/utmp.h b/winsup/cygwin/include/cygwin/utmp.h
deleted file mode 100644
index 56a137ffe..000000000
--- a/winsup/cygwin/include/cygwin/utmp.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* cygwin/utmp.h
-
- Copyright 2004 Red Hat, Inc.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#ifndef CYGWIN_UTMP_H
-#define CYGWIN_UTMP_H
-
-#include <sys/types.h>
-#include <time.h>
-#include <paths.h>
-
-#define WTMP_FILE _PATH_WTMP
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define UT_LINESIZE 16
-#define UT_NAMESIZE 16
-#define UT_HOSTSIZE 256
-#define UT_IDLEN 2
-
-#define RUN_LVL 1
-#define BOOT_TIME 2
-#define NEW_TIME 3
-#define OLD_TIME 4
-
-#define INIT_PROCESS 5
-#define LOGIN_PROCESS 6
-#define USER_PROCESS 7
-#define DEAD_PROCESS 8
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* CYGWIN_UTMP_H */
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
deleted file mode 100644
index 9062e42fd..000000000
--- a/winsup/cygwin/include/cygwin/version.h
+++ /dev/null
@@ -1,541 +0,0 @@
-/* version.h -- Cygwin version numbers and accompanying documentation.
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* Cygwin versioning is relatively complicated because of its status
- as a shared library. Let's start with how versioning used to be done.
-
- Historical versioning in Cygwin 16.0 to 19.5:
-
- In the olden days of Cygwin, we had a dll major and minor version
- and a registry version. The major number started at 16 because the
- "b15" GNU-Win32 release of the compiler tools was out when this
- scheme was started. We incremented the DLL name frequently (for
- every official release) and towards the end of this period every
- release used a different shared memory area to prevent DLLs from
- interfering with each other (embedding a build timestamp into the
- name of the shared memory area). This turned out to be a Bad Idea
- (tm) because people needed to mingle separate releases and have
- them work together more than we thought they would. This was
- especially problematic when tty info needed to be retained when an
- old Cygwin executable executed a newer one.
-
- In the old scheme, we incremented the major number whenever a
- change to the dll invalidated existing executables. This can
- happen for a number of reasons, including when functions are
- removed from the export list of the dll. The minor number was
- incremented when a change was made that we wanted to record, but
- that didn't invalidate existing executables. Both numbers were
- recorded in the executable and in the dll.
-
- In October 1998 (starting with Cygwin 19.6), we started a new method
- of Cygwin versioning: */
-
- /* The DLL major and minor numbers correspond to the "version of
- the Cygwin shared library". This version is used to track important
- changes to the DLL and is mainly informative in nature. */
-
-#define CYGWIN_VERSION_DLL_MAJOR 1007
-#define CYGWIN_VERSION_DLL_MINOR 34
-
- /* Major numbers before CYGWIN_VERSION_DLL_EPOCH are
- incompatible. */
-
-#define CYGWIN_VERSION_DLL_EPOCH 19
-
- /* CYGWIN_VERSION_DLL_COMBINED gives us a single number
- representing the combined DLL major and minor numbers. */
-
- /* WATCH OUT FOR OCTAL! Don't use, say, "00020" for 0.20 */
-
-#define CYGWIN_VERSION_DLL_MAKE_COMBINED(maj, min) (((maj) * 1000) + min)
-#define CYGWIN_VERSION_DLL_COMBINED \
- CYGWIN_VERSION_DLL_MAKE_COMBINED (CYGWIN_VERSION_DLL_MAJOR, CYGWIN_VERSION_DLL_MINOR)
-
- /* Every version of cygwin <= this uses an old, incorrect method
- to determine signal masks. */
-
-#define CYGWIN_VERSION_PER_PROCESS_API_VERSION_COMBINED(u) \
- CYGWIN_VERSION_DLL_MAKE_COMBINED ((u)->api_major, (u)->api_minor)
-
-#define CYGWIN_VERSION_USER_API_VERSION_COMBINED \
- CYGWIN_VERSION_PER_PROCESS_API_VERSION_COMBINED (user_data)
-
- /* API versions <= this had a termios structure whose members were
- too small to accomodate modern settings. */
-#define CYGWIN_VERSION_DLL_OLD_TERMIOS 5
-#define CYGWIN_VERSION_DLL_IS_OLD_TERMIOS \
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= CYGWIN_VERSION_DLL_OLD_TERMIOS)
-
-#define CYGWIN_VERSION_DLL_MALLOC_ENV 28
- /* Old APIs had getc/putc macros that conflict with new CR/LF
- handling in the stdio buffers */
-#define CYGWIN_VERSION_OLD_STDIO_CRLF_HANDLING \
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 20)
-
-#define CYGWIN_VERSION_CHECK_FOR_S_IEXEC \
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED >= 36)
-
-#define CYGWIN_VERSION_CHECK_FOR_OLD_O_NONBLOCK \
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 28)
-
-#define CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES \
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED >= 79)
-
-#define CYGWIN_VERSION_CHECK_FOR_USING_ANCIENT_MSGHDR \
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 138)
-
-#define CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES \
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 138)
-
-#define CYGWIN_VERSION_CHECK_FOR_OLD_IFREQ \
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 161)
-
-#define CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE \
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 209)
-
-#define CYGWIN_VERSION_USE_PSEUDO_RELOC_IN_DLL(u) \
- (CYGWIN_VERSION_PER_PROCESS_API_VERSION_COMBINED (u) >= 227)
-
-#define CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS \
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED >= 272)
-
-#define CYGWIN_VERSION_CYGWIN_CONV 181
-
- /* API_MAJOR 0.0: Initial version. API_MINOR changes:
- 1: Export cygwin32_ calls as cygwin_ as well.
- 2: Export j1, jn, y1, yn.
- 3: Export dll_noncygwin_dllcrt0.
- 4: New socket ioctls, revamped ifconf support.
- 5: Thread support/exports.
- 6: Change in termios handling.
- 7: Export scandir and alphasort.
- 8: Export _ctype_, _sys_errlist, _sys_nerr.
- 9: Mount-related changes, new cygwin_umount export.
- Raw device support (tape, floppies).
- 10: Fast math routine support added.
- 11: Export seekdir, telldir.
- 12: Export pthread_join, pthread_detach.
- 13: Export math funcs gamma and friends, also _j0, _j1, etc.
- 14: Export snprintf and vnsprintf.
- 15: Export glob
- 16: Export cygwin_stackdump
- 17: Export fast math stuff
- 18: Stop exporting _strace_wm
- 19: Export fchown, lchown, lacl
- 20: regsub, inet_network
- 21: incompatible change to stdio cr/lf and buffering
- 22: Export cygwin_logon_user, cygwin_set_impersonation_token.
- geteuid, getegid return effective uid/gid.
- getuid, getgid return real uid/gid.
- seteuid, setegid set only effective uid/gid.
- setuid, setgid set effective and real uid/gid.
- 23: Export new dll_crt0 interface and cygwin_user_data for use
- with crt0 startup code.
- 24: Export poll and _poll.
- 25: Export getmode and _getmode.
- 26: CW_GET_CYGDRIVE_PREFIXES addition to external.cc
- 27: CW_GETPINFO_FULL addition to external.cc
- 28: Accidentally bumped by cgf
- 29: Export hstrerror
- 30: CW_GET_CYGDRIVE_INFO addition to external.cc
- 31: Export inet_aton
- 32: Export getrlimit/setrlimit
- 33: Export setlogmask
- 34: Separated out mount table
- 35: Export drand48, erand48, jrand48, lcong48, lrand48,
- mrand48, nrand48, seed48, and srand48.
- 36: Added _cygwin_S_IEXEC, et al
- 37: [f]pathconv support _PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY
- 38: vscanf, vscanf_r, and random pthread functions
- 39: asctime_r, ctime_r, gmtime_r, localtime_r
- 40: fchdir
- 41: __signgam
- 42: sys_errlist, sys_nerr
- 43: sigsetjmp, siglongjmp fixed
- 44: Export dirfd
- 45: perprocess change, gamma_r, gammaf_r, lgamma_r, lgammaf_r
- 46: Remove cygwin_getshared
- 47: Report EOTWarningZoneSize in struct mtget.
- 48: Export "posix" regex functions
- 49: Export setutent, endutent, utmpname, getutent, getutid, getutline.
- 50: Export fnmatch.
- 51: Export recvmsg, sendmsg.
- 52: Export strptime
- 53: Export strlcat, strlcpy.
- 54: Export __fpclassifyd, __fpclassifyf, __signbitd, __signbitf.
- 55: Export fcloseall, fcloseall_r.
- 56: Make ntsec on by default.
- 57: Export setgroups.
- 58: Export memalign, valloc, malloc_trim, malloc_usable_size, mallopt,
- malloc_stats
- 59: getsid
- 60: MSG_NOSIGNAL
- 61: Export getc_unlocked, getchar_unlocked, putc_unlocked,
- putchar_unlocked
- 62: Erroneously bumped
- 63: Export pututline
- 64: Export fseeko, ftello
- 65: Export siginterrupt
- 66: Export nl_langinfo
- 67: Export pthread_getsequence_np
- 68: Export netdb stuff
- 69: Export strtof
- 70: Export asprintf, _asprintf_r, vasprintf, _vasprintf_r
- 71: Export strerror_r
- 72: Export nanosleep
- 73: Export setreuid32, setreuid, setregid32, setregid
- 74: Export _strtold a64l hcreate hcreate_r hdestroy hdestroy_r hsearch
- hsearch_r isblank iswalnum iswalpha iswblank iswcntrl iswctype
- iswdigit iswgraph iswlower iswprint iswpunct iswspace iswupper
- iswxdigit l64a mbrlen mbrtowc mbsinit mbsrtowcs mempcpy
- on_exit setbuffer setlinebuf strndup strnlen tdelete tdestroy
- tfind towctrans towlower towupper tsearch twalk wcrtomb wcscat
- wcschr wcscpy wcscspn wcslcat wcslcpy wcsncat wcsncmp wcsncpy
- wcspbrk wcsrchr wcsrtombs wcsspn wcsstr wctob wctob wctrans
- wctype wmemchr wmemcmp wmemcpy wmemmove wmemset
- 75: Export exp2 exp2f fdim fdimf fma fmaf fmax fmaxf fmin fminf lrint
- lrintf lround lroundf nearbyint nearbyintf remquo remquof
- round roundf scalbln scalblnf sincos sincosf tgamma tgammaf
- truncf
- 76: mallinfo
- 77: thread-safe exit/at_exit
- 78: Use stat and fstat rather than _stat, and _fstat.
- Export btowc and trunc.
- 79: Export acl32 aclcheck32 aclfrommode32 aclfrompbits32 aclfromtext32
- aclsort32 acltomode32 acltopbits32 acltotext32 facl32
- fgetpos64 fopen64 freopen64 fseeko64 fsetpos64 ftello64
- _open64 _lseek64 _fstat64 _stat64 mknod32
- 80: Export pthread_rwlock stuff
- 81: CW_CHECK_NTSEC addition to external.cc
- 82: Export wcscoll wcswidth wcwidth
- 83: Export gethostid
- 84: Pty open allocates invisible console. 64 bit interface
- 85: Export new 32/64 functions from API 0.79 only with leading
- underscore. No problems with backward compatibility since no
- official release has been made so far. This change removes
- exported symbols like fopen64, which might confuse configure.
- 86: Export ftok
- 87: Export vsyslog
- 88: Export _getreent
- 89: Export __mempcpy
- 90: Export _fopen64
- 91: Export argz_add argz_add_sep argz_append argz_count argz_create
- argz_create_sep argz_delete argz_extract argz_insert
- argz_next argz_replace argz_stringify envz_add envz_entry
- envz_get envz_merge envz_remove envz_strip
- 92: Export getusershell, setusershell, endusershell
- 93: Export daemon, forkpty, openpty, iruserok, ruserok, login_tty,
- openpty, forkpty, revoke, logwtmp, updwtmp
- 94: Export getopt, getopt_long, optarg, opterr, optind, optopt,
- optreset, __check_rhosts_file, __rcmd_errstr.
- 95: Export shmat, shmctl, shmdt, shmget.
- 96: CW_GET_ERRNO_FROM_WINERROR addition to external.cc
- 97: Export sem_open, sem_close, sem_timedwait, sem_getvalue.
- 98: Export _tmpfile64.
- 99: CW_GET_POSIX_SECURITY_ATTRIBUTE addition to external.cc.
- 100: CW_GET_SHMLBA addition to external.cc.
- 101: Export err, errx, verr, verrx, warn, warnx, vwarn, vwarnx.
- 102: CW_GET_UID_FROM_SID and CW_GET_GID_FROM_SID addition to external.cc.
- 103: Export getprogname, setprogname.
- 104: Export msgctl, msgget, msgrcv, msgsnd, semctl, semget, semop.
- 105: Export sigwait.
- 106: Export flock.
- 107: Export fcntl64.
- 108: Remove unused (hopefully) reent_data export.
- 109: Oh well. Someone uses reent_data.
- 110: Export clock_gettime, sigwaitinfo, timer_create, timer_delete,
- timer_settime
- 111: Export sigqueue, sighold.
- 112: Redefine some mtget fields.
- 113: Again redefine some mtget fields. Use mt_fileno and mt_blkno as
- on Linux.
- 114: Export rand_r, ttyname_r.
- 115: Export flockfile, ftrylockfile, funlockfile, getgrgid_r, getgrnam_r,
- getlogin_r.
- 116: Export atoll.
- 117: Export utmpx functions, Return utmp * from pututent.
- 118: Export getpriority, setpriority.
- 119: Export fdatasync.
- 120: Export basename, dirname.
- 122: Export statvfs, fstatvfs.
- 123: Export utmpxname.
- 124: Add MAP_AUTOGROW flag to mmap.
- 125: LD_PRELOAD/CW_HOOK available.
- 126: Export lsearch, lfind, timer_gettime.
- 127: Export sigrelese.
- 128: Export pselect.
- 129: Export mkdtemp.
- 130: Export strtoimax, strtoumax, llabs, imaxabs, lldiv, imaxdiv.
- 131: Export inet_ntop, inet_pton.
- 132: Add GLOB_LIMIT flag to glob.
- 133: Export __getline, __getdelim.
- 134: Export getline, getdelim.
- 135: Export pread, pwrite
- 136: Add TIOCMBIS/TIOCMBIC ioctl codes.
- 137: fts_children, fts_close, fts_get_clientptr, fts_get_stream,
- fts_open, fts_read, fts_set, fts_set_clientptr, ftw, nftw.
- 138: Export readdir_r.
- 139: Start using POSIX definition of struct msghdr and WinSock2
- IPPROTO_IP values.
- 140: Export mlock, munlock.
- 141: Export futimes, lutimes.
- 142: Export memmem
- 143: Export clock_getres, clock_setres
- 144: Export timelocal, timegm.
- 145: Add MAP_NORESERVE flag to mmap.
- 146: Change SI_USER definition. FIXME: Need to develop compatibility
- macro for this?
- 147: Eliminate problematic d_ino from dirent structure. unsetenv now
- returns int, as per linux.
- 148: Add open(2) flags O_SYNC, O_RSYNC, O_DSYNC and O_DIRECT.
- 149: Add open(2) flag O_NOFOLLOW.
- 150: Export getsubopt.
- 151: Export __opendir_with_d_ino
- 152: Revert to having d_ino in dirent unconditionally.
- 153: Export updwtmpx, Implement CW_SETUP_WINENV.
- 154: Export sigset, sigignore.
- 155: Export __isinff, __isinfd, __isnanf, __isnand.
- 156: Export __srbuf_r, __swget_r.
- 157: Export gai_strerror, getaddrinfo, getnameinfo, freeaddrinfo,
- in6addr_any, in6addr_loopback.
- 158: Export bindresvport, bindresvport_sa, iruserok_sa, rcmd_af,
- rresvport_af.
- 159: Export posix_openpt.
- 160: Export posix_fadvise, posix_fallocate.
- 161: Export resolver functions.
- 162: New struct ifreq. Export if_nametoindex, if_indextoname,
- if_nameindex, if_freenameindex.
- 163: Export posix_madvise, posix_memalign.
- 164: Export shm_open, shm_unlink.
- 165: Export mq_close, mq_getattr, mq_notify, mq_open, mq_receive,
- mq_send, mq_setattr, mq_timedreceive, mq_timedsend, mq_unlink.
- 166: Export sem_unlink.
- 167: Add st_birthtim to struct stat.
- 168: Export asnprintf, dprintf, _Exit, vasnprintf, vdprintf.
- 169: Export confstr.
- 170: Export insque, remque.
- 171: Export exp10, exp10f, pow10, pow10f, strcasestr, funopen,
- fopencookie.
- 172: Export getifaddrs, freeifaddrs.
- 173: Export __assert_func.
- 174: Export stpcpy, stpncpy.
- 175: Export fdopendir.
- 176: Export wcstol, wcstoll, wcstoul, wcstoull, wcsxfrm.
- 177: Export sys_sigabbrev
- 178: Export wcpcpy, wcpncpy.
- 179: Export _f_llrint, _f_llrintf, _f_llrintl, _f_lrint, _f_lrintf,
- _f_lrintl, _f_rint, _f_rintf, _f_rintl, llrint, llrintf, llrintl,
- rintl, lrintl, and redirect exports of lrint, lrintf, rint, rintf.
- 180: Export getxattr, lgetxattr, fgetxattr, listxattr, llistxattr,
- flistxattr, setxattr, lsetxattr, fsetxattr, removexattr,
- lremovexattr, fremovexattr.
- 181: Export cygwin_conv_path, cygwin_create_path, cygwin_conv_path_list.
- 182: Export lockf.
- FIXME: Removed 12 year old and entirely wrong wprintf function at
- this point. We need a working implementation soon.
- 183: Export open_memstream, fmemopen.
- 184: Export openat, faccessat, fchmodat, fchownat, fstatat, futimesat,
- linkat, mkdirat, mkfifoat, mknodat, readlinkat, renameat, symlinkat,
- unlinkat.
- 185: Export futimens, utimensat.
- 186: Remove ancient V8 regexp functions. Also eliminate old crt0 interface
- which provided its own user_data structure.
- 187: Export cfmakeraw.
- 188: Export CW_SET_PRIV_KEY.
- 189: Implement dirent.d_type.
- 190: Export fgetwc, fgetws, fputwc, fputws, fwide, getwc, getwchar,
- putwc, putwchar, ungetwc.
- 191: Export glob_pattern_p
- 192: CW_SETERRNO added
- 193: Export wcstok.
- 194: fcntl.h flags O_DIRECTORY, O_EXEC and O_SEARCH added.
- 195: Export wcstod, wcstof.
- 196: Export wcsnlen.
- 197: Export wcstoimax, wcstoumax.
- 198: Export reallocf.
- 199: Export open_wmemstream.
- 200: Export mbsnrtowcs, wcsnrtombs.
- 201: Export wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf.
- 202: Export gethostbyname2.
- 203: Export wcsftime.
- 204: recv/send flag MSG_DONTWAIT added.
- 205: Export wscanf, fwscanf, swscanf, vwscanf, vfwscanf, vswscanf.
- 206: Export wcscasecmp, wcsncasecmp.
- 207: Export wcsdup.
- 208: Export log2, log2f.
- 209: Export wordexp, wordfree.
- 210: New ctype layout using variable ctype pointer. Export __ctype_ptr__.
- 211: Export fpurge, mkstemps.
- 212: Add and export libstdc++ malloc wrappers.
- 213: Export canonicalize_file_name, eaccess, euidaccess.
- 214: Export execvpe, fexecve.
- 215: CW_EXIT_PROCESS added.
- 216: CW_SET_EXTERNAL_TOKEN added.
- 217: CW_GET_INSTKEY added.
- 218: Export get_nprocs, get_nprocs_conf, get_phys_pages, get_avphys_pages.
- 219: Export dup3, pipe2, O_CLOEXEC, F_DUPFD_CLOEXEC.
- 220: Export accept4, SOCK_CLOEXEC, SOCK_NONBLOCK.
- 221: Export strfmon.
- 222: CW_INT_SETLOCALE added.
- 223: SIGPWR added.
- 224: Export xdr* functions.
- 225: Export __xdr* functions.
- 226: Export __locale_mb_cur_max.
- 227: Add pseudo_reloc_start, pseudo_reloc_end, image_base to per_process.
- 228: CW_STRERROR added.
- 229: Add mkostemp, mkostemps.
- 230: Add CLOCK_MONOTONIC.
- 231: Add fenv.h functions.
- 232: Export cacos, cacosf, cacosh, cacoshf, carg, cargf, casin, casinf,
- casinh, casinhf, catan, catanf, catanh, catanhf, ccos, ccosf, ccosh,
- ccoshf, cexp, cexpf, cimag, cimagf, clog, clogf, conj, conjf, cpow,
- cpowf, cproj, cprojf, creal, crealf, csin, csinf, csinh, csinhf,
- csqrt, csqrtf, ctan, ctanf, ctanh, ctanhf.
- 233: Add TIOCGPGRP, TIOCSPGRP. Export llround, llroundf.
- 234: Export program_invocation_name, program_invocation_short_name.
- 235: Export madvise.
- 236: Export pthread_yield, __xpg_strerror_r.
- 237: Export strchrnul.
- 238: Export pthread_spin_destroy, pthread_spin_init, pthread_spin_lock,
- pthread_spin_trylock, pthread_spin_unlock.
- 239: Export pthread_setschedprio.
- 240: Export ppoll.
- 241: Export pthread_attr_getstack, pthread_attr_getstackaddr,
- pthread_getattr_np.
- 242: Export psiginfo, psignal, sys_siglist.
- 243: Export sysinfo.
- 244: Export clock_settime.
- 245: Export pthread_attr_getguardsize, pthread_attr_setguardsize,
- pthread_attr_setstack, pthread_attr_setstackaddr.
- 246: Add CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID.
- Export clock_getcpuclockid, pthread_getcpuclockid.
- 247: Export error, error_at_line, error_message_count, error_one_per_line,
- error_print_progname.
- 248: Export __fpurge.
- 249: Export pthread_condattr_getclock, pthread_condattr_setclock.
- 250: Export clock_nanosleep.
- 251: RTLD_NODELETE, RTLD_NOLOAD, RTLD_DEEPBIND added.
- 252: CW_CVT_ENV_TO_WINENV added.
- 253: Export TIOCSCTTY, tcgetsid.
- 254: Export getgrouplist.
- 255: Export ptsname_r.
- 256: Add CW_ALLOC_DRIVE_MAP, CW_MAP_DRIVE_MAP, CW_FREE_DRIVE_MAP.
- 257: Export getpt.
- 258: Export get_current_dir_name.
- 259: Export pthread_sigqueue.
- 260: Export scandirat.
- 261: Export memrchr.
- 262: Export getmntent_r.
- 263: Export cfsetspeed.
- 264: Consistently export strtold
- 265: Export __b64_ntop, __b64_pton.
- 266: Export arc4random, arc4random_addrandom, arc4random_buf,
- arc4random_stir, arc4random_uniform.
- 267: Export rawmemchr.
- 268: Export GetCommandLineA, GetCommandLineW
- 269: Allow application override of posix_memalign.
- 270: Redefine mtget.mt_resid field to contain current partition as well
- as number of partitions on tape.
- 271: Export posix_spawn, posix_spawnp, and helper functions.
- 272: Export tm_gmtoff and tm_zone members.
- 273: Skipped.
- 274: Export __cxa_atexit and __cxa_finalize.
- 275: Introduce account mapping from Windows account DBs. Add CW_SETENT,
- CW_GETENT, CW_ENDENT, CW_GETNSSSEP, CW_GETPWSID, CW_GETGRSID,
- CW_CYGNAME_FROM_WINNAME.
- 276: Export ffsl, ffsll.
- 277: Add setsockopt(SO_PEERCRED).
- 278: Add quotactl.
- 279: Export stime.
- 280: Static atexit in libcygwin.a, CW_FIXED_ATEXIT.
- 281: Add CW_GETNSS_PWD_SRC, CW_GETNSS_GRP_SRC.
- 282: Export __bsd_qsort_r, qsort_r.
- 283: Export __fbufsize, __flbf, __fpending, __freadable, __freading,
- __fsetlocking, __fwritable, __fwriting. clearerr_unlocked,
- feof_unlocked, ferror_unlocked, fflush_unlocked, fgetc_unlocked,
- fgets_unlocked, fgetwc_unlocked, fgetws_unlocked, fileno_unlocked,
- fputc_unlocked, fputs_unlocked, fputwc_unlocked, fputws_unlocked,
- fread_unlocked, fwrite_unlocked, getwc_unlocked, getwchar_unlocked,
- putwc_unlocked, putwchar_unlocked.
- */
-
- /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
-
-#define CYGWIN_VERSION_API_MAJOR 0
-#define CYGWIN_VERSION_API_MINOR 283
-
- /* There is also a compatibity version number associated with the
- shared memory regions. It is incremented when incompatible
- changes are made to the shared memory region *or* to any named
- shared mutexes, semaphores, etc. The arbitrary starting
- version was 0 (cygwin release 98r2).
- Bump to 4 since this hasn't been rigorously updated in a
- while. */
-
-#define CYGWIN_VERSION_SHARED_DATA 5
-
- /* An identifier used in the names used to create shared objects.
- The full names include the CYGWIN_VERSION_SHARED_DATA version
- as well as this identifier. */
-
-#define CYGWIN_VERSION_DLL_IDENTIFIER "cygwin1"
-
- /* The Cygwin mount table interface in the Win32 registry also
- has a version number associated with it in case that is
- changed in a non-backwards compatible fashion. Increment this
- version number whenever incompatible changes in mount table
- registry usage are made.
-
- 1: Original number version.
- 2: New mount registry layout, system-wide mount accessibility.
- 3: The mount table is not in the registry anymore, but in /etc/fstab.
- */
-
-#define CYGWIN_VERSION_MOUNT_REGISTRY 3
-
- /* Identifiers used in the Win32 registry. */
-
-#define CYGWIN_INFO_CYGWIN_REGISTRY_NAME "Cygwin"
-#define CYGWIN_INFO_INSTALLATIONS_NAME "Installations"
-
- /* The default cygdrive prefix. */
-
-#define CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX "/cygdrive"
-
- /* In addition to the above version number strings, the build
- process adds some strings that may be useful in
- debugging/identifying a particular Cygwin DLL:
-
- The mkvers.sh script at the top level produces a .cc file
- which initializes a cygwin_version structure based on the
- above version information and creates a string table for
- grepping via "fgrep '%%%' cygwinwhatever.dll" if you are
- using GNU grep. Otherwise you may want to do a
- "strings cygwinwhatever.dll | fgrep '%%%'" instead.
-
- This will produce output such as:
-
- %%% Cygwin dll_identifier: cygwin
- %%% Cygwin api_major: 0
- %%% Cygwin api_minor: 0
- %%% Cygwin dll_major: 19
- %%% Cygwin dll_minor: 6
- %%% Cygwin shared_data: 1
- %%% Cygwin registry: b15
- %%% Cygwin build date: Wed Oct 14 16:26:51 EDT 1998
- %%% Cygwin shared id: cygwinS1
-
- This information can also be obtained through a call to
- cygwin_internal (CW_GETVERSIONINFO).
- */
-
-#define CYGWIN_VERSION_MAGIC(a, b) ((unsigned) ((((unsigned short) a) << 16) | (unsigned short) b))
-#define CYGWIN_VERSION_MAGIC_VERSION(a) ((unsigned) ((unsigned)a & 0xffff))
diff --git a/winsup/cygwin/include/cygwin/wait.h b/winsup/cygwin/include/cygwin/wait.h
deleted file mode 100644
index 08649f8a2..000000000
--- a/winsup/cygwin/include/cygwin/wait.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* cygwin/wait.h
-
- Copyright 2006, 2009, 2011, 2012 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_WAIT_H
-#define _CYGWIN_WAIT_H
-
-#define WAIT_ANY (pid_t)-1
-#define WAIT_MYPGRP (pid_t)0
-
-#define WNOHANG 1
-#define WUNTRACED 2
-#define WCONTINUED 8
-#define __W_CONTINUED 0xffff
-
-/* Will be redefined in sys/wait.h. */
-#define __wait_status_to_int(w) (w)
-
-/* A status is 16 bits, and looks like:
- <1 byte info> <1 byte code>
-
- <code> == 0, child has exited, info is the exit value
- <code> == 1..7e, child has exited, info is the signal number.
- <code> == 7f, child has stopped, info was the signal number.
- <code> == 80, there was a core dump.
-*/
-
-#define WIFEXITED(w) ((__wait_status_to_int(w) & 0xff) == 0)
-#define WIFSIGNALED(w) ((__wait_status_to_int(w) & 0x7f) > 0 \
- && ((__wait_status_to_int(w) & 0x7f) < 0x7f))
-#define WIFSTOPPED(w) ((__wait_status_to_int(w) & 0xff) == 0x7f)
-#define WIFCONTINUED(w) ((__wait_status_to_int(w) & 0xffff) == __W_CONTINUED)
-#define WEXITSTATUS(w) ((__wait_status_to_int(w) >> 8) & 0xff)
-#define WTERMSIG(w) (__wait_status_to_int(w) & 0x7f)
-#define WSTOPSIG WEXITSTATUS
-#define WCOREDUMP(w) (WIFSIGNALED(w) && (__wait_status_to_int(w) & 0x80))
-
-#endif /* _CYGWIN_WAIT_H */
diff --git a/winsup/cygwin/include/dlfcn.h b/winsup/cygwin/include/dlfcn.h
deleted file mode 100644
index 37fb3df9b..000000000
--- a/winsup/cygwin/include/dlfcn.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* dlfcn.h
-
- Copyright 1998, 1999, 2000, 2001, 2004, 2010, 2011 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _DLFCN_H
-#define _DLFCN_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* declarations used for dynamic linking support routines */
-extern void *dlopen (const char *, int);
-extern void *dlsym (void *, const char *);
-extern int dlclose (void *);
-extern char *dlerror (void);
-
-/* specific to CYGWIN */
-#define FORK_RELOAD 1
-#define FORK_NO_RELOAD 0
-
-extern void dlfork (int);
-
-/* following doesn't exist in Win32 API .... */
-#define RTLD_DEFAULT NULL
-
-/* valid values for mode argument to dlopen */
-#define RTLD_LOCAL 0 /* Symbols in this dlopen'ed obj are not */
- /* visible to other dlopen'ed objs. */
-#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. */
-/* Non-standard GLIBC extensions */
-#define RTLD_NODELETE 8 /* Don't unload lib in dlcose. */
-#define RTLD_NOLOAD 16 /* Don't load lib, just return handle if lib */
- /* is already loaded, NULL otherwise. */
-#define RTLD_DEEPBIND 32 /* Place lookup scope so that this lib is */
- /* preferred over global scope. */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _DLFCN_H */
diff --git a/winsup/cygwin/include/elf.h b/winsup/cygwin/include/elf.h
deleted file mode 100644
index c094a1c78..000000000
--- a/winsup/cygwin/include/elf.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * Copyright (c) 2001 David E. O'Brien.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/*
- * This is a Solaris compatibility header
- */
-
-#ifndef _ELF_H_
-#define _ELF_H_
-
-#include <sys/types.h>
-#include <machine/elf.h>
-#include <sys/elf32.h>
-#include <sys/elf64.h>
-
-#endif /* !_ELF_H_ */
diff --git a/winsup/cygwin/include/endian.h b/winsup/cygwin/include/endian.h
deleted file mode 100644
index d59d2c89b..000000000
--- a/winsup/cygwin/include/endian.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* endian.h
-
- Copyright 2005, 2010, 2011 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _ENDIAN_H_
-#define _ENDIAN_H_
-
-#include <sys/config.h>
-#include <bits/endian.h>
-
-/*#ifdef __USE_BSD*/
-# define LITTLE_ENDIAN __LITTLE_ENDIAN
-# define BIG_ENDIAN __BIG_ENDIAN
-# define PDP_ENDIAN __PDP_ENDIAN
-# define BYTE_ORDER __BYTE_ORDER
-/*#endif*/
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-# define __LONG_LONG_PAIR(HI, LO) LO, HI
-#elif __BYTE_ORDER == __BIG_ENDIAN
-# define __LONG_LONG_PAIR(HI, LO) HI, LO
-#endif
-
-#if /*defined __USE_BSD ||*/ ! defined _POSIX_SOURCE
-
-#include <byteswap.h>
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-
-#define htobe16(x) bswap_16(x)
-#define htobe32(x) bswap_32(x)
-#define htobe64(x) bswap_64(x)
-
-#define be16toh(x) bswap_16(x)
-#define be32toh(x) bswap_32(x)
-#define be64toh(x) bswap_64(x)
-
-#define htole16(x) (x)
-#define htole32(x) (x)
-#define htole64(x) (x)
-
-#define le16toh(x) (x)
-#define le32toh(x) (x)
-#define le64toh(x) (x)
-
-#endif /*__BYTE_ORDER == __LITTLE_ENDIAN*/
-
-#if __BYTE_ORDER == __BIG_ENDIAN
-
-#define htobe16(x) (x)
-#define htobe32(x) (x)
-#define htobe64(x) (x)
-
-#define be16toh(x) (x)
-#define be32toh(x) (x)
-#define be64toh(x) (x)
-
-#define htole16(x) bswap_16(x)
-#define htole32(x) bswap_32(x)
-#define htole64(x) bswap_64(x)
-
-#define le16toh(x) bswap_16(x)
-#define le32toh(x) bswap_32(x)
-#define le64toh(x) bswap_64(x)
-
-#endif /*__BYTE_ORDER == __BIG_ENDIAN*/
-
-#endif /*__USE_BSD || !_POSIX_SOURCE*/
-
-#endif /*_ENDIAN_H_*/
-
diff --git a/winsup/cygwin/include/err.h b/winsup/cygwin/include/err.h
deleted file mode 100644
index 4f3a3602a..000000000
--- a/winsup/cygwin/include/err.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* err.h
-
- Copyright 2003, 2011 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _ERR_H
-#define _ERR_H
-
-#include <sys/cdefs.h>
-#include <stdarg.h>
-
-__BEGIN_DECLS
-
-extern void warn (const char *fmt, ...);
-extern void warnx (const char *fmt, ...);
-
-extern void err (int eval, const char *fmt, ...) __attribute__ ((__noreturn__));
-extern void errx (int eval, const char *fmt, ...) __attribute__ ((__noreturn__));
-
-extern void vwarn (const char *fmt, va_list ap);
-extern void vwarnx (const char *fmt, va_list ap);
-
-extern void verr (int eval, const char *fmt, va_list ap) __attribute__ ((__noreturn__));
-extern void verrx (int eval, const char *fmt, va_list ap) __attribute__ ((__noreturn__));
-
-__END_DECLS
-
-#endif /* _ERR_H */
diff --git a/winsup/cygwin/include/error.h b/winsup/cygwin/include/error.h
deleted file mode 100644
index c5ec62064..000000000
--- a/winsup/cygwin/include/error.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* error.h: GNU error reporting functions
-
- Copyright 2011 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _ERROR_H
-#define _ERROR_H
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-void error (int, int, const char *, ...);
-void error_at_line (int, int, const char *, unsigned int, const char *, ...);
-
-#ifdef __INSIDE_CYGWIN__
-extern unsigned int error_message_count;
-extern int error_one_per_line;
-extern void (*error_print_progname) (void);
-#else
-extern __declspec(dllimport) unsigned int error_message_count;
-extern __declspec(dllimport) int error_one_per_line;
-extern __declspec(dllimport) void (*error_print_progname) (void);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ERROR_H */
diff --git a/winsup/cygwin/include/fcntl.h b/winsup/cygwin/include/fcntl.h
deleted file mode 100644
index d67ee48ac..000000000
--- a/winsup/cygwin/include/fcntl.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* fcntl.h
-
- Copyright 1996, 1998, 2000, 2001, 2005, 2006, 2009, 2010, 2013,
- 2014 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _FCNTL_H
-#define _FCNTL_H
-
-#include <sys/fcntl.h>
-#define O_NDELAY _FNDELAY
-
-/* F_LCK_MANDATORY: Request mandatory locks for this file descriptor.
-
- Cygwin extension to fcntl file locking mechanism. By default, fcntl file
- locks are advisory locks. This works nicely as long as only Cygwin
- processes interact. If you have the requirement to interact with native
- Windows applications which use Windows mandatory file locking, your have
- to use mandatory locking as well. The command
-
- fcntl (fd, F_LCK_MANDATORY, 1)
-
- switches subsequent F_GETLK, F_SETLK, F_SETLKW calls to mandatory locking
- for this file descriptor and subsequently duplicated ones WITHIN THE SAME
- PROCESS. Note that mandatory locks are NOT inherited by child processes,
- nor do they survive an execve call. This fully corresponds to Windows
- mandatory locking semantics. */
-#define F_LCK_MANDATORY 0x99
-
-/* POSIX-1.2008 requires this flag and allows to set it to 0 if its
- functionality is not required. */
-#define O_TTY_INIT 0
-
-#define POSIX_FADV_NORMAL 0
-#define POSIX_FADV_SEQUENTIAL 1
-#define POSIX_FADV_RANDOM 2
-#define POSIX_FADV_WILLNEED 3
-#define POSIX_FADV_DONTNEED 4
-#define POSIX_FADV_NOREUSE 5
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern int posix_fadvise _PARAMS ((int, off_t, off_t, int));
-extern int posix_fallocate _PARAMS ((int, off_t, off_t));
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _FCNTL_H */
diff --git a/winsup/cygwin/include/features.h b/winsup/cygwin/include/features.h
deleted file mode 100644
index ffeb4f843..000000000
--- a/winsup/cygwin/include/features.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* features.h
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2006, 2011 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _FEATURES_H
-#define _FEATURES_H
-
-#include <sys/cdefs.h>
-#include <sys/features.h>
-
-/* Various options should be defined here, but the framework to do this
- is not laid down so far. Especially notable are the following defines,
- which can be used by the application to switch on or off various
- datatypes and function prototypes:
-
- _BSD_SOURCE to include pure BSD functions which are not defined
- under POSIX.
-
- _POSIX_SOURCE if the application requests a POSIX compatible system.
-
- _XOPEN_SOURCE if X/Open functions and datatypes are requested. This
- option includes _POSIX_SOURCE.
-
- _GNU_SOURCE to turn on GNU extensions which might collide with defines
- used in application or library headers. This option
- includes _BSD_SOURCE, _XOPEN_SOURCE and _POSIX_SOURCE.
-*/
-
-#endif /* _FEATURES_H */
diff --git a/winsup/cygwin/include/fenv.h b/winsup/cygwin/include/fenv.h
deleted file mode 100755
index b49033f29..000000000
--- a/winsup/cygwin/include/fenv.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/* fenv.h
-
- Copyright 2010, 2011 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _FENV_H_
-#define _FENV_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* Primary sources:
-
- The Open Group Base Specifications Issue 6:
- http://www.opengroup.org/onlinepubs/000095399/basedefs/fenv.h.html
-
- C99 Language spec (draft n1256):
- <url unknown>
-
- Intel® 64 and IA-32 Architectures Software Developer’s Manuals:
- http://www.intel.com/products/processor/manuals/
-
- GNU C library manual pages:
- http://www.gnu.org/software/libc/manual/html_node/Control-Functions.html
- http://www.gnu.org/software/libc/manual/html_node/Rounding.html
- http://www.gnu.org/software/libc/manual/html_node/FP-Exceptions.html
- http://www.gnu.org/software/libc/manual/html_node/Status-bit-operations.html
-
- Linux online man page(s):
- http://linux.die.net/man/3/fegetexcept
-
- The documentation quotes these sources for reference. All definitions and
- code have been developed solely based on the information from these specs.
-
-*/
-
-/* Represents the entire floating-point environment. The floating-point
- environment refers collectively to any floating-point status flags and
- control modes supported by the implementation.
- In this implementation, the struct contains the state information from
- the fstenv/fnstenv instructions and a copy of the SSE MXCSR, since GCC
- uses SSE for a lot of floating-point operations. (Cygwin assumes i686
- or above these days, as does the compiler.) */
-
-typedef struct _fenv_t
-{
- struct _fpu_env_info {
- unsigned int _fpu_cw; /* low 16 bits only. */
- unsigned int _fpu_sw; /* low 16 bits only. */
- unsigned int _fpu_tagw; /* low 16 bits only. */
- unsigned int _fpu_ipoff;
- unsigned int _fpu_ipsel;
- unsigned int _fpu_opoff;
- unsigned int _fpu_opsel; /* low 16 bits only. */
- } _fpu;
- unsigned int _sse_mxcsr;
-} fenv_t;
-
-/* Represents the floating-point status flags collectively, including
- any status the implementation associates with the flags. A floating-point
- status flag is a system variable whose value is set (but never cleared)
- when a floating-point exception is raised, which occurs as a side effect
- of exceptional floating-point arithmetic to provide auxiliary information.
- A floating-point control mode is a system variable whose value may be
- set by the user to affect the subsequent behavior of floating-point
- arithmetic. */
-
-typedef struct _fexcept_t
-{
- unsigned short _fpu_exceptions;
- unsigned short _sse_exceptions;
-} fexcept_t;
-
-/* The <fenv.h> header shall define the following constants if and only
- if the implementation supports the floating-point exception by means
- of the floating-point functions feclearexcept(), fegetexceptflag(),
- feraiseexcept(), fesetexceptflag(), and fetestexcept(). Each expands to
- an integer constant expression with values such that bitwise-inclusive
- ORs of all combinations of the constants result in distinct values. */
-
-#define FE_DIVBYZERO (1 << 2)
-#define FE_INEXACT (1 << 5)
-#define FE_INVALID (1 << 0)
-#define FE_OVERFLOW (1 << 3)
-#define FE_UNDERFLOW (1 << 4)
-
-/* This is not defined by Posix, but since x87 supports it we provide
- a definition according to the same naming scheme used above. */
-#define FE_DENORMAL (1 << 1)
-
-/* The <fenv.h> header shall define the following constant, which is
- simply the bitwise-inclusive OR of all floating-point exception
- constants defined above: */
-
-#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | FE_INVALID \
- | FE_OVERFLOW | FE_UNDERFLOW | FE_DENORMAL)
-
-/* The <fenv.h> header shall define the following constants if and only
- if the implementation supports getting and setting the represented
- rounding direction by means of the fegetround() and fesetround()
- functions. Each expands to an integer constant expression whose values
- are distinct non-negative vales. */
-
-#define FE_DOWNWARD (1)
-#define FE_TONEAREST (0)
-#define FE_TOWARDZERO (3)
-#define FE_UPWARD (2)
-
-/* Precision bit values. Not defined by Posix, but follow logically. */
-#define FE_SINGLEPREC (0)
-#define FE_RESERVEDPREC (1)
-#define FE_DOUBLEPREC (2)
-#define FE_EXTENDEDPREC (3)
-
-/* The <fenv.h> header shall define the following constant, which
- represents the default floating-point environment (that is, the one
- installed at program startup) and has type pointer to const-qualified
- fenv_t. It can be used as an argument to the functions within the
- <fenv.h> header that manage the floating-point environment. */
-
-extern const fenv_t *_fe_dfl_env;
-#define FE_DFL_ENV (_fe_dfl_env)
-
-/* Additional implementation-defined environments, with macro
- definitions beginning with FE_ and an uppercase letter,and having
- type "pointer to const-qualified fenv_t",may also be specified by
- the implementation. */
-
-#ifdef _GNU_SOURCE
-/* If possible, the GNU C Library defines a macro FE_NOMASK_ENV which
- represents an environment where every exception raised causes a trap
- to occur. You can test for this macro using #ifdef. It is only defined
- if _GNU_SOURCE is defined. */
-extern const fenv_t *_fe_nomask_env;
-#define FE_NOMASK_ENV (_fe_nomask_env)
-#endif /* _GNU_SOURCE */
-
-
-/* The following shall be declared as functions and may also be
- defined as macros. Function prototypes shall be provided. */
-extern int feclearexcept (int excepts);
-extern int fegetexceptflag (fexcept_t *flagp, int excepts);
-extern int feraiseexcept (int excepts);
-extern int fesetexceptflag (const fexcept_t *flagp, int excepts);
-extern int fetestexcept (int excepts);
-extern int fegetround (void);
-extern int fesetround (int round);
-extern int fegetenv (fenv_t *envp);
-extern int feholdexcept (fenv_t *envp);
-extern int fesetenv (const fenv_t *envp);
-extern int feupdateenv (const fenv_t *envp);
-
-/* These are not defined in Posix, but make sense by obvious extension. */
-extern int fegetprec (void);
-extern int fesetprec (int prec);
-
-/* This is Cygwin-custom, not from the standard, for use in the Cygwin CRT. */
-extern void _feinitialise (void);
-
-/* These are GNU extensions defined in glibc. */
-extern int feenableexcept (int excepts);
-extern int fedisableexcept (int excepts);
-extern int fegetexcept (void);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _FENV_H_ */
diff --git a/winsup/cygwin/include/fnmatch.h b/winsup/cygwin/include/fnmatch.h
deleted file mode 100644
index e4500abe2..000000000
--- a/winsup/cygwin/include/fnmatch.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* $OpenBSD: fnmatch.h,v 1.5 2000/03/24 17:13:23 millert Exp $ */
-/* $NetBSD: fnmatch.h,v 1.5 1994/10/26 00:55:53 cgd Exp $ */
-
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)fnmatch.h 8.1 (Berkeley) 6/2/93
- */
-
-#ifndef _FNMATCH_H_
-#define _FNMATCH_H_
-
-#define FNM_NOMATCH 1 /* Match failed. */
-#define FNM_NOSYS 2 /* Function not supported (unused). */
-
-#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
-#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
-#define FNM_PERIOD 0x04 /* Period must be matched by period. */
-#ifndef _POSIX_SOURCE
-#define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */
-#define FNM_CASEFOLD 0x10 /* Case insensitive search. */
-#define FNM_IGNORECASE FNM_CASEFOLD
-#define FNM_FILE_NAME FNM_PATHNAME
-#endif
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-int fnmatch __P((const char *, const char *, int));
-__END_DECLS
-
-#endif /* !_FNMATCH_H_ */
-
-
diff --git a/winsup/cygwin/include/fts.h b/winsup/cygwin/include/fts.h
deleted file mode 100644
index 57e9096b4..000000000
--- a/winsup/cygwin/include/fts.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)fts.h 8.3 (Berkeley) 8/14/94
- * $FreeBSD: /repoman/r/ncvs/src/include/fts.h,v 1.11 2005/01/07 00:06:20 pjd Exp $
- */
-
-#ifndef _FTS_H_
-#define _FTS_H_
-
-typedef struct {
- struct _ftsent *fts_cur; /* current node */
- struct _ftsent *fts_child; /* linked list of children */
- struct _ftsent **fts_array; /* sort array */
- dev_t fts_dev; /* starting device # */
- char *fts_path; /* path for this descent */
- int fts_rfd; /* fd for root */
- int fts_pathlen; /* sizeof(path) */
- int fts_nitems; /* elements in the sort array */
- int (*fts_compar) /* compare function */
- (const struct _ftsent * const *, const struct _ftsent * const *);
-
-#define FTS_COMFOLLOW 0x001 /* follow command line symlinks */
-#define FTS_LOGICAL 0x002 /* logical walk */
-#define FTS_NOCHDIR 0x004 /* don't change directories */
-#define FTS_NOSTAT 0x008 /* don't get stat info */
-#define FTS_PHYSICAL 0x010 /* physical walk */
-#define FTS_SEEDOT 0x020 /* return dot and dot-dot */
-#define FTS_XDEV 0x040 /* don't cross devices */
-#ifndef __CYGWIN__
-#define FTS_WHITEOUT 0x080 /* return whiteout information */
-#endif
-#define FTS_OPTIONMASK 0x0ff /* valid user option mask */
-
-#define FTS_NAMEONLY 0x100 /* (private) child names only */
-#define FTS_STOP 0x200 /* (private) unrecoverable error */
- int fts_options; /* fts_open options, global flags */
- void *fts_clientptr; /* thunk for sort function */
-} FTS;
-
-typedef struct _ftsent {
- struct _ftsent *fts_cycle; /* cycle node */
- struct _ftsent *fts_parent; /* parent directory */
- struct _ftsent *fts_link; /* next file in directory */
- union {
- struct {
- long __fts_number; /* local numeric value */
- void *__fts_pointer; /* local address value */
- } __struct_ftsent;
- int64_t __fts_bignum;
- } __union_ftsent;
-#define fts_number __union_ftsent.__struct_ftsent.__fts_number
-#define fts_pointer __union_ftsent.__struct_ftsent.__fts_pointer
-#define fts_bignum __union_ftsent.__fts_bignum
- char *fts_accpath; /* access path */
- char *fts_path; /* root path */
- int fts_errno; /* errno for this node */
- int fts_symfd; /* fd for symlink */
- u_short fts_pathlen; /* strlen(fts_path) */
- u_short fts_namelen; /* strlen(fts_name) */
-
- ino_t fts_ino; /* inode */
- dev_t fts_dev; /* device */
- nlink_t fts_nlink; /* link count */
-
-#define FTS_ROOTPARENTLEVEL -1
-#define FTS_ROOTLEVEL 0
- short fts_level; /* depth (-1 to N) */
-
-#define FTS_D 1 /* preorder directory */
-#define FTS_DC 2 /* directory that causes cycles */
-#define FTS_DEFAULT 3 /* none of the above */
-#define FTS_DNR 4 /* unreadable directory */
-#define FTS_DOT 5 /* dot or dot-dot */
-#define FTS_DP 6 /* postorder directory */
-#define FTS_ERR 7 /* error; errno is set */
-#define FTS_F 8 /* regular file */
-#define FTS_INIT 9 /* initialized only */
-#define FTS_NS 10 /* stat(2) failed */
-#define FTS_NSOK 11 /* no stat(2) requested */
-#define FTS_SL 12 /* symbolic link */
-#define FTS_SLNONE 13 /* symbolic link without target */
-#define FTS_W 14 /* whiteout object */
- u_short fts_info; /* user flags for FTSENT structure */
-
-#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */
-#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */
-#define FTS_ISW 0x04 /* this is a whiteout object */
- u_short fts_flags; /* private flags for FTSENT structure */
-
-#define FTS_AGAIN 1 /* read node again */
-#define FTS_FOLLOW 2 /* follow symbolic link */
-#define FTS_NOINSTR 3 /* no instructions */
-#define FTS_SKIP 4 /* discard node */
- u_short fts_instr; /* fts_set() instructions */
-
- struct stat *fts_statp; /* stat(2) information */
- char *fts_name; /* file name */
- FTS *fts_fts; /* back pointer to main FTS */
-} FTSENT;
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-FTSENT *fts_children(FTS *, int);
-int fts_close(FTS *);
-void *fts_get_clientptr(FTS *);
-#define fts_get_clientptr(fts) ((fts)->fts_clientptr)
-FTS *fts_get_stream(FTSENT *);
-#define fts_get_stream(ftsent) ((ftsent)->fts_fts)
-FTS *fts_open(char * const *, int,
- int (*)(const FTSENT * const *, const FTSENT * const *));
-FTSENT *fts_read(FTS *);
-int fts_set(FTS *, FTSENT *, int);
-void fts_set_clientptr(FTS *, void *);
-__END_DECLS
-
-#endif /* !_FTS_H_ */
diff --git a/winsup/cygwin/include/ftw.h b/winsup/cygwin/include/ftw.h
deleted file mode 100644
index c0025a7c6..000000000
--- a/winsup/cygwin/include/ftw.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* $OpenBSD: ftw.h,v 1.1 2003/07/21 21:13:18 millert Exp $ */
-
-/*
- * Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Sponsored in part by the Defense Advanced Research Projects
- * Agency (DARPA) and Air Force Research Laboratory, Air Force
- * Materiel Command, USAF, under agreement number F39502-99-1-0512.
- *
- * $FreeBSD: /repoman/r/ncvs/src/include/ftw.h,v 1.2 2004/08/24 13:00:54 tjr Exp $
- */
-
-#ifndef _FTW_H
-#define _FTW_H
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/cdefs.h>
-
-/*
- * Valid flags for the 3rd argument to the function that is passed as the
- * second argument to ftw(3) and nftw(3). Say it three times fast!
- */
-#define FTW_F 0 /* File. */
-#define FTW_D 1 /* Directory. */
-#define FTW_DNR 2 /* Directory without read permission. */
-#define FTW_DP 3 /* Directory with subdirectories visited. */
-#define FTW_NS 4 /* Unknown type; stat() failed. */
-#define FTW_SL 5 /* Symbolic link. */
-#define FTW_SLN 6 /* Sym link that names a nonexistent file. */
-
-/*
- * Flags for use as the 4th argument to nftw(3). These may be ORed together.
- */
-#define FTW_PHYS 0x01 /* Physical walk, don't follow sym links. */
-#define FTW_MOUNT 0x02 /* The walk does not cross a mount point. */
-#define FTW_DEPTH 0x04 /* Subdirs visited before the dir itself. */
-#define FTW_CHDIR 0x08 /* Change to a directory before reading it. */
-
-struct FTW {
- int base;
- int level;
-};
-
-__BEGIN_DECLS
-int ftw(const char *, int (*)(const char *, const struct stat *, int), int);
-int nftw(const char *, int (*)(const char *, const struct stat *, int,
- struct FTW *), int, int);
-__END_DECLS
-
-#endif /* !_FTW_H */
diff --git a/winsup/cygwin/include/getopt.h b/winsup/cygwin/include/getopt.h
deleted file mode 100644
index 0c1c8c92a..000000000
--- a/winsup/cygwin/include/getopt.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1987, 1993, 1994, 1996
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifdef _COMPILING_NEWLIB
-#include_next "getopt.h"
-#else
-#ifndef __GETOPT_H__
-#define __GETOPT_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef __INSIDE_CYGWIN__
-extern int __declspec(dllimport) opterr; /* if error message should be printed */
-extern int __declspec(dllimport) optind; /* index into parent argv vector */
-extern int __declspec(dllimport) optopt; /* character checked for validity */
-extern int __declspec(dllimport) optreset; /* reset getopt */
-extern char __declspec(dllimport) *optarg; /* argument associated with option */
-#endif
-
-int getopt (int, char * const *, const char *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __GETOPT_H__ */
-
-#ifndef __UNISTD_GETOPT__
-#ifndef __GETOPT_LONG_H__
-#define __GETOPT_LONG_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct option {
- const char *name;
- int has_arg;
- int *flag;
- int val;
-};
-
-int getopt_long (int, char *const *, const char *, const struct option *, int *);
-int getopt_long_only (int, char *const *, const char *, const struct option *, int *);
-
-#ifndef HAVE_DECL_GETOPT
-#define HAVE_DECL_GETOPT 1
-#endif
-
-#define no_argument 0
-#define required_argument 1
-#define optional_argument 2
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __GETOPT_LONG_H__ */
-#endif /* __UNISTD_GETOPT__ */
-#endif /*_INSIDE_NEWLIB*/
diff --git a/winsup/cygwin/include/glob.h b/winsup/cygwin/include/glob.h
deleted file mode 100644
index 5f1b42050..000000000
--- a/winsup/cygwin/include/glob.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Guido van Rossum.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)glob.h 8.1 (Berkeley) 6/2/93
- * $FreeBSD: /repoman/r/ncvs/src/include/glob.h,v 1.10 2006/05/22 05:57:39 ache Exp $
- */
-
-#ifndef _GLOB_H_
-#define _GLOB_H_
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-typedef struct {
- size_t gl_pathc; /* Count of total paths so far. */
- size_t gl_matchc; /* Count of paths matching pattern. */
- size_t gl_offs; /* Reserved at beginning of gl_pathv. */
- int gl_flags; /* Copy of flags parameter to glob. */
- char **gl_pathv; /* List of paths matching pattern. */
- /* Copy of errfunc parameter to glob. */
- int (*gl_errfunc) __P((const char *, int));
-
- /*
- * Alternate filesystem access methods for glob; replacement
- * versions of closedir(3), readdir(3), opendir(3), stat(2)
- * and lstat(2).
- */
- void (*gl_closedir)(void *);
- struct dirent *(*gl_readdir)(void *);
- void *(*gl_opendir)(const char *);
- int (*gl_lstat) __P((const char *, struct stat *));
- int (*gl_stat) __P((const char *, struct stat *));
-} glob_t;
-
-/* Believed to have been introduced in 1003.2-1992 */
-#define GLOB_APPEND 0x0001 /* Append to output from previous call. */
-#define GLOB_DOOFFS 0x0002 /* Use gl_offs. */
-#define GLOB_ERR 0x0004 /* Return on error. */
-#define GLOB_MARK 0x0008 /* Append / to matching directories. */
-#define GLOB_NOCHECK 0x0010 /* Return pattern itself if nothing matches. */
-#define GLOB_NOSORT 0x0020 /* Don't sort. */
-#define GLOB_NOESCAPE 0x2000 /* Disable backslash escaping. */
-
-/* Error values returned by glob(3) */
-#define GLOB_NOSPACE (-1) /* Malloc call failed. */
-#define GLOB_ABORTED (-2) /* Unignored error. */
-#define GLOB_NOMATCH (-3) /* No match and GLOB_NOCHECK was not set. */
-#define GLOB_NOSYS (-4) /* Obsolete: source comptability only. */
-
-#ifndef _POSIX_SOURCE
-#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */
-#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */
-#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */
-#define GLOB_NOMAGIC 0x0200 /* GLOB_NOCHECK without magic chars (csh). */
-#define GLOB_QUOTE 0x0400 /* Quote special chars with \. */
-#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */
-#define GLOB_LIMIT 0x1000 /* limit number of returned paths */
-
-/* source compatibility, these are the old names */
-#define GLOB_MAXPATH GLOB_LIMIT
-#define GLOB_ABEND GLOB_ABORTED
-#endif /* __BSD_VISIBLE */
-
-__BEGIN_DECLS
-
-#undef DLLEXPORT
-#ifdef __INSIDE_CYGWIN__
-# define DLLEXPORT
-#else
-# define DLLEXPORT __declspec(dllimport)
-#endif
-
-int DLLEXPORT glob (const char *__restrict , int, int (*)(const char *, int), glob_t *__restrict);
-void DLLEXPORT globfree (glob_t *);
-int DLLEXPORT glob_pattern_p (const char *, int);
-__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/ifaddrs.h b/winsup/cygwin/include/ifaddrs.h
deleted file mode 100644
index f6c28e798..000000000
--- a/winsup/cygwin/include/ifaddrs.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* $OpenBSD: ifaddrs.h,v 1.4 2004/01/22 21:48:02 espie Exp $ */
-
-/*
- * Copyright (c) 1995, 1999
- * Berkeley Software Design, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
- */
-
-#ifndef _IFADDRS_H_
-#define _IFADDRS_H_
-
-struct ifaddrs {
- struct ifaddrs *ifa_next;
- char *ifa_name;
- unsigned int ifa_flags;
- struct sockaddr *ifa_addr;
- struct sockaddr *ifa_netmask;
- struct sockaddr *ifa_dstaddr;
- void *ifa_data;
-};
-
-/*
- * This may have been defined in <net/if.h>. Note that if <net/if.h> is
- * to be included it must be included before this header file.
- */
-/* CV 2007-06-20: Not a problem on Cygwin right now. */
-#ifndef ifa_broadaddr
-#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
-#endif
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-extern int getifaddrs(struct ifaddrs **);
-extern void freeifaddrs(struct ifaddrs *);
-__END_DECLS
-
-#endif
diff --git a/winsup/cygwin/include/inttypes.h b/winsup/cygwin/include/inttypes.h
deleted file mode 100644
index eb60e79e4..000000000
--- a/winsup/cygwin/include/inttypes.h
+++ /dev/null
@@ -1,274 +0,0 @@
-/* inttypes.h - fixed size integer types
-
- Copyright 2003, 2005, 2009, 2010, 2012 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _INTTYPES_H
-#define _INTTYPES_H
-
-#include <stdint.h>
-#define __need_wchar_t
-#include <stddef.h>
-#include <bits/wordsize.h>
-
-/* C99 requires that in C++ the following macros should be defined only
- if requested. */
-#if !defined (__cplusplus) || defined (__STDC_FORMAT_MACROS) \
- || defined (__INSIDE_CYGWIN__)
-
-#if __WORDSIZE == 64
-#define __PRI64 "l"
-#define __PRIFAST "l"
-#define __PRIPTR "l"
-#else
-#define __PRI64 "ll"
-#define __PRIFAST
-#define __PRIPTR
-#endif
-
-/* fprintf() macros for signed integers */
-
-#define PRId8 "d"
-#define PRId16 "d"
-#define PRId32 "d"
-#define PRId64 __PRI64 "d"
-
-#define PRIdLEAST8 "d"
-#define PRIdLEAST16 "d"
-#define PRIdLEAST32 "d"
-#define PRIdLEAST64 __PRI64 "d"
-
-#define PRIdFAST8 "d"
-#define PRIdFAST16 __PRIFAST "d"
-#define PRIdFAST32 __PRIFAST "d"
-#define PRIdFAST64 __PRI64 "d"
-
-#define PRIdMAX __PRI64 "d"
-#define PRIdPTR __PRIPTR "d"
-
-#define PRIi8 "i"
-#define PRIi16 "i"
-#define PRIi32 "i"
-#define PRIi64 __PRI64 "i"
-
-#define PRIiLEAST8 "i"
-#define PRIiLEAST16 "i"
-#define PRIiLEAST32 "i"
-#define PRIiLEAST64 __PRI64 "i"
-
-#define PRIiFAST8 "i"
-#define PRIiFAST16 __PRIFAST "i"
-#define PRIiFAST32 __PRIFAST "i"
-#define PRIiFAST64 __PRI64 "i"
-
-#define PRIiMAX __PRI64 "i"
-#define PRIiPTR __PRIPTR "i"
-
-/* fprintf() macros for unsigned integers */
-
-#define PRIo8 "o"
-#define PRIo16 "o"
-#define PRIo32 "o"
-#define PRIo64 __PRI64 "o"
-
-#define PRIoLEAST8 "o"
-#define PRIoLEAST16 "o"
-#define PRIoLEAST32 "o"
-#define PRIoLEAST64 __PRI64 "o"
-
-#define PRIoFAST8 "o"
-#define PRIoFAST16 __PRIFAST "o"
-#define PRIoFAST32 __PRIFAST "o"
-#define PRIoFAST64 __PRI64 "o"
-
-#define PRIoMAX __PRI64 "o"
-#define PRIoPTR __PRIPTR "o"
-
-#define PRIu8 "u"
-#define PRIu16 "u"
-#define PRIu32 "u"
-#define PRIu64 __PRI64 "u"
-
-#define PRIuLEAST8 "u"
-#define PRIuLEAST16 "u"
-#define PRIuLEAST32 "u"
-#define PRIuLEAST64 __PRI64 "u"
-
-#define PRIuFAST8 "u"
-#define PRIuFAST16 __PRIFAST "u"
-#define PRIuFAST32 __PRIFAST "u"
-#define PRIuFAST64 __PRI64 "u"
-
-#define PRIuMAX __PRI64 "u"
-#define PRIuPTR __PRIPTR "u"
-
-#define PRIx8 "x"
-#define PRIx16 "x"
-#define PRIx32 "x"
-#define PRIx64 __PRI64 "x"
-
-#define PRIxLEAST8 "x"
-#define PRIxLEAST16 "x"
-#define PRIxLEAST32 "x"
-#define PRIxLEAST64 __PRI64 "x"
-
-#define PRIxFAST8 "x"
-#define PRIxFAST16 __PRIFAST "x"
-#define PRIxFAST32 __PRIFAST "x"
-#define PRIxFAST64 __PRI64 "x"
-
-#define PRIxMAX __PRI64 "x"
-#define PRIxPTR __PRIPTR "x"
-
-#define PRIX8 "X"
-#define PRIX16 "X"
-#define PRIX32 "X"
-#define PRIX64 __PRI64 "X"
-
-#define PRIXLEAST8 "X"
-#define PRIXLEAST16 "X"
-#define PRIXLEAST32 "X"
-#define PRIXLEAST64 __PRI64 "X"
-
-#define PRIXFAST8 "X"
-#define PRIXFAST16 __PRIFAST "X"
-#define PRIXFAST32 __PRIFAST "X"
-#define PRIXFAST64 __PRI64 "X"
-
-#define PRIXMAX __PRI64 "X"
-#define PRIXPTR __PRIPTR "X"
-
-/* fscanf() macros for signed integers */
-
-#if __WORDSIZE == 64
-#define __SCN64 "l"
-#define __SCNFAST "l"
-#define __SCNPTR "l"
-#else
-#define __SCN64 "ll"
-#define __SCNFAST
-#define __SCNPTR
-#endif
-
-#define SCNd8 "hhd"
-#define SCNd16 "hd"
-#define SCNd32 "d"
-#define SCNd64 __SCN64 "d"
-
-#define SCNdLEAST8 "hhd"
-#define SCNdLEAST16 "hd"
-#define SCNdLEAST32 "d"
-#define SCNdLEAST64 __SCN64 "d"
-
-#define SCNdFAST8 "hhd"
-#define SCNdFAST16 __SCNFAST "d"
-#define SCNdFAST32 __SCNFAST "d"
-#define SCNdFAST64 __SCN64 "d"
-
-#define SCNdMAX __SCN64 "d"
-#define SCNdPTR __SCNPTR "d"
-
-#define SCNi8 "hhi"
-#define SCNi16 "hi"
-#define SCNi32 "i"
-#define SCNi64 __SCN64 "i"
-
-#define SCNiLEAST8 "hhi"
-#define SCNiLEAST16 "hi"
-#define SCNiLEAST32 "i"
-#define SCNiLEAST64 __SCN64 "i"
-
-#define SCNiFAST8 "hhi"
-#define SCNiFAST16 __SCNFAST "i"
-#define SCNiFAST32 __SCNFAST "i"
-#define SCNiFAST64 __SCN64 "i"
-
-#define SCNiMAX __SCN64 "i"
-#define SCNiPTR __SCNPTR "i"
-
-/* fscanf() macros for unsigned integers */
-
-#define SCNo8 "hho"
-#define SCNo16 "ho"
-#define SCNo32 "o"
-#define SCNo64 __SCN64 "o"
-
-#define SCNoLEAST8 "hho"
-#define SCNoLEAST16 "ho"
-#define SCNoLEAST32 "o"
-#define SCNoLEAST64 __SCN64 "o"
-
-#define SCNoFAST8 "hho"
-#define SCNoFAST16 __SCNFAST "o"
-#define SCNoFAST32 __SCNFAST "o"
-#define SCNoFAST64 __SCN64 "o"
-
-#define SCNoMAX __SCN64 "o"
-#define SCNoPTR __SCNPTR "o"
-
-#define SCNu8 "hhu"
-#define SCNu16 "hu"
-#define SCNu32 "u"
-#define SCNu64 __SCN64 "u"
-
-#define SCNuLEAST8 "hhu"
-#define SCNuLEAST16 "hu"
-#define SCNuLEAST32 "u"
-#define SCNuLEAST64 __SCN64 "u"
-
-#define SCNuFAST8 "hhu"
-#define SCNuFAST16 __SCNFAST "u"
-#define SCNuFAST32 __SCNFAST "u"
-#define SCNuFAST64 __SCN64 "u"
-
-#define SCNuMAX __SCN64 "u"
-#define SCNuPTR __SCNPTR "u"
-
-#define SCNx8 "hhx"
-#define SCNx16 "hx"
-#define SCNx32 "x"
-#define SCNx64 __SCN64 "x"
-
-#define SCNxLEAST8 "hhx"
-#define SCNxLEAST16 "hx"
-#define SCNxLEAST32 "x"
-#define SCNxLEAST64 __SCN64 "x"
-
-#define SCNxFAST8 "hhx"
-#define SCNxFAST16 __SCNFAST "x"
-#define SCNxFAST32 __SCNFAST "x"
-#define SCNxFAST64 __SCN64 "x"
-
-#define SCNxMAX __SCN64 "x"
-#define SCNxPTR __SCNPTR "x"
-
-#endif /* !__cplusplus || __STDC_FORMAT_MACROS || __INSIDE_CYGWIN__ */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <_ansi.h>
-
-typedef struct {
- intmax_t quot;
- intmax_t rem;
-} imaxdiv_t;
-
-intmax_t _EXFUN(imaxabs, (intmax_t));
-imaxdiv_t _EXFUN(imaxdiv, (intmax_t, intmax_t));
-intmax_t _EXFUN(strtoimax, (const char *, char **, int));
-uintmax_t _EXFUN(strtoumax, (const char *, char **, int));
-intmax_t _EXFUN(wcstoimax, (const wchar_t *, wchar_t **, int));
-uintmax_t _EXFUN(wcstoumax, (const wchar_t *, wchar_t **, int));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _INTTYPES_H */
diff --git a/winsup/cygwin/include/io.h b/winsup/cygwin/include/io.h
deleted file mode 100644
index 517f871fe..000000000
--- a/winsup/cygwin/include/io.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* io.h
-
- Copyright 1999, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _IO_H_
-#define _IO_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*
- * Function to return a Win32 HANDLE from a fd.
- */
-extern long _get_osfhandle(int);
-#define get_osfhandle(i) _get_osfhandle(i)
-extern int _setmode (int __fd, int __mode);
-#define setmode(f,m) _setmode((f),(m))
-
-#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 fefff78a4..000000000
--- a/winsup/cygwin/include/lastlog.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* lastlog.h
-
- Copyright 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _LASTLOG_H
-#define _LASTLOG_H
-
-#include <utmp.h>
-
-struct lastlog {
- long ll_time;
- char ll_line[UT_LINESIZE];
- char ll_host[UT_HOSTSIZE];
-};
-
-#endif
diff --git a/winsup/cygwin/include/libgen.h b/winsup/cygwin/include/libgen.h
deleted file mode 100644
index f5c24a8cc..000000000
--- a/winsup/cygwin/include/libgen.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* libgen.h
-
- Copyright 2005 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _LIBGEN_H
-#define _LIBGEN_H
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-extern char *basename (char *path);
-extern char *dirname (char *path);
-
-__END_DECLS
-
-#endif /* _LIBGEN_H */
diff --git a/winsup/cygwin/include/limits.h b/winsup/cygwin/include/limits.h
deleted file mode 100644
index e093d283d..000000000
--- a/winsup/cygwin/include/limits.h
+++ /dev/null
@@ -1,504 +0,0 @@
-/* limits.h
-
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
- 2011, 2012, 2013 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _LIMITS_H___
-
-#include <features.h>
-#include <bits/wordsize.h>
-
-#ifndef _MACH_MACHLIMITS_H_
-
-/* _MACH_MACHLIMITS_H_ is used on OSF/1. */
-#define _LIMITS_H___
-#define _MACH_MACHLIMITS_H_
-
-
-/* Numerical limits */
-
-/* Number of bits in a `char'. */
-#undef CHAR_BIT
-#define CHAR_BIT __CHAR_BIT__
-
-/* Number of bits in a `long'. */
-#undef LONG_BIT
-#define LONG_BIT (__SIZEOF_LONG__ * __CHAR_BIT__)
-
-/* Number of bits in a `int'. */
-#undef WORD_BIT
-#define WORD_BIT (__SIZEOF_INT__ * __CHAR_BIT__)
-
-/* Maximum length of a multibyte character. */
-#ifndef MB_LEN_MAX
-/* Use value from newlib. */
-#define MB_LEN_MAX 8
-#endif
-
-/* Minimum and maximum values a `signed char' can hold. */
-#undef SCHAR_MIN
-#define SCHAR_MIN (-128)
-#undef SCHAR_MAX
-#define SCHAR_MAX 127
-
-/* Maximum value an `unsigned char' can hold. (Minimum is 0). */
-#undef UCHAR_MAX
-#define UCHAR_MAX 255
-
-/* Minimum and maximum values a `char' can hold. */
-#ifdef __CHAR_UNSIGNED__
-#undef CHAR_MIN
-#define CHAR_MIN 0
-#undef CHAR_MAX
-#define CHAR_MAX 255
-#else
-#undef CHAR_MIN
-#define CHAR_MIN (-128)
-#undef CHAR_MAX
-#define CHAR_MAX 127
-#endif
-
-/* Minimum and maximum values a `signed short int' can hold. */
-#undef SHRT_MIN
-#define SHRT_MIN (-32768)
-#undef SHRT_MAX
-#define SHRT_MAX 32767
-
-/* Maximum value an `unsigned short int' can hold. (Minimum is 0). */
-#undef USHRT_MAX
-#define USHRT_MAX 65535
-
-/* Minimum and maximum values a `signed int' can hold. */
-#ifndef __INT_MAX__
-#define __INT_MAX__ 2147483647
-#endif
-#undef INT_MIN
-#define INT_MIN (-INT_MAX-1)
-#undef INT_MAX
-#define INT_MAX __INT_MAX__
-
-/* Maximum value an `unsigned int' can hold. (Minimum is 0). */
-#undef UINT_MAX
-#define UINT_MAX (INT_MAX * 2U + 1)
-
-/* Minimum and maximum values a `signed long int' can hold.
- (Same as `int'). */
-#ifndef __LONG_MAX__
-#if __WORDSIZE == 64
-#define __LONG_MAX__ 9223372036854775807L
-#else
-#define __LONG_MAX__ 2147483647L
-# endif /* __alpha__ */
-#endif
-#undef LONG_MIN
-#define LONG_MIN (-LONG_MAX-1L)
-#undef LONG_MAX
-#define LONG_MAX __LONG_MAX__
-
-/* Maximum value an `unsigned long int' can hold. (Minimum is 0). */
-#undef ULONG_MAX
-#define ULONG_MAX (LONG_MAX * 2UL + 1)
-
-/* Minimum and maximum values a `signed long long int' can hold. */
-#ifndef __LONG_LONG_MAX__
-#define __LONG_LONG_MAX__ 9223372036854775807LL
-#endif
-
-#if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
-#undef LONG_LONG_MIN
-#define LONG_LONG_MIN (-LONG_LONG_MAX-1)
-#undef LONG_LONG_MAX
-#define LONG_LONG_MAX __LONG_LONG_MAX__
-
-/* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
-#undef ULONG_LONG_MAX
-#define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1)
-#endif
-
-/* Minimum and maximum values a `signed long long int' can hold. */
-#undef LLONG_MIN
-#define LLONG_MIN (-LLONG_MAX-1)
-#undef LLONG_MAX
-#define LLONG_MAX __LONG_LONG_MAX__
-
-/* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
-#undef ULLONG_MAX
-#define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
-
-/* Maximum size of ssize_t */
-#undef SSIZE_MAX
-#define SSIZE_MAX (__LONG_MAX__)
-
-
-/* Runtime Invariant Values */
-
-/* Please note that symbolic names shall be ommited, on specific
- implementations where the corresponding value is equal to or greater
- than the stated minimum, but is unspecified. This indetermination
- might depend on the amount of available memory space on a specific
- instance of a specific implementation. The actual value supported by
- a specific instance shall be provided by the sysconf() function. */
-
-/* Maximum number of I/O operations in a single list I/O call supported by
- the implementation. Not yet implemented. */
-#undef AIO_LISTIO_MAX
-/* #define AIO_LISTIO_MAX >= _POSIX_AIO_LISTIO_MAX */
-
-/* Maximum number of outstanding asynchronous I/O operations supported by
- the implementation. Not yet implemented. */
-#undef AIO_MAX
-/* #define AIO_MAX >= _POSIX_AIO_MAX */
-
-/* The maximum amount by which a process can decrease its asynchronous I/O
- priority level from its own scheduling priority. */
-#undef AIO_PRIO_DELTA_MAX
-/* #define AIO_PRIO_DELTA_MAX >= 0 */
-
-/* Maximum number of bytes in arguments and environment passed in an exec
- call. 32000 is the safe value used for Windows processes when called
- from Cygwin processes. */
-#undef ARG_MAX
-#define ARG_MAX 32000
-
-/* Maximum number of functions that may be registered with atexit(). */
-#undef ATEXIT_MAX
-#define ATEXIT_MAX 32
-
-/* Maximum number of simultaneous processes per real user ID. */
-#undef CHILD_MAX
-#define CHILD_MAX 256
-
-/* Maximum number of timer expiration overruns. Not yet implemented. */
-#undef DELAYTIMER_MAX
-/* #define DELAYTIMER_MAX >= _POSIX_DELAYTIMER_MAX */
-
-/* Maximum length of a host name. */
-#undef HOST_NAME_MAX
-#define HOST_NAME_MAX 255
-
-/* Maximum number of iovcnt in a writev (an arbitrary number) */
-#undef IOV_MAX
-#define IOV_MAX 1024
-
-/* Maximum number of characters in a login name. */
-#undef LOGIN_NAME_MAX
-#define LOGIN_NAME_MAX 256 /* equal to UNLEN defined in w32api/lmcons.h */
-
-/* The maximum number of open message queue descriptors a process may hold. */
-#undef MQ_OPEN_MAX
-#define MQ_OPEN_MAX OPEN_MAX
-
-/* The maximum number of message priorities supported by the implementation. */
-#undef MQ_PRIO_MAX
-#define MQ_PRIO_MAX INT_MAX
-
-/* # of open files per process. Actually it can be more since Cygwin
- grows the dtable as necessary. We define a reasonable limit here
- which is returned by getdtablesize(), sysconf(_SC_OPEN_MAX) and
- getrlimit(RLIMIT_NOFILE). */
-#undef OPEN_MAX
-#define OPEN_MAX 256
-
-/* Size in bytes of a page. */
-#undef PAGESIZE
-#undef PAGE_SIZE
-#define PAGESIZE 65536
-#define PAGE_SIZE PAGESIZE
-
-/* Maximum number of attempts made to destroy a thread's thread-specific
- data values on thread exit. */
-/* FIXME: I really don't understand this value. Why should multiple
- attempts be necessary to destroy thread-specific data?!? Anyway, the
- current value here is 1, taken originally from our pthread.h file,
- where it was mistakenly defined first. Unfortunately this value is
- lower than the POSIX defined minimum value, which is 4. */
-#undef PTHREAD_DESTRUCTOR_ITERATIONS
-#define PTHREAD_DESTRUCTOR_ITERATIONS 1
-
-/* Maximum number of data keys that can be created by a process. */
-/* Tls has 1088 items - and we don't want to use them all :] */
-#undef PTHREAD_KEYS_MAX
-#define PTHREAD_KEYS_MAX 1024
-
-/* Minimum size in bytes of thread stack storage. */
-/* Actually the minimum stack size is somewhat of a split personality.
- The size parameter in a CreateThread call is the size of the initially
- commited stack size, which can be specified as low as 4K. However, the
- default *reserved* stack size is 1 Meg, unless the .def file specifies
- another STACKSIZE value. And even if you specify a stack size below 64K,
- the allocation granularity is in the way. You can never squeeze multiple
- threads in the same allocation granularity slot. Oh well. */
-#undef PTHREAD_STACK_MIN
-#define PTHREAD_STACK_MIN 65536
-
-/* Maximum number of threads that can be created per process. */
-/* Windows allows any arbitrary number of threads per process. */
-#undef PTHREAD_THREADS_MAX
-/* #define PTHREAD_THREADS_MAX unspecified */
-
-/* Maximum number of realtime signals reserved for application use. */
-/* FIXME: We only support one realtime signal in 32 bit mode, but
- _POSIX_RTSIG_MAX is 8. */
-#undef RTSIG_MAX
-#if __WORDSIZE == 64
-#define RTSIG_MAX 33
-#else
-#define RTSIG_MAX 1
-#endif
-
-/* Maximum number of semaphores that a process may have. */
-/* Windows allows any arbitrary number of semaphores per process. */
-#undef SEM_NSEMS_MAX
-/* #define SEM_NSEMS_MAX unspecified */
-
-/* The maximum value a semaphore may have. */
-#undef SEM_VALUE_MAX
-#define SEM_VALUE_MAX 1147483648
-
-/* Maximum number of queued signals that a process may send and have pending
- at the receiver(s) at any time. */
-#undef SIGQUEUE_MAX
-#define SIGQUEUE_MAX 32
-
-/* The maximum number of replenishment operations that may be simultaneously
- pending for a particular sporadic server scheduler. Not implemented. */
-#undef SS_REPL_MAX
-/* #define SS_REPL_MAX >= _POSIX_SS_REPL_MAX */
-
-/* Number of streams that one process can have open at one time. */
-#undef STREAM_MAX
-#define STREAM_MAX 20
-
-/* Maximum number of nested symbolic links. */
-#undef SYMLOOP_MAX
-#define SYMLOOP_MAX 10
-
-/* Maximum number of timer expiration overruns. */
-#undef TIMER_MAX
-#define TIMER_MAX 32
-
-/* Maximum length of the trace event name. Not implemented. */
-#undef TRACE_EVENT_NAME_MAX
-/* #define TRACE_EVENT_NAME_MAX >= _POSIX_TRACE_EVENT_NAME_MAX */
-
-/* Maximum length of the trace generation version string or of the trace
- stream name. Not implemented. */
-#undef TRACE_NAME_MAX
-/* #define TRACE_NAME_MAX >= _POSIX_TRACE_NAME_MAX */
-
-/* Maximum number of trace streams that may simultaneously exist in the
- system. Not implemented. */
-#undef TRACE_SYS_MAX
-/* #define TRACE_SYS_MAX >= _POSIX_TRACE_SYS_MAX */
-
-/* Maximum number of user trace event type identifiers that may simultaneously
- exist in a traced process, including the predefined user trace event
- POSIX_TRACE_UNNAMED_USER_EVENT. Not implemented. */
-#undef TRACE_USER_EVENT_MAX
-/* #define TRACE_USER_EVENT_MAX >= _POSIX_TRACE_USER_EVENT_MAX */
-
-/* Maximum number of characters in a tty name. */
-#undef TTY_NAME_MAX
-#define TTY_NAME_MAX 32
-
-/* Maximum number of bytes supported for the name of a timezone (not of the TZ variable). Not implemented. */
-#undef TZNAME_MAX
-/* #define TZNAME_MAX >= _POSIX_TZNAME_MAX */
-
-
-/* Pathname Variable Values */
-
-/* Minimum bits needed to represent the maximum size of a regular file. */
-#undef FILESIZEBITS
-#define FILESIZEBITS 64
-
-/* Maximum number of hardlinks to a file. */
-#undef LINK_MAX
-#define LINK_MAX 1024
-
-/* Maximum number of bytes in a terminal canonical input line. */
-#undef MAX_CANON
-#define MAX_CANON 255
-
-/* Minimum number of bytes available in a terminal input queue. */
-#undef MAX_INPUT
-#define MAX_INPUT 255
-
-/* Maximum length of a path component. */
-#undef NAME_MAX
-#define NAME_MAX 255
-
-/* Maximum length of a path given to API functions including trailing NUL.
- Deliberately set to the same default value as on Linux. Internal paths
- may be longer. */
-/* Keep in sync with __PATHNAME_MAX__ in cygwin/config.h */
-#undef PATH_MAX
-#define PATH_MAX 4096
-
-/* # of bytes in a pipe buf. This is the max # of bytes which can be
- written to a pipe in one atomic operation. */
-#undef PIPE_BUF
-#define PIPE_BUF 4096
-
-/* Minimum number of bytes of storage actually allocated for any portion
- of a file. Not implemented. */
-#undef POSIX_ALLOC_SIZE_MIN
-/* #define POSIX_ALLOC_SIZE_MIN unspecifed */
-
-/* Recommended increment for file transfer sizes between the
- {POSIX_REC_MIN_XFER_SIZE} and {POSIX_REC_MAX_XFER_SIZE} values.
- Not implemented. */
-#undef POSIX_REC_INCR_XFER_SIZE
-/* #define POSIX_REC_INCR_XFER_SIZE unspecifed */
-
-/* Maximum recommended file transfer size. Not implemented. */
-#undef POSIX_REC_MAX_XFER_SIZE
-/* #define POSIX_REC_MAX_XFER_SIZE unspecifed */
-
-/* Minimum recommended file transfer size. Not implemented. */
-#undef POSIX_REC_MIN_XFER_SIZE
-/* #define POSIX_REC_MIN_XFER_SIZE unspecifed */
-
-/* Recommended file transfer buffer alignment. Not implemented. */
-#undef POSIX_REC_XFER_ALIGN
-/* #define POSIX_REC_XFER_ALIGN unspecifed */
-
-/* Maximum number of bytes in a symbolic link. */
-#undef SYMLINK_MAX
-#define SYMLINK_MAX (PATH_MAX - 1)
-
-
-/* Runtime Increasable Values */
-
-/* Maximum obase values allowed by the bc utility. */
-#undef BC_BASE_MAX
-#define BC_BASE_MAX 99
-
-/* Maximum number of elements permitted in an array by the bc utility. */
-#undef BC_DIM_MAX
-#define BC_DIM_MAX 2048
-
-/* Maximum scale value allowed by the bc utility. */
-#undef BC_SCALE_MAX
-#define BC_SCALE_MAX 99
-
-/* Maximum length of a string constant accepted by the bc utility. */
-#undef BC_STRING_MAX
-#define BC_STRING_MAX 1000
-
-/* Maximum number of bytes in a character class name. Not implemented. */
-#undef CHARCLASS_NAME_MAX
-/* #define CHARCLASS_NAME_MAX >= _POSIX2_CHARCLASS_NAME_MAX */
-
-/* Maximum number of weights that can be assigned to an entry of the
- LC_COLLATE order keyword in the locale definition file. */
-/* FIXME: We don't support this at all right now, so this value is
- misleading at best. It's also lower than _POSIX2_COLL_WEIGHTS_MAX
- which is not good. So, for now we deliberately not define it even
- though it was defined in the former syslimits.h file. */
-#undef COLL_WEIGHTS_MAX
-/* #define COLL_WEIGHTS_MAX >= _POSIX2_COLL_WEIGHTS_MAX */
-
-/* Maximum number of expressions that can be nested within parentheses
- by the expr utility. */
-#undef EXPR_NEST_MAX
-#define EXPR_NEST_MAX 32
-
-/* Maximum bytes of a text utility's input line */
-#undef LINE_MAX
-#define LINE_MAX 2048
-
-/* Max num groups for a user, value taken from NT documentation */
-/* Must match <sys/param.h> NGROUPS */
-#undef NGROUPS_MAX
-#define NGROUPS_MAX 1024
-
-/* Maximum number of repeated occurrences of a regular expression when
- using the interval notation \{m,n\} */
-#undef RE_DUP_MAX
-#define RE_DUP_MAX 255
-
-
-/* POSIX values */
-/* These should never vary from one system type to another */
-/* They represent the minimum values that POSIX systems must support.
- POSIX-conforming apps must not require larger values. */
-
-/* Maximum Values */
-
-#define _POSIX_CLOCKRES_MIN 20000000
-
-/* Minimum Values */
-
-#define _POSIX_AIO_LISTIO_MAX 2
-#define _POSIX_AIO_MAX 1
-#define _POSIX_ARG_MAX 4096
-#define _POSIX_CHILD_MAX 25
-#define _POSIX_DELAYTIMER_MAX 32
-#define _POSIX_HOST_NAME_MAX 255
-#define _POSIX_LINK_MAX 8
-#define _POSIX_LOGIN_NAME_MAX 9
-#define _POSIX_MAX_CANON 255
-#define _POSIX_MAX_INPUT 255
-#define _POSIX_MQ_OPEN_MAX 8
-#define _POSIX_MQ_PRIO_MAX 32
-#define _POSIX_NAME_MAX 14
-#define _POSIX_NGROUPS_MAX 8
-#define _POSIX_OPEN_MAX 20
-#define _POSIX_PATH_MAX 256
-#define _POSIX_PIPE_BUF 512
-#define _POSIX_RE_DUP_MAX 255
-#define _POSIX_RTSIG_MAX 8
-#define _POSIX_SEM_NSEMS_MAX 256
-#define _POSIX_SEM_VALUE_MAX 32767
-#define _POSIX_SIGQUEUE_MAX 32
-#define _POSIX_SSIZE_MAX 32767
-#define _POSIX_STREAM_MAX 8
-#define _POSIX_SS_REPL_MAX 4
-#define _POSIX_SYMLINK_MAX 255
-#define _POSIX_SYMLOOP_MAX 8
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-#define _POSIX_THREAD_KEYS_MAX 128
-#define _POSIX_THREAD_THREADS_MAX 64
-#define _POSIX_TIMER_MAX 32
-#define _POSIX_TRACE_EVENT_NAME_MAX 30
-#define _POSIX_TRACE_NAME_MAX 8
-#define _POSIX_TRACE_SYS_MAX 8
-#define _POSIX_TRACE_USER_EVENT_MAX 32
-#define _POSIX_TTY_NAME_MAX 9
-#define _POSIX_TZNAME_MAX 6
-
-#define _POSIX2_BC_BASE_MAX 99
-#define _POSIX2_BC_DIM_MAX 2048
-#define _POSIX2_BC_SCALE_MAX 99
-#define _POSIX2_BC_STRING_MAX 1000
-#define _POSIX2_COLL_WEIGHTS_MAX 2
-#define _POSIX2_EXPR_NEST_MAX 32
-#define _POSIX2_LINE_MAX 2048
-#define _POSIX2_RE_DUP_MAX 255
-
-#define _XOPEN_IOV_MAX 16
-#define _XOPEN_NAME_MAX 255
-#define _XOPEN_PATH_MAX 1024
-
-/* Other Invariant Values */
-
-#define NL_ARGMAX 9
-#define NL_LANGMAX 14
-#define NL_MSGMAX 32767
-#define NL_NMAX INT_MAX
-#define NL_SETMAX 255
-#define NL_TEXTMAX _POSIX2_LINE_MAX
-
-/* Default process priority. */
-#undef NZERO
-#define NZERO 20
-
-#endif /* _MACH_MACHLIMITS_H_ */
-#endif /* _LIMITS_H___ */
diff --git a/winsup/cygwin/include/machine/elf.h b/winsup/cygwin/include/machine/elf.h
deleted file mode 100644
index 94278118f..000000000
--- a/winsup/cygwin/include/machine/elf.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*-
- * Copyright (c) 1996-1997 John D. Polstra.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _MACHINE_ELF_H_
-#define _MACHINE_ELF_H_ 1
-
-/*
- * ELF definitions for the i386 architecture.
- */
-
-#include <sys/elf32.h> /* Definitions common to all 32 bit architectures. */
-#if defined(__ELF_WORD_SIZE) && __ELF_WORD_SIZE == 64
-#include <sys/elf64.h> /* Definitions common to all 64 bit architectures. */
-#endif
-
-#ifndef __ELF_WORD_SIZE
-#define __ELF_WORD_SIZE 32 /* Used by <sys/elf_generic.h> */
-#endif
-
-#include <sys/elf_generic.h>
-
-#define ELF_ARCH EM_386
-
-#define ELF_MACHINE_OK(x) ((x) == EM_386 || (x) == EM_486)
-
-/*
- * Auxiliary vector entries for passing information to the interpreter.
- *
- * The i386 supplement to the SVR4 ABI specification names this "auxv_t",
- * but POSIX lays claim to all symbols ending with "_t".
- */
-
-typedef struct { /* Auxiliary vector entry on initial stack */
- int a_type; /* Entry type. */
- union {
- long a_val; /* Integer value. */
- void *a_ptr; /* Address. */
- void (*a_fcn)(void); /* Function pointer (not used). */
- } a_un;
-} Elf32_Auxinfo;
-
-#if __ELF_WORD_SIZE == 64
-/* Fake for amd64 loader support */
-typedef struct {
- int fake;
-} Elf64_Auxinfo;
-#endif
-
-__ElfType(Auxinfo);
-
-/* Values for a_type. */
-#define AT_NULL 0 /* Terminates the vector. */
-#define AT_IGNORE 1 /* Ignored entry. */
-#define AT_EXECFD 2 /* File descriptor of program to load. */
-#define AT_PHDR 3 /* Program header of program already loaded. */
-#define AT_PHENT 4 /* Size of each program header entry. */
-#define AT_PHNUM 5 /* Number of program header entries. */
-#define AT_PAGESZ 6 /* Page size in bytes. */
-#define AT_BASE 7 /* Interpreter's base address. */
-#define AT_FLAGS 8 /* Flags (unused for i386). */
-#define AT_ENTRY 9 /* Where interpreter should transfer control. */
-#define AT_NOTELF 10 /* Program is not ELF ?? */
-#define AT_UID 11 /* Real uid. */
-#define AT_EUID 12 /* Effective uid. */
-#define AT_GID 13 /* Real gid. */
-#define AT_EGID 14 /* Effective gid. */
-#define AT_EXECPATH 15 /* Path to the executable. */
-#define AT_CANARY 16 /* Canary for SSP. */
-#define AT_CANARYLEN 17 /* Length of the canary. */
-#define AT_OSRELDATE 18 /* OSRELDATE. */
-#define AT_NCPUS 19 /* Number of CPUs. */
-#define AT_PAGESIZES 20 /* Pagesizes. */
-#define AT_PAGESIZESLEN 21 /* Number of pagesizes. */
-#define AT_STACKPROT 23 /* Initial stack protection. */
-
-#define AT_COUNT 24 /* Count of defined aux entry types. */
-
-/*
- * Relocation types.
- */
-
-#define R_386_COUNT 38 /* Count of defined relocation types. */
-
-/* Define "machine" characteristics */
-#define ELF_TARG_CLASS ELFCLASS32
-#define ELF_TARG_DATA ELFDATA2LSB
-#define ELF_TARG_MACH EM_386
-#define ELF_TARG_VER 1
-
-#define ET_DYN_LOAD_ADDR 0x01001000
-
-#endif /* !_MACHINE_ELF_H_ */
diff --git a/winsup/cygwin/include/machine/stdlib.h b/winsup/cygwin/include/machine/stdlib.h
deleted file mode 100644
index 2d1539e2c..000000000
--- a/winsup/cygwin/include/machine/stdlib.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* machine/stdlib.h
-
- Copyright 2005 Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#ifndef _MACHSTDLIB_H_
-#define _MACHSTDLIB_H_
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-char *mkdtemp (char *);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _MACHSTDLIB_H_ */
diff --git a/winsup/cygwin/include/mapi.h b/winsup/cygwin/include/mapi.h
deleted file mode 100644
index e2d47e264..000000000
--- a/winsup/cygwin/include/mapi.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* mapi.h
-
- Copyright 1997, 1998, 1999, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _MAPI_H
-#define _MAPI_H
-
-/* Currently this doesn't include all the definitions. It does cover
- the parts of Simple MAPI required to send mail. */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
- /* FIXME: should this be elsewhere? */
-typedef unsigned long FLAGS;
-
- /* FIXME: should this be elsewhere? */
-#define SUCCESS_SUCCESS 0
-
- /* FIXME: should this be elsewhere? */
-typedef unsigned long LHANDLE, FAR *LPLHANDLE;
-
-
-#define MAPI_E_AMBIGUOUS_RECIPIENT 0x15
-#define MAPI_E_ATTACHMENT_NOT_FOUND 0xb
-#define MAPI_E_ATTACHMENT_OPEN_FAILURE 0xc
-#define MAPI_E_BAD_RECIPTYPE 0xf
-#define MAPI_E_FAILURE 0x2
-#define MAPI_E_INSUFFICIENT_MEMORY 0x5
-#define MAPI_E_INVALID_RECIPS 0x19
-#define MAPI_E_LOGIN_FAILURE 0x3
-#define MAPI_E_TEXT_TOO_LARGE 0x12
-#define MAPI_E_TOO_MANY_FILES 0x9
-#define MAPI_E_TOO_MANY_RECIPIENTS 0xa
-#define MAPI_E_UNKNOWN_RECIPIENT 0xe
-#define MAPI_E_USER_ABORT 0x1
-#define MAPI_E_TEXT_TOO_LARGE 0x12
-#define MAPI_DIALOG 0x8
-#define MAPI_NEW_SESSION 0x2
-#define MAPI_LOGON_UI 0x1
-#define MAPI_RECEIPT_REQUESTED 0x2
-#define MAPI_SENT 0x4
-#define MAPI_UNREAD 0x1
-#define MAPI_OLE 0x1
-#define MAPI_OLE_STATIC 0x2
-
-#define MAPI_ORIG 0
-#define MAPI_TO 1
-#define MAPI_CC 2
-#define MAPI_BCC 3
-
-typedef struct
-{
- ULONG ulReserved;
- ULONG flFlags;
- ULONG nPosition;
- LPTSTR lpszPathName;
- LPTSTR lpszFileName;
- LPVOID lpFileType;
-} MapiFileDesc, FAR *lpMapiFileDesc;
-
-typedef struct
-{
- ULONG ulReserved;
- ULONG ulRecipClass;
- LPTSTR lpszName;
- LPTSTR lpszAddress;
- ULONG ulEIDSize;
- LPVOID lpEntryID;
-} MapiRecipDesc, FAR *lpMapiRecipDesc;
-
-typedef struct
-{
- ULONG ulReserved;
- LPTSTR lpszSubject;
- LPTSTR lpszNoteText;
- LPTSTR lpszMessageType;
- LPTSTR lpszDateReceived;
- LPTSTR lpszConversationID;
- FLAGS flFlags;
- lpMapiRecipDesc lpOriginator;
- ULONG nRecipCount;
- lpMapiRecipDesc lpRecips;
- ULONG nFileCount;
- lpMapiFileDesc lpFiles;
-} MapiMessage, FAR *lpMapiMessage;
-
-ULONG FAR PASCAL MAPISendMail (LHANDLE, ULONG, lpMapiMessage, FLAGS, ULONG);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _MAPI_H */
diff --git a/winsup/cygwin/include/memory.h b/winsup/cygwin/include/memory.h
deleted file mode 100644
index 491f4855e..000000000
--- a/winsup/cygwin/include/memory.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* memory.h
-
- Copyright 1998, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _MEMORY_H
-#define _MEMORY_H
-
-/* This allows more things to compile. */
-#include <string.h>
-
-#endif /* _MEMORY_H */
diff --git a/winsup/cygwin/include/mntent.h b/winsup/cygwin/include/mntent.h
deleted file mode 100644
index 5a0c13054..000000000
--- a/winsup/cygwin/include/mntent.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* mntent.h
-
- Copyright 1996, 1998, 1999, 2000, 2001, 2006, 2009, 2010, 2012 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _MNTENT_H
-#define _MNTENT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct mntent
-{
- char *mnt_fsname;
- char *mnt_dir;
- char *mnt_type;
- char *mnt_opts;
- int mnt_freq;
- int mnt_passno;
-};
-
-#ifndef _NOMNTENT_FUNCS
-#include <stdio.h>
-FILE *setmntent (const char *__filep, const char *__type);
-struct mntent *getmntent (FILE *__filep);
-struct mntent *getmntent_r (FILE *, struct mntent *, char *, int);
-int endmntent (FILE *__filep);
-#endif
-
-#ifndef _NOMNTENT_MACROS
-
-#include <paths.h>
-
-/* The following two defines are deprecated. Use the equivalent
- names from paths.h instead. */
-#ifndef MNTTAB
-#define MNTTAB _PATH_MNTTAB
-#endif
-/* This next file does exist, but the implementation of these
- functions does not actually use it.
- However, applications need the define to pass to setmntent().
-*/
-#ifndef MOUNTED
-#define MOUNTED _PATH_MOUNTED
-#endif
-
-#endif /* !_NOMNTENT_MACROS */
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _MNTENT_H */
diff --git a/winsup/cygwin/include/monetary.h b/winsup/cygwin/include/monetary.h
deleted file mode 100644
index 8b525e961..000000000
--- a/winsup/cygwin/include/monetary.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*-
- * Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _MONETARY_H_
-#define _MONETARY_H_
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-__BEGIN_DECLS
-ssize_t strfmon(char * __restrict, size_t, const char * __restrict, ...);
-__END_DECLS
-
-#endif /* !_MONETARY_H_ */
diff --git a/winsup/cygwin/include/mqueue.h b/winsup/cygwin/include/mqueue.h
deleted file mode 100644
index 59c32dbe4..000000000
--- a/winsup/cygwin/include/mqueue.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* mqueue.h: POSIX message queue interface
-
- Copyright 2007 Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include <time.h>
-#include <sys/types.h>
-#include <sys/signal.h>
-#include <sys/cdefs.h>
-
-#ifndef _MQUEUE_H
-#define _MQUEUE_H
-
-__BEGIN_DECLS
-
-typedef intptr_t mqd_t;
-
-struct mq_attr {
- long mq_flags; /* Message queue flags */
- long mq_maxmsg; /* Max number of messages in queue */
- long mq_msgsize; /* Max message size */
- long mq_curmsgs; /* Current number of messages in queue */
-};
-
-int mq_close (mqd_t);
-int mq_getattr (mqd_t, struct mq_attr *);
-int mq_notify (mqd_t, const struct sigevent *);
-mqd_t mq_open (const char *, int, ...);
-ssize_t mq_receive (mqd_t, char *, size_t, unsigned int *);
-int mq_send (mqd_t, const char *, size_t, unsigned int);
-int mq_setattr (mqd_t, const struct mq_attr *, struct mq_attr *);
-ssize_t mq_timedreceive (mqd_t, char *, size_t, unsigned int *,
- const struct timespec *);
-int mq_timedsend (mqd_t, const char *, size_t, unsigned int,
- const struct timespec *);
-int mq_unlink (const char *name);
-
-__END_DECLS
-
-#endif /* _MQUEUE_H */
diff --git a/winsup/cygwin/include/net/if.h b/winsup/cygwin/include/net/if.h
deleted file mode 100644
index cba90d3f8..000000000
--- a/winsup/cygwin/include/net/if.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* net/if.h
-
- Copyright 1998, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _NET_IF_H
-#define _NET_IF_H
-
-#include <cygwin/if.h>
-
-#endif /* _NET_IF_H */
diff --git a/winsup/cygwin/include/netdb.h b/winsup/cygwin/include/netdb.h
deleted file mode 100644
index 863c19348..000000000
--- a/winsup/cygwin/include/netdb.h
+++ /dev/null
@@ -1,265 +0,0 @@
-/* Original linux netdb.h merged with winsock.h types */
-
-/*-
- * Copyright (c) 1980, 1983, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)netdb.h 8.1 (Berkeley) 6/2/93
- * netdb.h,v 1.1.1.1 1995/02/18 05:34:07 hjl Exp
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-#ifndef _NETDB_H_
-#define _NETDB_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <inttypes.h>
-#include <sys/socket.h>
-#ifndef __INSIDE_CYGWIN_NET__
-#include <netinet/in.h>
-#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 */
- uint32_t n_net; /* network # */
-};
-
-struct servent {
- char *s_name; /* official service name */
- char **s_aliases; /* alias list */
- short s_port; /* port # */
- char *s_proto; /* protocol to use */
-};
-
-struct protoent
-{
- char *p_name; /* official protocol name */
- char **p_aliases; /* alias list */
- short p_proto; /* protocol # */
-};
-
-struct rpcent {
- char *r_name; /* name of server for this rpc program */
- char **r_aliases; /* alias list */
- int r_number; /* rpc program number */
-};
-
-#ifndef __INSIDE_CYGWIN_NET__
-struct addrinfo {
- int ai_flags; /* input flags */
- int ai_family; /* address family of socket */
- int ai_socktype; /* socket type */
- int ai_protocol; /* ai_protocol */
- socklen_t ai_addrlen; /* length of socket address */
- char *ai_canonname; /* canonical name of service location */
- struct sockaddr *ai_addr; /* socket address of socket */
- struct addrinfo *ai_next; /* pointer to next in list */
-};
-#endif
-
-/*
- * 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;
-/* Some packages expect h_errno to be a macro, otherwise they redeclare
- h_errno, which leads to spurious warnings. */
-#define h_errno 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 */
-
-/* Flag values for getaddrinfo function. */
-#define AI_PASSIVE 0x1 /* Intend socket address for bind. */
-#define AI_CANONNAME 0x2 /* Return canonical node name. */
-#define AI_NUMERICHOST 0x4 /* Input is address, don't resolve. */
-#define AI_NUMERICSERV 0x8 /* Input is port number, don't resolve. */
-#define AI_ALL 0x100 /* Return v4-mapped and v6 addresses. */
-#define AI_ADDRCONFIG 0x400 /* Only available on Vista. Unchangable default
- on older systems. */
-#define AI_V4MAPPED 0x800
-/* Glibc extensions. We use numerical values taken by winsock-specific
- extensions. */
-#define AI_IDN 0x4000 /* Encode IDN input from current local to
- punycode per RFC 3490. */
-#define AI_CANONIDN 0x8000 /* Convert ai_canonname from punycode to IDN
- in current locale. */
-#define AI_IDN_ALLOW_UNASSIGNED 0x10000 /* Allow unassigned code points in
- input string. */
-#define AI_IDN_USE_STD3_ASCII_RULES 0x20000 /* Filter ASCII chars according to
- STD3 rules. */
-
-/* Flag values for getnameinfo function. */
-#define NI_NOFQDN 0x1 /* Don't lookup hostname. */
-#define NI_NUMERICHOST 0x2 /* Return host address, rather than name. */
-#define NI_NAMEREQD 0x4 /* Not being able to resolve is an error. */
-#define NI_NUMERICSERV 0x8 /* Return port number, rather than name. */
-#define NI_DGRAM 0x10 /* Lookup datagram (UDP) service. */
-/* Glibc extensions. We use numerical values taken by winsock-specific
- extensions. */
-#define NI_IDN 0x4000 /* Decode name from punycode to IDN in
- current locale. */
-#define NI_IDN_ALLOW_UNASSIGNED 0x10000 /* Allow unassigned code points in
- output string. */
-#define NI_IDN_USE_STD3_ASCII_RULES 0x20000 /* Filter ASCII chars according to
- STD3 rules. */
-
-#define NI_MAXHOST 1025 /* Best effort maximum hostname length. */
-#define NI_MAXSERV 32 /* Best effort maximum service name length. */
-
-/* Error codes returned by getaddrinfo and getnameinfo. */
-#define EAI_ADDRFAMILY 1 /* Address family for hostname not supported */
-#define EAI_AGAIN 2 /* Temporary failure in name resolution */
-#define EAI_BADFLAGS 3 /* Bad value for ai_flags */
-#define EAI_FAIL 4 /* Non-recoverable failure in name resolution */
-#define EAI_FAMILY 5 /* ai_family not supported */
-#define EAI_MEMORY 6 /* Memory allocation failure */
-#define EAI_NODATA 7 /* No address associated with hostname */
-#define EAI_NONAME 8 /* Name or service not known */
-#define EAI_SERVICE 9 /* Servname not supported for ai_socktype */
-#define EAI_SOCKTYPE 10 /* ai_socktype not supported */
-#define EAI_SYSTEM 11 /* System error */
-#define EAI_BADHINTS 12 /* Invalid value for hints */
-#define EAI_PROTOCOL 13 /* Resolved protocol is unknown */
-#define EAI_OVERFLOW 14 /* An argument buffer overflowed */
-/* Glibc extensions. */
-#define EAI_IDN_ENCODE 15 /* Parameter string not correctly encoded */
-
-#ifndef __INSIDE_CYGWIN_NET__
-void endhostent (void);
-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 *gethostbyname2 (const char *, int);
-struct hostent *gethostent (void);
-struct netent *getnetbyaddr (long, int); /* u_long? */
-struct netent *getnetbyname (const char *);
-struct netent *getnetent (void);
-struct protoent *getprotobyname (const char *);
-struct protoent *getprotobynumber (int);
-struct protoent *getprotoent (void);
-struct servent *getservbyname (const char *, const char *);
-struct servent *getservbyport (int, const char *);
-struct servent *getservent (void);
-struct rpcent *getrpcent (void);
-struct rpcent *getrpcbyname (const char *);
-struct rpcent *getrpcbynumber (int);
-const char *hstrerror (int);
-void herror (const char *);
-void sethostent (int);
-void setnetent (int);
-void setprotoent (int);
-void setservent (int);
-void setrpcent (int);
-void freeaddrinfo (struct addrinfo *);
-const char *gai_strerror (int);
-int getaddrinfo (const char *, const char *,
- const struct addrinfo *, struct addrinfo **);
-int getnameinfo (const struct sockaddr *, socklen_t, char *,
- socklen_t, char *, socklen_t, int);
-
-int rcmd (char **, uint16_t, const char *, const char *,
- const char *, int *);
-int rcmd_af (char **, uint16_t, const char *, const char *,
- const char *, int *, int);
-int rexec (char **, uint16_t rport, char *, char *, char *, int *);
-int rresvport (int *);
-int rresvport_af (int *, int);
-int iruserok (unsigned long, int, const char *, const char *);
-int iruserok_sa (const void *, int, int, const char *,
- const char *);
-int ruserok (const char *, int, const char *, const char *);
-#endif
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* !_NETDB_H_ */
-
diff --git a/winsup/cygwin/include/netinet/in.h b/winsup/cygwin/include/netinet/in.h
deleted file mode 100644
index 6d666312a..000000000
--- a/winsup/cygwin/include/netinet/in.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* netinet/in.h
-
- Copyright 1998, 2000, 2001, 2006 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _NETINET_IN_H
-#define _NETINET_IN_H
-
-#include <cygwin/in.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-extern int bindresvport (int, struct sockaddr_in *);
-extern int bindresvport_sa (int, struct sockaddr *);
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _NETINET_IN_H */
diff --git a/winsup/cygwin/include/netinet/in_systm.h b/winsup/cygwin/include/netinet/in_systm.h
deleted file mode 100644
index 17b5feb8d..000000000
--- a/winsup/cygwin/include/netinet/in_systm.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* netinet/in_systm.h
-
- Copyright 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _NETINET_IN_SYSTM_H
-#define _NETINET_IN_SYSTM_H
-
-#include <cygwin/in_systm.h>
-
-#endif /* _NETINET_IN_SYSTM_H */
diff --git a/winsup/cygwin/include/netinet/ip.h b/winsup/cygwin/include/netinet/ip.h
deleted file mode 100644
index dd701512e..000000000
--- a/winsup/cygwin/include/netinet/ip.h
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip.h 8.2 (Berkeley) 6/1/94
- * $FreeBSD: src/sys/netinet/ip.h,v 1.17 1999/12/22 19:13:20 shin Exp $
- */
-
-#ifndef _NETINET_IP_H
-#define _NETINET_IP_H
-
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#include <bits/endian.h>
-
-/*
- * Definitions for internet protocol version 4.
- * Per RFC 791, September 1981.
- */
-#define IPVERSION 4
-
-/*
- * Structure of an internet header, naked of options.
- */
-struct ip {
-#ifdef _IP_VHL
- u_char ip_vhl; /* version << 4 | header length >> 2 */
-#else
-#if __BYTE_ORDER == __LITTLE_ENDIAN
- u_int ip_hl:4, /* header length */
- ip_v:4; /* version */
-#endif
-#if __BYTE_ORDER == __BIG_ENDIAN
- u_int ip_v:4, /* version */
- ip_hl:4; /* header length */
-#endif
-#endif /* not _IP_VHL */
- u_char ip_tos; /* type of service */
- u_short ip_len; /* total length */
- u_short ip_id; /* identification */
- u_short ip_off; /* fragment offset field */
-#define IP_RF 0x8000 /* reserved fragment flag */
-#define IP_DF 0x4000 /* dont fragment flag */
-#define IP_MF 0x2000 /* more fragments flag */
-#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
- u_char ip_ttl; /* time to live */
- u_char ip_p; /* protocol */
- u_short ip_sum; /* checksum */
- struct in_addr ip_src,ip_dst; /* source and dest address */
-};
-
-#ifdef _IP_VHL
-#define IP_MAKE_VHL(v, hl) ((v) << 4 | (hl))
-#define IP_VHL_HL(vhl) ((vhl) & 0x0f)
-#define IP_VHL_V(vhl) ((vhl) >> 4)
-#define IP_VHL_BORING 0x45
-#endif
-
-#define IP_MAXPACKET 65535 /* maximum packet size */
-
-/*
- * Definitions for DiffServ Codepoints as per RFC2474
- */
-#define IPTOS_DSCP_CS0 0x00
-#define IPTOS_DSCP_CS1 0x20
-#define IPTOS_DSCP_AF11 0x28
-#define IPTOS_DSCP_AF12 0x30
-#define IPTOS_DSCP_AF13 0x38
-#define IPTOS_DSCP_CS2 0x40
-#define IPTOS_DSCP_AF21 0x48
-#define IPTOS_DSCP_AF22 0x50
-#define IPTOS_DSCP_AF23 0x58
-#define IPTOS_DSCP_CS3 0x60
-#define IPTOS_DSCP_AF31 0x68
-#define IPTOS_DSCP_AF32 0x70
-#define IPTOS_DSCP_AF33 0x78
-#define IPTOS_DSCP_CS4 0x80
-#define IPTOS_DSCP_AF41 0x88
-#define IPTOS_DSCP_AF42 0x90
-#define IPTOS_DSCP_AF43 0x98
-#define IPTOS_DSCP_CS5 0xa0
-#define IPTOS_DSCP_EF 0xb8
-#define IPTOS_DSCP_CS6 0xc0
-#define IPTOS_DSCP_CS7 0xe0
-
-/*
- * Definitions for DiffServ Class Selector Codepoints as defined by Linux.
- * Linux uses different names than OpenBSD, unfortunately.
- */
-#define IPTOS_CLASS_CS0 0x00
-#define IPTOS_CLASS_CS1 0x20
-#define IPTOS_CLASS_CS2 0x40
-#define IPTOS_CLASS_CS3 0x60
-#define IPTOS_CLASS_CS4 0x80
-#define IPTOS_CLASS_CS5 0xa0
-#define IPTOS_CLASS_CS6 0xc0
-#define IPTOS_CLASS_CS7 0xe0
-#define IPTOS_CLASS_DEFAULT IPTOS_CLASS_CS0
-/* Linux also defined masks and access macros. */
-#define IPTOS_CLASS_MASK 0xe0
-#define IPTOS_CLASS(cs) ((cs) & IPTOS_CLASS_MASK)
-#define IPTOS_DSCP_MASK 0xfc
-#define IPTOS_DSCP(cp) ((cp) & IPTOS_DSCP_MASK)
-
-/*
- * ECN (Explicit Congestion Notification) codepoints in RFC3168
- * mapped to the lower 2 bits of the TOS field.
- */
-#define IPTOS_ECN_NOTECT 0x00 /* not-ECT */
-#define IPTOS_ECN_ECT1 0x01 /* ECN-capable transport (1) */
-#define IPTOS_ECN_ECT0 0x02 /* ECN-capable transport (0) */
-#define IPTOS_ECN_CE 0x03 /* congestion experienced */
-#define IPTOS_ECN_MASK 0x03 /* ECN field mask */
-/* Linux also defined an access macro.
- * The name of IPTOS_ECN_NOTECT differs, too, unfortunately. */
-#define IPTOS_ECN(cn) ((cn) & IPTOS_ECN_MASK)
-#define IPTOS_ECN_NOT_ECT 0x00
-
-/*
- * Definitions for IP type of service per RFC1349 (ip_tos)
- * DEPRECATED
- */
-#ifndef IPTOS_LOWDELAY
-#define IPTOS_LOWDELAY 0x10
-#define IPTOS_THROUGHPUT 0x08
-#define IPTOS_RELIABILITY 0x04
-#endif
-#define IPTOS_MINCOST 0x02
-/* ECN RFC3168 obsoletes RFC2481, and these will be deprecated soon. */
-#define IPTOS_CE 0x01 /* congestion experienced */
-#define IPTOS_ECT 0x02 /* ECN-capable transport */
-
-/*
- * Definitions for IP precedence per RFC1195 (also in ip_tos) (hopefully unused)
- */
-#define IPTOS_PREC_NETCONTROL 0xe0
-#define IPTOS_PREC_INTERNETCONTROL 0xc0
-#define IPTOS_PREC_CRITIC_ECP 0xa0
-#define IPTOS_PREC_FLASHOVERRIDE 0x80
-#define IPTOS_PREC_FLASH 0x60
-#define IPTOS_PREC_IMMEDIATE 0x40
-#define IPTOS_PREC_PRIORITY 0x20
-#define IPTOS_PREC_ROUTINE 0x00
-
-
-/*
- * Definitions for options.
- */
-#define IPOPT_COPIED(o) ((o)&0x80)
-#define IPOPT_CLASS(o) ((o)&0x60)
-#define IPOPT_NUMBER(o) ((o)&0x1f)
-
-#define IPOPT_CONTROL 0x00
-#define IPOPT_RESERVED1 0x20
-#define IPOPT_DEBMEAS 0x40
-#define IPOPT_RESERVED2 0x60
-
-#define IPOPT_EOL 0 /* end of option list */
-#define IPOPT_NOP 1 /* no operation */
-
-#define IPOPT_RR 7 /* record packet route */
-#define IPOPT_TS 68 /* timestamp */
-#define IPOPT_SECURITY 130 /* provide s,c,h,tcc */
-#define IPOPT_LSRR 131 /* loose source route */
-#define IPOPT_SATID 136 /* satnet id */
-#define IPOPT_SSRR 137 /* strict source route */
-#define IPOPT_RA 148 /* router alert */
-
-/*
- * Offsets to fields in options other than EOL and NOP.
- */
-#define IPOPT_OPTVAL 0 /* option ID */
-#define IPOPT_OLEN 1 /* option length */
-#define IPOPT_OFFSET 2 /* offset within option */
-#define IPOPT_MINOFF 4 /* min value of above */
-
-/*
- * Time stamp option structure.
- */
-struct ip_timestamp {
- u_char ipt_code; /* IPOPT_TS */
- u_char ipt_len; /* size of structure (variable) */
- u_char ipt_ptr; /* index of current entry */
-#if __BYTE_ORDER == __LITTLE_ENDIAN
- u_int ipt_flg:4, /* flags, see below */
- ipt_oflw:4; /* overflow counter */
-#endif
-#if __BYTE_ORDER == __BIG_ENDIAN
- u_int ipt_oflw:4, /* overflow counter */
- ipt_flg:4; /* flags, see below */
-#endif
- union ipt_timestamp {
- n_long ipt_time[1];
- struct ipt_ta {
- struct in_addr ipt_addr;
- n_long ipt_time;
- } ipt_ta[1];
- } ipt_timestamp;
-};
-
-/* flag bits for ipt_flg */
-#define IPOPT_TS_TSONLY 0 /* timestamps only */
-#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
-#define IPOPT_TS_PRESPEC 3 /* specified modules only */
-
-/* bits for security (not byte swapped) */
-#define IPOPT_SECUR_UNCLASS 0x0000
-#define IPOPT_SECUR_CONFID 0xf135
-#define IPOPT_SECUR_EFTO 0x789a
-#define IPOPT_SECUR_MMMM 0xbc4d
-#define IPOPT_SECUR_RESTR 0xaf13
-#define IPOPT_SECUR_SECRET 0xd788
-#define IPOPT_SECUR_TOPSECRET 0x6bc5
-
-/*
- * Internet implementation parameters.
- */
-#define MAXTTL 255 /* maximum time to live (seconds) */
-#define IPDEFTTL 64 /* default ttl, from RFC 1340 */
-#define IPFRAGTTL 60 /* time to live for frags, slowhz */
-#define IPTTLDEC 1 /* subtracted when forwarding */
-
-#define IP_MSS 576 /* default maximum segment size */
-
-#endif
diff --git a/winsup/cygwin/include/netinet/ip6.h b/winsup/cygwin/include/netinet/ip6.h
deleted file mode 100644
index 3f4cad092..000000000
--- a/winsup/cygwin/include/netinet/ip6.h
+++ /dev/null
@@ -1,352 +0,0 @@
-/* $FreeBSD: src/sys/netinet/ip6.h,v 1.22 2013/04/10 00:26:22 svnexp Exp $ */
-/* $KAME: ip6.h,v 1.18 2001/03/29 05:34:30 itojun Exp $ */
-
-/*-
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*-
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip.h 8.1 (Berkeley) 6/10/93
- */
-
-#ifndef _NETINET_IP6_H_
-#define _NETINET_IP6_H_
-
-/*
- * Definition for internet protocol version 6.
- * RFC 2460
- */
-
-struct ip6_hdr {
- union {
- struct ip6_hdrctl {
- u_int32_t ip6_un1_flow; /* 20 bits of flow-ID */
- u_int16_t ip6_un1_plen; /* payload length */
- u_int8_t ip6_un1_nxt; /* next header */
- u_int8_t ip6_un1_hlim; /* hop limit */
- } ip6_un1;
- u_int8_t ip6_un2_vfc; /* 4 bits version, top 4 bits class */
- } ip6_ctlun;
- struct in6_addr ip6_src; /* source address */
- struct in6_addr ip6_dst; /* destination address */
-} __packed;
-
-#define ip6_vfc ip6_ctlun.ip6_un2_vfc
-#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow
-#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen
-#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt
-#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim
-#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim
-
-#define IPV6_VERSION 0x60
-#define IPV6_VERSION_MASK 0xf0
-
-#if BYTE_ORDER == BIG_ENDIAN
-#define IPV6_FLOWINFO_MASK 0x0fffffff /* flow info (28 bits) */
-#define IPV6_FLOWLABEL_MASK 0x000fffff /* flow label (20 bits) */
-#else
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define IPV6_FLOWINFO_MASK 0xffffff0f /* flow info (28 bits) */
-#define IPV6_FLOWLABEL_MASK 0xffff0f00 /* flow label (20 bits) */
-#endif /* LITTLE_ENDIAN */
-#endif
-#if 1
-/* ECN bits proposed by Sally Floyd */
-#define IP6TOS_CE 0x01 /* congestion experienced */
-#define IP6TOS_ECT 0x02 /* ECN-capable transport */
-#endif
-
-/*
- * Extension Headers
- */
-
-struct ip6_ext {
- u_int8_t ip6e_nxt;
- u_int8_t ip6e_len;
-} __packed;
-
-/* Hop-by-Hop options header */
-/* XXX should we pad it to force alignment on an 8-byte boundary? */
-struct ip6_hbh {
- u_int8_t ip6h_nxt; /* next header */
- u_int8_t ip6h_len; /* length in units of 8 octets */
- /* followed by options */
-} __packed;
-
-/* Destination options header */
-/* XXX should we pad it to force alignment on an 8-byte boundary? */
-struct ip6_dest {
- u_int8_t ip6d_nxt; /* next header */
- u_int8_t ip6d_len; /* length in units of 8 octets */
- /* followed by options */
-} __packed;
-
-/* Option types and related macros */
-#define IP6OPT_PAD1 0x00 /* 00 0 00000 */
-#define IP6OPT_PADN 0x01 /* 00 0 00001 */
-#define IP6OPT_JUMBO 0xC2 /* 11 0 00010 = 194 */
-#define IP6OPT_NSAP_ADDR 0xC3 /* 11 0 00011 */
-#define IP6OPT_TUNNEL_LIMIT 0x04 /* 00 0 00100 */
-#ifndef _KERNEL
-#define IP6OPT_RTALERT 0x05 /* 00 0 00101 (KAME definition) */
-#endif
-#define IP6OPT_ROUTER_ALERT 0x05 /* 00 0 00101 (RFC3542, recommended) */
-
-#define IP6OPT_RTALERT_LEN 4
-#define IP6OPT_RTALERT_MLD 0 /* Datagram contains an MLD message */
-#define IP6OPT_RTALERT_RSVP 1 /* Datagram contains an RSVP message */
-#define IP6OPT_RTALERT_ACTNET 2 /* contains an Active Networks msg */
-#define IP6OPT_MINLEN 2
-
-#define IP6OPT_EID 0x8a /* 10 0 01010 */
-
-#define IP6OPT_TYPE(o) ((o) & 0xC0)
-#define IP6OPT_TYPE_SKIP 0x00
-#define IP6OPT_TYPE_DISCARD 0x40
-#define IP6OPT_TYPE_FORCEICMP 0x80
-#define IP6OPT_TYPE_ICMP 0xC0
-
-#define IP6OPT_MUTABLE 0x20
-
-/* IPv6 options: common part */
-struct ip6_opt {
- u_int8_t ip6o_type;
- u_int8_t ip6o_len;
-} __packed;
-
-/* Jumbo Payload Option */
-struct ip6_opt_jumbo {
- u_int8_t ip6oj_type;
- u_int8_t ip6oj_len;
- u_int8_t ip6oj_jumbo_len[4];
-} __packed;
-#define IP6OPT_JUMBO_LEN 6
-
-/* NSAP Address Option */
-struct ip6_opt_nsap {
- u_int8_t ip6on_type;
- u_int8_t ip6on_len;
- u_int8_t ip6on_src_nsap_len;
- u_int8_t ip6on_dst_nsap_len;
- /* followed by source NSAP */
- /* followed by destination NSAP */
-} __packed;
-
-/* Tunnel Limit Option */
-struct ip6_opt_tunnel {
- u_int8_t ip6ot_type;
- u_int8_t ip6ot_len;
- u_int8_t ip6ot_encap_limit;
-} __packed;
-
-/* Router Alert Option */
-struct ip6_opt_router {
- u_int8_t ip6or_type;
- u_int8_t ip6or_len;
- u_int8_t ip6or_value[2];
-} __packed;
-/* Router alert values (in network byte order) */
-#if BYTE_ORDER == BIG_ENDIAN
-#define IP6_ALERT_MLD 0x0000
-#define IP6_ALERT_RSVP 0x0001
-#define IP6_ALERT_AN 0x0002
-#else
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define IP6_ALERT_MLD 0x0000
-#define IP6_ALERT_RSVP 0x0100
-#define IP6_ALERT_AN 0x0200
-#endif /* LITTLE_ENDIAN */
-#endif
-
-/* Routing header */
-struct ip6_rthdr {
- u_int8_t ip6r_nxt; /* next header */
- u_int8_t ip6r_len; /* length in units of 8 octets */
- u_int8_t ip6r_type; /* routing type */
- u_int8_t ip6r_segleft; /* segments left */
- /* followed by routing type specific data */
-} __packed;
-
-/* Type 0 Routing header, deprecated by RFC 5095. */
-struct ip6_rthdr0 {
- u_int8_t ip6r0_nxt; /* next header */
- u_int8_t ip6r0_len; /* length in units of 8 octets */
- u_int8_t ip6r0_type; /* always zero */
- u_int8_t ip6r0_segleft; /* segments left */
- u_int32_t ip6r0_reserved; /* reserved field */
- /* followed by up to 127 struct in6_addr */
-} __packed;
-
-/* Fragment header */
-struct ip6_frag {
- u_int8_t ip6f_nxt; /* next header */
- u_int8_t ip6f_reserved; /* reserved field */
- u_int16_t ip6f_offlg; /* offset, reserved, and flag */
- u_int32_t ip6f_ident; /* identification */
-} __packed;
-
-#if BYTE_ORDER == BIG_ENDIAN
-#define IP6F_OFF_MASK 0xfff8 /* mask out offset from _offlg */
-#define IP6F_RESERVED_MASK 0x0006 /* reserved bits in ip6f_offlg */
-#define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */
-#else /* BYTE_ORDER == LITTLE_ENDIAN */
-#define IP6F_OFF_MASK 0xf8ff /* mask out offset from _offlg */
-#define IP6F_RESERVED_MASK 0x0600 /* reserved bits in ip6f_offlg */
-#define IP6F_MORE_FRAG 0x0100 /* more-fragments flag */
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
-
-/*
- * Internet implementation parameters.
- */
-#define IPV6_MAXHLIM 255 /* maximum hoplimit */
-#define IPV6_DEFHLIM 64 /* default hlim */
-#define IPV6_FRAGTTL 120 /* ttl for fragment packets, in slowtimo tick */
-#define IPV6_HLIMDEC 1 /* subtracted when forwarding */
-
-#define IPV6_MMTU 1280 /* minimal MTU and reassembly. 1024 + 256 */
-#define IPV6_MAXPACKET 65535 /* ip6 max packet size without Jumbo payload*/
-#define IPV6_MAXOPTHDR 2048 /* max option header size, 256 64-bit words */
-
-#ifdef _KERNEL
-/*
- * IP6_EXTHDR_CHECK ensures that region between the IP6 header and the
- * target header (including IPv6 itself, extension headers and
- * TCP/UDP/ICMP6 headers) are contiguous. KAME requires drivers
- * to store incoming data into one internal mbuf or one or more external
- * mbufs(never into two or more internal mbufs). Thus, the third case is
- * supposed to never be matched but is prepared just in case.
- */
-
-#define IP6_EXTHDR_CHECK(m, off, hlen, ret) \
-do { \
- if ((m)->m_next != NULL) { \
- if (((m)->m_flags & M_LOOP) && \
- ((m)->m_len < (off) + (hlen)) && \
- (((m) = m_pullup((m), (off) + (hlen))) == NULL)) { \
- IP6STAT_INC(ip6s_exthdrtoolong); \
- return ret; \
- } else if ((m)->m_flags & M_EXT) { \
- if ((m)->m_len < (off) + (hlen)) { \
- IP6STAT_INC(ip6s_exthdrtoolong); \
- m_freem(m); \
- return ret; \
- } \
- } else { \
- if ((m)->m_len < (off) + (hlen)) { \
- IP6STAT_INC(ip6s_exthdrtoolong); \
- m_freem(m); \
- return ret; \
- } \
- } \
- } else { \
- if ((m)->m_len < (off) + (hlen)) { \
- IP6STAT_INC(ip6s_tooshort); \
- in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_truncated); \
- m_freem(m); \
- return ret; \
- } \
- } \
-} while (/*CONSTCOND*/ 0)
-
-/*
- * IP6_EXTHDR_GET ensures that intermediate protocol header (from "off" to
- * "len") is located in single mbuf, on contiguous memory region.
- * The pointer to the region will be returned to pointer variable "val",
- * with type "typ".
- * IP6_EXTHDR_GET0 does the same, except that it aligns the structure at the
- * very top of mbuf. GET0 is likely to make memory copy than GET.
- *
- * XXX we're now testing this, needs m_pulldown()
- */
-#define IP6_EXTHDR_GET(val, typ, m, off, len) \
-do { \
- struct mbuf *t; \
- int tmp; \
- if ((m)->m_len >= (off) + (len)) \
- (val) = (typ)(mtod((m), caddr_t) + (off)); \
- else { \
- t = m_pulldown((m), (off), (len), &tmp); \
- if (t) { \
- if (t->m_len < tmp + (len)) \
- panic("m_pulldown malfunction"); \
- (val) = (typ)(mtod(t, caddr_t) + tmp); \
- } else { \
- (val) = (typ)NULL; \
- (m) = NULL; \
- } \
- } \
-} while (/*CONSTCOND*/ 0)
-
-#define IP6_EXTHDR_GET0(val, typ, m, off, len) \
-do { \
- struct mbuf *t; \
- if ((off) == 0) \
- (val) = (typ)mtod(m, caddr_t); \
- else { \
- t = m_pulldown((m), (off), (len), NULL); \
- if (t) { \
- if (t->m_len < (len)) \
- panic("m_pulldown malfunction"); \
- (val) = (typ)mtod(t, caddr_t); \
- } else { \
- (val) = (typ)NULL; \
- (m) = NULL; \
- } \
- } \
-} while (/*CONSTCOND*/ 0)
-
-#endif /*_KERNEL*/
-
-#endif /* not _NETINET_IP6_H_ */
diff --git a/winsup/cygwin/include/netinet/ip_icmp.h b/winsup/cygwin/include/netinet/ip_icmp.h
deleted file mode 100644
index 43bae5324..000000000
--- a/winsup/cygwin/include/netinet/ip_icmp.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* netinet/ip_icmp.h
-
- Copyright 1998, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _NETINET_IP_ICMP_H
-#define _NETINET_IP_ICMP_H
-
-#include <cygwin/icmp.h>
-
-#endif /* _NETINET_IP_ICMP_H */
diff --git a/winsup/cygwin/include/netinet/tcp.h b/winsup/cygwin/include/netinet/tcp.h
deleted file mode 100644
index 8a6994326..000000000
--- a/winsup/cygwin/include/netinet/tcp.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/tcp.h,v 1.13 2000/01/09 19:17:25 shin Exp $
- */
-
-#ifndef _NETINET_TCP_H
-#define _NETINET_TCP_H
-
-#include <bits/endian.h>
-
-typedef u_int32_t tcp_seq;
-typedef u_int32_t tcp_cc; /* connection count per rfc1644 */
-
-#define tcp6_seq tcp_seq /* for KAME src sync over BSD*'s */
-#define tcp6hdr tcphdr /* for KAME src sync over BSD*'s */
-
-/*
- * TCP header.
- * Per RFC 793, September, 1981.
- */
-struct tcphdr {
- u_short th_sport; /* source port */
- u_short th_dport; /* destination port */
- tcp_seq th_seq; /* sequence number */
- tcp_seq th_ack; /* acknowledgement number */
-#if __BYTE_ORDER == __LITTLE_ENDIAN
- u_int th_x2:4, /* (unused) */
- th_off:4; /* data offset */
-#endif
-#if __BYTE_ORDER == __BIG_ENDIAN
- u_int th_off:4, /* data offset */
- th_x2:4; /* (unused) */
-#endif
- u_char th_flags;
-#define TH_FIN 0x01
-#define TH_SYN 0x02
-#define TH_RST 0x04
-#define TH_PUSH 0x08
-#define TH_ACK 0x10
-#define TH_URG 0x20
-#define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG)
-
- u_short th_win; /* window */
- u_short th_sum; /* checksum */
- u_short th_urp; /* urgent pointer */
-};
-
-#define TCPOPT_EOL 0
-#define TCPOPT_NOP 1
-#define TCPOPT_MAXSEG 2
-#define TCPOLEN_MAXSEG 4
-#define TCPOPT_WINDOW 3
-#define TCPOLEN_WINDOW 3
-#define TCPOPT_SACK_PERMITTED 4 /* Experimental */
-#define TCPOLEN_SACK_PERMITTED 2
-#define TCPOPT_SACK 5 /* Experimental */
-#define TCPOPT_TIMESTAMP 8
-#define TCPOLEN_TIMESTAMP 10
-#define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */
-#define TCPOPT_TSTAMP_HDR \
- (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
-
-#define TCPOPT_CC 11 /* CC options: RFC-1644 */
-#define TCPOPT_CCNEW 12
-#define TCPOPT_CCECHO 13
-#define TCPOLEN_CC 6
-#define TCPOLEN_CC_APPA (TCPOLEN_CC+2)
-#define TCPOPT_CC_HDR(ccopt) \
- (TCPOPT_NOP<<24|TCPOPT_NOP<<16|(ccopt)<<8|TCPOLEN_CC)
-
-/*
- * Default maximum segment size for TCP.
- * With an IP MSS of 576, this is 536,
- * but 512 is probably more convenient.
- * This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)).
- */
-#define TCP_MSS 512
-
-/*
- * Default maximum segment size for TCP6.
- * With an IP6 MSS of 1280, this is 1220,
- * but 1024 is probably more convenient. (xxx kazu in doubt)
- * This should be defined as MIN(1024, IP6_MSS - sizeof (struct tcpip6hdr))
- */
-#define TCP6_MSS 1024
-
-#define TCP_MAXWIN 65535 /* largest value for (unscaled) window */
-#define TTCP_CLIENT_SND_WND 4096 /* dflt send window for T/TCP client */
-
-#define TCP_MAX_WINSHIFT 14 /* maximum window shift */
-
-#define TCP_MAXHLEN (0xf<<2) /* max length of header in bytes */
-#define TCP_MAXOLEN (TCP_MAXHLEN - sizeof(struct tcphdr))
- /* max space left for options */
-
-/*
- * User-settable options (used with setsockopt).
- */
-#ifndef TCP_NODELAY
-#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */
-#define TCP_MAXSEG 0x02 /* set maximum segment size */
-#endif
-#define TCP_NOPUSH 0x04 /* don't push last block of write */
-#define TCP_NOOPT 0x08 /* don't use TCP options */
-
-#endif
diff --git a/winsup/cygwin/include/netinet/udp.h b/winsup/cygwin/include/netinet/udp.h
deleted file mode 100644
index 61932720b..000000000
--- a/winsup/cygwin/include/netinet/udp.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)udp.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/udp.h,v 1.7 1999/08/28 00:49:34 peter Exp $
- */
-
-#ifndef _NETINET_UDP_H
-#define _NETINET_UDP_H
-
-/*
- * Udp protocol header.
- * Per RFC 768, September, 1981.
- */
-struct udphdr {
- u_short uh_sport; /* source port */
- u_short uh_dport; /* destination port */
- u_short uh_ulen; /* udp length */
- u_short uh_sum; /* udp checksum */
-};
-
-#endif
diff --git a/winsup/cygwin/include/paths.h b/winsup/cygwin/include/paths.h
deleted file mode 100644
index 8934563d8..000000000
--- a/winsup/cygwin/include/paths.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* paths.h
-
- Copyright 2000, 2001, 2002, 2003, 2010, 2011 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _PATHS_H_
-#define _PATHS_H_
-
-#define _PATH_BSHELL "/bin/sh"
-#define _PATH_CSHELL "/bin/csh"
-#define _PATH_DEFPATH "/bin"
-#define _PATH_DEV "/dev/"
-#define _PATH_DEVNULL "/dev/null"
-#define _PATH_LASTLOG "/var/log/lastlog"
-#define _PATH_MAILDIR "/var/spool/mail/"
-#define _PATH_MAN "/usr/share/man"
-#define _PATH_MEM "/dev/mem"
-#define _PATH_MNTTAB "/etc/fstab"
-#define _PATH_MOUNTED "/etc/mtab"
-#define _PATH_SHELLS "/etc/shells"
-#define _PATH_STDPATH "/bin:/usr/sbin:/sbin"
-#define _PATH_TMP "/tmp/"
-#define _PATH_TTY "/dev/tty"
-#define _PATH_UTMP "/var/run/utmp"
-#define _PATH_VARRUN "/var/run/"
-#define _PATH_VARTMP "/var/tmp/"
-#define _PATH_VI "/bin/vi"
-#define _PATH_WTMP "/var/log/wtmp"
-
-#endif /* _PATHS_H_ */
diff --git a/winsup/cygwin/include/poll.h b/winsup/cygwin/include/poll.h
deleted file mode 100644
index a836b2af4..000000000
--- a/winsup/cygwin/include/poll.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* poll.h
-
- Copyright 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <sys/poll.h>
diff --git a/winsup/cygwin/include/process.h b/winsup/cygwin/include/process.h
deleted file mode 100644
index 0436102b5..000000000
--- a/winsup/cygwin/include/process.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* cygwin/process.h. Define spawn family of functions as provided by Cygwin.
- The original file of this name is a MS/DOS invention.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef __PROCESS_H_
-#define __PROCESS_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* For the exec functions, include unistd.h. */
-
-int spawnl(int mode, const char *path, const char *argv0, ...);
-int spawnle(int mode, const char *path, const char *argv0, ... /*, char * const *envp */);
-int spawnlp(int mode, const char *path, const char *argv0, ...);
-int spawnlpe(int mode, const char *path, const char *argv0, ... /*, char * const *envp */);
-
-int spawnv(int mode, const char *path, const char * const *argv);
-int spawnve(int mode, const char *path, const char * const *argv, const char * const *envp);
-int spawnvp(int mode, const char *path, const char * const *argv);
-int spawnvpe(int mode, const char *path, const char * const *argv, const char * const *envp);
-
-int cwait(int *, int, int);
-
-#define _P_WAIT 1
-#define _P_NOWAIT 2
-#define _P_OVERLAY 3
-#define _P_NOWAITO 4
-#define _P_DETACH 5
-
-#define WAIT_CHILD 1
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/winsup/cygwin/include/pthread.h b/winsup/cygwin/include/pthread.h
deleted file mode 100644
index 9ad8b6662..000000000
--- a/winsup/cygwin/include/pthread.h
+++ /dev/null
@@ -1,215 +0,0 @@
-/* pthread.h: POSIX pthread interface
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2011, 2012, 2013, 2014 Red Hat, Inc.
-
- Written by Marco Fuykschot <marco@ddi.nl>
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include <sys/types.h>
-#include <signal.h>
-#include <sched.h>
-#include <time.h>
-
-#ifndef _PTHREAD_H
-#define _PTHREAD_H
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-
-/* Defines. (These are correctly defined here as per
- http://www.opengroup.org/onlinepubs/7908799/xsh/pthread.h.html */
-
-#define PTHREAD_CANCEL_ASYNCHRONOUS 1
-/* defaults are enable, deferred */
-#define PTHREAD_CANCEL_ENABLE 0
-#define PTHREAD_CANCEL_DEFERRED 0
-#define PTHREAD_CANCEL_DISABLE 1
-#define PTHREAD_CANCELED ((void *)-1)
-/* this should be a value that can never be a valid address */
-#define PTHREAD_COND_INITIALIZER (pthread_cond_t)21
-#define PTHREAD_CREATE_DETACHED 1
-/* the default : joinable */
-#define PTHREAD_CREATE_JOINABLE 0
-#define PTHREAD_EXPLICIT_SCHED 1
-#define PTHREAD_INHERIT_SCHED 0
-#define PTHREAD_MUTEX_RECURSIVE 0
-#define PTHREAD_MUTEX_ERRORCHECK 1
-#define PTHREAD_MUTEX_NORMAL 2
-#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL
-/* this should be too low to ever be a valid address */
-#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP (pthread_mutex_t)18
-#define PTHREAD_NORMAL_MUTEX_INITIALIZER_NP (pthread_mutex_t)19
-#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP (pthread_mutex_t)20
-#define PTHREAD_MUTEX_INITIALIZER PTHREAD_NORMAL_MUTEX_INITIALIZER_NP
-#define PTHREAD_ONCE_INIT { PTHREAD_MUTEX_INITIALIZER, 0 }
-#if defined(_POSIX_THREAD_PRIO_INHERIT) && _POSIX_THREAD_PRIO_INHERIT >= 0
-#define PTHREAD_PRIO_NONE 0
-#define PTHREAD_PRIO_INHERIT 1
-#define PTHREAD_PRIO_PROTECT 2
-#endif
-#define PTHREAD_PROCESS_SHARED 1
-#define PTHREAD_PROCESS_PRIVATE 0
-#define PTHREAD_RWLOCK_INITIALIZER (pthread_rwlock_t)22
-/* process is the default */
-#define PTHREAD_SCOPE_PROCESS 0
-#define PTHREAD_SCOPE_SYSTEM 1
-
-/* Register Fork Handlers */
-int pthread_atfork (void (*)(void), void (*)(void), void (*)(void));
-
-/* Attributes */
-int pthread_attr_destroy (pthread_attr_t *);
-int pthread_attr_getdetachstate (const pthread_attr_t *, int *);
-int pthread_attr_getguardsize (const pthread_attr_t *, size_t *);
-int pthread_attr_getinheritsched (const pthread_attr_t *, int *);
-int pthread_attr_getschedparam (const pthread_attr_t *, struct sched_param *);
-int pthread_attr_getschedpolicy (const pthread_attr_t *, int *);
-int pthread_attr_getscope (const pthread_attr_t *, int *);
-int pthread_attr_getstack (const pthread_attr_t *, void **, size_t *);
-int pthread_attr_getstackaddr (const pthread_attr_t *, void **)
- __attribute__ ((__deprecated__));
-int pthread_attr_init (pthread_attr_t *);
-int pthread_attr_setdetachstate (pthread_attr_t *, int);
-int pthread_attr_setguardsize (pthread_attr_t *, size_t);
-int pthread_attr_setinheritsched (pthread_attr_t *, int);
-int pthread_attr_setschedparam (pthread_attr_t *, const struct sched_param *);
-int pthread_attr_setschedpolicy (pthread_attr_t *, int);
-int pthread_attr_setscope (pthread_attr_t *, int);
-
-#ifdef _POSIX_THREAD_ATTR_STACKADDR
-int pthread_attr_setstack (pthread_attr_t *, void *, size_t);
-int pthread_attr_setstackaddr (pthread_attr_t *, void *)
- __attribute__ ((__deprecated__));
-#endif
-
-#ifdef _POSIX_THREAD_ATTR_STACKSIZE
-int pthread_attr_getstacksize (const pthread_attr_t *, size_t *);
-int pthread_attr_setstacksize (pthread_attr_t *, size_t);
-#endif
-
-int pthread_cancel (pthread_t);
-/* Macros for cleanup_push and pop;
- * The function definitions are
-void pthread_cleanup_push (void (*routine)(void*), void *arg);
-void pthread_cleanup_pop (int execute);
-*/
-typedef void (*__cleanup_routine_type) (void *);
-typedef struct _pthread_cleanup_handler
-{
- __cleanup_routine_type function;
- void *arg;
- struct _pthread_cleanup_handler *next;
-} __pthread_cleanup_handler;
-
-void _pthread_cleanup_push (__pthread_cleanup_handler *handler);
-void _pthread_cleanup_pop (int execute);
-
-#define pthread_cleanup_push(_fn, _arg) { __pthread_cleanup_handler __cleanup_handler = \
- { _fn, _arg, NULL }; \
- _pthread_cleanup_push( &__cleanup_handler );
-#define pthread_cleanup_pop(_execute) _pthread_cleanup_pop( _execute ); }
-
-/* Condition variables */
-int pthread_cond_broadcast (pthread_cond_t *);
-int pthread_cond_destroy (pthread_cond_t *);
-int pthread_cond_init (pthread_cond_t *, const pthread_condattr_t *);
-int pthread_cond_signal (pthread_cond_t *);
-int pthread_cond_timedwait (pthread_cond_t *,
- pthread_mutex_t *, const struct timespec *);
-int pthread_cond_wait (pthread_cond_t *, pthread_mutex_t *);
-int pthread_condattr_destroy (pthread_condattr_t *);
-int pthread_condattr_getclock (const pthread_condattr_t *, clockid_t *);
-int pthread_condattr_getpshared (const pthread_condattr_t *, int *);
-int pthread_condattr_init (pthread_condattr_t *);
-int pthread_condattr_setclock (pthread_condattr_t *, clockid_t);
-int pthread_condattr_setpshared (pthread_condattr_t *, int);
-
-int pthread_create (pthread_t *, const pthread_attr_t *,
- void *(*)(void *), void *);
-int pthread_detach (pthread_t);
-int pthread_equal (pthread_t, pthread_t);
-void pthread_exit (void *) __attribute__ ((__noreturn__));
-int pthread_getcpuclockid (pthread_t, clockid_t *);
-int pthread_getschedparam (pthread_t, int *, struct sched_param *);
-void *pthread_getspecific (pthread_key_t);
-int pthread_join (pthread_t, void **);
-int pthread_key_create (pthread_key_t *, void (*)(void *));
-int pthread_key_delete (pthread_key_t);
-
-/* Mutex's */
-int pthread_mutex_destroy (pthread_mutex_t *);
-int pthread_mutex_getprioceiling (const pthread_mutex_t *, int *);
-int pthread_mutex_init (pthread_mutex_t *, const pthread_mutexattr_t *);
-int pthread_mutex_lock (pthread_mutex_t *);
-int pthread_mutex_setprioceiling (pthread_mutex_t *, int, int *);
-int pthread_mutex_trylock (pthread_mutex_t *);
-int pthread_mutex_unlock (pthread_mutex_t *);
-int pthread_mutexattr_destroy (pthread_mutexattr_t *);
-int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *, int *);
-int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *, int *);
-int pthread_mutexattr_getpshared (const pthread_mutexattr_t *, int *);
-int pthread_mutexattr_gettype (const pthread_mutexattr_t *, int *);
-int pthread_mutexattr_init (pthread_mutexattr_t *);
-int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *, int);
-int pthread_mutexattr_setprotocol (pthread_mutexattr_t *, int);
-int pthread_mutexattr_setpshared (pthread_mutexattr_t *, int);
-int pthread_mutexattr_settype (pthread_mutexattr_t *, int);
-
-/* Spinlocks */
-int pthread_spin_destroy (pthread_spinlock_t *);
-int pthread_spin_init (pthread_spinlock_t *, int);
-int pthread_spin_lock (pthread_spinlock_t *);
-int pthread_spin_trylock (pthread_spinlock_t *);
-int pthread_spin_unlock (pthread_spinlock_t *);
-
-/* RW Locks */
-int pthread_rwlock_destroy (pthread_rwlock_t *rwlock);
-int pthread_rwlock_init (pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr);
-int pthread_rwlock_rdlock (pthread_rwlock_t *rwlock);
-int pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock);
-int pthread_rwlock_wrlock (pthread_rwlock_t *rwlock);
-int pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock);
-int pthread_rwlock_unlock (pthread_rwlock_t *rwlock);
-int pthread_rwlockattr_init (pthread_rwlockattr_t *rwlockattr);
-int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *attr,
- int *pshared);
-int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *attr, int pshared);
-int pthread_rwlockattr_destroy (pthread_rwlockattr_t *rwlockattr);
-
-int pthread_once (pthread_once_t *, void (*)(void));
-
-/* Concurrency levels - X/Open interface */
-int pthread_getconcurrency (void);
-int pthread_setconcurrency (int);
-
-
-pthread_t pthread_self (void);
-int pthread_setcancelstate (int, int *);
-int pthread_setcanceltype (int, int *);
-int pthread_setschedparam (pthread_t, int, const struct sched_param *);
-int pthread_setschedprio (pthread_t, int);
-int pthread_setspecific (pthread_key_t, const void *);
-void pthread_testcancel (void);
-
-/* Non posix calls */
-
-int pthread_getattr_np (pthread_t, pthread_attr_t *);
-int pthread_sigqueue (pthread_t *, int, const union sigval);
-int pthread_suspend (pthread_t);
-int pthread_continue (pthread_t);
-int pthread_yield (void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _PTHREAD_H */
diff --git a/winsup/cygwin/include/pty.h b/winsup/cygwin/include/pty.h
deleted file mode 100644
index 7b92a2b4d..000000000
--- a/winsup/cygwin/include/pty.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __PTY_H__
-#define __PTY_H__
-
-#include <_ansi.h>
-#include <sys/termios.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int _EXFUN(openpty ,(int *, int *, char *, const struct termios *,
- const struct winsize *));
-int _EXFUN(forkpty ,(int *, char *, const struct termios *,
- const struct winsize *));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __PTY_H__ */
diff --git a/winsup/cygwin/include/regex.h b/winsup/cygwin/include/regex.h
deleted file mode 100644
index 02c617e50..000000000
--- a/winsup/cygwin/include/regex.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*-
- * Copyright (c) 1992 Henry Spencer.
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer of the University of Toronto.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regex.h 8.2 (Berkeley) 1/3/94
- * $FreeBSD$
- */
-
-#ifndef _REGEX_H_
-#define _REGEX_H_
-
-#include <sys/cdefs.h>
-#include <_ansi.h>
-#include <sys/_types.h>
-
-/* types */
-#ifdef __CYGWIN__
-typedef _off_t regoff_t;
-
-#define __need_size_t
-#include <stddef.h>
-#else /* !__CYGWIN__ */
-typedef __off_t regoff_t;
-
-#ifndef _SIZE_T_DECLARED
-typedef __size_t size_t;
-#define _SIZE_T_DECLARED
-#endif
-#endif /* !__CYGWIN__ */
-
-typedef struct {
- int re_magic;
- size_t re_nsub; /* number of parenthesized subexpressions */
-#ifdef __CYGWIN__
- const char *re_endp; /* end pointer for REG_PEND */
-#else
- __const char *re_endp; /* end pointer for REG_PEND */
-#endif
- struct re_guts *re_g; /* none of your business :-) */
-} regex_t;
-
-typedef struct {
- regoff_t rm_so; /* start of match */
- regoff_t rm_eo; /* end of match */
-} regmatch_t;
-
-/* regcomp() flags */
-#define REG_BASIC 0000
-#define REG_EXTENDED 0001
-#define REG_ICASE 0002
-#define REG_NOSUB 0004
-#define REG_NEWLINE 0010
-#define REG_NOSPEC 0020
-#define REG_PEND 0040
-#define REG_DUMP 0200
-
-/* regerror() flags */
-#define REG_ENOSYS (-1)
-#ifdef __CYGWIN__
-#define REG_NOERROR 0 /* GNU extension */
-#endif
-#define REG_NOMATCH 1
-#define REG_BADPAT 2
-#define REG_ECOLLATE 3
-#define REG_ECTYPE 4
-#define REG_EESCAPE 5
-#define REG_ESUBREG 6
-#define REG_EBRACK 7
-#define REG_EPAREN 8
-#define REG_EBRACE 9
-#define REG_BADBR 10
-#define REG_ERANGE 11
-#define REG_ESPACE 12
-#define REG_BADRPT 13
-#define REG_EMPTY 14
-#define REG_ASSERT 15
-#define REG_INVARG 16
-#define REG_ILLSEQ 17
-#define REG_ATOI 255 /* convert name to number (!) */
-#define REG_ITOA 0400 /* convert number to name (!) */
-
-/* regexec() flags */
-#define REG_NOTBOL 00001
-#define REG_NOTEOL 00002
-#define REG_STARTEND 00004
-#define REG_TRACE 00400 /* tracing of execution */
-#define REG_LARGE 01000 /* force large representation */
-#define REG_BACKR 02000 /* force use of backref code */
-
-__BEGIN_DECLS
-int regcomp(regex_t * __restrict, const char * __restrict, int);
-size_t regerror(int, const regex_t * __restrict, char * __restrict, size_t);
-/*
- * XXX forth parameter should be `regmatch_t [__restrict]', but isn't because
- * of a bug in GCC 3.2 (when -std=c99 is specified) which perceives this as a
- * syntax error.
- */
-int regexec(const regex_t * __restrict, const char * __restrict, size_t,
- regmatch_t * __restrict, int);
-void regfree(regex_t *);
-__END_DECLS
-
-#endif /* !_REGEX_H_ */
diff --git a/winsup/cygwin/include/resolv.h b/winsup/cygwin/include/resolv.h
deleted file mode 100755
index 6cafcaaca..000000000
--- a/winsup/cygwin/include/resolv.h
+++ /dev/null
@@ -1,461 +0,0 @@
-/*
- * Copyright (c) 1983, 1987, 1989
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * @(#)resolv.h 8.1 (Berkeley) 6/2/93
- * $Id$
- */
-
-#ifndef _RESOLV_H_
-#define _RESOLV_H_
-
-#include <sys/param.h>
-#if !defined(__CYGWIN__) && ((!defined(BSD)) || (BSD < 199306))
-# include <sys/bitypes.h>
-#else
-# include <sys/types.h>
-#endif
-#include <sys/cdefs.h>
-#include <sys/socket.h>
-#include <stdio.h>
-#include <arpa/nameser.h>
-#include <netinet/in.h>
-
-/*
- * Revision information. This is the release date in YYYYMMDD format.
- * It can change every day so the right thing to do with it is use it
- * in preprocessor commands such as "#if (__RES > 19931104)". Do not
- * compare for equality; rather, use it to determine whether your resolver
- * is new enough to contain a certain feature.
- */
-
-#define __RES 19991006
-
-/*
- * This used to be defined in res_query.c, now it's in herror.c.
- * [XXX no it's not. It's in irs/irs_data.c]
- * It was
- * never extern'd by any *.h file before it was placed here. For thread
- * aware programs, the last h_errno value set is stored in res->h_errno.
- *
- * XXX: There doesn't seem to be a good reason for exposing RES_SET_H_ERRNO
- * (and __h_errno_set) to the public via <resolv.h>.
- * XXX: __h_errno_set is really part of IRS, not part of the resolver.
- * If somebody wants to build and use a resolver that doesn't use IRS,
- * what do they do? Perhaps something like
- * #ifdef WANT_IRS
- * # define RES_SET_H_ERRNO(r,x) __h_errno_set(r,x)
- * #else
- * # define RES_SET_H_ERRNO(r,x) (h_errno = (r)->res_h_errno = (x))
- * #endif
- */
-
-#define RES_SET_H_ERRNO(r,x) __h_errno_set(r,x)
-struct __res_state; /* forward */
-__BEGIN_DECLS
-void __h_errno_set(struct __res_state *res, int err);
-__END_DECLS
-
-/*
- * Resolver configuration file.
- * Normally not present, but may contain the address of the
- * inital name server(s) to query and the domain search list.
- */
-
-#ifndef _PATH_RESCONF
-#define _PATH_RESCONF "/etc/resolv.conf"
-#endif
-
-typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
- res_sendhookact;
-
-typedef res_sendhookact (*res_send_qhook)__P((struct sockaddr * const *ns,
- const u_char **query,
- int *querylen,
- u_char *ans,
- int anssiz,
- int *resplen));
-
-typedef res_sendhookact (*res_send_rhook)__P((const struct sockaddr *ns,
- const u_char *query,
- int querylen,
- u_char *ans,
- int anssiz,
- int *resplen));
-
-struct res_sym {
- int number; /* Identifying number, like T_MX */
- const char * name; /* Its symbolic name, like "MX" */
- const char * humanname; /* Its fun name, like "mail exchanger" */
-};
-
-/*
- * Global defines and variables for resolver stub.
- */
-#define MAXNS 3 /* max # name servers we'll track */
-#define MAXDFLSRCH 3 /* # default domain levels to try */
-#define MAXDNSRCH 6 /* max # domains in search path */
-#define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */
-
-#define RES_TIMEOUT 5 /* min. seconds between retries */
-#define MAXRESOLVSORT 10 /* number of net to sort on */
-#define RES_MAXNDOTS 15 /* should reflect bit field size */
-#define RES_MAXRETRANS 30 /* only for resolv.conf/RES_OPTIONS */
-#define RES_MAXRETRY 5 /* only for resolv.conf/RES_OPTIONS */
-#define RES_DFLRETRY 2 /* Default #/tries. */
-#define RES_MAXTIME 65535 /* Infinity, in milliseconds. */
-
-struct __res_state_ext;
-
-struct __res_state {
- int retrans; /* retransmition time interval */
- int retry; /* number of times to retransmit */
- u_long options; /* option flags - see below. */
- int nscount; /* number of name servers */
- struct sockaddr_in
- nsaddr_list[MAXNS]; /* address of name server */
-#define nsaddr nsaddr_list[0] /* for backward compatibility */
- u_short id; /* current message id */
- char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
- char defdname[256]; /* default domain (deprecated) */
- u_long pfcode; /* RES_PRF_ flags - see below. */
- unsigned ndots:4; /* threshold for initial abs. query */
- unsigned nsort:4; /* number of elements in sort_list[] */
- char unused[3];
- struct {
- struct in_addr addr;
- u_int32_t mask;
- } sort_list[MAXRESOLVSORT];
- res_send_qhook qhook; /* query hook */
- res_send_rhook rhook; /* response hook */
- int res_h_errno; /* last one set for this context */
- int _vcsock; /* PRIVATE: for res_send VC i/o */
- u_int _flags; /* PRIVATE: see below */
- union {
- /* On an 32-bit arch this means 512b total. */
- char pad[72 - 3*sizeof (int) - 2*sizeof (void *)];
- struct {
- u_int16_t nscount;
- u_int16_t nstimes[MAXNS]; /* ms. */
- int nssocks[MAXNS];
- struct __res_state_ext *ext; /* extention for IPv6 */
- } _ext;
- } _u;
-};
-
-typedef struct __res_state *res_state;
-
-union res_sockaddr_union {
- struct sockaddr_in sin;
-#ifdef IN6ADDR_ANY_INIT
- struct sockaddr_in6 sin6;
-#endif
-#ifdef ISC_ALIGN64
- int64_t __align; /* 64bit alignment */
-#else
- int32_t __align; /* 32bit alignment */
-#endif
- char __space[128]; /* max size */
-};
-
-/*
- * Resolver flags (used to be discrete per-module statics ints).
- */
-#define RES_F_VC 0x00000001 /* socket is TCP */
-#define RES_F_CONN 0x00000002 /* socket is connected */
-#define RES_F_EDNS0ERR 0x00000004 /* EDNS0 caused errors */
-
-/* res_findzonecut() options */
-#define RES_EXHAUSTIVE 0x00000001 /* always do all queries */
-
-/*
- * Resolver options (keep these in synch with res_debug.c, please)
- */
-#define RES_INIT 0x00000001 /* address initialized */
-#define RES_DEBUG 0x00000002 /* print debug messages */
-#define RES_AAONLY 0x00000004 /* authoritative answers only (!IMPL)*/
-#define RES_USEVC 0x00000008 /* use virtual circuit */
-#define RES_PRIMARY 0x00000010 /* query primary server only (!IMPL) */
-#define RES_IGNTC 0x00000020 /* ignore trucation errors */
-#define RES_RECURSE 0x00000040 /* recursion desired */
-#define RES_DEFNAMES 0x00000080 /* use default domain name */
-#define RES_STAYOPEN 0x00000100 /* Keep TCP socket open */
-#define RES_DNSRCH 0x00000200 /* search up local domain tree */
-#define RES_INSECURE1 0x00000400 /* type 1 security disabled */
-#define RES_INSECURE2 0x00000800 /* type 2 security disabled */
-#define RES_NOALIASES 0x00001000 /* shuts off HOSTALIASES feature */
-#define RES_USE_INET6 0x00002000 /* use/map IPv6 in gethostbyname() */
-#define RES_ROTATE 0x00004000 /* rotate ns list after each query */
-#define RES_NOCHECKNAME 0x00008000 /* do not check names for sanity. */
-#define RES_KEEPTSIG 0x00010000 /* do not strip TSIG records */
-#define RES_BLAST 0x00020000 /* blast all recursive servers */
-#define RES_NO_NIBBLE 0x00040000 /* disable IPv6 nibble mode reverse */
-#define RES_NO_BITSTRING 0x00080000 /* disable IPv6 bit string mode reverse */
-/* KAME extensions: use higher bit to avoid conflict with ISC use */
-#define RES_USE_DNAME 0x10000000 /* use DNAME */
-#define RES_USE_A6 0x20000000 /* use A6 */
-#define RES_USE_EDNS0 0x40000000 /* use EDNS0 if configured */
-
-#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
-
-/*
- * Resolver "pfcode" values. Used by dig.
- */
-#define RES_PRF_STATS 0x00000001
-#define RES_PRF_UPDATE 0x00000002
-#define RES_PRF_CLASS 0x00000004
-#define RES_PRF_CMD 0x00000008
-#define RES_PRF_QUES 0x00000010
-#define RES_PRF_ANS 0x00000020
-#define RES_PRF_AUTH 0x00000040
-#define RES_PRF_ADD 0x00000080
-#define RES_PRF_HEAD1 0x00000100
-#define RES_PRF_HEAD2 0x00000200
-#define RES_PRF_TTLID 0x00000400
-#define RES_PRF_HEADX 0x00000800
-#define RES_PRF_QUERY 0x00001000
-#define RES_PRF_REPLY 0x00002000
-#define RES_PRF_INIT 0x00004000
-/* 0x00008000 */
-
-/* Things involving an internal (static) resolver context. */
-#if defined(_REENTRANT) || defined(__CYGWIN__)
-__BEGIN_DECLS
-extern struct __res_state *__res_state(void);
-__END_DECLS
-#define _res (*__res_state())
-#else
-#ifndef __BIND_NOSTATIC
-extern struct __res_state _res;
-#endif
-#endif
-
-#ifndef __BIND_NOSTATIC
-#define fp_nquery __fp_nquery
-#define fp_query __fp_query
-#define hostalias __hostalias
-#define p_query __p_query
-#define res_close __res_close
-#define res_init __res_init
-#define res_isourserver __res_isourserver
-#define res_mkquery __res_mkquery
-#define res_query __res_query
-#define res_querydomain __res_querydomain
-#define res_search __res_search
-#define res_send __res_send
-#define res_sendsigned __res_sendsigned
-
-__BEGIN_DECLS
-void fp_nquery __P((const u_char *, int, FILE *));
-void fp_query __P((const u_char *, FILE *));
-const char * hostalias __P((const char *));
-void p_query __P((const u_char *));
-void res_close __P((void));
-int res_init __P((void));
-int res_isourserver __P((const struct sockaddr_in *));
-int res_mkquery __P((int, const char *, int, int, const u_char *,
- int, const u_char *, u_char *, int));
-int res_query __P((const char *, int, int, u_char *, int));
-int res_querydomain __P((const char *, const char *, int, int,
- u_char *, int));
-int res_search __P((const char *, int, int, u_char *, int));
-int res_send __P((const u_char *, int, u_char *, int));
-int res_sendsigned __P((const u_char *, int, ns_tsig_key *,
- u_char *, int));
-__END_DECLS
-#endif
-
-#if !defined(SHARED_LIBBIND) || defined(LIB)
-/*
- * If libbind is a shared object (well, DLL anyway)
- * these externs break the linker when resolv.h is
- * included by a lib client (like named)
- * Make them go away if a client is including this
- *
- */
-extern const struct res_sym __p_key_syms[];
-extern const struct res_sym __p_cert_syms[];
-extern const struct res_sym __p_class_syms[];
-extern const struct res_sym __p_type_syms[];
-extern const struct res_sym __p_rcode_syms[];
-#endif /* SHARED_LIBBIND */
-
-#define b64_ntop __b64_ntop
-#define b64_pton __b64_pton
-#define dn_comp __dn_comp
-#define dn_count_labels __dn_count_labels
-#define dn_expand __dn_expand
-#define dn_skipname __dn_skipname
-#define fp_resstat __fp_resstat
-#define loc_aton __loc_aton
-#define loc_ntoa __loc_ntoa
-#define p_cdname __p_cdname
-#define p_cdnname __p_cdnname
-#define p_class __p_class
-#define p_fqname __p_fqname
-#define p_fqnname __p_fqnname
-#define p_option __p_option
-#define p_secstodate __p_secstodate
-#define p_section __p_section
-#define p_time __p_time
-#define p_type __p_type
-#define p_rcode __p_rcode
-#define putlong __putlong
-#define putshort __putshort
-#define res_dnok __res_dnok
-#define res_findzonecut __res_findzonecut
-#define res_hnok __res_hnok
-#define res_hostalias __res_hostalias
-#define res_mailok __res_mailok
-#define res_nameinquery __res_nameinquery
-#define res_nclose __res_nclose
-#define res_ninit __res_ninit
-#define res_nmkquery __res_nmkquery
-#define res_pquery __res_pquery
-#define res_nquery __res_nquery
-#define res_nquerydomain __res_nquerydomain
-#define res_nsearch __res_nsearch
-#define res_nsend __res_nsend
-#define res_nsendsigned __res_nsendsigned
-#define res_nisourserver __res_nisourserver
-#define res_ownok __res_ownok
-#define res_queriesmatch __res_queriesmatch
-#define res_randomid __res_randomid
-#define sym_ntop __sym_ntop
-#define sym_ntos __sym_ntos
-#define sym_ston __sym_ston
-#define res_nopt __res_nopt
-#define res_ndestroy __res_ndestroy
-#define res_nametoclass __res_nametoclass
-#define res_nametotype __res_nametotype
-#define res_setservers __res_setservers
-#define res_getservers __res_getservers
-__BEGIN_DECLS
-int res_hnok __P((const char *));
-int res_ownok __P((const char *));
-int res_mailok __P((const char *));
-int res_dnok __P((const char *));
-int sym_ston __P((const struct res_sym *, const char *, int *));
-const char * sym_ntos __P((const struct res_sym *, int, int *));
-const char * sym_ntop __P((const struct res_sym *, int, int *));
-int b64_ntop __P((u_char const *, size_t, char *, size_t));
-int b64_pton __P((char const *, u_char *, size_t));
-int loc_aton __P((const char *ascii, u_char *binary));
-const char * loc_ntoa __P((const u_char *binary, char *ascii));
-int dn_skipname __P((const u_char *, const u_char *));
-void putlong __P((u_int32_t, u_char *));
-void putshort __P((u_int16_t, u_char *));
-const char * p_class __P((int));
-const char * p_time __P((u_int32_t));
-const char * p_type __P((int));
-const char * p_rcode __P((int));
-const u_char * p_cdnname __P((const u_char *, const u_char *, int, FILE *));
-const u_char * p_cdname __P((const u_char *, const u_char *, FILE *));
-const u_char * p_fqnname __P((const u_char *cp, const u_char *msg,
- int, char *, int));
-const u_char * p_fqname __P((const u_char *, const u_char *, FILE *));
-const char * p_option __P((u_long option));
-char * p_secstodate __P((u_long));
-int dn_count_labels __P((const char *));
-int dn_comp __P((const char *, u_char *, int,
- u_char **, u_char **));
-int dn_expand __P((const u_char *, const u_char *, const u_char *,
- char *, int));
-u_int res_randomid __P((void));
-int res_nameinquery __P((const char *, int, int,
- const u_char *, const u_char *));
-int res_queriesmatch __P((const u_char *, const u_char *,
- const u_char *, const u_char *));
-const char * p_section __P((int section, int opcode));
-/* Things involving a resolver context. */
-int res_ninit __P((res_state));
-int res_nisourserver __P((const res_state,
- const struct sockaddr_in *));
-void fp_resstat __P((const res_state, FILE *));
-void res_pquery __P((const res_state, const u_char *, int, FILE *));
-const char * res_hostalias __P((const res_state, const char *,
- char *, size_t));
-int res_nquery __P((res_state,
- const char *, int, int, u_char *, int));
-int res_nsearch __P((res_state, const char *, int,
- int, u_char *, int));
-int res_nquerydomain __P((res_state,
- const char *, const char *, int, int,
- u_char *, int));
-int res_nmkquery __P((res_state,
- int, const char *, int, int, const u_char *,
- int, const u_char *, u_char *, int));
-int res_nsend __P((res_state, const u_char *, int, u_char *, int));
-int res_nsendsigned __P((res_state, const u_char *, int,
- ns_tsig_key *, u_char *, int));
-int res_findzonecut __P((res_state, const char *, ns_class, int,
- char *, size_t, struct in_addr *, int));
-void res_nclose __P((res_state));
-int res_nopt __P((res_state, int, u_char *, int, int));
-void res_send_setqhook __P((res_send_qhook hook));
-void res_send_setrhook __P((res_send_rhook hook));
-int __res_vinit __P((res_state, int));
-void res_destroyservicelist __P((void));
-const char * res_servicename __P((u_int16_t port, const char *proto));
-const char * res_protocolname __P((int num));
-void res_destroyprotolist __P((void));
-void res_buildprotolist __P((void));
-const char * res_get_nibblesuffix __P((res_state));
-const char * res_get_bitstringsuffix __P((res_state));
-void res_ndestroy __P((res_state));
-u_int16_t res_nametoclass __P((const char *buf, int *success));
-u_int16_t res_nametotype __P((const char *buf, int *success));
-void res_setservers __P((res_state,
- const union res_sockaddr_union *, int));
-int res_getservers __P((res_state,
- union res_sockaddr_union *, int));
-__END_DECLS
-
-#endif /* !_RESOLV_H_ */
diff --git a/winsup/cygwin/include/search.h b/winsup/cygwin/include/search.h
deleted file mode 100644
index f532eae55..000000000
--- a/winsup/cygwin/include/search.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*-
- * Written by J.T. Conklin <jtc@netbsd.org>
- * Public domain.
- *
- * $NetBSD: search.h,v 1.12 1999/02/22 10:34:28 christos Exp $
- * $FreeBSD: src/include/search.h,v 1.10 2002/10/16 14:29:23 robert Exp $
- */
-
-#ifndef _SEARCH_H_
-#define _SEARCH_H_
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-typedef struct entry
-{
- char *key;
- void *data;
-} ENTRY;
-
-typedef enum
-{
- FIND, ENTER
-} ACTION;
-
-typedef enum
-{
- preorder,
- postorder,
- endorder,
- leaf
-} VISIT;
-
-#ifdef _SEARCH_PRIVATE
-typedef struct node
-{
- char *key;
- struct node *llink, *rlink;
-} node_t;
-#endif
-
-struct hsearch_data
-{
- struct internal_head *htable;
- size_t htablesize;
-};
-
-struct qelem
-{
- struct qelem *q_forw;
- struct qelem *q_back;
-};
-
-__BEGIN_DECLS
-int hcreate (size_t);
-void hdestroy (void);
-ENTRY *hsearch (ENTRY, ACTION);
-int hcreate_r (size_t, struct hsearch_data *);
-void hdestroy_r (struct hsearch_data *);
-int hsearch_r (ENTRY, ACTION, ENTRY **, struct hsearch_data *);
-void *tdelete (const void * __restrict, void ** __restrict,
- int (*) (const void *, const void *));
-void tdestroy (void *, void (*)(void *));
-void *tfind (const void *, void **,
- int (*) (const void *, const void *));
-void *tsearch (const void *, void **, int (*) (const void *, const void *));
-void twalk (const void *, void (*) (const void *, VISIT, int));
-void *lfind (const void *, const void *, size_t *, size_t,
- int (*) (const void *, const void *));
-void *lsearch (const void *, void *, size_t *, size_t,
- int (*) (const void *, const void *));
-void insque (void *, void *);
-void remque (void *);
-__END_DECLS
-
-#endif /* !_SEARCH_H_ */
diff --git a/winsup/cygwin/include/semaphore.h b/winsup/cygwin/include/semaphore.h
deleted file mode 100644
index b16d13751..000000000
--- a/winsup/cygwin/include/semaphore.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* semaphore.h: POSIX semaphore interface
-
- Copyright 2001, 2003, 2007 Red Hat, Inc.
-
- Written by Robert Collins <rbtcollins@hotmail.com>
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include <sys/types.h>
-
-#ifndef _SEMAPHORE_H
-#define _SEMAPHORE_H
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#ifndef __INSIDE_CYGWIN__
- typedef struct __sem_t {char __dummy;} *sem_t;
-#endif
-
-#define SEM_FAILED ((sem_t *) 0)
-
-/* Semaphores */
- int sem_init (sem_t *sem, int pshared, unsigned int value);
- int sem_destroy (sem_t *sem);
- sem_t *sem_open (const char *name, int oflag, ...);
- int sem_close (sem_t *sem);
- int sem_unlink (const char *name);
- int sem_wait (sem_t *sem);
- int sem_trywait (sem_t *sem);
- int sem_timedwait (sem_t *sem, const struct timespec *abstime);
- int sem_post (sem_t *sem);
- int sem_getvalue (sem_t *sem, int *sval);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SEMAPHORE_H */
diff --git a/winsup/cygwin/include/stdint.h b/winsup/cygwin/include/stdint.h
deleted file mode 100644
index b670884a7..000000000
--- a/winsup/cygwin/include/stdint.h
+++ /dev/null
@@ -1,290 +0,0 @@
-/* stdint.h - integer types
-
- Copyright 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _STDINT_H
-#define _STDINT_H
-
-#include <bits/wordsize.h>
-
-/* Exact-width integer types */
-
-#ifndef __int8_t_defined
-#define __int8_t_defined
-typedef signed char int8_t;
-typedef short int16_t;
-typedef int int32_t;
-#if __WORDSIZE == 64
-typedef long int64_t;
-#else
-typedef long long int64_t;
-#endif
-#endif
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-#ifndef __uint32_t_defined
-#define __uint32_t_defined
-typedef unsigned int uint32_t;
-#endif
-#if __WORDSIZE == 64
-typedef unsigned long uint64_t;
-#else
-typedef unsigned long long uint64_t;
-#endif
-
-/* Minimum-width integer types */
-
-typedef signed char int_least8_t;
-typedef short int_least16_t;
-typedef int int_least32_t;
-#if __WORDSIZE == 64
-typedef long int_least64_t;
-#else
-typedef long long int_least64_t;
-#endif
-
-typedef unsigned char uint_least8_t;
-typedef unsigned short uint_least16_t;
-typedef unsigned int uint_least32_t;
-#if __WORDSIZE == 64
-typedef unsigned long uint_least64_t;
-#else
-typedef unsigned long long uint_least64_t;
-#endif
-
-/* Fastest minimum-width integer types */
-
-typedef signed char int_fast8_t;
-#if __WORDSIZE == 64
-typedef long int_fast16_t;
-typedef long int_fast32_t;
-typedef long int_fast64_t;
-#else
-typedef int int_fast16_t;
-typedef int int_fast32_t;
-typedef long long int_fast64_t;
-#endif
-
-typedef unsigned char uint_fast8_t;
-#if __WORDSIZE == 64
-typedef unsigned long uint_fast16_t;
-typedef unsigned long uint_fast32_t;
-typedef unsigned long uint_fast64_t;
-#else
-typedef unsigned int uint_fast16_t;
-typedef unsigned int uint_fast32_t;
-typedef unsigned long long uint_fast64_t;
-#endif
-
-/* Integer types capable of holding object pointers */
-
-#ifndef __intptr_t_defined
-#define __intptr_t_defined
-#if __WORDSIZE == 64
-typedef long intptr_t;
-#else
-typedef int intptr_t;
-#endif
-#endif
-#if __WORDSIZE == 64
-typedef unsigned long uintptr_t;
-#else
-typedef unsigned int uintptr_t;
-#endif
-
-/* Greatest-width integer types */
-
-#if __WORDSIZE == 64
-typedef long intmax_t;
-typedef unsigned long uintmax_t;
-#else
-typedef long long intmax_t;
-typedef unsigned long long uintmax_t;
-#endif
-
-/* C99 requires that in C++ the following macros should be defined only
- if requested. */
-#if !defined (__cplusplus) || defined (__STDC_LIMIT_MACROS) \
- || defined (__INSIDE_CYGWIN__)
-
-#if __x86_64__
-# define __I64(n) n ## L
-# define __U64(n) n ## UL
-#else
-# define __I64(n) n ## LL
-# define __U64(n) n ## ULL
-#endif
-
-/* Limits of exact-width integer types */
-
-#define INT8_MIN (-128)
-#define INT16_MIN (-32768)
-#define INT32_MIN (-2147483647 - 1)
-#define INT64_MIN (-__I64(9223372036854775807) - 1)
-
-#define INT8_MAX (127)
-#define INT16_MAX (32767)
-#define INT32_MAX (2147483647)
-#define INT64_MAX (__I64(9223372036854775807))
-
-#define UINT8_MAX (255)
-#define UINT16_MAX (65535)
-#define UINT32_MAX (4294967295U)
-#define UINT64_MAX (__U64(18446744073709551615))
-
-/* Limits of minimum-width integer types */
-
-#define INT_LEAST8_MIN (-128)
-#define INT_LEAST16_MIN (-32768)
-#define INT_LEAST32_MIN (-2147483647 - 1)
-#define INT_LEAST64_MIN (-__I64(9223372036854775807) - 1)
-
-#define INT_LEAST8_MAX (127)
-#define INT_LEAST16_MAX (32767)
-#define INT_LEAST32_MAX (2147483647)
-#define INT_LEAST64_MAX (__I64(9223372036854775807))
-
-#define UINT_LEAST8_MAX (255)
-#define UINT_LEAST16_MAX (65535)
-#define UINT_LEAST32_MAX (4294967295U)
-#define UINT_LEAST64_MAX (__U64(18446744073709551615))
-
-/* Limits of fastest minimum-width integer types */
-
-#define INT_FAST8_MIN (-128)
-#if __WORDSIZE == 64
-#define INT_FAST16_MIN (-__I64(9223372036854775807) - 1)
-#define INT_FAST32_MIN (-__I64(9223372036854775807) - 1)
-#else
-#define INT_FAST16_MIN (-2147483647 - 1)
-#define INT_FAST32_MIN (-2147483647 - 1)
-#endif
-#define INT_FAST64_MIN (-__I64(9223372036854775807) - 1)
-
-#define INT_FAST8_MAX (127)
-#if __WORDSIZE == 64
-#define INT_FAST16_MAX (__I64(9223372036854775807))
-#define INT_FAST32_MAX (__I64(9223372036854775807))
-#else
-#define INT_FAST16_MAX (2147483647)
-#define INT_FAST32_MAX (2147483647)
-#endif
-#define INT_FAST64_MAX (__I64(9223372036854775807))
-
-#define UINT_FAST8_MAX (255)
-#if __WORDSIZE == 64
-#define UINT_FAST16_MAX (__U64(18446744073709551615))
-#define UINT_FAST32_MAX (__U64(18446744073709551615))
-#else
-#define UINT_FAST16_MAX (4294967295U)
-#define UINT_FAST32_MAX (4294967295U)
-#endif
-#define UINT_FAST64_MAX (__U64(18446744073709551615))
-
-/* Limits of integer types capable of holding object pointers */
-
-#if __WORDSIZE == 64
-#define INTPTR_MIN (-__I64(9223372036854775807) - 1)
-#define INTPTR_MAX (__I64(9223372036854775807))
-#define UINTPTR_MAX (__U64(18446744073709551615))
-#else
-#define INTPTR_MIN (-2147483647 - 1)
-#define INTPTR_MAX (2147483647)
-#define UINTPTR_MAX (4294967295U)
-#endif
-
-/* Limits of greatest-width integer types */
-
-#define INTMAX_MIN (-__I64(9223372036854775807) - 1)
-#define INTMAX_MAX (__I64(9223372036854775807))
-#define UINTMAX_MAX (__U64(18446744073709551615))
-
-/* Limits of other integer types */
-
-#ifndef PTRDIFF_MIN
-#if __WORDSIZE == 64
-#define PTRDIFF_MIN (-9223372036854775807L - 1)
-#define PTRDIFF_MAX (9223372036854775807L)
-#else
-#define PTRDIFF_MIN (-2147483647 - 1)
-#define PTRDIFF_MAX (2147483647)
-#endif
-#endif
-
-#ifndef SIG_ATOMIC_MIN
-#define SIG_ATOMIC_MIN (-2147483647 - 1)
-#endif
-#ifndef SIG_ATOMIC_MAX
-#define SIG_ATOMIC_MAX (2147483647)
-#endif
-
-#ifndef SIZE_MAX
-#if __WORDSIZE == 64
-#define SIZE_MAX (18446744073709551615UL)
-#else
-#define SIZE_MAX (4294967295U)
-#endif
-#endif
-
-#ifndef WCHAR_MIN
-#ifdef __WCHAR_MIN__
-#define WCHAR_MIN __WCHAR_MIN__
-#define WCHAR_MAX __WCHAR_MAX__
-#else
-#define WCHAR_MIN (0)
-#define WCHAR_MAX (65535)
-#endif
-#endif
-
-#ifndef WINT_MIN
-#define WINT_MIN 0U
-#define WINT_MAX (4294967295U)
-#endif
-
-#endif /* !__cplusplus || __STDC_LIMIT_MACROS || __INSIDE_CYGWIN__ */
-
-/* C99 requires that in C++ the following macros should be defined only
- if requested. */
-#if !defined (__cplusplus) || defined (__STDC_CONSTANT_MACROS) \
- || defined (__INSIDE_CYGWIN__)
-
-/* Macros for minimum-width integer constant expressions */
-
-#define INT8_C(x) x
-#define INT16_C(x) x
-#define INT32_C(x) x
-#if __WORDSIZE == 64
-#define INT64_C(x) x ## L
-#else
-#define INT64_C(x) x ## LL
-#endif
-
-#define UINT8_C(x) x
-#define UINT16_C(x) x
-#define UINT32_C(x) x ## U
-#if __WORDSIZE == 64
-#define UINT64_C(x) x ## UL
-#else
-#define UINT64_C(x) x ## ULL
-#endif
-
-/* Macros for greatest-width integer constant expressions */
-
-#if __WORDSIZE == 64
-#define INTMAX_C(x) x ## L
-#define UINTMAX_C(x) x ## UL
-#else
-#define INTMAX_C(x) x ## LL
-#define UINTMAX_C(x) x ## ULL
-#endif
-
-#endif /* !__cplusplus || __STDC_CONSTANT_MACROS || __INSIDE_CYGWIN__ */
-
-#endif /* _STDINT_H */
diff --git a/winsup/cygwin/include/sys/acl.h b/winsup/cygwin/include/sys/acl.h
deleted file mode 100644
index 89c38bc0f..000000000
--- a/winsup/cygwin/include/sys/acl.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* sys/acl.h header file for Cygwin.
-
- Copyright 1999, 2000, 2001 Red Hat, Inc.
- Written by C. Vinschen.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_ACL_H
-#define _SYS_ACL_H
-
-#include <cygwin/acl.h>
-
-#endif /* _SYS_ACL_H */
diff --git a/winsup/cygwin/include/sys/copying.dj b/winsup/cygwin/include/sys/copying.dj
deleted file mode 100644
index a05f4bc81..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 edfcc565a..000000000
--- a/winsup/cygwin/include/sys/cygwin.h
+++ /dev/null
@@ -1,435 +0,0 @@
-/* sys/cygwin.h
-
- Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
- 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_CYGWIN_H
-#define _SYS_CYGWIN_H
-
-#include <sys/types.h>
-#include <limits.h>
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define _CYGWIN_SIGNAL_STRING "cYgSiGw00f"
-
-#ifndef __x86_64__
-/* DEPRECATED INTERFACES. These are restricted to MAX_PATH length.
- Don't use in modern applications. They don't exist on x86_64. */
-extern int cygwin_win32_to_posix_path_list (const char *, char *)
- __attribute__ ((__deprecated__));
-extern int cygwin_win32_to_posix_path_list_buf_size (const char *)
- __attribute__ ((__deprecated__));
-extern int cygwin_posix_to_win32_path_list (const char *, char *)
- __attribute__ ((__deprecated__));
-extern int cygwin_posix_to_win32_path_list_buf_size (const char *)
- __attribute__ ((__deprecated__));
-extern int cygwin_conv_to_win32_path (const char *, char *)
- __attribute__ ((__deprecated__));
-extern int cygwin_conv_to_full_win32_path (const char *, char *)
- __attribute__ ((__deprecated__));
-extern int cygwin_conv_to_posix_path (const char *, char *)
- __attribute__ ((__deprecated__));
-extern int cygwin_conv_to_full_posix_path (const char *, char *)
- __attribute__ ((__deprecated__));
-#endif /* !__x86_64__ */
-
-/* Use these interfaces in favor of the above. */
-
-/* Possible 'what' values in calls to cygwin_conv_path/cygwin_create_path. */
-enum
-{
- CCP_POSIX_TO_WIN_A = 0, /* from is char*, to is char* */
- CCP_POSIX_TO_WIN_W, /* from is char*, to is wchar_t* */
- CCP_WIN_A_TO_POSIX, /* from is char*, to is char* */
- CCP_WIN_W_TO_POSIX, /* from is wchar_t*, to is char* */
-
- CCP_CONVTYPE_MASK = 3,
-
- /* Or these values to the above as needed. */
- CCP_ABSOLUTE = 0, /* Request absolute path (default). */
- CCP_RELATIVE = 0x100 /* Request to keep path relative. */
-};
-typedef unsigned int cygwin_conv_path_t;
-
-/* If size is 0, cygwin_conv_path returns the required buffer size in bytes.
- Otherwise, it returns 0 on success, or -1 on error and errno is set to
- one of the below values:
-
- EINVAL what has an invalid value.
- EFAULT from or to point into nirvana.
- ENAMETOOLONG the resulting path is longer than 32K, or, in case
- of what == CCP_POSIX_TO_WIN_A, longer than MAX_PATH.
- ENOSPC size is less than required for the conversion.
-*/
-extern ssize_t cygwin_conv_path (cygwin_conv_path_t what, const void *from,
- void *to, size_t size);
-/* Same, but handles path lists separated by colon or semicolon. */
-extern ssize_t cygwin_conv_path_list (cygwin_conv_path_t what, const void *from,
- void *to, size_t size);
-/* Allocate a buffer for the conversion result using malloc(3), and return
- a pointer to it. Returns NULL if something goes wrong with errno set
- to one of the above values, or to ENOMEM if malloc fails. */
-extern void *cygwin_create_path (cygwin_conv_path_t what, const void *from);
-
-extern pid_t cygwin_winpid_to_pid (int);
-extern int cygwin_posix_path_list_p (const char *);
-extern void cygwin_split_path (const char *, char *, char *);
-
-struct __cygwin_perfile
-{
- const char *name;
- unsigned flags;
-};
-
-/* External interface stuff */
-
-/* Always add at the bottom. Do not add new values in the middle. */
-typedef enum
- {
- CW_LOCK_PINFO,
- CW_UNLOCK_PINFO,
- CW_GETTHREADNAME,
- CW_GETPINFO,
- CW_SETPINFO,
- CW_SETTHREADNAME,
- CW_GETVERSIONINFO,
- CW_READ_V1_MOUNT_TABLES,
- CW_USER_DATA,
- CW_PERFILE,
- CW_GET_CYGDRIVE_PREFIXES,
- CW_GETPINFO_FULL,
- CW_INIT_EXCEPTIONS,
- CW_GET_CYGDRIVE_INFO,
- CW_SET_CYGWIN_REGISTRY_NAME,
- CW_GET_CYGWIN_REGISTRY_NAME,
- CW_STRACE_TOGGLE,
- CW_STRACE_ACTIVE,
- CW_CYGWIN_PID_TO_WINPID,
- CW_EXTRACT_DOMAIN_AND_USER,
- CW_CMDLINE,
- CW_CHECK_NTSEC,
- CW_GET_ERRNO_FROM_WINERROR,
- CW_GET_POSIX_SECURITY_ATTRIBUTE,
- CW_GET_SHMLBA,
- CW_GET_UID_FROM_SID,
- CW_GET_GID_FROM_SID,
- CW_GET_BINMODE,
- CW_HOOK,
- CW_ARGV,
- CW_ENVP,
- CW_DEBUG_SELF,
- CW_SYNC_WINENV,
- CW_CYGTLS_PADSIZE,
- CW_SET_DOS_FILE_WARNING,
- CW_SET_PRIV_KEY,
- CW_SETERRNO,
- CW_EXIT_PROCESS,
- CW_SET_EXTERNAL_TOKEN,
- CW_GET_INSTKEY,
- CW_INT_SETLOCALE,
- CW_CVT_MNT_OPTS,
- CW_LST_MNT_OPTS,
- CW_STRERROR,
- CW_CVT_ENV_TO_WINENV,
- CW_ALLOC_DRIVE_MAP,
- CW_MAP_DRIVE_MAP,
- CW_FREE_DRIVE_MAP,
- CW_SETENT,
- CW_GETENT,
- CW_ENDENT,
- CW_GETNSSSEP,
- CW_GETPWSID,
- CW_GETGRSID,
- CW_CYGNAME_FROM_WINNAME,
- CW_FIXED_ATEXIT,
- CW_GETNSS_PWD_SRC,
- CW_GETNSS_GRP_SRC
- } cygwin_getinfo_types;
-
-#define CW_LOCK_PINFO CW_LOCK_PINFO
-#define CW_UNLOCK_PINFO CW_UNLOCK_PINFO
-#define CW_GETTHREADNAME CW_GETTHREADNAME
-#define CW_GETPINFO CW_GETPINFO
-#define CW_SETPINFO CW_SETPINFO
-#define CW_SETTHREADNAME CW_SETTHREADNAME
-#define CW_GETVERSIONINFO CW_GETVERSIONINFO
-#define CW_READ_V1_MOUNT_TABLES CW_READ_V1_MOUNT_TABLES
-#define CW_USER_DATA CW_USER_DATA
-#define CW_PERFILE CW_PERFILE
-#define CW_GET_CYGDRIVE_PREFIXES CW_GET_CYGDRIVE_PREFIXES
-#define CW_GETPINFO_FULL CW_GETPINFO_FULL
-#define CW_INIT_EXCEPTIONS CW_INIT_EXCEPTIONS
-#define CW_GET_CYGDRIVE_INFO CW_GET_CYGDRIVE_INFO
-#define CW_SET_CYGWIN_REGISTRY_NAME CW_SET_CYGWIN_REGISTRY_NAME
-#define CW_GET_CYGWIN_REGISTRY_NAME CW_GET_CYGWIN_REGISTRY_NAME
-#define CW_STRACE_TOGGLE CW_STRACE_TOGGLE
-#define CW_STRACE_ACTIVE CW_STRACE_ACTIVE
-#define CW_CYGWIN_PID_TO_WINPID CW_CYGWIN_PID_TO_WINPID
-#define CW_EXTRACT_DOMAIN_AND_USER CW_EXTRACT_DOMAIN_AND_USER
-#define CW_CMDLINE CW_CMDLINE
-#define CW_CHECK_NTSEC CW_CHECK_NTSEC
-#define CW_GET_ERRNO_FROM_WINERROR CW_GET_ERRNO_FROM_WINERROR
-#define CW_GET_POSIX_SECURITY_ATTRIBUTE CW_GET_POSIX_SECURITY_ATTRIBUTE
-#define CW_GET_SHMLBA CW_GET_SHMLBA
-#define CW_GET_UID_FROM_SID CW_GET_UID_FROM_SID
-#define CW_GET_GID_FROM_SID CW_GET_GID_FROM_SID
-#define CW_GET_BINMODE CW_GET_BINMODE
-#define CW_HOOK CW_HOOK
-#define CW_ARGV CW_ARGV
-#define CW_ENVP CW_ENVP
-#define CW_DEBUG_SELF CW_DEBUG_SELF
-#define CW_SYNC_WINENV CW_SYNC_WINENV
-#define CW_CYGTLS_PADSIZE CW_CYGTLS_PADSIZE
-#define CW_SET_DOS_FILE_WARNING CW_SET_DOS_FILE_WARNING
-#define CW_SET_PRIV_KEY CW_SET_PRIV_KEY
-#define CW_SETERRNO CW_SETERRNO
-#define CW_EXIT_PROCESS CW_EXIT_PROCESS
-#define CW_SET_EXTERNAL_TOKEN CW_SET_EXTERNAL_TOKEN
-#define CW_GET_INSTKEY CW_GET_INSTKEY
-#define CW_INT_SETLOCALE CW_INT_SETLOCALE
-#define CW_CVT_MNT_OPTS CW_CVT_MNT_OPTS
-#define CW_LST_MNT_OPTS CW_LST_MNT_OPTS
-#define CW_STRERROR CW_STRERROR
-#define CW_CVT_ENV_TO_WINENV CW_CVT_ENV_TO_WINENV
-#define CW_ALLOC_DRIVE_MAP CW_ALLOC_DRIVE_MAP
-#define CW_MAP_DRIVE_MAP CW_MAP_DRIVE_MAP
-#define CW_FREE_DRIVE_MAP CW_FREE_DRIVE_MAP
-#define CW_SETENT CW_SETENT
-#define CW_GETENT CW_GETENT
-#define CW_ENDENT CW_ENDENT
-#define CW_GETNSSSEP CW_GETNSSSEP
-#define CW_GETPWSID CW_GETPWSID
-#define CW_GETGRSID CW_GETGRSID
-#define CW_CYGNAME_FROM_WINNAME CW_CYGNAME_FROM_WINNAME
-#define CW_FIXED_ATEXIT CW_FIXED_ATEXIT
-#define CW_GETNSS_PWD_SRC CW_GETNSS_PWD_SRC
-#define CW_GETNSS_GRP_SRC CW_GETNSS_GRP_SRC
-
-/* Token type for CW_SET_EXTERNAL_TOKEN */
-enum
-{
- CW_TOKEN_IMPERSONATION = 0,
- CW_TOKEN_RESTRICTED = 1
-};
-
-/* Source type for CW_GETNSS_PWD_SRC and CW_GETNSS_GRP_SRC. */
-enum
-{
- NSS_SRC_FILES = 1,
- NSS_SRC_DB = 2
-};
-
-/* Enumeration source constants for CW_SETENT called from mkpasswd/mkgroup. */
-enum nss_enum_t
-{
- ENUM_NONE = 0x00,
- ENUM_CACHE = 0x01,
- ENUM_FILES = 0x02,
- ENUM_BUILTIN = 0x04,
- ENUM_LOCAL = 0x08,
- ENUM_PRIMARY = 0x10,
- ENUM_TDOMS = 0x20,
- ENUM_TDOMS_ALL = 0x40,
- ENUM_ALL = 0x7f
-};
-
-#define CW_NEXTPID 0x80000000 /* or with pid to get next one */
-uintptr_t cygwin_internal (cygwin_getinfo_types, ...);
-
-/* Flags associated with process_state */
-enum
-{
- PID_IN_USE = 0x00001, /* Entry in use. */
- PID_UNUSED = 0x00002, /* Available. */
- PID_STOPPED = 0x00004, /* Waiting for SIGCONT. */
- PID_TTYIN = 0x00008, /* Waiting for terminal input. */
- PID_TTYOU = 0x00010, /* Waiting for terminal output. */
- PID_NOTCYGWIN = 0x00020, /* Set if process is not a cygwin app. */
- PID_ACTIVE = 0x00040, /* Pid accepts signals. */
- PID_CYGPARENT = 0x00080, /* Set if parent was a cygwin app. */
- PID_MAP_RW = 0x00100, /* Flag to open map rw. */
- PID_MYSELF = 0x00200, /* Flag that pid is me. */
- PID_NOCLDSTOP = 0x00400, /* Set if no SIGCHLD signal on stop. */
- PID_INITIALIZING = 0x00800, /* Set until ready to receive signals. */
- PID_NEW = 0x01000, /* Available. */
- PID_ALLPIDS = 0x02000, /* used by pinfo scanner */
- PID_EXECED = 0x04000, /* redirect to original pid info block */
- PID_NOREDIR = 0x08000, /* don't redirect if execed */
- PID_EXITED = 0x40000000, /* Free entry. */
- PID_REAPED = 0x80000000 /* Reaped */
-};
-
-#ifdef WINVER
-
-/* This lives in the app and is initialized before jumping into the DLL.
- It should only contain stuff which the user's process needs to see, or
- which is needed before the user pointer is initialized, or is needed to
- carry inheritance information from parent to child. Note that it cannot
- be used to carry inheritance information across exec!
-
- Remember, this structure is linked into the application's executable.
- Changes to this can invalidate existing executables, so we go to extra
- lengths to avoid having to do it.
-
- When adding/deleting members, remember to adjust {public,internal}_reserved.
- The size of the class shouldn't change [unless you really are prepared to
- invalidate all existing executables]. The program does a check (using
- SIZEOF_PER_PROCESS) to make sure you remember to make the adjustment.
-*/
-
-#ifdef __cplusplus
-class MTinterface;
-#endif
-
-struct per_process_cxx_malloc;
-
-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. */
- uint32_t magic_biscuit;
- uint32_t dll_major;
- uint32_t dll_minor;
-
- struct _reent **impure_ptr_ptr;
-#ifndef __x86_64__
- char ***envptr;
-#endif
-
- /* Used to point to the memory machine we should use. Usually these
- point back into the dll, but they can be overridden by the user. */
- void *(*malloc)(size_t);
- void (*free)(void *);
- void *(*realloc)(void *, size_t);
-
- int *fmode_ptr;
-
- int (*main)(int, char **, char **);
- void (**ctors)(void);
- void (**dtors)(void);
-
- /* For fork */
- void *data_start;
- void *data_end;
- void *bss_start;
- void *bss_end;
-
- void *(*calloc)(size_t, size_t);
- /* For future expansion of values set by the app. */
- void (*premain[4]) (int, char **, struct per_process *);
-
- /* non-zero if ctors have been run. Inherited from parent. */
- int32_t run_ctors_p;
-
- DWORD_PTR unused[7];
-
- /* Pointers to real operator new/delete functions for forwarding. */
- struct per_process_cxx_malloc *cxx_malloc;
-
- 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. */
-#ifdef __x86_64__
- DWORD_PTR unused2[4];
-#else
- DWORD_PTR unused2[2];
-#endif
-
- int (*posix_memalign)(void **, size_t, size_t);
-
- void *pseudo_reloc_start;
- void *pseudo_reloc_end;
- void *image_base;
-
-#if defined (__INSIDE_CYGWIN__) && defined (__cplusplus)
- MTinterface *threadinterface;
-#else
- void *threadinterface;
-#endif
- struct _reent *impure_ptr;
-};
-#define per_process_overwrite offsetof (struct per_process, threadinterface)
-
-#ifdef _PATH_PASSWD
-extern HANDLE cygwin_logon_user (const struct passwd *, const char *);
-#endif
-extern void cygwin_set_impersonation_token (const HANDLE);
-
-/* included if <windows.h> is included */
-extern int cygwin_attach_handle_to_fd (char *, int, HANDLE, mode_t, DWORD);
-
-extern void cygwin_premain0 (int, char **, struct per_process *);
-extern void cygwin_premain1 (int, char **, struct per_process *);
-extern void cygwin_premain2 (int, char **, struct per_process *);
-extern void cygwin_premain3 (int, char **, struct per_process *);
-
-#ifdef __CYGWIN__
-#include <sys/resource.h>
-
-#define TTY_CONSOLE 0x40000000
-
-#define EXTERNAL_PINFO_VERSION_16_BIT 0
-#define EXTERNAL_PINFO_VERSION_32_BIT 1
-#define EXTERNAL_PINFO_VERSION_32_LP 2
-#define EXTERNAL_PINFO_VERSION EXTERNAL_PINFO_VERSION_32_LP
-
-#ifndef __uid_t_defined
-typedef __uint16_t __uid16_t;
-typedef __uint16_t __gid16_t;
-typedef __uint32_t uid_t;
-typedef __uint32_t gid_t;
-#endif
-
-struct external_pinfo
- {
- pid_t pid;
- pid_t ppid;
- DWORD exitcode;
- DWORD dwProcessId, dwSpawnedProcessId;
- __uid16_t uid;
- __gid16_t gid;
- pid_t pgid;
- pid_t sid;
- int ctty;
- mode_t umask;
-
- long start_time;
- struct rusage rusage_self;
- struct rusage rusage_children;
-
- char progname[MAX_PATH];
-
- DWORD strace_mask;
- DWORD version;
-
- DWORD process_state;
-
- /* Only available if version >= EXTERNAL_PINFO_VERSION_32_BIT */
- uid_t uid32;
- gid_t gid32;
-
- /* Only available if version >= EXTERNAL_PINFO_VERSION_32_LP */
- char *progname_long;
-};
-#endif /*__CYGWIN__*/
-#endif /*WINVER*/
-
-#ifdef __cplusplus
-};
-#endif
-#endif /* _SYS_CYGWIN_H */
diff --git a/winsup/cygwin/include/sys/dirent.h b/winsup/cygwin/include/sys/dirent.h
deleted file mode 100644
index 46c34ab5e..000000000
--- a/winsup/cygwin/include/sys/dirent.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/* Posix dirent.h for WIN32.
-
- Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2010, 2012,
- 2013 Red Hat, Inc.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-/* Including this file should not require any Windows headers. */
-
-#ifndef _SYS_DIRENT_H
-#define _SYS_DIRENT_H
-
-#include <sys/types.h>
-#include <limits.h>
-
-#define __DIRENT_VERSION 2
-
-#ifndef __x86_64__
-#pragma pack(push,4)
-#endif
-#define _DIRENT_HAVE_D_TYPE
-struct dirent
-{
- uint32_t __d_version; /* Used internally */
- ino_t d_ino;
- unsigned char d_type;
- unsigned char __d_unused1[3];
- __uint32_t __d_internal1;
- char d_name[NAME_MAX + 1];
-};
-#ifndef __x86_64__
-#pragma pack(pop)
-#endif
-
-#define d_fileno d_ino /* BSD compatible definition */
-
-#ifdef __x86_64__
-#define __DIRENT_COOKIE 0xcdcd8484
-#else
-#define __DIRENT_COOKIE 0xdede4242
-#endif
-
-#ifndef __x86_64__
-#pragma pack(push,4)
-#endif
-typedef struct __DIR
-{
- /* This is first to set alignment in non _COMPILING_NEWLIB case. */
- unsigned long __d_cookie;
- struct dirent *__d_dirent;
- char *__d_dirname; /* directory name with trailing '*' */
- __int32_t __d_position; /* used by telldir/seekdir */
- int __d_fd;
- uintptr_t __d_internal;
- void *__handle;
- void *__fh;
- unsigned __flags;
-} DIR;
-#ifndef __x86_64__
-#pragma pack(pop)
-#endif
-
-DIR *opendir (const char *);
-DIR *fdopendir (int);
-struct dirent *readdir (DIR *);
-int readdir_r (DIR * __restrict, struct dirent * __restrict,
- struct dirent ** __restrict);
-void rewinddir (DIR *);
-int closedir (DIR *);
-
-int dirfd (DIR *);
-
-#ifndef _POSIX_SOURCE
-#ifndef __INSIDE_CYGWIN__
-long telldir (DIR *);
-void seekdir (DIR *, long loc);
-#endif
-
-int scandir (const char *__dir,
- struct dirent ***__namelist,
- int (*select) (const struct dirent *),
- int (*compar) (const struct dirent **, const struct dirent **));
-
-int scandirat (int __dirfd, const char *__dir, struct dirent ***__namelist,
- int (*select) (const struct dirent *),
- int (*compar) (const struct dirent **, const struct dirent **));
-
-int alphasort (const struct dirent **__a, const struct dirent **__b);
-#ifdef _DIRENT_HAVE_D_TYPE
-/* File types for `d_type'. */
-enum
-{
- DT_UNKNOWN = 0,
-# define DT_UNKNOWN DT_UNKNOWN
- DT_FIFO = 1,
-# define DT_FIFO DT_FIFO
- DT_CHR = 2,
-# define DT_CHR DT_CHR
- DT_DIR = 4,
-# define DT_DIR DT_DIR
- DT_BLK = 6,
-# define DT_BLK DT_BLK
- DT_REG = 8,
-# define DT_REG DT_REG
- DT_LNK = 10,
-# define DT_LNK DT_LNK
- DT_SOCK = 12,
-# define DT_SOCK DT_SOCK
- DT_WHT = 14
-# define DT_WHT DT_WHT
-};
-
-/* Convert between stat structure types and directory types. */
-# define IFTODT(mode) (((mode) & 0170000) >> 12)
-# define DTTOIF(dirtype) ((dirtype) << 12)
-#endif /* _DIRENT_HAVE_D_TYPE */
-#endif /* _POSIX_SOURCE */
-#endif /*_SYS_DIRENT_H*/
diff --git a/winsup/cygwin/include/sys/elf.h b/winsup/cygwin/include/sys/elf.h
deleted file mode 100644
index b2d6b77c9..000000000
--- a/winsup/cygwin/include/sys/elf.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * Copyright (c) 2001 David E. O'Brien.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/*
- * This is a Solaris compatibility header
- */
-
-#ifndef _SYS_ELF_H_
-#define _SYS_ELF_H_
-
-#include <sys/types.h>
-#include <machine/elf.h>
-#include <sys/elf32.h>
-#include <sys/elf64.h>
-
-#endif /* !_SYS_ELF_H_ */
diff --git a/winsup/cygwin/include/sys/elf32.h b/winsup/cygwin/include/sys/elf32.h
deleted file mode 100644
index 62bf7be68..000000000
--- a/winsup/cygwin/include/sys/elf32.h
+++ /dev/null
@@ -1,245 +0,0 @@
-/*-
- * Copyright (c) 1996-1998 John D. Polstra.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _SYS_ELF32_H_
-#define _SYS_ELF32_H_ 1
-
-#include <sys/elf_common.h>
-
-/*
- * ELF definitions common to all 32-bit architectures.
- */
-
-typedef uint32_t Elf32_Addr;
-typedef uint16_t Elf32_Half;
-typedef uint32_t Elf32_Off;
-typedef int32_t Elf32_Sword;
-typedef uint32_t Elf32_Word;
-typedef uint64_t Elf32_Lword;
-
-typedef Elf32_Word Elf32_Hashelt;
-
-/* Non-standard class-dependent datatype used for abstraction. */
-typedef Elf32_Word Elf32_Size;
-typedef Elf32_Sword Elf32_Ssize;
-
-/*
- * ELF header.
- */
-
-typedef struct {
- unsigned char e_ident[EI_NIDENT]; /* File identification. */
- Elf32_Half e_type; /* File type. */
- Elf32_Half e_machine; /* Machine architecture. */
- Elf32_Word e_version; /* ELF format version. */
- Elf32_Addr e_entry; /* Entry point. */
- Elf32_Off e_phoff; /* Program header file offset. */
- Elf32_Off e_shoff; /* Section header file offset. */
- Elf32_Word e_flags; /* Architecture-specific flags. */
- Elf32_Half e_ehsize; /* Size of ELF header in bytes. */
- Elf32_Half e_phentsize; /* Size of program header entry. */
- Elf32_Half e_phnum; /* Number of program header entries. */
- Elf32_Half e_shentsize; /* Size of section header entry. */
- Elf32_Half e_shnum; /* Number of section header entries. */
- Elf32_Half e_shstrndx; /* Section name strings section. */
-} Elf32_Ehdr;
-
-/*
- * Section header.
- */
-
-typedef struct {
- Elf32_Word sh_name; /* Section name (index into the
- section header string table). */
- Elf32_Word sh_type; /* Section type. */
- Elf32_Word sh_flags; /* Section flags. */
- Elf32_Addr sh_addr; /* Address in memory image. */
- Elf32_Off sh_offset; /* Offset in file. */
- Elf32_Word sh_size; /* Size in bytes. */
- Elf32_Word sh_link; /* Index of a related section. */
- Elf32_Word sh_info; /* Depends on section type. */
- Elf32_Word sh_addralign; /* Alignment in bytes. */
- Elf32_Word sh_entsize; /* Size of each entry in section. */
-} Elf32_Shdr;
-
-/*
- * Program header.
- */
-
-typedef struct {
- Elf32_Word p_type; /* Entry type. */
- Elf32_Off p_offset; /* File offset of contents. */
- Elf32_Addr p_vaddr; /* Virtual address in memory image. */
- Elf32_Addr p_paddr; /* Physical address (not used). */
- Elf32_Word p_filesz; /* Size of contents in file. */
- Elf32_Word p_memsz; /* Size of contents in memory. */
- Elf32_Word p_flags; /* Access permission flags. */
- Elf32_Word p_align; /* Alignment in memory and file. */
-} Elf32_Phdr;
-
-/*
- * Dynamic structure. The ".dynamic" section contains an array of them.
- */
-
-typedef struct {
- Elf32_Sword d_tag; /* Entry type. */
- union {
- Elf32_Word d_val; /* Integer value. */
- Elf32_Addr d_ptr; /* Address value. */
- } d_un;
-} Elf32_Dyn;
-
-/*
- * Relocation entries.
- */
-
-/* Relocations that don't need an addend field. */
-typedef struct {
- Elf32_Addr r_offset; /* Location to be relocated. */
- Elf32_Word r_info; /* Relocation type and symbol index. */
-} Elf32_Rel;
-
-/* Relocations that need an addend field. */
-typedef struct {
- Elf32_Addr r_offset; /* Location to be relocated. */
- Elf32_Word r_info; /* Relocation type and symbol index. */
- Elf32_Sword r_addend; /* Addend. */
-} Elf32_Rela;
-
-/* Macros for accessing the fields of r_info. */
-#define ELF32_R_SYM(info) ((info) >> 8)
-#define ELF32_R_TYPE(info) ((unsigned char)(info))
-
-/* Macro for constructing r_info from field values. */
-#define ELF32_R_INFO(sym, type) (((sym) << 8) + (unsigned char)(type))
-
-/*
- * Note entry header
- */
-typedef Elf_Note Elf32_Nhdr;
-
-/*
- * Move entry
- */
-typedef struct {
- Elf32_Lword m_value; /* symbol value */
- Elf32_Word m_info; /* size + index */
- Elf32_Word m_poffset; /* symbol offset */
- Elf32_Half m_repeat; /* repeat count */
- Elf32_Half m_stride; /* stride info */
-} Elf32_Move;
-
-/*
- * The macros compose and decompose values for Move.r_info
- *
- * sym = ELF32_M_SYM(M.m_info)
- * size = ELF32_M_SIZE(M.m_info)
- * M.m_info = ELF32_M_INFO(sym, size)
- */
-#define ELF32_M_SYM(info) ((info)>>8)
-#define ELF32_M_SIZE(info) ((unsigned char)(info))
-#define ELF32_M_INFO(sym, size) (((sym)<<8)+(unsigned char)(size))
-
-/*
- * Hardware/Software capabilities entry
- */
-typedef struct {
- Elf32_Word c_tag; /* how to interpret value */
- union {
- Elf32_Word c_val;
- Elf32_Addr c_ptr;
- } c_un;
-} Elf32_Cap;
-
-/*
- * Symbol table entries.
- */
-
-typedef struct {
- Elf32_Word st_name; /* String table index of name. */
- Elf32_Addr st_value; /* Symbol value. */
- Elf32_Word st_size; /* Size of associated object. */
- unsigned char st_info; /* Type and binding information. */
- unsigned char st_other; /* Reserved (not used). */
- Elf32_Half st_shndx; /* Section index of symbol. */
-} Elf32_Sym;
-
-/* Macros for accessing the fields of st_info. */
-#define ELF32_ST_BIND(info) ((info) >> 4)
-#define ELF32_ST_TYPE(info) ((info) & 0xf)
-
-/* Macro for constructing st_info from field values. */
-#define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf))
-
-/* Macro for accessing the fields of st_other. */
-#define ELF32_ST_VISIBILITY(oth) ((oth) & 0x3)
-
-/* Structures used by Sun & GNU symbol versioning. */
-typedef struct
-{
- Elf32_Half vd_version;
- Elf32_Half vd_flags;
- Elf32_Half vd_ndx;
- Elf32_Half vd_cnt;
- Elf32_Word vd_hash;
- Elf32_Word vd_aux;
- Elf32_Word vd_next;
-} Elf32_Verdef;
-
-typedef struct
-{
- Elf32_Word vda_name;
- Elf32_Word vda_next;
-} Elf32_Verdaux;
-
-typedef struct
-{
- Elf32_Half vn_version;
- Elf32_Half vn_cnt;
- Elf32_Word vn_file;
- Elf32_Word vn_aux;
- Elf32_Word vn_next;
-} Elf32_Verneed;
-
-typedef struct
-{
- Elf32_Word vna_hash;
- Elf32_Half vna_flags;
- Elf32_Half vna_other;
- Elf32_Word vna_name;
- Elf32_Word vna_next;
-} Elf32_Vernaux;
-
-typedef Elf32_Half Elf32_Versym;
-
-typedef struct {
- Elf32_Half si_boundto; /* direct bindings - symbol bound to */
- Elf32_Half si_flags; /* per symbol flags */
-} Elf32_Syminfo;
-
-#endif /* !_SYS_ELF32_H_ */
diff --git a/winsup/cygwin/include/sys/elf64.h b/winsup/cygwin/include/sys/elf64.h
deleted file mode 100644
index 4ec7d341e..000000000
--- a/winsup/cygwin/include/sys/elf64.h
+++ /dev/null
@@ -1,248 +0,0 @@
-/*-
- * Copyright (c) 1996-1998 John D. Polstra.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _SYS_ELF64_H_
-#define _SYS_ELF64_H_ 1
-
-#include <sys/elf_common.h>
-
-/*
- * ELF definitions common to all 64-bit architectures.
- */
-
-typedef uint64_t Elf64_Addr;
-typedef uint16_t Elf64_Half;
-typedef uint64_t Elf64_Off;
-typedef int32_t Elf64_Sword;
-typedef int64_t Elf64_Sxword;
-typedef uint32_t Elf64_Word;
-typedef uint64_t Elf64_Lword;
-typedef uint64_t Elf64_Xword;
-
-/*
- * Types of dynamic symbol hash table bucket and chain elements.
- *
- * This is inconsistent among 64 bit architectures, so a machine dependent
- * typedef is required.
- */
-
-typedef Elf64_Word Elf64_Hashelt;
-
-/* Non-standard class-dependent datatype used for abstraction. */
-typedef Elf64_Xword Elf64_Size;
-typedef Elf64_Sxword Elf64_Ssize;
-
-/*
- * ELF header.
- */
-
-typedef struct {
- unsigned char e_ident[EI_NIDENT]; /* File identification. */
- Elf64_Half e_type; /* File type. */
- Elf64_Half e_machine; /* Machine architecture. */
- Elf64_Word e_version; /* ELF format version. */
- Elf64_Addr e_entry; /* Entry point. */
- Elf64_Off e_phoff; /* Program header file offset. */
- Elf64_Off e_shoff; /* Section header file offset. */
- Elf64_Word e_flags; /* Architecture-specific flags. */
- Elf64_Half e_ehsize; /* Size of ELF header in bytes. */
- Elf64_Half e_phentsize; /* Size of program header entry. */
- Elf64_Half e_phnum; /* Number of program header entries. */
- Elf64_Half e_shentsize; /* Size of section header entry. */
- Elf64_Half e_shnum; /* Number of section header entries. */
- Elf64_Half e_shstrndx; /* Section name strings section. */
-} Elf64_Ehdr;
-
-/*
- * Section header.
- */
-
-typedef struct {
- Elf64_Word sh_name; /* Section name (index into the
- section header string table). */
- Elf64_Word sh_type; /* Section type. */
- Elf64_Xword sh_flags; /* Section flags. */
- Elf64_Addr sh_addr; /* Address in memory image. */
- Elf64_Off sh_offset; /* Offset in file. */
- Elf64_Xword sh_size; /* Size in bytes. */
- Elf64_Word sh_link; /* Index of a related section. */
- Elf64_Word sh_info; /* Depends on section type. */
- Elf64_Xword sh_addralign; /* Alignment in bytes. */
- Elf64_Xword sh_entsize; /* Size of each entry in section. */
-} Elf64_Shdr;
-
-/*
- * Program header.
- */
-
-typedef struct {
- Elf64_Word p_type; /* Entry type. */
- Elf64_Word p_flags; /* Access permission flags. */
- Elf64_Off p_offset; /* File offset of contents. */
- Elf64_Addr p_vaddr; /* Virtual address in memory image. */
- Elf64_Addr p_paddr; /* Physical address (not used). */
- Elf64_Xword p_filesz; /* Size of contents in file. */
- Elf64_Xword p_memsz; /* Size of contents in memory. */
- Elf64_Xword p_align; /* Alignment in memory and file. */
-} Elf64_Phdr;
-
-/*
- * Dynamic structure. The ".dynamic" section contains an array of them.
- */
-
-typedef struct {
- Elf64_Sxword d_tag; /* Entry type. */
- union {
- Elf64_Xword d_val; /* Integer value. */
- Elf64_Addr d_ptr; /* Address value. */
- } d_un;
-} Elf64_Dyn;
-
-/*
- * Relocation entries.
- */
-
-/* Relocations that don't need an addend field. */
-typedef struct {
- Elf64_Addr r_offset; /* Location to be relocated. */
- Elf64_Xword r_info; /* Relocation type and symbol index. */
-} Elf64_Rel;
-
-/* Relocations that need an addend field. */
-typedef struct {
- Elf64_Addr r_offset; /* Location to be relocated. */
- Elf64_Xword r_info; /* Relocation type and symbol index. */
- Elf64_Sxword r_addend; /* Addend. */
-} Elf64_Rela;
-
-/* Macros for accessing the fields of r_info. */
-#define ELF64_R_SYM(info) ((info) >> 32)
-#define ELF64_R_TYPE(info) ((info) & 0xffffffffL)
-
-/* Macro for constructing r_info from field values. */
-#define ELF64_R_INFO(sym, type) (((sym) << 32) + ((type) & 0xffffffffL))
-
-#define ELF64_R_TYPE_DATA(info) (((Elf64_Xword)(info)<<32)>>40)
-#define ELF64_R_TYPE_ID(info) (((Elf64_Xword)(info)<<56)>>56)
-#define ELF64_R_TYPE_INFO(data, type) \
- (((Elf64_Xword)(data)<<8)+(Elf64_Xword)(type))
-
-/*
- * Note entry header
- */
-typedef Elf_Note Elf64_Nhdr;
-
-/*
- * Move entry
- */
-typedef struct {
- Elf64_Lword m_value; /* symbol value */
- Elf64_Xword m_info; /* size + index */
- Elf64_Xword m_poffset; /* symbol offset */
- Elf64_Half m_repeat; /* repeat count */
- Elf64_Half m_stride; /* stride info */
-} Elf64_Move;
-
-#define ELF64_M_SYM(info) ((info)>>8)
-#define ELF64_M_SIZE(info) ((unsigned char)(info))
-#define ELF64_M_INFO(sym, size) (((sym)<<8)+(unsigned char)(size))
-
-/*
- * Hardware/Software capabilities entry
- */
-typedef struct {
- Elf64_Xword c_tag; /* how to interpret value */
- union {
- Elf64_Xword c_val;
- Elf64_Addr c_ptr;
- } c_un;
-} Elf64_Cap;
-
-/*
- * Symbol table entries.
- */
-
-typedef struct {
- Elf64_Word st_name; /* String table index of name. */
- unsigned char st_info; /* Type and binding information. */
- unsigned char st_other; /* Reserved (not used). */
- Elf64_Half st_shndx; /* Section index of symbol. */
- Elf64_Addr st_value; /* Symbol value. */
- Elf64_Xword st_size; /* Size of associated object. */
-} Elf64_Sym;
-
-/* Macros for accessing the fields of st_info. */
-#define ELF64_ST_BIND(info) ((info) >> 4)
-#define ELF64_ST_TYPE(info) ((info) & 0xf)
-
-/* Macro for constructing st_info from field values. */
-#define ELF64_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf))
-
-/* Macro for accessing the fields of st_other. */
-#define ELF64_ST_VISIBILITY(oth) ((oth) & 0x3)
-
-/* Structures used by Sun & GNU-style symbol versioning. */
-typedef struct {
- Elf64_Half vd_version;
- Elf64_Half vd_flags;
- Elf64_Half vd_ndx;
- Elf64_Half vd_cnt;
- Elf64_Word vd_hash;
- Elf64_Word vd_aux;
- Elf64_Word vd_next;
-} Elf64_Verdef;
-
-typedef struct {
- Elf64_Word vda_name;
- Elf64_Word vda_next;
-} Elf64_Verdaux;
-
-typedef struct {
- Elf64_Half vn_version;
- Elf64_Half vn_cnt;
- Elf64_Word vn_file;
- Elf64_Word vn_aux;
- Elf64_Word vn_next;
-} Elf64_Verneed;
-
-typedef struct {
- Elf64_Word vna_hash;
- Elf64_Half vna_flags;
- Elf64_Half vna_other;
- Elf64_Word vna_name;
- Elf64_Word vna_next;
-} Elf64_Vernaux;
-
-typedef Elf64_Half Elf64_Versym;
-
-typedef struct {
- Elf64_Half si_boundto; /* direct bindings - symbol bound to */
- Elf64_Half si_flags; /* per symbol flags */
-} Elf64_Syminfo;
-
-#endif /* !_SYS_ELF64_H_ */
diff --git a/winsup/cygwin/include/sys/elf_common.h b/winsup/cygwin/include/sys/elf_common.h
deleted file mode 100644
index 4b1025613..000000000
--- a/winsup/cygwin/include/sys/elf_common.h
+++ /dev/null
@@ -1,1110 +0,0 @@
-/*-
- * Copyright (c) 2000, 2001, 2008, 2011, David E. O'Brien
- * Copyright (c) 1998 John D. Polstra.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _SYS_ELF_COMMON_H_
-#define _SYS_ELF_COMMON_H_ 1
-
-/*
- * ELF definitions that are independent of architecture or word size.
- */
-
-/*
- * Note header. The ".note" section contains an array of notes. Each
- * begins with this header, aligned to a word boundary. Immediately
- * following the note header is n_namesz bytes of name, padded to the
- * next word boundary. Then comes n_descsz bytes of descriptor, again
- * padded to a word boundary. The values of n_namesz and n_descsz do
- * not include the padding.
- */
-
-typedef struct {
- u_int32_t n_namesz; /* Length of name. */
- u_int32_t n_descsz; /* Length of descriptor. */
- u_int32_t n_type; /* Type of this note. */
-} Elf_Note;
-
-/*
- * The header for GNU-style hash sections.
- */
-
-typedef struct {
- u_int32_t gh_nbuckets; /* Number of hash buckets. */
- u_int32_t gh_symndx; /* First visible symbol in .dynsym. */
- u_int32_t gh_maskwords; /* #maskwords used in bloom filter. */
- u_int32_t gh_shift2; /* Bloom filter shift count. */
-} Elf_GNU_Hash_Header;
-
-/* Indexes into the e_ident array. Keep synced with
- http://www.sco.com/developers/gabi/latest/ch4.eheader.html */
-#define EI_MAG0 0 /* Magic number, byte 0. */
-#define EI_MAG1 1 /* Magic number, byte 1. */
-#define EI_MAG2 2 /* Magic number, byte 2. */
-#define EI_MAG3 3 /* Magic number, byte 3. */
-#define EI_CLASS 4 /* Class of machine. */
-#define EI_DATA 5 /* Data format. */
-#define EI_VERSION 6 /* ELF format version. */
-#define EI_OSABI 7 /* Operating system / ABI identification */
-#define EI_ABIVERSION 8 /* ABI version */
-#define OLD_EI_BRAND 8 /* Start of architecture identification. */
-#define EI_PAD 9 /* Start of padding (per SVR4 ABI). */
-#define EI_NIDENT 16 /* Size of e_ident array. */
-
-/* Values for the magic number bytes. */
-#define ELFMAG0 0x7f
-#define ELFMAG1 'E'
-#define ELFMAG2 'L'
-#define ELFMAG3 'F'
-#define ELFMAG "\177ELF" /* magic string */
-#define SELFMAG 4 /* magic string size */
-
-/* Values for e_ident[EI_VERSION] and e_version. */
-#define EV_NONE 0
-#define EV_CURRENT 1
-
-/* Values for e_ident[EI_CLASS]. */
-#define ELFCLASSNONE 0 /* Unknown class. */
-#define ELFCLASS32 1 /* 32-bit architecture. */
-#define ELFCLASS64 2 /* 64-bit architecture. */
-
-/* Values for e_ident[EI_DATA]. */
-#define ELFDATANONE 0 /* Unknown data format. */
-#define ELFDATA2LSB 1 /* 2's complement little-endian. */
-#define ELFDATA2MSB 2 /* 2's complement big-endian. */
-
-/* Values for e_ident[EI_OSABI]. */
-#define ELFOSABI_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_86OPEN 5 /* 86Open common IA32 ABI */
-#define ELFOSABI_SOLARIS 6 /* Solaris */
-#define ELFOSABI_AIX 7 /* AIX */
-#define ELFOSABI_IRIX 8 /* IRIX */
-#define ELFOSABI_FREEBSD 9 /* FreeBSD */
-#define ELFOSABI_TRU64 10 /* TRU64 UNIX */
-#define ELFOSABI_MODESTO 11 /* Novell Modesto */
-#define ELFOSABI_OPENBSD 12 /* OpenBSD */
-#define ELFOSABI_OPENVMS 13 /* Open VMS */
-#define ELFOSABI_NSK 14 /* HP Non-Stop Kernel */
-#define ELFOSABI_AROS 15 /* Amiga Research OS */
-#define ELFOSABI_ARM 97 /* ARM */
-#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
-
-#define ELFOSABI_SYSV ELFOSABI_NONE /* symbol used in old spec */
-#define ELFOSABI_MONTEREY ELFOSABI_AIX /* Monterey */
-
-/* e_ident */
-#define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \
- (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \
- (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \
- (ehdr).e_ident[EI_MAG3] == ELFMAG3)
-
-/* Values for e_type. */
-#define ET_NONE 0 /* Unknown type. */
-#define ET_REL 1 /* Relocatable. */
-#define ET_EXEC 2 /* Executable. */
-#define ET_DYN 3 /* Shared object. */
-#define ET_CORE 4 /* Core file. */
-#define ET_LOOS 0xfe00 /* First operating system specific. */
-#define ET_HIOS 0xfeff /* Last operating system-specific. */
-#define ET_LOPROC 0xff00 /* First processor-specific. */
-#define ET_HIPROC 0xffff /* Last processor-specific. */
-
-/* Values for e_machine. */
-#define EM_NONE 0 /* Unknown machine. */
-#define EM_M32 1 /* AT&T WE32100. */
-#define EM_SPARC 2 /* Sun SPARC. */
-#define EM_386 3 /* Intel i386. */
-#define EM_68K 4 /* Motorola 68000. */
-#define EM_88K 5 /* Motorola 88000. */
-#define EM_860 7 /* Intel i860. */
-#define EM_MIPS 8 /* MIPS R3000 Big-Endian only. */
-#define EM_S370 9 /* IBM System/370. */
-#define EM_MIPS_RS3_LE 10 /* MIPS R3000 Little-Endian. */
-#define EM_PARISC 15 /* HP PA-RISC. */
-#define EM_VPP500 17 /* Fujitsu VPP500. */
-#define EM_SPARC32PLUS 18 /* SPARC v8plus. */
-#define EM_960 19 /* Intel 80960. */
-#define EM_PPC 20 /* PowerPC 32-bit. */
-#define EM_PPC64 21 /* PowerPC 64-bit. */
-#define EM_S390 22 /* IBM System/390. */
-#define EM_V800 36 /* NEC V800. */
-#define EM_FR20 37 /* Fujitsu FR20. */
-#define EM_RH32 38 /* TRW RH-32. */
-#define EM_RCE 39 /* Motorola RCE. */
-#define EM_ARM 40 /* ARM. */
-#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. */
-#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 MMA. */
-#define EM_PCP 55 /* Siemens PCP. */
-#define EM_NCPU 56 /* Sony nCPU. */
-#define EM_NDR1 57 /* Denso NDR1 microprocessor. */
-#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 processor. */
-#define EM_X86_64 62 /* Advanced Micro Devices x86-64 */
-#define EM_AMD64 EM_X86_64 /* Advanced Micro Devices x86-64 (compat) */
-#define EM_PDSP 63 /* Sony DSP Processor. */
-#define EM_FX66 66 /* Siemens FX66 microcontroller. */
-#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16
- 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 mc. */
-#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
- processor. */
-#define EM_FIREPATH 78 /* Element 14 64-bit DSP Processor. */
-#define EM_ZSP 79 /* LSI Logic 16-bit DSP Processor. */
-#define EM_MMIX 80 /* Donald Knuth's educational 64-bit proc. */
-#define EM_HUANY 81 /* Harvard University machine-independent
- object files. */
-#define EM_PRISM 82 /* SiTera Prism. */
-#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller. */
-#define EM_FR30 84 /* Fujitsu FR30. */
-#define EM_D10V 85 /* Mitsubishi D10V. */
-#define EM_D30V 86 /* Mitsubishi D30V. */
-#define EM_V850 87 /* NEC v850. */
-#define EM_M32R 88 /* Mitsubishi M32R. */
-#define EM_MN10300 89 /* Matsushita MN10300. */
-#define EM_MN10200 90 /* Matsushita MN10200. */
-#define EM_PJ 91 /* picoJava. */
-#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor. */
-#define EM_ARC_A5 93 /* ARC Cores Tangent-A5. */
-#define EM_XTENSA 94 /* Tensilica Xtensa Architecture. */
-#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor. */
-#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose
- Processor. */
-#define EM_NS32K 97 /* National Semiconductor 32000 series. */
-#define EM_TPC 98 /* Tenor Network TPC processor. */
-#define EM_SNP1K 99 /* Trebia SNP 1000 processor. */
-#define EM_ST200 100 /* STMicroelectronics ST200 microcontroller. */
-#define EM_IP2K 101 /* Ubicom IP2xxx microcontroller family. */
-#define EM_MAX 102 /* MAX Processor. */
-#define EM_CR 103 /* National Semiconductor CompactRISC
- microprocessor. */
-#define EM_F2MC16 104 /* Fujitsu F2MC16. */
-#define EM_MSP430 105 /* Texas Instruments embedded microcontroller
- msp430. */
-#define EM_BLACKFIN 106 /* Analog Devices Blackfin (DSP) processor. */
-#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors. */
-#define EM_SEP 108 /* Sharp embedded microprocessor. */
-#define EM_ARCA 109 /* Arca RISC Microprocessor. */
-#define EM_UNICORE 110 /* Microprocessor series from PKU-Unity Ltd.
- and MPRC of Peking University */
-
-/* Non-standard or deprecated. */
-#define EM_486 6 /* Intel i486. */
-#define EM_MIPS_RS4_BE 10 /* MIPS R4000 Big-Endian */
-#define EM_ALPHA_STD 41 /* Digital Alpha (standard value). */
-#define EM_ALPHA 0x9026 /* Alpha (written in the absence of an ABI) */
-
-/* Special section indexes. */
-#define SHN_UNDEF 0 /* Undefined, missing, irrelevant. */
-#define SHN_LORESERVE 0xff00 /* First of reserved range. */
-#define SHN_LOPROC 0xff00 /* First processor-specific. */
-#define SHN_HIPROC 0xff1f /* Last processor-specific. */
-#define SHN_LOOS 0xff20 /* First operating system-specific. */
-#define SHN_HIOS 0xff3f /* Last operating system-specific. */
-#define SHN_ABS 0xfff1 /* Absolute values. */
-#define SHN_COMMON 0xfff2 /* Common data. */
-#define SHN_XINDEX 0xffff /* Escape -- index stored elsewhere. */
-#define SHN_HIRESERVE 0xffff /* Last of reserved range. */
-
-/* sh_type */
-#define SHT_NULL 0 /* inactive */
-#define SHT_PROGBITS 1 /* program defined information */
-#define SHT_SYMTAB 2 /* symbol table section */
-#define SHT_STRTAB 3 /* string table section */
-#define SHT_RELA 4 /* relocation section with addends */
-#define SHT_HASH 5 /* symbol hash table section */
-#define SHT_DYNAMIC 6 /* dynamic section */
-#define SHT_NOTE 7 /* note section */
-#define SHT_NOBITS 8 /* no space section */
-#define SHT_REL 9 /* relocation section - no addends */
-#define SHT_SHLIB 10 /* reserved - purpose unknown */
-#define SHT_DYNSYM 11 /* dynamic symbol table section */
-#define SHT_INIT_ARRAY 14 /* Initialization function pointers. */
-#define SHT_FINI_ARRAY 15 /* Termination function pointers. */
-#define SHT_PREINIT_ARRAY 16 /* Pre-initialization function ptrs. */
-#define SHT_GROUP 17 /* Section group. */
-#define SHT_SYMTAB_SHNDX 18 /* Section indexes (see SHN_XINDEX). */
-#define SHT_LOOS 0x60000000 /* First of OS specific semantics */
-#define SHT_LOSUNW 0x6ffffff4
-#define SHT_SUNW_dof 0x6ffffff4
-#define SHT_SUNW_cap 0x6ffffff5
-#define SHT_SUNW_SIGNATURE 0x6ffffff6
-#define SHT_GNU_HASH 0x6ffffff6
-#define SHT_SUNW_ANNOTATE 0x6ffffff7
-#define SHT_SUNW_DEBUGSTR 0x6ffffff8
-#define SHT_SUNW_DEBUG 0x6ffffff9
-#define SHT_SUNW_move 0x6ffffffa
-#define SHT_SUNW_COMDAT 0x6ffffffb
-#define SHT_SUNW_syminfo 0x6ffffffc
-#define SHT_SUNW_verdef 0x6ffffffd
-#define SHT_GNU_verdef 0x6ffffffd /* Symbol versions provided */
-#define SHT_SUNW_verneed 0x6ffffffe
-#define SHT_GNU_verneed 0x6ffffffe /* Symbol versions required */
-#define SHT_SUNW_versym 0x6fffffff
-#define SHT_GNU_versym 0x6fffffff /* Symbol version table */
-#define SHT_HISUNW 0x6fffffff
-#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */
-#define SHT_LOPROC 0x70000000 /* reserved range for processor */
-#define SHT_AMD64_UNWIND 0x70000001 /* unwind information */
-#define SHT_MIPS_REGINFO 0x70000006
-#define SHT_MIPS_OPTIONS 0x7000000d
-#define SHT_MIPS_DWARF 0x7000001e /* MIPS gcc uses MIPS_DWARF */
-#define SHT_HIPROC 0x7fffffff /* specific section header types */
-#define SHT_LOUSER 0x80000000 /* reserved range for application */
-#define SHT_HIUSER 0xffffffff /* specific indexes */
-
-/* Flags for sh_flags. */
-#define SHF_WRITE 0x1 /* Section contains writable data. */
-#define SHF_ALLOC 0x2 /* Section occupies memory. */
-#define SHF_EXECINSTR 0x4 /* Section contains instructions. */
-#define SHF_MERGE 0x10 /* Section may be merged. */
-#define SHF_STRINGS 0x20 /* Section contains strings. */
-#define SHF_INFO_LINK 0x40 /* sh_info holds section index. */
-#define SHF_LINK_ORDER 0x80 /* Special ordering requirements. */
-#define SHF_OS_NONCONFORMING 0x100 /* OS-specific processing required. */
-#define SHF_GROUP 0x200 /* Member of section group. */
-#define SHF_TLS 0x400 /* Section contains TLS data. */
-#define SHF_MASKOS 0x0ff00000 /* OS-specific semantics. */
-#define SHF_MASKPROC 0xf0000000 /* Processor-specific semantics. */
-
-/* Values for p_type. */
-#define PT_NULL 0 /* Unused entry. */
-#define PT_LOAD 1 /* Loadable segment. */
-#define PT_DYNAMIC 2 /* Dynamic linking information segment. */
-#define PT_INTERP 3 /* Pathname of interpreter. */
-#define PT_NOTE 4 /* Auxiliary information. */
-#define PT_SHLIB 5 /* Reserved (not used). */
-#define PT_PHDR 6 /* Location of program header itself. */
-#define PT_TLS 7 /* Thread local storage segment */
-#define PT_LOOS 0x60000000 /* First OS-specific. */
-#define PT_SUNW_UNWIND 0x6464e550 /* amd64 UNWIND program header */
-#define PT_GNU_EH_FRAME 0x6474e550
-#define PT_GNU_STACK 0x6474e551
-#define PT_GNU_RELRO 0x6474e552
-#define PT_LOSUNW 0x6ffffffa
-#define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
-#define PT_SUNWSTACK 0x6ffffffb /* describes the stack segment */
-#define PT_SUNWDTRACE 0x6ffffffc /* private */
-#define PT_SUNWCAP 0x6ffffffd /* hard/soft capabilities segment */
-#define PT_HISUNW 0x6fffffff
-#define PT_HIOS 0x6fffffff /* Last OS-specific. */
-#define PT_LOPROC 0x70000000 /* First processor-specific type. */
-#define PT_HIPROC 0x7fffffff /* Last processor-specific type. */
-
-/* Values for p_flags. */
-#define PF_X 0x1 /* Executable. */
-#define PF_W 0x2 /* Writable. */
-#define PF_R 0x4 /* Readable. */
-#define PF_MASKOS 0x0ff00000 /* Operating system-specific. */
-#define PF_MASKPROC 0xf0000000 /* Processor-specific. */
-
-/* Extended program header index. */
-#define PN_XNUM 0xffff
-
-/* Values for d_tag. */
-#define DT_NULL 0 /* Terminating entry. */
-#define DT_NEEDED 1 /* String table offset of a needed shared
- library. */
-#define DT_PLTRELSZ 2 /* Total size in bytes of PLT relocations. */
-#define DT_PLTGOT 3 /* Processor-dependent address. */
-#define DT_HASH 4 /* Address of symbol hash table. */
-#define DT_STRTAB 5 /* Address of string table. */
-#define DT_SYMTAB 6 /* Address of symbol table. */
-#define DT_RELA 7 /* Address of ElfNN_Rela relocations. */
-#define DT_RELASZ 8 /* Total size of ElfNN_Rela relocations. */
-#define DT_RELAENT 9 /* Size of each ElfNN_Rela relocation entry. */
-#define DT_STRSZ 10 /* Size of string table. */
-#define DT_SYMENT 11 /* Size of each symbol table entry. */
-#define DT_INIT 12 /* Address of initialization function. */
-#define DT_FINI 13 /* Address of finalization function. */
-#define DT_SONAME 14 /* String table offset of shared object
- name. */
-#define DT_RPATH 15 /* String table offset of library path. [sup] */
-#define DT_SYMBOLIC 16 /* Indicates "symbolic" linking. [sup] */
-#define DT_REL 17 /* Address of ElfNN_Rel relocations. */
-#define DT_RELSZ 18 /* Total size of ElfNN_Rel relocations. */
-#define DT_RELENT 19 /* Size of each ElfNN_Rel relocation. */
-#define DT_PLTREL 20 /* Type of relocation used for PLT. */
-#define DT_DEBUG 21 /* Reserved (not used). */
-#define DT_TEXTREL 22 /* Indicates there may be relocations in
- non-writable segments. [sup] */
-#define DT_JMPREL 23 /* Address of PLT relocations. */
-#define DT_BIND_NOW 24 /* [sup] */
-#define DT_INIT_ARRAY 25 /* Address of the array of pointers to
- initialization functions */
-#define DT_FINI_ARRAY 26 /* Address of the array of pointers to
- termination functions */
-#define DT_INIT_ARRAYSZ 27 /* Size in bytes of the array of
- initialization functions. */
-#define DT_FINI_ARRAYSZ 28 /* Size in bytes of the array of
- termination functions. */
-#define DT_RUNPATH 29 /* String table offset of a null-terminated
- library search path string. */
-#define DT_FLAGS 30 /* Object specific flag values. */
-#define DT_ENCODING 32 /* Values greater than or equal to DT_ENCODING
- and less than DT_LOOS follow the rules for
- the interpretation of the d_un union
- as follows: even == 'd_ptr', odd == 'd_val'
- or none */
-#define DT_PREINIT_ARRAY 32 /* Address of the array of pointers to
- pre-initialization functions. */
-#define DT_PREINIT_ARRAYSZ 33 /* Size in bytes of the array of
- pre-initialization functions. */
-#define DT_MAXPOSTAGS 34 /* number of positive tags */
-#define DT_LOOS 0x6000000d /* First OS-specific */
-#define DT_SUNW_AUXILIARY 0x6000000d /* symbol auxiliary name */
-#define DT_SUNW_RTLDINF 0x6000000e /* ld.so.1 info (private) */
-#define DT_SUNW_FILTER 0x6000000f /* symbol filter name */
-#define DT_SUNW_CAP 0x60000010 /* hardware/software */
-#define DT_HIOS 0x6ffff000 /* Last OS-specific */
-
-/*
- * DT_* entries which fall between DT_VALRNGHI & DT_VALRNGLO use the
- * Dyn.d_un.d_val field of the Elf*_Dyn structure.
- */
-#define DT_VALRNGLO 0x6ffffd00
-#define DT_CHECKSUM 0x6ffffdf8 /* elf checksum */
-#define DT_PLTPADSZ 0x6ffffdf9 /* pltpadding size */
-#define DT_MOVEENT 0x6ffffdfa /* move table entry size */
-#define DT_MOVESZ 0x6ffffdfb /* move table size */
-#define DT_FEATURE_1 0x6ffffdfc /* feature holder */
-#define DT_POSFLAG_1 0x6ffffdfd /* flags for DT_* entries, effecting */
- /* the following DT_* entry. */
- /* See DF_P1_* definitions */
-#define DT_SYMINSZ 0x6ffffdfe /* syminfo table size (in bytes) */
-#define DT_SYMINENT 0x6ffffdff /* syminfo entry size (in bytes) */
-#define DT_VALRNGHI 0x6ffffdff
-
-/*
- * DT_* entries which fall between DT_ADDRRNGHI & DT_ADDRRNGLO use the
- * Dyn.d_un.d_ptr field of the Elf*_Dyn structure.
- *
- * If any adjustment is made to the ELF object after it has been
- * built, these entries will need to be adjusted.
- */
-#define DT_ADDRRNGLO 0x6ffffe00
-#define DT_GNU_HASH 0x6ffffef5 /* GNU-style hash table */
-#define DT_CONFIG 0x6ffffefa /* configuration information */
-#define DT_DEPAUDIT 0x6ffffefb /* dependency auditing */
-#define DT_AUDIT 0x6ffffefc /* object auditing */
-#define DT_PLTPAD 0x6ffffefd /* pltpadding (sparcv9) */
-#define DT_MOVETAB 0x6ffffefe /* move table */
-#define DT_SYMINFO 0x6ffffeff /* syminfo table */
-#define DT_ADDRRNGHI 0x6ffffeff
-
-#define DT_VERSYM 0x6ffffff0 /* Address of versym section. */
-#define DT_RELACOUNT 0x6ffffff9 /* number of RELATIVE relocations */
-#define DT_RELCOUNT 0x6ffffffa /* number of RELATIVE relocations */
-#define DT_FLAGS_1 0x6ffffffb /* state flags - see DF_1_* defs */
-#define DT_VERDEF 0x6ffffffc /* Address of verdef section. */
-#define DT_VERDEFNUM 0x6ffffffd /* Number of elems in verdef section */
-#define DT_VERNEED 0x6ffffffe /* Address of verneed section. */
-#define DT_VERNEEDNUM 0x6fffffff /* Number of elems in verneed section */
-
-#define DT_LOPROC 0x70000000 /* First processor-specific type. */
-#define DT_DEPRECATED_SPARC_REGISTER 0x7000001
-#define DT_AUXILIARY 0x7ffffffd /* shared library auxiliary name */
-#define DT_USED 0x7ffffffe /* ignored - same as needed */
-#define DT_FILTER 0x7fffffff /* shared library filter name */
-#define DT_HIPROC 0x7fffffff /* Last processor-specific type. */
-
-/* Values for DT_FLAGS */
-#define DF_ORIGIN 0x0001 /* Indicates that the object being loaded may
- make reference to the $ORIGIN substitution
- string */
-#define DF_SYMBOLIC 0x0002 /* Indicates "symbolic" linking. */
-#define DF_TEXTREL 0x0004 /* Indicates there may be relocations in
- non-writable segments. */
-#define DF_BIND_NOW 0x0008 /* Indicates that the dynamic linker should
- process all relocations for the object
- containing this entry before transferring
- control to the program. */
-#define DF_STATIC_TLS 0x0010 /* Indicates that the shared object or
- executable contains code using a static
- thread-local storage scheme. */
-
-/* Values for DT_FLAGS_1 */
-#define DF_1_BIND_NOW 0x00000001 /* Same as DF_BIND_NOW */
-#define DF_1_GLOBAL 0x00000002 /* Set the RTLD_GLOBAL for object */
-#define DF_1_NODELETE 0x00000008 /* Set the RTLD_NODELETE for object */
-#define DF_1_LOADFLTR 0x00000010 /* Immediate loading of filtees */
-#define DF_1_NOOPEN 0x00000040 /* Do not allow loading on dlopen() */
-#define DF_1_ORIGIN 0x00000080 /* Process $ORIGIN */
-#define DF_1_NODEFLIB 0x00000800 /* Do not search default paths */
-
-/* Values for n_type. Used in core files. */
-#define NT_PRSTATUS 1 /* Process status. */
-#define NT_FPREGSET 2 /* Floating point registers. */
-#define NT_PRPSINFO 3 /* Process state info. */
-#define NT_THRMISC 7 /* Thread miscellaneous info. */
-
-/* Symbol Binding - ELFNN_ST_BIND - st_info */
-#define STB_LOCAL 0 /* Local symbol */
-#define STB_GLOBAL 1 /* Global symbol */
-#define STB_WEAK 2 /* like global - lower precedence */
-#define STB_LOOS 10 /* Reserved range for operating system */
-#define STB_HIOS 12 /* specific semantics. */
-#define STB_LOPROC 13 /* reserved range for processor */
-#define STB_HIPROC 15 /* specific semantics. */
-
-/* Symbol type - ELFNN_ST_TYPE - st_info */
-#define STT_NOTYPE 0 /* Unspecified type. */
-#define STT_OBJECT 1 /* Data object. */
-#define STT_FUNC 2 /* Function. */
-#define STT_SECTION 3 /* Section. */
-#define STT_FILE 4 /* Source file. */
-#define STT_COMMON 5 /* Uninitialized common block. */
-#define STT_TLS 6 /* TLS object. */
-#define STT_NUM 7
-#define STT_LOOS 10 /* Reserved range for operating system */
-#define STT_GNU_IFUNC 10
-#define STT_HIOS 12 /* specific semantics. */
-#define STT_LOPROC 13 /* reserved range for processor */
-#define STT_HIPROC 15 /* specific semantics. */
-
-/* Symbol visibility - ELFNN_ST_VISIBILITY - st_other */
-#define STV_DEFAULT 0x0 /* Default visibility (see binding). */
-#define STV_INTERNAL 0x1 /* Special meaning in relocatable objects. */
-#define STV_HIDDEN 0x2 /* Not visible. */
-#define STV_PROTECTED 0x3 /* Visible but not preemptible. */
-#define STV_EXPORTED 0x4
-#define STV_SINGLETON 0x5
-#define STV_ELIMINATE 0x6
-
-/* Special symbol table indexes. */
-#define STN_UNDEF 0 /* Undefined symbol index. */
-
-/* Symbol versioning flags. */
-#define VER_DEF_CURRENT 1
-#define VER_DEF_IDX(x) VER_NDX(x)
-
-#define VER_FLG_BASE 0x01
-#define VER_FLG_WEAK 0x02
-
-#define VER_NEED_CURRENT 1
-#define VER_NEED_WEAK (1u << 15)
-#define VER_NEED_HIDDEN VER_NDX_HIDDEN
-#define VER_NEED_IDX(x) VER_NDX(x)
-
-#define VER_NDX_LOCAL 0
-#define VER_NDX_GLOBAL 1
-#define VER_NDX_GIVEN 2
-
-#define VER_NDX_HIDDEN (1u << 15)
-#define VER_NDX(x) ((x) & ~(1u << 15))
-
-#define CA_SUNW_NULL 0
-#define CA_SUNW_HW_1 1 /* first hardware capabilities entry */
-#define CA_SUNW_SF_1 2 /* first software capabilities entry */
-
-/*
- * Syminfo flag values
- */
-#define SYMINFO_FLG_DIRECT 0x0001 /* symbol ref has direct association */
- /* to object containing defn. */
-#define SYMINFO_FLG_PASSTHRU 0x0002 /* ignored - see SYMINFO_FLG_FILTER */
-#define SYMINFO_FLG_COPY 0x0004 /* symbol is a copy-reloc */
-#define SYMINFO_FLG_LAZYLOAD 0x0008 /* object containing defn should be */
- /* lazily-loaded */
-#define SYMINFO_FLG_DIRECTBIND 0x0010 /* ref should be bound directly to */
- /* object containing defn. */
-#define SYMINFO_FLG_NOEXTDIRECT 0x0020 /* don't let an external reference */
- /* directly bind to this symbol */
-#define SYMINFO_FLG_FILTER 0x0002 /* symbol ref is associated to a */
-#define SYMINFO_FLG_AUXILIARY 0x0040 /* standard or auxiliary filter */
-
-/*
- * Syminfo.si_boundto values.
- */
-#define SYMINFO_BT_SELF 0xffff /* symbol bound to self */
-#define SYMINFO_BT_PARENT 0xfffe /* symbol bound to parent */
-#define SYMINFO_BT_NONE 0xfffd /* no special symbol binding */
-#define SYMINFO_BT_EXTERN 0xfffc /* symbol defined as external */
-#define SYMINFO_BT_LOWRESERVE 0xff00 /* beginning of reserved entries */
-
-/*
- * Syminfo version values.
- */
-#define SYMINFO_NONE 0 /* Syminfo version */
-#define SYMINFO_CURRENT 1
-#define SYMINFO_NUM 2
-
-/*
- * Relocation types.
- *
- * All machine architectures are defined here to allow tools on one to
- * handle others.
- */
-
-#define R_386_NONE 0 /* No relocation. */
-#define R_386_32 1 /* Add symbol value. */
-#define R_386_PC32 2 /* Add PC-relative symbol value. */
-#define R_386_GOT32 3 /* Add PC-relative GOT offset. */
-#define R_386_PLT32 4 /* Add PC-relative PLT offset. */
-#define R_386_COPY 5 /* Copy data from shared object. */
-#define R_386_GLOB_DAT 6 /* Set GOT entry to data address. */
-#define R_386_JMP_SLOT 7 /* Set GOT entry to code address. */
-#define R_386_RELATIVE 8 /* Add load address of shared object. */
-#define R_386_GOTOFF 9 /* Add GOT-relative symbol address. */
-#define R_386_GOTPC 10 /* Add PC-relative GOT table address. */
-#define R_386_TLS_TPOFF 14 /* Negative offset in static TLS block */
-#define R_386_TLS_IE 15 /* Absolute address of GOT for -ve static TLS */
-#define R_386_TLS_GOTIE 16 /* GOT entry for negative static TLS block */
-#define R_386_TLS_LE 17 /* Negative offset relative to static TLS */
-#define R_386_TLS_GD 18 /* 32 bit offset to GOT (index,off) pair */
-#define R_386_TLS_LDM 19 /* 32 bit offset to GOT (index,zero) pair */
-#define R_386_16 20
-#define R_386_PC16 21
-#define R_386_8 22
-#define R_386_PC8 23
-#define R_386_TLS_GD_32 24 /* 32 bit offset to GOT (index,off) pair */
-#define R_386_TLS_GD_PUSH 25 /* pushl instruction for Sun ABI GD sequence */
-#define R_386_TLS_GD_CALL 26 /* call instruction for Sun ABI GD sequence */
-#define R_386_TLS_GD_POP 27 /* popl instruction for Sun ABI GD sequence */
-#define R_386_TLS_LDM_32 28 /* 32 bit offset to GOT (index,zero) pair */
-#define R_386_TLS_LDM_PUSH 29 /* pushl instruction for Sun ABI LD sequence */
-#define R_386_TLS_LDM_CALL 30 /* call instruction for Sun ABI LD sequence */
-#define R_386_TLS_LDM_POP 31 /* popl instruction for Sun ABI LD sequence */
-#define R_386_TLS_LDO_32 32 /* 32 bit offset from start of TLS block */
-#define R_386_TLS_IE_32 33 /* 32 bit offset to GOT static TLS offset entry */
-#define R_386_TLS_LE_32 34 /* 32 bit offset within static TLS block */
-#define R_386_TLS_DTPMOD32 35 /* GOT entry containing TLS index */
-#define R_386_TLS_DTPOFF32 36 /* GOT entry containing TLS offset */
-#define R_386_TLS_TPOFF32 37 /* GOT entry of -ve static TLS offset */
-#define R_386_IRELATIVE 42 /* PLT entry resolved indirectly at runtime */
-
-#define R_ARM_NONE 0 /* No relocation. */
-#define R_ARM_PC24 1
-#define R_ARM_ABS32 2
-#define R_ARM_REL32 3
-#define R_ARM_PC13 4
-#define R_ARM_ABS16 5
-#define R_ARM_ABS12 6
-#define R_ARM_THM_ABS5 7
-#define R_ARM_ABS8 8
-#define R_ARM_SBREL32 9
-#define R_ARM_THM_PC22 10
-#define R_ARM_THM_PC8 11
-#define R_ARM_AMP_VCALL9 12
-#define R_ARM_SWI24 13
-#define R_ARM_THM_SWI8 14
-#define R_ARM_XPC25 15
-#define R_ARM_THM_XPC22 16
-/* TLS relocations */
-#define R_ARM_TLS_DTPMOD32 17 /* ID of module containing symbol */
-#define R_ARM_TLS_DTPOFF32 18 /* Offset in TLS block */
-#define R_ARM_TLS_TPOFF32 19 /* Offset in static TLS block */
-#define R_ARM_COPY 20 /* Copy data from shared object. */
-#define R_ARM_GLOB_DAT 21 /* Set GOT entry to data address. */
-#define R_ARM_JUMP_SLOT 22 /* Set GOT entry to code address. */
-#define R_ARM_RELATIVE 23 /* Add load address of shared object. */
-#define R_ARM_GOTOFF 24 /* Add GOT-relative symbol address. */
-#define R_ARM_GOTPC 25 /* Add PC-relative GOT table address. */
-#define R_ARM_GOT32 26 /* Add PC-relative GOT offset. */
-#define R_ARM_PLT32 27 /* Add PC-relative PLT offset. */
-#define R_ARM_GNU_VTENTRY 100
-#define R_ARM_GNU_VTINHERIT 101
-#define R_ARM_RSBREL32 250
-#define R_ARM_THM_RPC22 251
-#define R_ARM_RREL32 252
-#define R_ARM_RABS32 253
-#define R_ARM_RPC24 254
-#define R_ARM_RBASE 255
-
-/* Name Value Field Calculation */
-#define R_IA_64_NONE 0 /* None */
-#define R_IA_64_IMM14 0x21 /* immediate14 S + A */
-#define R_IA_64_IMM22 0x22 /* immediate22 S + A */
-#define R_IA_64_IMM64 0x23 /* immediate64 S + A */
-#define R_IA_64_DIR32MSB 0x24 /* word32 MSB S + A */
-#define R_IA_64_DIR32LSB 0x25 /* word32 LSB S + A */
-#define R_IA_64_DIR64MSB 0x26 /* word64 MSB S + A */
-#define R_IA_64_DIR64LSB 0x27 /* word64 LSB S + A */
-#define R_IA_64_GPREL22 0x2a /* immediate22 @gprel(S + A) */
-#define R_IA_64_GPREL64I 0x2b /* immediate64 @gprel(S + A) */
-#define R_IA_64_GPREL32MSB 0x2c /* word32 MSB @gprel(S + A) */
-#define R_IA_64_GPREL32LSB 0x2d /* word32 LSB @gprel(S + A) */
-#define R_IA_64_GPREL64MSB 0x2e /* word64 MSB @gprel(S + A) */
-#define R_IA_64_GPREL64LSB 0x2f /* word64 LSB @gprel(S + A) */
-#define R_IA_64_LTOFF22 0x32 /* immediate22 @ltoff(S + A) */
-#define R_IA_64_LTOFF64I 0x33 /* immediate64 @ltoff(S + A) */
-#define R_IA_64_PLTOFF22 0x3a /* immediate22 @pltoff(S + A) */
-#define R_IA_64_PLTOFF64I 0x3b /* immediate64 @pltoff(S + A) */
-#define R_IA_64_PLTOFF64MSB 0x3e /* word64 MSB @pltoff(S + A) */
-#define R_IA_64_PLTOFF64LSB 0x3f /* word64 LSB @pltoff(S + A) */
-#define R_IA_64_FPTR64I 0x43 /* immediate64 @fptr(S + A) */
-#define R_IA_64_FPTR32MSB 0x44 /* word32 MSB @fptr(S + A) */
-#define R_IA_64_FPTR32LSB 0x45 /* word32 LSB @fptr(S + A) */
-#define R_IA_64_FPTR64MSB 0x46 /* word64 MSB @fptr(S + A) */
-#define R_IA_64_FPTR64LSB 0x47 /* word64 LSB @fptr(S + A) */
-#define R_IA_64_PCREL60B 0x48 /* immediate60 form1 S + A - P */
-#define R_IA_64_PCREL21B 0x49 /* immediate21 form1 S + A - P */
-#define R_IA_64_PCREL21M 0x4a /* immediate21 form2 S + A - P */
-#define R_IA_64_PCREL21F 0x4b /* immediate21 form3 S + A - P */
-#define R_IA_64_PCREL32MSB 0x4c /* word32 MSB S + A - P */
-#define R_IA_64_PCREL32LSB 0x4d /* word32 LSB S + A - P */
-#define R_IA_64_PCREL64MSB 0x4e /* word64 MSB S + A - P */
-#define R_IA_64_PCREL64LSB 0x4f /* word64 LSB S + A - P */
-#define R_IA_64_LTOFF_FPTR22 0x52 /* immediate22 @ltoff(@fptr(S + A)) */
-#define R_IA_64_LTOFF_FPTR64I 0x53 /* immediate64 @ltoff(@fptr(S + A)) */
-#define R_IA_64_LTOFF_FPTR32MSB 0x54 /* word32 MSB @ltoff(@fptr(S + A)) */
-#define R_IA_64_LTOFF_FPTR32LSB 0x55 /* word32 LSB @ltoff(@fptr(S + A)) */
-#define R_IA_64_LTOFF_FPTR64MSB 0x56 /* word64 MSB @ltoff(@fptr(S + A)) */
-#define R_IA_64_LTOFF_FPTR64LSB 0x57 /* word64 LSB @ltoff(@fptr(S + A)) */
-#define R_IA_64_SEGREL32MSB 0x5c /* word32 MSB @segrel(S + A) */
-#define R_IA_64_SEGREL32LSB 0x5d /* word32 LSB @segrel(S + A) */
-#define R_IA_64_SEGREL64MSB 0x5e /* word64 MSB @segrel(S + A) */
-#define R_IA_64_SEGREL64LSB 0x5f /* word64 LSB @segrel(S + A) */
-#define R_IA_64_SECREL32MSB 0x64 /* word32 MSB @secrel(S + A) */
-#define R_IA_64_SECREL32LSB 0x65 /* word32 LSB @secrel(S + A) */
-#define R_IA_64_SECREL64MSB 0x66 /* word64 MSB @secrel(S + A) */
-#define R_IA_64_SECREL64LSB 0x67 /* word64 LSB @secrel(S + A) */
-#define R_IA_64_REL32MSB 0x6c /* word32 MSB BD + A */
-#define R_IA_64_REL32LSB 0x6d /* word32 LSB BD + A */
-#define R_IA_64_REL64MSB 0x6e /* word64 MSB BD + A */
-#define R_IA_64_REL64LSB 0x6f /* word64 LSB BD + A */
-#define R_IA_64_LTV32MSB 0x74 /* word32 MSB S + A */
-#define R_IA_64_LTV32LSB 0x75 /* word32 LSB S + A */
-#define R_IA_64_LTV64MSB 0x76 /* word64 MSB S + A */
-#define R_IA_64_LTV64LSB 0x77 /* word64 LSB S + A */
-#define R_IA_64_PCREL21BI 0x79 /* immediate21 form1 S + A - P */
-#define R_IA_64_PCREL22 0x7a /* immediate22 S + A - P */
-#define R_IA_64_PCREL64I 0x7b /* immediate64 S + A - P */
-#define R_IA_64_IPLTMSB 0x80 /* function descriptor MSB special */
-#define R_IA_64_IPLTLSB 0x81 /* function descriptor LSB speciaal */
-#define R_IA_64_SUB 0x85 /* immediate64 A - S */
-#define R_IA_64_LTOFF22X 0x86 /* immediate22 special */
-#define R_IA_64_LDXMOV 0x87 /* immediate22 special */
-#define R_IA_64_TPREL14 0x91 /* imm14 @tprel(S + A) */
-#define R_IA_64_TPREL22 0x92 /* imm22 @tprel(S + A) */
-#define R_IA_64_TPREL64I 0x93 /* imm64 @tprel(S + A) */
-#define R_IA_64_TPREL64MSB 0x96 /* word64 MSB @tprel(S + A) */
-#define R_IA_64_TPREL64LSB 0x97 /* word64 LSB @tprel(S + A) */
-#define R_IA_64_LTOFF_TPREL22 0x9a /* imm22 @ltoff(@tprel(S+A)) */
-#define R_IA_64_DTPMOD64MSB 0xa6 /* word64 MSB @dtpmod(S + A) */
-#define R_IA_64_DTPMOD64LSB 0xa7 /* word64 LSB @dtpmod(S + A) */
-#define R_IA_64_LTOFF_DTPMOD22 0xaa /* imm22 @ltoff(@dtpmod(S+A)) */
-#define R_IA_64_DTPREL14 0xb1 /* imm14 @dtprel(S + A) */
-#define R_IA_64_DTPREL22 0xb2 /* imm22 @dtprel(S + A) */
-#define R_IA_64_DTPREL64I 0xb3 /* imm64 @dtprel(S + A) */
-#define R_IA_64_DTPREL32MSB 0xb4 /* word32 MSB @dtprel(S + A) */
-#define R_IA_64_DTPREL32LSB 0xb5 /* word32 LSB @dtprel(S + A) */
-#define R_IA_64_DTPREL64MSB 0xb6 /* word64 MSB @dtprel(S + A) */
-#define R_IA_64_DTPREL64LSB 0xb7 /* word64 LSB @dtprel(S + A) */
-#define R_IA_64_LTOFF_DTPREL22 0xba /* imm22 @ltoff(@dtprel(S+A)) */
-
-/* Linux style aliases */
-#define R_IA64_NONE R_IA_64_NONE
-#define R_IA64_IMM14 R_IA_64_IMM14
-#define R_IA64_IMM22 R_IA_64_IMM22
-#define R_IA64_IMM64 R_IA_64_IMM64
-#define R_IA64_DIR32MSB R_IA_64_DIR32MSB
-#define R_IA64_DIR32LSB R_IA_64_DIR32LSB
-#define R_IA64_DIR64MSB R_IA_64_DIR64MSB
-#define R_IA64_DIR64LSB R_IA_64_DIR64LSB
-#define R_IA64_GPREL22 R_IA_64_GPREL22
-#define R_IA64_GPREL64I R_IA_64_GPREL64I
-#define R_IA64_GPREL32MSB R_IA_64_GPREL32MSB
-#define R_IA64_GPREL32LSB R_IA_64_GPREL32LSB
-#define R_IA64_GPREL64MSB R_IA_64_GPREL64MSB
-#define R_IA64_GPREL64LSB R_IA_64_GPREL64LSB
-#define R_IA64_LTOFF22 R_IA_64_LTOFF22
-#define R_IA64_LTOFF64I R_IA_64_LTOFF64I
-#define R_IA64_PLTOFF22 R_IA_64_PLTOFF22
-#define R_IA64_PLTOFF64I R_IA_64_PLTOFF64I
-#define R_IA64_PLTOFF64MSB R_IA_64_PLTOFF64MSB
-#define R_IA64_PLTOFF64LSB R_IA_64_PLTOFF64LSB
-#define R_IA64_FPTR64I R_IA_64_FPTR64I
-#define R_IA64_FPTR32MSB R_IA_64_FPTR32MSB
-#define R_IA64_FPTR32LSB R_IA_64_FPTR32LSB
-#define R_IA64_FPTR64MSB R_IA_64_FPTR64MSB
-#define R_IA64_FPTR64LSB R_IA_64_FPTR64LSB
-#define R_IA64_PCREL60B R_IA_64_PCREL60B
-#define R_IA64_PCREL21B R_IA_64_PCREL21B
-#define R_IA64_PCREL21M R_IA_64_PCREL21M
-#define R_IA64_PCREL21F R_IA_64_PCREL21F
-#define R_IA64_PCREL32MSB R_IA_64_PCREL32MSB
-#define R_IA64_PCREL32LSB R_IA_64_PCREL32LSB
-#define R_IA64_PCREL64MSB R_IA_64_PCREL64MSB
-#define R_IA64_PCREL64LSB R_IA_64_PCREL64LSB
-#define R_IA64_LTOFF_FPTR22 R_IA_64_LTOFF_FPTR22
-#define R_IA64_LTOFF_FPTR64I R_IA_64_LTOFF_FPTR64I
-#define R_IA64_LTOFF_FPTR32MSB R_IA_64_LTOFF_FPTR32MSB
-#define R_IA64_LTOFF_FPTR32LSB R_IA_64_LTOFF_FPTR32LSB
-#define R_IA64_LTOFF_FPTR64MSB R_IA_64_LTOFF_FPTR64MSB
-#define R_IA64_LTOFF_FPTR64LSB R_IA_64_LTOFF_FPTR64LSB
-#define R_IA64_SEGREL32MSB R_IA_64_SEGREL32MSB
-#define R_IA64_SEGREL32LSB R_IA_64_SEGREL32LSB
-#define R_IA64_SEGREL64MSB R_IA_64_SEGREL64MSB
-#define R_IA64_SEGREL64LSB R_IA_64_SEGREL64LSB
-#define R_IA64_SECREL32MSB R_IA_64_SECREL32MSB
-#define R_IA64_SECREL32LSB R_IA_64_SECREL32LSB
-#define R_IA64_SECREL64MSB R_IA_64_SECREL64MSB
-#define R_IA64_SECREL64LSB R_IA_64_SECREL64LSB
-#define R_IA64_REL32MSB R_IA_64_REL32MSB
-#define R_IA64_REL32LSB R_IA_64_REL32LSB
-#define R_IA64_REL64MSB R_IA_64_REL64MSB
-#define R_IA64_REL64LSB R_IA_64_REL64LSB
-#define R_IA64_LTV32MSB R_IA_64_LTV32MSB
-#define R_IA64_LTV32LSB R_IA_64_LTV32LSB
-#define R_IA64_LTV64MSB R_IA_64_LTV64MSB
-#define R_IA64_LTV64LSB R_IA_64_LTV64LSB
-#define R_IA64_PCREL21BI R_IA_64_PCREL21BI
-#define R_IA64_PCREL22 R_IA_64_PCREL22
-#define R_IA64_PCREL64I R_IA_64_PCREL64I
-#define R_IA64_IPLTMSB R_IA_64_IPLTMSB
-#define R_IA64_IPLTLSB R_IA_64_IPLTLSB
-#define R_IA64_SUB R_IA_64_SUB
-#define R_IA64_LTOFF22X R_IA_64_LTOFF22X
-#define R_IA64_LDXMOV R_IA_64_LDXMOV
-#define R_IA64_TPREL14 R_IA_64_TPREL14
-#define R_IA64_TPREL22 R_IA_64_TPREL22
-#define R_IA64_TPREL64I R_IA_64_TPREL64I
-#define R_IA64_TPREL64MSB R_IA_64_TPREL64MSB
-#define R_IA64_TPREL64LSB R_IA_64_TPREL64LSB
-#define R_IA64_LTOFF_TPREL22 R_IA_64_LTOFF_TPREL22
-#define R_IA64_DTPMOD64MSB R_IA_64_DTPMOD64MSB
-#define R_IA64_DTPMOD64LSB R_IA_64_DTPMOD64LSB
-#define R_IA64_LTOFF_DTPMOD22 R_IA_64_LTOFF_DTPMOD22
-#define R_IA64_DTPREL14 R_IA_64_DTPREL14
-#define R_IA64_DTPREL22 R_IA_64_DTPREL22
-#define R_IA64_DTPREL64I R_IA_64_DTPREL64I
-#define R_IA64_DTPREL32MSB R_IA_64_DTPREL32MSB
-#define R_IA64_DTPREL32LSB R_IA_64_DTPREL32LSB
-#define R_IA64_DTPREL64MSB R_IA_64_DTPREL64MSB
-#define R_IA64_DTPREL64LSB R_IA_64_DTPREL64LSB
-#define R_IA64_LTOFF_DTPREL22 R_IA_64_LTOFF_DTPREL22
-
-#define R_MIPS_NONE 0 /* No reloc */
-#define R_MIPS_16 1 /* Direct 16 bit */
-#define R_MIPS_32 2 /* Direct 32 bit */
-#define R_MIPS_REL32 3 /* PC relative 32 bit */
-#define R_MIPS_26 4 /* Direct 26 bit shifted */
-#define R_MIPS_HI16 5 /* High 16 bit */
-#define R_MIPS_LO16 6 /* Low 16 bit */
-#define R_MIPS_GPREL16 7 /* GP relative 16 bit */
-#define R_MIPS_LITERAL 8 /* 16 bit literal entry */
-#define R_MIPS_GOT16 9 /* 16 bit GOT entry */
-#define R_MIPS_PC16 10 /* PC relative 16 bit */
-#define R_MIPS_CALL16 11 /* 16 bit GOT entry for function */
-#define R_MIPS_GPREL32 12 /* GP relative 32 bit */
-#define R_MIPS_64 18 /* Direct 64 bit */
-#define R_MIPS_GOTHI16 21 /* GOT HI 16 bit */
-#define R_MIPS_GOTLO16 22 /* GOT LO 16 bit */
-#define R_MIPS_CALLHI16 30 /* upper 16 bit GOT entry for function */
-#define R_MIPS_CALLLO16 31 /* lower 16 bit GOT entry for function */
-
-#define R_PPC_NONE 0 /* No relocation. */
-#define R_PPC_ADDR32 1
-#define R_PPC_ADDR24 2
-#define R_PPC_ADDR16 3
-#define R_PPC_ADDR16_LO 4
-#define R_PPC_ADDR16_HI 5
-#define R_PPC_ADDR16_HA 6
-#define R_PPC_ADDR14 7
-#define R_PPC_ADDR14_BRTAKEN 8
-#define R_PPC_ADDR14_BRNTAKEN 9
-#define R_PPC_REL24 10
-#define R_PPC_REL14 11
-#define R_PPC_REL14_BRTAKEN 12
-#define R_PPC_REL14_BRNTAKEN 13
-#define R_PPC_GOT16 14
-#define R_PPC_GOT16_LO 15
-#define R_PPC_GOT16_HI 16
-#define R_PPC_GOT16_HA 17
-#define R_PPC_PLTREL24 18
-#define R_PPC_COPY 19
-#define R_PPC_GLOB_DAT 20
-#define R_PPC_JMP_SLOT 21
-#define R_PPC_RELATIVE 22
-#define R_PPC_LOCAL24PC 23
-#define R_PPC_UADDR32 24
-#define R_PPC_UADDR16 25
-#define R_PPC_REL32 26
-#define R_PPC_PLT32 27
-#define R_PPC_PLTREL32 28
-#define R_PPC_PLT16_LO 29
-#define R_PPC_PLT16_HI 30
-#define R_PPC_PLT16_HA 31
-#define R_PPC_SDAREL16 32
-#define R_PPC_SECTOFF 33
-#define R_PPC_SECTOFF_LO 34
-#define R_PPC_SECTOFF_HI 35
-#define R_PPC_SECTOFF_HA 36
-
-/*
- * 64-bit relocations
- */
-#define R_PPC64_ADDR64 38
-#define R_PPC64_ADDR16_HIGHER 39
-#define R_PPC64_ADDR16_HIGHERA 40
-#define R_PPC64_ADDR16_HIGHEST 41
-#define R_PPC64_ADDR16_HIGHESTA 42
-#define R_PPC64_UADDR64 43
-#define R_PPC64_REL64 44
-#define R_PPC64_PLT64 45
-#define R_PPC64_PLTREL64 46
-#define R_PPC64_TOC16 47
-#define R_PPC64_TOC16_LO 48
-#define R_PPC64_TOC16_HI 49
-#define R_PPC64_TOC16_HA 50
-#define R_PPC64_TOC 51
-#define R_PPC64_DTPMOD64 68
-#define R_PPC64_TPREL64 73
-#define R_PPC64_DTPREL64 78
-
-/*
- * TLS relocations
- */
-#define R_PPC_TLS 67
-#define R_PPC_DTPMOD32 68
-#define R_PPC_TPREL16 69
-#define R_PPC_TPREL16_LO 70
-#define R_PPC_TPREL16_HI 71
-#define R_PPC_TPREL16_HA 72
-#define R_PPC_TPREL32 73
-#define R_PPC_DTPREL16 74
-#define R_PPC_DTPREL16_LO 75
-#define R_PPC_DTPREL16_HI 76
-#define R_PPC_DTPREL16_HA 77
-#define R_PPC_DTPREL32 78
-#define R_PPC_GOT_TLSGD16 79
-#define R_PPC_GOT_TLSGD16_LO 80
-#define R_PPC_GOT_TLSGD16_HI 81
-#define R_PPC_GOT_TLSGD16_HA 82
-#define R_PPC_GOT_TLSLD16 83
-#define R_PPC_GOT_TLSLD16_LO 84
-#define R_PPC_GOT_TLSLD16_HI 85
-#define R_PPC_GOT_TLSLD16_HA 86
-#define R_PPC_GOT_TPREL16 87
-#define R_PPC_GOT_TPREL16_LO 88
-#define R_PPC_GOT_TPREL16_HI 89
-#define R_PPC_GOT_TPREL16_HA 90
-
-/*
- * The remaining relocs are from the Embedded ELF ABI, and are not in the
- * SVR4 ELF ABI.
- */
-
-#define R_PPC_EMB_NADDR32 101
-#define R_PPC_EMB_NADDR16 102
-#define R_PPC_EMB_NADDR16_LO 103
-#define R_PPC_EMB_NADDR16_HI 104
-#define R_PPC_EMB_NADDR16_HA 105
-#define R_PPC_EMB_SDAI16 106
-#define R_PPC_EMB_SDA2I16 107
-#define R_PPC_EMB_SDA2REL 108
-#define R_PPC_EMB_SDA21 109
-#define R_PPC_EMB_MRKREF 110
-#define R_PPC_EMB_RELSEC16 111
-#define R_PPC_EMB_RELST_LO 112
-#define R_PPC_EMB_RELST_HI 113
-#define R_PPC_EMB_RELST_HA 114
-#define R_PPC_EMB_BIT_FLD 115
-#define R_PPC_EMB_RELSDA 116
-
-#define R_SH_NONE 0
-#define R_SH_DIR32 1
-#define R_SH_REL32 2
-#define R_SH_DIR8WPN 3
-#define R_SH_IND12W 4
-#define R_SH_DIR8WPL 5
-#define R_SH_DIR8WPZ 6
-#define R_SH_DIR8BP 7
-#define R_SH_DIR8W 8
-#define R_SH_DIR8L 9
-#define R_SH_GOT32 0xa0
-#define R_SH_PLT32 0xa1
-#define R_SH_COPY 0xa2
-#define R_SH_GLOB_DAT 0xa3
-#define R_SH_JMP_SLOT 0xa4
-#define R_SH_RELATIVE 0xa5
-#define R_SH_GOTOFF 0xa6
-#define R_SH_GOTPC 0xa7
-
-#define R_SPARC_NONE 0
-#define R_SPARC_8 1
-#define R_SPARC_16 2
-#define R_SPARC_32 3
-#define R_SPARC_DISP8 4
-#define R_SPARC_DISP16 5
-#define R_SPARC_DISP32 6
-#define R_SPARC_WDISP30 7
-#define R_SPARC_WDISP22 8
-#define R_SPARC_HI22 9
-#define R_SPARC_22 10
-#define R_SPARC_13 11
-#define R_SPARC_LO10 12
-#define R_SPARC_GOT10 13
-#define R_SPARC_GOT13 14
-#define R_SPARC_GOT22 15
-#define R_SPARC_PC10 16
-#define R_SPARC_PC22 17
-#define R_SPARC_WPLT30 18
-#define R_SPARC_COPY 19
-#define R_SPARC_GLOB_DAT 20
-#define R_SPARC_JMP_SLOT 21
-#define R_SPARC_RELATIVE 22
-#define R_SPARC_UA32 23
-#define R_SPARC_PLT32 24
-#define R_SPARC_HIPLT22 25
-#define R_SPARC_LOPLT10 26
-#define R_SPARC_PCPLT32 27
-#define R_SPARC_PCPLT22 28
-#define R_SPARC_PCPLT10 29
-#define R_SPARC_10 30
-#define R_SPARC_11 31
-#define R_SPARC_64 32
-#define R_SPARC_OLO10 33
-#define R_SPARC_HH22 34
-#define R_SPARC_HM10 35
-#define R_SPARC_LM22 36
-#define R_SPARC_PC_HH22 37
-#define R_SPARC_PC_HM10 38
-#define R_SPARC_PC_LM22 39
-#define R_SPARC_WDISP16 40
-#define R_SPARC_WDISP19 41
-#define R_SPARC_GLOB_JMP 42
-#define R_SPARC_7 43
-#define R_SPARC_5 44
-#define R_SPARC_6 45
-#define R_SPARC_DISP64 46
-#define R_SPARC_PLT64 47
-#define R_SPARC_HIX22 48
-#define R_SPARC_LOX10 49
-#define R_SPARC_H44 50
-#define R_SPARC_M44 51
-#define R_SPARC_L44 52
-#define R_SPARC_REGISTER 53
-#define R_SPARC_UA64 54
-#define R_SPARC_UA16 55
-#define R_SPARC_TLS_GD_HI22 56
-#define R_SPARC_TLS_GD_LO10 57
-#define R_SPARC_TLS_GD_ADD 58
-#define R_SPARC_TLS_GD_CALL 59
-#define R_SPARC_TLS_LDM_HI22 60
-#define R_SPARC_TLS_LDM_LO10 61
-#define R_SPARC_TLS_LDM_ADD 62
-#define R_SPARC_TLS_LDM_CALL 63
-#define R_SPARC_TLS_LDO_HIX22 64
-#define R_SPARC_TLS_LDO_LOX10 65
-#define R_SPARC_TLS_LDO_ADD 66
-#define R_SPARC_TLS_IE_HI22 67
-#define R_SPARC_TLS_IE_LO10 68
-#define R_SPARC_TLS_IE_LD 69
-#define R_SPARC_TLS_IE_LDX 70
-#define R_SPARC_TLS_IE_ADD 71
-#define R_SPARC_TLS_LE_HIX22 72
-#define R_SPARC_TLS_LE_LOX10 73
-#define R_SPARC_TLS_DTPMOD32 74
-#define R_SPARC_TLS_DTPMOD64 75
-#define R_SPARC_TLS_DTPOFF32 76
-#define R_SPARC_TLS_DTPOFF64 77
-#define R_SPARC_TLS_TPOFF32 78
-#define R_SPARC_TLS_TPOFF64 79
-
-#define R_X86_64_NONE 0 /* No relocation. */
-#define R_X86_64_64 1 /* Add 64 bit symbol value. */
-#define R_X86_64_PC32 2 /* PC-relative 32 bit signed sym value. */
-#define R_X86_64_GOT32 3 /* PC-relative 32 bit GOT offset. */
-#define R_X86_64_PLT32 4 /* PC-relative 32 bit PLT offset. */
-#define R_X86_64_COPY 5 /* Copy data from shared object. */
-#define R_X86_64_GLOB_DAT 6 /* Set GOT entry to data address. */
-#define R_X86_64_JMP_SLOT 7 /* Set GOT entry to code address. */
-#define R_X86_64_RELATIVE 8 /* Add load address of shared object. */
-#define R_X86_64_GOTPCREL 9 /* Add 32 bit signed pcrel offset to GOT. */
-#define R_X86_64_32 10 /* Add 32 bit zero extended symbol value */
-#define R_X86_64_32S 11 /* Add 32 bit sign extended symbol value */
-#define R_X86_64_16 12 /* Add 16 bit zero extended symbol value */
-#define R_X86_64_PC16 13 /* Add 16 bit signed extended pc relative symbol value */
-#define R_X86_64_8 14 /* Add 8 bit zero extended symbol value */
-#define R_X86_64_PC8 15 /* Add 8 bit signed extended pc relative symbol value */
-#define R_X86_64_DTPMOD64 16 /* ID of module containing symbol */
-#define R_X86_64_DTPOFF64 17 /* Offset in TLS block */
-#define R_X86_64_TPOFF64 18 /* Offset in static TLS block */
-#define R_X86_64_TLSGD 19 /* PC relative offset to GD GOT entry */
-#define R_X86_64_TLSLD 20 /* PC relative offset to LD GOT entry */
-#define R_X86_64_DTPOFF32 21 /* Offset in TLS block */
-#define R_X86_64_GOTTPOFF 22 /* PC relative offset to IE GOT entry */
-#define R_X86_64_TPOFF32 23 /* Offset in static TLS block */
-#define R_X86_64_IRELATIVE 37
-
-#define R_390_NONE 0
-#define R_390_8 1
-#define R_390_12 2
-#define R_390_16 3
-#define R_390_32 4
-#define R_390_PC32 5
-#define R_390_GOT12 6
-#define R_390_GOT32 7
-#define R_390_PLT32 8
-#define R_390_COPY 9
-#define R_390_GLOB_DAT 10
-#define R_390_JMP_SLOT 11
-#define R_390_RELATIVE 12
-#define R_390_GOTOFF 13
-#define R_390_GOTPC 14
-#define R_390_GOT16 15
-#define R_390_PC16 16
-#define R_390_PC16DBL 17
-#define R_390_PLT16DBL 18
-#define R_390_PC32DBL 19
-#define R_390_PLT32DBL 20
-#define R_390_GOTPCDBL 21
-#define R_390_64 22
-#define R_390_PC64 23
-#define R_390_GOT64 24
-#define R_390_PLT64 25
-#define R_390_GOTENT 26
-
-#endif /* !_SYS_ELF_COMMON_H_ */
diff --git a/winsup/cygwin/include/sys/elf_generic.h b/winsup/cygwin/include/sys/elf_generic.h
deleted file mode 100644
index 95a682f25..000000000
--- a/winsup/cygwin/include/sys/elf_generic.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*-
- * Copyright (c) 1998 John D. Polstra.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _SYS_ELF_GENERIC_H_
-#define _SYS_ELF_GENERIC_H_ 1
-
-#include <sys/cdefs.h>
-
-/*
- * Definitions of generic ELF names which relieve applications from
- * needing to know the word size.
- */
-
-#if __ELF_WORD_SIZE != 32 && __ELF_WORD_SIZE != 64
-#error "__ELF_WORD_SIZE must be defined as 32 or 64"
-#endif
-
-#define ELF_CLASS __CONCAT(ELFCLASS,__ELF_WORD_SIZE)
-
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define ELF_DATA ELFDATA2LSB
-#elif BYTE_ORDER == BIG_ENDIAN
-#define ELF_DATA ELFDATA2MSB
-#else
-#error "Unknown byte order"
-#endif
-
-#define __elfN(x) __CONCAT(__CONCAT(__CONCAT(elf,__ELF_WORD_SIZE),_),x)
-#define __ElfN(x) __CONCAT(__CONCAT(__CONCAT(Elf,__ELF_WORD_SIZE),_),x)
-#define __ELFN(x) __CONCAT(__CONCAT(__CONCAT(ELF,__ELF_WORD_SIZE),_),x)
-#define __ElfType(x) typedef __ElfN(x) __CONCAT(Elf_,x)
-
-__ElfType(Addr);
-__ElfType(Half);
-__ElfType(Off);
-__ElfType(Sword);
-__ElfType(Word);
-__ElfType(Ehdr);
-__ElfType(Shdr);
-__ElfType(Phdr);
-__ElfType(Dyn);
-__ElfType(Rel);
-__ElfType(Rela);
-__ElfType(Sym);
-__ElfType(Verdef);
-__ElfType(Verdaux);
-__ElfType(Verneed);
-__ElfType(Vernaux);
-__ElfType(Versym);
-
-/* Non-standard ELF types. */
-__ElfType(Hashelt);
-__ElfType(Size);
-__ElfType(Ssize);
-
-#define ELF_R_SYM __ELFN(R_SYM)
-#define ELF_R_TYPE __ELFN(R_TYPE)
-#define ELF_R_INFO __ELFN(R_INFO)
-#define ELF_ST_BIND __ELFN(ST_BIND)
-#define ELF_ST_TYPE __ELFN(ST_TYPE)
-#define ELF_ST_INFO __ELFN(ST_INFO)
-
-#endif /* !_SYS_ELF_GENERIC_H_ */
diff --git a/winsup/cygwin/include/sys/file.h b/winsup/cygwin/include/sys/file.h
deleted file mode 100644
index 6dabeb70c..000000000
--- a/winsup/cygwin/include/sys/file.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* This is file FILE.H */
-/*
-** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
-**
-** This file is distributed under the terms listed in the document
-** "copying.dj", available from DJ Delorie at the address above.
-** A copy of "copying.dj" should accompany this file; if not, a copy
-** should be available from where this file was obtained. This file
-** may not be distributed without a verbatim copy of "copying.dj".
-**
-** This file is distributed WITHOUT ANY WARRANTY; without even the implied
-** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-/*
- * 2003-11-27 Nicholas Wourms <nwourms@netscape.net>:
- *
- * Include sys/cdefs.h. Add function prototype for flock().
- * Add some comments from BSD's header for further clarity.
- * (L_SET, L_CURR, L_INCR, L_XTND): Redefine as the macros
- * SEEK_SET, SEEK_CUR, SEEK_CUR, & SEEK_END respectively.
- * (LOCK_SH,LOCK_EX,LOCK_NB,LOCK_UN): New macros for flock().
-*/
-#ifndef _FILE_H_
-#define _FILE_H_
-
-#include <fcntl.h>
-
-/* Whence values for lseek(); renamed by POSIX 1003.1 */
-#define L_SET SEEK_SET
-#define L_CURR SEEK_CUR
-#define L_INCR SEEK_CUR
-#define L_XTND SEEK_END
-
-/* Including <sys/file.h> always defines flock & macros. */
-#if __BSD_VISIBLE - 0 == 0
-
-#define LOCK_SH 0x01 /* shared file lock */
-#define LOCK_EX 0x02 /* exclusive file lock */
-#define LOCK_NB 0x04 /* don't block when locking */
-#define LOCK_UN 0x08 /* unlock file */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-extern int flock _PARAMS ((int, int));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-#endif
diff --git a/winsup/cygwin/include/sys/ioctl.h b/winsup/cygwin/include/sys/ioctl.h
deleted file mode 100644
index 9c0c08157..000000000
--- a/winsup/cygwin/include/sys/ioctl.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* sys/ioctl.h
-
- Copyright 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* sys/ioctl.h */
-
-#ifndef _SYS_IOCTL_H
-#define _SYS_IOCTL_H
-
-#include <sys/cdefs.h>
-#include <sys/termios.h>
-
-__BEGIN_DECLS
-
-/* /dev/windows ioctls */
-
-#define WINDOWS_POST 0 /* Set write() behavior to PostMessage() */
-#define WINDOWS_SEND 1 /* Set write() behavior to SendMessage() */
-#define WINDOWS_HWND 2 /* Set hWnd for read() calls */
-
-/* Some standard linux defines */
-
-#define _IOC_NRBITS 8
-#define _IOC_TYPEBITS 8
-#define _IOC_SIZEBITS 14
-#define _IOC_DIRBITS 2
-
-#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
-#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
-#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
-#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
-
-#define _IOC_NRSHIFT 0
-#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
-#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
-#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
-
-#define _IOC_NONE 0U
-#define _IOC_WRITE 1U
-#define _IOC_READ 2U
-
-#define _IOC(dir,type,nr,size) \
- (((dir) << _IOC_DIRSHIFT) | \
- + ((type) << _IOC_TYPESHIFT) | \
- + ((nr) << _IOC_NRSHIFT) | \
- + ((size) << _IOC_SIZESHIFT))
-
-#define _LINUX_IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
-#define _LINUX_IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
-#define _LINUX_IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
-#define _LINUX_IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
-
-#ifdef __USE_LINUX_IOCTL_DEFS
-# define _IO _LINUX_IO
-# define _IOR _LINUX_IOR
-# define _IOW _LINUX_IOW
-# define _IOWR _LINUX_IOWR
-#endif /*__USE_LINUX_IOCTL_DEFS */
-
-int __cdecl ioctl (int __fd, int __cmd, ...);
-
-__END_DECLS
-#endif
diff --git a/winsup/cygwin/include/sys/ipc.h b/winsup/cygwin/include/sys/ipc.h
deleted file mode 100644
index 9a4095733..000000000
--- a/winsup/cygwin/include/sys/ipc.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* sys/ipc.h
-
- Copyright 2001, 2002, 2003 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* sys/ipc.h header file for Cygwin. */
-
-#ifndef _SYS_IPC_H
-#define _SYS_IPC_H
-
-#include <cygwin/ipc.h>
-
-#endif /* _SYS_IPC_H */
diff --git a/winsup/cygwin/include/sys/kd.h b/winsup/cygwin/include/sys/kd.h
deleted file mode 100644
index 5900efdd7..000000000
--- a/winsup/cygwin/include/sys/kd.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* sys/kd.h
-
- Copyright 2006 Red Hat, Inc.
-
- Written by Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* sys/kd.h header file for Cygwin. */
-
-#ifndef _SYS_KD_H
-#define _SYS_KD_H
-
-#include <cygwin/kd.h>
-
-#endif /* _SYS_KD_H */
diff --git a/winsup/cygwin/include/sys/lock.h b/winsup/cygwin/include/sys/lock.h
deleted file mode 100644
index cf4d17846..000000000
--- a/winsup/cygwin/include/sys/lock.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* sys/lock.h
-
- Copyright 2004, 2005 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_LOCK_H_
-#define _SYS_LOCK_H_
-
-typedef void *_LOCK_T;
-#define _LOCK_RECURSIVE_T _LOCK_T
-
-/*
- * This must match cygwins PTHREAD_XXX_MUTEX_INITIALIZER_NP which are
- * defined in <pthread.h>
- */
-#define _LOCK_T_RECURSIVE_INITIALIZER ((_LOCK_T)18)
-#define _LOCK_T_INITIALIZER ((_LOCK_T)19)
-
-#define __LOCK_INIT(CLASS,NAME) \
- CLASS _LOCK_T NAME = _LOCK_T_INITIALIZER;
-#define __LOCK_INIT_RECURSIVE(CLASS,NAME) \
- CLASS _LOCK_T NAME = _LOCK_T_RECURSIVE_INITIALIZER;
-
-#define __lock_init(__lock) __cygwin_lock_init(&__lock)
-#define __lock_init_recursive(__lock) __cygwin_lock_init_recursive(&__lock)
-#define __lock_close(__lock) __cygwin_lock_fini(&__lock)
-#define __lock_close_recursive(__lock) __cygwin_lock_fini(&__lock)
-#define __lock_acquire(__lock) __cygwin_lock_lock(&__lock)
-#define __lock_acquire_recursive(__lock) __cygwin_lock_lock(&__lock)
-#define __lock_try_acquire(lock) __cygwin_lock_trylock(&__lock)
-#define __lock_try_acquire_recursive(lock) __cygwin_lock_trylock(&__lock)
-#define __lock_release(__lock) __cygwin_lock_unlock(&__lock)
-#define __lock_release_recursive(__lock) __cygwin_lock_unlock(&__lock)
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-void __cygwin_lock_init(_LOCK_T *);
-void __cygwin_lock_init_recursive(_LOCK_T *);
-void __cygwin_lock_fini(_LOCK_T *);
-void __cygwin_lock_lock(_LOCK_T *);
-int __cygwin_lock_trylock(_LOCK_T *);
-void __cygwin_lock_unlock(_LOCK_T *);
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/winsup/cygwin/include/sys/mman.h b/winsup/cygwin/include/sys/mman.h
deleted file mode 100644
index 6942c2ad8..000000000
--- a/winsup/cygwin/include/sys/mman.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* sys/mman.h
-
- Copyright 1996, 1997, 1998, 2000, 2001, 2003, 2005, 2007, 2011 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_MMAN_H_
-#define _SYS_MMAN_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include <stddef.h>
-#include <sys/types.h>
-
-#define PROT_NONE 0
-#define PROT_READ 1
-#define PROT_WRITE 2
-#define PROT_EXEC 4
-
-#define MAP_FILE 0
-#define MAP_SHARED 1
-#define MAP_PRIVATE 2
-#define MAP_TYPE 0xF
-#define MAP_FIXED 0x10
-#define MAP_ANONYMOUS 0x20
-#define MAP_ANON MAP_ANONYMOUS
-/* Non-standard flag */
-#define MAP_NORESERVE 0x4000 /* Don't reserve swap space for this mapping.
- Page protection must be set explicitely
- to access page. Only supported for anonymous
- private mappings. */
-#define MAP_AUTOGROW 0x8000 /* Grow underlying object to mapping size.
- File must be opened for writing. */
-
-#define MAP_FAILED ((void *)-1)
-
-/*
- * Flags for msync.
- */
-#define MS_ASYNC 1
-#define MS_SYNC 2
-#define MS_INVALIDATE 4
-
-/*
- * Flags for posix_madvise.
- */
-#define POSIX_MADV_NORMAL 0
-#define POSIX_MADV_SEQUENTIAL 1
-#define POSIX_MADV_RANDOM 2
-#define POSIX_MADV_WILLNEED 3
-#define POSIX_MADV_DONTNEED 4
-
-/*
- * Flags for madvise. BSD/Linux-specific.
- */
-#define MADV_NORMAL 0
-#define MADV_SEQUENTIAL 1
-#define MADV_RANDOM 2
-#define MADV_WILLNEED 3
-#define MADV_DONTNEED 4
-/* Deliberately don't define these Linux-specific flags. An application
- expecting them to behave as defined would be in for a surprise. */
-#if 0
-#define MADV_REMOVE 5
-#define MADV_DONTFORK 6
-#define MADV_DOFORK 7
-#define MADV_HWPOISON 8
-#define MADV_SOFT_OFFLINE 9
-#define MADV_MERGEABLE 10
-#define MADV_UNMERGEABLE 11
-#endif
-
-#ifndef __INSIDE_CYGWIN__
-extern void *mmap (void *__addr, size_t __len, int __prot, int __flags, int __fd, off_t __off);
-#endif
-extern int munmap (void *__addr, size_t __len);
-extern int mprotect (void *__addr, size_t __len, int __prot);
-extern int msync (void *__addr, size_t __len, int __flags);
-extern int mlock (const void *__addr, size_t __len);
-extern int munlock (const void *__addr, size_t __len);
-
-extern int posix_madvise (void *__addr, size_t __len, int __advice);
-extern int madvise (void *__addr, size_t __len, int __advice);
-
-extern int shm_open (const char *__name, int __oflag, mode_t __mode);
-extern int shm_unlink (const char *__name);
-
-#ifdef __cplusplus
-};
-#endif /* __cplusplus */
-
-#endif /* _SYS_MMAN_H_ */
diff --git a/winsup/cygwin/include/sys/mount.h b/winsup/cygwin/include/sys/mount.h
deleted file mode 100644
index 458cf801f..000000000
--- a/winsup/cygwin/include/sys/mount.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* sys/mount.h
-
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2008, 2009, 2010, 2012,
- 2014 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_MOUNT_H
-#define _SYS_MOUNT_H
-
-#define BLOCK_SIZE 1024
-#define BLOCK_SIZE_BITS 10
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-enum
-{
- MOUNT_SYMLINK = 0x00001, /* "mount point" is a symlink */
- MOUNT_BINARY = 0x00002, /* "binary" format read/writes */
- MOUNT_SYSTEM = 0x00008, /* mount point came from system table */
- MOUNT_EXEC = 0x00010, /* Any file in the mounted directory
- gets 'x' bit */
- MOUNT_CYGDRIVE = 0x00020, /* mount point refers to cygdrive
- device mount */
- MOUNT_CYGWIN_EXEC = 0x00040, /* file or directory is or contains a
- cygwin executable */
- MOUNT_SPARSE = 0x00080, /* Support automatic sparsifying of
- files. */
- MOUNT_NOTEXEC = 0x00100, /* don't check files for executable magic */
- MOUNT_DEVFS = 0x00200, /* /device "filesystem" */
- MOUNT_PROC = 0x00400, /* /proc "filesystem" */
- MOUNT_RO = 0x01000, /* read-only "filesystem" */
- MOUNT_NOACL = 0x02000, /* support reading/writing ACLs */
- MOUNT_NOPOSIX = 0x04000, /* Case insensitve path handling */
- MOUNT_OVERRIDE = 0x08000, /* Allow overriding of root */
- MOUNT_IMMUTABLE = 0x10000, /* Mount point can't be changed */
- MOUNT_AUTOMATIC = 0x20000, /* Mount point was added automatically */
- MOUNT_DOS = 0x40000, /* convert leading spaces and trailing
- dots and spaces to private use area */
- MOUNT_IHASH = 0x80000, /* Enforce hash values for inode numbers */
- MOUNT_BIND = 0x100000 /* Allows bind syntax in fstab file. */
-};
-
-int mount (const char *, const char *, unsigned __flags);
-int umount (const char *);
-int cygwin_umount (const char *__path, unsigned __flags);
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _SYS_MOUNT_H */
diff --git a/winsup/cygwin/include/sys/msg.h b/winsup/cygwin/include/sys/msg.h
deleted file mode 100644
index bbcc56ec5..000000000
--- a/winsup/cygwin/include/sys/msg.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* sys/msg.h
-
- Copyright 2002, 2003 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* sys/msg.h header file for Cygwin. */
-
-#ifndef _SYS_MSG_H
-#define _SYS_MSG_H
-
-#include <cygwin/msg.h>
-
-#endif /* _SYS_MSG_H */
diff --git a/winsup/cygwin/include/sys/mtio.h b/winsup/cygwin/include/sys/mtio.h
deleted file mode 100644
index 2bd4632e9..000000000
--- a/winsup/cygwin/include/sys/mtio.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* sys/mtio.h
-
- Copyright 1999, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* sys/mtio.h header file for Cygwin. */
-
-#ifndef _SYS_MTIO_H
-#define _SYS_MTIO_H
-
-#include <cygwin/mtio.h>
-
-#endif /* _SYS_MTIO_H */
diff --git a/winsup/cygwin/include/sys/param.h b/winsup/cygwin/include/sys/param.h
deleted file mode 100644
index ff0517627..000000000
--- a/winsup/cygwin/include/sys/param.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* sys/param.h
-
- Copyright 1996, 1997, 1998, 2002, 2003, 2005, 2007, 2009, 2011, 2012 Red
- Hat, Inc.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#ifndef _SYS_PARAM_H
-#define _SYS_PARAM_H
-
-#include <sys/types.h>
-/* Linux includes limits.h, but this is not universally done. */
-#include <limits.h>
-
-#define __need_NULL
-#include <stddef.h>
-
-/* Max number of open files. The Posix version is OPEN_MAX. */
-/* Number of fds is virtually unlimited in cygwin, but we must provide
- some reasonable value for Posix conformance */
-#define NOFILE 8192
-
-/* Max number of groups; must keep in sync with NGROUPS_MAX in limits.h */
-#define NGROUPS NGROUPS_MAX
-
-/* Ticks/second for system calls such as times() */
-/* FIXME: is this the appropriate value? */
-#define HZ 1000
-
-/* Max hostname size that can be dealt with (== Win32 MAX_HOSTNAME_LEN) */
-#define MAXHOSTNAMELEN 128
-
-/* Maximum path length including trailing NUL; the Posix version is PATH_MAX.
- MAXPATHLEN is the BSD variant. */
-#define MAXPATHLEN PATH_MAX
-
-/* Maximum number of nested symlinks; the Posix version is SYMLOOP_MAX.
- MAXSYMLINKS is the BSD variant. */
-#define MAXSYMLINKS SYMLOOP_MAX
-
-/* This is the number of bytes per block given in the st_blocks stat member.
- It should be in sync with S_BLKSIZE in sys/stat.h. S_BLKSIZE is the
- BSD variant of this constant. */
-#define DEV_BSIZE 1024
-
-#ifndef NBBY
-#define NBBY 8
-#endif
-
-/* Bit map related macros. */
-#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
-#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
-#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
-#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
-
-/* Macros for counting and rounding. */
-#ifndef howmany
-#define howmany(x, y) (((x)+((y)-1))/(y))
-#endif
-#define rounddown(x, y) (((x)/(y))*(y))
-#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */
-#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */
-#define powerof2(x) ((((x)-1)&(x))==0)
-
-/* Macros for min/max. */
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define MAX(a,b) (((a)>(b))?(a):(b))
-
-#endif
diff --git a/winsup/cygwin/include/sys/poll.h b/winsup/cygwin/include/sys/poll.h
deleted file mode 100644
index 1a3a95b75..000000000
--- a/winsup/cygwin/include/sys/poll.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* sys/poll.h
-
- Copyright 2000, 2001, 2006, 2011 Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#ifndef _SYS_POLL_H
-#define _SYS_POLL_H
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <signal.h>
-
-__BEGIN_DECLS
-
-#define POLLIN 1 /* Set if data to read. */
-#define POLLPRI 2 /* Set if urgent data to read. */
-#define POLLOUT 4 /* Set if writing data wouldn't block. */
-#define POLLERR 8 /* An error occured. */
-#define POLLHUP 16 /* Shutdown or close happened. */
-#define POLLNVAL 32 /* Invalid file descriptor. */
-
-#define NPOLLFILE 64 /* Number of canonical fd's in one call to poll(). */
-
-/* The following values are defined by XPG4. */
-#define POLLRDNORM POLLIN
-#define POLLRDBAND POLLPRI
-#define POLLWRNORM POLLOUT
-#define POLLWRBAND POLLOUT
-
-struct pollfd {
- int fd;
- short events;
- short revents;
-};
-
-typedef unsigned int nfds_t;
-
-extern int poll __P ((struct pollfd *fds, nfds_t nfds, int timeout));
-extern int ppoll __P ((struct pollfd *fds, nfds_t nfds,
- const struct timespec *timeout_ts,
- const sigset_t *sigmask));
-
-__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 78485f678..000000000
--- a/winsup/cygwin/include/sys/procfs.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* sys/procfs.h
-
- Copyright 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* sys/procfs.h header file for Cygwin. */
-
-#ifndef _SYS_PROCFS_H
-#define _SYS_PROCFS_H
-
-#include <cygwin/core_dump.h>
-
-#endif /* _SYS_PROCFS_H */
diff --git a/winsup/cygwin/include/sys/quota.h b/winsup/cygwin/include/sys/quota.h
deleted file mode 100644
index 7edb53e8a..000000000
--- a/winsup/cygwin/include/sys/quota.h
+++ /dev/null
@@ -1,239 +0,0 @@
-/* Copyright (c) 1982, 1986 Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Robert Elz at The University of Melbourne.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef _SYS_QUOTA_H
-#define _SYS_QUOTA_H 1
-
-#include <features.h>
-#include <sys/types.h>
-
-/* This file is copied from Linux and kept verbatim, except for the below
- Cygwin-specific blocks. */
-
-#ifdef __CYGWIN__
-/* On Linux these defines live in <linux/quota.h>. Move them here for easier
- access. */
-/* Quota format type IDs */
-#define QFMT_VFS_OLD 1
-#define QFMT_VFS_V0 2
-#define QFMT_OCFS2 3
-#define QFMT_VFS_V1 4
-#endif
-
-/*
- * Select between different incompatible quota versions.
- * Default to the version used by Linux kernel version 2.4.22
- * or later. */
-#ifndef _LINUX_QUOTA_VERSION
-# define _LINUX_QUOTA_VERSION 2
-#endif
-
-#if defined (__CYGWIN__) && _LINUX_QUOTA_VERSION != 2
-#error Cygwin only supports quota version 2.
-#endif
-
-/*
- * Convert diskblocks to blocks and the other way around.
- * currently only to fool the BSD source. :-)
- */
-#define dbtob(num) ((num) << 10)
-#define btodb(num) ((num) >> 10)
-
-/*
- * Convert count of filesystem blocks to diskquota blocks, meant
- * for filesystems where i_blksize != BLOCK_SIZE
- */
-#define fs_to_dq_blocks(num, blksize) (((num) * (blksize)) / BLOCK_SIZE)
-
-/*
- * Definitions for disk quotas imposed on the average user
- * (big brother finally hits Linux).
- *
- * The following constants define the amount of time given a user
- * before the soft limits are treated as hard limits (usually resulting
- * in an allocation failure). The timer is started when the user crosses
- * their soft limit, it is reset when they go below their soft limit.
- */
-#define MAX_IQ_TIME 604800 /* (7*24*60*60) 1 week */
-#define MAX_DQ_TIME 604800 /* (7*24*60*60) 1 week */
-
-#define MAXQUOTAS 2
-#define USRQUOTA 0 /* element used for user quotas */
-#define GRPQUOTA 1 /* element used for group quotas */
-
-/*
- * Definitions for the default names of the quotas files.
- */
-#define INITQFNAMES { \
- "user", /* USRQUOTA */ \
- "group", /* GRPQUOTA */ \
- "undefined", \
-};
-
-#define QUOTAFILENAME "quota"
-#define QUOTAGROUP "staff"
-
-#define NR_DQHASH 43 /* Just an arbitrary number any suggestions ? */
-#define NR_DQUOTS 256 /* Number of quotas active at one time */
-
-/*
- * Command definitions for the 'quotactl' system call.
- * The commands are broken into a main command defined below
- * and a subcommand that is used to convey the type of
- * quota that is being manipulated (see above).
- */
-#define SUBCMDMASK 0x00ff
-#define SUBCMDSHIFT 8
-#define QCMD(cmd, type) (((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK))
-
-#if _LINUX_QUOTA_VERSION < 2
-# define Q_QUOTAON 0x0100 /* enable quotas */
-# define Q_QUOTAOFF 0x0200 /* disable quotas */
-# define Q_GETQUOTA 0x0300 /* get limits and usage */
-# define Q_SETQUOTA 0x0400 /* set limits and usage */
-# define Q_SETUSE 0x0500 /* set usage */
-# define Q_SYNC 0x0600 /* sync disk copy of a filesystems quotas */
-# define Q_SETQLIM 0x0700 /* set limits */
-# define Q_GETSTATS 0x0800 /* get collected stats */
-# define Q_RSQUASH 0x1000 /* set root_squash option */
-#else
-# define Q_SYNC 0x800001 /* sync disk copy of a filesystems quotas */
-# define Q_QUOTAON 0x800002 /* turn quotas on */
-# define Q_QUOTAOFF 0x800003 /* turn quotas off */
-# define Q_GETFMT 0x800004 /* get quota format used on given filesystem */
-# define Q_GETINFO 0x800005 /* get information about quota files */
-# define Q_SETINFO 0x800006 /* set information about quota files */
-# define Q_GETQUOTA 0x800007 /* get user quota structure */
-# define Q_SETQUOTA 0x800008 /* set user quota structure */
-#endif
-
-/*
- * The following structure defines the format of the disk quota file
- * (as it appears on disk) - the file is an array of these structures
- * indexed by user or group number.
- */
-#if _LINUX_QUOTA_VERSION < 2
-struct dqblk
- {
- u_int32_t dqb_bhardlimit; /* absolute limit on disk blks alloc */
- u_int32_t dqb_bsoftlimit; /* preferred limit on disk blks */
- u_int32_t dqb_curblocks; /* current block count */
- u_int32_t dqb_ihardlimit; /* maximum # allocated inodes */
- u_int32_t dqb_isoftlimit; /* preferred inode limit */
- u_int32_t dqb_curinodes; /* current # allocated inodes */
- time_t dqb_btime; /* time limit for excessive disk use */
- time_t dqb_itime; /* time limit for excessive files */
- };
-#else
-
-/* Flags that indicate which fields in dqblk structure are valid. */
-#define QIF_BLIMITS 1
-#define QIF_SPACE 2
-#define QIF_ILIMITS 4
-#define QIF_INODES 8
-#define QIF_BTIME 16
-#define QIF_ITIME 32
-#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS)
-#define QIF_USAGE (QIF_SPACE | QIF_INODES)
-#define QIF_TIMES (QIF_BTIME | QIF_ITIME)
-#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES)
-
-struct dqblk
- {
- u_int64_t dqb_bhardlimit; /* absolute limit on disk quota blocks alloc */
- u_int64_t dqb_bsoftlimit; /* preferred limit on disk quota blocks */
- u_int64_t dqb_curspace; /* current quota block count */
- u_int64_t dqb_ihardlimit; /* maximum # allocated inodes */
- u_int64_t dqb_isoftlimit; /* preferred inode limit */
- u_int64_t dqb_curinodes; /* current # allocated inodes */
- u_int64_t dqb_btime; /* time limit for excessive disk use */
- u_int64_t dqb_itime; /* time limit for excessive files */
- u_int32_t dqb_valid; /* bitmask of QIF_* constants */
- };
-#endif
-
-/*
- * Shorthand notation.
- */
-#define dq_bhardlimit dq_dqb.dqb_bhardlimit
-#define dq_bsoftlimit dq_dqb.dqb_bsoftlimit
-#if _LINUX_QUOTA_VERSION < 2
-# define dq_curblocks dq_dqb.dqb_curblocks
-#else
-# define dq_curspace dq_dqb.dqb_curspace
-# define dq_valid dq_dqb.dqb_valid
-#endif
-#define dq_ihardlimit dq_dqb.dqb_ihardlimit
-#define dq_isoftlimit dq_dqb.dqb_isoftlimit
-#define dq_curinodes dq_dqb.dqb_curinodes
-#define dq_btime dq_dqb.dqb_btime
-#define dq_itime dq_dqb.dqb_itime
-
-#define dqoff(UID) ((loff_t)((UID) * sizeof (struct dqblk)))
-
-#if _LINUX_QUOTA_VERSION < 2
-struct dqstats
- {
- u_int32_t lookups;
- u_int32_t drops;
- u_int32_t reads;
- u_int32_t writes;
- u_int32_t cache_hits;
- u_int32_t pages_allocated;
- u_int32_t allocated_dquots;
- u_int32_t free_dquots;
- u_int32_t syncs;
- };
-#else
-
-/* Flags that indicate which fields in dqinfo structure are valid. */
-# define IIF_BGRACE 1
-# define IIF_IGRACE 2
-# define IIF_FLAGS 4
-# define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)
-
-struct dqinfo
- {
- u_int64_t dqi_bgrace;
- u_int64_t dqi_igrace;
- u_int32_t dqi_flags;
- u_int32_t dqi_valid;
- };
-#endif
-
-__BEGIN_DECLS
-
-extern int quotactl (int __cmd, const char *__special, int __id,
- caddr_t __addr) __THROW;
-
-__END_DECLS
-
-#endif /* sys/quota.h */
diff --git a/winsup/cygwin/include/sys/resource.h b/winsup/cygwin/include/sys/resource.h
deleted file mode 100644
index d9419d150..000000000
--- a/winsup/cygwin/include/sys/resource.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* sys/resource.h
-
- Copyright 1997, 1998, 2000, 2001, 2005 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_RESOURCE_H_
-#define _SYS_RESOURCE_H_
-
-#include <sys/time.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Used for get/setpriority */
-#define PRIO_PROCESS 0
-#define PRIO_PGRP 1
-#define PRIO_USER 2
-
-#define RLIMIT_CPU 0 /* CPU time in seconds */
-#define RLIMIT_FSIZE 1 /* Maximum filesize */
-#define RLIMIT_DATA 2 /* max data size */
-#define RLIMIT_STACK 3 /* max stack size */
-#define RLIMIT_CORE 4 /* max core file size */
-#define RLIMIT_NOFILE 5 /* max number of open files */
-#define RLIMIT_OFILE RLIMIT_NOFILE /* BSD name */
-#define RLIMIT_AS 6 /* address space (virt. memory) limit */
-
-#define RLIMIT_NLIMITS 7 /* upper bound of RLIMIT_* defines */
-#define RLIM_NLIMITS RLIMIT_NLIMITS
-
-#define RLIM_INFINITY (~0UL)
-#define RLIM_SAVED_MAX RLIM_INFINITY
-#define RLIM_SAVED_CUR RLIM_INFINITY
-
-typedef unsigned long rlim_t;
-
-struct rlimit {
- rlim_t rlim_cur;
- rlim_t rlim_max;
-};
-
-#define RUSAGE_SELF 0 /* calling process */
-#define RUSAGE_CHILDREN -1 /* terminated child processes */
-
-struct rusage {
- struct timeval ru_utime; /* user time used */
- struct timeval ru_stime; /* system time used */
- long ru_maxrss;
- long ru_ixrss; /* XXX: 0 */
- long ru_idrss; /* XXX: sum of rm_asrss */
- long ru_isrss; /* XXX: 0 */
- long ru_minflt; /* any page faults not requiring I/O */
- long ru_majflt; /* any page faults requiring I/O */
- long ru_nswap; /* swaps */
- long ru_inblock; /* block input operations */
- long ru_oublock; /* block output operations */
- long ru_msgsnd; /* messages sent */
- long ru_msgrcv; /* messages received */
- long ru_nsignals; /* signals received */
- long ru_nvcsw; /* voluntary context switches */
- long ru_nivcsw; /* involuntary " */
-#define ru_last ru_nivcsw
-};
-
-int getrlimit (int __resource, struct rlimit *__rlp);
-int setrlimit (int __resource, const struct rlimit *__rlp);
-
-int getrusage (int __who, struct rusage *__rusage);
-
-int getpriority (int which, id_t who);
-int setpriority (int which, id_t who, int value);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/winsup/cygwin/include/sys/select.h b/winsup/cygwin/include/sys/select.h
deleted file mode 100644
index 9cc6c1eca..000000000
--- a/winsup/cygwin/include/sys/select.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* select.h
- Copyright 1998, 1999, 2000, 2001, 2005, 2009 Red Hat, Inc.
-
- Written by Geoffrey Noer <noer@cygnus.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_SELECT_H
-#define _SYS_SELECT_H
-
-#if !defined (_POSIX_SOURCE) && !defined (__INSIDE_CYGWIN_NET__) && !defined (__USE_W32_SOCKETS)
-
-#include <sys/cdefs.h>
-
-/* Get fd_set, and macros like FD_SET */
-#include <sys/types.h>
-
-/* Get definition of timeval. */
-#include <sys/time.h>
-#include <time.h>
-
-/* Get definition of sigset_t. */
-#include <signal.h>
-
-__BEGIN_DECLS
-
-int select __P ((int __n, fd_set *__readfds, fd_set *__writefds,
- fd_set *__exceptfds, struct timeval *__timeout));
-int pselect __P ((int __n, fd_set *__readfds, fd_set *__writefds,
- fd_set *__exceptfds, const struct timespec *__timeout,
- const sigset_t *__set));
-
-__END_DECLS
-
-#endif /* !_POSIX_SOURCE, !__INSIDE_CYGWIN_NET__ */
-
-#endif /* sys/select.h */
diff --git a/winsup/cygwin/include/sys/sem.h b/winsup/cygwin/include/sys/sem.h
deleted file mode 100644
index 15f46c806..000000000
--- a/winsup/cygwin/include/sys/sem.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* sys/sem.h
-
- Copyright 2002, 2003 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* sys/sem.h header file for Cygwin. */
-
-#ifndef _SYS_SEM_H
-#define _SYS_SEM_H
-
-#include <cygwin/sem.h>
-
-#endif /* _SYS_SEM_H */
diff --git a/winsup/cygwin/include/sys/shm.h b/winsup/cygwin/include/sys/shm.h
deleted file mode 100644
index 40cfdcee7..000000000
--- a/winsup/cygwin/include/sys/shm.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* sys/shm.h
-
- Copyright 2001, 2002, 2003 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* sys/shm.h header file for Cygwin. */
-
-#ifndef _SYS_SHM_H
-#define _SYS_SHM_H
-
-#include <cygwin/shm.h>
-
-#endif /* _SYS_SHM_H */
diff --git a/winsup/cygwin/include/sys/smallprint.h b/winsup/cygwin/include/sys/smallprint.h
deleted file mode 100644
index 776e3ca22..000000000
--- a/winsup/cygwin/include/sys/smallprint.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* sys/smallprint.h
-
- Copyright 1998, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_SMALLPRINT_H
-#define _SYS_SMALLPRINT_H
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int __small_sprintf (char *__dst, const char *__fmt, ...);
-int __small_vsprintf (char *__dst, const char *__fmt, va_list __ap);
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _SYS_SMALLPRINT_H */
diff --git a/winsup/cygwin/include/sys/socket.h b/winsup/cygwin/include/sys/socket.h
deleted file mode 100644
index 2d66abb26..000000000
--- a/winsup/cygwin/include/sys/socket.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* sys/socket.h
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2005, 2006, 2009, 2010,
- 2013 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_SOCKET_H
-#define _SYS_SOCKET_H
-
-#include <features.h>
-#include <cygwin/socket.h>
-#include <sys/time.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#ifndef __INSIDE_CYGWIN_NET__
- int accept (int, struct sockaddr *__peer, socklen_t *);
- int accept4 (int, struct sockaddr *__peer, socklen_t *, int flags);
- int bind (int, const struct sockaddr *__my_addr, socklen_t __addrlen);
- int connect (int, const struct sockaddr *, socklen_t);
- int getpeername (int, struct sockaddr *__peer, socklen_t *);
- int getsockname (int, struct sockaddr *__addr, socklen_t *);
- int listen (int, int __n);
- ssize_t recv (int, void *__buff, size_t __len, int __flags);
- ssize_t recvfrom (int, void *__buff, size_t __len, int __flags,
- struct sockaddr *__from, socklen_t *__fromlen);
- ssize_t recvmsg(int s, struct msghdr *msg, int flags);
- ssize_t send (int, const void *__buff, size_t __len, int __flags);
- ssize_t sendmsg(int s, const struct msghdr *msg, int flags);
- ssize_t sendto (int, const void *, size_t __len, int __flags,
- const struct sockaddr *__to, socklen_t __tolen);
- int setsockopt (int __s, int __level, int __optname, const void *optval,
- socklen_t __optlen);
- int getsockopt (int __s, int __level, int __optname, void *__optval,
- socklen_t *__optlen);
- int shutdown (int, int);
- int socket (int __family, int __type, int __protocol);
- int socketpair (int __domain, int __type, int __protocol, int *__socket_vec);
-
- struct servent *getservbyname (const char *__name, const char *__proto);
-#endif
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _SYS_SOCKET_H */
diff --git a/winsup/cygwin/include/sys/soundcard.h b/winsup/cygwin/include/sys/soundcard.h
deleted file mode 100644
index 79341c547..000000000
--- a/winsup/cygwin/include/sys/soundcard.h
+++ /dev/null
@@ -1,1287 +0,0 @@
-#ifndef SOUNDCARD_H
-#define SOUNDCARD_H
-/*
- * Copyright by Hannu Savolainen 1993-1997
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer. 2.
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-
-/*
- * OSS interface version. With versions earlier than 3.6 this value is
- * an integer with value less than 361. In versions 3.6 and later
- * it's a six digit hexadecimal value. For example value
- * of 0x030600 represents OSS version 3.6.0.
- * Use ioctl(fd, OSS_GETVERSION, &int) to get the version number of
- * the currently active driver.
- */
-#define SOUND_VERSION 0x030802
-#define OPEN_SOUND_SYSTEM
-
-/* In Linux we need to be prepared for cross compiling */
-//#include <linux/ioctl.h>
-
-/*
- * Supported card ID numbers (Should be somewhere else?)
- */
-
-#define SNDCARD_ADLIB 1
-#define SNDCARD_SB 2
-#define SNDCARD_PAS 3
-#define SNDCARD_GUS 4
-#define SNDCARD_MPU401 5
-#define SNDCARD_SB16 6
-#define SNDCARD_SB16MIDI 7
-#define SNDCARD_UART6850 8
-#define SNDCARD_GUS16 9
-#define SNDCARD_MSS 10
-#define SNDCARD_PSS 11
-#define SNDCARD_SSCAPE 12
-#define SNDCARD_PSS_MPU 13
-#define SNDCARD_PSS_MSS 14
-#define SNDCARD_SSCAPE_MSS 15
-#define SNDCARD_TRXPRO 16
-#define SNDCARD_TRXPRO_SB 17
-#define SNDCARD_TRXPRO_MPU 18
-#define SNDCARD_MAD16 19
-#define SNDCARD_MAD16_MPU 20
-#define SNDCARD_CS4232 21
-#define SNDCARD_CS4232_MPU 22
-#define SNDCARD_MAUI 23
-#define SNDCARD_PSEUDO_MSS 24
-#define SNDCARD_GUSPNP 25
-#define SNDCARD_UART401 26
-/* Sound card numbers 27 to N are reserved. Don't add more numbers here. */
-
-/***********************************
- * IOCTL Commands for /dev/sequencer
- */
-
-#ifndef _SIOWR
-#if defined(_IOWR) && (defined(_AIX) || (!defined(sun) && !defined(sparc) && !defined(__sparc__) && !defined(__INCioctlh) && !defined(__Lynx__)))
-/* Use already defined ioctl defines if they exist (except with Sun or Sparc) */
-#define SIOCPARM_MASK IOCPARM_MASK
-#define SIOC_VOID IOC_VOID
-#define SIOC_OUT IOC_OUT
-#define SIOC_IN IOC_IN
-#define SIOC_INOUT IOC_INOUT
-#define _SIOC_SIZE _IOC_SIZE
-#define _SIOC_DIR _IOC_DIR
-#define _SIOC_NONE _IOC_NONE
-#define _SIOC_READ _IOC_READ
-#define _SIOC_WRITE _IOC_WRITE
-#define _SIO _IO
-#define _SIOR _IOR
-#define _SIOW _IOW
-#define _SIOWR _IOWR
-#else
-
-/* Ioctl's have the command encoded in the lower word,
- * and the size of any in or out parameters in the upper
- * word. The high 2 bits of the upper word are used
- * to encode the in/out status of the parameter; for now
- * we restrict parameters to at most 8191 bytes.
- */
-/* #define SIOCTYPE (0xff<<8) */
-#define SIOCPARM_MASK 0x1fff /* parameters must be < 8192 bytes */
-#define SIOC_VOID 0x00000000 /* no parameters */
-#define SIOC_OUT 0x20000000 /* copy out parameters */
-#define SIOC_IN 0x40000000 /* copy in parameters */
-#define SIOC_INOUT (SIOC_IN|SIOC_OUT)
-/* the 0x20000000 is so we can distinguish new ioctl's from old */
-#define _SIO(x,y) ((int)(SIOC_VOID|(x<<8)|y))
-#define _SIOR(x,y,t) ((int)(SIOC_OUT|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y))
-#define _SIOW(x,y,t) ((int)(SIOC_IN|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y))
-/* this should be _SIORW, but stdio got there first */
-#define _SIOWR(x,y,t) ((int)(SIOC_INOUT|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y))
-#define _SIOC_SIZE(x) ((x>>16)&SIOCPARM_MASK)
-#define _SIOC_DIR(x) (x & 0xf0000000)
-#define _SIOC_NONE SIOC_VOID
-#define _SIOC_READ SIOC_OUT
-#define _SIOC_WRITE SIOC_IN
-# endif /* _IOWR */
-#endif /* !_SIOWR */
-
-#define SNDCTL_SEQ_RESET _SIO ('Q', 0)
-#define SNDCTL_SEQ_SYNC _SIO ('Q', 1)
-#define SNDCTL_SYNTH_INFO _SIOWR('Q', 2, struct synth_info)
-#define SNDCTL_SEQ_CTRLRATE _SIOWR('Q', 3, int) /* Set/get timer resolution (HZ) */
-#define SNDCTL_SEQ_GETOUTCOUNT _SIOR ('Q', 4, int)
-#define SNDCTL_SEQ_GETINCOUNT _SIOR ('Q', 5, int)
-#define SNDCTL_SEQ_PERCMODE _SIOW ('Q', 6, int)
-#define SNDCTL_FM_LOAD_INSTR _SIOW ('Q', 7, struct sbi_instrument) /* Obsolete. Don't use!!!!!! */
-#define SNDCTL_SEQ_TESTMIDI _SIOW ('Q', 8, int)
-#define SNDCTL_SEQ_RESETSAMPLES _SIOW ('Q', 9, int)
-#define SNDCTL_SEQ_NRSYNTHS _SIOR ('Q',10, int)
-#define SNDCTL_SEQ_NRMIDIS _SIOR ('Q',11, int)
-#define SNDCTL_MIDI_INFO _SIOWR('Q',12, struct midi_info)
-#define SNDCTL_SEQ_THRESHOLD _SIOW ('Q',13, int)
-#define SNDCTL_SYNTH_MEMAVL _SIOWR('Q',14, int) /* in=dev#, out=memsize */
-#define SNDCTL_FM_4OP_ENABLE _SIOW ('Q',15, int) /* in=dev# */
-#define SNDCTL_SEQ_PANIC _SIO ('Q',17)
-#define SNDCTL_SEQ_OUTOFBAND _SIOW ('Q',18, struct seq_event_rec)
-#define SNDCTL_SEQ_GETTIME _SIOR ('Q',19, int)
-#define SNDCTL_SYNTH_ID _SIOWR('Q',20, struct synth_info)
-#define SNDCTL_SYNTH_CONTROL _SIOWR('Q',21, struct synth_control)
-#define SNDCTL_SYNTH_REMOVESAMPLE _SIOWR('Q',22, struct remove_sample)
-
-typedef struct synth_control
-{
- int devno; /* Synthesizer # */
- char data[4000]; /* Device spesific command/data record */
-}synth_control;
-
-typedef struct remove_sample
-{
- int devno; /* Synthesizer # */
- int bankno; /* MIDI bank # (0=General MIDI) */
- int instrno; /* MIDI instrument number */
-} remove_sample;
-
-typedef struct seq_event_rec {
- unsigned char arr[8];
-} seq_event_rec;
-
-#define SNDCTL_TMR_TIMEBASE _SIOWR('T', 1, int)
-#define SNDCTL_TMR_START _SIO ('T', 2)
-#define SNDCTL_TMR_STOP _SIO ('T', 3)
-#define SNDCTL_TMR_CONTINUE _SIO ('T', 4)
-#define SNDCTL_TMR_TEMPO _SIOWR('T', 5, int)
-#define SNDCTL_TMR_SOURCE _SIOWR('T', 6, int)
-# define TMR_INTERNAL 0x00000001
-# define TMR_EXTERNAL 0x00000002
-# define TMR_MODE_MIDI 0x00000010
-# define TMR_MODE_FSK 0x00000020
-# define TMR_MODE_CLS 0x00000040
-# define TMR_MODE_SMPTE 0x00000080
-#define SNDCTL_TMR_METRONOME _SIOW ('T', 7, int)
-#define SNDCTL_TMR_SELECT _SIOW ('T', 8, int)
-
-/*
- * Some big endian/little endian handling macros
- */
-
-#if defined(_AIX) || defined(AIX) || defined(sparc) || defined(__sparc__) || defined(HPPA) || defined(PPC)
-/* Big endian machines */
-# define _PATCHKEY(id) (0xfd00|id)
-# define AFMT_S16_NE AFMT_S16_BE
-#else
-# define _PATCHKEY(id) ((id<<8)|0xfd)
-# define AFMT_S16_NE AFMT_S16_LE
-#endif
-
-/*
- * Sample loading mechanism for internal synthesizers (/dev/sequencer)
- * The following patch_info structure has been designed to support
- * Gravis UltraSound. It tries to be universal format for uploading
- * sample based patches but is probably too limited.
- *
- * (PBD) As Hannu guessed, the GUS structure is too limited for
- * the WaveFront, but this is the right place for a constant definition.
- */
-
-struct patch_info {
- unsigned short key; /* Use WAVE_PATCH here */
-#define WAVE_PATCH _PATCHKEY(0x04)
-#define GUS_PATCH WAVE_PATCH
-#define WAVEFRONT_PATCH _PATCHKEY(0x06)
-
- short device_no; /* Synthesizer number */
- short instr_no; /* Midi pgm# */
-
- unsigned int mode;
-/*
- * The least significant byte has the same format than the GUS .PAT
- * files
- */
-#define WAVE_16_BITS 0x01 /* bit 0 = 8 or 16 bit wave data. */
-#define WAVE_UNSIGNED 0x02 /* bit 1 = Signed - Unsigned data. */
-#define WAVE_LOOPING 0x04 /* bit 2 = looping enabled-1. */
-#define WAVE_BIDIR_LOOP 0x08 /* bit 3 = Set is bidirectional looping. */
-#define WAVE_LOOP_BACK 0x10 /* bit 4 = Set is looping backward. */
-#define WAVE_SUSTAIN_ON 0x20 /* bit 5 = Turn sustaining on. (Env. pts. 3)*/
-#define WAVE_ENVELOPES 0x40 /* bit 6 = Enable envelopes - 1 */
-#define WAVE_FAST_RELEASE 0x80 /* bit 7 = Shut off immediately after note off */
- /* (use the env_rate/env_offs fields). */
-/* Linux specific bits */
-#define WAVE_VIBRATO 0x00010000 /* The vibrato info is valid */
-#define WAVE_TREMOLO 0x00020000 /* The tremolo info is valid */
-#define WAVE_SCALE 0x00040000 /* The scaling info is valid */
-#define WAVE_FRACTIONS 0x00080000 /* Fraction information is valid */
-/* Reserved bits */
-#define WAVE_ROM 0x40000000 /* For future use */
-#define WAVE_MULAW 0x20000000 /* For future use */
-/* Other bits must be zeroed */
-
- int len; /* Size of the wave data in bytes */
- int loop_start, loop_end; /* Byte offsets from the beginning */
-
-/*
- * The base_freq and base_note fields are used when computing the
- * playback speed for a note. The base_note defines the tone frequency
- * which is heard if the sample is played using the base_freq as the
- * playback speed.
- *
- * The low_note and high_note fields define the minimum and maximum note
- * frequencies for which this sample is valid. It is possible to define
- * more than one samples for an instrument number at the same time. The
- * low_note and high_note fields are used to select the most suitable one.
- *
- * The fields base_note, high_note and low_note should contain
- * the note frequency multiplied by 1000. For example value for the
- * middle A is 440*1000.
- */
-
- unsigned int base_freq;
- unsigned int base_note;
- unsigned int high_note;
- unsigned int low_note;
- int panning; /* -128=left, 127=right */
- int detuning;
-
-/* New fields introduced in version 1.99.5 */
-
- /* Envelope. Enabled by mode bit WAVE_ENVELOPES */
- unsigned char env_rate[ 6 ]; /* GUS HW ramping rate */
- unsigned char env_offset[ 6 ]; /* 255 == 100% */
-
- /*
- * The tremolo, vibrato and scale info are not supported yet.
- * Enable by setting the mode bits WAVE_TREMOLO, WAVE_VIBRATO or
- * WAVE_SCALE
- */
-
- unsigned char tremolo_sweep;
- unsigned char tremolo_rate;
- unsigned char tremolo_depth;
-
- unsigned char vibrato_sweep;
- unsigned char vibrato_rate;
- unsigned char vibrato_depth;
-
- int scale_frequency;
- unsigned int scale_factor; /* from 0 to 2048 or 0 to 2 */
-
- int volume;
- int fractions;
- int reserved1;
- int spare[2];
- char data[1]; /* The waveform data starts here */
- };
-
-struct sysex_info {
- short key; /* Use SYSEX_PATCH or MAUI_PATCH here */
-#define SYSEX_PATCH _PATCHKEY(0x05)
-#define MAUI_PATCH _PATCHKEY(0x06)
- short device_no; /* Synthesizer number */
- int len; /* Size of the sysex data in bytes */
- unsigned char data[1]; /* Sysex data starts here */
- };
-
-/*
- * /dev/sequencer input events.
- *
- * The data written to the /dev/sequencer is a stream of events. Events
- * are records of 4 or 8 bytes. The first byte defines the size.
- * Any number of events can be written with a write call. There
- * is a set of macros for sending these events. Use these macros if you
- * want to maximize portability of your program.
- *
- * Events SEQ_WAIT, SEQ_MIDIPUTC and SEQ_ECHO. Are also input events.
- * (All input events are currently 4 bytes long. Be prepared to support
- * 8 byte events also. If you receive any event having first byte >= 128,
- * it's a 8 byte event.
- *
- * The events are documented at the end of this file.
- *
- * Normal events (4 bytes)
- * There is also a 8 byte version of most of the 4 byte events. The
- * 8 byte one is recommended.
- */
-#define SEQ_NOTEOFF 0
-#define SEQ_FMNOTEOFF SEQ_NOTEOFF /* Just old name */
-#define SEQ_NOTEON 1
-#define SEQ_FMNOTEON SEQ_NOTEON
-#define SEQ_WAIT TMR_WAIT_ABS
-#define SEQ_PGMCHANGE 3
-#define SEQ_FMPGMCHANGE SEQ_PGMCHANGE
-#define SEQ_SYNCTIMER TMR_START
-#define SEQ_MIDIPUTC 5
-#define SEQ_DRUMON 6 /*** OBSOLETE ***/
-#define SEQ_DRUMOFF 7 /*** OBSOLETE ***/
-#define SEQ_ECHO TMR_ECHO /* For synching programs with output */
-#define SEQ_AFTERTOUCH 9
-#define SEQ_CONTROLLER 10
-
-/*******************************************
- * Midi controller numbers
- *******************************************
- * Controllers 0 to 31 (0x00 to 0x1f) and
- * 32 to 63 (0x20 to 0x3f) are continuous
- * controllers.
- * In the MIDI 1.0 these controllers are sent using
- * two messages. Controller numbers 0 to 31 are used
- * to send the MSB and the controller numbers 32 to 63
- * are for the LSB. Note that just 7 bits are used in MIDI bytes.
- */
-
-#define CTL_BANK_SELECT 0x00
-#define CTL_MODWHEEL 0x01
-#define CTL_BREATH 0x02
-/* undefined 0x03 */
-#define CTL_FOOT 0x04
-#define CTL_PORTAMENTO_TIME 0x05
-#define CTL_DATA_ENTRY 0x06
-#define CTL_MAIN_VOLUME 0x07
-#define CTL_BALANCE 0x08
-/* undefined 0x09 */
-#define CTL_PAN 0x0a
-#define CTL_EXPRESSION 0x0b
-/* undefined 0x0c */
-/* undefined 0x0d */
-/* undefined 0x0e */
-/* undefined 0x0f */
-#define CTL_GENERAL_PURPOSE1 0x10
-#define CTL_GENERAL_PURPOSE2 0x11
-#define CTL_GENERAL_PURPOSE3 0x12
-#define CTL_GENERAL_PURPOSE4 0x13
-/* undefined 0x14 - 0x1f */
-
-/* undefined 0x20 */
-/* The controller numbers 0x21 to 0x3f are reserved for the */
-/* least significant bytes of the controllers 0x00 to 0x1f. */
-/* These controllers are not recognised by the driver. */
-
-/* Controllers 64 to 69 (0x40 to 0x45) are on/off switches. */
-/* 0=OFF and 127=ON (intermediate values are possible) */
-#define CTL_DAMPER_PEDAL 0x40
-#define CTL_SUSTAIN 0x40 /* Alias */
-#define CTL_HOLD 0x40 /* Alias */
-#define CTL_PORTAMENTO 0x41
-#define CTL_SOSTENUTO 0x42
-#define CTL_SOFT_PEDAL 0x43
-/* undefined 0x44 */
-#define CTL_HOLD2 0x45
-/* undefined 0x46 - 0x4f */
-
-#define CTL_GENERAL_PURPOSE5 0x50
-#define CTL_GENERAL_PURPOSE6 0x51
-#define CTL_GENERAL_PURPOSE7 0x52
-#define CTL_GENERAL_PURPOSE8 0x53
-/* undefined 0x54 - 0x5a */
-#define CTL_EXT_EFF_DEPTH 0x5b
-#define CTL_TREMOLO_DEPTH 0x5c
-#define CTL_CHORUS_DEPTH 0x5d
-#define CTL_DETUNE_DEPTH 0x5e
-#define CTL_CELESTE_DEPTH 0x5e /* Alias for the above one */
-#define CTL_PHASER_DEPTH 0x5f
-#define CTL_DATA_INCREMENT 0x60
-#define CTL_DATA_DECREMENT 0x61
-#define CTL_NONREG_PARM_NUM_LSB 0x62
-#define CTL_NONREG_PARM_NUM_MSB 0x63
-#define CTL_REGIST_PARM_NUM_LSB 0x64
-#define CTL_REGIST_PARM_NUM_MSB 0x65
-/* undefined 0x66 - 0x78 */
-/* reserved 0x79 - 0x7f */
-
-/* Pseudo controllers (not midi compatible) */
-#define CTRL_PITCH_BENDER 255
-#define CTRL_PITCH_BENDER_RANGE 254
-#define CTRL_EXPRESSION 253 /* Obsolete */
-#define CTRL_MAIN_VOLUME 252 /* Obsolete */
-#define SEQ_BALANCE 11
-#define SEQ_VOLMODE 12
-
-/*
- * Volume mode decides how volumes are used
- */
-
-#define VOL_METHOD_ADAGIO 1
-#define VOL_METHOD_LINEAR 2
-
-/*
- * Note! SEQ_WAIT, SEQ_MIDIPUTC and SEQ_ECHO are used also as
- * input events.
- */
-
-/*
- * Event codes 0xf0 to 0xfc are reserved for future extensions.
- */
-
-#define SEQ_FULLSIZE 0xfd /* Long events */
-/*
- * SEQ_FULLSIZE events are used for loading patches/samples to the
- * synthesizer devices. These events are passed directly to the driver
- * of the associated synthesizer device. There is no limit to the size
- * of the extended events. These events are not queued but executed
- * immediately when the write() is called (execution can take several
- * seconds of time).
- *
- * When a SEQ_FULLSIZE message is written to the device, it must
- * be written using exactly one write() call. Other events cannot
- * be mixed to the same write.
- *
- * For FM synths (YM3812/OPL3) use struct sbi_instrument and write it to the
- * /dev/sequencer. Don't write other data together with the instrument structure
- * Set the key field of the structure to FM_PATCH. The device field is used to
- * route the patch to the corresponding device.
- *
- * For wave table use struct patch_info. Initialize the key field
- * to WAVE_PATCH.
- */
-#define SEQ_PRIVATE 0xfe /* Low level HW dependent events (8 bytes) */
-#define SEQ_EXTENDED 0xff /* Extended events (8 bytes) OBSOLETE */
-
-/*
- * Record for FM patches
- */
-
-typedef unsigned char sbi_instr_data[32];
-
-struct sbi_instrument {
- unsigned short key; /* FM_PATCH or OPL3_PATCH */
-#define FM_PATCH _PATCHKEY(0x01)
-#define OPL3_PATCH _PATCHKEY(0x03)
- short device; /* Synth# (0-4) */
- int channel; /* Program# to be initialized */
- sbi_instr_data operators; /* Register settings for operator cells (.SBI format) */
- };
-
-struct synth_info { /* Read only */
- char name[30];
- int device; /* 0-N. INITIALIZE BEFORE CALLING */
- int synth_type;
-#define SYNTH_TYPE_FM 0
-#define SYNTH_TYPE_SAMPLE 1
-#define SYNTH_TYPE_MIDI 2 /* Midi interface */
-
- int synth_subtype;
-#define FM_TYPE_ADLIB 0x00
-#define FM_TYPE_OPL3 0x01
-#define MIDI_TYPE_MPU401 0x401
-
-#define SAMPLE_TYPE_BASIC 0x10
-#define SAMPLE_TYPE_GUS SAMPLE_TYPE_BASIC
-#define SAMPLE_TYPE_WAVEFRONT 0x11
-
- int perc_mode; /* No longer supported */
- int nr_voices;
- int nr_drums; /* Obsolete field */
- int instr_bank_size;
- unsigned int capabilities;
-#define SYNTH_CAP_PERCMODE 0x00000001 /* No longer used */
-#define SYNTH_CAP_OPL3 0x00000002 /* Set if OPL3 supported */
-#define SYNTH_CAP_INPUT 0x00000004 /* Input (MIDI) device */
- int dummies[19]; /* Reserve space */
- };
-
-struct sound_timer_info {
- char name[32];
- int caps;
- };
-
-#define MIDI_CAP_MPU401 1 /* MPU-401 intelligent mode */
-
-struct midi_info {
- char name[30];
- int device; /* 0-N. INITIALIZE BEFORE CALLING */
- unsigned int capabilities; /* To be defined later */
- int dev_type;
- int dummies[18]; /* Reserve space */
- };
-
-/********************************************
- * ioctl commands for the /dev/midi##
- */
-typedef struct {
- unsigned char cmd;
- char nr_args, nr_returns;
- unsigned char data[30];
- } mpu_command_rec;
-
-#define SNDCTL_MIDI_PRETIME _SIOWR('m', 0, int)
-#define SNDCTL_MIDI_MPUMODE _SIOWR('m', 1, int)
-#define SNDCTL_MIDI_MPUCMD _SIOWR('m', 2, mpu_command_rec)
-
-/********************************************
- * IOCTL commands for /dev/dsp and /dev/audio
- */
-
-#define SNDCTL_DSP_RESET _SIO ('P', 0)
-#define SNDCTL_DSP_SYNC _SIO ('P', 1)
-#define SNDCTL_DSP_SPEED _SIOWR('P', 2, int)
-#define SNDCTL_DSP_STEREO _SIOWR('P', 3, int)
-#define SNDCTL_DSP_GETBLKSIZE _SIOWR('P', 4, int)
-#define SNDCTL_DSP_SAMPLESIZE SNDCTL_DSP_SETFMT
-#define SNDCTL_DSP_CHANNELS _SIOWR('P', 6, int)
-#define SOUND_PCM_WRITE_CHANNELS SNDCTL_DSP_CHANNELS
-#define SOUND_PCM_WRITE_FILTER _SIOWR('P', 7, int)
-#define SNDCTL_DSP_POST _SIO ('P', 8)
-#define SNDCTL_DSP_SUBDIVIDE _SIOWR('P', 9, int)
-#define SNDCTL_DSP_SETFRAGMENT _SIOWR('P',10, int)
-
-/* Audio data formats (Note! U8=8 and S16_LE=16 for compatibility) */
-#define SNDCTL_DSP_GETFMTS _SIOR ('P',11, int) /* Returns a mask */
-#define SNDCTL_DSP_SETFMT _SIOWR('P',5, int) /* Selects ONE fmt*/
-# define AFMT_QUERY 0x00000000 /* Return current fmt */
-# define AFMT_MU_LAW 0x00000001
-# define AFMT_A_LAW 0x00000002
-# define AFMT_IMA_ADPCM 0x00000004
-# define AFMT_U8 0x00000008
-# define AFMT_S16_LE 0x00000010 /* Little endian signed 16*/
-# define AFMT_S16_BE 0x00000020 /* Big endian signed 16 */
-# define AFMT_S8 0x00000040
-# define AFMT_U16_LE 0x00000080 /* Little endian U16 */
-# define AFMT_U16_BE 0x00000100 /* Big endian U16 */
-# define AFMT_MPEG 0x00000200 /* MPEG (2) audio */
-# define AFMT_AC3 0x00000400 /* Dolby Digital AC3 */
-
-/*
- * Buffer status queries.
- */
-typedef struct audio_buf_info {
- int fragments; /* # of available fragments (partially usend ones not counted) */
- int fragstotal; /* Total # of fragments allocated */
- int fragsize; /* Size of a fragment in bytes */
-
- int bytes; /* Available space in bytes (includes partially used fragments) */
- /* Note! 'bytes' could be more than fragments*fragsize */
- } audio_buf_info;
-
-#define SNDCTL_DSP_GETOSPACE _SIOR ('P',12, audio_buf_info)
-#define SNDCTL_DSP_GETISPACE _SIOR ('P',13, audio_buf_info)
-#define SNDCTL_DSP_NONBLOCK _SIO ('P',14)
-#define SNDCTL_DSP_GETCAPS _SIOR ('P',15, int)
-# define DSP_CAP_REVISION 0x000000ff /* Bits for revision level (0 to 255) */
-# define DSP_CAP_DUPLEX 0x00000100 /* Full duplex record/playback */
-# define DSP_CAP_REALTIME 0x00000200 /* Real time capability */
-# define DSP_CAP_BATCH 0x00000400 /* Device has some kind of */
- /* internal buffers which may */
- /* cause some delays and */
- /* decrease precision of timing */
-# define DSP_CAP_COPROC 0x00000800 /* Has a coprocessor */
- /* Sometimes it's a DSP */
- /* but usually not */
-# define DSP_CAP_TRIGGER 0x00001000 /* Supports SETTRIGGER */
-# define DSP_CAP_MMAP 0x00002000 /* Supports mmap() */
-# define DSP_CAP_MULTI 0x00004000 /* support multiple open */
-# define DSP_CAP_BIND 0x00008000 /* channel binding to front/rear/cneter/lfe */
-
-
-#define SNDCTL_DSP_GETTRIGGER _SIOR ('P',16, int)
-#define SNDCTL_DSP_SETTRIGGER _SIOW ('P',16, int)
-# define PCM_ENABLE_INPUT 0x00000001
-# define PCM_ENABLE_OUTPUT 0x00000002
-
-typedef struct count_info {
- int bytes; /* Total # of bytes processed */
- int blocks; /* # of fragment transitions since last time */
- int ptr; /* Current DMA pointer value */
- } count_info;
-
-#define SNDCTL_DSP_GETIPTR _SIOR ('P',17, count_info)
-#define SNDCTL_DSP_GETOPTR _SIOR ('P',18, count_info)
-
-typedef struct buffmem_desc {
- unsigned *buffer;
- int size;
- } buffmem_desc;
-#define SNDCTL_DSP_MAPINBUF _SIOR ('P', 19, buffmem_desc)
-#define SNDCTL_DSP_MAPOUTBUF _SIOR ('P', 20, buffmem_desc)
-#define SNDCTL_DSP_SETSYNCRO _SIO ('P', 21)
-#define SNDCTL_DSP_SETDUPLEX _SIO ('P', 22)
-#define SNDCTL_DSP_GETODELAY _SIOR ('P', 23, int)
-
-#define SNDCTL_DSP_GETCHANNELMASK _SIOWR('P', 64, int)
-#define SNDCTL_DSP_BIND_CHANNEL _SIOWR('P', 65, int)
-# define DSP_BIND_QUERY 0x00000000
-# define DSP_BIND_FRONT 0x00000001
-# define DSP_BIND_SURR 0x00000002
-# define DSP_BIND_CENTER_LFE 0x00000004
-# define DSP_BIND_HANDSET 0x00000008
-# define DSP_BIND_MIC 0x00000010
-# define DSP_BIND_MODEM1 0x00000020
-# define DSP_BIND_MODEM2 0x00000040
-# define DSP_BIND_I2S 0x00000080
-# define DSP_BIND_SPDIF 0x00000100
-
-/*
- * Application's profile defines the way how playback underrun situations should be handled.
- *
- * APF_NORMAL (the default) and APF_NETWORK make the driver to cleanup the
- * playback buffer whenever an underrun occurs. This consumes some time
- * prevents looping the existing buffer.
- * APF_CPUINTENS is intended to be set by CPU intensive applications which
- * are likely to run out of time occasionally. In this mode the buffer cleanup is
- * disabled which saves CPU time but also let's the previous buffer content to
- * be played during the "pause" after the underrun.
- */
-#define SNDCTL_DSP_PROFILE _SIOW ('P', 23, int)
-#define APF_NORMAL 0 /* Normal applications */
-#define APF_NETWORK 1 /* Underruns probably caused by an "external" delay */
-#define APF_CPUINTENS 2 /* Underruns probably caused by "overheating" the CPU */
-
-#define SOUND_PCM_READ_RATE _SIOR ('P', 2, int)
-#define SOUND_PCM_READ_CHANNELS _SIOR ('P', 6, int)
-#define SOUND_PCM_READ_BITS _SIOR ('P', 5, int)
-#define SOUND_PCM_READ_FILTER _SIOR ('P', 7, int)
-
-/* Some alias names */
-#define SOUND_PCM_WRITE_BITS SNDCTL_DSP_SETFMT
-#define SOUND_PCM_WRITE_RATE SNDCTL_DSP_SPEED
-#define SOUND_PCM_POST SNDCTL_DSP_POST
-#define SOUND_PCM_RESET SNDCTL_DSP_RESET
-#define SOUND_PCM_SYNC SNDCTL_DSP_SYNC
-#define SOUND_PCM_SUBDIVIDE SNDCTL_DSP_SUBDIVIDE
-#define SOUND_PCM_SETFRAGMENT SNDCTL_DSP_SETFRAGMENT
-#define SOUND_PCM_GETFMTS SNDCTL_DSP_GETFMTS
-#define SOUND_PCM_SETFMT SNDCTL_DSP_SETFMT
-#define SOUND_PCM_GETOSPACE SNDCTL_DSP_GETOSPACE
-#define SOUND_PCM_GETISPACE SNDCTL_DSP_GETISPACE
-#define SOUND_PCM_NONBLOCK SNDCTL_DSP_NONBLOCK
-#define SOUND_PCM_GETCAPS SNDCTL_DSP_GETCAPS
-#define SOUND_PCM_GETTRIGGER SNDCTL_DSP_GETTRIGGER
-#define SOUND_PCM_SETTRIGGER SNDCTL_DSP_SETTRIGGER
-#define SOUND_PCM_SETSYNCRO SNDCTL_DSP_SETSYNCRO
-#define SOUND_PCM_GETIPTR SNDCTL_DSP_GETIPTR
-#define SOUND_PCM_GETOPTR SNDCTL_DSP_GETOPTR
-#define SOUND_PCM_MAPINBUF SNDCTL_DSP_MAPINBUF
-#define SOUND_PCM_MAPOUTBUF SNDCTL_DSP_MAPOUTBUF
-
-/*
- * ioctl calls to be used in communication with coprocessors and
- * DSP chips.
- */
-
-typedef struct copr_buffer {
- int command; /* Set to 0 if not used */
- int flags;
-#define CPF_NONE 0x0000
-#define CPF_FIRST 0x0001 /* First block */
-#define CPF_LAST 0x0002 /* Last block */
- int len;
- int offs; /* If required by the device (0 if not used) */
-
- unsigned char data[4000]; /* NOTE! 4000 is not 4k */
- } copr_buffer;
-
-typedef struct copr_debug_buf {
- int command; /* Used internally. Set to 0 */
- int parm1;
- int parm2;
- int flags;
- int len; /* Length of data in bytes */
- } copr_debug_buf;
-
-typedef struct copr_msg {
- int len;
- unsigned char data[4000];
- } copr_msg;
-
-#define SNDCTL_COPR_RESET _SIO ('C', 0)
-#define SNDCTL_COPR_LOAD _SIOWR('C', 1, copr_buffer)
-#define SNDCTL_COPR_RDATA _SIOWR('C', 2, copr_debug_buf)
-#define SNDCTL_COPR_RCODE _SIOWR('C', 3, copr_debug_buf)
-#define SNDCTL_COPR_WDATA _SIOW ('C', 4, copr_debug_buf)
-#define SNDCTL_COPR_WCODE _SIOW ('C', 5, copr_debug_buf)
-#define SNDCTL_COPR_RUN _SIOWR('C', 6, copr_debug_buf)
-#define SNDCTL_COPR_HALT _SIOWR('C', 7, copr_debug_buf)
-#define SNDCTL_COPR_SENDMSG _SIOWR('C', 8, copr_msg)
-#define SNDCTL_COPR_RCVMSG _SIOR ('C', 9, copr_msg)
-
-/*********************************************
- * IOCTL commands for /dev/mixer
- */
-
-/*
- * Mixer devices
- *
- * There can be up to 20 different analog mixer channels. The
- * SOUND_MIXER_NRDEVICES gives the currently supported maximum.
- * The SOUND_MIXER_READ_DEVMASK returns a bitmask which tells
- * the devices supported by the particular mixer.
- */
-
-#define SOUND_MIXER_NRDEVICES 25
-#define SOUND_MIXER_VOLUME 0
-#define SOUND_MIXER_BASS 1
-#define SOUND_MIXER_TREBLE 2
-#define SOUND_MIXER_SYNTH 3
-#define SOUND_MIXER_PCM 4
-#define SOUND_MIXER_SPEAKER 5
-#define SOUND_MIXER_LINE 6
-#define SOUND_MIXER_MIC 7
-#define SOUND_MIXER_CD 8
-#define SOUND_MIXER_IMIX 9 /* Recording monitor */
-#define SOUND_MIXER_ALTPCM 10
-#define SOUND_MIXER_RECLEV 11 /* Recording level */
-#define SOUND_MIXER_IGAIN 12 /* Input gain */
-#define SOUND_MIXER_OGAIN 13 /* Output gain */
-/*
- * The AD1848 codec and compatibles have three line level inputs
- * (line, aux1 and aux2). Since each card manufacturer have assigned
- * different meanings to these inputs, it's inpractical to assign
- * specific meanings (line, cd, synth etc.) to them.
- */
-#define SOUND_MIXER_LINE1 14 /* Input source 1 (aux1) */
-#define SOUND_MIXER_LINE2 15 /* Input source 2 (aux2) */
-#define SOUND_MIXER_LINE3 16 /* Input source 3 (line) */
-#define SOUND_MIXER_DIGITAL1 17 /* Digital (input) 1 */
-#define SOUND_MIXER_DIGITAL2 18 /* Digital (input) 2 */
-#define SOUND_MIXER_DIGITAL3 19 /* Digital (input) 3 */
-#define SOUND_MIXER_PHONEIN 20 /* Phone input */
-#define SOUND_MIXER_PHONEOUT 21 /* Phone output */
-#define SOUND_MIXER_VIDEO 22 /* Video/TV (audio) in */
-#define SOUND_MIXER_RADIO 23 /* Radio in */
-#define SOUND_MIXER_MONITOR 24 /* Monitor (usually mic) volume */
-
-/* Some on/off settings (SOUND_SPECIAL_MIN - SOUND_SPECIAL_MAX) */
-/* Not counted to SOUND_MIXER_NRDEVICES, but use the same number space */
-#define SOUND_ONOFF_MIN 28
-#define SOUND_ONOFF_MAX 30
-
-/* Note! Number 31 cannot be used since the sign bit is reserved */
-#define SOUND_MIXER_NONE 31
-
-/*
- * The following unsupported macros are no longer functional.
- * Use SOUND_MIXER_PRIVATE# macros in future.
- */
-#define SOUND_MIXER_ENHANCE SOUND_MIXER_NONE
-#define SOUND_MIXER_MUTE SOUND_MIXER_NONE
-#define SOUND_MIXER_LOUD SOUND_MIXER_NONE
-
-
-#define SOUND_DEVICE_LABELS {"Vol ", "Bass ", "Trebl", "Synth", "Pcm ", "Spkr ", "Line ", \
- "Mic ", "CD ", "Mix ", "Pcm2 ", "Rec ", "IGain", "OGain", \
- "Line1", "Line2", "Line3", "Digital1", "Digital2", "Digital3", \
- "PhoneIn", "PhoneOut", "Video", "Radio", "Monitor"}
-
-#define SOUND_DEVICE_NAMES {"vol", "bass", "treble", "synth", "pcm", "speaker", "line", \
- "mic", "cd", "mix", "pcm2", "rec", "igain", "ogain", \
- "line1", "line2", "line3", "dig1", "dig2", "dig3", \
- "phin", "phout", "video", "radio", "monitor"}
-
-/* Device bitmask identifiers */
-
-#define SOUND_MIXER_RECSRC 0xff /* Arg contains a bit for each recording source */
-#define SOUND_MIXER_DEVMASK 0xfe /* Arg contains a bit for each supported device */
-#define SOUND_MIXER_RECMASK 0xfd /* Arg contains a bit for each supported recording source */
-#define SOUND_MIXER_CAPS 0xfc
-# define SOUND_CAP_EXCL_INPUT 0x00000001 /* Only one recording source at a time */
-#define SOUND_MIXER_STEREODEVS 0xfb /* Mixer channels supporting stereo */
-#define SOUND_MIXER_OUTSRC 0xfa /* Arg contains a bit for each input source to output */
-#define SOUND_MIXER_OUTMASK 0xf9 /* Arg contains a bit for each supported input source to output */
-
-/* Device mask bits */
-
-#define SOUND_MASK_VOLUME (1 << SOUND_MIXER_VOLUME)
-#define SOUND_MASK_BASS (1 << SOUND_MIXER_BASS)
-#define SOUND_MASK_TREBLE (1 << SOUND_MIXER_TREBLE)
-#define SOUND_MASK_SYNTH (1 << SOUND_MIXER_SYNTH)
-#define SOUND_MASK_PCM (1 << SOUND_MIXER_PCM)
-#define SOUND_MASK_SPEAKER (1 << SOUND_MIXER_SPEAKER)
-#define SOUND_MASK_LINE (1 << SOUND_MIXER_LINE)
-#define SOUND_MASK_MIC (1 << SOUND_MIXER_MIC)
-#define SOUND_MASK_CD (1 << SOUND_MIXER_CD)
-#define SOUND_MASK_IMIX (1 << SOUND_MIXER_IMIX)
-#define SOUND_MASK_ALTPCM (1 << SOUND_MIXER_ALTPCM)
-#define SOUND_MASK_RECLEV (1 << SOUND_MIXER_RECLEV)
-#define SOUND_MASK_IGAIN (1 << SOUND_MIXER_IGAIN)
-#define SOUND_MASK_OGAIN (1 << SOUND_MIXER_OGAIN)
-#define SOUND_MASK_LINE1 (1 << SOUND_MIXER_LINE1)
-#define SOUND_MASK_LINE2 (1 << SOUND_MIXER_LINE2)
-#define SOUND_MASK_LINE3 (1 << SOUND_MIXER_LINE3)
-#define SOUND_MASK_DIGITAL1 (1 << SOUND_MIXER_DIGITAL1)
-#define SOUND_MASK_DIGITAL2 (1 << SOUND_MIXER_DIGITAL2)
-#define SOUND_MASK_DIGITAL3 (1 << SOUND_MIXER_DIGITAL3)
-#define SOUND_MASK_PHONEIN (1 << SOUND_MIXER_PHONEIN)
-#define SOUND_MASK_PHONEOUT (1 << SOUND_MIXER_PHONEOUT)
-#define SOUND_MASK_RADIO (1 << SOUND_MIXER_RADIO)
-#define SOUND_MASK_VIDEO (1 << SOUND_MIXER_VIDEO)
-#define SOUND_MASK_MONITOR (1 << SOUND_MIXER_MONITOR)
-
-/* Obsolete macros */
-#define SOUND_MASK_MUTE (1 << SOUND_MIXER_MUTE)
-#define SOUND_MASK_ENHANCE (1 << SOUND_MIXER_ENHANCE)
-#define SOUND_MASK_LOUD (1 << SOUND_MIXER_LOUD)
-
-#define MIXER_READ(dev) _SIOR('M', dev, int)
-#define SOUND_MIXER_READ_VOLUME MIXER_READ(SOUND_MIXER_VOLUME)
-#define SOUND_MIXER_READ_BASS MIXER_READ(SOUND_MIXER_BASS)
-#define SOUND_MIXER_READ_TREBLE MIXER_READ(SOUND_MIXER_TREBLE)
-#define SOUND_MIXER_READ_SYNTH MIXER_READ(SOUND_MIXER_SYNTH)
-#define SOUND_MIXER_READ_PCM MIXER_READ(SOUND_MIXER_PCM)
-#define SOUND_MIXER_READ_SPEAKER MIXER_READ(SOUND_MIXER_SPEAKER)
-#define SOUND_MIXER_READ_LINE MIXER_READ(SOUND_MIXER_LINE)
-#define SOUND_MIXER_READ_MIC MIXER_READ(SOUND_MIXER_MIC)
-#define SOUND_MIXER_READ_CD MIXER_READ(SOUND_MIXER_CD)
-#define SOUND_MIXER_READ_IMIX MIXER_READ(SOUND_MIXER_IMIX)
-#define SOUND_MIXER_READ_ALTPCM MIXER_READ(SOUND_MIXER_ALTPCM)
-#define SOUND_MIXER_READ_RECLEV MIXER_READ(SOUND_MIXER_RECLEV)
-#define SOUND_MIXER_READ_IGAIN MIXER_READ(SOUND_MIXER_IGAIN)
-#define SOUND_MIXER_READ_OGAIN MIXER_READ(SOUND_MIXER_OGAIN)
-#define SOUND_MIXER_READ_LINE1 MIXER_READ(SOUND_MIXER_LINE1)
-#define SOUND_MIXER_READ_LINE2 MIXER_READ(SOUND_MIXER_LINE2)
-#define SOUND_MIXER_READ_LINE3 MIXER_READ(SOUND_MIXER_LINE3)
-
-/* Obsolete macros */
-#define SOUND_MIXER_READ_MUTE MIXER_READ(SOUND_MIXER_MUTE)
-#define SOUND_MIXER_READ_ENHANCE MIXER_READ(SOUND_MIXER_ENHANCE)
-#define SOUND_MIXER_READ_LOUD MIXER_READ(SOUND_MIXER_LOUD)
-
-#define SOUND_MIXER_READ_RECSRC MIXER_READ(SOUND_MIXER_RECSRC)
-#define SOUND_MIXER_READ_DEVMASK MIXER_READ(SOUND_MIXER_DEVMASK)
-#define SOUND_MIXER_READ_RECMASK MIXER_READ(SOUND_MIXER_RECMASK)
-#define SOUND_MIXER_READ_STEREODEVS MIXER_READ(SOUND_MIXER_STEREODEVS)
-#define SOUND_MIXER_READ_CAPS MIXER_READ(SOUND_MIXER_CAPS)
-
-#define MIXER_WRITE(dev) _SIOWR('M', dev, int)
-#define SOUND_MIXER_WRITE_VOLUME MIXER_WRITE(SOUND_MIXER_VOLUME)
-#define SOUND_MIXER_WRITE_BASS MIXER_WRITE(SOUND_MIXER_BASS)
-#define SOUND_MIXER_WRITE_TREBLE MIXER_WRITE(SOUND_MIXER_TREBLE)
-#define SOUND_MIXER_WRITE_SYNTH MIXER_WRITE(SOUND_MIXER_SYNTH)
-#define SOUND_MIXER_WRITE_PCM MIXER_WRITE(SOUND_MIXER_PCM)
-#define SOUND_MIXER_WRITE_SPEAKER MIXER_WRITE(SOUND_MIXER_SPEAKER)
-#define SOUND_MIXER_WRITE_LINE MIXER_WRITE(SOUND_MIXER_LINE)
-#define SOUND_MIXER_WRITE_MIC MIXER_WRITE(SOUND_MIXER_MIC)
-#define SOUND_MIXER_WRITE_CD MIXER_WRITE(SOUND_MIXER_CD)
-#define SOUND_MIXER_WRITE_IMIX MIXER_WRITE(SOUND_MIXER_IMIX)
-#define SOUND_MIXER_WRITE_ALTPCM MIXER_WRITE(SOUND_MIXER_ALTPCM)
-#define SOUND_MIXER_WRITE_RECLEV MIXER_WRITE(SOUND_MIXER_RECLEV)
-#define SOUND_MIXER_WRITE_IGAIN MIXER_WRITE(SOUND_MIXER_IGAIN)
-#define SOUND_MIXER_WRITE_OGAIN MIXER_WRITE(SOUND_MIXER_OGAIN)
-#define SOUND_MIXER_WRITE_LINE1 MIXER_WRITE(SOUND_MIXER_LINE1)
-#define SOUND_MIXER_WRITE_LINE2 MIXER_WRITE(SOUND_MIXER_LINE2)
-#define SOUND_MIXER_WRITE_LINE3 MIXER_WRITE(SOUND_MIXER_LINE3)
-
-/* Obsolete macros */
-#define SOUND_MIXER_WRITE_MUTE MIXER_WRITE(SOUND_MIXER_MUTE)
-#define SOUND_MIXER_WRITE_ENHANCE MIXER_WRITE(SOUND_MIXER_ENHANCE)
-#define SOUND_MIXER_WRITE_LOUD MIXER_WRITE(SOUND_MIXER_LOUD)
-
-#define SOUND_MIXER_WRITE_RECSRC MIXER_WRITE(SOUND_MIXER_RECSRC)
-
-typedef struct mixer_info
-{
- char id[16];
- char name[32];
- int modify_counter;
- int fillers[10];
-} mixer_info;
-
-typedef struct _old_mixer_info /* Obsolete */
-{
- char id[16];
- char name[32];
-} _old_mixer_info;
-
-#define SOUND_MIXER_INFO _SIOR ('M', 101, mixer_info)
-#define SOUND_OLD_MIXER_INFO _SIOR ('M', 101, _old_mixer_info)
-
-/*
- * A mechanism for accessing "proprietary" mixer features. This method
- * permits passing 128 bytes of arbitrary data between a mixer application
- * and the mixer driver. Interpretation of the record is defined by
- * the particular mixer driver.
- */
-typedef unsigned char mixer_record[128];
-
-#define SOUND_MIXER_ACCESS _SIOWR('M', 102, mixer_record)
-
-/*
- * Two ioctls for special souncard function
- */
-#define SOUND_MIXER_AGC _SIOWR('M', 103, int)
-#define SOUND_MIXER_3DSE _SIOWR('M', 104, int)
-
-/*
- * The SOUND_MIXER_PRIVATE# commands can be redefined by low level drivers.
- * These features can be used when accessing device specific features.
- */
-#define SOUND_MIXER_PRIVATE1 _SIOWR('M', 111, int)
-#define SOUND_MIXER_PRIVATE2 _SIOWR('M', 112, int)
-#define SOUND_MIXER_PRIVATE3 _SIOWR('M', 113, int)
-#define SOUND_MIXER_PRIVATE4 _SIOWR('M', 114, int)
-#define SOUND_MIXER_PRIVATE5 _SIOWR('M', 115, int)
-
-/*
- * SOUND_MIXER_GETLEVELS and SOUND_MIXER_SETLEVELS calls can be used
- * for querying current mixer settings from the driver and for loading
- * default volume settings _prior_ activating the mixer (loading
- * doesn't affect current state of the mixer hardware). These calls
- * are for internal use only.
- */
-
-typedef struct mixer_vol_table {
- int num; /* Index to volume table */
- char name[32];
- int levels[32];
-} mixer_vol_table;
-
-#define SOUND_MIXER_GETLEVELS _SIOWR('M', 116, mixer_vol_table)
-#define SOUND_MIXER_SETLEVELS _SIOWR('M', 117, mixer_vol_table)
-
-/*
- * An ioctl for identifying the driver version. It will return value
- * of the SOUND_VERSION macro used when compiling the driver.
- * This call was introduced in OSS version 3.6 and it will not work
- * with earlier versions (returns EINVAL).
- */
-#define OSS_GETVERSION _SIOR ('M', 118, int)
-
-/*
- * Level 2 event types for /dev/sequencer
- */
-
-/*
- * The 4 most significant bits of byte 0 specify the class of
- * the event:
- *
- * 0x8X = system level events,
- * 0x9X = device/port specific events, event[1] = device/port,
- * The last 4 bits give the subtype:
- * 0x02 = Channel event (event[3] = chn).
- * 0x01 = note event (event[4] = note).
- * (0x01 is not used alone but always with bit 0x02).
- * event[2] = MIDI message code (0x80=note off etc.)
- *
- */
-
-#define EV_SEQ_LOCAL 0x80
-#define EV_TIMING 0x81
-#define EV_CHN_COMMON 0x92
-#define EV_CHN_VOICE 0x93
-#define EV_SYSEX 0x94
-/*
- * Event types 200 to 220 are reserved for application use.
- * These numbers will not be used by the driver.
- */
-
-/*
- * Events for event type EV_CHN_VOICE
- */
-
-#define MIDI_NOTEOFF 0x80
-#define MIDI_NOTEON 0x90
-#define MIDI_KEY_PRESSURE 0xA0
-
-/*
- * Events for event type EV_CHN_COMMON
- */
-
-#define MIDI_CTL_CHANGE 0xB0
-#define MIDI_PGM_CHANGE 0xC0
-#define MIDI_CHN_PRESSURE 0xD0
-#define MIDI_PITCH_BEND 0xE0
-
-#define MIDI_SYSTEM_PREFIX 0xF0
-
-/*
- * Timer event types
- */
-#define TMR_WAIT_REL 1 /* Time relative to the prev time */
-#define TMR_WAIT_ABS 2 /* Absolute time since TMR_START */
-#define TMR_STOP 3
-#define TMR_START 4
-#define TMR_CONTINUE 5
-#define TMR_TEMPO 6
-#define TMR_ECHO 8
-#define TMR_CLOCK 9 /* MIDI clock */
-#define TMR_SPP 10 /* Song position pointer */
-#define TMR_TIMESIG 11 /* Time signature */
-
-/*
- * Local event types
- */
-#define LOCL_STARTAUDIO 1
-
-#if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS)
-/*
- * Some convenience macros to simplify programming of the
- * /dev/sequencer interface
- *
- * These macros define the API which should be used when possible.
- */
-#define SEQ_DECLAREBUF() SEQ_USE_EXTBUF()
-
-void seqbuf_dump(void); /* This function must be provided by programs */
-
-extern int OSS_init(int seqfd, int buflen);
-extern void OSS_seqbuf_dump(int fd, unsigned char *buf, int buflen);
-extern void OSS_seq_advbuf(int len, int fd, unsigned char *buf, int buflen);
-extern void OSS_seq_needbuf(int len, int fd, unsigned char *buf, int buflen);
-extern void OSS_patch_caching(int dev, int chn, int patch,
- int fd, unsigned char *buf, int buflen);
-extern void OSS_drum_caching(int dev, int chn, int patch,
- int fd, unsigned char *buf, int buflen);
-extern void OSS_write_patch(int fd, unsigned char *buf, int len);
-extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
-
-#define SEQ_PM_DEFINES int __foo_bar___
-#ifdef OSSLIB
-# define SEQ_USE_EXTBUF() \
- extern unsigned char *_seqbuf; \
- extern int _seqbuflen;extern int _seqbufptr
-# define SEQ_DEFINEBUF(len) SEQ_USE_EXTBUF();static int _requested_seqbuflen=len
-# define _SEQ_ADVBUF(len) OSS_seq_advbuf(len, seqfd, _seqbuf, _seqbuflen)
-# define _SEQ_NEEDBUF(len) OSS_seq_needbuf(len, seqfd, _seqbuf, _seqbuflen)
-# define SEQ_DUMPBUF() OSS_seqbuf_dump(seqfd, _seqbuf, _seqbuflen)
-
-# define SEQ_LOAD_GMINSTR(dev, instr) \
- OSS_patch_caching(dev, -1, instr, seqfd, _seqbuf, _seqbuflen)
-# define SEQ_LOAD_GMDRUM(dev, drum) \
- OSS_drum_caching(dev, -1, drum, seqfd, _seqbuf, _seqbuflen)
-#else /* !OSSLIB */
-
-# define SEQ_LOAD_GMINSTR(dev, instr)
-# define SEQ_LOAD_GMDRUM(dev, drum)
-
-# define SEQ_USE_EXTBUF() \
- extern unsigned char _seqbuf[]; \
- extern int _seqbuflen;extern int _seqbufptr
-
-#ifndef USE_SIMPLE_MACROS
-/* Sample seqbuf_dump() implementation:
- *
- * SEQ_DEFINEBUF (2048); -- Defines a buffer for 2048 bytes
- *
- * int seqfd; -- The file descriptor for /dev/sequencer.
- *
- * void
- * seqbuf_dump ()
- * {
- * if (_seqbufptr)
- * if (write (seqfd, _seqbuf, _seqbufptr) == -1)
- * {
- * perror ("write /dev/sequencer");
- * exit (-1);
- * }
- * _seqbufptr = 0;
- * }
- */
-
-#define SEQ_DEFINEBUF(len) unsigned char _seqbuf[len]; int _seqbuflen = len;int _seqbufptr = 0
-#define _SEQ_NEEDBUF(len) if ((_seqbufptr+(len)) > _seqbuflen) seqbuf_dump()
-#define _SEQ_ADVBUF(len) _seqbufptr += len
-#define SEQ_DUMPBUF seqbuf_dump
-#else
-/*
- * This variation of the sequencer macros is used just to format one event
- * using fixed buffer.
- *
- * The program using the macro library must define the following macros before
- * using this library.
- *
- * #define _seqbuf name of the buffer (unsigned char[])
- * #define _SEQ_ADVBUF(len) If the applic needs to know the exact
- * size of the event, this macro can be used.
- * Otherwise this must be defined as empty.
- * #define _seqbufptr Define the name of index variable or 0 if
- * not required.
- */
-#define _SEQ_NEEDBUF(len) /* empty */
-#endif
-#endif /* !OSSLIB */
-
-#define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr] = SEQ_EXTENDED;\
- _seqbuf[_seqbufptr+1] = SEQ_VOLMODE;\
- _seqbuf[_seqbufptr+2] = (dev);\
- _seqbuf[_seqbufptr+3] = (mode);\
- _seqbuf[_seqbufptr+4] = 0;\
- _seqbuf[_seqbufptr+5] = 0;\
- _seqbuf[_seqbufptr+6] = 0;\
- _seqbuf[_seqbufptr+7] = 0;\
- _SEQ_ADVBUF(8);}
-
-/*
- * Midi voice messages
- */
-
-#define _CHN_VOICE(dev, event, chn, note, parm) \
- {_SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr] = EV_CHN_VOICE;\
- _seqbuf[_seqbufptr+1] = (dev);\
- _seqbuf[_seqbufptr+2] = (event);\
- _seqbuf[_seqbufptr+3] = (chn);\
- _seqbuf[_seqbufptr+4] = (note);\
- _seqbuf[_seqbufptr+5] = (parm);\
- _seqbuf[_seqbufptr+6] = (0);\
- _seqbuf[_seqbufptr+7] = 0;\
- _SEQ_ADVBUF(8);}
-
-#define SEQ_START_NOTE(dev, chn, note, vol) \
- _CHN_VOICE(dev, MIDI_NOTEON, chn, note, vol)
-
-#define SEQ_STOP_NOTE(dev, chn, note, vol) \
- _CHN_VOICE(dev, MIDI_NOTEOFF, chn, note, vol)
-
-#define SEQ_KEY_PRESSURE(dev, chn, note, pressure) \
- _CHN_VOICE(dev, MIDI_KEY_PRESSURE, chn, note, pressure)
-
-/*
- * Midi channel messages
- */
-
-#define _CHN_COMMON(dev, event, chn, p1, p2, w14) \
- {_SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr] = EV_CHN_COMMON;\
- _seqbuf[_seqbufptr+1] = (dev);\
- _seqbuf[_seqbufptr+2] = (event);\
- _seqbuf[_seqbufptr+3] = (chn);\
- _seqbuf[_seqbufptr+4] = (p1);\
- _seqbuf[_seqbufptr+5] = (p2);\
- *(short *)&_seqbuf[_seqbufptr+6] = (w14);\
- _SEQ_ADVBUF(8);}
-/*
- * SEQ_SYSEX permits sending of sysex messages. (It may look that it permits
- * sending any MIDI bytes but it's absolutely not possible. Trying to do
- * so _will_ cause problems with MPU401 intelligent mode).
- *
- * Sysex messages are sent in blocks of 1 to 6 bytes. Longer messages must be
- * sent by calling SEQ_SYSEX() several times (there must be no other events
- * between them). First sysex fragment must have 0xf0 in the first byte
- * and the last byte (buf[len-1] of the last fragment must be 0xf7. No byte
- * between these sysex start and end markers cannot be larger than 0x7f. Also
- * lengths of each fragments (except the last one) must be 6.
- *
- * Breaking the above rules may work with some MIDI ports but is likely to
- * cause fatal problems with some other devices (such as MPU401).
- */
-#define SEQ_SYSEX(dev, buf, len) \
- {int ii, ll=(len); \
- unsigned char *bufp=buf;\
- if (ll>6)ll=6;\
- _SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr] = EV_SYSEX;\
- _seqbuf[_seqbufptr+1] = (dev);\
- for(ii=0;ii<ll;ii++)\
- _seqbuf[_seqbufptr+ii+2] = bufp[ii];\
- for(ii=ll;ii<6;ii++)\
- _seqbuf[_seqbufptr+ii+2] = 0xff;\
- _SEQ_ADVBUF(8);}
-
-#define SEQ_CHN_PRESSURE(dev, chn, pressure) \
- _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0)
-
-#define SEQ_SET_PATCH SEQ_PGM_CHANGE
-#ifdef OSSLIB
-# define SEQ_PGM_CHANGE(dev, chn, patch) \
- {OSS_patch_caching(dev, chn, patch, seqfd, _seqbuf, _seqbuflen); \
- _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0);}
-#else
-# define SEQ_PGM_CHANGE(dev, chn, patch) \
- _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0)
-#endif
-
-#define SEQ_CONTROL(dev, chn, controller, value) \
- _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value)
-
-#define SEQ_BENDER(dev, chn, value) \
- _CHN_COMMON(dev, MIDI_PITCH_BEND, chn, 0, 0, value)
-
-
-#define SEQ_V2_X_CONTROL(dev, voice, controller, value) {_SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr] = SEQ_EXTENDED;\
- _seqbuf[_seqbufptr+1] = SEQ_CONTROLLER;\
- _seqbuf[_seqbufptr+2] = (dev);\
- _seqbuf[_seqbufptr+3] = (voice);\
- _seqbuf[_seqbufptr+4] = (controller);\
- _seqbuf[_seqbufptr+5] = ((value)&0xff);\
- _seqbuf[_seqbufptr+6] = ((value>>8)&0xff);\
- _seqbuf[_seqbufptr+7] = 0;\
- _SEQ_ADVBUF(8);}
-/*
- * The following 5 macros are incorrectly implemented and obsolete.
- * Use SEQ_BENDER and SEQ_CONTROL (with proper controller) instead.
- */
-#define SEQ_PITCHBEND(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER, value)
-#define SEQ_BENDER_RANGE(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER_RANGE, value)
-#define SEQ_EXPRESSION(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_EXPRESSION, value*128)
-#define SEQ_MAIN_VOLUME(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_MAIN_VOLUME, (value*16383)/100)
-#define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2)
-
-/*
- * Timing and syncronization macros
- */
-
-#define _TIMER_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr+0] = EV_TIMING; \
- _seqbuf[_seqbufptr+1] = (ev); \
- _seqbuf[_seqbufptr+2] = 0;\
- _seqbuf[_seqbufptr+3] = 0;\
- *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \
- _SEQ_ADVBUF(8);}
-
-#define SEQ_START_TIMER() _TIMER_EVENT(TMR_START, 0)
-#define SEQ_STOP_TIMER() _TIMER_EVENT(TMR_STOP, 0)
-#define SEQ_CONTINUE_TIMER() _TIMER_EVENT(TMR_CONTINUE, 0)
-#define SEQ_WAIT_TIME(ticks) _TIMER_EVENT(TMR_WAIT_ABS, ticks)
-#define SEQ_DELTA_TIME(ticks) _TIMER_EVENT(TMR_WAIT_REL, ticks)
-#define SEQ_ECHO_BACK(key) _TIMER_EVENT(TMR_ECHO, key)
-#define SEQ_SET_TEMPO(value) _TIMER_EVENT(TMR_TEMPO, value)
-#define SEQ_SONGPOS(pos) _TIMER_EVENT(TMR_SPP, pos)
-#define SEQ_TIME_SIGNATURE(sig) _TIMER_EVENT(TMR_TIMESIG, sig)
-
-/*
- * Local control events
- */
-
-#define _LOCAL_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr+0] = EV_SEQ_LOCAL; \
- _seqbuf[_seqbufptr+1] = (ev); \
- _seqbuf[_seqbufptr+2] = 0;\
- _seqbuf[_seqbufptr+3] = 0;\
- *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \
- _SEQ_ADVBUF(8);}
-
-#define SEQ_PLAYAUDIO(devmask) _LOCAL_EVENT(LOCL_STARTAUDIO, devmask)
-/*
- * Events for the level 1 interface only
- */
-
-#define SEQ_MIDIOUT(device, byte) {_SEQ_NEEDBUF(4);\
- _seqbuf[_seqbufptr] = SEQ_MIDIPUTC;\
- _seqbuf[_seqbufptr+1] = (byte);\
- _seqbuf[_seqbufptr+2] = (device);\
- _seqbuf[_seqbufptr+3] = 0;\
- _SEQ_ADVBUF(4);}
-
-/*
- * Patch loading.
- */
-#ifdef OSSLIB
-# define SEQ_WRPATCH(patchx, len) \
- OSS_write_patch(seqfd, (char*)(patchx), len)
-# define SEQ_WRPATCH2(patchx, len) \
- OSS_write_patch2(seqfd, (char*)(patchx), len)
-#else
-# define SEQ_WRPATCH(patchx, len) \
- {if (_seqbufptr) SEQ_DUMPBUF();\
- if (write(seqfd, (char*)(patchx), len)==-1) \
- perror("Write patch: /dev/sequencer");}
-# define SEQ_WRPATCH2(patchx, len) \
- (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len))
-#endif
-
-#endif
-#endif
diff --git a/winsup/cygwin/include/sys/statfs.h b/winsup/cygwin/include/sys/statfs.h
deleted file mode 100644
index 51ad3c6b1..000000000
--- a/winsup/cygwin/include/sys/statfs.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* sys/statfs.h
-
- Copyright 2002 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <sys/vfs.h>
diff --git a/winsup/cygwin/include/sys/statvfs.h b/winsup/cygwin/include/sys/statvfs.h
deleted file mode 100644
index aa86674af..000000000
--- a/winsup/cygwin/include/sys/statvfs.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* sys/statvfs.h
-
- Copyright 2005 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_STATVFS_H_
-#define _SYS_STATVFS_H_
-
-#include <sys/types.h>
-
-#define ST_RDONLY 0x80000 /* equals FILE_READ_ONLY_VOLUME */
-#define ST_NOSUID 0 /* Looking for that bit should always fail. */
-
-struct statvfs {
- unsigned long f_bsize; /* file system block size */
- unsigned long f_frsize; /* fragment size */
- fsblkcnt_t f_blocks; /* size of fs in f_frsize units */
- fsblkcnt_t f_bfree; /* free blocks in fs */
- fsblkcnt_t f_bavail; /* free blocks avail to non-superuser */
- fsfilcnt_t f_files; /* total file nodes in file system */
- fsfilcnt_t f_ffree; /* free file nodes in fs */
- fsfilcnt_t f_favail; /* avail file nodes in fs */
- unsigned long f_fsid; /* file system id */
- unsigned long f_flag; /* mount flags */
- unsigned long f_namemax; /* maximum length of filenames */
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-int statvfs (const char *__path, struct statvfs *__buf);
-int fstatvfs (int __fd, struct statvfs *__buf);
-
-#ifdef __cplusplus
-};
-#endif /* __cplusplus */
-
-#endif /*_SYS_STATVFS_H_*/
diff --git a/winsup/cygwin/include/sys/stdio.h b/winsup/cygwin/include/sys/stdio.h
deleted file mode 100644
index 6664a0b33..000000000
--- a/winsup/cygwin/include/sys/stdio.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* sys/stdio.h
-
- Copyright 2004, 2005, 2006, 2007, 2008, 2010 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_STDIO_H_
-#define _SYS_STDIO_H_
-
-#include <sys/cdefs.h>
-#include <sys/lock.h>
-
-/* These definitions should be kept in sync with those in the newlib
- header of the same name (newlib/libc/include/sys/stdio.h). */
-
-#if !defined(__SINGLE_THREAD__)
-# if !defined(_flockfile)
-# define _flockfile(fp) ({ if (!((fp)->_flags & __SSTR)) \
- __cygwin_lock_lock ((_LOCK_T *)&(fp)->_lock); })
-# endif
-# if !defined(_ftrylockfile)
-# define _ftrylockfile(fp) (((fp)->_flags & __SSTR) ? 0 : \
- __cygwin_lock_trylock ((_LOCK_T *)&(fp)->_lock))
-# endif
-# if !defined(_funlockfile)
-# define _funlockfile(fp) ({ if (!((fp)->_flags & __SSTR)) \
- __cygwin_lock_unlock ((_LOCK_T *)&(fp)->_lock); })
-# endif
-#endif
-
-__BEGIN_DECLS
-
-ssize_t _EXFUN(getline, (char **, size_t *, FILE *));
-ssize_t _EXFUN(getdelim, (char **, size_t *, int, FILE *));
-
-__END_DECLS
-
-#endif
diff --git a/winsup/cygwin/include/sys/strace.h b/winsup/cygwin/include/sys/strace.h
deleted file mode 100644
index eacd3f113..000000000
--- a/winsup/cygwin/include/sys/strace.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/* sys/strace.h
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
- 2010, 2011, 2012, 2014 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* This file contains routines for tracing system calls and other internal
- phenomenon.
-
- When tracing system calls, try to use the same style throughout:
-
- result = syscall (arg1, arg2, arg3) [optional extra stuff]
-
- If a system call can block (eg: read, write, wait), print another message
- before hanging so the user will know why the program has stopped.
-
- Note: __seterrno will also print a trace message. Have that printed
- *first*. This will make it easy to always know what __seterrno is
- refering to. For the same reason, try not to have __seterrno messages
- printed alone.
-*/
-
-#ifndef _SYS_STRACE_H
-#define _SYS_STRACE_H
-
-#include <stdarg.h>
-#include <sys/types.h>
-
-#ifdef __cplusplus
-
-class child_info;
-class strace
-{
- int vsprntf (char *buf, const char *func, const char *infmt, va_list ap);
- void write (unsigned category, const char *buf, int count);
- unsigned char _active;
-public:
- void activate (bool) __attribute__ ((__regparm__ (2)));;
- strace () {}
- int microseconds ();
- int version;
- int lmicrosec;
- bool execing;
- void dll_info () __attribute__ ((__regparm__ (1)));
- void prntf (unsigned, const char *func, const char *, ...) /*__attribute__ ((__regparm__(3)))*/;
- void vprntf (unsigned, const char *func, const char *, va_list ap) /*__attribute__ ((__regparm__(3)))*/;
- void wm (int message, int word, int lon) __attribute__ ((__regparm__(3)));
- void write_childpid (pid_t) __attribute__ ((__regparm__ (3)));
- bool attached () const {return _active == 3;}
- bool active () const {return _active & 1;}
- unsigned char& active_val () {return _active;}
-};
-
-extern strace strace;
-
-#endif /* __cplusplus */
-
-#define _STRACE_INTERFACE_ACTIVATE_ADDR -1
-#define _STRACE_INTERFACE_ACTIVATE_ADDR1 -2
-#define _STRACE_CHILD_PID -3
-
-/* Bitmasks of tracing messages to print. */
-
-#define _STRACE_ALL 0x000001 // so behaviour of strace=1 is unchanged
-#define _STRACE_FLUSH 0x000002 // flush output buffer after every message
-#define _STRACE_INHERIT 0x000004 // children inherit mask from parent
-#define _STRACE_UHOH 0x000008 // unusual or weird phenomenon
-#define _STRACE_SYSCALL 0x000010 // system calls
-#define _STRACE_STARTUP 0x000020 // argc/envp printout at startup
-#define _STRACE_DEBUG 0x000040 // info to help debugging
-#define _STRACE_PARANOID 0x000080 // paranoid info
-#define _STRACE_TERMIOS 0x000100 // info for debugging termios stuff
-#define _STRACE_SELECT 0x000200 // info on ugly select internals
-#define _STRACE_WM 0x000400 // trace windows messages (enable _strace_wm)
-#define _STRACE_SIGP 0x000800 // trace signal and process handling
-#define _STRACE_MINIMAL 0x001000 // very minimal strace output
-#define _STRACE_PTHREAD 0x002000 // pthread calls
-#define _STRACE_EXITDUMP 0x004000 // dump strace cache on exit
-#define _STRACE_SYSTEM 0x008000 // cache strace messages
-#define _STRACE_NOMUTEX 0x010000 // don't use mutex for synchronization
-#define _STRACE_MALLOC 0x020000 // trace malloc calls
-#define _STRACE_THREAD 0x040000 // cygthread calls
-#define _STRACE_NOTALL 0x080000 // don't include if _STRACE_ALL
-#define _STRACE_SPECIAL 0x100000 // special case, only for debugging - do not check in
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void small_printf (const char *, ...);
-void strace_printf (unsigned, const char *func, const char *, ...);
-
-#ifdef __cplusplus
-}
-#endif
-
-#ifdef __cplusplus
-
-#ifdef NOSTRACE
-#define strace_printf_wrap(what, fmt, args...)
-#define strace_printf_wrap1(what, fmt, 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 strace_vprintf(what, fmt, arg) \
- ((void) ({\
- if ((_STRACE_ ## what & _STRACE_SYSTEM) || strace.active ()) \
- strace.vprntf((_STRACE_ ## what), __PRETTY_FUNCTION__, fmt, arg); \
- 0; \
- }))
-#endif /*NOSTRACE*/
-
-#ifdef DEBUGGING
-#define debug_only_printf(fmt, args...) debug_printf (fmt , ## args)
-#else
-#define debug_only_printf(fmt, args...) do {} while (0)
-#endif
-#define debug_printf(fmt, args...) strace_printf_wrap(DEBUG, fmt , ## args)
-#define malloc_printf(fmt, args...) strace_printf_wrap1(MALLOC, fmt , ## args)
-#define minimal_printf(fmt, args...) strace_printf_wrap1(MINIMAL, fmt , ## args)
-#define paranoid_printf(fmt, args...) strace_printf_wrap1(PARANOID, fmt , ## args)
-#define pthread_printf(fmt, args...) strace_printf_wrap1(PTHREAD, 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 thread_printf(fmt, args...) strace_printf_wrap1(THREAD, fmt , ## args)
-#define special_printf(fmt, args...) strace_printf_wrap1(SPECIAL, fmt , ## args)
-#define wm_printf(fmt, args...) strace_printf_wrap(WM, fmt , ## args)
-#endif /* __cplusplus */
-#endif /* _SYS_STRACE_H */
diff --git a/winsup/cygwin/include/sys/sysinfo.h b/winsup/cygwin/include/sys/sysinfo.h
deleted file mode 100644
index 32fa05bd1..000000000
--- a/winsup/cygwin/include/sys/sysinfo.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* sys/sysinfo.h
-
- Copyright 2009, 2011, 2013 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* sys/sysinfo.h header file for Cygwin. */
-
-#ifndef _SYS_SYSINFO_H
-#define _SYS_SYSINFO_H
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-struct sysinfo {
- long uptime; /* Seconds since boot */
- unsigned long loads[3]; /* 1, 5, and 15 minute load averages */
- unsigned long totalram; /* Total usable main memory size */
- unsigned long freeram; /* Available memory size */
- unsigned long sharedram; /* Amount of shared memory */
- unsigned long bufferram; /* Memory used by buffers */
- unsigned long totalswap; /* Total swap space size */
- unsigned long freeswap; /* swap space still available */
- unsigned short procs; /* Number of current processes */
- unsigned long totalhigh; /* Total high memory size */
- unsigned long freehigh; /* Available high memory size */
- unsigned int mem_unit; /* Memory unit size in bytes */
- char __f[10]; /* Pads structure to 64 bytes */
-};
-
-extern int sysinfo (struct sysinfo *);
-extern int get_nprocs_conf (void);
-extern int get_nprocs (void);
-extern long get_phys_pages (void);
-extern long get_avphys_pages (void);
-
-__END_DECLS
-
-#endif /* _SYS_SYSINFO_H */
diff --git a/winsup/cygwin/include/sys/syslimits.h b/winsup/cygwin/include/sys/syslimits.h
deleted file mode 100644
index b501de81e..000000000
--- a/winsup/cygwin/include/sys/syslimits.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* sys/syslimits.h
-
- Copyright 2006 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_SYSLIMITS_H
-#define _SYS_SYSLIMITS_H
-
-#ifdef _COMPILING_NEWLIB
-# include <limits.h>
-#else
-# error "Do not include sys/syslimits.h from applications directly."
-#endif
-
-#endif /*_SYS_SYSLIMITS_H */
diff --git a/winsup/cygwin/include/sys/syslog.h b/winsup/cygwin/include/sys/syslog.h
deleted file mode 100644
index b88bb8dd8..000000000
--- a/winsup/cygwin/include/sys/syslog.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* sys/syslog.h
-
- Copyright 1996, 1998, 2000, 2001, 2003, 2005 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_LOG_H
-#define _SYS_LOG_H
-
-#include <sys/cdefs.h>
-#include <stdarg.h>
-
-#define _PATH_LOG "/dev/log"
-#define _PATH_KLOG "/dev/kmsg"
-
-#define LOG_EMERG 0
-#define LOG_ALERT 1
-#define LOG_CRIT 2
-#define LOG_ERR 3
-#define LOG_WARNING 4
-#define LOG_NOTICE 5
-#define LOG_INFO 6
-#define LOG_DEBUG 7
-
-#define LOG_PRIMASK 0x07
-
-#define LOG_PRI(p) ((p) & LOG_PRIMASK)
-#define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri))
-
-#define LOG_KERN (0<<3)
-#define LOG_USER (1<<3)
-#define LOG_MAIL (2<<3)
-#define LOG_DAEMON (3<<3)
-#define LOG_AUTH (4<<3)
-#define LOG_SYSLOG (5<<3)
-#define LOG_LPR (6<<3)
-#define LOG_NEWS (7<<3)
-#define LOG_UUCP (8<<3)
-#define LOG_CRON (9<<3)
-#define LOG_AUTHPRIV (10<<3)
-#define LOG_FTP (11<<3)
-
-/* Codes through 15 are reserved for system use */
-#define LOG_LOCAL0 (16<<3)
-#define LOG_LOCAL1 (17<<3)
-#define LOG_LOCAL2 (18<<3)
-#define LOG_LOCAL3 (19<<3)
-#define LOG_LOCAL4 (20<<3)
-#define LOG_LOCAL5 (21<<3)
-#define LOG_LOCAL6 (22<<3)
-#define LOG_LOCAL7 (23<<3)
-
-#define LOG_NFACILITIES 24
-#define LOG_FACMASK 0x03f8
-#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3)
-
-#ifdef SYSLOG_NAMES
-
-#define INTERNAL_NOPRI 0x10 /* Maps to "none" */
-#define INTERNAL_MARK LOG_MAKEPRI(LOG_NFACILITIES, 0) /* Maps to "mark" */
-
-typedef struct _code {
- char *c_name;
- int c_val;
-} CODE;
-
-CODE prioritynames[] = {
- { "alert", LOG_ALERT },
- { "crit", LOG_CRIT },
- { "debug", LOG_DEBUG },
- { "emerg", LOG_EMERG },
- { "err", LOG_ERR },
- { "error", LOG_ERR }, /* Deprecated */
- { "info", LOG_INFO },
- { "none", INTERNAL_NOPRI },
- { "notice", LOG_NOTICE },
- { "panic", LOG_EMERG }, /* Deprecated */
- { "warn", LOG_WARNING }, /* Deprecated */
- { "warning", LOG_WARNING },
- { NULL, -1 }
-};
-
-CODE facilitynames[] = {
- { "auth", LOG_AUTH },
- { "authpriv", LOG_AUTHPRIV },
- { "cron", LOG_CRON },
- { "daemon", LOG_DAEMON },
- { "ftp", LOG_FTP },
- { "kern", LOG_KERN },
- { "lpr", LOG_LPR },
- { "mail", LOG_MAIL },
- { "mark", INTERNAL_MARK },
- { "news", LOG_NEWS },
- { "security", LOG_AUTH }, /* Deprecated */
- { "syslog", LOG_SYSLOG },
- { "user", LOG_USER },
- { "uucp", LOG_UUCP },
- { "local0", LOG_LOCAL0 },
- { "local1", LOG_LOCAL1 },
- { "local2", LOG_LOCAL2 },
- { "local3", LOG_LOCAL3 },
- { "local4", LOG_LOCAL4 },
- { "local5", LOG_LOCAL5 },
- { "local6", LOG_LOCAL6 },
- { "local7", LOG_LOCAL7 },
- { NULL, -1 }
-};
-
-#endif /* SYSLOG_NAMES */
-
-#define LOG_MASK(pri) (1 << (pri))
-#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1)
-
-/*
- * Option flags for openlog.
- *
- * LOG_ODELAY no longer does anything.
- * LOG_NDELAY is the inverse of what it used to be.
- */
-#define LOG_PID 0x01 /* log the pid with each message */
-#define LOG_CONS 0x02 /* log on the console if errors in sending */
-#define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */
-#define LOG_NDELAY 0x08 /* don't delay open */
-#define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */
-#define LOG_PERROR 0x20 /* log to stderr as well */
-
-__BEGIN_DECLS
-
-
-void closelog (void);
-void openlog (const char *, int, int);
-int setlogmask (int);
-void syslog (int, const char *, ...);
-void vsyslog (int, const char *, va_list ap);
-
-__END_DECLS
-
-
-#endif /* _SYS_LOG_H */
diff --git a/winsup/cygwin/include/sys/sysmacros.h b/winsup/cygwin/include/sys/sysmacros.h
deleted file mode 100644
index 25a738a7d..000000000
--- a/winsup/cygwin/include/sys/sysmacros.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* sys/sysmacros.h
-
- Copyright 1998, 2000, 2001, 2002, 2010, 2011, 2012 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_SYSMACROS_H
-#define _SYS_SYSMACROS_H
-
-#include <sys/types.h>
-
-_ELIDABLE_INLINE int gnu_dev_major(dev_t);
-_ELIDABLE_INLINE int gnu_dev_minor(dev_t);
-_ELIDABLE_INLINE dev_t gnu_dev_makedev(int, int);
-
-_ELIDABLE_INLINE int
-gnu_dev_major(dev_t dev)
-{
- return (int)(((dev) >> 16) & 0xffff);
-}
-
-_ELIDABLE_INLINE int
-gnu_dev_minor(dev_t dev)
-{
- return (int)((dev) & 0xffff);
-}
-
-_ELIDABLE_INLINE dev_t
-gnu_dev_makedev(int maj, int min)
-{
- return (((maj) << 16) | ((min) & 0xffff));
-}
-
-#define major(dev) gnu_dev_major(dev)
-#define minor(dev) gnu_dev_minor(dev)
-#define makedev(maj, min) gnu_dev_makedev(maj, min)
-
-#endif /* _SYS_SYSMACROS_H */
diff --git a/winsup/cygwin/include/sys/sysproto.h b/winsup/cygwin/include/sys/sysproto.h
deleted file mode 100644
index 488782b89..000000000
--- a/winsup/cygwin/include/sys/sysproto.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* sys/sysproto.h
-
- Copyright 2003 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* sys/sysproto.h header file for Cygwin. */
-
-#ifndef _SYS_SYSPROTO_H
-#define _SYS_SYSPROTO_H
-
-#include <cygwin/sysproto.h>
-
-#endif /* _SYS_SYSPROTO_H */
diff --git a/winsup/cygwin/include/sys/termio.h b/winsup/cygwin/include/sys/termio.h
deleted file mode 100644
index 60dcf7e08..000000000
--- a/winsup/cygwin/include/sys/termio.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* sys/termio.h
-
- Copyright 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <sys/termios.h>
-
diff --git a/winsup/cygwin/include/sys/termios.h b/winsup/cygwin/include/sys/termios.h
deleted file mode 100644
index 687c0085e..000000000
--- a/winsup/cygwin/include/sys/termios.h
+++ /dev/null
@@ -1,372 +0,0 @@
-/* sys/termios.h
-
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* sys/termios.h */
-
-#ifndef _SYS_TERMIOS_H
-#define _SYS_TERMIOS_H
-
-#include <sys/types.h>
-
-#define TIOCMGET 0x5415
-#define TIOCMBIS 0x5416
-#define TIOCMBIC 0x5417
-#define TIOCMSET 0x5418
-#define TIOCINQ 0x541B
-#define TIOCSCTTY 0x540E
-
-/* TIOCINQ is utilized instead of FIONREAD which has been
-accupied for other purposes under CYGWIN.
-Other UNIX ioctl requests has been omited because
-effects of their work one can achive by standard
-POSIX commands */
-
-#define TIOCSBRK 0x5427
-#define TIOCCBRK 0x5428
-
-#define TIOCM_DTR 0x002
-#define TIOCM_RTS 0x004
-#define TIOCM_CTS 0x020
-#define TIOCM_CAR 0x040
-#define TIOCM_RNG 0x080
-#define TIOCM_DSR 0x100
-#define TIOCM_CD TIOCM_CAR
-#define TIOCM_RI TIOCM_RNG
-
-#define TCOOFF 0
-#define TCOON 1
-#define TCIOFF 2
-#define TCION 3
-
-#define TCGETA 5
-#define TCSETA 6
-#define TCSETAW 7
-#define TCSETAF 8
-
-#define TCIFLUSH 0
-#define TCOFLUSH 1
-#define TCIOFLUSH 2
-#define TCFLSH 3
-
-#define TCSAFLUSH 1
-#define TCSANOW 2
-#define TCSADRAIN 3
-#define TCSADFLUSH 4
-
-#define TIOCPKT 6
-
-#define TIOCPKT_DATA 0
-#define TIOCPKT_FLUSHREAD 1
-#define TIOCPKT_FLUSHWRITE 2
-#define TIOCPKT_STOP 4
-#define TIOCPKT_START 8
-#define TIOCPKT_NOSTOP 16
-#define TIOCPKT_DOSTOP 32
-
-#define FIONBIO 0x8004667e /* To be compatible with socket version */
-
-#define CTRL(ch) ((ch)&0x1F)
-
-#define CNUL 0
-#define CDEL 0x0007f
-#define CESC '\\'
-#define CINTR CTRL('C')
-#define CQUIT 0x0001c
-#define CERASE CDEL
-#define CKILL CTRL('U')
-#define CEOT CTRL('D')
-#define CEOL 0
-#define CEOL2 0
-#define CBRK CEOL
-#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 CREPRINT CRPRNT
-#define CFLUSH CTRL('O')
-#define CDISCARD CFLUSH
-#define CWERASE CTRL('W')
-#define CLNEXT CTRL('V')
-
-/* iflag bits */
-#define IGNBRK 0x00001
-#define BRKINT 0x00002
-#define IGNPAR 0x00004
-#define IMAXBEL 0x00008
-#define INPCK 0x00010
-#define ISTRIP 0x00020
-#define INLCR 0x00040
-#define IGNCR 0x00080
-#define ICRNL 0x00100
-#define IXON 0x00400
-#define IXOFF 0x01000
-#define IUCLC 0x04000
-#define IXANY 0x08000
-#define PARMRK 0x10000
-
-/* oflag bits */
-
-#define OPOST 0x00001
-#define OLCUC 0x00002
-#define OCRNL 0x00004
-#define ONLCR 0x00008
-#define ONOCR 0x00010
-#define ONLRET 0x00020
-#define OFILL 0x00040
-#define CRDLY 0x00180
-#define CR0 0x00000
-#define CR1 0x00080
-#define CR2 0x00100
-#define CR3 0x00180
-#define NLDLY 0x00200
-#define NL0 0x00000
-#define NL1 0x00200
-#define BSDLY 0x00400
-#define BS0 0x00000
-#define BS1 0x00400
-#define TABDLY 0x01800
-#define TAB0 0x00000
-#define TAB1 0x00800
-#define TAB2 0x01000
-#define TAB3 0x01800
-#define XTABS 0x01800
-#define VTDLY 0x02000
-#define VT0 0x00000
-#define VT1 0x02000
-#define FFDLY 0x04000
-#define FF0 0x00000
-#define FF1 0x04000
-#define OFDEL 0x08000
-
-/* cflag bits */
-
-/* Baud rate values. These must fit in speed_t, which is unsigned
- char. See also the extended baud rates below. These baud rates
- set an additional bit. */
-#define CBAUD 0x0100f
-#define B0 0x00000
-#define B50 0x00001
-#define B75 0x00002
-#define B110 0x00003
-#define B134 0x00004
-#define B150 0x00005
-#define B200 0x00006
-#define B300 0x00007
-#define B600 0x00008
-#define B1200 0x00009
-#define B1800 0x0000a
-#define B2400 0x0000b
-#define B4800 0x0000c
-#define B9600 0x0000d
-#define B19200 0x0000e
-#define B38400 0x0000f
-
-#define CSIZE 0x00030
-#define CS5 0x00000
-#define CS6 0x00010
-#define CS7 0x00020
-#define CS8 0x00030
-#define CSTOPB 0x00040
-#define CREAD 0x00080
-#define PARENB 0x00100
-#define PARODD 0x00200
-#define HUPCL 0x00400
-#define CLOCAL 0x00800
-
-/* Extended baud rates above 37K. */
-#define CBAUDEX 0x0100f
-#define B57600 0x01001
-#define B115200 0x01002
-#define B128000 0x01003
-#define B230400 0x01004
-#define B256000 0x01005
-#define B460800 0x01006
-#define B500000 0x01007
-#define B576000 0x01008
-#define B921600 0x01009
-#define B1000000 0x0100a
-#define B1152000 0x0100b
-#define B1500000 0x0100c
-#define B2000000 0x0100d
-#define B2500000 0x0100e
-#define B3000000 0x0100f
-
-#define CRTSXOFF 0x04000
-#define CRTSCTS 0x08000
-
-/* lflag bits */
-#define ISIG 0x0001
-#define ICANON 0x0002
-#define ECHO 0x0004
-#define ECHOE 0x0008
-#define ECHOK 0x0010
-#define ECHONL 0x0020
-#define NOFLSH 0x0040
-#define TOSTOP 0x0080
-#define IEXTEN 0x0100
-#define FLUSHO 0x0200
-#define ECHOKE 0x0400
-#define ECHOCTL 0x0800
-
-#define VDISCARD 1
-#define VEOL 2
-#define VEOL2 3
-#define VEOF 4
-#define VERASE 5
-#define VINTR 6
-#define VKILL 7
-#define VLNEXT 8
-#define VMIN 9
-#define VQUIT 10
-#define VREPRINT 11
-#define VSTART 12
-#define VSTOP 13
-#define VSUSP 14
-#define VSWTC 15
-#define VTIME 16
-#define VWERASE 17
-
-#define NCCS 18
-
-/* Compare a character C to a value VAL from the `c_cc' array in a
- `struct termios'. If VAL is _POSIX_VDISABLE, no character can match it. */
-#define CCEQ(val, c) ((c) == (val) && (val) != _POSIX_VDISABLE)
-
-#define TTYDEF_IFLAG (BRKINT | ICRNL | IMAXBEL | IXON | IXANY)
-#define TTYDEF_OFLAG (OPOST | ONLCR)
-#define TTYDEF_LFLAG (ICANON | ISIG | IEXTEN | ECHO | ECHOE | ECHOKE | ECHOCTL)
-#define TTYDEF_CFLAG (CREAD | CS8 | HUPCL)
-#define TTYDEF_SPEED (B9600)
-
-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
-
-#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);
-pid_t tcgetsid (int);
-void cfmakeraw (struct termios *);
-speed_t cfgetispeed(const struct termios *);
-speed_t cfgetospeed(const struct termios *);
-int cfsetispeed (struct termios *, speed_t);
-int cfsetospeed (struct termios *, speed_t);
-int cfsetspeed (struct termios *, speed_t);
-
-#ifdef __cplusplus
-}
-#endif
-
-#ifndef __cplusplus
-#define cfgetispeed(tp) ((tp)->c_ispeed)
-#define cfgetospeed(tp) ((tp)->c_ospeed)
-#endif
-
-/* Extra stuff to make porting stuff easier. */
-struct winsize
-{
- unsigned short ws_row, ws_col;
- unsigned short ws_xpixel, ws_ypixel;
-};
-
-#define TIOCGWINSZ (('T' << 8) | 1)
-#define TIOCSWINSZ (('T' << 8) | 2)
-#define TIOCLINUX (('T' << 8) | 3)
-#define TIOCGPGRP (('T' << 8) | 0xf)
-#define TIOCSPGRP (('T' << 8) | 0x10)
-
-#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 e28f14e7e..000000000
--- a/winsup/cygwin/include/sys/uio.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* sys/uio.h
-
- Copyright 1996, 2000, 2001, 2002 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _UIO_H_
-#define _UIO_H_
-
-/* For size_t */
-#include <stddef.h>
-/* For ssize_t */
-#include <sys/types.h>
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-/*
- * Define the uio buffers used for writev, readv.
- */
-
-struct iovec
-{
- void *iov_base;
- size_t iov_len;
-};
-
-extern ssize_t readv __P ((int filedes, const struct iovec *vector, int count));
-extern ssize_t writev __P ((int filedes, const struct iovec *vector, int count));
-
-__END_DECLS
-
-#endif /* _UIO_H_ */
diff --git a/winsup/cygwin/include/sys/un.h b/winsup/cygwin/include/sys/un.h
deleted file mode 100644
index a2f3dacb1..000000000
--- a/winsup/cygwin/include/sys/un.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* sys/un.h
-
- Copyright 1999, 2000, 2001, 2005, 2009, 2013 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_UN_H
-#define _SYS_UN_H
-
-#include <string.h> /* for strlen */
-#include <cygwin/socket.h>
-
-/* POSIX requires only at least 100 bytes */
-#define UNIX_PATH_MAX 108
-
-struct sockaddr_un {
- sa_family_t sun_family; /* address family AF_LOCAL/AF_UNIX */
- char sun_path[UNIX_PATH_MAX]; /* 108 bytes of socket address */
-};
-
-/* Evaluates the actual length of `sockaddr_un' structure. */
-#define SUN_LEN(p) ((size_t)(((struct sockaddr_un *) NULL)->sun_path) \
- + strlen ((p)->sun_path))
-
-#endif
diff --git a/winsup/cygwin/include/sys/utime.h b/winsup/cygwin/include/sys/utime.h
deleted file mode 100644
index 9ec57ab08..000000000
--- a/winsup/cygwin/include/sys/utime.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* sys/utime.h
-
- Copyright 2001, 2003, 2005 Red Hat, Inc.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#ifndef _SYS_UTIME_H
-#define _SYS_UTIME_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <_ansi.h>
-#include <sys/types.h>
-
-struct utimbuf
-{
- time_t actime;
- time_t modtime;
-};
-
-int _EXFUN(utime, (const char *__path, const struct utimbuf *__buf));
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _SYS_UTIME_H */
diff --git a/winsup/cygwin/include/sys/utmp.h b/winsup/cygwin/include/sys/utmp.h
deleted file mode 100644
index 8a63b348b..000000000
--- a/winsup/cygwin/include/sys/utmp.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* sys/utmp.h
-
- Copyright 2001, 2003, 2004, 2005, 2008 Red Hat, Inc.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#ifndef UTMP_H
-#define UTMP_H
-
-#include <cygwin/utmp.h>
-
-#define UTMP_FILE _PATH_UTMP
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef ut_name
-#define ut_name ut_user
-#endif
-
-
-struct utmp
-{
- short ut_type;
- pid_t ut_pid;
- char ut_line[UT_LINESIZE];
- char ut_id[UT_IDLEN];
- time_t ut_time;
- char ut_user[UT_NAMESIZE];
- char ut_host[UT_HOSTSIZE];
- long ut_addr;
-};
-
-extern struct utmp *getutent (void);
-extern struct utmp *getutid (const struct utmp *);
-extern struct utmp *getutline (const struct utmp *);
-extern struct utmp *pututline (const struct utmp *);
-extern void endutent (void);
-extern void setutent (void);
-extern void utmpname (const char *);
-
-void login (const struct utmp *);
-int logout (const char *);
-int login_tty (int);
-void updwtmp (const char *, const struct utmp *);
-void logwtmp (const char *, const char *, const char *);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* UTMP_H */
diff --git a/winsup/cygwin/include/sys/utsname.h b/winsup/cygwin/include/sys/utsname.h
deleted file mode 100644
index 23ca5ab65..000000000
--- a/winsup/cygwin/include/sys/utsname.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* sys/utsname.h
-
- Copyright 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_UTSNAME_H
-#define _SYS_UTSNAME_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct utsname
-{
- char sysname[20];
- char nodename[20];
- char release[20];
- char version[20];
- char machine[20];
-};
-
-int uname (struct utsname *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/winsup/cygwin/include/sys/vfs.h b/winsup/cygwin/include/sys/vfs.h
deleted file mode 100644
index 1310c4693..000000000
--- a/winsup/cygwin/include/sys/vfs.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* sys/vfs.h
-
- Copyright 1997, 1998, 2000, 2001, 2002 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_VFS_H_
-#define _SYS_VFS_H_
-
-struct statfs {
- long f_type; /* type of filesystem */
- long f_bsize; /* optimal transfer block size */
- long f_blocks; /* total data blocks in file system */
- long f_bfree; /* free blocks in fs */
- long f_bavail; /* free blocks avail to non-superuser */
- long f_files; /* total file nodes in file system */
- long f_ffree; /* free file nodes in fs */
- long f_fsid; /* file system id */
- long f_namelen; /* maximum length of filenames */
- long f_spare[6]; /* spare for later */
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-int statfs (const char *__path, struct statfs *__buf);
-int fstatfs (int __fd, struct statfs *__buf);
-
-#ifdef __cplusplus
-};
-#endif /* __cplusplus */
-
-#endif /*_SYS_VFS_H_*/
diff --git a/winsup/cygwin/include/sys/wait.h b/winsup/cygwin/include/sys/wait.h
deleted file mode 100644
index 19f599c1b..000000000
--- a/winsup/cygwin/include/sys/wait.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* sys/wait.h
-
- Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2006, 2011, 2012 Red
- Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_WAIT_H
-#define _SYS_WAIT_H
-
-#include <sys/types.h>
-#include <sys/resource.h>
-#include <cygwin/wait.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __INSIDE_CYGWIN__
-
-typedef int *__wait_status_ptr_t;
-
-#elif defined(__cplusplus)
-
-/* Attribute __transparent_union__ is only supported for C. */
-typedef void *__wait_status_ptr_t;
-
-#else /* !__INSIDE_CYGWIN__ && !__cplusplus */
-
-/* Allow `int' and `union wait' for the status. */
-typedef union
- {
- int *__int_ptr;
- union wait *__union_wait_ptr;
- } __wait_status_ptr_t __attribute__ ((__transparent_union__));
-
-#endif /* __INSIDE_CYGWIN__ */
-
-pid_t wait (__wait_status_ptr_t __status);
-pid_t waitpid (pid_t __pid, __wait_status_ptr_t __status, int __options);
-pid_t wait3 (__wait_status_ptr_t __status, int __options, struct rusage *__rusage);
-pid_t wait4 (pid_t __pid, __wait_status_ptr_t __status, int __options, struct rusage *__rusage);
-
-#ifdef _COMPILING_NEWLIB
-pid_t _wait (__wait_status_ptr_t __status);
-#endif
-
-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
-
-/* Used in cygwin/wait.h, redefine to accept `int' and `union wait'. */
-#undef __wait_status_to_int
-
-#ifdef __cplusplus
-
-extern "C++" {
-inline int __wait_status_to_int (int __status)
- { return __status; }
-inline int __wait_status_to_int (const union wait & __status)
- { return __status.w_status; }
-}
-
-#else /* !__cplusplus */
-
-#define __wait_status_to_int(__status) (__extension__ \
- (((union { __typeof(__status) __in; int __out; }) { .__in = (__status) }).__out))
-
-#endif /* __cplusplus */
-
-#endif /* _SYS_WAIT_H */
diff --git a/winsup/cygwin/include/sys/xattr.h b/winsup/cygwin/include/sys/xattr.h
deleted file mode 100644
index 1f3239238..000000000
--- a/winsup/cygwin/include/sys/xattr.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* sys/xattr.h
-
- Copyright 2011 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* sys/xattr.h header file for Cygwin. */
-
-#ifndef _SYS_XATTR_H
-#define _SYS_XATTR_H
-
-#include <attr/xattr.h>
-
-#endif /* _SYS_XATTR_H */
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 28fb68aee..000000000
--- a/winsup/cygwin/include/syslog.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* syslog.h
-
- Copyright 1996, 1998, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYSLOG_H
-#define _SYSLOG_H
-
-#include <sys/syslog.h>
-
-#endif /* _SYSLOG_H */
diff --git a/winsup/cygwin/include/termio.h b/winsup/cygwin/include/termio.h
deleted file mode 100644
index 4b8d86595..000000000
--- a/winsup/cygwin/include/termio.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* termio.h
-
- Copyright 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _TERMIO_H
-#define _TERMIO_H
-
-#include <sys/termio.h>
-
-#endif
diff --git a/winsup/cygwin/include/tzfile.h b/winsup/cygwin/include/tzfile.h
deleted file mode 100644
index d39ae6fd6..000000000
--- a/winsup/cygwin/include/tzfile.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* tzfile.h
-
- Copyright 2000, 2001, 2002, 2003 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _TZFILE_H
-#define _TZFILE_H
-
-#define SECSPERMIN 60
-#define MINSPERHOUR 60
-#define HOURSPERDAY 24
-#define DAYSPERWEEK 7
-#define DAYSPERNYEAR 365
-#define DAYSPERLYEAR 366
-#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR)
-#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY)
-#define MONSPERYEAR 12
-
-#define TM_SUNDAY 0
-#define TM_MONDAY 1
-#define TM_TUESDAY 2
-#define TM_WEDNESDAY 3
-#define TM_THURSDAY 4
-#define TM_FRIDAY 5
-#define TM_SATURDAY 6
-
-#define TM_JANUARY 0
-#define TM_FEBRUARY 1
-#define TM_MARCH 2
-#define TM_APRIL 3
-#define TM_MAY 4
-#define TM_JUNE 5
-#define TM_JULY 6
-#define TM_AUGUST 7
-#define TM_SEPTEMBER 8
-#define TM_OCTOBER 9
-#define TM_NOVEMBER 10
-#define TM_DECEMBER 11
-
-#define TM_YEAR_BASE 1900
-
-#define EPOCH_YEAR 1970
-#define EPOCH_WDAY TM_THURSDAY
-
-#define isleap(y) (((y) % 4) == 0 && ((y) % 100) != 0 || ((y) % 400) == 0)
-#endif
diff --git a/winsup/cygwin/include/utmpx.h b/winsup/cygwin/include/utmpx.h
deleted file mode 100644
index 548ad80a3..000000000
--- a/winsup/cygwin/include/utmpx.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* utmpx.h
-
- Copyright 2004, 2005, 2006 Red Hat, Inc.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#ifndef UTMPX_H
-#define UTMPX_H
-
-#include <cygwin/utmp.h>
-#include <sys/time.h>
-
-#define UTMPX_FILE _PATH_UTMP
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Must be kept in sync with struct utmp as defined in sys/utmp.h! */
-struct utmpx
-{
- short ut_type;
- pid_t ut_pid;
- char ut_line[UT_LINESIZE];
- char ut_id[UT_IDLEN];
- time_t ut_time;
- char ut_user[UT_NAMESIZE];
- char ut_host[UT_HOSTSIZE];
- long ut_addr;
- struct timeval ut_tv;
-};
-
-#ifndef ut_name
-#define ut_name ut_user
-#endif
-
-#ifndef ut_xtime
-#define ut_xtime ut_tv.tv_sec
-#endif
-
-extern void endutxent (void);
-extern struct utmpx *getutxent (void);
-extern struct utmpx *getutxid (const struct utmpx *id);
-extern struct utmpx *getutxline (const struct utmpx *line);
-extern struct utmpx *pututxline (const struct utmpx *utmpx);
-extern void setutxent (void);
-extern void utmpxname (const char *file);
-extern void updwtmpx (const char *file, const struct utmpx *utmpx);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* UTMPX_H */
diff --git a/winsup/cygwin/include/wait.h b/winsup/cygwin/include/wait.h
deleted file mode 100644
index f0f1281e2..000000000
--- a/winsup/cygwin/include/wait.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* wait.h
-
- Copyright 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _WAIT_H
-#define _WAIT_H
-
-#include <sys/wait.h>
-
-#endif /* _WAIT_H */