From 5ab123f4aa7cb23e78bc20b6a90bd14298949cd0 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 26 Nov 2012 13:28:53 +0000 Subject: [PATCH] * fhandler_registry.cc: Drop Mingw.org considerations. * fhandler_serial.cc: Ditto. * fhandler_socket.cc: Ditto. * fhandler_tape.cc: Ditto. * fhandler_tty.cc: Ditto. * net.cc: Ditto. * ntdll.h: Ditto. * sched.cc: Ditto. * sec_helper.cc: Ditto. --- winsup/cygwin/ChangeLog | 12 ++++++ winsup/cygwin/fhandler_registry.cc | 7 ---- winsup/cygwin/fhandler_serial.cc | 4 -- winsup/cygwin/fhandler_socket.cc | 11 ------ winsup/cygwin/fhandler_tape.cc | 4 -- winsup/cygwin/fhandler_tty.cc | 4 -- winsup/cygwin/net.cc | 63 ------------------------------ winsup/cygwin/ntdll.h | 25 +----------- winsup/cygwin/sched.cc | 4 -- winsup/cygwin/sec_helper.cc | 8 ---- 10 files changed, 14 insertions(+), 128 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index f77c46d67..1b2fa73e2 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,15 @@ +2012-11-26 Corinna Vinschen + + * fhandler_registry.cc: Drop Mingw.org considerations. + * fhandler_serial.cc: Ditto. + * fhandler_socket.cc: Ditto. + * fhandler_tape.cc: Ditto. + * fhandler_tty.cc: Ditto. + * net.cc: Ditto. + * ntdll.h: Ditto. + * sched.cc: Ditto. + * sec_helper.cc: Ditto. + 2012-11-23 Christopher Faylor * configure.in: Remove unneeded ALLOC substitution. diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc index 787922962..95c016f52 100644 --- a/winsup/cygwin/fhandler_registry.cc +++ b/winsup/cygwin/fhandler_registry.cc @@ -77,13 +77,6 @@ static const HKEY registry_keys[] = static const int ROOT_KEY_COUNT = sizeof (registry_keys) / sizeof (HKEY); -#ifndef __MINGW64_VERSION_MAJOR -extern "C" { - LONG WINAPI RegOpenUserClassesRoot (HANDLE, DWORD, REGSAM, PHKEY); - LONG WINAPI RegOpenCurrentUser (REGSAM, PHKEY); -}; -#endif - /* Make sure to access the correct per-user HKCR and HKCU hives, even if the current user is only impersonated in another user's session. */ static HKEY diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc index 96b4062f1..43eceb79d 100644 --- a/winsup/cygwin/fhandler_serial.cc +++ b/winsup/cygwin/fhandler_serial.cc @@ -19,12 +19,8 @@ details. */ #include "sigproc.h" #include "pinfo.h" #include -#ifdef __MINGW64_VERSION_MAJOR #include #include -#else -#include -#endif #include "cygwait.h" /**********************************************************************/ diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index b2816278f..f73e11c3b 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -1349,17 +1349,6 @@ fhandler_socket::readv (const struct iovec *const iov, const int iovcnt, return recv_internal (&wsamsg, false); } -extern "C" { -#ifndef __MINGW64_VERSION_MAJOR -#define WSAID_WSARECVMSG \ - {0xf689d7c8,0x6f1f,0x436b,{0x8a,0x53,0xe5,0x4f,0xe3,0x51,0xc3,0x22}}; -typedef int (WSAAPI *LPFN_WSARECVMSG)(SOCKET,LPWSAMSG,LPDWORD,LPWSAOVERLAPPED, - LPWSAOVERLAPPED_COMPLETION_ROUTINE); -#endif -int WSAAPI WSASendMsg(SOCKET,LPWSAMSG,DWORD,LPDWORD, LPWSAOVERLAPPED, - LPWSAOVERLAPPED_COMPLETION_ROUTINE); -}; - /* There's no DLL which exports the symbol WSARecvMsg. One has to call WSAIoctl as below to fetch the function pointer. Why on earth did the MS developers decide not to export a normal symbol for these extension diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc index 67d6f5c8d..136775434 100644 --- a/winsup/cygwin/fhandler_tape.cc +++ b/winsup/cygwin/fhandler_tape.cc @@ -15,12 +15,8 @@ details. */ #include #include #include -#ifdef __MINGW64_VERSION_MAJOR #include #include -#else -#include -#endif #include "security.h" #include "path.h" #include "fhandler.h" diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index dcbe8097d..032231ade 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1487,10 +1487,6 @@ fhandler_pty_slave::fixup_after_exec () fixup_after_fork (NULL); } -#ifndef __MINGW64_VERSION_MAJOR -extern "C" BOOL WINAPI GetNamedPipeClientProcessId (HANDLE, PULONG); -#endif - /* This thread function handles the master control pipe. It waits for a client to connect. Then it checks if the client process has permissions to access the tty handles. If so, it opens the client process and diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 1aa6b1c36..155c1a022 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -1525,69 +1525,6 @@ getdomainname (char *domain, size_t len) /* Fill out an ifconf struct. */ -#ifndef __MINGW64_VERSION_MAJOR - -/* Vista/Longhorn: unicast address has additional OnLinkPrefixLength member. */ -typedef struct _IP_ADAPTER_UNICAST_ADDRESS_LH { - _ANONYMOUS_UNION union { - ULONGLONG Alignment; - _ANONYMOUS_UNION struct { - ULONG Length; - DWORD Flags; - } DUMMYSTRUCTNAME; - } DUMMYUNIONNAME; - struct _IP_ADAPTER_UNICAST_ADDRESS_VISTA *Next; - SOCKET_ADDRESS Address; - IP_PREFIX_ORIGIN PrefixOrigin; - IP_SUFFIX_ORIGIN SuffixOrigin; - IP_DAD_STATE DadState; - ULONG ValidLifetime; - ULONG PreferredLifetime; - ULONG LeaseLifetime; - unsigned char OnLinkPrefixLength; -} IP_ADAPTER_UNICAST_ADDRESS_LH, *PIP_ADAPTER_UNICAST_ADDRESS_LH; - -/* Vista/Longhorn: IP_ADAPTER_ADDRESSES has a lot more info. We pick only - what we need for now. */ -typedef struct _IP_ADAPTER_ADDRESSES_LH { - _ANONYMOUS_UNION union { - ULONGLONG Alignment; - _ANONYMOUS_STRUCT struct { - ULONG Length; - DWORD IfIndex; - } DUMMYSTRUCTNAME; - } DUMMYUNIONNAME; - struct _IP_ADAPTER_ADDRESSES* Next; - PCHAR AdapterName; - PIP_ADAPTER_UNICAST_ADDRESS FirstUnicastAddress; - PIP_ADAPTER_ANYCAST_ADDRESS FirstAnycastAddress; - PIP_ADAPTER_MULTICAST_ADDRESS FirstMulticastAddress; - PIP_ADAPTER_DNS_SERVER_ADDRESS FirstDnsServerAddress; - PWCHAR DnsSuffix; - PWCHAR Description; - PWCHAR FriendlyName; - BYTE PhysicalAddress[MAX_ADAPTER_ADDRESS_LENGTH]; - DWORD PhysicalAddressLength; - DWORD Flags; - DWORD Mtu; - DWORD IfType; - IF_OPER_STATUS OperStatus; - DWORD Ipv6IfIndex; - DWORD ZoneIndices[16]; - PIP_ADAPTER_PREFIX FirstPrefix; - - ULONG64 TransmitLinkSpeed; - ULONG64 ReceiveLinkSpeed; - PVOID FirstWinsServerAddress; - PVOID FirstGatewayAddress; - ULONG Ipv4Metric; - ULONG Ipv6Metric; -} IP_ADAPTER_ADDRESSES_LH,*PIP_ADAPTER_ADDRESSES_LH; - -#define SIO_GET_INTERFACE_LIST _IOR('t', 127, u_long) - -#endif /* !__MINGW64_VERSION_MAJOR */ - #ifndef IN_LOOPBACK #define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000) #endif diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h index 2ca6a5ab3..489ff8ad2 100644 --- a/winsup/cygwin/ntdll.h +++ b/winsup/cygwin/ntdll.h @@ -11,11 +11,8 @@ #pragma once -#ifndef __MINGW64_VERSION_MAJOR -# include -#else -# include -#endif +#include + /* custom status code: */ #define STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION ((NTSTATUS) 0xe0000269) @@ -973,14 +970,6 @@ typedef struct _FILE_MAILSLOT_SET_INFORMATION typedef VOID NTAPI (*PIO_APC_ROUTINE)(PVOID, PIO_STATUS_BLOCK, ULONG); -#ifndef __MINGW64_VERSION_MAJOR -typedef enum _EVENT_TYPE -{ - NotificationEvent = 0, - SynchronizationEvent -} EVENT_TYPE, *PEVENT_TYPE; -#endif - typedef struct _EVENT_BASIC_INFORMATION { EVENT_TYPE EventType; @@ -1046,21 +1035,11 @@ typedef struct _KEY_VALUE_PARTIAL_INFORMATION UCHAR Data[1]; } KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION; -#ifndef __MINGW64_VERSION_MAJOR -typedef enum _TIMER_TYPE -{ - NotificationTimer, - SynchronisationTimer -} TIMER_TYPE, *PTIMER_TYPE; -#endif - -#ifdef __MINGW64_VERSION_MAJOR typedef enum _SECTION_INHERIT { ViewShare = 1, ViewUnmap = 2 } SECTION_INHERIT; -#endif typedef VOID (APIENTRY *PTIMER_APC_ROUTINE)(PVOID, ULONG, ULONG); diff --git a/winsup/cygwin/sched.cc b/winsup/cygwin/sched.cc index 27a2bb085..b7f6cc907 100644 --- a/winsup/cygwin/sched.cc +++ b/winsup/cygwin/sched.cc @@ -18,10 +18,6 @@ #include #include "registry.h" -#ifndef __MINGW64_VERSION_MAJOR -extern "C" HWND WINAPI GetForegroundWindow(); -#endif - /* Win32 priority to UNIX priority Mapping. For now, I'm just following the spec: any range of priorities is ok. There are probably many many issues with this... diff --git a/winsup/cygwin/sec_helper.cc b/winsup/cygwin/sec_helper.cc index 8ee979ba9..378a48135 100644 --- a/winsup/cygwin/sec_helper.cc +++ b/winsup/cygwin/sec_helper.cc @@ -25,10 +25,6 @@ details. */ #include "pwdgrp.h" #include "ntdll.h" -#ifndef __MINGW64_VERSION_MAJOR -#define SECURITY_NT_NON_UNIQUE SECURITY_NT_NON_UNIQUE_RID -#endif - /* General purpose security attribute objects for global use. */ SECURITY_ATTRIBUTES NO_COPY sec_none; SECURITY_ATTRIBUTES NO_COPY sec_none_nih; @@ -378,11 +374,7 @@ static const struct { { SE_CREATE_GLOBAL_NAME, false }, { SE_TRUSTED_CREDMAN_ACCESS_NAME, false }, { SE_RELABEL_NAME, true }, -#ifndef __MINGW64_VERSION_MAJOR - { SE_INCREASE_WORKING_SET_NAME, false }, -#else { SE_INC_WORKING_SET_NAME, false }, -#endif { SE_TIME_ZONE_NAME, true }, { SE_CREATE_SYMBOLIC_LINK_NAME, true } }; -- 2.43.5