From 76a7e2e716fed0ab2c5c2d9d4d37efbe8c0c1a1d Mon Sep 17 00:00:00 2001 From: aleks-f Date: Sun, 13 Jan 2013 10:31:21 -0600 Subject: [PATCH] GH56: Need a way to disable *_API macros with GCC GH #56: Need a way to disable *_API macros with GCC --- Crypto/include/Poco/Crypto/Crypto.h | 2 +- Data/MySQL/include/Poco/Data/MySQL/MySQL.h | 2 +- Data/ODBC/include/Poco/Data/ODBC/ODBC.h | 2 +- Data/SQLite/include/Poco/Data/SQLite/SQLite.h | 2 +- Data/include/Poco/Data/Data.h | 2 +- Foundation/include/Poco/Foundation.h | 2 +- JSON/include/Poco/JSON/JSON.h | 2 +- Net/include/Poco/Net/Net.h | 2 +- NetSSL_OpenSSL/include/Poco/Net/NetSSL.h | 2 +- PocoDoc/cfg/mkdoc-poco.xml | 13 +------------ PocoDoc/cfg/mkdocumentation.xml | 13 +------------ Util/include/Poco/Util/Util.h | 2 +- XML/include/Poco/XML/XML.h | 2 +- Zip/include/Poco/Zip/Zip.h | 2 +- 14 files changed, 14 insertions(+), 36 deletions(-) diff --git a/Crypto/include/Poco/Crypto/Crypto.h b/Crypto/include/Poco/Crypto/Crypto.h index 6f2ac0f1e..b9161beed 100644 --- a/Crypto/include/Poco/Crypto/Crypto.h +++ b/Crypto/include/Poco/Crypto/Crypto.h @@ -90,7 +90,7 @@ enum RSAPaddingMode #if !defined(Crypto_API) - #if defined (__GNUC__) && (__GNUC__ >= 4) + #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4) #define Crypto_API __attribute__ ((visibility ("default"))) #else #define Crypto_API diff --git a/Data/MySQL/include/Poco/Data/MySQL/MySQL.h b/Data/MySQL/include/Poco/Data/MySQL/MySQL.h index 10e33075d..0f4b4070f 100644 --- a/Data/MySQL/include/Poco/Data/MySQL/MySQL.h +++ b/Data/MySQL/include/Poco/Data/MySQL/MySQL.h @@ -61,7 +61,7 @@ #if !defined(MySQL_API) - #if defined (__GNUC__) && (__GNUC__ >= 4) + #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4) #define MySQL_API __attribute__ ((visibility ("default"))) #else #define MySQL_API diff --git a/Data/ODBC/include/Poco/Data/ODBC/ODBC.h b/Data/ODBC/include/Poco/Data/ODBC/ODBC.h index 889877113..b9a6fe6a5 100644 --- a/Data/ODBC/include/Poco/Data/ODBC/ODBC.h +++ b/Data/ODBC/include/Poco/Data/ODBC/ODBC.h @@ -66,7 +66,7 @@ #if !defined(ODBC_API) - #if defined (__GNUC__) && (__GNUC__ >= 4) + #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4) #define ODBC_API __attribute__ ((visibility ("default"))) #else #define ODBC_API diff --git a/Data/SQLite/include/Poco/Data/SQLite/SQLite.h b/Data/SQLite/include/Poco/Data/SQLite/SQLite.h index aeae70f88..ea013103a 100644 --- a/Data/SQLite/include/Poco/Data/SQLite/SQLite.h +++ b/Data/SQLite/include/Poco/Data/SQLite/SQLite.h @@ -63,7 +63,7 @@ #if !defined(SQLite_API) - #if defined (__GNUC__) && (__GNUC__ >= 4) + #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4) #define SQLite_API __attribute__ ((visibility ("default"))) #else #define SQLite_API diff --git a/Data/include/Poco/Data/Data.h b/Data/include/Poco/Data/Data.h index b473149a3..5ddf088f8 100644 --- a/Data/include/Poco/Data/Data.h +++ b/Data/include/Poco/Data/Data.h @@ -63,7 +63,7 @@ #if !defined(Data_API) - #if defined (__GNUC__) && (__GNUC__ >= 4) + #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4) #define Data_API __attribute__ ((visibility ("default"))) #else #define Data_API diff --git a/Foundation/include/Poco/Foundation.h b/Foundation/include/Poco/Foundation.h index 65998ba7d..a50325f3a 100644 --- a/Foundation/include/Poco/Foundation.h +++ b/Foundation/include/Poco/Foundation.h @@ -76,7 +76,7 @@ #if !defined(Foundation_API) - #if defined (__GNUC__) && (__GNUC__ >= 4) + #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4) #define Foundation_API __attribute__ ((visibility ("default"))) #else #define Foundation_API diff --git a/JSON/include/Poco/JSON/JSON.h b/JSON/include/Poco/JSON/JSON.h index 1373429b6..ca53d967b 100644 --- a/JSON/include/Poco/JSON/JSON.h +++ b/JSON/include/Poco/JSON/JSON.h @@ -63,7 +63,7 @@ #if !defined(JSON_API) - #if defined (__GNUC__) && (__GNUC__ >= 4) + #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4) #define JSON_API __attribute__ ((visibility ("default"))) #else #define JSON_API diff --git a/Net/include/Poco/Net/Net.h b/Net/include/Poco/Net/Net.h index 67713fd46..c632e0ea2 100644 --- a/Net/include/Poco/Net/Net.h +++ b/Net/include/Poco/Net/Net.h @@ -63,7 +63,7 @@ #if !defined(Net_API) - #if defined (__GNUC__) && (__GNUC__ >= 4) + #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4) #define Net_API __attribute__ ((visibility ("default"))) #else #define Net_API diff --git a/NetSSL_OpenSSL/include/Poco/Net/NetSSL.h b/NetSSL_OpenSSL/include/Poco/Net/NetSSL.h index ad0b8d182..6ec236941 100644 --- a/NetSSL_OpenSSL/include/Poco/Net/NetSSL.h +++ b/NetSSL_OpenSSL/include/Poco/Net/NetSSL.h @@ -63,7 +63,7 @@ #if !defined(NetSSL_API) - #if defined (__GNUC__) && (__GNUC__ >= 4) + #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4) #define NetSSL_API __attribute__ ((visibility ("default"))) #else #define NetSSL_API diff --git a/PocoDoc/cfg/mkdoc-poco.xml b/PocoDoc/cfg/mkdoc-poco.xml index e21261332..d09c325a2 100644 --- a/PocoDoc/cfg/mkdoc-poco.xml +++ b/PocoDoc/cfg/mkdoc-poco.xml @@ -35,18 +35,7 @@ -D_DEBUG, -E, -C, - -DFoundation_API=, - -DXML_API=, - -DJSON_API=, - -DUtil_API=, - -DNet_API=, - -DCrypto_API=, - -DNetSSL_API=, - -DZip_API=, - -DData_API=, - -DSQLite_API=, - -DMySQL_API=, - -DODBC_API= + -DPOCO_NO_GCC_API_ATTRIBUTE true diff --git a/PocoDoc/cfg/mkdocumentation.xml b/PocoDoc/cfg/mkdocumentation.xml index 8d49d4412..5269e64be 100644 --- a/PocoDoc/cfg/mkdocumentation.xml +++ b/PocoDoc/cfg/mkdocumentation.xml @@ -37,18 +37,7 @@ -D_DEBUG, -E, -C, - -DFoundation_API=, - -DXML_API=, - -DJSON_API=, - -DUtil_API=, - -DNet_API=, - -DCrypto_API=, - -DNetSSL_API=, - -DZip_API=, - -DData_API=, - -DSQLite_API=, - -DMySQL_API=, - -DODBC_API= + -DPOCO_NO_GCC_API_ATTRIBUTE true diff --git a/Util/include/Poco/Util/Util.h b/Util/include/Poco/Util/Util.h index 4c54e5972..b85418e7b 100644 --- a/Util/include/Poco/Util/Util.h +++ b/Util/include/Poco/Util/Util.h @@ -63,7 +63,7 @@ #if !defined(Util_API) - #if defined (__GNUC__) && (__GNUC__ >= 4) + #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4) #define Util_API __attribute__ ((visibility ("default"))) #else #define Util_API diff --git a/XML/include/Poco/XML/XML.h b/XML/include/Poco/XML/XML.h index 648f971c1..175ab8399 100644 --- a/XML/include/Poco/XML/XML.h +++ b/XML/include/Poco/XML/XML.h @@ -63,7 +63,7 @@ #if !defined(XML_API) - #if defined (__GNUC__) && (__GNUC__ >= 4) + #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4) #define XML_API __attribute__ ((visibility ("default"))) #else #define XML_API diff --git a/Zip/include/Poco/Zip/Zip.h b/Zip/include/Poco/Zip/Zip.h index bbb9ad8b1..0cedf370c 100644 --- a/Zip/include/Poco/Zip/Zip.h +++ b/Zip/include/Poco/Zip/Zip.h @@ -63,7 +63,7 @@ #if !defined(Zip_API) - #if defined (__GNUC__) && (__GNUC__ >= 4) + #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4) #define Zip_API __attribute__ ((visibility ("default"))) #else #define Zip_API