diff options
Diffstat (limited to 'winsup/cygwin/include/cygwin')
32 files changed, 0 insertions, 3512 deletions
diff --git a/winsup/cygwin/include/cygwin/_types.h b/winsup/cygwin/include/cygwin/_types.h deleted file mode 100644 index b96267622..000000000 --- a/winsup/cygwin/include/cygwin/_types.h +++ /dev/null @@ -1,16 +0,0 @@ -/* cygwin/_types.h - - Copyright 2004 Red Hat, Inc. - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifndef _CYGWIN__TYPES_H -#define _CYGWIN__TYPES_H - -typedef void *_flock_t; - -#endif /* _CYGWIN__TYPES_H */ diff --git a/winsup/cygwin/include/cygwin/acl.h b/winsup/cygwin/include/cygwin/acl.h deleted file mode 100644 index 6083b5332..000000000 --- a/winsup/cygwin/include/cygwin/acl.h +++ /dev/null @@ -1,97 +0,0 @@ -/* cygwin/acl.h header file for Cygwin. - - Copyright 1999, 2000, 2001, 2002, 2010 Red Hat, Inc. - Written by C. Vinschen. - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifndef _CYGWIN_ACL_H -#ifdef __cplusplus -extern "C" { -#endif -#define _CYGWIN_ACL_H - -#include <_ansi.h> - -#include <sys/types.h> -#include <sys/stat.h> - -/* Values for `cmd' in calls to acl(2) and facl(2) */ -#define SETACL (0x0) -#define GETACL (0x1) -#define GETACLCNT (0x2) - -#define MIN_ACL_ENTRIES (4) // minimal acl entries from GETACLCNT -#define MAX_ACL_ENTRIES (256) // max entries of each type - -// Return values of aclcheck(3) in case of error */ -#define GRP_ERROR (0x1) -#define USER_ERROR (0x2) -#define CLASS_ERROR (0x3) -#define OTHER_ERROR (0x4) -#define DUPLICATE_ERROR (0x5) -#define ENTRY_ERROR (0x6) -#define MISS_ERROR (0x7) // which = -1 -#define MEM_ERROR (0x8) // which = -1 - -// Values for entry type of struct acl -#define USER_OBJ (0x0001) // owner -#define USER (0x0002) // additional user -#define GROUP_OBJ (0x0004) // owning group -#define GROUP (0x0008) // additional group -#define CLASS_OBJ (0x0010) // mask entry -#define OTHER_OBJ (0x0020) // others -#define ACL_DEFAULT (0x1000) // default flag -#define DEF_USER_OBJ (ACL_DEFAULT|USER_OBJ) // default owner -#define DEF_USER (ACL_DEFAULT|USER) // default additional user -#define DEF_GROUP_OBJ (ACL_DEFAULT|GROUP_OBJ) // default owning group -#define DEF_GROUP (ACL_DEFAULT|GROUP) // default additional group -#define DEF_CLASS_OBJ (ACL_DEFAULT|CLASS_OBJ) // default mask entry -#define DEF_OTHER_OBJ (ACL_DEFAULT|OTHER_OBJ) // default others -// Values with equivalent meanings -#define USER_OWNER USER_OBJ -#define GROUP_OWNER GROUP_OBJ -#define MASK CLASS_OBJ -#define OTHER OTHER_OBJ - -#ifdef __INSIDE_CYGWIN__ -typedef struct __acl16 { - int a_type; - __uid16_t a_id; - mode_t a_perm; -} __aclent16_t; - -typedef struct __acl32 { - int a_type; - __uid32_t a_id; - mode_t a_perm; -} __aclent32_t; -#else -typedef struct acl { - int a_type; /* entry type */ - uid_t a_id; /* UID | GID */ - mode_t a_perm; /* permissions */ -} aclent_t; -#endif - -#ifndef __INSIDE_CYGWIN__ -int _EXFUN(acl,(const char *path, int cmd, int nentries, aclent_t *aclbufp)); -int _EXFUN(facl,(int fd, int cmd, int nentries, aclent_t *aclbufp)); -int _EXFUN(aclcheck,(aclent_t *aclbufp, int nentries, int *which)); -int _EXFUN(aclsort,(int nentries, int calclass, aclent_t *aclbufp)); -int _EXFUN(acltomode,(aclent_t *aclbufp, int nentries, mode_t *modep)); -int _EXFUN(aclfrommode,(aclent_t *aclbufp, int nentries, mode_t *modep)); -int _EXFUN(acltopbits,(aclent_t *aclbufp, int nentries, mode_t *pbitsp)); -int _EXFUN(aclfrompbits,(aclent_t *aclbufp, int nentries, mode_t *pbitsp)); -char *_EXFUN(acltotext,(aclent_t *aclbufp, int aclcnt)); -aclent_t *_EXFUN(aclfromtext,(char *acltextp, int *aclcnt)); -#endif - -#ifdef __cplusplus -} -#endif -#endif /* _CYGWIN_ACL_H */ diff --git a/winsup/cygwin/include/cygwin/config.h b/winsup/cygwin/include/cygwin/config.h deleted file mode 100644 index c2fca39ce..000000000 --- a/winsup/cygwin/include/cygwin/config.h +++ /dev/null @@ -1,76 +0,0 @@ -/* cygwin/config.h header file for Cygwin. - - This wraps Cygwin configuration setting which were in newlib's - sys/config.h before. This way we can manaage our configuration - setting without bothering newlib. - - Copyright 2003, 2007, 2008, 2009, 2010 Red Hat, Inc. - Written by C. Vinschen. - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifndef _CYGWIN_CONFIG_H -#ifdef __cplusplus -extern "C" { -#endif -#define _CYGWIN_CONFIG_H - -#define __DYNAMIC_REENT__ - -/* The following provides an inline version of __getreent() for newlib, - which will be used throughout the library whereever there is a _r - version of a function that takes _REENT. This saves the overhead - of a function call for what amounts to a simple computation. - - The definition below is essentially equivalent to the one in cygtls.h - (&_my_tls.local_clib) however it uses a fixed precomputed - offset rather than dereferencing a field of a structure. - - Including tlsoffets.h here in order to get this constant offset - tls_local_clib is a bit of a hack, but the alternative would require - dragging the entire definition of struct _cygtls (a large and complex - Cygwin internal data structure) into newlib. The machinery to - compute these offsets already exists for the sake of gendef so - we might as well just use it here. */ - -#ifdef _COMPILING_NEWLIB -#include "../tlsoffsets.h" -extern char *_tlsbase __asm__ ("%fs:4"); -#define __getreent() (struct _reent *)(_tlsbase + tls_local_clib) -#endif /* _COMPILING_NEWLIB */ - -#define __FILENAME_MAX__ 4096 /* Keep in sync with PATH_MAX in limits.h. */ - -/* The following block of macros is required to build newlib correctly for - Cygwin. Changing them in applications has no or not the desired effect. - Just leave them alone. */ -#define _READ_WRITE_RETURN_TYPE _ssize_t -#define __LARGE64_FILES 1 -#define __USE_INTERNAL_STAT64 1 -#define __LINUX_ERRNO_EXTENSIONS__ 1 -#define _MB_EXTENDED_CHARSETS_ALL 1 -#define __HAVE_LOCALE_INFO__ 1 -#define __HAVE_LOCALE_INFO_EXTENDED__ 1 -#define _WANT_C99_TIME_FORMATS 1 -#if defined(__INSIDE_CYGWIN__) || defined(_COMPILING_NEWLIB) -#define __EXPORT __declspec(dllexport) -#define __IMPORT -#else -#define __EXPORT -#define __IMPORT __declspec(dllimport) -#endif - -#ifndef __WCHAR_MAX__ -#define __WCHAR_MAX__ 0xffffu -#endif - -#define DEFAULT_LOCALE "C.UTF-8" - -#ifdef __cplusplus -} -#endif -#endif /* _CYGWIN_CONFIG_H */ diff --git a/winsup/cygwin/include/cygwin/core_dump.h b/winsup/cygwin/include/cygwin/core_dump.h deleted file mode 100644 index b1943937b..000000000 --- a/winsup/cygwin/include/cygwin/core_dump.h +++ /dev/null @@ -1,73 +0,0 @@ -/* core_dump.h - - Copyright 1999, 2000, 2001 Red Hat, Inc. - - Written by Egor Duda <deo@logos-m.ru> - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifndef _CYGWIN_CORE_DUMP_H -#define _CYGWIN_CORE_DUMP_H - -#include <windows.h> - -#define NOTE_INFO_PROCESS 1 -#define NOTE_INFO_THREAD 2 -#define NOTE_INFO_MODULE 3 - -struct win32_core_process_info -{ - DWORD pid; - int signal; - int command_line_size; - char command_line[1]; -} -#ifdef __GNUC__ - __attribute__ ((packed)) -#endif -; - -struct win32_core_thread_info -{ - DWORD tid; - BOOL is_active_thread; - CONTEXT thread_context; -} -#ifdef __GNUC__ - __attribute__ ((packed)) -#endif -; - -struct win32_core_module_info -{ - void* base_address; - int module_name_size; - char module_name[1]; -} -#ifdef __GNUC__ - __attribute__ ((packed)) -#endif -; - -struct win32_pstatus -{ - unsigned long data_type; - union - { - struct win32_core_process_info process_info; - struct win32_core_thread_info thread_info; - struct win32_core_module_info module_info; - } data ; -} -#ifdef __GNUC__ - __attribute__ ((packed)) -#endif -; - -typedef struct win32_pstatus win32_pstatus_t ; - -#endif /* _CYGWIN_CORE_DUMP_H */ diff --git a/winsup/cygwin/include/cygwin/cygwin_dll.h b/winsup/cygwin/include/cygwin/cygwin_dll.h deleted file mode 100644 index 6efef52a5..000000000 --- a/winsup/cygwin/include/cygwin/cygwin_dll.h +++ /dev/null @@ -1,96 +0,0 @@ -/* cygwin_dll.h - - Copyright 1998, 1999, 2000, 2001, 2009 Red Hat, Inc. - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifndef __CYGWIN_CYGWIN_DLL_H__ -#define __CYGWIN_CYGWIN_DLL_H__ - -#include <windows.h> - -#ifdef __cplusplus -#define CDECL_BEGIN extern "C" { -#define CDECL_END } -#else -#define CDECL_BEGIN -#define CDECL_END -#endif - -#define DECLARE_CYGWIN_DLL(Entry) \ - \ -CDECL_BEGIN \ - int WINAPI Entry (HINSTANCE h, DWORD reason, void *ptr); \ - typedef int (*mainfunc) (int, char **, char **); \ - extern int cygwin_attach_dll (HMODULE, mainfunc); \ - extern void cygwin_detach_dll (DWORD); \ -CDECL_END \ - \ -static HINSTANCE storedHandle; \ -static DWORD storedReason; \ -static void* storedPtr; \ -int __dynamically_loaded; \ - \ -static int __dllMain (int a, char **b, char **c) \ -{ \ - return Entry (storedHandle, storedReason, storedPtr); \ -} \ - \ -static DWORD dll_index; \ - \ -int WINAPI _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \ -{ \ - int ret; \ - ret = 1; \ - \ - switch (reason) \ - { \ - case DLL_PROCESS_ATTACH: \ - { \ - storedHandle = h; \ - storedReason = reason; \ - storedPtr = ptr; \ - __dynamically_loaded = (ptr == NULL); \ - dll_index = cygwin_attach_dll (h, &__dllMain); \ - if (dll_index == (DWORD) -1) \ - ret = 0; \ - } \ - break; \ - \ - case DLL_PROCESS_DETACH: \ - { \ - ret = Entry (h, reason, ptr); \ - if (ret) \ - { \ - cygwin_detach_dll (dll_index); \ - dll_index = (DWORD) -1; \ - } \ - } \ - break; \ - \ - case DLL_THREAD_ATTACH: \ - { \ - ret = Entry (h, reason, ptr); \ - } \ - break; \ - \ - case DLL_THREAD_DETACH: \ - { \ - ret = Entry (h, reason, ptr); \ - } \ - break; \ - } \ - return ret; \ -} \ - \ -/* OBSOLETE: This is only provided for source level compatibility. */ \ -int WINAPI _cygwin_noncygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \ -{ \ - return _cygwin_dll_entry (h, reason, ptr); \ -} \ - -#endif /* __CYGWIN_CYGWIN_DLL_H__ */ diff --git a/winsup/cygwin/include/cygwin/fs.h b/winsup/cygwin/include/cygwin/fs.h deleted file mode 100644 index eb8c7e3d1..000000000 --- a/winsup/cygwin/include/cygwin/fs.h +++ /dev/null @@ -1,20 +0,0 @@ -/* cygwin/fs.h - - Copyright 2002, 2003 Red Hat Inc. - Written by Chris January <chris@atomice.net> - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifndef _CYGWIN_FS_H_ -#define _CYGWIN_FS_H_ - -#define BLKRRPART 0x0000125f -#define BLKGETSIZE 0x00001260 -#define BLKSSZGET 0x00001268 -#define BLKGETSIZE64 0x00041268 - -#endif diff --git a/winsup/cygwin/include/cygwin/grp.h b/winsup/cygwin/include/cygwin/grp.h deleted file mode 100644 index b990b25ac..000000000 --- a/winsup/cygwin/include/cygwin/grp.h +++ /dev/null @@ -1,50 +0,0 @@ -/* cygwin/grp.h - - Copyright 2002, 2011 Red Hat Inc. - Written by Corinna Vinschen <corinna@vinschen.de> - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifndef _CYGWIN_GRP_H_ -#define _CYGWIN_GRP_H_ - -#include <sys/types.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __INSIDE_CYGWIN__ -struct __group16 -{ - char *gr_name; - char *gr_passwd; - __gid16_t gr_gid; - char **gr_mem; -}; - -struct __group32 -{ - char *gr_name; - char *gr_passwd; - __gid32_t gr_gid; - char **gr_mem; -}; - -struct __group32 * getgrgid32 (__gid32_t gid); -struct __group32 * getgrnam32 (const char *name); -__gid32_t getgid32 (); -__gid32_t getegid32 (); -#endif - -extern int getgrouplist (const char *, gid_t, gid_t *, int *); - -#ifdef __cplusplus -} -#endif - -#endif /* _CYGWIN_GRP_H_ */ diff --git a/winsup/cygwin/include/cygwin/hdreg.h b/winsup/cygwin/include/cygwin/hdreg.h deleted file mode 100644 index dc8157838..000000000 --- a/winsup/cygwin/include/cygwin/hdreg.h +++ /dev/null @@ -1,24 +0,0 @@ -/* cygwin/hdreg.h - - Copyright 2002 Red Hat Inc. - Written by Chris January <chris@atomice.net> - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifndef _CYGWIN_HDREG_H_ -#define _CYGWIN_HDREG_H_ - -struct hd_geometry { - unsigned char heads; - unsigned char sectors; - unsigned short cylinders; - unsigned long start; -}; - -#define HDIO_GETGEO 0x301 - -#endif diff --git a/winsup/cygwin/include/cygwin/icmp.h b/winsup/cygwin/include/cygwin/icmp.h deleted file mode 100644 index 7e7aedccd..000000000 --- a/winsup/cygwin/include/cygwin/icmp.h +++ /dev/null @@ -1 +0,0 @@ -/* icmp.h */ diff --git a/winsup/cygwin/include/cygwin/if.h b/winsup/cygwin/include/cygwin/if.h deleted file mode 100644 index 8f76e836e..000000000 --- a/winsup/cygwin/include/cygwin/if.h +++ /dev/null @@ -1,123 +0,0 @@ -/* cygwin/if.h - - Copyright 1996, 2001, 2007 Red Hat, Inc. - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifndef _CYGWIN_IF_H_ -#define _CYGWIN_IF_H_ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include <sys/types.h> -#include <sys/socket.h> - -/* Standard interface flags. */ -#define IFF_UP 0x1 /* interface is up */ -#define IFF_BROADCAST 0x2 /* broadcast address valid */ -#define IFF_LOOPBACK 0x8 /* is a loopback net */ -#define IFF_POINTOPOINT 0x10 /* is a point-to-point interface */ -#define IFF_NOTRAILERS 0x20 /* avoid use of trailers */ -#define IFF_RUNNING 0x40 /* resources allocated */ -#define IFF_NOARP 0x80 /* no ARP protocol */ -#define IFF_PROMISC 0x100 /* receive all packets */ -#define IFF_MULTICAST 0x1000 /* Supports multicast */ -#define IFF_LOWER_UP 0x10000 /* driver signals L1 up */ -#define IFF_DORMANT 0x20000 /* driver signals dormant */ - -struct if_nameindex { - unsigned if_index; - char *if_name; -}; - -/* This is the structure expected by ioctl when the application requests - the friendly adapter name (>= XP SP1). ifru_data should point to such - a structure when ioctl is called with SIOCGIFFRNDLYNAM. */ -#define IFRF_FRIENDLYNAMESIZ 260 - -struct ifreq_frndlyname { - int ifrf_len; - char ifrf_friendlyname[IFRF_FRIENDLYNAMESIZ]; -}; - -/* - * Interface request structure used for socket - * ioctl's. All interface ioctl's must have parameter - * definitions which begin with ifr_name. The - * remainder may be interface specific. - */ -#define IFNAMSIZ 44 -#define IF_NAMESIZE IFNAMSIZ -#define IFHWADDRLEN 6 - -struct ifreq { - union { - char ifrn_name[IFNAMSIZ]; /* Unique Windows Adapter name (A GUID) */ - } ifr_ifrn; - - union { - struct sockaddr ifru_addr; - struct sockaddr ifru_broadaddr; - struct sockaddr ifru_dstaddr; - struct sockaddr ifru_netmask; - struct sockaddr ifru_hwaddr; - int ifru_flags; - int ifru_metric; - int ifru_mtu; - int ifru_ifindex; - /* The space must be preallocated by the application. */ - void *ifru_data; - /* Pad to sizeof sockaddr_in6 for further extensions. */ - char __ifru_pad[28]; - } ifr_ifru; -}; - -#define ifr_name ifr_ifrn.ifrn_name /* interface name */ -#define ifr_addr ifr_ifru.ifru_addr /* address */ -#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ -#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* destination address */ -#define ifr_netmask ifr_ifru.ifru_netmask /* interface net mask */ -#define ifr_flags ifr_ifru.ifru_flags /* flags */ -#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */ -#define ifr_metric ifr_ifru.ifru_metric /* metric */ -#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ -#define ifr_ifindex ifr_ifru.ifru_ifindex /* interface index */ -#define ifr_data ifr_ifru.ifru_data /* for use by interface */ -#define ifr_frndlyname ifr_ifru.ifru_data /* Windows friendly if name */ - -/* - * Structure used in SIOCGIFCONF request. - * Used to retrieve interface configuration - * for machine (useful for programs which - * must know all networks accessible). - */ - -struct ifconf -{ - int ifc_len; /* size of buffer */ - union - { - caddr_t ifcu_buf; - struct ifreq *ifcu_req; - } ifc_ifcu; -}; - -#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ -#define ifc_req ifc_ifcu.ifcu_req /* array of structures */ - -extern unsigned if_nametoindex (const char *); -extern char *if_indextoname (unsigned, char *); -extern struct if_nameindex *if_nameindex (void); -extern void if_freenameindex (struct if_nameindex *); - -#ifdef __cplusplus -}; -#endif /* __cplusplus */ - -#endif /* _CYGWIN_IF_H_ */ diff --git a/winsup/cygwin/include/cygwin/in.h b/winsup/cygwin/include/cygwin/in.h deleted file mode 100644 index 30ac623a8..000000000 --- a/winsup/cygwin/include/cygwin/in.h +++ /dev/null @@ -1,263 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Definitions of the Internet Protocol. - * - * Version: @(#)in.h 1.0.1 04/21/93 - * - * Authors: Original taken from the GNU Project <netinet/in.h> file. - * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _CYGWIN_IN_H -#define _CYGWIN_IN_H - -#include <cygwin/socket.h> - -typedef uint16_t in_port_t; -typedef uint32_t in_addr_t; - -/* Standard well-defined IP protocols. If you ever add one here, don't - forget to define it below. */ -enum -{ - IPPROTO_IP = 0, /* Dummy protocol for TCP */ - IPPROTO_HOPOPTS = 0, /* IPv6 Hop-by-Hop options */ - IPPROTO_ICMP = 1, /* Internet Control Message Protocol */ - IPPROTO_IGMP = 2, /* Internet Gateway Management Protocol */ - IPPROTO_IPIP = 4, /* IPIP tunnels (older KA9Q tunnels use 94) */ - IPPROTO_TCP = 6, /* Transmission Control Protocol */ - IPPROTO_EGP = 8, /* Exterior Gateway Protocol */ - IPPROTO_PUP = 12, /* PUP protocol */ - IPPROTO_UDP = 17, /* User Datagram Protocol */ - IPPROTO_IDP = 22, /* XNS IDP protocol */ - IPPROTO_IPV6 = 41, /* IPv6 header */ - IPPROTO_ROUTING = 43, /* IPv6 Routing header */ - IPPROTO_FRAGMENT = 44, /* IPv6 fragmentation header */ - IPPROTO_ESP = 50, /* encapsulating security payload */ - IPPROTO_AH = 51, /* authentication header */ - IPPROTO_ICMPV6 = 58, /* ICMPv6 */ - IPPROTO_NONE = 59, /* IPv6 no next header */ - IPPROTO_DSTOPTS = 60, /* IPv6 Destination options */ - IPPROTO_RAW = 255, /* Raw IP packets */ - IPPROTO_MAX -}; - -/* Define IPPROTO_xxx values to accomodate SUSv3 */ -#define IPPROTO_IP IPPROTO_IP -#define IPPROTO_HOPOPTS IPPROTO_HOPOPTS -#define IPPROTO_ICMP IPPROTO_ICMP -#define IPPROTO_IGMP IPPROTO_IGMP -#define IPPROTO_IPIP IPPROTO_IPIP -#define IPPROTO_TCP IPPROTO_TCP -#define IPPROTO_EGP IPPROTO_EGP -#define IPPROTO_PUP IPPROTO_PUP -#define IPPROTO_UDP IPPROTO_UDP -#define IPPROTO_IDP IPPROTO_IDP -#define IPPROTO_RAW IPPROTO_RAW -#define IPPROTO_IPV6 IPPROTO_IPV6 -#define IPPROTO_ROUTING IPPROTO_ROUTING -#define IPPROTO_FRAGMENT IPPROTO_FRAGMENT -#define IPPROTO_ESP IPPROTO_ESP -#define IPPROTO_AH IPPROTO_AH -#define IPPROTO_ICMPV6 IPPROTO_ICMPV6 -#define IPPROTO_NONE IPPROTO_NONE -#define IPPROTO_DSTOPTS IPPROTO_DSTOPTS - -/* Standard well-known ports. *//* from winsup/include/netinet/in.h */ -enum -{ - IPPORT_ECHO = 7, /* Echo service. */ - IPPORT_DISCARD = 9, /* Discard transmissions service. */ - IPPORT_SYSTAT = 11, /* System status service. */ - IPPORT_DAYTIME = 13, /* Time of day service. */ - IPPORT_NETSTAT = 15, /* Network status service. */ - IPPORT_FTP = 21, /* File Transfer Protocol. */ - IPPORT_TELNET = 23, /* Telnet protocol. */ - IPPORT_SMTP = 25, /* Simple Mail Transfer Protocol. */ - IPPORT_TIMESERVER = 37, /* Timeserver service. */ - IPPORT_NAMESERVER = 42, /* Domain Name Service. */ - IPPORT_WHOIS = 43, /* Internet Whois service. */ - IPPORT_MTP = 57, - - IPPORT_TFTP = 69, /* Trivial File Transfer Protocol. */ - IPPORT_RJE = 77, - IPPORT_FINGER = 79, /* Finger service. */ - IPPORT_TTYLINK = 87, - IPPORT_SUPDUP = 95, /* SUPDUP protocol. */ - - - IPPORT_EXECSERVER = 512, /* execd service. */ - IPPORT_LOGINSERVER = 513, /* rlogind service. */ - IPPORT_CMDSERVER = 514, - IPPORT_EFSSERVER = 520, - - /* UDP ports. */ - IPPORT_BIFFUDP = 512, - IPPORT_WHOSERVER = 513, - IPPORT_ROUTESERVER = 520, - - /* Ports less than this value are reserved for privileged processes. */ - IPPORT_RESERVED = 1024, - - /* Ports greater this value are reserved for (non-privileged) servers. */ - IPPORT_USERRESERVED = 5000 -}; - -/* Internet address. */ -struct in_addr -{ - in_addr_t s_addr; -}; - -/* Request struct for IPv4 multicast socket ops */ - -struct ip_mreq -{ - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_interface; /* local IP address of interface */ -}; - -struct ip_mreq_source -{ - struct in_addr imr_multiaddr; - struct in_addr imr_sourceaddr; - struct in_addr imr_interface; -}; - -struct ip_msfilter -{ - struct in_addr imsf_multiaddr; - struct in_addr imsf_interface; - uint32_t imsf_fmode; - uint32_t imsf_numsrc; - struct in_addr imsf_slist[1]; -}; - -#define IP_MSFILTER_SIZE(numsrc) (sizeof (struct ip_msfilter) \ - - sizeof (struct in_addr) \ - + (numsrc) * sizeof (struct in_addr)) - -struct in_pktinfo -{ - struct in_addr ipi_addr; - uint32_t ipi_ifindex; -}; - -/* Request struct for IP agnostic multicast socket ops */ - -struct group_req -{ - uint32_t gr_interface; - struct sockaddr_storage gr_group; -}; - -struct group_source_req -{ - uint32_t gsr_interface; - struct sockaddr_storage gsr_group; - struct sockaddr_storage gsr_source; -}; - -struct group_filter -{ - uint32_t gf_interface; - struct sockaddr_storage gf_group; - uint32_t gf_fmode; - uint32_t gf_numsrc; - struct sockaddr_storage gf_slist[1]; -}; - -#define GROUP_FILTER_SIZE(numsrc) (sizeof (struct group_filter) \ - - sizeof (struct sockaddr_storage) \ - + (numsrc) * sizeof (struct sockaddr_storage)) - -/* Structure describing an Internet (IP) socket address. */ -#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */ -struct sockaddr_in -{ - sa_family_t sin_family; /* Address family */ - in_port_t sin_port; /* Port number */ - struct in_addr sin_addr; /* Internet address */ - - /* Pad to size of `struct sockaddr'. */ - unsigned char __pad[__SOCK_SIZE__ - sizeof(short int) - - sizeof(unsigned short int) - sizeof(struct in_addr)]; -}; -#define sin_zero __pad /* for BSD UNIX comp. -FvK */ - -/* - * Definitions of the bits in an Internet address integer. - * On subnets, host and network parts are found according - * to the subnet mask, not these masks. - */ -#define IN_CLASSA(a) ((((in_addr_t) (a)) & 0x80000000) == 0) -#define IN_CLASSA_NET 0xff000000 -#define IN_CLASSA_NSHIFT 24 -#define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET) -#define IN_CLASSA_MAX 128 - -#define IN_CLASSB(a) ((((in_addr_t) (a)) & 0xc0000000) == 0x80000000) -#define IN_CLASSB_NET 0xffff0000 -#define IN_CLASSB_NSHIFT 16 -#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET) -#define IN_CLASSB_MAX 65536 - -#define IN_CLASSC(a) ((((in_addr_t) (a)) & 0xe0000000) == 0xc0000000) -#define IN_CLASSC_NET 0xffffff00 -#define IN_CLASSC_NSHIFT 8 -#define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET) - -#define IN_CLASSD(a) ((((in_addr_t) (a)) & 0xf0000000) == 0xe0000000) -#define IN_MULTICAST(a) IN_CLASSD(a) -#define IN_MULTICAST_NET 0xF0000000 - -#define IN_EXPERIMENTAL(a) ((((in_addr_t) (a)) & 0xe0000000) == 0xe0000000) -#define IN_BADCLASS(a) ((((in_addr_t) (a)) & 0xf0000000) == 0xf0000000) - -/* Address to accept any incoming messages. */ -#define INADDR_ANY ((in_addr_t) 0x00000000) - -/* Address to send to all hosts. */ -#define INADDR_BROADCAST ((in_addr_t) 0xffffffff) - -/* Address indicating an error return. */ -#define INADDR_NONE 0xffffffff - -/* Network number for local host loopback. */ -#define IN_LOOPBACKNET 127 - -/* Address to loopback in software to local host. */ -#define INADDR_LOOPBACK 0x7f000001 /* 127.0.0.1 */ -#define IN_LOOPBACK(a) ((((in_addr_t) (a)) & 0xff000000) == 0x7f000000) - -/* Defines for Multicast INADDR */ -#define INADDR_UNSPEC_GROUP 0xe0000000 /* 224.0.0.0 */ -#define INADDR_ALLHOSTS_GROUP 0xe0000001 /* 224.0.0.1 */ -#define INADDR_ALLRTRS_GROUP 0xe0000002 /* 224.0.0.2 */ -#define INADDR_MAX_LOCAL_GROUP 0xe00000ff /* 224.0.0.255 */ - -#define INET_ADDRSTRLEN 16 - -/* <asm/byteorder.h> contains the htonl type stuff.. */ - -#include <asm/byteorder.h> - -/* Some random defines to make it easier in the kernel.. */ -#ifdef __KERNEL__ - -#define LOOPBACK(x) (((x) & htonl(0xff000000)) == htonl(0x7f000000)) -#define MULTICAST(x) (((x) & htonl(0xf0000000)) == htonl(0xe0000000)) - -#endif - -#ifdef AF_INET6 -#include <cygwin/in6.h> -#endif -#endif /* _CYGWIN_IN_H */ diff --git a/winsup/cygwin/include/cygwin/in6.h b/winsup/cygwin/include/cygwin/in6.h deleted file mode 100644 index bdb812c99..000000000 --- a/winsup/cygwin/include/cygwin/in6.h +++ /dev/null @@ -1,119 +0,0 @@ -/* cygwin/in6.h - - Copyright 2006, 2007 Red Hat, Inc. - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -/* NOTE: This file is NOT for direct inclusion. Use netinet/in.h. */ - -#ifndef _CYGWIN_IN6_H -#define _CYGWIN_IN6_H - -#define INET6_ADDRSTRLEN 46 - -#define IN6_ARE_ADDR_EQUAL(a, b) \ - (((const uint32_t *)(a))[0] == ((const uint32_t *)(b))[0] \ - && ((const uint32_t *)(a))[1] == ((const uint32_t *)(b))[1] \ - && ((const uint32_t *)(a))[2] == ((const uint32_t *)(b))[2] \ - && ((const uint32_t *)(a))[3] == ((const uint32_t *)(b))[3]) - -#define IN6_IS_ADDR_UNSPECIFIED(addr) \ - (((const uint32_t *)(addr))[0] == 0 \ - && ((const uint32_t *)(addr))[1] == 0 \ - && ((const uint32_t *)(addr))[2] == 0 \ - && ((const uint32_t *)(addr))[3] == 0) - -#define IN6_IS_ADDR_LOOPBACK(addr) \ - (((const uint32_t *)(addr))[0] == 0 \ - && ((const uint32_t *)(addr))[1] == 0 \ - && ((const uint32_t *)(addr))[2] == 0 \ - && ((const uint32_t *)(addr))[3] == htonl (1)) - -#define IN6_IS_ADDR_MULTICAST(addr) (((const uint8_t *) (addr))[0] == 0xff) - -#define IN6_IS_ADDR_LINKLOCAL(addr) \ - ((((const uint16_t *)(addr))[0] & htons (0xffc0)) == htons (0xfe80)) - -#define IN6_IS_ADDR_SITELOCAL(addr) \ - ((((const uint16_t *)(addr))[0] & htons (0xffc0)) == htons (0xfec0)) - -#define IN6_IS_ADDR_V4MAPPED(addr) \ - (((const uint32_t *)(addr))[0] == 0 \ - && ((const uint32_t *)(addr))[1] == 0 \ - && ((const uint32_t *)(addr))[2] == htonl (0xffff)) - -#define IN6_IS_ADDR_V4COMPAT(addr) \ - (((const uint32_t *)(addr))[0] == 0 \ - && ((const uint32_t *)(addr))[1] == 0 \ - && ((const uint32_t *)(addr))[2] == 0 \ - && ntohl (((const uint32_t *)(addr))[3]) > 1) - -#define IN6_IS_ADDR_MC_NODELOCAL(addr) \ - (IN6_IS_ADDR_MULTICAST(addr) \ - && (((const uint8_t *)(addr))[1] & 0xf) == 0x1) - -#define IN6_IS_ADDR_MC_LINKLOCAL(addr) \ - (IN6_IS_ADDR_MULTICAST (addr) \ - && (((const uint8_t *)(addr))[1] & 0xf) == 0x2) - -#define IN6_IS_ADDR_MC_SITELOCAL(addr) \ - (IN6_IS_ADDR_MULTICAST(addr) \ - && (((const uint8_t *)(addr))[1] & 0xf) == 0x5) - -#define IN6_IS_ADDR_MC_ORGLOCAL(addr) \ - (IN6_IS_ADDR_MULTICAST(addr) \ - && (((const uint8_t *)(addr))[1] & 0xf) == 0x8) - -#define IN6_IS_ADDR_MC_GLOBAL(addr) \ - (IN6_IS_ADDR_MULTICAST(addr) \ - && (((const uint8_t *)(addr))[1] & 0xf) == 0xe) - -struct in6_addr -{ - union - { - uint8_t __s6_addr[16]; - uint16_t __s6_addr16[8]; - uint32_t __s6_addr32[4]; - } __u6; -#define s6_addr __u6.__s6_addr -#define s6_addr16 __u6.__s6_addr16 -#define s6_addr32 __u6.__s6_addr32 -}; - -struct ipv6_mreq -{ - struct in6_addr ipv6mr_multiaddr; - uint32_t ipv6mr_interface; -}; - -struct in6_pktinfo -{ - struct in6_addr ipi6_addr; - uint32_t ipi6_ifindex; -}; - -#if defined (__INSIDE_CYGWIN__) && !defined (_CYGWIN_IN_H) -typedef uint16_t in_port_t; -#endif - -struct sockaddr_in6 -{ - sa_family_t sin6_family; /* AF_INET6 */ - in_port_t sin6_port; /* Port number. */ - uint32_t sin6_flowinfo; /* Traffic class and flow inf. */ - struct in6_addr sin6_addr; /* IPv6 address. */ - uint32_t sin6_scope_id; /* Set of interfaces for a scope. */ -}; - -#define IN6ADDR_ANY_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } -#define IN6ADDR_LOOPBACK_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } - -extern const struct in6_addr in6addr_any; -extern const struct in6_addr in6addr_loopback; - -#endif /* _CYGWIN_IN6_H */ diff --git a/winsup/cygwin/include/cygwin/in_systm.h b/winsup/cygwin/include/cygwin/in_systm.h deleted file mode 100644 index 1a2c1b2e7..000000000 --- a/winsup/cygwin/include/cygwin/in_systm.h +++ /dev/null @@ -1,34 +0,0 @@ -/* System specific type definitions for networking code. - * - * Version: @(#)in_systm.h 1.0.0 06/07/00 - * - * Authors: Original taken from the GNU Project <netinet/in_systm.h> file. - * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _CYGWIN_IN_SYSTM_H -#define _CYGWIN_IN_SYSTM_H - -#include <sys/cdefs.h> -#include <sys/types.h> - -__BEGIN_DECLS - -/* - * Network order versions of various data types. Unfortunately, BSD - * assumes specific sizes for shorts (16 bit) and longs (32 bit) which - * don't hold in general. As a consequence, the network order versions - * may not reflect the actual size of the native data types. - */ - -typedef u_int16_t n_short; /* short as received from the net */ -typedef u_int32_t n_long; /* long as received from the net */ -typedef u_int32_t n_time; /* ms since 00:00 GMT, byte rev */ - -__END_DECLS - -#endif /* _CYGWIN_IN_SYSTM_H */ diff --git a/winsup/cygwin/include/cygwin/ipc.h b/winsup/cygwin/include/cygwin/ipc.h deleted file mode 100644 index 783778822..000000000 --- a/winsup/cygwin/include/cygwin/ipc.h +++ /dev/null @@ -1,71 +0,0 @@ -/* sys/ipc.h - - Copyright 2001, 2002 Red Hat Inc. - Written by Robert Collins <rbtcollins@hotmail.com> - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifndef _CYGWIN_IPC_H -#define _CYGWIN_IPC_H - -#include <sys/types.h> - -#ifdef __cplusplus -extern "C" -{ -#endif - -struct ipc_perm -{ - uid_t uid; /* Owner's user ID. */ - gid_t gid; /* Owner's group ID. */ - uid_t cuid; /* Creator's user ID. */ - gid_t cgid; /* Creator's group ID. */ - mode_t mode; /* Read/write permission. */ - key_t key; - unsigned short seq; -}; - -/* Mode bits: - */ -#define IPC_CREAT 0x0200 /* Create entry if key does not exist. */ -#define IPC_EXCL 0x0400 /* Fail if key exists. */ -#define IPC_NOWAIT 0x0800 /* Error if request must wait. */ -#ifdef _KERNEL -#define IPC_KEY_IS_SHMID 0x1000 /* Used in shmget when called from shmat. */ -#endif - -/* Keys: - */ -#define IPC_PRIVATE ((key_t) 0) /* Private key. */ - -/* Control commands: - */ -#define IPC_RMID 0x1000 /* Remove identifier. */ -#define IPC_SET 0x1001 /* Set options. */ -#define IPC_STAT 0x1002 /* Get options. */ -#ifdef _KERNEL -#define IPC_INFO 0x1003 /* For ipcs(8). */ -#endif - -#ifdef _KERNEL -#define IPCID_TO_IX(id) ((id) & 0xffff) -#define IPCID_TO_SEQ(id) (((id) >> 16) & 0xffff) -#define IXSEQ_TO_IPCID(ix,perm) (((perm.seq) << 16) | (ix & 0xffff)) - -#define IPC_R 000400 /* read permission */ -#define IPC_W 000200 /* write/alter permission */ -#define IPC_M 010000 /* permission to change control info */ -#endif - -key_t ftok (const char *path, int id); - -#ifdef __cplusplus -} -#endif - -#endif /* _CYGWIN_IPC_H */ diff --git a/winsup/cygwin/include/cygwin/kd.h b/winsup/cygwin/include/cygwin/kd.h deleted file mode 100644 index b4ec7c523..000000000 --- a/winsup/cygwin/include/cygwin/kd.h +++ /dev/null @@ -1,20 +0,0 @@ -/* cygwin/kd.h - - Copyright 2006 Red Hat Inc. - Written by Kazuhiro Fujieda <fujieda@jaist.ac.jp> - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifndef _CYGWIN_KD_H_ -#define _CYGWIN_KD_H_ - -#define KDGKBMETA 0x4b62 -#define KDSKBMETA 0x4b63 -#define K_METABIT 0x03 -#define K_ESCPREFIX 0x04 - -#endif /* _CYGWIN_KD_H_ */ diff --git a/winsup/cygwin/include/cygwin/msg.h b/winsup/cygwin/include/cygwin/msg.h deleted file mode 100644 index 8679786dd..000000000 --- a/winsup/cygwin/include/cygwin/msg.h +++ /dev/null @@ -1,102 +0,0 @@ -/* sys/msg.h - - Copyright 2002 Red Hat Inc. - Written by Conrad Scott <conrad.scott@dsl.pipex.com> - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifndef _CYGWIN_MSG_H -#define _CYGWIN_MSG_H - -#include <cygwin/ipc.h> - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Message operation flags: - */ -#define MSG_NOERROR 0x01 /* No error if big message. */ - -#ifdef _KERNEL -/* Command definitions for the semctl () function: - */ -#define MSG_STAT 0x2000 /* For ipcs(8) */ -#define MSG_INFO 0x2001 /* For ipcs(8) */ -#endif /* _KERNEL */ - -/* Used for the number of messages in the message queue. - */ -typedef unsigned long msgqnum_t; - -/* Used for the number of bytes allowed in a message queue. - */ -typedef unsigned long msglen_t; - -struct msqid_ds -{ - struct ipc_perm msg_perm; /* Operation permission structure. */ - msglen_t msg_cbytes; /* Number of bytes currently on queue. */ - msgqnum_t msg_qnum; /* Number of messages currently on queue. */ - msglen_t msg_qbytes; /* Maximum number of bytes allowed on queue. */ - pid_t msg_lspid; /* Process ID of last msgsnd (). */ - pid_t msg_lrpid; /* Process ID of last msgrcv (). */ - timestruc_t msg_stim; /* Time of last msgsnd (). */ - timestruc_t msg_rtim; /* Time of last msgrcv (). */ - timestruc_t msg_ctim; /* Time of last change. */ -#ifdef _KERNEL - struct msg *msg_first; - struct msg *msg_last; -#else - long msg_spare4[2]; -#endif /* _KERNEL */ -}; - -#define msg_stime msg_stim.tv_sec -#define msg_rtime msg_rtim.tv_sec -#define msg_ctime msg_ctim.tv_sec - -#ifdef _KERNEL -/* Buffer type for msgctl (IPC_INFO, ...) as used by ipcs(8). - */ -struct msginfo -{ - long msgmax; /* Maximum number of bytes per - message. */ - long msgmnb; /* Maximum number of bytes on any one - message queue. */ - long msgmni; /* Maximum number of message queues, - system wide. */ - long msgtql; /* Maximum number of messages, system - wide. */ - long msgssz; /* Size of a message segment, must be - small power of 2 greater than 4. */ - long msgseg; /* Number of message segments */ - long msg_spare[2]; -}; - -/* Buffer type for msgctl (MSG_INFO, ...) as used by ipcs(8). - */ -struct msg_info -{ - long msg_ids; /* Number of allocated queues. */ - long msg_num; /* Number of messages, system wide. */ - long msg_tot; /* Size in bytes of messages, system wide. */ -}; -#endif /* _KERNEL */ - -int msgctl (int msqid, int cmd, struct msqid_ds *buf); -int msgget (key_t key, int msgflg); -ssize_t msgrcv (int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); -int msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg); - -#ifdef __cplusplus -} -#endif - -#endif /* _CYGWIN_MSG_H */ diff --git a/winsup/cygwin/include/cygwin/mtio.h b/winsup/cygwin/include/cygwin/mtio.h deleted file mode 100644 index 04d5df451..000000000 --- a/winsup/cygwin/include/cygwin/mtio.h +++ /dev/null @@ -1,313 +0,0 @@ -/* cygwin/mtio.h - - Copyright 1999, 2001, 2004 Red Hat, Inc. - - Written by Corinna Vinschen <corinna@vinschen.de> - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -/* cygwin/mtio.h header file for Cygwin. - - by C. Vinschen. */ - -#ifndef _CYGWIN_MTIO_H -#define _CYGWIN_MTIO_H - -#include <sys/ioctl.h> -#include <asm/socket.h> - -#ifndef DEFTAPE -#define DEFTAPE "/dev/tape" -#endif - -/* - * Structures and definitions for mag tape io control commands - */ - -/* structure for MTIOCTOP - mag tape op command */ -struct mtop { - short mt_op; /* operations defined below */ - int mt_count; /* how many of them */ -}; - -/* Magnetic Tape operations [Not all operations supported by all drivers]: */ -#define MTRESET 0 /* reset drive in case of problems */ -#define MTFSF 1 /* forward space over FileMark, - * position at first record of next file - */ -#define MTBSF 2 /* backward space FileMark (position before FM) */ -#define MTFSR 3 /* forward space record */ -#define MTBSR 4 /* backward space record */ -#define MTWEOF 5 /* write an end-of-file record (mark) */ -#define MTREW 6 /* rewind */ -#define MTOFFL 7 /* rewind and put the drive offline (eject?) */ -#define MTNOP 8 /* no op, set status only (read with MTIOCGET) */ -#define MTRETEN 9 /* retension tape */ -#define MTBSFM 10 /* +backward space FileMark, position at FM */ -#define MTFSFM 11 /* +forward space FileMark, position at FM */ -#define MTEOM 12 /* goto end of recorded media (for appending files). - * MTEOM positions after the last FM, ready for - * appending another file. - */ -#define MTERASE 13 /* erase tape -- be careful! */ - -#define MTRAS1 14 /* run self test 1 (nondestructive) */ -#define MTRAS2 15 /* run self test 2 (destructive) */ -#define MTRAS3 16 /* reserved for self test 3 */ - -#define MTSETBLK 20 /* set block length (SCSI) */ -#define MTSETDENSITY 21 /* set tape density (SCSI) */ -#define MTSEEK 22 /* seek to block (Tandberg, etc.) */ -#define MTTELL 23 /* tell block (Tandberg, etc.) */ -#define MTSETDRVBUFFER 24 /* set the drive buffering according to SCSI-2 */ - /* ordinary buffered operation with code 1 */ -#define MTFSS 25 /* space forward over setmarks */ -#define MTBSS 26 /* space backward over setmarks */ -#define MTWSM 27 /* write setmarks */ - -#define MTLOCK 28 /* lock the drive door */ -#define MTUNLOCK 29 /* unlock the drive door */ -#define MTLOAD 30 /* execute the SCSI load command */ -#define MTUNLOAD 31 /* execute the SCSI unload command */ -#define MTCOMPRESSION 32/* control compression with SCSI mode page 15 */ -#define MTSETPART 33 /* Change the active tape partition */ -#define MTMKPART 34 /* Format the tape with one or two partitions */ - -/* structure for MTIOCGET - mag tape get status command */ - -struct mtget { - long mt_type; /* type of magtape device */ - long mt_resid; /* residual count: (not sure) - * number of bytes ignored, or - * number of files not skipped, or - * number of records not skipped. - * Cygwin: remaining KB until 1.5.7. - * active partition since 1.5.8 - * (same as on GNU-Linux). - */ - /* the following registers are device dependent */ - long mt_dsreg; /* status register, Contains blocksize and - density code. See MT_ST_xxx macros below */ - long mt_gstat; /* generic (device independent) status */ - long mt_erreg; /* error register */ - /* The next two fields are not always used */ - long mt_fileno; /* number of current file on tape */ - long mt_blkno; /* current block number */ - /* The next are Windows NT specific */ - long long mt_capacity; /* Tape capacity in bytes */ - long long mt_remaining; /* Remaining bytes */ - int mt_minblksize; - int mt_maxblksize; - int mt_defblksize; - unsigned long mt_featureslow; - unsigned long mt_featureshigh; - unsigned long mt_eotwarningzonesize; -}; - -/* structure for MTIOCPOS - mag tape get position command */ - -struct mtpos { - long mt_blkno; /* current block number */ -}; - - -/* mag tape io control commands */ -#define MTIOCTOP _IOW('m', 1, struct mtop) /* do a mag tape op */ -#define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */ -#define MTIOCPOS _IOR('m', 3, struct mtpos) /* get tape position */ - -/* Generic Mag Tape (device independent) status macros for examining - * mt_gstat -- HP-UX compatible. - * There is room for more generic status bits here, but I don't - * know which of them are reserved. At least three or so should - * be added to make this really useful. - */ -#define GMT_EOF(x) ((x) & 0x80000000) -#define GMT_BOT(x) ((x) & 0x40000000) -#define GMT_EOT(x) ((x) & 0x20000000) -#define GMT_SM(x) ((x) & 0x10000000) /* DDS setmark */ -#define GMT_EOD(x) ((x) & 0x08000000) /* DDS EOD */ -#define GMT_WR_PROT(x) ((x) & 0x04000000) -#define GMT_REP_SM(x) ((x) & 0x02000000) /* Cygwin: rep. setmarks */ -#define GMT_ONLINE(x) ((x) & 0x01000000) -#define GMT_D_6250(x) ((x) & 0x00800000) -#define GMT_D_1600(x) ((x) & 0x00400000) -#define GMT_D_800(x) ((x) & 0x00200000) -#define GMT_PADDING(x) ((x) & 0x00100000) /* Cygwin: data padding */ -#define GMT_HW_ECC(x) ((x) & 0x00080000) /* Cygwin: HW error corr. */ -#define GMT_DR_OPEN(x) ((x) & 0x00040000) /* door open (no tape) */ -#define GMT_HW_COMP(x) ((x) & 0x00020000) /* Cygwin: HW compression */ -#define GMT_IM_REP_EN(x) ((x) & 0x00010000) /* immediate report mode */ -#define GMT_CLN(x) ((x) & 0x00008000) /* cleaning requested */ -/* 15 generic status bits unused */ -/* Cygwin only: The below settings are also used by the GNU-Linux SCSI tape - driver but they aren't usually reported here. Unfortunately, there's no - other official method to retrieve the values of these settings and - reporting them here apparently doesn't hurt. */ -#define GMT_TWO_FM(x) ((x) & 0x00000080) /* two fm after write */ -#define GMT_FAST_MTEOM(x) ((x) & 0x00000040) /* fast seek to eom */ -#define GMT_AUTO_LOCK(x) ((x) & 0x00000020) /* auto door lock on r/w */ -#define GMT_SYSV(x) ((x) & 0x00000010) /* SYSV read semantics */ -#define GMT_NOWAIT(x) ((x) & 0x00000008) /* don't wait for positioning commands */ -#define GMT_ASYNC(x) ((x) & 0x00000004) /* asynchronous writes */ - - -/* SCSI-tape specific definitions */ -/* Bitfield shifts in the status mt_dsreg */ -#define MT_ST_BLKSIZE_SHIFT 0 -#define MT_ST_BLKSIZE_MASK 0xffffff -#define MT_ST_DENSITY_SHIFT 24 -#define MT_ST_DENSITY_MASK 0xff000000 - -#define MT_ST_SOFTERR_SHIFT 0 -#define MT_ST_SOFTERR_MASK 0xffff - -/* Bitfields for the MTSETDRVBUFFER ioctl. */ -#define MT_ST_OPTIONS 0xf0000000 -#define MT_ST_BOOLEANS 0x10000000 -#define MT_ST_SETBOOLEANS 0x30000000 -#define MT_ST_CLEARBOOLEANS 0x40000000 -#define MT_ST_WRITE_THRESHOLD 0x20000000 /* Not supported */ -#define MT_ST_DEF_OPTIONS 0x60000000 /* Not supported */ -#define MT_ST_EOT_WZ_SIZE 0xf0000000 /* Cygwin only */ - -#define MT_ST_BUFFER_WRITES 0x00000001 -#define MT_ST_ASYNC_WRITES 0x00000002 -#define MT_ST_READ_AHEAD 0x00000004 /* Not supported */ -#define MT_ST_DEBUGGING 0x00000008 /* Not supported */ -#define MT_ST_TWO_FM 0x00000010 -#define MT_ST_FAST_MTEOM 0x00000020 -#define MT_ST_AUTO_LOCK 0x00000040 -#define MT_ST_DEF_WRITES 0x00000080 /* Not supported */ -#define MT_ST_CAN_BSR 0x00000100 /* Not supported */ -#define MT_ST_NO_BLKLIMS 0x00000200 /* Not supported */ -#define MT_ST_CAN_PARTITIONS 0x00000400 /* Not supported */ -#define MT_ST_SCSI2LOGICAL 0x00000800 /* Not supported */ -#define MT_ST_SYSV 0x00001000 -#define MT_ST_NOWAIT 0x00002000 -#define MT_ST_ECC 0x00010000 /* Cygwin only */ -#define MT_ST_PADDING 0x00020000 /* Cygwin only */ -#define MT_ST_REPORT_SM 0x00040000 /* Cygwin only */ - -/* - * Constants for mt_type. Not all of these are supported, - * and these are not all of the ones that are supported. - * - * Only used when not colliding with Windows codes (see below) - */ -#define MT_ISUNKNOWN 0x01 -#define MT_ISQIC02 0x02 /* Generic QIC-02 tape streamer */ -#define MT_ISWT5150 0x03 /* Wangtek 5150EQ, QIC-150, QIC-02 */ -#define MT_ISARCHIVE_5945L2 0x04 /* Archive 5945L-2, QIC-24, QIC-02? */ -#define MT_ISCMSJ500 0x05 /* CMS Jumbo 500 (QIC-02?) */ -#define MT_ISTDC3610 0x06 /* Tandberg 6310, QIC-24 */ -#define MT_ISARCHIVE_VP60I 0x07 /* Archive VP60i, QIC-02 */ -#define MT_ISARCHIVE_2150L 0x08 /* Archive Viper 2150L */ -#define MT_ISARCHIVE_2060L 0x09 /* Archive Viper 2060L */ -#define MT_ISARCHIVESC499 0x0A /* Archive SC-499 QIC-36 controller */ -#define MT_ISQIC02_ALL_FEATURES 0x0F /* Generic QIC-02 with all features */ -#define MT_ISWT5099EEN24 0x11 /* Wangtek 5099-een24, 60MB, QIC-24 */ -#define MT_ISTEAC_MT2ST 0x12 /* Teac MT-2ST 155mb drive, Teac DC-1 card (Wangtek type) */ -#define MT_ISEVEREX_FT40A 0x32 /* Everex FT40A (QIC-40) */ -#define MT_ISDDS1 0x51 /* DDS device without partitions */ -#define MT_ISDDS2 0x52 /* DDS device with partitions */ -#define MT_ISSCSI1 0x71 /* Generic ANSI SCSI-1 tape unit */ -#define MT_ISSCSI2 0x72 /* Generic ANSI SCSI-2 tape unit */ - -/* More constants for mt_type. These are the codes used by Windows >= 5.1 */ -#define MT_ISDDS_4mm 0x20 -#define MT_ISMiniQic 0x21 -#define MT_ISTravan 0x22 -#define MT_ISQIC 0x23 -#define MT_ISMP_8mm 0x24 -#define MT_ISAME_8mm 0x25 -#define MT_ISAIT1_8mm 0x26 -#define MT_ISDLT 0x27 -#define MT_ISNCTP 0x28 -#define MT_ISIBM_3480 0x29 -#define MT_ISIBM_3490E 0x2a -#define MT_ISIBM_Magstar_3590 0x2b -#define MT_ISIBM_Magstar_MP 0x2c -#define MT_ISSTK_DATA_D3 0x2d -#define MT_ISSONY_DTF 0x2e -#define MT_ISDV_6mm 0x2f -#define MT_ISDMI 0x30 -#define MT_ISSONY_D2 0x31 -#define MT_ISCLEANER_CARTRIDGE 0x32 -#define MT_ISAVATAR_F2 0x4f -#define MT_ISMP2_8mm 0x50 -#define MT_ISDST_S 0x51 -#define MT_ISDST_M 0x52 -#define MT_ISDST_L 0x53 -#define MT_ISVXATape_1 0x54 -#define MT_ISVXATape_2 0x55 -#define MT_ISSTK_9840 0x56 -#define MT_ISLTO_Ultrium 0x57 -#define MT_ISLTO_Accelis 0x58 -#define MT_ISAIT_8mm 0x5a -#define MT_ISADR_1 0x5b -#define MT_ISADR_2 0x5c -#define MT_ISSTK_9940 0x5d - -struct mt_tape_info { - long t_type; /* device type id (mt_type) */ - char *t_name; /* descriptive name */ -}; - -#define MT_TAPE_INFO { \ - {MT_ISUNKNOWN, "Unknown type of tape device"}, \ - {MT_ISQIC02, "Generic QIC-02 tape streamer"}, \ - {MT_ISWT5150, "Wangtek 5150, QIC-150"}, \ - {MT_ISARCHIVE_5945L2, "Archive 5945L-2"}, \ - {MT_ISCMSJ500, "CMS Jumbo 500"}, \ - {MT_ISTDC3610, "Tandberg TDC 3610, QIC-24"}, \ - {MT_ISARCHIVE_VP60I, "Archive VP60i, QIC-02"}, \ - {MT_ISARCHIVE_2150L, "Archive Viper 2150L"}, \ - {MT_ISARCHIVE_2060L, "Archive Viper 2060L"}, \ - {MT_ISARCHIVESC499, "Archive SC-499 QIC-36 controller"}, \ - {MT_ISQIC02_ALL_FEATURES, "Generic QIC-02 tape, all features"}, \ - {MT_ISWT5099EEN24, "Wangtek 5099-een24, 60MB"}, \ - {MT_ISTEAC_MT2ST, "Teac MT-2ST 155mb data cassette drive"}, \ - {MT_ISDDS_4mm, "DDS"}, \ - {MT_ISMiniQic, "MiniQic"}, \ - {MT_ISTravan, "Travan tape"}, \ - {MT_ISQIC, "QIC tape"}, \ - {MT_ISMP_8mm, "8mm Exabyte metal particle tape"}, \ - {MT_ISAME_8mm, "8mm Exabyte advanced metal evap tape"}, \ - {MT_ISAIT1_8mm, "8mm Sony AIT1 tape"}, \ - {MT_ISDLT, "DLT compact tape)"}, \ - {MT_ISNCTP, "Philips NCTP tape"}, \ - {MT_ISIBM_3480, "IBM 3480 tape"}, \ - {MT_ISIBM_3490E, "IBM 3490E tape"}, \ - {MT_ISIBM_Magstar_3590, "IBM Magstar 3590 tape"}, \ - {MT_ISIBM_Magstar_MP, "IBM Magstar MP tape"}, \ - {MT_ISSTK_DATA_D3, "STK data D3 tape"}, \ - {MT_ISSONY_DTF, "Sony DTF tape"}, \ - {MT_ISDV_6mm, "6mm digital video tape"}, \ - {MT_ISDMI, "Exabyte DMI tape"}, \ - {MT_ISSONY_D2, "Sony D2S or D2L tape"}, \ - {MT_ISCLEANER_CARTRIDGE, "Cleaner (all drive types that support cleaners)"}, \ - {MT_ISAVATAR_F2, "Avatar 2"}, \ - {MT_ISMP2_8mm, "8mm Hitachi tape"}, \ - {MT_ISDST_S, "Ampex DST small tape"}, \ - {MT_ISDST_M, "Ampex DST medium tape"}, \ - {MT_ISDST_L, "Ampex DST large tape"}, \ - {MT_ISVXATape_1, "Ecrix 8mm tape"}, \ - {MT_ISVXATape_2, "Ecrix 8mm tape"}, \ - {MT_ISSTK_9840, "STK 9840"}, \ - {MT_ISLTO_Ultrium, "LTO Ultrium (IBM, HP, Seagate)"}, \ - {MT_ISLTO_Accelis, "LTO Accelis (IBM, HP, Seagate)"}, \ - {MT_ISAIT_8mm, "AIT tape (AIT2 or higher)"}, \ - {MT_ISADR_1, "OnStream ADR1"}, \ - {MT_ISADR_2, "OnStream ADR2"}, \ - {MT_ISSTK_9940, "STK 9940"}, \ - {MT_ISSCSI1, "Generic SCSI-1 tape"}, \ - {MT_ISSCSI2, "Generic SCSI-2 tape"}, \ - {0, NULL} \ -} - -#endif /* _CYGWIN_MTIO_H */ diff --git a/winsup/cygwin/include/cygwin/rdevio.h b/winsup/cygwin/include/cygwin/rdevio.h deleted file mode 100644 index 73059ac09..000000000 --- a/winsup/cygwin/include/cygwin/rdevio.h +++ /dev/null @@ -1,42 +0,0 @@ -/* cygwin/rdevio.h - - Copyright 1999, 2001 Red Hat, Inc. - - Written by Corinna Vinschen <corinna@vinschen.de> - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -/* - * cygwin/rdevio.h header file for Cygwin. - * - * Written by C. Vinschen. - */ - -#ifndef _CYGWIN_RDEVIO_H -#define _CYGWIN_RDEVIO_H - -/* structure for RDIOCDOP - raw device operation */ -struct rdop { - short rd_op; - unsigned long rd_parm; -}; - -/* Raw device operations */ -#define RDSETBLK 1 /* set buffer for driver */ - -/* structure for RDIOCGET - get raw device */ -struct rdget { - unsigned long bufsiz; -}; - -/* - * ioctl commands -*/ -#define RDIOCDOP _IOW('r', 128, struct rdop) -#define RDIOCGET _IOR('r', 129, struct rdget) - -#endif /* _CYGWIN_RDEVIO_H */ diff --git a/winsup/cygwin/include/cygwin/sem.h b/winsup/cygwin/include/cygwin/sem.h deleted file mode 100644 index af7a42f36..000000000 --- a/winsup/cygwin/include/cygwin/sem.h +++ /dev/null @@ -1,128 +0,0 @@ -/* sys/sem.h - - Copyright 2002 Red Hat Inc. - Written by Conrad Scott <conrad.scott@dsl.pipex.com> - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifndef _CYGWIN_SEM_H -#define _CYGWIN_SEM_H - -#include <cygwin/ipc.h> - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Semaphore operation flags: - */ -#define SEM_UNDO 010000 /* Set up adjust on exit entry. */ - -/* Command definitions for the semctl () function: - */ -#define GETNCNT 0x3000 /* Get semncnt. */ -#define GETPID 0x3001 /* Get sempid. */ -#define GETVAL 0x3002 /* Get semval. */ -#define GETALL 0x3003 /* Get all cases of semval. */ -#define GETZCNT 0x3004 /* Get semzcnt. */ -#define SETVAL 0x3005 /* Set semval. */ -#define SETALL 0x3006 /* Set all cases of semval. */ - -#ifdef _KERNEL -#define SEM_STAT 0x3010 /* For ipcs(8). */ -#define SEM_INFO 0x3011 /* For ipcs(8). */ -#endif /* _KERNEL */ - -struct semid_ds -{ - struct ipc_perm sem_perm; /* Operation permission structure. */ - unsigned short sem_nsems; /* Number of semaphores in set. */ - timestruc_t sem_otim; /* Last semop () time. */ - timestruc_t sem_ctim; /* Last time changed by semctl (). */ -#ifdef _KERNEL - struct sem *sem_base; /* pointer to first semaphore in set */ - long sem_spare4[1]; -#else - long sem_spare4[2]; -#endif /* _KERNEL */ -}; - -#define sem_otime sem_otim.tv_sec -#define sem_ctime sem_ctim.tv_sec - -struct sembuf -{ - unsigned short sem_num; /* Semaphore number. */ - short sem_op; /* Semaphore operation. */ - short sem_flg; /* Operation flags. */ -}; - -#ifdef _KERNEL -/* Buffer type for semctl (IPC_INFO, ...) as used by ipcs(8). - */ -struct seminfo -{ - long semmni; /* Maximum number of unique semaphore - sets, system wide. */ - long semmns; /* Maximum number of semaphores, - system wide. */ - long semmsl; /* Maximum number of semaphores per - semaphore set. */ - long semopm; /* Maximum number of operations per - semop call. */ - long semmnu; /* Maximum number of undo structures, - system wide. */ - long semume; /* Maximum number of undo entries per - undo structure. */ - long semvmx; /* Maximum semaphore value. */ - long semaem; /* Maximum adjust-on-exit value. */ - long semmap; /* # of entries in semaphore map */ - long semusz; /* size in bytes of undo structure */ - long sem_spare[2]; -}; - -/* Buffer type for semctl (SEM_INFO, ...) as used by ipcs(8). - */ -struct sem_info -{ - long sem_ids; /* Number of allocated semaphore sets. */ - long sem_num; /* Number of allocated semaphores. */ -}; - -/* Permission flags */ -#define SEM_A IPC_W /* alter permission */ -#define SEM_R IPC_R /* read permission */ - -/* Internally used mode bits. */ -#define SEM_ALLOC 01000 /* semaphore is allocated */ - -#endif /* _KERNEL */ - -#ifdef _KERNEL -/* According to SUSv3, "the fourth argument [to semctl()] is optional and - depends upon the operation requested. If required, it is of type - union semun, which the application shall explicitly declare:" */ -union semun { - int val; /* value for SETVAL */ - struct semid_ds *buf; /* buffer for IPC_STAT, IPC_SET */ - unsigned short *array; /* array for GETALL, SETALL */ -}; -/* Therefore this union is only declared here if building internal code. - _KERNEL must not be defined in exernal applications! Declare union - semun explicitely as required by SUSv3, please. */ -#endif /* _KERNEL */ - -int semctl (int semid, int semnum, int cmd, ...); -int semget (key_t key, int nsems, int semflg); -int semop (int semid, struct sembuf *sops, size_t nsops); - -#ifdef __cplusplus -} -#endif - -#endif /* _CYGWIN_SEM_H */ diff --git a/winsup/cygwin/include/cygwin/shm.h b/winsup/cygwin/include/cygwin/shm.h deleted file mode 100644 index 2c882012c..000000000 --- a/winsup/cygwin/include/cygwin/shm.h +++ /dev/null @@ -1,106 +0,0 @@ -/* sys/shm.h - - Copyright 2001, 2002 Red Hat Inc. - Written by Robert Collins <rbtcollins@hotmail.com> - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifndef _CYGWIN_SHM_H -#define _CYGWIN_SHM_H - -#include <cygwin/ipc.h> -#include <sys/cygwin.h> - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Segment low boundary address multiple. - * - * 64 Kb was hardcoded for x86. MS states this may change so the constant - * expression is replaced by a function call returning the correct value. */ -#define SHMLBA (cygwin_internal (CW_GET_SHMLBA)) - -/* Shared memory operation flags: - */ -#define SHM_RDONLY 0x01 /* Attach read-only (else read-write). */ -#define SHM_RND 0x02 /* Round attach address to SHMLBA. */ - -#ifdef _KERNEL -/* Command definitions for the semctl () function: - */ -#define SHM_STAT 0x4000 /* For ipcs(8) */ -#define SHM_INFO 0x4001 /* For ipcs(8) */ -#endif /* _KERNEL */ - -/* Unsigned integer used for the number of current attaches. - */ -typedef unsigned int shmatt_t; - -struct shmid_ds -{ - struct ipc_perm shm_perm; /* Operation permission structure. */ - size_t shm_segsz; /* Size of segment in bytes. */ - pid_t shm_lpid; /* Process ID of last operation. */ - pid_t shm_cpid; /* Process ID of creator. */ - shmatt_t shm_nattch;/* Number of current attaches. */ - timestruc_t shm_atim; /* Time of last shmat (). */ - timestruc_t shm_dtim; /* Time of last shmdt (). */ - timestruc_t shm_ctim; /* Time of last change by shmctl (). */ -#ifdef _KERNEL - struct shm_handle *shm_internal; - long shm_spare4[1]; -#else - long shm_spare4[2]; -#endif /* _KERNEL */ -}; - -#define shm_atime shm_atim.tv_sec -#define shm_dtime shm_dtim.tv_sec -#define shm_ctime shm_ctim.tv_sec - -#ifdef _KERNEL -/* Buffer type for shmctl (IPC_INFO, ...) as used by ipcs(8). - */ -struct shminfo -{ - long shmmax; /* Maximum size in bytes of a shared - memory segment. */ - long shmmin; /* Minimum size in bytes of a shared - memory segment. */ - long shmmni; /* Maximum number of shared memory - segments, system wide. */ - long shmseg; /* Maximum number of shared memory - segments attached per process. */ - long shmall; /* Maximum number of bytes of shared - memory, system wide. */ - long shm_spare[4]; -}; - -/* Buffer type for shmctl (SHM_INFO, ...) as used by ipcs(8). - */ -struct shm_info -{ -#define shm_ids used_ids - long used_ids; /* Number of allocated segments. */ - long shm_tot; /* Size in bytes of allocated segments. */ - long shm_atts; /* Number of attached segments, system - wide. */ -}; -#endif /* _KERNEL */ - -void *shmat (int shmid, const void *shmaddr, int shmflg); -int shmctl (int shmid, int cmd, struct shmid_ds *buf); -int shmdt (const void *shmaddr); -int shmget (key_t key, size_t size, int shmflg); - -#ifdef __cplusplus -} -#endif - -#endif /* _CYGWIN_SHM_H */ diff --git a/winsup/cygwin/include/cygwin/signal.h b/winsup/cygwin/include/cygwin/signal.h deleted file mode 100644 index 77dde3c99..000000000 --- a/winsup/cygwin/include/cygwin/signal.h +++ /dev/null @@ -1,285 +0,0 @@ -/* signal.h - - Copyright 2004, 2005, 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 _CYGWIN_SIGNAL_H -#define _CYGWIN_SIGNAL_H - -#ifdef __cplusplus -extern "C" { -#endif -struct _fpstate -{ - unsigned long cw; - unsigned long sw; - unsigned long tag; - unsigned long ipoff; - unsigned long cssel; - unsigned long dataoff; - unsigned long datasel; - unsigned char _st[80]; - unsigned long nxst; -}; - -struct ucontext -{ - unsigned long cr2; - unsigned long dr0; - unsigned long dr1; - unsigned long dr2; - unsigned long dr3; - unsigned long dr6; - unsigned long dr7; - struct _fpstate fpstate; - unsigned long gs; - unsigned long fs; - unsigned long es; - unsigned long ds; - unsigned long edi; - unsigned long esi; - unsigned long ebx; - unsigned long edx; - unsigned long ecx; - unsigned long eax; - unsigned long ebp; - unsigned long eip; - unsigned long cs; - unsigned long eflags; - unsigned long esp; - unsigned long ss; - unsigned char _internal; - unsigned long oldmask; -}; - -#define __COPY_CONTEXT_SIZE ((unsigned) &((struct ucontext *) 0)->_internal) - -typedef union sigval -{ - int sival_int; /* integer signal value */ - void *sival_ptr; /* pointer signal value */ -} sigval_t; - -typedef struct sigevent -{ - sigval_t sigev_value; /* signal value */ - int sigev_signo; /* signal number */ - int sigev_notify; /* notification type */ - void (*sigev_notify_function) (sigval_t); /* notification function */ - pthread_attr_t *sigev_notify_attributes; /* notification attributes */ -} sigevent_t; - -#pragma pack(push,4) -struct _sigcommune -{ - __uint32_t _si_code; - void *_si_read_handle; - void *_si_write_handle; - void *_si_process_handle; - __extension__ union - { - int _si_fd; - void *_si_pipe_fhandler; - char *_si_str; - }; -}; - -typedef struct -{ - int si_signo; /* signal number */ - int si_code; /* signal code */ - pid_t si_pid; /* sender's pid */ - uid_t si_uid; /* sender's uid */ - int si_errno; /* errno associated with signal */ - - __extension__ union - { - __uint32_t __pad[32]; /* plan for future growth */ - struct _sigcommune _si_commune; /* cygwin ipc */ - __extension__ union - { - /* timers */ - struct - { - union - { - struct - { - timer_t si_tid; /* timer id */ - unsigned int si_overrun; /* overrun count */ - }; - sigval_t si_sigval; /* signal value */ - sigval_t si_value; /* signal value */ - }; - }; - }; - - /* SIGCHLD */ - __extension__ struct - { - int si_status; /* exit code */ - clock_t si_utime; /* user time */ - clock_t si_stime; /* system time */ - }; - - /* core dumping signals */ - void *si_addr; /* faulting address */ - }; -} siginfo_t; -#pragma pack(pop) - -enum -{ - SI_USER = 0, /* sent by kill, raise, pthread_kill */ - SI_ASYNCIO = 2, /* sent by AIO completion (currently - unimplemented) */ - SI_MESGQ, /* sent by real time mesq state change - (currently unimplemented) */ - SI_TIMER, /* sent by timer expiration */ - SI_QUEUE, /* sent by sigqueue (currently - unimplemented) */ - SI_KERNEL, /* sent by system */ - - ILL_ILLOPC, /* illegal opcode */ - ILL_ILLOPN, /* illegal operand */ - ILL_ILLADR, /* illegal addressing mode */ - ILL_ILLTRP, /* illegal trap*/ - ILL_PRVOPC, /* privileged opcode */ - ILL_PRVREG, /* privileged register */ - ILL_COPROC, /* coprocessor error */ - ILL_BADSTK, /* internal stack error */ - - FPE_INTDIV, /* integer divide by zero */ - FPE_INTOVF, /* integer overflow */ - FPE_FLTDIV, /* floating point divide by zero */ - FPE_FLTOVF, /* floating point overflow */ - FPE_FLTUND, /* floating point underflow */ - FPE_FLTRES, /* floating point inexact result */ - FPE_FLTINV, /* floating point invalid operation */ - FPE_FLTSUB, /* subscript out of range */ - - SEGV_MAPERR, /* address not mapped to object */ - SEGV_ACCERR, /* invalid permissions for mapped object */ - - BUS_ADRALN, /* invalid address alignment. */ - BUS_ADRERR, /* non-existant physical address. */ - BUS_OBJERR, /* object specific hardware error. */ - - CLD_EXITED, /* child has exited */ - CLD_KILLED, /* child was killed */ - CLD_DUMPED, /* child terminated abnormally */ - CLD_TRAPPED, /* traced child has trapped */ - CLD_STOPPED, /* child has stopped */ - CLD_CONTINUED /* stopped child has continued */ -}; - -enum -{ - SIGEV_SIGNAL = 0, /* a queued signal, with an application - defined value, is generated when the - event of interest occurs */ - SIGEV_NONE, /* no asynchronous notification is - delivered when the event of interest - occurs */ - SIGEV_THREAD /* a notification function is called to - perform notification */ -}; - -typedef void (*_sig_func_ptr)(int); - -struct sigaction -{ - __extension__ union - { - _sig_func_ptr sa_handler; /* SIG_DFL, SIG_IGN, or pointer to a function */ - void (*sa_sigaction) ( int, siginfo_t *, void * ); - }; - sigset_t sa_mask; - int sa_flags; -}; - -#define SA_NOCLDSTOP 1 /* Do not generate SIGCHLD when children - stop */ -#define SA_SIGINFO 2 /* Invoke the signal catching function - with three arguments instead of one - */ -#define SA_RESTART 0x10000000 /* Restart syscall on signal return */ -#define SA_NODEFER 0x40000000 /* Don't automatically block the signal - when its handler is being executed */ -#define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler */ -#define SA_ONESHOT SA_RESETHAND /* Historical linux name */ -#define SA_NOMASK SA_NODEFER /* Historical linux name */ - -/* Used internally by cygwin. Included here to group everything in one place. - Do not use. */ -#define _SA_INTERNAL_MASK 0xf000 /* bits in this range are internal */ - -#define SIGHUP 1 /* hangup */ -#define SIGINT 2 /* interrupt */ -#define SIGQUIT 3 /* quit */ -#define SIGILL 4 /* illegal instruction (not reset when caught) */ -#define SIGTRAP 5 /* trace trap (not reset when caught) */ -#define SIGABRT 6 /* used by abort */ -#define SIGEMT 7 /* EMT instruction */ -#define SIGFPE 8 /* floating point exception */ -#define SIGKILL 9 /* kill (cannot be caught or ignored) */ -#define SIGBUS 10 /* bus error */ -#define SIGSEGV 11 /* segmentation violation */ -#define SIGSYS 12 /* bad argument to system call */ -#define SIGPIPE 13 /* write on a pipe with no one to read it */ -#define SIGALRM 14 /* alarm clock */ -#define SIGTERM 15 /* software termination signal from kill */ -#define SIGURG 16 /* urgent condition on IO channel */ -#define SIGSTOP 17 /* sendable stop signal not from tty */ -#define SIGTSTP 18 /* stop signal from tty */ -#define SIGCONT 19 /* continue a stopped process */ -#define SIGCHLD 20 /* to parent on child stop or exit */ -#define SIGCLD 20 /* System V name for SIGCHLD */ -#define SIGTTIN 21 /* to readers pgrp upon background tty read */ -#define SIGTTOU 22 /* like TTIN for output if (tp->t_local<OSTOP) */ -#define SIGIO 23 /* input/output possible signal */ -#define SIGPOLL SIGIO /* System V name for SIGIO */ -#define SIGXCPU 24 /* exceeded CPU time limit */ -#define SIGXFSZ 25 /* exceeded file size limit */ -#define SIGVTALRM 26 /* virtual time alarm */ -#define SIGPROF 27 /* profiling time alarm */ -#define SIGWINCH 28 /* window changed */ -#define SIGLOST 29 /* resource lost (eg, record-lock lost) */ -#define SIGPWR SIGLOST /* power failure */ -#define SIGUSR1 30 /* user defined signal 1 */ -#define SIGUSR2 31 /* user defined signal 2 */ - -/* Real-Time signals per SUSv3. RT_SIGMAX is defined as 8 in limits.h */ -#define SIGRTMIN 32 -#define SIGRTMAX ((SIGRTMIN) + 0) -#define NSIG 33 /* signal 0 implied */ - -#define SIG_HOLD ((_sig_func_ptr)2) /* Signal in signal mask */ - -void psiginfo (const siginfo_t *, const char *); -int sigwait (const sigset_t *, int *); -int sigwaitinfo (const sigset_t *, siginfo_t *); -int sighold (int); -int sigignore (int); -int sigrelse (int); -_sig_func_ptr sigset (int, _sig_func_ptr); - -int sigqueue(pid_t, int, const union sigval); -int siginterrupt (int, int); -#ifdef __INSIDE_CYGWIN__ -extern const char *sys_sigabbrev[]; -extern const char *sys_siglist[]; -#else -extern const char __declspec(dllimport) *sys_sigabbrev[]; -extern const char __declspec(dllimport) *sys_siglist[]; -#endif - -#ifdef __cplusplus -} -#endif -#endif /*_CYGWIN_SIGNAL_H*/ diff --git a/winsup/cygwin/include/cygwin/socket.h b/winsup/cygwin/include/cygwin/socket.h deleted file mode 100644 index 0f099241a..000000000 --- a/winsup/cygwin/include/cygwin/socket.h +++ /dev/null @@ -1,306 +0,0 @@ -/* cygwin/socket.h - - Copyright 1999, 2000, 2001, 2005, 2006, 2007, 2009, 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 _CYGWIN_SOCKET_H -#define _CYGWIN_SOCKET_H - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include <stdint.h> - -/* Not unsigned for backward compatibility. Keep #define for backward - compatibility. */ -#ifndef socklen_t -typedef int socklen_t; -#define socklen_t socklen_t -#endif - -typedef uint16_t sa_family_t; - -struct sockaddr { - sa_family_t sa_family; /* address family, AF_xxx */ - char sa_data[14]; /* 14 bytes of protocol address */ -}; - -/* Definition of sockaddr_storage according to SUSv3. */ -#define _SS_MAXSIZE 128 /* Maximum size. */ -#define _SS_ALIGNSIZE (sizeof (int64_t))/* Desired alignment. */ -#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof (sa_family_t)) -#define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof (sa_family_t) \ - + _SS_PAD1SIZE + _SS_ALIGNSIZE)) - -struct sockaddr_storage { - sa_family_t ss_family; - char _ss_pad1[_SS_PAD1SIZE]; - int64_t __ss_align; - char _ss_pad2[_SS_PAD2SIZE]; -}; - -#include <asm/socket.h> /* arch-dependent defines */ -#include <cygwin/sockios.h> /* the SIOCxxx I/O controls */ -#include <sys/uio.h> /* iovec support */ -#include <sys/types.h> - -struct ucred { - pid_t pid; - __uid32_t uid; - __gid32_t gid; -}; - -struct linger { - unsigned short l_onoff; /* Linger active */ - unsigned short l_linger; /* How long to linger for */ -}; - -struct msghdr -{ - void * msg_name; /* Socket name */ - socklen_t msg_namelen; /* Length of name */ - struct iovec * msg_iov; /* Data blocks */ - int msg_iovlen; /* Number of blocks */ - void * msg_control; /* Ancillary data */ - socklen_t msg_controllen; /* Ancillary data buffer length */ - int msg_flags; /* Received flags on recvmsg */ -}; - -struct cmsghdr -{ - socklen_t cmsg_len; /* Length of cmsghdr + data */ - int cmsg_level; /* Protocol */ - int cmsg_type; /* Protocol type */ -}; - -#define CMSG_ALIGN(len) \ - (((len) + __alignof__ (struct cmsghdr) - 1) \ - & ~(__alignof__ (struct cmsghdr) - 1)) -#define CMSG_LEN(len) \ - (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) -#define CMSG_SPACE(len) \ - (CMSG_ALIGN (sizeof (struct cmsghdr)) + CMSG_ALIGN(len)) -#define CMSG_FIRSTHDR(mhdr) \ - ({ \ - struct msghdr *_m = (struct msghdr *) mhdr; \ - (unsigned) (_m)->msg_controllen >= sizeof (struct cmsghdr) \ - ? (struct cmsghdr *) (_m)->msg_control \ - : (struct cmsghdr *) NULL; \ - }) -#define CMSG_NXTHDR(mhdr,cmsg) \ - ({ \ - struct msghdr *_m = (struct msghdr *) mhdr; \ - struct cmsghdr *_c = (struct cmsghdr *) cmsg; \ - ((char *) _c + CMSG_SPACE (_c->cmsg_len) \ - > (char *) _m->msg_control + _m->msg_controllen) \ - ? (struct cmsghdr *) NULL \ - : (struct cmsghdr *) ((char *) _c + CMSG_ALIGN (_c->cmsg_len)); \ - }) -#define CMSG_DATA(cmsg) \ - ((unsigned char *) ((struct cmsghdr *)(cmsg) + 1)) - -/* "Socket"-level control message types: */ -#define SCM_RIGHTS 0x01 /* access rights (array of int) */ - -#ifdef __INSIDE_CYGWIN__ -/* Definition of struct msghdr up to release 1.5.18 */ -struct OLD_msghdr -{ - void * msg_name; /* Socket name */ - int msg_namelen; /* Length of name */ - struct iovec * msg_iov; /* Data blocks */ - int msg_iovlen; /* Number of blocks */ - void * msg_accrights; /* Per protocol magic */ - /* (eg BSD descriptor passing) */ - int msg_accrightslen; /* Length of rights list */ -}; -#endif - -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ - -/* GNU extension flags. Or them to the type parameter in calls to - socket(2) to mark socket as nonblocking and/or close-on-exec. */ -#define SOCK_NONBLOCK 0x01000000 -#define SOCK_CLOEXEC 0x02000000 -#ifdef __INSIDE_CYGWIN__ -#define _SOCK_FLAG_MASK 0xff000000 /* Bits left for more extensions */ -#endif - -/* Supported address families. */ -/* - * Address families. - */ -#define AF_UNSPEC 0 /* unspecified */ -#define AF_UNIX 1 /* local to host (pipes, portals) */ -#define AF_LOCAL 1 /* POSIX name for AF_UNIX */ -#define AF_INET 2 /* internetwork: UDP, TCP, etc. */ -#define AF_IMPLINK 3 /* arpanet imp addresses */ -#define AF_PUP 4 /* pup protocols: e.g. BSP */ -#define AF_CHAOS 5 /* mit CHAOS protocols */ -#define AF_NS 6 /* XEROX NS protocols */ -#define AF_ISO 7 /* ISO protocols */ -#define AF_OSI AF_ISO /* OSI is ISO */ -#define AF_ECMA 8 /* european computer manufacturers */ -#define AF_DATAKIT 9 /* datakit protocols */ -#define AF_CCITT 10 /* CCITT protocols, X.25 etc */ -#define AF_SNA 11 /* IBM SNA */ -#define AF_DECnet 12 /* DECnet */ -#define AF_DLI 13 /* Direct data link interface */ -#define AF_LAT 14 /* LAT */ -#define AF_HYLINK 15 /* NSC Hyperchannel */ -#define AF_APPLETALK 16 /* AppleTalk */ -#define AF_NETBIOS 17 /* NetBios-style addresses */ -#define AF_INET6 23 /* IP version 6 */ - -#define AF_MAX 32 -/* - * Protocol families, same as address families for now. - */ -#define PF_UNSPEC AF_UNSPEC -#define PF_UNIX AF_UNIX -#define PF_LOCAL AF_LOCAL -#define PF_INET AF_INET -#define PF_IMPLINK AF_IMPLINK -#define PF_PUP AF_PUP -#define PF_CHAOS AF_CHAOS -#define PF_NS AF_NS -#define PF_ISO AF_ISO -#define PF_OSI AF_OSI -#define PF_ECMA AF_ECMA -#define PF_DATAKIT AF_DATAKIT -#define PF_CCITT AF_CCITT -#define PF_SNA AF_SNA -#define PF_DECnet AF_DECnet -#define PF_DLI AF_DLI -#define PF_LAT AF_LAT -#define PF_HYLINK AF_HYLINK -#define PF_APPLETALK AF_APPLETALK -#define PF_NETBIOS AF_NETBIOS -#define PF_INET6 AF_INET6 - -#define PF_MAX AF_MAX - -/* Maximum queue length specificable by listen. */ -#define SOMAXCONN 0x7fffffff - -/* Flags we can use with send/ and recv. */ -#define MSG_OOB 0x1 /* process out-of-band data */ -#define MSG_PEEK 0x2 /* peek at incoming message */ -#define MSG_DONTROUTE 0x4 /* send without using routing tables */ -#define MSG_WAITALL 0x8 /* wait for all requested bytes */ -#define MSG_DONTWAIT 0x10 /* selective non-blocking operation */ -#define MSG_NOSIGNAL 0x20 /* Don't raise SIGPIPE */ -#define MSG_TRUNC 0x0100 /* Normal data truncated */ -#define MSG_CTRUNC 0x0200 /* Control data truncated */ - -/* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx */ -#define SOL_IP 0 -#define SOL_IPV6 41 -#define SOL_IPX 256 -#define SOL_AX25 257 -#define SOL_ATALK 258 -#define SOL_NETROM 259 -#define SOL_TCP 6 -#define SOL_UDP 17 - -/* IP options */ -#ifndef IPTOS_LOWDELAY -#define IPTOS_LOWDELAY 0x10 -#define IPTOS_THROUGHPUT 0x08 -#define IPTOS_RELIABILITY 0x04 -#endif - -/* These need to appear somewhere around here */ -#define IP_DEFAULT_MULTICAST_TTL 1 -#define IP_DEFAULT_MULTICAST_LOOP 1 -#define IP_MAX_MEMBERSHIPS 20 - -/* IP options for use with getsockopt/setsockopt */ -#define IP_OPTIONS 1 -#define IP_HDRINCL 2 -#define IP_TOS 3 -#define IP_TTL 4 -#define IP_MULTICAST_IF 9 -#define IP_MULTICAST_TTL 10 -#define IP_MULTICAST_LOOP 11 -#define IP_ADD_MEMBERSHIP 12 -#define IP_DROP_MEMBERSHIP 13 -#define IP_DONTFRAGMENT 14 -#define IP_ADD_SOURCE_MEMBERSHIP 15 -#define IP_DROP_SOURCE_MEMBERSHIP 16 -#define IP_BLOCK_SOURCE 17 -#define IP_UNBLOCK_SOURCE 18 -#define IP_PKTINFO 19 - -/* IPv6 options for use with getsockopt/setsockopt */ -#define IPV6_HOPOPTS 1 -#define IPV6_UNICAST_HOPS 4 -#define IPV6_MULTICAST_IF 9 -#define IPV6_MULTICAST_HOPS 10 -#define IPV6_MULTICAST_LOOP 11 -#define IPV6_ADD_MEMBERSHIP 12 -#define IPV6_DROP_MEMBERSHIP 13 -#define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP -#define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP -#define IPV6_DONTFRAG 14 -#define IPV6_PKTINFO 19 -#define IPV6_HOPLIMIT 21 -#define IPV6_CHECKSUM 26 -#define IPV6_V6ONLY 27 -#define IPV6_RTHDR 32 -#define IPV6_RECVRTHDR 38 - -/* IP agnostic options for use with getsockopt/setsockopt */ -#define MCAST_JOIN_GROUP 41 -#define MCAST_LEAVE_GROUP 42 -#define MCAST_BLOCK_SOURCE 43 -#define MCAST_UNBLOCK_SOURCE 44 -#define MCAST_JOIN_SOURCE_GROUP 45 -#define MCAST_LEAVE_SOURCE_GROUP 46 - -#define MCAST_EXCLUDE 0 -#define MCAST_INCLUDE 1 - -/* Old WinSock1 values, needed internally */ -#ifdef __INSIDE_CYGWIN__ -#define _WS1_IP_OPTIONS 1 -#define _WS1_IP_MULTICAST_IF 2 -#define _WS1_IP_MULTICAST_TTL 3 -#define _WS1_IP_MULTICAST_LOOP 4 -#define _WS1_IP_ADD_MEMBERSHIP 5 -#define _WS1_IP_DROP_MEMBERSHIP 6 -#define _WS1_IP_TTL 7 -#define _WS1_IP_TOS 8 -#define _WS1_IP_DONTFRAGMENT 9 -#endif - -/* IPX options */ -#define IPX_TYPE 1 - -/* TCP options - this way around because someone left a set in the c library includes */ -#ifndef TCP_NODELAY -#define TCP_NODELAY 0x0001 -#define TCP_MAXSEG 2 -#endif - -/* The various priorities. */ -#define SOPRI_INTERACTIVE 0 -#define SOPRI_NORMAL 1 -#define SOPRI_BACKGROUND 2 - -#ifdef __cplusplus -}; -#endif /* __cplusplus */ - -#endif /* _CYGWIN_SOCKET_H */ diff --git a/winsup/cygwin/include/cygwin/sockios.h b/winsup/cygwin/include/cygwin/sockios.h deleted file mode 100644 index 2e756954e..000000000 --- a/winsup/cygwin/include/cygwin/sockios.h +++ /dev/null @@ -1 +0,0 @@ -/* sockios.h */ diff --git a/winsup/cygwin/include/cygwin/stat.h b/winsup/cygwin/include/cygwin/stat.h deleted file mode 100644 index 13c1e3bed..000000000 --- a/winsup/cygwin/include/cygwin/stat.h +++ /dev/null @@ -1,96 +0,0 @@ -/* cygwin/stat.h - - Copyright 2002, 2007, 2010 Red Hat Inc. - Written by Corinna Vinschen <corinna@vinschen.de> - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifndef _CYGWIN_STAT_H -#define _CYGWIN_STAT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined (__INSIDE_CYGWIN__) || defined (_COMPILING_NEWLIB) -struct __stat32 -{ - __dev16_t st_dev; - __ino32_t st_ino; - mode_t st_mode; - nlink_t st_nlink; - __uid16_t st_uid; - __gid16_t st_gid; - __dev16_t st_rdev; - _off_t st_size; - timestruc_t st_atim; - timestruc_t st_mtim; - timestruc_t st_ctim; - blksize_t st_blksize; - __blkcnt32_t st_blocks; - long st_spare4[2]; -}; - -struct __stat64 -{ - __dev32_t st_dev; - __ino64_t st_ino; - mode_t st_mode; - nlink_t st_nlink; - __uid32_t st_uid; - __gid32_t st_gid; - __dev32_t st_rdev; - _off64_t st_size; - timestruc_t st_atim; - timestruc_t st_mtim; - timestruc_t st_ctim; - blksize_t st_blksize; - __blkcnt64_t st_blocks; - timestruc_t st_birthtim; -}; - -extern int fstat64 (int fd, struct __stat64 *buf); -extern int stat64 (const char *file_name, struct __stat64 *buf); -extern int lstat64 (const char *file_name, struct __stat64 *buf); - -#endif - -struct stat -{ - dev_t st_dev; - ino_t st_ino; - mode_t st_mode; - nlink_t st_nlink; - uid_t st_uid; - gid_t st_gid; - dev_t st_rdev; - off_t st_size; - timestruc_t st_atim; - timestruc_t st_mtim; - timestruc_t st_ctim; - blksize_t st_blksize; - blkcnt_t st_blocks; - timestruc_t st_birthtim; -}; - -#define st_atime st_atim.tv_sec -#define st_mtime st_mtim.tv_sec -#define st_ctime st_ctim.tv_sec -#define st_birthtime st_birthtim.tv_sec - -/* POSIX IPC objects are not implemented as distinct file types, so the - below macros have to return 0. The expression is supposed to catch - illegal usage with non-stat parameters. */ -#define S_TYPEISMQ(buf) ((void)(buf)->st_mode,0) -#define S_TYPEISSEM(buf) ((void)(buf)->st_mode,0) -#define S_TYPEISSHM(buf) ((void)(buf)->st_mode,0) - -#ifdef __cplusplus -} -#endif - -#endif /* _CYGWIN_STAT_H */ diff --git a/winsup/cygwin/include/cygwin/stdlib.h b/winsup/cygwin/include/cygwin/stdlib.h deleted file mode 100644 index 20358efe9..000000000 --- a/winsup/cygwin/include/cygwin/stdlib.h +++ /dev/null @@ -1,79 +0,0 @@ -/* stdlib.h - - Copyright 2005, 2006, 2007, 2008, 2009, 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 _CYGWIN_STDLIB_H -#define _CYGWIN_STDLIB_H - -#include <cygwin/wait.h> - -#ifdef __cplusplus -extern "C" -{ -#endif - -const char *getprogname (void); -void setprogname (const char *); - -#ifndef __STRICT_ANSI__ -char *realpath (const char *, char *); -char *canonicalize_file_name (const char *); -int unsetenv (const char *); -char *initstate (unsigned seed, char *state, size_t size); -long random (void); -char *setstate (const char *state); -void srandom (unsigned); -char *ptsname (int); -int ptsname_r(int, char *, size_t); -int grantpt (int); -int unlockpt (int); -#endif /*__STRICT_ANSI__*/ - -int posix_openpt (int); -int posix_memalign (void **, size_t, size_t); - -#ifdef _COMPILING_NEWLIB -#define unsetenv UNUSED_unsetenv -#define _unsetenv_r UNUSED__unsetenv_r -#endif - -extern _PTR memalign _PARAMS ((size_t, size_t)); -extern _PTR valloc _PARAMS ((size_t)); - -#undef _malloc_r -#define _malloc_r(r, s) malloc (s) -#undef _free_r -#define _free_r(r, p) free (p) -#undef _realloc_r -#define _realloc_r(r, p, s) realloc (p, s) -#undef _calloc_r -#define _calloc_r(r, s1, s2) calloc (s1, s2); -#undef _memalign_r -#define _memalign_r(r, s1, s2) memalign (s1, s2); -#undef _mallinfo_r -#define _mallinfo_r(r) mallinfo () -#undef _malloc_stats_r -#define _malloc_stats_r(r) malloc_stats () -#undef _mallopt_r -#define _mallopt_r(i1, i2) mallopt (i1, i2) -#undef _malloc_usable_size_r -#define _malloc_usable_size_r(r, p) malloc_usable_size (p) -#undef _valloc_r -#define _valloc_r(r, s) valloc (s) -#undef _pvalloc_r -#define _pvalloc_r(r, s) pvalloc (s) -#undef _malloc_trim_r -#define _malloc_trim_r(r, s) malloc_trim (s) -#undef _mstats_r -#define _mstats_r(r, p) mstats (p) - -#ifdef __cplusplus -} -#endif -#endif /*_CYGWIN_STDLIB_H*/ diff --git a/winsup/cygwin/include/cygwin/sys_time.h b/winsup/cygwin/include/cygwin/sys_time.h deleted file mode 100644 index 1cbd8ae59..000000000 --- a/winsup/cygwin/include/cygwin/sys_time.h +++ /dev/null @@ -1,27 +0,0 @@ -/* sys_time.h - - Copyright 2005 Red Hat Inc. - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifndef _CYGWIN_SYS_TIME_H -#define _CYGWIN_SYS_TIME_H -#include <sys/select.h> - -#ifdef __cplusplus -extern "C" -{ -#endif - -int futimes (int, const struct timeval *); -int lutimes (const char *, const struct timeval *); - - -#ifdef __cplusplus -} -#endif -#endif /*_CYGWIN_SYS_TIME_H*/ diff --git a/winsup/cygwin/include/cygwin/sysproto.h b/winsup/cygwin/include/cygwin/sysproto.h deleted file mode 100644 index cea8a023b..000000000 --- a/winsup/cygwin/include/cygwin/sysproto.h +++ /dev/null @@ -1,94 +0,0 @@ -/* cygwin/sysproto.h - - Copyright 2003 Red Hat, Inc. - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -/* cygwin/sysproto.h header file for Cygwin. */ - -#ifndef _CYGWIN_SYSPROTO_H -#define _CYGWIN_SYSPROTO_H -#define _SYS_SYSPROTO_H_ /* Keep it, used by BSD files */ - -#ifdef __cplusplus -extern "C" { -#endif - -#include <sys/types.h> - -struct msgctl_args { - int msqid; - int cmd; - struct msqid_ds *buf; -}; - -struct msgget_args { - key_t key; - int msgflg; -}; - -struct msgrcv_args { - int msqid; - void *msgp; - size_t msgsz; - long msgtyp; - int msgflg; -}; - -struct msgsnd_args { - int msqid; - const void *msgp; - size_t msgsz; - int msgflg; -}; - -struct semctl_args { - int semid; - int semnum; - int cmd; - union semun *arg; -}; - -struct semget_args { - key_t key; - int nsems; - int semflg; -}; - -struct semop_args { - int semid; - struct sembuf *sops; - size_t nsops; -}; - -struct shmat_args { - int shmid; - const void *shmaddr; - int shmflg; -}; - -struct shmctl_args { - int shmid; - int cmd; - struct shmid_ds *buf; -}; - -struct shmdt_args { - const void *shmaddr; -}; - -struct shmget_args { - key_t key; - size_t size; - int shmflg; -}; - -#ifdef __cplusplus -} -#endif - -#endif /* _CYGWIN_SYSPROTO_H */ diff --git a/winsup/cygwin/include/cygwin/time.h b/winsup/cygwin/include/cygwin/time.h deleted file mode 100644 index d1b7670bc..000000000 --- a/winsup/cygwin/include/cygwin/time.h +++ /dev/null @@ -1,40 +0,0 @@ -/* time.h - - Copyright 2005, 2007 Red Hat Inc. - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifndef _CYGWIN_TIME_H -#define _CYGWIN_TIME_H -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Not defined in main time.h */ -int __cdecl clock_setres (clockid_t, struct timespec *); - -/* GNU extensions. */ -time_t __cdecl timelocal (struct tm *); -time_t __cdecl timegm (struct tm *); - -#define TIMER_RELTIME 0 /* For compatibility with HP/UX, Solaris, others? */ - -#ifndef __STRICT_ANSI__ - -extern int daylight __asm__ ("__daylight"); - -#ifndef __timezonefunc__ -extern long timezone __asm__ ("__timezone"); -#endif - -#endif /*__STRICT_ANSI__*/ - -#ifdef __cplusplus -} -#endif -#endif /*_CYGWIN_TIME_H*/ diff --git a/winsup/cygwin/include/cygwin/types.h b/winsup/cygwin/include/cygwin/types.h deleted file mode 100644 index cbb4b4492..000000000 --- a/winsup/cygwin/include/cygwin/types.h +++ /dev/null @@ -1,228 +0,0 @@ -/* types.h - - Copyright 2001, 2002, 2003, 2005, 2006, 2010, 2011 Red Hat Inc. - Written by Robert Collins <rbtcollins@hotmail.com> - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#ifndef _CYGWIN_TYPES_H -#define _CYGWIN_TYPES_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include <stdint.h> -#include <endian.h> - -#ifndef __timespec_t_defined -#define __timespec_t_defined -typedef struct timespec timespec_t; -#endif /*__timespec_t_defined*/ - -#ifndef __timestruc_t_defined -#define __timestruc_t_defined -typedef struct timespec timestruc_t; -#endif /*__timestruc_t_defined*/ - -#ifndef __off_t_defined -#define __off_t_defined -typedef _off64_t off_t; -#endif /*__off_t_defined*/ - -typedef __loff_t loff_t; - -#ifndef __dev_t_defined -#define __dev_t_defined -typedef short __dev16_t; -typedef unsigned long __dev32_t; -typedef __dev32_t dev_t; -#endif /*__dev_t_defined*/ - -#ifndef __blksize_t_defined -#define __blksize_t_defined -typedef long blksize_t; -#endif /*__blksize_t_defined*/ - -#ifndef __blkcnt_t_defined -#define __blkcnt_t_defined -typedef long __blkcnt32_t; -typedef long long __blkcnt64_t; -typedef __blkcnt64_t blkcnt_t; -#endif /*__blkcnt_t_defined*/ - -#ifndef __fsblkcnt_t_defined -#define __fsblkcnt_t_defined -typedef unsigned long fsblkcnt_t; -#endif /* __fsblkcnt_t_defined */ - -#ifndef __fsfilcnt_t_defined -#define __fsfilcnt_t_defined -typedef unsigned long fsfilcnt_t; -#endif /* __fsfilcnt_t_defined */ - -#ifndef __uid_t_defined -#define __uid_t_defined -typedef unsigned short __uid16_t; -typedef unsigned long __uid32_t; -typedef __uid32_t uid_t; -#endif /*__uid_t_defined*/ - -#ifndef __gid_t_defined -#define __gid_t_defined -typedef unsigned short __gid16_t; -typedef unsigned long __gid32_t; -typedef __gid32_t gid_t; -#endif /*__gid_t_defined*/ - -#ifndef __ino_t_defined -#define __ino_t_defined -typedef unsigned long __ino32_t; -typedef unsigned long long __ino64_t; -typedef __ino64_t ino_t; -#endif /*__ino_t_defined*/ - -/* Generic ID type, must match at least pid_t, uid_t and gid_t in size. */ -#ifndef __id_t_defined -#define __id_t_defined -typedef unsigned long id_t; -#endif /* __id_t_defined */ - -#if defined (__INSIDE_CYGWIN__) -struct __flock32 { - short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */ - short l_whence; /* flag to choose starting offset */ - _off_t l_start; /* relative offset, in bytes */ - _off_t l_len; /* length, in bytes; 0 means lock to EOF */ - short l_pid; /* returned with F_GETLK */ - short l_xxx; /* reserved for future use */ -}; - -struct __flock64 { - short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */ - short l_whence; /* flag to choose starting offset */ - _off64_t l_start; /* relative offset, in bytes */ - _off64_t l_len; /* length, in bytes; 0 means lock to EOF */ - pid_t l_pid; /* returned with F_GETLK */ -}; -#endif - -struct flock { - short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */ - short l_whence; /* flag to choose starting offset */ - off_t l_start; /* relative offset, in bytes */ - off_t l_len; /* length, in bytes; 0 means lock to EOF */ - pid_t l_pid; /* returned with F_GETLK */ -}; - -#ifndef __key_t_defined -#define __key_t_defined -typedef long long key_t; -#endif /* __key_t_defined */ - -#ifndef __BIT_TYPES_DEFINED -#define __BIT_TYPES_DEFINED__ 1 - -#ifndef __vm_offset_t_defined -#define __vm_offset_t_defined -typedef unsigned long vm_offset_t; -#endif /*__vm_offset_t_defined*/ - -#ifndef __vm_size_t_defined -#define __vm_size_t_defined -typedef unsigned long vm_size_t; -#endif /*__vm_size_t_defined*/ - -#ifndef __vm_object_t_defined -#define __vm_object_t_defined -typedef void *vm_object_t; -#endif /* __vm_object_t_defined */ - -#ifndef __u_int8_t_defined -#define __u_int8_t_defined -typedef unsigned char u_int8_t; -#endif -#ifndef __u_int16_t_defined -#define __u_int16_t_defined -typedef __uint16_t u_int16_t; -#endif -#ifndef __u_int32_t_defined -#define __u_int32_t_defined -typedef __uint32_t u_int32_t; -#endif -#ifndef __u_int64_t_defined -#define __u_int64_t_defined -typedef __uint64_t u_int64_t; -#endif - -#ifndef __register_t_defined -#define __register_t_defined -typedef __int32_t register_t; -#endif - -#ifndef __addr_t_defined -#define __addr_t_defined -typedef char *addr_t; -#endif - -#ifndef __mode_t_defined -#define __mode_t_defined -typedef unsigned mode_t; -#endif -#endif /*__BIT_TYPES_DEFINED*/ - -#if !defined(__INSIDE_CYGWIN__) || !defined(__cplusplus) - -typedef struct __pthread_t {char __dummy;} *pthread_t; -typedef struct __pthread_mutex_t {char __dummy;} *pthread_mutex_t; - -typedef struct __pthread_key_t {char __dummy;} *pthread_key_t; -typedef struct __pthread_attr_t {char __dummy;} *pthread_attr_t; -typedef struct __pthread_mutexattr_t {char __dummy;} *pthread_mutexattr_t; -typedef struct __pthread_condattr_t {char __dummy;} *pthread_condattr_t; -typedef struct __pthread_cond_t {char __dummy;} *pthread_cond_t; - - /* These variables are not user alterable. This means you!. */ -typedef struct -{ - pthread_mutex_t mutex; - int state; -} -pthread_once_t; -typedef struct __pthread_spinlock_t {char __dummy;} *pthread_spinlock_t; -typedef struct __pthread_rwlock_t {char __dummy;} *pthread_rwlock_t; -typedef struct __pthread_rwlockattr_t {char __dummy;} *pthread_rwlockattr_t; - -#else - -/* pthreads types */ - -typedef class pthread *pthread_t; -typedef class pthread_mutex *pthread_mutex_t; -typedef class pthread_key *pthread_key_t; -typedef class pthread_attr *pthread_attr_t; -typedef class pthread_mutexattr *pthread_mutexattr_t; -typedef class pthread_condattr *pthread_condattr_t; -typedef class pthread_cond *pthread_cond_t; -typedef class pthread_once pthread_once_t; -typedef class pthread_spinlock *pthread_spinlock_t; -typedef class pthread_rwlock *pthread_rwlock_t; -typedef class pthread_rwlockattr *pthread_rwlockattr_t; - -/* semaphores types */ -typedef class semaphore *sem_t; -#endif /* __INSIDE_CYGWIN__ */ - -/* this header needs the dev_t typedef */ -#include <sys/sysmacros.h> - -#ifdef __cplusplus -} -#endif - -#endif /* _CYGWIN_TYPES_H */ diff --git a/winsup/cygwin/include/cygwin/utmp.h b/winsup/cygwin/include/cygwin/utmp.h deleted file mode 100644 index 56a137ffe..000000000 --- a/winsup/cygwin/include/cygwin/utmp.h +++ /dev/null @@ -1,40 +0,0 @@ -/* cygwin/utmp.h - - Copyright 2004 Red Hat, Inc. - - This software is a copyrighted work licensed under the terms of the - Cygwin license. Please consult the file "CYGWIN_LICENSE" for - details. */ - -#ifndef CYGWIN_UTMP_H -#define CYGWIN_UTMP_H - -#include <sys/types.h> -#include <time.h> -#include <paths.h> - -#define WTMP_FILE _PATH_WTMP - -#ifdef __cplusplus -extern "C" { -#endif - -#define UT_LINESIZE 16 -#define UT_NAMESIZE 16 -#define UT_HOSTSIZE 256 -#define UT_IDLEN 2 - -#define RUN_LVL 1 -#define BOOT_TIME 2 -#define NEW_TIME 3 -#define OLD_TIME 4 - -#define INIT_PROCESS 5 -#define LOGIN_PROCESS 6 -#define USER_PROCESS 7 -#define DEAD_PROCESS 8 - -#ifdef __cplusplus -} -#endif -#endif /* CYGWIN_UTMP_H */ diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h deleted file mode 100644 index db9a18b4d..000000000 --- a/winsup/cygwin/include/cygwin/version.h +++ /dev/null @@ -1,501 +0,0 @@ -/* version.h -- Cygwin version numbers and accompanying documentation. - - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. - -This file is part of Cygwin. - -This software is a copyrighted work licensed under the terms of the -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -/* Cygwin versioning is relatively complicated because of its status - as a shared library. Let's start with how versioning used to be done. - - Historical versioning in Cygwin 16.0 to 19.5: - - In the olden days of Cygwin, we had a dll major and minor version - and a registry version. The major number started at 16 because the - "b15" GNU-Win32 release of the compiler tools was out when this - scheme was started. We incremented the DLL name frequently (for - every official release) and towards the end of this period every - release used a different shared memory area to prevent DLLs from - interfering with each other (embedding a build timestamp into the - name of the shared memory area). This turned out to be a Bad Idea - (tm) because people needed to mingle separate releases and have - them work together more than we thought they would. This was - especially problematic when tty info needed to be retained when an - old Cygwin executable executed a newer one. - - In the old scheme, we incremented the major number whenever a - change to the dll invalidated existing executables. This can - happen for a number of reasons, including when functions are - removed from the export list of the dll. The minor number was - incremented when a change was made that we wanted to record, but - that didn't invalidate existing executables. Both numbers were - recorded in the executable and in the dll. - - In October 1998 (starting with Cygwin 19.6), we started a new method - of Cygwin versioning: */ - - /* The DLL major and minor numbers correspond to the "version of - the Cygwin shared library". This version is used to track important - changes to the DLL and is mainly informative in nature. */ - -#define CYGWIN_VERSION_DLL_MAJOR 1007 -#define CYGWIN_VERSION_DLL_MINOR 10 - - /* Major numbers before CYGWIN_VERSION_DLL_EPOCH are - incompatible. */ - -#define CYGWIN_VERSION_DLL_EPOCH 19 - - /* CYGWIN_VERSION_DLL_COMBINED gives us a single number - representing the combined DLL major and minor numbers. */ - - /* WATCH OUT FOR OCTAL! Don't use, say, "00020" for 0.20 */ - -#define CYGWIN_VERSION_DLL_MAKE_COMBINED(maj, min) (((maj) * 1000) + min) -#define CYGWIN_VERSION_DLL_COMBINED \ - CYGWIN_VERSION_DLL_MAKE_COMBINED (CYGWIN_VERSION_DLL_MAJOR, CYGWIN_VERSION_DLL_MINOR) - - /* Every version of cygwin <= this uses an old, incorrect method - to determine signal masks. */ - -#define CYGWIN_VERSION_PER_PROCESS_API_VERSION_COMBINED(u) \ - CYGWIN_VERSION_DLL_MAKE_COMBINED ((u)->api_major, (u)->api_minor) - -#define CYGWIN_VERSION_USER_API_VERSION_COMBINED \ - CYGWIN_VERSION_PER_PROCESS_API_VERSION_COMBINED (user_data) - - /* API versions <= this had a termios structure whose members were - too small to accomodate modern settings. */ -#define CYGWIN_VERSION_DLL_OLD_TERMIOS 5 -#define CYGWIN_VERSION_DLL_IS_OLD_TERMIOS \ - (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= CYGWIN_VERSION_DLL_OLD_TERMIOS) - -#define CYGWIN_VERSION_DLL_MALLOC_ENV 28 - /* Old APIs had getc/putc macros that conflict with new CR/LF - handling in the stdio buffers */ -#define CYGWIN_VERSION_OLD_STDIO_CRLF_HANDLING \ - (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 20) - -#define CYGWIN_VERSION_CHECK_FOR_S_IEXEC \ - (CYGWIN_VERSION_USER_API_VERSION_COMBINED >= 36) - -#define CYGWIN_VERSION_CHECK_FOR_OLD_O_NONBLOCK \ - (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 28) - -#define CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES \ - (CYGWIN_VERSION_USER_API_VERSION_COMBINED >= 79) - -#define CYGWIN_VERSION_CHECK_FOR_USING_ANCIENT_MSGHDR \ - (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 138) - -#define CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES \ - (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 138) - -#define CYGWIN_VERSION_CHECK_FOR_OLD_IFREQ \ - (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 161) - -#define CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE \ - (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 209) - -#define CYGWIN_VERSION_USE_PSEUDO_RELOC_IN_DLL(u) \ - (CYGWIN_VERSION_PER_PROCESS_API_VERSION_COMBINED (u) >= 227) - -#define CYGWIN_VERSION_CYGWIN_CONV 181 - - /* API_MAJOR 0.0: Initial version. API_MINOR changes: - 1: Export cygwin32_ calls as cygwin_ as well. - 2: Export j1, jn, y1, yn. - 3: Export dll_noncygwin_dllcrt0. - 4: New socket ioctls, revamped ifconf support. - 5: Thread support/exports. - 6: Change in termios handling. - 7: Export scandir and alphasort. - 8: Export _ctype_, _sys_errlist, _sys_nerr. - 9: Mount-related changes, new cygwin_umount export. - Raw device support (tape, floppies). - 10: Fast math routine support added. - 11: Export seekdir, telldir. - 12: Export pthread_join, pthread_detach. - 13: Export math funcs gamma and friends, also _j0, _j1, etc. - 14: Export snprintf and vnsprintf. - 15: Export glob - 16: Export cygwin_stackdump - 17: Export fast math stuff - 18: Stop exporting _strace_wm - 19: Export fchown, lchown, lacl - 20: regsub, inet_network - 21: incompatible change to stdio cr/lf and buffering - 22: Export cygwin_logon_user, cygwin_set_impersonation_token. - geteuid, getegid return effective uid/gid. - getuid, getgid return real uid/gid. - seteuid, setegid set only effective uid/gid. - setuid, setgid set effective and real uid/gid. - 23: Export new dll_crt0 interface and cygwin_user_data for use - with crt0 startup code. - 24: Export poll and _poll. - 25: Export getmode and _getmode. - 26: CW_GET_CYGDRIVE_PREFIXES addition to external.cc - 27: CW_GETPINFO_FULL addition to external.cc - 28: Accidentally bumped by cgf - 29: Export hstrerror - 30: CW_GET_CYGDRIVE_INFO addition to external.cc - 31: Export inet_aton - 32: Export getrlimit/setrlimit - 33: Export setlogmask - 34: Separated out mount table - 35: Export drand48, erand48, jrand48, lcong48, lrand48, - mrand48, nrand48, seed48, and srand48. - 36: Added _cygwin_S_IEXEC, et al - 37: [f]pathconv support _PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY - 38: vscanf, vscanf_r, and random pthread functions - 39: asctime_r, ctime_r, gmtime_r, localtime_r - 40: fchdir - 41: __signgam - 42: sys_errlist, sys_nerr - 43: sigsetjmp, siglongjmp fixed - 44: Export dirfd - 45: perprocess change, gamma_r, gammaf_r, lgamma_r, lgammaf_r - 46: Remove cygwin_getshared - 47: Report EOTWarningZoneSize in struct mtget. - 48: Export "posix" regex functions - 49: Export setutent, endutent, utmpname, getutent, getutid, getutline. - 50: Export fnmatch. - 51: Export recvmsg, sendmsg. - 52: Export strptime - 53: Export strlcat, strlcpy. - 54: Export __fpclassifyd, __fpclassifyf, __signbitd, __signbitf. - 55: Export fcloseall, fcloseall_r. - 56: Make ntsec on by default. - 57: Export setgroups. - 58: Export memalign, valloc, malloc_trim, malloc_usable_size, mallopt, - malloc_stats - 59: getsid - 60: MSG_NOSIGNAL - 61: Export getc_unlocked, getchar_unlocked, putc_unlocked, - putchar_unlocked - 62: Erroneously bumped - 63: Export pututline - 64: Export fseeko, ftello - 65: Export siginterrupt - 66: Export nl_langinfo - 67: Export pthread_getsequence_np - 68: Export netdb stuff - 69: Export strtof - 70: Export asprintf, _asprintf_r, vasprintf, _vasprintf_r - 71: Export strerror_r - 72: Export nanosleep - 73: Export setreuid32, setreuid, setregid32, setregid - 74: Export _strtold a64l hcreate hcreate_r hdestroy hdestroy_r hsearch - hsearch_r isblank iswalnum iswalpha iswblank iswcntrl iswctype - iswdigit iswgraph iswlower iswprint iswpunct iswspace iswupper - iswxdigit l64a mbrlen mbrtowc mbsinit mbsrtowcs mempcpy - on_exit setbuffer setlinebuf strndup strnlen tdelete tdestroy - tfind towctrans towlower towupper tsearch twalk wcrtomb wcscat - wcschr wcscpy wcscspn wcslcat wcslcpy wcsncat wcsncmp wcsncpy - wcspbrk wcsrchr wcsrtombs wcsspn wcsstr wctob wctob wctrans - wctype wmemchr wmemcmp wmemcpy wmemmove wmemset - 75: Export exp2 exp2f fdim fdimf fma fmaf fmax fmaxf fmin fminf lrint - lrintf lround lroundf nearbyint nearbyintf remquo remquof - round roundf scalbln scalblnf sincos sincosf tgamma tgammaf - truncf - 76: mallinfo - 77: thread-safe exit/at_exit - 78: Use stat and fstat rather than _stat, and _fstat. - Export btowc and trunc. - 79: Export acl32 aclcheck32 aclfrommode32 aclfrompbits32 aclfromtext32 - aclsort32 acltomode32 acltopbits32 acltotext32 facl32 - fgetpos64 fopen64 freopen64 fseeko64 fsetpos64 ftello64 - _open64 _lseek64 _fstat64 _stat64 mknod32 - 80: Export pthread_rwlock stuff - 81: CW_CHECK_NTSEC addition to external.cc - 82: Export wcscoll wcswidth wcwidth - 83: Export gethostid - 84: Pty open allocates invisible console. 64 bit interface - 85: Export new 32/64 functions from API 0.79 only with leading - underscore. No problems with backward compatibility since no - official release has been made so far. This change removes - exported symbols like fopen64, which might confuse configure. - 86: Export ftok - 87: Export vsyslog - 88: Export _getreent - 89: Export __mempcpy - 90: Export _fopen64 - 91: Export argz_add argz_add_sep argz_append argz_count argz_create - argz_create_sep argz_delete argz_extract argz_insert - argz_next argz_replace argz_stringify envz_add envz_entry - envz_get envz_merge envz_remove envz_strip - 92: Export getusershell, setusershell, endusershell - 93: Export daemon, forkpty, openpty, iruserok, ruserok, login_tty, - openpty, forkpty, revoke, logwtmp, updwtmp - 94: Export getopt, getopt_long, optarg, opterr, optind, optopt, - optreset, __check_rhosts_file, __rcmd_errstr. - 95: Export shmat, shmctl, shmdt, shmget. - 96: CW_GET_ERRNO_FROM_WINERROR addition to external.cc - 97: Export sem_open, sem_close, sem_timedwait, sem_getvalue. - 98: Export _tmpfile64. - 99: CW_GET_POSIX_SECURITY_ATTRIBUTE addition to external.cc. - 100: CW_GET_SHMLBA addition to external.cc. - 101: Export err, errx, verr, verrx, warn, warnx, vwarn, vwarnx. - 102: CW_GET_UID_FROM_SID and CW_GET_GID_FROM_SID addition to external.cc. - 103: Export getprogname, setprogname. - 104: Export msgctl, msgget, msgrcv, msgsnd, semctl, semget, semop. - 105: Export sigwait. - 106: Export flock. - 107: Export fcntl64. - 108: Remove unused (hopefully) reent_data export. - 109: Oh well. Someone uses reent_data. - 110: Export clock_gettime, sigwaitinfo, timer_create, timer_delete, - timer_settime - 111: Export sigqueue, sighold. - 112: Redefine some mtget fields. - 113: Again redefine some mtget fields. Use mt_fileno and mt_blkno as - on Linux. - 114: Export rand_r, ttyname_r. - 115: Export flockfile, ftrylockfile, funlockfile, getgrgid_r, getgrnam_r, - getlogin_r. - 116: Export atoll. - 117: Export utmpx functions, Return utmp * from pututent. - 118: Export getpriority, setpriority. - 119: Export fdatasync. - 120: Export basename, dirname. - 122: Export statvfs, fstatvfs. - 123: Export utmpxname. - 124: Add MAP_AUTOGROW flag to mmap. - 125: LD_PRELOAD/CW_HOOK available. - 126: Export lsearch, lfind, timer_gettime. - 127: Export sigrelese. - 128: Export pselect. - 129: Export mkdtemp. - 130: Export strtoimax, strtoumax, llabs, imaxabs, lldiv, imaxdiv. - 131: Export inet_ntop, inet_pton. - 132: Add GLOB_LIMIT flag to glob. - 133: Export __getline, __getdelim. - 134: Export getline, getdelim. - 135: Export pread, pwrite - 136: Add TIOCMBIS/TIOCMBIC ioctl codes. - 137: fts_children, fts_close, fts_get_clientptr, fts_get_stream, - fts_open, fts_read, fts_set, fts_set_clientptr, ftw, nftw. - 138: Export readdir_r. - 139: Start using POSIX definition of struct msghdr and WinSock2 - IPPROTO_IP values. - 140: Export mlock, munlock. - 141: Export futimes, lutimes. - 142: Export memmem - 143: Export clock_getres, clock_setres - 144: Export timelocal, timegm. - 145: Add MAP_NORESERVE flag to mmap. - 146: Change SI_USER definition. FIXME: Need to develop compatibility - macro for this? - 147: Eliminate problematic d_ino from dirent structure. unsetenv now - returns int, as per linux. - 148: Add open(2) flags O_SYNC, O_RSYNC, O_DSYNC and O_DIRECT. - 149: Add open(2) flag O_NOFOLLOW. - 150: Export getsubopt. - 151: Export __opendir_with_d_ino - 152: Revert to having d_ino in dirent unconditionally. - 153: Export updwtmpx, Implement CW_SETUP_WINENV. - 154: Export sigset, sigignore. - 155: Export __isinff, __isinfd, __isnanf, __isnand. - 156: Export __srbuf_r, __swget_r. - 157: Export gai_strerror, getaddrinfo, getnameinfo, freeaddrinfo, - in6addr_any, in6addr_loopback. - 158: Export bindresvport, bindresvport_sa, iruserok_sa, rcmd_af, - rresvport_af. - 159: Export posix_openpt. - 160: Export posix_fadvise, posix_fallocate. - 161: Export resolver functions. - 162: New struct ifreq. Export if_nametoindex, if_indextoname, - if_nameindex, if_freenameindex. - 163: Export posix_madvise, posix_memalign. - 164: Export shm_open, shm_unlink. - 165: Export mq_close, mq_getattr, mq_notify, mq_open, mq_receive, - mq_send, mq_setattr, mq_timedreceive, mq_timedsend, mq_unlink. - 166: Export sem_unlink. - 167: Add st_birthtim to struct stat. - 168: Export asnprintf, dprintf, _Exit, vasnprintf, vdprintf. - 169: Export confstr. - 170: Export insque, remque. - 171: Export exp10, exp10f, pow10, pow10f, strcasestr, funopen, - fopencookie. - 172: Export getifaddrs, freeifaddrs. - 173: Export __assert_func. - 174: Export stpcpy, stpncpy. - 175: Export fdopendir. - 176: Export wcstol, wcstoll, wcstoul, wcstoull, wcsxfrm. - 177: Export sys_sigabbrev - 178: Export wcpcpy, wcpncpy. - 179: Export _f_llrint, _f_llrintf, _f_llrintl, _f_lrint, _f_lrintf, - _f_lrintl, _f_rint, _f_rintf, _f_rintl, llrint, llrintf, llrintl, - rintl, lrintl, and redirect exports of lrint, lrintf, rint, rintf. - 180: Export getxattr, lgetxattr, fgetxattr, listxattr, llistxattr, - flistxattr, setxattr, lsetxattr, fsetxattr, removexattr, - lremovexattr, fremovexattr. - 181: Export cygwin_conv_path, cygwin_create_path, cygwin_conv_path_list. - 182: Export lockf. - FIXME: Removed 12 year old and entirely wrong wprintf function at - this point. We need a working implementation soon. - 183: Export open_memstream, fmemopen. - 184: Export openat, faccessat, fchmodat, fchownat, fstatat, futimesat, - linkat, mkdirat, mkfifoat, mknodat, readlinkat, renameat, symlinkat, - unlinkat. - 185: Export futimens, utimensat. - 186: Remove ancient V8 regexp functions. Also eliminate old crt0 interface - which provided its own user_data structure. - 187: Export cfmakeraw. - 188: Export CW_SET_PRIV_KEY. - 189: Implement dirent.d_type. - 190: Export fgetwc, fgetws, fputwc, fputws, fwide, getwc, getwchar, - putwc, putwchar, ungetwc. - 191: Export glob_pattern_p - 192: CW_SETERRNO added - 193: Export wcstok. - 194: fcntl.h flags O_DIRECTORY, O_EXEC and O_SEARCH added. - 195: Export wcstod, wcstof. - 196: Export wcsnlen. - 197: Export wcstoimax, wcstoumax. - 198: Export reallocf. - 199: Export open_wmemstream. - 200: Export mbsnrtowcs, wcsnrtombs. - 201: Export wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf. - 202: Export gethostbyname2. - 203: Export wcsftime. - 204: recv/send flag MSG_DONTWAIT added. - 205: Export wscanf, fwscanf, swscanf, vwscanf, vfwscanf, vswscanf. - 206: Export wcscasecmp, wcsncasecmp. - 207: Export wcsdup. - 208: Export log2, log2f. - 209: Export wordexp, wordfree. - 210: New ctype layout using variable ctype pointer. Export __ctype_ptr__. - 211: Export fpurge, mkstemps. - 212: Add and export libstdc++ malloc wrappers. - 213: Export canonicalize_file_name, eaccess, euidaccess. - 214: Export execvpe, fexecve. - 215: CW_EXIT_PROCESS added. - 216: CW_SET_EXTERNAL_TOKEN added. - 217: CW_GET_INSTKEY added. - 218: Export get_nprocs, get_nprocs_conf, get_phys_pages, get_avphys_pages. - 219: Export dup3, pipe2, O_CLOEXEC, F_DUPFD_CLOEXEC. - 220: Export accept4, SOCK_CLOEXEC, SOCK_NONBLOCK. - 221: Export strfmon. - 222: CW_INT_SETLOCALE added. - 223: SIGPWR added. - 224: Export xdr* functions. - 225: Export __xdr* functions. - 226: Export __locale_mb_cur_max. - 227: Add pseudo_reloc_start, pseudo_reloc_end, image_base to per_process. - 228: CW_STRERROR added. - 229: Add mkostemp, mkostemps. - 230: Add CLOCK_MONOTONIC. - 231: Add fenv.h functions. - 232: Export cacos, cacosf, cacosh, cacoshf, carg, cargf, casin, casinf, - casinh, casinhf, catan, catanf, catanh, catanhf, ccos, ccosf, ccosh, - ccoshf, cexp, cexpf, cimag, cimagf, clog, clogf, conj, conjf, cpow, - cpowf, cproj, cprojf, creal, crealf, csin, csinf, csinh, csinhf, - csqrt, csqrtf, ctan, ctanf, ctanh, ctanhf. - 233: Add TIOCGPGRP, TIOCSPGRP. Export llround, llroundf. - 234: Export program_invocation_name, program_invocation_short_name. - 235: Export madvise. - 236: Export pthread_yield, __xpg_strerror_r. - 237: Export strchrnul. - 238: Export pthread_spin_destroy, pthread_spin_init, pthread_spin_lock, - pthread_spin_trylock, pthread_spin_unlock. - 239: Export pthread_setschedprio. - 240: Export ppoll. - 241: Export pthread_attr_getstack, pthread_attr_getstackaddr, - pthread_getattr_np. - 242: Export psiginfo, psignal, sys_siglist. - 243: Export sysinfo. - 244: Export clock_settime. - 245: Export pthread_attr_getguardsize, pthread_attr_setguardsize, - pthread_attr_setstack, pthread_attr_setstackaddr. - 246: Add CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID. - Export clock_getcpuclockid, pthread_getcpuclockid. - 247: Export error, error_at_line, error_message_count, error_one_per_line, - error_print_progname. - 248: Export __fpurge. - 249: Export pthread_condattr_getclock, pthread_condattr_setclock. - 250: Export clock_nanosleep. - 251: RTLD_NODELETE, RTLD_NOLOAD, RTLD_DEEPBIND added. - 252: CW_CVT_ENV_TO_WINENV added. - 253: Export TIOCSCTTY, tcgetsid. - 254: Export getgrouplist. - 255: Export ptsname_r. - */ - - /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */ - -#define CYGWIN_VERSION_API_MAJOR 0 -#define CYGWIN_VERSION_API_MINOR 255 - - /* There is also a compatibity version number associated with the - shared memory regions. It is incremented when incompatible - changes are made to the shared memory region *or* to any named - shared mutexes, semaphores, etc. The arbitrary starting - version was 0 (cygwin release 98r2). - Bump to 4 since this hasn't been rigorously updated in a - while. */ - -#define CYGWIN_VERSION_SHARED_DATA 5 - - /* An identifier used in the names used to create shared objects. - The full names include the CYGWIN_VERSION_SHARED_DATA version - as well as this identifier. */ - -#define CYGWIN_VERSION_DLL_IDENTIFIER "cygwin1" - - /* The Cygwin mount table interface in the Win32 registry also - has a version number associated with it in case that is - changed in a non-backwards compatible fashion. Increment this - version number whenever incompatible changes in mount table - registry usage are made. - - 1: Original number version. - 2: New mount registry layout, system-wide mount accessibility. - 3: The mount table is not in the registry anymore, but in /etc/fstab. - */ - -#define CYGWIN_VERSION_MOUNT_REGISTRY 3 - - /* Identifiers used in the Win32 registry. */ - -#define CYGWIN_INFO_CYGWIN_REGISTRY_NAME "Cygwin" -#define CYGWIN_INFO_PROGRAM_OPTIONS_NAME "Program Options" -#define CYGWIN_INFO_INSTALLATIONS_NAME "Installations" - - /* The default cygdrive prefix. */ - -#define CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX "/cygdrive" - - /* In addition to the above version number strings, the build - process adds some strings that may be useful in - debugging/identifying a particular Cygwin DLL: - - The mkvers.sh script at the top level produces a .cc file - which initializes a cygwin_version structure based on the - above version information and creates a string table for - grepping via "fgrep '%%%' cygwinwhatever.dll" if you are - using GNU grep. Otherwise you may want to do a - "strings cygwinwhatever.dll | fgrep '%%%'" instead. - - This will produce output such as: - - %%% Cygwin dll_identifier: cygwin - %%% Cygwin api_major: 0 - %%% Cygwin api_minor: 0 - %%% Cygwin dll_major: 19 - %%% Cygwin dll_minor: 6 - %%% Cygwin shared_data: 1 - %%% Cygwin registry: b15 - %%% Cygwin build date: Wed Oct 14 16:26:51 EDT 1998 - %%% Cygwin shared id: cygwinS1 - - This information can also be obtained through a call to - cygwin_internal (CW_GETVERSIONINFO). - */ - -#define CYGWIN_VERSION_MAGIC(a, b) ((unsigned) ((((unsigned short) a) << 16) | (unsigned short) b)) -#define CYGWIN_VERSION_MAGIC_VERSION(a) ((unsigned) ((unsigned)a & 0xffff)) diff --git a/winsup/cygwin/include/cygwin/wait.h b/winsup/cygwin/include/cygwin/wait.h deleted file mode 100644 index 0f3f76365..000000000 --- a/winsup/cygwin/include/cygwin/wait.h +++ /dev/null @@ -1,41 +0,0 @@ -/* cygwin/wait.h - - Copyright 2006, 2009, 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 _CYGWIN_WAIT_H -#define _CYGWIN_WAIT_H - -#define WNOHANG 1 -#define WUNTRACED 2 -#define WCONTINUED 8 -#define __W_CONTINUED 0xffff - -/* Will be redefined in sys/wait.h. */ -#define __wait_status_to_int(w) (w) - -/* A status is 16 bits, and looks like: - <1 byte info> <1 byte code> - - <code> == 0, child has exited, info is the exit value - <code> == 1..7e, child has exited, info is the signal number. - <code> == 7f, child has stopped, info was the signal number. - <code> == 80, there was a core dump. -*/ - -#define WIFEXITED(w) ((__wait_status_to_int(w) & 0xff) == 0) -#define WIFSIGNALED(w) ((__wait_status_to_int(w) & 0x7f) > 0 \ - && ((__wait_status_to_int(w) & 0x7f) < 0x7f)) -#define WIFSTOPPED(w) ((__wait_status_to_int(w) & 0xff) == 0x7f) -#define WIFCONTINUED(w) ((__wait_status_to_int(w) & 0xffff) == __W_CONTINUED) -#define WEXITSTATUS(w) ((__wait_status_to_int(w) >> 8) & 0xff) -#define WTERMSIG(w) (__wait_status_to_int(w) & 0x7f) -#define WSTOPSIG WEXITSTATUS -#define WCOREDUMP(w) (WIFSIGNALED(w) && (__wait_status_to_int(w) & 0x80)) - -#endif /* _CYGWIN_WAIT_H */ |