-
Notifications
You must be signed in to change notification settings - Fork 98
Fix detection of MARISA_WORD_SIZE #58
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
Conversation
|
Tested on Alpine Linux on:
|
1e16775 to
6925413
Compare
|
I updated the commit to use It seems that Visual C++ 2010 and newer at least provides 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
|
This makes detection of MARISA_WORD_SIZE architecture independent. Links: s-yata/marisa-trie#58
This makes detection of MARISA_WORD_SIZE architecture independent. Links: s-yata/marisa-trie#58
|
Hmm... I cannot remember the reason why I used architecture dependent macros. I would like to merge this because it solves many similar issues and pull requests. |
|
I prefer to use UINT64_MAX and UINT32_MAX than 0xffffffffffffffff and 0xffffffff. |
marisa-trie assumes that stdint.h is available.
Detect the MARISA_WORD_SIZE independent of architecture.
Fixes: #40
Fixes: #57
Fixes: #44
Fixes: #46
Fixes: #56