mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-18 13:54:16 +01:00
[util] Fix compilation with WINE headers (#246)
* [util] Define typeof keyword for WINE guiddef.h GCC: `-std options disable certain keywords` https://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html MinGW: `#define __uuidof(type) __mingw_uuidof<__typeof(type)>()` WINE: `#define __uuidof(type) __wine_uuidof<typeof(type)>()` * [util] Fix compilation with WINE headers Overall definitions are the same but `__wine_` prefix used in . MinGW: _mingw.h + guiddef.h WINE: guiddef.h
This commit is contained in:
parent
16c2ea5d82
commit
62b99c9bd2
@ -6,8 +6,13 @@
|
||||
#include "com_include.h"
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#define DXVK_DEFINE_GUID(iface) \
|
||||
template<> inline GUID const& __mingw_uuidof<iface> () { return iface::guid; }
|
||||
# ifdef __WINE__
|
||||
# define DXVK_DEFINE_GUID(iface) \
|
||||
template<> inline GUID const& __wine_uuidof<iface> () { return iface::guid; }
|
||||
# else
|
||||
# define DXVK_DEFINE_GUID(iface) \
|
||||
template<> inline GUID const& __mingw_uuidof<iface> () { return iface::guid; }
|
||||
# endif
|
||||
#endif
|
||||
|
||||
std::ostream& operator << (std::ostream& os, REFIID guid);
|
||||
|
@ -8,4 +8,10 @@
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <unknwn.h>
|
||||
#include <unknwn.h>
|
||||
|
||||
// GCC: -std options disable certain keywords
|
||||
// https://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html
|
||||
#if defined(__WINE__) && !defined(typeof)
|
||||
#define typeof __typeof
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user