httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <>
Subject Re: cvs commit: apache-apr/include apr_file_io.h
Date Sun, 11 Apr 1999 02:00:17 GMT
On Sat, 10 Apr 1999 14:04:45 -0500, Manoj Kasichainula wrote:

>On Sat, Apr 10, 1999 at 05:51:30PM +1000, Brian Havard wrote:
>> 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.
>I haven't payed too much attention to the specifics of the APR work,
>but why can't apr_dirent_t be typedefed to something different for
>OS/2, NT, and friends? 

It's bad because it's exposed in the public interface. The application must
use the DIR * to get at the file name of the returned entry, using the
element names of a struct dirent. I think there are better ways of doing this
(see my other message).

>Or are you saying that the native OS/2 APIs
>don't even use opendir()-like semantics?

You say that like opendir() is the "one true api". I actually don't think
it's that great. Why mess with two pointers when one would do?
OS/2 and Win32 use findfirst/findnext semantics.

 |  Brian Havard                 |  "He is not the messiah!                   |
 |  |  He's a very naughty boy!" - Life of Brian |

View raw message