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>
This commit is contained in:
parent
a7c48ad938
commit
b9cf72ac86
@ -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, fdo)
|
||||
* expansion. }
|
||||
*/
|
||||
if (fdo & DOGLOB)
|
||||
glob(start, wp, fdo & DOMARKDIRS);
|
||||
ksh_glob(start, wp, fdo & DOMARKDIRS);
|
||||
else
|
||||
XPput(*wp, debunk(start, start, end - start));
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user