Last-Update: 2009-12-02
Author: Rene Engelhard <rene@debian.org>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559219
Description: add __attribute__((visibility("default"))) to the exceptions

--- a/cppconn/exception.h
+++ b/cppconn/exception.h
@@ -37,8 +37,10 @@
 #include <stdexcept>
 #include <string>
 #include <memory>
 
+#define CPPCONN_PUBLIC_EXCEPTION __attribute__((visibility("default")))
+
 namespace sql
 {
 
 #if (__cplusplus < 201103L)
@@ -68,9 +70,9 @@
 
 #pragma warning(push)
 #pragma warning(disable: 4275)
 #endif
-class CPPCONN_PUBLIC_FUNC SQLException : public std::runtime_error
+class CPPCONN_PUBLIC_EXCEPTION SQLException : public std::runtime_error
 {
 #ifdef _WIN32
 #pragma warning(pop)
 #endif
@@ -114,28 +116,28 @@
 protected:
   MEMORY_ALLOC_OPERATORS(SQLException)
 };
 
-struct CPPCONN_PUBLIC_FUNC MethodNotImplementedException : public SQLException
+struct CPPCONN_PUBLIC_EXCEPTION MethodNotImplementedException : public SQLException
 {
   MethodNotImplementedException(const MethodNotImplementedException& e) : SQLException(e.what(), e.sql_state, e.errNo) { }
   MethodNotImplementedException(const std::string& reason) : SQLException(reason, "", 0) {}
 };
 
-struct CPPCONN_PUBLIC_FUNC InvalidArgumentException : public SQLException
+struct CPPCONN_PUBLIC_EXCEPTION InvalidArgumentException : public SQLException
 {
   InvalidArgumentException(const InvalidArgumentException& e) : SQLException(e.what(), e.sql_state, e.errNo) { }
   InvalidArgumentException(const std::string& reason) : SQLException(reason, "", 0) {}
 };
 
-struct CPPCONN_PUBLIC_FUNC InvalidInstanceException : public SQLException
+struct CPPCONN_PUBLIC_EXCEPTION InvalidInstanceException : public SQLException
 {
   InvalidInstanceException(const InvalidInstanceException& e) : SQLException(e.what(), e.sql_state, e.errNo) { }
   InvalidInstanceException(const std::string& reason) : SQLException(reason, "", 0) {}
 };
 
 
-struct CPPCONN_PUBLIC_FUNC NonScrollableException : public SQLException
+struct CPPCONN_PUBLIC_EXCEPTION NonScrollableException : public SQLException
 {
   NonScrollableException(const NonScrollableException& e) : SQLException(e.what(), e.sql_state, e.errNo) { }
   NonScrollableException(const std::string& reason) : SQLException(reason, "", 0) {}
 };
