Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/ksh ksh: Rename a local function tdelete to mytdelete



details:   https://anonhg.NetBSD.org/src/rev/7a0268fd12bc
branches:  trunk
changeset: 829265:7a0268fd12bc
user:      kamil <kamil%NetBSD.org@localhost>
date:      Wed Jan 24 09:21:20 2018 +0000

description:
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>

diffstat:

 bin/ksh/exec.c  |  6 +++---
 bin/ksh/proto.h |  6 +++---
 bin/ksh/table.c |  6 +++---
 bin/ksh/var.c   |  6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)

diffs (102 lines):

diff -r 952ccc0b6d68 -r 7a0268fd12bc bin/ksh/exec.c
--- a/bin/ksh/exec.c    Wed Jan 24 09:04:40 2018 +0000
+++ b/bin/ksh/exec.c    Wed Jan 24 09:21:20 2018 +0000
@@ -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 @@
        }
 
        if (t == NULL) {                /* undefine */
-               tdelete(tp);
+               mytdelete(tp);
                return was_set ? 0 : 1;
        }
 
diff -r 952ccc0b6d68 -r 7a0268fd12bc bin/ksh/proto.h
--- a/bin/ksh/proto.h   Wed Jan 24 09:04:40 2018 +0000
+++ b/bin/ksh/proto.h   Wed Jan 24 09:21:20 2018 +0000
@@ -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 @@
 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 *));
diff -r 952ccc0b6d68 -r 7a0268fd12bc bin/ksh/table.c
--- a/bin/ksh/table.c   Wed Jan 24 09:04:40 2018 +0000
+++ b/bin/ksh/table.c   Wed Jan 24 09:21:20 2018 +0000
@@ -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 @@
 }
 
 void
-tdelete(p)
+mytdelete(p)
        register struct tbl *p;
 {
        p->flag = 0;
diff -r 952ccc0b6d68 -r 7a0268fd12bc bin/ksh/var.c
--- a/bin/ksh/var.c     Wed Jan 24 09:04:40 2018 +0000
+++ b/bin/ksh/var.c     Wed Jan 24 09:21:20 2018 +0000
@@ -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 @@
 
        tp = tsearch(&specials, name, hash(name));
        if (tp)
-               tdelete(tp);
+               mytdelete(tp);
 }
 
 #ifdef KSH



Home | Main Index | Thread Index | Old Index