From eaad82e00522075b805621309775131e27388791 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 1 Sep 2001 06:10:36 +0000 Subject: Update. 2001-08-31 Richard Henderson * 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 * stdio-common/perror.c (perror): Save errno early, pass it down to perror_internal. (perror_internal): Add errnum argument. 2001-08-31 Jakub Jelinek * sysdeps/alpha/dl-machine.h (elf_machine_rela): Remove unused code. Don't add old memory content for R_ALPHA_REFQUAD. --- stdio-common/perror.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'stdio-common') diff --git a/stdio-common/perror.c b/stdio-common/perror.c index a1995e9..077eed5 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 } -- cgit v1.1