File: attribute_visibility_default_for_exceptions.diff

package info (click to toggle)
mysql-connector-c%2B%2B 1.1.12-4.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,908 kB
  • sloc: cpp: 44,895; ansic: 2,114; php: 528; sql: 403; xml: 109; sh: 33; makefile: 11
file content (62 lines) | stat: -rw-r--r-- 2,297 bytes parent folder | download | duplicates (2)
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
@@ -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) {}
 };