I don't know whether PATH_MAX available on all platforms that Firefox needs to support, but the value 1024 is a very bad choice for default. Accordingly man for realpath(), the size of the buffer for it is defined as:
IMHO, it would be better if MAXPATHLEN was defined as PATH_MAX when the latter is available... At least, this closes the problem for those platforms that have PATH_MAX defined.
I have run into the same issue with realpath().
I don't know whether PATH_MAX available on all platforms that Firefox needs to support, but the value 1024 is a very bad choice for default. Accordingly man for realpath(), the size of the buffer for it is defined as:
#else
if (path_max <= 0)
So, 4096 would be much better value.
Besides, the definition of MAXPATHLEN is inconsistent. In nsXPCOMPrivate.h, mxr.mozilla. org/mozilla1. 8/source/ xpcom/build/ nsXPCOMPrivate. h#248
it uses PATH_MAX when it is available
http://
but, in many other places, it does not...
IMHO, it would be better if MAXPATHLEN was defined as PATH_MAX when the latter is available... At least, this closes the problem for those platforms that have PATH_MAX defined.