From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from minnie.tuhs.org (minnie.tuhs.org [45.79.103.53]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id bf91085f for ; Tue, 11 Feb 2020 10:09:50 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id DC0099BCFB; Tue, 11 Feb 2020 20:09:49 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id A20429BCE3; Tue, 11 Feb 2020 20:09:37 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 49F019BCE3; Tue, 11 Feb 2020 20:09:36 +1000 (AEST) Received: from freefriends.org (freefriends.org [96.88.95.60]) by minnie.tuhs.org (Postfix) with ESMTPS id F40849BCDE for ; Tue, 11 Feb 2020 20:09:35 +1000 (AEST) X-Envelope-From: arnold@skeeve.com Received: from freefriends.org (freefriends.org [96.88.95.60]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 01BA9WcM005702 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Feb 2020 03:09:32 -0700 Received: (from arnold@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 01BA9VJo005701; Tue, 11 Feb 2020 03:09:31 -0700 From: arnold@skeeve.com Message-Id: <202002111009.01BA9VJo005701@freefriends.org> X-Authentication-Warning: frenzy.freefriends.org: arnold set sender to arnold@skeeve.com using -f Date: Tue, 11 Feb 2020 03:09:31 -0700 To: robpike@gmail.com, arnold@skeeve.com References: <202002110746.01B7kTrT032157@freefriends.org> In-Reply-To: User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [TUHS] compiling v9sh X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tuhs@tuhs.org Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" No, it's based on his work to make the shell use malloc. The paper describing the work is included in the tarball. Arnold Rob Pike wrote: > Is that version still using the interrupt trick? I can't remember if I > ripped that out for (sad) portability reasons. > > -rob > > > On Tue, Feb 11, 2020 at 6:47 PM wrote: > > > For anyone who's interested, here is what it took to compile Geoff > > Collyer's v9sh on Ubuntu 18.04. > > > > Arnold > > ---------------------------------- > > diff -ur v9sh/error.c v9sh-new/error.c > > --- v9sh/error.c 2017-07-29 11:45:07.000000000 +0300 > > +++ v9sh-new/error.c 2020-02-10 17:31:33.275920947 +0200 > > @@ -24,7 +24,7 @@ > > } > > if (per) { > > prs(colon); > > - prs(errno < 0 || errno >= sys_nerr? "Bad errno": > > sys_errlist[errno]); > > + prs(strerror(errno)); > > } > > newline(); > > exitsh(ERROR); > > diff -ur v9sh/pathserv.c v9sh-new/pathserv.c > > --- v9sh/pathserv.c 2017-07-29 12:06:25.000000000 +0300 > > +++ v9sh-new/pathserv.c 2020-02-10 17:29:43.666971083 +0200 > > @@ -30,7 +30,7 @@ > > { > > struct stat buf; > > > > - if (stat(name, &buf) == 0 && (buf.st_mode&S_IFMT) == S_IFREG && > > + if (stat(name, &buf) == 0 && S_ISREG(buf.st_mode) && > > access(name, EXECUTE) == 0) > > return 0; > > else > > diff -ur v9sh/xec.c v9sh-new/xec.c > > --- v9sh/xec.c 2017-07-29 12:27:02.000000000 +0300 > > +++ v9sh-new/xec.c 2020-02-10 17:29:50.607030967 +0200 > > @@ -612,7 +612,7 @@ > > > > if (flags&ttyflg && (dir1 = spname(tempdir, > > &score)) && > > stat(dir1, &sb) == 0 && > > - (sb.st_mode&S_IFMT) == S_IFDIR && > > + S_ISDIR(sb.st_mode) && > > access(dir1, EXECUTE) == 0) { > > /* dir1 is a searchable directory. */ > > if (score < bestscore) { > >