*BSD News Article 15862


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!noc.near.net!uunet!tinman2!tdphette
From: tdphette@mke.ab.com (Thad Phetteplace x4461)
Newsgroups: comp.os.386bsd.questions
Subject: Re: pcomm getcwd() problem
Date: 10 May 1993 14:30:00 GMT
Organization: Allen-Bradley Co.
Lines: 32
Message-ID: <1slot8INN27u@scarecrow.mke.ab.com>
References: <C6rwwz.2nn@cscns.com>
NNTP-Posting-Host: tinman.mke.ab.com
X-Newsreader: Tin 1.1 PL4

scottm@cscns.com (Scott McKinsey) writes:
: I have got pcomm working finally.  The solution is to delete the
: code between the #ifdef BSD portion of chg_dir.c.

The copy of pcomm in the from_ref directory on agate should already
contain this fix.  Rather then delete the code I simply changed the
ifdef so it would never compile.  An ugly hack, I should have made 
it look for ___386BSD___ or something like that.  From the source
file chg_dir.c...

/*
   386BSD hack - 10/20/92 by Thad Phetteplace

   This ifdef added to keep getcwd from ever being compiled.  Otherwise
   it will redefine itself over the library version and cause an
   interesting bug in which getwd and getcwd recursively call each other
   untill the call stack overflows.  Used to be #ifdef BSD
*/
#ifdef ARMAGEDON

By the way, this version of pcomm is also available on tinman.mke.ab.com
in the /pub/386bsd/ports directory via anonymous FTP.

--
Thad Phetteplace
Network Systems Analyst, Allen-Bradley Co.
Phone: (414)382-4461
Email: tdphette@mke.ab.com

The opinions expressed here are entirely my own and not that of my employer.
I am not a slob, I am simply doing an experiment in domestic entropy!