If I want to allocate a char array (in C) that is guaranteed to be large enough to hold any valid absolute path+filename, how big does it need to be.
On Win32, ther
Well, on Linux at least, there is:
PATH_MAX (defined in limits.h)
FILENAME_MAX (defined in stdio.h)
both of these are set to 4096 on my system (x86 Linux).
Update: : Some info from the glibc manual on this
Each of the following macros is defined in limits.h only if the system has a fixed, uniform limit for the parameter in question. If the system allows different file systems or files to have different limits, then the macro is undefined; use pathconf or fpathconf to find out the limit that applies to a particular file