Changeset 20663 for lang

Show
Ignore:
Timestamp:
10/04/08 10:33:25 (6 years ago)
Author:
tokuhirom
Message:

mac os x's dlopen requires absolute path

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/cplusplus/llv8call/trunk/src/main.cc

    r20653 r20663  
    7777        if (s.rfind(removepath) != std::string::npos) { 
    7878            s = s.substr(0, s.rfind(removepath)) + "lib/llv8call/"; 
     79#ifdef __APPLE__ 
     80            // mac os x requires full path 
     81            char * resolved_path = new char [PATH_MAX]; 
     82            assert( realpath(s.c_str(), resolved_path) ); 
     83            puts(resolved_path); 
     84            s = resolved_path; 
     85            delete [] resolved_path; 
     86#endif 
    7987            v8ext->Set(String::New("LibraryPath"), String::New(s.c_str())); 
    8088        }