On 06/20/2011 04:43 PM, Bruno Haible wrote: > Eric Blake wrote: >> --- a/tests/test-getcwd.c >> +++ b/tests/test-getcwd.c >> @@ -26,7 +26,6 @@ >> #include <string.h> >> #include <sys/stat.h> >> >> -#include "pathmax.h" >> #include "macros.h" >> >> #if ! HAVE_GETPAGESIZE >> > > Hmm, this will now cause test_long_name to return immediately on HP-UX, > without > performing a test. Is this intended? For GNU/Hurd it is intended, but for > HP-UX > we know the right value is 1024, and "pathmax.h" defines it.
Well, if we go with your patch to fix "pathmax.h" to define PATH_MAX on HP-UX but leave it undefined on Hurd, then test-getcwd should go back to using pathmax.h, but still use my fixes to avoid the stack allocation. That is, somewhat of a middle ground between the two extremes (my worry was that "pathmax.h" was always defining a value, even on Hurd, whereas your worry is that on HP-UX we still want to test the case of a file name larger than PATH_MAX but smaller than page size). -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature