Changeset 20475

Show
Ignore:
Timestamp:
10/02/08 12:21:51 (5 years ago)
Author:
tokuhirom
Message:

- Merge //mirror/coderepos/lang/cplusplus/llv8call/trunk to //mirror/coderepos/lang/cplusplus/llv8call/branches/stdlib

Location:
lang/cplusplus/llv8call/branches/stdlib
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • lang/cplusplus/llv8call/branches/stdlib/Sconstruct

    r20166 r20475  
    77env = Environment(options=opts) 
    88conf = Configure(env) 
    9  
    10 if os.path.exists("vendor/v8/SConstruct"): 
    11     os.system("cd vendor/v8; scons library=shared") 
    129 
    1310def GuessOS(): 
     
    2118  else: 
    2219    return None 
     20OS_GUESS = GuessOS() 
     21 
     22if os.path.exists("vendor/v8/SConstruct"): 
     23    if not OS_GUESS == 'win32': 
     24        os.system("cd vendor/v8; scons library=shared") 
     25    else: 
     26        os.chdir("vendor/v8") 
     27        os.system("scons library=shared") 
     28        os.chdir("../..") 
    2329 
    2430def GuessToolchain(): 
     
    3036    else: 
    3137        return None 
    32  
    33 OS_GUESS = GuessOS() 
    3438 
    3539env.Append( 
  • lang/cplusplus/llv8call/branches/stdlib/ext/nspr/nspr.cc

    r19912 r20475  
    77 
    88void setup_io(v8::Handle<v8::Object> global); 
    9 void setup_curl(v8::Handle<v8::Object> global); 
    10 void setup_sqlite3(v8::Handle<v8::Object> global); 
    119void setup_dir(v8::Handle<v8::Object> global); 
    1210void setup_process(v8::Handle<v8::Object> global); 
  • lang/cplusplus/llv8call/branches/stdlib/src/env.cc

    r20019 r20475  
    1313    String::Utf8Value val(value); 
    1414    if (*key && *val) { 
     15#ifndef _WIN32 
    1516        setenv(*key, *val, 1); 
     17#else 
     18        char* envstr = (char*) malloc(key.length() + val.length() + 2); 
     19        sprintf(envstr, "%s=%s", (char*) *key, (char*) *val); 
     20        putenv(envstr); 
     21        free(envstr); 
     22#endif 
    1623        return Undefined(); 
    1724    } else { 
  • lang/cplusplus/llv8call/branches/stdlib/v8ext/v8ext.cc

    r20173 r20475  
    2525#include <cassert> 
    2626#include "v8ext.h" 
    27 #include <dlfcn.h> 
     27#ifndef _WIN32 
     28# include <dlfcn.h> 
     29#else 
     30# include <windows.h> 
     31# include <errno.h> 
     32# define dlopen(x,y) (void*)LoadLibrary(x) 
     33# define dlsym(x,y) (void*)GetProcAddress((HMODULE)x,y) 
     34# define dlclose(x) FreeLibrary((HMODULE)x) 
     35const char* dlerror() { 
     36    static char szMsgBuf[256]; 
     37    ::FormatMessage( 
     38            FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, 
     39            NULL, 
     40            ::GetLastError(), 
     41            MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), 
     42            szMsgBuf, 
     43            sizeof szMsgBuf, 
     44            NULL); 
     45    return szMsgBuf; 
     46} 
     47#endif 
    2848 
    2949#define assert_args(args, length) do { if ((args).Length() != (length)) { return v8::ThrowException(v8::String::New("Exception: missing args")); } } while (0)