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

Windows build fix: strncasecmp is a POSIX call #59

Closed
DennisOSRM opened this issue Dec 17, 2014 · 0 comments
Closed

Windows build fix: strncasecmp is a POSIX call #59

DennisOSRM opened this issue Dec 17, 2014 · 0 comments

Comments

@DennisOSRM
Copy link
Contributor

Windows is as always a treat. This time, the str(n)casecmp are available under a different name only. The following diff fixes compilation.

diff --git a/third_party/osmium/util/config.hpp b/third_party/osmium/util/config.hpp
index c30f02e..6c86d68 100644
--- a/third_party/osmium/util/config.hpp
+++ b/third_party/osmium/util/config.hpp
@@ -36,6 +36,11 @@ DEALINGS IN THE SOFTWARE.
 #include <cstdlib>
 #include <cstring>

+#ifdef _MSC_VER 
+#define strncasecmp _strnicmp
+#define strcasecmp _stricmp
+#endif
+
 namespace osmium {

     namespace config {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant