shithub: scc

Download patch

ref: d7171eb5761cad852580cf0b9d352725a9cb1015
parent: 589eb3a61a8ee46e857aa2e20d9f7014923dc00e
author: zerous Naveen Narayanan <zerous@nocebo.space>
date: Sun Nov 17 12:51:20 EST 2019

Fix SCHAR_MIN in limits.h

--- a/include/bits/amd64/arch/limits.h
+++ b/include/bits/amd64/arch/limits.h
@@ -1,6 +1,6 @@
 #define CHAR_BIT   8
 #define SCHAR_MAX  0x7F
-#define SCHAR_MIN  (-SCHAR_MIN-1)
+#define SCHAR_MIN  (-SCHAR_MAX-1)
 #define CHAR_MAX   0x7F
 #define CHAR_MIN   (-CHAR_MAX-1)
 #define UCHAR_MAX  0xFF
--- a/include/bits/arm32/arch/limits.h
+++ b/include/bits/arm32/arch/limits.h
@@ -1,6 +1,6 @@
 #define CHAR_BIT   8
 #define SCHAR_MAX  0x7F
-#define SCHAR_MIN  (-SCHAR_MIN - 1)
+#define SCHAR_MIN  (-SCHAR_MAX - 1)
 #define CHAR_MAX   0x7F
 #define CHAR_MIN   (-CHAR_MAX - 1)
 #define UCHAR_MAX  0xFF
--- a/include/bits/arm64/arch/limits.h
+++ b/include/bits/arm64/arch/limits.h
@@ -1,6 +1,6 @@
 #define CHAR_BIT   8
 #define SCHAR_MAX  0x7F
-#define SCHAR_MIN  (-SCHAR_MIN - 1)
+#define SCHAR_MIN  (-SCHAR_MAX - 1)
 #define CHAR_MAX   0x7F
 #define CHAR_MIN   (-CHAR_MAX - 1)
 #define UCHAR_MAX  0xFF
--- a/include/bits/i386/arch/limits.h
+++ b/include/bits/i386/arch/limits.h
@@ -1,6 +1,6 @@
 #define CHAR_BIT   8
 #define SCHAR_MAX  0x7F
-#define SCHAR_MIN  (-SCHAR_MIN-1)
+#define SCHAR_MIN  (-SCHAR_MAX-1)
 #define CHAR_MAX   0x7F
 #define CHAR_MIN   (-CHAR_MAX-1)
 #define UCHAR_MAX  0xFF
--- a/include/bits/z80/arch/limits.h
+++ b/include/bits/z80/arch/limits.h
@@ -1,6 +1,6 @@
 #define CHAR_BIT   8
 #define SCHAR_MAX  0x7F
-#define SCHAR_MIN  (-SCHAR_MIN-1)
+#define SCHAR_MIN  (-SCHAR_MAX-1)
 #define CHAR_MAX   0xFF
 #define CHAR_MIN   0
 #define UCHAR_MAX  0xFF