Ulrich Drepper [Fri, 13 Jun 2008 06:08:54 +0000 (06:08 +0000)]
[BZ #6612]
* time/strftime.c: Pass reference to tzset_called around to handle
recursive calls.
[BZ #6612]
* time/strftime.c (__strftime_internal): Call tzset() only
when printing timezone-dependent values.
Based on a patch by Petr Baudis <pasky@suse.cz>.
Ulrich Drepper [Thu, 12 Jun 2008 22:40:27 +0000 (22:40 +0000)]
* nscd/nscd.h (struct database_dyn): Add inotify_descr and clear_cache
fields.
* nscd/connections.c (inotify_fd): New variable.
(nscd_init): Try to open an inotify descriptor.
If successful, watch files for databases using inotify instead of
having prune threads stat the files.
(nscd_run_prune): Recognize clear_cache flag being set and call
prune_cache appropriately.
(main_loop_poll): Add inotify descriptor to wait set and handle the
reported changes.
(main_loop_epoll): Likewise.
* nscd/cache.c (prune_cache): Don't stat files for databases if
inotify is used.
* sysdeps/unix/sysv/linux/Makefile [subdir=nscd]
(CFLAGS-connections.c): Add -DHAVE_INOTIFY.
Jakub Jelinek [Wed, 21 May 2008 08:48:21 +0000 (08:48 +0000)]
* sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
(CALL_ERRNO_LOCATION): Define.
(__SYSCALL_STRING, __CLONE_SYSCALL_STRING): Use it.
* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
(CALL_ERRNO_LOCATION): Define.
(__SYSCALL_STRING, __CLONE_SYSCALL_STRING): Use it.
* sysdeps/unix/sysv/linux/sparc/sparc64/brk.S (__brk): Use
HIDDEN_JUMPTARGET for __errno_location call in libc.so.
2008-05-21 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
(CALL_ERRNO_LOCATION): Define.
(__SYSCALL_STRING, __CLONE_SYSCALL_STRING): Use it.
* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
(CALL_ERRNO_LOCATION): Define.
(__SYSCALL_STRING, __CLONE_SYSCALL_STRING): Use it.
* sysdeps/unix/sysv/linux/sparc/sparc64/brk.S (__brk): Use
HIDDEN_JUMPTARGET for __errno_location call in libc.so.
Jakub Jelinek [Tue, 20 May 2008 07:48:50 +0000 (07:48 +0000)]
* sysdeps/sparc/machine-gmon.h: New file.
* sysdeps/sparc/sparc-mcount.S: Likewise.
* sysdeps/sparc/Makefile: Add sparc-mcount target to
sysdep_routines in gmon directory.
2008-05-14 David S. Miller <davem@davemloft.net>
* sysdeps/sparc/machine-gmon.h: New file.
* sysdeps/sparc/sparc-mcount.S: Likewise.
* sysdeps/sparc/Makefile: Add sparc-mcount target to
sysdep_routines in gmon directory.
Ulrich Drepper [Sun, 18 May 2008 21:54:43 +0000 (21:54 +0000)]
* nscd/cache.c (cache_add): Take additional parameter specifying
whether this is in response of a cache refill. Check alignment
of package data. Revamp waking of pruning thread.
(prune_cache): Small optimization.
* nscd/nscd.h: Adjust cache_add prototypes.
* nscd/aicache.c: Adjust cache_add calls.
* nscd/grpcache.c: Likewise.
* nscd/hstcache.c: Likewise.
* nscd/initgrcache.c: Likewise.
* nscd/pwdcache.c: Likewise.
* nscd/servicescache.c: Likewise.
* nscd/connections.c (restart): Really disable cache use before
exec attempt. If it fails, reenable cache.
(nscd_run_prune): Initialize wakeup_time. After wakeup, set wakeup
time to max to be able to notice concurrent cache additions. Unlock
prune_lock while performing gc. Afterwards compute wakeup time with
current wakeup_time value in mind.
Rewrite string searches to O(n) rather than O(n^2).
* string/str-two-way.h: New file. For linear fixed-allocation
string searching.
* string/memmem.c: New implementation.
* string/strstr.c: New implementation.
* string/strcasestr.c: New implementation.
Ulrich Drepper [Thu, 15 May 2008 03:06:50 +0000 (03:06 +0000)]
* posix/regcomp.c (optimize_utf8): Add a note on why we test
opr.ctx_type.
(calc_first): Initialize constraint field.
(duplicate_node_closure): Use it instead of special casing ANCHORS.
Use search_duplicated_node to avoid loops. Fix grammar.
(duplicate_node): Merge constraint field for all node types.
(calc_eclosure_iter): Look at constraint field for all node types.
* posix/regex_internal.c (create_cd_newstate): Don't look at
create_cd_newstate.
Ulrich Drepper [Sun, 11 May 2008 03:03:14 +0000 (03:03 +0000)]
* nscd/cache.c (cache_add): Before returning with failure and this
is the first use of the record, mark it as unusable.
* nscd/aicache.c: Don't touch the dataset after cache_add returns
reporting a failure.
* nscd/grpcache.c: Likewise
* nscd/hstcache.c: Likewise.
* nscd/initgrcache.c: Likewise.
* nscd/pwdcache.c: Likewise.
* nscd/servicecache.c: Likewise.
Ulrich Drepper [Sat, 10 May 2008 23:36:40 +0000 (23:36 +0000)]
* sysdeps/ieee754/ldbl-128/e_j0l.c (__ieee751_j0l): Use __finitel.
(__ieee754_y0l): Likewise.
* sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_j1l): Likewise.
(__ieee754_y1l): Likewise.
* sysdeps/ieee754/ldbl-128/s_expm1l.c (__expm1l): Use __ldexpl.
* sysdeps/ieee754/ldbl-128/s_log1pl.c: Kill bogus prototypes for
frexpl and ldexpl. math_private.h provides them and the latter
is not even used.
(__log1pl): Use __frexpl.
Ulrich Drepper [Sat, 10 May 2008 23:27:39 +0000 (23:27 +0000)]
* include/resolv.h: Adjust __libc_res_nquery and __libc_res_nsend
prototypes.
* include/arpa/nameser_compat.h: Define T_UNSPEC.
* nis/Versions (libnss_nis): Export _nss_nis_gethostbyname4_r.
(libnss_nisplus): Export _nss_nisplus_gethostbyname4_r.
* nis/nss_nis/nis-hosts.c (LINE_PARSER): Change to also handle
af==AF_UNSPEC.
(_nss_nis_gethostbyname4_r): New function.
* nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_parse_hostent):
Change to also handle af==AF_UNSPEC.
(get_tablename): New function. Use it to avoid duplication.
(_nss_nisplus_gethostbyname4_r): New function.
* nscd/aicache.c (addhstaiX): Use gethostbyname4_r function is
available.
* nss/Versions (libnss_files): Export _nss_files_gethostbyname4_r.
* nss/nss.h: Define struct gaih_addrtuple.
* nss/nss_files/files-hosts.c (LINE_PARSER): Change to also handle
af==AF_UNSPEC.
(_nss_files_gethostbyname4_r): New function.
* resolv/Versions (libnss_dns): Export _nss_dns_gethostbyname4_r.
* resolv/gethnmaddr.c: Adjust __libc_res_nsearch and __libc_res_nquery
calls.
* resolv/res_query.c (__libc_res_nquery): Take two additional
parameters for second answer buffer. Handle type=T_UNSPEC to mean
look up IPv4 and IPv6.
Change all callers.
* resolv/res_send.c (__libc_res_nsend): Take five aditional parameters
for an additional query and answer buffer. Pass to send_vc and
send_dg.
(send_vc): Send possibly two requests and receive two answers.
(send_dg): Likewise.
* resolv/nss_dns/dns-host.c: Adjust calls to __libc_res_nsearch and
__libc_res_nquery.
(_nss_dns_gethostbyname4_r): New function.
(gaih_getanswer_slice): Likewise.
(gaih_getanswer): Likewise.
* resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Adjust
__libc_res_nquery call.
* resolv/nss_dns/dns-network.c (_nss_dns_getnetbyaddr_r): Likewise.
(_nss_dns_getnetbyname_r): Adjust __libc_res_nsearch call.
* sysdeps/posix/getaddrinfo.c: Use gethostbyname4_r function is
available.
Jakub Jelinek [Mon, 5 May 2008 09:17:00 +0000 (09:17 +0000)]
* sysdeps/unix/sysv/linux/sparc/sparc32/syscall.S: Add support for
six system call parameters.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S: Likewise.
2008-05-01 David S. Miller <davem@davemloft.net>
* sysdeps/unix/sysv/linux/sparc/sparc32/syscall.S: Add support for
six system call parameters.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S: Likewise.
2008-04-15 Ulrich Drepper <drepper@redhat.com>
[BZ #5209]
* sysdeps/unix/sysv/linux/times.c: New file.
[BZ #5381]
* nscd/nscd.h: Define enum in_flight, mem_in_flight, and
mem_in_flight_list variables. Add new parameter to mempool_alloc
prototype.
* nscd/mem.c (mempool_alloc): Take additional parameter. Initialize
appropriate mem_in_flight element.
(gc): Take allocations which have not yet been committed to the
database into account.
* nscd/cache.c (cache_add): Add new parameter to mempool_alloc call.
Reset mem_in_flight before returning.
* nscd/connections.c (nscd_run_worker): Initialize mem_in_flight and
cue it up in mem_in_flight_list.
* nscd/aicache.c: Adjust mempool_alloc call.
* nscd/grpcache.c: Likewise.
* nscd/hstcache.c: Likewise.
* nscd/initgrcache.c: Likewise.
* nscd/pwdcache.c: Likewise.
* nscd/servicescache.c: Likewise.
* nscd/Makefile (nscd-flags): Until ld is fixed, use -fpic instead
of -fpie.
* nscd/connections.c (handle_request): Provide better error message
in case SELinux forbids the service.