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/sys')
-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
49 files changed, 0 insertions, 5895 deletions
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 */