From 422be30ca2af13847b16663017634d265fa19662 Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Fri, 6 Jun 2008 13:46:46 +0000 Subject: [PATCH] fixed broken public API --- src/jrd/common.h | 8 +++++++- src/jrd/cvt.cpp | 2 +- src/jrd/cvt_proto.h | 2 +- src/jrd/gds.cpp | 2 +- src/jrd/gds_proto.h | 4 ++-- src/remote/inet_server.cpp | 2 +- src/remote/server_stub.cpp | 2 +- 7 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/jrd/common.h b/src/jrd/common.h index 3ead9b1cca..74d432b8c5 100644 --- a/src/jrd/common.h +++ b/src/jrd/common.h @@ -204,6 +204,8 @@ #define API_ROUTINE __attribute__((visibility("default"))) #define API_ROUTINE_VARARG API_ROUTINE #define INTERNAL_API_ROUTINE API_ROUTINE +#define FB_EXPORTED __attribute__((visibility("default"))) + #endif /* Darwin Platforms */ @@ -623,18 +625,22 @@ typedef unsigned __int64 FB_UINT64; #define H_ERRNO h_errno #endif + /* various declaration modifiers */ #ifndef API_ROUTINE #define API_ROUTINE #define API_ROUTINE_VARARG -#define INTERNAL_API_ROUTINE API_ROUTINE +#define INTERNAL_API_ROUTINE #endif #ifndef CLIB_ROUTINE #define CLIB_ROUTINE #endif +#ifndef FB_EXPORTED +#define FB_EXPORTED +#endif /* alignment macros */ diff --git a/src/jrd/cvt.cpp b/src/jrd/cvt.cpp index 4ad495e072..7299358ec1 100644 --- a/src/jrd/cvt.cpp +++ b/src/jrd/cvt.cpp @@ -1281,7 +1281,7 @@ USHORT CVT_make_string(const dsc* desc, } -void CVT_move(const dsc* from, dsc* to, FPTR_ERROR err) +void FB_EXPORTED CVT_move(const dsc* from, dsc* to, FPTR_ERROR err) { /************************************** * diff --git a/src/jrd/cvt_proto.h b/src/jrd/cvt_proto.h index 8c243ea32a..8e7117b271 100644 --- a/src/jrd/cvt_proto.h +++ b/src/jrd/cvt_proto.h @@ -40,7 +40,7 @@ GDS_TIMESTAMP CVT_get_timestamp(const dsc*, FPTR_ERROR); USHORT CVT_make_string(const dsc*, USHORT, const char**, vary*, USHORT, FPTR_ERROR); extern "C" { -void API_ROUTINE CVT_move(const dsc*, dsc*, FPTR_ERROR); +void FB_EXPORTED CVT_move(const dsc*, dsc*, FPTR_ERROR); } #endif // JRD_CVT_PROTO_H diff --git a/src/jrd/gds.cpp b/src/jrd/gds.cpp index 8415c77f35..53effa23f3 100644 --- a/src/jrd/gds.cpp +++ b/src/jrd/gds.cpp @@ -3617,7 +3617,7 @@ static void safe_concat_path(TEXT *resultString, const TEXT *appendString) } -void gds__default_printer(void* arg, SSHORT offset, const TEXT* line) +void FB_EXPORTED gds__default_printer(void* arg, SSHORT offset, const TEXT* line) { printf("%4d %s\n", offset, line); } diff --git a/src/jrd/gds_proto.h b/src/jrd/gds_proto.h index b5048c656b..cfce49ef6d 100644 --- a/src/jrd/gds_proto.h +++ b/src/jrd/gds_proto.h @@ -46,6 +46,7 @@ extern "C" { #endif typedef void* pVoid; + pVoid API_ROUTINE gds__alloc_debug(SLONG, const TEXT*, ULONG); void API_ROUTINE gds_alloc_flag_unfreed(void*); void API_ROUTINE gds_alloc_report(ULONG, const char*, int); @@ -127,13 +128,12 @@ void API_ROUTINE gds__vtov(const SCHAR*, char*, SSHORT); void API_ROUTINE isc_print_sqlerror(SSHORT, const ISC_STATUS*); void API_ROUTINE isc_sql_interprete(SSHORT, TEXT*, SSHORT); SINT64 API_ROUTINE isc_portable_integer(const UCHAR*, SSHORT); -void API_ROUTINE gds__default_printer(void*, SSHORT, const TEXT*); +void FB_EXPORTED gds__default_printer(void*, SSHORT, const TEXT*); // 14-June-2004. Nickolay Samofatov. The routines below are not part of the // API and are not exported. Maybe use another prefix like GDS_ for them? void gds__cleanup(void); void gds__ulstr(char* buffer, ULONG value, const int minlen, const char filler); - void gds__trace_printer(void*, SSHORT, const TEXT*); void gds__print_pool(class JrdMemoryPool*, const TEXT*, ...); diff --git a/src/remote/inet_server.cpp b/src/remote/inet_server.cpp index 0894c20dc3..11cd57fd39 100644 --- a/src/remote/inet_server.cpp +++ b/src/remote/inet_server.cpp @@ -149,7 +149,7 @@ static USHORT INET_SERVER_flag = 0; extern "C" { -int API_ROUTINE server_main( int argc, char** argv) +int FB_EXPORTED server_main( int argc, char** argv) { /************************************** * diff --git a/src/remote/server_stub.cpp b/src/remote/server_stub.cpp index 71784e5303..e8c82fdd4e 100644 --- a/src/remote/server_stub.cpp +++ b/src/remote/server_stub.cpp @@ -4,7 +4,7 @@ #ifndef MINGW extern "C" { -int API_ROUTINE server_main( int argc, char** argv); +int FB_EXPORTED server_main( int argc, char** argv); } // This routine invokes server loop implemented in the shared library