From f93051155c4a5e7b56f892c2b9222f38b40d3e81 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 14 May 2003 18:01:53 -0300 Subject: ok to use `#elif' and `#if defined()' --- loadlib.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) (limited to 'loadlib.c') diff --git a/loadlib.c b/loadlib.c index ed40fbe4..961eeab5 100644 --- a/loadlib.c +++ b/loadlib.c @@ -1,5 +1,5 @@ /* -** $Id: loadlib.c,v 1.3 2003/04/02 13:09:14 roberto Exp roberto $ +** $Id: loadlib.c,v 1.4 2003/04/07 20:11:53 roberto Exp roberto $ ** Dynamic library loader for Lua ** See Copyright Notice in lua.h * @@ -136,33 +136,13 @@ static int loadlib(lua_State *L) ** Those systems support dlopen, so they should have defined USE_DLOPEN. ** The default (no)implementation gives them a special error message. */ -#ifdef linux -#define LOADLIB -#endif - -#ifdef sun -#define LOADLIB -#endif - -#ifdef sgi -#define LOADLIB -#endif - -#ifdef BSD -#define LOADLIB -#endif - -#ifdef _WIN32 -#define LOADLIB -#endif - -#ifdef LOADLIB -#undef LOADLIB +#if defined(linux) || defined(sun) || defined(sgi) || defined(BSD) || defined(_WIN32) #define LOADLIB "`loadlib' not installed (check your Lua configuration)" #else #define LOADLIB "`loadlib' not supported" #endif + static int loadlib(lua_State *L) { lua_pushnil(L); -- cgit v1.2.3-55-g6feb