summaryrefslogtreecommitdiffhomepage
path: root/arch/nt32
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2020-05-03 03:08:25 +0000
committermidipix <writeonce@midipix.org>2020-05-03 03:57:43 +0000
commita9c0442c3abec547553e9c0c0d885c7e81392c15 (patch)
tree79b3f54c0e9f3332dc9049c87689c72c9b441d62 /arch/nt32
parent07e2c6c05cdcb47905c089484535d8dc434a557f (diff)
downloadmmglue-a9c0442c3abec547553e9c0c0d885c7e81392c15.tar.bz2
mmglue-a9c0442c3abec547553e9c0c0d885c7e81392c15.tar.xz
nt32|nt64: bits/alltypes.h.in, bits/limits.h: provide {__}{L}LONG_MAX.
[while maintaining compatibility with older musl versions] [cf. musl commit 7cc79d10afd43811a486fd5e9fcdf8e45ac599e0]
Diffstat (limited to 'arch/nt32')
-rw-r--r--arch/nt32/bits/alltypes.h.in3
-rw-r--r--arch/nt32/bits/limits.h9
2 files changed, 10 insertions, 2 deletions
diff --git a/arch/nt32/bits/alltypes.h.in b/arch/nt32/bits/alltypes.h.in
index d323a39..e9b3222 100644
--- a/arch/nt32/bits/alltypes.h.in
+++ b/arch/nt32/bits/alltypes.h.in
@@ -2,6 +2,9 @@
#define _Int64 long long
#define _Reg int
+#define __LONG_MAX 0x7fffffffL
+#define __LLONG_MAX 0x7fffffffffffffffLL
+
#ifndef __BYTE_ORDER__
#define __BYTE_ORDER__ 1234
#endif
diff --git a/arch/nt32/bits/limits.h b/arch/nt32/bits/limits.h
index 497ecc1..edbbe29 100644
--- a/arch/nt32/bits/limits.h
+++ b/arch/nt32/bits/limits.h
@@ -1,8 +1,13 @@
#define PAGE_SIZE 65536
#define LONG_BIT 32
-#define LONG_MAX 0x7fffffffL
-#define LLONG_MAX 0x7fffffffffffffffLL
+#ifndef LONG_MAX
+#define LONG_MAX __LONG_MAX
+#endif
+
+#ifndef LLONG_MAX
+#define LLONG_MAX __LLONG_MAX
+#endif
#define _MIDIPIX_ABI 20170101
#define _MIDIPIX_XFI 20170101