Open ncopa opened 6 months ago
Tested on Alpine Linux on:
I updated the commit to use UINTPTR_MAX
.
It seems that Visual C++ 2010 and newer at least provides stdint.h
.
https://stackoverflow.com/questions/126279/c99-stdint-h-header-and-ms-visual-studio
Maybe we should do something like:
diff --git a/include/marisa/base.h b/include/marisa/base.h
index bddce4a..68e774b 100644
--- a/include/marisa/base.h
+++ b/include/marisa/base.h
@@ -2,7 +2,7 @@
#define MARISA_BASE_H_
// Old Visual C++ does not provide stdint.h.
-#ifndef _MSC_VER
+#if !defined(_MSC_VER) || (_MSC_VER >= 1600)
#include <stdint.h>
#endif // _MSC_VER
Detect the MARISA_WORD_SIZE independent of architecture.
Fixes: https://github.com/s-yata/marisa-trie/issues/40 Fixes: https://github.com/s-yata/marisa-trie/issues/57 Fixes: https://github.com/s-yata/marisa-trie/pull/44 Fixes: https://github.com/s-yata/marisa-trie/pull/46 Fixes: https://github.com/s-yata/marisa-trie/pull/56