* sysdeps/mach/hurd/i386/init-first.c (posixland_init): Set
authorRoland McGrath <roland@gnu.org>
Fri, 22 Nov 2002 04:23:05 +0000 (04:23 +0000)
committerRoland McGrath <roland@gnu.org>
Fri, 22 Nov 2002 04:23:05 +0000 (04:23 +0000)
__libc_multiple_libcs here.  Call __setfpucw.

* locale/localeinfo.h (struct locale_data): Revert last change.

ChangeLog
locale/localeinfo.h
sysdeps/mach/hurd/i386/init-first.c

index 3d4b35d..ca51809 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
+2002-11-21  Roland McGrath  <roland@frob.com>
+
+       * sysdeps/mach/hurd/i386/init-first.c (posixland_init): Set
+       __libc_multiple_libcs here.  Call __setfpucw.
+
 2002-11-21  Roland McGrath  <roland@redhat.com>
 
+       * locale/localeinfo.h (struct locale_data): Revert last change.
+
        * sysdeps/unix/sysv/linux/ia64/syscalls.list (s_exit_group): Add it.
        From Ian Wienand <ianw@gelato.unsw.edu.au>.
 
index a9fa1f4..5510e6f 100644 (file)
@@ -78,11 +78,7 @@ struct locale_data
   {
     const uint32_t *wstr;
     const char *string;
-    /* The values we store here are always uint32_t in fact.  But it's
-       safer for the union to use a type that matches pointers so that
-       casting one of the pointer values to uint32_t produces the right
-       value for big-endian 64-bit platforms.  */
-    uintptr_t word;
+    unsigned int word;         /* Note endian issues vs 64-bit pointers.  */
   }
   values __flexarr;    /* Items, usually pointers into `filedata'.  */
 };
index b3804cb..af79d87 100644 (file)
@@ -65,6 +65,16 @@ DEFINE_HOOK (_hurd_preinit_hook, (void));
 static void
 posixland_init (int argc, char **argv, char **envp)
 {
+  __libc_multiple_libcs = &_dl_starting_up && !_dl_starting_up;
+
+  /* Make sure we don't initialize twice.  */
+  if (!__libc_multiple_libcs)
+    {
+      /* Set the FPU control word to the proper default value.  */
+      __setfpucw (__fpu_control);
+    }
+
+  /* Save the command-line arguments.  */
   __libc_argc = argc;
   __libc_argv = argv;
   __environ = envp;