Xref: utzoo comp.lang.c:31050 comp.unix.questions:24581 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!purdue!haven!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.lang.c,comp.unix.questions Subject: Re: List a directory in a C program on Unix machines Message-ID: <25997@mimsy.umd.edu> Date: 12 Aug 90 22:57:38 GMT References: <1990Aug10.154506.846@caen.engin.umich.edu> <159@smds.UUCP> Followup-To: comp.unix.questions Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 25 (Given the subject, why is this in comp.lang.c? Why the usa distribution? I am moving it to comp.unix.questions, although I anticipate no further comments.) In article <159@smds.UUCP> rh@smds.UUCP (Richard Harter) writes: [re opendir/readdir/closedir] >But be warned. There are some portability pitfalls so the routine to >fetch the file names should be encapsulated. The major variants that >I can think of offhand are: > >(a) BSD Uses >(b) SYS V Uses POSIX says ; 4.3BSD-Reno and later systems thus use . >(c) SYS V Older versions of SYS V may not have these routines. > You can write your own. ... Or use Doug Gwyn's version of Kirk McKusick's version of these routines. [other systems deleted] -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris (New campus phone system, active sometime soon: +1 301 405 2750)