mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 00:10:10 +00:00
Mon Dec 18 13:40:37 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* stdio/fread.c: Don't increment __offset when it's -1. * elf/rtld.c (dl_main): Prepend tab to "statically linked". Exit 0 in that case. * misc/err.c (vwarnx, vwarn): Fix major brainos. * sysdeps/mach/hurd/dl-sysdep.c (mmap): Fix setting of inheritance.
This commit is contained in:
parent
8882961f38
commit
755f55b0db
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
Mon Dec 18 13:40:37 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||||
|
|
||||||
|
* stdio/fread.c: Don't increment __offset when it's -1.
|
||||||
|
|
||||||
|
* elf/rtld.c (dl_main): Prepend tab to "statically linked". Exit
|
||||||
|
0 in that case.
|
||||||
|
|
||||||
|
* misc/err.c (vwarnx, vwarn): Fix major brainos.
|
||||||
|
|
||||||
|
* sysdeps/mach/hurd/dl-sysdep.c (mmap): Fix setting of
|
||||||
|
inheritance.
|
||||||
|
|
||||||
Sun Dec 17 15:56:35 1995 Miles Bader <miles@gnu.ai.mit.edu>
|
Sun Dec 17 15:56:35 1995 Miles Bader <miles@gnu.ai.mit.edu>
|
||||||
|
|
||||||
* misc/getpass.c (getpass): Don't barf if getline returns a null BUF.
|
* misc/getpass.c (getpass): Don't barf if getline returns a null BUF.
|
||||||
|
28
elf/rtld.c
28
elf/rtld.c
@ -301,22 +301,18 @@ of this helper program; chances are you did not intend to run this program.\n",
|
|||||||
after relocation. */
|
after relocation. */
|
||||||
|
|
||||||
if (! _dl_loaded->l_info[DT_NEEDED])
|
if (! _dl_loaded->l_info[DT_NEEDED])
|
||||||
{
|
_dl_sysdep_message ("\t", "statically linked\n", NULL);
|
||||||
_dl_sysdep_message (_dl_loaded->l_name, ": statically linked\n",
|
else
|
||||||
NULL);
|
for (l = _dl_loaded->l_next; l; l = l->l_next)
|
||||||
_exit (1);
|
{
|
||||||
}
|
char buf[20], *bp;
|
||||||
|
buf[sizeof buf - 1] = '\0';
|
||||||
for (l = _dl_loaded->l_next; l; l = l->l_next)
|
bp = _itoa (l->l_addr, &buf[sizeof buf - 1], 16, 0);
|
||||||
{
|
while (&buf[sizeof buf - 1] - bp < sizeof l->l_addr * 2)
|
||||||
char buf[20], *bp;
|
*--bp = '0';
|
||||||
buf[sizeof buf - 1] = '\0';
|
_dl_sysdep_message ("\t", l->l_libname, " => ", l->l_name,
|
||||||
bp = _itoa (l->l_addr, &buf[sizeof buf - 1], 16, 0);
|
" (0x", bp, ")\n", NULL);
|
||||||
while (&buf[sizeof buf - 1] - bp < sizeof l->l_addr * 2)
|
}
|
||||||
*--bp = '0';
|
|
||||||
_dl_sysdep_message ("\t", l->l_libname, " => ", l->l_name,
|
|
||||||
" (0x", bp, ")\n", NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
_exit (0);
|
_exit (0);
|
||||||
}
|
}
|
||||||
|
26
misc/err.c
26
misc/err.c
@ -20,6 +20,8 @@ Cambridge, MA 02139, USA. */
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
extern char *__progname;
|
extern char *__progname;
|
||||||
@ -32,21 +34,31 @@ extern char *__progname;
|
|||||||
va_end (ap); \
|
va_end (ap); \
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
vwarn (const char *format, __gnuc_va_list ap)
|
|
||||||
{
|
|
||||||
fprintf (stderr, format, ap);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
vwarnx (const char *format, __gnuc_va_list ap)
|
vwarnx (const char *format, __gnuc_va_list ap)
|
||||||
{
|
{
|
||||||
if (__progname)
|
if (__progname)
|
||||||
fprintf (stderr, "%s: ", __progname);
|
fprintf (stderr, "%s: ", __progname);
|
||||||
fprintf (stderr, format, ap);
|
if (format)
|
||||||
|
vfprintf (stderr, format, ap);
|
||||||
putc ('\n', stderr);
|
putc ('\n', stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
vwarn (const char *format, __gnuc_va_list ap)
|
||||||
|
{
|
||||||
|
int error = errno;
|
||||||
|
|
||||||
|
if (__progname)
|
||||||
|
fprintf (stderr, "%s: ", __progname);
|
||||||
|
if (format)
|
||||||
|
{
|
||||||
|
vfprintf (stderr, format, ap);
|
||||||
|
fputs (": ", stderr);
|
||||||
|
}
|
||||||
|
fprintf (stderr, "%s\n", strerror (error));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
warn (const char *format, ...)
|
warn (const char *format, ...)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -95,8 +95,11 @@ DEFUN(fread, (p, size, nmemb, stream),
|
|||||||
if (count > 0)
|
if (count > 0)
|
||||||
{
|
{
|
||||||
to_read -= count;
|
to_read -= count;
|
||||||
stream->__offset += count;
|
if (stream->__offset != -1)
|
||||||
stream->__target += count;
|
{
|
||||||
|
stream->__offset += count;
|
||||||
|
stream->__target += count;
|
||||||
|
}
|
||||||
ptr += count;
|
ptr += count;
|
||||||
}
|
}
|
||||||
else if (count == 0)
|
else if (count == 0)
|
||||||
|
@ -517,7 +517,7 @@ mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
|
|||||||
(mach_port_t) fd, (vm_offset_t) offset,
|
(mach_port_t) fd, (vm_offset_t) offset,
|
||||||
flags & (MAP_COPY|MAP_PRIVATE),
|
flags & (MAP_COPY|MAP_PRIVATE),
|
||||||
vmprot, VM_PROT_ALL,
|
vmprot, VM_PROT_ALL,
|
||||||
(flags & MAP_INHERIT) ? VM_INHERIT_COPY : VM_INHERIT_NONE);
|
(flags & MAP_SHARED) ? VM_INHERIT_SHARE : VM_INHERIT_COPY);
|
||||||
return err ? (caddr_t) __hurd_fail (err) : (caddr_t) mapaddr;
|
return err ? (caddr_t) __hurd_fail (err) : (caddr_t) mapaddr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user