mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
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.
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user