Skip to content

Commit

Permalink
Merge branch 'dev' into workaround-redhat-bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
McDutchie committed Sep 9, 2023
2 parents 0dc6c09 + aa6dc48 commit 481ac20
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 34 deletions.
5 changes: 4 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ This documents significant changes in the dev branch of ksh 93u+m.
For full details, see the git log at: https://github.com/ksh93/ksh
Uppercase BUG_* IDs are shell bug IDs as used by the Modernish shell library.

2023-06-30:
2023-09-09:

- Fixed incorrect rejection of the tab key while reading input using the `read`
built-in command. Bugs introduced on 2021-02-26 (emacs) and 2022-08-24 (vi).

- Fixed a minor bug that could cause '/opt/ast/bin/getconf PID_MAX' to
return the wrong value when ksh is built with strict C99.
Expand Down
8 changes: 4 additions & 4 deletions bin/package
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ command=${0##*/}
case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in
0123) USAGE=$'
[-?
@(#)$Id: '$command$' (ksh 93u+m) 2023-05-28 $
@(#)$Id: '$command$' (ksh 93u+m) 2023-06-18 $
]
[-author?Glenn Fowler <[email protected]>]
[-author?Contributors to https://github.com/ksh93/ksh]
Expand Down Expand Up @@ -543,7 +543,7 @@ SEE ALSO
pkgadd(1), pkgmk(1), rpm(1), sh(1), tar(1), optget(3)

IMPLEMENTATION
version package (ksh 93u+m) 2023-03-29
version package (ksh 93u+m) 2023-06-18
author Glenn Fowler <[email protected]>
author Contributors to https://github.com/ksh93/ksh
copyright (c) 1994-2012 AT&T Intellectual Property
Expand Down Expand Up @@ -1028,9 +1028,9 @@ int main(void)
# inconsistent -dumpmachine filtered here

case $canon in
*-*-linux-gnu*)
*-*-linux-gnu* | *-*-linux-musl*)
;;
*-linux-gnu*)
*-linux-gnu* | *-linux-musl*)
# fix missing machine field, e.g. aarch64-linux-gnu => aarch64-unknown-linux-gnu
canon=${canon%%-*}-unknown-${canon#*-} ;;
esac
Expand Down
8 changes: 4 additions & 4 deletions src/cmd/INIT/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ command=${0##*/}
case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in
0123) USAGE=$'
[-?
@(#)$Id: '$command$' (ksh 93u+m) 2023-05-28 $
@(#)$Id: '$command$' (ksh 93u+m) 2023-06-18 $
]
[-author?Glenn Fowler <[email protected]>]
[-author?Contributors to https://github.com/ksh93/ksh]
Expand Down Expand Up @@ -543,7 +543,7 @@ SEE ALSO
pkgadd(1), pkgmk(1), rpm(1), sh(1), tar(1), optget(3)
IMPLEMENTATION
version package (ksh 93u+m) 2023-03-29
version package (ksh 93u+m) 2023-06-18
author Glenn Fowler <[email protected]>
author Contributors to https://github.com/ksh93/ksh
copyright (c) 1994-2012 AT&T Intellectual Property
Expand Down Expand Up @@ -1028,9 +1028,9 @@ int main(void)
# inconsistent -dumpmachine filtered here

case $canon in
*-*-linux-gnu*)
*-*-linux-gnu* | *-*-linux-musl*)
;;
*-linux-gnu*)
*-linux-gnu* | *-linux-musl*)
# fix missing machine field, e.g. aarch64-linux-gnu => aarch64-unknown-linux-gnu
canon=${canon%%-*}-unknown-${canon#*-} ;;
esac
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/ksh93/RELEASE88
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This file is of historic interest. For recent changes in both ksh 93u+m and
the accompanying libraries, see the file NEWS in the top-level directory.
This file is of historical interest only. For recent changes in both ksh 93u+m
and the accompanying libraries, see the file NEWS in the top-level directory.
____

This is a list of changes that have been made since the 11/16/88 version
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/ksh93/RELEASE93
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This file is of historic interest. For recent changes in both ksh 93u+m and
the accompanying libraries, see the file NEWS in the top-level directory.
This file is of historical interest only. For recent changes in both ksh 93u+m
and the accompanying libraries, see the file NEWS in the top-level directory.
____

This is a list of changes that have been made since the 12/28/93 version
Expand Down
1 change: 0 additions & 1 deletion src/cmd/ksh93/bltins/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,6 @@ int test_inode(const char *file1,const char *file2)

/*
* This version of access checks against the effective UID/GID
* The static buffer statb is shared with test_mode.
*/
int sh_access(const char *name, int mode)
{
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/ksh93/data/builtins.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ const char sh_optgetopts[] =
"values can be specified with a [...]] containing the "
"value followed by a description.]"
"[+6.?A group of the form [+\\n...]] will display the characters "
"representing ... in fixed with font without adding line breaks.]"
"representing ... in fixed-width font without adding line breaks.]"
"[+7.?A group of the form [+\aname\a?\atext\a]] specifies a section "
"\aname\a with descriptive \atext\a. If \aname\a is omitted then "
"\atext\a is placed in a new paragraph.]"
Expand Down
1 change: 0 additions & 1 deletion src/cmd/ksh93/data/lexstates.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,6 @@ const char e_lexsyntax4[] = "syntax error at line %d: invalid reference list";
const char e_lexsyntax5[] = "syntax error at line %d: `<<%s' here-document not contained within command substitution";
const char e_lexwarnvar[] = "line %d: in '((%s))', using '$' as in '$%.*s' is slower and can introduce rounding errors";
const char e_lexarithwarn[] = "line %d: %s is slower than ((%.*s%s";
const char e_lexlabunknown[] = "line %d: %s unknown label";
const char e_lexobsolete1[] = "line %d: `...` obsolete, use $(...)";
const char e_lexobsolete2[] = "line %d: -a obsolete, use -e";
const char e_lexobsolete3[] = "line %d: '=' obsolete, use '=='";
Expand Down
7 changes: 5 additions & 2 deletions src/cmd/ksh93/edit/emacs.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,11 @@ int ed_emacsread(void *context, int fd,char *buff,int scend, int reedit)
}
ep->ed->e_tabcount = 0;
}
beep();
continue;
if(sh.nextprompt)
{
beep();
continue;
}
do_default_processing:
default:

