| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 66694e2 commit be20914
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -194,6 +194,9 @@ | |||
| 194 | 194 | 'sources': [ | |
| 195 | 195 | 'src/node_main.cc' | |
| 196 | 196 | ], | |
| 197 | + 'includes': [ | ||
| 198 | + 'node.gypi' | ||
| 199 | + ], | ||
| 197 | 200 | 'include_dirs': [ | |
| 198 | 201 | 'src', | |
| 199 | 202 | 'deps/v8/include', | |
@@ -211,9 +214,6 @@ | |||
| 211 | 214 | }], | |
| 212 | 215 | [ 'node_intermediate_lib_type=="static_library" and ' | |
| 213 | 216 | 'node_shared=="false"', { | |
| 214 | - 'includes': [ | ||
| 215 | - 'node.gypi' | ||
| 216 | - ], | ||
| 217 | 217 | 'xcode_settings': { | |
| 218 | 218 | 'OTHER_LDFLAGS': [ | |
| 219 | 219 | '-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)' | |
@@ -455,22 +455,8 @@ | |||
| 455 | 455 | ], | |
| 456 | 456 | }], | |
| 457 | 457 | ], | |
| 458 | - 'defines!': [ | ||
| 459 | - 'NODE_PLATFORM="win"', | ||
| 460 | - ], | ||
| 461 | - 'defines': [ | ||
| 462 | - 'FD_SETSIZE=1024', | ||
| 463 | - # we need to use node's preferred "win32" rather than gyp's preferred "win" | ||
| 464 | - 'NODE_PLATFORM="win32"', | ||
| 465 | - # Stop <windows.h> from defining macros that conflict with | ||
| 466 | - # std::min() and std::max(). We don't use <windows.h> (much) | ||
| 467 | - # but we still inherit it from uv.h. | ||
| 468 | - 'NOMINMAX', | ||
| 469 | - '_UNICODE=1', | ||
| 470 | - ], | ||
| 471 | 458 | 'libraries': [ '-lpsapi.lib' ] | |
| 472 | 459 | }, { # POSIX | |
| 473 | - 'defines': [ '__POSIX__' ], | ||
| 474 | 460 | 'sources': [ 'src/backtrace_posix.cc' ], | |
| 475 | 461 | }], | |
| 476 | 462 | [ 'node_use_etw=="true"', { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -37,6 +37,24 @@ | |||
| 37 | 37 | 'NODE_SHARED_MODE', | |
| 38 | 38 | ], | |
| 39 | 39 | }], | |
| 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 | + | ||
| 40 | 58 | [ 'node_enable_d8=="true"', { | |
| 41 | 59 | 'dependencies': [ 'deps/v8/src/d8.gyp:d8' ], | |
| 42 | 60 | }], | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -82,12 +82,30 @@ int wmain(int argc, wchar_t *wargv[]) { | |||
| 82 | 82 | #endif // __LP64__ | |
| 83 | 83 | extern char** environ; | |
| 84 | 84 | #endif // __linux__ | |
| 85 | + #if defined(__POSIX__) && defined(NODE_SHARED_MODE) | ||
| 86 | + #include <string.h> | ||
| 87 | + #include <signal.h> | ||
| 88 | + #endif | ||
| 85 | 89 | ||
| 86 | 90 | namespace node { | |
| 87 | 91 | extern bool linux_at_secure; | |
| 88 | 92 | } // namespace node | |
| 89 | 93 | ||
| 90 | 94 | int 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 | + | ||
| 91 | 109 | #if defined(__linux__) | |
| 92 | 110 | char** envp = environ; | |
| 93 | 111 | while (*envp++ != nullptr) {} | |
| Back | FazBrowse Home | New Git URL |
0 commit comments