Module Name: src
Committed By: kamil
Date: Sun Jun 3 16:09:31 UTC 2018
Modified Files:
src/bin/ksh: eval.c
Log Message:
ksh: Remove symbol clash with libc
Rename local function glob() to ksh_glob().
This is needed for installing interceptors in sanitizers.
Sponsored by <The NetBSD Foundation>
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/bin/ksh/eval.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/eval.c
diff -u src/bin/ksh/eval.c:1.23 src/bin/ksh/eval.c:1.24
--- src/bin/ksh/eval.c:1.23 Tue May 8 16:37:59 2018
+++ src/bin/ksh/eval.c Sun Jun 3 16:09:31 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: eval.c,v 1.23 2018/05/08 16:37:59 kamil Exp $ */
+/* $NetBSD: eval.c,v 1.24 2018/06/03 16:09:31 kamil Exp $ */
/*
* Expansion - quoting, separation, substitution, globbing
@@ -6,7 +6,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: eval.c,v 1.23 2018/05/08 16:37:59 kamil Exp $");
+__RCSID("$NetBSD: eval.c,v 1.24 2018/06/03 16:09:31 kamil Exp $");
#endif
#include <sys/stat.h>
@@ -50,7 +50,7 @@ typedef struct Expand {
static int varsub ARGS((Expand *xp, char *sp, char *word, int *stypep, int *slenp));
static int comsub ARGS((Expand *xp, char *cp));
static char *trimsub ARGS((char *str, char *pat, int how));
-static void glob ARGS((char *cp, XPtrV *wp, int markdirs));
+static void ksh_glob ARGS((char *cp, XPtrV *wp, int markdirs));
static void globit ARGS((XString *xs, char **xpp, char *sp, XPtrV *wp,
int check));
static char *maybe_expand_tilde ARGS((char *p, XString *dsp, char **dpp,
@@ -578,7 +578,7 @@ expand(cp, wp, f)
else
#endif /* BRACE_EXPAND */
if (fdo & DOGLOB)
- glob(p, wp, f & DOMARKDIRS);
+ ksh_glob(p, wp, f & DOMARKDIRS);
else if ((f & DOPAT) || !(fdo & DOMAGIC_))
XPput(*wp, p);
else
@@ -945,13 +945,13 @@ trimsub(str, pat, how)
}
/*
- * glob
+ * ksh_glob
* Name derived from V6's /etc/glob, the program that expanded filenames.
*/
/* XXX cp not const 'cause slashes are temporarily replaced with nulls... */
static void
-glob(cp, wp, markdirs)
+ksh_glob(cp, wp, markdirs)
char *cp;
XPtrV *wp;
int markdirs;
@@ -1340,7 +1340,7 @@ alt_expand(wp, start, exp_start, end, fd
* expansion. }
*/
if (fdo & DOGLOB)
- glob(start, wp, fdo & DOMARKDIRS);
+ ksh_glob(start, wp, fdo & DOMARKDIRS);
else
XPput(*wp, debunk(start, start, end - start));
return;