Re: [Mingw-w64-public] Big perfomance difference 32/64 bits

2014-08-26 Thread Óscar Fuentes
Kai Tietz  writes:

>> Are there known slow spots on the 64 bit runtimes?
>
> Well, there might be some.  I can't actual confirm this finding in
> general.  The load you see is often application-specific.
> I know about a lot of application, which are actual about 30% faster
> on 64-bit over 32-bit.  Mainly caused by wider memory-moves, and use
> of more registers.
>
> So a profiling would be indeed interesting to learn where your
> application spends cycles over the 32-bit.
> In general we might have some opportunities to optimize further math for x64.

Yep, a profile comparision is the key here, but gprof refuses to give
any numbers (although a 230KB file gmon.out is generated.) Tried with
Very Sleepy sampling profiler, which gave suspicious (looking
unreliable) results for the 64 bit executable and simply crashed for the
32 bit one. 

[snip]


--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Big perfomance difference 32/64 bits

2014-08-26 Thread Óscar Fuentes
"Raffaello D. Di Napoli"
 writes:

> 2014-08-25 11:25 GMT-04:00 Óscar Fuentes :
>>
>> On a CPU-intensive application, the 64 bit exe runs 40% slower than
>> its 32 bit counterpart. It's a C++ app with a workload typical of a
>> compiler.
>>
>> Are there known slow spots on the 64 bit runtimes?
>
> You mean, other than the fact that all your pointers (you say
> compiler, so you probably use a lot of them in your data structures)
> are twice as large and effectively reduce the effective size of your
> processor’s data cache?

Yes, there are lots of pointers. The 64 bit executable uses almost 40%
more memory than the 32 bit executable. Perhaps it is not all that
coincidental that it is slower by the same factor.

One important thing I omitted was that I'm using Windows 8.1 64 bits
running on VMWare Workstation with Kubuntu 14.04 as host. The same app
running on Linux as 64 bits, compiled by gcc 4.8.2, runs twice faster
than when running on the Windows VM on 64 bit mode. The performance
penalty imposed by VMWare for single-threaded, CPU-bound processes is
much lower on my experience.

I'll try on a real Windows 64 bit machine as soon as I have access to
one, but I'm afraid that the 32bit vs 64bit slowdown is not caused by
VMWare.


--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] [patch shldisp.idl]: Autogenerate shldisp.h header

2014-08-26 Thread Kai Tietz
Ok for apply?

Regards,
Kai
From 9653e437d1d34caccf2d79aa567637b239b7e152 Mon Sep 17 00:00:00 2001
From: Kai Tietz 
Date: Tue, 26 Aug 2014 16:14:02 +0200
Subject: Add new shldisp.idl

---
 mingw-w64-headers/Makefile.am |1 +
 mingw-w64-headers/Makefile.in |1 +
 mingw-w64-headers/configure   |   98 +---
 mingw-w64-headers/include/shldisp.idl |  444 +
 4 files changed, 449 insertions(+), 95 deletions(-)
 create mode 100644 mingw-w64-headers/include/shldisp.idl

diff --git a/mingw-w64-headers/Makefile.am b/mingw-w64-headers/Makefile.am
index 668858a..8e1615a 100644
--- a/mingw-w64-headers/Makefile.am
+++ b/mingw-w64-headers/Makefile.am
@@ -124,6 +124,7 @@ IDL_SRCS = \
   include/sapi54.idl \
   include/sensorsapi.idl \
   include/servprov.idl \
+  include/shldisp.idl \
   include/shobjidl.idl \
   include/shtypes.idl \
   include/strmif.idl \
diff --git a/mingw-w64-headers/Makefile.in b/mingw-w64-headers/Makefile.in
index a718191..135a5f3 100644
--- a/mingw-w64-headers/Makefile.in
+++ b/mingw-w64-headers/Makefile.in
@@ -348,6 +348,7 @@ EXTRA_HEADERS = \
 @HAVE_WIDL_TRUE@  include/sapi54.idl \
 @HAVE_WIDL_TRUE@  include/sensorsapi.idl \
 @HAVE_WIDL_TRUE@  include/servprov.idl \
+@HAVE_WIDL_TRUE@  include/shldisp.idl \
 @HAVE_WIDL_TRUE@  include/shobjidl.idl \
 @HAVE_WIDL_TRUE@  include/shtypes.idl \
 @HAVE_WIDL_TRUE@  include/strmif.idl \
diff --git a/mingw-w64-headers/configure b/mingw-w64-headers/configure
index 027b20d..329a4dc 100755
--- a/mingw-w64-headers/configure
+++ b/mingw-w64-headers/configure
@@ -620,10 +620,6 @@ build
 MAINT
 MAINTAINER_MODE_FALSE
 MAINTAINER_MODE_TRUE
-AM_BACKSLASH
-AM_DEFAULT_VERBOSITY
-AM_DEFAULT_V
-AM_V
 am__untar
 am__tar
 AMTAR
@@ -688,7 +684,6 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
-enable_silent_rules
 enable_maintainer_mode
 with_widl
 enable_w32api
@@ -1319,8 +1314,6 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE   do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-silent-rules   less verbose build output (undo: "make V=1")
-  --disable-silent-rules  verbose build output (undo: "make V=0")
   --enable-maintainer-mode
   enable make rules and dependencies not useful (and
   sometimes confusing) to the casual installer
@@ -1800,7 +1793,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please 
don't use this var.
 ac_config_headers="$ac_config_headers config.h"
 
 
-am__api_version='1.14'
+am__api_version='1.12'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -1984,8 +1977,8 @@ if test x"${MISSING+set}" != xset; then
   esac
 fi
 # Use eval to expand $SHELL
-if eval "$MISSING --is-lightweight"; then
-  am_missing_run="$MISSING "
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
 else
   am_missing_run=
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too 
old or missing" >&5
@@ -2225,45 +2218,6 @@ else
 fi
 rmdir .tst 2>/dev/null
 
-# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
-  enableval=$enable_silent_rules;
-fi
-
-case $enable_silent_rules in # (((
-  yes) AM_DEFAULT_VERBOSITY=0;;
-   no) AM_DEFAULT_VERBOSITY=1;;
-*) AM_DEFAULT_VERBOSITY=1;;
-esac
-am_make=${MAKE-make}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports 
nested variables" >&5
-$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
-if ${am_cv_make_support_nested_variables+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if $as_echo 'TRUE=$(BAR$(V))
-BAR0=false
-BAR1=true
-V=1
-am__doit:
-   @$(TRUE)
-.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
-  am_cv_make_support_nested_variables=yes
-else
-  am_cv_make_support_nested_variables=no
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 
$am_cv_make_support_nested_variables" >&5
-$as_echo "$am_cv_make_support_nested_variables" >&6; }
-if test $am_cv_make_support_nested_variables = yes; then
-AM_V='$(V)'
-  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
-  AM_V=$AM_DEFAULT_VERBOSITY
-  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
-fi
-AM_BACKSLASH='\'
-
 if test "`cd $srcdir && pwd`" != "`pwd`"; then
   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
   # is not polluted with repeated "-I."
