Skip to content
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

Merged
merged 1 commit into from
Jun 13, 2016

Conversation

orangemocha
Copy link
Contributor

Visual Studio 2015 Update 3 defines __pfnDliNotifyHook2 as const.

Fixes: #949

@bnoordhuis
Copy link
Member

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.

@orangemocha
Copy link
Contributor Author

@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.

@bnoordhuis
Copy link
Member

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?

@orangemocha
Copy link
Contributor Author

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.

@orangemocha
Copy link
Contributor Author

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/

@bnoordhuis
Copy link
Member

.cc but otherwise LGTM.

@orangemocha
Copy link
Contributor Author

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>
@orangemocha orangemocha merged commit f31482e into nodejs:master Jun 13, 2016
@orangemocha
Copy link
Contributor Author

@bnoordhuis what is the process for getting this into Node and npm?

@Fishrock123
Copy link
Contributor

@orangemocha We just need to release a version.

@Fishrock123
Copy link
Contributor

#956

@rvagg rvagg mentioned this pull request Jun 14, 2016
zkat pushed a commit to npm/npm that referenced this pull request Jun 29, 2016
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
zkat pushed a commit to npm/npm that referenced this pull request Jun 29, 2016
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
zkat pushed a commit to npm/npm that referenced this pull request Jun 29, 2016
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
zkat pushed a commit to npm/npm that referenced this pull request Jun 30, 2016
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
lovell added a commit to lovell/sharp that referenced this pull request Jul 6, 2016
lovell added a commit to lovell/sharp that referenced this pull request Jul 8, 2016
wadey added a commit to wadey/node-microtime that referenced this pull request Jul 11, 2016
lovell added a commit to lovell/farmhash that referenced this pull request Jul 27, 2016
ranisalt added a commit to ranisalt/node-argon2 that referenced this pull request Sep 12, 2016
ranisalt added a commit to ranisalt/node-argon2 that referenced this pull request Sep 13, 2016
ranisalt added a commit to ranisalt/node-argon2 that referenced this pull request Sep 13, 2016
ranisalt added a commit to ranisalt/node-argon2 that referenced this pull request Sep 13, 2016
webgurucan added a commit to webgurucan/node-image-handler that referenced this pull request Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants