2000-11-30 Roland McGrath <roland@frob.com>
authorRoland McGrath <roland@gnu.org>
Thu, 30 Nov 2000 23:29:35 +0000 (23:29 +0000)
committerRoland McGrath <roland@gnu.org>
Thu, 30 Nov 2000 23:29:35 +0000 (23:29 +0000)
* sysdeps/mach/hurd/defs.c (init_stdio): Put this on __libc_subinit
rather than _hurd_fd_subinit, so it happens after it's safe to use
libc facilities like malloc.

sysdeps/mach/hurd/defs.c

index 5953c45..f60e50b 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of global stdio data structures.
-   Copyright (C) 1991, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1991,92,93,94,95,97,2000 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
@@ -66,7 +66,10 @@ init_stdio (void)
 
   (void) &init_stdio;          /* Avoid "defined but not used" warning.  */
 }
-text_set_element (_hurd_fd_subinit, init_stdio);
+/* This initializer will be run along with other vanilla libc initializers
+   in a normal Posixoid environment.  The earlier Hurd-speciifc initializer
+   phases cannot use normal facilities like malloc (which stdio uses).  */
+text_set_element (__libc_subinit, init_stdio);
 \f
 /* This function MUST be in this file!
    This is because we want _cleanup to go into the __libc_atexit set