Browse Source

Fix process.platform

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
5bce8ed118
  1. 6
      src/node.cc
  2. 8
      wscript

6
src/node.cc

@ -1289,7 +1289,7 @@ Handle<Value> DLOpen(const v8::Arguments& args) {
p = strrchr(sym, '.');
if (p != NULL) {
*p = NULL;
*p = '\0';
}
size_t slen = strlen(sym);
@ -1561,9 +1561,7 @@ static void Load(int argc, char *argv[]) {
// process.platform
#define xstr(s) str(s)
#define str(s) #s
process->Set(String::NewSymbol("platform"), String::New(xstr(PLATFORM)));
process->Set(String::NewSymbol("platform"), String::New(PLATFORM));
// process.argv
int i, j;

8
wscript

@ -289,7 +289,7 @@ def configure(conf):
conf.env.append_value('CXXFLAGS', '-DHAVE_FDATASYNC=0')
# platform
platform_def = '-DPLATFORM=' + conf.env['DEST_OS']
platform_def = '-DPLATFORM="' + conf.env['DEST_OS'] + '"'
conf.env.append_value('CCFLAGS', platform_def)
conf.env.append_value('CXXFLAGS', platform_def)
@ -521,9 +521,9 @@ def build(bld):
bld.install_files('${PREFIX}/lib', "build/default/libnode.*")
def subflags(program):
x = { 'CCFLAGS' : " ".join(program.env["CCFLAGS"])
, 'CPPFLAGS' : " ".join(program.env["CPPFLAGS"])
, 'LIBFLAGS' : " ".join(program.env["LIBFLAGS"])
x = { 'CCFLAGS' : " ".join(program.env["CCFLAGS"]).replace('"', '\\"')
, 'CPPFLAGS' : " ".join(program.env["CPPFLAGS"]).replace('"', '\\"')
, 'LIBFLAGS' : " ".join(program.env["LIBFLAGS"]).replace('"', '\\"')
, 'PREFIX' : program.env["PREFIX"]
}
return x

Loading…
Cancel
Save