From: Rob Pike <robpike@gmail.com>
To: arnold@skeeve.com
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: Re: [TUHS] compiling v9sh
Date: Tue, 11 Feb 2020 21:03:08 +1100 [thread overview]
Message-ID: <CAKzdPgwbD4D_xoN4F_w8NWxztt=7tW7QyFWTXbA=zMpKL8dfww@mail.gmail.com> (raw)
In-Reply-To: <202002110746.01B7kTrT032157@freefriends.org>
[-- Attachment #1: Type: text/plain, Size: 1845 bytes --]
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 <arnold@skeeve.com> 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) {
>
[-- Attachment #2: Type: text/html, Size: 2599 bytes --]
next prev parent reply other threads:[~2020-02-11 10:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-11 7:46 arnold
2020-02-11 10:03 ` Rob Pike [this message]
2020-02-11 10:09 ` arnold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKzdPgwbD4D_xoN4F_w8NWxztt=7tW7QyFWTXbA=zMpKL8dfww@mail.gmail.com' \
--to=robpike@gmail.com \
--cc=arnold@skeeve.com \
--cc=tuhs@tuhs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).