diff options
| author | kamil <kamil@NetBSD.org> | 2018-01-24 09:53:20 +0000 |
|---|---|---|
| committer | kamil <kamil@NetBSD.org> | 2018-01-24 09:53:20 +0000 |
| commit | ed120974cf127a1fe85cae3e26bf272a1fbef1d6 (patch) | |
| tree | 85eac2f8ed19008f2a40b0d7df42ba5d4dfffb97 /bin/ksh/exec.c | |
| parent | 0a7189e8ac7c630cbdd9fa28063a7c3b61f40e57 (diff) | |
ksh: Rename a local function tsearch to mytsearch
This removes a clash with well-known libc function tsearch(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>
Diffstat (limited to 'bin/ksh/exec.c')
| -rw-r--r-- | bin/ksh/exec.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/ksh/exec.c b/bin/ksh/exec.c index 9bd873b5293..6927993fa85 100644 --- a/bin/ksh/exec.c +++ b/bin/ksh/exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: exec.c,v 1.25 2018/01/24 09:21:20 kamil Exp $ */ +/* $NetBSD: exec.c,v 1.26 2018/01/24 09:53:21 kamil Exp $ */ /* * execute command tree @@ -6,7 +6,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: exec.c,v 1.25 2018/01/24 09:21:20 kamil Exp $"); +__RCSID("$NetBSD: exec.c,v 1.26 2018/01/24 09:53:21 kamil Exp $"); #endif #include <sys/stat.h> @@ -775,7 +775,7 @@ shcomexec(wp) { register struct tbl *tp; - tp = tsearch(&builtins, *wp, hash(*wp)); + tp = mytsearch(&builtins, *wp, hash(*wp)); if (tp == NULL) internal_errorf(1, "shcomexec: %s", *wp); return call_builtin(tp, wp); @@ -795,7 +795,7 @@ findfunc(name, h, create) struct tbl *tp = (struct tbl *) 0; for (l = e->loc; l; l = l->next) { - tp = tsearch(&l->funs, name, h); + tp = mytsearch(&l->funs, name, h); if (tp) break; if (!l->next && create) { @@ -906,7 +906,7 @@ findcom(name, flags) flags &= ~FC_FUNC; goto Search; } - tbi = (flags & FC_BI) ? tsearch(&builtins, name, h) : NULL; + tbi = (flags & FC_BI) ? mytsearch(&builtins, name, h) : NULL; /* POSIX says special builtins first, then functions, then * POSIX regular builtins, then search path... */ @@ -936,7 +936,7 @@ findcom(name, flags) if (!tp && (flags & FC_UNREGBI) && tbi) tp = tbi; if (!tp && (flags & FC_PATH) && !(flags & FC_DEFPATH)) { - tp = tsearch(&taliases, name, h); + tp = mytsearch(&taliases, name, h); if (tp && (tp->flag & ISSET) && eaccess(tp->val.s, X_OK) != 0) { if (tp->flag & ALLOC) { tp->flag &= ~ALLOC; |
