From f24fe15610e9d5bd3457bcb7567dc723672ffb04 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Fri, 8 Aug 2008 19:10:07 +0200 Subject: Fix the BSD/Darwin implementation of %FOREIGN-LAMBDA. --- MLKInterpreter.m | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'MLKInterpreter.m') diff --git a/MLKInterpreter.m b/MLKInterpreter.m index 2a85502..a98fb41 100644 --- a/MLKInterpreter.m +++ b/MLKInterpreter.m @@ -43,14 +43,16 @@ #import #import -#ifndef _WIN32 -#include +#include + +#ifdef _WIN32 + #include #else -#include + #define _BSD_SOURCE + #undef _POSIX_C_SOURCE // needed at least on Mac OS X for RTLD_DEFAULT to be defined + #include #endif -#include - static MLKPackage *cl; static MLKPackage *sys; @@ -502,12 +504,7 @@ static MLKSymbol *MULTIPLE_VALUE_CALL; //EnumProcessModules (...); //GetProcAddress (..., [name UTF8String]); #else -#ifdef linux function = dlsym (RTLD_DEFAULT, [name UTF8String]); -#else - // FIXME - function = dlsym (NULL, [name UTF8String]); -#endif #endif RETURN_VALUE (LAUTORELEASE ([[MLKForeignProcedure alloc] -- cgit v1.2.3