summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac12
-rw-r--r--include/plist/plist.h14
-rw-r--r--src/Array.cpp6
-rw-r--r--src/Boolean.cpp1
-rw-r--r--src/Dictionary.cpp1
-rw-r--r--src/Integer.cpp1
-rw-r--r--src/Key.cpp1
-rw-r--r--src/Makefile.am1
-rw-r--r--src/Node.cpp1
-rw-r--r--src/String.cpp1
-rw-r--r--src/Structure.cpp1
-rw-r--r--src/Uid.cpp1
-rw-r--r--src/bplist.c2
-rw-r--r--src/plist.h16
14 files changed, 42 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index c6cb4bc..bf1131d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -174,7 +174,7 @@ else
174fi 174fi
175AM_CONDITIONAL([HAVE_CYTHON],[test "x$cython_python_bindings" = "xyes"]) 175AM_CONDITIONAL([HAVE_CYTHON],[test "x$cython_python_bindings" = "xyes"])
176 176
177AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -Wno-strict-aliasing -fvisibility=hidden $PTHREAD_CFLAGS") 177AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -Wno-strict-aliasing $PTHREAD_CFLAGS")
178GLOBAL_LDFLAGS="$PTHREAD_LIBS" 178GLOBAL_LDFLAGS="$PTHREAD_LIBS"
179 179
180AC_ARG_ENABLE(debug, 180AC_ARG_ENABLE(debug,
@@ -192,7 +192,17 @@ if (test "x$debug" = "xyes"); then
192 GLOBAL_CFLAGS+=" -g" 192 GLOBAL_CFLAGS+=" -g"
193fi 193fi
194 194
195if test "x$enable_static" = "xyes" -a "x$enable_shared" = "xno"; then
196 GLOBAL_CFLAGS+=" -DLIBPLIST_STATIC"
197fi
198
199GLOBAL_CXXFLAGS=$GLOBAL_CFLAGS
200AS_COMPILER_FLAG([-fvisibility=hidden], [
201 GLOBAL_CFLAGS+=" -fvisibility=hidden"
202], [])
203
195AC_SUBST(GLOBAL_CFLAGS) 204AC_SUBST(GLOBAL_CFLAGS)
205AC_SUBST(GLOBAL_CXXFLAGS)
196AC_SUBST(GLOBAL_LDFLAGS) 206AC_SUBST(GLOBAL_LDFLAGS)
197 207
198case "$GLOBAL_CFLAGS" in 208case "$GLOBAL_CFLAGS" in
diff --git a/include/plist/plist.h b/include/plist/plist.h
index 47eda51..0a9f5ee 100644
--- a/include/plist/plist.h
+++ b/include/plist/plist.h
@@ -75,17 +75,11 @@ extern "C"
75#endif 75#endif
76/*}}}*/ 76/*}}}*/
77 77
78#ifdef LIBPLIST_STATIC 78#ifndef PLIST_API
79 #define PLIST_API 79 #ifdef LIBPLIST_STATIC
80#elif defined(_WIN32) 80 #define PLIST_API
81 #ifdef DLL_EXPORT 81 #elif defined(_WIN32)
82 #define PLIST_API __declspec(dllexport)
83 #else
84 #define PLIST_API __declspec(dllimport) 82 #define PLIST_API __declspec(dllimport)
85 #endif
86#else
87 #if __GNUC__ >= 4
88 #define PLIST_API __attribute__((visibility("default")))
89 #else 83 #else
90 #define PLIST_API 84 #define PLIST_API
91 #endif 85 #endif
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 @@
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 19 */
20 20
21#include <plist/Array.h> 21#include <cstdlib>
22
23#include <algorithm> 22#include <algorithm>
24#include <climits> 23#include <climits>
25#include <cstdlib> 24#include "plist.h"
25#include <plist/Array.h>
26 26
27namespace PList 27namespace PList
28{ 28{
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 @@
19 */ 19 */
20 20
21#include <cstdlib> 21#include <cstdlib>
22#include "plist.h"
22#include <plist/Boolean.h> 23#include <plist/Boolean.h>
23 24
24namespace PList 25namespace 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 @@
19 */ 19 */
20 20
21#include <cstdlib> 21#include <cstdlib>
22#include "plist.h"
22#include <plist/Dictionary.h> 23#include <plist/Dictionary.h>
23 24
24namespace PList 25namespace 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 @@
19 */ 19 */
20 20
21#include <cstdlib> 21#include <cstdlib>
22#include "plist.h"
22#include <plist/Integer.h> 23#include <plist/Integer.h>
23 24
24namespace PList 25namespace 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 @@
19 */ 19 */
20 20
21#include <cstdlib> 21#include <cstdlib>
22#include "plist.h"
22#include <plist/Key.h> 23#include <plist/Key.h>
23 24
24namespace PList 25namespace 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 = \
4 -I$(top_srcdir)/libcnary/include 4 -I$(top_srcdir)/libcnary/include
5 5
6AM_CFLAGS = $(GLOBAL_CFLAGS) 6AM_CFLAGS = $(GLOBAL_CFLAGS)
7AM_CXXFLAGS = $(GLOBAL_CXXFLAGS)
7AM_LDFLAGS = $(GLOBAL_LDFLAGS) 8AM_LDFLAGS = $(GLOBAL_LDFLAGS)
8 9
9lib_LTLIBRARIES = \ 10lib_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 @@
19 */ 19 */
20 20
21#include <cstdlib> 21#include <cstdlib>
22#include "plist.h"
22#include <plist/Node.h> 23#include <plist/Node.h>
23#include <plist/Structure.h> 24#include <plist/Structure.h>
24#include <plist/Dictionary.h> 25#include <plist/Dictionary.h>
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 @@
19 */ 19 */
20 20
21#include <cstdlib> 21#include <cstdlib>
22#include "plist.h"
22#include <plist/String.h> 23#include <plist/String.h>
23 24
24namespace PList 25namespace 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 @@
19 */ 19 */
20 20
21#include <cstdlib> 21#include <cstdlib>
22#include "plist.h"
22#include <plist/Structure.h> 23#include <plist/Structure.h>
23 24
24namespace PList 25namespace 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 @@
19 */ 19 */
20 20
21#include <cstdlib> 21#include <cstdlib>
22#include "plist.h"
22#include <plist/Uid.h> 23#include <plist/Uid.h>
23 24
24namespace PList 25namespace 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 @@
32#include <ctype.h> 32#include <ctype.h>
33#include <inttypes.h> 33#include <inttypes.h>
34 34
35#include <plist/plist.h>
36#include "plist.h" 35#include "plist.h"
37#include "hashtable.h" 36#include "hashtable.h"
38#include "bytearray.h" 37#include "bytearray.h"
39#include "ptrarray.h" 38#include "ptrarray.h"
39#include "plist/plist.h"
40 40
41#include <node.h> 41#include <node.h>
42 42
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 @@
26#include <config.h> 26#include <config.h>
27#endif 27#endif
28 28
29#include "plist/plist.h"
30
31#include <sys/types.h> 29#include <sys/types.h>
32#include <sys/stat.h> 30#include <sys/stat.h>
33 31
@@ -39,6 +37,20 @@
39#include <sys/time.h> 37#include <sys/time.h>
40#endif 38#endif
41 39
40#ifdef LIBPLIST_STATIC
41 #define PLIST_API
42#elif defined(_WIN32)
43 #define PLIST_API __declspec( dllexport )
44#else
45 #if __GNUC__ >= 4
46 #define PLIST_API __attribute__((visibility("default")))
47 #else
48 #define PLIST_API
49 #endif
50#endif
51
52#include "plist/plist.h"
53
42struct plist_data_s 54struct plist_data_s
43{ 55{
44 union 56 union