From 864a546af6e1c17e0de2dc2be6da105f454b6e54 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 21 Jun 2019 20:27:31 -0400 Subject: Build with -fvisibility=hidden when supported --- include/qpdf/DLL.h | 8 ++++---- include/qpdf/InputSource.hh | 4 ++-- include/qpdf/Pipeline.hh | 2 +- include/qpdf/Pl_DCT.hh | 2 +- include/qpdf/QPDFExc.hh | 2 +- include/qpdf/QPDFObjectHandle.hh | 4 ++-- include/qpdf/QPDFSystemError.hh | 2 +- include/qpdf/QPDFWriter.hh | 2 +- include/qpdf/RandomDataProvider.hh | 3 ++- 9 files changed, 15 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/qpdf/DLL.h b/include/qpdf/DLL.h index 1e5d8a1a..7b9b00a8 100644 --- a/include/qpdf/DLL.h +++ b/include/qpdf/DLL.h @@ -23,15 +23,15 @@ #ifndef QPDF_DLL_HH #define QPDF_DLL_HH -#if defined(_WIN32) && defined(DLL_EXPORT) +#if (defined _WIN32 || defined __CYGWIN__) && defined(DLL_EXPORT) # define QPDF_DLL __declspec(dllexport) -# define QPDF_DLL_EXCEPTION +# define QPDF_DLL_CLASS #elif __GNUC__ >= 4 # define QPDF_DLL __attribute__ ((visibility ("default"))) -# define QPDF_DLL_EXCEPTION __attribute__ ((visibility ("default"))) +# define QPDF_DLL_CLASS __attribute__ ((visibility ("default"))) #else # define QPDF_DLL -# define QPDF_DLL_EXCEPTION +# define QPDF_DLL_CLASS #endif #endif /* QPDF_DLL_HH */ diff --git a/include/qpdf/InputSource.hh b/include/qpdf/InputSource.hh index 8465ad55..3d0d9aaf 100644 --- a/include/qpdf/InputSource.hh +++ b/include/qpdf/InputSource.hh @@ -27,7 +27,7 @@ #include #include -class InputSource +class QPDF_DLL_CLASS InputSource { public: QPDF_DLL @@ -40,7 +40,7 @@ class InputSource { } - class Finder + class QPDF_DLL_CLASS Finder { public: Finder() diff --git a/include/qpdf/Pipeline.hh b/include/qpdf/Pipeline.hh index b7bc5a7e..a5440a27 100644 --- a/include/qpdf/Pipeline.hh +++ b/include/qpdf/Pipeline.hh @@ -47,7 +47,7 @@ #include #include -class Pipeline +class QPDF_DLL_CLASS Pipeline { public: QPDF_DLL diff --git a/include/qpdf/Pl_DCT.hh b/include/qpdf/Pl_DCT.hh index 665a2b01..1827fa80 100644 --- a/include/qpdf/Pl_DCT.hh +++ b/include/qpdf/Pl_DCT.hh @@ -33,7 +33,7 @@ class Pl_DCT: public Pipeline QPDF_DLL Pl_DCT(char const* identifier, Pipeline* next); - class CompressConfig + class QPDF_DLL_CLASS CompressConfig { public: CompressConfig() diff --git a/include/qpdf/QPDFExc.hh b/include/qpdf/QPDFExc.hh index c538eb4d..188ede29 100644 --- a/include/qpdf/QPDFExc.hh +++ b/include/qpdf/QPDFExc.hh @@ -29,7 +29,7 @@ #include #include -class QPDF_DLL_EXCEPTION QPDFExc: public std::runtime_error +class QPDF_DLL_CLASS QPDFExc: public std::runtime_error { public: QPDF_DLL diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index 4ee0b5a0..28f6f491 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -54,7 +54,7 @@ class QPDFObjectHandle // alternative way of associating stream data with a stream. See // comments on replaceStreamData and newStream for additional // details. - class StreamDataProvider + class QPDF_DLL_CLASS StreamDataProvider { public: QPDF_DLL @@ -99,7 +99,7 @@ class QPDFObjectHandle // string token will also work. The correct way to construct a // string token that would write the literal value (str) is // QPDFTokenizer::Token(QPDFTokenizer::tt_string, "str"). - class TokenFilter + class QPDF_DLL_CLASS TokenFilter { public: QPDF_DLL diff --git a/include/qpdf/QPDFSystemError.hh b/include/qpdf/QPDFSystemError.hh index cef8ea08..e8ea09eb 100644 --- a/include/qpdf/QPDFSystemError.hh +++ b/include/qpdf/QPDFSystemError.hh @@ -29,7 +29,7 @@ #include #include -class QPDF_DLL_EXCEPTION QPDFSystemError: public std::runtime_error +class QPDF_DLL_CLASS QPDFSystemError: public std::runtime_error { public: QPDF_DLL diff --git a/include/qpdf/QPDFWriter.hh b/include/qpdf/QPDFWriter.hh index 2ac00582..703d752f 100644 --- a/include/qpdf/QPDFWriter.hh +++ b/include/qpdf/QPDFWriter.hh @@ -76,7 +76,7 @@ class QPDFWriter QPDF_DLL ~QPDFWriter(); - class ProgressReporter + class QPDF_DLL_CLASS ProgressReporter { public: virtual ~ProgressReporter() diff --git a/include/qpdf/RandomDataProvider.hh b/include/qpdf/RandomDataProvider.hh index c3a519aa..2213b7c4 100644 --- a/include/qpdf/RandomDataProvider.hh +++ b/include/qpdf/RandomDataProvider.hh @@ -22,9 +22,10 @@ #ifndef RANDOMDATAPROVIDER_HH #define RANDOMDATAPROVIDER_HH +#include #include // for size_t -class RandomDataProvider +class QPDF_DLL_CLASS RandomDataProvider { public: virtual ~RandomDataProvider() -- cgit v1.2.3-54-g00ecf