@@ -2326,10 +2280,6 @@ mkdir_p='$(MKDIR_P)'
 # in the wild :-(  We should find a proper way to deprecate it ...
 AMTAR='$${TAR-tar}'
 
-
-# We'll loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar  pax cpio none'
-
 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
@@ -2337,48 +2287,6 @@ am__tar='$${TAR-tar} chof - "$$tardir"' 
am__untar='$${TAR-tar} xf -'

Re: [Mingw-w64-public] [patch raserror.h]: Update header

2014-08-26 Thread Kai Tietz
Huh, in that patch I see

@@ -1,8 +1,12 @@
 /**
- * This file has no copyright assigned and is placed in the Public Domain.
  * This file is part of the mingw-w64 runtime package.
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
  */

and that is intentional.

Kai

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [patch raserror.h]: Update header

2014-08-26 Thread Jacek Caban
On 08/26/14 10:17, Kai Tietz wrote:
> -/**
> - * This file has no copyright assigned and is placed in the Public Domain.
> - * This file is part of the mingw-w64 runtime package.
> - * No warranty is given; refer to the file DISCLAIMER.PD within this package.
> - */

I guess removing license header wasn't intentional. Other than that, the
patch looks good.

Thanks,
Jacek

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [patch regstr.h]: Update

2014-08-26 Thread Jacek Caban
On 08/26/14 10:12, Kai Tietz wrote:
> +
>  #define REGSTR_VAL_CLASSGUID TEXT("ClassGUID")
> -#define REGSTR_VAL_INSTANCEIDENTIFIER TEXT("InstanceIdentifier")
> +
> +#define REGSTR_VAL_INSTANCEIDENTIFIER TEXT("InstanceIde
>  #define REGSTR_VAL_DUPLICATEOF TEXT("DuplicateOf")
>  #define REGSTR_VAL_STATUSFLAGS TEXT("StatusFlags")

With that fixed, it looks good to me.

Thanks,
Jacek 



--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [patch resapi.h]: Update header

2014-08-26 Thread Jacek Caban
On 08/26/14 10:11, Kai Tietz wrote:
> Ok to apply?

Yes, looks good to me.

Thanks,
Jacek

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] [patch ratings.h]: Update header

2014-08-26 Thread Kai Tietz
Ok for apply?

Kai
From 21e83ae9fddf527b312268b348d3f67511c246e0 Mon Sep 17 00:00:00 2001
From: Kai Tietz 
Date: Mon, 25 Aug 2014 22:39:10 +0200
Subject: Add winapi-family check, correct interface IObtainRating for C, add
 wide-character variant of API.

---
 mingw-w64-headers/include/ratings.h |   30 --
 1 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/mingw-w64-headers/include/ratings.h 
b/mingw-w64-headers/include/ratings.h
index 861589b..14e9b2f 100644
--- a/mingw-w64-headers/include/ratings.h
+++ b/mingw-w64-headers/include/ratings.h
@@ -1,35 +1,46 @@
 /**
- * This file has no copyright assigned and is placed in the Public Domain.
  * This file is part of the mingw-w64 runtime package.
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
  */
 #ifndef _RATINGS_H_
 #define _RATINGS_H_
 
+#include 
+
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+
 #include 
 #include 
 
 STDAPI RatingEnable(HWND hwndParent,LPCSTR pszUsername,WINBOOL fEnable);
+STDAPI RatingEnableW(HWND hwndParent, LPCWSTR pszUsername, WINBOOL fEnable);
 STDAPI RatingCheckUserAccess(LPCSTR pszUsername,LPCSTR pszURL,LPCSTR 
pszRatingInfo,LPBYTE pData,DWORD cbData,void **ppRatingDetails);
+STDAPI RatingCheckUserAccessW(LPCWSTR pszUsername, LPCWSTR pszURL, LPCWSTR 
pszRatingInfo, LPBYTE pData, DWORD cbData, void **ppRatingDetails);
 STDAPI RatingAccessDeniedDialog(HWND hDlg,LPCSTR pszUsername,LPCSTR 
pszContentDescription,void *pRatingDetails);
 STDAPI RatingAccessDeniedDialog2(HWND hDlg,LPCSTR pszUsername,void 
*pRatingDetails);
+STDAPI RatingAccessDeniedDialogW(HWND hDlg, LPCWSTR pszUsername, LPCWSTR 
pszContentDescription, void *pRatingDetails);
 STDAPI RatingFreeDetails(void *pRatingDetails);
 STDAPI RatingObtainCancel(HANDLE hRatingObtainQuery);
 STDAPI RatingObtainQuery(LPCSTR pszTargetUrl,DWORD dwUserData,void 
(*fCallback)(DWORD dwUserData,HRESULT hr,LPCSTR pszRating,void 
*lpvRatingDetails),HANDLE *phRatingObtainQuery);
+STDAPI RatingObtainQueryW(LPCWSTR pszTargetUrl, DWORD dwUserData, void 
(*fCallback) (DWORD dwUserData, HRESULT hr, LPCWSTR pszRating, void 
*lpvRatingDetails),HANDLE *phRatingObtainQuery);
 STDAPI RatingSetupUI(HWND hDlg,LPCSTR pszUsername);
+STDAPI RatingSetupUIW (HWND hDlg, LPCWSTR pszUsername);
 #ifdef _INC_COMMCTRL
 STDAPI RatingAddPropertyPage(PROPSHEETHEADER *ppsh);
 #endif
 
