You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/06/03 17:04:57 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6351: arch: Define WCHAR_[MIN|MAX] in arch/include/limits.h

xiaoxiang781216 commented on code in PR #6351:
URL: https://github.com/apache/incubator-nuttx/pull/6351#discussion_r889163605


##########
arch/z80/include/ez80/limits.h:
##########
@@ -67,17 +67,28 @@
 
 #define PTR_MIN     (-PTR_MAX - 1)
 #ifdef CONFIG_EZ80_Z80MODE
-#define PTR_MAX     32767
-#define UPTR_MAX    65535U
+#  define PTR_MAX   32767
+#  define UPTR_MAX  65535U
 #else
-#define PTR_MAX     8388607
-#define UPTR_MAX    16777215U
+#  define PTR_MAX   8388607
+#  define UPTR_MAX  16777215U
 #endif
 
 #ifdef __clang__
-#define LLONG_MIN       (-LLONG_MAX - 1)
-#define LLONG_MAX       9223372036854775807LL
-#define ULLONG_MAX      18446744073709551615ULL
+#  define LLONG_MIN  (-LLONG_MAX - 1)

Review Comment:
   I don't know, I never program with z80 before.



##########
arch/risc-v/include/limits.h:
##########
@@ -55,37 +55,44 @@
 /* These change on 32-bit and 64-bit platforms */
 
 #if defined(CONFIG_ARCH_RV32)
+#  define LONG_MIN  (-LONG_MAX - 1)
+#  define LONG_MAX  2147483647L
+#  define ULONG_MAX 4294967295UL
 
-#define LONG_MIN    (-LONG_MAX - 1)
-#define LONG_MAX    2147483647L
-#define ULONG_MAX   4294967295UL
-
-#define LLONG_MIN   (-LLONG_MAX - 1)
-#define LLONG_MAX   9223372036854775807LL
-#define ULLONG_MAX  18446744073709551615ULL
+#  define LLONG_MIN  (-LLONG_MAX - 1)
+#  define LLONG_MAX  9223372036854775807LL
+#  define ULLONG_MAX 18446744073709551615ULL
 
 /* A pointer is 4 bytes */
 
-#define PTR_MIN     (-PTR_MAX - 1)
-#define PTR_MAX     2147483647
-#define UPTR_MAX    4294967295U
-
+#  define PTR_MIN   (-PTR_MAX - 1)
+#  define PTR_MAX   2147483647
+#  define UPTR_MAX  4294967295U
 #endif /* defined(CONFIG_ARCH_RV32) */
 
 #if defined(CONFIG_ARCH_RV64)

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org