Skip to content

correctly detect MINGW #23

@oschonrock

Description

@oschonrock

Nice lib, thanks!

compiling as is on mingw fails on finding endian.h because this file does not exist on MINGW.
I propose to widen the _MSC_VER detection at top of sha1.cpp, etc....

as below:

$ git diff
diff --git a/sha1.cpp b/sha1.cpp
index 8331e92..6a4a658 100644
--- a/sha1.cpp
+++ b/sha1.cpp
@@ -7,7 +7,7 @@
 #include "sha1.h"

 // big endian architectures need #define __BYTE_ORDER __BIG_ENDIAN
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__MINGW64__)
 #include <endian.h>
 #endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions