You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ryan Bloom <rb...@raleigh.ibm.com> on 1999/04/11 00:04:29 UTC

Re: cvs commit: apache-apr/include apr_file_io

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.

Ryan

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, http://www.lyra.org/
> 

_______________________________________________________________________
Ryan Bloom		rbb@raleigh.ibm.com
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.