(__libc_dlopen_mode): Renamed from __libc_dlopen. Add
[kopensolaris-gnu/glibc.git] / ChangeLog
1 2002-11-11  Randolf Chung  <tausq@debian.org>
2
3         * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h [__USE_FILE_OFFSET64]
4         (F_GETLK, F_SETLK, F_SETLKW): Define to F_*64 versions.
5         * sysdeps/unix/sysv/linux/hppa/fcntl.c: New file.
6
7         * sysdeps/hppa/fpu/libm-test-ulps: New file (generated).
8
9         * sysdeps/hppa/Makefile (CFLAGS-rtld.c): New variable.
10         Set -mdisable-fpregs for this file.
11
12 2002-11-11  Carlos O'Donell  <carlos@baldric.uwo.ca>
13
14         * sysdeps/unix/sysv/linux/configure.in:
15         Make 2.4.19 minimum linux kernel for hppa, and add unwind symbols
16         from gcc-3.0 era for backwards compatibility.
17         * sysdeps/unix/sysv/linux/configure: Regenerate.
18
19         * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h:
20         Define mcontext_t as a sigcontext.
21
22 2002-11-18  Roland McGrath  <roland@redhat.com>
23
24         * dlfcn/dlerror.c (fini): New function, __attribute__ ((destructor)).
25         Free memory in `last_result' if it was used.
26
27         * resolv/nss_dns/dns-network.c (getanswer_r): In BYNAME case, search
28         all aliases for one that matches the "<dotted-quad>.IN-ADDR.ARPA" form.
29         Do the parsing inline instead of copying strings and calling
30         inet_network, and properly skip all alias names not matching the form.
31
32         * manual/pattern.texi (Variable Substitution): Fix # and ## examples.
33
34 2002-11-17  Ulrich Drepper  <drepper@redhat.com>
35
36         * manual/pattern.texi (Wordexp Example): Fix sample code.
37
38         * sysdeps/unix/sysv/linux/i386/clone.S: Initialize word in the
39         childs stack which will be loaded into the %esi register.
40
41 2002-11-14  Paul Eggert  <eggert@twinsun.com>
42
43         * resolv/nss_dns/dns-network.c (getanswer_r): Check for buffer
44         overflow when skipping the question part and when unpacking aliases.
45
46 2002-11-15  Roland McGrath  <roland@redhat.com>
47
48         * math/Makefile (libm-calls): Remove s_copysign, s_isinf, s_isnan,
49         s_finite, s_modf, s_scalbn, s_frexp, m_ldexp, s_signbit.
50         Instead add $(calls:s_%=m_%) to get m_* versions of them all.
51
52 2002-11-15  Jakub Jelinek  <jakub@redhat.com>
53
54         * sysdeps/i386/dl-machine.h (elf_machine_rela): Handle R_386_COPY.
55         * sysdeps/arm/dl-machine.h (elf_machine_rela): Handle R_ARM_COPY.
56
57 2002-11-15  Roland McGrath  <roland@redhat.com>
58
59         * math/Makefile (libm-calls): Change s_ldexp to m_ldexp.
60         * Makerules ($(+sysdir_pfx)sysd-rules): Emit pattern rules for m_%.[Sc]
61         from sysdeps/.../s_%.[Sc] with commands $(+make-include-of-dep).
62         (+make-include-of-dep): New canned sequence.
63
64         * stdlib/canonicalize.c (__realpath): Check for malloc failure.
65         From Dmitry V. Levin <ldv@altlinux.org>.
66
67 2002-11-14  Roland McGrath  <roland@redhat.com>
68
69         * sysdeps/generic/errno.c (__libc_errno): Remove alias.
70         * inet/herrno.c (__libc_h_errno): Likewise.
71         * resolv/res_libc.c (__libc_res): Likewise.
72         [USE___THREAD]: Use this in place of [USE_TLS && HAVE___THREAD].
73         (__res_state) [! USE___THREAD]: Don't define as weak.
74         * csu/Versions: Revert last change.
75         * resolv/Versions: Revert last change.
76
77         * Makerules ($(common-objpfx)%.make): New pattern rule.
78         * tls.make.c: New file.
79         * Makefile (distribute): Add it.
80
81         * sysdeps/generic/errno.c [! USE___THREAD]
82         [HAVE_ELF && SHARED && DO_VERSIONING] (errno, _errno): Declare these
83         with compat_symbol so they are not link-time visible.
84         [! USE___THREAD] (__libc_errno): New alias for errno.
85         * csu/Versions [!(USE_TLS && HAVE___THREAD)] (libc: GLIBC_PRIVATE):
86         Add __libc_errno here.
87         * inet/herrno.c [USE___THREAD]: Use this conditional
88         in place of [USE_TLS && HAVE___THREAD].
89         [! USE___THREAD] [HAVE_ELF && SHARED && DO_VERSIONING]
90         (h_errno, _h_errno): Declare these with compat_symbol so they are not
91         link-time visible.
92         [! USE___THREAD] (__libc_h_errno): New alias for h_errno.
93         * resolv/res_libc.c [! USE___THREAD]
94         [HAVE_ELF && SHARED && DO_VERSIONING] (_res): Likewise.
95         (_res): Use __attribute__ ((section (".bss"))) so we can have an alias.
96         (__libc_res): Define as alias for _res.
97         * resolv/Versions [!(USE_TLS && HAVE___THREAD)] (libc: GLIBC_PRIVATE):
98         Add __libc_h_errno and __libc_res here.
99
100 2002-11-14  Jakub Jelinek  <jakub@redhat.com>
101
102         * csu/Versions (errno): Move STT_TLS symbol to GLIBC_PRIVATE for now.
103         * resolv/Versions (h_errno, _res): Likewise.
104
105 2002-11-14  Roland McGrath  <roland@redhat.com>
106
107         * Makerules (%.dynsym): Remove $(objpfx) from target and dep.
108         (%.symlist): Likewise.
109
110 2002-11-13  Roland McGrath  <roland@redhat.com>
111
112         * scripts/abilist.awk: New file.
113         * Makefile (distribute): Add it.
114         * Makerules ($(objpfx)%.dynsym, $(objpfx)%.symlist): New rules.
115         (tests): Depend on .symlist file for each $(install-lib.so-versioned).
116         [$(subdir) = elf] (tests): Depend on libc.symlist.
117         (generated, common-generated): Add those files.
118
119         * aclocal.m4 (LIBC_PROG_BINUTILS): Check for objdump, set OBJDUMP.
120         * configure: Regenerated.
121         * config.make.in (OBJDUMP): New variable, substituted by configure.
122
123         * malloc/mcheck.c (struct hdr): New members `block' and `magic2'.
124         (mallochook, reallochook): Set them up.
125         (checkhdr): Check HDR->magic2 value.
126         (freehook): Reset HDR->magic2.
127         (memalignhook): New static function.
128         (old_memalign_hook): New static variable.
129         (mcheck, reallochook): Set __memalign_hook to memalignhook.
130
131         * sysdeps/generic/dl-tls.c (_dl_allocate_tls_storage): Zero the space
132         for the new TCB.
133
134 2002-11-13  Andreas Jaeger  <aj@suse.de>
135
136         * sysdeps/unix/sysv/linux/x86_64/sigaction.c: Check for visibility
137         attribute.
138         * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
139
140 2002-11-11  Paul Eggert  <eggert@twinsun.com>
141
142         * manual/crypt.texi (Cryptographic Functions): Mention that
143         the MD5 one-way algorithm is compatible with BSD's.
144
145 2002-11-11  Isamu Hasegawa  <isamu@yamato.ibm.com>
146
147         * posix/regex_internal.c (re_string_skip_chars): Also return the last
148         wide character.
149         (re_string_reconstruct): Calculate the context by itself when the
150         offset points out of the valid range.
151         (re_string_context_at): Use wide character when MB_CUR_MAX > 1.
152         * posix/regex_internal.h (WIDE_NEWLINE_CHAR): New macro.
153         (IS_WIDE_WORD_CHAR): New macro.
154         (IS_WIDE_NEWLINE): New macro.
155
156 2002-11-12  Andreas Jaeger  <aj@suse.de>
157
158         * sysdeps/x86_64/strchr.S: Don't use one register for two
159         purposes, this fixes a bug noticed by test-strchr.c.
160
161         * sysdeps/x86_64/strcat.S: Fix algorithm to align source pointer
162         correctly.
163
164 2002-11-12  Roland McGrath  <roland@redhat.com>
165
166         * libio/libioP.h [_LIBC && !SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)]
167         (_G_IO_NO_BACKWARD_COMPAT): Define it.
168
169         * sysdeps/ia64/dl-fptr.c [_LIBC_REENTRANT]: Include <ia64intrin.h>
170         instead of <pt-machine.h>.
171         [_LIBC_REENTRANT] (lock, unlock): Use __sync_lock_* macros instead of
172         testandset.
173         From Ian Wienand <ianw@gelato.unsw.edu.au>.
174
175 2002-11-10  Roland McGrath  <roland@redhat.com>
176
177         * libio/bug-wfflush.c (do_test): Call rewind instead of fsetpos.
178         Call fputs instead of fwprintf (simpler to follow in debugger).
179
180         * crypt/md5-crypt.c: Doc fix.
181
182         * sysdeps/unix/make-syscalls.sh: Insert $(make-target-directory) at
183         the beginning of generated target commands.
184
185         * csu/Makefile ($(objpfx)crti.o, $(objpfx)crtn.o): Add explicit
186         dependencies for these in case implicit rule search skipped the
187         nonexistent source directory.
188         * sysdeps/gnu/Makefile ($(objpfx)errlist.d): Give this rule all the
189         files with $(object-suffixes) as targets too.
190         * Makerules [no_deps && objpfx] (before-compile): Add $(objpfx).
191         and a target for it using $(make-target-directory).
192
193         * Rules (before-compile): Add $(common-objpfx)bits/stdio-lim.h.
194
195 2002-11-10  Roland McGrath  <roland@frob.com>
196
197         * sysdeps/unix/sysv/linux/bits/pthreadtypes.h: Moved to ...
198         * sysdeps/generic/bits/pthreadtypes.h: ... here.
199
200         * sysdeps/mach/hurd/fcntl.c (__libc_fcntl): Treat a struct flock with
201         l_start == 0 and l_len == 1 as we do l_len == 0.
202
203 2002-11-10  Ulrich Drepper  <drepper@redhat.com>
204
205         * po/da.po: Update from translation team.
206
207 2002-11-10  Roland McGrath  <roland@redhat.com>
208
209         * config.make.in (includedir): New variable, substituted by configure.
210         Reported missing by Jocelyn Fournier <joc@presence-pc.com>.
211         * Makeconfig (includedir): Use $(prefix), not $(exec_prefix).
212
213 2002-11-10  Andreas Jaeger  <aj@suse.de>
214
215         * sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h (enum): Add
216         REG_OLDMASK and REG_CR2 to synch with kernel header.
217         (NGREG): Increase.
218
219         * nss/getXXent.c (GETFUNC_NAME): Use union type to avoid strict
220         aliasing problem.
221         * nss/getXXbyYY_r.c (INTERNAL): Likewise.
222         * nss/getnssent_r.c (__nss_getent_r): Likewise.
223         (__nss_setent): Likewise.
224         (__nss_getent_r): Likewise.
225         * inet/getnetgrent_r.c (innetgr): Likewise.
226         (__internal_setnetgrent_reuse): Likewise.
227         (internal_getnetgrent_r): Likewise.
228         * inet/ether_hton.c (ether_hostton): Likewise.
229         * inet/ether_ntoh.c (ether_ntohost): Likewise.
230         * sunrpc/netname.c (netname2user): Likewise.
231         * sunrpc/publickey.c (getpublickey): Likewise.
232         (getsecretkey): Likewise.
233
234 2002-11-09  Marcus Brinkmann  <marcus@gnu.org>
235
236         * sysdeps/mach/hurd/i386/ioperm.c (ioperm): Correct off by one
237         error in range calculation.
238
239 2002-10-09  Jakub Jelinek  <jakub@redhat.com>
240
241         * string/test-strspn.c (do_test): Ensure zero termination.
242         * string/test-strpbrk.c (do_test): Likewise.
243         * string/test-strncmp.c (stupid_strncmp): Use strnlen, not strlen.
244         * string/test-strncpy.c (stupid_strncpy): Likewise.
245         * string/test-stpncpy.c (stupid_stpncpy): Likewise.
246
247 2002-10-08  Roland McGrath  <roland@redhat.com>
248
249         * string/test-string.h (test_init): Fill BUF1 and BUF2 with
250         nonzero characters.
251
252 2002-09-22  H.J. Lu  <hjl@gnu.org>
253
254         * sysdeps/unix/sysv/linux/mmap64.c (MMAP2_PAGE_SHIFT): Renamed
255         from PAGE_SHIFT.  Define if not defined.  Check MMAP2_PAGE_SHIFT
256         only if __NR_mmap2 is defined.
257
258         * sysdeps/unix/sysv/linux/powerpc/mmap64.c: Moved to ...
259         * sysdeps/unix/sysv/linux/mmap64.c: ... here.
260         * sysdeps/unix/sysv/linux/hppa/mmap64.c: File removed.
261         * sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c: FIle removed,
262
263 2002-11-08  Jakub Jelinek  <jakub@redhat.com>
264
265         * posix/bug-regex13.c (tests): Add new test.
266
267         * string/test-strchr.c (stupid_strchr): New function.
268         (do_random_tests): Make sure the string is zero terminated.
269         * string/test-strpbrk.c (stupid_strpbrk): New function.
270         (do_random_tests): Make sure the string is zero terminated.
271         * string/test-strcmp.c (stupid_strcmp): New function.
272         (do_random_tests): Make sure the strings are zero terminated.
273         * string/test-strspn.c (stupid_strspn): New function.
274         (simple_strspn): Rename rej argument to acc.
275         (do_random_tests): Make sure the string is zero terminated.
276         * string/test-strcspn.c (stupid_strcspn): New function.
277         * string/test-strncpy.c (stupid_strncpy): New function.
278         * string/test-stpncpy.c (stupid_stpncpy): New function.
279         * string/test-strncmp.c (stupid_strncmp): New function.
280         (do_random_tests): Make sure the strings are zero terminated.
281         * string/test-string.h (impl_t): Change test into long.
282         (IMPL): Add __attribute__((aligned (sizeof (void *)))).
283
284 2002-11-08  Roland McGrath  <roland@redhat.com>
285
286         * sysdeps/ia64/elf/configure.in: Add TLS check.
287         From Ian Wienand <ianw@cse.unsw.edu.au>.
288         * sysdeps/ia64/elf/configure: Regenerated.
289
290 2002-11-07  Roland McGrath  <roland@redhat.com>
291
292         * libio/fileops.c (_IO_new_file_overflow): Use INTUSE(_IO_do_write) in
293         place of _IO_new_do_write.
294         [_LIBC] (_IO_do_write): Define as macro for _IO_new_do_write and
295         #undef before versioned_symbol use.
296
297 2002-11-07  Richard Henderson  <rth@redhat.com>
298
299         * configure.in (ASM_ALPHA_NG_SYMBOL_PREFIX): Remove test.
300         * configure: Regenerated.
301         * config.h.in (ASM_ALPHA_NG_SYMBOL_PREFIX): Remove #undef.
302         * sysdeps/alpha/dl-machine.h (TRAMPOLINE_TEMPLATE): Use !samegp.
303         (RTLD_START): Likewise.  Access _dl_skip_args, _rtld_local, and
304         _dl_fini via gp-relative relocations.
305         * sysdeps/alpha/fpu/e_sqrt.c: Use !samegp.
306
307         * elf/tls-macros.h: Add alpha versions.
308         * sysdeps/alpha/dl-machine.h (elf_machine_rela): Handle TLS relocs.
309         * sysdeps/unix/alpha/sysdep.S: Support USE___THREAD.
310         * sysdeps/unix/alpha/sysdep.h: Likewise.  Add SYSCALL_ERROR_HANDLER.
311         * sysdeps/unix/sysv/linux/alpha/brk.S: Use it.
312         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
313         * sysdeps/unix/sysv/linux/alpha/getitimer.S: Likewise.
314         * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise.
315         * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise.
316         * sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Likewise.
317         * sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise.
318         * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Likewise.
319         * sysdeps/unix/sysv/linux/alpha/select.S: Likewise.
320         * sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise.
321         * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise.
322         * sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Likewise.
323         * sysdeps/unix/sysv/linux/alpha/syscall.S: Likewise.
324         * sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise.
325         * sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise.
326
327         * sysdeps/unix/sysv/linux/alpha/sysdep.h: Re-include protect.
328         Kill argument registers across the inline syscall.
329
330         * sysdeps/unix/sysv/linux/alpha/clone.S: Add user_tid and tls args.
331
332         * linuxthreads/sysdeps/alpha/tls.h: New file.
333         * sysdeps/alpha/dl-tls.h: New file.
334
335 2002-10-29  David Mosberger  <davidm@hpl.hp.com>
336
337         * sysdeps/ia64/elf/initfini.c [HAVE_INITFINI_ARRAY]
338         (gmon_initializer): New function.
339         (.init prologue): If HAVE_INITFINI_ARRAY is true, don't call
340         __gmon_start__ here.  Call it from gmon_initializer() instead.
341
342 2002-03-12  H.J. Lu  <hjl@gnu.org>
343
344         * elf/Makefile [$(have-initfini-array) = yes] (tests): Add tst-array1,
345         tst-array2, and tst-array3.
346         [$(have-initfini-array) = yes] (tests-static): Add tst-array3.
347         [$(have-initfini-array) = yes] (modules-names): Add tst-array2dep.
348         ($(objpfx)tst-array1.out): New target.
349         ($(objpfx)tst-array2): Likewise.
350         ($(objpfx)tst-array2.out): Likewise.
351         ($(objpfx)tst-array3.out): Likewise.
352         * elf/tst-array1.c: New file.
353         * elf/tst-array1.exp: Likewise.
354         * elf/tst-array2.c: Likewise.
355         * elf/tst-array2dep.c: Likewise.
356         * elf/tst-array2.exp: Likewise.
357         * elf/tst-array3.c: Likewise.
358
359 2002-10-28  David Mosberger  <davidm@hpl.hp.com>
360
361         * elf/dl-fini.c (_dl_fini): Invoke fini_array in _reverse_ order.
362         Don't add L->l_addr to array entry values.
363
364 2002-11-07  Jakub Jelinek  <jakub@redhat.com>
365
366         * string/test-string.h: New file.
367         * string/test-strlen.c: New file.
368         * string/test-string.h: New file.
369         * string/test-strcmp.c: New file.
370         * string/test-strchr.c: New file.
371         * string/test-strrchr.c: New file.
372         * string/test-strcpy.c: New file.
373         * string/test-stpcpy.c: New file.
374         * string/test-strncpy.c: New file.
375         * string/test-stpncpy.c: New file.
376         * string/test-strpbrk.c: New file.
377         * string/test-strcspn.c: New file.
378         * string/test-strspn.c: New file.
379         * string/test-strcat.c: New file.
380         * string/test-strncmp.c: New file.
381         * string/test-memchr.c: New file.
382         * string/test-memcmp.c: New file.
383         * string/test-memset.c: New file.
384         * string/test-memcpy.c: New file.
385         * string/test-mempcpy.c: New file.
386         * string/test-memmove.c: New file.
387         * string/Makefile (strop-tests): New variable.
388         (tests): Add strop-tests.
389         (distribute): Add test-string.h.
390
391 2002-11-06  Ulrich Drepper  <drepper@redhat.com>
392
393         * posix/regcomp.c: Use tabs instead of spaces.
394         * posix/regexec.c: Likewise.
395         * posix/regex_internal.h: Likewise.
396
397         * posix/regcomp.c (re_compile_fastmap_iter): Use __wcrtomb not wctomb.
398
399 2002-11-06  Jakub Jelinek  <jakub@redhat.com>
400
401         * posix/regcomp.c (re_compile_pattern): Don't set regs_allocated
402         here.
403         (regcomp): Don't set can_be_null here.
404         (re_comp): Clear whole re_comp_buf with the exception of fastmap.
405         (re_compile_internal): Clear can_be_null, set regs_allocated.
406
407         * posix/regcomp.c (re_set_fastmap): New function.
408         (re_compile_fastmap_iter): Use it.  Remove redundant type ==
409         COMPLEX_BRACKET check.
410         * posix/regexec.c (re_search_internal): Optimize searching with
411         fastmap.  Call re_string_reconstruct even if match_first is
412         smaller than raw_mbs_idx.
413
414 2002-11-06  Isamu Hasegawa  <isamu@yamato.ibm.com>
415
416         * posix/regcomp (free_dfa_content): Use free_state.
417         * posix/regex_internal.c (re_string_realloc_buffers): Don't edit
418         pointers in case that realloc failed.
419         (re_node_set_merge): Likewise.
420         (register_state): Likewise.
421         (create_newstate_common): Invoke memory release functions in case of
422         error conditions.
423         (create_ci_newstate): Likewise.
424         (create_cd_newstate): Likewise.
425         (free_state): New function.
426         * posix/regexec.c (re_search_internal): Invoke memory release
427         functions in case of error conditions.
428         (sift_states_backward): Likewise.
429         (merge_state_array): Likewise.
430         (add_epsilon_src_nodes): Likewise.
431         (sub_epsilon_src_nodes): Likewise.
432         (search_subexp): Likewise.
433         (sift_states_bkref): Likewise.
434         (transit_state_sb): Likewise.
435         (transit_state_mb): Likewise.
436         (transit_state_bkref_loop): Likewise.
437         (group_nodes_into_DFAstates): Likewise.
438         (push_fail_stack): Don't edit pointers in case that realloc failed.
439         (extend_buffers): Likewise.
440         (match_ctx_add_entry): Likewise.
441
442 2002-11-06  Roland McGrath  <roland@redhat.com>
443
444         * sysdeps/unix/sysv/linux/mips/configure.in: File removed.
445         * sysdeps/unix/sysv/linux/mips/configure: Likewise.
446
447         * configure.in: Add checks on as and ld for binutils 2.13 or later.
448         * configure: Regenerated.
449
450 2002-11-06  Ulrich Drepper  <drepper@redhat.com>
451
452         * posix/regcomp.c (regcomp): __re_compile_fastmap can never fail.
453         If re_compile_internal failed free fastmap buffer.
454         (free_dfa_content): Broken out of regfree function.  Frees all dfa
455         related data.
456         (regfree): Add free_dfa_content.
457         (re_compile_internal): If any of the called functions fails free
458         all dfa related memory.
459
460 2002-11-05  Ulrich Drepper  <drepper@redhat.com>
461
462         * sysdeps/unix/sysv/linux/sys/sysctl.h: Add ugly hacks to prevent
463         warnings from the kernel headers.
464
465 2002-11-05  Roland McGrath  <roland@redhat.com>
466
467         * sysdeps/unix/mips/sysdep.h [! __PIC__] (PSEUDO): Add nop after jump.
468         From Johannes Stezenbach <js@convergence.de>.
469
470         * sysdeps/unix/sysv/linux/mips/Versions (libc: GLIBC_2.0): Change
471         #errlist-compat magic comment to give 123 as size.
472         (libc: GLIBC_2.1): Remove this set, moving #errlist-compat magic to ...
473         (libc: GLIBC_2.2): ... here.
474         (libc: GLIBC_2.3): Likewise.
475
476 2002-11-05  Ulrich Drepper  <drepper@redhat.com>
477
478         * elf/dl-fini.c (_dl_fini): Correct the increment of l_opencount
479         which happens at the beginning so that we can unload modules in
480         __libc_freeres.
481
482 2002-11-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
483
484         * sysdeps/sh/bits/setjmp.h (JB_SIZE): Define only
485         under [__USE_MISC || _ASM].
486
487         * elf/elf.h: Remove the obsolete SH TLS relocations.
488
489 2002-11-05  Ulrich Drepper  <drepper@redhat.com>
490
491         * posix/regcomp.c (regcomp): Initialize preg->can_be_null to zero.
492
493 2002-11-05  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
494
495         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Handle
496         __NR_pread64 and __NR_pwrite64.
497         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise.
498         * sysdeps/unix/sysv/linux/powerpc/pread.c: Remove __NR_pread64
499         and __NR_pwrite64.
500         Revert change to use INLINE_SYSCALL.
501         * sysdeps/unix/sysv/linux/powerpc/pread64.c: Likewise.
502         * sysdeps/unix/sysv/linux/powerpc/pwrite.c: Likewise.
503         * sysdeps/unix/sysv/linux/powerpc/pwrite64.c: Likewise.
504         * sysdeps/unix/sysv/linux/powerpc/ftruncate64.c: Revert change to use
505         INLINE_SYSCALL.
506         * sysdeps/unix/sysv/linux/powerpc/truncate64.c: Likewise.
507
508         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (INLINE_SYSCALL):
509         Update clobber list and add a comment about the syscall ABI.
510
511         * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list (s_pread64,
512         s_pwrite64, s_ftruncate, s_truncate): Re-add.
513
514 2002-11-05  Jakub Jelinek  <jakub@redhat.com>
515
516         * iconv/gconv_dl.c (free_mem): Clear loaded.
517         * locale/loadarchive.c (_nl_archive_subfreeres): Call locale_data's
518         cleanup if any.
519
520 2002-11-05  Ulrich Drepper  <drepper@redhat.com>
521
522         * sysdeps/unix/sysv/linux/fexecve.c: Include <stdio.h>.
523
524         * libio/ioseekoff.c: Remove INTDEF.  Define _IO_seekoff_unlocked.  Same
525         as old code without locking.  _IO_seekoff calls this function after
526         locking the stream.
527         * libio/ioseekpos.c: Likewise for _IO_seekpos.
528         * libio/libioP.h: Replace _IO_seekoff_internal and _IO_seekpos_internal
529         prototypes with _IO_seekoff_unlocked and _IO_seekpos_unlocked
530         prototypes.
531         * libio/iolibio.h (_IO_fseek): Call _IO_seekoff_unlocked instead
532         of _IO_seekoff_internal.
533         (_IO_rewind): Likewise.
534         * libio/ioftell.c: Likewise.
535         * libio/ftello.c: Likewise.
536         * libio/ftello64.c: Likewise.
537         * libio/iofgetpos.c: Likewise.
538         * libio/iofgetpos64.c: Likewise.
539         * libio/oldiofgetpos.c: Likewise.
540         * libio/oldiofgetpos64.c: Likewise.
541         * libio/iofsetpos.c: Call _IO_seekpos_unlocked instead of
542         _IO_seekpos_internal.
543         * libio/iofsetpos64.c: Likewise.
544         * libio/oldiofsetpos.c: Likewise.
545         * libio/oldiofsetpos64.c: Likewise.
546
547 2002-11-04  Roland McGrath  <roland@redhat.com>
548
549         * sysdeps/unix/sysv/linux/powerpc/chown.c: Use INLINE_SYSCALL macro.
550         * sysdeps/unix/sysv/linux/powerpc/ftruncate64.c: Likewise.
551         * sysdeps/unix/sysv/linux/powerpc/ioctl.c: Likewise.
552         * sysdeps/unix/sysv/linux/powerpc/pread.c: Likewise.
553         * sysdeps/unix/sysv/linux/powerpc/pread64.c: Likewise.
554         * sysdeps/unix/sysv/linux/powerpc/pwrite.c: Likewise.
555         * sysdeps/unix/sysv/linux/powerpc/pwrite64.c: Likewise.
556         * sysdeps/unix/sysv/linux/powerpc/tcgetattr.c: Likewise.
557         * sysdeps/unix/sysv/linux/powerpc/tcsetattr.c: Likewise.
558         * sysdeps/unix/sysv/linux/powerpc/truncate64.c: Likewise.
559         * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list (s_ioctl,
560         s_chown, s_ftruncate64, s_mmap2, s_pread64, s_pwrite64, s_truncate64,
561         sys_fstat, sys_lstat, sys_mknod, sys_readv, sys_stat, sys_writev):
562         Remove these, no longer used.
563
564 2002-11-04  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
565
566         * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list (s_ipc,
567         s_llseek, s_readahead, s_execve, s_fcntl, s_fcntl64, s_fstat64,
568         s_getcwd, s_getdents, s_getdents64, s_getpmsg, s_getpriority,
569         s_getrlimit, s_lstat64, s_poll, s_ptrace, s_putpmsg, s_reboot,
570         s_setrlimit, s_sigaction, s_sigpending, s_sigprocmask, s_sigsuspend,
571         s_stat64, s_sysctl, s_ugetrlimit, s_ustat, s_vfork): Remove now unused
572         syscall stubs.
573
574         * sysdeps/unix/sysv/linux/pwrite.c: Fix typo.
575         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.
576         * sysdeps/unix/sysv/linux/powerpc/pread.c: Handle both __NR_pread64
577         and __NR_pread.
578         * sysdeps/unix/sysv/linux/powerpc/pread64.c: Likewise.
579         * sysdeps/unix/sysv/linux/powerpc/pwrite.c: Handle both __NR_pwrite64
580         and __NR_pwrite.
581         * sysdeps/unix/sysv/linux/powerpc/pwrite64.c: Likewise.
582
583 2002-11-03  Roland McGrath  <roland@redhat.com>
584
585         * sysdeps/generic/ldsodefs.h (struct rtld_global): New member
586         `_dl_tls_static_used'.
587         * sysdeps/generic/libc-tls.c (_dl_tls_static_used): New variable.
588         (__libc_setup_tls): Initialize it.  Let the initial value of
589         _dl_tls_static_size indicate some surplus space in the computed value.
590         * elf/dl-open.c (_dl_tls_static_size): New variable.
591         * sysdeps/generic/dl-tls.c (_dl_determine_tlsoffset): Initialize
592         _dl_tls_static_used.  Add some surplus space into _dl_tls_static_size.
593         * elf/dl-reloc.c [USE_TLS] (allocate_static_tls): New function.
594         (CHECK_STATIC_TLS): Use it.
595         * elf/dl-close.c (_dl_close): Adjust _dl_tls_static_used when the
596         closed objects occupied a trailing contiguous chunk of static TLS area.
597
598 2002-10-18  Bruno Haible  <bruno@clisp.org>
599
600         * charmaps/ISO_5428: Use Greek characters introduced in Unicode 3.0.
601
602 2002-11-04  Ulrich Drepper  <drepper@redhat.com>
603
604         * libio/wfileops.c (_IO_wfile_seekoff): Don't modify _offset and
605         _wide_data->_IO_read_end if adjustment can be made in the current
606         buffer.
607
608         * sysdeps/unix/sysv/linux/fexecve.c: New file.
609
610         * libio/bug-wfflush.c (do_test): Using fseek is not allowed when
611         wide oriented streams are used.
612
613         * nss/getXXent_r.c (ENDFUNC_NAME): Don't do anything if the
614         service hasn't been used [PR libc/4744].
615
616         * include/features.h: Use __STDC_VERSION__ not __STDC_VERSION.
617         Reported by Miloslav Trmac <mitr@volny.cz> [PR libc/4766].
618
619         * manual/examples/dir.c: Don't include <stddef.h>.
620         * manual/examples/select.c: Include <errno.h> for TEMP_FAILURE_RETRY.
621         Reported by Frédéric Delanoy <delanoy_f@yahoo.com>.
622
623 2002-11-02  H.J. Lu  <hjl@gnu.org>
624
625         * stdio-common/reg-printf.c: Include <stddef.h>.
626
627 2002-11-03  Ulrich Drepper  <drepper@redhat.com>
628
629         * sysdeps/generic/libc-tls.c: Define _dl_tls_static_used.
630
631         * po/ca.po: Update from translation team.
632         * po/es.po: Likewise.
633
634         * sysdeps/generic/segfault.c (catch_segfault): If HAVE_PROC_SELF
635         is defined write out memory map.
636         * sysdeps/unix/sysv/linux/segfault.c: New file.
637
638 2002-11-02  Roland McGrath  <roland@redhat.com>
639
640         * sysdeps/unix/sysv/linux/getdents.c (__GETDENTS): Use union type for
641         pointers that can alias.
642         Reported by Daniel Jacobowitz <drow@mvista.com>.
643
644         * sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h: New file.
645
646 2002-11-02  Roland McGrath  <roland@redhat.com>
647
648         * manual/filesys.texi (Reading/Closing Directory): Rewrite readdir_r
649         description to be clearer and to say that *RESULT is set to ENTRY.
650
651 2002-10-30  Jakub Jelinek  <jakub@redhat.com>
652
653         * posix/regexec.c (build_trtable): Alloca or malloc dests_node and
654         dests_ch arrays together.  Alloca or malloc dest_states,
655         dest_states_word and dest_states_nl arrays together.  Free memory on
656         error exit.
657
658 2002-10-29  Daniel Jacobowitz  <drow@mvista.com>
659
660         * crypt/crypt_util.c (__init_des_r): Initialize current_salt
661         and current_saltbits.
662
663 2002-11-02  Roland McGrath  <roland@redhat.com>
664
665         * stdio-common/reg-printf.c: Include <stdlib.h>.
666
667 2002-11-02  H.J. Lu  <hjl@gnu.org>
668
669         * sysdeps/unix/sysv/linux/mips/syscalls.list (s_execve): Set
670         caller to EXTRA instead of execve.
671
672 2002-11-01  Roland McGrath  <roland@redhat.com>
673
674         * sysdeps/generic/errno-loc.c [! USE___THREAD]: Use this conditional
675         in place of [!(USE_TLS && HAVE___THREAD)].
676         (__errno_location) [! USE___THREAD]: Define as strong, not weak.
677
678 2002-10-31  Roger Sayle  <roger@eyesopen.com>
679
680         * sysdeps/i386/soft-fp/sfp-machine.h (_FP_NANFRAC_Q, _FP_NANSIGN_Q):
681         New macros.
682         * sysdeps/x86_64/soft-fp/sfp-machine.h: Likewise.
683
684         * soft-fp/soft-fp.h: Allow sfp-machine.h to define FP_RND_NEAREST
685         without defining FP_ROUNDMODE.
686
687 2002-10-29  Jakub Jelinek  <jakub@redhat.com>
688
689         * sysdeps/gnu/siglist.c (PTR_SIZE_STR): Remove.
690         (__old_sys_siglist, __old_sys_sigabbrev): Use strong_alias and
691         declare_symbol.
692         * sysdeps/mach/hurd/siglist.h (OLD_SIGLIST_SIZE_STR): Remove.
693         (OLD_SIGLIST_SIZE): Define.
694         * sysdeps/unix/sysv/linux/siglist.h (OLD_SIGLIST_SIZE_STR): Remove.
695         (OLD_SIGLIST_SIZE): Define.
696         * sysdeps/unix/sysv/linux/arm/siglist.c: Remove.
697
698 2002-11-01  Jakub Jelinek  <jakub@redhat.com>
699
700         * sysdeps/ia64/strncpy.S: Fix recovery code.
701
702 2002-10-30  Jakub Jelinek  <jakub@redhat.com>
703
704         * include/libc-symbols.h (__libc_freeres_fn_section, libc_freeres_fn):
705         New macros.
706         * elf/dl-close.c (free_mem): Use libc_freeres_fn macro, remove
707         text_set_element.
708         * elf/dl-libc.c (free_mem): Likewise.
709         * iconv/gconv_conf.c (free_mem): Likewise.
710         * iconv/gconv_db.c (free_mem): Likewise.
711         * iconv/gconv_dl.c (free_mem): Likewise.
712         * iconv/gconv_cache.c (free_mem): Likewise.
713         * intl/finddomain.c (free_mem): Likewise.
714         * intl/dcigettext.c (free_mem): Likewise.
715         * locale/setlocale.c (free_mem): Likewise.
716         * misc/fstab.c (fstab_free): Likewise.
717         * nss/nsswitch.c (free_mem): Likewise.
718         * posix/regcomp.c (free_mem): Likewise.
719         * resolv/gai_misc.c (free_res): Likewise.
720         * stdlib/fmtmsg.c (free_mem): Likewise.
721         * sunrpc/clnt_perr.c (free_mem): Likewise.
722         * sysdeps/generic/setenv.c (free_mem): Likewise.
723         * sysdeps/unix/sysv/linux/shm_open.c (freeit): Likewise.
724         * sysdeps/pthread/aio_misc.c (free_res): Likewise.
725         * time/tzset.c (free_mem): Likewise.
726         * malloc/mtrace.c (release_libc_mem): Add __libc_freeres_fn_section.
727         * locale/loadarchive.c (_nl_archive_subfreeres): Likewise.
728         * malloc/set-freeres.c (__libc_freeres): Likewise.
729
730         * login/getutent.c: Include stdlib.h instead of stddef.h.
731         (buffer): Change into pointer to utmp, add libc_freeres_ptr.
732         (__getutent): Allocate buffer the first time it is run.
733         * login/getutid.c: Include stdlib.h instead of stddef.h.
734         (buffer): Change into pointer to utmp, add libc_freeres_ptr.
735         (__getutid): Allocate buffer the first time it is run.
736         * login/getutline.c: Include stdlib.h instead of stddef.h.
737         (buffer): Change into pointer to utmp, add libc_freeres_ptr.
738         (__getutline): Allocate buffer the first time it is run.
739         * malloc/mtrace.c (malloc_trace_buffer): Change into char *.
740         (mtrace): Allocate malloc_trace_buffer.
741         * resolv/nsap_addr.c (inet_nsap_ntoa): Decrease size of tmpbuf.
742         * resolv/ns_print.c (ns_sprintrrf): Decrease size of t.
743         * string/strerror.c: Include libintl.h and errno.h.
744         (buf): New variable.
745         (strerror): Only allocate buffer if actually needed (unknown error).
746         * time/tzfile.c (transitions): Add libc_freeres_ptr.
747         (freeres): Remove.
748
749 2002-10-25  Jakub Jelinek  <jakub@redhat.com>
750
751         * include/libc-symbols.h (libc_freeres_ptr): New macro.
752         * malloc/set-freeres.c (__libc_freeres_ptrs): Define using
753         symbol_set_define.
754         (__libc_freeres): Free all pointers in that section.
755         * Makerules (build-shlib): Add $(LDSEDCMD-$(@F:lib%.so=%).so) to sed
756         commands when creating .lds script.
757         (LDSEDCMD-c.so): New variable.
758         * inet/rcmd.c (ahostbuf): Change into char *.  Add libc_freeres_ptr.
759         (rcmd_af): Use strdup to allocate ahostbuf.
760         * inet/rexec.c (ahostbuf): Change into char *.  Add libc_freeres_ptr.
761         (rexec_af): Use strdup to allocate ahostbuf.
762         * stdio-common/reg-printf.c (printf_funcs): Remove.
763         (__printf_arginfo_table): Change into printf_arginfo_function **.
764         Add libc_freeres_ptr.
765         (__register_printf_function): Allocate __printf_arginfo_table
766         and __printf_function_table the first time it is called.
767         * stdio-common/printf-parse.h (__printf_arginfo_table): Change into
768         printf_arginfo_function **.
769         (parse_one_spec): Add __builtin_expect.
770         * grp/fgetgrent.c (buffer): Add libc_freeres_ptr.
771         (free_mem): Remove.
772         * inet/getnetgrent.c (buffer): Add libc_freeres_ptr.
773         (free_mem): Remove.
774         * intl/localealias.c (libc_freeres_ptr): Define if !_LIBC.
775         (string_space, map): Add libc_freeres_ptr.
776         (free_mem): Remove.
777         * misc/efgcvt.c (FCVT_BUFPTR): Add libc_freeres_ptr.
778         (free_mem): Remove.
779         * misc/mntent.c (getmntent_buffer): Add libc_freeres_ptr.
780         (free_mem): Remove.
781         * crypt/md5-crypt.c (libc_freeres_ptr): Define if !_LIBC.
782         (buffer): Add libc_freeres_ptr.
783         (free_mem): Remove for _LIBC.
784         * nss/getXXbyYY.c (buffer): Add libc_freeres_ptr.
785         (free_mem): Remove.
786         * nss/getXXent.c (buffer): Add libc_freeres_ptr.
787         (free_mem): Remove.
788         * pwd/fgetpwent.c (buffer): Add libc_freeres_ptr.
789         (free_mem): Remove.
790         * resolv/res_hconf.c (ifaddrs): Add libc_freeres_ptr.
791         (free_mem): Remove.
792         * shadow/fgetspent.c (buffer): Add libc_freeres_ptr.
793         (free_mem): Remove.
794         * sysdeps/posix/ttyname.c (getttyname_name): Add libc_freeres_ptr.
795         (free_mem): Remove.
796         * sysdeps/unix/sysv/linux/getsysstats.c (mount_proc): Add
797         libc_freeres_ptr.
798         (free_mem): Remove.
799         * sysdeps/unix/sysv/linux/ttyname.c (getttyname_name, ttyname_buf): Add
800         libc_freeres_ptr.
801         (free_mem): Remove.
802
803 2002-10-30  Jakub Jelinek  <jakub@redhat.com>
804
805         * malloc/obstack.c [_LIBC] (obstack_free): Change into strong_alias
806         instead of duplicating the whole function in libc.
807
808 2002-10-31  Roland McGrath  <roland@redhat.com>
809
810         * sysdeps/i386/bits/byteswap.h [__GNUC__ < 2] (__bswap_32):
811         Renamed from __bswap_16 (typo fix).  Reported by <dens@stl.sarov.ru>.
812
813 2002-10-30  Jakub Jelinek  <jakub@redhat.com>
814
815         * sysdeps/unix/sysv/linux/Makefile (syscall-%.h): Add -D for each
816         32bit-predefine when creating .new32 list and -U for each
817         32bit-predefine when creating .new64 list.
818         * sysdeps/unix/sysv/linux/x86_64/Makefile (32bit-predefine): New.
819
820 2002-10-29  Andreas Schwab  <schwab@suse.de>
821
822         * sysdeps/generic/allocrtsig.c: Include <testrtsig.h>, not
823         "testrtsig.h".  Reported by Daniel Jacobowitz <dan@debian.org>.
824
825 2002-10-25  Roland McGrath  <roland@redhat.com>
826
827         * sysdeps/unix/sysv/linux/configure.in: Fix typo in last change.
828         * sysdeps/unix/sysv/linux/configure: Regenerated.
829
830         * sysdeps/generic/ldsodefs.h: Remove [! SHARED] conditional from
831         _dl_starting_up decl.
832
833 2002-10-20  H.J. Lu  <hjl@gnu.org>
834
835         * sysdeps/unix/sysv/linux/configure.in: Don't check
836         /lib/modules/`uname -r`/build/include for kernel headers if
837         cross compiling.
838         * sysdeps/unix/sysv/linux/configure: Regenerated.
839
840 2002-10-25  Roland McGrath  <roland@redhat.com>
841
842         * math/math.h (M_LOG2El): Correct the value.
843         From Stephen L Moshier <steve@moshier.net>.
844
845         * sysdeps/unix/sysv/linux/init-first.c (init): Remove [! SHARED]
846         conditional from __libc_multiple_libcs access.  Remove kludge for weak
847         symbol access with old compilers we no longer support.
848         * sysdeps/unix/sysv/aix/init-first.c (init): Likewise.
849         * sysdeps/generic/libc-start.c (__libc_start_main): Likewise.
850
851 2002-10-25  Roland McGrath  <roland@redhat.com>
852
853         * sysdeps/posix/sigvec.c [SA_RESETHAND]: Disable wrapper hacks and
854         implement SV_RESETHAND by translating it to SA_RESETHAND.
855
856 2002-10-23  Alexandre Oliva  <aoliva@redhat.com>
857
858         * elf/dl-reloc.c (_dl_reloc_bad_use): Print the full 32-bit relocation
859         type on ELF64 platforms.
860
861 2002-10-24  Ulrich Drepper  <drepper@redhat.com>
862
863         * elf/elf.h (R_X86_64_GOTTPOFF): Renamed from r_x86_64_GOTTPOFF.
864
865         * elf/elf.h: Define ELF_NOTE_OS_FREEBSD and NT_TASKSTRUCT.
866
867 2002-10-24  Jakub Jelinek  <jakub@redhat.com>
868
869         * elf/dl-misc.c: Include <sysdep.h>.
870         (_dl_debug_vdprintf): Only take dl_load_lock if not _dl_starting_up.
871
872         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (INTERNAL_SYSCALL,
873         INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): New macros.
874         (INLINE_SYSCALL): Use that.
875         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (INTERNAL_SYSCALL,
876         INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): New macros.
877         (INLINE_SYSCALL): Use that.
878         * sysdeps/unix/sysv/linux/x86_64/sysdep.h (INTERNAL_SYSCALL,
879         INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): New macros.
880         (INLINE_SYSCALL): Use that.
881         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Include
882         dl-sysdep.h.
883         (SYSCALL_ERROR_HANDLER): Define RTLD_PRIVATE_ERRNO variant.
884         (__INTERNAL_SYSCALL_STRING): Define.
885         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Include
886         dl-sysdep.h.
887         (SYSCALL_ERROR_HANDLER): Define RTLD_PRIVATE_ERRNO variant.
888         (__INTERNAL_SYSCALL_STRING): Define.
889         * sysdeps/unix/sysv/linux/sparc/sysdep.h (INLINE_SYSCALL): Pass
890         __SYSCALL_STRING to inline_syscall*.
891         (INTERNAL_SYSCALL, INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO):
892         New macros.
893         (inline_syscall0, inline_syscall1, inline_syscall2, inline_syscall3,
894         inline_syscall4, inline_syscall5, inline_syscall6): Add string
895         argument.
896
897 2002-10-24  Roland McGrath  <roland@redhat.com>
898
899         * sysdeps/generic/ldsodefs.h (_dl_starting_up): Declare it here.
900         * sysdeps/unix/sysv/linux/init-first.c: Not here.
901         * sysdeps/powerpc/elf/libc-start.c: Or here.
902         * sysdeps/unix/sysv/aix/libc-start.c: Or here.
903         * sysdeps/unix/sysv/aix/start-libc.c: Or here.
904         * sysdeps/unix/sysv/aix/init-first.c: Or here.
905         * sysdeps/generic/libc-start.c: Or here.
906         * sysdeps/unix/sysv/linux/init-first.c (init): Protect _dl_starting_up
907         access with [! SHARED].
908         * sysdeps/unix/sysv/aix/init-first.c (init): Likewise.
909
910         * libio/bug-wfflush.c: New file.
911         * libio/Makefile (tests): Add bug-wfflush.
912
913 2002-10-23  Roland McGrath  <roland@redhat.com>
914
915         * stdio-common/tst-fphex.c: New file.
916         * stdio-common/Makefile (tests): Add tst-fphex.
917         * sysdeps/generic/printf_fphex.c (__printf_fphex): Fix initialization
918         of WNUMEND.  Fix counting of decimal point in WIDTH.  Print '0' pad
919         chars always before the value digits.
920         Reported by James Antill <james.antill@redhat.com>.
921
922 2002-10-24  Jakub Jelinek  <jakub@redhat.com>
923
924         * posix/regcomp.c (re_comp): Call __regfree on re_comp_buf.
925         (free_mem): New function.
926         * posix/Makefile (tests): Add bug-regex14.  Add bug-regex14-mem
927         if not cross compiling.
928         (generated): Add bug-regex14-mem and bug-regex14.mtrace.
929         (bug-regex14-ENV): Set.
930         (bug-regex14-mem): New target.
931         * posix/bug-regex14.c: New file.
932
933 2002-10-23  Roland McGrath  <roland@redhat.com>
934
935         * elf/Makefile ($(objpfx)librtld.map): Use temporary file for output
936         target, so we don't touch it when the link fails.
937
938         * libio/ftello.c (ftello): Use _IO_off64_t for type of POS.
939         Check for the result overflowing off_t and fail with EOVERFLOW.
940         * libio/ioftell.c (_IO_ftell): Likewise.
941         * libio/iofgetpos.c (_IO_new_fgetpos): Likewise.
942
943         * login/logwtmp.c (logwtmp): If sizeof ut_tv != sizeof struct timeval,
944         use a temporary timeval on the stack for gettimeofday and copy it.
945         * login/logout.c (logout): Likewise.
946         Reported by Steven Munroe <sjmunroe@us.ibm.com>.
947
948         * sysdeps/unix/sysv/linux/bits/statfs.h (struct statfs):
949         Use __SWORD_TYPE instead of int for member types.
950         (struct statfs64): Likewise.
951         * sysdeps/unix/sysv/linux/alpha/bits/statfs.h: New file.
952         * sysdeps/unix/sysv/linux/s390/bits/statfs.h: New file.
953         * sysdeps/unix/sysv/linux/ia64/bits/statfs.h: File removed.
954         * sysdeps/unix/sysv/linux/sparc/bits/statfs.h: File removed.
955         * sysdeps/unix/sysv/linux/x86_64/bits/statfs.h: File removed.
956
957         * sysdeps/unix/sysv/linux/sparc/bits/statvfs.h: Moved to ...
958         * sysdeps/unix/sysv/linux/bits/statvfs.h: ... here.
959         (ST_NODIRATIME): Restore fixed value of 2048.
960         * sysdeps/unix/sysv/linux/alpha/bits/statvfs.h: File removed.
961         * sysdeps/unix/sysv/linux/ia64/bits/statvfs.h: File removed.
962
963         Rearranged <bits/types.h> definitions to reduce duplication.
964         * sysdeps/generic/bits/types.h: Rewritten, using macros from
965         <bits/wordsize.h> and new header <bits/typesizes.h>.
966         * posix/Makefile (headers): Add bits/typesizes.h here.
967         * sysdeps/generic/bits/typesizes.h: New file.
968         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
969         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
970         * sysdeps/mach/hurd/bits/typesizes.h: New file.
971         * sysdeps/unix/sysv/linux/alpha/bits/types.h: File removed.
972         * sysdeps/unix/sysv/linux/bits/types.h: File removed.
973         * sysdeps/unix/sysv/linux/ia64/bits/types.h: File removed.
974         * sysdeps/unix/sysv/linux/mips/bits/types.h: File removed.
975         * sysdeps/unix/sysv/linux/s390/bits/types.h: File removed.
976         * sysdeps/unix/sysv/linux/sparc/bits/types.h: File removed.
977         * sysdeps/unix/sysv/linux/x86_64/bits/types.h: File removed.
978         * posix/sys/types.h [__USE_POSIX199506 || __USE_UNIX98]: Include
979         <bits/pthreadtypes.h> here, not in <bits/types.h>.
980         * signal/signal.h: Likewise.
981
982         * streams/stropts.h: Include <bits/xtitypes.h>.
983         * streams/Makefile (headers): Add bits/xtitypes.h here.
984         * sysdeps/generic/bits/xtitypes.h: New file.
985         * sysdeps/s390/bits/xtitypes.h: New file.
986         * sysdeps/ia64/bits/xtitypes.h: New file.
987         * sysdeps/x86_64/bits/xtitypes.h: New file.
988
989         * sysvipc/Makefile (headers): Add bits/ipctypes.h here.
990         * sysdeps/generic/bits/ipctypes.h: New file.
991         * sysdeps/mips/bits/ipctypes.h: New file.
992         * sysdeps/gnu/bits/shm.h: Include <bits/ipctypes.h>.
993         * sysdeps/gnu/bits/msq.h: Likewise.
994         * sysvipc/sys/ipc.h: Likewise.
995
996 2002-10-22  Ulrich Drepper  <drepper@redhat.com>
997
998         * elf/dl-load.c (struct filebuf): For buf element to have the
999         alignment of ElfXX_Ehdr since this is what will be stored in it.
1000
1001 2002-10-22  Jakub Jelinek  <jakub@redhat.com>
1002
1003         * locale/programs/locarchive.c (add_alias): Change locrec_offset arg
1004         into pointer to locrec_offset.
1005         (add_locale_to_archive): Adjust callers.  Free normalized_name right
1006         before returning, not immediately after add_locale, pass it to
1007         add_alias if not NULL instead of name.  Rename second normalized_name
1008         occurence to nnormalized_codeset_name.
1009
1010         * locale/programs/locarchive.c (enlarge_archive): Make sure
1011         string_size is always a multiple of 4.
1012         Reported by Andreas Schwab <schwab@suse.de>.
1013
1014 2002-10-21  Andreas Schwab  <schwab@suse.de>
1015
1016         * sysdeps/unix/sysv/linux/ia64/syscalls.list (s_execve): Set
1017         caller to EXTRA instead of execve, since the latter has a
1018         higher-priority implementation in linuxthreads.
1019
1020 2002-10-21  Roland McGrath  <roland@redhat.com>
1021
1022         * sysdeps/generic/libc-tls.c (__libc_setup_tls): Initialize the static
1023         slotinfo list's len member to the proper size, not just 1.
1024         Initialize static_map.l_tls_initimage.
1025
1026         * elf/dl-open.c (dl_open_worker): Fix loop searching for
1027         dtv_slotinfo_list element containing new modules' l_tls_modid.
1028
1029         * elf/tst-tls9.c, elf/tst-tls9-static.c: New files.
1030         * elf/tst-tlsmod5.c, elf/tst-tlsmod6.c: New files.
1031         * elf/Makefile (tests): Add tst-tls9.
1032         (tests-static): Add tst-tls9-static.
1033         (tst-tls9-static-ENV): New variable.
1034         ($(objpfx)tst-tls9-static, $(objpfx)tst-tls9-static.out): New targets.
1035
1036         * elf/dl-close.c (remove_slotinfo): Remove an assert; the number of
1037         modids used by partially loaded modules being closed can't be known.
1038
1039 2002-10-21  Isamu Hasegawa  <isamu@yamato.ibm.com>
1040
1041         * posix/Makefile: Add a test case for the bug reported by Aharon
1042         Robbins <arnold@skeeve.com>.
1043         * posix/bug-regex13.c: New file.
1044         * posix/regcomp.c (peek_token_bracket): Skip the byte already read.
1045
1046 2002-10-21  Ulrich Drepper  <drepper@redhat.com>
1047
1048         * csu/gmon-start.c: Pretty printing.
1049
1050 2002-10-19  Art Haas  <ahaas@neosoft.com>
1051
1052         * configure.in: Replace AC_CONFIG_HEADER with AC_CONFIG_HEADERS,
1053         add AC_HELP_STRING to all AC_ARG_WITH and AC_ARG_ENABLE macros,
1054         add autoconf quotes to the AC_CONFIG_AUX_DIR macro.
1055         * configure: Regenerated.
1056
1057 2002-10-19  Roland McGrath  <roland@redhat.com>
1058
1059         * configure.in: Call AC_CONFIG_SUBDIRS with empty argument
1060         and then set $subdirs directly, because the new Autoconf breaks
1061         compatibility in every way imaginable and insists on whining
1062         about usage that worked since the dawn of time.
1063         * configure: Regenerated.
1064
1065         * configure: Regenerated (using Autoconf 2.54).
1066         * sysdeps/alpha/elf/configure: Likewise.
1067         * sysdeps/generic/configure: Likewise.
1068         * sysdeps/i386/elf/configure: Likewise.
1069         * sysdeps/ia64/elf/configure: Likewise.
1070         * sysdeps/mach/hurd/configure: Likewise.
1071         * sysdeps/mach/configure: Likewise.
1072         * sysdeps/unix/configure: Likewise.
1073         * sysdeps/unix/common/configure: Likewise.
1074         * sysdeps/unix/sysv/aix/configure: Likewise.
1075         * sysdeps/unix/sysv/linux/configure: Likewise.
1076         * sysdeps/unix/sysv/linux/mips/configure: Likewise.
1077         * sysdeps/x86_64/elf/configure: Likewise.
1078
1079         * config.make.in: Nix completely-soft nonsense.
1080         * configure.in: Likewise.  Under --without-fp, use nofpu subdirectory
1081         of machine directories instead of fpu subdirectory.
1082         * sysdeps/powerpc/soft-fp/Makefile: Remove cruft added in last change.
1083         * sysdeps/powerpc/nofpu/Makefile: Put it in this new file instead.
1084         * sysdeps/powerpc/soft-fp/sim-full.c: Moved to ...
1085         * sysdeps/powerpc/nofpu/sim-full.c: ... here.
1086         * sysdeps/powerpc/soft-fp/fraiseexcpt.c: Moved to ...
1087         * sysdeps/powerpc/nofpu/fraiseexcpt.c: ... here.
1088         * sysdeps/powerpc/soft-fp/fegetexcept.c: Moved to ...
1089         * sysdeps/powerpc/nofpu/fegetexcept.c: ... here.
1090         * sysdeps/powerpc/soft-fp/fclrexcpt.c: Moved to ...
1091         * sysdeps/powerpc/nofpu/fclrexcpt.c: ... here.
1092         * sysdeps/powerpc/soft-fp/ftestexcept.c: Moved to ...
1093         * sysdeps/powerpc/nofpu/ftestexcept.c: ... here.
1094         * sysdeps/powerpc/soft-fp/fgetexcptflg.c: Moved to ...
1095         * sysdeps/powerpc/nofpu/fgetexcptflg.c: ... here.
1096         * sysdeps/powerpc/soft-fp/fsetexcptflg.c: Moved to ...
1097         * sysdeps/powerpc/nofpu/fsetexcptflg.c: ... here.
1098         * sysdeps/powerpc/soft-fp/fedisblxcpt.c: Moved to ...
1099         * sysdeps/powerpc/nofpu/fedisblxcpt.c: ... here.
1100         * sysdeps/powerpc/soft-fp/feenablxcpt.c: Moved to ...
1101         * sysdeps/powerpc/nofpu/feenablxcpt.c: ... here.
1102         * sysdeps/powerpc/soft-fp/fegetenv.c: Moved to ...
1103         * sysdeps/powerpc/nofpu/fegetenv.c: ... here.
1104         * sysdeps/powerpc/soft-fp/fesetenv.c: Moved to ...
1105         * sysdeps/powerpc/nofpu/fesetenv.c: ... here.
1106         * sysdeps/powerpc/soft-fp/fegetround.c: Moved to ...
1107         * sysdeps/powerpc/nofpu/fegetround.c: ... here.
1108         * sysdeps/powerpc/soft-fp/fesetround.c: Moved to ...
1109         * sysdeps/powerpc/nofpu/fesetround.c: ... here.
1110         * sysdeps/powerpc/soft-fp/feupdateenv.c: Moved to ...
1111         * sysdeps/powerpc/nofpu/feupdateenv.c: ... here.
1112         * sysdeps/powerpc/soft-fp/feholdexcpt.c: Moved to ...
1113         * sysdeps/powerpc/nofpu/feholdexcpt.c: ... here.
1114         * sysdeps/powerpc/soft-fp/fenv_const.c: Moved to ...
1115         * sysdeps/powerpc/nofpu/fenv_const.c: ... here.
1116         * sysdeps/powerpc/soft-fp/libm-test-ulps: Moved to ...
1117         * sysdeps/powerpc/nofpu/libm-test-ulps: ... here.
1118         * sysdeps/powerpc/soft-fp/soft-supp.h: Moved to ...
1119         * sysdeps/powerpc/nofpu/soft-supp.h: ... here.
1120         * sysdeps/powerpc/soft-fp/Versions (libc: GLIBC_2.3.2): Moved to ...
1121         * sysdeps/powerpc/nofpu/Versions: ... here, new file.
1122
1123 2002-10-19  Bruno Haible  <bruno@clisp.org>
1124
1125         * sysdeps/unix/bsd/bsd4.4/freebsd/sys/sysmacros.h: New file.
1126
1127 2002-10-18  Roland McGrath  <roland@redhat.com>
1128
1129         * io/Makefile (routines): Add lchmod.
1130         * io/sys/stat.h [__USE_BSD] (lchmod): Declare it.
1131         * sysdeps/generic/lchmod.c: New file.
1132         * sysdeps/mach/hurd/lchmod.c: New file.
1133         * io/Versions (libc: GLIBC_2.3.2): New set, add lchmod.
1134
1135 2002-10-18  Art Haas  <ahaas@neosoft.com>
1136
1137         * configure.in: Remove remaining AC_FD_CC macros, and replace
1138         AC_FD_MSG with AS_MESSAGE_FD.
1139
1140 2002-10-18  Roland McGrath  <roland@redhat.com>
1141
1142         * sysdeps/powerpc/powerpc32/dl-machine.c (__process_machine_rela): Fix
1143         typos: VALUE -> FINALADDR.
1144
1145         * sysdeps/unix/alpha/sysdep.h (INLINE_SYSCALL, INLINE_SYSCALL1)
1146         (inline_syscall_clobbers, inline_syscall0, inline_syscall1)
1147         (inline_syscall2, inline_syscall3, inline_syscall4, inline_syscall5)
1148         (inline_syscall6): Move these macros ...
1149         * sysdeps/unix/sysv/linux/alpha/sysdep.h: ... to here.
1150
1151         * configure.in (libc_link_dests, libc_link_sources): Remove these
1152         variables and the AC_LINK_FILES call.
1153
1154         * sysdeps/powerpc/soft-fp/Versions (libc: GLIBC_2.3.2): Fix last
1155         change to put new symbols here instead of in GLIBC_2.2.
1156         * sysdeps/powerpc/Subdirs: Move this file ...
1157         * sysdeps/powerpc/soft-fp/Subdirs: ... here.
1158
1159 2002-10-07  Roland McGrath  <roland@redhat.com>
1160
1161         * sysdeps/generic/bits/time.h: Replaced with contents of the
1162         sysdeps/unix/sysv/linux/i386/bits/time.h file.  All the following
1163         files were identical except for the absence of CLOCK_THREAD_CPUTIME_ID
1164         and CLOCK_PROCESS_CPUTIME_ID in .../linux/bits/time.h; adding these
1165         macros is ok even for architectures that don't now implement them.
1166         * sysdeps/mach/hurd/bits/time.h: File removed.
1167         * sysdeps/unix/sysv/linux/bits/time.h: File removed.
1168         * sysdeps/unix/sysv/linux/i386/bits/time.h: File removed.
1169         * sysdeps/unix/sysv/linux/ia64/bits/time.h: File removed.
1170         * sysdeps/unix/sysv/linux/sparc/bits/time.h: File removed.
1171         * sysdeps/unix/sysv/linux/x86_64/bits/time.h: File removed.
1172
1173 2002-10-18  Jeff Bailey  <jbailey@gnu.org>
1174
1175         * configure.in: Replace obsolete AC_OUTPUT syntax with
1176         AC_CONFIG_FILES, AC_CONFIG_COMMANDS, and new-type AC_OUTPUT trio.
1177
1178         * aclocal.m4 (GLIBC_PROVIDES): Add AC_PROVIDEs for
1179         _AS_PATH_SEPARATOR_PREPARE and _AS_TEST_PREPARE.
1180
1181         * configure.in: Replace AC_FD_CC with AS_MESSAGE_LOG_FD.
1182         * sysdeps/alpha/elf/configure.in: Likewise.
1183         * sysdeps/i386/elf/configure.in: Likewise.
1184         * sysdeps/mach/hurd/configure.in: Likewise.
1185         * sysdeps/x86_64/elf/configure.in: Likewise.
1186
1187         * configure.in: Use AC_CONFIG_SRCDIR and new AC_INIT syntax.
1188
1189         * sysdeps/alpha/elf/configure.in: Remove unneeded sinclude statement.
1190         * sysdeps/generic/configure.in: Likewise.
1191         * sysdeps/i386/elf/configure.in: Likewise.
1192         * sysdeps/ia64/elf/configure.in: Likewise.
1193         * sysdeps/mach/configure.in: Likewise.
1194         * sysdeps/mach/hurd/configure.in: Likewise.
1195         * sysdeps/unix/configure.in: Likewise.
1196         * sysdeps/unix/common/configure.in: Likewise.
1197         * sysdeps/unix/sysv/aix/configure.in: Likewise.
1198         * sysdeps/unix/sysv/linux/configure.in: Likewise.
1199         * sysdeps/unix/sysv/linux/mips/configure.in: Likewise.
1200         * sysdeps/x86_64/elf/configure.in: Likewise.
1201
1202         * aclocal.m4: Use just the bits from AS_INIT that are needed for the
1203         GLIBC_PROVIDES.  Use plain comment instead of HEADER-COMMENT so
1204         that it's obvious when extra autoconf machinery is being dragged in.
1205
1206 2002-10-18  Roland McGrath  <roland@redhat.com>
1207
1208         * configure.in: Remove bogus echo included in
1209         2002-10-08  Aldy Hernandez  <aldyh@redhat.com> change.
1210         * configure: Regenerated.
1211
1212 2002-10-18  Jakub Jelinek  <jakub@redhat.com>
1213
1214         * sysdeps/unix/sysv/linux/pathconf.h (statfs_link_max): Add inline.
1215         (statfs_filesize_max): New function.
1216         * sysdeps/unix/sysv/linux/linux_fsinfo.h (JFFS_SUPER_MAGIC,
1217         JFFS2_SUPER_MAGIC, JFS_SUPER_MAGIC, NTFS_SUPER_MAGIC,
1218         ROMFS_SUPER_MAGIC, UDF_SUPER_MAGIC): Define.
1219         * sysdeps/unix/sysv/linux/fpathconf.c (__fpathconf): Use
1220         statfs_filesize_max.
1221         * sysdeps/unix/sysv/linux/pathconf.c (__pathconf): Likewise.
1222         * sysdeps/unix/sysv/linux/alpha/fpathconf.c: Removed.
1223         * sysdeps/unix/sysv/linux/alpha/pathconf.c: Removed.
1224
1225 2002-10-17  Roland McGrath  <roland@redhat.com>
1226
1227         * configure.in (MIG): Just AC_SUBST it here.
1228         * configure: Regenerated.
1229         * sysdeps/mach/configure.in (MIG): Do the AC_CHECK_TOOL here.
1230         Adding final - argument to all AC_CHECK_HEADER uses for .defs files.
1231         * sysdeps/mach/configure: Regenerated.
1232
1233         * aclocal.m4 (GLIBC_PROVIDES): Add AC_PROVIDE([_AS_TR_SH_PREPARE])
1234         and AC_PROVIDE([_AS_CR_PREPARE]).
1235
1236         * aclocal.m4 (GLIBC_PROVIDES): Add AC_PROVIDE([_AS_ECHO_N_PREPARE]).
1237         Remove AC_LANG(C) call, instead just define([_AC_LANG], [C]).
1238
1239         * elf/dl-support.c: Move _dl_tls_* variables to ...
1240         * sysdeps/generic/libc-tls.c: ... here.
1241
1242         * elf/dl-close.c (remove_slotinfo): Take new argument.  If false,
1243         allow IDX to be one past the current last slotinfo entry.
1244         (_dl_close): Pass IMAP->l_init_called for that parameter.
1245
1246 2002-10-07  Andreas Schwab  <schwab@suse.de>
1247
1248         * aclocal.m4: Fix for autoconf 2.53.
1249         * configure.in: Likewise.  Require autoconf 2.53.
1250
1251 2002-10-08  Richard Henderson  <rth@redhat.com>
1252
1253         * soft-fp/op-4.h: Handle carry correctly in
1254         __FP_FRAC_ADD_3, __FP_FRAC_ADD_4, __FP_FRAC_SUB_3,
1255         __FP_FRAC_SUB_4, __FP_FRAC_DEC_3, __FP_FRAC_DEC_4.
1256         * soft-fp/op-common.h: New macros _FP_DIV_MEAT_N_loop.
1257
1258 2002-10-08  Aldy Hernandez  <aldyh@redhat.com>
1259
1260         * configure.in: Compute completely-soft.
1261         * config.make.in: Make completely-soft available to sub-makes.
1262         * sysdeps/powerpc/soft-fp/Makefile: Add gcc-single-routines and
1263         gcc-double-routines.  Add sim-full.c.  Add fenv_const and
1264         fe_nomask to libm-support.
1265         * sysdeps/powerpc/soft-fp/sim-full.c: New file.
1266         * sysdeps/powerpc/soft-fp/fraiseexcpt.c: New file.
1267         * sysdeps/powerpc/soft-fp/fegetexcept.c: New file.
1268         * sysdeps/powerpc/soft-fp/fclrexcpt.c: New file.
1269         * sysdeps/powerpc/soft-fp/ftestexcept.c: New file.
1270         * sysdeps/powerpc/soft-fp/fgetexcptflg.c: New file.
1271         * sysdeps/powerpc/soft-fp/fsetexcptflg.c: New file.
1272         * sysdeps/powerpc/soft-fp/fedisblxcpt.c: New file.
1273         * sysdeps/powerpc/soft-fp/feenablxcpt.c: New file.
1274         * sysdeps/powerpc/soft-fp/fegetenv.c: New file.
1275         * sysdeps/powerpc/soft-fp/fesetenv.c: New file.
1276         * sysdeps/powerpc/soft-fp/fegetround.c: New file.
1277         * sysdeps/powerpc/soft-fp/fesetround.c: New file.
1278         * sysdeps/powerpc/soft-fp/feupdateenv.c: New file.
1279         * sysdeps/powerpc/soft-fp/feholdexcpt.c: New file.
1280         * sysdeps/powerpc/soft-fp/fenv_const.c: New file.
1281         * sysdeps/powerpc/soft-fp/libm-test-ulps: New file.
1282         * sysdeps/powerpc/soft-fp/soft-supp.h: New file.
1283         * sysdeps/powerpc/soft-fp/Versions: Add libgcc soft-float
1284         symbols.  Add __sim_disabled_exceptions, __sim_exceptions,
1285         __sim_round_mode.
1286         * sysdeps/powerpc/soft-float/Dist: Add sim-full.c, fenv_const.c.
1287         * sysdeps/powerpc/soft-float/sfp-machine.h: Define
1288         FP_HANDLE_EXCEPTIONS.
1289         Define FP_ROUNDMODE.
1290         Redefine FP_* macros to correspond to the FE_* bit positions.
1291         Define FP_DIV_MEAT_S to _FP_DIV_MEAT_1_loop.
1292         Define externs for __sim_exceptions, __sim_disabled_exceptions,
1293         __sim_round_mode, __simulate_exceptions.
1294         * sysdeps/powerpc/fpu/bits/fenv.h: Move file from here...
1295         * sysdeps/powerpc/bits/fenv.h: ...to here.
1296
1297 2002-10-06  Jakub Jelinek  <jakub@redhat.com>
1298
1299         * sysdeps/powerpc/powerpc32/dl-machine.c (__process_machine_rela):
1300         Store R_PPC_UADDR32 and R_PPC_UADDR16 one byte at a time.
1301         Use __builtin_expect for R_PPC_ADDR24 overflow check.  Fix
1302         R_PPC_ADDR16, R_PPC_UADDR16 and R_PPC_ADDR14* overflow check, use
1303         __builtin_expect.
1304
1305 2002-10-15  Jakub Jelinek  <jakub@redhat.com>
1306
1307         * include/resolv.h (__libc_res_nquery, __libc_res_nsearch,
1308         __libc_res_nsend): New prototypes.
1309         * resolv/res_query.c (QUERYSIZE): Define.
1310         (__libc_res_nquery): Renamed from res_nquery.  Added answerp
1311         argument.  Allocate only QUERYSIZE bytes first, if res_nmkquery
1312         fails use MAXPACKET buffer.  Call __libc_res_nsend instead of
1313         res_nsend, pass answerp.
1314         (res_nquery): Changed into wrapper around __libc_res_nquery.
1315         (__libc_res_nsearch): Renamed from res_nsearch.  Added answerp
1316         argument.  Call __libc_res_nquerydomain and __libc_res_nquery
1317         instead of the non-__libc_ variants, pass them answerp.
1318         (res_nsearch): Changed into wrapper around __libc_res_nsearch.
1319         (__libc_res_nquerydomain): Renamed from res_nquerydomain.
1320         Added answerp argument.  Call __libc_res_nquery instead of
1321         res_nquery, pass answerp.
1322         (res_nquerydomain): Changed into wrapper around
1323         __libc_res_nquerydomain.
1324         * resolv/res_send.c: Include sys/ioctl.h.
1325         (MAXPACKET): Define.
1326         (send_vc): Change arguments.  Reallocate answer buffer if it is
1327         too small.
1328         (send_dg): Likewise.
1329         (__libc_res_nsend): Renamed from res_nsend.  Added ansp argument.
1330         Reallocate answer buffer if it is too small and hooks are in use.
1331         Adjust calls to send_vc and send_dg.
1332         (res_nsend): Changed into wrapper around __libc_res_nsend.
1333         * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r): Allocate
1334         just 1K answer buffer on the stack, use __libc_res_nsearch instead
1335         of res_nsearch.
1336         (_nss_dns_gethostbyaddr_r): Similarly with __libc_res_nquery.
1337         * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyaddr_r): Likewise.
1338         (_nss_dns_getnetbyname_r): Similarly with __libc_res_nsearch.
1339         * resolv/gethnamaddr.c (gethostbyname2): Likewise.
1340         (gethostbyaddr): Similarly with __libc_res_nquery.
1341         * resolv/Versions (libresolv): Export __libc_res_nquery and
1342         __libc_res_nsearch at GLIBC_PRIVATE.
1343
1344 2002-10-17  Roland McGrath  <roland@redhat.com>
1345
1346         * configure.in: Grok --without-__thread and disable HAVE___THREAD.
1347         * configure: Regenerated.
1348
1349         * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Do CHECK_STATIC_TLS
1350         before performing the reloc, not after.
1351         * sysdeps/i386/dl-machine.h (elf_machine_rel): Likewise.
1352
1353 2002-10-17  Ulrich Drepper  <drepper@redhat.com>
1354
1355         * locale/programs/locale.c (write_locales): Use 'm' flag in fopen call.
1356         * locale/programs/linereader.c (lr_open): Likewise.
1357         * locale/programs/charmap-dir.c (charmap_open): Likewise.
1358         * locale/programs/locarchive.c (add_locale_to_archive): Likewise.
1359
1360 2002-10-17  Isamu Hasegawa  <isamu@yamato.ibm.com>
1361
1362         * posix/bug-regex11.c: Add a test case for the bug reported by
1363         Paolo Bonzini <bonzini@gnu.org>.
1364         * posix/regexec.c (sift_states_bkref): Use correct destination of
1365         the back reference.
1366
1367 2002-10-17  Roland McGrath  <roland@redhat.com>
1368
1369         * elf/dl-load.c (_dl_map_object_from_fd): Don't check DF_STATIC_TLS.
1370         * elf/dl-reloc.c (_dl_relocate_object: CHECK_STATIC_TLS): New macro
1371         to signal error if an IE-model TLS reloc resolved to a dlopen'd module.
1372         * sysdeps/i386/dl-machine.h (elf_machine_rel, elf_machine_rela):
1373         Call it after performing TPOFF relocs.
1374         * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Likewise.
1375         * sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise.
1376         * elf/dl-conflict.c (CHECK_STATIC_TLS): New macro (no-op).
1377
1378         * elf/dl-close.c (remove_slotinfo): Change asserts so as not to crash
1379         when closing a partially-initialized object.
1380
1381         * elf/dl-load.c (_dl_map_object_from_fd) [! USE_TLS]: Call lose
1382         instead of _dl_fatal_printf when we see PT_TLS.
1383
1384         * Makeconfig (CPPFLAGS): Fix last change to use $(libof-$(<F))
1385         instead of $(libof-$<).
1386
1387 2002-10-16  Roland McGrath  <roland@redhat.com>
1388
1389         * cppflags-iterator.mk (CPPFLAGS-$(cpp-src)): Variable removed.
1390         instead of += to append, to be sure $(lib) gets expanded at defn time.
1391         (libof-$(cpp-src)): New variable, define this instead.
1392         * extra-lib.mk (cpp-srcs-left): Reduce duplication in include setup.
1393         (lib): Don't use override.
1394         (CPPFLAGS-$(lib)): New variable, put -D's here.
1395         * Makeconfig (CPPFLAGS): Use basename fn for CPPFLAGS-basename.
1396         Also add $(CPPFLAGS-LIB) before the file-specific flags, for each
1397         LIB found by $(libof-*) for basename, target, or source.
1398         * Makerules (CPPFLAGS-nonlib): New variable.
1399         * nscd/Makefile (lib): Set to nonlib when using cppflags-iterator.mk.
1400         * locale/Makefile (lib): Likewise.
1401         * sunrpc/Makefile (lib): Likewise.
1402
1403         * sysdeps/unix/sysv/linux/fpathconf.c (LINUX_LINK_MAX): Move macro ...
1404         * sysdeps/unix/sysv/linux/linux_fsinfo.h (LINUX_LINK_MAX): ... here.
1405         * sysdeps/unix/sysv/linux/pathconf.h: New file.
1406         (statfs_link_max): New function, guts from fpathconf.c.
1407         * sysdeps/unix/sysv/linux/fpathconf.c: Rewritten using that.
1408         * sysdeps/unix/sysv/linux/pathconf.c (__pathconf): Likewise.
1409         * sysdeps/unix/sysv/linux/alpha/pathconf.c (__pathconf): Rewritten
1410         to use the linux/pathconf.c code by #include rather than duplication.
1411         * sysdeps/unix/sysv/linux/alpha/fpathconf.c (__pathconf): Likewise.
1412
1413 2002-10-16  Jakub Jelinek  <jakub@redhat.com>
1414
1415         * sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER):
1416         Use __libc_errno only for libc itself.
1417
1418 2002-10-16  Andreas Jaeger  <aj@suse.de>
1419
1420         * sysdeps/x86_64/_mcount.S: Fix off-by-1 error in argument access.
1421
1422 2002-10-16  Ulrich Drepper  <drepper@redhat.com>
1423
1424         * sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER):
1425         Use __libc_errno only for libc itself.
1426
1427 2002-10-15  Roland McGrath  <roland@redhat.com>
1428             Jakub Jelinek  <jakub@redhat.com>
1429
1430         * sysdeps/unix/sysv/linux/Makefile
1431         ($(objpfx)syscall-%.h $(objpfx)syscall-%.d): Take code from
1432         sparc/Makefile to produce a bi-arch file as needed.
1433         That's now parameterized by the variable $(64bit-predefine).
1434         Use LC_ALL=C for `comm' commands in that rule.
1435         No longer conditional on [$(no_syscall_list_h)].
1436         * sysdeps/unix/sysv/linux/sparc/Makefile: Remove replacement rules.
1437         (64bit-predefine): New variable.
1438         * sysdeps/unix/sysv/linux/x86_64/Makefile: Likewise.
1439         * sysdeps/unix/sysv/linux/s390/Makefile: New file.
1440         * sysdeps/unix/sysv/linux/powerpc/Makefile
1441         (64bit-predefine): New variable.
1442
1443 2002-10-15  Roland McGrath  <roland@redhat.com>
1444
1445         * sysdeps/unix/sysv/linux/Makefile
1446         ($(objpfx)syscall-%.h $(objpfx)syscall-%.d)
1447
1448         * login/utmp-private.h: Declare __libc_utmp_lock.
1449         * sysdeps/unix/getlogin_r.c (getlogin_r): Take __libc_utmp_lock once
1450         and call __libc_utmp_jump_table functions directly, instead of using
1451         __setutent et al.
1452
1453         * sysdeps/unix/sysv/linux/configure.in: Use case instead of if.
1454         * sysdeps/unix/sysv/linux/configure: Regenerated.
1455
1456         * sysdeps/gnu/bits/utmp.h: Include <bits/wordsize.h>.
1457         (struct lastlog) [__WORDSIZE == 64 && __WORDSIZE_COMPAT32]:
1458         Use int32_t for ll_time.
1459         (struct utmp) [__WORDSIZE == 64 && __WORDSIZE_COMPAT32]:
1460         Use int32_t instead of long int for ut_session.
1461         Use an anonymous struct with 32-bit fields for ut_tv.
1462         * sysdeps/gnu/bits/utmpx.h: Include <bits/wordsize.h>.
1463         (struct utmpx) [__WORDSIZE == 64 && __WORDSIZE_COMPAT32]: Do the same
1464         here as in utmp.h for `struct utmp'.
1465         * sysdeps/unix/sysv/linux/powerpc/bits/utmp.h: File removed.
1466         * sysdeps/unix/sysv/linux/powerpc/bits/utmpx.h: File removed.
1467         * sysdeps/unix/sysv/linux/sparc/bits/utmp.h: File removed.
1468         * sysdeps/unix/sysv/linux/sparc/bits/utmpx.h: File removed.
1469         * sysdeps/unix/sysv/linux/x86_64/bits/utmp.h: File removed.
1470         * sysdeps/unix/sysv/linux/x86_64/bits/utmpx.h: File removed.
1471
1472         * sysdeps/unix/sysv/linux/bits/resource.h: Replaced with the contents
1473         of the sysdeps/unix/sysv/linux/i386/bits/resource.h file.
1474         All the following files were identical or equivalent to it.
1475         * sysdeps/unix/sysv/linux/i386/bits/resource.h: File removed.
1476         * sysdeps/unix/sysv/linux/arm/bits/resource.h: File removed.
1477         * sysdeps/unix/sysv/linux/cris/bits/resource.h: File removed.
1478         * sysdeps/unix/sysv/linux/hppa/bits/resource.h: File removed.
1479         * sysdeps/unix/sysv/linux/ia64/bits/resource.h: File removed.
1480         * sysdeps/unix/sysv/linux/m68k/bits/resource.h: File removed.
1481         * sysdeps/unix/sysv/linux/powerpc/bits/resource.h: File removed.
1482         * sysdeps/unix/sysv/linux/s390/bits/resource.h: File removed.
1483         * sysdeps/unix/sysv/linux/sh/bits/resource.h: File removed.
1484         * sysdeps/unix/sysv/linux/x86_64/bits/resource.h: File removed.
1485
1486         * sysdeps/unix/sysv/linux/bits/socket.h (struct msghdr): Use size_t
1487         instead of int for msg_iovlen, instead of socklen_t for msg_controllen.
1488         Other than the previously incorrect sign of msg_iovlen, this is a
1489         no-op on 32-bit platforms.  On 64-bit platforms it makes this header
1490         match their layouts as well, so the following are now identical to it.
1491         * sysdeps/unix/sysv/linux/s390/bits/socket.h: File removed.
1492         * sysdeps/unix/sysv/linux/sparc/bits/socket.h: File removed.
1493         * sysdeps/unix/sysv/linux/x86_64/bits/socket.h: File removed.
1494         * sysdeps/unix/sysv/linux/ia64/bits/socket.h: File removed.
1495         * sysdeps/unix/sysv/linux/alpha/bits/socket.h: File removed.
1496
1497 2002-10-15  Ulrich Drepper  <drepper@redhat.com>
1498
1499         * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_VFORK_SYSCALL):
1500         Define for 2.4+ kernels.
1501
1502         * sysdeps/unix/sysv/linux/i386/vfork.S: Optimize for kernels which
1503         are known to have the vfork syscall.  Don't confuse the CPUs
1504         branch prediction unit by jumping to the return address.
1505
1506         * sysdeps/unix/sysv/linux/alpha/fpathconf.c (__fpathconf): Add
1507         support for reiserfs and xfs.
1508
1509         * sysdeps/unix/sysv/linux/fpathconf.c (__fpathconf): Add case for
1510         XFS link count.
1511         * sysdeps/unix/sysv/linux/linux_fsinfo.h: Define XFS_SUPER_MAGIC
1512         and XFS_LINK_MAX.
1513         Patch by Eric Sandeen <sandeen@sgi.com> [PR libc/4706].
1514
1515 2002-10-16  Jakub Jelinek  <jakub@redhat.com>
1516
1517         * include/libc-symbols.h (attribute_tls_model_ie): Define.
1518         * include/errno.h (errno): Define to __libc_errno in libc.so.
1519         Add attribute_tls_model_ie.
1520         * include/netdb.h (h_errno): Define to __libc_h_errno in libc.so.
1521         Add attribute_tls_model_ie.
1522         * include/resolv.h (_res): Define to __libc_res in libc.so.  Add
1523         attribute_tls_model_ie.
1524         * inet/herrno.c (__libc_h_errno): Add hidden alias to h_errno.
1525         (h_errno): Define.
1526         * resolv/res_libc.c (__libc_res): Add hidden alias to _res.
1527         (_res): Define.
1528         * sysdeps/generic/bits/libc-tsd.h (__libc_tsd_define): Add
1529         attribute_tls_model_ie.
1530         * sysdeps/generic/errno-loc.c (errno): Only undefine if not using
1531         __thread.
1532         * sysdeps/generic/errno.c (__libc_errno): Add hidden alias to errno.
1533         * sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER): Use
1534         __libc_errno in USE___THREAD case.
1535         * sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER):
1536         Likewise.
1537         * configure.in (HAVE_TLS_MODEL_ATTRIBUTE): Check for
1538         __attribute__((tls_model (""))).
1539         * configure: Rebuilt.
1540         * config.h.in (HAVE_TLS_MODEL_ATTRIBUTE): Add.
1541
1542 2002-10-15  Ulrich Drepper  <drepper@redhat.com>
1543
1544         * timezone/asia: Update from tzdata2002d.
1545         * timezone/australasia: Likewise.
1546         * timezone/iso3166.tab: Likewise.
1547         * timezone/southamerica: Likewise.
1548         * timezone/zone-tab: Likewise.
1549
1550 2002-10-15  Roland McGrath  <roland@redhat.com>
1551
1552         * sysdeps/generic/dl-tls.c (_dl_deallocate_tls) [TLS_TCB_AT_TP]:
1553         Adjust TCB pointer before calling free, so we get the whole block.
1554
1555 2002-10-14  Roland McGrath  <roland@redhat.com>
1556
1557         * sysdeps/unix/sysv/linux/x86_64/sigaction.c
1558         [HAVE_HIDDEN && !HAVE_BROKEN_VISIBILITY_ATTRIBUTE]: Declare restore_rt
1559         extern using attribute_hidden instead of static, avoids warning.
1560
1561 2002-10-09  Jakub Jelinek  <jakub@redhat.com>
1562
1563         * sysdeps/unix/sysv/linux/configure.in: Use */lib64 for s390x too.
1564         * sysdeps/unix/sysv/linux/configure: Rebuilt.
1565
1566 2002-10-14  Ulrich Drepper  <drepper@redhat.com>
1567
1568         * po/sv.po: Update from translation team.
1569
1570 2002-10-12  H.J. Lu  <hjl@gnu.org>
1571
1572         * sunrpc/thrsvc.c (PROCQUIT): New.
1573         (struct rpc_arg): New.
1574         (dispatch): Call exit (0) if request->rq_proc == PROCQUIT.
1575         (test_one_call): Take struct rpc_arg * instead of CLIENT *c.
1576         (thread_wrapper): Modified for struct rpc_arg * and call PROCQUIT.
1577         (main): Modified for struct rpc_arg *.
1578
1579 2002-10-14  Ulrich Drepper  <drepper@redhat.com>
1580
1581         * dirent/scandir.c: Rearrange code a bit to reduce binary size.
1582
1583 2002-10-14  Jakub Jelinek  <jakub@redhat.com>
1584
1585         * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Include tls.h.
1586         (SYSCALL_ERROR_HANDLER): Use RTLD_PRIVATE_ERRNO sequence
1587         in ld.so even if __thread is supported.
1588
1589 2002-10-13  Jakub Jelinek  <jakub@redhat.com>
1590
1591         * sysdeps/unix/sysv/linux/arm/profil-counter.h (profil_counter):
1592         Add hack to prevent the compiler from clobbering the signal context.
1593         * sysdeps/unix/sysv/linux/sh/profil-counter.h (profil_counter):
1594         Likewise.
1595         * sysdeps/unix/sysv/linux/x86_64/profil-counter.h (profil_counter):
1596         Likewise.
1597
1598 2002-10-14  Andreas Jaeger  <aj@suse.de>
1599
1600         * sysdeps/mips/fpu/libm-test-ulps: Regenerated by
1601         Guido Guenther <agx@sigxcpu.org>.
1602
1603 2002-10-14  Ulrich Drepper  <drepper@redhat.com>
1604
1605         * po/sk.po: Update from translation team.
1606
1607 2002-09-26  Roland McGrath  <roland@redhat.com>
1608
1609         * elf/dl-load.c (_dl_dst_count, _dl_dst_substitute): Handle $LIB
1610         dynamic string tag.
1611         * elf/Makefile ($(objpfx)trusted-dirs.st): Make the output define
1612         DL_DST_LIB based on $(slibdir).
1613
1614 2002-10-13  Roland McGrath  <roland@frob.com>
1615
1616         * elf/rtld-Rules ($(objpfx)rtld-libc.a): Use $(verbose) in ar command.
1617
1618         * sysdeps/mach/hurd/getresuid.c: New file.
1619         * sysdeps/mach/hurd/getresgid.c: New file.
1620         * sysdeps/mach/hurd/setresuid.c: New file.
1621         * sysdeps/mach/hurd/setresgid.c: New file.
1622
1623         * posix/unistd.h [__USE_GNU] (getresuid, getresgid, setresuid,
1624         setresgid): Declare them.
1625         * NEWS: Mention it.
1626         * include/unistd.h
1627         (__getresuid, __getresgid, __setresuid, __setresgid): Declare them,
1628         add libc_hidden_proto.
1629         * posix/Versions (libc: GLIBC_2.3.2): New set.  Add
1630         getresuid, getresgid, setresuid, setresgid here.
1631         * Versions.def (libc): Define GLIBC_2.3.2 set.
1632         * sysdeps/generic/getresuid.c (__getresuid): Fix argument types.
1633         Add libc_hidden_def.
1634         * sysdeps/generic/getresgid.c (__getresgid): Likewise.
1635         * sysdeps/generic/setresgid.c: New file.
1636         * sysdeps/generic/setresuid.c: New file.
1637         * sysdeps/unix/sysv/linux/Makefile [$(subdir) = misc]
1638         (sysdep_routines): Don't add getresuid and getresgid here.
1639         * sysdeps/unix/sysv/linux/arm/Makefile [$(subdir) = misc]
1640         (sysdep_routines): Don't add setresuid and setresgid here.
1641         * sysdeps/unix/sysv/linux/cris/Makefile: Likewise.
1642         * sysdeps/unix/sysv/linux/sh/Makefile: Likewise.
1643         * sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise.
1644         * sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Likewise.
1645         * sysdeps/unix/sysv/linux/i386/Makefile: Likewise.
1646         * sysdeps/unix/sysv/linux/m68k/Makefile: Likewise.
1647         * posix/Makefile (routines): Add them all here instead.
1648         * sysdeps/unix/sysv/linux/i386/getresuid.c (getresuid): Renamed to
1649         __getresuid.  Add libc_hidden_def for that, and weak alias to old name.
1650         * sysdeps/unix/sysv/linux/i386/getresgid.c (getresgid): Renamed to
1651         __getresgid.  Add libc_hidden_def for that, and weak alias to old name.
1652         * sysdeps/unix/sysv/linux/i386/setresuid.c: Add libc_hidden_def.
1653         [! __NR_setresuid]: Include generic file.
1654         * sysdeps/unix/sysv/linux/i386/setresgid.c (setresgid): Renamed to
1655         __setresgid.  Add libc_hidden_def for that, and weak alias to old name.
1656         [! __NR_setresuid]: Include generic file.
1657         * sysdeps/unix/sysv/linux/syscalls.list (setresuid, setresgid):
1658         Caller is - now, not EXTRA.
1659         * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list
1660         (setresuid, setresgid, getresuid, getresgid): Likewise.
1661         * sysdeps/unix/sysv/linux/syscalls.list (getresuid, getresgid):
1662         Add these calls here.
1663         * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove them here.
1664         * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise.
1665         * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
1666         * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise.
1667         * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
1668         * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list: Likewise.
1669         * sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Likewise.
1670         * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
1671         * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
1672
1673         * sysdeps/unix/sysv/linux/Makefile [$(subdir) = misc]
1674         (sysdep_routines): Add setfsuid and setfsgid here.
1675         * sysdeps/unix/sysv/linux/arm/Makefile: Not here.
1676         * sysdeps/unix/sysv/linux/sparc/sparc32/Makefile: Likewise.
1677         * sysdeps/unix/sysv/linux/cris/Makefile: Likewise.
1678         * sysdeps/unix/sysv/linux/sh/Makefile: Likewise.
1679         * sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise.
1680         * sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Likewise.
1681         * sysdeps/unix/sysv/linux/i386/Makefile: Likewise.
1682         * sysdeps/unix/sysv/linux/m68k/Makefile: Likewise.
1683
1684         * hurd/errno.c: Renamed to ...
1685         * hurd/errno-loc.c: ... this.
1686         * hurd/Makefile (routines): errno -> errno-loc
1687
1688 2002-10-13  Ulrich Drepper  <drepper@redhat.com>
1689
1690         * po/de.po: Update from translation team.
1691
1692         * MakeTAGS: Add -E flag to xgettext runs.
1693
1694 2002-10-12  Ulrich Drepper  <drepper@redhat.com>
1695
1696         * po/fr.po: Update from translation team.
1697
1698         * sysdeps/posix/system.c: Remove support for old and buggy SCO systems.
1699         Optimize a bit for use in glibc.
1700
1701 2002-10-12  Roland McGrath  <roland@redhat.com>
1702
1703         * stdio-common/tst-rndseek.c (TIMEOUT): Increase to 10 seconds.
1704         Some machines are slow.  Guido Guenther <agx@sigxcpu.org> has one.
1705
1706 2002-10-12  Ulrich Drepper  <drepper@redhat.com>
1707
1708         * po/sv.po: Update from translation team.
1709
1710 2002-10-11  Isamu Hasegawa  <isamu@yamato.ibm.com>
1711
1712         * posix/regcomp.c (re_compile_fastmap_iter): Remove the handling
1713         OP_CONTEXT_NODE.
1714         (regfree): Likewise.
1715         (create_initial_state): Likewise.
1716         (analyze): Remove the substitutions which became useless.
1717         (calc_first): Likewise.
1718         (calc_epsdest): Use edests of OP_BACK_REF in case that it has
1719         epsilon destination.
1720         (duplicate_node_closure): New function.
1721         (duplicate_node): Remove the handling OP_CONTEXT_NODE.
1722         (calc_inveclosure): Likewise.
1723         (calc_eclosure): Likewise.
1724         (calc_eclosure_iter): Invoke duplicate_node_closure instead of
1725         direct invocation of duplicate_node.
1726         (parse): Don't use comma operator in the return to avoid compiler
1727         warning.
1728         (parse_reg_exp): Likewise.
1729         (parse_branch): Likewise.
1730         (parse_expression): Likewise.
1731         (parse_sub_exp): Likewise.
1732         (parse_dup_op): Likewise.
1733         * posix/regex_internal.c (re_dfa_add_node): Remove the substitutions
1734         which became useless.
1735         (create_ci_newstate): Remove the handling OP_CONTEXT_NODE.
1736         (create_cd_newstate): Likewise.
1737         * posix/regex_internal.h (re_token_type_t): Remove the obsolete type.
1738         (re_token_t): Likewise.
1739         (re_dfa_t): Likewise.
1740         (re_node_set_remove): New macro.
1741         * posix/regexec.c (check_matching): Remove the handling
1742         OP_CONTEXT_NODE.
1743         (check_halt_node_context): Likewise.
1744         (proceed_next_node): Likewise.
1745         (pop_fail_stack): Fix the memory leak.
1746         (set_regs): Likewise.
1747         (free_fail_stack_return): New function.
1748         (sift_states_backward): Fix the memory leak.  Remove the handling
1749         OP_CONTEXT_NODE.
1750         (update_cur_sifted_state): Append some if clause to avoid redundant
1751         call.
1752         (sub_epsilon_src_nodes): Use IS_EPSILON_NODE since it might be a
1753         back reference.
1754         (check_dst_limits): Remove the handling OP_CONTEXT_NODE.
1755         (check_subexp_limits): Likewise.
1756         (search_subexp): Likewise.
1757         (sift_states_bkref): Likewise.
1758         (transit_state_mb): Likewise.
1759         (transit_state_bkref_loop): Likewise.
1760         (transit_state_bkref_loop): Likewise.
1761         (group_nodes_into_DFAstates): Likewise.
1762         (check_node_accept): Likewise.
1763         (sift_ctx_init): Add initializing.
1764
1765 2002-10-12  Ulrich Drepper  <drepper@redhat.com>
1766
1767         * sysdeps/unix/sysv/linux/i386/sysdep.h (INLINE_SYSCALL): Use
1768         __builtin_expect.
1769
1770 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
1771
1772         * elf/dl-load.c (_dl_map_object_from_fd): Remove unnecessarily
1773         duplicated variable c.
1774
1775         * sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Use INTERNAL_SYSCALL
1776         if possible.
1777
1778         * sysdeps/unix/sysv/linux/i386/sysdep.h
1779         (INTERNAL_SYSCALL_ERROR_P): New define.
1780         (INTERNAL_SYSCALL_ERRNO): Likewise.
1781
1782         * sysdeps/unix/sysv/linux/i386/profil-counter.h (profil_counter):
1783         Add hack to prevent the compiler from clobbering the signal context.
1784
1785 2002-10-11  Roland McGrath  <roland@redhat.com>
1786
1787         * sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER):
1788         Fix typos.
1789
1790         * sysdeps/generic/dl-lookupcfg.h: Include <tls.h>.
1791         * sysdeps/sh/dl-lookupcfg.h: File removed.
1792         * sysdeps/i386/dl-lookupcfg.h: File removed.
1793
1794         * sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER): Add
1795         missing labels and ; from last change.
1796
1797         * stdio-common/tst-sscanf.c (val_double): Append .0 to large whole
1798         number literals, so they are doubles instead of ints.
1799
1800 2002-10-09  Roland McGrath  <roland@redhat.com>
1801
1802         * sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional
1803         changed from [USE_TLS && HAVE___THREAD].
1804
1805         * sysdeps/i386/dl-machine.h (elf_machine_type_class, elf_machine_rel):
1806         Disable TLS relocs if [RTLD_BOOTSTRAP && !USE___THREAD].
1807         * sysdeps/x86_64/dl-machine.h
1808         (elf_machine_type_class, elf_machine_rela): Likewise.
1809         * sysdeps/sh/dl-machine.h (elf_machine_type_class, elf_machine_rela):
1810         Likewise.
1811
1812         * include/link.h (struct link_map): Remove member l_tls_tp_initialized.
1813         * elf/rtld.c (_dl_start_final, dl_main): Don't use it.
1814         (_dl_start): Conditionalize PT_TLS check on [USE___THREAD].
1815
1816         * sysdeps/i386/dl-tls.h (__TLS_GET_ADDR): Use ___tls_get_addr_internal
1817         instead of ___tls_get_addr.
1818         (___tls_get_addr_internal): Add attribute_hidden to decl.
1819
1820         * sysdeps/generic/ldsodefs.h (struct rtld_global): New variable
1821         _dl_error_catch_tsd.
1822         * elf/rtld.c (startup_error_tsd): New function.
1823         (dl_main): Point _dl_error_catch_tsd at that.
1824         * elf/dl-error.c: Don't use libc-tsd.h for DL_ERROR,
1825         use new function pointer instead.
1826         * elf/dl-tsd.c: New file.
1827         * elf/Makefile (routines): Add it.
1828
1829 2002-10-07  Roland McGrath  <roland@redhat.com>
1830
1831         * elf/dl-misc.c (_dl_debug_vdprintf): Use INTERNAL_SYSCALL macro for
1832         writev if it's available.  Otherwise if [RTLD_PRIVATE_ERRNO] then
1833         take _dl_load_lock around calling __writev.
1834
1835         * sysdeps/unix/sysv/linux/i386/sysdep.h (INTERNAL_SYSCALL): New macro.
1836         (INLINE_SYSCALL): Use that.
1837
1838         * sysdeps/generic/dl-sysdep.h: New file.
1839         * sysdeps/mach/hurd/dl-sysdep.h: New file.
1840         * sysdeps/generic/ldsodefs.h: Include <dl-sysdep.h>.
1841         * include/errno.h [IS_IN_rtld]: Include <dl-sysdep.h> to define ...
1842         [RTLD_PRIVATE_ERRNO]: Use a hidden global variable for errno and
1843         access it directly.
1844         * elf/dl-minimal.c (__errno_location): Removed.
1845         * sysdeps/unix/i386/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
1846         Use GOTOFF access for errno.
1847         * sysdeps/unix/sysv/linux/i386/sysdep.h
1848         [RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
1849
1850         * sysdeps/unix/x86_64/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
1851         Use PC-relative access for errno.
1852         * sysdeps/unix/sysv/linux/x86_64/sysdep.h
1853         [RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
1854
1855         * include/tls.h: New file.
1856         (USE___THREAD): New macro.
1857         Define to 1 under [USE_TLS && HAVE___THREAD] and only when compiling
1858         libc or libpthread.
1859         * sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD]: Conditional
1860         changed from [USE_TLS && HAVE___THREAD].
1861         * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
1862         * sysdeps/unix/i386/sysdep.S: Likewise.
1863         * sysdeps/unix/x86_64/sysdep.S: Likewise.
1864         * include/errno.h: Likewise.
1865         * include/netdb.h: Likewise.
1866         * include/resolv.h: Likewise.
1867
1868         * sysdeps/generic/errno.c: New file.
1869         * csu/Makefile (aux): New variable, list errno.
1870         * sysdeps/unix/sysv/linux/i386/sysdep.S (errno, _errno): Remove defns.
1871         * sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
1872         * sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise.
1873         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise.
1874         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise.
1875         * sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
1876         * sysdeps/unix/sysv/linux/cris/sysdep.S: Likewise.
1877         * sysdeps/unix/sysv/linux/hppa/sysdep.c: Likewise.
1878         * sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise.
1879         * sysdeps/unix/sysv/linux/powerpc/sysdep.c: Likewise.
1880         * sysdeps/unix/sysv/linux/sparc/sysdep.S: Likewise.
1881         * sysdeps/unix/sysv/linux/sh/sysdep.S: Likewise.
1882         * sysdeps/unix/alpha/sysdep.S: Likewise.
1883         * sysdeps/generic/start.c: Likewise.
1884         * sysdeps/unix/start.c: Likewise.
1885         * sysdeps/unix/arm/start.c: Likewise.
1886         * sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
1887         * sysdeps/unix/sparc/start.c: Likewise.
1888         * sysdeps/unix/sysv/irix4/start.c: Likewise.
1889         * sysdeps/unix/sysv/linux/mips/sysdep.S: File removed.
1890
1891         * manual/search.texi (Tree Search Function, Hash Search Function):
1892         Mention search.h clearly.
1893
1894 2002-10-05  Roland McGrath  <roland@redhat.com>
1895
1896         * elf/dl-fxstat64.c: File removed.
1897         * elf/dl-xstat64.c: File removed.
1898         * elf/Makefile (rtld-routines): Remove them.
1899         * sysdeps/unix/sysv/linux/xstat64.c: Remove RTLD_STAT64 conditionals.
1900         Instead, use strong_alias instead of versioned_symbol in the
1901         !SHLIB_COMPAT case.
1902         * sysdeps/unix/sysv/linux/fxstat64.c: Likewise.
1903         * sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
1904
1905         * include/shlib-compat.h
1906         (SHLIB_COMPAT): Require that IS_IN_##lib be defined nonzero.
1907         [! NOT_IN_libc] (IS_IN_libc): Define it.
1908         * cppflags-iterator.mk (CPPFLAGS-$(cpp-src)): Use -Dx=1 not just -Dx.
1909         * elf/Makefile (CPPFLAGS-.os): Likewise.
1910
1911         * sunrpc/rpc_main.c (main): Don't declare with noreturn attribute.
1912         Return the status instead of calling exit.
1913
1914         * Makeconfig (CFLAGS): Prepend -std=gnu99.
1915         * Makerules (+make-deps): Use $(CFLAGS) only for .c sources.
1916         Remove superfluous rm command, whose @ plus make bugs hid
1917         all these commands from the make output.
1918
1919         * include/stubs-prologue.h: New file.  Give #error under #ifdef _LIBC.
1920         * Makefile ($(inst_includedir)/gnu/stubs.h): Depend on it.
1921         Use that file's contents instead of literal echo's for the prologue.
1922         * include/features.h: Include <gnu/stubs.h> unconditionally.
1923         * include/gnu/stubs.h: New file.
1924
1925 2002-09-30  Roland McGrath  <roland@redhat.com>
1926
1927         * elf/rtld-Rules: New file.
1928         * elf/Makefile ($(objpfx)librtld.map, $(objpfx)librtld.mk,
1929         $(objpfx)rtld-libc.a): New targets.
1930         (generated): Add them.
1931         (reloc-link): Remove -o $@ from the variable.
1932         ($(objpfx)dl-allobjs.os): Add -o $@ after $(reloc-link).
1933         (distribute): Add rtld-Rules.
1934         (CPPFLAGS-.os): Define this instead of CFLAGS-.os.
1935         * Makerules ($(+sysdir_pfx)sysd-rules): Emit rules for rtld-% targets.
1936         (common-mostlyclean, common-clean): Clean up rtld-* files.
1937         * sysdeps/unix/make-syscalls.sh: Add rtld-*.os target name to rules.
1938
1939 2002-10-11  Roland McGrath  <roland@redhat.com>
1940
1941         * sysdeps/generic/dl-tls.c (__tls_get_addr): After freeing block in
1942         now-unused dtv slot, reset the slot to TLS_DTV_UNALLOCATED.
1943
1944         * elf/tls-macros.h [__x86_64__] (TLS_GD): Fix the sequence with the
1945         proper set of no-op insn prefixes.
1946
1947         * elf/tst-tls8.c (do_test): Use %zd format for l_tls_modid members.
1948
1949 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
1950
1951         * sysdeps/unix/sysv/linux/execve.c: Don't try calling
1952         __pthread_kill_other_threads_np.
1953
1954         * sysdeps/generic/pselect.c: Avoid unnecessary sigprocmask calls.
1955
1956 2002-10-08  Roland McGrath  <roland@redhat.com>
1957
1958         * locale/newlocale.c (__newlocale): If setting all categories to "C",
1959         just return &_nl_C_locobj instead of copying it.
1960         * locale/freelocale.c (__freelocale): Check for &_nl_C_locobj.
1961         * locale/duplocale.c (__duplocale): Likewise.
1962
1963 2002-10-07  Roland McGrath  <roland@frob.com>
1964
1965         * config.h.in (HAVE_I386_SET_GDT): New #undef.
1966         * sysdeps/mach/configure.in: Define it with new check for i386_set_gdt.
1967         * sysdeps/mach/configure: Regenerated.
1968
1969 2002-10-06  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1970
1971         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (INLINE_SYSCALL):
1972         Add all necessary register outputs for syscall-clobbered registers.
1973
1974 2002-10-02  David Mosberger  <davidm@hpl.hp.com>
1975
1976         * sysdeps/ia64/bzero.S: Rewritten by Sverre Jarp to tune for
1977         Itanium 2 (and Itanium).
1978         Fix unwind directives and make it fit in 80 columns.
1979         * sysdeps/ia64/memset.S: Likewise.
1980         * sysdeps/ia64/memcpy.S: Likewise.
1981         Move jump table to .rodata section.
1982
1983 2002-10-03  Roland McGrath  <roland@frob.com>
1984
1985         * sysdeps/mach/hurd/i386/init-first.c (_hurd_stack_setup): Add
1986         clobbers to asm.
1987
1988 2002-10-10  Andreas Jaeger  <aj@suse.de>
1989
1990         * sysdeps/x86_64/_mcount.S: Restore correct registers.
1991
1992 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
1993
1994         * posix/Versions (libc) [GLIBC_PRIVATE]: Add __pselect.
1995
1996 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
1997
1998         * sysdeps/generic/ldsodefs.h: Remove attribute_hidden from
1999         _dl_allocate_tls_init.  Add rtld_hidden_proto.
2000         * sysdeps/generic/dl-tls.c (_dl_allocate_tls_init): Add
2001         rtld_hidden_def.
2002         * elf/Versions (ld) [GLIBC_PRIVATE]: Add _dl_allocate_tls_init.
2003
2004         * version.h (VERSION): Bump to 2.3.1.
2005
2006         * Make-dist: Add back one of the tar invocations removed before.
2007
2008         * stdlib/Makefile (distribute): Add allocalim.h.
2009
2010         * sysdeps/generic/bits/libc-tsd.h [!(USE_TLS && HAVE___THREAD)]
2011         (__libc_tsd_address): Use correct variable name.
2012         Patch by Stefan Jones <stefan.jones@multigig.com>.
2013
2014         * sysdeps/unix/sysv/linux/ia64/getcontext.S: Add missing ;;.
2015         Reported by edwardsg@sgi.com [PR libc/4678].
2016
2017         * Versions.def (libc): Add GLIBC_2.3.1.
2018         (libpthread): Add GLIBC_2.3.1.
2019
2020         * include/signal.h: Add libc_hidden_proto for __sigwait, __sigwaitinfo,
2021         and __sigtimedwait.
2022         * signal/Versions: Add __sigtimedwait, __sigwait, and __sigwaitinfo.
2023         * sysdeps/unix/sysv/linux/sigtimedwait.c (__sigtimedwait): Add
2024         libc_hidden_def.
2025         * sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Likewise.
2026         * sysdeps/unix/sysv/linux/sigwaitinfo.c (__sigwaitinfo): Likewise.
2027
2028         * include/sys/msg.h: Declare __libc_msgrcv and __libc_msgsnd.
2029         * sysdeps/unix/sysv/linux/msgrcv.c (__msgrcv): Rename to __libc_msgrcv
2030         and make old name an alias.
2031         * sysdeps/unix/sysv/linux/msgsnd.c (__msgsnd): Rename to __libc_msgsnd
2032         and make old name an alias.
2033         * sysvipc/Versions (libc) [GLIBC_PRIVATE]: Add __libc_msgrcv and
2034         __libc_msgsnd.
2035
2036         * include/sys/uio.h: Declare __libc_readv and __libc_writev.
2037         * misc/Versions (libc) [GLIBC_PRIVATE]: Add __libc_readv and
2038         __libc_writev.
2039         * sysdeps/generic/readv.c (__readv): Rename to __libc_readv and make
2040         old name an alias.
2041         * sysdeps/posix/readv.c: Likewise
2042         * sysdeps/unix/sysv/aix/readv.c: Likewise.
2043         * sysdeps/unix/sysv/linux/readv.c: Likewise.
2044         * sysdeps/generic/writev.c (__writev): Rename to __libc_writev and make
2045         old name an alias.
2046         * sysdeps/posix/writev.c: Likewise
2047         * sysdeps/unix/sysv/aix/writev.c: Likewise.
2048         * sysdeps/unix/sysv/linux/writev.c: Likewise.
2049
2050         * include/sys/wait.h: Declare __waitid.
2051         * posix/Versions (libc) [GLIBC_PRIVATE]: Add __waitid.
2052         * sysdeps/generic/waitid.c (waitid): Rename to __waitid and make old
2053         name an alias.
2054         * sysdeps/posix/waitid.c: Likewise.
2055         * sysdeps/unix/sysv/aix/waitid.c: Likewise.
2056
2057         * sysdeps/unix/sysv/linux/syscalls.list: Add creat syscall.
2058
2059 2002-10-07  Jakub Jelinek  <jakub@redhat.com>
2060
2061         * include/alloca.h (__libc_use_alloca, __libc_alloca_cutoff): New
2062         prototypes.
2063         (__MAX_ALLOCA_CUTOFF): Define.
2064         Include allocalim.h.
2065         * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r,
2066         _nss_dns_gethostbyaddr_r): Use alloca or malloc to allocate
2067         host_buffer depending on __libc_use_alloca.
2068         * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyname_r,
2069         _nss_dns_getnetbyaddr_r): Use alloca or malloc to allocate
2070         net_buffer depending on __libc_use_alloca.
2071         * resolv/res_query.c (res_nquery): Use alloca or malloc to allocate
2072         buf depending on __libc_use_alloca.
2073         * resolv/gethnamaddr.c (gethostbyname2, gethostbyaddr): Likewise.
2074         * stdio-common/vfprintf.c (vfprintf): Use __libc_use_alloca
2075         instead of hardcoded constants.
2076         Pass proper size argument to alloca and compute end for wide char
2077         version.
2078         * stdio-common/printf_fp.c (__printf_fp): Use __libc_use_alloca
2079         instead of hardcoded constants.
2080         * string/strcoll.c (strcoll): Likewise.
2081         * string/strxfrm.c (strxfrm): Likewise.
2082         * sysdeps/posix/readv.c (__readv): Likewise.
2083         * sysdeps/posix/writev.c (__writev): Likewise.
2084         * sysdeps/generic/allocalim.h: New file.
2085
2086 2002-10-08  Roland McGrath  <roland@redhat.com>
2087
2088         * configure.in (aux_missing warning): Change "too old" to
2089         "incompatible versions", since for autoconf it's "too new" right now.
2090         * configure: Regenerated.
2091
2092         * configure.in (AUTOCONF): New check to set it.  Set to "no" if the
2093         one found doesn't work on our configure.in.
2094         * configure: Regenerated.
2095         * config.make.in (AUTOCONF): New substituted variable.
2096         * Makefile (autoconf-it-cvs): New canned sequence, broken out of ...
2097         (autoconf-it): ... here, use that instead of defining conditionally.
2098         Use $(AUTOCONF) instead of literal autoconf.
2099         [$(AUTOCONF) != no] (configure, %/configure): Protect these rules
2100         with this condition.
2101         * Make-dist (autoconf-it, configure, %/configure): Copy those changes.
2102
2103 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
2104
2105         * Make-dist (dist): Cleanup a bit.  We are not interested in the
2106         14 char filename limit anymore.  Remove intermediate files and
2107         symlinks.
2108
2109 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
2110
2111         * po/sk.po: Update from translation team.
2112         * po/tr.po: Likewise.
2113         * po/gl.po: Likewise.
2114
2115 2002-10-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2116
2117         * elf/tls-macros.h: Fix SH version of macros so as to match ABI syntax.
2118
2119 2002-10-03  Ulrich Drepper  <drepper@redhat.com>
2120
2121         * version.h (RELEASE): Change to stable.
2122
2123 2002-10-03  Jakub Jelinek  <jakub@redhat.com>
2124
2125         * sysdeps/unix/sysv/linux/_exit.c (__syscall_exit,
2126         __syscall_exit_group): New prototypes.
2127
2128 2002-10-03  Ulrich Drepper  <drepper@redhat.com>
2129
2130         * glibc 2.3 released.
2131
2132
2133 See ChangeLog.13 for earlier changes.