ref: 7cb2dd4c19885e17b9b8fa79fc0d36fced5e8876
parent: 606d1ac828ee0b13697782253de5303232919e71
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sat Apr 2 06:50:00 EDT 2022
limits.h: add {,L,U,UL}LONG_{MIN,MAX} (thanks nature)
--- a/include/npe/limits.h
+++ b/include/npe/limits.h
@@ -69,6 +69,22 @@
#define UINT_MAX UINT32_MAX
#endif
+#ifndef LONG_MAX
+#define LONG_MAX 0x7fffffffL
+#endif
+
+#ifndef ULONG_MAX
+#define ULONG_MAX 0xffffffffUL
+#endif
+
+#ifndef LLONG_MAX
+#define LLONG_MAX 0x7fffffffffffffffLL
+#endif
+
+#ifndef ULLONG_MAX
+#define ULLONG_MAX 0xffffffffffffffffULL
+#endif
+
#ifndef INT16_MIN
#define INT16_MIN ((s16int)0x8000)
#endif
@@ -83,6 +99,14 @@
#ifndef INT_MIN
#define INT_MIN INT32_MIN
+#endif
+
+#ifndef LONG_MIN
+#define LONG_MIN (-LONG_MAX-1)
+#endif
+
+#ifndef LLONG_MIN
+#define LLONG_MIN (-LLONG_MAX-1)
#endif
#endif