-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add a (void*) cast to GetProcAddress #509
Open
tomrittervg
wants to merge
1
commit into
ValveSoftware:master
Choose a base branch
from
tomrittervg:windows-farproc-fix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Visual C++ has an extension that auto-magically converts a FARPROC to a void*. On MinGW we get an error like: In function ‘void* SharedLib_GetFunction(SharedLibHandle, const char*)’: openvr/src/sharedlibtools_public.cpp:25:23: error: invalid conversion from ‘FARPROC {aka int (__attribute__((__stdcall__)) *)()}’ to ‘void*’ [-fpermissive] return GetProcAddress( (HMODULE)lib, pchFunctionName ); See also http://stackoverflow.com/questions/13958081/mingw-compile-error-invalid-conversion-from-farproc-to-void-but-msvc-com
thanks - good fix - we'll fold this into the next drop & close it then after you confirm. |
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
May 26, 2017
This involved four commits: - Windows.h -> windows.h and similar ValveSoftware/openvr#508 - Add a void* cast for a farproc auto-conversion ValveSoftware/openvr#509 - Add share.h ValveSoftware/openvr#510 - Use GCC Variadic Macros ValveSoftware/openvr#511 MozReview-Commit-ID: KC7Z3r8qSUY --HG-- extra : rebase_source : 747b14607d2acad92672085e390b8dd6d4678a46
aethanyc
pushed a commit
to aethanyc/gecko-dev
that referenced
this pull request
May 26, 2017
This involved four commits: - Windows.h -> windows.h and similar ValveSoftware/openvr#508 - Add a void* cast for a farproc auto-conversion ValveSoftware/openvr#509 - Add share.h ValveSoftware/openvr#510 - Use GCC Variadic Macros ValveSoftware/openvr#511 MozReview-Commit-ID: KC7Z3r8qSUY
Manishearth
pushed a commit
to Manishearth/gecko-dev
that referenced
this pull request
May 27, 2017
This involved four commits: - Windows.h -> windows.h and similar ValveSoftware/openvr#508 - Add a void* cast for a farproc auto-conversion ValveSoftware/openvr#509 - Add share.h ValveSoftware/openvr#510 - Use GCC Variadic Macros ValveSoftware/openvr#511 MozReview-Commit-ID: KC7Z3r8qSUY
JerryShih
pushed a commit
to JerryShih/gecko-dev
that referenced
this pull request
May 30, 2017
This involved four commits: - Windows.h -> windows.h and similar ValveSoftware/openvr#508 - Add a void* cast for a farproc auto-conversion ValveSoftware/openvr#509 - Add share.h ValveSoftware/openvr#510 - Use GCC Variadic Macros ValveSoftware/openvr#511 MozReview-Commit-ID: KC7Z3r8qSUY
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
Jul 12, 2017
This involved four commits: - Windows.h -> windows.h and similar ValveSoftware/openvr#508 - Add a void* cast for a farproc auto-conversion ValveSoftware/openvr#509 - Add share.h ValveSoftware/openvr#510 - Use GCC Variadic Macros ValveSoftware/openvr#511 This is a reapply of Bug 1363173. Hopefully Valve will actually include the patches in the next release. MozReview-Commit-ID: KC7Z3r8qSUY --HG-- extra : rebase_source : 7c712bf64cfedd9d895083f8f3111b41850c30ff
JerryShih
pushed a commit
to JerryShih/gecko-dev
that referenced
this pull request
Jul 13, 2017
This involved four commits: - Windows.h -> windows.h and similar ValveSoftware/openvr#508 - Add a void* cast for a farproc auto-conversion ValveSoftware/openvr#509 - Add share.h ValveSoftware/openvr#510 - Use GCC Variadic Macros ValveSoftware/openvr#511 This is a reapply of Bug 1363173. Hopefully Valve will actually include the patches in the next release. MozReview-Commit-ID: KC7Z3r8qSUY
aethanyc
pushed a commit
to aethanyc/gecko-dev
that referenced
this pull request
Jul 14, 2017
This involved four commits: - Windows.h -> windows.h and similar ValveSoftware/openvr#508 - Add a void* cast for a farproc auto-conversion ValveSoftware/openvr#509 - Add share.h ValveSoftware/openvr#510 - Use GCC Variadic Macros ValveSoftware/openvr#511 This is a reapply of Bug 1363173. Hopefully Valve will actually include the patches in the next release. MozReview-Commit-ID: KC7Z3r8qSUY
Manishearth
pushed a commit
to Manishearth/gecko-dev
that referenced
this pull request
Jul 15, 2017
This involved four commits: - Windows.h -> windows.h and similar ValveSoftware/openvr#508 - Add a void* cast for a farproc auto-conversion ValveSoftware/openvr#509 - Add share.h ValveSoftware/openvr#510 - Use GCC Variadic Macros ValveSoftware/openvr#511 This is a reapply of Bug 1363173. Hopefully Valve will actually include the patches in the next release. MozReview-Commit-ID: KC7Z3r8qSUY
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified-and-comments-removed
that referenced
this pull request
Oct 1, 2019
This involved four commits: - Windows.h -> windows.h and similar ValveSoftware/openvr#508 - Add a void* cast for a farproc auto-conversion ValveSoftware/openvr#509 - Add share.h ValveSoftware/openvr#510 - Use GCC Variadic Macros ValveSoftware/openvr#511 MozReview-Commit-ID: KC7Z3r8qSUY UltraBlame original commit: 4d867f09f117e91d66f2fb676ae0ed739544c58e
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-comments-removed
that referenced
this pull request
Oct 1, 2019
This involved four commits: - Windows.h -> windows.h and similar ValveSoftware/openvr#508 - Add a void* cast for a farproc auto-conversion ValveSoftware/openvr#509 - Add share.h ValveSoftware/openvr#510 - Use GCC Variadic Macros ValveSoftware/openvr#511 MozReview-Commit-ID: KC7Z3r8qSUY UltraBlame original commit: 4d867f09f117e91d66f2fb676ae0ed739544c58e
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified
that referenced
this pull request
Oct 1, 2019
This involved four commits: - Windows.h -> windows.h and similar ValveSoftware/openvr#508 - Add a void* cast for a farproc auto-conversion ValveSoftware/openvr#509 - Add share.h ValveSoftware/openvr#510 - Use GCC Variadic Macros ValveSoftware/openvr#511 MozReview-Commit-ID: KC7Z3r8qSUY UltraBlame original commit: 4d867f09f117e91d66f2fb676ae0ed739544c58e
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified-and-comments-removed
that referenced
this pull request
Oct 1, 2019
This involved four commits: - Windows.h -> windows.h and similar ValveSoftware/openvr#508 - Add a void* cast for a farproc auto-conversion ValveSoftware/openvr#509 - Add share.h ValveSoftware/openvr#510 - Use GCC Variadic Macros ValveSoftware/openvr#511 This is a reapply of Bug 1363173. Hopefully Valve will actually include the patches in the next release. MozReview-Commit-ID: KC7Z3r8qSUY UltraBlame original commit: 119016ae9f2b948c9f497cee972b03650db0f97c
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-comments-removed
that referenced
this pull request
Oct 1, 2019
This involved four commits: - Windows.h -> windows.h and similar ValveSoftware/openvr#508 - Add a void* cast for a farproc auto-conversion ValveSoftware/openvr#509 - Add share.h ValveSoftware/openvr#510 - Use GCC Variadic Macros ValveSoftware/openvr#511 This is a reapply of Bug 1363173. Hopefully Valve will actually include the patches in the next release. MozReview-Commit-ID: KC7Z3r8qSUY UltraBlame original commit: 119016ae9f2b948c9f497cee972b03650db0f97c
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified
that referenced
this pull request
Oct 1, 2019
This involved four commits: - Windows.h -> windows.h and similar ValveSoftware/openvr#508 - Add a void* cast for a farproc auto-conversion ValveSoftware/openvr#509 - Add share.h ValveSoftware/openvr#510 - Use GCC Variadic Macros ValveSoftware/openvr#511 This is a reapply of Bug 1363173. Hopefully Valve will actually include the patches in the next release. MozReview-Commit-ID: KC7Z3r8qSUY UltraBlame original commit: 119016ae9f2b948c9f497cee972b03650db0f97c
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Visual C++ has an extension that auto-magically converts a FARPROC to a void*.
On MinGW we get an error like:
In function ‘void* SharedLib_GetFunction(SharedLibHandle, const char*)’:
openvr/src/sharedlibtools_public.cpp:25:23: error: invalid conversion from ‘FARPROC {aka int (attribute((stdcall)) )()}’ to ‘void’ [-fpermissive]
return GetProcAddress( (HMODULE)lib, pchFunctionName );
See also http://stackoverflow.com/questions/13958081/mingw-compile-error-invalid-conversion-from-farproc-to-void-but-msvc-com