mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
'.': disable ksh function lookup in POSIX mode
POSIXly, '.' loads only files, not functions. This only applies to '.', not 'source' (which is not in POSIX). src/cmd/ksh93/bltins/misc.c: b_source(): - For ksh function lookup, add an additional check that we're not in POSIX mode and running the '.' (SYSDOT) builtin.
This commit is contained in:
parent
c0334e32a1
commit
214308f81e
5 changed files with 28 additions and 2 deletions
|
|
@ -259,7 +259,7 @@ int b_dot_cmd(register int n,char *argv[],Shbltin_t *context)
|
|||
{
|
||||
/* check for KornShell style function first */
|
||||
np = nv_search(script,shp->fun_tree,0);
|
||||
if(np && is_afunction(np) && !nv_isattr(np,NV_FPOSIX))
|
||||
if(np && is_afunction(np) && !nv_isattr(np,NV_FPOSIX) && !(sh_isoption(SH_POSIX) && shp->bltindata.bnode==SYSDOT))
|
||||
{
|
||||
if(!np->nvalue.ip)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue