From bf2cc5fb028fecf8d6b1adffd952f7402f685923 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 24 Nov 2002 23:56:47 +0000 Subject: * sysdeps/posix/readv.c: Include , use __set_errno macro. * sysdeps/posix/writev.c: Likewise. From Momchil Velikov . * elf/dl-error.c [! _LIBC_REENTRANT]: Use a static variable instead of calling *GL(dl_error_catch_tsd) for a thread-local location. * elf/rtld.c (startup_error_tsd): Conditionalize on [_LIBC_REENTRANT]. (dl_main): Same for GL(dl_error_catch_tsd) initialization. * elf/dl-tsd.c: Conditionalize contents on [_LIBC_REENTRANT]. * libio/iofflush.c: Add libc_hidden_def. * libio/iofwrite.c: Likewise. * sysdeps/generic/sigtimedwait.c: Likewise. * sysdeps/generic/sigwaitinfo.c: Likewise. * sysdeps/posix/sigwait.c: Likewise. Reported by Momchil Velikov . * inet/inet_lnaof.c (inet_lnaof): Change return type to in_addr_t to match declaration. * inet/inet_netof.c (inet_netof): Likewise. * inet/inet_mkadr.c (inet_makeaddr): Likewise for argument types. Reported by Momchil Velikov . --- elf/rtld.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'elf/rtld.c') diff --git a/elf/rtld.c b/elf/rtld.c index 3a64ca74f7..350cc700b5 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -560,6 +560,7 @@ match_version (const char *string, struct link_map *map) return 0; } +#ifdef _LIBC_REENTRANT /* _dl_error_catch_tsd points to this for the single-threaded case. It's reset by the thread library for multithreaded programs. */ static void ** __attribute__ ((const)) @@ -568,6 +569,7 @@ startup_error_tsd (void) static void *data; return &data; } +#endif static const char *library_path; /* The library search path. */ static const char *preloadlist; /* The list preloaded objects. */ @@ -598,8 +600,10 @@ dl_main (const ElfW(Phdr) *phdr, void *tcbp; #endif +#ifdef _LIBC_REENTRANT /* Explicit initialization since the reloc would just be more work. */ GL(dl_error_catch_tsd) = &startup_error_tsd; +#endif /* Process the environment variable which control the behaviour. */ process_envvars (&mode); -- cgit v1.2.3