Changeset 231

Show
Ignore:
Timestamp:
02/25/07 10:21:27 (1 year ago)
Author:
aldacron
Message:

[DerelictUtil?]
* last update broke the loader with Tango on Linux. *nix platforms now import tango.sys.Common with Tango std.c.linux.linux with Phobos for version(linux), and use internal libdl declarations otherwise.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/DerelictUtil/derelict/util/loader.d

    r230 r231  
    4242    version = Nix; 
    4343} 
     44version(darwin) 
     45{ 
     46    version = Nix; 
     47} 
    4448else version(Unix) 
    4549{ 
     
    278282    else version(Nix) 
    279283    { 
    280         extern(C) 
    281         { 
    282             /* From <dlfcn.h> 
    283             *  See http://www.opengroup.org/onlinepubs/007908799/xsh/dlsym.html 
    284             */ 
    285  
    286             const int RTLD_NOW = 2; 
    287  
    288             void *dlopen(char* file, int mode); 
    289             int dlclose(void* handle); 
    290             void *dlsym(void* handle, char* name); 
    291             char* dlerror(); 
     284        version(Tango) 
     285        { 
     286            private import tango.sys.Common; 
     287        } 
     288        else version(linux) 
     289        { 
     290            private import std.c.linux.linux; 
     291        } 
     292        else 
     293        { 
     294            extern(C) 
     295            { 
     296                /* From <dlfcn.h> 
     297                *  See http://www.opengroup.org/onlinepubs/007908799/xsh/dlsym.html 
     298                */ 
     299     
     300                const int RTLD_NOW = 2; 
     301     
     302                void *dlopen(char* file, int mode); 
     303                int dlclose(void* handle); 
     304                void *dlsym(void* handle, char* name); 
     305                char* dlerror(); 
     306            } 
    292307        } 
    293308