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
|
* Expansion - quoting, separation, substitution, globbing
|
||||||
@ -6,7 +6,7 @@
|
|||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
#ifndef lint
|
#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
|
#endif
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#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 varsub ARGS((Expand *xp, char *sp, char *word, int *stypep, int *slenp));
|
||||||
static int comsub ARGS((Expand *xp, char *cp));
|
static int comsub ARGS((Expand *xp, char *cp));
|
||||||
static char *trimsub ARGS((char *str, char *pat, int how));
|
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,
|
static void globit ARGS((XString *xs, char **xpp, char *sp, XPtrV *wp,
|
||||||
int check));
|
int check));
|
||||||
static char *maybe_expand_tilde ARGS((char *p, XString *dsp, char **dpp,
|
static char *maybe_expand_tilde ARGS((char *p, XString *dsp, char **dpp,
|
||||||
@ -578,7 +578,7 @@ expand(cp, wp, f)
|
|||||||
else
|
else
|
||||||
#endif /* BRACE_EXPAND */
|
#endif /* BRACE_EXPAND */
|
||||||
if (fdo & DOGLOB)
|
if (fdo & DOGLOB)
|
||||||
glob(p, wp, f & DOMARKDIRS);
|
ksh_glob(p, wp, f & DOMARKDIRS);
|
||||||
else if ((f & DOPAT) || !(fdo & DOMAGIC_))
|
else if ((f & DOPAT) || !(fdo & DOMAGIC_))
|
||||||
XPput(*wp, p);
|
XPput(*wp, p);
|
||||||
else
|
else
|
||||||
@ -945,13 +945,13 @@ trimsub(str, pat, how)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* glob
|
* ksh_glob
|
||||||
* Name derived from V6's /etc/glob, the program that expanded filenames.
|
* Name derived from V6's /etc/glob, the program that expanded filenames.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* XXX cp not const 'cause slashes are temporarily replaced with nulls... */
|
/* XXX cp not const 'cause slashes are temporarily replaced with nulls... */
|
||||||
static void
|
static void
|
||||||
glob(cp, wp, markdirs)
|
ksh_glob(cp, wp, markdirs)
|
||||||
char *cp;
|
char *cp;
|
||||||
XPtrV *wp;
|
XPtrV *wp;
|
||||||
int markdirs;
|
int markdirs;
|
||||||
@ -1340,7 +1340,7 @@ alt_expand(wp, start, exp_start, end, fdo)
|
|||||||
* expansion. }
|
* expansion. }
|
||||||
*/
|
*/
|
||||||
if (fdo & DOGLOB)
|
if (fdo & DOGLOB)
|
||||||
glob(start, wp, fdo & DOMARKDIRS);
|
ksh_glob(start, wp, fdo & DOMARKDIRS);
|
||||||
else
|
else
|
||||||
XPput(*wp, debunk(start, start, end - start));
|
XPput(*wp, debunk(start, start, end - start));
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user