* sysdeps/generic/bits/libc-lock.h: Same changes.
[platform/upstream/glibc.git] / ChangeLog
1 2001-08-23  Roland McGrath  <roland@frob.com>
2
3         * sysdeps/mach/hurd/bits/libc-lock.h: New file, initially copied from
4         sysdeps/mach version.  Implement counting ("recursive") mutexes
5         on top of cthreads mutexes.
6         * sysdeps/mach/hurd/bits/stdio-lock.h: File removed; generic now works.
7
8         * sysdeps/generic/bits/stdio-lock.h (_IO_lock_initializer): Define to
9         _LIBC_LOCK_RECURSIVE_INITIALIZER if defined, else do an #error.
10         (__libc_cleanup_region_start, __libc_cleanup_region_end,
11         __libc_clean_end): Define these to call the cleanup function after
12         normal exit when they're supposed to.
13
14         * sysdeps/mach/bits/libc-lock.h (__libc_cleanup_region_start):
15         Take new first arg DOIT, a boolean saying whether to really install
16         any cleanup handler.
17         (__libc_cleanup_region_end): Do nothing if start's DOIT arg was zero.
18         (__libc_cleanup_end): Likewise.
19         * sysdeps/generic/bits/libc-lock.h: Same changes.
20         * stdio-common/vfscanf.c (LOCK_STREAM): Pass new arg.
21         * stdio-common/vfprintf.c (buffered_vfprintf, vfprintf): Likewise.
22         * sysdeps/mach/hurd/bits/stdio-lock.h (_IO_cleanup_region_start):
23         Likewise.
24         * misc/syslog.c (vsyslog, openlog, closelog): Likewise.
25         * sysdeps/generic/bits/stdio-lock.h
26         (_IO_cleanup_region_start, _IO_cleanup_region_start_noarg): Likewise.
27
28 2001-08-23  Jakub Jelinek  <jakub@redhat.com>
29
30         * elf/ldconfig.c (search_dir): Remove stale symlinks.
31
32 2001-08-23  Jakub Jelinek  <jakub@redhat.com>
33
34         * elf/dl-lookup.c (lookup_cache, lookup_cache_versioned): New.
35         (_dl_lookup_symbol): Lookup relocations in cache and store successfull
36         lookups in cache.
37         (_dl_lookup_versioned_symbol): Likewise.
38         * elf/dl-reloc.c (_dl_relocate_object): Initialize cache for
39         relocation lookup.
40         * elf/rtld.c (print_statistics): Output _dl_num_cache_relocations.
41         * sysdeps/generic/ldsodefs.h (struct lookup_cache): New definition.
42         (lookup_cache, lookup_cache_versioned): Add declarations.
43
44 2001-08-23  Ulrich Drepper  <drepper@redhat.com>
45
46         * stdlib/tst-random.c (main): Swap parameters in fail call.
47         Patch by Pete Bevin <pete@petebevin.com>.
48
49 2001-08-23  Jakub Jelinek  <jakub@redhat.com>
50
51         * sysdeps/generic/inttypes.h: Use __gwchar_t instead of __wchar_t.
52
53 2001-08-23  Ulrich Drepper  <drepper@redhat.com>
54
55         * malloc/obstack.c: Indent preprocessor directives.
56         Patch by Jim Meyering <meyering@ascend.com>.
57
58         * po/ja.po: Update from translation team.
59
60 2001-08-23  Roland McGrath  <roland@frob.com>
61
62         * libio/tst-ungetwc1.c (main): Add a const to quiet a warning.
63
64         * nss/test-netdb.c (test_hosts): Don't use MAXHOSTNAMELEN.
65         Instead, use dynamic buffer to test gethostname's ENAMETOOLONG error.
66
67 2001-08-22  Roland McGrath  <roland@frob.com>
68
69         * sysdeps/generic/ldsodefs.h (_dl_load_lock): Declare it here with
70         __libc_lock_define_recursive.
71         * elf/dl-open.c: Don't declare it here any more.
72         * elf/dl-close.c: Likewise.
73         * elf/dl-lookup.c: Likewise.
74         * elf/dl-iteratephdr.c: Likewise.
75         * elf/dl-lookup.c (add_dependency): Use __libc_lock_lock_recursive and
76         __libc_lock_unlock_recursive.
77         * elf/dl-close.c (_dl_close): Likewise
78         * elf/dl-iteratephdr.c (__dl_iterate_phdr): Likewise
79         * elf/dl-open.c (_dl_open): Likewise
80
81         * sysdeps/generic/bits/libc-lock.h
82         (__libc_lock_define_recursive): New macro.
83         * sysdeps/generic/bits/stdio-lock.h (_IO_lock_t): Use it.
84         (_IO_lock_lock): Use __libc_lock_lock_recursive.
85         (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
86
87         * conform/conformtest.pl (checknamespace): Sort the output list.
88
89         * sysdeps/generic/bits/poll.h (POLLWRBAND): New alias for POLLOUT.
90         (POLLRDNORM, POLLRDBAND, POLLWRNORM, POLLWRBAND): Make these
91         definitions conditional on [__USE_XOPEN].
92
93         * sysdeps/mach/hurd/bits/fcntl.h (O_ASYNC, O_FSYNC, O_SYNC): Define
94         these unconditionally, not only use [__USE_BSD], so as to match
95         the sysdeps/unix/sysv/linux files.
96
97 2001-08-22  Ulrich Drepper  <drepper@redhat.com>
98
99         * test-skeleton.c (add_temp_file): Add __attribute__ ((unused)) to
100         avoid warnings.
101
102         * dlfcn/tst-dladdr.c (do_test): Get address of ref1 using
103         DL_LOOKUP_ADDRESS.
104
105 2001-08-22  Roland McGrath  <roland@frob.com>
106
107         * sysdeps/generic/bits/sigaction.h (struct sigaction): Fix up
108         conditionalization of sa_handler/sa_sigaction member types to
109         match the sysdeps/unix/sysv/linux file.
110
111 2001-08-22  Ulrich Drepper  <drepper@redhat.com>
112
113         * elf/dl-addr.c (_dl_addr): Handle broken binaries with zero
114         symbol sizes a bit better.
115
116         * sysdeps/ia64/strncpy.S: Complete rewrite.
117         Contributed by Jakub Jelinek <jakub@redhat.com>.
118
119         * string/stratcliff.c (main): Add strncpy test.
120
121 2001-08-22  Roland McGrath  <roland@frob.com>
122
123         * sysdeps/generic/dl-environ.c: Include <stdlib.h> and <unistd.h>,
124         and don't declare unsetenv or _environ directly.
125         (unsetenv): Return int, not void.  Use __environ instead of _environ.
126
127 2001-08-01  Mark Kettenis  <kettenis@gnu.org>
128
129         * sysdeps/unix/bsd/bsd4.4/Makefile: New file.
130         * sysdeps/unix/bsd/bsd4.4/Versions: New file.
131         * sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c: New file.
132         * sysdeps/unix/bsd/bsd4.4/bits/socket.h (__cmsg_nxthdr): Correct
133         test for cmsg struct size.
134
135 2001-04-23  Paul Eggert  <eggert@twinsun.com>
136
137         * posix/getopt.h (getopt_long, getopt_long_only, _getopt_internal):
138         Rename __argc to ___argc in prototypes to avoid compatibility
139         problems with systems that reserve the identifier "__argc".
140         Similarly for __argv.
141
142 2001-08-21  Roland McGrath  <roland@frob.com>
143
144         * stdio-common/tst-fseek.c: Include <time.h> for `time' declaration.
145
146         * mach/Makefile (tests): Removed.
147         * mach/hello.c: File removed.
148
149 2001-08-22  Ulrich Drepper  <drepper@redhat.com>
150
151         * po/sv.po: Update from translation team.
152
153         * stdio-common/vfscanf.c: Fix handling of %l[].
154         Reported by Mitsuru Chinen <mchinen@yamato.ibm.com>.
155
156         * libio/Makefile (tests): Add tst-sscanf.
157         * libio/tst-sscanf.c: New file.
158
159         * elf/dl-addr.c (_dl_addr): Fix tests to determine dli_sname.
160         * malloc/mtrace.c (tr_where): dli_sname always points to a
161         non-empty string if != NULL.
162         Reported by Tim Janik <timj@gtk.org>.
163
164 2001-08-22  Jakub Jelinek  <jakub@redhat.com>
165
166         * sunrpc/xdr_rec.c (xdrrec_create): Fix buf sizes before allocating
167         buf.  Free resources on failure.
168         * sunrpc/svc_unix.c (svcunix_create): Free resources on failure.
169         (makefd_xprt): Likewise.
170         * sunrpc/svc_udp.c (svcudp_bufcreate): Likewise.
171         * sunrpc/svc_tcp.c (svctcp_create, makefd_xprt): Likewise.
172         * sunrpc/auth_unix.c (authunix_create): Likewise.
173
174 2001-08-21  Jakub Jelinek  <jakub@redhat.com>
175
176         * string/strnlen.c: Remove.
177         * sysdeps/generic/strnlen.c: New.
178         * sysdeps/i386/i486/bits/string.h (strnlen): Remove.
179
180 2001-08-21  Roland McGrath  <roland@frob.com>
181
182         * sysdeps/mach/i386/machine-sp.h (__thread_stack_pointer): Define this
183         as a macro, not an extern inline function.
184
185         * hurd/Versions (GLIBC_2.2.5): New set, define __hurd_fail here.
186         * Versions.def (libc): Add GLIBC_2.2.5 set.
187         * hurd/hurd.h (_HURD_H_EXTERN_INLINE): New macro.
188         (__hurd_fail): Use that instead of _EXTERN_INLINE in decl.
189
190 2001-08-20  Roland McGrath  <roland@frob.com>
191
192         * hurd/hurdlookup.c (__hurd_file_name_lookup): Fail with ENOENT for "".
193         (__hurd_file_name_split, __hurd_directory_name_split): Likewise.
194
195 2001-08-21  Ulrich Drepper  <drepper@redhat.com>
196
197         * string/bits/string2.h: Remove strnlen optimization here.
198         * sysdeps/i386/i486/bits/string.h: Add it here.
199
200 2001-08-21  Wolfram Gloger  <wg@malloc.de>
201
202         * malloc/malloc.c: Make access to ..._hook pointers thread-safe.
203
204 2001-08-21  Ulrich Drepper  <drepper@redhat.com>
205
206         * po/gl.po: Update from translation team.
207
208 2001-08-20  Ulrich Drepper  <drepper@redhat.com>
209
210         * misc/error.c (error_tail): Use fputws_unlocked instead of fputws.
211         * misc/err.c (convert_and_print): Likewise.
212
213         * malloc/obstack.c (print_and_abort): Use fprintf instead of two
214         function calls.
215
216 2001-08-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
217
218         * sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h: Revert the
219         change of the gregset_t type.
220         * sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h: Likewise.
221
222 2001-08-20  kaz Kojima  <kkojima@rr.iij4u.or.jp>
223
224         * sysdeps/unix/sysv/linux/sh/sysdep.S: Align errno.
225
226 2001-08-20  Ulrich Drepper  <drepper@redhat.com>
227
228         * posix/regex.c (truncate_wchar): Use wcrtomb not wctomb.
229
230         * string/strnlen.c: Fix the implementation.  We cannot use memchr.
231
232 2001-08-18  Mark Kettenis  <kettenis@gnu.org>
233
234         * sysdeps/mach/hurd/i386/init-first.c (init): Initialize __environ
235         before calling the cthreads initialization code.
236
237 2001-08-20  Ulrich Drepper  <drepper@redhat.com>
238
239         * argp/argp-help.c: Fix two problems introduced in last change.
240
241         * include/dirent.h: Include <dirstream.h> first.
242
243 2001-08-19  Ulrich Drepper  <drepper@redhat.com>
244
245         * io/fts.c (fts_safe_changedir): Use __fxstat64 instead of __fstat.
246
247         * sunrpc/svcauth_des.c (_svcauth_des): Avoid using bcopy.
248         * sunrpc/xdr_rec.c: Likewise.
249         * sunrpc/xdr_mem.c: Likewise.
250         * sunrpc/svc_authux.c (_svcauth_unix): Likewise.
251         * sunrpc/rpc_cmsg.c: Likewise.
252         * sunrpc/getrpcport.c (getrpcport): Likewise.
253         * sunrpc/clnt_simp.c (callrpc): Likewise.
254         * sunrpc/clnt_gen.c (clnt_create): Likewise.
255         * string/envz.c: Likewise.
256
257         * po/ko.po: Update from translation team.
258
259         * argp/argp-help.c: Handle wide oriented stderr stream.
260
261 2001-08-18  Ulrich Drepper  <drepper@redhat.com>
262
263         * sysdeps/generic/strtol.c: Little optimizations.  Add some
264         __builtin_expect.
265
266         * conform/conformtest.pl: <inttypes.h> test requires <stddef.h>.
267
268         * wcsmbs/wchar.h (wcwdith): Change parameter type to wchar_t.
269         * wcsmbs/wcwidth.c (wcwdith): Likewise.
270         * wcsmbs/wcwidth.h (internal_wcwdith): Likewise.
271
272         * conform/data/unistd.h-data: Remove _SC_MULTIPLE_PROCESS.
273
274         * conform/data/ucontext.h-data: Fix typos in ucontext_t element tests.
275
276         * time/time.h (struct timespec): Use __time_t for tv_sec element.
277
278         * sysdeps/generic/inttypes.h: Define __wchar_t.  Use it instead of
279         wchar_t for function declarations and defintions.
280
281         * misc/sys/select.h: Define __need_time_t before including <time.h>.
282         Define suseconds_t if it hasn't happened yet.
283
284         * iconv/gconv.h: Define __need_wchar_t before including <stddef.h>.
285
286         * conform/data/sys/uio.h-data: Allow UIO_MAXIOV to be defined.
287
288         * sysdeps/generic/stdint.h: Don't get definition of wchar_t from
289         <stddef.h>.
290
291         * conform/data/stddef.h-data: Remove wint_t.
292
293         * conform/conformtest.pl: Change namespace test to take #undef
294         lines into account.
295
296         * conform/data/netinet/in.h-data: Fix typo in allow-header line.
297
298         * conform/data/sys/socket.h-data: Add sockatmark.
299
300 2001-08-17  Ulrich Drepper  <drepper@redhat.com>
301
302         * io/fts.c: Update from recent BSD source.
303
304 2001-08-17  Roland McGrath  <roland@frob.com>
305
306         * stdio-common/perror.c (perror) [! USE_IN_LIBIO]: Don't use _IO_fwide.
307         * misc/error.c (error_tail, error, error_at_line) [! USE_IN_LIBIO]:
308         Likewise.
309
310 2001-08-17  Ulrich Drepper  <drepper@redhat.com>
311
312         * locale/duplocale.c (__duplocale): Also initialize the special
313         __ctype_* elements.
314
315         * conform/data/netdb.h-data: Adjust gai_strerror return type.
316
317 2001-08-17  Andreas Jaeger  <aj@suse.de>
318
319         * misc/getpass.c: Include wchar.h for prototypes.
320         * malloc/obstack.c: Likewise.
321
322 2001-08-17  Ulrich Drepper  <drepper@redhat.com>
323
324         * sunrpc/svc_simple.c (universal): Use __write instead of write.
325
326         * wcsmbs/wcscoll.c: Also define __wcscoll.
327         * include/wchar.h: Declare __wcscoll.
328
329         * libio/fwprintf.c: Use __vfwprintf instead of vfwprintf.
330         * libio/vwprintf.c: Likewise.
331         * libio/wprintf.c: Likewise.
332
333         * iconv/gconv_cache.c: Use __munmap instead of munmap.
334
335 2001-08-16  Ulrich Drepper  <drepper@redhat.com>
336
337         * posix/regex.c [_LIBC] (convert_mbs_to_wcs): Use __mbrtowc
338         instead of mbrtowc.
339         [_LIBC]: Use __iswctype instead of iswctype, __wcslen instead of
340         wcslen, and __wcscoll instead of wcscoll.
341
342         * sysdeps/unix/sockatmark.c (sockatmark): Use __ioctl instead of ioctl.
343
344         * sysdeps/unix/sysv/linux/gai_sigqueue.c (__gai_sigqueue): Use
345         __getuid instead of getuid.
346
347         * stdio-common/perror.c (perror): Use __close instead of close.
348         * iconv/gconv_cache.c (__gconv_load_cache): Likewise.
349         * libio/freopen.c (freopen): Likewise.
350         * libio/freopen64.c (freopen64): Likewise.
351
352         * libio/tst-ungetwc2.c (main): Define str const.
353
354         * include/wchar.h: Add prototypes for __fwprintf and __vfwprintf.
355         * libio/fwprintf.c: Also define __fwprintf.
356         * stdio-common/vfprintf.c [COMPILE_WPRINTF]: Also define __vfwprintf.
357         * argp/argp-fmtstream.c: Handle wide oriented stderr stream.
358         * assert/assert-perr.c: Likewise.
359         * assert/assert.c: Likewise.
360         * gmon/gmon.c: Likewise.
361         * inet/rcmd.c: Likewise.
362         * malloc/obstack.c: Likewise.
363         * misc/err.c: Likewise.
364         * misc/error.c: Likewise.
365         * misc/getpass.c: Likewise.
366         * posix/getopt.c: Likewise.
367         * resolv/res_hconf.c: Likewise.
368         * stdio-common/perror.c: Likewise.
369         * stdio-common/psignal.c: Likewise.
370         * stdlib/fmtmsg.c: Likewise.
371         * sunrpc/auth_unix.c: Likewise.
372         * sunrpc/clnt_perr.c: Likewise.
373         * sunrpc/clnt_tcp.c: Likewise.
374         * sunrpc/clnt_udp.c: Likewise.
375         * sunrpc/clnt_unix.c: Likewise.
376         * sunrpc/svc_simple.c: Likewise.
377         * sunrpc/svc_tcp.c: Likewise.
378         * sunrpc/svc_udp.c: Likewise.
379         * sunrpc/svc_unix.c: Likewise.
380         * sunrpc/xdr.c: Likewise.
381         * sunrpc/xdr_array.c: Likewise.
382         * sunrpc/xdr_rec.c: Likewise.
383         * sunrpc/xdr_ref.c: Likewise.
384         * sysdeps/generic/wordexp.c: Likewise.
385
386         * po/it.po: Update from translation team.
387
388         * misc/err.c: Handle wide oriented stderr stream.
389
390 2001-08-14  Tom Rix  <trix@redhat.com>
391
392         * iconv/gconv_cache.c (find_module): Add #ifndef STATIC_GCONV.
393         * iconv/Makefile: Fix gconv_cache.c CFLAGS.
394
395 2001-08-13  Tom Rix  <trix@redhat.com>
396
397         * sysdeps/unix/sysv/aix/Makefile: Add rule to import kernel symbols.
398         * sysdeps/unix/sysv/aix/bits/types.h: Fix type of __id_t, __useconds_t
399         and __intptr_t.
400
401 2001-08-15  Martin Schwidefsky  <schwidefsky@de.ibm.com>
402
403         * sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S (__getcontext):
404         Store the access registers to the ucontext structure.
405         * sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S (__getcontext):
406         Likewise.
407
408         * sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S (__setcontext):
409         Load the access registers from the ucontext structure.
410         * sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S (__setcontext):
411         Likewise.
412
413         * sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h: Adjust the SC_xxx
414         offsets to the new ucontext layout.
415         * sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.h: Likewise.
416
417         * sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h: Fix the layout
418         of the ucontext structure.
419         * sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h: Likewise.
420
421 2001-08-15  Ulrich Drepper  <drepper@redhat.com>
422
423         * misc/error.c (error): Handle wide oriented stderr stream correctly.
424         (error_at_line): Likewise.
425
426         * stdio-common/perror.c (perror): Implement according to standard.
427         The stream orientation must not be changed if the stream was not
428         oriented before the call.
429         * stdio-common/Makefile (tests): Add tst-perror.
430         * stdio-common/tst-perror.c: New file.
431
432
433 See ChangeLog.12 for earlier changes.