fix crash from compgen in a non-interactive shell; globstar option now works with complete -G; wait -p changes; some int->size_t changes

This commit is contained in:
Chet Ramey
2022-04-19 10:45:39 -04:00
parent 3be2a2ca9a
commit 7a8455e421
45 changed files with 7600 additions and 8195 deletions
+7 -7
View File
@@ -167,8 +167,8 @@ getdtablesize ()
# endif
void
bcopy (s,d,n)
char *d, *s;
int n;
void *d, *s;
size_t n;
{
FASTCOPY (s, d, n);
}
@@ -180,8 +180,8 @@ bcopy (s,d,n)
# endif
void
bzero (s, n)
char *s;
int n;
void *s;
size_t n;
{
register int i;
register char *r;
@@ -197,7 +197,7 @@ bzero (s, n)
int
gethostname (name, namelen)
char *name;
int namelen;
size_t namelen;
{
int i;
struct utsname ut;
@@ -214,7 +214,7 @@ gethostname (name, namelen)
int
gethostname (name, namelen)
char *name;
int namelen;
size_t namelen;
{
strncpy (name, "unknown", namelen);
name[namelen] = '\0';
@@ -237,7 +237,7 @@ killpg (pgrp, sig)
int
mkfifo (path, mode)
char *path;
int mode;
mode_t mode;
{
#if defined (S_IFIFO)
return (mknod (path, (mode | S_IFIFO), 0));
+2 -1
View File
@@ -68,7 +68,8 @@ zgetline (fd, lineptr, n, delim, unbuffered_read)
int delim;
int unbuffered_read;
{
int nr, retval;
int retval;
size_t nr;
char *line, c;
if (lineptr == 0 || n == 0 || (*lineptr == 0 && *n != 0))
+1 -1
View File
@@ -54,7 +54,7 @@ zmapfd (fd, ostr, fn)
int rval;
char lbuf[ZBUFSIZ];
char *result;
int rsize, rind;
size_t rsize, rind;
rval = 0;
result = (char *)xmalloc (rsize = ZBUFSIZ);