openbsd-ports/x11/wxWidgets/patches/patch-src_common_dynlib_cpp
todd b25888b419 wxWidgets 2.4.2, C++ cross-platform GUI toolkit
www: http://www.wxwidgets.org/

from Andrew Dalgleish   < openbsd at ajd dot net dot au >
many thanks for much persistence!
2004-07-16 21:01:35 +00:00

23 lines
919 B
Plaintext

$OpenBSD: patch-src_common_dynlib_cpp,v 1.1.1.1 2004/07/16 21:01:35 todd Exp $
--- src/common/dynlib.cpp.orig Sun Dec 22 21:59:26 2002
+++ src/common/dynlib.cpp Thu Mar 27 23:05:52 2003
@@ -60,7 +60,7 @@
// second argument on dlopen is ignored.
#ifdef __VMS
# define wxDllOpen(lib) dlopen(lib.fn_str(), 0 )
-#elif defined( __osf__ )
+#elif defined( __osf__ ) || defined(__OpenBSD__)
# define wxDllOpen(lib) dlopen(lib.fn_str(), RTLD_LAZY )
#else
# define wxDllOpen(lib) dlopen(lib.fn_str(), RTLD_LAZY | RTLD_GLOBAL)
@@ -220,6 +220,9 @@ wxDllType wxDllLoader::GetProgramHandle(
{
#if defined( HAVE_DLOPEN ) && !defined(__EMX__)
// optain handle for main program
+#ifndef RTLD_NOW
+#define RTLD_NOW RTLD_LAZY
+#endif
return dlopen(NULL, RTLD_NOW/*RTLD_LAZY*/);
#elif defined (HAVE_SHL_LOAD)
// shl_findsymbol with NULL handle looks up in main program