cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/01/10:32:29

Date: Wed, 1 Jul 1998 17:32:09 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Dim Zegebart <zager AT post DOT comstar DOT ru>
cc: "djgpp AT delorie DOT com" <djgpp AT delorie DOT com>
Subject: Re: Problem porting findfirst() to Linux
In-Reply-To: <359A368D.9F2DE084@post.comstar.ru>
Message-ID: <Pine.SUN.3.91.980701172819.14005J-100000@is>
MIME-Version: 1.0

On Wed, 1 Jul 1998, Dim Zegebart wrote:

> I'm porting my DJGPP code to Linux and I'm faced with problem
> what findfirst() doesn't exist in Linux libc :(

IMHO, you shouldn't have used findfirst in a portable code in the first 
place.  The Posix way to do that is to use opendir/readdir and (if you 
need more than just a name) stat.  If you need to filter the files, use 
fnmatch to match file names returned by readdir against a wildcard.

Another possibility is to use glob and then work on the list of file 
names it returns.  (On Unix, glob will call opendir, readdir and fnmatch 
internally.)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019