美文网首页
uint8_t / uint16_t / uint32_t /u

uint8_t / uint16_t / uint32_t /u

作者: Then丶 | 来源:发表于2020-06-06 18:13 被阅读0次

    按照posix标准,一般整形对应的*_t类型为:

    1字节     uint8_t
    2字节     uint16_t
    4字节     uint32_t
    8字节     uint64_t
    

    #ifndef __int8_t_defined  
    # define __int8_t_defined  
    typedef signed char             int8_t;   
    typedef short int               int16_t;  
    typedef int                     int32_t;  
    # if __WORDSIZE == 64  
    typedef long int                int64_t;  
    # else  
    __extension__  
    typedef long long int           int64_t;  
    # endif  
    #endif  
      
      
    typedef unsigned char           uint8_t;  
    typedef unsigned short int      uint16_t;  
    #ifndef __uint32_t_defined  
    typedef unsigned int            uint32_t;  
    # define __uint32_t_defined  
    #endif  
    #if __WORDSIZE == 64  
    typedef unsigned long int       uint64_t;  
    #else  
    __extension__  
    typedef unsigned long long int  uint64_t;  
    #endif  
    

    原文: https://blog.csdn.net/kiddy19850221/article/details/6655066

    相关文章

      网友评论

          本文标题:uint8_t / uint16_t / uint32_t /u

          本文链接:https://www.haomeiwen.com/subject/nlbbzhtx.html