1
0
Jan Engelhardt 2015-03-26 10:20:59 +00:00 committed by Git OBS Bridge
parent ee14904a5e
commit d4fc80a66b
3 changed files with 44 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Mar 26 10:19:04 UTC 2015 - jengelh@inai.de
- Add order.diff to fix SHGetFolderPathW compile errors in code
using shlobj.h.
-------------------------------------------------------------------
Wed Mar 25 10:48:30 UTC 2015 - jengelh@inai.de

View File

@ -27,6 +27,7 @@ Url: http://mingw-w64.sf.net/
#DL-URL: http://downloads.sf.net/mingw-w64/mingw-w64-%version.tar.bz2
Source: mingw-w64-headers-%version.tar.xz
Source9: %name-rpmlintrc
Patch1: order.diff
BuildRequires: mingw32-filesystem
BuildRequires: xz
#!BuildIgnore: post-build-checks
@ -53,6 +54,7 @@ an actual pthread implementation (like winpthreads) is installed.
%prep
%setup -q -n mingw-w64-headers
%patch -P 1 -p1
%build
%{_mingw32_configure} \

36
order.diff Normal file
View File

@ -0,0 +1,36 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2015-03-26 10:55:28.730890877 +0100
In downstream packages, gcc emits:
CC master.o
In file included from master.c:48:0:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/shlobj.h:37:3: error: unknown type name 'EXTERN_C'
SHFOLDERAPI SHGetFolderPathW (HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath);
SHLFOLDERAPI is defined to expand to something with EXTERN_C,
however, EXTERN_C is not defined at the time of SHGetFolderPathW
declaration.
---
include/shlobj.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: mingw-w64-headers/include/shlobj.h
===================================================================
--- mingw-w64-headers.orig/include/shlobj.h
+++ mingw-w64-headers/include/shlobj.h
@@ -34,7 +34,6 @@ typedef enum {
SHGFP_TYPE_DEFAULT = 1,
} SHGFP_TYPE;
- SHFOLDERAPI SHGetFolderPathW (HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath);
#endif
@@ -718,6 +717,7 @@ extern "C" {
SHSTDAPI_(void) SHFlushSFCache (void);
SHFOLDERAPI SHGetFolderPathA (HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPSTR pszPath);
+ SHFOLDERAPI SHGetFolderPathW (HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath);
SHSTDAPI SHGetFolderLocation (HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, PIDLIST_ABSOLUTE *ppidl);
SHSTDAPI SHSetFolderPathA (int csidl, HANDLE hToken, DWORD dwFlags, LPCSTR pszPath);
SHSTDAPI SHSetFolderPathW (int csidl, HANDLE hToken, DWORD dwFlags, LPCWSTR pszPath);