🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #933

Re: directory handling in ansi C

#933
From: overhead
Date: Tue, 21 Nov 1989 20:55
17 lines
1385 bytes
In article <13288@s.ms.uky.edu> beech@ms.uky.edu (Wayne Beech) writes:
>Does anyone know the rationale behind not specifically defining a set of
>functions to work with directories in ansi C; things like opendir(),
>next_dir_entry(), isdir(), etc.  if you are writing a program that works
>with directories that is expected to run on unix and non-unix machines how
>do you handle this? with a bunch of #ifdef UNIX #elif SOMEOTHERMACHINE ....?

I would hope that UNIX and non-UNIX OSs would used the POSIX
semantics for this.  POSIX is a standard, and covers this issue.
The ANSI C document has a finite scope (as does any standard or
document of finite length).  Directory stuff is one of those
areas I now do without ifdefs.  Sometimes, I have to provide my
own directory library routines, implemented with what they gave
me, but more systems are being provided using the POSIX and ANSI
C guides.  This has been a help.

Stephen.
Technical Details
Message-ID: <15243@haddock.ima.isc.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!usc!snorkelwacker!spdcc!ima!haddock!news
References: <13288@s.ms.uky.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!usc!snorkelwacker!spdcc!ima!haddock!news
From: news@haddock.ima.isc.com (overhead)
Newsgroups: comp.std.c,comp.lang.c
Subject: Re: directory handling in ansi C
Keywords: ansi c, directories
Message-ID: <15243@haddock.ima.isc.com>
Date: 21 Nov 89 20:55:42 GMT
References: <13288@s.ms.uky.edu>
Reply-To: suitti@anchovy.UUCP (Stephen Uitti)
Organization: Interactive Systems Co
Lines: 17