mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-10 06:31:49 +00:00
Fix C++11 builder under GCC
Use decltype(T) instead of typeof(T) under C++11 MD-19353
This commit is contained in:
parent
81f80d26d2
commit
4459e0d6c0
1 changed files with 7 additions and 1 deletions
|
@ -21,8 +21,14 @@ extern unsigned int libupdatergtk_so_len;
|
|||
// pointers to helper functions in the GTK updater UI library
|
||||
UpdateDialogGtk* (*update_dialog_gtk_new)() = 0;
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
#define TYPEOF(x) decltype(x)
|
||||
#else
|
||||
#define TYPEOF(x) typeof(x)
|
||||
#endif
|
||||
|
||||
#define BIND_FUNCTION(library,function) \
|
||||
function = reinterpret_cast<typeof(function)>(dlsym(library,#function));
|
||||
function = reinterpret_cast<TYPEOF(function)>(dlsym(library,#function));
|
||||
|
||||
bool extractFileFromBinary(const char* path, const void* buffer, size_t length)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue