Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jun 1996 15:48:20 -0700
From:      Poul-Henning Kamp <phk@FreeBSD.ORG>
To:        Nate Williams <nate@mt.sri.com>
Cc:        "Jordan K. Hubbard" <jkh@time.cdrom.com>, Scott Blachowicz <scott@statsci.com>, current@FreeBSD.ORG
Subject:   Re: Building inside of /usr/src? 
Message-ID:  <29888.835915700@critter.tfs.com>
In-Reply-To: Your message of "Thu, 27 Jun 1996 16:10:13 MDT." <199606272210.QAA11833@rocky.mt.sri.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>> Ahem.  Sorry, I feel better now! :-)
>> 
>> Check this out in make:
>> 
>>         if ((pwd = getenv("PWD")) != NULL) {
>>             if (stat(pwd, &sb) == 0 && sa.st_ino == sb.st_ino &&
>>                 sa.st_dev == sb.st_dev)
>>                 (void) strcpy(curdir, pwd);
>>         }
>> 
>> Anyone else think that this is totally bogus and should be removed?
>> It certainly EXPLAINS a few things! :-)
>
>Well, you already took it out, so I guess comments don't matter, but
>there's *probably* a reason for doing it.  You're best bet would be to
>remove it *locally* and then test the change to see if bad things happen
>before spamming the repository making us find all the bugs. :(

It is a semi-bogus performance optimization, I remembet it came in
the argument was that it would never fail, since the (dev#,ino#)
would catch cases where it wasn't ok.

I guess the stat should be a lstat ?

--
Poul-Henning Kamp           | phk@FreeBSD.ORG       FreeBSD Core-team.
http://www.freebsd.org/~phk | phk@login.dknet.dk    Private mailbox.
whois: [PHK]                | phk@ref.tfs.com       TRW Financial Systems, Inc.
Future will arrive by its own means, progress not so.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?29888.835915700>