mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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"
|
#include "com_include.h"
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
#define DXVK_DEFINE_GUID(iface) \
|
# ifdef __WINE__
|
||||||
template<> inline GUID const& __mingw_uuidof<iface> () { return iface::guid; }
|
# 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
|
#endif
|
||||||
|
|
||||||
std::ostream& operator << (std::ostream& os, REFIID guid);
|
std::ostream& operator << (std::ostream& os, REFIID guid);
|
||||||
|
@ -8,4 +8,10 @@
|
|||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#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