diff options
Diffstat (limited to 'libraries/podofo/XRefStrParObj-deprecated.patch')
-rw-r--r-- | libraries/podofo/XRefStrParObj-deprecated.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/libraries/podofo/XRefStrParObj-deprecated.patch b/libraries/podofo/XRefStrParObj-deprecated.patch new file mode 100644 index 0000000000000..d2a74b68b5c31 --- /dev/null +++ b/libraries/podofo/XRefStrParObj-deprecated.patch @@ -0,0 +1,61 @@ +diff -Naur podofo-0.9.6.orig/src/base/PdfXRefStreamParserObject.h podofo-0.9.6/src/base/PdfXRefStreamParserObject.h +--- podofo-0.9.6.orig/src/base/PdfXRefStreamParserObject.h 2014-06-06 22:13:22.000000000 +0000 ++++ podofo-0.9.6/src/base/PdfXRefStreamParserObject.h 2020-05-03 02:26:01.119538387 +0000 +@@ -47,8 +47,11 @@ + * an XRef stream object. + * + * It is mainly here to make PdfParser more modular. ++ * This is only marked PODOFO_API for the benefit of the tests, ++ * the class is for internal use only. It is deprecated, so ++ * don't ever rely on it (i.e. externally or in PoDoFo tools). + */ +-class PdfXRefStreamParserObject : public PdfParserObject { ++class PODOFO_DEPRECATED PODOFO_API PdfXRefStreamParserObject : public PdfParserObject { + public: + + /** Parse the object data from the given file handle starting at +diff -Naur podofo-0.9.6.orig/src/base/podofoapi.h podofo-0.9.6/src/base/podofoapi.h +--- podofo-0.9.6.orig/src/base/podofoapi.h 2017-10-27 06:38:19.000000000 +0000 ++++ podofo-0.9.6/src/base/podofoapi.h 2020-05-03 02:27:03.874537513 +0000 +@@ -173,9 +173,22 @@ + + /* Set up some other compiler-specific but not platform-specific macros */ + +-#if defined(__GNUC__) +- /* gcc will issue a warning if a function or variable so annotated is used */ +- #define PODOFO_DEPRECATED __attribute__((deprecated)) ++#ifdef __GNU__ ++ #define PODOFO_HAS_GCC_ATTRIBUTE_DEPRECATED 1 ++#elif defined(__has_attribute) ++ #if __has_attribute(__deprecated__) ++ #define PODOFO_HAS_GCC_ATTRIBUTE_DEPRECATED 1 ++ #endif ++#endif ++ ++#ifdef PODOFO_HAS_GCC_ATTRIBUTE_DEPRECATED ++ /* gcc (or compat. clang) will issue a warning if a function or variable so annotated is used */ ++ #define PODOFO_DEPRECATED __attribute__((__deprecated__)) ++#else ++ #define PODOFO_DEPRECATED ++#endif ++ ++#ifdef __GNU__ + /* gcc can do some additional optimisations on functions annotated as pure. + * See the documentation on __attribute__((pure)) in the gcc docs. */ + #define PODOFO_PURE_FUNCTION __attribute__((pure)) +@@ -185,9 +198,12 @@ + * (see CODINGSTYLE.txt) .*/ + #define PODOFO_NOTHROW __attribute__((nothrow)) + #else +- #define PODOFO_DEPRECATED +- #define PODOFO_PURE_FUNCTION +- #define PODOFO_NOTHROW __declspec(nothrow) ++ #define PODOFO_PURE_FUNCTION ++ #ifdef _MSC_VER ++ #define PODOFO_NOTHROW __declspec(nothrow) ++ #else ++ #define PODOFO_NOTHROW ++ #endif + #endif + + // Peter Petrov 27 April 2008 |