"Netocrat" <ne******@dodo.com.au> wrote in message
news:pa****************************@dodo.com.au...
On Sun, 31 Jul 2005 18:10:31 +0400, Alexei A. Frounze wrote:
"Emmanuel Delahaye" <em***@YOURBRAnoos.fr> wrote in message
news:mn***********************@YOURBRAnoos.fr... Nazgob wrote on 31/07/05 :
> I'm looking for cross-platform directory scanning library working
with > ansi C.
There are no directories at all in ISO-C. The best you can use are the
POSIX.1 portable functions like readdir(), opendir() etc.
True. Gcc should have those (even DJGPP has). Borland compilers used to
have those POSIX *dir() functions and Watcom too. But Microsoft's VC++
doesn't have them (at least not in v6.0).
<OT>
An OS lecturer at my university used to frequently assert that Windows NT
was POSIX-compliant (I don't recall whether he qualified it with
"mostly"). He was pretty knowledgeable so no doubt there's truth to the
statement, but I've never investigated how much.
</OT>
I'd recommend everyone doing portable software look at what the Single Unix
Specification has (includes ANSI C and POSIX functions and others) and use
those. If they're not available on the target system, I believe, quite a bit
of them can be constructed out of what is there. Anyways, some compatibility
layer is due.
Alex