httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <>
Subject Re: cvs commit: apache-apr/include apr_file_io
Date Sat, 10 Apr 1999 22:04:29 GMT

I actually decided to use the Posix function definitions because of thw
work in the src/os/win32 directory.  The comments say the code implements
opendir, closedir, and readdir in a Posix compliant way.  I figured
rewinddir wasn't hard, becasue the worst case scenario would be close and
then re-open the directory.

I accept that there may be better ways to do this stuff, and I am
definately interested in doing things the best way possible.  However,
there is something to be said for getting an initial abstraction done, and
being used in the code.  If we then find a better way to implement the
function, it is simple enough to change the function.


On Sat, 10 Apr 1999, Greg Stein wrote:

> Brian Havard wrote:
> >...
> > I can't say I really like what you've done for the directory API. It's way
> > too unix oriented in that it's an almost no-op wrapper for opendir() and
> > friends. Sure, it'll be fast but it's not too portable.
> > 
> > The way I see it there shouldn't be any platform specific stuff in
> > apr_file_io.h so putting stuff like:
> > 
> >     DIR *dirstruct;
> > typedef struct dirent     apr_dirent_t;
> > 
> > in it isn't a good idea. We need to define and use our own structures and
> > hide these platform specific details in the library code.
> Why can't the Apache version have a striking resemblance to Unix's
> "struct direct" ?
> I don't see a specific need to create a new structure just for its own
> sake. IMO, use what is provided *until* you can demonstrate that it does
> not work somewhere. Jumping the gun and inserting an extra
> layer/translation seems a bit "off" to me.
> Cheers,
> -g
> --
> Greg Stein,

Ryan Bloom
4205 S Miami Blvd	
RTP, NC 27709		It's a beautiful sight to see good dancers 
			doing simple steps.  It's a painful sight to
			see beginners doing complicated patterns.	

View raw message