mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-03 15:17:29 +00:00
Fix C++ exception handling when -fvisibility=hidden (#302)
Fix C++ exception handling when -fvisibility=hidden Ensure that QPDFExc and QPDFSystemError are marked visible, so that their typeinfo will not be suppressed when -fvisibility=hidden. Details: https://gcc.gnu.org/wiki/Visibility
This commit is contained in:
parent
af42fe9daf
commit
2efec4ce7b
@ -25,8 +25,13 @@
|
||||
|
||||
#if defined(_WIN32) && defined(DLL_EXPORT)
|
||||
# define QPDF_DLL __declspec(dllexport)
|
||||
# define QPDF_DLL_EXCEPTION
|
||||
#elif __GNUC__ >= 4
|
||||
# define QPDF_DLL __attribute__ ((visibility ("default")))
|
||||
# define QPDF_DLL_EXCEPTION __attribute__ ((visibility ("default")))
|
||||
#else
|
||||
# define QPDF_DLL
|
||||
# define QPDF_DLL_EXCEPTION
|
||||
#endif
|
||||
|
||||
#endif /* QPDF_DLL_HH */
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
|
||||
class QPDFExc: public std::runtime_error
|
||||
class QPDF_DLL_EXCEPTION QPDFExc: public std::runtime_error
|
||||
{
|
||||
public:
|
||||
QPDF_DLL
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
|
||||
class QPDFSystemError: public std::runtime_error
|
||||
class QPDF_DLL_EXCEPTION QPDFSystemError: public std::runtime_error
|
||||
{
|
||||
public:
|
||||
QPDF_DLL
|
||||
|
Loading…
Reference in New Issue
Block a user