C question: off_t (and other signed integer types) minimum and maximum values

后端 未结 9 1023
耶瑟儿~
耶瑟儿~ 2020-12-06 05:58

I occasionally will come across an integer type (e.g. POSIX signed integer type off_t) where it would be helpful to have a macro for its minimum and maximum val

9条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-06 06:17

    You probably want to look at limits.h (added in C99) this header provides macros that should be set to match the compiler's ranges. (either it is provided along with the Standard library that came with the compiler, or a third party standard library replacement is responsible for getting it right)

提交回复
热议问题