From c23bf4336c0f5456a8c46ae994d3b4e6ac3162bd Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Tue, 26 Sep 2000 23:08:34 +0000 Subject: [PATCH] Display an ERR() in case of undefined symbols. --- relay32/builtin32.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/relay32/builtin32.c b/relay32/builtin32.c index 756b5f5cc63..afbb77b6092 100644 --- a/relay32/builtin32.c +++ b/relay32/builtin32.c @@ -63,7 +63,16 @@ void *BUILTIN32_dlopen( const char *name ) strcat( buffer, ".so" ); if (!(handle = ELFDLL_dlopen( buffer, RTLD_NOW ))) - WARN( "failed to load %s: %s\n", buffer, dlerror() ); + { + LPSTR pErr, p; + pErr = dlerror(); + p = strchr(pErr, ':'); + if ((p) && + (!strncmp(p, ": undefined symbol", 18))) /* undef symbol -> ERR() */ + ERR("failed to load %s: %s\n", buffer, pErr); + else /* WARN() for libraries that are supposed to be native */ + WARN("failed to load %s: %s\n", buffer, pErr ); + } return handle; #else return NULL;