This list is closed, nobody may subscribe to it.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(12) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(13) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(38) |
Jul
(10) |
Aug
(70) |
Sep
(63) |
Oct
(61) |
Nov
(41) |
Dec
(28) |
| 2002 |
Jan
(43) |
Feb
(11) |
Mar
(9) |
Apr
(2) |
May
(97) |
Jun
(94) |
Jul
(13) |
Aug
(49) |
Sep
(41) |
Oct
(24) |
Nov
(55) |
Dec
(126) |
| 2003 |
Jan
(90) |
Feb
(75) |
Mar
(32) |
Apr
(24) |
May
(54) |
Jun
(54) |
Jul
(22) |
Aug
(4) |
Sep
(16) |
Oct
(8) |
Nov
(6) |
Dec
(13) |
| 2004 |
Jan
|
Feb
(17) |
Mar
(60) |
Apr
(21) |
May
(12) |
Jun
|
Jul
(13) |
Aug
|
Sep
(29) |
Oct
|
Nov
|
Dec
(2) |
| 2005 |
Jan
(22) |
Feb
(3) |
Mar
(2) |
Apr
(13) |
May
(82) |
Jun
(18) |
Jul
(30) |
Aug
(17) |
Sep
(3) |
Oct
(19) |
Nov
(4) |
Dec
(8) |
| 2006 |
Jan
(1) |
Feb
(6) |
Mar
(2) |
Apr
(40) |
May
|
Jun
(21) |
Jul
(1) |
Aug
(410) |
Sep
(3) |
Oct
|
Nov
(56) |
Dec
(7) |
| 2007 |
Jan
(19) |
Feb
|
Mar
(4) |
Apr
(8) |
May
(19) |
Jun
(6) |
Jul
(4) |
Aug
(6) |
Sep
|
Oct
(4) |
Nov
(3) |
Dec
(2) |
| 2008 |
Jan
(13) |
Feb
(18) |
Mar
(12) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
(6) |
Mar
(8) |
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
(2) |
Sep
(11) |
Oct
(13) |
Nov
(17) |
Dec
(6) |
| 2010 |
Jan
(24) |
Feb
(10) |
Mar
(27) |
Apr
(20) |
May
(108) |
Jun
(8) |
Jul
(23) |
Aug
(38) |
Sep
(49) |
Oct
(17) |
Nov
(12) |
Dec
(14) |
| 2011 |
Jan
(17) |
Feb
(7) |
Mar
(28) |
Apr
(8) |
May
(20) |
Jun
(11) |
Jul
(7) |
Aug
(12) |
Sep
(4) |
Oct
(20) |
Nov
(19) |
Dec
(2) |
| 2012 |
Jan
(2) |
Feb
(6) |
Mar
(5) |
Apr
(24) |
May
(5) |
Jun
(4) |
Jul
(6) |
Aug
(18) |
Sep
(38) |
Oct
(26) |
Nov
(12) |
Dec
(6) |
| 2013 |
Jan
(19) |
Feb
(18) |
Mar
(44) |
Apr
(35) |
May
(18) |
Jun
(21) |
Jul
(10) |
Aug
(19) |
Sep
(44) |
Oct
(25) |
Nov
(1) |
Dec
(2) |
| 2014 |
Jan
(8) |
Feb
|
Mar
|
Apr
(5) |
May
(1) |
Jun
(3) |
Jul
|
Aug
(3) |
Sep
|
Oct
(4) |
Nov
(4) |
Dec
(7) |
| 2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(4) |
Jul
(6) |
Aug
(2) |
Sep
(8) |
Oct
(2) |
Nov
(1) |
Dec
(3) |
| 2016 |
Jan
(7) |
Feb
(9) |
Mar
(5) |
Apr
(5) |
May
(9) |
Jun
(4) |
Jul
(20) |
Aug
(4) |
Sep
(7) |
Oct
(6) |
Nov
(9) |
Dec
(2) |
| 2017 |
Jan
(7) |
Feb
(7) |
Mar
(5) |
Apr
|
May
(1) |
Jun
(4) |
Jul
(12) |
Aug
(4) |
Sep
(1) |
Oct
(4) |
Nov
(11) |
Dec
(14) |
| 2018 |
Jan
(3) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
|
8
|
9
|
10
|
11
|
12
|
13
|
14
|
|
15
|
16
|
17
|
18
|
19
|
20
|
21
(1) |
|
22
|
23
|
24
|
25
(2) |
26
|
27
|
28
|
|
29
|
30
(1) |
31
|
|
|
|
|
|
From: Keith M. <no...@so...> - 2017-10-30 10:31:43
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, 5.0-active has been updated
via ed15b66700a919259c3388cdbd40d343c04ad0fc (commit)
from ec849d3cfea8f9edff39f8c739b3c7a9fddafa93 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sf.net/p/mingw/mingw-org-wsl/ci/ed15b66700a919259c3388cdbd40d343c04ad0fc/
commit ed15b66700a919259c3388cdbd40d343c04ad0fc
Author: Keith Marshall <kei...@us...>
Date: Mon Oct 30 10:27:32 2017 +0000
Refactor <wtypes.h> vs. <nspapi.h> and WinSock headers.
diff --git a/w32api/ChangeLog b/w32api/ChangeLog
index b65f65a..175f632 100644
--- a/w32api/ChangeLog
+++ b/w32api/ChangeLog
@@ -1,3 +1,39 @@
+2017-10-30 Keith Marshall <kei...@us...>
+
+ Refactor <wtypes.h> vs. <nspapi.h> and WinSock headers.
+
+ * include/wtypes.h: Tidy layout; assert copyright.
+ [_BEGIN_C_DECLS, _END_C_DECLS]: Use them, as appropriate.
+ [__NSPAPI_H_SOURCED__]: Restrict exposure of declared content to...
+ [!__BLOB_DATA_TYPE_DEFINED] (BLOB, PBLOB, LPBLOB): ...these; define...
+ (__BLOB_DATA_TYPE_DEFINED__): ...this internal guard; it renames...
+ (__BLOB_T_DEFINED): ...this; do not define...
+ (_WTYPES_H): ...this external guard.
+
+ * include/nspapi.h: Tidy layout; assert copyright.
+ [_BEGIN_C_DECLS, _END_C_DECLS]: Use them, as appropriate.
+ (__CSADDR_T_DEFINED): Do not define; it is no longer required.
+ [__WINSOCK2_H_SOURCED__]: Restrict exposure of declared content to...
+ (struct _CSADDR_INFO): ...this, as an incomplete type, along with...
+ (CSADDR_INFO, PCSADDR_INFO, LPCSADDR_INFO): ...these typedefs; also...
+ (SOCKET_ADDRESS, PSOCKET_ADDRESS, LPSOCKET_ADDRESS): ...define fully.
+ [__WINSOCK2_H_SOURCED__] (_NSPAPI_H): Do not define external guard.
+ [!__WINSOCK2_H_SOURCED__] (struct _CSADDR_INFO): Define fully.
+ (__BLOB_T_DEFINED, BLOB, PBLOB, LPBLOB): Do not define; instead...
+ (__NSPAPI_H_SOURCED__): ...define this, temporarily; include wtypes.h
+ [!__WINSOCK2_H_SOURCED__ && _WIN32_WINNT >= WIN2K]: Include winsock2.h
+ [!__WINSOCK2_H_SOURCED__ && _WIN32_WINNT < WIN2K]: Include winsock.h
+ [UNICODE vs. !UNICODE]: Discriminate generic symbol names, using...
+ (__AW_SUFFIXED__): ...this, to facilitate definition of each of...
+ (SetService, GetAddressByName, _SERVICE_INFO): ...these, and...
+ (__AW_ALIAS__): ...this, for definition of each of...
+ (SERVICE_INFO, LPSERVICE_INFO): ...these.
+
+ * include/winsock2.h (__WINSOCK2_H_SOURCED__): Define it temporarily.
+ (__CSADDR_T_DEFINED, struct _CSADDR_INFO, CSADDR_INFO, PCSADDR_INFO)
+ (LPCSADDR_INFO, __BLOB_T_DEFINED, BLOB, PBLOB, LPBLOB): Do not define;
+ include nspapi.h selectively, to acquire them.
+
2017-09-23 Keith Marshall <kei...@us...>
Factor <winerror.h> duplicate content out of winsock headers.
diff --git a/w32api/include/nspapi.h b/w32api/include/nspapi.h
index 463b139..fa7706f 100644
--- a/w32api/include/nspapi.h
+++ b/w32api/include/nspapi.h
@@ -1,126 +1,237 @@
+/*
+ * nspapi.h
+ *
+ * Windows Sockets Namespace Service Provider API definitions.
+ *
+ *
+ * $Id$
+ *
+ * Written by Anders Norlander <ano...@he...>
+ * Copyright (C) 1998, 1999, 2002, 2004, 2017, MinGW.org Project
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
#ifndef _NSPAPI_H
-#define _NSPAPI_H
-#if __GNUC__ >=3
#pragma GCC system_header
-#endif
-#ifdef __cplusplus
-extern "C" {
+/* <winsock2.h> will include <nspapi.i> selectively, to resolve circular
+ * definition references; thus...
+ */
+#ifndef __WINSOCK2_H_SOURCED__
+/* ...only when NOT engaged in such selective inclusion, do we process
+ * the entire content of <nspapi.h>; furthermore, before we DO process
+ * the full content, we must process the WinSock API declarations from
+ * <winsock.h> or <winsock2.h>, BEFORE we define the <nspapi.h> repeat
+ * inclusion guard, so that <winsock2.h> may, if necessary, recurse to
+ * access the selectively exposed content.
+ */
+#ifndef _WINSOCK_H
+/* We must include <winsock.h> or <winsock2.h>; (we favour <winsock2.h>
+ * over <winsock.h>, on the same basis as our <windows.h> does).
+ */
+#include <sdkddkver.h>
+#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K
+#include <winsock2.h>
+
+#else /* _WIN32_WINNT < Win2K */
+#include <winsock.h>
#endif
-#define NS_ALL 0
+#endif /* !_WINSOCK_H */
+/* We can now be confident that the WinSock API has been appropriately
+ * declared; we may now define the <nspapi.h> repeat inclusion guard.
+ */
+#define _NSPAPI_H
-#define NS_SAP 1
-#define NS_NDS 2
-#define NS_PEER_BROWSE 3
+#define NS_ALL 0
-#define NS_TCPIP_LOCAL 10
-#define NS_TCPIP_HOSTS 11
-#define NS_DNS 12
-#define NS_NETBT 13
-#define NS_WINS 14
+#define NS_SAP 1
+#define NS_NDS 2
+#define NS_PEER_BROWSE 3
-#define NS_NBP 20
+#define NS_TCPIP_LOCAL 10
+#define NS_TCPIP_HOSTS 11
+#define NS_DNS 12
+#define NS_NETBT 13
+#define NS_WINS 14
-#define NS_MS 30
-#define NS_STDA 31
-#define NS_NTDS 32
+#define NS_NBP 20
-#define NS_X500 40
-#define NS_NIS 41
-#define NS_NISPLUS 42
+#define NS_MS 30
+#define NS_STDA 31
+#define NS_NTDS 32
-#define NS_WRQ 50
+#define NS_X500 40
+#define NS_NIS 41
+#define NS_NISPLUS 42
-#define SERVICE_REGISTER 1
-#define SERVICE_DEREGISTER 2
-#define SERVICE_FLUSH 3
-#define SERVICE_FLAG_HARD 0x00000002
+#define NS_WRQ 50
-#ifndef RC_INVOKED
+#define SERVICE_REGISTER 1
+#define SERVICE_DEREGISTER 2
+#define SERVICE_FLUSH 3
+#define SERVICE_FLAG_HARD 0x00000002
-#if defined (_WINSOCK_H) || defined (_WINSOCK2_H) /* needed for LPSOCKADDR */
-#ifndef __CSADDR_T_DEFINED /* also in winsock2.h, but not in winsock.h */
-#define __CSADDR_T_DEFINED
-typedef struct _SOCKET_ADDRESS {
- LPSOCKADDR lpSockaddr;
- INT iSockaddrLength;
-} SOCKET_ADDRESS,*PSOCKET_ADDRESS,*LPSOCKET_ADDRESS;
-typedef struct _CSADDR_INFO {
- SOCKET_ADDRESS LocalAddr;
- SOCKET_ADDRESS RemoteAddr;
- INT iSocketType;
- INT iProtocol;
-} CSADDR_INFO,*PCSADDR_INFO,*LPCSADDR_INFO;
-#endif
-#endif
-
-#ifndef __BLOB_T_DEFINED /* also in wtypes.h and winsock2.h */
-#define __BLOB_T_DEFINED
-typedef struct _BLOB {
- ULONG cbSize;
- BYTE *pBlobData;
-} BLOB,*PBLOB,*LPBLOB;
-#endif
+#endif /* !__WINSOCK2_H_SOURCED__ */
-typedef struct _SERVICE_ADDRESS {
- DWORD dwAddressType;
- DWORD dwAddressFlags;
- DWORD dwAddressLength;
- DWORD dwPrincipalLength;
- BYTE *lpAddress;
- BYTE *lpPrincipal;
+#ifndef RC_INVOKED
+#if ! (defined _NSPAPI_H && defined _WINSOCK2_H)
+/* The following definitions are exposed either when <nspapi.h> is included
+ * directly, or when selectively included by <winsock2.h>, but we must take
+ * care to define them only on the first time of reading.
+ *
+ * We need a complete definition for the BLOB data type, which is provided
+ * in "wtypes.h", (and possibly exposed due to prior selective inclusion by
+ * <winsock2.h>); if neither of these have been included previously, we may
+ * acquire the requisite definition by selective inclusion now.
+ */
+#define __NSPAPI_H_SOURCED__ 1
+#include "wtypes.h"
+
+_BEGIN_C_DECLS
+
+/* Technically, according to MSDN, the SOCKET_ADDRESS structure should be
+ * defined in <winsock2.h>, which has not necessarily been included by the
+ * time we get to here, yet the CSADDR_INFO structure, (which is correctly
+ * defined in this file), requires its full definition. Furthermore, the
+ * CSADDR_INFO structure is representative of the data which is returned
+ * by the GetAddressByName() function, (also declared in this file), which
+ * is declared as deprecated in WinSock v2, (and thus, we would not expect
+ * any such dependency on this WinSock v2 specific <winsock2.h> data type).
+ * This Microsoft API design is critically flawed, but we can mitigate the
+ * fault by defining the SOCKET_ADDRESS structure here, whence we make it
+ * available to <winsock2.h> via selective inclusion.
+ */
+typedef
+struct _SOCKET_ADDRESS
+{ LPSOCKADDR lpSockaddr;
+ INT iSockaddrLength;
+} SOCKET_ADDRESS, *PSOCKET_ADDRESS, *LPSOCKET_ADDRESS;
+
+/* Notwithstanding that, according to MSDN, the CSADDR_INFO structure is
+ * correctly defined below, (it should not be defined in <winsock2.h>, and
+ * user code should include <nspapi.h> to obtain the complete definition),
+ * <winsock2.h> DOES define the WSAQUERYSET data type, which requires at
+ * least an incomplete type definition for the LPCSADDR_INFO pointer type;
+ * thus, it is convenient to expose this incomplete definition when this
+ * file, <nspapi.h>, is selectively included by <winsock2.h>, whereas the
+ * complete definition of the CSADDR_INFO data type may be deferred until
+ * the user includes <nspapi.h> directly.
+ */
+typedef struct _CSADDR_INFO CSADDR_INFO, *PCSADDR_INFO, *LPCSADDR_INFO;
+
+_END_C_DECLS
+
+#undef __NSPAPI_H_SOURCED__
+#endif /* ! (_NSPAPI_H && _WINSOCK2_H) */
+
+#ifdef _NSPAPI_H
+/* This indicates that <nspapi.h> has been included directly...
+ */
+_BEGIN_C_DECLS
+
+/* ...thus it is now appropriate to provide the complete type definition
+ * for the CSADDR_INFO structure...
+ */
+struct _CSADDR_INFO
+{ SOCKET_ADDRESS LocalAddr;
+ SOCKET_ADDRESS RemoteAddr;
+ INT iSocketType;
+ INT iProtocol;
+};
+
+/* ...in addition to other data types, and function prototypes, which are
+ * specific to this header file.
+ */
+typedef
+struct _SERVICE_ADDRESS
+{ DWORD dwAddressType;
+ DWORD dwAddressFlags;
+ DWORD dwAddressLength;
+ DWORD dwPrincipalLength;
+ BYTE *lpAddress;
+ BYTE *lpPrincipal;
} SERVICE_ADDRESS;
-typedef struct _SERVICE_ADDRESSES {
- DWORD dwAddressCount;
- SERVICE_ADDRESS Addresses[1];
+
+typedef
+struct _SERVICE_ADDRESSES
+{ DWORD dwAddressCount;
+ SERVICE_ADDRESS Addresses[1];
} SERVICE_ADDRESSES, *PSERVICE_ADDRESSES, *LPSERVICE_ADDRESSES;
-typedef struct _SERVICE_INFOA {
- LPGUID lpServiceType;
- LPSTR lpServiceName;
- LPSTR lpComment;
- LPSTR lpLocale;
- DWORD dwDisplayHint;
- DWORD dwVersion;
- DWORD dwTime;
- LPSTR lpMachineName;
- LPSERVICE_ADDRESSES lpServiceAddress;
- BLOB ServiceSpecificInfo;
+
+typedef
+struct _SERVICE_INFOA
+{ LPGUID lpServiceType;
+ LPSTR lpServiceName;
+ LPSTR lpComment;
+ LPSTR lpLocale;
+ DWORD dwDisplayHint;
+ DWORD dwVersion;
+ DWORD dwTime;
+ LPSTR lpMachineName;
+ LPSERVICE_ADDRESSES lpServiceAddress;
+ BLOB ServiceSpecificInfo;
} SERVICE_INFOA, *LPSERVICE_INFOA;
-typedef struct _SERVICE_INFOW {
- LPGUID lpServiceType;
- LPWSTR lpServiceName;
- LPWSTR lpComment;
- LPWSTR lpLocale;
- DWORD dwDisplayHint;
- DWORD dwVersion;
- DWORD dwTime;
- LPWSTR lpMachineName;
- LPSERVICE_ADDRESSES lpServiceAddress;
- BLOB ServiceSpecificInfo;
+
+typedef
+struct _SERVICE_INFOW
+{ LPGUID lpServiceType;
+ LPWSTR lpServiceName;
+ LPWSTR lpComment;
+ LPWSTR lpLocale;
+ DWORD dwDisplayHint;
+ DWORD dwVersion;
+ DWORD dwTime;
+ LPWSTR lpMachineName;
+ LPSERVICE_ADDRESSES lpServiceAddress;
+ BLOB ServiceSpecificInfo;
} SERVICE_INFOW, *LPSERVICE_INFOW;
+typedef __AW_ALIAS__(SERVICE_INFO), *LPSERVICE_INFO;
typedef void *LPSERVICE_ASYNC_INFO;
-INT WINAPI SetServiceA(DWORD,DWORD,DWORD,LPSERVICE_INFOA,LPSERVICE_ASYNC_INFO,LPDWORD);
-INT WINAPI SetServiceW(DWORD,DWORD,DWORD,LPSERVICE_INFOW,LPSERVICE_ASYNC_INFO,LPDWORD);
-INT WINAPI GetAddressByNameA(DWORD,LPGUID,LPSTR,LPINT,DWORD,LPSERVICE_ASYNC_INFO,LPVOID,LPDWORD,LPSTR,LPDWORD);
-INT WINAPI GetAddressByNameW(DWORD,LPGUID,LPWSTR,LPINT,DWORD,LPSERVICE_ASYNC_INFO,LPVOID,LPDWORD,LPWSTR,LPDWORD);
-
-#ifdef UNICODE
-typedef SERVICE_INFOW SERVICE_INFO, *LPSERVICE_INFO;
-#define _SERVICE_INFO SERVICE_INFOW
-#define SetService SetServiceW
-#define GetAddressByName GetAddressByNameW
-#else
-typedef SERVICE_INFOA SERVICE_INFO, *LPSERVICE_INFO;
-#define _SERVICE_INFO SERVICE_INFOA
-#define SetService SetServiceA
-#define GetAddressByName GetAddressByNameA
-#endif
-#endif /* RC_INVOKED */
+#define SetService __AW_SUFFIXED__(SetService)
+INT WINAPI SetServiceA
+ ( DWORD, DWORD, DWORD, LPSERVICE_INFOA, LPSERVICE_ASYNC_INFO, LPDWORD
+ );
+INT WINAPI SetServiceW
+ ( DWORD, DWORD, DWORD, LPSERVICE_INFOW, LPSERVICE_ASYNC_INFO, LPDWORD
+ );
-#ifdef __cplusplus
-}
-#endif
-#endif /* _NSPAPI_H */
+#define GetAddressByName __AW_SUFFIXED__(GetAddressByName)
+INT WINAPI GetAddressByNameA
+ ( DWORD, LPGUID, LPSTR, LPINT, DWORD, LPSERVICE_ASYNC_INFO, LPVOID,
+ LPDWORD, LPSTR, LPDWORD
+ );
+INT WINAPI GetAddressByNameW
+ ( DWORD, LPGUID, LPWSTR, LPINT, DWORD, LPSERVICE_ASYNC_INFO, LPVOID,
+ LPDWORD, LPWSTR, LPDWORD
+ );
+
+#define _SERVICE_INFO __AW_SUFFIXED__(SERVICE_INFO)
+
+_END_C_DECLS
+
+#endif /* _NSPAPI_H */
+#endif /* ! RC_INVOKED */
+
+#endif /* _NSPAPI_H: $RCSfile$: end of file */
diff --git a/w32api/include/winsock2.h b/w32api/include/winsock2.h
index c9e51c4..f51e45c 100644
--- a/w32api/include/winsock2.h
+++ b/w32api/include/winsock2.h
@@ -650,6 +650,16 @@ typedef struct protoent PROTOENT, *PPROTOENT, *LPPROTOENT;
typedef struct timeval TIMEVAL, *PTIMEVAL, *LPTIMEVAL;
/* winsock2 additions */
+#define __WINSOCK2_H_SOURCED__
+
+/* We need a definition for the BLOB data type; although an incomplete
+ * type definition would suffice here, other related headers, <nspapi.h>
+ * in particular, require the full definition, so we may just as well
+ * incorporate that here, by selective inclusion from "wtypes.h", by
+ * way of indirect inclusion from "nspapi.h"
+ */
+#include "nspapi.h"
+
#define ADDR_ANY INADDR_ANY
#define IN_CLASSD(i) (((long)(i) & 0xF0000000) == 0xE0000000)
@@ -782,46 +792,12 @@ struct _WSAVersion
WSAECOMPARATOR ecHow;
} WSAVERSION, *PWSAVERSION, *LPWSAVERSION;
-#ifndef __CSADDR_T_DEFINED
-/* FIXME: This content is also defined in <nspapi.h>; it should be
- * factored out to a single shared location.
- */
-typedef
-struct _SOCKET_ADDRESS
-{ LPSOCKADDR lpSockaddr;
- INT iSockaddrLength;
-} SOCKET_ADDRESS, *PSOCKET_ADDRESS, *LPSOCKET_ADDRESS;
-
-typedef
-struct _CSADDR_INFO
-{ SOCKET_ADDRESS LocalAddr;
- SOCKET_ADDRESS RemoteAddr;
- INT iSocketType;
- INT iProtocol;
-} CSADDR_INFO, *PCSADDR_INFO, *LPCSADDR_INFO;
-
-#define __CSADDR_T_DEFINED
-#endif
-
typedef
struct _SOCKET_ADDRESS_LIST
{ INT iAddressCount;
SOCKET_ADDRESS Address[1];
} SOCKET_ADDRESS_LIST, *LPSOCKET_ADDRESS_LIST;
-#ifndef __BLOB_T_DEFINED
-/* FIXME: This is also in <wtypes.h> and <nspapi.h>; once again,
- * it should be similarly factored out.
- */
-typedef
-struct _BLOB
-{ ULONG cbSize;
- BYTE *pBlobData;
-} BLOB, *PBLOB, *LPBLOB;
-
-#define __BLOB_T_DEFINED
-#endif
-
typedef
struct _WSAQuerySetA
{ DWORD dwSize;
@@ -1278,4 +1254,5 @@ typedef DWORD (WINAPI *LPFN_WSAWAITFORMULTIPLEEVENTS) (DWORD, const WSAEVENT *,
_END_C_DECLS
+#undef __WINSOCK2_H_SOURCED__
#endif /* _WINSOCK2_H: $RCSfile$: end of file */
diff --git a/w32api/include/wtypes.h b/w32api/include/wtypes.h
index 37f2af2..9149e51 100644
--- a/w32api/include/wtypes.h
+++ b/w32api/include/wtypes.h
@@ -1,171 +1,337 @@
+/*
+ * wtypes.h
+ *
+ * Miscellaneous Windows data type definitions.
+ *
+ *
+ * $Id$
+ *
+ * Written by Anders Norlander <ano...@he...>
+ * Copyright (C) 1998-2002, 2004, 2007, 2017, MinGW.org Project
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+#ifndef _WTYPES_H
+#pragma GCC system_header
+
+/* This file may be selectively included by <nspapi.h>, (possibly
+ * on behalf of <winsock2.h>), to expose only the definition of the
+ * BLOB data structure.
+ */
+#ifndef __NSPAPI_H_SOURCED__
+/* Only when NOT included in this selective manner, do we proceed
+ * to define its full content; note that we continue to defer the
+ * definition of the repeat inclusion guard for <wtypes.h> itself,
+ * to ensure that the appropriate content remains accessible for
+ * recursive inclusion (selectively) while processing <rpc.h>, or
+ * <rpcndr.h>, upon both of which <wtypes.h> is dependent.
+ */
#include <rpc.h>
#include <rpcndr.h>
-#ifndef _WTYPES_H
+_BEGIN_C_DECLS
+
+#define IID_NULL GUID_NULL
+#define CLSID_NULL GUID_NULL
+
+#define CBPCLIPDATA(d) ((d).cbSize-sizeof((d).ulClipFmt))
+
+#define ROTFLAGS_REGISTRATIONKEEPSALIVE 0x01
+#define ROTFLAGS_ALLOWANYCLIENT 0x02
+
+_END_C_DECLS
+
+#endif /* !__NSPAPI_H_SOURCED__ */
+
+#ifndef __BLOB_DATA_TYPE_DEFINED__
+/* Regardles of how we have been included, we must always define
+ * the BLOB data type, (but we must do so only once; note that we
+ * use a data type specific guard here, to simplify detection of
+ * duplicate exposure of this definition).
+ */
+_BEGIN_C_DECLS
+
+typedef
+struct _BLOB
+{ ULONG cbSize;
+ BYTE *pBlobData;
+} BLOB, *PBLOB, *LPBLOB;
+
+_END_C_DECLS
+
+#define __BLOB_DATA_TYPE_DEFINED__
+#endif /* !__BLOB_DATA_TYPE_DEFINED__ */
+
+#if ! (defined _WTYPES_H || defined __NSPAPI_H_SOURCED__)
+/* Resume specification of the full content of <wtypes.h>; note that,
+ * only now, may we safely define the repeat inclusion guard.
+ */
#define _WTYPES_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
+_BEGIN_C_DECLS
-#define IID_NULL GUID_NULL
-#define CLSID_NULL GUID_NULL
-#define CBPCLIPDATA(d) ((d).cbSize-sizeof((d).ulClipFmt))
-#define ROTFLAGS_REGISTRATIONKEEPSALIVE 0x01
-#define ROTFLAGS_ALLOWANYCLIENT 0x02
-
-#ifndef __BLOB_T_DEFINED /* also in winsock2.h */
-#define __BLOB_T_DEFINED
-typedef struct _BLOB {
- ULONG cbSize;
- BYTE *pBlobData;
-} BLOB,*PBLOB,*LPBLOB;
-#endif
-typedef enum tagDVASPECT {
- DVASPECT_CONTENT=1,
- DVASPECT_THUMBNAIL=2,
- DVASPECT_ICON=4,
- DVASPECT_DOCPRINT=8
+typedef
+enum tagDVASPECT
+{ DVASPECT_CONTENT = 1,
+ DVASPECT_THUMBNAIL = 2,
+ DVASPECT_ICON = 4,
+ DVASPECT_DOCPRINT = 8
} DVASPECT;
-typedef enum tagDVASPECT2 {
- DVASPECT_OPAQUE=16,
- DVASPECT_TRANSPARENT=32
+
+typedef
+enum tagDVASPECT2
+{ DVASPECT_OPAQUE = 16,
+ DVASPECT_TRANSPARENT = 32
} DVASPECT2;
-typedef enum tagSTATFLAG {
- STATFLAG_DEFAULT=0,
- STATFLAG_NONAME=1
+
+typedef
+enum tagSTATFLAG
+{ STATFLAG_DEFAULT = 0,
+ STATFLAG_NONAME = 1
} STATFLAG;
-typedef enum tagMEMCTX {
- MEMCTX_LOCAL=0,
- MEMCTX_TASK,
- MEMCTX_SHARED,
- MEMCTX_MACSYSTEM,
- MEMCTX_UNKNOWN=-1,
- MEMCTX_SAME=-2
+
+typedef
+enum tagMEMCTX
+{ MEMCTX_LOCAL = 0,
+ MEMCTX_TASK,
+ MEMCTX_SHARED,
+ MEMCTX_MACSYSTEM,
+ MEMCTX_UNKNOWN = -1,
+ MEMCTX_SAME = -2
} MEMCTX;
-typedef enum tagMSHCTX {
- MSHCTX_LOCAL=0,
- MSHCTX_NOSHAREDMEM,
- MSHCTX_DIFFERENTMACHINE,
- MSHCTX_INPROC,
- MSHCTX_CROSSCTX
+
+typedef
+enum tagMSHCTX
+{ MSHCTX_LOCAL = 0,
+ MSHCTX_NOSHAREDMEM,
+ MSHCTX_DIFFERENTMACHINE,
+ MSHCTX_INPROC,
+ MSHCTX_CROSSCTX
} MSHCTX;
-typedef enum tagCLSCTX {
- CLSCTX_INPROC_SERVER=1,CLSCTX_INPROC_HANDLER=2,CLSCTX_LOCAL_SERVER=4,
- CLSCTX_INPROC_SERVER16=8,CLSCTX_REMOTE_SERVER=16
+
+typedef
+enum tagCLSCTX
+{ CLSCTX_INPROC_SERVER = 1,
+ CLSCTX_INPROC_HANDLER = 2,
+ CLSCTX_LOCAL_SERVER = 4,
+ CLSCTX_INPROC_SERVER16 = 8,
+ CLSCTX_REMOTE_SERVER = 16
} CLSCTX;
-typedef enum tagMSHLFLAGS {
- MSHLFLAGS_NORMAL,MSHLFLAGS_TABLESTRONG,MSHLFLAGS_TABLEWEAK
+
+typedef
+enum tagMSHLFLAGS
+{ MSHLFLAGS_NORMAL,
+ MSHLFLAGS_TABLESTRONG,
+ MSHLFLAGS_TABLEWEAK
} MSHLFLAGS;
-typedef struct _FLAGGED_WORD_BLOB {
- unsigned long fFlags;
- unsigned long clSize;
- unsigned short asData[1];
-}FLAGGED_WORD_BLOB;
+
+typedef
+struct _FLAGGED_WORD_BLOB
+{ unsigned long fFlags;
+ unsigned long clSize;
+ unsigned short asData[1];
+} FLAGGED_WORD_BLOB;
#ifndef OLE2ANSI
-typedef WCHAR OLECHAR;
-typedef LPWSTR LPOLESTR;
-typedef LPCWSTR LPCOLESTR;
-#define OLESTR(s) L##s
+typedef WCHAR OLECHAR;
+typedef LPWSTR LPOLESTR;
+typedef LPCWSTR LPCOLESTR;
+
+#define OLESTR(s) L##s
+
#else
-typedef char OLECHAR;
-typedef LPSTR LPOLESTR;
-typedef LPCSTR LPCOLESTR;
-#define OLESTR(s) s
+typedef char OLECHAR;
+typedef LPSTR LPOLESTR;
+typedef LPCSTR LPCOLESTR;
+
+#define OLESTR(s) s
#endif
-typedef unsigned short VARTYPE;
-typedef short VARIANT_BOOL;
-typedef VARIANT_BOOL _VARIANT_BOOL;
-#define VARIANT_TRUE ((VARIANT_BOOL)0xffff)
-#define VARIANT_FALSE ((VARIANT_BOOL)0)
-typedef OLECHAR *BSTR;
-typedef FLAGGED_WORD_BLOB *wireBSTR;
-typedef BSTR *LPBSTR;
-typedef LONG SCODE;
-typedef void *HCONTEXT;
-typedef union tagCY {
- _ANONYMOUS_STRUCT struct {
- unsigned long Lo;
- long Hi;
- }_STRUCT_NAME(s);
- LONGLONG int64;
+
+typedef unsigned short VARTYPE;
+typedef short VARIANT_BOOL;
+typedef VARIANT_BOOL _VARIANT_BOOL;
+
+#define VARIANT_TRUE ((VARIANT_BOOL)(0xFFFF))
+#define VARIANT_FALSE ((VARIANT_BOOL)(0))
+
+typedef OLECHAR *BSTR;
+typedef FLAGGED_WORD_BLOB *wireBSTR;
+typedef BSTR *LPBSTR;
+typedef LONG SCODE;
+typedef void *HCONTEXT;
+
+typedef
+union tagCY
+{ _ANONYMOUS_STRUCT struct
+ { unsigned long Lo;
+ long Hi;
+ } _STRUCT_NAME(s);
+ LONGLONG int64;
} CY;
-typedef double DATE;
-typedef struct tagBSTRBLOB {
- ULONG cbSize;
- PBYTE pData;
-}BSTRBLOB;
-typedef struct tagBSTRBLOB *LPBSTRBLOB;
-typedef struct tagCLIPDATA {
- ULONG cbSize;
- long ulClipFmt;
- PBYTE pClipData;
-}CLIPDATA;
-typedef enum tagSTGC {
- STGC_DEFAULT,STGC_OVERWRITE,STGC_ONLYIFCURRENT,
- STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE
-}STGC;
-typedef enum tagSTGMOVE {
- STGMOVE_MOVE,STGMOVE_COPY,STGMOVE_SHALLOWCOPY
-}STGMOVE;
-enum VARENUM {
- VT_EMPTY,VT_NULL,VT_I2,VT_I4,VT_R4,VT_R8,VT_CY,VT_DATE,VT_BSTR,VT_DISPATCH,
- VT_ERROR,VT_BOOL,VT_VARIANT,VT_UNKNOWN,VT_DECIMAL,VT_I1=16,VT_UI1,VT_UI2,VT_UI4,VT_I8,
- VT_UI8,VT_INT,VT_UINT,VT_VOID,VT_HRESULT,VT_PTR,VT_SAFEARRAY,VT_CARRAY,VT_USERDEFINED,
- VT_LPSTR,VT_LPWSTR,VT_RECORD=36,VT_INT_PTR=37,VT_UINT_PTR=38,VT_FILETIME=64,VT_BLOB,VT_STREAM,VT_STORAGE,VT_STREAMED_OBJECT,
- VT_STORED_OBJECT,VT_BLOB_OBJECT,VT_CF,VT_CLSID,VT_BSTR_BLOB=0xfff,VT_VECTOR=0x1000,
- VT_ARRAY=0x2000,VT_BYREF=0x4000,VT_RESERVED=0x8000,VT_ILLEGAL= 0xffff,VT_ILLEGALMASKED=0xfff,
- VT_TYPEMASK=0xfff
+
+typedef double DATE;
+
+typedef
+struct tagBSTRBLOB
+{ ULONG cbSize;
+ PBYTE pData;
+} BSTRBLOB, *LPBSTRBLOB;
+
+typedef
+struct tagCLIPDATA
+{ ULONG cbSize;
+ long ulClipFmt;
+ PBYTE pClipData;
+} CLIPDATA;
+
+typedef
+enum tagSTGC
+{ STGC_DEFAULT,
+ STGC_OVERWRITE,
+ STGC_ONLYIFCURRENT,
+ STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE
+} STGC;
+
+typedef
+enum tagSTGMOVE
+{ STGMOVE_MOVE,
+ STGMOVE_COPY,
+ STGMOVE_SHALLOWCOPY
+} STGMOVE;
+
+enum VARENUM
+{ VT_EMPTY,
+ VT_NULL,
+ VT_I2,
+ VT_I4,
+ VT_R4,
+ VT_R8,
+ VT_CY,
+ VT_DATE,
+ VT_BSTR,
+ VT_DISPATCH,
+ VT_ERROR,
+ VT_BOOL,
+ VT_VARIANT,
+ VT_UNKNOWN,
+ VT_DECIMAL,
+ VT_I1 = 16,
+ VT_UI1,
+ VT_UI2,
+ VT_UI4,
+ VT_I8,
+ VT_UI8,
+ VT_INT,
+ VT_UINT,
+ VT_VOID,
+ VT_HRESULT,
+ VT_PTR,
+ VT_SAFEARRAY,
+ VT_CARRAY,
+ VT_USERDEFINED,
+ VT_LPSTR,
+ VT_LPWSTR,
+ VT_RECORD = 36,
+ VT_INT_PTR = 37,
+ VT_UINT_PTR = 38,
+ VT_FILETIME = 64,
+ VT_BLOB,
+ VT_STREAM,
+ VT_STORAGE,
+ VT_STREAMED_OBJECT,
+ VT_STORED_OBJECT,
+ VT_BLOB_OBJECT,
+ VT_CF,
+ VT_CLSID,
+ VT_BSTR_BLOB = 0x0FFF,
+ VT_VECTOR = 0x1000,
+ VT_ARRAY = 0x2000,
+ VT_BYREF = 0x4000,
+ VT_RESERVED = 0x8000,
+ VT_ILLEGAL = 0xFFFF,
+ VT_ILLEGALMASKED = 0x0FFF,
+ VT_TYPEMASK = 0x0FFF
};
-typedef struct _BYTE_SIZEDARR {
- unsigned long clSize;
- byte *pData;
-}BYTE_SIZEDARR;
-typedef struct _SHORT_SIZEDARR {
- unsigned long clSize;
- unsigned short *pData;
-}WORD_SIZEDARR;
-typedef struct _LONG_SIZEDARR {
- unsigned long clSize;
- unsigned long *pData;
-}DWORD_SIZEDARR;
-typedef struct _HYPER_SIZEDARR {
- unsigned long clSize;
- hyper *pData;
-}HYPER_SIZEDARR;
-typedef double DOUBLE;
-typedef struct tagDEC {
- USHORT wReserved;
- _ANONYMOUS_UNION union {
- _ANONYMOUS_STRUCT struct {
- BYTE scale;
- BYTE sign;
- }_STRUCT_NAME(s);
- USHORT signscale;
- } DUMMYUNIONNAME;
- ULONG Hi32;
- _ANONYMOUS_UNION union {
- _ANONYMOUS_STRUCT struct {
- ULONG Lo32;
- ULONG Mid32;
- }_STRUCT_NAME(s2);
- ULONGLONG Lo64;
- } DUMMYUNIONNAME2;
-} DECIMAL;
-typedef DECIMAL *LPDECIMAL;
-#define DECIMAL_NEG ((BYTE)0x80)
+typedef
+struct _BYTE_SIZEDARR
+{ unsigned long clSize;
+ byte *pData;
+} BYTE_SIZEDARR;
+
+typedef
+struct _SHORT_SIZEDARR
+{ unsigned long clSize;
+ unsigned short *pData;
+} WORD_SIZEDARR;
+
+typedef
+struct _LONG_SIZEDARR
+{ unsigned long clSize;
+ unsigned long *pData;
+} DWORD_SIZEDARR;
+
+typedef
+struct _HYPER_SIZEDARR
+{ unsigned long clSize;
+ hyper *pData;
+} HYPER_SIZEDARR;
+
+typedef double DOUBLE;
+
+typedef
+struct tagDEC
+{ USHORT wReserved;
+ _ANONYMOUS_UNION union
+ { _ANONYMOUS_STRUCT struct
+ { BYTE scale;
+ BYTE sign;
+ } _STRUCT_NAME(s);
+ USHORT signscale;
+ } DUMMYUNIONNAME;
+ ULONG Hi32;
+ _ANONYMOUS_UNION union
+ { _ANONYMOUS_STRUCT struct
+ { ULONG Lo32;
+ ULONG Mid32;
+ } _STRUCT_NAME(s2);
+ ULONGLONG Lo64;
+ } DUMMYUNIONNAME2;
+} DECIMAL, *LPDECIMAL;
+
+#define DECIMAL_NEG ((BYTE)(0x80))
+
#ifdef NONAMELESSUNION
-#define DECIMAL_SETZERO(d) {(d).DUMMYUNIONNAME2.Lo64=(d).Hi32=(d).DUMMYUNIONNAME.signscale=0;}
+#define DECIMAL_SETZERO(d) \
+ { (d).DUMMYUNIONNAME2.Lo64 = (d).Hi32 = (d).DUMMYUNIONNAME.signscale = 0; \
+ }
+
#else
-#define DECIMAL_SETZERO(d) {(d).Lo64=(d).Hi32=(d).signscale=0;}
-#endif
-typedef void *HMETAFILEPICT;
-#ifdef __cplusplus
-}
-#endif
+#define DECIMAL_SETZERO(d) { (d).Lo64 = (d).Hi32 = (d).signscale = 0; }
#endif
+
+typedef void *HMETAFILEPICT;
+
+_END_C_DECLS
+
+#endif /* _WTYPES_H full content definitions */
+#endif /* _WTYPES_H: $RCSfile$: end of file */
-----------------------------------------------------------------------
Summary of changes:
w32api/ChangeLog | 36 ++++
w32api/include/nspapi.h | 317 ++++++++++++++++++++-----------
w32api/include/winsock2.h | 45 ++---
w32api/include/wtypes.h | 462 +++++++++++++++++++++++++++++++---------------
4 files changed, 575 insertions(+), 285 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Keith M. <no...@so...> - 2017-10-25 18:42:36
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, 5.0-active has been updated
via ec849d3cfea8f9edff39f8c739b3c7a9fddafa93 (commit)
from e66045d6761927a98e622abe781aa2de577d2e95 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sf.net/p/mingw/mingw-org-wsl/ci/ec849d3cfea8f9edff39f8c739b3c7a9fddafa93/
commit ec849d3cfea8f9edff39f8c739b3c7a9fddafa93
Author: Keith Marshall <kei...@us...>
Date: Wed Oct 25 19:38:37 2017 +0100
Include, and make <sys/bsdtypes.h> test suite safe (augmented).
diff --git a/mingwrt/include/sys/bsdtypes.h b/mingwrt/include/sys/bsdtypes.h
index 37a94a3..3d031d8 100644
--- a/mingwrt/include/sys/bsdtypes.h
+++ b/mingwrt/include/sys/bsdtypes.h
@@ -5,7 +5,7 @@
* and adopted by the Windows sockets implementation; users are advised
* to avoid using these data types, and use standard types instead.
*
- * $Id: bsdtypes.h,v 54917a4a822e 2017/10/25 14:32:38 keithmarshall $
+ * $Id$
*
* Abstracted from MinGW.org's WinSock implementation
* Copyright (C) 2017, MinGW.org Project
@@ -63,4 +63,4 @@ typedef unsigned long u_long;
#define _BSDTYPES_DEFINED
#endif /* !_BSDTYPES_DEFINED */
-#endif /* _SYS_BSDTYPES_H: $RCSfile: bsdtypes.h,v $: end of file */
+#endif /* _SYS_BSDTYPES_H: $RCSfile$: end of file */
diff --git a/mingwrt/tests/headers.at b/mingwrt/tests/headers.at
index 206371f..08e2b53 100644
--- a/mingwrt/tests/headers.at
+++ b/mingwrt/tests/headers.at
@@ -82,6 +82,7 @@ utime.h dnl
values.h dnl
wchar.h dnl
wctype.h dnl
+sys/bsdtypes.h dnl
sys/fcntl.h dnl
sys/file.h dnl
sys/locking.h dnl
-----------------------------------------------------------------------
Summary of changes:
mingwrt/include/sys/bsdtypes.h | 4 ++--
mingwrt/tests/headers.at | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Keith M. <no...@so...> - 2017-10-25 14:53:05
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, 5.0-active has been updated
via e66045d6761927a98e622abe781aa2de577d2e95 (commit)
from 1194ed0317a2a8704be63d2289232d18c1848876 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sf.net/p/mingw/mingw-org-wsl/ci/e66045d6761927a98e622abe781aa2de577d2e95/
commit e66045d6761927a98e622abe781aa2de577d2e95
Author: Keith Marshall <kei...@us...>
Date: Wed Oct 25 15:45:18 2017 +0100
Include, and make <sys/bsdtypes.h> test suite safe.
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index 9886e4c..1fed35f 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,13 @@
+2017-10-25 Keith Marshall <kei...@us...>
+
+ Include, and make <sys/bsdtypes.h> test suite safe.
+
+ * tests/headers.at (sys/bsdtypes.h): Add reference.
+
+ * include/sys/bsdtypes.h [__IN_MINGWRT_TESTSUITE__]: Add to...
+ [_BSD_SOURCE || _WINSOCK2_H]: ...these, as conditions for supression
+ of "ill-advised usage" warning message.
+
2017-09-15 Keith Marshall <kei...@us...>
Factor <sys/time.h> duplicate content out of winsock headers.
diff --git a/mingwrt/include/sys/bsdtypes.h b/mingwrt/include/sys/bsdtypes.h
index 44d1a3a..37a94a3 100644
--- a/mingwrt/include/sys/bsdtypes.h
+++ b/mingwrt/include/sys/bsdtypes.h
@@ -5,7 +5,7 @@
* and adopted by the Windows sockets implementation; users are advised
* to avoid using these data types, and use standard types instead.
*
- * $Id$
+ * $Id: bsdtypes.h,v 54917a4a822e 2017/10/25 14:32:38 keithmarshall $
*
* Abstracted from MinGW.org's WinSock implementation
* Copyright (C) 2017, MinGW.org Project
@@ -44,13 +44,14 @@
*/
#include <_mingw.h>
-#if ! (defined _BSD_SOURCE || defined _WINSOCK_H)
-/* Users are STRONGLY recommended to avoid using the non-standard BSD
- * data types defined herein, unless compiling code which proclaims its
- * _BSD_SOURCE heritage, or which uses the Windows Sockets API, (which
- * has ill-advisedly adopted them).
- */
-#warning "Use of non-standard BSD type definitions is ill-advised."
+#if ! __IN_MINGWRT_TESTSUITE__ \
+ && ! (defined _BSD_SOURCE || defined _WINSOCK_H)
+ /* Users are STRONGLY recommended to avoid using the non-standard BSD
+ * data types defined herein, unless compiling code which proclaims its
+ * _BSD_SOURCE heritage, or which uses the Windows Sockets API, (which
+ * has ill-advisedly adopted them).
+ */
+# warning "Use of non-standard BSD type definitions is ill-advised."
#endif
/* Use "unsigned foo" instead of these "u_foo" shorthand aliases.
@@ -62,4 +63,4 @@ typedef unsigned long u_long;
#define _BSDTYPES_DEFINED
#endif /* !_BSDTYPES_DEFINED */
-#endif /* _SYS_BSDTYPES_H: $RCSfile$: end of file */
+#endif /* _SYS_BSDTYPES_H: $RCSfile: bsdtypes.h,v $: end of file */
-----------------------------------------------------------------------
Summary of changes:
mingwrt/ChangeLog | 10 ++++++++++
mingwrt/include/sys/bsdtypes.h | 19 ++++++++++---------
2 files changed, 20 insertions(+), 9 deletions(-)
hooks/post-receive
--
Repository: mingw-org-wsl
|
|
From: Keith M. <no...@so...> - 2017-10-21 11:16:36
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Repository: mingw-org-wsl".
The branch, 5.0-active has been updated
via 1194ed0317a2a8704be63d2289232d18c1848876 (commit)
via 0fe24734253ddb48495cd0bd04d1beb1fd23345a (commit)
via 3c0c2afc402f9ca820a9452f941723d163eaad17 (commit)
via 312b531944a5ee743068586b8a34726f3b7d6cc9 (commit)
via 7cbaf6927272fde1d8fb2fb58e67d067a91cd93b (commit)
via 13c2ff33fdcc8dd5614e47b0904311fb8b640774 (commit)
from 9333af25a764e33081008e44ad7679567155ce91 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sf.net/p/mingw/mingw-org-wsl/ci/1194ed0317a2a8704be63d2289232d18c1848876/
commit 1194ed0317a2a8704be63d2289232d18c1848876
Author: Keith Marshall <kei...@us...>
Date: Sat Sep 23 11:08:48 2017 +0100
Factor <winerror.h> duplicate content out of winsock headers.
diff --git a/w32api/ChangeLog b/w32api/ChangeLog
index 5e2adf4..b65f65a 100644
--- a/w32api/ChangeLog
+++ b/w32api/ChangeLog
@@ -1,3 +1,17 @@
+2017-09-23 Keith Marshall <kei...@us...>
+
+ Factor <winerror.h> duplicate content out of winsock headers.
+
+ * include/winsock.h include/winsock2.h [!defined WSABASEERR]: Delete
+ conditional block, and all of its content; selectively include...
+ * include/winerror.h [__WINSOCK_H_SOURCED__]: ...this instead.
+ [__WINSOCK_H_SOURCED__] (_WINERROR_H): Do not define it.
+ (__WINSOCK_V1_ERRORS__, __WINSOCK_V2_ERRORS__): New temporary macros;
+ define them, to segregate WSA error messages applicable to WinSock v2
+ only, from those applicable to both WinSock v1.1 and WinSock v2.
+ (__WSA_ERRNO): New macro; use it to redefine all WSA specific error
+ codes, except WSABASEERR, relative to WSABASEERR itself.
+
2017-09-15 Keith Marshall <kei...@us...>
Factor <sys/time.h> duplicate content out of winsock headers.
diff --git a/w32api/include/winerror.h b/w32api/include/winerror.h
index 2ddfbd8..a059df1 100644
--- a/w32api/include/winerror.h
+++ b/w32api/include/winerror.h
@@ -31,9 +31,15 @@
*
*/
#ifndef _WINERROR_H
-#define _WINERROR_H
#pragma GCC system_header
+#ifndef __WINSOCK_H_SOURCED__
+/* Part of this header is available for selective inclusion by <winsock.h>;
+ * mark it as fully processed, only when NOT so included; otherwise, occlude
+ * those parts which are not relevant for <winsock.h>
+ */
+#define _WINERROR_H
+
#define _HRESULT_TYPEDEF_(_sc) ((HRESULT)(_sc))
#define ERROR_SUCCESS 0L
@@ -1592,106 +1598,169 @@
#define DNS_ERROR_DP_ALREADY_ENLISTED 9904L
#define DNS_ERROR_DP_NOT_AVAILABLE 9905L
-#ifndef WSABASEERR
-/* FIXME: Guarding this is inappropriate; wherever else these constants may
- * be defined, we should give the compiler an opportunity to check them for
- * consistency, and the guard denies any such opportunity. Alternatively,
- * we may consider guarding the remainder of the header content, such that
- * these definitions may be exposed selectively, from THIS location ONLY,
- * or delete them from here, and include them selectively from elsewhere.
+/* This ends the first group of error codes which are to be occluded
+ * when selectively included by <winsock.h>
*/
-#define WSABASEERR 10000L
-#define WSAEINTR 10004L
-#define WSAEBADF 10009L
-#define WSAEACCES 10013L
-#define WSAEFAULT 10014L
-#define WSAEINVAL 10022L
-#define WSAEMFILE 10024L
-#define WSAEWOULDBLOCK 10035L
-#define WSAEINPROGRESS 10036L
-#define WSAEALREADY 10037L
-#define WSAENOTSOCK 10038L
-#define WSAEDESTADDRREQ 10039L
-#define WSAEMSGSIZE 10040L
-#define WSAEPROTOTYPE 10041L
-#define WSAENOPROTOOPT 10042L
-#define WSAEPROTONOSUPPORT 10043L
-#define WSAESOCKTNOSUPPORT 10044L
-#define WSAEOPNOTSUPP 10045L
-#define WSAEPFNOSUPPORT 10046L
-#define WSAEAFNOSUPPORT 10047L
-#define WSAEADDRINUSE 10048L
-#define WSAEADDRNOTAVAIL 10049L
-#define WSAENETDOWN 10050L
-#define WSAENETUNREACH 10051L
-#define WSAENETRESET 10052L
-#define WSAECONNABORTED 10053L
-#define WSAECONNRESET 10054L
-#define WSAENOBUFS 10055L
-#define WSAEISCONN 10056L
-#define WSAENOTCONN 10057L
-#define WSAESHUTDOWN 10058L
-#define WSAETOOMANYREFS 10059L
-#define WSAETIMEDOUT 10060L
-#define WSAECONNREFUSED 10061L
-#define WSAELOOP 10062L
-#define WSAENAMETOOLONG 10063L
-#define WSAEHOSTDOWN 10064L
-#define WSAEHOSTUNREACH 10065L
-#define WSAENOTEMPTY 10066L
-#define WSAEPROCLIM 10067L
-#define WSAEUSERS 10068L
-#define WSAEDQUOT 10069L
-#define WSAESTALE 10070L
-#define WSAEREMOTE 10071L
-#define WSASYSNOTREADY 10091L
-#define WSAVERNOTSUPPORTED 10092L
-#define WSANOTINITIALISED 10093L
-#define WSAEDISCON 10101L
-#define WSAENOMORE 10102L
-#define WSAECANCELLED 10103L
-#define WSAEINVALIDPROCTABLE 10104L
-#define WSAEINVALIDPROVIDER 10105L
-#define WSAEPROVIDERFAILEDINIT 10106L
-#define WSASYSCALLFAILURE 10107L
-#define WSASERVICE_NOT_FOUND 10108L
-#define WSATYPE_NOT_FOUND 10109L
-#define WSA_E_NO_MORE 10110L
-#define WSA_E_CANCELLED 10111L
-#define WSAEREFUSED 10112L
-#define WSAHOST_NOT_FOUND 11001L
-#define WSATRY_AGAIN 11002L
-#define WSANO_RECOVERY 11003L
-#define WSANO_DATA 11004L
-#define WSA_QOS_RECEIVERS 11005L
-#define WSA_QOS_SENDERS 11006L
-#define WSA_QOS_NO_SENDERS 11007L
-#define WSA_QOS_NO_RECEIVERS 11008L
-#define WSA_QOS_REQUEST_CONFIRMED 11009L
-#define WSA_QOS_ADMISSION_FAILURE 11010L
-#define WSA_QOS_POLICY_FAILURE 11011L
-#define WSA_QOS_BAD_STYLE 11012L
-#define WSA_QOS_BAD_OBJECT 11013L
-#define WSA_QOS_TRAFFIC_CTRL_ERROR 11014L
-#define WSA_QOS_GENERIC_ERROR 11015L
-#define WSA_QOS_ESERVICETYPE 11016L
-#define WSA_QOS_EFLOWSPEC 11017L
-#define WSA_QOS_EPROVSPECBUF 11018L
-#define WSA_QOS_EFILTERSTYLE 11019L
-#define WSA_QOS_EFILTERTYPE 11020L
-#define WSA_QOS_EFILTERCOUNT 11021L
-#define WSA_QOS_EOBJLENGTH 11022L
-#define WSA_QOS_EFLOWCOUNT 11023L
-#define WSA_QOS_EUNKOWNPSOBJ 11024L
-#define WSA_QOS_EPOLICYOBJ 11025L
-#define WSA_QOS_EFLOWDESC 11026L
-#define WSA_QOS_EPSFLOWSPEC 11027L
-#define WSA_QOS_EPSFILTERSPEC 11028L
-#define WSA_QOS_ESDMODEOBJ 11029L
-#define WSA_QOS_ESHAPERATEOBJ 11030L
-#define WSA_QOS_RESERVED_PETYPE 11031L
-#endif /* !WSABASEERR */
+#endif /* !__WINSOCK_H_SOURCED__ */
+/* The following are to be defined both when including <winerror.h> directly,
+ * and when including it selectively, via <winsock.h>; (those codes which are
+ * specific to WinSock v2 are excluded, during selective inclusion, unless
+ * <winsock.h> itself is included on behalf of <winsock2.h>).
+ */
+#undef __WINSOCK_V1_ERRORS__
+#if ! (defined _WINERROR_H && defined _WINSOCK_H)
+/* Error codes for WinSock v1 must be defined if either _WINERROR_H is
+ * defined, (indicating direct inclusion of <winerror.h>), or _WINSOCK_H
+ * is defined, (indicating possible indirect inclusion via <winsock.h>),
+ * but if both are defined, this must be the second pass through these
+ * definitions; there is no need to process them a second time.
+ */
+# define __WINSOCK_V1_ERRORS__ (defined _WINERROR_H || defined _WINSOCK_H)
+#endif
+
+#if __WINSOCK_V1_ERRORS__
+/* The following group of error codes are applicable to both WinSock v1,
+ * and WinSock v2 protocols, and we have yet to define them; do so now,
+ * noting that all are biased by addition of WSABASEERR.
+ */
+#define __WSA_ERRNO(N) (WSABASEERR + (N))
+#define WSABASEERR 10000L
+
+#define WSAEINTR __WSA_ERRNO( 4 ) /* 10004L */
+#define WSAEBADF __WSA_ERRNO( 9 ) /* 10009L */
+#define WSAEACCES __WSA_ERRNO( 13 ) /* 10013L */
+#define WSAEFAULT __WSA_ERRNO( 14 ) /* 10014L */
+#define WSAEINVAL __WSA_ERRNO( 22 ) /* 10022L */
+#define WSAEMFILE __WSA_ERRNO( 24 ) /* 10024L */
+#define WSAEWOULDBLOCK __WSA_ERRNO( 35 ) /* 10035L */
+#define WSAEINPROGRESS __WSA_ERRNO( 36 ) /* 10036L */
+#define WSAEALREADY __WSA_ERRNO( 37 ) /* 10037L */
+#define WSAENOTSOCK __WSA_ERRNO( 38 ) /* 10038L */
+#define WSAEDESTADDRREQ __WSA_ERRNO( 39 ) /* 10039L */
+#define WSAEMSGSIZE __WSA_ERRNO( 40 ) /* 10040L */
+#define WSAEPROTOTYPE __WSA_ERRNO( 41 ) /* 10041L */
+#define WSAENOPROTOOPT __WSA_ERRNO( 42 ) /* 10042L */
+#define WSAEPROTONOSUPPORT __WSA_ERRNO( 43 ) /* 10043L */
+#define WSAESOCKTNOSUPPORT __WSA_ERRNO( 44 ) /* 10044L */
+#define WSAEOPNOTSUPP __WSA_ERRNO( 45 ) /* 10045L */
+#define WSAEPFNOSUPPORT __WSA_ERRNO( 46 ) /* 10046L */
+#define WSAEAFNOSUPPORT __WSA_ERRNO( 47 ) /* 10047L */
+#define WSAEADDRINUSE __WSA_ERRNO( 48 ) /* 10048L */
+#define WSAEADDRNOTAVAIL __WSA_ERRNO( 49 ) /* 10049L */
+#define WSAENETDOWN __WSA_ERRNO( 50 ) /* 10050L */
+#define WSAENETUNREACH __WSA_ERRNO( 51 ) /* 10051L */
+#define WSAENETRESET __WSA_ERRNO( 52 ) /* 10052L */
+#define WSAECONNABORTED __WSA_ERRNO( 53 ) /* 10053L */
+#define WSAECONNRESET __WSA_ERRNO( 54 ) /* 10054L */
+#define WSAENOBUFS __WSA_ERRNO( 55 ) /* 10055L */
+#define WSAEISCONN __WSA_ERRNO( 56 ) /* 10056L */
+#define WSAENOTCONN __WSA_ERRNO( 57 ) /* 10057L */
+#define WSAESHUTDOWN __WSA_ERRNO( 58 ) /* 10058L */
+#define WSAETOOMANYREFS __WSA_ERRNO( 59 ) /* 10059L */
+#define WSAETIMEDOUT __WSA_ERRNO( 60 ) /* 10060L */
+#define WSAECONNREFUSED __WSA_ERRNO( 61 ) /* 10061L */
+#define WSAELOOP __WSA_ERRNO( 62 ) /* 10062L */
+#define WSAENAMETOOLONG __WSA_ERRNO( 63 ) /* 10063L */
+#define WSAEHOSTDOWN __WSA_ERRNO( 64 ) /* 10064L */
+#define WSAEHOSTUNREACH __WSA_ERRNO( 65 ) /* 10065L */
+#define WSAENOTEMPTY __WSA_ERRNO( 66 ) /* 10066L */
+#define WSAEPROCLIM __WSA_ERRNO( 67 ) /* 10067L */
+#define WSAEUSERS __WSA_ERRNO( 68 ) /* 10068L */
+#define WSAEDQUOT __WSA_ERRNO( 69 ) /* 10069L */
+#define WSAESTALE __WSA_ERRNO( 70 ) /* 10070L */
+#define WSAEREMOTE __WSA_ERRNO( 71 ) /* 10071L */
+#define WSASYSNOTREADY __WSA_ERRNO( 91 ) /* 10091L */
+#define WSAVERNOTSUPPORTED __WSA_ERRNO( 92 ) /* 10092L */
+#define WSANOTINITIALISED __WSA_ERRNO( 93 ) /* 10093L */
+#define WSAEDISCON __WSA_ERRNO( 101 ) /* 10101L */
+#endif /* __WINSOCK_V1_ERRORS__ */
+
+#undef __WINSOCK_V2_ERRORS__
+#if ! (defined _WINERROR_H && defined _WINSOCK2_H)
+/* Error codes for WinSock v2 must be defined if either _WINERROR_H is
+ * defined, (indicating direct inclusion of <winerror.h>), or _WINSOCK2_H
+ * is defined, (indicating possible indirect inclusion via <winsock.h> on
+ * behalf of <winsock2.h>), but if both are defined, it is implicit that
+ * this must be the second pass through these definitions; there is no
+ * need to process them a second time.
+ */
+# define __WINSOCK_V2_ERRORS__ (defined _WINERROR_H || defined _WINSOCK2_H)
+#endif
+
+#if __WINSOCK_V2_ERRORS__
+/* The following group of error codes are specific to the WinSock v2 protocol;
+ * their definitions are suppressed during selective inclusion by <winsock.h>,
+ * when such inclusion has not been requested by <winsock2.h>
+ */
+#define WSAENOMORE __WSA_ERRNO( 102 ) /* 10102L */
+#define WSAECANCELLED __WSA_ERRNO( 103 ) /* 10103L */
+#define WSAEINVALIDPROCTABLE __WSA_ERRNO( 104 ) /* 10104L */
+#define WSAEINVALIDPROVIDER __WSA_ERRNO( 105 ) /* 10105L */
+#define WSAEPROVIDERFAILEDINIT __WSA_ERRNO( 106 ) /* 10106L */
+#define WSASYSCALLFAILURE __WSA_ERRNO( 107 ) /* 10107L */
+#define WSASERVICE_NOT_FOUND __WSA_ERRNO( 108 ) /* 10108L */
+#define WSATYPE_NOT_FOUND __WSA_ERRNO( 109 ) /* 10109L */
+#define WSA_E_NO_MORE __WSA_ERRNO( 110 ) /* 10110L */
+#define WSA_E_CANCELLED __WSA_ERRNO( 111 ) /* 10111L */
+#define WSAEREFUSED __WSA_ERRNO( 112 ) /* 10112L */
+#endif /* __WINSOCK_V2_ERRORS__ */
+
+#if __WINSOCK_V1_ERRORS__
+/* A further group of error codes which apply to both WinSock v1, and WinSock v2
+ * protocols; collated here to preserve numerical sort order across both groups.
+ */
+#define WSAHOST_NOT_FOUND __WSA_ERRNO( 1001 ) /* 11001L */
+#define WSATRY_AGAIN __WSA_ERRNO( 1002 ) /* 11002L */
+#define WSANO_RECOVERY __WSA_ERRNO( 1003 ) /* 11003L */
+#define WSANO_DATA __WSA_ERRNO( 1004 ) /* 11004L */
+#endif /* __WINSOCK_V1_ERRORS__ */
+
+#if __WINSOCK_V2_ERRORS__
+/* WinSock v2 Quality of Service errors; once again, these definitions are
+ * suppressed during selective inclusion by <winsock.h>, unless inclusion is
+ * on behalf of <winsock2.h>
+ */
+#define WSA_QOS_RECEIVERS __WSA_ERRNO( 1005 ) /* 11005L */
+#define WSA_QOS_SENDERS __WSA_ERRNO( 1006 ) /* 11006L */
+#define WSA_QOS_NO_SENDERS __WSA_ERRNO( 1007 ) /* 11007L */
+#define WSA_QOS_NO_RECEIVERS __WSA_ERRNO( 1008 ) /* 11008L */
+#define WSA_QOS_REQUEST_CONFIRMED __WSA_ERRNO( 1009 ) /* 11009L */
+#define WSA_QOS_ADMISSION_FAILURE __WSA_ERRNO( 1010 ) /* 11010L */
+#define WSA_QOS_POLICY_FAILURE __WSA_ERRNO( 1011 ) /* 11011L */
+#define WSA_QOS_BAD_STYLE __WSA_ERRNO( 1012 ) /* 11012L */
+#define WSA_QOS_BAD_OBJECT __WSA_ERRNO( 1013 ) /* 11013L */
+#define WSA_QOS_TRAFFIC_CTRL_ERROR __WSA_ERRNO( 1014 ) /* 11014L */
+#define WSA_QOS_GENERIC_ERROR __WSA_ERRNO( 1015 ) /* 11015L */
+#define WSA_QOS_ESERVICETYPE __WSA_ERRNO( 1016 ) /* 11016L */
+#define WSA_QOS_EFLOWSPEC __WSA_ERRNO( 1017 ) /* 11017L */
+#define WSA_QOS_EPROVSPECBUF __WSA_ERRNO( 1018 ) /* 11018L */
+#define WSA_QOS_EFILTERSTYLE __WSA_ERRNO( 1019 ) /* 11019L */
+#define WSA_QOS_EFILTERTYPE __WSA_ERRNO( 1020 ) /* 11020L */
+#define WSA_QOS_EFILTERCOUNT __WSA_ERRNO( 1021 ) /* 11021L */
+#define WSA_QOS_EOBJLENGTH __WSA_ERRNO( 1022 ) /* 11022L */
+#define WSA_QOS_EFLOWCOUNT __WSA_ERRNO( 1023 ) /* 11023L */
+#define WSA_QOS_EUNKOWNPSOBJ __WSA_ERRNO( 1024 ) /* 11024L */
+#define WSA_QOS_EPOLICYOBJ __WSA_ERRNO( 1025 ) /* 11025L */
+#define WSA_QOS_EFLOWDESC __WSA_ERRNO( 1026 ) /* 11026L */
+#define WSA_QOS_EPSFLOWSPEC __WSA_ERRNO( 1027 ) /* 11027L */
+#define WSA_QOS_EPSFILTERSPEC __WSA_ERRNO( 1028 ) /* 11028L */
+#define WSA_QOS_ESDMODEOBJ __WSA_ERRNO( 1029 ) /* 11029L */
+#define WSA_QOS_ESHAPERATEOBJ __WSA_ERRNO( 1030 ) /* 11030L */
+#define WSA_QOS_RESERVED_PETYPE __WSA_ERRNO( 1031 ) /* 11031L */
+#endif /* __WINSOCK_V2_ERRORS__ */
+
+/* Regardless of which groups, if any, of WinSock error codes may have been
+ * defined on this occasion, we no longer require their selectors; clean up
+ * the namespace.
+ */
+#undef __WINSOCK_V1_ERRORS__
+#undef __WINSOCK_V2_ERRORS__
+
+#ifdef _WINERROR_H
+/* The remaining error codes defined below are to be exposed ONLY when
+ * <winerror.h> is included directly, in its own right.
+ */
#define ERROR_IPSEC_QM_POLICY_EXISTS 13000L
#define ERROR_IPSEC_QM_POLICY_NOT_FOUND 13001L
#define ERROR_IPSEC_QM_POLICY_IN_USE 13002L
@@ -1882,7 +1951,7 @@
#define ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE 14079L
#define ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME 14080L
-//Crypto realted errors
+/* Crypto realted errors */
#define CRYPT_E_NOT_FOUND _HRESULT_TYPEDEF_(0x80092004L)
#define CRYPT_E_EXISTS _HRESULT_TYPEDEF_(0x80092005L)
#define CRYPT_E_NO_PROVIDER _HRESULT_TYPEDEF_(0x80092006L)
@@ -2337,5 +2406,6 @@
#define NTE_TOKEN_KEYSET_STORAGE_FULL ((HRESULT)(0x80090023L))
#define NTE_TEMPORARY_PROFILE ((HRESULT)(0x80090024L))
#define NTE_FIXEDPARAMETER ((HRESULT)(0x80090025L))
+#endif /* _WINERROR_H */
#endif /* !_WINERROR_H: $RCSfile$: end of file */
diff --git a/w32api/include/winsock.h b/w32api/include/winsock.h
index 715d736..8ddb9c2 100644
--- a/w32api/include/winsock.h
+++ b/w32api/include/winsock.h
@@ -48,6 +48,7 @@
#define __WINSOCK_H_SOURCED__ 1
#include <windows.h>
+#include <winerror.h>
#include <sys/bsdtypes.h>
#include <sys/time.h>
@@ -430,66 +431,6 @@ struct sockproto
#define FD_CONNECT 16
#define FD_CLOSE 32
-#ifndef WSABASEERR
-/* FIXME: WinSock error codes are properly defined in <winerror.h>,
- * whence we should include them selectively, rather than incurring
- * the maintenance burden of duplicating them here.
- */
-#define WSABASEERR 10000
-#define WSAEINTR (WSABASEERR + 4)
-#define WSAEBADF (WSABASEERR + 9)
-#define WSAEACCES (WSABASEERR + 13)
-#define WSAEFAULT (WSABASEERR + 14)
-#define WSAEINVAL (WSABASEERR + 22)
-#define WSAEMFILE (WSABASEERR + 24)
-#define WSAEWOULDBLOCK (WSABASEERR + 35)
-#define WSAEINPROGRESS (WSABASEERR + 36)
-#define WSAEALREADY (WSABASEERR + 37)
-#define WSAENOTSOCK (WSABASEERR + 38)
-#define WSAEDESTADDRREQ (WSABASEERR + 39)
-#define WSAEMSGSIZE (WSABASEERR + 40)
-#define WSAEPROTOTYPE (WSABASEERR + 41)
-#define WSAENOPROTOOPT (WSABASEERR + 42)
-#define WSAEPROTONOSUPPORT (WSABASEERR + 43)
-#define WSAESOCKTNOSUPPORT (WSABASEERR + 44)
-#define WSAEOPNOTSUPP (WSABASEERR + 45)
-#define WSAEPFNOSUPPORT (WSABASEERR + 46)
-#define WSAEAFNOSUPPORT (WSABASEERR + 47)
-#define WSAEADDRINUSE (WSABASEERR + 48)
-#define WSAEADDRNOTAVAIL (WSABASEERR + 49)
-#define WSAENETDOWN (WSABASEERR + 50)
-#define WSAENETUNREACH (WSABASEERR + 51)
-#define WSAENETRESET (WSABASEERR + 52)
-#define WSAECONNABORTED (WSABASEERR + 53)
-#define WSAECONNRESET (WSABASEERR + 54)
-#define WSAENOBUFS (WSABASEERR + 55)
-#define WSAEISCONN (WSABASEERR + 56)
-#define WSAENOTCONN (WSABASEERR + 57)
-#define WSAESHUTDOWN (WSABASEERR + 58)
-#define WSAETOOMANYREFS (WSABASEERR + 59)
-#define WSAETIMEDOUT (WSABASEERR + 60)
-#define WSAECONNREFUSED (WSABASEERR + 61)
-#define WSAELOOP (WSABASEERR + 62)
-#define WSAENAMETOOLONG (WSABASEERR + 63)
-#define WSAEHOSTDOWN (WSABASEERR + 64)
-#define WSAEHOSTUNREACH (WSABASEERR + 65)
-#define WSAENOTEMPTY (WSABASEERR + 66)
-#define WSAEPROCLIM (WSABASEERR + 67)
-#define WSAEUSERS (WSABASEERR + 68)
-#define WSAEDQUOT (WSABASEERR + 69)
-#define WSAESTALE (WSABASEERR + 70)
-#define WSAEREMOTE (WSABASEERR + 71)
-#define WSAEDISCON (WSABASEERR + 101)
-#define WSASYSNOTREADY (WSABASEERR + 91)
-#define WSAVERNOTSUPPORTED (WSABASEERR + 92)
-#define WSANOTINITIALISED (WSABASEERR + 93)
-#define WSAHOST_NOT_FOUND (WSABASEERR + 1001)
-#define WSATRY_AGAIN (WSABASEERR + 1002)
-#define WSANO_RECOVERY (WSABASEERR + 1003)
-#define WSANO_DATA (WSABASEERR + 1004)
-
-#endif /* ! WSABASEERR */
-
#define WSANO_ADDRESS WSANO_DATA
#if ! (defined __INSIDE_CYGWIN__ || defined __INSIDE_MSYS__)
diff --git a/w32api/include/winsock2.h b/w32api/include/winsock2.h
index 2ff4f42..c9e51c4 100644
--- a/w32api/include/winsock2.h
+++ b/w32api/include/winsock2.h
@@ -47,6 +47,7 @@
#define __WINSOCK_H_SOURCED__ 1
#include <windows.h>
+#include <winerror.h>
#include <sys/bsdtypes.h>
#include <sys/time.h>
@@ -489,108 +490,6 @@ struct sockproto
#define FD_MAX_EVENTS 10
#define FD_ALL_EVENTS ((1 << FD_MAX_EVENTS) - 1)
-#ifndef WSABASEERR
-/* FIXME: WinSock error codes are properly defined in <winerror.h>,
- * whence we should include them selectively, rather than incurring
- * the maintenance burden of duplicating them here.
- */
-#define WSABASEERR 10000
-#define WSAEINTR (WSABASEERR + 4)
-#define WSAEBADF (WSABASEERR + 9)
-#define WSAEACCES (WSABASEERR + 13)
-#define WSAEFAULT (WSABASEERR + 14)
-#define WSAEINVAL (WSABASEERR + 22)
-#define WSAEMFILE (WSABASEERR + 24)
-#define WSAEWOULDBLOCK (WSABASEERR + 35)
-#define WSAEINPROGRESS (WSABASEERR + 36) /* deprecated in WinSock v2 */
-#define WSAEALREADY (WSABASEERR + 37)
-#define WSAENOTSOCK (WSABASEERR + 38)
-#define WSAEDESTADDRREQ (WSABASEERR + 39)
-#define WSAEMSGSIZE (WSABASEERR + 40)
-#define WSAEPROTOTYPE (WSABASEERR + 41)
-#define WSAENOPROTOOPT (WSABASEERR + 42)
-#define WSAEPROTONOSUPPORT (WSABASEERR + 43)
-#define WSAESOCKTNOSUPPORT (WSABASEERR + 44)
-#define WSAEOPNOTSUPP (WSABASEERR + 45)
-#define WSAEPFNOSUPPORT (WSABASEERR + 46)
-#define WSAEAFNOSUPPORT (WSABASEERR + 47)
-#define WSAEADDRINUSE (WSABASEERR + 48)
-#define WSAEADDRNOTAVAIL (WSABASEERR + 49)
-#define WSAENETDOWN (WSABASEERR + 50)
-#define WSAENETUNREACH (WSABASEERR + 51)
-#define WSAENETRESET (WSABASEERR + 52)
-#define WSAECONNABORTED (WSABASEERR + 53)
-#define WSAECONNRESET (WSABASEERR + 54)
-#define WSAENOBUFS (WSABASEERR + 55)
-#define WSAEISCONN (WSABASEERR + 56)
-#define WSAENOTCONN (WSABASEERR + 57)
-#define WSAESHUTDOWN (WSABASEERR + 58)
-#define WSAETOOMANYREFS (WSABASEERR + 59)
-#define WSAETIMEDOUT (WSABASEERR + 60)
-#define WSAECONNREFUSED (WSABASEERR + 61)
-#define WSAELOOP (WSABASEERR + 62)
-#define WSAENAMETOOLONG (WSABASEERR + 63)
-#define WSAEHOSTDOWN (WSABASEERR + 64)
-#define WSAEHOSTUNREACH (WSABASEERR + 65)
-#define WSAENOTEMPTY (WSABASEERR + 66)
-#define WSAEPROCLIM (WSABASEERR + 67)
-#define WSAEUSERS (WSABASEERR + 68)
-#define WSAEDQUOT (WSABASEERR + 69)
-#define WSAESTALE (WSABASEERR + 70)
-#define WSAEREMOTE (WSABASEERR + 71)
-#define WSAEDISCON (WSABASEERR + 101)
-#define WSASYSNOTREADY (WSABASEERR + 91)
-#define WSAVERNOTSUPPORTED (WSABASEERR + 92)
-#define WSANOTINITIALISED (WSABASEERR + 93)
-#define WSAHOST_NOT_FOUND (WSABASEERR + 1001)
-#define WSATRY_AGAIN (WSABASEERR + 1002)
-#define WSANO_RECOVERY (WSABASEERR + 1003)
-#define WSANO_DATA (WSABASEERR + 1004)
-
-/* WinSock2 specific error codes */
-#define WSAENOMORE (WSABASEERR + 102)
-#define WSAECANCELLED (WSABASEERR + 103)
-#define WSAEINVALIDPROCTABLE (WSABASEERR + 104)
-#define WSAEINVALIDPROVIDER (WSABASEERR + 105)
-#define WSAEPROVIDERFAILEDINIT (WSABASEERR + 106)
-#define WSASYSCALLFAILURE (WSABASEERR + 107)
-#define WSASERVICE_NOT_FOUND (WSABASEERR + 108)
-#define WSATYPE_NOT_FOUND (WSABASEERR + 109)
-#define WSA_E_NO_MORE (WSABASEERR + 110)
-#define WSA_E_CANCELLED (WSABASEERR + 111)
-#define WSAEREFUSED (WSABASEERR + 112)
-
-/* WS QualityofService errors */
-#define WSA_QOS_RECEIVERS (WSABASEERR + 1005)
-#define WSA_QOS_SENDERS (WSABASEERR + 1006)
-#define WSA_QOS_NO_SENDERS (WSABASEERR + 1007)
-#define WSA_QOS_NO_RECEIVERS (WSABASEERR + 1008)
-#define WSA_QOS_REQUEST_CONFIRMED (WSABASEERR + 1009)
-#define WSA_QOS_ADMISSION_FAILURE (WSABASEERR + 1010)
-#define WSA_QOS_POLICY_FAILURE (WSABASEERR + 1011)
-#define WSA_QOS_BAD_STYLE (WSABASEERR + 1012)
-#define WSA_QOS_BAD_OBJECT (WSABASEERR + 1013)
-#define WSA_QOS_TRAFFIC_CTRL_ERROR (WSABASEERR + 1014)
-#define WSA_QOS_GENERIC_ERROR (WSABASEERR + 1015)
-#define WSA_QOS_ESERVICETYPE (WSABASEERR + 1016)
-#define WSA_QOS_EFLOWSPEC (WSABASEERR + 1017)
-#define WSA_QOS_EPROVSPECBUF (WSABASEERR + 1018)
-#define WSA_QOS_EFILTERSTYLE (WSABASEERR + 1019)
-#define WSA_QOS_EFILTERTYPE (WSABASEERR + 1020)
-#define WSA_QOS_EFILTERCOUNT (WSABASEERR + 1021)
-#define WSA_QOS_EOBJLENGTH (WSABASEERR + 1022)
-#define WSA_QOS_EFLOWCOUNT (WSABASEERR + 1023)
-#define WSA_QOS_EUNKOWNPSOBJ (WSABASEERR + 1024)
-#define WSA_QOS_EPOLICYOBJ (WSABASEERR + 1025)
-#define WSA_QOS_EFLOWDESC (WSABASEERR + 1026)
-#define WSA_QOS_EPSFLOWSPEC (WSABASEERR + 1027)
-#define WSA_QOS_EPSFILTERSPEC (WSABASEERR + 1028)
-#define WSA_QOS_ESDMODEOBJ (WSABASEERR + 1029)
-#define WSA_QOS_ESHAPERATEOBJ (WSABASEERR + 1030)
-#define WSA_QOS_RESERVED_PETYPE (WSABASEERR + 1031)
-
-#endif /* ! WSABASEERR */
-
#define WSANO_ADDRESS WSANO_DATA
#if ! (defined __INSIDE_CYGWIN__ || defined __INSIDE_MSYS__)
https://sf.net/p/mingw/mingw-org-wsl/ci/0fe24734253ddb48495cd0bd04d1beb1fd23345a/
commit 0fe24734253ddb48495cd0bd04d1beb1fd23345a
Author: Keith Marshall <kei...@us...>
Date: Fri Sep 15 21:35:48 2017 +0100
Factor <sys/time.h> duplicate content out of winsock headers.
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index 4e7500d..9886e4c 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,16 @@
+2017-09-15 Keith Marshall <kei...@us...>
+
+ Factor <sys/time.h> duplicate content out of winsock headers.
+
+ * include/sys/time.h: Assert copyright; tidy layout.
+ [_BEGIN_C_DECLS, _END_C_DECLS]: Use them to avoid C++ name mangling.
+ [__WINSOCK_H_SOURCED__] (_SYS_TIME_H): Do not define it; hence...
+ [!defined _SYS_TIME_H]: ...selectively expose definitions for only...
+ (timerclear, timerisset, timercmp): ...these functional macros, and...
+ (struct timeval): ...this data type; inhibit redefinition on...
+ [defined _SYS_TIME_H && _WINSOCK_H]: ...second reading.
+ (_TIMEVAL_DEFINED): Do not define; it isn't required.
+
2017-09-09 Keith Marshall <kei...@us...>
Factor BSD non-standard type definitions into common header.
diff --git a/mingwrt/include/sys/time.h b/mingwrt/include/sys/time.h
index e11a2ba..c2d9839 100644
--- a/mingwrt/include/sys/time.h
+++ b/mingwrt/include/sys/time.h
@@ -1,47 +1,114 @@
-#ifndef _SYS_TIME_H_
-#define _SYS_TIME_H_
+/*
+ * sys/time.h
+ *
+ * Time type definitions pertaining to system timer and clock APIs
+ *
+ *
+ * $Id$
+ *
+ * Written by Danny Smith <dan...@us...>
+ * Copyright (C) 2002, 2004, 2006, 2007, 2017, MinGW.org Project
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+#ifndef _SYS_TIME_H
+#pragma GCC system_header
+
+#ifndef __WINSOCK_H_SOURCED__
+#define _SYS_TIME_H
+
+/* FIXME: Do we need to do this? There's nothing here which
+ * explicitly requires it; are users entitled to assume that
+ * including <sys/time.h> will also expose all of <time.h>?
+ * (If not <time.h>, we do need <_mingw.h> instead).
+ */
#include <time.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+_BEGIN_C_DECLS
-#ifndef _TIMEVAL_DEFINED /* also in winsock[2].h */
-#define _TIMEVAL_DEFINED
-struct timeval {
- long tv_sec;
- long tv_usec;
-};
-#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
-#define timercmp(tvp, uvp, cmp) \
- (((tvp)->tv_sec != (uvp)->tv_sec) ? \
- ((tvp)->tv_sec cmp (uvp)->tv_sec) : \
- ((tvp)->tv_usec cmp (uvp)->tv_usec))
-#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
-#endif /* _TIMEVAL_DEFINED */
-
-/* Provided for compatibility with code that assumes that
- the presence of gettimeofday function implies a definition
- of struct timezone. */
-struct timezone
-{
- int tz_minuteswest; /* of Greenwich */
- int tz_dsttime; /* type of dst correction to apply */
+#endif /* !__WINSOCK_H_SOURCED__ */
+
+#if ! (defined _SYS_TIME_H && defined _WINSOCK_H)
+/* The following definitions must be exposed both when <sys/time.h>
+ * is included in its own right, and when it is included selectively
+ * on behalf of <winsock.h>, but they must not be processed twice.
+ */
+struct timeval
+{ /* Nominally a BSD or POSIX.1 structure, (with tv_sec declared as
+ * time_t), but subverted by Microsoft with tv_sec declared as long,
+ * to avoid __time32_t vs. __time64_t ambiguity; (tv_sec is ALWAYS
+ * a 32-bit entity in Windows' use of this structure). Addionally,
+ * POSIX.1-2001 mandates that tv_usec should be suseconds_t, (which
+ * is nominally an alias for long), but we retain long to maintain
+ * consistency with Microsoft usage.
+ */
+ long tv_sec; /* whole number of seconds in interval */
+ long tv_usec; /* additional fraction as microseconds */
};
-/*
- Implementation as per:
- The Open Group Base Specifications, Issue 6
- IEEE Std 1003.1, 2004 Edition
+/* FIXME: The following convenience macros, for manipulating data in
+ * timeval structures, are derived from BSD; they are neither standard
+ * in Windows code, nor specified in POSIX.1, but have been adopted by
+ * GNU. Consider making them dependent on _BSD_SOURCE or _GNU_SOURCE
+ * feature test filters, (but note that <winsock.h> must be able to
+ * expose timerclear, timerisset, and timercmp, regardless of the
+ * order in which <sys/time.h> and <winsock.h> are included).
+ */
+#define timerclear( tvp ) (tvp)->tv_sec = (tvp)->tv_usec = 0
+#define timerisset( tvp ) ((tvp)->tv_sec || (tvp)->tv_usec)
+
+#define timercmp( tvp, uvp, cmp ) (((tvp)->tv_sec != (uvp)->tv_sec) \
+ ? ((tvp)->tv_sec cmp (uvp)->tv_sec) \
+ : ((tvp)->tv_usec cmp (uvp)->tv_usec))
+
+#endif /* ! (_SYS_TIME_H && _WINSOCK_H) */
- The timezone pointer arg is ignored. Errors are ignored.
-*/
-int __cdecl __MINGW_NOTHROW gettimeofday(struct timeval *__restrict__,
- void *__restrict__ /* tzp (unused) */);
+#ifdef _SYS_TIME_H
+struct timezone
+{ /* FIXME: Deprecate this...
+ * Provided for compatibility with code that assumes that the
+ * presence of the gettimeofday() function implies that it may
+ * be safely assumed that a definition of struct timezone will
+ * also be provided. This is an obsolete derivative from BSD;
+ * DO NOT USE IT!
+ */
+ int tz_minuteswest; /* of the Greenwich meridian */
+ int tz_dsttime; /* type of DST correction to apply */
+};
-#ifdef __cplusplus
-}
-#endif
+/* Declaration of POSIX.1 compatible gettimeofday() function:
+ *
+ * Implementation per POSIX.1-1996, (declared obsolescent in POSIX.1-2008),
+ * as described in the Open Group Base Specification, Issue 7, which is also
+ * designated as IEEE Std 1003.1, 2016 Edition; the struct timezone pointer
+ * argument of some Unix implementations (declared as a pointer to void in
+ * POSIX.1) is ignored, as are all error conditions.
+ *
+ * FIXME: Deprecate this for _POSIX_C_SOURCE >= 200809L
+ */
+int __cdecl __MINGW_NOTHROW gettimeofday
+(struct timeval *__restrict__, void *__restrict__ /* tzp (unused) */);
+_END_C_DECLS
-#endif /* _SYS_TIME_H_ */
+#endif /* _SYS_TIME_H */
+#endif /* !_SYS_TIME_H: $RCSfile$: end of file */
diff --git a/w32api/ChangeLog b/w32api/ChangeLog
index 02dd0f0..5e2adf4 100644
--- a/w32api/ChangeLog
+++ b/w32api/ChangeLog
@@ -1,3 +1,13 @@
+2017-09-15 Keith Marshall <kei...@us...>
+
+ Factor <sys/time.h> duplicate content out of winsock headers.
+
+ * include/winsock.h include/winsock2.h [_TIMEVAL_DEFINED]: Delete
+ conditional block, and all its content; include <sys/time.h> instead.
+ (__WINSOCK_H_SOURCED__): New macro; define it temporarily, only while
+ processing this header, such that only selected content from other
+ internally referenced headers is exposed.
+
2017-09-09 Keith Marshall <kei...@us...>
Source BSD non-standard type definitions from mingwrt header.
diff --git a/w32api/include/winsock.h b/w32api/include/winsock.h
index d2511ec..715d736 100644
--- a/w32api/include/winsock.h
+++ b/w32api/include/winsock.h
@@ -45,9 +45,11 @@
#pragma GCC system_header
#define _GNU_H_WINDOWS32_SOCKETS
+#define __WINSOCK_H_SOURCED__ 1
#include <windows.h>
#include <sys/bsdtypes.h>
+#include <sys/time.h>
_BEGIN_C_DECLS
@@ -118,24 +120,6 @@ int PASCAL __WSAFDIsSet (SOCKET, fd_set *);
#if ! (defined __INSIDE_CYGWIN__ || defined __INSIDE_MSYS__)
-#ifndef _TIMEVAL_DEFINED
-/* FIXME: These should be factored out; they are properly defined
- * in <sys/time.h>, whence they should be included.
- */
-#define _TIMEVAL_DEFINED
-struct timeval
-{ long tv_sec;
- long tv_usec;
-};
-
-#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
-#define timercmp(tvp, uvp, cmp) \
- (((tvp)->tv_sec != (uvp)->tv_sec) ? \
- ((tvp)->tv_sec cmp (uvp)->tv_sec) : \
- ((tvp)->tv_usec cmp (uvp)->tv_usec))
-#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
-#endif /* _TIMEVAL_DEFINED */
-
struct hostent
{ char *h_name;
char **h_aliases;
@@ -614,4 +598,5 @@ _END_C_DECLS
*/
#include <mswsock.h>
+#undef __WINSOCK_H_SOURCED__
#endif /* _WINSOCK_H: $RCSfile$: end of file */
diff --git a/w32api/include/winsock2.h b/w32api/include/winsock2.h
index dc908f0..2ff4f42 100644
--- a/w32api/include/winsock2.h
+++ b/w32api/include/winsock2.h
@@ -44,9 +44,13 @@
#pragma GCC system_header
#define _GNU_H_WINDOWS32_SOCKETS
+#define __WINSOCK_H_SOURCED__ 1
#include <windows.h>
#include <sys/bsdtypes.h>
+#include <sys/time.h>
+
+#undef __WINSOCK_H_SOURCED__
#ifndef WINSOCK_API_LINKAGE
#ifdef __W32API_USE_DLLIMPORT__
@@ -138,24 +142,6 @@ int PASCAL __WSAFDIsSet (SOCKET, fd_set *);
#if ! (defined __INSIDE_CYGWIN__ || defined __INSIDE_MSYS__)
-#ifndef _TIMEVAL_DEFINED
-/* FIXME: These should be factored out; they are properly defined
- * in <sys/time.h>, whence they should be included.
- */
-#define _TIMEVAL_DEFINED
-struct timeval
-{ long tv_sec;
- long tv_usec;
-};
-
-#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
-#define timercmp(tvp, uvp, cmp) \
- (((tvp)->tv_sec != (uvp)->tv_sec) ? \
- ((tvp)->tv_sec cmp (uvp)->tv_sec) : \
- ((tvp)->tv_usec cmp (uvp)->tv_usec))
-#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
-#endif /* _TIMEVAL_DEFINED */
-
struct hostent
{ char *h_name;
char **h_aliases;
https://sf.net/p/mingw/mingw-org-wsl/ci/3c0c2afc402f9ca820a9452f941723d163eaad17/
commit 3c0c2afc402f9ca820a9452f941723d163eaad17
Author: Keith Marshall <kei...@us...>
Date: Sat Sep 9 14:52:14 2017 +0100
Source BSD non-standard type definitions from mingwrt header.
diff --git a/w32api/ChangeLog b/w32api/ChangeLog
index 1afc463..02dd0f0 100644
--- a/w32api/ChangeLog
+++ b/w32api/ChangeLog
@@ -1,3 +1,12 @@
+2017-09-09 Keith Marshall <kei...@us...>
+
+ Source BSD non-standard type definitions from mingwrt header.
+
+ * include/winsock.h include/winsock2.h [_BSDTYPES_DEFINED]: Delete
+ conditional block, and its entire type definition content; include...
+ * include/sys/bsdtypes.h: ...this common file instead; it defines...
+ (u_char, u_int, u_long, u_short): ...these non-standard data types.
+
2017-09-07 Keith Marshall <kei...@us...>
Correct misuse of __INSIDE_MSYS__ feature test.
diff --git a/w32api/include/winsock.h b/w32api/include/winsock.h
index ea95a7c..d2511ec 100644
--- a/w32api/include/winsock.h
+++ b/w32api/include/winsock.h
@@ -47,22 +47,10 @@
#define _GNU_H_WINDOWS32_SOCKETS
#include <windows.h>
+#include <sys/bsdtypes.h>
_BEGIN_C_DECLS
-#ifndef _BSDTYPES_DEFINED
-/* FIXME: these are also defined in mingwrt's <gmon.h> and in cygwin's
- * (i.e. newlib's) <sys/types>; we should factor them out, to their own
- * header file, and include that.
- */
-typedef unsigned char u_char;
-typedef unsigned short u_short;
-typedef unsigned int u_int;
-typedef unsigned long u_long;
-
-#define _BSDTYPES_DEFINED
-#endif /* !_BSDTYPES_DEFINED */
-
typedef u_int SOCKET;
#ifndef FD_SETSIZE
diff --git a/w32api/include/winsock2.h b/w32api/include/winsock2.h
index 437743d..dc908f0 100644
--- a/w32api/include/winsock2.h
+++ b/w32api/include/winsock2.h
@@ -46,6 +46,7 @@
#define _GNU_H_WINDOWS32_SOCKETS
#include <windows.h>
+#include <sys/bsdtypes.h>
#ifndef WINSOCK_API_LINKAGE
#ifdef __W32API_USE_DLLIMPORT__
@@ -59,19 +60,6 @@ _BEGIN_C_DECLS
/* Names common to Winsock1.1 and Winsock2
*/
-#ifndef _BSDTYPES_DEFINED
-/* FIXME: these are also defined in mingwrt's <gmon.h> and in cygwin's
- * (i.e. newlib's) <sys/types>; we should factor them out, to their own
- * header file, and include that.
- */
-typedef unsigned char u_char;
-typedef unsigned short u_short;
-typedef unsigned int u_int;
-typedef unsigned long u_long;
-
-#define _BSDTYPES_DEFINED
-#endif /* !_BSDTYPES_DEFINED */
-
typedef u_int SOCKET;
#ifndef FD_SETSIZE
https://sf.net/p/mingw/mingw-org-wsl/ci/312b531944a5ee743068586b8a34726f3b7d6cc9/
commit 312b531944a5ee743068586b8a34726f3b7d6cc9
Author: Keith Marshall <kei...@us...>
Date: Sat Sep 9 14:22:45 2017 +0100
Factor BSD non-standard type definitions into common header.
diff --git a/mingwrt/ChangeLog b/mingwrt/ChangeLog
index e606b1b..4e7500d 100644
--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,15 @@
+2017-09-09 Keith Marshall <kei...@us...>
+
+ Factor BSD non-standard type definitions into common header.
+
+ * profile/gmon.h [_BSDTYPES_DEFINED]: Delete block; include...
+ * include/sys/bsdtypes.h: ...this new file instead; it defines...
+ (u_char, u_int, u_long, u_short): ...these non-standard data types.
+
+ * profile/gmon.c profile/mcount.c [_BSD_SOURCE]: Declare it;
+ it suppresses warnings from <sys/bsdtypes.h>, about ill-advised
+ non-standard BSD typedef usage.
+
2017-07-30 Keith Marshall <kei...@us...>
Prepare and tag for release of MinGW.org WSL-5.0.1
diff --git a/mingwrt/include/sys/bsdtypes.h b/mingwrt/include/sys/bsdtypes.h
new file mode 100644
index 0000000..44d1a3a
--- /dev/null
+++ b/mingwrt/include/sys/bsdtypes.h
@@ -0,0 +1,65 @@
+/*
+ * bsdtypes.h
+ *
+ * Defines non-standard data types, typically used in BSD source code,
+ * and adopted by the Windows sockets implementation; users are advised
+ * to avoid using these data types, and use standard types instead.
+ *
+ * $Id$
+ *
+ * Abstracted from MinGW.org's WinSock implementation
+ * Copyright (C) 2017, MinGW.org Project
+ *
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+#ifndef _SYS_BSDTYPES_H
+#pragma GCC system_header
+#define _SYS_BSDTYPES_H
+
+/* This additional guard macro is required, to co-operate with newlib's
+ * <sys/types.h>, which also defines the data types defined herein.
+ */
+#ifndef _BSDTYPES_DEFINED
+
+/* All MinGW.org headers are required to include <_mingw.h>
+ */
+#include <_mingw.h>
+
+#if ! (defined _BSD_SOURCE || defined _WINSOCK_H)
+/* Users are STRONGLY recommended to avoid using the non-standard BSD
+ * data types defined herein, unless compiling code which proclaims its
+ * _BSD_SOURCE heritage, or which uses the Windows Sockets API, (which
+ * has ill-advisedly adopted them).
+ */
+#warning "Use of non-standard BSD type definitions is ill-advised."
+#endif
+
+/* Use "unsigned foo" instead of these "u_foo" shorthand aliases.
+ */
+typedef unsigned char u_char;
+typedef unsigned short u_short;
+typedef unsigned int u_int;
+typedef unsigned long u_long;
+
+#define _BSDTYPES_DEFINED
+#endif /* !_BSDTYPES_DEFINED */
+#endif /* _SYS_BSDTYPES_H: $RCSfile$: end of file */
diff --git a/mingwrt/profile/gmon.c b/mingwrt/profile/gmon.c
index a20c337..3f6223b 100644
--- a/mingwrt/profile/gmon.c
+++ b/mingwrt/profile/gmon.c
@@ -30,6 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+#define _BSD_SOURCE
#if !defined(lint) && defined(LIBC_SCCS)
static char rcsid[] = "$OpenBSD: gmon.c,v 1.8 1997/07/23 21:11:27 kstailey Exp $";
diff --git a/mingwrt/profile/gmon.h b/mingwrt/profile/gmon.h
index 1f01bf4..6827e89 100644
--- a/mingwrt/profile/gmon.h
+++ b/mingwrt/profile/gmon.h
@@ -51,13 +51,7 @@
#include <profile.h>
#ifdef __MINGW32__
-#ifndef _BSDTYPES_DEFINED
-typedef unsigned char u_char;
-typedef unsigned short u_short;
-typedef unsigned int u_int;
-typedef unsigned long u_long;
-#define _BSDTYPES_DEFINED
-#endif /* _BSDTYPES_DEFINED */
+#include <sys/bsdtypes.h>
#endif /* __MINGW32__*/
/*
diff --git a/mingwrt/profile/mcount.c b/mingwrt/profile/mcount.c
index 9f1736d..296b4fb 100644
--- a/mingwrt/profile/mcount.c
+++ b/mingwrt/profile/mcount.c
@@ -30,6 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+#define _BSD_SOURCE
#if !defined(lint) && !defined(_KERNEL) && defined(LIBC_SCCS)
static char rcsid[] = "$OpenBSD: mcount.c,v 1.6 1997/07/23 21:11:27 kstailey Exp $";
https://sf.net/p/mingw/mingw-org-wsl/ci/7cbaf6927272fde1d8fb2fb58e67d067a91cd93b/
commit 7cbaf6927272fde1d8fb2fb58e67d067a91cd93b
Author: Keith Marshall <kei...@us...>
Date: Thu Sep 7 22:45:17 2017 +0100
Correct misuse of __INSIDE_MSYS__ feature test.
diff --git a/w32api/ChangeLog b/w32api/ChangeLog
index a363eb5..1afc463 100644
--- a/w32api/ChangeLog
+++ b/w32api/ChangeLog
@@ -1,5 +1,13 @@
2017-09-07 Keith Marshall <kei...@us...>
+ Correct misuse of __INSIDE_MSYS__ feature test.
+
+ * include/winsock2.h [!__INSIDE_MSYS__]: One of several instances
+ omits "defined" operator; it should be expressed consistently as...
+ [! defined __INSIDE_MSYS__]: ...this; correct it.
+
+2017-09-07 Keith Marshall <kei...@us...>
+
Prepare for <winsock.h> vs. <winsock2.h> refactoring.
* include/winsock.h: Tidy layout; assert copyright.
diff --git a/w32api/include/winsock2.h b/w32api/include/winsock2.h
index 2ca0503..437743d 100644
--- a/w32api/include/winsock2.h
+++ b/w32api/include/winsock2.h
@@ -148,7 +148,7 @@ int PASCAL __WSAFDIsSet (SOCKET, fd_set *);
#warning "Your <sys/types.h> may cause runtime problems with W32 sockets."
#endif /* !_SYS_TYPES_FD_SET */
-#if ! (defined __INSIDE_CYGWIN__ || (__INSIDE_MSYS__))
+#if ! (defined __INSIDE_CYGWIN__ || defined __INSIDE_MSYS__)
#ifndef _TIMEVAL_DEFINED
/* FIXME: These should be factored out; they are properly defined
https://sf.net/p/mingw/mingw-org-wsl/ci/13c2ff33fdcc8dd5614e47b0904311fb8b640774/
commit 13c2ff33fdcc8dd5614e47b0904311fb8b640774
Author: Keith Marshall <kei...@us...>
Date: Thu Sep 7 21:23:13 2017 +0100
Prepare for <winsock.h> vs. <winsock2.h> refactoring.
diff --git a/w32api/ChangeLog b/w32api/ChangeLog
index 71c859c..a363eb5 100644
--- a/w32api/ChangeLog
+++ b/w32api/ChangeLog
@@ -1,3 +1,19 @@
+2017-09-07 Keith Marshall <kei...@us...>
+
+ Prepare for <winsock.h> vs. <winsock2.h> refactoring.
+
+ * include/winsock.h: Tidy layout; assert copyright.
+ (_BEGIN_C_DECLS, _END_C_DECLS): Use them to avoid C++ name mangling.
+
+ * include/winsock2.h: Assert copyright; tidy layout, ensuring that all
+ sections, which are common with <winsock.h>, are laid out congruently.
+ (_BEGIN_C_DECLS, _END_C_DECLS): Use them to avoid C++ name mangling.
+ (SD_RECEIVE, SD_SEND, SD_BOTH): Delete duplicate constant definitions.
+ (SO_DONTLINGER, MSG_MAXIOVLEN): Likewise, delete duplicate definitions.
+ (__AW_ALIAS__, __AW_SUFFIXED__): Use them, to avoid reproduction of...
+ [UNICODE]: ...alternative typedefs, and function name aliases...
+ [!UNICODE]: ...versus this case.
+
2017-08-28 Keith Marshall <kei...@us...>
Resolve secondary issue arising from MinGW-Bug [#2350]
diff --git a/w32api/include/winsock.h b/w32api/include/winsock.h
index aa6cd18..ea95a7c 100644
--- a/w32api/include/winsock.h
+++ b/w32api/include/winsock.h
@@ -1,536 +1,629 @@
/*
-
- Definitions for winsock 1.1
-
- Portions Copyright (c) 1980, 1983, 1988, 1993
- The Regents of the University of California. All rights reserved.
-
- Portions Copyright (c) 1993 by Digital Equipment Corporation.
+ * winsock.h
+ *
+ * Definitions for WinSock Version 1.1 API.
+ *
+ *
+ * $Id$
+ *
+ * Adaptation by Anders Norlander <ano...@he...>
+ * Copyright (C) 1998-2004, 2012, 2016, 2017, MinGW.org Project.
+ *
+ * Portions Copyright (C) 1980, 1983, 1988, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Portions Copyright (C) 1993 by Digital Equipment Corporation.
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notices, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
*/
-
#ifndef _WINSOCK_H
#define _WINSOCK_H
-#if __GNUC__ >=3
#pragma GCC system_header
-#endif
#define _GNU_H_WINDOWS32_SOCKETS
#include <windows.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+_BEGIN_C_DECLS
-#if !defined ( _BSDTYPES_DEFINED )
-/* also defined in gmon.h and in cygwin's sys/types */
+#ifndef _BSDTYPES_DEFINED
+/* FIXME: these are also defined in mingwrt's <gmon.h> and in cygwin's
+ * (i.e. newlib's) <sys/types>; we should factor them out, to their own
+ * header file, and include that.
+ */
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
+
#define _BSDTYPES_DEFINED
-#endif /* !defined _BSDTYPES_DEFINED */
-typedef u_int SOCKET;
+#endif /* !_BSDTYPES_DEFINED */
+
+typedef u_int SOCKET;
+
#ifndef FD_SETSIZE
-#define FD_SETSIZE 64
+#define FD_SETSIZE 64
#endif
/* shutdown() how types */
-#define SD_RECEIVE 0x00
-#define SD_SEND 0x01
-#define SD_BOTH 0x02
+#define SD_RECEIVE 0x00
+#define SD_SEND 0x01
+#define SD_BOTH 0x02
#ifndef _SYS_TYPES_FD_SET
-/* fd_set may have be defined by the newlib <sys/types.h>
- * if __USE_W32_SOCKETS not defined.
+/* fd_set may have been defined by the newlib <sys/types.h>, if the
+ * internal __USE_W32_SOCKETS feature test has not been enabled.
*/
-#ifdef fd_set
#undef fd_set
-#endif
-typedef struct fd_set {
- u_int fd_count;
- SOCKET fd_array[FD_SETSIZE];
+typedef
+struct fd_set
+{ u_int fd_count;
+ SOCKET fd_array[FD_SETSIZE];
} fd_set;
-int PASCAL __WSAFDIsSet(SOCKET,fd_set*);
+
+int PASCAL __WSAFDIsSet (SOCKET, fd_set *);
+
#ifndef FD_CLR
-#define FD_CLR(fd,set) do { u_int __i;\
-for (__i = 0; __i < ((fd_set *)(set))->fd_count ; __i++) {\
- if (((fd_set *)(set))->fd_array[__i] == (fd)) {\
- while (__i < ((fd_set *)(set))->fd_count-1) {\
- ((fd_set*)(set))->fd_array[__i] = ((fd_set*)(set))->fd_array[__i+1];\
- __i++;\
- }\
- ((fd_set*)(set))->fd_count--;\
- break;\
- }\
-}\
-} while (0)
-#endif
+#define FD_CLR( fd, set ) do \
+ { u_int __i; \
+ for (__i = 0; __i < ((fd_set *)(set))->fd_count ; __i++) \
+ { if (((fd_set *)(set))->fd_array[__i] == (fd)) \
+ { while (__i < ((fd_set *)(set))->fd_count-1) \
+ { ((fd_set *)(set))->fd_array[__i] \
+ = ((fd_set *)(set))->fd_array[__i + 1]; __i++; \
+ } \
+ ((fd_set *)(set))->fd_count--; \
+ break; \
+ } \
+ } \
+ } while (0)
+#endif /* ! defined FD_CLR */
+
#ifndef FD_SET
-#define FD_SET(fd, set) do { \
- if (((fd_set *)(set))->fd_count < FD_SETSIZE) \
- ((fd_set *)(set))->fd_array[((fd_set *)(set))->fd_count++]=(fd);\
-}while (0)
-#endif
+#define FD_SET( fd, set ) do \
+ { if (((fd_set *)(set))->fd_count < FD_SETSIZE) \
+ ((fd_set *)(set))->fd_array[((fd_set *)(set))->fd_count++] = (fd); \
+ } while (0)
+#endif /* ! defined FD_SET */
+
#ifndef FD_ZERO
-#define FD_ZERO(set) (((fd_set *)(set))->fd_count=0)
-#endif
+#define FD_ZERO( set ) (((fd_set *)(set))->fd_count = 0)
+#endif /* ! defined FD_ZERO */
+
#ifndef FD_ISSET
-#define FD_ISSET(fd, set) __WSAFDIsSet((SOCKET)(fd), (fd_set *)(set))
-#endif
-#elif !defined(USE_SYS_TYPES_FD_SET)
-#warning "fd_set and associated macros have been defined in sys/types. \
- This can cause runtime problems with W32 sockets"
-#endif /* ndef _SYS_TYPES_FD_SET */
+#define FD_ISSET( fd, set ) __WSAFDIsSet((SOCKET)(fd), (fd_set *)(set))
+#endif /* ! defined FD_ISSET */
+
+#elif ! defined USE_SYS_TYPES_FD_SET
+/* Definitions from <sys/types.h> probably aren't what the user wants;
+ * if they know what they are doing, and they are sure that this really
+ * is what they want, then they may enable the USE_SYS_TYPES_FD_SET
+ * feature test macro, to suppress this warning.
+ */
+#warning "fd_set and associated macros have been defined in <sys/types.h>"
+#warning "Your <sys/types.h> may cause runtime problems with W32 sockets."
+#endif /* !_SYS_TYPES_FD_SET */
-#if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
-#ifndef _TIMEVAL_DEFINED /* also in sys/time.h */
+#if ! (defined __INSIDE_CYGWIN__ || defined __INSIDE_MSYS__)
+
+#ifndef _TIMEVAL_DEFINED
+/* FIXME: These should be factored out; they are properly defined
+ * in <sys/time.h>, whence they should be included.
+ */
#define _TIMEVAL_DEFINED
-struct timeval {
- long tv_sec;
- long tv_usec;
+struct timeval
+{ long tv_sec;
+ long tv_usec;
};
+
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
#define timercmp(tvp, uvp, cmp) \
(((tvp)->tv_sec != (uvp)->tv_sec) ? \
((tvp)->tv_sec cmp (uvp)->tv_sec) : \
((tvp)->tv_usec cmp (uvp)->tv_usec))
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
-#endif /* _TIMEVAL_DEFINED */
-struct hostent {
- char *h_name;
- char **h_aliases;
- short h_addrtype;
- short h_length;
- char **h_addr_list;
-#define h_addr h_addr_list[0]
+#endif /* _TIMEVAL_DEFINED */
+
+struct hostent
+{ char *h_name;
+ char **h_aliases;
+ short h_addrtype;
+ short h_length;
+# define h_addr h_addr_list[0]
+ char **h_addr_list;
};
-struct linger {
- u_short l_onoff;
- u_short l_linger;
+
+struct linger
+{ u_short l_onoff;
+ u_short l_linger;
};
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-#define IOCPARM_MASK 0x7f
-#define IOC_VOID 0x20000000
-#define IOC_OUT 0x40000000
-#define IOC_IN 0x80000000
-#define IOC_INOUT (IOC_IN|IOC_OUT)
-
-#if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
+
+#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
+
+#define IOCPARM_MASK 0x7F
+#define IOC_VOID 0x20000000
+#define IOC_OUT 0x40000000
+#define IOC_IN 0x80000000
+#define IOC_INOUT (IOC_IN | IOC_OUT)
+
+#if ! (defined __INSIDE_CYGWIN__ || defined __INSIDE_MSYS__)
+
#define _IO(x,y) (IOC_VOID|((x)<<8)|(y))
#define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
#define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
-#define FIONBIO _IOW('f', 126, u_long)
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-
-#define FIONREAD _IOR('f', 127, u_long)
-#define FIOASYNC _IOW('f', 125, u_long)
-#define SIOCSHIWAT _IOW('s', 0, u_long)
-#define SIOCGHIWAT _IOR('s', 1, u_long)
-#define SIOCSLOWAT _IOW('s', 2, u_long)
-#define SIOCGLOWAT _IOR('s', 3, u_long)
-#define SIOCATMARK _IOR('s', 7, u_long)
-
-#if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
-struct netent {
- char * n_name;
- char **n_aliases;
- short n_addrtype;
- u_long n_net;
+
+#define FIONBIO _IOW('f', 126, u_long)
+
+#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
+
+#define FIONREAD _IOR('f', 127, u_long)
+#define FIOASYNC _IOW('f', 125, u_long)
+#define SIOCSHIWAT _IOW('s', 0, u_long)
+#define SIOCGHIWAT _IOR('s', 1, u_long)
+#define SIOCSLOWAT _IOW('s', 2, u_long)
+#define SIOCGLOWAT _IOR('s', 3, u_long)
+#define SIOCATMARK _IOR('s', 7, u_long)
+
+#if ! ( defined __INSIDE_CYGWIN__ || defined __INSIDE_MSYS__)
+
+struct netent
+{ char *n_name;
+ char **n_aliases;
+ short n_addrtype;
+ u_long n_net;
};
-struct servent {
- char *s_name;
- char **s_aliases;
- short s_port;
- char *s_proto;
+
+struct servent
+{ char *s_name;
+ char **s_aliases;
+ short s_port;
+ char *s_proto;
};
-struct protoent {
- char *p_name;
- char **p_aliases;
- short p_proto;
+
+struct protoent
+{ char *p_name;
+ char **p_aliases;
+ short p_proto;
};
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-
-#define IPPROTO_IP 0
-#define IPPROTO_ICMP 1
-#define IPPROTO_IGMP 2
-#define IPPROTO_GGP 3
-#define IPPROTO_TCP 6
-#define IPPROTO_PUP 12
-#define IPPROTO_UDP 17
-#define IPPROTO_IDP 22
-#define IPPROTO_ND 77
-#define IPPROTO_RAW 255
-#define IPPROTO_MAX 256
-#define IPPORT_ECHO 7
-#define IPPORT_DISCARD 9
-#define IPPORT_SYSTAT 11
-#define IPPORT_DAYTIME 13
-#define IPPORT_NETSTAT 15
-#define IPPORT_FTP 21
-#define IPPORT_TELNET 23
-#define IPPORT_SMTP 25
-#define IPPORT_TIMESERVER 37
-#define IPPORT_NAMESERVER 42
-#define IPPORT_WHOIS 43
-#define IPPORT_MTP 57
-#define IPPORT_TFTP 69
-#define IPPORT_RJE 77
-#define IPPORT_FINGER 79
-#define IPPORT_TTYLINK 87
-#define IPPORT_SUPDUP 95
-#define IPPORT_EXECSERVER 512
-#define IPPORT_LOGINSERVER 513
-#define IPPORT_CMDSERVER 514
-#define IPPORT_EFSSERVER 520
-#define IPPORT_BIFFUDP 512
-#define IPPORT_WHOSERVER 513
-#define IPPORT_ROUTESERVER 520
-#define IPPORT_RESERVED 1024
-#define IMPLINK_IP 155
-#define IMPLINK_LOWEXPER 156
-#define IMPLINK_HIGHEXPER 158
-struct in_addr {
- union {
- struct { u_char s_b1,s_b2,s_b3,s_b4; } S_un_b;
- struct { u_short s_w1,s_w2; } S_un_w;
- u_long S_addr;
- } S_un;
-#define s_addr S_un.S_addr
-#define s_host S_un.S_un_b.s_b2
-#define s_net S_un.S_un_b.s_b1
-#define s_imp S_un.S_un_w.s_w2
-#define s_impno S_un.S_un_b.s_b4
-#define s_lh S_un.S_un_b.s_b3
+
+#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
+
+#define IPPROTO_IP 0
+#define IPPROTO_ICMP 1
+#define IPPROTO_IGMP 2
+#define IPPROTO_GGP 3
+#define IPPROTO_TCP 6
+#define IPPROTO_PUP 12
+#define IPPROTO_UDP 17
+#define IPPROTO_IDP 22
+#define IPPROTO_ND 77
+
+#define IPPROTO_RAW 255
+#define IPPROTO_MAX 256
+
+#define IPPORT_ECHO 7
+#define IPPORT_DISCARD 9
+#define IPPORT_SYSTAT 11
+#define IPPORT_DAYTIME 13
+#define IPPORT_NETSTAT 15
+#define IPPORT_FTP 21
+#define IPPORT_TELNET 23
+#define IPPORT_SMTP 25
+#define IPPORT_TIMESERVER 37
+#define IPPORT_NAMESERVER 42
+#define IPPORT_WHOIS 43
+#define IPPORT_MTP 57
+#define IPPORT_TFTP 69
+#define IPPORT_RJE 77
+#define IPPORT_FINGER 79
+#define IPPORT_TTYLINK 87
+#define IPPORT_SUPDUP 95
+#define IPPORT_EXECSERVER 512
+#define IPPORT_LOGINSERVER 513
+#define IPPORT_CMDSERVER 514
+#define IPPORT_EFSSERVER 520
+#define IPPORT_BIFFUDP 512
+#define IPPORT_WHOSERVER 513
+#define IPPORT_ROUTESERVER 520
+#define IPPORT_RESERVED 1024
+
+#define IMPLINK_IP 155
+#define IMPLINK_LOWEXPER 156
+#define IMPLINK_HIGHEXPER 158
+
+struct in_addr
+#define s_addr S_un.S_addr
+#define s_host S_un.S_un_b.s_b2
+#define s_net S_un.S_un_b.s_b1
+#define s_imp S_un.S_un_w.s_w2
+#define s_impno S_un.S_un_b.s_b4
+#define s_lh S_un.S_un_b.s_b3
+{ union
+ { struct { u_char s_b1,s_b2,s_b3,s_b4; } S_un_b;
+ struct { u_short s_w1,s_w2; } S_un_w;
+ u_long S_addr;
+ } S_un;
};
-#define IN_CLASSA(i) (((long)(i)&0x80000000) == 0)
-#define IN_CLASSA_NET 0xff000000
-#define IN_CLASSA_NSHIFT 24
-#define IN_CLASSA_HOST 0x00ffffff
-#define IN_CLASSA_MAX 128
-#define IN_CLASSB(i) (((long)(i)&0xc0000000)==0x80000000)
-#define IN_CLASSB_NET 0xffff0000
-#define IN_CLASSB_NSHIFT 16
-#define IN_CLASSB_HOST 0x0000ffff
-#define IN_CLASSB_MAX 65536
-#define IN_CLASSC(i) (((long)(i)&0xe0000000)==0xc0000000)
-#define IN_CLASSC_NET 0xffffff00
-#define IN_CLASSC_NSHIFT 8
-#define IN_CLASSC_HOST 0xff
-#define INADDR_ANY (u_long)0
-#define INADDR_LOOPBACK 0x7f000001
-#define INADDR_BROADCAST (u_long)0xffffffff
-#define INADDR_NONE 0xffffffff
-struct sockaddr_in {
- short sin_family;
- u_short sin_port;
- struct in_addr sin_addr;
- char sin_zero[8];
+
+#define IN_CLASSA(i) (((long)(i) & 0x80000000) == 0)
+#define IN_CLASSA_NET 0xFF000000
+#define IN_CLASSA_NSHIFT 24
+#define IN_CLASSA_HOST 0x00FFFFFF
+#define IN_CLASSA_MAX 128
+#define IN_CLASSB(i) (((long)(i) & 0xC0000000) == 0x80000000)
+#define IN_CLASSB_NET 0xFFFF0000
+#define IN_CLASSB_NSHIFT 16
+#define IN_CLASSB_HOST 0x0000FFFF
+#define IN_CLASSB_MAX 65536
+#define IN_CLASSC(i) (((long)(i) & 0xE0000000) == 0xC0000000)
+#define IN_CLASSC_NET 0xFFFFFF00
+#define IN_CLASSC_NSHIFT 8
+#define IN_CLASSC_HOST 0xFF
+#define INADDR_ANY (u_long)(0)
+#define INADDR_LOOPBACK 0x7F000001
+#define INADDR_BROADCAST (u_long)(0xFFFFFFFF)
+#define INADDR_NONE 0xFFFFFFFF
+
+struct sockaddr_in
+{ short sin_family;
+ u_short sin_port;
+ struct in_addr sin_addr;
+ char sin_zero[8];
};
-#define WSADESCRIPTION_LEN 256
-#define WSASYS_STATUS_LEN 128
-typedef struct WSAData {
- WORD wVersion;
- WORD wHighVersion;
- char szDescription[WSADESCRIPTION_LEN+1];
- char szSystemStatus[WSASYS_STATUS_LEN+1];
- unsigned short iMaxSockets;
- unsigned short iMaxUdpDg;
- char * lpVendorInfo;
-} WSADATA;
-typedef WSADATA *LPWSADATA;
+
+#define WSADESCRIPTION_LEN 256
+#define WSASYS_STATUS_LEN 128
+
+typedef
+struct WSAData
+{ WORD wVersion;
+ WORD wHighVersion;
+ char szDescription[WSADESC...
[truncated message content] |