Update.
[jlayton/glibc.git] / ChangeLog
1 2002-04-30  Bruno Haible  <bruno@clisp.org>
2
3         * intl/loadmsgcat.c (_nl_init_domain_conv): Don't append //TRANSLIT to
4         the encoding if it already has slashes.
5         Reported by Perry Rapp <prapp@erols.com>.
6
7 2002-12-11  Roland McGrath  <roland@redhat.com>
8
9         * csu/Makefile ($(objpfx)elf-init.oS): Remove target, braino.
10         (CPPFLAGS-elf-init.oS, CFLAGS-elf-init.oS): New variables.
11         Turn off PIC for compiling this file.
12
13 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
14
15         * malloc/thread-m.h: Remove thread_id type and MUTEX_INITIALIZER
16         definitions.  Not needed.
17         [_LIBC]: Use definitions from libc-lock.h instead of referencing
18         pthread routines directly.
19         * malloc/arena.c (ptmalloc_unlock_all2): Don't add (void) to
20         mutex_init calls.
21         (arena_get2): Don't look at return value of mutex_lock.
22
23 2002-12-11  Roland McGrath  <roland@redhat.com>
24
25         * csu/Makefile ($(objpfx)elf-init.oS): New target, just clone
26         elf-init.o instead of compiling a PIC version.
27
28 2002-12-11  Bruno Haible  <bruno@clisp.org>
29
30         * intl/gettext.h: Renamed to ...
31         * intl/gmo.h: ... here.
32         * intl/Makefile (distribute): Add gmo.h, remove gettext.h.
33         * intl/gettextP.h: Update.
34         * intl/loadmsgcat.c: Update.
35
36         * intl/gettextP.h (PARAMS): Make more portable.
37         (attribute_hidden): Define as empty macro if not already defined.
38         * intl/hash-string.h (PARAMS): Make more portable.
39         * intl/loadinfo.h (PARAMS): Likewise.
40         * intl/plural-exp.h (PARAMS): Likewise.
41         (attribute_hidden): Move definition near the definition of
42         internal_function.
43
44         * intl/gettextP.h (_nl_locale_name) [!_LIBC]: New declaration.
45         * intl/plural-exp.h (plural_eval) [!_LIBC]: New declaration.
46
47 2002-07-13  Bruno Haible  <bruno@clisp.org>
48
49         * intl/dcigettext.c (freea): New macro.
50         (FREE_BLOCKS): Free also the registered blocks.
51         (DCIGETTEXT): Free the 'search' variable.
52         Reported by Andreas Fischer <a.fischer@asentics.de>.
53
54 2002-04-27  Bruno Haible  <bruno@clisp.org>
55
56         * intl/gettextP.h [! _LIBC]: Use prefix libintl_ instead of suffix __.
57         * intl/dcigettext.c: Likewise.
58         * intl/dcgettext.c: Likewise.
59         * intl/dgettext.c: Likewise.
60         * intl/gettext.c: Likewise.
61         * intl/dcngettext.c: Likewise.
62         * intl/dngettext.c: Likewise.
63         * intl/ngettext.c: Likewise.
64         * intl/textdomain.c: Likewise.
65         * intl/bindtextdom.c: Likewise.
66         * intl/plural-exp.h: Likewise.
67
68 2002-01-02  Bruno Haible  <bruno@clisp.org>
69
70         * intl/loadmsgcat.c (_nl_init_domain_conv): Use PARAMS in extern decl.
71
72 2001-04-30  Bruno Haible  <bruno@clisp.org>
73
74         * intl/dcigettext.c (getuid, getgid, geteuid, getegid): Provide
75         default macro definitions.  Needed for mingw32.
76
77 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
78
79         * sysdeps/i386/bits/byteswap.h (__bswap_64): Apply
80         __builtin_constant_p to macro parameter.
81
82         * sysdeps/generic/sigpause.c: Define all functions as weak.
83         * sysdeps/posix/sigpause.c: Likewise.
84
85         * elf/tst-tls7.c (do_test): Adjustments for l_tls_modid being of
86         type size_t.
87
88 2002-12-10  Jakub Jelinek  <jakub@redhat.com>
89
90         * elf/tst-array1.c (preinit_array, init_array, fini_array):
91         Explicitly align the array to sizeof (void *).
92         * elf/tst-array2dep.c (init_array, fini_array): Likewise.
93
94         * include/libc-symbols.h: Fix a comment typo.
95
96         * sysdeps/unix/sysv/linux/alpha/select.S (__libc_select): New alias.
97         * sysdeps/unix/sysv/linux/alpha/sigsuspend.S (__libc_sigsuspend):
98         Likewise.
99         * sysdeps/unix/sysv/linux/ia64/sigsuspend.c (__libc_sigsuspend):
100         Likewise.
101         * sysdeps/unix/sysv/linux/s390/s390-64/sigsuspend.c
102         (__libc_sigsuspend): Likewise.
103         * sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c
104         (__libc_sigsuspend): Likewise.
105         * sysdeps/generic/creat.c (__libc_creat): Renamed from creat.
106         (creat): New weak alias.
107
108 2002-12-10  Roland McGrath  <roland@redhat.com>
109
110         * manual/libc-texinfo.sh: Emit @set ADD-ON for each ADD-ON that
111         contributes a manual chapter.
112         * manual/signal.texi (Process Signal Mask): Use @ifset linuxthreads
113         around xref to it.
114
115         * sysdeps/unix/sysv/linux/dl-librecon.h (EXTRA_LD_ENVVARS): Refer to
116         and move contents to ...
117         (EXTRA_LD_ENVVARS_LINUX): ... this new macro.  Add break for nonmatch.
118         * sysdeps/unix/sysv/linux/i386/dl-librecon.h (EXTRA_LD_ENVVARS): Use
119         it instead of duplicating its contents.
120         (EXTRA_LD_ENVVARS): Likewise.  Add break for nonmatch.
121
122 2002-12-09  Jakub Jelinek  <jakub@redhat.com>
123
124         * elf/dl-support.c (_dl_non_dynamic_init): Add DL_OSVERSION_INIT if
125         defined.
126         * sysdeps/unix/sysv/linux/dl-librecon.h (_dl_osversion_init): New
127         function.
128         (EXTRA_LD_ENVVARS): Use it.
129         (DL_OSVERSION_INIT): Define.
130         * sysdeps/unix/sysv/linux/i386/dl-librecon.h: Include linux
131         dl-librecon.h.
132         (EXTRA_LD_ENVVARS): Undef before defining.  Use _dl_osversion_init.
133
134 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
135
136         * Versions.def: No new symbols in 2.3.1, but some new ones in 2.3.2.
137
138         * sysdeps/unix/closedir.c (__closedir): Remove __libc_lock_lock
139         call.  It is not allowed to destroy pthread mutexes which are
140         still in use even though it is safe for our implementations.  If
141         somebody still uses the descriptor it is a bug.
142
143 2002-12-09  Richard Henderson  <rth@redhat.com>
144
145         * csu/abi-note.S: Use .p2align, not .align.
146
147 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
148
149         * sysdeps/unix/sysv/linux/syscalls.list: Add __libc_creat and
150         __libc_select aliases.
151
152         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Define __libc_sigwaitinfo
153         alias.
154
155         * sysdeps/unix/sysv/linux/sigwait.c: Define __libc_sigwait alias.
156
157         * sysdeps/unix/sysv/linux/sigsuspend.c: Define __libc_sigsuspend alias.
158
159         * sysdeps/unix/sysv/linux/poll.c: Define __libc_poll alias.
160
161         * sysdeps/unix/syscalls.list: Define __libc_select alias.
162
163         * sysdeps/posix/waitid.c: Define __libc_waitid alias.
164
165         * sysdeps/posix/sigpause.c: Define __libc_sigpause and
166         __libc___xpg_sigpause aliases.
167
168         * sysdeps/generic/pselect.c: Define __libc_pselect alias.
169
170         * misc/error.c: Remove use of USE_IN_LIBIO.
171
172 2002-12-08  Roland McGrath  <roland@redhat.com>
173
174         * elf/Makefile (tests): Uncomment tst-array[123].
175         * Makeconfig (CPPFLAGS-.oS): Add -DLIBC_NONSHARED=1.
176         * csu/elf-init.c: New file.
177         * csu/Makefile (routines, static-only-routines): Add elf-init.
178         * sysdeps/alpha/elf/start.S: Use __libc_csu_init in place of _init
179         and __libc_csu_fini in place of _fini.
180         * sysdeps/arm/elf/start.S: Likewise.
181         * sysdeps/cris/elf/start.S: Likewise.
182         * sysdeps/hppa/elf/start.S: Likewise.
183         * sysdeps/i386/elf/start.S: Likewise.
184         * sysdeps/ia64/elf/start.S: Likewise.
185         * sysdeps/m68k/elf/start.S: Likewise.
186         * sysdeps/mach/hurd/powerpc/static-start.S: Likewise.
187         * sysdeps/mips/elf/start.S: Likewise.
188         * sysdeps/powerpc/powerpc32/elf/start.S: Likewise.
189         * sysdeps/powerpc/powerpc64/elf/start.S: Likewise.
190         * sysdeps/s390/s390-32/elf/start.S: Likewise.
191         * sysdeps/s390/s390-64/elf/start.S: Likewise.
192         * sysdeps/sh/elf/start.S: Likewise.
193         * sysdeps/sparc/sparc32/elf/start.S: Likewise.
194         * sysdeps/sparc/sparc64/elf/start.S: Likewise.
195         * sysdeps/x86_64/elf/start.S: Likewise.
196
197         * sysdeps/pthread/aio_notify.c (notify_func_wrapper): Take a malloc'd
198         struct containing function ptr and value, free it.
199         (__aio_notify_only): Allocate that and copy values from SIGEV into it.
200         It's not safe to let the new thread use the SIGEV pointer.
201
202 2001-10-20  Paul Eggert  <eggert@twinsun.com>
203
204         * misc/error.c (strerror_r): Do not declare unless [!_LIBC].
205         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
206         Use strerror_r that is only a macro, even if it is not a function.
207         (strerror): Check for HAVE_DECL_STRERROR before declaring.
208         (private_strerror): Use prototypes, not old-style function definition.
209         (print_errno_message): New function.
210         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
211         char*-flavored one.
212         (error_tail, error, error_at_line): Use it.
213
214 2002-12-07  Carlos O'Donell  <carlos@baldric.uwo.ca>
215
216         * sysdeps/unix/sysv/linux/hppa/bits/shm.h: Added SHMLBA #define.
217
218 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
219
220         * scripts/output-format.sed: Fix bug in one of the s expressions
221         which used / for one too many things.
222
223         * include/unistd.h: Declare __libc_close.
224
225 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
226
227         * sysdeps/generic/bits/stdio-lock.h (_IO_lock_trylock): New define.
228
229 2002-12-07  Roland McGrath  <roland@redhat.com>
230
231         * sysdeps/generic/libc-tls.c (__libc_setup_tls): Reintroduce changes
232         from 2002-12-06, but remove unnecessary memset call without removing
233         necessary copy of initialization image.
234
235         * Makerules ($(common-objpfx)format.lds): New target.
236         (common-generated): Add it.
237         ($(inst_libdir)/libc.so): Depend on that, and cat it into the result.
238         * scripts/output-format.sed: New file.
239         * Makefile (distribute): Add it.
240
241 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
242
243         * sysdeps/generic/libc-tls.c: Include <sys/param.h>.
244         Reported by Art Haas <ahaas@airmail.net>.
245
246 2002-12-07  Kenneth W. Chen  <kenneth.w.chen@intel.com>
247
248         * sysdeps/ia64/strncpy.S (strncpy): Clear ar.ec.  Fix .recovery4.
249
250 2002-12-07  Jakub Jelinek  <jakub@redhat.com>
251
252         * string/test-strncpy.c (do_random_tests): Improve test coverage.
253
254 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
255
256         * test-skeleton.c (timeout_handler): Allow expected signal to be
257         SIGALRM.
258
259         * wctype/wcfuncs.c: Add libc_hidden_def for iswalnum.
260
261         * sysdeps/posix/raise.c: Add libc_hidden_def for raise.
262
263 2002-12-07  Jakub Jelinek  <jakub@redhat.com>
264
265         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h [RTLD_PRIVATE_ERRNO]
266         (SYSCALL_ERROR_HANDLER): Fix a pasto.
267         Reported by Jeff Bailey <jbailey@nisa.net>.
268
269 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
270
271         * sysdeps/generic/libc-tls.c: Undo last patch.
272
273         * include/wctype.h: Define iswalnum with libc_hidden_proto.
274
275         * include/signal.h: Define raise with libc_hidden_proto.
276
277         * sysdeps/unix/sysv/linux/fexecve.c (fexecve): Use __snprintf and
278         __execve instead of snprintf and execve.
279
280         * sysdeps/x86_64/fpu/libm-test-ulps: Relax errors for float and double
281         again a bit.
282
283 2002-12-06  Jakub Jelinek  <jakub@redhat.com>
284
285         * posix/Makefile (annexc.out): Add -I../dir for all sorted-dirs.
286         * posix/annexc.c (fmt, testfmt): Remove -D_LIBC.
287
288 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
289
290         * misc/syslog.c (log_cleanup): New function.
291         (openlog): Use log_cleanup instead of __libc_mutex_unlock.
292         (closelog): Likewise.
293
294         * elf/dl-close.c: Use __rtld_lock_* macros instead of __libc_lock_*.
295         * elf/dl-iteratephdr.c: Likewise.
296         * elf/dl-lookup.c: Likewise.
297         * elf/dl-misc.c: Likewise.
298         * elf/dl-open.c: Likewise.
299         * elf/dl-support.c: Likewise.
300         * elf/rtld.c: Likewise.
301         * sysdeps/generic/ldsodefs.h: Likewise.
302         * sysdeps/generic/bits/libc-lock.h: Define __rtld_lock_* macros.
303         * sysdeps/mach/bits/libc-lock.h: Likewise.
304         * sysdeps/mach/hurd/bits/libc-lock.h: Likewise.
305
306 2002-12-06  Roland McGrath  <roland@redhat.com>
307
308         * sysdeps/generic/libc-tls.c (__libc_setup_tls): Cope with zero ALIGN.
309
310         * malloc/hooks.c [_LIBC && (USE___THREAD || (USE_TLS && !SHARED))]
311         (malloc_starter, memalign_starter, free_starter): Don't define these.
312         * malloc/malloc.c [_LIBC && (USE___THREAD || (USE_TLS && !SHARED))]:
313         Don't declare them either.
314         * malloc/arena.c (ptmalloc_init) [_LIBC && USE_TLS]: Don't call
315         __pthread_initialize, so no need to set hooks to *_starter.
316         (ptmalloc_init_minimal): New function, broken out of ptmalloc_init.
317         [_LIBC && SHARED && USE_TLS && !USE___THREAD]
318         (__libc_malloc_pthread_startup): New function.
319         * malloc/Versions (libc: GLIBC_PRIVATE): New set, add that function.
320
321         * malloc/hooks.c (memalign_starter): New function.
322         * malloc/malloc.c: Declare it.
323         * malloc/arena.c (save_memalign_hook): New variable.
324         (ptmalloc_init): Set __memalign_hook to memalign_starter.
325
326         * elf/dl-minimal.c (free): Clear the memory.
327         (calloc): Just call malloc, knowing all memory it returns is cleared.
328
329         * sysdeps/generic/dl-tls.c (allocate_dtv): Use calloc instead of
330         malloc and memset; calloc can avoid the zeroing when redundant.
331         (_dl_tls_setup): Likewise.
332         * elf/dl-load.c (decompose_rpath): Likewise.
333         * sysdeps/generic/libc-tls.c (__libc_setup_tls): Comment out memset
334         call, since memory from sbrk at startup is already zero.
335
336         * elf/rtld.c (_dl_start, dl_main): TLS_INIT_TP macro now returns an
337         error string for failure, null for success.  Update callers.
338         * sysdeps/generic/libc-tls.c (__libc_setup_tls): Likewise.
339         * elf/dl-load.c (_dl_map_object_from_fd): Likewise.
340
341 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
342
343         * sysdeps/unix/sysv/linux/x86_64/syscalls.list (sendfile): Change
344         args to i:iipi.
345         (readahead): Change args to i:iii.
346         * sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list (readahead):
347         Change args to i:iii.
348         * sysdeps/unix/sysv/linux/mips/syscalls.list (readahead): Change
349         args to i:iiii.
350
351 2002-12-05  Roland McGrath  <roland@redhat.com>
352
353         * stdlib/cxa_finalize.c (__cxa_finalize): When given a null argument,
354         call all functions rather than none.
355         Reported by Mark P. Mitchell <mark@codesourcery.com>.
356
357 2002-12-04  Roland McGrath  <roland@redhat.com>
358
359         * locale/localeinfo.h [NL_CURRENT_INDIRECT]: Use attribute_tls_model_ie
360         on _nl_current_LC_* variables.
361
362 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
363
364         * dirent/bug-readdir1.c (main): Don't call closedir, just close
365         the file descriptor.  This is testing what the bug report was about.
366
367 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
368
369         * po/be.po: New file.
370
371         * argp/Makefile (tests): Add tst-argp1.
372
373         * sysdeps/unix/sysv/linux/alpha/bits/siginfo.h: (struct sigevent):
374         Change type of _attribute to void*.
375         * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Likewise.
376         * sysdeps/unix/sysv/linux/bits/siginfo.h: Likewise.
377         * sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Likewise.
378         * sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Likewise.
379         * sysdeps/unix/sysv/linux/s390/bits/siginfo.h: Likewise.
380
381 2002-12-04  Roland McGrath  <roland@redhat.com>
382
383         * sysdeps/generic/ldsodefs.h (struct rtld_global): Move all [USE_TLS]
384         members to the end, so a libpthread compiled with !USE_TLS will still
385         find other members properly.
386
387         * sysdeps/i386/i486/bits/string.h (__strcpy_g): Add dummy output
388         operand for DEST memory.  Fix dummy input operand to use SRC.
389         Reported by Davin McCall <davmac@ozonline.com.au>.
390
391         * sysdeps/generic/libc-tls.c (__libc_setup_tls): Account for TCB
392         alignment when initializing the DTV entry.
393
394         * elf/dl-load.c (_dl_map_object_from_fd): If we hit a TLS segment
395         when TLS has not been set up, try to set it up if we can.
396         * elf/tst-tls4.c: Revert last change.
397         * elf/tst-tls5.c: Likewise.
398         * elf/tst-tls6.c: Likewise.
399         * elf/tst-tls7.c: Likewise.
400         * elf/tst-tls8.c: Likewise.
401         * elf/tst-tls9.c: Likewise.
402
403         * sysdeps/generic/dl-tls.c [SHARED] (_dl_tls_setup): New function.
404         * sysdeps/generic/ldsodefs.h: Declare it.
405         * elf/Versions (ld: GLIBC_PRIVATE): Add it.
406         * sysdeps/generic/libc-tls.c (init_slotinfo): New static inline
407         function, broken out of __libc_setup_tls.
408         (init_static_tls): Likewise.
409         (__libc_setup_tls): Call them.
410         (_dl_tls_setup): New function, uses new subroutines.
411
412         * elf/dl-close.c (free_slotinfo): Make argument pointer to pointer.
413         Clear the pointer when returning true.
414         (libc_freeres_fn) [SHARED]: If GL(dl_initial_dtv) is null, free the
415         first element of the slotinfo list too.
416
417         * sysdeps/generic/dl-tls.c (_dl_determine_tlsoffset): Define only if
418         [SHARED].
419
420         * sysdeps/generic/ldsodefs.h (_dl_next_tls_modid): Declare as hidden.
421         (_dl_determine_tlsoffset): Likewise.
422
423         * elf/rtld.c (_dl_initial_error_catch_tsd): Renamed from
424         startup_error_tsd, made global.
425         (dl_main): Update initialization.
426         * elf/dl-tsd.c: Likewise.
427         * sysdeps/generic/ldsodefs.h: Declare it.
428
429 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
430
431         * manual/texinfo.tex: Update from latest upstream version.
432
433 2002-12-03  Roland McGrath  <roland@redhat.com>
434
435         * sysdeps/generic/libc-tls.c (__libc_setup_tls): Include static TLS
436         area surplus in calculation for sbrk call.
437
438         * iconvdata/cp1125.c: New file.
439         * iconvdata/Makefile (distribute): Add it.
440         (modules): Add CP1125.
441         (gen-8bit-gap-modules): Add cp1125.
442         * iconvdata/gconv-modules: Add CP1125, alias RUSCII.
443         * iconvdata/tst-tables.sh: Add CP1125 to the list to test.
444
445 2002-12-03  Andreas Jaeger  <aj@suse.de>
446
447         * sysdeps/x86_64/fpu/libm-test-ulps: Regenerated.
448
449 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
450
451         * sysdeps/posix/system.c (do_system): Make signal handler
452         installation thread safe.
453
454 2002-12-02  Roland McGrath  <roland@redhat.com>
455
456         * sysdeps/unix/sysv/linux/alpha/syscalls.list (readahead): Change
457         caller from EXTRA to -.
458         * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
459         * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
460         * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
461
462 2002-12-02  Carlos O'Donell  <carlos@baldric.uwo.ca>
463
464         * sysdeps/hppa/fpu/fesetround.c (fesetround): Use ~FE_DOWNWARD so both
465         bits of RM are cleared.
466
467 2002-12-02  Roland McGrath  <roland@redhat.com>
468
469         * elf/tst-tls4.c: Define an unused TLS variable here, so that no lazy
470         TLS setup is required.
471         * elf/tst-tls5.c: Likewise.
472         * elf/tst-tls6.c: Likewise.
473         * elf/tst-tls7.c: Likewise.
474         * elf/tst-tls8.c: Likewise.
475         * elf/tst-tls9.c: Likewise.
476
477         * elf/rtld.c (dl_main): Remove [! SHARED] conditional from
478         `if (GL(dl_tls_max_dtv_idx) > 0)' tests for doing TLS setup.
479         * elf/dl-close.c (libc_freeres_fn): Check GL(dl_tls_dtv_slotinfo_list)
480         for being null before calling free_slotinfo.
481         * elf/dl-load.c (_dl_map_object_from_fd) [SHARED]: For PT_TLS in
482         dynamic loading, bail with error if GL(dl_tls_max_dtv_idx) is zero.
483
484 2002-11-30  Bruno Haible  <bruno@clisp.org>
485
486         * iconv/gconv.h (__gconv_btowc_fct): New typedef.
487         (struct __gconv_step): New field __btowc_fct.
488         * wcsmbs/btowc.c (__btowc): Use the __btowc_fct shortcut if possible.
489         * iconv/gconv_int.h (__BUILTIN_TRANSFORM): Renamed from
490         __BUILTIN_TRANS.
491         (__gconv_btwoc_ascii): New declaration.
492         * iconv/gconv_simple.c (BUILTIN_TRANSFORMATION): Add BtowcFct argument.
493         (__gconv_btwoc_ascii): New function.
494         * iconv/gconv_builtin.h: Add BtowcFct argument to all
495         BUILTIN_TRANSFORMATION invocations.
496         * iconv/gconv_conf.c (BUILTIN_TRANSFORMATION): Add BtowcFct argument.
497         * iconv/iconvconfig.c (BUILTIN_TRANSFORMATION): Likewise.
498         * iconv/gconv_builtin.c (map): New field btowc_fct.
499         (BUILTIN_TRANSFORMATION): Add BtowcFct argument. Use it to initialize
500         btowc_fct field.
501         (__gconv_get_builtin_trans): Initialize __btowc_fct field.
502         * iconv/gconv_cache.c (find_module): Initialize __btowc_fct field.
503         * iconv/gconv_db.c (gen_steps, increment_counter): Likewise.
504         * wcsmbs/wcsmbsload.c (to_wc, to_mb): Likewise.
505         * iconv/skeleton.c: Document STORE_REST and FROM_ONEBYTE.
506         (gconv_init): Initialize __btowc_fct field.
507         Undefine EXTRA_LOOP_ARGS and FROM_ONEBYTE at the end.
508         * iconv/loop.c: Document ONEBYTE_BODY.
509         (gconv_btowc, FROM_ONEBYTE): Define if ONEBYTE_BODY is defined.
510         Undefine ONEBYTE_BODY at the end.
511         * iconvdata/8bit-generic.c (ONEBYTE_BODY): New macro.
512         * iconvdata/8bit-gap.c (NONNUL): New macro.
513         (BODY for FROM_LOOP): Use it.
514         (ONEBYTE_BODY): New macro.
515         * iconvdata/isiri-3342.c (HAS_HOLES): Set to 1.
516         (NONNUL): New macro.
517         * iconvdata/ansi_x3.110.c (ONEBYTE_BODY): New macro.
518         * iconvdata/armscii-8.c (ONEBYTE_BODY): New macro.
519         * iconvdata/cp1255.c (ONEBYTE_BODY): New macro.
520         * iconvdata/cp1258.c (ONEBYTE_BODY): New macro.
521         * iconvdata/tcvn5712-1.c (ONEBYTE_BODY): New macro.
522         * iconvdata/big5.c (ONEBYTE_BODY): New macro.
523         * iconvdata/big5hkscs.c (ONEBYTE_BODY): New macro.
524         * iconvdata/euc-cn.c (ONEBYTE_BODY): New macro.
525         * iconvdata/euc-jp.c (ONEBYTE_BODY): New macro.
526         * iconvdata/euc-jisx0213.c (ONEBYTE_BODY): New macro.
527         * iconvdata/euc-kr.c (ONEBYTE_BODY): New macro.
528         * iconvdata/euc-tw.c (ONEBYTE_BODY): New macro.
529         * iconvdata/gbk.c (ONEBYTE_BODY): New macro.
530         * iconvdata/gb18030.c (ONEBYTE_BODY): New macro.
531         * iconvdata/ibm932.c: Include <stdbool.h>.
532         (TRUE, FALSE): Remove macros.
533         (BODY for FROM_LOOP): Remove unused variable rp1.
534         (ONEBYTE_BODY): New macro.
535         (BODY for TO_LOOP): Use bool.
536         * iconvdata/ibm932.h (__ibm932sb_to_ucs4_idx): Remove array.
537         * iconvdata/ibm943.c: Include <stdbool.h>.
538         (TRUE, FALSE): Remove macros.
539         (BODY for FROM_LOOP): Remove unused variable rp1.
540         (ONEBYTE_BODY): New macro.
541         (BODY for TO_LOOP): Use bool.
542         * iconvdata/ibm943.h (__ibm943sb_to_ucs4_idx): Remove array.
543         * iconvdata/iso8859-1.c (ONEBYTE_BODY): New macro.
544         * iconvdata/iso_6937-2.c (ONEBYTE_BODY): New macro.
545         * iconvdata/iso_6937.c (ONEBYTE_BODY): New macro.
546         * iconvdata/johab.c (ONEBYTE_BODY): New macro.
547         * iconvdata/sjis.c (ONEBYTE_BODY): New macro.
548         * iconvdata/shift_jisx0213.c (ONEBYTE_BODY): New macro.
549         * iconvdata/t.61.c (ONEBYTE_BODY): New macro.
550         * iconvdata/uhc.c (ONEBYTE_BODY): New macro.
551         * iconvdata/gbbig5.c: Tweak comment.
552
553 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
554
555         * po/fi.po: Update from translation team.
556
557 2002-12-01  Roland McGrath  <roland@redhat.com>
558
559         * sysdeps/unix/sysv/linux/getdents.c (__GETDENTS): Fix condition
560         testing getdents64 return value.
561
562         * scripts/versions.awk: Don't pass -n flag to sort command.
563
564         * posix/bug-regex13.c: Include <string.h>.
565
566         * sysdeps/generic/libc-start.c (__libc_start_main): Do
567         DL_SYSDEP_OSCHECK here.
568         * sysdeps/unix/sysv/linux/init-first.c (init): Not here.
569         * sysdeps/unix/sysv/linux/dl-osinfo.h: Include <fcntl.h>.
570
571         * sysdeps/generic/libc-tls.c (__libc_setup_tls): Bail if
572         argument TCBSIZE <= TLS_INIT_TCB_SIZE, not just if it's zero.
573
574         * sysdeps/generic/dl-tls.c (_dl_allocate_tls_init): Check l_tls_offset
575         instead of l_type to decide whether to use TLS_DTV_UNALLOCATED.
576
577         * include/link.h: Comment typo fix.
578
579 2002-12-01  Roland McGrath  <roland@frob.com>
580
581         * sysdeps/mach/hurd/bits/posix_opt.h (_POSIX_FSYNC): Set to 200112L.
582         (_POSIX_SPAWN, _POSIX_MAPPED_FILES, _POSIX_MEMLOCK_RANGE,
583         _POSIX_MEMORY_PROTECTION): Likewise.
584         (_POSIX_POLL, _POSIX_SELECT): Removed.
585
586 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
587
588         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
589         require it to 200112L.  Remove _POSIX_POLL and _POSIX_SELECT.
590
591 2002-11-28  Jakub Jelinek  <jakub@redhat.com>
592
593         * sysdeps/unix/alpha/sysdep.S: Change defined(USE___THREAD) to
594         USE___THREAD.
595         * sysdeps/unix/sysv/linux/alpha/sysdep.h (inline_syscall*): Avoid
596         "=v" constraints.
597
598 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
599
600         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Don't trash the CPU's
601         branch prediction buffers by using unpaired call/ret.
602
603 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
604
605         * sysdeps/unix/sysv/linux/i386/sysdep.h (ASMFMT_2): Fix typo in
606         first parameters constraint string.
607         (ASMFMT_3): Likewise.  Patch by stefan.lauterbach@mincom.de.
608
609 2002-11-27  Isamu Hasegawa  <isamu@yamato.ibm.com>
610
611         * posix/regcomp.c (parse_expression): Set the bit since the back
612         reference is used in the regular expression.
613         * posix/regex_internal.c (re_node_set_init_1): Make it clean in case
614         of malloc failure.
615         (re_node_set_init_copy): Likewise.
616         * posix/regex_internal.h (state_array_t): New structure.
617         (re_sub_match_last_t): Likewise.
618         (re_sub_match_top_t): Likewise.
619         (re_match_context_t): Add new members.
620         (re_dfa_t): Likewise.
621         * posix/regexec.c (re_search_internal): Invoke prune_impossible_nodes
622         to check the matching is really correct, and retry if failed.
623         Move the routin pruning the impossible nodes from here, ...
624         (prune_impossible_nodes): To this function.
625         (check_matching): Invoke check_subexp_matching_top, and replace
626         redundant checking with transit_state_bkref invocation.
627         (proceed_next_node): Replace strncmp with memcmp.  Reported by
628         Paolo Bonzini  <bonzini@gnu.org>.
629         (update_cur_sifted_state): Remove search_subexp invocation.
630         (search_subexp): Remove this function.
631         (check_dst_limits_calc_pos): Use search_cur_bkref_entry for
632         optimization.
633         (sift_states_bkref): Use search_cur_bkref_entry for optimization.
634         Remove unused invocation of match_ctx_add_entry.
635         (transit_state): Invoke check_subexp_matching_top.
636         (check_subexp_matching_top): New function.
637         (transit_state_bkref): Remove unused array.
638         Merge transit_state_bkref_loop.
639         (transit_state_bkref_loop): Use get_subexp instead of
640         sift_states_backward.  Use search_cur_bkref_entry for optimization.
641         Merge this function to transit_state_bkref.
642         (get_subexp): New function.
643         (get_subexp_sub): Likewise.
644         (find_subexp_node): Likewise.
645         (check_arrival): Likewise.
646         (check_arrival_expand_ecl): Likewise.
647         (check_arrival_expand_ecl_sub): Likewise.
648         (expand_bkref_cache): Likewise.
649         (match_ctx_init): Initialize new members.
650         (match_ctx_clean): New function.
651         (match_ctx_free): Release new members.
652         (match_ctx_free_subtops): New function.
653         (match_ctx_add_entry): Fix indent.
654         (search_cur_bkref_entry): New function.
655         (match_ctx_add_subtop): Likewise.
656         (match_ctx_add_sublast): Likewise.
657
658 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
659
660         * iconv/Makefile (tests): Remove tst-iconv4.c
661         * iconv/tst-iconv4.c: Moved to...
662         * iconvdata/tst-iconv4.c: ...here.  New file.
663         * iconvdata/Makefile (tests): Add tst-iconv4.  Add dependencies.
664
665 2002-11-25  Roland McGrath  <roland@redhat.com>
666
667         * inet/test-ifaddrs.c (main: addr_string): Handle null SA.
668         Grok AF_LINK if defined.
669         From Momchil Velikov <velco@fadata.bg>.
670
671         * sysdeps/gnu/ifaddrs.c (getifaddrs): If ioctl fails for netmask,
672         brdaddr, or dstaddr, just set those pointers to null and don't fail.
673         Reported by Momchil Velikov <velco@fadata.bg>.
674
675         * sysdeps/generic/ifreq.h (__if_nextreq) [_HAVE_SA_LEN]: If sa_len
676         is > sizeof IFR->ifa_addr, advance past the whole longer length.
677         (__ifreq): Count up NIFS that way too.
678         Reported by Momchil Velikov <velco@fadata.bg>.
679
680         * sysdeps/mach/hurd/lchmod.c: Include <fcntl.h>.
681
682         * sysdeps/mach/hurd/i386/init-first.c: Include <ldsodefs.h>
683         and <fpu_control.h>.
684
685 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
686
687         * elf/elf.h (EM_ST19): Fix typo.
688
689 2002-11-25  Jakub Jelinek  <jakub@redhat.com>
690
691         * include/errno.h (__set_errno): Define as errno = val
692         unconditionally.
693
694 2002-11-24  Roland McGrath  <roland@redhat.com>
695
696         * sysdeps/posix/readv.c: Include <errno.h>, use __set_errno macro.
697         * sysdeps/posix/writev.c: Likewise.
698         From Momchil Velikov <velco@fadata.bg>.
699
700         * elf/dl-error.c [! _LIBC_REENTRANT]: Use a static variable instead of
701         calling *GL(dl_error_catch_tsd) for a thread-local location.
702         * elf/rtld.c (startup_error_tsd): Conditionalize on [_LIBC_REENTRANT].
703         (dl_main): Same for GL(dl_error_catch_tsd) initialization.
704         * elf/dl-tsd.c: Conditionalize contents on [_LIBC_REENTRANT].
705
706         * libio/iofflush.c: Add libc_hidden_def.
707         * libio/iofwrite.c: Likewise.
708         * sysdeps/generic/sigtimedwait.c: Likewise.
709         * sysdeps/generic/sigwaitinfo.c: Likewise.
710         * sysdeps/posix/sigwait.c: Likewise.
711         Reported by Momchil Velikov <velco@fadata.bg>.
712
713         * inet/inet_lnaof.c (inet_lnaof): Change return type to in_addr_t
714         to match <arpa/inet.h> declaration.
715         * inet/inet_netof.c (inet_netof): Likewise.
716         * inet/inet_mkadr.c (inet_makeaddr): Likewise for argument types.
717         Reported by Momchil Velikov <velco@fadata.bg>.
718
719         * configure.in: Skip AUTOCONF check under --without-cvs.
720         * configure: Regenerated.
721
722         * posix/Makefile (headers): Add bits/pthreadtypes.h.
723         * sysdeps/unix/sysv/linux/Makefile (sysdep_heaers): Don't add it here.
724         * sysdeps/unix/sysv/linux/Dist: Remove it from the list.
725
726 2002-11-24  Andreas Schwab  <schwab@suse.de>
727
728         * sysdeps/unix/sysv/linux/m68k/sysdep.h: Support inline syscall
729         with six arguments.
730
731 2002-11-19  Jim Meyering  <jim@meyering.net>
732
733         * time/mktime.c (__mon_yday, __mktime_internal) [!_LIBC]: Declare
734         as `static'.
735         * time/strptime.c (__mon_yday) [!_LIBC]: Declare as `static'.
736
737 2002-11-23  Roland McGrath  <roland@redhat.com>
738
739         * scripts/abilist.awk: Avoid strtonum function, not there in mawk.
740         Just produce hex output for datum sizes.
741
742         * elf/Makefile ($(objpfx)librtld.mk): Tighten up regexp.
743         Reported by Luca Barbieri <ldb@ldb.ods.org>.
744
745 2002-11-20  Steven Munroe  <sjmunroe@us.ibm.com>
746
747         * sysdeps/unix/sysv/linux/powerpc/bits/msq.h (msqid_ds)
748         [__WORDSIZE == 32]: Only PPC32 requires __unused1, __unused2,
749         and __unused3 fields.
750         * sysdeps/unix/sysv/linux/powerpc/bits/sem.h (semid_ds)
751         [__WORDSIZE == 32]: Only PPC32 requires __unused1
752         and __unused2 fields.
753         * sysdeps/unix/sysv/linux/powerpc/bits/shm.h (shmid_ds)
754         [__WORDSIZE == 32]: Only PPC32 requires __unused1, __unused2,
755         __unused3, and __unused4 fields.
756
757         * csu/gmon-start.c (__gmon_start__): Always use TEXT_START macro to
758         obtain lowest address for profiling in __monstartup call.
759
760 2002-11-21  Roland McGrath  <roland@redhat.com>
761
762         * sysdeps/ia64/fpu/Makefile (libm-sysdep_routines): Remove redunant
763         $(calls) $(calls:=f) $(long-c-$(long-double-fcts)).
764
765         * locale/localeinfo.h (struct locale_data): Revert last change.
766
767         * sysdeps/unix/sysv/linux/ia64/syscalls.list (s_exit_group): Add it.
768         From Ian Wienand <ianw@gelato.unsw.edu.au>.
769
770         * sysdeps/unix/sysv/linux/ia64/sysdep.h (__NR_pread): Define to
771         __NR_pread64 if not defined.
772         (__NR_pwrite): Define to __NR_pwrite64 if not defined.
773         From Ian Wienand <ianw@gelato.unsw.edu.au>.
774
775 2002-11-21  Roland McGrath  <roland@frob.com>
776
777         * sysdeps/mach/hurd/i386/init-first.c (posixland_init): Set
778         __libc_multiple_libcs here.  Call __setfpucw.
779
780 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
781
782         * elf/Makefile (tests): Don't run test-arrayX tests for now.
783
784         * sysdeps/unix/sysv/linux/bits/sched.h: Add new CLONE_* flags.
785         * sysdeps/unix/sysv/linux/i386/clone.S: Add support for
786         CLONE_CHILD_*TID flags.
787
788 2002-11-20  Andreas Jaeger  <aj@suse.de>
789
790         * sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h (SIGCONTEXT):
791         We pass struct ucontext on x86-64.
792         (GET_PC): Adjust.
793         (GET_FRAME): Adjust.
794         (GET_STACK): Adjust.
795
796 2002-11-20  Roland McGrath  <roland@redhat.com>
797
798         * sysdeps/powerpc/powerpc32/dl-machine.c [! SHARED]: Further
799         conditionalize [! DO_VERSIONING] #error.
800
801         * scripts/abilist.awk: Grok function descriptor symbols.
802
803         * intl/tst-gettext.c (main): Check return values from setlocale.
804         Add necessary unsetenv's to make LANG=existing-locale check work.
805
806         * intl/tst-gettext.sh: Use mkdir -p.  Copy test files unconditionally,
807         so aborted prior runs don't confuse things.
808
809         * locale/localeinfo.h (struct locale_data: union locale_data_value):
810         Use uintptr_t instead of unsigned int for `word' member.
811         (_NL_CURRENT_WORD): Cast to uint32_t.
812
813         * posix/bug-regex5.c (main): Use union to extract _NL_COLLATE_NRULES
814         value.
815
816 2002-11-20  Ulrich Drepper  <drepper@redhat.com>
817
818         * elf/tls-macros.h: Add IA-64 definitions.
819         Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
820
821         * iconv/Makefile (tests): Add tst-iconv4.
822         * iconv/tst-iconv4.c: New file.
823
824         * iconv/gconv_simple.c (internal_ucs4le_loop_unaligned): Return
825         __GCONV_EMPTY_INPUT only if input is really empty.  Otherwise
826         __GCONV_INCOMPLETE_INPUT.
827         (ucs4le_internal_loop): Likewise.
828         (ucs4le_internal_loop_unaligned): Likewise.
829         * iconvdata/unicode.c (PREPARE_LOOP): Likewise.
830         * iconvdata/utf-16.c (PREPARE_LOOP): Likewise.
831         * iconvdata/utf-32.c (PREPARE_LOOP): Likewise.
832
833         * iconv/loop.c (LOOPFCT): First test for empty input then for full
834         output buffer.
835
836         * inet/getnameinfo.c: Use extend_alloca where appropriate.
837         * sysdeps/posix/getaddrinfo.c: Likewise.
838
839         * include/alloca.h (extend_alloca): New define.  Based on stack
840         direction it'll try to append to the previouls allocated buffer.
841
842 2002-11-07  Thorsten Kukuk  <kukuk@suse.de>
843
844         * sysdeps/posix/getaddrinfo.c (gaih_inet): If AF_UNSPEC is set,
845         use the same service for AF_INET and AF_INET6.
846
847 2002-11-19  Ulrich Drepper  <drepper@redhat.com>
848
849         * intl/localealias.c (read_alias_file): Use only about 400 bytes
850         of stack space instead of 16k.
851
852 2002-11-18  Wolfram Gloger  <wg@malloc.de>
853
854         * malloc/arena.c
855         (ptmalloc_lock_all, ptmalloc_unlock_all, ptmalloc_unlock_all2): Do
856         nothing if not initialized.  Bug report from Marcus Brinkmann
857         <Marcus.Brinkmann@ruhr-uni-bochum.de>.
858
859 2002-11-19  Roland McGrath  <roland@redhat.com>
860
861         * posix/Versions (libc: GLIBC_2.3.2): Add sched_getaffinity and
862         sched_setaffinity.
863
864         * configure.in (libc_cv_gcc_dwarf2_unwind_info check): Use libraries
865         `-lgcc -lgcc_eh -lgcc', not just `-lgcc -lgcc_eh' in link commands for
866         test leading to libc_cv_gcc_dwarf2_unwind_info=no_registry_needed.
867         * configure: Regenerated.
868
869 2002-11-19  Ulrich Drepper  <drepper@redhat.com>
870
871         * include/dlfcn.h: __libc_dlopen is now a macro calling
872         __libc_dlopen_mode with the extra parameter RTLD_LAZY.
873         (__libc_dlopen_mode): New prototype.
874         * elf/dl-libc.c (__libc_dlopen_mode): Renamed from __libc_dlopen.  Add
875         new parameter.  Store new parameter in mode field of structure passed
876         to do_dlopen.
877         (struct do_dlopen_args): Add new field mode.
878         (do_dlopen): Pass mode from parameter structure to _dl_open.
879
880 2002-11-11  Randolf Chung  <tausq@debian.org>
881
882         * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h [__USE_FILE_OFFSET64]
883         (F_GETLK, F_SETLK, F_SETLKW): Define to F_*64 versions.
884         * sysdeps/unix/sysv/linux/hppa/fcntl.c: New file.
885
886         * sysdeps/hppa/fpu/libm-test-ulps: New file (generated).
887
888         * sysdeps/hppa/Makefile (CFLAGS-rtld.c): New variable.
889         Set -mdisable-fpregs for this file.
890
891 2002-11-11  Carlos O'Donell  <carlos@baldric.uwo.ca>
892
893         * sysdeps/unix/sysv/linux/configure.in:
894         Make 2.4.19 minimum linux kernel for hppa, and add unwind symbols
895         from gcc-3.0 era for backwards compatibility.
896         * sysdeps/unix/sysv/linux/configure: Regenerate.
897
898         * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h:
899         Define mcontext_t as a sigcontext.
900
901 2002-11-18  Roland McGrath  <roland@redhat.com>
902
903         * dlfcn/dlerror.c (fini): New function, __attribute__ ((destructor)).
904         Free memory in `last_result' if it was used.
905
906         * resolv/nss_dns/dns-network.c (getanswer_r): In BYNAME case, search
907         all aliases for one that matches the "<dotted-quad>.IN-ADDR.ARPA" form.
908         Do the parsing inline instead of copying strings and calling
909         inet_network, and properly skip all alias names not matching the form.
910
911         * manual/pattern.texi (Variable Substitution): Fix # and ## examples.
912
913 2002-11-17  Ulrich Drepper  <drepper@redhat.com>
914
915         * manual/pattern.texi (Wordexp Example): Fix sample code.
916
917         * sysdeps/unix/sysv/linux/i386/clone.S: Initialize word in the
918         childs stack which will be loaded into the %esi register.
919
920 2002-11-14  Paul Eggert  <eggert@twinsun.com>
921
922         * resolv/nss_dns/dns-network.c (getanswer_r): Check for buffer
923         overflow when skipping the question part and when unpacking aliases.
924
925 2002-11-15  Roland McGrath  <roland@redhat.com>
926
927         * math/Makefile (libm-calls): Remove s_copysign, s_isinf, s_isnan,
928         s_finite, s_modf, s_scalbn, s_frexp, m_ldexp, s_signbit.
929         Instead add $(calls:s_%=m_%) to get m_* versions of them all.
930
931 2002-11-15  Jakub Jelinek  <jakub@redhat.com>
932
933         * sysdeps/i386/dl-machine.h (elf_machine_rela): Handle R_386_COPY.
934         * sysdeps/arm/dl-machine.h (elf_machine_rela): Handle R_ARM_COPY.
935
936 2002-11-15  Roland McGrath  <roland@redhat.com>
937
938         * math/Makefile (libm-calls): Change s_ldexp to m_ldexp.
939         * Makerules ($(+sysdir_pfx)sysd-rules): Emit pattern rules for m_%.[Sc]
940         from sysdeps/.../s_%.[Sc] with commands $(+make-include-of-dep).
941         (+make-include-of-dep): New canned sequence.
942
943         * stdlib/canonicalize.c (__realpath): Check for malloc failure.
944         From Dmitry V. Levin <ldv@altlinux.org>.
945
946 2002-11-14  Roland McGrath  <roland@redhat.com>
947
948         * sysdeps/generic/errno.c (__libc_errno): Remove alias.
949         * inet/herrno.c (__libc_h_errno): Likewise.
950         * resolv/res_libc.c (__libc_res): Likewise.
951         [USE___THREAD]: Use this in place of [USE_TLS && HAVE___THREAD].
952         (__res_state) [! USE___THREAD]: Don't define as weak.
953         * csu/Versions: Revert last change.
954         * resolv/Versions: Revert last change.
955
956         * Makerules ($(common-objpfx)%.make): New pattern rule.
957         * tls.make.c: New file.
958         * Makefile (distribute): Add it.
959
960         * sysdeps/generic/errno.c [! USE___THREAD]
961         [HAVE_ELF && SHARED && DO_VERSIONING] (errno, _errno): Declare these
962         with compat_symbol so they are not link-time visible.
963         [! USE___THREAD] (__libc_errno): New alias for errno.
964         * csu/Versions [!(USE_TLS && HAVE___THREAD)] (libc: GLIBC_PRIVATE):
965         Add __libc_errno here.
966         * inet/herrno.c [USE___THREAD]: Use this conditional
967         in place of [USE_TLS && HAVE___THREAD].
968         [! USE___THREAD] [HAVE_ELF && SHARED && DO_VERSIONING]
969         (h_errno, _h_errno): Declare these with compat_symbol so they are not
970         link-time visible.
971         [! USE___THREAD] (__libc_h_errno): New alias for h_errno.
972         * resolv/res_libc.c [! USE___THREAD]
973         [HAVE_ELF && SHARED && DO_VERSIONING] (_res): Likewise.
974         (_res): Use __attribute__ ((section (".bss"))) so we can have an alias.
975         (__libc_res): Define as alias for _res.
976         * resolv/Versions [!(USE_TLS && HAVE___THREAD)] (libc: GLIBC_PRIVATE):
977         Add __libc_h_errno and __libc_res here.
978
979 2002-11-14  Jakub Jelinek  <jakub@redhat.com>
980
981         * csu/Versions (errno): Move STT_TLS symbol to GLIBC_PRIVATE for now.
982         * resolv/Versions (h_errno, _res): Likewise.
983
984 2002-11-14  Roland McGrath  <roland@redhat.com>
985
986         * Makerules (%.dynsym): Remove $(objpfx) from target and dep.
987         (%.symlist): Likewise.
988
989 2002-11-13  Roland McGrath  <roland@redhat.com>
990
991         * scripts/abilist.awk: New file.
992         * Makefile (distribute): Add it.
993         * Makerules ($(objpfx)%.dynsym, $(objpfx)%.symlist): New rules.
994         (tests): Depend on .symlist file for each $(install-lib.so-versioned).
995         [$(subdir) = elf] (tests): Depend on libc.symlist.
996         (generated, common-generated): Add those files.
997
998         * aclocal.m4 (LIBC_PROG_BINUTILS): Check for objdump, set OBJDUMP.
999         * configure: Regenerated.
1000         * config.make.in (OBJDUMP): New variable, substituted by configure.
1001
1002         * malloc/mcheck.c (struct hdr): New members `block' and `magic2'.
1003         (mallochook, reallochook): Set them up.
1004         (checkhdr): Check HDR->magic2 value.
1005         (freehook): Reset HDR->magic2.
1006         (memalignhook): New static function.
1007         (old_memalign_hook): New static variable.
1008         (mcheck, reallochook): Set __memalign_hook to memalignhook.
1009
1010         * sysdeps/generic/dl-tls.c (_dl_allocate_tls_storage): Zero the space
1011         for the new TCB.
1012
1013 2002-11-13  Andreas Jaeger  <aj@suse.de>
1014
1015         * sysdeps/unix/sysv/linux/x86_64/sigaction.c: Check for visibility
1016         attribute.
1017         * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
1018
1019 2002-11-11  Paul Eggert  <eggert@twinsun.com>
1020
1021         * manual/crypt.texi (Cryptographic Functions): Mention that
1022         the MD5 one-way algorithm is compatible with BSD's.
1023
1024 2002-11-11  Isamu Hasegawa  <isamu@yamato.ibm.com>
1025
1026         * posix/regex_internal.c (re_string_skip_chars): Also return the last
1027         wide character.
1028         (re_string_reconstruct): Calculate the context by itself when the
1029         offset points out of the valid range.
1030         (re_string_context_at): Use wide character when MB_CUR_MAX > 1.
1031         * posix/regex_internal.h (WIDE_NEWLINE_CHAR): New macro.
1032         (IS_WIDE_WORD_CHAR): New macro.
1033         (IS_WIDE_NEWLINE): New macro.
1034
1035 2002-11-12  Andreas Jaeger  <aj@suse.de>
1036
1037         * sysdeps/x86_64/strchr.S: Don't use one register for two
1038         purposes, this fixes a bug noticed by test-strchr.c.
1039
1040         * sysdeps/x86_64/strcat.S: Fix algorithm to align source pointer
1041         correctly.
1042
1043 2002-11-12  Roland McGrath  <roland@redhat.com>
1044
1045         * libio/libioP.h [_LIBC && !SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)]
1046         (_G_IO_NO_BACKWARD_COMPAT): Define it.
1047
1048         * sysdeps/ia64/dl-fptr.c [_LIBC_REENTRANT]: Include <ia64intrin.h>
1049         instead of <pt-machine.h>.
1050         [_LIBC_REENTRANT] (lock, unlock): Use __sync_lock_* macros instead of
1051         testandset.
1052         From Ian Wienand <ianw@gelato.unsw.edu.au>.
1053
1054 2002-11-10  Roland McGrath  <roland@redhat.com>
1055
1056         * libio/bug-wfflush.c (do_test): Call rewind instead of fsetpos.
1057         Call fputs instead of fwprintf (simpler to follow in debugger).
1058
1059         * crypt/md5-crypt.c: Doc fix.
1060
1061         * sysdeps/unix/make-syscalls.sh: Insert $(make-target-directory) at
1062         the beginning of generated target commands.
1063
1064         * csu/Makefile ($(objpfx)crti.o, $(objpfx)crtn.o): Add explicit
1065         dependencies for these in case implicit rule search skipped the
1066         nonexistent source directory.
1067         * sysdeps/gnu/Makefile ($(objpfx)errlist.d): Give this rule all the
1068         files with $(object-suffixes) as targets too.
1069         * Makerules [no_deps && objpfx] (before-compile): Add $(objpfx).
1070         and a target for it using $(make-target-directory).
1071
1072         * Rules (before-compile): Add $(common-objpfx)bits/stdio-lim.h.
1073
1074 2002-11-10  Roland McGrath  <roland@frob.com>
1075
1076         * sysdeps/unix/sysv/linux/bits/pthreadtypes.h: Moved to ...
1077         * sysdeps/generic/bits/pthreadtypes.h: ... here.
1078
1079         * sysdeps/mach/hurd/fcntl.c (__libc_fcntl): Treat a struct flock with
1080         l_start == 0 and l_len == 1 as we do l_len == 0.
1081
1082 2002-11-10  Ulrich Drepper  <drepper@redhat.com>
1083
1084         * po/da.po: Update from translation team.
1085
1086 2002-11-10  Roland McGrath  <roland@redhat.com>
1087
1088         * config.make.in (includedir): New variable, substituted by configure.
1089         Reported missing by Jocelyn Fournier <joc@presence-pc.com>.
1090         * Makeconfig (includedir): Use $(prefix), not $(exec_prefix).
1091
1092 2002-11-10  Andreas Jaeger  <aj@suse.de>
1093
1094         * sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h (enum): Add
1095         REG_OLDMASK and REG_CR2 to synch with kernel header.
1096         (NGREG): Increase.
1097
1098         * nss/getXXent.c (GETFUNC_NAME): Use union type to avoid strict
1099         aliasing problem.
1100         * nss/getXXbyYY_r.c (INTERNAL): Likewise.
1101         * nss/getnssent_r.c (__nss_getent_r): Likewise.
1102         (__nss_setent): Likewise.
1103         (__nss_getent_r): Likewise.
1104         * inet/getnetgrent_r.c (innetgr): Likewise.
1105         (__internal_setnetgrent_reuse): Likewise.
1106         (internal_getnetgrent_r): Likewise.
1107         * inet/ether_hton.c (ether_hostton): Likewise.
1108         * inet/ether_ntoh.c (ether_ntohost): Likewise.
1109         * sunrpc/netname.c (netname2user): Likewise.
1110         * sunrpc/publickey.c (getpublickey): Likewise.
1111         (getsecretkey): Likewise.
1112
1113 2002-11-09  Marcus Brinkmann  <marcus@gnu.org>
1114
1115         * sysdeps/mach/hurd/i386/ioperm.c (ioperm): Correct off by one
1116         error in range calculation.
1117
1118 2002-10-09  Jakub Jelinek  <jakub@redhat.com>
1119
1120         * string/test-strspn.c (do_test): Ensure zero termination.
1121         * string/test-strpbrk.c (do_test): Likewise.
1122         * string/test-strncmp.c (stupid_strncmp): Use strnlen, not strlen.
1123         * string/test-strncpy.c (stupid_strncpy): Likewise.
1124         * string/test-stpncpy.c (stupid_stpncpy): Likewise.
1125
1126 2002-10-08  Roland McGrath  <roland@redhat.com>
1127
1128         * string/test-string.h (test_init): Fill BUF1 and BUF2 with
1129         nonzero characters.
1130
1131 2002-09-22  H.J. Lu  <hjl@gnu.org>
1132
1133         * sysdeps/unix/sysv/linux/mmap64.c (MMAP2_PAGE_SHIFT): Renamed
1134         from PAGE_SHIFT.  Define if not defined.  Check MMAP2_PAGE_SHIFT
1135         only if __NR_mmap2 is defined.
1136
1137         * sysdeps/unix/sysv/linux/powerpc/mmap64.c: Moved to ...
1138         * sysdeps/unix/sysv/linux/mmap64.c: ... here.
1139         * sysdeps/unix/sysv/linux/hppa/mmap64.c: File removed.
1140         * sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c: FIle removed,
1141
1142 2002-11-08  Jakub Jelinek  <jakub@redhat.com>
1143
1144         * posix/bug-regex13.c (tests): Add new test.
1145
1146         * string/test-strchr.c (stupid_strchr): New function.
1147         (do_random_tests): Make sure the string is zero terminated.
1148         * string/test-strpbrk.c (stupid_strpbrk): New function.
1149         (do_random_tests): Make sure the string is zero terminated.
1150         * string/test-strcmp.c (stupid_strcmp): New function.
1151         (do_random_tests): Make sure the strings are zero terminated.
1152         * string/test-strspn.c (stupid_strspn): New function.
1153         (simple_strspn): Rename rej argument to acc.
1154         (do_random_tests): Make sure the string is zero terminated.
1155         * string/test-strcspn.c (stupid_strcspn): New function.
1156         * string/test-strncpy.c (stupid_strncpy): New function.
1157         * string/test-stpncpy.c (stupid_stpncpy): New function.
1158         * string/test-strncmp.c (stupid_strncmp): New function.
1159         (do_random_tests): Make sure the strings are zero terminated.
1160         * string/test-string.h (impl_t): Change test into long.
1161         (IMPL): Add __attribute__((aligned (sizeof (void *)))).
1162
1163 2002-11-08  Roland McGrath  <roland@redhat.com>
1164
1165         * sysdeps/ia64/elf/configure.in: Add TLS check.
1166         From Ian Wienand <ianw@cse.unsw.edu.au>.
1167         * sysdeps/ia64/elf/configure: Regenerated.
1168
1169 2002-11-07  Roland McGrath  <roland@redhat.com>
1170
1171         * libio/fileops.c (_IO_new_file_overflow): Use INTUSE(_IO_do_write) in
1172         place of _IO_new_do_write.
1173         [_LIBC] (_IO_do_write): Define as macro for _IO_new_do_write and
1174         #undef before versioned_symbol use.
1175
1176 2002-11-07  Richard Henderson  <rth@redhat.com>
1177
1178         * configure.in (ASM_ALPHA_NG_SYMBOL_PREFIX): Remove test.
1179         * configure: Regenerated.
1180         * config.h.in (ASM_ALPHA_NG_SYMBOL_PREFIX): Remove #undef.
1181         * sysdeps/alpha/dl-machine.h (TRAMPOLINE_TEMPLATE): Use !samegp.
1182         (RTLD_START): Likewise.  Access _dl_skip_args, _rtld_local, and
1183         _dl_fini via gp-relative relocations.
1184         * sysdeps/alpha/fpu/e_sqrt.c: Use !samegp.
1185
1186         * elf/tls-macros.h: Add alpha versions.
1187         * sysdeps/alpha/dl-machine.h (elf_machine_rela): Handle TLS relocs.
1188         * sysdeps/unix/alpha/sysdep.S: Support USE___THREAD.
1189         * sysdeps/unix/alpha/sysdep.h: Likewise.  Add SYSCALL_ERROR_HANDLER.
1190         * sysdeps/unix/sysv/linux/alpha/brk.S: Use it.
1191         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
1192         * sysdeps/unix/sysv/linux/alpha/getitimer.S: Likewise.
1193         * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise.
1194         * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise.
1195         * sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Likewise.
1196         * sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise.
1197         * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Likewise.
1198         * sysdeps/unix/sysv/linux/alpha/select.S: Likewise.
1199         * sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise.
1200         * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise.
1201         * sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Likewise.
1202         * sysdeps/unix/sysv/linux/alpha/syscall.S: Likewise.
1203         * sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise.
1204         * sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise.
1205
1206         * sysdeps/unix/sysv/linux/alpha/sysdep.h: Re-include protect.
1207         Kill argument registers across the inline syscall.
1208
1209         * sysdeps/unix/sysv/linux/alpha/clone.S: Add user_tid and tls args.
1210
1211         * linuxthreads/sysdeps/alpha/tls.h: New file.
1212         * sysdeps/alpha/dl-tls.h: New file.
1213
1214 2002-10-29  David Mosberger  <davidm@hpl.hp.com>
1215
1216         * sysdeps/ia64/elf/initfini.c [HAVE_INITFINI_ARRAY]
1217         (gmon_initializer): New function.
1218         (.init prologue): If HAVE_INITFINI_ARRAY is true, don't call
1219         __gmon_start__ here.  Call it from gmon_initializer() instead.
1220
1221 2002-03-12  H.J. Lu  <hjl@gnu.org>
1222
1223         * elf/Makefile [$(have-initfini-array) = yes] (tests): Add tst-array1,
1224         tst-array2, and tst-array3.
1225         [$(have-initfini-array) = yes] (tests-static): Add tst-array3.
1226         [$(have-initfini-array) = yes] (modules-names): Add tst-array2dep.
1227         ($(objpfx)tst-array1.out): New target.
1228         ($(objpfx)tst-array2): Likewise.
1229         ($(objpfx)tst-array2.out): Likewise.
1230         ($(objpfx)tst-array3.out): Likewise.
1231         * elf/tst-array1.c: New file.
1232         * elf/tst-array1.exp: Likewise.
1233         * elf/tst-array2.c: Likewise.
1234         * elf/tst-array2dep.c: Likewise.
1235         * elf/tst-array2.exp: Likewise.
1236         * elf/tst-array3.c: Likewise.
1237
1238 2002-10-28  David Mosberger  <davidm@hpl.hp.com>
1239
1240         * elf/dl-fini.c (_dl_fini): Invoke fini_array in _reverse_ order.
1241         Don't add L->l_addr to array entry values.
1242
1243 2002-11-07  Jakub Jelinek  <jakub@redhat.com>
1244
1245         * string/test-string.h: New file.
1246         * string/test-strlen.c: New file.
1247         * string/test-string.h: New file.
1248         * string/test-strcmp.c: New file.
1249         * string/test-strchr.c: New file.
1250         * string/test-strrchr.c: New file.
1251         * string/test-strcpy.c: New file.
1252         * string/test-stpcpy.c: New file.
1253         * string/test-strncpy.c: New file.
1254         * string/test-stpncpy.c: New file.
1255         * string/test-strpbrk.c: New file.
1256         * string/test-strcspn.c: New file.
1257         * string/test-strspn.c: New file.
1258         * string/test-strcat.c: New file.
1259         * string/test-strncmp.c: New file.
1260         * string/test-memchr.c: New file.
1261         * string/test-memcmp.c: New file.
1262         * string/test-memset.c: New file.
1263         * string/test-memcpy.c: New file.
1264         * string/test-mempcpy.c: New file.
1265         * string/test-memmove.c: New file.
1266         * string/Makefile (strop-tests): New variable.
1267         (tests): Add strop-tests.
1268         (distribute): Add test-string.h.
1269
1270 2002-11-06  Ulrich Drepper  <drepper@redhat.com>
1271
1272         * posix/regcomp.c: Use tabs instead of spaces.
1273         * posix/regexec.c: Likewise.
1274         * posix/regex_internal.h: Likewise.
1275
1276         * posix/regcomp.c (re_compile_fastmap_iter): Use __wcrtomb not wctomb.
1277
1278 2002-11-06  Jakub Jelinek  <jakub@redhat.com>
1279
1280         * posix/regcomp.c (re_compile_pattern): Don't set regs_allocated
1281         here.
1282         (regcomp): Don't set can_be_null here.
1283         (re_comp): Clear whole re_comp_buf with the exception of fastmap.
1284         (re_compile_internal): Clear can_be_null, set regs_allocated.
1285
1286         * posix/regcomp.c (re_set_fastmap): New function.
1287         (re_compile_fastmap_iter): Use it.  Remove redundant type ==
1288         COMPLEX_BRACKET check.
1289         * posix/regexec.c (re_search_internal): Optimize searching with
1290         fastmap.  Call re_string_reconstruct even if match_first is
1291         smaller than raw_mbs_idx.
1292
1293 2002-11-06  Isamu Hasegawa  <isamu@yamato.ibm.com>
1294
1295         * posix/regcomp (free_dfa_content): Use free_state.
1296         * posix/regex_internal.c (re_string_realloc_buffers): Don't edit
1297         pointers in case that realloc failed.
1298         (re_node_set_merge): Likewise.
1299         (register_state): Likewise.
1300         (create_newstate_common): Invoke memory release functions in case of
1301         error conditions.
1302         (create_ci_newstate): Likewise.
1303         (create_cd_newstate): Likewise.
1304         (free_state): New function.
1305         * posix/regexec.c (re_search_internal): Invoke memory release
1306         functions in case of error conditions.
1307         (sift_states_backward): Likewise.
1308         (merge_state_array): Likewise.
1309         (add_epsilon_src_nodes): Likewise.
1310         (sub_epsilon_src_nodes): Likewise.
1311         (search_subexp): Likewise.
1312         (sift_states_bkref): Likewise.
1313         (transit_state_sb): Likewise.
1314         (transit_state_mb): Likewise.
1315         (transit_state_bkref_loop): Likewise.
1316         (group_nodes_into_DFAstates): Likewise.
1317         (push_fail_stack): Don't edit pointers in case that realloc failed.
1318         (extend_buffers): Likewise.
1319         (match_ctx_add_entry): Likewise.
1320
1321 2002-11-06  Roland McGrath  <roland@redhat.com>
1322
1323         * sysdeps/unix/sysv/linux/mips/configure.in: File removed.
1324         * sysdeps/unix/sysv/linux/mips/configure: Likewise.
1325
1326         * configure.in: Add checks on as and ld for binutils 2.13 or later.
1327         * configure: Regenerated.
1328
1329 2002-11-06  Ulrich Drepper  <drepper@redhat.com>
1330
1331         * posix/regcomp.c (regcomp): __re_compile_fastmap can never fail.
1332         If re_compile_internal failed free fastmap buffer.
1333         (free_dfa_content): Broken out of regfree function.  Frees all dfa
1334         related data.
1335         (regfree): Add free_dfa_content.
1336         (re_compile_internal): If any of the called functions fails free
1337         all dfa related memory.
1338
1339 2002-11-05  Ulrich Drepper  <drepper@redhat.com>
1340
1341         * sysdeps/unix/sysv/linux/sys/sysctl.h: Add ugly hacks to prevent
1342         warnings from the kernel headers.
1343
1344 2002-11-05  Roland McGrath  <roland@redhat.com>
1345
1346         * sysdeps/unix/mips/sysdep.h [! __PIC__] (PSEUDO): Add nop after jump.
1347         From Johannes Stezenbach <js@convergence.de>.
1348
1349         * sysdeps/unix/sysv/linux/mips/Versions (libc: GLIBC_2.0): Change
1350         #errlist-compat magic comment to give 123 as size.
1351         (libc: GLIBC_2.1): Remove this set, moving #errlist-compat magic to ...
1352         (libc: GLIBC_2.2): ... here.
1353         (libc: GLIBC_2.3): Likewise.
1354
1355 2002-11-05  Ulrich Drepper  <drepper@redhat.com>
1356
1357         * elf/dl-fini.c (_dl_fini): Correct the increment of l_opencount
1358         which happens at the beginning so that we can unload modules in
1359         __libc_freeres.
1360
1361 2002-11-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1362
1363         * sysdeps/sh/bits/setjmp.h (JB_SIZE): Define only
1364         under [__USE_MISC || _ASM].
1365
1366         * elf/elf.h: Remove the obsolete SH TLS relocations.
1367
1368 2002-11-05  Ulrich Drepper  <drepper@redhat.com>
1369
1370         * posix/regcomp.c (regcomp): Initialize preg->can_be_null to zero.
1371
1372 2002-11-05  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1373
1374         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Handle
1375         __NR_pread64 and __NR_pwrite64.
1376         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise.
1377         * sysdeps/unix/sysv/linux/powerpc/pread.c: Remove __NR_pread64
1378         and __NR_pwrite64.
1379         Revert change to use INLINE_SYSCALL.
1380         * sysdeps/unix/sysv/linux/powerpc/pread64.c: Likewise.
1381         * sysdeps/unix/sysv/linux/powerpc/pwrite.c: Likewise.
1382         * sysdeps/unix/sysv/linux/powerpc/pwrite64.c: Likewise.
1383         * sysdeps/unix/sysv/linux/powerpc/ftruncate64.c: Revert change to use
1384         INLINE_SYSCALL.
1385         * sysdeps/unix/sysv/linux/powerpc/truncate64.c: Likewise.
1386
1387         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (INLINE_SYSCALL):
1388         Update clobber list and add a comment about the syscall ABI.
1389
1390         * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list (s_pread64,
1391         s_pwrite64, s_ftruncate, s_truncate): Re-add.
1392
1393 2002-11-05  Jakub Jelinek  <jakub@redhat.com>
1394
1395         * iconv/gconv_dl.c (free_mem): Clear loaded.
1396         * locale/loadarchive.c (_nl_archive_subfreeres): Call locale_data's
1397         cleanup if any.
1398
1399 2002-11-05  Ulrich Drepper  <drepper@redhat.com>
1400
1401         * sysdeps/unix/sysv/linux/fexecve.c: Include <stdio.h>.
1402
1403         * libio/ioseekoff.c: Remove INTDEF.  Define _IO_seekoff_unlocked.  Same
1404         as old code without locking.  _IO_seekoff calls this function after
1405         locking the stream.
1406         * libio/ioseekpos.c: Likewise for _IO_seekpos.
1407         * libio/libioP.h: Replace _IO_seekoff_internal and _IO_seekpos_internal
1408         prototypes with _IO_seekoff_unlocked and _IO_seekpos_unlocked
1409         prototypes.
1410         * libio/iolibio.h (_IO_fseek): Call _IO_seekoff_unlocked instead
1411         of _IO_seekoff_internal.
1412         (_IO_rewind): Likewise.
1413         * libio/ioftell.c: Likewise.
1414         * libio/ftello.c: Likewise.
1415         * libio/ftello64.c: Likewise.
1416         * libio/iofgetpos.c: Likewise.
1417         * libio/iofgetpos64.c: Likewise.
1418         * libio/oldiofgetpos.c: Likewise.
1419         * libio/oldiofgetpos64.c: Likewise.
1420         * libio/iofsetpos.c: Call _IO_seekpos_unlocked instead of
1421         _IO_seekpos_internal.
1422         * libio/iofsetpos64.c: Likewise.
1423         * libio/oldiofsetpos.c: Likewise.
1424         * libio/oldiofsetpos64.c: Likewise.
1425
1426 2002-11-04  Roland McGrath  <roland@redhat.com>
1427
1428         * sysdeps/unix/sysv/linux/powerpc/chown.c: Use INLINE_SYSCALL macro.
1429         * sysdeps/unix/sysv/linux/powerpc/ftruncate64.c: Likewise.
1430         * sysdeps/unix/sysv/linux/powerpc/ioctl.c: Likewise.
1431         * sysdeps/unix/sysv/linux/powerpc/pread.c: Likewise.
1432         * sysdeps/unix/sysv/linux/powerpc/pread64.c: Likewise.
1433         * sysdeps/unix/sysv/linux/powerpc/pwrite.c: Likewise.
1434         * sysdeps/unix/sysv/linux/powerpc/pwrite64.c: Likewise.
1435         * sysdeps/unix/sysv/linux/powerpc/tcgetattr.c: Likewise.
1436         * sysdeps/unix/sysv/linux/powerpc/tcsetattr.c: Likewise.
1437         * sysdeps/unix/sysv/linux/powerpc/truncate64.c: Likewise.
1438         * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list (s_ioctl,
1439         s_chown, s_ftruncate64, s_mmap2, s_pread64, s_pwrite64, s_truncate64,
1440         sys_fstat, sys_lstat, sys_mknod, sys_readv, sys_stat, sys_writev):
1441         Remove these, no longer used.
1442
1443 2002-11-04  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1444
1445         * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list (s_ipc,
1446         s_llseek, s_readahead, s_execve, s_fcntl, s_fcntl64, s_fstat64,
1447         s_getcwd, s_getdents, s_getdents64, s_getpmsg, s_getpriority,
1448         s_getrlimit, s_lstat64, s_poll, s_ptrace, s_putpmsg, s_reboot,
1449         s_setrlimit, s_sigaction, s_sigpending, s_sigprocmask, s_sigsuspend,
1450         s_stat64, s_sysctl, s_ugetrlimit, s_ustat, s_vfork): Remove now unused
1451         syscall stubs.
1452
1453         * sysdeps/unix/sysv/linux/pwrite.c: Fix typo.
1454         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.
1455         * sysdeps/unix/sysv/linux/powerpc/pread.c: Handle both __NR_pread64
1456         and __NR_pread.
1457         * sysdeps/unix/sysv/linux/powerpc/pread64.c: Likewise.
1458         * sysdeps/unix/sysv/linux/powerpc/pwrite.c: Handle both __NR_pwrite64
1459         and __NR_pwrite.
1460         * sysdeps/unix/sysv/linux/powerpc/pwrite64.c: Likewise.
1461
1462 2002-11-03  Roland McGrath  <roland@redhat.com>
1463
1464         * sysdeps/generic/ldsodefs.h (struct rtld_global): New member
1465         `_dl_tls_static_used'.
1466         * sysdeps/generic/libc-tls.c (_dl_tls_static_used): New variable.
1467         (__libc_setup_tls): Initialize it.  Let the initial value of
1468         _dl_tls_static_size indicate some surplus space in the computed value.
1469         * elf/dl-open.c (_dl_tls_static_size): New variable.
1470         * sysdeps/generic/dl-tls.c (_dl_determine_tlsoffset): Initialize
1471         _dl_tls_static_used.  Add some surplus space into _dl_tls_static_size.
1472         * elf/dl-reloc.c [USE_TLS] (allocate_static_tls): New function.
1473         (CHECK_STATIC_TLS): Use it.
1474         * elf/dl-close.c (_dl_close): Adjust _dl_tls_static_used when the
1475         closed objects occupied a trailing contiguous chunk of static TLS area.
1476
1477 2002-10-18  Bruno Haible  <bruno@clisp.org>
1478
1479         * charmaps/ISO_5428: Use Greek characters introduced in Unicode 3.0.
1480
1481 2002-11-04  Ulrich Drepper  <drepper@redhat.com>
1482
1483         * libio/wfileops.c (_IO_wfile_seekoff): Don't modify _offset and
1484         _wide_data->_IO_read_end if adjustment can be made in the current
1485         buffer.
1486
1487         * sysdeps/unix/sysv/linux/fexecve.c: New file.
1488
1489         * libio/bug-wfflush.c (do_test): Using fseek is not allowed when
1490         wide oriented streams are used.
1491
1492         * nss/getXXent_r.c (ENDFUNC_NAME): Don't do anything if the
1493         service hasn't been used [PR libc/4744].
1494
1495         * include/features.h: Use __STDC_VERSION__ not __STDC_VERSION.
1496         Reported by Miloslav Trmac <mitr@volny.cz> [PR libc/4766].
1497
1498         * manual/examples/dir.c: Don't include <stddef.h>.
1499         * manual/examples/select.c: Include <errno.h> for TEMP_FAILURE_RETRY.
1500         Reported by Frédéric Delanoy <delanoy_f@yahoo.com>.
1501
1502 2002-11-02  H.J. Lu  <hjl@gnu.org>
1503
1504         * stdio-common/reg-printf.c: Include <stddef.h>.
1505
1506 2002-11-03  Ulrich Drepper  <drepper@redhat.com>
1507
1508         * sysdeps/generic/libc-tls.c: Define _dl_tls_static_used.
1509
1510         * po/ca.po: Update from translation team.
1511         * po/es.po: Likewise.
1512
1513         * sysdeps/generic/segfault.c (catch_segfault): If HAVE_PROC_SELF
1514         is defined write out memory map.
1515         * sysdeps/unix/sysv/linux/segfault.c: New file.
1516
1517 2002-11-02  Roland McGrath  <roland@redhat.com>
1518
1519         * sysdeps/unix/sysv/linux/getdents.c (__GETDENTS): Use union type for
1520         pointers that can alias.
1521         Reported by Daniel Jacobowitz <drow@mvista.com>.
1522
1523         * sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h: New file.
1524
1525 2002-11-02  Roland McGrath  <roland@redhat.com>
1526
1527         * manual/filesys.texi (Reading/Closing Directory): Rewrite readdir_r
1528         description to be clearer and to say that *RESULT is set to ENTRY.
1529
1530 2002-10-30  Jakub Jelinek  <jakub@redhat.com>
1531
1532         * posix/regexec.c (build_trtable): Alloca or malloc dests_node and
1533         dests_ch arrays together.  Alloca or malloc dest_states,
1534         dest_states_word and dest_states_nl arrays together.  Free memory on
1535         error exit.
1536
1537 2002-10-29  Daniel Jacobowitz  <drow@mvista.com>
1538
1539         * crypt/crypt_util.c (__init_des_r): Initialize current_salt
1540         and current_saltbits.
1541
1542 2002-11-02  Roland McGrath  <roland@redhat.com>
1543
1544         * stdio-common/reg-printf.c: Include <stdlib.h>.
1545
1546 2002-11-02  H.J. Lu  <hjl@gnu.org>
1547
1548         * sysdeps/unix/sysv/linux/mips/syscalls.list (s_execve): Set
1549         caller to EXTRA instead of execve.
1550
1551 2002-11-01  Roland McGrath  <roland@redhat.com>
1552
1553         * sysdeps/generic/errno-loc.c [! USE___THREAD]: Use this conditional
1554         in place of [!(USE_TLS && HAVE___THREAD)].
1555         (__errno_location) [! USE___THREAD]: Define as strong, not weak.
1556
1557 2002-10-31  Roger Sayle  <roger@eyesopen.com>
1558
1559         * sysdeps/i386/soft-fp/sfp-machine.h (_FP_NANFRAC_Q, _FP_NANSIGN_Q):
1560         New macros.
1561         * sysdeps/x86_64/soft-fp/sfp-machine.h: Likewise.
1562
1563         * soft-fp/soft-fp.h: Allow sfp-machine.h to define FP_RND_NEAREST
1564         without defining FP_ROUNDMODE.
1565
1566 2002-10-29  Jakub Jelinek  <jakub@redhat.com>
1567
1568         * sysdeps/gnu/siglist.c (PTR_SIZE_STR): Remove.
1569         (__old_sys_siglist, __old_sys_sigabbrev): Use strong_alias and
1570         declare_symbol.
1571         * sysdeps/mach/hurd/siglist.h (OLD_SIGLIST_SIZE_STR): Remove.
1572         (OLD_SIGLIST_SIZE): Define.
1573         * sysdeps/unix/sysv/linux/siglist.h (OLD_SIGLIST_SIZE_STR): Remove.
1574         (OLD_SIGLIST_SIZE): Define.
1575         * sysdeps/unix/sysv/linux/arm/siglist.c: Remove.
1576
1577 2002-11-01  Jakub Jelinek  <jakub@redhat.com>
1578
1579         * sysdeps/ia64/strncpy.S: Fix recovery code.
1580
1581 2002-10-30  Jakub Jelinek  <jakub@redhat.com>
1582
1583         * include/libc-symbols.h (__libc_freeres_fn_section, libc_freeres_fn):
1584         New macros.
1585         * elf/dl-close.c (free_mem): Use libc_freeres_fn macro, remove
1586         text_set_element.
1587         * elf/dl-libc.c (free_mem): Likewise.
1588         * iconv/gconv_conf.c (free_mem): Likewise.
1589         * iconv/gconv_db.c (free_mem): Likewise.
1590         * iconv/gconv_dl.c (free_mem): Likewise.
1591         * iconv/gconv_cache.c (free_mem): Likewise.
1592         * intl/finddomain.c (free_mem): Likewise.
1593         * intl/dcigettext.c (free_mem): Likewise.
1594         * locale/setlocale.c (free_mem): Likewise.
1595         * misc/fstab.c (fstab_free): Likewise.
1596         * nss/nsswitch.c (free_mem): Likewise.
1597         * posix/regcomp.c (free_mem): Likewise.
1598         * resolv/gai_misc.c (free_res): Likewise.
1599         * stdlib/fmtmsg.c (free_mem): Likewise.
1600         * sunrpc/clnt_perr.c (free_mem): Likewise.
1601         * sysdeps/generic/setenv.c (free_mem): Likewise.
1602         * sysdeps/unix/sysv/linux/shm_open.c (freeit): Likewise.
1603         * sysdeps/pthread/aio_misc.c (free_res): Likewise.
1604         * time/tzset.c (free_mem): Likewise.
1605         * malloc/mtrace.c (release_libc_mem): Add __libc_freeres_fn_section.
1606         * locale/loadarchive.c (_nl_archive_subfreeres): Likewise.
1607         * malloc/set-freeres.c (__libc_freeres): Likewise.
1608
1609         * login/getutent.c: Include stdlib.h instead of stddef.h.
1610         (buffer): Change into pointer to utmp, add libc_freeres_ptr.
1611         (__getutent): Allocate buffer the first time it is run.
1612         * login/getutid.c: Include stdlib.h instead of stddef.h.
1613         (buffer): Change into pointer to utmp, add libc_freeres_ptr.
1614         (__getutid): Allocate buffer the first time it is run.
1615         * login/getutline.c: Include stdlib.h instead of stddef.h.
1616         (buffer): Change into pointer to utmp, add libc_freeres_ptr.
1617         (__getutline): Allocate buffer the first time it is run.
1618         * malloc/mtrace.c (malloc_trace_buffer): Change into char *.
1619         (mtrace): Allocate malloc_trace_buffer.
1620         * resolv/nsap_addr.c (inet_nsap_ntoa): Decrease size of tmpbuf.
1621         * resolv/ns_print.c (ns_sprintrrf): Decrease size of t.
1622         * string/strerror.c: Include libintl.h and errno.h.
1623         (buf): New variable.
1624         (strerror): Only allocate buffer if actually needed (unknown error).
1625         * time/tzfile.c (transitions): Add libc_freeres_ptr.
1626         (freeres): Remove.
1627
1628 2002-10-25  Jakub Jelinek  <jakub@redhat.com>
1629
1630         * include/libc-symbols.h (libc_freeres_ptr): New macro.
1631         * malloc/set-freeres.c (__libc_freeres_ptrs): Define using
1632         symbol_set_define.
1633         (__libc_freeres): Free all pointers in that section.
1634         * Makerules (build-shlib): Add $(LDSEDCMD-$(@F:lib%.so=%).so) to sed
1635         commands when creating .lds script.
1636         (LDSEDCMD-c.so): New variable.
1637         * inet/rcmd.c (ahostbuf): Change into char *.  Add libc_freeres_ptr.
1638         (rcmd_af): Use strdup to allocate ahostbuf.
1639         * inet/rexec.c (ahostbuf): Change into char *.  Add libc_freeres_ptr.
1640         (rexec_af): Use strdup to allocate ahostbuf.
1641         * stdio-common/reg-printf.c (printf_funcs): Remove.
1642         (__printf_arginfo_table): Change into printf_arginfo_function **.
1643         Add libc_freeres_ptr.
1644         (__register_printf_function): Allocate __printf_arginfo_table
1645         and __printf_function_table the first time it is called.
1646         * stdio-common/printf-parse.h (__printf_arginfo_table): Change into
1647         printf_arginfo_function **.
1648         (parse_one_spec): Add __builtin_expect.
1649         * grp/fgetgrent.c (buffer): Add libc_freeres_ptr.
1650         (free_mem): Remove.
1651         * inet/getnetgrent.c (buffer): Add libc_freeres_ptr.
1652         (free_mem): Remove.
1653         * intl/localealias.c (libc_freeres_ptr): Define if !_LIBC.
1654         (string_space, map): Add libc_freeres_ptr.
1655         (free_mem): Remove.
1656         * misc/efgcvt.c (FCVT_BUFPTR): Add libc_freeres_ptr.
1657         (free_mem): Remove.
1658         * misc/mntent.c (getmntent_buffer): Add libc_freeres_ptr.
1659         (free_mem): Remove.
1660         * crypt/md5-crypt.c (libc_freeres_ptr): Define if !_LIBC.
1661         (buffer): Add libc_freeres_ptr.
1662         (free_mem): Remove for _LIBC.
1663         * nss/getXXbyYY.c (buffer): Add libc_freeres_ptr.
1664         (free_mem): Remove.
1665         * nss/getXXent.c (buffer): Add libc_freeres_ptr.
1666         (free_mem): Remove.
1667         * pwd/fgetpwent.c (buffer): Add libc_freeres_ptr.
1668         (free_mem): Remove.
1669         * resolv/res_hconf.c (ifaddrs): Add libc_freeres_ptr.
1670         (free_mem): Remove.
1671         * shadow/fgetspent.c (buffer): Add libc_freeres_ptr.
1672         (free_mem): Remove.
1673         * sysdeps/posix/ttyname.c (getttyname_name): Add libc_freeres_ptr.
1674         (free_mem): Remove.
1675         * sysdeps/unix/sysv/linux/getsysstats.c (mount_proc): Add
1676         libc_freeres_ptr.
1677         (free_mem): Remove.
1678         * sysdeps/unix/sysv/linux/ttyname.c (getttyname_name, ttyname_buf): Add
1679         libc_freeres_ptr.
1680         (free_mem): Remove.
1681
1682 2002-10-30  Jakub Jelinek  <jakub@redhat.com>
1683
1684         * malloc/obstack.c [_LIBC] (obstack_free): Change into strong_alias
1685         instead of duplicating the whole function in libc.
1686
1687 2002-10-31  Roland McGrath  <roland@redhat.com>
1688
1689         * sysdeps/i386/bits/byteswap.h [__GNUC__ < 2] (__bswap_32):
1690         Renamed from __bswap_16 (typo fix).  Reported by <dens@stl.sarov.ru>.
1691
1692 2002-10-30  Jakub Jelinek  <jakub@redhat.com>
1693
1694         * sysdeps/unix/sysv/linux/Makefile (syscall-%.h): Add -D for each
1695         32bit-predefine when creating .new32 list and -U for each
1696         32bit-predefine when creating .new64 list.
1697         * sysdeps/unix/sysv/linux/x86_64/Makefile (32bit-predefine): New.
1698
1699 2002-10-29  Andreas Schwab  <schwab@suse.de>
1700
1701         * sysdeps/generic/allocrtsig.c: Include <testrtsig.h>, not
1702         "testrtsig.h".  Reported by Daniel Jacobowitz <dan@debian.org>.
1703
1704 2002-10-25  Roland McGrath  <roland@redhat.com>
1705
1706         * sysdeps/unix/sysv/linux/configure.in: Fix typo in last change.
1707         * sysdeps/unix/sysv/linux/configure: Regenerated.
1708
1709         * sysdeps/generic/ldsodefs.h: Remove [! SHARED] conditional from
1710         _dl_starting_up decl.
1711
1712 2002-10-20  H.J. Lu  <hjl@gnu.org>
1713
1714         * sysdeps/unix/sysv/linux/configure.in: Don't check
1715         /lib/modules/`uname -r`/build/include for kernel headers if
1716         cross compiling.
1717         * sysdeps/unix/sysv/linux/configure: Regenerated.
1718
1719 2002-10-25  Roland McGrath  <roland@redhat.com>
1720
1721         * math/math.h (M_LOG2El): Correct the value.
1722         From Stephen L Moshier <steve@moshier.net>.
1723
1724         * sysdeps/unix/sysv/linux/init-first.c (init): Remove [! SHARED]
1725         conditional from __libc_multiple_libcs access.  Remove kludge for weak
1726         symbol access with old compilers we no longer support.
1727         * sysdeps/unix/sysv/aix/init-first.c (init): Likewise.
1728         * sysdeps/generic/libc-start.c (__libc_start_main): Likewise.
1729
1730 2002-10-25  Roland McGrath  <roland@redhat.com>
1731
1732         * sysdeps/posix/sigvec.c [SA_RESETHAND]: Disable wrapper hacks and
1733         implement SV_RESETHAND by translating it to SA_RESETHAND.
1734
1735 2002-10-23  Alexandre Oliva  <aoliva@redhat.com>
1736
1737         * elf/dl-reloc.c (_dl_reloc_bad_use): Print the full 32-bit relocation
1738         type on ELF64 platforms.
1739
1740 2002-10-24  Ulrich Drepper  <drepper@redhat.com>
1741
1742         * elf/elf.h (R_X86_64_GOTTPOFF): Renamed from r_x86_64_GOTTPOFF.
1743
1744         * elf/elf.h: Define ELF_NOTE_OS_FREEBSD and NT_TASKSTRUCT.
1745
1746 2002-10-24  Jakub Jelinek  <jakub@redhat.com>
1747
1748         * elf/dl-misc.c: Include <sysdep.h>.
1749         (_dl_debug_vdprintf): Only take dl_load_lock if not _dl_starting_up.
1750
1751         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (INTERNAL_SYSCALL,
1752         INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): New macros.
1753         (INLINE_SYSCALL): Use that.
1754         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (INTERNAL_SYSCALL,
1755         INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): New macros.
1756         (INLINE_SYSCALL): Use that.
1757         * sysdeps/unix/sysv/linux/x86_64/sysdep.h (INTERNAL_SYSCALL,
1758         INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): New macros.
1759         (INLINE_SYSCALL): Use that.
1760         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Include
1761         dl-sysdep.h.
1762         (SYSCALL_ERROR_HANDLER): Define RTLD_PRIVATE_ERRNO variant.
1763         (__INTERNAL_SYSCALL_STRING): Define.
1764         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Include
1765         dl-sysdep.h.
1766         (SYSCALL_ERROR_HANDLER): Define RTLD_PRIVATE_ERRNO variant.
1767         (__INTERNAL_SYSCALL_STRING): Define.
1768         * sysdeps/unix/sysv/linux/sparc/sysdep.h (INLINE_SYSCALL): Pass
1769         __SYSCALL_STRING to inline_syscall*.
1770         (INTERNAL_SYSCALL, INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO):
1771         New macros.
1772         (inline_syscall0, inline_syscall1, inline_syscall2, inline_syscall3,
1773         inline_syscall4, inline_syscall5, inline_syscall6): Add string
1774         argument.
1775
1776 2002-10-24  Roland McGrath  <roland@redhat.com>
1777
1778         * sysdeps/generic/ldsodefs.h (_dl_starting_up): Declare it here.
1779         * sysdeps/unix/sysv/linux/init-first.c: Not here.
1780         * sysdeps/powerpc/elf/libc-start.c: Or here.
1781         * sysdeps/unix/sysv/aix/libc-start.c: Or here.
1782         * sysdeps/unix/sysv/aix/start-libc.c: Or here.
1783         * sysdeps/unix/sysv/aix/init-first.c: Or here.
1784         * sysdeps/generic/libc-start.c: Or here.
1785         * sysdeps/unix/sysv/linux/init-first.c (init): Protect _dl_starting_up
1786         access with [! SHARED].
1787         * sysdeps/unix/sysv/aix/init-first.c (init): Likewise.
1788
1789         * libio/bug-wfflush.c: New file.
1790         * libio/Makefile (tests): Add bug-wfflush.
1791
1792 2002-10-23  Roland McGrath  <roland@redhat.com>
1793
1794         * stdio-common/tst-fphex.c: New file.
1795         * stdio-common/Makefile (tests): Add tst-fphex.
1796         * sysdeps/generic/printf_fphex.c (__printf_fphex): Fix initialization
1797         of WNUMEND.  Fix counting of decimal point in WIDTH.  Print '0' pad
1798         chars always before the value digits.
1799         Reported by James Antill <james.antill@redhat.com>.
1800
1801 2002-10-24  Jakub Jelinek  <jakub@redhat.com>
1802
1803         * posix/regcomp.c (re_comp): Call __regfree on re_comp_buf.
1804         (free_mem): New function.
1805         * posix/Makefile (tests): Add bug-regex14.  Add bug-regex14-mem
1806         if not cross compiling.
1807         (generated): Add bug-regex14-mem and bug-regex14.mtrace.
1808         (bug-regex14-ENV): Set.
1809         (bug-regex14-mem): New target.
1810         * posix/bug-regex14.c: New file.
1811
1812 2002-10-23  Roland McGrath  <roland@redhat.com>
1813
1814         * elf/Makefile ($(objpfx)librtld.map): Use temporary file for output
1815         target, so we don't touch it when the link fails.
1816
1817         * libio/ftello.c (ftello): Use _IO_off64_t for type of POS.
1818         Check for the result overflowing off_t and fail with EOVERFLOW.
1819         * libio/ioftell.c (_IO_ftell): Likewise.
1820         * libio/iofgetpos.c (_IO_new_fgetpos): Likewise.
1821
1822         * login/logwtmp.c (logwtmp): If sizeof ut_tv != sizeof struct timeval,
1823         use a temporary timeval on the stack for gettimeofday and copy it.
1824         * login/logout.c (logout): Likewise.
1825         Reported by Steven Munroe <sjmunroe@us.ibm.com>.
1826
1827         * sysdeps/unix/sysv/linux/bits/statfs.h (struct statfs):
1828         Use __SWORD_TYPE instead of int for member types.
1829         (struct statfs64): Likewise.
1830         * sysdeps/unix/sysv/linux/alpha/bits/statfs.h: New file.
1831         * sysdeps/unix/sysv/linux/s390/bits/statfs.h: New file.
1832         * sysdeps/unix/sysv/linux/ia64/bits/statfs.h: File removed.
1833         * sysdeps/unix/sysv/linux/sparc/bits/statfs.h: File removed.
1834         * sysdeps/unix/sysv/linux/x86_64/bits/statfs.h: File removed.
1835
1836         * sysdeps/unix/sysv/linux/sparc/bits/statvfs.h: Moved to ...
1837         * sysdeps/unix/sysv/linux/bits/statvfs.h: ... here.
1838         (ST_NODIRATIME): Restore fixed value of 2048.
1839         * sysdeps/unix/sysv/linux/alpha/bits/statvfs.h: File removed.
1840         * sysdeps/unix/sysv/linux/ia64/bits/statvfs.h: File removed.
1841
1842         Rearranged <bits/types.h> definitions to reduce duplication.
1843         * sysdeps/generic/bits/types.h: Rewritten, using macros from
1844         <bits/wordsize.h> and new header <bits/typesizes.h>.
1845         * posix/Makefile (headers): Add bits/typesizes.h here.
1846         * sysdeps/generic/bits/typesizes.h: New file.
1847         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
1848         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
1849         * sysdeps/mach/hurd/bits/typesizes.h: New file.
1850         * sysdeps/unix/sysv/linux/alpha/bits/types.h: File removed.
1851         * sysdeps/unix/sysv/linux/bits/types.h: File removed.
1852         * sysdeps/unix/sysv/linux/ia64/bits/types.h: File removed.
1853         * sysdeps/unix/sysv/linux/mips/bits/types.h: File removed.
1854         * sysdeps/unix/sysv/linux/s390/bits/types.h: File removed.
1855         * sysdeps/unix/sysv/linux/sparc/bits/types.h: File removed.
1856         * sysdeps/unix/sysv/linux/x86_64/bits/types.h: File removed.
1857         * posix/sys/types.h [__USE_POSIX199506 || __USE_UNIX98]: Include
1858         <bits/pthreadtypes.h> here, not in <bits/types.h>.
1859         * signal/signal.h: Likewise.
1860
1861         * streams/stropts.h: Include <bits/xtitypes.h>.
1862         * streams/Makefile (headers): Add bits/xtitypes.h here.
1863         * sysdeps/generic/bits/xtitypes.h: New file.
1864         * sysdeps/s390/bits/xtitypes.h: New file.
1865         * sysdeps/ia64/bits/xtitypes.h: New file.
1866         * sysdeps/x86_64/bits/xtitypes.h: New file.
1867
1868         * sysvipc/Makefile (headers): Add bits/ipctypes.h here.
1869         * sysdeps/generic/bits/ipctypes.h: New file.
1870         * sysdeps/mips/bits/ipctypes.h: New file.
1871         * sysdeps/gnu/bits/shm.h: Include <bits/ipctypes.h>.
1872         * sysdeps/gnu/bits/msq.h: Likewise.
1873         * sysvipc/sys/ipc.h: Likewise.
1874
1875 2002-10-22  Ulrich Drepper  <drepper@redhat.com>
1876
1877         * elf/dl-load.c (struct filebuf): For buf element to have the
1878         alignment of ElfXX_Ehdr since this is what will be stored in it.
1879
1880 2002-10-22  Jakub Jelinek  <jakub@redhat.com>
1881
1882         * locale/programs/locarchive.c (add_alias): Change locrec_offset arg
1883         into pointer to locrec_offset.
1884         (add_locale_to_archive): Adjust callers.  Free normalized_name right
1885         before returning, not immediately after add_locale, pass it to
1886         add_alias if not NULL instead of name.  Rename second normalized_name
1887         occurence to nnormalized_codeset_name.
1888
1889         * locale/programs/locarchive.c (enlarge_archive): Make sure
1890         string_size is always a multiple of 4.
1891         Reported by Andreas Schwab <schwab@suse.de>.
1892
1893 2002-10-21  Andreas Schwab  <schwab@suse.de>
1894
1895         * sysdeps/unix/sysv/linux/ia64/syscalls.list (s_execve): Set
1896         caller to EXTRA instead of execve, since the latter has a
1897         higher-priority implementation in linuxthreads.
1898
1899 2002-10-21  Roland McGrath  <roland@redhat.com>
1900
1901         * sysdeps/generic/libc-tls.c (__libc_setup_tls): Initialize the static
1902         slotinfo list's len member to the proper size, not just 1.
1903         Initialize static_map.l_tls_initimage.
1904
1905         * elf/dl-open.c (dl_open_worker): Fix loop searching for
1906         dtv_slotinfo_list element containing new modules' l_tls_modid.
1907
1908         * elf/tst-tls9.c, elf/tst-tls9-static.c: New files.
1909         * elf/tst-tlsmod5.c, elf/tst-tlsmod6.c: New files.
1910         * elf/Makefile (tests): Add tst-tls9.
1911         (tests-static): Add tst-tls9-static.
1912         (tst-tls9-static-ENV): New variable.
1913         ($(objpfx)tst-tls9-static, $(objpfx)tst-tls9-static.out): New targets.
1914
1915         * elf/dl-close.c (remove_slotinfo): Remove an assert; the number of
1916         modids used by partially loaded modules being closed can't be known.
1917
1918 2002-10-21  Isamu Hasegawa  <isamu@yamato.ibm.com>
1919
1920         * posix/Makefile: Add a test case for the bug reported by Aharon
1921         Robbins <arnold@skeeve.com>.
1922         * posix/bug-regex13.c: New file.
1923         * posix/regcomp.c (peek_token_bracket): Skip the byte already read.
1924
1925 2002-10-21  Ulrich Drepper  <drepper@redhat.com>
1926
1927         * csu/gmon-start.c: Pretty printing.
1928
1929 2002-10-19  Art Haas  <ahaas@neosoft.com>
1930
1931         * configure.in: Replace AC_CONFIG_HEADER with AC_CONFIG_HEADERS,
1932         add AC_HELP_STRING to all AC_ARG_WITH and AC_ARG_ENABLE macros,
1933         add autoconf quotes to the AC_CONFIG_AUX_DIR macro.
1934         * configure: Regenerated.
1935
1936 2002-10-19  Roland McGrath  <roland@redhat.com>
1937
1938         * configure.in: Call AC_CONFIG_SUBDIRS with empty argument
1939         and then set $subdirs directly, because the new Autoconf breaks
1940         compatibility in every way imaginable and insists on whining
1941         about usage that worked since the dawn of time.
1942         * configure: Regenerated.
1943
1944         * configure: Regenerated (using Autoconf 2.54).
1945         * sysdeps/alpha/elf/configure: Likewise.
1946         * sysdeps/generic/configure: Likewise.
1947         * sysdeps/i386/elf/configure: Likewise.
1948         * sysdeps/ia64/elf/configure: Likewise.
1949         * sysdeps/mach/hurd/configure: Likewise.
1950         * sysdeps/mach/configure: Likewise.
1951         * sysdeps/unix/configure: Likewise.
1952         * sysdeps/unix/common/configure: Likewise.
1953         * sysdeps/unix/sysv/aix/configure: Likewise.
1954         * sysdeps/unix/sysv/linux/configure: Likewise.
1955         * sysdeps/unix/sysv/linux/mips/configure: Likewise.
1956         * sysdeps/x86_64/elf/configure: Likewise.
1957
1958         * config.make.in: Nix completely-soft nonsense.
1959         * configure.in: Likewise.  Under --without-fp, use nofpu subdirectory
1960         of machine directories instead of fpu subdirectory.
1961         * sysdeps/powerpc/soft-fp/Makefile: Remove cruft added in last change.
1962         * sysdeps/powerpc/nofpu/Makefile: Put it in this new file instead.
1963         * sysdeps/powerpc/soft-fp/sim-full.c: Moved to ...
1964         * sysdeps/powerpc/nofpu/sim-full.c: ... here.
1965         * sysdeps/powerpc/soft-fp/fraiseexcpt.c: Moved to ...
1966         * sysdeps/powerpc/nofpu/fraiseexcpt.c: ... here.
1967         * sysdeps/powerpc/soft-fp/fegetexcept.c: Moved to ...
1968         * sysdeps/powerpc/nofpu/fegetexcept.c: ... here.
1969         * sysdeps/powerpc/soft-fp/fclrexcpt.c: Moved to ...
1970         * sysdeps/powerpc/nofpu/fclrexcpt.c: ... here.
1971         * sysdeps/powerpc/soft-fp/ftestexcept.c: Moved to ...
1972         * sysdeps/powerpc/nofpu/ftestexcept.c: ... here.
1973         * sysdeps/powerpc/soft-fp/fgetexcptflg.c: Moved to ...
1974         * sysdeps/powerpc/nofpu/fgetexcptflg.c: ... here.
1975         * sysdeps/powerpc/soft-fp/fsetexcptflg.c: Moved to ...
1976         * sysdeps/powerpc/nofpu/fsetexcptflg.c: ... here.
1977         * sysdeps/powerpc/soft-fp/fedisblxcpt.c: Moved to ...
1978         * sysdeps/powerpc/nofpu/fedisblxcpt.c: ... here.
1979         * sysdeps/powerpc/soft-fp/feenablxcpt.c: Moved to ...
1980         * sysdeps/powerpc/nofpu/feenablxcpt.c: ... here.
1981         * sysdeps/powerpc/soft-fp/fegetenv.c: Moved to ...
1982         * sysdeps/powerpc/nofpu/fegetenv.c: ... here.
1983         * sysdeps/powerpc/soft-fp/fesetenv.c: Moved to ...
1984         * sysdeps/powerpc/nofpu/fesetenv.c: ... here.
1985         * sysdeps/powerpc/soft-fp/fegetround.c: Moved to ...
1986         * sysdeps/powerpc/nofpu/fegetround.c: ... here.
1987         * sysdeps/powerpc/soft-fp/fesetround.c: Moved to ...
1988         * sysdeps/powerpc/nofpu/fesetround.c: ... here.
1989         * sysdeps/powerpc/soft-fp/feupdateenv.c: Moved to ...
1990         * sysdeps/powerpc/nofpu/feupdateenv.c: ... here.
1991         * sysdeps/powerpc/soft-fp/feholdexcpt.c: Moved to ...
1992         * sysdeps/powerpc/nofpu/feholdexcpt.c: ... here.
1993         * sysdeps/powerpc/soft-fp/fenv_const.c: Moved to ...
1994         * sysdeps/powerpc/nofpu/fenv_const.c: ... here.
1995         * sysdeps/powerpc/soft-fp/libm-test-ulps: Moved to ...
1996         * sysdeps/powerpc/nofpu/libm-test-ulps: ... here.
1997         * sysdeps/powerpc/soft-fp/soft-supp.h: Moved to ...
1998         * sysdeps/powerpc/nofpu/soft-supp.h: ... here.
1999         * sysdeps/powerpc/soft-fp/Versions (libc: GLIBC_2.3.2): Moved to ...
2000         * sysdeps/powerpc/nofpu/Versions: ... here, new file.
2001
2002 2002-10-19  Bruno Haible  <bruno@clisp.org>
2003
2004         * sysdeps/unix/bsd/bsd4.4/freebsd/sys/sysmacros.h: New file.
2005
2006 2002-10-18  Roland McGrath  <roland@redhat.com>
2007
2008         * io/Makefile (routines): Add lchmod.
2009         * io/sys/stat.h [__USE_BSD] (lchmod): Declare it.
2010         * sysdeps/generic/lchmod.c: New file.
2011         * sysdeps/mach/hurd/lchmod.c: New file.
2012         * io/Versions (libc: GLIBC_2.3.2): New set, add lchmod.
2013
2014 2002-10-18  Art Haas  <ahaas@neosoft.com>
2015
2016         * configure.in: Remove remaining AC_FD_CC macros, and replace
2017         AC_FD_MSG with AS_MESSAGE_FD.
2018
2019 2002-10-18  Roland McGrath  <roland@redhat.com>
2020
2021         * sysdeps/powerpc/powerpc32/dl-machine.c (__process_machine_rela): Fix
2022         typos: VALUE -> FINALADDR.
2023
2024         * sysdeps/unix/alpha/sysdep.h (INLINE_SYSCALL, INLINE_SYSCALL1)
2025         (inline_syscall_clobbers, inline_syscall0, inline_syscall1)
2026         (inline_syscall2, inline_syscall3, inline_syscall4, inline_syscall5)
2027         (inline_syscall6): Move these macros ...
2028         * sysdeps/unix/sysv/linux/alpha/sysdep.h: ... to here.
2029
2030         * configure.in (libc_link_dests, libc_link_sources): Remove these
2031         variables and the AC_LINK_FILES call.
2032
2033         * sysdeps/powerpc/soft-fp/Versions (libc: GLIBC_2.3.2): Fix last
2034         change to put new symbols here instead of in GLIBC_2.2.
2035         * sysdeps/powerpc/Subdirs: Move this file ...
2036         * sysdeps/powerpc/soft-fp/Subdirs: ... here.
2037
2038 2002-10-07  Roland McGrath  <roland@redhat.com>
2039
2040         * sysdeps/generic/bits/time.h: Replaced with contents of the
2041         sysdeps/unix/sysv/linux/i386/bits/time.h file.  All the following
2042         files were identical except for the absence of CLOCK_THREAD_CPUTIME_ID
2043         and CLOCK_PROCESS_CPUTIME_ID in .../linux/bits/time.h; adding these
2044         macros is ok even for architectures that don't now implement them.
2045         * sysdeps/mach/hurd/bits/time.h: File removed.
2046         * sysdeps/unix/sysv/linux/bits/time.h: File removed.
2047         * sysdeps/unix/sysv/linux/i386/bits/time.h: File removed.
2048         * sysdeps/unix/sysv/linux/ia64/bits/time.h: File removed.
2049         * sysdeps/unix/sysv/linux/sparc/bits/time.h: File removed.
2050         * sysdeps/unix/sysv/linux/x86_64/bits/time.h: File removed.
2051
2052 2002-10-18  Jeff Bailey  <jbailey@gnu.org>
2053
2054         * configure.in: Replace obsolete AC_OUTPUT syntax with
2055         AC_CONFIG_FILES, AC_CONFIG_COMMANDS, and new-type AC_OUTPUT trio.
2056
2057         * aclocal.m4 (GLIBC_PROVIDES): Add AC_PROVIDEs for
2058         _AS_PATH_SEPARATOR_PREPARE and _AS_TEST_PREPARE.
2059
2060         * configure.in: Replace AC_FD_CC with AS_MESSAGE_LOG_FD.
2061         * sysdeps/alpha/elf/configure.in: Likewise.
2062         * sysdeps/i386/elf/configure.in: Likewise.
2063         * sysdeps/mach/hurd/configure.in: Likewise.
2064         * sysdeps/x86_64/elf/configure.in: Likewise.
2065
2066         * configure.in: Use AC_CONFIG_SRCDIR and new AC_INIT syntax.
2067
2068         * sysdeps/alpha/elf/configure.in: Remove unneeded sinclude statement.
2069         * sysdeps/generic/configure.in: Likewise.
2070         * sysdeps/i386/elf/configure.in: Likewise.
2071         * sysdeps/ia64/elf/configure.in: Likewise.
2072         * sysdeps/mach/configure.in: Likewise.
2073         * sysdeps/mach/hurd/configure.in: Likewise.
2074         * sysdeps/unix/configure.in: Likewise.
2075         * sysdeps/unix/common/configure.in: Likewise.
2076         * sysdeps/unix/sysv/aix/configure.in: Likewise.
2077         * sysdeps/unix/sysv/linux/configure.in: Likewise.
2078         * sysdeps/unix/sysv/linux/mips/configure.in: Likewise.
2079         * sysdeps/x86_64/elf/configure.in: Likewise.
2080
2081         * aclocal.m4: Use just the bits from AS_INIT that are needed for the
2082         GLIBC_PROVIDES.  Use plain comment instead of HEADER-COMMENT so
2083         that it's obvious when extra autoconf machinery is being dragged in.
2084
2085 2002-10-18  Roland McGrath  <roland@redhat.com>
2086
2087         * configure.in: Remove bogus echo included in
2088         2002-10-08  Aldy Hernandez  <aldyh@redhat.com> change.
2089         * configure: Regenerated.
2090
2091 2002-10-18  Jakub Jelinek  <jakub@redhat.com>
2092
2093         * sysdeps/unix/sysv/linux/pathconf.h (statfs_link_max): Add inline.
2094         (statfs_filesize_max): New function.
2095         * sysdeps/unix/sysv/linux/linux_fsinfo.h (JFFS_SUPER_MAGIC,
2096         JFFS2_SUPER_MAGIC, JFS_SUPER_MAGIC, NTFS_SUPER_MAGIC,
2097         ROMFS_SUPER_MAGIC, UDF_SUPER_MAGIC): Define.
2098         * sysdeps/unix/sysv/linux/fpathconf.c (__fpathconf): Use
2099         statfs_filesize_max.
2100         * sysdeps/unix/sysv/linux/pathconf.c (__pathconf): Likewise.
2101         * sysdeps/unix/sysv/linux/alpha/fpathconf.c: Removed.
2102         * sysdeps/unix/sysv/linux/alpha/pathconf.c: Removed.
2103
2104 2002-10-17  Roland McGrath  <roland@redhat.com>
2105
2106         * configure.in (MIG): Just AC_SUBST it here.
2107         * configure: Regenerated.
2108         * sysdeps/mach/configure.in (MIG): Do the AC_CHECK_TOOL here.
2109         Adding final - argument to all AC_CHECK_HEADER uses for .defs files.
2110         * sysdeps/mach/configure: Regenerated.
2111
2112         * aclocal.m4 (GLIBC_PROVIDES): Add AC_PROVIDE([_AS_TR_SH_PREPARE])
2113         and AC_PROVIDE([_AS_CR_PREPARE]).
2114
2115         * aclocal.m4 (GLIBC_PROVIDES): Add AC_PROVIDE([_AS_ECHO_N_PREPARE]).
2116         Remove AC_LANG(C) call, instead just define([_AC_LANG], [C]).
2117
2118         * elf/dl-support.c: Move _dl_tls_* variables to ...
2119         * sysdeps/generic/libc-tls.c: ... here.
2120
2121         * elf/dl-close.c (remove_slotinfo): Take new argument.  If false,
2122         allow IDX to be one past the current last slotinfo entry.
2123         (_dl_close): Pass IMAP->l_init_called for that parameter.
2124
2125 2002-10-07  Andreas Schwab  <schwab@suse.de>
2126
2127         * aclocal.m4: Fix for autoconf 2.53.
2128         * configure.in: Likewise.  Require autoconf 2.53.
2129
2130 2002-10-08  Richard Henderson  <rth@redhat.com>
2131
2132         * soft-fp/op-4.h: Handle carry correctly in
2133         __FP_FRAC_ADD_3, __FP_FRAC_ADD_4, __FP_FRAC_SUB_3,
2134         __FP_FRAC_SUB_4, __FP_FRAC_DEC_3, __FP_FRAC_DEC_4.
2135         * soft-fp/op-common.h: New macros _FP_DIV_MEAT_N_loop.
2136
2137 2002-10-08  Aldy Hernandez  <aldyh@redhat.com>
2138
2139         * configure.in: Compute completely-soft.
2140         * config.make.in: Make completely-soft available to sub-makes.
2141         * sysdeps/powerpc/soft-fp/Makefile: Add gcc-single-routines and
2142         gcc-double-routines.  Add sim-full.c.  Add fenv_const and
2143         fe_nomask to libm-support.
2144         * sysdeps/powerpc/soft-fp/sim-full.c: New file.
2145         * sysdeps/powerpc/soft-fp/fraiseexcpt.c: New file.
2146         * sysdeps/powerpc/soft-fp/fegetexcept.c: New file.
2147         * sysdeps/powerpc/soft-fp/fclrexcpt.c: New file.
2148         * sysdeps/powerpc/soft-fp/ftestexcept.c: New file.
2149         * sysdeps/powerpc/soft-fp/fgetexcptflg.c: New file.
2150         * sysdeps/powerpc/soft-fp/fsetexcptflg.c: New file.
2151         * sysdeps/powerpc/soft-fp/fedisblxcpt.c: New file.
2152         * sysdeps/powerpc/soft-fp/feenablxcpt.c: New file.
2153         * sysdeps/powerpc/soft-fp/fegetenv.c: New file.
2154         * sysdeps/powerpc/soft-fp/fesetenv.c: New file.
2155         * sysdeps/powerpc/soft-fp/fegetround.c: New file.
2156         * sysdeps/powerpc/soft-fp/fesetround.c: New file.
2157         * sysdeps/powerpc/soft-fp/feupdateenv.c: New file.
2158         * sysdeps/powerpc/soft-fp/feholdexcpt.c: New file.
2159         * sysdeps/powerpc/soft-fp/fenv_const.c: New file.
2160         * sysdeps/powerpc/soft-fp/libm-test-ulps: New file.
2161         * sysdeps/powerpc/soft-fp/soft-supp.h: New file.
2162         * sysdeps/powerpc/soft-fp/Versions: Add libgcc soft-float
2163         symbols.  Add __sim_disabled_exceptions, __sim_exceptions,
2164         __sim_round_mode.
2165         * sysdeps/powerpc/soft-float/Dist: Add sim-full.c, fenv_const.c.
2166         * sysdeps/powerpc/soft-float/sfp-machine.h: Define
2167         FP_HANDLE_EXCEPTIONS.
2168         Define FP_ROUNDMODE.
2169         Redefine FP_* macros to correspond to the FE_* bit positions.
2170         Define FP_DIV_MEAT_S to _FP_DIV_MEAT_1_loop.
2171         Define externs for __sim_exceptions, __sim_disabled_exceptions,
2172         __sim_round_mode, __simulate_exceptions.
2173         * sysdeps/powerpc/fpu/bits/fenv.h: Move file from here...
2174         * sysdeps/powerpc/bits/fenv.h: ...to here.
2175
2176 2002-10-06  Jakub Jelinek  <jakub@redhat.com>
2177
2178         * sysdeps/powerpc/powerpc32/dl-machine.c (__process_machine_rela):
2179         Store R_PPC_UADDR32 and R_PPC_UADDR16 one byte at a time.
2180         Use __builtin_expect for R_PPC_ADDR24 overflow check.  Fix
2181         R_PPC_ADDR16, R_PPC_UADDR16 and R_PPC_ADDR14* overflow check, use
2182         __builtin_expect.
2183
2184 2002-10-15  Jakub Jelinek  <jakub@redhat.com>
2185
2186         * include/resolv.h (__libc_res_nquery, __libc_res_nsearch,
2187         __libc_res_nsend): New prototypes.
2188         * resolv/res_query.c (QUERYSIZE): Define.
2189         (__libc_res_nquery): Renamed from res_nquery.  Added answerp
2190         argument.  Allocate only QUERYSIZE bytes first, if res_nmkquery
2191         fails use MAXPACKET buffer.  Call __libc_res_nsend instead of
2192         res_nsend, pass answerp.
2193         (res_nquery): Changed into wrapper around __libc_res_nquery.
2194         (__libc_res_nsearch): Renamed from res_nsearch.  Added answerp
2195         argument.  Call __libc_res_nquerydomain and __libc_res_nquery
2196         instead of the non-__libc_ variants, pass them answerp.
2197         (res_nsearch): Changed into wrapper around __libc_res_nsearch.
2198         (__libc_res_nquerydomain): Renamed from res_nquerydomain.
2199         Added answerp argument.  Call __libc_res_nquery instead of
2200         res_nquery, pass answerp.
2201         (res_nquerydomain): Changed into wrapper around
2202         __libc_res_nquerydomain.
2203         * resolv/res_send.c: Include sys/ioctl.h.
2204         (MAXPACKET): Define.
2205         (send_vc): Change arguments.  Reallocate answer buffer if it is
2206         too small.
2207         (send_dg): Likewise.
2208         (__libc_res_nsend): Renamed from res_nsend.  Added ansp argument.
2209         Reallocate answer buffer if it is too small and hooks are in use.
2210         Adjust calls to send_vc and send_dg.
2211         (res_nsend): Changed into wrapper around __libc_res_nsend.
2212         * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r): Allocate
2213         just 1K answer buffer on the stack, use __libc_res_nsearch instead
2214         of res_nsearch.
2215         (_nss_dns_gethostbyaddr_r): Similarly with __libc_res_nquery.
2216         * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyaddr_r): Likewise.
2217         (_nss_dns_getnetbyname_r): Similarly with __libc_res_nsearch.
2218         * resolv/gethnamaddr.c (gethostbyname2): Likewise.
2219         (gethostbyaddr): Similarly with __libc_res_nquery.
2220         * resolv/Versions (libresolv): Export __libc_res_nquery and
2221         __libc_res_nsearch at GLIBC_PRIVATE.
2222
2223 2002-10-17  Roland McGrath  <roland@redhat.com>
2224
2225         * configure.in: Grok --without-__thread and disable HAVE___THREAD.
2226         * configure: Regenerated.
2227
2228         * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Do CHECK_STATIC_TLS
2229         before performing the reloc, not after.
2230         * sysdeps/i386/dl-machine.h (elf_machine_rel): Likewise.
2231
2232 2002-10-17  Ulrich Drepper  <drepper@redhat.com>
2233
2234         * locale/programs/locale.c (write_locales): Use 'm' flag in fopen call.
2235         * locale/programs/linereader.c (lr_open): Likewise.
2236         * locale/programs/charmap-dir.c (charmap_open): Likewise.
2237         * locale/programs/locarchive.c (add_locale_to_archive): Likewise.
2238
2239 2002-10-17  Isamu Hasegawa  <isamu@yamato.ibm.com>
2240
2241         * posix/bug-regex11.c: Add a test case for the bug reported by
2242         Paolo Bonzini <bonzini@gnu.org>.
2243         * posix/regexec.c (sift_states_bkref): Use correct destination of
2244         the back reference.
2245
2246 2002-10-17  Roland McGrath  <roland@redhat.com>
2247
2248         * elf/dl-load.c (_dl_map_object_from_fd): Don't check DF_STATIC_TLS.
2249         * elf/dl-reloc.c (_dl_relocate_object: CHECK_STATIC_TLS): New macro
2250         to signal error if an IE-model TLS reloc resolved to a dlopen'd module.
2251         * sysdeps/i386/dl-machine.h (elf_machine_rel, elf_machine_rela):
2252         Call it after performing TPOFF relocs.
2253         * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Likewise.
2254         * sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise.
2255         * elf/dl-conflict.c (CHECK_STATIC_TLS): New macro (no-op).
2256
2257         * elf/dl-close.c (remove_slotinfo): Change asserts so as not to crash
2258         when closing a partially-initialized object.
2259
2260         * elf/dl-load.c (_dl_map_object_from_fd) [! USE_TLS]: Call lose
2261         instead of _dl_fatal_printf when we see PT_TLS.
2262
2263         * Makeconfig (CPPFLAGS): Fix last change to use $(libof-$(<F))
2264         instead of $(libof-$<).
2265
2266 2002-10-16  Roland McGrath  <roland@redhat.com>
2267
2268         * cppflags-iterator.mk (CPPFLAGS-$(cpp-src)): Variable removed.
2269         instead of += to append, to be sure $(lib) gets expanded at defn time.
2270         (libof-$(cpp-src)): New variable, define this instead.
2271         * extra-lib.mk (cpp-srcs-left): Reduce duplication in include setup.
2272         (lib): Don't use override.
2273         (CPPFLAGS-$(lib)): New variable, put -D's here.
2274         * Makeconfig (CPPFLAGS): Use basename fn for CPPFLAGS-basename.
2275         Also add $(CPPFLAGS-LIB) before the file-specific flags, for each
2276         LIB found by $(libof-*) for basename, target, or source.
2277         * Makerules (CPPFLAGS-nonlib): New variable.
2278         * nscd/Makefile (lib): Set to nonlib when using cppflags-iterator.mk.
2279         * locale/Makefile (lib): Likewise.
2280         * sunrpc/Makefile (lib): Likewise.
2281
2282         * sysdeps/unix/sysv/linux/fpathconf.c (LINUX_LINK_MAX): Move macro ...
2283         * sysdeps/unix/sysv/linux/linux_fsinfo.h (LINUX_LINK_MAX): ... here.
2284         * sysdeps/unix/sysv/linux/pathconf.h: New file.
2285         (statfs_link_max): New function, guts from fpathconf.c.
2286         * sysdeps/unix/sysv/linux/fpathconf.c: Rewritten using that.
2287         * sysdeps/unix/sysv/linux/pathconf.c (__pathconf): Likewise.
2288         * sysdeps/unix/sysv/linux/alpha/pathconf.c (__pathconf): Rewritten
2289         to use the linux/pathconf.c code by #include rather than duplication.
2290         * sysdeps/unix/sysv/linux/alpha/fpathconf.c (__pathconf): Likewise.
2291
2292 2002-10-16  Jakub Jelinek  <jakub@redhat.com>
2293
2294         * sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER):
2295         Use __libc_errno only for libc itself.
2296
2297 2002-10-16  Andreas Jaeger  <aj@suse.de>
2298
2299         * sysdeps/x86_64/_mcount.S: Fix off-by-1 error in argument access.
2300
2301 2002-10-16  Ulrich Drepper  <drepper@redhat.com>
2302
2303         * sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER):
2304         Use __libc_errno only for libc itself.
2305
2306 2002-10-15  Roland McGrath  <roland@redhat.com>
2307             Jakub Jelinek  <jakub@redhat.com>
2308
2309         * sysdeps/unix/sysv/linux/Makefile
2310         ($(objpfx)syscall-%.h $(objpfx)syscall-%.d): Take code from
2311         sparc/Makefile to produce a bi-arch file as needed.
2312         That's now parameterized by the variable $(64bit-predefine).
2313         Use LC_ALL=C for `comm' commands in that rule.
2314         No longer conditional on [$(no_syscall_list_h)].
2315         * sysdeps/unix/sysv/linux/sparc/Makefile: Remove replacement rules.
2316         (64bit-predefine): New variable.
2317         * sysdeps/unix/sysv/linux/x86_64/Makefile: Likewise.
2318         * sysdeps/unix/sysv/linux/s390/Makefile: New file.
2319         * sysdeps/unix/sysv/linux/powerpc/Makefile
2320         (64bit-predefine): New variable.
2321
2322 2002-10-15  Roland McGrath  <roland@redhat.com>
2323
2324         * sysdeps/unix/sysv/linux/Makefile
2325         ($(objpfx)syscall-%.h $(objpfx)syscall-%.d)
2326
2327         * login/utmp-private.h: Declare __libc_utmp_lock.
2328         * sysdeps/unix/getlogin_r.c (getlogin_r): Take __libc_utmp_lock once
2329         and call __libc_utmp_jump_table functions directly, instead of using
2330         __setutent et al.
2331
2332         * sysdeps/unix/sysv/linux/configure.in: Use case instead of if.
2333         * sysdeps/unix/sysv/linux/configure: Regenerated.
2334
2335         * sysdeps/gnu/bits/utmp.h: Include <bits/wordsize.h>.
2336         (struct lastlog) [__WORDSIZE == 64 && __WORDSIZE_COMPAT32]:
2337         Use int32_t for ll_time.
2338         (struct utmp) [__WORDSIZE == 64 && __WORDSIZE_COMPAT32]:
2339         Use int32_t instead of long int for ut_session.
2340         Use an anonymous struct with 32-bit fields for ut_tv.
2341         * sysdeps/gnu/bits/utmpx.h: Include <bits/wordsize.h>.
2342         (struct utmpx) [__WORDSIZE == 64 && __WORDSIZE_COMPAT32]: Do the same
2343         here as in utmp.h for `struct utmp'.
2344         * sysdeps/unix/sysv/linux/powerpc/bits/utmp.h: File removed.
2345         * sysdeps/unix/sysv/linux/powerpc/bits/utmpx.h: File removed.
2346         * sysdeps/unix/sysv/linux/sparc/bits/utmp.h: File removed.
2347         * sysdeps/unix/sysv/linux/sparc/bits/utmpx.h: File removed.
2348         * sysdeps/unix/sysv/linux/x86_64/bits/utmp.h: File removed.
2349         * sysdeps/unix/sysv/linux/x86_64/bits/utmpx.h: File removed.
2350
2351         * sysdeps/unix/sysv/linux/bits/resource.h: Replaced with the contents
2352         of the sysdeps/unix/sysv/linux/i386/bits/resource.h file.
2353         All the following files were identical or equivalent to it.
2354         * sysdeps/unix/sysv/linux/i386/bits/resource.h: File removed.
2355         * sysdeps/unix/sysv/linux/arm/bits/resource.h: File removed.
2356         * sysdeps/unix/sysv/linux/cris/bits/resource.h: File removed.
2357         * sysdeps/unix/sysv/linux/hppa/bits/resource.h: File removed.
2358         * sysdeps/unix/sysv/linux/ia64/bits/resource.h: File removed.
2359         * sysdeps/unix/sysv/linux/m68k/bits/resource.h: File removed.
2360         * sysdeps/unix/sysv/linux/powerpc/bits/resource.h: File removed.
2361         * sysdeps/unix/sysv/linux/s390/bits/resource.h: File removed.
2362         * sysdeps/unix/sysv/linux/sh/bits/resource.h: File removed.
2363         * sysdeps/unix/sysv/linux/x86_64/bits/resource.h: File removed.
2364
2365         * sysdeps/unix/sysv/linux/bits/socket.h (struct msghdr): Use size_t
2366         instead of int for msg_iovlen, instead of socklen_t for msg_controllen.
2367         Other than the previously incorrect sign of msg_iovlen, this is a
2368         no-op on 32-bit platforms.  On 64-bit platforms it makes this header
2369         match their layouts as well, so the following are now identical to it.
2370         * sysdeps/unix/sysv/linux/s390/bits/socket.h: File removed.
2371         * sysdeps/unix/sysv/linux/sparc/bits/socket.h: File removed.
2372         * sysdeps/unix/sysv/linux/x86_64/bits/socket.h: File removed.
2373         * sysdeps/unix/sysv/linux/ia64/bits/socket.h: File removed.
2374         * sysdeps/unix/sysv/linux/alpha/bits/socket.h: File removed.
2375
2376 2002-10-15  Ulrich Drepper  <drepper@redhat.com>
2377
2378         * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_VFORK_SYSCALL):
2379         Define for 2.4+ kernels.
2380
2381         * sysdeps/unix/sysv/linux/i386/vfork.S: Optimize for kernels which
2382         are known to have the vfork syscall.  Don't confuse the CPUs
2383         branch prediction unit by jumping to the return address.
2384
2385         * sysdeps/unix/sysv/linux/alpha/fpathconf.c (__fpathconf): Add
2386         support for reiserfs and xfs.
2387
2388         * sysdeps/unix/sysv/linux/fpathconf.c (__fpathconf): Add case for
2389         XFS link count.
2390         * sysdeps/unix/sysv/linux/linux_fsinfo.h: Define XFS_SUPER_MAGIC
2391         and XFS_LINK_MAX.
2392         Patch by Eric Sandeen <sandeen@sgi.com> [PR libc/4706].
2393
2394 2002-10-16  Jakub Jelinek  <jakub@redhat.com>
2395
2396         * include/libc-symbols.h (attribute_tls_model_ie): Define.
2397         * include/errno.h (errno): Define to __libc_errno in libc.so.
2398         Add attribute_tls_model_ie.
2399         * include/netdb.h (h_errno): Define to __libc_h_errno in libc.so.
2400         Add attribute_tls_model_ie.
2401         * include/resolv.h (_res): Define to __libc_res in libc.so.  Add
2402         attribute_tls_model_ie.
2403         * inet/herrno.c (__libc_h_errno): Add hidden alias to h_errno.
2404         (h_errno): Define.
2405         * resolv/res_libc.c (__libc_res): Add hidden alias to _res.
2406         (_res): Define.
2407         * sysdeps/generic/bits/libc-tsd.h (__libc_tsd_define): Add
2408         attribute_tls_model_ie.
2409         * sysdeps/generic/errno-loc.c (errno): Only undefine if not using
2410         __thread.
2411         * sysdeps/generic/errno.c (__libc_errno): Add hidden alias to errno.
2412         * sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER): Use
2413         __libc_errno in USE___THREAD case.
2414         * sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER):
2415         Likewise.
2416         * configure.in (HAVE_TLS_MODEL_ATTRIBUTE): Check for
2417         __attribute__((tls_model (""))).
2418         * configure: Rebuilt.
2419         * config.h.in (HAVE_TLS_MODEL_ATTRIBUTE): Add.
2420
2421 2002-10-15  Ulrich Drepper  <drepper@redhat.com>
2422
2423         * timezone/asia: Update from tzdata2002d.
2424         * timezone/australasia: Likewise.
2425         * timezone/iso3166.tab: Likewise.
2426         * timezone/southamerica: Likewise.
2427         * timezone/zone-tab: Likewise.
2428
2429 2002-10-15  Roland McGrath  <roland@redhat.com>
2430
2431         * sysdeps/generic/dl-tls.c (_dl_deallocate_tls) [TLS_TCB_AT_TP]:
2432         Adjust TCB pointer before calling free, so we get the whole block.
2433
2434 2002-10-14  Roland McGrath  <roland@redhat.com>
2435
2436         * sysdeps/unix/sysv/linux/x86_64/sigaction.c
2437         [HAVE_HIDDEN && !HAVE_BROKEN_VISIBILITY_ATTRIBUTE]: Declare restore_rt
2438         extern using attribute_hidden instead of static, avoids warning.
2439
2440 2002-10-09  Jakub Jelinek  <jakub@redhat.com>
2441
2442         * sysdeps/unix/sysv/linux/configure.in: Use */lib64 for s390x too.
2443         * sysdeps/unix/sysv/linux/configure: Rebuilt.
2444
2445 2002-10-14  Ulrich Drepper  <drepper@redhat.com>
2446
2447         * po/sv.po: Update from translation team.
2448
2449 2002-10-12  H.J. Lu  <hjl@gnu.org>
2450
2451         * sunrpc/thrsvc.c (PROCQUIT): New.
2452         (struct rpc_arg): New.
2453         (dispatch): Call exit (0) if request->rq_proc == PROCQUIT.
2454         (test_one_call): Take struct rpc_arg * instead of CLIENT *c.
2455         (thread_wrapper): Modified for struct rpc_arg * and call PROCQUIT.
2456         (main): Modified for struct rpc_arg *.
2457
2458 2002-10-14  Ulrich Drepper  <drepper@redhat.com>
2459
2460         * dirent/scandir.c: Rearrange code a bit to reduce binary size.
2461
2462 2002-10-14  Jakub Jelinek  <jakub@redhat.com>
2463
2464         * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Include tls.h.
2465         (SYSCALL_ERROR_HANDLER): Use RTLD_PRIVATE_ERRNO sequence
2466         in ld.so even if __thread is supported.
2467
2468 2002-10-13  Jakub Jelinek  <jakub@redhat.com>
2469
2470         * sysdeps/unix/sysv/linux/arm/profil-counter.h (profil_counter):
2471         Add hack to prevent the compiler from clobbering the signal context.
2472         * sysdeps/unix/sysv/linux/sh/profil-counter.h (profil_counter):
2473         Likewise.
2474         * sysdeps/unix/sysv/linux/x86_64/profil-counter.h (profil_counter):
2475         Likewise.
2476
2477 2002-10-14  Andreas Jaeger  <aj@suse.de>
2478
2479         * sysdeps/mips/fpu/libm-test-ulps: Regenerated by
2480         Guido Guenther <agx@sigxcpu.org>.
2481
2482 2002-10-14  Ulrich Drepper  <drepper@redhat.com>
2483
2484         * po/sk.po: Update from translation team.
2485
2486 2002-09-26  Roland McGrath  <roland@redhat.com>
2487
2488         * elf/dl-load.c (_dl_dst_count, _dl_dst_substitute): Handle $LIB
2489         dynamic string tag.
2490         * elf/Makefile ($(objpfx)trusted-dirs.st): Make the output define
2491         DL_DST_LIB based on $(slibdir).
2492
2493 2002-10-13  Roland McGrath  <roland@frob.com>
2494
2495         * elf/rtld-Rules ($(objpfx)rtld-libc.a): Use $(verbose) in ar command.
2496
2497         * sysdeps/mach/hurd/getresuid.c: New file.
2498         * sysdeps/mach/hurd/getresgid.c: New file.
2499         * sysdeps/mach/hurd/setresuid.c: New file.
2500         * sysdeps/mach/hurd/setresgid.c: New file.
2501
2502         * posix/unistd.h [__USE_GNU] (getresuid, getresgid, setresuid,
2503         setresgid): Declare them.
2504         * NEWS: Mention it.
2505         * include/unistd.h
2506         (__getresuid, __getresgid, __setresuid, __setresgid): Declare them,
2507         add libc_hidden_proto.
2508         * posix/Versions (libc: GLIBC_2.3.2): New set.  Add
2509         getresuid, getresgid, setresuid, setresgid here.
2510         * Versions.def (libc): Define GLIBC_2.3.2 set.
2511         * sysdeps/generic/getresuid.c (__getresuid): Fix argument types.
2512         Add libc_hidden_def.
2513         * sysdeps/generic/getresgid.c (__getresgid): Likewise.
2514         * sysdeps/generic/setresgid.c: New file.
2515         * sysdeps/generic/setresuid.c: New file.
2516         * sysdeps/unix/sysv/linux/Makefile [$(subdir) = misc]
2517         (sysdep_routines): Don't add getresuid and getresgid here.
2518         * sysdeps/unix/sysv/linux/arm/Makefile [$(subdir) = misc]
2519         (sysdep_routines): Don't add setresuid and setresgid here.
2520         * sysdeps/unix/sysv/linux/cris/Makefile: Likewise.
2521         * sysdeps/unix/sysv/linux/sh/Makefile: Likewise.
2522         * sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise.
2523         * sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Likewise.
2524         * sysdeps/unix/sysv/linux/i386/Makefile: Likewise.
2525         * sysdeps/unix/sysv/linux/m68k/Makefile: Likewise.
2526         * posix/Makefile (routines): Add them all here instead.
2527         * sysdeps/unix/sysv/linux/i386/getresuid.c (getresuid): Renamed to
2528         __getresuid.  Add libc_hidden_def for that, and weak alias to old name.
2529         * sysdeps/unix/sysv/linux/i386/getresgid.c (getresgid): Renamed to
2530         __getresgid.  Add libc_hidden_def for that, and weak alias to old name.
2531         * sysdeps/unix/sysv/linux/i386/setresuid.c: Add libc_hidden_def.
2532         [! __NR_setresuid]: Include generic file.
2533         * sysdeps/unix/sysv/linux/i386/setresgid.c (setresgid): Renamed to
2534         __setresgid.  Add libc_hidden_def for that, and weak alias to old name.
2535         [! __NR_setresuid]: Include generic file.
2536         * sysdeps/unix/sysv/linux/syscalls.list (setresuid, setresgid):
2537         Caller is - now, not EXTRA.
2538         * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list
2539         (setresuid, setresgid, getresuid, getresgid): Likewise.
2540         * sysdeps/unix/sysv/linux/syscalls.list (getresuid, getresgid):
2541         Add these calls here.
2542         * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove them here.
2543         * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise.
2544         * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
2545         * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise.
2546         * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
2547         * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list: Likewise.
2548         * sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Likewise.
2549         * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
2550         * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
2551
2552         * sysdeps/unix/sysv/linux/Makefile [$(subdir) = misc]
2553         (sysdep_routines): Add setfsuid and setfsgid here.
2554         * sysdeps/unix/sysv/linux/arm/Makefile: Not here.
2555         * sysdeps/unix/sysv/linux/sparc/sparc32/Makefile: Likewise.
2556         * sysdeps/unix/sysv/linux/cris/Makefile: Likewise.
2557         * sysdeps/unix/sysv/linux/sh/Makefile: Likewise.
2558         * sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise.
2559         * sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Likewise.
2560         * sysdeps/unix/sysv/linux/i386/Makefile: Likewise.
2561         * sysdeps/unix/sysv/linux/m68k/Makefile: Likewise.
2562
2563         * hurd/errno.c: Renamed to ...
2564         * hurd/errno-loc.c: ... this.
2565         * hurd/Makefile (routines): errno -> errno-loc
2566
2567 2002-10-13  Ulrich Drepper  <drepper@redhat.com>
2568
2569         * po/de.po: Update from translation team.
2570
2571         * MakeTAGS: Add -E flag to xgettext runs.
2572
2573 2002-10-12  Ulrich Drepper  <drepper@redhat.com>
2574
2575         * po/fr.po: Update from translation team.
2576
2577         * sysdeps/posix/system.c: Remove support for old and buggy SCO systems.
2578         Optimize a bit for use in glibc.
2579
2580 2002-10-12  Roland McGrath  <roland@redhat.com>
2581
2582         * stdio-common/tst-rndseek.c (TIMEOUT): Increase to 10 seconds.
2583         Some machines are slow.  Guido Guenther <agx@sigxcpu.org> has one.
2584
2585 2002-10-12  Ulrich Drepper  <drepper@redhat.com>
2586
2587         * po/sv.po: Update from translation team.
2588
2589 2002-10-11  Isamu Hasegawa  <isamu@yamato.ibm.com>
2590
2591         * posix/regcomp.c (re_compile_fastmap_iter): Remove the handling
2592         OP_CONTEXT_NODE.
2593         (regfree): Likewise.
2594         (create_initial_state): Likewise.
2595         (analyze): Remove the substitutions which became useless.
2596         (calc_first): Likewise.
2597         (calc_epsdest): Use edests of OP_BACK_REF in case that it has
2598         epsilon destination.
2599         (duplicate_node_closure): New function.
2600         (duplicate_node): Remove the handling OP_CONTEXT_NODE.
2601         (calc_inveclosure): Likewise.
2602         (calc_eclosure): Likewise.
2603         (calc_eclosure_iter): Invoke duplicate_node_closure instead of
2604         direct invocation of duplicate_node.
2605         (parse): Don't use comma operator in the return to avoid compiler
2606         warning.
2607         (parse_reg_exp): Likewise.
2608         (parse_branch): Likewise.
2609         (parse_expression): Likewise.
2610         (parse_sub_exp): Likewise.
2611         (parse_dup_op): Likewise.
2612         * posix/regex_internal.c (re_dfa_add_node): Remove the substitutions
2613         which became useless.
2614         (create_ci_newstate): Remove the handling OP_CONTEXT_NODE.
2615         (create_cd_newstate): Likewise.
2616         * posix/regex_internal.h (re_token_type_t): Remove the obsolete type.
2617         (re_token_t): Likewise.
2618         (re_dfa_t): Likewise.
2619         (re_node_set_remove): New macro.
2620         * posix/regexec.c (check_matching): Remove the handling
2621         OP_CONTEXT_NODE.
2622         (check_halt_node_context): Likewise.
2623         (proceed_next_node): Likewise.
2624         (pop_fail_stack): Fix the memory leak.
2625         (set_regs): Likewise.
2626         (free_fail_stack_return): New function.
2627         (sift_states_backward): Fix the memory leak.  Remove the handling
2628         OP_CONTEXT_NODE.
2629         (update_cur_sifted_state): Append some if clause to avoid redundant
2630         call.
2631         (sub_epsilon_src_nodes): Use IS_EPSILON_NODE since it might be a
2632         back reference.
2633         (check_dst_limits): Remove the handling OP_CONTEXT_NODE.
2634         (check_subexp_limits): Likewise.
2635         (search_subexp): Likewise.
2636         (sift_states_bkref): Likewise.
2637         (transit_state_mb): Likewise.
2638         (transit_state_bkref_loop): Likewise.
2639         (transit_state_bkref_loop): Likewise.
2640         (group_nodes_into_DFAstates): Likewise.
2641         (check_node_accept): Likewise.
2642         (sift_ctx_init): Add initializing.
2643
2644 2002-10-12  Ulrich Drepper  <drepper@redhat.com>
2645
2646         * sysdeps/unix/sysv/linux/i386/sysdep.h (INLINE_SYSCALL): Use
2647         __builtin_expect.
2648
2649 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
2650
2651         * elf/dl-load.c (_dl_map_object_from_fd): Remove unnecessarily
2652         duplicated variable c.
2653
2654         * sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Use INTERNAL_SYSCALL
2655         if possible.
2656
2657         * sysdeps/unix/sysv/linux/i386/sysdep.h
2658         (INTERNAL_SYSCALL_ERROR_P): New define.
2659         (INTERNAL_SYSCALL_ERRNO): Likewise.
2660
2661         * sysdeps/unix/sysv/linux/i386/profil-counter.h (profil_counter):
2662         Add hack to prevent the compiler from clobbering the signal context.
2663
2664 2002-10-11  Roland McGrath  <roland@redhat.com>
2665
2666         * sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER):
2667         Fix typos.
2668
2669         * sysdeps/generic/dl-lookupcfg.h: Include <tls.h>.
2670         * sysdeps/sh/dl-lookupcfg.h: File removed.
2671         * sysdeps/i386/dl-lookupcfg.h: File removed.
2672
2673         * sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER): Add
2674         missing labels and ; from last change.
2675
2676         * stdio-common/tst-sscanf.c (val_double): Append .0 to large whole
2677         number literals, so they are doubles instead of ints.
2678
2679 2002-10-09  Roland McGrath  <roland@redhat.com>
2680
2681         * sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional
2682         changed from [USE_TLS && HAVE___THREAD].
2683
2684         * sysdeps/i386/dl-machine.h (elf_machine_type_class, elf_machine_rel):
2685         Disable TLS relocs if [RTLD_BOOTSTRAP && !USE___THREAD].
2686         * sysdeps/x86_64/dl-machine.h
2687         (elf_machine_type_class, elf_machine_rela): Likewise.
2688         * sysdeps/sh/dl-machine.h (elf_machine_type_class, elf_machine_rela):
2689         Likewise.
2690
2691         * include/link.h (struct link_map): Remove member l_tls_tp_initialized.
2692         * elf/rtld.c (_dl_start_final, dl_main): Don't use it.
2693         (_dl_start): Conditionalize PT_TLS check on [USE___THREAD].
2694
2695         * sysdeps/i386/dl-tls.h (__TLS_GET_ADDR): Use ___tls_get_addr_internal
2696         instead of ___tls_get_addr.
2697         (___tls_get_addr_internal): Add attribute_hidden to decl.
2698
2699         * sysdeps/generic/ldsodefs.h (struct rtld_global): New variable
2700         _dl_error_catch_tsd.
2701         * elf/rtld.c (startup_error_tsd): New function.
2702         (dl_main): Point _dl_error_catch_tsd at that.
2703         * elf/dl-error.c: Don't use libc-tsd.h for DL_ERROR,
2704         use new function pointer instead.
2705         * elf/dl-tsd.c: New file.
2706         * elf/Makefile (routines): Add it.
2707
2708 2002-10-07  Roland McGrath  <roland@redhat.com>
2709
2710         * elf/dl-misc.c (_dl_debug_vdprintf): Use INTERNAL_SYSCALL macro for
2711         writev if it's available.  Otherwise if [RTLD_PRIVATE_ERRNO] then
2712         take _dl_load_lock around calling __writev.
2713
2714         * sysdeps/unix/sysv/linux/i386/sysdep.h (INTERNAL_SYSCALL): New macro.
2715         (INLINE_SYSCALL): Use that.
2716
2717         * sysdeps/generic/dl-sysdep.h: New file.
2718         * sysdeps/mach/hurd/dl-sysdep.h: New file.
2719         * sysdeps/generic/ldsodefs.h: Include <dl-sysdep.h>.
2720         * include/errno.h [IS_IN_rtld]: Include <dl-sysdep.h> to define ...
2721         [RTLD_PRIVATE_ERRNO]: Use a hidden global variable for errno and
2722         access it directly.
2723         * elf/dl-minimal.c (__errno_location): Removed.
2724         * sysdeps/unix/i386/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
2725         Use GOTOFF access for errno.
2726         * sysdeps/unix/sysv/linux/i386/sysdep.h
2727         [RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
2728
2729         * sysdeps/unix/x86_64/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
2730         Use PC-relative access for errno.
2731         * sysdeps/unix/sysv/linux/x86_64/sysdep.h
2732         [RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
2733
2734         * include/tls.h: New file.
2735         (USE___THREAD): New macro.
2736         Define to 1 under [USE_TLS && HAVE___THREAD] and only when compiling
2737         libc or libpthread.
2738         * sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD]: Conditional
2739         changed from [USE_TLS && HAVE___THREAD].
2740         * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
2741         * sysdeps/unix/i386/sysdep.S: Likewise.
2742         * sysdeps/unix/x86_64/sysdep.S: Likewise.
2743         * include/errno.h: Likewise.
2744         * include/netdb.h: Likewise.
2745         * include/resolv.h: Likewise.
2746
2747         * sysdeps/generic/errno.c: New file.
2748         * csu/Makefile (aux): New variable, list errno.
2749         * sysdeps/unix/sysv/linux/i386/sysdep.S (errno, _errno): Remove defns.
2750         * sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
2751         * sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise.
2752         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise.
2753         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise.
2754         * sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
2755         * sysdeps/unix/sysv/linux/cris/sysdep.S: Likewise.
2756         * sysdeps/unix/sysv/linux/hppa/sysdep.c: Likewise.
2757         * sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise.
2758         * sysdeps/unix/sysv/linux/powerpc/sysdep.c: Likewise.
2759         * sysdeps/unix/sysv/linux/sparc/sysdep.S: Likewise.
2760         * sysdeps/unix/sysv/linux/sh/sysdep.S: Likewise.
2761         * sysdeps/unix/alpha/sysdep.S: Likewise.
2762         * sysdeps/generic/start.c: Likewise.
2763         * sysdeps/unix/start.c: Likewise.
2764         * sysdeps/unix/arm/start.c: Likewise.
2765         * sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
2766         * sysdeps/unix/sparc/start.c: Likewise.
2767         * sysdeps/unix/sysv/irix4/start.c: Likewise.
2768         * sysdeps/unix/sysv/linux/mips/sysdep.S: File removed.
2769
2770         * manual/search.texi (Tree Search Function, Hash Search Function):
2771         Mention search.h clearly.
2772
2773 2002-10-05  Roland McGrath  <roland@redhat.com>
2774
2775         * elf/dl-fxstat64.c: File removed.
2776         * elf/dl-xstat64.c: File removed.
2777         * elf/Makefile (rtld-routines): Remove them.
2778         * sysdeps/unix/sysv/linux/xstat64.c: Remove RTLD_STAT64 conditionals.
2779         Instead, use strong_alias instead of versioned_symbol in the
2780         !SHLIB_COMPAT case.
2781         * sysdeps/unix/sysv/linux/fxstat64.c: Likewise.
2782         * sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
2783
2784         * include/shlib-compat.h
2785         (SHLIB_COMPAT): Require that IS_IN_##lib be defined nonzero.
2786         [! NOT_IN_libc] (IS_IN_libc): Define it.
2787         * cppflags-iterator.mk (CPPFLAGS-$(cpp-src)): Use -Dx=1 not just -Dx.
2788         * elf/Makefile (CPPFLAGS-.os): Likewise.
2789
2790         * sunrpc/rpc_main.c (main): Don't declare with noreturn attribute.
2791         Return the status instead of calling exit.
2792
2793         * Makeconfig (CFLAGS): Prepend -std=gnu99.
2794         * Makerules (+make-deps): Use $(CFLAGS) only for .c sources.
2795         Remove superfluous rm command, whose @ plus make bugs hid
2796         all these commands from the make output.
2797
2798         * include/stubs-prologue.h: New file.  Give #error under #ifdef _LIBC.
2799         * Makefile ($(inst_includedir)/gnu/stubs.h): Depend on it.
2800         Use that file's contents instead of literal echo's for the prologue.
2801         * include/features.h: Include <gnu/stubs.h> unconditionally.
2802         * include/gnu/stubs.h: New file.
2803
2804 2002-09-30  Roland McGrath  <roland@redhat.com>
2805
2806         * elf/rtld-Rules: New file.
2807         * elf/Makefile ($(objpfx)librtld.map, $(objpfx)librtld.mk,
2808         $(objpfx)rtld-libc.a): New targets.
2809         (generated): Add them.
2810         (reloc-link): Remove -o $@ from the variable.
2811         ($(objpfx)dl-allobjs.os): Add -o $@ after $(reloc-link).
2812         (distribute): Add rtld-Rules.
2813         (CPPFLAGS-.os): Define this instead of CFLAGS-.os.
2814         * Makerules ($(+sysdir_pfx)sysd-rules): Emit rules for rtld-% targets.
2815         (common-mostlyclean, common-clean): Clean up rtld-* files.
2816         * sysdeps/unix/make-syscalls.sh: Add rtld-*.os target name to rules.
2817
2818 2002-10-11  Roland McGrath  <roland@redhat.com>
2819
2820         * sysdeps/generic/dl-tls.c (__tls_get_addr): After freeing block in
2821         now-unused dtv slot, reset the slot to TLS_DTV_UNALLOCATED.
2822
2823         * elf/tls-macros.h [__x86_64__] (TLS_GD): Fix the sequence with the
2824         proper set of no-op insn prefixes.
2825
2826         * elf/tst-tls8.c (do_test): Use %zd format for l_tls_modid members.
2827
2828 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
2829
2830         * sysdeps/unix/sysv/linux/execve.c: Don't try calling
2831         __pthread_kill_other_threads_np.
2832
2833         * sysdeps/generic/pselect.c: Avoid unnecessary sigprocmask calls.
2834
2835 2002-10-08  Roland McGrath  <roland@redhat.com>
2836
2837         * locale/newlocale.c (__newlocale): If setting all categories to "C",
2838         just return &_nl_C_locobj instead of copying it.
2839         * locale/freelocale.c (__freelocale): Check for &_nl_C_locobj.
2840         * locale/duplocale.c (__duplocale): Likewise.
2841
2842 2002-10-07  Roland McGrath  <roland@frob.com>
2843
2844         * config.h.in (HAVE_I386_SET_GDT): New #undef.
2845         * sysdeps/mach/configure.in: Define it with new check for i386_set_gdt.
2846         * sysdeps/mach/configure: Regenerated.
2847
2848 2002-10-06  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
2849
2850         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (INLINE_SYSCALL):
2851         Add all necessary register outputs for syscall-clobbered registers.
2852
2853 2002-10-02  David Mosberger  <davidm@hpl.hp.com>
2854
2855         * sysdeps/ia64/bzero.S: Rewritten by Sverre Jarp to tune for
2856         Itanium 2 (and Itanium).
2857         Fix unwind directives and make it fit in 80 columns.
2858         * sysdeps/ia64/memset.S: Likewise.
2859         * sysdeps/ia64/memcpy.S: Likewise.
2860         Move jump table to .rodata section.
2861
2862 2002-10-03  Roland McGrath  <roland@frob.com>
2863
2864         * sysdeps/mach/hurd/i386/init-first.c (_hurd_stack_setup): Add
2865         clobbers to asm.
2866
2867 2002-10-10  Andreas Jaeger  <aj@suse.de>
2868
2869         * sysdeps/x86_64/_mcount.S: Restore correct registers.
2870
2871 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
2872
2873         * posix/Versions (libc) [GLIBC_PRIVATE]: Add __pselect.
2874
2875 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
2876
2877         * sysdeps/generic/ldsodefs.h: Remove attribute_hidden from
2878         _dl_allocate_tls_init.  Add rtld_hidden_proto.
2879         * sysdeps/generic/dl-tls.c (_dl_allocate_tls_init): Add
2880         rtld_hidden_def.
2881         * elf/Versions (ld) [GLIBC_PRIVATE]: Add _dl_allocate_tls_init.
2882
2883         * version.h (VERSION): Bump to 2.3.1.
2884
2885         * Make-dist: Add back one of the tar invocations removed before.
2886
2887         * stdlib/Makefile (distribute): Add allocalim.h.
2888
2889         * sysdeps/generic/bits/libc-tsd.h [!(USE_TLS && HAVE___THREAD)]
2890         (__libc_tsd_address): Use correct variable name.
2891         Patch by Stefan Jones <stefan.jones@multigig.com>.
2892
2893         * sysdeps/unix/sysv/linux/ia64/getcontext.S: Add missing ;;.
2894         Reported by edwardsg@sgi.com [PR libc/4678].
2895
2896         * Versions.def (libc): Add GLIBC_2.3.1.
2897         (libpthread): Add GLIBC_2.3.1.
2898
2899         * include/signal.h: Add libc_hidden_proto for __sigwait, __sigwaitinfo,
2900         and __sigtimedwait.
2901         * signal/Versions: Add __sigtimedwait, __sigwait, and __sigwaitinfo.
2902         * sysdeps/unix/sysv/linux/sigtimedwait.c (__sigtimedwait): Add
2903         libc_hidden_def.
2904         * sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Likewise.
2905         * sysdeps/unix/sysv/linux/sigwaitinfo.c (__sigwaitinfo): Likewise.
2906
2907         * include/sys/msg.h: Declare __libc_msgrcv and __libc_msgsnd.
2908         * sysdeps/unix/sysv/linux/msgrcv.c (__msgrcv): Rename to __libc_msgrcv
2909         and make old name an alias.
2910         * sysdeps/unix/sysv/linux/msgsnd.c (__msgsnd): Rename to __libc_msgsnd
2911         and make old name an alias.
2912         * sysvipc/Versions (libc) [GLIBC_PRIVATE]: Add __libc_msgrcv and
2913         __libc_msgsnd.
2914
2915         * include/sys/uio.h: Declare __libc_readv and __libc_writev.
2916         * misc/Versions (libc) [GLIBC_PRIVATE]: Add __libc_readv and
2917         __libc_writev.
2918         * sysdeps/generic/readv.c (__readv): Rename to __libc_readv and make
2919         old name an alias.
2920         * sysdeps/posix/readv.c: Likewise
2921         * sysdeps/unix/sysv/aix/readv.c: Likewise.
2922         * sysdeps/unix/sysv/linux/readv.c: Likewise.
2923         * sysdeps/generic/writev.c (__writev): Rename to __libc_writev and make
2924         old name an alias.
2925         * sysdeps/posix/writev.c: Likewise
2926         * sysdeps/unix/sysv/aix/writev.c: Likewise.
2927         * sysdeps/unix/sysv/linux/writev.c: Likewise.
2928
2929         * include/sys/wait.h: Declare __waitid.
2930         * posix/Versions (libc) [GLIBC_PRIVATE]: Add __waitid.
2931         * sysdeps/generic/waitid.c (waitid): Rename to __waitid and make old
2932         name an alias.
2933         * sysdeps/posix/waitid.c: Likewise.
2934         * sysdeps/unix/sysv/aix/waitid.c: Likewise.
2935
2936         * sysdeps/unix/sysv/linux/syscalls.list: Add creat syscall.
2937
2938 2002-10-07  Jakub Jelinek  <jakub@redhat.com>
2939
2940         * include/alloca.h (__libc_use_alloca, __libc_alloca_cutoff): New
2941         prototypes.
2942         (__MAX_ALLOCA_CUTOFF): Define.
2943         Include allocalim.h.
2944         * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r,
2945         _nss_dns_gethostbyaddr_r): Use alloca or malloc to allocate
2946         host_buffer depending on __libc_use_alloca.
2947         * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyname_r,
2948         _nss_dns_getnetbyaddr_r): Use alloca or malloc to allocate
2949         net_buffer depending on __libc_use_alloca.
2950         * resolv/res_query.c (res_nquery): Use alloca or malloc to allocate
2951         buf depending on __libc_use_alloca.
2952         * resolv/gethnamaddr.c (gethostbyname2, gethostbyaddr): Likewise.
2953         * stdio-common/vfprintf.c (vfprintf): Use __libc_use_alloca
2954         instead of hardcoded constants.
2955         Pass proper size argument to alloca and compute end for wide char
2956         version.
2957         * stdio-common/printf_fp.c (__printf_fp): Use __libc_use_alloca
2958         instead of hardcoded constants.
2959         * string/strcoll.c (strcoll): Likewise.
2960         * string/strxfrm.c (strxfrm): Likewise.
2961         * sysdeps/posix/readv.c (__readv): Likewise.
2962         * sysdeps/posix/writev.c (__writev): Likewise.
2963         * sysdeps/generic/allocalim.h: New file.
2964
2965 2002-10-08  Roland McGrath  <roland@redhat.com>
2966
2967         * configure.in (aux_missing warning): Change "too old" to
2968         "incompatible versions", since for autoconf it's "too new" right now.
2969         * configure: Regenerated.
2970
2971         * configure.in (AUTOCONF): New check to set it.  Set to "no" if the
2972         one found doesn't work on our configure.in.
2973         * configure: Regenerated.
2974         * config.make.in (AUTOCONF): New substituted variable.
2975         * Makefile (autoconf-it-cvs): New canned sequence, broken out of ...
2976         (autoconf-it): ... here, use that instead of defining conditionally.
2977         Use $(AUTOCONF) instead of literal autoconf.
2978         [$(AUTOCONF) != no] (configure, %/configure): Protect these rules
2979         with this condition.
2980         * Make-dist (autoconf-it, configure, %/configure): Copy those changes.
2981
2982 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
2983
2984         * Make-dist (dist): Cleanup a bit.  We are not interested in the
2985         14 char filename limit anymore.  Remove intermediate files and
2986         symlinks.
2987
2988 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
2989
2990         * po/sk.po: Update from translation team.
2991         * po/tr.po: Likewise.
2992         * po/gl.po: Likewise.
2993
2994 2002-10-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2995
2996         * elf/tls-macros.h: Fix SH version of macros so as to match ABI syntax.
2997
2998 2002-10-03  Ulrich Drepper  <drepper@redhat.com>
2999
3000         * version.h (RELEASE): Change to stable.
3001
3002 2002-10-03  Jakub Jelinek  <jakub@redhat.com>
3003
3004         * sysdeps/unix/sysv/linux/_exit.c (__syscall_exit,
3005         __syscall_exit_group): New prototypes.
3006
3007 2002-10-03  Ulrich Drepper  <drepper@redhat.com>
3008
3009         * glibc 2.3 released.
3010
3011
3012 See ChangeLog.13 for earlier changes.