mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 00:03:03 +01:00
Backported unregistered fix from HEAD - move bodies of virtual functions from .h to .cpp file.
This commit is contained in:
parent
267439018d
commit
4086cfbab3
@ -85,8 +85,7 @@ else
|
|||||||
$(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib -o $@ $^ @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
|
$(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib -o $@ $^ @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
|
||||||
endif
|
endif
|
||||||
# ib_util
|
# ib_util
|
||||||
# this is plain-C library, therefore CLIENTLIB_LINK
|
# this is plain-C library, therefore use CLIENTLIB_LINK
|
||||||
# without STATIC_CXXSUPPORT_LIB is used
|
|
||||||
|
|
||||||
lib_ib_util: $(LIBIBUTIL_SO)
|
lib_ib_util: $(LIBIBUTIL_SO)
|
||||||
|
|
||||||
|
@ -111,13 +111,13 @@ endif
|
|||||||
|
|
||||||
$(LIBFBCLIENT_SO): $(FBCLIENT_Objects)
|
$(LIBFBCLIENT_SO): $(FBCLIENT_Objects)
|
||||||
ifeq ($(PLATFORM),DARWIN)
|
ifeq ($(PLATFORM),DARWIN)
|
||||||
$(CLIENTLIB_LINK) $(LINK_FIREBIRD_CLIENT_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_LINK_IMPLIB) \
|
$(LIB_LINK) $(LINK_FIREBIRD_CLIENT_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_LINK_IMPLIB) \
|
||||||
$(LIB_CLIENT_LINK_OPTIONS) $(LIB_LINK_SONAME) \
|
$(LIB_CLIENT_LINK_OPTIONS) $(LIB_LINK_SONAME) \
|
||||||
-o $@ $^ $(SO_LINK_LIBS) $(STATIC_CXXSUPPORT_LIB) @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
|
-o $@ $^ $(SO_LINK_LIBS) $(STATIC_CXXSUPPORT) @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
|
||||||
else
|
else
|
||||||
$(CLIENTLIB_LINK) $(LINK_FIREBIRD_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_LINK_IMPLIB) \
|
$(LIB_LINK) $(LINK_FIREBIRD_SYMBOLS) $(LIB_LINK_OPTIONS) $(LIB_LINK_IMPLIB) \
|
||||||
$(LIB_LINK_SONAME)$(ClientLibraryNameMajor) $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib \
|
$(LIB_LINK_SONAME)$(ClientLibraryNameMajor) $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib \
|
||||||
-o $@ $^ $(SO_LINK_LIBS) $(STATIC_CXXSUPPORT_LIB) @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
|
-o $@ $^ $(SO_LINK_LIBS) $(STATIC_CXXSUPPORT) @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
AllObjects = $(FBCLIENT_Objects)
|
AllObjects = $(FBCLIENT_Objects)
|
||||||
|
@ -269,7 +269,7 @@ LINK_FBINTL_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/fbintl.vers
|
|||||||
FB_SUPER_SERVER = $(BIN)/fbserver$(EXEC_EXT)
|
FB_SUPER_SERVER = $(BIN)/fbserver$(EXEC_EXT)
|
||||||
FB_CLASSIC_SERVER = $(BIN)/fb_inet_server$(EXEC_EXT)
|
FB_CLASSIC_SERVER = $(BIN)/fb_inet_server$(EXEC_EXT)
|
||||||
|
|
||||||
STATIC_CXXSUPPORT_LIB = -lsupc++ -lgcc_eh
|
STATIC_CXXSUPPORT = -static-libgcc
|
||||||
|
|
||||||
# From utilities
|
# From utilities
|
||||||
CREATE_DB = $(BIN)/create_db$(EXEC_EXT)
|
CREATE_DB = $(BIN)/create_db$(EXEC_EXT)
|
||||||
|
@ -111,6 +111,10 @@ void StringsBuffer::makePermanentVector(ISC_STATUS* perm, const ISC_STATUS* tran
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ********************************* Exception *******************************
|
||||||
|
|
||||||
|
Exception::~Exception() throw() { }
|
||||||
|
|
||||||
/********************************* status_exception *******************************/
|
/********************************* status_exception *******************************/
|
||||||
|
|
||||||
status_exception::status_exception() throw() :
|
status_exception::status_exception() throw() :
|
||||||
@ -240,6 +244,11 @@ ISC_STATUS status_exception::stuff_exception(ISC_STATUS* const status_vector, St
|
|||||||
return status_vector[1];
|
return status_vector[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* status_exception::what() const throw()
|
||||||
|
{
|
||||||
|
return "Firebird::status_exception";
|
||||||
|
}
|
||||||
|
|
||||||
/********************************* BadAlloc ****************************/
|
/********************************* BadAlloc ****************************/
|
||||||
|
|
||||||
void BadAlloc::raise()
|
void BadAlloc::raise()
|
||||||
@ -258,6 +267,11 @@ ISC_STATUS BadAlloc::stuff_exception(ISC_STATUS* const status_vector, StringsBuf
|
|||||||
return status_vector[1];
|
return status_vector[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* BadAlloc::what() const throw()
|
||||||
|
{
|
||||||
|
return "Firebird::BadAlloc";
|
||||||
|
}
|
||||||
|
|
||||||
/********************************* LongJump ****************************/
|
/********************************* LongJump ****************************/
|
||||||
|
|
||||||
void LongJump::raise()
|
void LongJump::raise()
|
||||||
@ -291,6 +305,11 @@ ISC_STATUS LongJump::stuff_exception(ISC_STATUS* const status_vector, StringsBuf
|
|||||||
return status_vector[1];
|
return status_vector[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* LongJump::what() const throw()
|
||||||
|
{
|
||||||
|
return "Firebird::LongJump";
|
||||||
|
}
|
||||||
|
|
||||||
/********************************* system_call_failed ****************************/
|
/********************************* system_call_failed ****************************/
|
||||||
|
|
||||||
system_call_failed::system_call_failed(const char* v_syscall, int v_error_code) :
|
system_call_failed::system_call_failed(const char* v_syscall, int v_error_code) :
|
||||||
@ -331,21 +350,17 @@ fatal_exception::fatal_exception(const char* message) :
|
|||||||
set_status(temp, false);
|
set_status(temp, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Moved to the header due to gpre. Gpre non-static can't receive it, but we
|
|
||||||
// want to avoid problems with picky compilers that can't find what().
|
|
||||||
// We can't link this file into normal gpre.
|
|
||||||
// Keep in sync with the constructor above, please; "message" becomes 4th element
|
|
||||||
// after initialization of status vector.
|
|
||||||
//const char* fatal_exception::what() const throw()
|
|
||||||
//{
|
|
||||||
// return reinterpret_cast<const char*>(value()[3]);
|
|
||||||
//}
|
|
||||||
|
|
||||||
void fatal_exception::raise(const char* message)
|
void fatal_exception::raise(const char* message)
|
||||||
{
|
{
|
||||||
throw fatal_exception(message);
|
throw fatal_exception(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// after initialization of status vector in constructor.
|
||||||
|
const char* fatal_exception::what() const throw()
|
||||||
|
{
|
||||||
|
return reinterpret_cast<const char*>(value()[3]);
|
||||||
|
}
|
||||||
|
|
||||||
/************************** exception handling routines ***************************/
|
/************************** exception handling routines ***************************/
|
||||||
|
|
||||||
const char* status_string(const char* string)
|
const char* status_string(const char* string)
|
||||||
|
@ -77,7 +77,7 @@ class Exception
|
|||||||
protected:
|
protected:
|
||||||
Exception() throw() { }
|
Exception() throw() { }
|
||||||
public:
|
public:
|
||||||
virtual ~Exception() throw() { }
|
virtual ~Exception() throw();
|
||||||
virtual ISC_STATUS stuff_exception(ISC_STATUS* const status_vector, StringsBuffer* sb = NULL) const throw() = 0;
|
virtual ISC_STATUS stuff_exception(ISC_STATUS* const status_vector, StringsBuffer* sb = NULL) const throw() = 0;
|
||||||
virtual const char* what() const throw() = 0;
|
virtual const char* what() const throw() = 0;
|
||||||
};
|
};
|
||||||
@ -87,7 +87,7 @@ class LongJump : public Exception
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ISC_STATUS stuff_exception(ISC_STATUS* const status_vector, StringsBuffer* sb = NULL) const throw();
|
virtual ISC_STATUS stuff_exception(ISC_STATUS* const status_vector, StringsBuffer* sb = NULL) const throw();
|
||||||
virtual const char* what() const throw() { return "Firebird::LongJump"; }
|
virtual const char* what() const throw();
|
||||||
static void raise();
|
static void raise();
|
||||||
LongJump() throw() : Exception() { }
|
LongJump() throw() : Exception() { }
|
||||||
};
|
};
|
||||||
@ -97,7 +97,7 @@ class BadAlloc : public Exception
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ISC_STATUS stuff_exception(ISC_STATUS* const status_vector, StringsBuffer* sb = NULL) const throw();
|
virtual ISC_STATUS stuff_exception(ISC_STATUS* const status_vector, StringsBuffer* sb = NULL) const throw();
|
||||||
virtual const char* what() const throw() { return "Firebird::BadAlloc"; }
|
virtual const char* what() const throw();
|
||||||
static void raise();
|
static void raise();
|
||||||
BadAlloc() throw() : Exception() { }
|
BadAlloc() throw() : Exception() { }
|
||||||
};
|
};
|
||||||
@ -112,7 +112,7 @@ public:
|
|||||||
virtual ~status_exception() throw();
|
virtual ~status_exception() throw();
|
||||||
|
|
||||||
virtual ISC_STATUS stuff_exception(ISC_STATUS* const status_vector, StringsBuffer* sb = NULL) const throw();
|
virtual ISC_STATUS stuff_exception(ISC_STATUS* const status_vector, StringsBuffer* sb = NULL) const throw();
|
||||||
virtual const char* what() const throw() { return "Firebird::status_exception"; }
|
virtual const char* what() const throw();
|
||||||
|
|
||||||
const ISC_STATUS* value() const throw() { return m_status_vector; }
|
const ISC_STATUS* value() const throw() { return m_status_vector; }
|
||||||
|
|
||||||
@ -156,18 +156,12 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Moved what() here due to gpre. Didn't want to use macros for gpre_static.
|
|
||||||
class fatal_exception : public status_exception
|
class fatal_exception : public status_exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit fatal_exception(const char* message);
|
explicit fatal_exception(const char* message);
|
||||||
static void raiseFmt(const char* format, ...);
|
static void raiseFmt(const char* format, ...);
|
||||||
// Keep in sync with the constructor above, please; "message" becomes 4th element
|
const char* what() const throw();
|
||||||
// after initialization of status vector in constructor.
|
|
||||||
const char* what() const throw()
|
|
||||||
{
|
|
||||||
return reinterpret_cast<const char*>(value()[3]);
|
|
||||||
}
|
|
||||||
static void raise(const char* message);
|
static void raise(const char* message);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user