File tree Expand file tree Collapse file tree 3 files changed +39
-17
lines changed Expand file tree Collapse file tree 3 files changed +39
-17
lines changed Original file line number Diff line number Diff line change 203203 'sources' : [
204204 'src/node_main.cc'
205205 ],
206+ 'includes' : [
207+ 'node.gypi'
208+ ],
206209 'include_dirs' : [
207210 'src' ,
208211 'deps/v8/include' ,
220223 }],
221224 [ 'node_intermediate_lib_type=="static_library" and '
222225 'node_shared=="false"' , {
223- 'includes' : [
224- 'node.gypi'
225- ],
226226 'xcode_settings' : {
227227 'OTHER_LDFLAGS' : [
228228 '-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)'
469469 ],
470470 }],
471471 ],
472- 'defines!' : [
473- 'NODE_PLATFORM="win"' ,
474- ],
475- 'defines' : [
476- 'FD_SETSIZE=1024' ,
477- # we need to use node's preferred "win32" rather than gyp's preferred "win"
478- 'NODE_PLATFORM="win32"' ,
479- # Stop <windows.h> from defining macros that conflict with
480- # std::min() and std::max(). We don't use <windows.h> (much)
481- # but we still inherit it from uv.h.
482- 'NOMINMAX' ,
483- '_UNICODE=1' ,
484- ],
485472 'libraries' : [ '-lpsapi.lib' ]
486473 }, { # POSIX
487- 'defines' : [ '__POSIX__' ],
488474 'sources' : [ 'src/backtrace_posix.cc' ],
489475 }],
490476 [ 'node_use_etw=="true"' , {
Original file line number Diff line number Diff line change 3737 'NODE_SHARED_MODE' ,
3838 ],
3939 }],
40+ [ 'OS=="win"' , {
41+ 'defines!' : [
42+ 'NODE_PLATFORM="win"' ,
43+ ],
44+ 'defines' : [
45+ 'FD_SETSIZE=1024' ,
46+ # we need to use node's preferred "win32" rather than gyp's preferred "win"
47+ 'NODE_PLATFORM="win32"' ,
48+ # Stop <windows.h> from defining macros that conflict with
49+ # std::min() and std::max(). We don't use <windows.h> (much)
50+ # but we still inherit it from uv.h.
51+ 'NOMINMAX' ,
52+ '_UNICODE=1' ,
53+ ],
54+ }, { # POSIX
55+ 'defines' : [ '__POSIX__' ],
56+ }],
57+
4058 [ 'node_enable_d8=="true"' , {
4159 'dependencies' : [ 'deps/v8/src/d8.gyp:d8' ],
4260 }],
Original file line number Diff line number Diff line change @@ -82,12 +82,30 @@ int wmain(int argc, wchar_t *wargv[]) {
8282#endif // __LP64__
8383extern char ** environ;
8484#endif // __linux__
85+ #if defined(__POSIX__) && defined(NODE_SHARED_MODE)
86+ #include < string.h>
87+ #include < signal.h>
88+ #endif
8589
8690namespace node {
8791 extern bool linux_at_secure;
8892} // namespace node
8993
9094int main (int argc, char *argv[]) {
95+ #if defined(__POSIX__) && defined(NODE_SHARED_MODE)
96+ // In node::PlatformInit(), we squash all signal handlers for non-shared lib
97+ // build. In order to run test cases against shared lib build, we also need
98+ // to do the same thing for shared lib build here, but only for SIGPIPE for
99+ // now. If node::PlatformInit() is moved to here, then this section could be
100+ // removed.
101+ {
102+ struct sigaction act;
103+ memset (&act, 0 , sizeof (act));
104+ act.sa_handler = SIG_IGN;
105+ sigaction (SIGPIPE, &act, nullptr );
106+ }
107+ #endif
108+
91109#if defined(__linux__)
92110 char ** envp = environ;
93111 while (*envp++ != nullptr ) {}
You can’t perform that action at this time.
0 commit comments