Module Name: src
Committed By: kamil
Date: Wed Jan 24 09:21:20 UTC 2018
Modified Files:
src/bin/ksh: exec.c proto.h table.c var.c
Log Message:
ksh: Rename a local function tdelete to mytdelete
This removes a clash with well-known libc function tdelete(3) from POSIX.
This allows to build ksh against MSan.
The new name might not be perfect, but long term ksh should be switched to
the libc version.
Sponsored by <The NetBSD Foundation>
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/bin/ksh/exec.c
cvs rdiff -u -r1.10 -r1.11 src/bin/ksh/proto.h
cvs rdiff -u -r1.4 -r1.5 src/bin/ksh/table.c
cvs rdiff -u -r1.21 -r1.22 src/bin/ksh/var.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/ksh/exec.c
diff -u src/bin/ksh/exec.c:1.24 src/bin/ksh/exec.c:1.25
--- src/bin/ksh/exec.c:1.24 Sat Jul 1 23:12:08 2017
+++ src/bin/ksh/exec.c Wed Jan 24 09:21:20 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: exec.c,v 1.24 2017/07/01 23:12:08 joerg Exp $ */
+/* $NetBSD: exec.c,v 1.25 2018/01/24 09:21:20 kamil Exp $ */
/*
* execute command tree
@@ -6,7 +6,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: exec.c,v 1.24 2017/07/01 23:12:08 joerg Exp $");
+__RCSID("$NetBSD: exec.c,v 1.25 2018/01/24 09:21:20 kamil Exp $");
#endif
#include <sys/stat.h>
@@ -843,7 +843,7 @@ define(name, t)
}
if (t == NULL) { /* undefine */
- tdelete(tp);
+ mytdelete(tp);
return was_set ? 0 : 1;
}
Index: src/bin/ksh/proto.h
diff -u src/bin/ksh/proto.h:1.10 src/bin/ksh/proto.h:1.11
--- src/bin/ksh/proto.h:1.10 Sat Jul 1 23:12:08 2017
+++ src/bin/ksh/proto.h Wed Jan 24 09:21:20 2018
@@ -1,9 +1,9 @@
-/* $NetBSD: proto.h,v 1.10 2017/07/01 23:12:08 joerg Exp $ */
+/* $NetBSD: proto.h,v 1.11 2018/01/24 09:21:20 kamil Exp $ */
/*
* prototypes for PD-KSH
* originally generated using "cproto.c 3.5 92/04/11 19:28:01 cthuang "
- * $Id: proto.h,v 1.10 2017/07/01 23:12:08 joerg Exp $
+ * $Id: proto.h,v 1.11 2018/01/24 09:21:20 kamil Exp $
*/
#include <stdbool.h>
@@ -218,7 +218,7 @@ unsigned int hash ARGS((const char *));
void tinit ARGS((struct table *, Area *, int));
struct tbl * tsearch ARGS((struct table *, const char *, unsigned int));
struct tbl * tenter ARGS((struct table *, const char *, unsigned int));
-void tdelete ARGS((struct tbl *));
+void mytdelete ARGS((struct tbl *));
void twalk ARGS((struct tstate *, struct table *));
struct tbl * tnext ARGS((struct tstate *));
struct tbl ** tsort ARGS((struct table *));
Index: src/bin/ksh/table.c
diff -u src/bin/ksh/table.c:1.4 src/bin/ksh/table.c:1.5
--- src/bin/ksh/table.c:1.4 Mon Jun 23 11:39:04 2003
+++ src/bin/ksh/table.c Wed Jan 24 09:21:20 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: table.c,v 1.4 2003/06/23 11:39:04 agc Exp $ */
+/* $NetBSD: table.c,v 1.5 2018/01/24 09:21:20 kamil Exp $ */
/*
* dynamic hashed associative table for commands and variables
@@ -6,7 +6,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: table.c,v 1.4 2003/06/23 11:39:04 agc Exp $");
+__RCSID("$NetBSD: table.c,v 1.5 2018/01/24 09:21:20 kamil Exp $");
#endif
@@ -144,7 +144,7 @@ tenter(tp, n, h)
}
void
-tdelete(p)
+mytdelete(p)
register struct tbl *p;
{
p->flag = 0;
Index: src/bin/ksh/var.c
diff -u src/bin/ksh/var.c:1.21 src/bin/ksh/var.c:1.22
--- src/bin/ksh/var.c:1.21 Sat Jul 1 23:12:08 2017
+++ src/bin/ksh/var.c Wed Jan 24 09:21:20 2018
@@ -1,9 +1,9 @@
-/* $NetBSD: var.c,v 1.21 2017/07/01 23:12:08 joerg Exp $ */
+/* $NetBSD: var.c,v 1.22 2018/01/24 09:21:20 kamil Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: var.c,v 1.21 2017/07/01 23:12:08 joerg Exp $");
+__RCSID("$NetBSD: var.c,v 1.22 2018/01/24 09:21:20 kamil Exp $");
#endif
#include <sys/stat.h>
@@ -939,7 +939,7 @@ unspecial(name)
tp = tsearch(&specials, name, hash(name));
if (tp)
- tdelete(tp);
+ mytdelete(tp);
}
#ifdef KSH