Expand Down
7 changes: 3 additions & 4 deletions src/cmd/ksh93/edit/vi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1253,15 +1253,14 @@ static void getline(Vi_t* vp,int mode)

case '\t': /** command completion **/
{
if(!sh_isoption(SH_VI) || !sh.nextprompt)
goto fallback;
if(blankline(vp))
{
ed_ringbell();
break;
}
if(sh_isoption(SH_VI) &&
mode != SEARCH &&
last_virt >= 0 &&
sh.nextprompt)
if(mode != SEARCH && last_virt >= 0)
{
if(virtual[cur_virt]=='\\')
{
Expand Down
1 change: 0 additions & 1 deletion src/cmd/ksh93/include/lexstates.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ extern const char *sh_lexrstates[ST_NONE];
extern const char e_lexversion[];
extern const char e_lexspace[];
extern const char e_lexslash[];
extern const char e_lexlabunknown[];
extern const char e_lexsyntax1[];
extern const char e_lexsyntax2[];
extern const char e_lexsyntax3[];
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/ksh93/include/shlex.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ typedef struct _shlex_
char intypeset; /* 1 when processing typeset, 2 when processing enum */
char comp_assign; /* in compound assignment */
char comsub; /* parsing command substitution */
char noreserv; /* reserved works not legal */
char noreserv; /* reserved words not legal */
int inlineno; /* saved value of sh.inlineno */
int firstline; /* saved value of sh.st.firstline */
int assignlevel; /* nesting level for assignment */
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/ksh93/include/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#define SH_RELEASE_FORK "93u+m" /* only change if you develop a new ksh93 fork */
#define SH_RELEASE_SVER "1.1.0-alpha" /* semantic version number: https://semver.org */
#define SH_RELEASE_DATE "2023-06-30" /* must be in this format for $((.sh.version)) */
#define SH_RELEASE_DATE "2023-09-09" /* must be in this format for $((.sh.version)) */
#define SH_RELEASE_CPYR "(c) 2020-2023 Contributors to ksh " SH_RELEASE_FORK

/* Scripts sometimes field-split ${.sh.version}, so don't change amount of whitespace. */
Expand Down
6 changes: 0 additions & 6 deletions src/cmd/ksh93/sh/path.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,18 +408,14 @@ static void pathinit(void)
const char *val;
Pathcomp_t *pp;
if(val=sh_scoped((PATHNOD))->nvalue.cp)
{
sh.pathlist = pp = path_addpath((Pathcomp_t*)sh.pathlist,val,PATH_PATH);
}
else
{
pp = defpathinit();
sh.pathlist = path_dup(pp);
}
if(val=sh_scoped((FPATHNOD))->nvalue.cp)
{
pp = path_addpath((Pathcomp_t*)sh.pathlist,val,PATH_FPATH);
}
}

/*
Expand All @@ -437,9 +433,7 @@ Pathcomp_t *path_get(const char *name)
pp = (Pathcomp_t*)sh.pathlist;
}
if(!pp && (!(sh_scoped(PATHNOD)->nvalue.cp)) || sh_isstate(SH_DEFPATH))
{
pp = defpathinit();
}
return pp;
}

Expand Down
7 changes: 7 additions & 0 deletions src/cmd/ksh93/tests/exit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -225,5 +225,12 @@ exp=123

unset exp got sig

# ======
# trap status tests

exp=1
(trap 'false; exit' EXIT; true)
let "(got=$?)==exp" || err_exit "passing down exit status from EXIT trap failed (got $got, expected $exp)"

# ======
exit $((Errors<125?Errors:125))
3 changes: 0 additions & 3 deletions src/lib/libast/features/sys
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,4 @@ extern wctomb int (char*, wchar_t)
extern write ssize_t (int, const void*, size_t)

print #undef extern

# <stdarg.h> is handled by proto so this must be after the last test

print #include <stdarg.h>

0 comments on commit 481ac20

Please sign in to comment.