PATH_MAX not declared when compiling on Ubuntu 10.04
问题 I am trying to compile a C program in Ubuntu 10.04 made for 8.04. It fails because we have used PATH_MAX and other constants that should be defined in limits.h . According to various resources, it should be part of a POSIX compatible C library. Is this a bug in Ubuntu 10.04 or is there a proper way of solving this? 回答1: POSIX defines many such limits to be optional. If a limit FOO is not defined in limits.h , it means the system may have no such limit or the limit might vary at runtime or