mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 20:40:05 +00:00
Mon Aug 7 14:04:36 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* sysdeps/generic/sysd-stdio.c (__stdio_reopen): Return failure when __stdio_open fails with a code other than ENFILE or EMFILE. * csu/initfini.c (SECTION): New macro, different definitions for #ifdef HAVE_ELF and not. (_init, _fini): Use that macro. * config.make.in (have-initfini): New variable, set by configure. * conf/portability.h (NEED_INETADDR, NEED_INETATON): New macros.
This commit is contained in:
parent
5e98d83c10
commit
99a9e88e55
10
ChangeLog
10
ChangeLog
@ -1,3 +1,8 @@
|
||||
Mon Aug 7 14:04:36 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
|
||||
* sysdeps/generic/sysd-stdio.c (__stdio_reopen): Return failure
|
||||
when __stdio_open fails with a code other than ENFILE or EMFILE.
|
||||
|
||||
Fri Aug 4 16:01:59 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
|
||||
* Makefile (headers): Added gnu-versions.h.
|
||||
@ -30,6 +35,9 @@ Wed Jul 26 02:00:29 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
[$(have-initfini)=yes]: Test this rather than $(elf) for crtstuff.
|
||||
[start-installed-name-rule]: If this is defined, elide rule for
|
||||
$(objpfx)$(start-installed-name).
|
||||
* csu/initfini.c (SECTION): New macro, different definitions for
|
||||
#ifdef HAVE_ELF and not.
|
||||
(_init, _fini): Use that macro.
|
||||
* sysdeps/unix/sysv/sco3.2.4/Makefile [$(subdir)=csu]
|
||||
(start-installed-rule, start-installed-name-rule): New variables;
|
||||
specify crt1.o, created by our own rule.
|
||||
@ -42,6 +50,7 @@ Wed Jul 26 02:00:29 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
* munch-tmpl.c [HAVE_INITFINI]: Call _init and atexit (_fini) in
|
||||
this case rather than #ifdef HAVE_ELF.
|
||||
* config.h.in (HAVE_INITFINI): New macro.
|
||||
* config.make.in (have-initfini): New variable, set by configure.
|
||||
|
||||
* stdio/vfscanf.c (conv_error): Simplify expression to avoid
|
||||
"value computed is not used" warning.
|
||||
@ -78,6 +87,7 @@ Wed Jul 26 02:00:29 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
* inet/netdb.h: Incorporated from BIND 4.9.3-BETA24 release.
|
||||
[__GNU_LIBRARY__]: Include <rpc/netdb.h> instead of repeating
|
||||
its declarations (and doing so only #ifdef sun!).
|
||||
* conf/portability.h (NEED_INETADDR, NEED_INETATON): New macros.
|
||||
|
||||
* posix/sys/types.h [__USE_BSD] (__BIT_TYPES_DEFINED__): New macro.
|
||||
[__USE_BSD] [__GNUC__] (int64_t, u_int64_t, register_t): New typedefs.
|
||||
|
@ -18,3 +18,9 @@
|
||||
#ifdef sun. */
|
||||
|
||||
#undef sun
|
||||
|
||||
/* The source code copied from BIND for inet_addr/inet_aton
|
||||
doesn't actually define the functions without these macros. */
|
||||
|
||||
#define NEED_INETADDR
|
||||
#define NEED_INETATON
|
||||
|
@ -14,11 +14,13 @@ config-sysdirs = @sysnames@
|
||||
|
||||
config-defines = @DEFS@
|
||||
|
||||
elf = @elf@
|
||||
weak-symbols = @weak@
|
||||
have-initfini = @libc_cv_have_initfini@
|
||||
|
||||
# Configuration options.
|
||||
gnu-as = @gnu_as@
|
||||
gnu-ld = @gnu_ld@
|
||||
elf = @elf@
|
||||
weak-symbols = @weak@
|
||||
build-shared = @shared@
|
||||
build-profile = @profile@
|
||||
build-omitfp = @omitfp@
|
||||
|
@ -34,12 +34,22 @@ Cambridge, MA 02139, USA. */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#ifdef HAVE_ELF
|
||||
/* These declarations make the functions go in the right sections when
|
||||
we define them below. GCC syntax does not allow the attribute
|
||||
specifications to be in the function definitions themselves. */
|
||||
void _init (void) __attribute__ ((section (".init")));
|
||||
void _fini (void) __attribute__ ((section (".fini")));
|
||||
|
||||
#define SECTION(x) /* Put nothing extra before the defn. */
|
||||
|
||||
#else
|
||||
/* Some non-ELF systems support .init and .fini sections,
|
||||
but the __attribute__ syntax only works for ELF. */
|
||||
#define SECTION(x) asm (".section " x);
|
||||
#endif
|
||||
|
||||
/* End the here document containing the initial common code.
|
||||
Then move the output file crtcommon.tmp to crti.s-new and crtn.s-new. */
|
||||
asm ("\nEOF_common\n\
|
||||
@ -48,10 +58,10 @@ cp -f crti.s-new crtn.s-new");
|
||||
|
||||
/* Append the .init prologue to crti.s-new. */
|
||||
asm ("cat >> crti.s-new <<\\EOF.crti.init");
|
||||
SECTION (".init")
|
||||
void
|
||||
_init (void)
|
||||
{
|
||||
(void) &_init; /* Don't optimize out the function! */
|
||||
/* End the here document containing the .init prologue code.
|
||||
Then fetch the .section directive just written and append that
|
||||
to crtn.s-new, followed by the function epilogue. */
|
||||
@ -67,10 +77,10 @@ asm ("\nEOF.crtn.init\
|
||||
\n\
|
||||
cat >> crti.s-new <<\\EOF.crti.fini");
|
||||
|
||||
SECTION (".fini")
|
||||
void
|
||||
_fini (void)
|
||||
{
|
||||
(void) &_fini; /* Don't optimize out the function! */
|
||||
/* End the here document containing the .fini prologue code.
|
||||
Then fetch the .section directive just written and append that
|
||||
to crtn.s-new, followed by the function epilogue. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -174,6 +174,8 @@ DEFUN(__stdio_reopen, (filename, m, cookieptr),
|
||||
if (__stdio_open (filename, m, &newcookie))
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (newcookie != *cookieptr)
|
||||
|
Loading…
Reference in New Issue
Block a user