aboutsummaryrefslogtreecommitdiff
path: root/stdio-common/perror.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-09-01 06:10:36 +0000
committerUlrich Drepper <drepper@redhat.com>2001-09-01 06:10:36 +0000
commiteaad82e00522075b805621309775131e27388791 (patch)
tree0db8ddb46f2a278b5e766f9a62606dce3dd240a5 /stdio-common/perror.c
parentcb2391e14af26237a71729d7af2d9202fc22f12c (diff)
downloadglibc-eaad82e00522075b805621309775131e27388791.tar
glibc-eaad82e00522075b805621309775131e27388791.tar.gz
glibc-eaad82e00522075b805621309775131e27388791.tar.bz2
glibc-eaad82e00522075b805621309775131e27388791.zip
Update.
2001-08-31 Richard Henderson <rth@redhat.com> * elf/dl-support.c (_dl_cpuclock_offset): Protect with NONAVAIL. (HP_TIMING_AVAIL): Set to HP_SMALL_TIMING_AVAIL if present. * elf/rtld.c (HP_TIMING_AVAIL): Likewise. (print_statistics): Make scalar unsigned long long. * sysdeps/alpha/hp-timing.h: New file. 2001-08-31 Jakub Jelinek <jakub@redhat.com> * stdio-common/perror.c (perror): Save errno early, pass it down to perror_internal. (perror_internal): Add errnum argument. 2001-08-31 Jakub Jelinek <jakub@redhat.com> * sysdeps/alpha/dl-machine.h (elf_machine_rela): Remove unused code. Don't add old memory content for R_ALPHA_REFQUAD.
Diffstat (limited to 'stdio-common/perror.c')
-rw-r--r--stdio-common/perror.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/stdio-common/perror.c b/stdio-common/perror.c
index a1995e975e..077eed5867 100644
--- a/stdio-common/perror.c
+++ b/stdio-common/perror.c
@@ -26,10 +26,9 @@
#endif
static void
-perror_internal (FILE *fp, const char *s)
+perror_internal (FILE *fp, const char *s, int errnum)
{
char buf[1024];
- int errnum = errno;
const char *colon;
const char *errstring;
@@ -55,6 +54,7 @@ perror_internal (FILE *fp, const char *s)
void
perror (const char *s)
{
+ int errnum = errno;
#ifdef USE_IN_LIBIO
FILE *fp;
int fd = -1;
@@ -73,20 +73,20 @@ perror (const char *s)
__close (fd);
/* Use standard error as is. */
- perror_internal (stderr, s);
+ perror_internal (stderr, s, errnum);
}
else
{
/* We don't have to do any special hacks regarding the file
position. Since the stderr stream wasn't used so far we just
write to the descriptor. */
- perror_internal (fp, s);
+ perror_internal (fp, s, errnum);
/* Close the stream. */
fclose (fp);
((_IO_FILE *) stderr)->_offset = _IO_pos_BAD;
}
#else
- perror_internal (stderr, s);
+ perror_internal (stderr, s, errnum);
#endif
}