Bug 131351 - pmake assumes two first readdir() calls returns "." and ".."
Summary: pmake assumes two first readdir() calls returns "." and ".."
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pmake
Version: 2
Hardware: i686
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-08-31 12:53 UTC by David Eriksson
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: 1.45-16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-09 08:00:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Fix that uses the same code as FreeBSD to fix the bug. (1.05 KB, patch)
2004-08-31 12:54 UTC, David Eriksson
no flags Details | Diff
Version 2 of fix that uses the same code as FreeBSD to fix the bug. (1.97 KB, patch)
2004-08-31 13:02 UTC, David Eriksson
no flags Details | Diff

Description David Eriksson 2004-08-31 12:53:31 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Gecko/20040615 Firefox/0.9

Description of problem:
In Dir_AddDir() in dir.c the following code can be found:

	    /*
	     * Skip the first two entries -- these will *always* be . and ..
	     */
	    (void)readdir(d);
	    (void)readdir(d);

The comment is a lie!

This bad behavior is corrected in the FreeBSD version of pmake. I will
attach a patch to this bug report with the FreeBSD fix.

Version-Release number of selected component (if applicable):
pmake-1.45-14

How reproducible:
Sometimes

Steps to Reproduce:
mkdir bug
cd bug
touch access_network.c
touch stuff.c
cat >Makefile
default: stuff.o access_network.o
 
.c.o:
        $(CC) $(CFLAGS) -c ${.IMPSRC}
^D
pmake

Actual Results:  $ pmake
cc -O -c stuff.c
make: don't know how to make access_network.o. Stop


Expected Results:  $ pmake
cc -O -c stuff.c
cc -O -c access_network.c


Additional info:

Comment 1 David Eriksson 2004-08-31 12:54:32 UTC
Created attachment 103286 [details]
Fix that uses the same code as FreeBSD to fix the bug.

Comment 2 David Eriksson 2004-08-31 12:59:33 UTC
The patch was not complete, new patch coming soon!

Comment 3 David Eriksson 2004-08-31 13:02:52 UTC
Created attachment 103287 [details]
Version 2 of fix that uses the same code as FreeBSD to fix the bug.

Comment 4 Jakub Jelinek 2004-09-09 08:00:18 UTC
Should be fixed in 1.45-16 in rawhide.  Thanks.


Note You need to log in before you can comment on or make changes to this bug.