Parcourir la source

[1206] fix segfault on sunstudio

Jelte Jansen il y a 13 ans
Parent
commit
f7bb760f4d
1 fichiers modifiés avec 9 ajouts et 5 suppressions
  1. 9 5
      src/lib/datasrc/factory.h

+ 9 - 5
src/lib/datasrc/factory.h

@@ -39,9 +39,9 @@ public:
 ///        implementation library
 class DataSourceLibrarySymbolError : public DataSourceError {
 public:
-    DataSourceLibrarySymbolError(const char* file, size_t line,
-                                 const char* what) :
-        DataSourceError(file, line, what) {}
+DataSourceLibrarySymbolError(const char* file, size_t line,
+                             const char* what) :
+    DataSourceError(file, line, what) {}
 };
 
 /// \brief Raised if the given config contains bad data
@@ -50,8 +50,12 @@ public:
 /// instance, the sqlite3 datasource needs a database file).
 class DataSourceConfigError : public DataSourceError {
 public:
-    DataSourceConfigError(const char* file, size_t line, const char* what) :
-        DataSourceError(file, line, what) {}
+DataSourceConfigError(const char* file, size_t line, const char* what) :
+    DataSourceError(file, line, what) {}
+// This exception is created in the dynamic modules. Apparently
+// sunstudio can't handle it if we then automatically derive the
+// destructor, so we provide it explicitely
+~DataSourceConfigError() throw() {}
 };
 
 typedef DataSourceClient* ds_creator(isc::data::ConstElementPtr config);