diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-03-20 17:56:16 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-03-20 17:56:16 +0000 |
commit | dfae7a592088dcdcee1bd592076e7416afd5a31b (patch) | |
tree | e00fa83f64929dd5baf6398dfacca0c4d68c8c2f | |
parent | 867506f3b0f0c23128d601a8812de023078c88b4 (diff) | |
download | glibc-dfae7a592088dcdcee1bd592076e7416afd5a31b.tar glibc-dfae7a592088dcdcee1bd592076e7416afd5a31b.tar.gz glibc-dfae7a592088dcdcee1bd592076e7416afd5a31b.tar.bz2 glibc-dfae7a592088dcdcee1bd592076e7416afd5a31b.zip |
Update.
1998-03-20 Ulrich Drepper <drepper@cygnus.com>
* glibcbug.in: Use mktemp to generate unique file name for
temporary files.
* sysdeps/unix/grantpt.c (grantpt): Use __ptsname_r and not
ptsname_r. Use cast for execve call.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | glibcbug.in | 23 | ||||
-rw-r--r-- | sysdeps/unix/grantpt.c | 4 |
3 files changed, 26 insertions, 9 deletions
@@ -1,3 +1,11 @@ +1998-03-20 Ulrich Drepper <drepper@cygnus.com> + + * glibcbug.in: Use mktemp to generate unique file name for + temporary files. + + * sysdeps/unix/grantpt.c (grantpt): Use __ptsname_r and not + ptsname_r. Use cast for execve call. + 1998-03-20 16:24 Ulrich Drepper <drepper@cygnus.com> * libc.map: Add statvfs, fstatvfs, statvfs64, and fstatvfs64. diff --git a/glibcbug.in b/glibcbug.in index beb9d07c23..b55995d164 100644 --- a/glibcbug.in +++ b/glibcbug.in @@ -24,7 +24,16 @@ STDIO="@stdio@" PATH=/bin:/usr/bin:/usr/local/bin:$PATH export PATH -TEMP=/tmp/glibcbug.$$ +TEMP=`mktemp -q /tmp/glibcbugXXXXXX` +if test $? -ne 0; then + TEMP=/tmp/glibcbug.$$ + echo > $TEMP +fi +TEMPx=`mktemp -q /tmp/glibcbugXXXXXX` +if test $? -ne 0; then + TEMPx=/tmp/glibcbug.$$.x + echo > $TEMPx +fi BUGADDR=${1-$BUGGLIBC} ENVIRONMENT=`uname -a` @@ -33,8 +42,8 @@ ENVIRONMENT=`uname -a` : ${USER=${LOGNAME-`whoami`}} -trap 'rm -f $TEMP $TEMP.x; exit 1' 1 2 3 13 15 -trap 'rm -f $TEMP $TEMP.x' 0 +trap 'rm -f $TEMP $TEMPx; exit 1' 1 2 3 13 15 +trap 'rm -f $TEMP $TEMPx' 0 # How to read the passwd database. @@ -157,11 +166,11 @@ ${ORGANIZATION- $ORGANIZATION_C} EOF chmod u+w $TEMP -cp $TEMP $TEMP.x +cp $TEMP $TEMPx eval $EDIT $TEMP -if cmp -s $TEMP $TEMP.x; then +if cmp -s $TEMP $TEMPx; then echo "File not changed, no bug report submitted." exit 1 fi @@ -254,9 +263,9 @@ sed -e " /^>Description:/,/^>[A-Za-z-]*:/s;$DESCRIPTION_C;; /^>How-To-Repeat:/,/^>[A-Za-z-]*:/s;$HOW_TO_REPEAT_C;; /^>Fix:/,/^>[A-Za-z-]*:/s;$FIX_C;; -" $TEMP > $TEMP.x +" $TEMP > $TEMPx -if $MAIL_AGENT < $TEMP.x; then +if $MAIL_AGENT < $TEMPx; then echo "$COMMAND: problem report sent" xs=0; exit else diff --git a/sysdeps/unix/grantpt.c b/sysdeps/unix/grantpt.c index 6ef8d4912b..65a0d98a73 100644 --- a/sysdeps/unix/grantpt.c +++ b/sysdeps/unix/grantpt.c @@ -47,7 +47,7 @@ grantpt (fd) char namebuf[PTYNAMELEN]; /* Some systems do it for us. */ - if (ptsname_r (fd, namebuf, PTYNAMELEN) == NULL) + if (__ptsname_r (fd, namebuf, PTYNAMELEN) == NULL) return -1; if (stat (namebuf, &st)) return -1; @@ -71,7 +71,7 @@ grantpt (fd) if (dup2 (fd, PTY_FD) == -1) _exit (FAIL_EBADF); - execve (helper, argv, 0); + execve (helper, (char *const *) argv, 0); _exit (FAIL_EXEC); } else |