1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

bump internal libast version; various minor cleanups

These are minor things I accumulated over the last month or so.

Notable changes:

src/lib/libast/features/api,
src/lib/libast/misc/state.c,
src/lib/libast/comp/conf.tab,
src/cmd/ksh93/include/defs.h:
- Bump internal libast version to 20220101L. We've made a few
  additions to the API, at least pathicase (see 71934570, ca3ec200)
  and astconf_long (see c2ac69b2), so this should have been done
  already. This also updates '/opt/ast/bin/getconf _AST_VERSION'.
- Use AST_VERSION instead of outdated _AST_VERSION.
- In state.c, use AST_VERSION instead of hardcoding the version.

src/cmd/ksh93/sh/xec.c:
- Remove 'restorefd' variable, unused as of 42becab6.
- Remove 'cmdrecurse' function and SH_RUNPROG macro; this was once
  used by a few libcmd commands, but ast-open-archive reveals it's
  unused as of ast 1999-12-25.

src/cmd/ksh93/sh/*.c:
- Where available, use e_dot instead of "." for consistency; it is
  defined as an extern so we might as well use it.

src/cmd/ksh93/tests/*.sh:
- When reporting signal names in fails, include the SIG prefix.
- Fix a broken process hang test in subshell.sh.

src/lib/libast/man/sfdisc.3:
- Removed. The interfaces described here never made it out of AT&T;
  they do not exist in any libast version in ast-open-archive.
  Resolves: https://github.com/ksh93/ksh/issues/426
This commit is contained in:
Martijn Dekker 2022-01-14 16:56:41 +00:00
parent 07fc64f52b
commit e569f23ef9
25 changed files with 58 additions and 300 deletions

View file

@ -319,7 +319,7 @@ static char *dotpaths_lib(Pathcomp_t *pp, char *path)
if(last)
*last = 0;
else
path = ".";
path = (char*)e_dot;
r = stat(path,&statb);
if(last)
*last = '/';
@ -1671,7 +1671,7 @@ Pathcomp_t *path_addpath(Pathcomp_t *first, register const char *path,int type)
if(*cp==':')
{
if(type!=PATH_FPATH)
first = path_addcomp(first,old,".",type);
first = path_addcomp(first,old,e_dot,type);
while(*++path == ':');
}
else

View file

@ -2,7 +2,7 @@
* *
* This software is part of the ast package *
* Copyright (c) 1982-2012 AT&T Intellectual Property *
* Copyright (c) 2020-2021 Contributors to ksh 93u+m *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
@ -71,7 +71,6 @@ static void coproc_init(int pipes[]);
static void *timeout;
static char nlock;
static char pipejob;
static int restorefd;
struct funenv
{
@ -1325,7 +1324,7 @@ int sh_exec(register const Shnode_t *t, int flags)
if(!sh.pwd)
path_pwd();
if(sh.pwd)
stat(".",&statb);
stat(e_dot,&statb);
sfsync(NULL);
share = sfset(sfstdin,SF_SHARE,0);
sh_onstate(SH_STOPOK);
@ -1371,7 +1370,7 @@ int sh_exec(register const Shnode_t *t, int flags)
bp->data = (void*)save_data;
if(sh.exitval && errno==EINTR && sh.lastsig)
sh.exitval = SH_EXITSIG|sh.lastsig;
else if(!nv_isattr(np,BLT_EXIT) && sh.exitval!=SH_RUNPROG)
else if(!nv_isattr(np,BLT_EXIT))
sh.exitval &= SH_EXITMASK;
}
else
@ -1410,7 +1409,7 @@ int sh_exec(register const Shnode_t *t, int flags)
if(sh.pwd)
{
struct stat stata;
stat(".",&stata);
stat(e_dot,&stata);
/* restore directory changed */
if(statb.st_ino!=stata.st_ino || statb.st_dev!=stata.st_dev)
chdir(sh.pwd);
@ -1614,7 +1613,6 @@ int sh_exec(register const Shnode_t *t, int flags)
}
#endif /* SHOPT_BGX */
nv_getval(RANDNOD);
restorefd = sh.topfd;
if(type&FCOOP)
{
pipes[2] = 0;
@ -3409,20 +3407,6 @@ int sh_fun(Namval_t *np, Namval_t *nq, char *argv[])
return(sh.exitval);
}
/*
* This dummy routine is called by built-ins that do recursion
* on the file system (chmod, chgrp, chown). It causes
* the shell to invoke the non-builtin version in this case
*/
int cmdrecurse(int argc, char* argv[], int ac, char* av[])
{
NOT_USED(argc);
NOT_USED(argv[0]);
NOT_USED(ac);
NOT_USED(av[0]);
return(SH_RUNPROG);
}
/*
* set up pipe for cooperating process
*/