Is u_char a standard?

后端 未结 3 532
执笔经年
执笔经年 2021-01-03 20:52

Just curious if u_char is a standard. I\'ve always used it assuming it was defined along with uintX_t types and so on. But am seeing some of our code base transition from

3条回答
  •  我在风中等你
    2021-01-03 21:51

    The string u_char does not appear in this draft of the C standard:

    http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf

    It's not required by POSIX either, as far as I know.

    I think it's in BSD (sys/types.h), and Windows (winsock.h). I would not consider either one to be "a standard" - they aren't formal standards, and they certainly aren't part of standard C, but they are clearly defined and documented.

提交回复
热议问题