1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
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
@@ -31,8 +31,10 @@
#include <stdexcept>
#include <string>
#include <memory>
+#define CPPCONN_PUBLIC_EXCEPTION __attribute__((visibility("default")))
+
namespace sql
{
#define MEMORY_ALLOC_OPERATORS(Class) \
@@ -51,9 +53,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
@@ -97,28 +99,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) {}
};
|