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

Fix conflict between FARPROC definition and minwindef.h #142

Merged
merged 1 commit into from
Sep 16, 2023
Merged

Conversation

zeux
Copy link
Owner

@zeux zeux commented Sep 11, 2023

minwindef.h defines FARPROC without (void) argument list, so if it is already included when volk.c is compiled via VOLK_IMPLEMENTATION, gcc will emit an error (MSVC handles this mismatch fine).

Unfortunately, simply removing (void) results in a warning with Wstrict-prototypes even when volk.c is compiled as standalone. We could disable the warning with a pragma but for now we could simply reuse FARPROC definition from minwindef.h if it's already included.

Fixes #140

minwindef.h defines FARPROC without (void) argument list, so if it is
already included when volk.c is compiled via VOLK_IMPLEMENTATION, gcc
will emit an error (MSVC handles this mismatch fine).

Unfortunately, simply removing (void) results in a warning with
Wstrict-prototypes even when volk.c is compiled as standalone. We could
disable the warning with a pragma but for now we could simply reuse
FARPROC definition from minwindef.h if it's already included.
@zeux zeux merged commit 914ea74 into master Sep 16, 2023
6 checks passed
@zeux zeux deleted the minwindefh branch September 16, 2023 08:14
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.

Compile error with MinGW cross-compiler
2 participants