Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: build fails on systems without /dev/fd
- X-seq: zsh-workers 42793
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: build fails on systems without /dev/fd
- Date: Thu, 17 May 2018 09:44:39 +0100
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180517084443euoutp02fa0f297c1a0d6c9d493d2e22dc81bfdb~vYh7zCnm_1033410334euoutp02y
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1526546683; bh=QnxJuCc7/sqLXse4eWotHrS3ODRdXgPjrro+nJKRFPU=; h=Date:From:To:Subject:In-Reply-To:References:From; b=M0XLiHdcxx0uV25oh6jepRQ26g7fjBs9H3qJ8/OFl0+ujvaG9+g6I3gaeGcuS/pfR 7USiDCY4Hzxm4JYfQqfPUVcfA2aNWo0PKWSEDxn0OWFLFoLsz2iA5pe+NMNFL7nlUC A9ZXt8ZuLvdPG4QOQo/RyAemT1c/8o3bEKw4o7XQ=
- In-reply-to: <20180516213133.GA7996@chaz.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: SCSC
- References: <CGME20180516213205epcas3p21f26f4de3643a563f1ed41c7922bbee9@epcas3p2.samsung.com> <20180516213133.GA7996@chaz.gmail.com>
On Wed, 16 May 2018 22:31:33 +0100
Stephane Chazelas <stephane.chazelas@xxxxxxxxx> wrote:
> building zsh on FreeBSD when /dev/fd is not mounted, I get:
>
> exec.c: In function ‘closem’:
> exec.c:4372:28: error: ‘FDT_PROC_SUBST’ undeclared (first use in this
> function) (all || fdtable[i] != FDT_PROC_SUBST) &&
>
> I wouldn't know if it's only a matter of #ifdef'ing out the "||
> fdtable[i] != FDT_PROC_SUBST"
Hmm... we don't need all that scar tissue associated with the fact this
value is only sometimes defined, and given it now means we'd have to
cast "alL" to void, I've decided that's beyond the pain barrier.
Here's a more comprehensive change (that chunk in exec.c now doesn't
need any work).
pws
diff --git a/Src/jobs.c b/Src/jobs.c
index 330ee6b..38b3d89 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -1258,11 +1258,7 @@ pipecleanfilelist(LinkList filelist, int proc_subst_only)
while (node) {
Jobfile jf = (Jobfile)getdata(node);
if (jf->is_fd &&
- (!proc_subst_only
-#ifdef FDT_PROC_SUBST
- || fdtable[jf->u.fd] == FDT_PROC_SUBST
-#endif
- )) {
+ (!proc_subst_only || fdtable[jf->u.fd] == FDT_PROC_SUBST)) {
LinkNode next = nextnode(node);
zclose(jf->u.fd);
(void)remnode(filelist, node);
diff --git a/Src/zsh.h b/Src/zsh.h
index 8b48984..8535d48 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -454,15 +454,14 @@ enum {
* so the shell can still exec the last process.
*/
#define FDT_FLOCK_EXEC 6
-#ifdef PATH_DEV_FD
/*
* Entry used by a process substition.
* This marker is not tested internally as we associated the file
* descriptor with a job for closing.
+ *
+ * This is not used unless PATH_DEV_FD is defined.
*/
#define FDT_PROC_SUBST 7
-#endif
-
/*
* Mask to get the basic FDT type.
*/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author