mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 10:50:07 +00:00
* 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.
This commit is contained in:
parent
7a9ce79a3b
commit
cc13edc8d4
@ -1,5 +1,14 @@
|
|||||||
2002-08-29 Roland McGrath <roland@redhat.com>
|
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/_strerror.c (__strerror_r): Add libc_hidden_def.
|
||||||
|
|
||||||
* sysdeps/mach/hurd/pwrite64.c: No libc_hidden_def (__libc_pwrite64).
|
* sysdeps/mach/hurd/pwrite64.c: No libc_hidden_def (__libc_pwrite64).
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* 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.
|
Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
#include "hurdfault.h"
|
#include "hurdfault.h"
|
||||||
#include "hurdmalloc.h" /* XXX */
|
#include "hurdmalloc.h" /* XXX */
|
||||||
|
#include "../locale/localeinfo.h"
|
||||||
|
|
||||||
const char *_hurdsig_getenv (const char *);
|
const char *_hurdsig_getenv (const char *);
|
||||||
|
|
||||||
@ -1265,6 +1266,10 @@ _hurdsig_init (const int *intarray, size_t intarraysize)
|
|||||||
malloc (__hurd_threadvar_max * sizeof (unsigned long int));
|
malloc (__hurd_threadvar_max * sizeof (unsigned long int));
|
||||||
if (__hurd_sigthread_variables == NULL)
|
if (__hurd_sigthread_variables == NULL)
|
||||||
__libc_fatal ("hurd: Can't allocate threadvars for signal thread\n");
|
__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
|
/* Reinitialize the MiG support routines so they will use a per-thread
|
||||||
variable for the cached reply port. */
|
variable for the cached reply port. */
|
||||||
|
@ -58,6 +58,10 @@ __thread void *__libc_tsd_LOCALE = &_nl_global_locale;
|
|||||||
#else
|
#else
|
||||||
__libc_tsd_define (, LOCALE)
|
__libc_tsd_define (, LOCALE)
|
||||||
/* This is a bad kludge presuming the variable name used by the macros.
|
/* 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;
|
__typeof (__libc_tsd_LOCALE_data) __libc_tsd_LOCALE_data = &_nl_global_locale;
|
||||||
# endif
|
# endif
|
||||||
|
#endif
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include <set-hooks.h>
|
#include <set-hooks.h>
|
||||||
#include "hurdstartup.h"
|
#include "hurdstartup.h"
|
||||||
#include "hurdmalloc.h" /* XXX */
|
#include "hurdmalloc.h" /* XXX */
|
||||||
|
#include "../locale/localeinfo.h"
|
||||||
|
|
||||||
extern void __mach_init (void);
|
extern void __mach_init (void);
|
||||||
extern void __libc_init (int, char **, char **);
|
extern void __libc_init (int, char **, char **);
|
||||||
@ -145,6 +146,7 @@ init (int *data)
|
|||||||
for malloc et al, or so we can use malloc below for the real
|
for malloc et al, or so we can use malloc below for the real
|
||||||
threadvars array. */
|
threadvars array. */
|
||||||
memset (threadvars, 0, sizeof threadvars);
|
memset (threadvars, 0, sizeof threadvars);
|
||||||
|
threadvars[_HURD_THREADVAR_LOCALE] = (unsigned long int) &_nl_global_locale;
|
||||||
__hurd_threadvar_stack_offset = (unsigned long int) threadvars;
|
__hurd_threadvar_stack_offset = (unsigned long int) threadvars;
|
||||||
|
|
||||||
/* Since the cthreads initialization code uses malloc, and the
|
/* Since the cthreads initialization code uses malloc, and the
|
||||||
@ -319,7 +321,7 @@ strong_alias (posixland_init, __libc_init_first);
|
|||||||
void
|
void
|
||||||
_hurd_stack_setup (volatile int argc, ...)
|
_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. */
|
/* This function gets called with the argument data at TOS. */
|
||||||
void doinit1 (volatile int argc, ...)
|
void doinit1 (volatile int argc, ...)
|
||||||
|
Loading…
Reference in New Issue
Block a user