+STDAPI RatingAddToApprovedSites (HWND hDlg, DWORD cbPasswordBlob, BYTE 
*pbPasswordBlob, LPCWSTR lpszUrl, WINBOOL fAlwaysNever, WINBOOL fSitePage, 
WINBOOL fApprovedSitesEnforced);
+STDAPI RatingClickedOnPRFInternal (HWND hWndOwner, HINSTANCE, LPSTR 
lpszFileName, int nShow);
+STDAPI RatingClickedOnRATInternal (HWND hWndOwner, HINSTANCE, LPSTR 
lpszFileName, int nShow);
+
 STDAPI RatingEnabledQuery();
 STDAPI RatingInit();
 STDAPI_(void) RatingTerm();
 
 static inline WINBOOL IS_RATINGS_ENABLED() {
-  TCHAR szSup[200];
-  DWORD dwType;
-  DWORD cbSize = sizeof(szSup);
-  return 
(SHGetValue(HKEY_LOCAL_MACHINE,TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Ratings"),TEXT("Key"),&dwType,&szSup,&cbSize)==ERROR_SUCCESS);
+  TCHAR sz[200];
+  DWORD typ, sz = sizeof (sz);
+  return 
(SHGetValue(HKEY_LOCAL_MACHINE,TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Ratings"),TEXT("Key"),
 &typ,&sz, &sz) == ERROR_SUCCESS);
 }
 
 #define S_RATING_ALLOW S_OK
@@ -37,14 +48,21 @@ static inline WINBOOL IS_RATINGS_ENABLED() {
 #define S_RATING_FOUND 0x0002
 #define E_RATING_NOT_FOUND 0x8001
 
+#undef INTERFACE
+#define INTERFACE IObtainRating
 DECLARE_INTERFACE_(IObtainRating,IUnknown) {
+#ifndef __cplusplus
   STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppvObj) PURE;
   STDMETHOD_(ULONG,AddRef) (THIS) PURE;
   STDMETHOD_(ULONG,Release) (THIS) PURE;
+#endif
   STDMETHOD(ObtainRating) (THIS_ LPCSTR pszTargetUrl,HANDLE 
hAbortEvent,IMalloc *pAllocator,LPSTR *ppRatingOut) PURE;
   STDMETHOD_(ULONG,GetSortOrder) (THIS) PURE;
 };
+#undef INTERFACE
 
 #define RATING_ORDER_REMOTESITE 0x8000
 #define RATING_ORDER_LOCALLIST 0xC000
+
+#endif
 #endif
-- 
1.7.9

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] [patch rasshost.h]: Update header

2014-08-26 Thread Kai Tietz
Is patch ok for apply?

Kai
From 24f6b8d72d1fd77c66bf6bacd403d8296c3f92ac Mon Sep 17 00:00:00 2001
From: Kai Tietz 
Date: Mon, 25 Aug 2014 22:26:10 +0200
Subject: Add winapi-family check, correct HPORT type to be derived by HANDLE.

---
 mingw-w64-headers/include/rasshost.h |   10 +++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/mingw-w64-headers/include/rasshost.h 
b/mingw-w64-headers/include/rasshost.h
index 6192c3d..ea88a7b 100644
--- a/mingw-w64-headers/include/rasshost.h
+++ b/mingw-w64-headers/include/rasshost.h
@@ -1,14 +1,17 @@
 /**
- * This file has no copyright assigned and is placed in the Public Domain.
  * This file is part of the mingw-w64 runtime package.
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
  */
 #ifndef _RASSHOST_
 #define _RASSHOST_
 
+#include 
+
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+
 #include 
 
-typedef DWORD HPORT;
+typedef HANDLE HPORT;
 
 typedef struct _SECURITY_MESSAGE {
   DWORD dwMsgId;
@@ -38,3 +41,4 @@ DWORD WINAPI RasSecurityDialogReceive(HPORT hPort,PBYTE 
pBuffer,PWORD pBufferLen
 DWORD WINAPI RasSecurityDialogGetInfo(HPORT hPort,RAS_SECURITY_INFO *pBuffer);
 
 #endif
+#endif
-- 
1.7.9

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] [patch raserror.h]: Update header

2014-08-26 Thread Kai Tietz
I took care that those error-messages no longer supported Vista+
aren't defined anymore.  At least this is behavior as I would read out
of msdn.

Is patch of for apply?

Kai
From 2f63f2631a98d1d5d87c1f01b8497beb6d2e17d8 Mon Sep 17 00:00:00 2001
From: Kai Tietz 
Date: Mon, 25 Aug 2014 22:10:53 +0200
Subject: =?UTF-8?q?Add=20winapifamily=20check,=20add=20new=20constants=20for?=
 =?UTF-8?q?=20Windows=207=20and=20Windows=208,=0Amake=20sure=20XP=20specific?=
 =?UTF-8?q?=20error-codes=20aren't=20defined=20anymore=20if=20WINVER=20indic?=
 =?UTF-8?q?ates=0AVISTA=20or=20newer=20OS.?=

---
 mingw-w64-headers/include/raserror.h |  193 +++--
 1 files changed, 134 insertions(+), 59 deletions(-)

diff --git a/mingw-w64-headers/include/raserror.h 
b/mingw-w64-headers/include/raserror.h
index f94a6ae..5c64cb6 100644
--- a/mingw-w64-headers/include/raserror.h
+++ b/mingw-w64-headers/include/raserror.h
@@ -1,11 +1,10 @@
-/**
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is part of the mingw-w64 runtime package.
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
- */
 #ifndef _RASERROR_H_
 #define _RASERROR_H_
 
+#include 
+
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+
 #define RASBASE 600
 #define SUCCESS 0
 
@@ -14,28 +13,21 @@
 #define ERROR_PORT_ALREADY_OPEN (RASBASE+2)
 #define ERROR_BUFFER_TOO_SMALL (RASBASE+3)
 #define ERROR_WRONG_INFO_SPECIFIED (RASBASE+4)
-#define ERROR_CANNOT_SET_PORT_INFO (RASBASE+5)
 #define ERROR_PORT_NOT_CONNECTED (RASBASE+6)
-#define ERROR_EVENT_INVALID (RASBASE+7)
 #define ERROR_DEVICE_DOES_NOT_EXIST (RASBASE+8)
 #define ERROR_DEVICETYPE_DOES_NOT_EXIST (RASBASE+9)
 #define ERROR_BUFFER_INVALID (RASBASE+10)
-#define ERROR_ROUTE_NOT_AVAILABLE (RASBASE+11)
 #define ERROR_ROUTE_NOT_ALLOCATED (RASBASE+12)
-#define ERROR_INVALID_COMPRESSION_SPECIFIED (RASBASE+13)
-#define ERROR_OUT_OF_BUFFERS (RASBASE+14)
 #define ERROR_PORT_NOT_FOUND (RASBASE+15)
 #define ERROR_ASYNC_REQUEST_PENDING (RASBASE+16)
 #define ERROR_ALREADY_DISCONNECTING (RASBASE+17)
 #define ERROR_PORT_NOT_OPEN (RASBASE+18)
 #define ERROR_PORT_DISCONNECTED (RASBASE+19)
-#define ERROR_NO_ENDPOINTS (RASBASE+20)
 #define ERROR_CANNOT_OPEN_PHONEBOOK (RASBASE+21)
 #define ERROR_CANNOT_LOAD_PHONEBOOK (RASBASE+22)
 #define ERROR_CANNOT_FIND_PHONEBOOK_ENTRY (RASBASE+23)
 #define ERROR_CANNOT_WRITE_PHONEBOOK (RASBASE+24)
 #define ERROR_CORRUPT_PHONEBOOK (RASBASE+25)
-#define ERROR_CANNOT_LOAD_STRING (RASBASE+26)
 #define ERROR_KEY_NOT_FOUND (RASBASE+27)
 #define ERROR_DISCONNECTION (RASBASE+28)
 #define ERROR_REMOTE_DISCONNECTION (RASBASE+29)
@@ -43,23 +35,14 @@
 #define ERROR_USER_DISCONNECTION (RASBASE+31)
 #define ERROR_INVALID_SIZE (RASBASE+32)
 #define ERROR_PORT_NOT_AVAILABLE (RASBASE+33)
-#define ERROR_CANNOT_PROJECT_CLIENT (RASBASE+34)
 #define ERROR_UNKNOWN (RASBASE+35)
 #define ERROR_WRONG_DEVICE_ATTACHED (RASBASE+36)
-#define ERROR_BAD_STRING (RASBASE+37)
 #define ERROR_REQUEST_TIMEOUT (RASBASE+38)
-#define ERROR_CANNOT_GET_LANA (RASBASE+39)
-#define ERROR_NETBIOS_ERROR (RASBASE+40)
-#define ERROR_SERVER_OUT_OF_RESOURCES (RASBASE+41)
-#define ERROR_NAME_EXISTS_ON_NET (RASBASE+42)
-#define ERROR_SERVER_GENERAL_NET_FAILURE (RASBASE+43)
-#define WARNING_MSG_ALIAS_NOT_ADDED (RASBASE+44)
 #define ERROR_AUTH_INTERNAL (RASBASE+45)
 #define ERROR_RESTRICTED_LOGON_HOURS (RASBASE+46)
 #define ERROR_ACCT_DISABLED (RASBASE+47)
 #define ERROR_PASSWD_EXPIRED (RASBASE+48)
 #define ERROR_NO_DIALIN_PERMISSION (RASBASE+49)
-#define ERROR_SERVER_NOT_RESPONDING (RASBASE+50)
 #define ERROR_FROM_DEVICE (RASBASE+51)
 #define ERROR_UNRECOGNIZED_RESPONSE (RASBASE+52)
 #define ERROR_MACRO_NOT_FOUND (RASBASE+53)
@@ -83,23 +66,11 @@
 #define ERROR_READING_DEVICETYPE (RASBASE+71)
 #define ERROR_READING_DEVICENAME (RASBASE+72)
 #define ERROR_READING_USAGE (RASBASE+73)
-#define ERROR_READING_MAXCONNECTBPS (RASBASE+74)
-#define ERROR_READING_MAXCARRIERBPS (RASBASE+75)
 #define ERROR_LINE_BUSY (RASBASE+76)
 #define ERROR_VOICE_ANSWER (RASBASE+77)
 #define ERROR_NO_ANSWER (RASBASE+78)
 #define ERROR_NO_CARRIER (RASBASE+79)
 #define ERROR_NO_DIALTONE (RASBASE+80)
-#define ERROR_IN_COMMAND (RASBASE+81)
-#define ERROR_WRITING_SECTIONNAME (RASBASE+82)
-#define ERROR_WRITING_DEVICETYPE (RASBASE+83)
-#define ERROR_WRITING_DEVICENAME (RASBASE+84)
-#define ERROR_WRITING_MAXCONNECTBPS (RASBASE+85)
-#define ERROR_WRITING_MAXCARRIERBPS (RASBASE+86)
-#define ERROR_WRITING_USAGE (RASBASE+87)
-#define ERROR_WRITING_DEFAULTOFF (RASBASE+88)
-#define ERROR_READING_DEFAULTOFF (RASBASE+89)
-#define ERROR_EMPTY_INI_FILE (RASBASE+90)
 #define ERROR_AUTHENTICATION_FAILURE (RASBASE+91)
 #define ERROR_PORT_OR_DEVICE (RASBASE+92)
 #define ERROR_NOT_BINARY_MACRO (RASBASE+93)
@@ -115,31 +86,22 @@
 #define ERROR_INTERACTIVE_MODE (RASBASE+103)
 #define ERROR_BAD_CALLBACK_NUMBER (RASBASE+104)
 #define ERROR_INVALID_AUTH_STATE (RASBASE+105)
-#define ERROR_WRITING_INITBPS (RASBASE+106)
 

[Mingw-w64-public] [patch raseapif.h]: Update header

2014-08-26 Thread Kai Tietz
Is patch ok for apply?

Kai
From 4d463ece0dcf8769e64b9afd1069331c5ddfb9f2 Mon Sep 17 00:00:00 2001
From: Kai Tietz 
Date: Mon, 25 Aug 2014 21:07:52 +0200
Subject: Add winapifamily check, and additional add Windows 7/8 extensions.

---
 mingw-w64-headers/include/raseapif.h |  169 +-
 1 files changed, 147 insertions(+), 22 deletions(-)

diff --git a/mingw-w64-headers/include/raseapif.h 
b/mingw-w64-headers/include/raseapif.h
index f1d47d5..2708548 100644
--- a/mingw-w64-headers/include/raseapif.h
+++ b/mingw-w64-headers/include/raseapif.h
@@ -1,11 +1,15 @@
 /**
- * This file has no copyright assigned and is placed in the Public Domain.
  * This file is part of the mingw-w64 runtime package.
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
  */
+
 #ifndef _RASEAPIF_
 #define _RASEAPIF_
 
+#include 
+
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -26,6 +30,8 @@ extern "C" {
 #define RAS_EAP_VALUENAME_STANDALONE_SUPPORTED TEXT("StandaloneSupported")
 #define RAS_EAP_VALUENAME_ROLES_SUPPORTED TEXT("RolesSupported")
 #define RAS_EAP_VALUENAME_PER_POLICY_CONFIG TEXT("PerPolicyConfig")
+#define RAS_EAP_VALUENAME_ISTUNNEL_METHOD TEXT("IsTunnelMethod")
+#define RAS_EAP_VALUENAME_FILTER_INNERMETHODS TEXT("FilterInnerMethods")
 
 #define RAS_EAP_ROLE_AUTHENTICATOR 0x0001
 #define RAS_EAP_ROLE_AUTHENTICATEE 0x0002
@@ -35,18 +41,101 @@ extern "C" {
 #define RAS_EAP_ROLE_EXCLUDE_IN_VPN 0x0010
 
   typedef enum _RAS_AUTH_ATTRIBUTE_TYPE_ {
-raatMinimum = 
0,raatUserName,raatUserPassword,raatMD5CHAPPassword,raatNASIPAddress,raatNASPort,raatServiceType,raatFramedProtocol,
-raatFramedIPAddress,raatFramedIPNetmask,raatFramedRouting = 
10,raatFilterId,raatFramedMTU,raatFramedCompression,raatLoginIPHost,
-
raatLoginService,raatLoginTCPPort,raatUnassigned17,raatReplyMessage,raatCallbackNumber,raatCallbackId
 =20,raatUnassigned21,
-
raatFramedRoute,raatFramedIPXNetwork,raatState,raatClass,raatVendorSpecific,raatSessionTimeout,raatIdleTimeout,raatTerminationAction,
-raatCalledStationId = 
30,raatCallingStationId,raatNASIdentifier,raatProxyState,raatLoginLATService,raatLoginLATNode,raatLoginLATGroup,
-
raatFramedAppleTalkLink,raatFramedAppleTalkNetwork,raatFramedAppleTalkZone,raatAcctStatusType
 = 40,raatAcctDelayTime,raatAcctInputOctets,
-
raatAcctOutputOctets,raatAcctSessionId,raatAcctAuthentic,raatAcctSessionTime,raatAcctInputPackets,raatAcctOutputPackets,raatAcctTerminateCause,
-raatAcctMultiSessionId = 50,raatAcctLinkCount,raatAcctEventTimeStamp = 
55,raatMD5CHAPChallenge = 60,raatNASPortType,raatPortLimit,raatLoginLATPort,
-
raatTunnelType,raatTunnelMediumType,raatTunnelClientEndpoint,raatTunnelServerEndpoint,raatARAPPassword
 = 70,raatARAPFeatures,raatARAPZoneAccess,
-
raatARAPSecurity,raatARAPSecurityData,raatPasswordRetry,raatPrompt,raatConnectInfo,raatConfigurationToken,raatEAPMessage,raatSignature
 = 80,
-raatARAPChallengeResponse = 84,raatAcctInterimInterval = 
85,raatARAPGuestLogon = 8096,raatCertificateOID,raatEAPConfiguration,
-raatPEAPEmbeddedEAPTypeId,raatPEAPFastRoamedSession,raatEAPTLV = 
8102,raatReserved = 0x
+raatMinimum = 0,
+raatUserName,
+raatUserPassword,
+raatMD5CHAPPassword,
+raatNASIPAddress,
+raatNASPort,
+raatServiceType,
+raatFramedProtocol,
+raatFramedIPAddress,
+raatFramedIPNetmask,
+raatFramedRouting = 10,
+raatFilterId,
+raatFramedMTU,
+raatFramedCompression,
+raatLoginIPHost,
+raatLoginService,
+raatLoginTCPPort,
+raatUnassigned17,
+raatReplyMessage,
+raatCallbackNumber,
+raatCallbackId =20,
+raatUnassigned21,
+raatFramedRoute,
+raatFramedIPXNetwork,
+raatState,
+raatClass,
+raatVendorSpecific,
+raatSessionTimeout,
+raatIdleTimeout,
+raatTerminationAction,
+raatCalledStationId = 30,
+raatCallingStationId,
+raatNASIdentifier,
+raatProxyState,
+raatLoginLATService,
+raatLoginLATNode,
+raatLoginLATGroup,
+raatFramedAppleTalkLink,
+raatFramedAppleTalkNetwork,
+raatFramedAppleTalkZone,
+raatAcctStatusType = 40,
+raatAcctDelayTime,
+raatAcctInputOctets,
+raatAcctOutputOctets,
+raatAcctSessionId,
+raatAcctAuthentic,
+raatAcctSessionTime,
+raatAcctInputPackets,
+raatAcctOutputPackets,
+raatAcctTerminateCause,
+raatAcctMultiSessionId = 50,
+raatAcctLinkCount,
+raatAcctEventTimeStamp = 55,
+raatMD5CHAPChallenge = 60,
+raatNASPortType,
+raatPortLimit,
+raatLoginLATPort,
+raatTunnelType,
+raatTunnelMediumType,
+raatTunnelClientEndpoint,
+raatTunnelServerEndpoint,
+raatARAPPassword = 70,
+raatARAPFeatures,
+raatARAPZoneAccess,
+raatARAPSecurity,
+raatARAPSecurityData,
+raatPasswordRetry,
+

[Mingw-w64-public] [patch rasdlg.h]: Update

2014-08-26 Thread Kai Tietz
Ok for apply?

Kai
From f8ca908611fcd7c6181788ef4b1a2fd973496c67 Mon Sep 17 00:00:00 2001
From: Kai Tietz 
Date: Mon, 25 Aug 2014 20:55:57 +0200
Subject: Add winapifamily check

---
 mingw-w64-headers/include/rasdlg.h |   65 +--
 1 files changed, 39 insertions(+), 26 deletions(-)

diff --git a/mingw-w64-headers/include/rasdlg.h 
b/mingw-w64-headers/include/rasdlg.h
index a0389c9..b932191 100644
--- a/mingw-w64-headers/include/rasdlg.h
+++ b/mingw-w64-headers/include/rasdlg.h
@@ -1,11 +1,13 @@
 /**
- * This file has no copyright assigned and is placed in the Public Domain.
  * This file is part of the mingw-w64 runtime package.
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
  */
 #ifndef _RASDLG_H_
 #define _RASDLG_H_
 
+#include 
+
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
 #include <_mingw_unicode.h>
 #include 
 
@@ -28,8 +30,7 @@ extern "C" {
 
 #define RASNOUSER_SmartCard 0x0001
 
-#define RASNOUSERW struct tagRASNOUSERW
-  RASNOUSERW {
+  struct tagRASNOUSERW {
 DWORD dwSize;
 DWORD dwFlags;
 DWORD dwTimeoutMs;
@@ -38,8 +39,7 @@ extern "C" {
 WCHAR szDomain[DNLEN + 1];
   };
 
-#define RASNOUSERA struct tagRASNOUSERA
-  RASNOUSERA {
+  struct tagRASNOUSERA {
 DWORD dwSize;
 DWORD dwFlags;
 DWORD dwTimeoutMs;
@@ -50,17 +50,19 @@ extern "C" {
 
 #define RASNOUSER __MINGW_NAME_AW(RASNOUSER)
 
-#define LPRASNOUSERW RASNOUSERW*
-#define LPRASNOUSERA RASNOUSERA*
-#define LPRASNOUSER RASNOUSER*
+#define RASNOUSERW struct tagRASNOUSERW
+#define RASNOUSERA struct tagRASNOUSERA
+
+#define LPRASNOUSERW RASNOUSERW *
+#define LPRASNOUSERA RASNOUSERA *
+#define LPRASNOUSER RASNOUSER *
 
 #define RASPBDFLAG_PositionDlg 0x0001
 #define RASPBDFLAG_ForceCloseOnDial 0x0002
 #define RASPBDFLAG_NoUser 0x0010
 #define RASPBDFLAG_UpdateDefaults 0x8000
 
-#define RASPBDLGW struct tagRASPBDLGW
-  RASPBDLGW {
+  struct tagRASPBDLGW {
 DWORD dwSize;
 HWND hwndOwner;
 DWORD dwFlags;
@@ -73,8 +75,7 @@ extern "C" {
 ULONG_PTR reserved2;
   };
 
-#define RASPBDLGA struct tagRASPBDLGA
-  RASPBDLGA {
+  struct tagRASPBDLGA {
 DWORD dwSize;
 HWND hwndOwner;
 DWORD dwFlags;
@@ -90,24 +91,33 @@ extern "C" {
 #define RASPBDLG __MINGW_NAME_AW(RASPBDLG)
 #define RASPBDLGFUNC __MINGW_NAME_AW(RASPBDLGFUNC)
 
-#define LPRASPBDLGW RASPBDLGW*
-#define LPRASPBDLGA RASPBDLGA*
-#define LPRASPBDLG RASPBDLG*
+#define RASPBDLGW struct tagRASPBDLGW
+#define RASPBDLGA struct tagRASPBDLGA
+
+#define LPRASPBDLGW RASPBDLGW *
+#define LPRASPBDLGA RASPBDLGA *
+#define LPRASPBDLG RASPBDLG *
 
 #define RASEDFLAG_PositionDlg 0x0001
 #define RASEDFLAG_NewEntry 0x0002
+#if WINVER < 0x600
 #define RASEDFLAG_CloneEntry 0x0004
+#endif
 #define RASEDFLAG_NoRename 0x0008
 #define RASEDFLAG_ShellOwned 0x4000
 #define RASEDFLAG_NewPhoneEntry 0x0010
 #define RASEDFLAG_NewTunnelEntry 0x0020
+#if WINVER < 0x600
 #define RASEDFLAG_NewDirectEntry 0x0040
+#endif
 #define RASEDFLAG_NewBroadbandEntry 0x0080
 #define RASEDFLAG_InternetEntry 0x0100
 #define RASEDFLAG_NAT 0x0200
+#if WINVER >= 0x600
+#define RASEDFLAG_IncomingConnection 0x0400
+#endif
 
-#define RASENTRYDLGW struct tagRASENTRYDLGW
-  RASENTRYDLGW {
+  struct tagRASENTRYDLGW {
 DWORD dwSize;
 HWND hwndOwner;
 DWORD dwFlags;
@@ -119,8 +129,7 @@ extern "C" {
 ULONG_PTR reserved2;
   };
 
-#define RASENTRYDLGA struct tagRASENTRYDLGA
-  RASENTRYDLGA {
+  struct tagRASENTRYDLGA {
 DWORD dwSize;
 HWND hwndOwner;
 DWORD dwFlags;
@@ -134,16 +143,18 @@ extern "C" {
 
 #define RASENTRYDLG __MINGW_NAME_AW(RASENTRYDLG)
 
-#define LPRASENTRYDLGW RASENTRYDLGW*
-#define LPRASENTRYDLGA RASENTRYDLGA*
-#define LPRASENTRYDLG RASENTRYDLG*
+#define RASENTRYDLGW struct tagRASENTRYDLGW
+#define RASENTRYDLGA struct tagRASENTRYDLGA
+
+#define LPRASENTRYDLGW RASENTRYDLGW *
+#define LPRASENTRYDLGA RASENTRYDLGA *
+#define LPRASENTRYDLG RASENTRYDLG *
 
 #define RASDDFLAG_PositionDlg 0x0001
 #define RASDDFLAG_NoPrompt 0x0002
 #define RASDDFLAG_LinkFailure 0x8000
 
-#define RASDIALDLG struct tagRASDIALDLG
-  RASDIALDLG {
+  struct tagRASDIALDLG {
 DWORD dwSize;
 HWND hwndOwner;
 DWORD dwFlags;
@@ -155,7 +166,8 @@ extern "C" {
 ULONG_PTR reserved2;
   };
 
-#define LPRASDIALDLG RASDIALDLG*
+#define RASDIALDLG struct tagRASDIALDLG
+#define LPRASDIALDLG RASDIALDLG *
 
   typedef WINBOOL (WINAPI *RasCustomDialDlgFn)(HINSTANCE hInstDll,DWORD 
dwFlags,LPWSTR lpszPhonebook,LPWSTR lpszEntry,LPWSTR 
lpszPhoneNumber,LPRASDIALDLG lpInfo,PVOID pvInfo);
   typedef WINBOOL (WINAPI *RasCustomEntryDlgFn)(HINSTANCE hInstDll,LPWSTR 
lpszPhonebook,LPWSTR lpszEntry,LPRASENTRYDLG lpInfo,DWORD dwFlags);
@@ -177,3 +189,4 @@ extern "C" {
 
 #include 
 #endif
+#endif
-- 
1.7.9

-

[Mingw-w64-public] [patch regstr.h]: Update

2014-08-26 Thread Kai Tietz
Ok for apply?

Kai
From be155f24d75d6325777947a7a8b0d9fab078b54e Mon Sep 17 00:00:00 2001
From: Kai Tietz 
Date: Mon, 25 Aug 2014 20:42:02 +0200
Subject: Add winapifamily-check, add some new REGSTR_ defines

---
 mingw-w64-headers/include/regstr.h |   66 +---
 1 files changed, 53 insertions(+), 13 deletions(-)

diff --git a/mingw-w64-headers/include/regstr.h 
b/mingw-w64-headers/include/regstr.h
index 1f6ad57..1c47c67 100644
--- a/mingw-w64-headers/include/regstr.h
+++ b/mingw-w64-headers/include/regstr.h
@@ -1,11 +1,15 @@
 /**
- * This file has no copyright assigned and is placed in the Public Domain.
  * This file is part of the mingw-w64 runtime package.
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
  */
+
 #ifndef _INC_REGSTR
 #define _INC_REGSTR
 
+#include 
+
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+
 #define REGSTR_KEY_CLASS TEXT("Class")
 #define REGSTR_KEY_CONFIG TEXT("Config")
 #define REGSTR_KEY_ENUM TEXT("Enum")
@@ -52,6 +56,7 @@
 #define REGSTR_PATH_RUNSERVICESONCE 
TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\RunServicesOnce")
 #define REGSTR_PATH_RUNSERVICES 
TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\RunServices")
 #define REGSTR_PATH_EXPLORER 
TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer")
+#define REGSTR_PATH_PROPERTYSYSTEM 
TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\PropertySystem")
 #define REGSTR_PATH_DETECT 
TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Detect")
 #define REGSTR_PATH_APPPATHS 
TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\App Paths")
 #define REGSTR_PATH_UNINSTALL 
TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall")
@@ -117,23 +122,33 @@
 #define REGSTR_MAX_VALUE_LENGTH 256
 
 #define REGSTR_KEY_DEVICE_PROPERTIES TEXT("Properties")
+
 #define REGSTR_VAL_SLOTNUMBER TEXT("SlotNumber")
 #define REGSTR_VAL_ATTACHEDCOMPONENTS TEXT("AttachedComponents")
 #define REGSTR_VAL_BASEDEVICEPATH TEXT("BaseDevicePath")
 #define REGSTR_VAL_SYSTEMBUSNUMBER TEXT("SystemBusNumber")
 #define REGSTR_VAL_BUSDATATYPE TEXT("BusDataType")
 #define REGSTR_VAL_INTERFACETYPE TEXT("InterfaceType")
+
 #define REGSTR_VAL_SERVICE TEXT("Service")
+
 #define REGSTR_VAL_DETECTSIGNATURE TEXT("DetectSignature")
+
 #define REGSTR_VAL_CLASSGUID TEXT("ClassGUID")
-#define REGSTR_VAL_INSTANCEIDENTIFIER TEXT("InstanceIdentifier")
+
+#define REGSTR_VAL_INSTANCEIDENTIFIER TEXT("InstanceIde
 #define REGSTR_VAL_DUPLICATEOF TEXT("DuplicateOf")
 #define REGSTR_VAL_STATUSFLAGS TEXT("StatusFlags")
+
 #define REGSTR_VAL_DISABLECOUNT TEXT("DisableCount")
+
 #define REGSTR_VAL_UNKNOWNPROBLEMS TEXT("UnknownProblem")
+
 #define REGSTR_VAL_DOCKSTATE TEXT("DockState")
+
 #define REGSTR_VAL_PREFERENCEORDER TEXT("PreferenceOrder")
 #define REGSTR_VAL_USERWAITINTERVAL TEXT("UserWaitInterval")
+
 #define REGSTR_VAL_DEVICE_INSTANCE TEXT("DeviceInstance")
 #define REGSTR_VAL_SYMBOLIC_LINK TEXT("SymbolicLink")
 #define REGSTR_VAL_DEFAULT TEXT("Default")
@@ -152,9 +167,8 @@
 #define REGSTR_VAL_CUSTOM_PROPERTY_CACHE_DATE TEXT("CustomPropertyCacheDate")
 #define REGSTR_VAL_CUSTOM_PROPERTY_HW_ID_KEY TEXT("CustomPropertyHwIdKey")
 #define REGSTR_VAL_LAST_UPDATE_TIME TEXT("LastUpdateTime")
+#define REGSTR_VAL_CONTAINERID TEXT("ContainerID")
 
-#define REGSTR_VALUE_DEVICE_OBJECT_NAME TEXT("DeviceObjectName")
-#define REGSTR_VALUE_DEVICE_SYMBOLIC_NAME TEXT("DeviceSymbolicName")
 #define REGSTR_VAL_EJECT_PRIORITY TEXT("EjectPriority")
 
 #define REGSTR_KEY_CONTROL TEXT("Control")
@@ -220,9 +234,23 @@
 
 #define REGSTR_VAL_WRAPPER TEXT("Wrapper")
 
+#define REGSTR_KEY_RUNHISTORY TEXT("RunHistory")
 #define REGSTR_VAL_LASTALIVEINTERVAL TEXT("TimeStampInterval")
+#define REGSTR_VAL_DIRTYSHUTDOWN TEXT("DirtyShutdown")
+#define REGSTR_VAL_DIRTYSHUTDOWNTIME TEXT("DirtyShutdownTime")
+#define REGSTR_VAL_BT TEXT("6005BT")
+#define REGSTR_VAL_LASTCOMPUTERNAME TEXT("LastComputerName")
+#define REGSTR_VAL_LASTALIVEBT TEXT("LastAliveBT")
 #define REGSTR_VAL_LASTALIVESTAMP TEXT("LastAliveStamp")
+#define REGSTR_VAL_LASTALIVESTAMPFORCED TEXT("LastAliveStampForced")
+#define REGSTR_VAL_LASTALIVESTAMPINTERVAL TEXT("LastAliveStampInterval")
+#define REGSTR_VAL_LASTALIVESTAMPPOLICYINTERVAL 
TEXT("LastAliveStampPolicyInterval")
 #define REGSTR_VAL_LASTALIVEUPTIME TEXT("LastAliveUptime")
+#define REGSTR_VAL_LASTALIVEPMPOLICY TEXT("LastAlivePMPolicy")
+
+#define REGSTR_VAL_REASONCODE TEXT("ReasonCode")
+#define REGSTR_VAL_COMMENT TEXT("Comment")
+
 #define REGSTR_VAL_SHUTDOWNREASON TEXT("ShutdownReason")
 #define REGSTR_VAL_SHUTDOWNREASON_CODE TEXT("ShutdownReasonCode")
 #define REGSTR_VAL_SHUTDOWNREASON_COMMENT TEXT("ShutdownReasonComment")
@@ -432,8 +460,8 @@
 #define PCMCIA_OPT_NO_APMREMOVE __MSABI_LONG(0x0020)
 
 #define REGSTR_VAL_PCMCIA_MEM TEXT("Memory")
-#define PCMCIA_DEF_MEMBEGIN 0x000C
-#define PCMCIA_DEF_MEMEND 0x00FF
+

[Mingw-w64-public] [patch resapi.h]: Update header

2014-08-26 Thread Kai Tietz
Ok to apply?

Kai
From 619ed15542eca39ad965def299e0ce9d69a42989 Mon Sep 17 00:00:00 2001
From: Kai Tietz 
Date: Mon, 25 Aug 2014 20:16:52 +0200
Subject: Add winapifamily check, add support for CLUSAPI_VERSION_WINDOWS 8

---
 mingw-w64-headers/include/resapi.h |  707 ++--
 1 files changed, 439 insertions(+), 268 deletions(-)

diff --git a/mingw-w64-headers/include/resapi.h 
b/mingw-w64-headers/include/resapi.h
index 9e8edef..363801f 100644
--- a/mingw-w64-headers/include/resapi.h
+++ b/mingw-w64-headers/include/resapi.h
@@ -1,8 +1,12 @@
 /**
- * This file has no copyright assigned and is placed in the Public Domain.
  * This file is part of the mingw-w64 runtime package.
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
  */
+
+#include 
+
+#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+
 #ifndef _RESAPI_DEFINES_
 #define _RESAPI_DEFINES_
 
@@ -32,12 +36,140 @@ extern "C" {
 #define CLRES_V1_FUNCTION_SIZE sizeof(CLRES_V1_FUNCTIONS)
 #define CLRES_VERSION_V1_00 0x100
 
-#define 
CLRES_V1_FUNCTION_TABLE(_Name,_Version,_Prefix,_Arbitrate,_Release,_ResControl,_ResTypeControl)
 CLRES_FUNCTION_TABLE _Name = { 
CLRES_V1_FUNCTION_SIZE,_Version,_Prefix##Open,_Prefix##Close,_Prefix##Online,_Prefix##Offline,_Prefix##Terminate,_Prefix##LooksAlive,_Prefix##IsAlive,_Arbitrate,_Release,_ResControl,_ResTypeControl
 }
+#define CLRES_V1_FUNCTION_TABLE(_Name, _Version, _Prefix, _Arbitrate, 
_Release, _ResControl, _ResTypeControl) CLRES_FUNCTION_TABLE _Name = { 
CLRES_V1_FUNCTION_SIZE, _Version, _Prefix##Open, _Prefix##Close, 
_Prefix##Online, _Prefix##Offline, _Prefix##Terminate, _Prefix##LooksAlive, 
_Prefix##IsAlive, _Arbitrate, _Release, _ResControl, _ResTypeControl }
+
+#if CLUSAPI_VERSION >= CLUSAPI_VERSION_WINDOWS8
+#define STARTUP_EX_ROUTINE "StartupEx"
+
+#define CLRES_V2_FUNCTION_SIZE sizeof (CLRES_V2_FUNCTIONS)
+#define CLRES_VERSION_V2_00 0x200
+#define CLRES_V2_FUNCTION_TABLE_SET(_Name, _Version, _Prefix, _Arbitrate, 
_Release, _ResControl, _ResTypeControl, _LooksAlive, _IsAlive, _Cancel) 
_Name.TableSize = CLRES_V2_FUNCTION_SIZE; _Name.Version = _Version; 
_Name.V2Functions.Open = _Prefix##OpenV2; _Name.V2Functions.Close = 
_Prefix##Close; _Name.V2Functions.Online = _Prefix##OnlineV2; 
_Name.V2Functions.Offline = _Prefix##OfflineV2; _Name.V2Functions.Terminate = 
_Prefix##Terminate; _Name.V2Functions.LooksAlive= _LooksAlive; 
_Name.V2Functions.IsAlive = _IsAlive; _Name.V2Functions.Arbitrate = _Arbitrate; 
_Name.V2Functions.Release = _Release; _Name.V2Functions.ResourceControl = 
_ResControl; _Name.V2Functions.ResourceTypeControl = _ResTypeControl; 
_Name.V2Functions.Cancel = _Cancel;
+#endif
 #endif
 
 #ifndef _RESAPI_
 #define _RESAPI_
 
+#ifndef FIELD_OFFSET
+#define FIELD_OFFSET(type, field) ((LONG) __builtin_offsetof(Type, Field))
+#endif
+
+#define ClusterResourceCannotComeOnlineOnThisNode (CLUSTER_RESOURCE_STATE) 
(ClusterResourcePending - 1)
+#define ClusterResourceCannotComeOnlineOnAnyNode (CLUSTER_RESOURCE_STATE) 
(ClusterResourcePending - 2)
+
+#define ResUtilInitializeResourceStatus(_resource_status_) ZeroMemory 
(_resource_status_, sizeof (RESOURCE_STATUS))
+
+#if CLUSAPI_VERSION >= CLUSAPI_VERSION_WINDOWS8
+#define CLUSCTL_GET_OPERATION_CONTEXT_PARAMS_VERSION_1 1
+
+#define CLUSRES_GET_OPERATION_CONTEXT_FLAGS { 
CLUSRES_NAME_GET_OPERATION_CONTEXT_FLAGS, NULL, CLUSPROP_FORMAT_DWORD, 0, 0, 
0x, RESUTIL_PROPITEM_REQUIRED, 0 }
+#define CLUSRES_NAME_GET_OPERATION_CONTEXT_FLAGS L"Flags"
+
+#define RESOURCE_SPECIFIC_STATUS_PROP_ITEM { CLUSREG_NAME_RES_STATUS, NULL, 
CLUSPROP_FORMAT_SZ, 0, 0, 0, RESUTIL_PROPITEM_IN_MEMORY, 0 }
+#define RESOURCE_SPECIFIC_DATA1_PROP_ITEM { CLUSREG_NAME_RES_DATA1, NULL, 
CLUSPROP_FORMAT_ULARGE_INTEGER, 0, 0, 0, RESUTIL_PROPITEM_READ_ONLY | 
RESUTIL_PROPITEM_IN_MEMORY, 0 }
+#define RESOURCE_SPECIFIC_DATA2_PROP_ITEM { CLUSREG_NAME_RES_DATA2, NULL, 
CLUSPROP_FORMAT_ULARGE_INTEGER, 0, 0, 0, RESUTIL_PROPITEM_READ_ONLY | 
RESUTIL_PROPITEM_IN_MEMORY, 0 }
+
+#define CLUSRESDLL_STATUS_OFFLINE_BUSY 0x0001
+#define CLUSRESDLL_STATUS_OFFLINE_SOURCE_THROTTLED 0x0002
+#define CLUSRESDLL_STATUS_OFFLINE_DESTINATION_THROTTLED 0x0004
+#define CLUSRESDLL_STATUS_OFFLINE_DESTINATION_REJECTED 0x0008
+#define CLUSRESDLL_STATUS_INSUFFICIENT_MEMORY 0x0010
+#define CLUSRESDLL_STATUS_INSUFFICIENT_PROCESSOR 0x0020
+#define CLUSRESDLL_STATUS_INSUFFICIENT_OTHER_RESOURCES 0x0040
+#define CLUSRESDLL_STATUS_INVALID_PARAMETERS 0x0080
+
+#define ResUtilInitializeResourceStatusEx(_resource_status_) ZeroMemory 
(_resource_status_, sizeof (RESOURCE_STATUS_EX))
+
+#define CLUS_RESDLL_OPEN_RECOVER_MONITOR_STATE 0x0001
+#define CLUS_RESDLL_ONLINE_RECOVER_MONITOR_STATE 0x0001
+#define CLUS_RESDLL_ONLINE_IGNORE_RESOURCE_STATUS 0x0002
+#define CLUS_RESDLL_ONLINE_RETURN_TO_SOURCE_NODE_ON_ERROR 0x0004
+#define CLUS_RESDLL_ON