From 3daee6097cfa14c597e5104b02acfe83749001d9 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Mon, 29 Jan 2024 10:45:41 +0100 Subject: Fix PLIST_API definitions --- src/Array.cpp | 6 +++--- src/Boolean.cpp | 1 + src/Dictionary.cpp | 1 + src/Integer.cpp | 1 + src/Key.cpp | 1 + src/Makefile.am | 1 + src/Node.cpp | 1 + src/String.cpp | 1 + src/Structure.cpp | 1 + src/Uid.cpp | 1 + src/bplist.c | 2 +- src/plist.h | 16 ++++++++++++++-- 12 files changed, 27 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/Array.cpp b/src/Array.cpp index d86d021..bc448d3 100644 --- a/src/Array.cpp +++ b/src/Array.cpp @@ -18,11 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include - +#include #include #include -#include +#include "plist.h" +#include namespace PList { diff --git a/src/Boolean.cpp b/src/Boolean.cpp index 2c871c8..9ec1a63 100644 --- a/src/Boolean.cpp +++ b/src/Boolean.cpp @@ -19,6 +19,7 @@ */ #include +#include "plist.h" #include namespace PList diff --git a/src/Dictionary.cpp b/src/Dictionary.cpp index 4e7e19c..30c20b6 100644 --- a/src/Dictionary.cpp +++ b/src/Dictionary.cpp @@ -19,6 +19,7 @@ */ #include +#include "plist.h" #include namespace PList diff --git a/src/Integer.cpp b/src/Integer.cpp index 7fa0f93..30a5405 100644 --- a/src/Integer.cpp +++ b/src/Integer.cpp @@ -19,6 +19,7 @@ */ #include +#include "plist.h" #include namespace PList diff --git a/src/Key.cpp b/src/Key.cpp index 5f8d205..79265d5 100644 --- a/src/Key.cpp +++ b/src/Key.cpp @@ -19,6 +19,7 @@ */ #include +#include "plist.h" #include namespace PList diff --git a/src/Makefile.am b/src/Makefile.am index e4b39ae..1a416ad 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,6 +4,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/libcnary/include AM_CFLAGS = $(GLOBAL_CFLAGS) +AM_CXXFLAGS = $(GLOBAL_CXXFLAGS) AM_LDFLAGS = $(GLOBAL_LDFLAGS) lib_LTLIBRARIES = \ diff --git a/src/Node.cpp b/src/Node.cpp index 08a91b0..0bd428a 100644 --- a/src/Node.cpp +++ b/src/Node.cpp @@ -19,6 +19,7 @@ */ #include +#include "plist.h" #include #include #include diff --git a/src/String.cpp b/src/String.cpp index aee2358..2ddc28b 100644 --- a/src/String.cpp +++ b/src/String.cpp @@ -19,6 +19,7 @@ */ #include +#include "plist.h" #include namespace PList diff --git a/src/Structure.cpp b/src/Structure.cpp index 4be4e7d..670cce6 100644 --- a/src/Structure.cpp +++ b/src/Structure.cpp @@ -19,6 +19,7 @@ */ #include +#include "plist.h" #include namespace PList diff --git a/src/Uid.cpp b/src/Uid.cpp index e83ed27..8c73c80 100644 --- a/src/Uid.cpp +++ b/src/Uid.cpp @@ -19,6 +19,7 @@ */ #include +#include "plist.h" #include namespace PList diff --git a/src/bplist.c b/src/bplist.c index 953c2c7..93f0bc6 100644 --- a/src/bplist.c +++ b/src/bplist.c @@ -32,11 +32,11 @@ #include #include -#include #include "plist.h" #include "hashtable.h" #include "bytearray.h" #include "ptrarray.h" +#include "plist/plist.h" #include diff --git a/src/plist.h b/src/plist.h index 178fb7c..a993e3a 100644 --- a/src/plist.h +++ b/src/plist.h @@ -26,8 +26,6 @@ #include #endif -#include "plist/plist.h" - #include #include @@ -39,6 +37,20 @@ #include #endif +#ifdef LIBPLIST_STATIC + #define PLIST_API +#elif defined(_WIN32) + #define PLIST_API __declspec( dllexport ) +#else + #if __GNUC__ >= 4 + #define PLIST_API __attribute__((visibility("default"))) + #else + #define PLIST_API + #endif +#endif + +#include "plist/plist.h" + struct plist_data_s { union -- cgit v1.1-32-gdbae