#include <limits.h> is required at least on HP-UX and IRIX. And what's with HP-UX offering 14 for NAME_MAX?