Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix process.platform

  • Loading branch information...
commit 5bce8ed11862048e317e18031f2d64599323564a 1 parent 2b126da
@ry ry authored
Showing with 6 additions and 8 deletions.
  1. +2 −4 src/node.cc
  2. +4 −4 wscript
View
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;
View
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
Please sign in to comment.
Something went wrong with that request. Please try again.