]>
git.cameronkatri.com Git - mandoc.git/blob - test-PATH_MAX.c
2 * POSIX allows PATH_MAX to not be defined, see
3 * http://pubs.opengroup.org/onlinepubs/9699919799/functions/sysconf.html;
4 * the GNU Hurd is an example of a system not having it.
6 * Arguably, it would be better to test sysconf(_SC_PATH_MAX),
7 * but since the individual *.c files include "config.h" before
8 * <limits.h>, overriding an excessive value of PATH_MAX from
9 * "config.h" is impossible anyway, so for now, the simplest
10 * fix is to provide a value only on systems not having any.
11 * So far, we encountered no system defining PATH_MAX to an
12 * impractically large value, even though POSIX explicitly
15 * The real fix would be to replace all static buffers of size
16 * PATH_MAX by dynamically allocated buffers. But that is
17 * somewhat intrusive because it touches several files and
18 * because it requires changing struct mlink in mandocdb.c.
19 * So i'm postponing that for now.
28 printf("PATH_MAX is defined to be %ld\n", (long)PATH_MAX
);