summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2014-09-01 13:16:38 -0500
committerYaakov Selkowitz <yselkowi@redhat.com>2014-09-01 13:16:38 -0500
commit055fea40dcd3a1e0f6b350a926307f095764eed2 (patch)
treee18bf7bf6dadd4d28d26b6d45455c0a0e499b653
parent3cf2976641f1c207e439587a5136562e7b2d7af9 (diff)
downloadcygwin-w32api-headers-055fea40dcd3a1e0f6b350a926307f095764eed2.tar.gz
cygwin-w32api-headers-055fea40dcd3a1e0f6b350a926307f095764eed2.tar.xz
cygwin-w32api-headers-055fea40dcd3a1e0f6b350a926307f095764eed2.zip
Backport upstream r6328-r6329 for Cygwin64.
-rw-r--r--cygwin-w32api-headers.spec10
-rw-r--r--mingw-w64-3.1.0-cygwin64.patch151
2 files changed, 158 insertions, 3 deletions
diff --git a/cygwin-w32api-headers.spec b/cygwin-w32api-headers.spec
index 7d1b64c..8295e8e 100644
--- a/cygwin-w32api-headers.spec
+++ b/cygwin-w32api-headers.spec
@@ -3,7 +3,7 @@
Name: cygwin-w32api-headers
Version: 3.1.0
-Release: 1
+Release: 2
Summary: Win32 header files for Cygwin toolchain
License: Public Domain and LGPLv2+ and ZPLv2.1
@@ -21,6 +21,7 @@ Source0: mingw-w64-code-%{snapshot_rev}-%{branch}.zip
%else
Source0: http://downloads.sourceforge.net/mingw-w64/mingw-w64-v%{version}.tar.bz2
%endif
+Patch0: mingw-w64-3.1.0-cygwin64.patch
BuildRequires: cygwin32-filesystem
BuildRequires: cygwin64-filesystem
@@ -51,7 +52,7 @@ Cygwin x86_64 cross-compiler Win32 header files.
%else
%setup -q -n mingw-w64-v%{version}
%endif
-
+%patch0 -p1
%build
pushd mingw-w64-headers
@@ -77,7 +78,10 @@ popd
%changelog
-* Thu Jan 14 2014 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 3.1.0-1
+* Sun Jan 19 2014 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 3.1.0-2
+- Backport upstream r6328-r6329 for Cygwin64.
+
+* Thu Jan 16 2014 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 3.1.0-1
- Update to latest stable release.
* Thu Jan 27 2013 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 2.0.999-4.trunk.svn5747
diff --git a/mingw-w64-3.1.0-cygwin64.patch b/mingw-w64-3.1.0-cygwin64.patch
new file mode 100644
index 0000000..33c5ca2
--- /dev/null
+++ b/mingw-w64-3.1.0-cygwin64.patch
@@ -0,0 +1,151 @@
+Backport of r6328-r6329
+
+--- a/mingw-w64-headers/include/winbase.h 2014-01-13 21:11:39.000000000 -0600
++++ b/mingw-w64-headers/include/winbase.h 2014-01-13 09:52:14.000000000 -0600
+@@ -2921,36 +2921,125 @@ extern "C" {
+ #endif
+ #if MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS && defined (__cplusplus)
+ extern "C++" {
+- FORCEINLINE unsigned InterlockedIncrement (unsigned volatile *Addend) { return (unsigned) InterlockedIncrement ((volatile __LONG32 *) Addend); }
+- FORCEINLINE unsigned __LONG32 InterlockedIncrement (unsigned __LONG32 volatile *Addend) { return (unsigned __LONG32) InterlockedIncrement ((volatile __LONG32 *) Addend); }
++#if defined(__x86_64__) && defined(__CYGWIN__)
++#define __MINGW_USE_INT64_INTERLOCKED_LONG
++#endif
++ FORCEINLINE unsigned InterlockedIncrement (unsigned volatile *Addend) {
++ return (unsigned) InterlockedIncrement ((volatile __LONG32 *) Addend);
++ }
++
++ FORCEINLINE unsigned long InterlockedIncrement (unsigned long volatile *Addend) {
++#ifndef __MINGW_USE_INT64_INTERLOCKED_LONG
++ return (unsigned __LONG32) InterlockedIncrement ((volatile __LONG32 *) Addend);
++#else
++ return (unsigned long) InterlockedIncrement64 ((volatile __int64 *) Addend);
++#endif
++ }
++
+ #if defined (_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined (_WINBASE_))
+- FORCEINLINE unsigned __int64 InterlockedIncrement (unsigned __int64 volatile *Addend) { return (unsigned __int64) InterlockedIncrement64 ((volatile __int64 *) Addend); }
++ FORCEINLINE unsigned __int64 InterlockedIncrement (unsigned __int64 volatile *Addend) {
++ return (unsigned __int64) InterlockedIncrement64 ((volatile __int64 *) Addend);
++ }
++#endif
++
++ FORCEINLINE unsigned InterlockedDecrement (unsigned volatile *Addend) {
++ return (unsigned) InterlockedDecrement ((volatile __LONG32 *) Addend);
++ }
++
++ FORCEINLINE unsigned long InterlockedDecrement (unsigned long volatile *Addend) {
++#ifndef __MINGW_USE_INT64_INTERLOCKED_LONG
++ return (unsigned __LONG32) InterlockedDecrement ((volatile __LONG32 *) Addend);
++#else
++ return (unsigned long) InterlockedDecrement64 ((volatile __int64 *) Addend);
+ #endif
+- FORCEINLINE unsigned InterlockedDecrement (unsigned volatile *Addend) { return (unsigned __LONG32) InterlockedDecrement ((volatile __LONG32 *) Addend); }
+- FORCEINLINE unsigned __LONG32 InterlockedDecrement (unsigned __LONG32 volatile *Addend) { return (unsigned __LONG32) InterlockedDecrement ((volatile __LONG32 *) Addend); }
++ }
++
+ #if defined (_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined (_WINBASE_))
+- FORCEINLINE unsigned __int64 InterlockedDecrement (unsigned __int64 volatile *Addend) { return (unsigned __int64) InterlockedDecrement64 ((volatile __int64 *) Addend); }
++ FORCEINLINE unsigned __int64 InterlockedDecrement (unsigned __int64 volatile *Addend) {
++ return (unsigned __int64) InterlockedDecrement64 ((volatile __int64 *) Addend);
++ }
++#endif
++
++ FORCEINLINE unsigned InterlockedExchange (unsigned volatile *Target, unsigned Value) {
++ return (unsigned) InterlockedExchange ((volatile __LONG32 *) Target,(__LONG32) Value);
++ }
++
++ FORCEINLINE unsigned long InterlockedExchange (unsigned long volatile *Target, unsigned long Value) {
++#ifndef __MINGW_USE_INT64_INTERLOCKED_LONG
++ return (unsigned __LONG32) InterlockedExchange ((volatile __LONG32 *) Target,(__LONG32) Value);
++#else
++ return (unsigned long) InterlockedExchange64 ((volatile __int64 *) Target,(__int64) Value);
+ #endif
+- FORCEINLINE unsigned InterlockedExchange (unsigned volatile *Target, unsigned Value) { return (unsigned) InterlockedExchange ((volatile __LONG32 *) Target,(__LONG32) Value); }
+- FORCEINLINE unsigned __LONG32 InterlockedExchange (unsigned __LONG32 volatile *Target, unsigned __LONG32 Value) { return (unsigned __LONG32) InterlockedExchange ((volatile __LONG32 *) Target,(__LONG32) Value); }
++ }
++
+ #if defined (_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined (_WINBASE_))
+- FORCEINLINE unsigned __int64 InterlockedExchange (unsigned __int64 volatile *Target, unsigned __int64 Value) { return (unsigned __int64) InterlockedExchange64 ((volatile __int64 *) Target,(__int64) Value); }
++ FORCEINLINE unsigned __int64 InterlockedExchange (unsigned __int64 volatile *Target, unsigned __int64 Value) {
++ return (unsigned __int64) InterlockedExchange64 ((volatile __int64 *) Target,(__int64) Value);
++ }
++#endif
++
++ FORCEINLINE unsigned InterlockedExchangeAdd (unsigned volatile *Addend, unsigned Value) {
++ return (unsigned) InterlockedExchangeAdd ((volatile __LONG32 *) Addend,(__LONG32) Value);
++ }
++
++ FORCEINLINE unsigned InterlockedExchangeSubtract (unsigned volatile *Addend, unsigned Value) {
++ return (unsigned) InterlockedExchangeAdd ((volatile __LONG32 *) Addend,- (__LONG32) Value);
++ }
++
++ FORCEINLINE unsigned long InterlockedExchangeAdd (unsigned long volatile *Addend, unsigned long Value) {
++#ifndef __MINGW_USE_INT64_INTERLOCKED_LONG
++ return (unsigned __LONG32) InterlockedExchangeAdd ((volatile __LONG32 *) Addend,(__LONG32) Value);
++#else
++ return (unsigned __int64) InterlockedExchangeAdd64 ((volatile __int64 *) Addend,(__int64) Value);
++#endif
++ }
++
++ FORCEINLINE unsigned long InterlockedExchangeSubtract (unsigned long volatile *Addend, unsigned long Value) {
++#ifndef __MINGW_USE_INT64_INTERLOCKED_LONG
++ return (unsigned __LONG32) InterlockedExchangeAdd ((volatile __LONG32 *) Addend,- (__LONG32) Value);
++#else
++ return (unsigned long) InterlockedExchangeAdd64 ((volatile __int64 *) Addend,- (__int64) Value);
+ #endif
+- FORCEINLINE unsigned InterlockedExchangeAdd (unsigned volatile *Addend, unsigned Value) { return (unsigned) InterlockedExchangeAdd ((volatile __LONG32 *) Addend,(__LONG32) Value); }
+- FORCEINLINE unsigned InterlockedExchangeSubtract (unsigned volatile *Addend, unsigned Value) { return (unsigned) InterlockedExchangeAdd ((volatile __LONG32 *) Addend,- (__LONG32) Value); }
+- FORCEINLINE unsigned __LONG32 InterlockedExchangeAdd (unsigned __LONG32 volatile *Addend, unsigned __LONG32 Value) { return (unsigned __LONG32) InterlockedExchangeAdd ((volatile __LONG32 *) Addend,(__LONG32) Value); }
+- FORCEINLINE unsigned __LONG32 InterlockedExchangeSubtract (unsigned __LONG32 volatile *Addend, unsigned __LONG32 Value) { return (unsigned __LONG32) InterlockedExchangeAdd ((volatile __LONG32 *) Addend,- (__LONG32) Value); }
++ }
++
+ #if defined (_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined (_WINBASE_))
+- FORCEINLINE unsigned __int64 InterlockedExchangeAdd (unsigned __int64 volatile *Addend, unsigned __int64 Value) { return (unsigned __int64) InterlockedExchangeAdd64 ((volatile __int64 *) Addend,(__int64) Value); }
+- FORCEINLINE unsigned __int64 InterlockedExchangeSubtract (unsigned __int64 volatile *Addend, unsigned __int64 Value) { return (unsigned __int64) InterlockedExchangeAdd64 ((volatile __int64 *) Addend,- (__int64) Value); }
++ FORCEINLINE unsigned __int64 InterlockedExchangeAdd (unsigned __int64 volatile *Addend, unsigned __int64 Value) {
++ return (unsigned __int64) InterlockedExchangeAdd64 ((volatile __int64 *) Addend,(__int64) Value);
++ }
++
++ FORCEINLINE unsigned __int64 InterlockedExchangeSubtract (unsigned __int64 volatile *Addend, unsigned __int64 Value) {
++ return (unsigned __int64) InterlockedExchangeAdd64 ((volatile __int64 *) Addend,- (__int64) Value);
++ }
++#endif
++
++ FORCEINLINE unsigned InterlockedCompareExchange (unsigned volatile *Destination, unsigned Exchange, unsigned Comperand) {
++ return (unsigned) InterlockedCompareExchange ((volatile __LONG32 *) Destination,(__LONG32) Exchange,(__LONG32) Comperand);
++ }
++
++ FORCEINLINE unsigned long InterlockedCompareExchange (unsigned long volatile *Destination, unsigned long Exchange, unsigned long Comperand) {
++#ifndef __MINGW_USE_INT64_INTERLOCKED_LONG
++ return (unsigned __LONG32) InterlockedCompareExchange ((volatile __LONG32 *) Destination,(__LONG32) Exchange,(__LONG32) Comperand);
++#else
++ return (unsigned long) InterlockedCompareExchange64 ((volatile __int64 *) Destination,(__int64) Exchange,(__int64) Comperand);
+ #endif
+- FORCEINLINE unsigned InterlockedCompareExchange (unsigned volatile *Destination, unsigned Exchange, unsigned Comperand) { return (unsigned) InterlockedCompareExchange ((volatile __LONG32 *) Destination,(__LONG32) Exchange,(__LONG32) Comperand); }
+- FORCEINLINE unsigned __LONG32 InterlockedCompareExchange (unsigned __LONG32 volatile *Destination, unsigned __LONG32 Exchange, unsigned __LONG32 Comperand) { return (unsigned __LONG32) InterlockedCompareExchange ((volatile __LONG32 *) Destination,(__LONG32) Exchange,(__LONG32) Comperand); }
++ }
++
+ #if defined (_WIN64) || ((_WIN32_WINNT >= 0x0502) && defined (_WINBASE_))
+- FORCEINLINE unsigned __int64 InterlockedCompareExchange (unsigned __int64 volatile *Destination, unsigned __int64 Exchange, unsigned __int64 Comperand) { return (unsigned __int64) InterlockedCompareExchange64 ((volatile __int64 *) Destination,(__int64) Exchange,(__int64) Comperand); }
+- FORCEINLINE unsigned __int64 InterlockedAnd (unsigned __int64 volatile *Destination, unsigned __int64 Value) { return (unsigned __int64) InterlockedAnd64 ((volatile __int64 *) Destination,(__int64) Value); }
+- FORCEINLINE unsigned __int64 InterlockedOr (unsigned __int64 volatile *Destination, unsigned __int64 Value) { return (unsigned __int64) InterlockedOr64 ((volatile __int64 *) Destination,(__int64) Value); }
+- FORCEINLINE unsigned __int64 InterlockedXor (unsigned __int64 volatile *Destination, unsigned __int64 Value) { return (unsigned __int64) InterlockedXor64 ((volatile __int64 *) Destination,(__int64) Value); }
++ FORCEINLINE unsigned __int64 InterlockedCompareExchange (unsigned __int64 volatile *Destination, unsigned __int64 Exchange, unsigned __int64 Comperand) {
++ return (unsigned __int64) InterlockedCompareExchange64 ((volatile __int64 *) Destination,(__int64) Exchange,(__int64) Comperand);
++ }
++
++ FORCEINLINE unsigned __int64 InterlockedAnd (unsigned __int64 volatile *Destination, unsigned __int64 Value) {
++ return (unsigned __int64) InterlockedAnd64 ((volatile __int64 *) Destination,(__int64) Value);
++ }
++
++ FORCEINLINE unsigned __int64 InterlockedOr (unsigned __int64 volatile *Destination, unsigned __int64 Value) {
++ return (unsigned __int64) InterlockedOr64 ((volatile __int64 *) Destination,(__int64) Value);
++ }
++
++ FORCEINLINE unsigned __int64 InterlockedXor (unsigned __int64 volatile *Destination, unsigned __int64 Value) {
++ return (unsigned __int64) InterlockedXor64 ((volatile __int64 *) Destination,(__int64) Value);
++ }
+ #endif
+ }
+ #endif