Re: apr_lstat() fails on linux for large files

2003-02-28 Thread Jeff Trawick
William A. Rowe, Jr. wrote: At 03:37 PM 2/28/2003, Jeff Trawick wrote: >something we can fix for APR 1.0/Apache 2.1-dev by making apr_off_t always 64 bits +1 >whether native apr_off_t is 64 bits or not? s/apr_off_t/off_t/ :-) oops :) yes, of course that was the intention

Re: apr_lstat() fails on linux for large files

2003-02-28 Thread William A. Rowe, Jr.
At 02:11 PM 2/28/2003, Cliff Woolley wrote: >On Fri, 28 Feb 2003, William A. Rowe, Jr. wrote: > >> Short of turning on largefile support here and now, what about a simple >> APR hack? Keep an overflow flag for apr_dir_t, and when the lstat() >> call from apr_dir_read returns EOVERFLOW, set that fl

Re: apr_lstat() fails on linux for large files

2003-02-28 Thread William A. Rowe, Jr.
At 03:37 PM 2/28/2003, Jeff Trawick wrote: >Joe Orton wrote: > >>On Fri, Feb 28, 2003 at 02:23:31PM -0500, Cliff Woolley wrote: >>... >> >>>Of course, if I go and explictly compile Apache with >>>CFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64, then it works. >>> >>>So I guess the ultimate questi

Re: apr_lstat() fails on linux for large files

2003-02-28 Thread Joe Orton
On Fri, Feb 28, 2003 at 04:37:38PM -0500, Jeff Trawick wrote: > Joe Orton wrote: > >On Fri, Feb 28, 2003 at 02:23:31PM -0500, Cliff Woolley wrote: > >... > > > >>Of course, if I go and explictly compile Apache with > >>CFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64, then it works. > >> > >>So I

Re: apr_lstat() fails on linux for large files

2003-02-28 Thread Jeff Trawick
Joe Orton wrote: On Fri, Feb 28, 2003 at 02:23:31PM -0500, Cliff Woolley wrote: ... >Of course, if I go and explictly compile Apache with >CFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64, then it works. > >So I guess the ultimate questions are these: > >(a) Why doesn't Apache automatically inclu

Re: apr_lstat() fails on linux for large files

2003-02-28 Thread Joe Orton
On Fri, Feb 28, 2003 at 02:23:31PM -0500, Cliff Woolley wrote: ... > Of course, if I go and explictly compile Apache with > CFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64, then it works. > > So I guess the ultimate questions are these: > > (a) Why doesn't Apache automatically include largefile

Re: apr_lstat() fails on linux for large files

2003-02-28 Thread Cliff Woolley
On Fri, 28 Feb 2003, William A. Rowe, Jr. wrote: > Short of turning on largefile support here and now, what about a simple > APR hack? Keep an overflow flag for apr_dir_t, and when the lstat() > call from apr_dir_read returns EOVERFLOW, set that flag but loop and > grab the next legal file. Work

Re: apr_lstat() fails on linux for large files

2003-02-28 Thread William A. Rowe, Jr.
Please don't make Linux's problem every APR user's headache, such as autoindex you describe below. Short of turning on largefile support here and now, what about a simple APR hack? Keep an overflow flag for apr_dir_t, and when the lstat() call from apr_dir_read returns EOVERFLOW, set that flag bu

apr_lstat() fails on linux for large files

2003-02-28 Thread Cliff Woolley
I was trying to track down the cause of PR#17357, and came across something interesting-slash-annoying. mod_autoindex in Apache loops over the directory entries it's indexing using apr_dir_read(). Among other things, apr_dir_read() does an apr_lstat() call (which in turn calls apr_stat() with th