Merge pull request #248 from mjbudd77/master

Build fix for __THROWNL not being defined on libc that is used by Alp…
This commit is contained in:
mjbudd77 2020-11-28 23:20:26 -05:00 committed by GitHub
commit f53fbf3de2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 4 deletions

View File

@ -3,6 +3,8 @@
#pragma once
#include <stdio.h>
#include <QWidget>
#include <QDialog>
#include <QVBoxLayout>
@ -53,12 +55,17 @@ class LuaControlDialog_t : public QDialog
// Formatted print
#ifdef WIN32
int LuaPrintfToWindowConsole(_In_z_ _Printf_format_string_ const char* const format, ...) ;
int LuaPrintfToWindowConsole(_In_z_ _Printf_format_string_ const char* const format, ...) ;
#elif __linux__
int LuaPrintfToWindowConsole(const char *__restrict format, ...)
__THROWNL __attribute__ ((__format__ (__printf__, 1, 2)));
#ifdef __THROWNL
int LuaPrintfToWindowConsole(const char *__restrict format, ...)
__THROWNL __attribute__ ((__format__ (__printf__, 1, 2)));
#else
int LuaPrintfToWindowConsole(const char *__restrict format, ...)
throw() __attribute__ ((__format__ (__printf__, 1, 2)));
#endif
#else
int LuaPrintfToWindowConsole(const char *__restrict format, ...) throw();
int LuaPrintfToWindowConsole(const char *__restrict format, ...) throw();
#endif
void PrintToWindowConsole(intptr_t hDlgAsInt, const char* str);

View File

@ -194,6 +194,10 @@ void TaseditorDisableManualFunctionIfNeeded();
#else
int LuaKillMessageBox(void);
#ifdef __linux__
#ifndef __THROWNL
#define __THROWNL throw () // Build fix Alpine Linux libc
#endif
int LuaPrintfToWindowConsole(const char *__restrict format, ...)
__THROWNL __attribute__ ((__format__ (__printf__, 1, 2)));
#else