Eric Blake wrote: > May I apply the patch below to gnulib? Yes, fine with me. Please apply.
> Also, I'm suspicious of your use of xallocsa with PATH_MAX, on platforms > like Hurd where PATH_MAX is intentionally undefined because there is no > limit Well seen. I'm adding this. *** clean-temp.c 6 Oct 2006 12:17:22 -0000 1.3 --- clean-temp.c 6 Oct 2006 21:16:27 -0000 *************** *** 41,46 **** --- 41,55 ---- #define _(str) gettext (str) + /* GNU Hurd doesn't have PATH_MAX. */ + #ifndef PATH_MAX + # ifdef MAXPATHLEN + # define PATH_MAX MAXPATHLEN + # else + # define PATH_MAX 1024 + # endif + #endif + #ifndef uintptr_t # define uintptr_t unsigned long #endif > So, > create_temp_dir/tmpdir is either artificially limiting how large the name > in $TMPDIR can be I think that a $TMPDIR longer than 1024 characters is not practically relevant. > Perhaps it would be better if the tmpdir module were > updated to allocate its results, rather than use a pre-allocated buffer of > the caller, since then you have more control over how large the resulting > buffer needs to be without resorting to using artificially limited PATH_MAX. But then we lose sync with glibc even more... Bruno