-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win: work around __pfnDliNotifyHook2 type change #952
Conversation
I don't think using decltype is acceptable. node-gyp needs to work with VS 2010 and 2012 (because of node v0.10 and v0.12) and those don't support decltype, AFAIK. |
@bnoordhuis it is supported since VS 2010: https://msdn.microsoft.com/en-us/library/dd537655(v=vs.100).aspx I just tested it with VS 2010 and it compiles. |
LGTM in that case. As a quick sanity check, can you land it in deps/npm/node_modules/node-gyp and see if the Windows CI is green? |
CI has failures and they clearly look related: https://ci.nodejs.org/job/node-test-binary-windows/2483/RUN_SUBSET=0,VS_VERSION=vs2015,label=win2012r2/console I will keep investigating. |
e0b03ab
to
13574e3
Compare
Those errors were due to win_delay_load_hook.c being compiled as C, while decltype is C++. I updated this PR to also change the file type to .cpp. Tested in Node in this run and it's green: https://ci.nodejs.org/job/node-test-commit-windows-fanned/2929/ |
.cc but otherwise LGTM. |
13574e3
to
8f21067
Compare
Updated to use .cc. I tested it locally with vcbuild test-addons and also in VS 2010 to be sure. All ok. |
Visual Studio 2015 Update 3 defines __pfnDliNotifyHook2 as const. The decltype specifier makes the declaration work across all supported versions of VS. It also requires that the source be compiled as C++. Fixes: nodejs#949 PR-URL: nodejs#952 Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
8f21067
to
fc4a8cc
Compare
@bnoordhuis what is the process for getting this into Node and npm? |
@orangemocha We just need to release a version. |
Headline items: * Fix for Visual Studio 2015 __pfnDliNotifyHook2 failures nodejs/node-gyp#952 * Fix for AIX using fs.statSync nodejs/node-gyp#955 * More verbose msbuild.exe missing error output https://github.com/nodejs/node-gyp/pull/930/files * Added --silent for --loglevel=silent nodejs/node-gyp#937 * Enable V8 deprecation warnings for native addons nodejs/node-gyp#920 Full changelog at https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md Credit: @rvagg PR-URL: #13199 Reviewed-By: @zkat
Headline items: * Fix for Visual Studio 2015 __pfnDliNotifyHook2 failures nodejs/node-gyp#952 * Fix for AIX using fs.statSync nodejs/node-gyp#955 * More verbose msbuild.exe missing error output https://github.com/nodejs/node-gyp/pull/930/files * Added --silent for --loglevel=silent nodejs/node-gyp#937 * Enable V8 deprecation warnings for native addons nodejs/node-gyp#920 Full changelog at https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md Credit: @rvagg PR-URL: #13200 Reviewed-By: @zkat
Headline items: * Fix for Visual Studio 2015 __pfnDliNotifyHook2 failures nodejs/node-gyp#952 * Fix for AIX using fs.statSync nodejs/node-gyp#955 * More verbose msbuild.exe missing error output https://github.com/nodejs/node-gyp/pull/930/files * Added --silent for --loglevel=silent nodejs/node-gyp#937 * Enable V8 deprecation warnings for native addons nodejs/node-gyp#920 Full changelog at https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md Credit: @rvagg PR-URL: #13199 Reviewed-By: @zkat
Headline items: * Fix for Visual Studio 2015 __pfnDliNotifyHook2 failures nodejs/node-gyp#952 * Fix for AIX using fs.statSync nodejs/node-gyp#955 * More verbose msbuild.exe missing error output https://github.com/nodejs/node-gyp/pull/930/files * Added --silent for --loglevel=silent nodejs/node-gyp#937 * Enable V8 deprecation warnings for native addons nodejs/node-gyp#920 Full changelog at https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md Credit: @rvagg PR-URL: #13199 Reviewed-By: @zkat
Visual Studio 2015 Update 3 defines __pfnDliNotifyHook2 as const.
Fixes: #949