Date: Tue, 12 Jan 1999 09:47:55 +0100 From: Laszlo Molnar To: Eli Zaretskii Cc: DJGPP Workers List Subject: Re: djgpp 2.02 + perl + glob Message-ID: <19990112094755.O29345@duna54> References: <19990111094726 DOT F29345 AT duna54> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.94.17i In-Reply-To: ; from Eli Zaretskii on Mon, Jan 11, 1999 at 12:25:06PM +0200 Reply-To: djgpp-workers AT delorie DOT com On Mon, Jan 11, 1999 at 12:25:06PM +0200, Eli Zaretskii wrote: > > djdev202, I've found a problem. Perl failed on some of its self tests > > which use glob(). But when I linked the executable with libc.a from > > djdev201, it worked fine. So I guess, there may be a bug in glob() in > > 2.02. > The diffs between glob.c in v2.01 and v2.02 are appended. I don't see > anything that seems like a bug here. Do you? No, glob() seems to be perfect. > Maybe Perl is counting on the behavior in case globbing failed, which now > requires a special flag (see the last hunk of changes below)? > Of course, some of the functions that `glob' calls might be the cause. Ok, I've found the problem which is in the fsext stuff (perl's globbing uses this too for builtin globbing). The problem: when a new handle is allocated, it is not opened, but dup()-ed in djgpp 2.02. It would work perfectly if the file pointer would be set to 0, ie an lseek(..,0,0) should be added after dup() IMHO. Laszlo