-
Notifications
You must be signed in to change notification settings - Fork 262
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
Avoid redefinition of strcasecmp under mingw-w64 #2106
Conversation
This should be changed in netcdf-c/include/ncconfigure.h |
Hi @DennisHeimbigner , I have attempted to implement the definitions of |
Hah! did not realize is was so ubiquitous.
So those probably should have your fix; in all other cases, adding config.h (if not already |
I have removed config.h from nclists.c and ncjson.c , restoring my earlier fix for mingw. I have not changed ncuri.c at all yet, but it does include config.h . |
Fixes #2083
NetCDF defines
strcasecmp
as a preprocessor macro on Windows platforms. This is probably needed for the Microsoft compilers, but the header files used by mingw-w64 compilers definestrcasecmp
as an inline function.If both the inline function and the macro definitions are used with gcc at high optimisation levels (specifically the flag
-foptimize-sibling-calls
, which is included by default at-O2
or higher), the OpenDAP tests hang.On mingw-w64, the macro
__MINGW32__
is defined in both 32-bit and 64-bit environments. If this macro is defined, the macro definition ofstrcasecmp
can be disabled, which avoids the hang when running OpenDAP tests.