Cristian Rodríguez wrote:
#include <unistd.h> /* only if not already there !! */
#if defined(_SC_ARG_MAX) # if defined(ARG_MAX) # undef ARG_MAX # endif # define ARG_MAX sysconf (_SC_ARG_MAX) #endif
Any POSIX guru around to enlighten me about the proper usage of _PC_PATH_MAX? If I want to know the maximum length of any absolute pathname the application might possibly deal with, then the correct formula is #define PATH_MAX pathconf("/", _PC_PATH_MAX) ? The manpage says _PC_PATH_MAX returns the maximum length of a relative pathname when path or filedes is the current working directory. The corresponding macro is _POSIX_PATH_MAX. which isn't quite clear to me (do I have to add 1 for the leading slash and 1 for the terminating nul byte?). Also, in what case is this value different from 4096 on linux? thanks, Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org