termux-packages/packages/kphp/common-algorithms-simd-int-...

28 lines
878 B
Diff
Raw Normal View History

2022-01-13 13:07:28 +01:00
--- a/common/algorithms/simd-int-to-string.h
+++ b/common/algorithms/simd-int-to-string.h
@@ -274,6 +274,9 @@
// todo anyone who wants to practice some low-level magic — welcome to implement a proper SIMD form with ARM intrinsics
#include <cstdint>
#include <cstdio>
+#ifdef __ANDROID__
+#include <inttypes.h>
+#endif
inline char *simd_uint32_to_string(uint32_t value, char *out_buffer) noexcept {
int n = sprintf(out_buffer, "%u", value);
@@ -286,12 +289,12 @@
}
inline char *simd_uint64_to_string(uint64_t value, char *out_buffer) {
- int n = sprintf(out_buffer, "%llu", value);
+ int n = sprintf(out_buffer, "%" PRIu64, value);
return out_buffer + n;
}
inline char *simd_int64_to_string(int64_t value, char *out_buffer) {
- int n = sprintf(out_buffer, "%lld", value);
+ int n = sprintf(out_buffer, "%" PRId64, value);
return out_buffer + n;
}