From: <mie...@us...> - 2012-06-02 00:53:29
|
Revision: 7830 http://oorexx.svn.sourceforge.net/oorexx/?rev=7830&view=rev Author: miesfeld Date: 2012-06-02 00:53:22 +0000 (Sat, 02 Jun 2012) Log Message: ----------- ooSQLite - prevent the compiler on Windows from removing RexxGetPackage() Modified Paths: -------------- incubator/ooSQLite/src/ooSQLite.cpp incubator/ooSQLite/src/platform/unix/unixOS.hpp incubator/ooSQLite/src/platform/windows/winOS.hpp Modified: incubator/ooSQLite/src/ooSQLite.cpp =================================================================== --- incubator/ooSQLite/src/ooSQLite.cpp 2012-06-02 00:41:30 UTC (rev 7829) +++ incubator/ooSQLite/src/ooSQLite.cpp 2012-06-02 00:53:22 UTC (rev 7830) @@ -7415,5 +7415,10 @@ ooSQLite_methods // the exported methods }; -// package loading stub. -OOREXX_GET_PACKAGE(ooSQLite); +// The package loading stub. On Windows, the compiler optimizations for a +// release build remove the stub. So, we use DllExport to generate an export +// directive in the object file for RexxGetPackage() to prevent that. +// (DllExport is an empty macro on unixes.) +BEGIN_EXTERN_C() + DllExport RexxPackageEntry *RexxEntry RexxGetPackage(void) { return &ooSQLite_package_entry; } +END_EXTERN_C() Modified: incubator/ooSQLite/src/platform/unix/unixOS.hpp =================================================================== --- incubator/ooSQLite/src/platform/unix/unixOS.hpp 2012-06-02 00:41:30 UTC (rev 7829) +++ incubator/ooSQLite/src/platform/unix/unixOS.hpp 2012-06-02 00:53:22 UTC (rev 7830) @@ -40,6 +40,12 @@ #include <ctype.h> +/* + * DllExport is used in the declaration of RexxGetPackage(). It is a Windows + * only thing. + */ +#define DllExport + #define TRUE 1 #define FALSE 0 Modified: incubator/ooSQLite/src/platform/windows/winOS.hpp =================================================================== --- incubator/ooSQLite/src/platform/windows/winOS.hpp 2012-06-02 00:41:30 UTC (rev 7829) +++ incubator/ooSQLite/src/platform/windows/winOS.hpp 2012-06-02 00:53:22 UTC (rev 7830) @@ -50,6 +50,8 @@ #include <windows.h> #include <shlwapi.h> +#define DllExport __declspec( dllexport ) + #define snprintf _snprintf CRITICAL_SECTION crit_sec = {0}; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |