Source-Changes-HG archive

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

[src/trunk]: src/bin/ksh ksh: Remove symbol clash with libc



details:   https://anonhg.NetBSD.org/src/rev/3116d04bd4fe
branches:  trunk
changeset: 362312:3116d04bd4fe
user:      kamil <kamil%NetBSD.org@localhost>
date:      Sun Jun 03 12:18:29 2018 +0000

description:
ksh: Remove symbol clash with libc

Rename local function twalk() to ksh_twak().
This is needed for installing interceptors in sanitizers.

Sponsored by <The NetBSD Foundation>

diffstat:

 bin/ksh/c_ksh.c |  6 +++---
 bin/ksh/edit.c  |  6 +++---
 bin/ksh/exec.c  |  6 +++---
 bin/ksh/proto.h |  6 +++---
 bin/ksh/table.c |  8 ++++----
 bin/ksh/table.h |  4 ++--
 6 files changed, 18 insertions(+), 18 deletions(-)

diffs (159 lines):

diff -r 4083f43e6c8b -r 3116d04bd4fe bin/ksh/c_ksh.c
--- a/bin/ksh/c_ksh.c   Sun Jun 03 11:55:27 2018 +0000
+++ b/bin/ksh/c_ksh.c   Sun Jun 03 12:18:29 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: c_ksh.c,v 1.28 2018/05/08 16:37:59 kamil Exp $ */
+/*     $NetBSD: c_ksh.c,v 1.29 2018/06/03 12:18:29 kamil Exp $ */
 
 /*
  * built-in Korn commands: c_*
@@ -6,7 +6,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: c_ksh.c,v 1.28 2018/05/08 16:37:59 kamil Exp $");
+__RCSID("$NetBSD: c_ksh.c,v 1.29 2018/06/03 12:18:29 kamil Exp $");
 #endif
 
 #include <sys/stat.h>
@@ -1032,7 +1032,7 @@
        if (all) {
                struct tstate ts;
 
-               for (twalk(&ts, t); (ap = tnext(&ts)); ) {
+               for (ksh_twalk(&ts, t); (ap = tnext(&ts)); ) {
                        if (ap->flag&ALLOC) {
                                ap->flag &= ~(ALLOC|ISSET);
                                afree((void*)ap->val.s, APERM);
diff -r 4083f43e6c8b -r 3116d04bd4fe bin/ksh/edit.c
--- a/bin/ksh/edit.c    Sun Jun 03 11:55:27 2018 +0000
+++ b/bin/ksh/edit.c    Sun Jun 03 12:18:29 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: edit.c,v 1.34 2017/07/01 23:12:08 joerg Exp $  */
+/*     $NetBSD: edit.c,v 1.35 2018/06/03 12:18:29 kamil Exp $  */
 
 /*
  * Command line editing - common code
@@ -7,7 +7,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: edit.c,v 1.34 2017/07/01 23:12:08 joerg Exp $");
+__RCSID("$NetBSD: edit.c,v 1.35 2018/06/03 12:18:29 kamil Exp $");
 #endif
 
 #include <stdbool.h>
@@ -938,7 +938,7 @@
        struct tstate ts;
        struct tbl *te;
 
-       for (twalk(&ts, tp); (te = tnext(&ts)); ) {
+       for (ksh_twalk(&ts, tp); (te = tnext(&ts)); ) {
                if (gmatch(te->name, pat, false))
                        XPput(*wp, str_save(te->name, ATEMP));
        }
diff -r 4083f43e6c8b -r 3116d04bd4fe bin/ksh/exec.c
--- a/bin/ksh/exec.c    Sun Jun 03 11:55:27 2018 +0000
+++ b/bin/ksh/exec.c    Sun Jun 03 12:18:29 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec.c,v 1.27 2018/05/08 16:37:59 kamil Exp $  */
+/*     $NetBSD: exec.c,v 1.28 2018/06/03 12:18:29 kamil Exp $  */
 
 /*
  * execute command tree
@@ -6,7 +6,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: exec.c,v 1.27 2018/05/08 16:37:59 kamil Exp $");
+__RCSID("$NetBSD: exec.c,v 1.28 2018/06/03 12:18:29 kamil Exp $");
 #endif
 
 #include <sys/stat.h>
@@ -999,7 +999,7 @@
        struct tbl *tp;
        struct tstate ts;
 
-       for (twalk(&ts, &taliases); (tp = tnext(&ts)) != NULL; )
+       for (ksh_twalk(&ts, &taliases); (tp = tnext(&ts)) != NULL; )
                if ((tp->flag&ISSET) && (all || !ISDIRSEP(tp->val.s[0]))) {
                        if (tp->flag&ALLOC) {
                                tp->flag &= ~(ALLOC|ISSET);
diff -r 4083f43e6c8b -r 3116d04bd4fe bin/ksh/proto.h
--- a/bin/ksh/proto.h   Sun Jun 03 11:55:27 2018 +0000
+++ b/bin/ksh/proto.h   Sun Jun 03 12:18:29 2018 +0000
@@ -1,9 +1,9 @@
-/*     $NetBSD: proto.h,v 1.12 2018/01/24 09:53:21 kamil Exp $ */
+/*     $NetBSD: proto.h,v 1.13 2018/06/03 12:18:29 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.12 2018/01/24 09:53:21 kamil Exp $
+ * $Id: proto.h,v 1.13 2018/06/03 12:18:29 kamil Exp $
  */
 
 #include <stdbool.h>
@@ -219,7 +219,7 @@
 struct tbl *   mytsearch       ARGS((struct table *, const char *, unsigned int));
 struct tbl *   tenter  ARGS((struct table *, const char *, unsigned int));
 void   mytdelete               ARGS((struct tbl *));
-void   twalk           ARGS((struct tstate *, struct table *));
+void   ksh_twalk               ARGS((struct tstate *, struct table *));
 struct tbl *   tnext   ARGS((struct tstate *));
 struct tbl **  tsort   ARGS((struct table *));
 /* trace.c */
diff -r 4083f43e6c8b -r 3116d04bd4fe bin/ksh/table.c
--- a/bin/ksh/table.c   Sun Jun 03 11:55:27 2018 +0000
+++ b/bin/ksh/table.c   Sun Jun 03 12:18:29 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: table.c,v 1.7 2018/05/08 16:37:59 kamil Exp $  */
+/*     $NetBSD: table.c,v 1.8 2018/06/03 12:18:29 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.7 2018/05/08 16:37:59 kamil Exp $");
+__RCSID("$NetBSD: table.c,v 1.8 2018/06/03 12:18:29 kamil Exp $");
 #endif
 
 
@@ -151,7 +151,7 @@
 }
 
 void
-twalk(ts, tp)
+ksh_twalk(ts, tp)
        struct tstate *ts;
        struct table *tp;
 {
@@ -216,7 +216,7 @@
 
        shellf("table size %d, nfree %d\n", tp->size, tp->nfree);
        shellf("    Ncmp name\n");
-       twalk(&ts, tp);
+       ksh_twalk(&ts, tp);
        while ((te = tnext(&ts))) {
                struct tbl **pp, *p;
 
diff -r 4083f43e6c8b -r 3116d04bd4fe bin/ksh/table.h
--- a/bin/ksh/table.h   Sun Jun 03 11:55:27 2018 +0000
+++ b/bin/ksh/table.h   Sun Jun 03 12:18:29 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: table.h,v 1.3 1999/10/20 15:10:00 hubertf Exp $ */
+/* $NetBSD: table.h,v 1.4 2018/06/03 12:18:29 kamil Exp $ */
 
 /*
  * generic hashed associative table for commands and variables.
@@ -127,7 +127,7 @@
 #define BF_DOGETOPTS   BIT(0)  /* save/restore getopts state */
 
 /*
- * Used by twalk() and tnext() routines.
+ * Used by ksh_twalk() and tnext() routines.
  */
 struct tstate {
        int left;



Home | Main Index | Thread Index | Old Index