NAME_MAX is defined in limits.h/climits.
Getting it through stdio.h was accidental and can blow up any time.