You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/09/11 02:41:34 UTC

[incubator-nuttx] 01/03: include/sys/types.h: add u_intXX_t support

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit c8c2745fa71119250b4022e45058952045f960f6
Author: ligd <li...@xiaomi.com>
AuthorDate: Tue Jul 14 11:17:51 2020 +0800

    include/sys/types.h: add u_intXX_t support
    
    like u_int8_t u_int16_t u_in32_t...
    
    Change-Id: Ieee5014bddb1cf1a6e769af7258ff524263f67fb
    Signed-off-by: ligd <li...@xiaomi.com>
---
 include/sys/types.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/sys/types.h b/include/sys/types.h
index bce39a8..b55c9b3 100644
--- a/include/sys/types.h
+++ b/include/sys/types.h
@@ -290,6 +290,18 @@ typedef unsigned long  ulong;
 typedef signed char    s_char;
 typedef FAR char      *caddr_t;
 
+/* These were defined by ISO C without the first `_'.  */
+
+typedef uint8_t  u_int8_t;
+typedef uint16_t u_int16_t;
+typedef uint32_t u_int32_t;
+#ifdef __INT24_DEFINED
+typedef uint24_t u_int24_t;
+#endif
+#ifdef __INT64_DEFINED
+typedef uint64_t u_int64_t;
+#endif
+
 /* Task entry point */
 
 typedef CODE int (*main_t)(int argc, FAR char *argv[]);