Change argument type from int to intptr_t.
* locale/global-locale.c (__libc_tsd_LOCALE_data): Conditionalize the
initializer on [! _HURD_THREADVAR_H] (bad kludge).
* sysdeps/mach/hurd/i386/init-first.c (init): Initialize
_HURD_THREADVAR_LOCALE slot to &_nl_global_locale.
* hurd/hurdsig.c (_hurdsig_init): Likewise. Zero other slots.
2002-08-29 Roland McGrath <roland@redhat.com>
+ * sysdeps/mach/hurd/i386/init-first.c (_hurd_stack_setup: doinit):
+ Change argument type from int to intptr_t.
+
+ * locale/global-locale.c (__libc_tsd_LOCALE_data): Conditionalize the
+ initializer on [! _HURD_THREADVAR_H] (bad kludge).
+ * sysdeps/mach/hurd/i386/init-first.c (init): Initialize
+ _HURD_THREADVAR_LOCALE slot to &_nl_global_locale.
+ * hurd/hurdsig.c (_hurdsig_init): Likewise. Zero other slots.
+
* sysdeps/mach/_strerror.c (__strerror_r): Add libc_hidden_def.
* sysdeps/mach/hurd/pwrite64.c: No libc_hidden_def (__libc_pwrite64).
-/* Copyright (C) 1991,92,93,94,95,96,97,98,99,2000,01
+/* Copyright (C) 1991,92,93,94,95,96,97,98,99,2000,01,2002
Free Software Foundation, Inc.
This file is part of the GNU C Library.
#include "hurdfault.h"
#include "hurdmalloc.h" /* XXX */
+#include "../locale/localeinfo.h"
const char *_hurdsig_getenv (const char *);
malloc (__hurd_threadvar_max * sizeof (unsigned long int));
if (__hurd_sigthread_variables == NULL)
__libc_fatal ("hurd: Can't allocate threadvars for signal thread\n");
+ memset (__hurd_sigthread_variables, 0,
+ __hurd_threadvar_max * sizeof (unsigned long int));
+ __hurd_sigthread_variables[_HURD_THREADVAR_LOCALE]
+ = (unsigned long int) &_nl_global_locale;
/* Reinitialize the MiG support routines so they will use a per-thread
variable for the cached reply port. */
#else
__libc_tsd_define (, LOCALE)
/* This is a bad kludge presuming the variable name used by the macros.
- Using typeof makes sure to barf if we do not match the macro definition. */
+ Using typeof makes sure to barf if we do not match the macro definition.
+ This ifndef is a further bad kludge for Hurd, where there is an explicit
+ initialization. */
+# ifndef _HURD_THREADVAR_H
__typeof (__libc_tsd_LOCALE_data) __libc_tsd_LOCALE_data = &_nl_global_locale;
+# endif
#endif
#include <set-hooks.h>
#include "hurdstartup.h"
#include "hurdmalloc.h" /* XXX */
+#include "../locale/localeinfo.h"
extern void __mach_init (void);
extern void __libc_init (int, char **, char **);
for malloc et al, or so we can use malloc below for the real
threadvars array. */
memset (threadvars, 0, sizeof threadvars);
+ threadvars[_HURD_THREADVAR_LOCALE] = (unsigned long int) &_nl_global_locale;
__hurd_threadvar_stack_offset = (unsigned long int) threadvars;
/* Since the cthreads initialization code uses malloc, and the
void
_hurd_stack_setup (volatile int argc, ...)
{
- void doinit (int *data)
+ void doinit (intptr_t *data)
{
/* This function gets called with the argument data at TOS. */
void doinit1 (volatile int argc, ...)