]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Updated to fedora-glibc-20060424T0820
authorJakub Jelinek <jakub@redhat.com>
Mon, 24 Apr 2006 08:55:46 +0000 (08:55 +0000)
committerJakub Jelinek <jakub@redhat.com>
Mon, 24 Apr 2006 08:55:46 +0000 (08:55 +0000)
232 files changed:
ChangeLog
NEWS
Versions.def
argp/argp.h
bits/siginfo.h
elf/cache.c
elf/ldconfig.c
elf/ldd.bash.in
elf/rtld.c
fedora/branch.mk
fedora/glibc.spec.in
iconv/iconv_charmap.c
iconvdata/Makefile
iconvdata/ibm437.c
iconvdata/ibm861.c
iconvdata/ibm862.c
iconvdata/ibm863.c
iconvdata/ibm865.c
include/ifaddrs.h
inet/check_pf.c
inet/getnameinfo.c
inet/inet6_option.c
inet/inet_ntoa.c
inet/rexec.c
intl/explodename.c
intl/finddomain.c
io/fts.c
io/readlink.c
io/readlinkat.c
libio/fmemopen.c
locale/programs/ld-address.c
locale/programs/ld-numeric.c
locale/programs/linereader.c
localedata/ChangeLog
localedata/SUPPORTED
localedata/locales/af_ZA
localedata/locales/ca_AD [new file with mode: 0644]
localedata/locales/ca_FR [new file with mode: 0644]
localedata/locales/ca_IT [new file with mode: 0644]
localedata/locales/cs_CZ
localedata/locales/de_CH
localedata/locales/en_US
localedata/locales/en_ZA
localedata/locales/nr_ZA [new file with mode: 0644]
localedata/locales/pa_PK [new file with mode: 0644]
localedata/locales/pl_PL
localedata/locales/sk_SK
localedata/locales/st_ZA
localedata/locales/vi_VN
localedata/locales/xh_ZA
localedata/locales/zu_ZA
mach/Machrules
misc/tsearch.c
nis/Makefile
nis/Versions
nis/libnsl.h [new file with mode: 0644]
nis/nis_call.c
nis/nis_checkpoint.c
nis/nis_clone_dir.c
nis/nis_clone_res.c
nis/nis_creategroup.c
nis/nis_getservlist.c
nis/nis_ismember.c
nis/nis_local_names.c
nis/nis_ping.c
nis/nis_print_group_entry.c
nis/nis_removemember.c
nis/nis_table.c
nis/nss-default.c [new file with mode: 0644]
nis/nss-nis.c
nis/nss-nis.h
nis/nss_nis/nis-alias.c
nis/nss_nis/nis-ethers.c
nis/nss_nis/nis-grp.c
nis/nss_nis/nis-hosts.c
nis/nss_nis/nis-initgroups.c
nis/nss_nis/nis-netgrp.c
nis/nss_nis/nis-network.c
nis/nss_nis/nis-proto.c
nis/nss_nis/nis-publickey.c
nis/nss_nis/nis-pwd.c
nis/nss_nis/nis-rpc.c
nis/nss_nis/nis-service.c
nis/nss_nis/nis-spwd.c
nis/nss_nisplus/nisplus-alias.c
nis/nss_nisplus/nisplus-ethers.c
nis/nss_nisplus/nisplus-hosts.c
nis/nss_nisplus/nisplus-netgrp.c
nis/nss_nisplus/nisplus-network.c
nis/nss_nisplus/nisplus-parser.c
nis/nss_nisplus/nisplus-proto.c
nis/nss_nisplus/nisplus-publickey.c
nis/nss_nisplus/nisplus-rpc.c
nis/nss_nisplus/nisplus-service.c
nis/ypclnt.c
nptl/ChangeLog
nptl/init.c
nptl/pthreadP.h
nptl/pthread_getattr_np.c
nptl/sysdeps/pthread/pthread.h
nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S
nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S
nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
nscd/Makefile
nscd/connections.c
nscd/nscd.c
nscd/nscd_helper.c
nss/nss_files/files-key.c
posix/Makefile
posix/bits/unistd.h
posix/regex.h
posix/tst-rfc3484-2.c [new file with mode: 0644]
posix/tst-rfc3484.c
posix/unistd.h
signal/Makefile
signal/tst-sigset2.c [new file with mode: 0644]
soft-fp/adddf3.c
soft-fp/addsf3.c
soft-fp/addtf3.c
soft-fp/divdf3.c
soft-fp/divsf3.c
soft-fp/divtf3.c
soft-fp/double.h
soft-fp/eqdf2.c
soft-fp/eqsf2.c
soft-fp/eqtf2.c
soft-fp/extenddftf2.c
soft-fp/extended.h
soft-fp/extendsfdf2.c
soft-fp/extendsftf2.c
soft-fp/fixdfdi.c
soft-fp/fixdfsi.c
soft-fp/fixsfdi.c
soft-fp/fixsfsi.c
soft-fp/fixtfdi.c
soft-fp/fixtfsi.c
soft-fp/fixunsdfdi.c
soft-fp/fixunsdfsi.c
soft-fp/fixunssfdi.c
soft-fp/fixunssfsi.c
soft-fp/fixunstfdi.c
soft-fp/fixunstfsi.c
soft-fp/floatdidf.c
soft-fp/floatdisf.c
soft-fp/floatditf.c
soft-fp/floatsidf.c
soft-fp/floatsisf.c
soft-fp/floatsitf.c
soft-fp/floatundidf.c
soft-fp/floatundisf.c
soft-fp/floatunditf.c
soft-fp/floatunsidf.c
soft-fp/floatunsisf.c
soft-fp/floatunsitf.c
soft-fp/gedf2.c
soft-fp/gesf2.c
soft-fp/getf2.c
soft-fp/ledf2.c
soft-fp/lesf2.c
soft-fp/letf2.c
soft-fp/muldf3.c
soft-fp/mulsf3.c
soft-fp/multf3.c
soft-fp/negdf2.c
soft-fp/negsf2.c
soft-fp/negtf2.c
soft-fp/op-1.h
soft-fp/op-2.h
soft-fp/op-4.h
soft-fp/op-8.h
soft-fp/op-common.h
soft-fp/quad.h
soft-fp/single.h
soft-fp/soft-fp.h
soft-fp/sqrtdf2.c
soft-fp/sqrtsf2.c
soft-fp/sqrttf2.c
soft-fp/subdf3.c
soft-fp/subsf3.c
soft-fp/subtf3.c
soft-fp/truncdfsf2.c
soft-fp/trunctfdf2.c
soft-fp/trunctfsf2.c
soft-fp/unorddf2.c
soft-fp/unordsf2.c
soft-fp/unordtf2.c
string/Makefile
sunrpc/rpc_cout.c
sunrpc/rpc_main.c
sunrpc/rpc_parse.c
sunrpc/rpc_scan.c
sunrpc/svc_udp.c
sysdeps/generic/unwind-dw2-fde.c
sysdeps/generic/unwind-dw2.c
sysdeps/posix/getaddrinfo.c
sysdeps/posix/sigset.c
sysdeps/posix/tempname.c
sysdeps/powerpc/fpu/bits/mathinline.h
sysdeps/powerpc/fpu/e_sqrt.c
sysdeps/powerpc/fpu/e_sqrtf.c
sysdeps/powerpc/powerpc32/bits/atomic.h
sysdeps/unix/sysv/linux/Versions
sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
sysdeps/unix/sysv/linux/bits/socket.h
sysdeps/unix/sysv/linux/check_pf.c
sysdeps/unix/sysv/linux/getcwd.c
sysdeps/unix/sysv/linux/getsourcefilter.c
sysdeps/unix/sysv/linux/i386/bits/fcntl.h
sysdeps/unix/sysv/linux/i386/sync_file_range.S [new file with mode: 0644]
sysdeps/unix/sysv/linux/i386/sysdep.h
sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
sysdeps/unix/sysv/linux/kernel-features.h
sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S
sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S
sysdeps/unix/sysv/linux/powerpc/sys/procfs.h
sysdeps/unix/sysv/linux/readlinkat.c
sysdeps/unix/sysv/linux/s390/bits/fcntl.h
sysdeps/unix/sysv/linux/setsourcefilter.c
sysdeps/unix/sysv/linux/sh/bits/fcntl.h
sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
sysdeps/unix/sysv/linux/sync_file_range.c [new file with mode: 0644]
sysdeps/unix/sysv/linux/syscalls.list
sysdeps/unix/sysv/linux/ttyname.c
sysdeps/unix/sysv/linux/ttyname_r.c
sysdeps/unix/sysv/linux/wordsize-64/syscalls.list
sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h

index 1efd878662857c8cc16df7e36795a1c0553f30c5..62c3fe23fe70d8c383966d7627f491915c6fceaf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,519 @@
+2006-04-23  Ulrich Drepper  <drepper@redhat.com>
+
+       * nis/nss_nisplus/nisplus-netgrp.c: Cleanups.   
+
+       [BZ #1951]
+       * sysdeps/posix/sigset.c (sigset): Return correct value reflecting
+       previous signal state.
+       * signal/Makefile (tests): Add tst-sigset2.
+       * signal/tst-sigset2.c: New file.
+
+2006-04-21  Jakub Jelinek  <jakub@redhat.com>
+
+       * argp/argp.h (__option_is_short): Check upper limit of
+       __key.  isprint() requires its argument to have the value
+       of an unsigned char or EOF.
+       Patch by Sergey Poznyakoff <gray@Mirddin.farlep.net>.
+
+2006-04-21  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #2534, BZ #2535]
+       * posix/regex.h: Remove obsolete <sys/types.h> comment and special
+       handling for VMS.
+
+       * iconvdata/ibm437.c: Define HAS_HOLES to 0.
+       * iconvdata/ibm861.c: Likewise.
+       * iconvdata/ibm862.c: Likewise.
+       * iconvdata/ibm863.c: Likewise.
+       * iconvdata/ibm865.c: Likewise.
+       Reported by <ash@contact.bg>.
+
+2006-04-19  Ulrich Drepper  <drepper@redhat.com>
+
+       * include/ifaddrs.h: Get uint32_t definition.
+       * posix/tst-rfc3484.c: Update fake __check_pf implementation.
+       * posix/tst-rfc3484-2.c: Likewise.
+
+       * sysdeps/unix/sysv/linux/kernel-features.h: Define
+       __ASSUME_PROC_SELF_FD_SYMLINK.
+       * sysdeps/unix/sysv/linux/ttyname.c: Cleanups.  Avoid compatibility
+       code if possible.  Move compatibility code in .text.compat section.
+       * sysdeps/unix/sysv/linux/ttyname_r.c: Likewise.
+
+2006-04-18  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/posix/getaddrinfo.c (getaddrinfo): Rewrite to avoid loop
+       over gaih array.  There is only on function to call in the moment.
+
+2006-04-16  Ulrich Drepper  <drepper@redhat.com>
+
+       * include/ifaddrs.h: Define struct in6addrinfo.
+       Add two more parameters to __check_pf.
+       * sysdeps/unix/sysv/linux/check_pf.c: When using the netlink
+       interface, determine whether IPv6 addresses are deprecated or
+       temporary.  Create array of those addresses.
+       * inet/check_pf.c: Always tell caller there are no depracated
+       and temporary addresses.
+       * sysdeps/posix/getaddrinfo.c: Pretty printing.
+       (struct sort_result): Add source_addr_flags field.
+       (rfc3484_sort): Implement rule 3 and 7.
+       (in6aicmp): New function.
+       (getaddrinfo): Call __check_pf also when we need info about IPv6
+       source addresses.  When creating array for sorting addresses,
+       look up deprecated and temporary addresses returned by __check_pf
+       and add flag if necessary.
+
+2006-04-15  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/posix/getaddrinfo.c: Fix precedence for IP V4-to-V6
+       mapped addresses.
+       * posix/Makefile (tests): Add tst-rfc3484-2.
+       * posix/tst-rfc3484-2.c: New file.
+
+       * nis/nss_nisplus/nisplus-publickey.c: Minor cleanups throughout.
+       * nis/nss_nisplus/nisplus-service.c (_nss_nisplus_parse_servent):
+       Significant cleanups.  Correct adjustment for pointer array.
+       * nis/nss_nisplus/nisplus-rpc.c (_nss_nisplus_parse_rpcent):
+       Likewise.
+       * nis/nss_nisplus/nisplus-proto.c (_nss_nisplus_parse_protoent):
+       Likewise.
+       * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_parse_netent):
+       Likewise.
+       * nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_parse_hostent):
+       Likewise.
+
+2006-04-14  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/unix/sysv/linux/syscalls.list: Add tee syscall.
+       * sysdeps/unix/sysv/linux/Versions: Export tee@GLIBC_2.5.
+       * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Add prototype for tee.
+       * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
+       * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Likewise.
+       * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise.
+       * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
+       * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise.
+       * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Likewise.
+       * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
+
+       * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_parse_etherent):
+       Minor cleanups.  NUL terminate name string.
+
+       * nis/Versions: No need to export _nss_nisplus_parse_grent,
+       _nss_nisplus_parse_pwent, and _nss_nisplus_parse_spent.
+
+       * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_parse_aliasent):
+       Avoid unnecessary allocation.  Fix adjustment for pointer value.
+
+       * nis/nss_nisplus/nisplus-parser.c: Cleanups, use NIS_RES_*
+       macros.  Avoid unnecessary allocation.
+
+       * sysdeps/unix/sysv/linux/sync_file_range.c: New file.
+
+2006-04-13  Ulrich Drepper  <drepper@redhat.com>
+
+       * nis/Makefile (libnsl-routimes): Add nss-default.
+       * nis/Versions (libnsl) [GLIBC_PRIVATE]: Export _nsl_default_nss.
+       * nis/nss-nis.c: Move /etc/default/nss handling to...
+       * nis/nss-default.c: ...here.  New file.
+       * nis/libnsl.h: New file.
+       * nis/nss-nis.h: Remove NSS_FLAG_* definitions and _nis_default_nss
+       plus auxilary definitions.
+       * nis/nss_nis/nis-initgroups.c: Use _nsl_default_nss instead of
+       _nis_default_nss.
+       * nis/nss_nis/nis-service.c: Likewise.
+
+2006-04-07  Steven Munroe  <sjmunroe@us.ibm.com>
+
+       * sysdeps/powerpc/fpu/bits/mathinline.h
+       [__WORDSIZE == 64 || _ARCH_PWR4]: Define __CPU_HAS_FSQRT.
+       (__ieee754_sqrt): Fix comment.
+       (__ieee754_sqrtf): Fix comment.
+       * sysdeps/powerpc/fpu/e_sqrt.c (__ieee754_sqrt): Fix comment.
+       Check __CPU_HAS_FSQRT instead of dl_hwcap.
+       * sysdeps/powerpc/fpu/e_sqrtf.c (__ieee754_sqrtf): Likewise.
+
+2006-04-08  Ulrich Drepper  <drepper@redhat.com>
+
+       * inet/inet_ntoa.c: Rewrite to use TLS instead of TSD.
+
+       * nis/nss_nis/nis-alias.c: Optimize use of yperr2nss.  Avoid calling
+       it for YPERR_SUCCESS.  Minor cleanups.  Add __builtin_expect.
+       * nis/nss_nis/nis-ethers.c: Likewise.
+       * nis/nss_nis/nis-grp.c: Likewise.
+       * nis/nss_nis/nis-hosts.c: Likewise.
+       * nis/nss_nis/nis-initgroups.c: Likewise.
+       * nis/nss_nis/nis-netgrp.c: Likewise.
+       * nis/nss_nis/nis-network.c: Likewise.
+       * nis/nss_nis/nis-proto.c: Likewise.
+       * nis/nss_nis/nis-publickey.c: Likewise.
+       * nis/nss_nis/nis-pwd.c: Likewise.
+       * nis/nss_nis/nis-rpc.c: Likewise.
+       * nis/nss_nis/nis-service.c: Likewise.
+       * nis/nss_nis/nis-spwd.c: Likewise.
+
+       * nis/nis_ping.c: Remove unnecessary conditionals before
+       nis_freeresult calls.
+       * nis/nis_ismember.c: Likewise.
+
+       * elf/rtld.c (process_envvars): Fix handling of LD_POINTER_GUARD.
+       Reported by genesh@comcast.net.
+
+       * io/fts.c (fts_build): Call fts_lfree in the two error cases
+       after the loop [Coverity CID 187].
+
+       * nis/nis_getservlist.c (nis_getservlist): Also free lookup result
+       in error case [Coverity CID 189].
+
+       * nis/nis_getservlist.c (nis_getservlist): One more free call
+       needed [Coverity CID 190].
+
+2006-04-07  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/generic/unwind-dw2-fde.c (end_fde_sort): Remove
+       unnecessary test for accu->linear == NULL [Coverity CID 79].
+
+2006-04-07  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/posix/tempname.c (__gen_tempname): Change attempts_min
+       into a macro.  Use preprocessor to decide how to initialize
+       attempts [Coverity CID 67].
+
+       * io/fts.c (fts_build): Comment out dead code [Coverity CID 68].
+
+       * sunrpc/rpc_parse.c (def_union): Comment out dead code
+       [Coverity CID 70].
+
+       * locale/programs/linereader.c (lr_token): Remove duplicate
+       handling of EOF [Coverity CID 71].
+
+       * locale/programs/ld-numeric.c (numeric_read) [case tok_grouping]:
+       We bail out early if ignore_content is set, so there is no need to
+       check it later again [Coverity CID 72].
+
+       * inet/inet6_option.c (inet6_option_find): Check *tptrp for NULL,
+       not tptrp [Coverity CID 73].
+
+       * inet/inet6_option.c (inet6_option_next): Check *tptrp for NULL,
+       not tptrp [Coverity CID 74].
+
+       * misc/tsearch.c (__tsearch): Don't rotate tree if memory
+       allocation failed [Coverity CID 78].
+
+2006-04-07  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/generic/unwind-dw2.c (execute_cfa_program): Fix typo in
+       the last change.
+
+2006-04-07  Ulrich Drepper  <drepper@redhat.com>
+
+       * inet/rexec.c (rexec_af): If we have no canonical name don't
+       proceed further [Coverity CID 86].
+
+       * iconv/iconv_charmap.c (process_fd): Initialize inptr from inbuf,
+       not to NULL [Coverity CID 88].
+
+2006-04-06  Ulrich Drepper  <drepper@redhat.com>
+
+       * elf/ldconfig.c (main): Use rawmemchr instead of strchr.
+       * nis/nis_call.c (rec_dirsearch): Likewise.
+       * nis/nis_local_names.c (nis_local_host): Likewise.
+       (nis_local_directory): Likewise.
+       * intl/explodename.c (_nl_explode_name): Likewise.
+
+       * sysdeps/generic/unwind-dw2.c (execute_cfa_program): Don't handle
+       DW_CFA_GNU_window_save if it obviously cannot work [Coverity CID 102].
+
+       * locale/programs/ld-address.c (address_finish): Fix conditions
+       for error messages [Coverity CID 104].
+
+       * libio/fmemopen.c (fmemopen): Free stream memory in case of
+       invalid length [Coverity CID 106].
+
+       * nss/nss_files/files-key.c (search): Close stream before
+       successful return [Coverity CID 107].
+
+       * io/fts.c (fts_open): Don't allocate parent if *argv==NULL
+       [Coverity CID 108].
+
+       * sunrpc/rpc_cout.c (inline_struct): Free sizestr after use
+       [Coverity CID 110, 109].
+
+       * sunrpc/rpc_scan.c (docppline): Free file string if it is not
+       going to be used [Coverity CID 111].
+
+       * sysdeps/unix/sysv/linux/getsourcefilter.c (getsourcefilter): Free
+       memory if socket level value cannot be retrieved [Coverity CID 112].
+
+       * nis/nis_clone_dir.c (nis_clone_directory): Free all memory in
+       error case [Coverity CID 114].
+
+       * nis/nis_clone_res.c (nis_clone_result): Free all memory in the
+       error cases [Coverity CID 115].
+
+       * sunrpc/rpc_parse.c (get_definition): Free defp if tok ==
+       TOK_EOF [Coverity CID 116].
+
+       * sysdeps/unix/sysv/linux/setsourcefilter.c (setsourcefilter): Free
+       memory if socket level value cannot be retrieved [Coverity CID 117].
+
+       * elf/cache.c (save_cache): Initialize pad to avoid writing
+       uninitialized data to disk.
+
+       * elf/cache.c (save_cache): Free file_entries_new [Coverity CID 118].
+
+       * intl/finddomain.c (_nl_find_domain): Avoid strdup of expand
+       locale name, use strdupa.  Remove free call [Coverity CID 119].
+
+       * sunrpc/rpc_main.c (generate_guard): Avoid extra allocation and
+       the resulting leak [Coverity CID 121].
+
+       * sunrpc/rpc_main.c (mkfile_output): Free all allocated memory
+       [Coverity CID 122].
+
+       * sunrpc/rpc_main.c (h_output): Free guard after we are done
+       [Coverity CID 123].
+
+       * sunrpc/svc_udp.c (cache_set): Free victim if newbuf allocation
+       fails [Coverity CID 126].
+
+       * sunrpc/svc_udp.c (svcudp_enablecache): Free memory in error
+       cases [Coverity CID 127].
+
+       * nis/nis_table.c (__create_ib_request): Free ibreq in case strdup
+       fails [Coverity CID 128].
+
+       * nis/nis_getservlist.c (nis_getservlist): Free all memory in case
+       of an error [Coverity CID 130, 129].
+
+       * nis/nis_print_group_entry.c (nis_print_group_entry): If
+       nis_lookup call failed, return.  Free lookup result in error
+       cases [Coverity CID 131].
+
+       * nis/nis_removemember.c (nis_removemember): Free all memory in
+       error cases [Coverity CID 132].
+
+       * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r):
+       Always free lookup result [Coverity CID 134].
+
+       * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_gethostton_r):
+       Always free lookup result [Coverity CID 135].
+
+       * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_getntohost_r):
+       Always free lookup result [Coverity CID 136].
+
+       * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_getnetbyaddr_r):
+       Before retrying, free old result [Coverity CID 137].
+
+       * nis/nss_nisplus/nisplus-publickey.c (_nss_nisplus_netname2user):
+       Free res in case UID is zero [Coverity CID 138].
+
+       * nis/ypclnt.c (yp_update): Always free master string
+       [Coverity CID 140].
+
+       * nis/nis_creategroup.c (nis_creategroup): Free all memory in
+       error cases [Coverity CID 143, 142, 141].
+
+       * nis/nss_nis/nis-publickey.c (_nss_nis_getpublickey): Free result
+       if yp_match call succeeded [Coverity CID 155].
+
+       * nis/nss_nis/nis-publickey.c (_nss_nis_getsecretkey): Free string
+       allocated in yp_match at all times [Coverity CID 157, 156].
+
+       * nscd/nscd.c (write_pid): Close stream also if writing failed
+       [Coverity CID 165].
+
+       * nis/nis_table.c (nis_add_entry): Move test for NULL parameter
+       ahead of first use [Coverity CID 167].
+
+       * nis/nss_nis/nis-alias.c (_nss_nis_getaliasbyname_r): Move test
+       for NULL parameter ahead of first use [Coverity CID 168].
+
+       * intl/finddomain.c (_nl_find_domain): We never return NULL if we
+       found the locale [Coverity CID 169].
+
+       * inet/getnameinfo.c (getnameinfo): __getservbyport_r does not set
+       herrno [Coverity CID 178].
+
+       * nis/nis_checkpoint.c (nis_checkpoint): Don't access and returned
+       freed object [Coverity CID 182].
+
+2006-04-05  Alan Modra  <amodra@bigpond.net.au>
+           Jakub Jelinek  <jakub@redhat.com>
+
+       * posix/bits/unistd.h (readlink, __readlink_chk, __readlink_alias):
+       Change return value to ssize_t.
+
+2006-04-04  Roland McGrath  <roland@redhat.com>
+
+       * string/Makefile (CFLAGS-inl-tester.c): New variable.
+       (CFLAGS-tst-inlcall.c): Likewise.
+
+       [BZ #2508]
+       * nscd/Makefile ($(objpfx)nscd_stat.o: sysincludes): Move setting
+       inside [$(have-selinux) = yes].
+       ($(objpfx)selinux.o: sysincludes): Likewise.
+
+       * iconvdata/Makefile (generate-8bit-table): Use LC_ALL=C.
+       (generate-8bit-gap-table): Likewise.
+       ($(objpfx)iso8859-7jp.stmp): Likewise.
+       Reported by S.Ã\87aÄ\9flar Onur <caglar@uludag.org.tr>.
+
+2006-03-21  Joseph S. Myers  <joseph@codesourcery.com>
+
+       * soft-fp/adddf3.c: Add libgcc exception.  Update FSF address.
+       * soft-fp/addsf3.c: Likewise.
+       * soft-fp/addtf3.c: Likewise.
+       * soft-fp/divdf3.c: Likewise.
+       * soft-fp/divsf3.c: Likewise.
+       * soft-fp/divtf3.c: Likewise.
+       * soft-fp/double.h: Likewise.
+       * soft-fp/eqdf2.c: Likewise.
+       * soft-fp/eqsf2.c: Likewise.
+       * soft-fp/eqtf2.c: Likewise.
+       * soft-fp/extenddftf2.c: Likewise.
+       * soft-fp/extended.h: Likewise.
+       * soft-fp/extendsfdf2.c: Likewise.
+       * soft-fp/extendsftf2.c: Likewise.
+       * soft-fp/fixdfdi.c: Likewise.
+       * soft-fp/fixdfsi.c: Likewise.
+       * soft-fp/fixsfdi.c: Likewise.
+       * soft-fp/fixsfsi.c: Likewise.
+       * soft-fp/fixtfdi.c: Likewise.
+       * soft-fp/fixtfsi.c: Likewise.
+       * soft-fp/fixunsdfdi.c: Likewise.
+       * soft-fp/fixunsdfsi.c: Likewise.
+       * soft-fp/fixunssfdi.c: Likewise.
+       * soft-fp/fixunssfsi.c: Likewise.
+       * soft-fp/fixunstfdi.c: Likewise.
+       * soft-fp/fixunstfsi.c: Likewise.
+       * soft-fp/floatdidf.c: Likewise.
+       * soft-fp/floatdisf.c: Likewise.
+       * soft-fp/floatditf.c: Likewise.
+       * soft-fp/floatsidf.c: Likewise.
+       * soft-fp/floatsisf.c: Likewise.
+       * soft-fp/floatsitf.c: Likewise.
+       * soft-fp/floatundidf.c: Likewise.
+       * soft-fp/floatundisf.c: Likewise.
+       * soft-fp/floatunditf.c: Likewise.
+       * soft-fp/floatunsidf.c: Likewise.
+       * soft-fp/floatunsisf.c: Likewise.
+       * soft-fp/floatunsitf.c: Likewise.
+       * soft-fp/gedf2.c: Likewise.
+       * soft-fp/gesf2.c: Likewise.
+       * soft-fp/getf2.c: Likewise.
+       * soft-fp/ledf2.c: Likewise.
+       * soft-fp/lesf2.c: Likewise.
+       * soft-fp/letf2.c: Likewise.
+       * soft-fp/muldf3.c: Likewise.
+       * soft-fp/mulsf3.c: Likewise.
+       * soft-fp/multf3.c: Likewise.
+       * soft-fp/negdf2.c: Likewise.
+       * soft-fp/negsf2.c: Likewise.
+       * soft-fp/negtf2.c: Likewise.
+       * soft-fp/op-1.h: Likewise.
+       * soft-fp/op-2.h: Likewise.
+       * soft-fp/op-4.h: Likewise.
+       * soft-fp/op-8.h: Likewise.
+       * soft-fp/op-common.h: Likewise.
+       * soft-fp/quad.h: Likewise.
+       * soft-fp/single.h: Likewise.
+       * soft-fp/soft-fp.h: Likewise.
+       * soft-fp/sqrtdf2.c: Likewise.
+       * soft-fp/sqrtsf2.c: Likewise.
+       * soft-fp/sqrttf2.c: Likewise.
+       * soft-fp/subdf3.c: Likewise.
+       * soft-fp/subsf3.c: Likewise.
+       * soft-fp/subtf3.c: Likewise.
+       * soft-fp/truncdfsf2.c: Likewise.
+       * soft-fp/trunctfdf2.c: Likewise.
+       * soft-fp/trunctfsf2.c: Likewise.
+       * soft-fp/unorddf2.c: Likewise.
+       * soft-fp/unordsf2.c: Likewise.
+       * soft-fp/unordtf2.c: Likewise.
+
+2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
+
+       [BZ #2505]
+       * sysdeps/powerpc/powerpc32/bits/atomic.h [_ARCH_PWR4]:
+       Define atomic_read_barrier and __ARCH_REL_INSTR using lwsync.
+
+2006-04-03  Andreas Schwab  <schwab@suse.de>
+
+       * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Terminate FDE
+       before syscall.
+       * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
+
+       * sysdeps/unix/sysv/linux/powerpc/sys/procfs.h: Test for <asm/elf.h>
+       with [! _ASM_POWERPC_ELF_H] as well as [!__PPC64_ELF_H].
+
+2006-04-03  Roland McGrath  <roland@frob.com>
+
+       [BZ #2507]
+       * mach/Machrules (.udeps-targets): New variable.
+       ($(objpfx)%.udeps static pattern rule): Use it to avoid \ inside
+       quoted string.
+
+2006-04-02  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #2501]
+       * nscd/nscd_helper.c (get_mapping): Rewrite code to send request
+       so it uses send and not writev.
+
+       [BZ #2418]
+       * sysdeps/unix/sysv/linux/bits/socket.h: Use larger of PATH_MAX and
+       page size when allocating buffer.
+
+2006-04-01  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #2415]
+       * elf/ldd.bash.in: Create better error messages for invalid input
+       files.
+
+       [BZ #2477]
+       * sysdeps/unix/sysv/linux/i386/sysdep.h: Create correct LOADARGS_*
+       macros for non-shared position-independent code.
+
+       [BZ #2472]
+       * bits/siginfo.h: Fix typo in ILL_ILLOPN definition.
+
+       [BZ #2450]
+       * posix/unistd.h: Match return value of readlink to what POSIX
+       says these days.
+       * io/readlink.c: Likewise.
+       * io/readlinkat.c: Likewise.
+       * sysdeps/unix/sysv/linux/readlinkat.c: Likewise.
+
+       [BZ #2498]
+       * nscd/connections.c (main_loop_poll): If the connection cannot be
+       accepted because of user-imposed limits close the descriptor.
+
+2006-03-31  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/unix/sysv/linux/Versions: Export sync_file_range with
+       GLIBC_2.5.
+       * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Remove
+       LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT.
+       Declare sync_file_range and splice.
+       * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
+       * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Likewise.
+       * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise.
+       * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
+       * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise.
+       * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Likewise.
+       * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
+       * sysdeps/unix/sysv/linux/wordsize-64/syscalls.list: Add
+       sync_file_range.
+       * sysdeps/unix/sysv/linux/i386/sync_file_range.S: New file.
+       * sysdeps/unix/sysv/linux/syscalls.list: Add splice syscall.
+       * sysdeps/unix/sysv/linux/Versions: Export splice with GLIBC_2.5
+       version.
+       * Versions.def: Define GLIBC_2.5 for libc.
+
+2006-03-29  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/posix/getaddrinfo.c (gaih_inet): No need to duplicate
+       'name' for 'canon'.  The final allocation will happen later.
+
 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/unix/sysv/linux/kernel-features.h: Remove support for
 2005-11-28  Andreas Jaeger  <aj@suse.de>
 
        * sysdeps/unix/sysv/linux/mips/bits/mman.h (MREMAP_FIXED): Added,
-       Patch by René Rebe <rene@exactcode.de>.
+       Patch by RenÃ\83© Rebe <rene@exactcode.de>.
 
 2005-11-27  Ulrich Drepper  <drepper@redhat.com>
 
 2005-11-27  Roland McGrath  <roland@redhat.com>
 
        * sysdeps/unix/sysv/linux/fchownat.c: Include alloca.h, sysdep.h.
-       Reported by René Rebe <rene@exactcode.de>.
+       Reported by RenÃ\83© Rebe <rene@exactcode.de>.
 
 2005-11-27  Ulrich Drepper  <drepper@redhat.com>
 
diff --git a/NEWS b/NEWS
index c47a9772c6880cd0e44de47c5df0e4a814fee166..eff3b48a3137159d7108eee7b1c8c84152a524d2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,17 @@
-GNU C Library NEWS -- history of user-visible changes.  2006-03-01
+GNU C Library NEWS -- history of user-visible changes.  2006-04-16
 Copyright (C) 1992-2002,2003,2004,2005,2006 Free Software Foundation, Inc.
 See the end for copying conditions.
 
 Please send GNU C library bug reports via <http://sources.redhat.com/bugzilla/>
 using `glibc' in the "product" field.
+\f
+Version 2.5
+
+* For Linux, the sorting of addresses returned by getaddrinfo now also
+  handles rules 3 and 7 from RFC 3484.  Implemented by Ulrich Drepper.
+
+* New Linux interfaces: splice, tee, sync_file_range.
+
 \f
 Version 2.4
 
index 062a94730dd3eea5c7a92363a3acc10ceb19944e..b492caaf0bcdd293e3ea4d453febfcb4d2dd62e9 100644 (file)
@@ -21,6 +21,7 @@ libc {
   GLIBC_2.3.3
   GLIBC_2.3.4
   GLIBC_2.4
+  GLIBC_2.5
 %ifdef USE_IN_LIBIO
   HURD_CTHREADS_0.3
 %endif
index f310193458906625edb39ecaf279f326222811a1..3a5cb01fd8684bec4b5fe1f37ada5b91f83195e7 100644 (file)
@@ -1,5 +1,5 @@
 /* Hierarchial argument parsing, layered over getopt.
-   Copyright (C) 1995-1999,2003,2004,2005 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999,2003,2004,2005,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>.
 
@@ -24,6 +24,7 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <getopt.h>
+#include <limits.h>
 
 #define __need_error_t
 #include <errno.h>
@@ -574,7 +575,7 @@ __NTH (__option_is_short (__const struct argp_option *__opt))
   else
     {
       int __key = __opt->key;
-      return __key > 0 && isprint (__key);
+      return __key > 0 && __key <= UCHAR_MAX && isprint (__key);
     }
 }
 
index fe7b3b5f9c65856394f234f9c727f29fd5c1d8f9..241033b7cd8b3c328cbc3700d156606eff412aca 100644 (file)
@@ -76,7 +76,7 @@ enum
 {
   ILL_ILLOPC = 1,              /* Illegal opcode.  */
 # define ILL_ILLOPC    ILL_ILLOPC
-  ILL_ILL_OPN,                 /* Illegal operand.  */
+  ILL_ILLOPN,                  /* Illegal operand.  */
 # define ILL_ILLOPN    ILL_ILLOPN
   ILL_ILLADR,                  /* Illegal addressing mode.  */
 # define ILL_ILLADR    ILL_ILLADR
index 9462ac1b538215cd6f73052937796d2bc0582a1a..6730fb36eb5103d62b7d3ba92746a83897b99f8c 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (C) 1999,2000,2001,2002,2003,2005
-       Free Software Foundation, Inc.
+/* Copyright (C) 1999-2003,2005,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@suse.de>, 1999.
 
@@ -421,7 +420,7 @@ save_cache (const char *cache_name)
   if (opt_format != 2)
     {
       if (write (fd, file_entries, file_entries_size)
-         != (ssize_t)file_entries_size)
+         != (ssize_t) file_entries_size)
        error (EXIT_FAILURE, errno, _("Writing of cache data failed"));
     }
   if (opt_format != 0)
@@ -430,15 +429,16 @@ save_cache (const char *cache_name)
       if (opt_format != 2)
        {
          char zero[pad];
-         if (write (fd, zero, pad) != (ssize_t)pad)
+         memset (zero, '\0', pad);
+         if (write (fd, zero, pad) != (ssize_t) pad)
            error (EXIT_FAILURE, errno, _("Writing of cache data failed"));
        }
       if (write (fd, file_entries_new, file_entries_new_size)
-         != (ssize_t)file_entries_new_size)
+         != (ssize_t) file_entries_new_size)
        error (EXIT_FAILURE, errno, _("Writing of cache data failed"));
     }
 
-  if (write (fd, strings, total_strlen) != (ssize_t)total_strlen)
+  if (write (fd, strings, total_strlen) != (ssize_t) total_strlen)
     error (EXIT_FAILURE, errno, _("Writing of cache data failed."));
 
   close (fd);
@@ -455,6 +455,7 @@ save_cache (const char *cache_name)
           cache_name);
 
   /* Free all allocated memory.  */
+  free (file_entries_new);
   free (file_entries);
   free (strings);
 
index 795fe6374fd4d41a3fb48a4dbb3e9997fe946bdc..6800272ac7e814568f6ba421217f3cff31286af7 100644 (file)
@@ -1205,7 +1205,7 @@ main (int argc, char **argv)
   if (opt_chroot)
     {
       /* Normalize the path a bit, we might need it for printing later.  */
-      char *endp = strchr (opt_chroot, '\0');
+      char *endp = rawmemchr (opt_chroot, '\0');
       while (endp > opt_chroot && endp[-1] == '/')
        --endp;
       *endp = '\0';
index 100d2335d2be2519229800e9328027e0be07c1eb..a22ad15b599175ee47c763823a02e7b1b8120e11 100644 (file)
@@ -144,9 +144,12 @@ for file do
   *) file=./$file
      ;;
   esac
-  if test ! -f "$file"; then
+  if test ! -e "$file"; then
     echo "ldd: ${file}:" $"No such file or directory" >&2
     result=1
+  elif test ! -f "$file"; then
+    echo "ldd: ${file}:" $"not regular file" >&2
+    result=1
   elif test -r "$file"; then
     test -x "$file" || echo 'ldd:' $"\
 warning: you do not have execution permission for" "\`$file'" >&2
index 68fe809700bfcf00b8edb71cd27df365c2869797..9a21b8bc6f39edc5695d2f2df47e6790297e10f0 100644 (file)
@@ -2624,7 +2624,7 @@ process_envvars (enum mode *modep)
            }
 
          if (memcmp (envline, "POINTER_GUARD", 13) == 0)
-           GLRO(dl_pointer_guard) = envline[14] == '0';
+           GLRO(dl_pointer_guard) = envline[14] != '0';
          break;
 
        case 14:
index 9f35fe0f792f5c3d8f823c4279b5986c38624ff4..30b137b9551522f2a0fe08de7d1adccbb861573b 100644 (file)
@@ -3,5 +3,5 @@ glibc-branch := fedora
 glibc-base := HEAD
 DIST_BRANCH := devel
 COLLECTION := dist-fc4
-fedora-sync-date := 2006-03-28 09:00 UTC
-fedora-sync-tag := fedora-glibc-20060328T0900
+fedora-sync-date := 2006-04-24 08:20 UTC
+fedora-sync-tag := fedora-glibc-20060424T0820
index 987ee270cba7ee8a978daff8f8c195e0d7cdc5ae..0f38af7f1122653a01fc89798a2cce6acc86010f 100644 (file)
@@ -295,7 +295,6 @@ cat > override_headers/asm/unistd.h <<EOF
 #define __NR_mknodat           297
 #define __NR_fchownat          298
 #define __NR_futimesat         299
-#define __NR_fstatat64         300
 #define __NR_unlinkat          301
 #define __NR_renameat          302
 #define __NR_linkat            303
@@ -304,6 +303,9 @@ cat > override_headers/asm/unistd.h <<EOF
 #define __NR_fchmodat          306
 #define __NR_faccessat         307
 #endif
+#ifndef __NR_fstatat64
+#define __NR_fstatat64         300
+#endif
 #ifndef __NR_pselect6
 #define __NR_pselect6          308
 #define __NR_ppoll             309
index b83081efca74720fcc9f1517d775c4d3ce238ac9..328121edbe204c696521fab2894fa7a88e3a3de9 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert using charmaps and possibly iconv().
-   Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
 
@@ -488,7 +488,7 @@ process_fd (struct convtable *tbl, int fd, FILE *output)
      process it in one step.  */
   static char *inbuf = NULL;
   static size_t maxlen = 0;
-  char *inptr = NULL;
+  char *inptr = inbuf;
   size_t actlen = 0;
 
   while (actlen < maxlen)
index 39eb1e386348dcf7281a49e0809c12872e45ce03..1c80df16cf4a5ab1a78a270387b7decf7332a12f 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 1997-2004,2005,2006 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -255,14 +255,14 @@ export AWK
 
 define generate-8bit-table
 $(make-target-directory)
-$(SHELL) ./gen-8bit.sh $< > $(@:stmp=T)
+LC_ALL=C $(SHELL) ./gen-8bit.sh $< > $(@:stmp=T)
 $(move-if-change) $(@:stmp=T) $(@:stmp=h)
 touch $@
 endef
 
 define generate-8bit-gap-table
 $(make-target-directory)
-$(SHELL) ./gen-8bit-gap.sh $< > $(@:stmp=T)
+LC_ALL=C $(SHELL) ./gen-8bit-gap.sh $< > $(@:stmp=T)
 $(move-if-change) $(@:stmp=T) $(@:stmp=h)
 touch $@
 endef
@@ -304,7 +304,7 @@ $(gen-8bit-gap-modules:%=$(objpfx)%.stmp): $(objpfx)%.stmp: $(objpfx)iconv-rules
 
 $(objpfx)iso8859-7jp.stmp: $(charmaps)/ISO-8859-7 gen-8bit-gap-1.sh
        $(make-target-directory)
-       $(SHELL) ./gen-8bit-gap-1.sh $< > $(@:stmp=T)
+       LC_ALL=C $(SHELL) ./gen-8bit-gap-1.sh $< > $(@:stmp=T)
        $(move-if-change) $(@:stmp=T) $(@:stmp=h)
        touch $@
 
index 2bec8c122382e031a414e6c5e7a5ab6d6342adb3..38955c847755555b92b35140af8e1e774de5a70e 100644 (file)
@@ -1,5 +1,5 @@
 /* Conversion from and to IBM437.
-   Copyright (C) 1998 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -24,6 +24,6 @@
 #define TABLES <ibm437.h>
 
 #define CHARSET_NAME   "IBM437//"
-#define HAS_HOLES      1       /* Not all 256 character are defined.  */
+#define HAS_HOLES      0       /* All 256 character are defined.  */
 
 #include <8bit-gap.c>
index 78a6528e1f05532c0a0e6dae9998c72e6d2332e7..f9f46d299efa5c7a979e3545c4457b30540184fd 100644 (file)
@@ -1,5 +1,5 @@
 /* Conversion from and to IBM861.
-   Copyright (C) 1998 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -24,6 +24,6 @@
 #define TABLES <ibm861.h>
 
 #define CHARSET_NAME   "IBM861//"
-#define HAS_HOLES      1       /* Not all 256 character are defined.  */
+#define HAS_HOLES      0       /* All 256 character are defined.  */
 
 #include <8bit-gap.c>
index 447c87829e9cb53c651c191f04df1d8abbb66a49..2b0a27995bd599d27fbc9d718b5bea3595f25710 100644 (file)
@@ -1,5 +1,5 @@
 /* Conversion from and to IBM862.
-   Copyright (C) 1998 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -24,6 +24,6 @@
 #define TABLES <ibm862.h>
 
 #define CHARSET_NAME   "IBM862//"
-#define HAS_HOLES      1       /* Not all 256 character are defined.  */
+#define HAS_HOLES      0       /* All 256 character are defined.  */
 
 #include <8bit-gap.c>
index 68aac4caada738ceaa5ae681f3542a7fd3aec8d1..1af36d6469ed00c25970a7fcef9d21f4e6d7fc1b 100644 (file)
@@ -1,5 +1,5 @@
 /* Conversion from and to IBM863.
-   Copyright (C) 1998 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -24,6 +24,6 @@
 #define TABLES <ibm863.h>
 
 #define CHARSET_NAME   "IBM863//"
-#define HAS_HOLES      1       /* Not all 256 character are defined.  */
+#define HAS_HOLES      0       /* All 256 character are defined.  */
 
 #include <8bit-gap.c>
index a81a95af44c2ea5e52b2a474110fc69920a4e7cf..4b3007713b5aad280211c82307321db0e148cc74 100644 (file)
@@ -1,5 +1,5 @@
 /* Conversion from and to IBM865.
-   Copyright (C) 1998 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -24,6 +24,6 @@
 #define TABLES <ibm865.h>
 
 #define CHARSET_NAME   "IBM865//"
-#define HAS_HOLES      1       /* Not all 256 character are defined.  */
+#define HAS_HOLES      0       /* All 256 character are defined.  */
 
 #include <8bit-gap.c>
index aa20c351012c033d98e6f3319e55d171ded50b67..d790fcbe870b5cff2668a606d41afd93de0e34ea 100644 (file)
@@ -1,10 +1,22 @@
 #ifndef _IFADDRS_H
 #include <inet/ifaddrs.h>
 #include <stdbool.h>
+#include <stdint.h>
 
 libc_hidden_proto (getifaddrs)
 libc_hidden_proto (freeifaddrs)
 
-extern void __check_pf (bool *seen_ipv4, bool *seen_ipv6) attribute_hidden;
+struct in6addrinfo
+{
+  enum {
+    in6ai_deprecated = 1,
+    in6ai_temporary = 2
+  } flags;
+  uint32_t addr[4];
+};
+
+extern void __check_pf (bool *seen_ipv4, bool *seen_ipv6,
+                       struct in6addrinfo **in6ai, size_t *in6ailen)
+  attribute_hidden;
 
 #endif /* ifaddrs.h */
index 5d98c98affc63af9f0512a04a2a7b2db50e8840c..b015432659e18aa38c75387e7c877084b690812e 100644 (file)
@@ -1,5 +1,5 @@
 /* Determine protocol families for which interfaces exist.  Generic version.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
 
 void
 attribute_hidden
-__check_pf (bool *seen_ipv4, bool *seen_ipv6)
+__check_pf (bool *seen_ipv4, bool *seen_ipv6,
+           struct in6addrinfo **in6ai, size_t *in6ailen)
 {
+  /* By default we have no way to determine information about
+     deprecated and temporary addresses.  */
+  *in6ai = NULL;
+  *in6ailen = 0;
+
   /* Get the interface list via getifaddrs.  */
   struct ifaddrs *ifa = NULL;
   if (getifaddrs (&ifa) != 0)
index 493a423c1089f83434f7298685224070aa09db5b..5057fd221a98762ba93edef696a71764621d8149 100644 (file)
@@ -403,25 +403,16 @@ getnameinfo (const struct sockaddr *sa, socklen_t addrlen, char *host,
        if (!(flags & NI_NUMERICSERV))
          {
            struct servent *s, ts;
-           while (__getservbyport_r (((const struct sockaddr_in *) sa)->sin_port,
-                                     ((flags & NI_DGRAM) ? "udp" : "tcp"),
-                                     &ts, tmpbuf, tmpbuflen, &s))
+           int e;
+           while ((e = __getservbyport_r (((const struct sockaddr_in *) sa)->sin_port,
+                                          ((flags & NI_DGRAM)
+                                           ? "udp" : "tcp"),
+                                          &ts, tmpbuf, tmpbuflen, &s)))
              {
-               if (herrno == NETDB_INTERNAL)
-                 {
-                   if (errno == ERANGE)
-                     tmpbuf = extend_alloca (tmpbuf, tmpbuflen,
-                                             2 * tmpbuflen);
-                   else
-                     {
-                       __set_errno (serrno);
-                       return EAI_SYSTEM;
-                     }
-                 }
+               if (e == ERANGE)
+                 tmpbuf = extend_alloca (tmpbuf, tmpbuflen, 2 * tmpbuflen);
                else
-                 {
-                   break;
-                 }
+                 break;
              }
            if (s)
              {
index 2e0fed8a30c29d7ebf99a11d0076fcf1e39ca3c8..f88982e32310021f0a94083a59521c7c63758ee2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
 
@@ -251,7 +251,7 @@ inet6_option_next (cmsg, tptrp)
   const uint8_t *endp = CMSG_DATA (cmsg) + (ip6e->ip6e_len + 1) * 8;
 
   const uint8_t *result;
-  if (tptrp == NULL)
+  if (*tptrp == NULL)
     /* This is the first call, return the first option if there is one.  */
     result = (const uint8_t *) (ip6e + 1);
   else
@@ -308,7 +308,7 @@ inet6_option_find (cmsg, tptrp, type)
   const uint8_t *endp = CMSG_DATA (cmsg) + (ip6e->ip6e_len + 1) * 8;
 
   const uint8_t *next;
-  if (tptrp == NULL)
+  if (*tptrp == NULL)
     /* This is the first call, return the first option if there is one.  */
     next = (const uint8_t *) (ip6e + 1);
   else
index 889435dd10261753147330f553871d1282a94c34..38794957c230c59409807917c8dca096db44074b 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <arpa/inet.h>
-#include <bits/libc-lock.h>
 
 /* The interface of this function is completely stupid, it requires a
-   static buffer.  We relax this a bit in that we allow at least one
-   buffer for each thread.  */
-
-/* This is the key for the thread specific memory.  */
-static __libc_key_t key;
-
-/* If nonzero the key allocation failed and we should better use a
-   static buffer than fail.  */
-static char local_buf[18];
-static char *static_buf;
-
-/* Destructor for the thread-specific data.  */
-static void init (void);
-static void free_key_mem (void *mem);
+   static buffer.  We relax this a bit in that we allow one buffer for
+   each thread.  */
+static __thread char buffer[18];
 
 
 char *
 inet_ntoa (struct in_addr in)
 {
-  __libc_once_define (static, once);
-  char *buffer;
-  unsigned char *bytes;
-
-  /* If we have not yet initialized the buffer do it now.  */
-  __libc_once (once, init);
-
-  if (static_buf != NULL)
-    buffer = static_buf;
-  else
-    {
-      /* We don't use the static buffer and so we have a key.  Use it
-        to get the thread-specific buffer.  */
-      buffer = __libc_getspecific (key);
-      if (buffer == NULL)
-       {
-         /* No buffer allocated so far.  */
-         buffer = malloc (18);
-         if (buffer == NULL)
-           /* No more memory available.  We use the static buffer.  */
-           buffer = local_buf;
-         else
-           __libc_setspecific (key, buffer);
-       }
-    }
-
-  bytes = (unsigned char *) &in;
-  __snprintf (buffer, 18, "%d.%d.%d.%d",
+  unsigned char *bytes = (unsigned char *) &in;
+  __snprintf (buffer, sizeof (buffer), "%d.%d.%d.%d",
              bytes[0], bytes[1], bytes[2], bytes[3]);
 
   return buffer;
 }
-
-
-/* Initialize buffer.  */
-static void
-init (void)
-{
-  if (__libc_key_create (&key, free_key_mem))
-    /* Creating the key failed.  This means something really went
-       wrong.  In any case use a static buffer which is better than
-       nothing.  */
-    static_buf = local_buf;
-}
-
-
-/* Free the thread specific data, this is done if a thread terminates.  */
-static void
-free_key_mem (void *mem)
-{
-  free (mem);
-  __libc_setspecific (key, NULL);
-}
index 6deb1feb452f9705ffc3e7d11fe3f183f643378c..07ddeeafea969656fb531f53673503635176cf3a 100644 (file)
@@ -87,8 +87,11 @@ rexec_af(ahost, rport, name, pass, cmd, fd2p, af)
                        return (-1);
                }
                *ahost = ahostbuf;
-       } else
+       } else {
                *ahost = NULL;
+               __set_errno (ENOENT);
+               return -1;
+       }
        ruserpass(res0->ai_canonname, &name, &pass);
 retry:
        s = __socket(res0->ai_family, res0->ai_socktype, 0);
index f7bcfa5ff66f5a0d2b5d45f9424ba66ce66b01d1..8e326ead53b5625933f09e0739584d6a2ecfd80c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2002, 2003, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
 
@@ -78,7 +78,7 @@ _nl_explode_name (name, language, modifier, territory, codeset,
   if (*language == cp)
     /* This does not make sense: language has to be specified.  Use
        this entry as it is without exploding.  Perhaps it is an alias.  */
-    cp = strchr (*language, '\0');
+    cp = __rawmemchr (*language, '\0');
   else if (cp[0] != '@')
     {
       if (cp[0] == '_')
index 39e54755d249b22eb7fb8f73c5d2e1c9de79a85e..9806ba12cd914cce00fc59d418e8ecdd192d83c1 100644 (file)
@@ -1,5 +1,5 @@
 /* Handle list of needed message catalogs
-   Copyright (C) 1995-1999, 2000, 2001, 2002, 2004
+   Copyright (C) 1995-1999, 2000, 2001, 2002, 2004, 2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Ulrich Drepper <drepper@gnu.org>, 1995.
@@ -110,7 +110,7 @@ _nl_find_domain (dirname, locale, domainname, domainbinding)
            break;
        }
 
-      return cnt >= 0 ? retval : NULL;
+      return retval;
       /* NOTREACHED */
     }
 
@@ -119,20 +119,7 @@ _nl_find_domain (dirname, locale, domainname, domainbinding)
      done.  */
   alias_value = _nl_expand_alias (locale);
   if (alias_value != NULL)
-    {
-#if defined _LIBC || defined HAVE_STRDUP
-      locale = strdup (alias_value);
-      if (locale == NULL)
-       return NULL;
-#else
-      size_t len = strlen (alias_value) + 1;
-      locale = (char *) malloc (len);
-      if (locale == NULL)
-       return NULL;
-
-      memcpy (locale, alias_value, len);
-#endif
-    }
+    locale = strdupa (alias_value);
 
   /* Now we determine the single parts of the locale name.  First
      look for the language.  Termination symbols are `_' and `@' if
@@ -169,10 +156,6 @@ _nl_find_domain (dirname, locale, domainname, domainbinding)
        }
     }
 
-  /* The room for an alias was dynamically allocated.  Free it now.  */
-  if (alias_value != NULL)
-    free (locale);
-
   /* The space for normalized_codeset is dynamically allocated.  Free it.  */
   if (mask & XPG_NORM_CODESET)
     free ((void *) normalized_codeset);
index 2b99206b88a49aa0a680150022f8aefecfb86e8e..6383fe8f179d806d1431eb4322d262c0816e1d29 100644 (file)
--- a/io/fts.c
+++ b/io/fts.c
@@ -93,7 +93,8 @@ fts_open(argv, options, compar)
        register FTS *sp;
        register FTSENT *p, *root;
        register int nitems;
-       FTSENT *parent, *tmp;
+       FTSENT *parent = NULL;
+       FTSENT *tmp;
 
        /* Options check. */
        if (options & ~FTS_OPTIONMASK) {
@@ -124,9 +125,11 @@ fts_open(argv, options, compar)
                goto mem1;
 
        /* Allocate/initialize root's parent. */
-       if ((parent = fts_alloc(sp, "", 0)) == NULL)
-               goto mem2;
-       parent->fts_level = FTS_ROOTPARENTLEVEL;
+       if (*argv != NULL) {
+               if ((parent = fts_alloc(sp, "", 0)) == NULL)
+                       goto mem2;
+               parent->fts_level = FTS_ROOTPARENTLEVEL;
+         }
 
        /* Allocate/initialize root(s). */
        for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) {
@@ -744,6 +747,10 @@ mem1:                              saved_errno = errno;
                        p->fts_flags |= FTS_ISW;
 #endif
 
+#if 0
+               /* Unreachable code.  cderrno is only ever set to a nonnull
+                  value if dirp is closed at the same time.  But then we
+                  cannot enter this loop.  */
                if (cderrno) {
                        if (nlinks) {
                                p->fts_info = FTS_NS;
@@ -751,7 +758,9 @@ mem1:                               saved_errno = errno;
                        } else
                                p->fts_info = FTS_NSOK;
                        p->fts_accpath = cur->fts_accpath;
-               } else if (nlinks == 0
+               } else
+#endif
+               if (nlinks == 0
 #if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE
                           || (nostat &&
                               dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
@@ -819,6 +828,7 @@ mem1:                               saved_errno = errno;
             fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) {
                cur->fts_info = FTS_ERR;
                SET(FTS_STOP);
+               fts_lfree(head);
                return (NULL);
        }
 
@@ -826,6 +836,7 @@ mem1:                               saved_errno = errno;
        if (!nitems) {
                if (type == BREAD)
                        cur->fts_info = FTS_DP;
+               fts_lfree(head);
                return (NULL);
        }
 
index 779b809eaa276bf4d7330d79436d9e9e81b65e02..b69d08695cb71be531ce2ddf3e8a919fc753247b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,7 @@
 /* Read the contents of the symbolic link PATH into no more than
    LEN bytes of BUF.  The contents are not null-terminated.
    Returns the number of characters read, or -1 for errors.  */
-int
+ssize_t
 __readlink (path, buf, len)
      const char *path;
      char *buf;
index c6a032c4748ffced0abc4af760f79d7deb4608f2..483dc4914d38ea8a60591faf0659a53a2b440949 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -23,7 +23,7 @@
 /* Read the contents of the symbolic link PATH relative to FD into no
    more than LEN bytes of BUF.  The contents are not null-terminated.
    Returns the number of characters read, or -1 for errors.  */
-int
+ssize_t
 readlinkat (fd, path, buf, len)
      int fd;
      const char *path;
index b847f62c9a874b44b0be021a387fbc2cc19dc94d..f3b280092cb18e110ae32b4b719dc5bb037711ef 100644 (file)
@@ -1,5 +1,5 @@
 /* Fmemopen implementation.
-   Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2002, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by  Hanno Mueller, kontakt@hanno.de, 2000.
 
@@ -202,7 +202,7 @@ fmemopen (void *buf, size_t len, const char *mode)
   cookie_io_functions_t iof;
   fmemopen_cookie_t *c;
 
-  if (len == 0)
+  if (__builtin_expect (len == 0, 0))
     {
     einval:
       __set_errno (EINVAL);
@@ -227,8 +227,11 @@ fmemopen (void *buf, size_t len, const char *mode)
     }
   else
     {
-      if ((uintptr_t) len > -(uintptr_t) buf)
-       goto einval;
+      if (__builtin_expect ((uintptr_t) len > -(uintptr_t) buf, 0))
+       {
+         free (c);
+         goto einval;
+       }
 
       c->buffer = buf;
     }
index 4d649b0456346b177c95ee84e264ecdb075c8db3..83cd9fa17b74410eedff876945d619f282a55b56 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2002, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2002, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -222,14 +222,18 @@ No definition for %s category found"), "LC_ADDRESS"));
 
   if (address->lang_ab == NULL)
     {
-      if (iso639[cnt].ab[0] != '\0' && verbose && ! nothing)
+      if ((cnt == sizeof (iso639) / sizeof (iso639[0])
+          || iso639[cnt].ab[0] != '\0')
+         && verbose && ! nothing)
        WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"),
                                "LC_ADDRESS", "lang_ab"));
       address->lang_ab = "";
     }
   else if (address->lang_ab[0] == '\0')
     {
-      if (iso639[cnt].ab[0] != '\0' && verbose)
+      if ((cnt == sizeof (iso639) / sizeof (iso639[0])
+          || iso639[cnt].ab[0] != '\0')
+         && verbose)
        WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' must not be empty"),
                                "LC_ADDRESS", "lang_ab"));
     }
index a101a402f49703645653b4979873148ed76465b2..a901c4d98500b874a7724a8f644ca827ebb1960b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-1999,2000,2001,2002,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2002,2005,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
 
@@ -302,7 +302,7 @@ numeric_read (struct linereader *ldfile, struct localedef_t *result,
            {
              size_t act = 0;
              size_t max = 10;
-             char *grouping = ignore_content ? NULL : xmalloc (max);
+             char *grouping = xmalloc (max);
 
              do
                {
@@ -321,24 +321,20 @@ numeric_read (struct linereader *ldfile, struct localedef_t *result,
                    }
 
                  if (now->tok == tok_minus1)
-                   {
-                     if (!ignore_content)
-                       grouping[act++] = '\177';
-                   }
+                   grouping[act++] = '\177';
                  else if (now->val.num == 0)
                    {
                      /* A value of 0 disables grouping from here on but
                         we must not store a NUL character since this
                         terminates the string.  Use something different
                         which must not be used otherwise.  */
-                     if (!ignore_content)
-                       grouping[act++] = '\377';
+                     grouping[act++] = '\377';
                    }
                  else if (now->val.num > 126)
                    lr_error (ldfile, _("\
 %s: values for field `%s' must be smaller than 127"),
                              "LC_NUMERIC", "grouping");
-                 else if (!ignore_content)
+                 else
                    grouping[act++] = now->val.num;
 
                  /* Next must be semicolon.  */
@@ -353,13 +349,10 @@ numeric_read (struct linereader *ldfile, struct localedef_t *result,
              if (now->tok != tok_eol)
                goto err_label;
 
-             if (!ignore_content)
-               {
-                 grouping[act++] = '\0';
+             grouping[act++] = '\0';
 
-                 numeric->grouping = xrealloc (grouping, act);
-                 numeric->grouping_len = act;
-               }
+             numeric->grouping = xrealloc (grouping, act);
+             numeric->grouping_len = act;
            }
          break;
 
index 1d3e60f69f33c73d2f84b8df913fb37a9cb3ecaf..6587f7305bb4015ab39f8e94fe8a086cb0a45bf6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2001,2002,2003,2004,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
 
@@ -214,12 +214,6 @@ lr_token (struct linereader *lr, const struct charmap_t *charmap,
        }
       while (isspace (ch));
 
-      if (ch == EOF)
-       {
-         lr->token.tok = tok_eof;
-         return &lr->token;
-       };
-
       if (ch != lr->comment_char)
        break;
 
index f4c29fc173a63bda1132ee08643e5207ab14c148..de23e123e39b4c235a04d56268bb0de1eb0e5466 100644 (file)
@@ -1,3 +1,52 @@
+2006-04-24  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #2349]
+       * locales/de_CH: Change thousand separator to '.
+
+2006-01-17  Robert Millan  <robertmh@gnu.org>
+
+       [BZ #2158]
+       * SUPPORTED: Add ca_AD, ca_FR and ca_IT variants.
+       * locales/ca_AD: New file.
+       * locales/ca_FR: New file.
+       * locales/ca_IT: New file.
+                               
+2006-04-23  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #2134]
+       * locales/pa_PK: New file.
+       * SUPPORTED: Add pa_PK.UTF-8.
+
+       [BZ #1974]
+       * locales/vi_VN: Fix int_frac_digits/frac_digits, abmon, mon, d_t_fmt,
+       am_pm, and name_fmt.
+
+       [BZ #1787]
+       * locales/en_ZA: Updates.
+
+       [BZ #1786]
+       * locales/af_ZA: Updates.
+
+       [BZ #1785]
+       * locales/st_ZA: Updates and formatting changes.
+
+       [BZ #1784]
+       * locales/zu_ZA: Updates and formatting changes.
+
+       [BZ #1783]
+       * locales/xh_ZA: Updates and formatting changes.
+
+       [BZ #1782]
+       * locales/nr_ZA: New file.
+       * locales/SUPPORTED: Add nr_ZA.UTF-8.
+
+2006-04-10  Jakub Jelinek  <jakub@redhat.com>
+
+       * locales/cs_CZ (LC_TIME): Define week.
+       * locales/sk_SK (LC_TIME): Likewise.
+       * locales/pl_PL (LC_TIME): Likewise.
+       * locales/en_US (LC_TIME): Change week to 7;19971130;7.
+
 2005-12-27  Roland McGrath  <roland@redhat.com>
 
        * tst-ctype.c (main): Add some casts.
index 593a775419fc37141fdc95135c475db28c2a3e00..a1e2710280465f9fab9ac3b7b9e8ee6ce717f57d 100644 (file)
@@ -60,9 +60,15 @@ br_FR@euro/ISO-8859-15 \
 bs_BA.UTF-8/UTF-8 \
 bs_BA/ISO-8859-2 \
 byn_ER/UTF-8 \
+ca_AD.UTF-8/UTF-8 \
+ca_AD/ISO-8859-15 \
 ca_ES.UTF-8/UTF-8 \
 ca_ES/ISO-8859-1 \
 ca_ES@euro/ISO-8859-15 \
+ca_FR.UTF-8/UTF-8 \
+ca_FR/ISO-8859-15 \
+ca_IT.UTF-8/UTF-8 \
+ca_IT/ISO-8859-15 \
 cs_CZ.UTF-8/UTF-8 \
 cs_CZ/ISO-8859-2 \
 cy_GB.UTF-8/UTF-8 \
@@ -268,6 +274,7 @@ nn_NO.UTF-8/UTF-8 \
 nn_NO/ISO-8859-1 \
 no_NO.UTF-8/UTF-8 \
 no_NO/ISO-8859-1 \
+nr_ZA/UTF-8 \
 nso_ZA/UTF-8 \
 oc_FR.UTF-8/UTF-8 \
 oc_FR/ISO-8859-1 \
@@ -275,6 +282,7 @@ om_ET/UTF-8 \
 om_KE.UTF-8/UTF-8 \
 om_KE/ISO-8859-1 \
 pa_IN/UTF-8 \
+pa_PK/UTF-8 \
 pl_PL.UTF-8/UTF-8 \
 pl_PL/ISO-8859-2 \
 pt_BR.UTF-8/UTF-8 \
index ca1fdfb36f331955cdb5465e03a2e9262c84480e..81f8bfe15164dd6132e4de39325b8127c30a897d 100644 (file)
@@ -1,7 +1,13 @@
 escape_char  /
 comment_char  %
 
+% Charset: ISO-8859-1
+
 % ChangeLog
+% 1.2.1 (2005-10-13):
+%      2005-10-12 Dwayne Bailey <dwayne@translate.org.za>
+%        - Added 'Charset: ISO-8859-1' information
+%        - Updated contact information
 % 1.2 (2004-10-28):
 %      2004-10-28 Dwayne Bailey <dwayne@translate.org.za>
 %        - Corrected country_name should be "Suid-Afrika"
@@ -27,19 +33,18 @@ comment_char  %
 %        - Add all name_* to LC_NAME
 %        - Add various comments explaining items
 
-
 LC_IDENTIFICATION
 title      "Afrikaans locale for South Africa"
 source     "Zuza Software Foundation (Translate.org.za)"
 address    "Box 28364, Sunnyside, 0132, South Africa"
 contact    "Dwayne Bailey"
 email      "dwayne@translate.org.za"
-tel        "+27 12 343 0389"
-fax        "+27 12 343 0389"
+tel        "+27 12 460 1095"
+fax        "+27 12 460 1095"
 language   "Afrikaans"
 territory  "South Africa"
-revision   "1.2"
-date       "2004-10-28"
+revision   "1.2.1"
+date       "2005-10-13"
 %
 category  "af_ZA:2000";LC_IDENTIFICATION
 category  "af_ZA:2000";LC_CTYPE
diff --git a/localedata/locales/ca_AD b/localedata/locales/ca_AD
new file mode 100644 (file)
index 0000000..f7f68f4
--- /dev/null
@@ -0,0 +1,94 @@
+comment_char %
+escape_char  /
+%
+% Catalan Language Locale for Andorra 
+% Language: ca
+% Territory: AD
+% Option: euro
+% Revision: 1.0
+% Date: 2006-01-16
+% Application: general
+% Users: general
+% Charset: ISO-8859-15
+% Distribution and use is free, also
+% for commercial purposes.
+
+LC_IDENTIFICATION
+title      "Catalan locale for Andorra "
+source     "Robert Millan"
+address    ""
+contact    ""
+email      ""
+tel        ""
+fax        ""
+language   "Catalan"
+territory  "Andorra"
+revision   "1.0"
+date       "2006-01-16"
+%
+category  "ca_AD:2000";LC_IDENTIFICATION
+category  "ca_AD:2000";LC_CTYPE
+category  "ca_AD:2000";LC_COLLATE
+category  "ca_AD:2000";LC_TIME
+category  "ca_AD:2000";LC_NUMERIC
+category  "ca_AD:2000";LC_MONETARY
+category  "ca_AD:2000";LC_MESSAGES
+category  "ca_AD:2000";LC_PAPER
+category  "ca_AD:2000";LC_NAME
+category  "ca_AD:2000";LC_ADDRESS
+category  "ca_AD:2000";LC_TELEPHONE
+
+END LC_IDENTIFICATION
+
+LC_COLLATE
+copy "ca_ES"
+END LC_COLLATE
+
+LC_CTYPE
+copy "i18n"
+END LC_CTYPE
+
+LC_MESSAGES
+copy "ca_ES"
+END LC_MESSAGES
+
+LC_MONETARY
+copy "ca_ES"
+END LC_MONETARY
+
+LC_NUMERIC
+copy "ca_ES"
+END LC_NUMERIC
+
+LC_TIME
+copy "ca_ES"
+END LC_TIME
+
+LC_PAPER
+copy "ca_ES"
+END LC_PAPER
+
+LC_TELEPHONE
+tel_int_fmt    "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
+<U006C>"
+int_prefix     "<U0033><U0037><U0036>"
+END LC_TELEPHONE
+
+LC_MEASUREMENT
+copy "ca_ES"
+END LC_MEASUREMENT
+
+LC_NAME
+copy "ca_ES"
+END LC_NAME
+
+LC_ADDRESS
+postal_fmt    "<U0025><U0066><U0025><U004E><U0025><U0061><U0025><U004E>/
+<U0025><U0064><U0025><U004E><U0025><U0062><U0025><U004E><U0025><U0073>/
+<U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025>/
+<U004E><U0025><U0025><U007A><U0020><U0025><U0054><U0025>/
+<U004E><U0025><U0063><U0025><U004E>"
+country_ab2 "<U0041><U0044>"
+country_ab3 "<U0041><U004E><U0044>"
+country_num 20
+END LC_ADDRESS
diff --git a/localedata/locales/ca_FR b/localedata/locales/ca_FR
new file mode 100644 (file)
index 0000000..38fc26a
--- /dev/null
@@ -0,0 +1,85 @@
+comment_char %
+escape_char  /
+%
+% Catalan Language Locale for France 
+% Language: ca
+% Territory: FR
+% Option: euro
+% Revision: 1.0
+% Date: 2006-01-16
+% Application: general
+% Users: general
+% Charset: ISO-8859-15
+% Distribution and use is free, also
+% for commercial purposes.
+
+LC_IDENTIFICATION
+title      "Catalan locale for France "
+source     "Robert Millan"
+address    ""
+contact    ""
+email      ""
+tel        ""
+fax        ""
+language   "Catalan"
+territory  "France"
+revision   "1.0"
+date       "2006-01-16"
+%
+category  "ca_FR:2000";LC_IDENTIFICATION
+category  "ca_FR:2000";LC_CTYPE
+category  "ca_FR:2000";LC_COLLATE
+category  "ca_FR:2000";LC_TIME
+category  "ca_FR:2000";LC_NUMERIC
+category  "ca_FR:2000";LC_MONETARY
+category  "ca_FR:2000";LC_MESSAGES
+category  "ca_FR:2000";LC_PAPER
+category  "ca_FR:2000";LC_NAME
+category  "ca_FR:2000";LC_ADDRESS
+category  "ca_FR:2000";LC_TELEPHONE
+
+END LC_IDENTIFICATION
+
+LC_COLLATE
+copy "ca_ES"
+END LC_COLLATE
+
+LC_CTYPE
+copy "i18n"
+END LC_CTYPE
+
+LC_MESSAGES
+copy "ca_ES"
+END LC_MESSAGES
+
+LC_MONETARY
+copy "ca_ES"
+END LC_MONETARY
+
+LC_NUMERIC
+copy "ca_ES"
+END LC_NUMERIC
+
+LC_TIME
+copy "ca_ES"
+END LC_TIME
+
+LC_PAPER
+copy "fr_FR"
+END LC_PAPER
+
+LC_TELEPHONE
+copy "fr_FR"
+END LC_TELEPHONE
+
+LC_MEASUREMENT
+copy "fr_FR"
+END LC_MEASUREMENT
+
+LC_NAME
+copy "ca_ES"
+END LC_NAME
+
+LC_ADDRESS
+copy "fr_FR"
+END LC_ADDRESS
diff --git a/localedata/locales/ca_IT b/localedata/locales/ca_IT
new file mode 100644 (file)
index 0000000..8f37a45
--- /dev/null
@@ -0,0 +1,85 @@
+comment_char %
+escape_char  /
+%
+% Catalan Language Locale for Italy (L'Alguer) 
+% Language: ca
+% Territory: IT
+% Option: euro
+% Revision: 1.0
+% Date: 2006-01-16
+% Application: general
+% Users: general
+% Charset: ISO-8859-15
+% Distribution and use is free, also
+% for commercial purposes.
+
+LC_IDENTIFICATION
+title      "Catalan locale for Italy (L'Alguer) "
+source     "Robert Millan"
+address    ""
+contact    ""
+email      ""
+tel        ""
+fax        ""
+language   "Catalan"
+territory  "Italy (L'Alguer)"
+revision   "1.0"
+date       "2006-01-16"
+%
+category  "ca_IT:2000";LC_IDENTIFICATION
+category  "ca_IT:2000";LC_CTYPE
+category  "ca_IT:2000";LC_COLLATE
+category  "ca_IT:2000";LC_TIME
+category  "ca_IT:2000";LC_NUMERIC
+category  "ca_IT:2000";LC_MONETARY
+category  "ca_IT:2000";LC_MESSAGES
+category  "ca_IT:2000";LC_PAPER
+category  "ca_IT:2000";LC_NAME
+category  "ca_IT:2000";LC_ADDRESS
+category  "ca_IT:2000";LC_TELEPHONE
+
+END LC_IDENTIFICATION
+
+LC_COLLATE
+copy "ca_ES"
+END LC_COLLATE
+
+LC_CTYPE
+copy "i18n"
+END LC_CTYPE
+
+LC_MESSAGES
+copy "ca_ES"
+END LC_MESSAGES
+
+LC_MONETARY
+copy "ca_ES"
+END LC_MONETARY
+
+LC_NUMERIC
+copy "ca_ES"
+END LC_NUMERIC
+
+LC_TIME
+copy "ca_ES"
+END LC_TIME
+
+LC_PAPER
+copy "it_IT"
+END LC_PAPER
+
+LC_TELEPHONE
+copy "it_IT"
+END LC_TELEPHONE
+
+LC_MEASUREMENT
+copy "it_IT"
+END LC_MEASUREMENT
+
+LC_NAME
+copy "ca_ES"
+END LC_NAME
+
+LC_ADDRESS
+copy "it_IT"
+END LC_ADDRESS
index 720842d96fdd2185decff78e0005b9552f055cca..a4f297e4b30504414e2280ba45b52bfd998d8494 100644 (file)
@@ -2434,7 +2434,7 @@ abmon             "<U006C><U0065><U0064>";/
 %              "<U004E><U006F><U0076>";/
 %              "<U0044><U0065><U0063>"
 
-%week          ???
+week           7;19971201;4
 
 d_t_fmt                "<U0025><U0061><U00A0><U0025><U0065><U002E><U00A0><U0025><U0042><U00A0><U0025><U0059><U002C><U00A0><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U00A0><U0025><U005A>"
 
index 96d44b5ee4fc47f34d782861c8c00d7faf70f242..84963b56fdcfc7c6b85baade2925a4369da1b459 100644 (file)
@@ -62,7 +62,7 @@ LC_MONETARY
 int_curr_symbol           "<U0043><U0048><U0046><U0020>"
 currency_symbol           "<U0046><U0072><U002E>"
 mon_decimal_point         "<U002E>"
-mon_thousands_sep         "<U0020>"
+mon_thousands_sep         "<U0027>"
 mon_grouping              3;3
 positive_sign             ""
 negative_sign             "<U002D>"
@@ -78,7 +78,7 @@ END LC_MONETARY
 
 LC_NUMERIC
 decimal_point             "<U002E>"
-thousands_sep             "<U0020>"
+thousands_sep             "<U0027>"
 grouping                  3;3
 END LC_NUMERIC
 
index b2ad72d5ce7f00c5d41fd59c5b5c47601518a095..55004842858199624f4cdf8ff25caff81207db26 100644 (file)
@@ -81,7 +81,7 @@ day   "<U0053><U0075><U006E><U0064><U0061><U0079>";/
        "<U0046><U0072><U0069><U0064><U0061><U0079>";/
        "<U0053><U0061><U0074><U0075><U0072><U0064><U0061><U0079>"
 
-week    7;19971201;4
+week    7;19971130;7
 abmon  "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
        "<U004D><U0061><U0072>";"<U0041><U0070><U0072>";/
        "<U004D><U0061><U0079>";"<U004A><U0075><U006E>";/
index 6e0c232bc2ae8a1c1fd029b0dfc3ee1871effa57..51da395c022a35e38fe06629f27c047659c18c2a 100644 (file)
@@ -8,8 +8,8 @@ comment_char  %
 % Fax: +27 12 3430389
 % Language: en
 % Territory: ZA
-% Revision: 1.2
-% Date: 2003-10-27
+% Revision: 1.2.1
+% Date: 2005-10-13
 % Users: general
 % Repertoiremap: mnemonic,ds
 % Charset: ISO-8859-1
@@ -17,6 +17,9 @@ comment_char  %
 % for commercial purposes.
 %
 % Changelog
+% 1.2.1 (2005-10-13):
+%     2005-10-12 Dwayne Bailey <dwayne@translate.org.za>
+%       - Update contact information
 % 1.2 (2004-10-27):
 %     2004-10-27 Dwayne Bailey <dwayne@translate.org.za>
 %       - Remove .* from LC_MESSAGES yes/noexpr
@@ -45,15 +48,15 @@ source     "Zuza Software Foundation (Translate.org.za)"
 address    "Box 28364, Sunnyside, 0132, South Africa"
 contact    "Dwayne Bailey"
 email      "dwayne@translate.org.za"
-tel        "+27 12 343 0389"
-fax        "+27 12 343 0389"
+tel        "+27 12 460 1095"
+fax        "+27 12 460 1095"
 language   "English"
 territory  "South Africa"
 % audience     ""
 % application  ""
 abbreviation "Translate.org.za"
-revision   "1.2"
-date       "2003-10-27"
+revision   "1.2.1"
+date       "2005-10-13"
 %
 category  "en_ZA:2003";LC_IDENTIFICATION
 category  "en_ZA:2000";LC_CTYPE
diff --git a/localedata/locales/nr_ZA b/localedata/locales/nr_ZA
new file mode 100644 (file)
index 0000000..916a3fa
--- /dev/null
@@ -0,0 +1,281 @@
+escape_char  /
+comment_char  %
+
+% Charset: UTF-8
+
+% ChangeLog
+% 0.3 (2005-10-13):
+%     2005-10-12 Dwayne Bailey <dwayne@translate.org.za>
+%       - Added 'Charset: UTF-8' information
+%       - Update contact information
+%       - Allign spellings of month and weekday names with Dept. of
+%         Art and Culture's: Multilingual Mathematics Dictionary
+% 0.2 (2004-11-09):
+%     2004-11-09 Dwayne Bailey <dwayne@translate.org.za>
+%       - <UNNNN> escape everything
+%       - Update all contact information
+%       - Change %d to %-e for d_t_fmt and date_fmt
+%       - Reset yes/noexpr to English
+%       - set all abmon, mon, abday, day to English until correct defintions
+%         are available.
+%     2004-03-30 Dwayne Bailey <dwayne@translate.org.za>
+%       - Added country_ab2/3, country_num
+%     2004-02-27 Dwayne Bailey <dwayne@translate.org.za>
+%          - Correct capatilisation of lang_name
+% 0.1 (2004-02-24):
+%       - Initial Southern Ndebele locale for South Africa
+%         by Zuza Software Foundation
+
+LC_IDENTIFICATION
+title      "Southern Ndebele locale for South Africa"
+source     "Zuza Software Foundation (Translate.org.za)"
+address    "PO Box 28364, Sunnyside, 0132, South Africa"
+contact    "Dwayne Bailey"
+email      "dwayne@translate.org.za"
+tel        "+27 12 460 1095"
+fax        "+27 12 460 1095"
+language   "Southern Ndebele"
+territory  "South Africa"
+revision   "0.3"
+date       "2005-10-13"
+%
+category  "nr_ZA:2004";LC_IDENTIFICATION
+category  "nr_ZA:2004";LC_CTYPE
+category  "nr_ZA:2004";LC_COLLATE
+category  "nr_ZA:2004";LC_TIME
+category  "nr_ZA:2004";LC_NUMERIC
+category  "nr_ZA:2004";LC_MONETARY
+category  "nr_ZA:2004";LC_MESSAGES
+category  "nr_ZA:2004";LC_PAPER
+category  "nr_ZA:2004";LC_NAME
+category  "nr_ZA:2004";LC_ADDRESS
+category  "nr_ZA:2004";LC_TELEPHONE
+category  "nr_ZA:2004";LC_MEASUREMENT
+
+END LC_IDENTIFICATION
+
+LC_CTYPE
+% Use the characters described in the charmap file "i18n.tgz"
+copy "i18n"
+END LC_CTYPE
+
+LC_COLLATE
+% Copy the template from ISO/IEC 14651 i.e.
+% use the rules there when making ordered lists of words.
+copy "iso14651_t1"
+END LC_COLLATE
+
+LC_MONETARY
+copy "en_ZA"
+END LC_MONETARY
+
+LC_NUMERIC
+copy "en_ZA"
+END LC_NUMERIC
+
+LC_TIME
+
+% abday - The abbreviations for the week days:
+% - Son, Mvu, Bil, Tha, Ne, Hla, Gqi
+abday       "<U0053><U006F><U006E>";"<U004D><U0076><U0075>";/
+            "<U0042><U0069><U006C>";"<U0054><U0068><U0061>";/
+            "<U004E><U0065>";"<U0048><U006C><U0061>";/
+            "<U0047><U0071><U0069>"
+% day - The full names of the week days:
+% - uSonto, uMvulo, uLesibili, lesithathu, uLesine, ngoLesihlanu, umGqibelo
+day         "<U0075><U0053><U006F><U006E><U0074><U006F>";/
+            "<U0075><U004D><U0076><U0075><U006C><U006F>";/
+            "<U0075><U004C><U0065><U0073><U0069><U0062><U0069><U006C><U0069>";/
+            "<U006C><U0065><U0073><U0069><U0074><U0068><U0061><U0074><U0068><U0075>";/
+            "<U0075><U004C><U0065><U0073><U0069><U006E><U0065>";/
+            "<U006E><U0067><U006F><U004C><U0065><U0073><U0069><U0068><U006C><U0061><U006E><U0075>";/
+            "<U0075><U006D><U0047><U0071><U0069><U0062><U0065><U006C><U006F>"
+% abmon - The abbreviations for the months 
+% - Jan, Feb, Mat, Apr, Mey, Jun, Jul, Arh, Sep, Okt, Usi, Dis
+abmon       "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
+            "<U004D><U0061><U0074>";"<U0041><U0070><U0072>";/
+            "<U004D><U0065><U0079>";"<U004A><U0075><U006E>";/
+            "<U004A><U0075><U006C>";"<U0041><U0072><U0068>";/
+            "<U0053><U0065><U0070>";"<U004F><U006B><U0074>";/
+            "<U0055><U0073><U0069>";"<U0044><U0069><U0073>"
+% mon - The full names of the months - 
+% - Janabari, uFeberbari, uMatjhi, u-Apreli, Meyi, Juni
+%   Julayi, Arhostosi, Septemba, Oktoba, Usinyikhaba, Disemba
+mon         "<U004A><U0061><U006E><U0061><U0062><U0061><U0072><U0069>";/
+            "<U0075><U0046><U0065><U0062><U0065><U0072><U0062><U0061><U0072><U0069>";/
+            "<U0075><U004D><U0061><U0074><U006A><U0068><U0069>";/
+            "<U0075><U002D><U0041><U0070><U0072><U0065><U006C><U0069>";/
+            "<U004D><U0065><U0079><U0069>";/
+            "<U004A><U0075><U006E><U0069>";/
+            "<U004A><U0075><U006C><U0061><U0079><U0069>";/
+            "<U0041><U0072><U0068><U006F><U0073><U0074><U006F><U0073><U0069>";/
+            "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0061>";/
+            "<U004F><U006B><U0074><U006F><U0062><U0061>";/
+            "<U0055><U0073><U0069><U006E><U0079><U0069><U006B><U0068><U0061><U0062><U0061>";/
+            "<U0044><U0069><U0073><U0065><U006D><U0062><U0061>"
+
+% Abreviated date and time representation to be referenced by the "%c" field descriptor -
+d_t_fmt     "<U0025><U0061><U0020><U0025><U002D><U0065><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
+%
+% "%a" (short weekday name),
+% "%-e" (day of month as a decimal number),
+% "%b" (short month name),
+% "%Y" (year with century as a decimal number),
+% "%T" (24-hour clock time in format HH:MM:SS),
+% "%Z" (Time zone name)
+% Date representation to be referenced by the "%x" field descriptor -
+d_fmt   "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0059>"
+% "%d/%m/%Y", day/month/year as decimal numbers (01/01/2000).
+% Time representation to be referenced by the "%X" field descriptor -
+t_fmt       "<U0025><U0054>"
+% "%T" (24-hour clock time in format HH:MM:SS)
+% Define representation of ante meridiem and post meridiem strings -
+am_pm       "";""
+% The "" mean 'default to "AM" and "PM".
+% Define time representation in 12-hour format with "am_pm", to be referenced by the "%r"
+t_fmt_ampm  ""
+% The "" means that this format is not supported.
+% Date representation not described in ISO/IEC 14652. Comes out as -
+% "%a %b %-e %H:%M:%S %Z %Y" which is default "date" command output
+date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U002D><U0065>/
+<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
+<U0025><U005A><U0020><U0025><U0059>"
+%
+% %a - abbreviated weekday name,
+% %b - abreviated month name,
+% %-e - day of month as a decimal number with leading space (1 to 31),
+% %H - hour (24-hour clock) as a decimal number (00 to 23),
+% %M - minute as a decimal number (00 to 59),
+% %S - seconds as a decimal number (00 to 59),
+% %Z - time-zone name,
+% %Y - year with century as a decimal number,e.g. 2001.
+END LC_TIME
+
+LC_MESSAGES
+% FIXME: Check both of these
+% The affirmative response - TODO
+% "^[yY]"
+yesexpr     "<U005E><U005B><U0079><U0059><U005D>"
+
+% The negative response - TODO
+% "^[nN]"
+noexpr      "<U005E><U005B><U006E><U004E><U005D>"
+END LC_MESSAGES
+
+LC_PAPER
+copy "en_ZA"
+END LC_PAPER
+
+LC_TELEPHONE
+copy "en_ZA"
+END LC_TELEPHONE
+
+LC_MEASUREMENT
+copy "en_ZA"
+END LC_MEASUREMENT
+
+LC_NAME
+% Format for addressing a person.
+name_fmt    "<U0025><U0064><U0025><U0074><U0025><U0067><U0025><U0074>/
+<U0025><U006D><U0025><U0074><U0025><U0066>"
+% "%d%t%g%t%m%t%f"
+% "Salutation",
+% "Empty string, or <Space>",
+% "First given name",
+% "Empty string, or <Space>",
+% "Middle names",
+% "Empty string, or <Space>",
+% "Clan names"
+% FIXME - define all the following name_*
+% General salutation for any sex
+% name_gen    ""
+
+% Salutation for unmarried females - ""
+% name_miss   ""
+% Salutation for males - ""
+% name_mr     ""
+
+% Salutation for married females - ""
+% name_mrs    ""
+
+% Salutation valid for all females - "" (no term)
+% name_ms     ""
+
+END LC_NAME
+
+LC_ADDRESS
+% Country name in Southern Ndebele - "iSewula Afrika"
+country_name "<U0069><U0053><U0065><U0077><U0075><U006C><U0061><U0020><U0041><U0066><U0072><U0069><U006B><U0061>"
+% Abbreviated country postal name - "ZA"
+country_post "<U005A><U0041>"
+% UN Geneve 1949:68 Distinguishing signs of vehicles in international traffic
+% http://www.unece.org/trans/conventn/disting-signs-5-2001.pdf
+% "ZA"
+country_car   "<U005A><U0041>"
+
+% FIXME define the following correctly
+% country_isbn ""
+% country_num 
+% Language name in Southern Ndebele - "IsiNdebele"
+lang_name "<U0049><U0073><U0069><U004E><U0064><U0065><U0062><U0065><U006C><U0065>"
+
+% ISO 639 two and three letter language names
+% see http://www.loc.gov/standards/iso639-2/englangn.html
+% "nr", "nbl"
+lang_ab   "<U006E><U0072>"
+lang_term "<U006E><U0062><U006C>"
+% Representation of postal addresses (minus the addressee's name) in South
+% Africa. (Ignored for now)
+postal_fmt    "<U0025><U0066><U0025><U004E><U0025><U0061><U0025><U004E>/
+<U0025><U0064><U0025><U004E><U0025><U0062><U0025><U004E><U0025><U0073>/
+<U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025>/
+<U004E><U0025><U0025><U007A><U0020><U0025><U0054><U0025>/
+<U004E><U0025><U0063><U0025><U004E>"
+% "%f%N%a%N%d%N%b%N%s %h %e %r%N%%z %T%N%c%N", which gives -
+% "firm name",
+% "end of line",
+% "C/O address",
+% "end of line",
+% "department name",
+% "Building name",
+% "end of line",
+% "street or block name",
+% "space",
+% "house number or designation",
+% "space",
+% "floor number",
+% "space",
+% "room number, door designation",
+% "end of line",
+% "postal code",
+% "space",
+% "town, city",
+% "end of line",
+% "country designation for the <country_post> keyword",
+% "end of line
+%
+
+% ISO 3166 country number and 2 and 3 letter abreviations
+% http://www.unicode.org/onlinedat/countries.html
+% "ZA", "ZAF"
+country_num   710
+country_ab2   "<U005A><U0041>"
+country_ab3   "<U005A><U0041><U0046>"
+
+END LC_ADDRESS
+
diff --git a/localedata/locales/pa_PK b/localedata/locales/pa_PK
new file mode 100644 (file)
index 0000000..fcc78a0
--- /dev/null
@@ -0,0 +1,187 @@
+comment_char %
+escape_char  /
+%
+% Punjabi (Shamukhi) Language Locale for Pakistan
+% Source:
+% Contact: Amanpreet Singh Alam
+% Email: amanpreetalam@yahoo.com
+% Language: pa
+% Territory: PK
+% Revision: 0.1
+% Date: 2005-12-31
+% Users: general
+% Charset: UTF-8
+% Distribution and use is free, also
+% for commercial purposes.
+
+LC_IDENTIFICATION
+title      "Punjabi (Shahmukhi) Language Locale for Pakistan"
+source     ""
+address    ""
+contact    ""
+email      "bug-glibc-locales@gnu.org"
+tel        ""
+fax        ""
+language   "Punjabi (Shahmukhi)"
+territory  "Pakistan"
+revision   "0.3"
+date       "2000-07-11"
+%
+category  "pa_PK:2000";LC_IDENTIFICATION
+category  "pa_PK:2000";LC_CTYPE
+category  "pa_PK:2000";LC_COLLATE
+category  "pa_PK:2000";LC_TIME
+category  "pa_PK:2000";LC_NUMERIC
+category  "pa_PK:2000";LC_MONETARY
+category  "pa_PK:2000";LC_MESSAGES
+category  "pa_PK:2000";LC_PAPER
+category  "pa_PK:2000";LC_NAME
+category  "pa_PK:2000";LC_ADDRESS
+category  "pa_PK:2000";LC_TELEPHONE
+
+END LC_IDENTIFICATION
+
+LC_CTYPE
+copy "i18n"
+translit_start
+include "translit_combining";""
+
+% those two lettes are not in cp1256...
+
+% Maddah above -> Alef with madda above
+<U0653> "<U0622>"
+% Farsi yeh -> yeh
+<U06CC> "<U064A>"
+
+translit_end
+END LC_CTYPE
+
+LC_COLLATE
+copy "en_DK"
+END LC_COLLATE
+
+LC_MONETARY
+copy "ur_PK"
+END LC_MONETARY
+
+LC_NUMERIC
+copy "ur_PK"
+END LC_NUMERIC
+
+% Since their is no abbreviated version of the days in urdu I have used the
+% full names of the days
+% Using only the first letters of the day would have caused a conflict here
+% as both "Jumairat(Thurs)" and "Juma(Friday)" have the same starting letter
+% Jeem <U062C>
+LC_TIME
+
+abday   "<U0627><U062A><U0648><U0627><U0631>";/
+       "<U067E><U064A><U0631>";/
+       "<U0645><U0646><U06AF><U0644>";/
+       "<U0628><U062F><U06BE>";/
+       "<U062C><U0645><U0639><U0631><U0627><U062A>";/
+       "<U062C><U0645><U0639><U0647>";/
+       "<U0647><U0641><U062A><U0647>"
+day    "<U0627><U062A><U0648><U0627><U0631>";/
+       "<U067E><U064A><U0631>";/
+       "<U0645><U0646><U06AF><U0644>";/
+       "<U0628><U062F><U06BE>";/
+       "<U062C><U0645><U0639><U0631><U0627><U062A>";/
+       "<U062C><U0645><U0639><U0647>";/
+       "<U0647><U0641><U062A><U0647>"
+abmon  "<U062C><U0646><U0648><U0631><U064A>";/
+       "<U0641><U0631><U0648><U0631><U064A>";/
+       "<U0645><U0627><U0631><U0686>";/
+       "<U0627><U067E><U0631><U064A><U0644>";/
+       "<U0645><U0653><U06CC>";/
+       "<U062C><U0648><U0646>";/
+       "<U062C><U0648><U0644><U0627><U064A>";/
+       "<U0627><U06AF><U0633><U062A>";/
+       "<U0633><U062A><U0645><U0628><U0631>";/
+       "<U0627><U0643><U062A><U0648><U0628><U0631>";/
+       "<U0646><U0648><U0645><U0628><U0631>";/
+       "<U062F><U0633><U0645><U0628><U0631>"
+mon    "<U062C><U0646><U0648><U0631><U064A>";/
+       "<U0641><U0631><U0648><U0631><U064A>";/
+       "<U0645><U0627><U0631><U0686>";/
+       "<U0627><U067E><U0631><U064A><U0644>";/
+       "<U0645><U0653><U06CC>";/
+       "<U062C><U0648><U0646>";/
+       "<U062C><U0648><U0644><U0627><U064A>";/
+       "<U0627><U06AF><U0633><U062A>";/
+       "<U0633><U062A><U0645><U0628><U0631>";/
+       "<U0627><U0643><U062A><U0648><U0628><U0631>";/
+       "<U0646><U0648><U0645><U0628><U0631>";/
+       "<U062F><U0633><U0645><U0628><U0631>"
+
+% Date Time Format
+d_t_fmt "<U0648><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U005A><U0020><U062A><U0020><U0025><U0064><U0020><U0025><U0042><U0020><U0025><U0059>"
+
+% date Format. I have put this in reverse order to try to get the date
+% in R->L order
+d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0059>"
+
+% time format
+t_fmt "<U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053>"
+
+%<U0635> stands for <U0635><U0628><U062D>
+%<U0634> stands for <U0634><U0627><U0645>
+am_pm "<U0635>";"<U0634>"
+
+%time format in 12 hour clock
+t_fmt_ampm "<U0025><U0050><U0020><U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>"
+
+% display columns right to left ?
+cal_direction  3
+END LC_TIME
+
+LC_MESSAGES
+
+% locale based messages
+% Can we put in the values for a cancel exression here?? I found a term that
+% would define cancel appropriately
+% <U0647> = <U0647><U0627><U06BA> , the last tag is for noon-ghunna!
+% <U0628> = <U0628><U0644><U0643><U0644>
+% again <U0066> and <U006F> are place holders
+% <U0646> = <U0646><U0647><U064A><U06BA>
+yesstr "<U0628><U0644><U0643><U0644>"
+nostr  "<U0646><U0647><U064A><U06BA>"
+yesexpr        "<U005E><U005B><U0079><U0059><U0647><U0628><U0066><U005D><U002E><U002A>"
+noexpr "<U005E><U005B><U006E><U004E><U0646><U006F><U005D><U002E><U002A>"
+
+END LC_MESSAGES
+
+%Draft Finished: 17:00 09/07/2000
+
+LC_PAPER
+copy "ur_PK"
+END LC_PAPER
+
+LC_MEASUREMENT
+copy "ur_PK"
+END LC_MEASUREMENT
+
+LC_NAME
+% FIXME
+copy "ur_PK"
+END LC_NAME
+
+LC_ADDRESS
+% FIXME
+postal_fmt    "<U0025><U0061><U0025><U004E><U0025><U0066><U0025><U004E>/
+<U0025><U0064><U0025><U004E><U0025><U0062><U0025><U004E><U0025><U0068>/
+<U0020><U0025><U0073><U0020><U0025><U0065><U0020><U0025><U0072><U0025>/
+<U004E><U0025><U0025><U0054><U0020><U0025><U007A><U0025>/
+<U004E><U0025><U0063><U0025><U004E>"
+
+country_ab2 "<U0050><U004B>"
+country_ab3 "<U0050><U0041><U004B>"
+country_num 586
+END LC_ADDRESS
+
+LC_TELEPHONE
+% Changed from ur_PK as that Locale just copy from en_DK, which is not suitable to Punjabi (Shahmukhi) ISD 92
+tel_int_fmt "<U002B><U0025><U0063><U0020><U003B><U0025><U0061><U0020><U003B><U0025><U006C>"
+int_prefix "<U0039><U0032>"
+int_select "<U0030><U0030>"
+END LC_TELEPHONE
index 0c820683c852d348501073f0cb5354b99e8ce462..8c0d470ecfe7127d8df15a7485c723f3a6d7fb2f 100644 (file)
@@ -2183,6 +2183,7 @@ t_fmt_ampm ""
 date_fmt       "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
 <U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
 <U0025><U005A><U0020><U0025><U0059>"
+week   7;19971201;4
 END LC_TIME
 
 LC_PAPER
index 8b53b0c62fa5cd47a96e4e65860434895bcccc17..28863fa9353e6a237b2571821488cd80a34213f6 100644 (file)
@@ -179,6 +179,8 @@ date_fmt       "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
 <U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
 <U0025><U005A><U0020><U0025><U0059>"
 
+week           7;19971201;4
+
 END LC_TIME
 
 %% END OF LOCALIZATION FILE for sk_SK.ISO-8859-2
index 798de4cf6627ba512536684c702dd92c28257c7e..d36eb9ab2c4effdd6a29022be25a480136d8e68e 100644 (file)
@@ -1,7 +1,15 @@
 escape_char  /
 comment_char  %
 
+% Charset: UTF-8
+
 % ChangeLog
+% 0.3 (2005-10-13):
+%    2005-10-12 Dwayne Bailey <dwayne@translate.org.za>
+%      - Added 'Charset: UTF-8' information
+%      - Update contact information
+%      - Allign spellings of month and weekday names with Dept. of
+%        Art and Culture's: Multilingual Mathematics Dictionary
 % 0.2 (2004-11-03):
 %    2004-11-02 Dwayne Bailey <dwayne@translate.org.za>
 %      - Change all contact information
@@ -22,12 +30,12 @@ source     "Zuza Software Foundation (Translate.org.za)"
 address    "PO Box 28364, Sunnyside, 0132, South Africa"
 contact    "Dwayne Bailey"
 email      "dwayne@translate.org.za"
-tel        "+27 12 343 0389"
-fax        "+27 12 343 0389"
+tel        "+27 12 460 1095"
+fax        "+27 12 460 1095"
 language   "Sotho"
 territory  "South Africa"
-revision   "0.2"
-date       "2004-11-03"
+revision   "0.3"
+date       "2005-10-13"
 %
 category  "st_ZA:2003";LC_IDENTIFICATION
 category  "st_ZA:2003";LC_CTYPE
@@ -76,38 +84,38 @@ abday       "<U0053><U006F><U006E>";/
             "<U004D><U006F><U0071>"
  
 % day - The full names of the week days:
-% - Sontaha, Mmantaha, Labobedi, Laboraru, Labone, Labohlane, Moqebelo
+% - Sontaha, Mantaha, Labobedi, Laboraro, Labone, Labohlano, Moqebelo
 day         "<U0053><U006F><U006E><U0074><U0061><U0068><U0061>";/
-            "<U004D><U006D><U0061><U006E><U0074><U0061><U0068><U0061>";/
+            "<U004D><U0061><U006E><U0074><U0061><U0068><U0061>";/
             "<U004C><U0061><U0062><U006F><U0062><U0065><U0064><U0069>";/
-            "<U004C><U0061><U0062><U006F><U0072><U0061><U0072><U0075>";/
+            "<U004C><U0061><U0062><U006F><U0072><U0061><U0072><U006F>";/
             "<U004C><U0061><U0062><U006F><U006E><U0065>";/
-            "<U004C><U0061><U0062><U006F><U0068><U006C><U0061><U006E><U0065>";/
+            "<U004C><U0061><U0062><U006F><U0068><U006C><U0061><U006E><U006F>";/
             "<U004D><U006F><U0071><U0065><U0062><U0065><U006C><U006F>"
  
 % abmon - The abbreviations for the months 
-% - Phe, Kol, Ube, Mme, Mot, Jan, Upu, Pha, Leo, Mph, Pun, Tsh
-abmon       "<U0050><U0068><U0065>";"<U004B><U006F><U006C>";/
-            "<U0055><U0062><U0065>";"<U004D><U006D><U0065>";/
+% - Phe, Hla, Tlh, Mme, Mot, Jan, Upu, Pha, Leo, Mph, Pud, Tsh
+abmon       "<U0050><U0068><U0065>";"<U0048><U006C><U0061>";/
+            "<U0054><U006C><U0048>";"<U004D><U006D><U0065>";/
             "<U004D><U006F><U0074>";"<U004A><U0061><U006E>";/
             "<U0055><U0070><U0075>";"<U0050><U0068><U0061>";/
             "<U004C><U0065><U006F>";"<U004D><U0070><U0068>";/
-            "<U0050><U0075><U006E>";"<U0054><U0073><U0068>"
+            "<U0050><U0075><U0064>";"<U0054><U0073><U0068>"
  
 % mon - The full names of the months - 
-% - Phesekgong, Hlakola, Hlakubele, Mmese, Motsheanong, Phupjane, 
-%   Phupu, Phata, Leotshe, Mphalane, Pundungwane, Tshitwe
-mon         "<U0050><U0068><U0065><U0073><U0065><U006B><U0067><U006F><U006E><U0067>";/
+% - Pherekgong, Hlakola, Tlhakubele, Mmese, Motsheanong, Phupjane, 
+%   Phupu, Phato, Leotse, Mphalane, Pudungwana, Tshitwe
+mon         "<U0050><U0068><U0065><U0072><U0065><U006B><U0067><U006F><U006E><U0067>";/
             "<U0048><U006C><U0061><U006B><U006F><U006C><U0061>";/
-            "<U0048><U006C><U0061><U006B><U0075><U0062><U0065><U006C><U0065>";/
+            "<U0054><U006C><U0068><U0061><U006B><U0075><U0062><U0065><U006C><U0065>";/
             "<U004D><U006D><U0065><U0073><U0065>";/
             "<U004D><U006F><U0074><U0073><U0068><U0065><U0061><U006E><U006F><U006E><U0067>";/
             "<U0050><U0068><U0075><U0070><U006A><U0061><U006E><U0065>";/
             "<U0050><U0068><U0075><U0070><U0075>";/
-            "<U0050><U0068><U0061><U0074><U0061>";/
-            "<U004C><U0065><U006F><U0074><U0073><U0068><U0065>";/
+            "<U0050><U0068><U0061><U0074><U006F>";/
+            "<U004C><U0065><U006F><U0074><U0073><U0065>";/
             "<U004D><U0070><U0068><U0061><U006C><U0061><U006E><U0065>";/
-            "<U0050><U0075><U006E><U0064><U0075><U006E><U0067><U0077><U0061><U006E><U0065>";/
+            "<U0050><U0075><U0064><U0075><U006E><U0067><U0077><U0061><U006E><U0061>";/
             "<U0054><U0073><U0068><U0069><U0074><U0077><U0065>"
  
 % Abreviated date and time representation to be referenced by the "%c" field descriptor -
index 969d4ef76603aba76f71e78077ee4a61984201d9..29be5dcd5e994c687ca9449d712761217f043f3b 100644 (file)
@@ -233,8 +233,8 @@ mon_thousands_sep     "<U002E>"
 mon_grouping          3;3
 positive_sign         ""
 negative_sign         "<U002D>"
-int_frac_digits       4
-frac_digits           4
+int_frac_digits       0
+frac_digits           0
 p_cs_precedes         0
 p_sep_by_space        0
 n_cs_precedes         1
@@ -264,19 +264,19 @@ day      "<U0043><U0068><U1EE7><U0020><U006E><U0068><U1EAD><U0074>";/
          "<U0054><U0068><U1EE9><U0020><U006E><U0103><U006D>";/
          "<U0054><U0068><U1EE9><U0020><U0073><U00E1><U0075>";/
          "<U0054><U0068><U1EE9><U0020><U0062><U1EA3><U0079>"
-abmon    "<U0054><U0068><U0031>";/
-         "<U0054><U0068><U0032>";/
-         "<U0054><U0068><U0033>";/
-         "<U0054><U0068><U0034>";/
-         "<U0054><U0068><U0035>";/
-         "<U0054><U0068><U0036>";/
-         "<U0054><U0068><U0037>";/
-         "<U0054><U0068><U0038>";/
-         "<U0054><U0068><U0039>";/
+abmon    "<U0054><U0068><U0030><U0031>";/
+         "<U0054><U0068><U0030><U0032>";/
+         "<U0054><U0068><U0030><U0033>";/
+         "<U0054><U0068><U0030><U0034>";/
+         "<U0054><U0068><U0030><U0035>";/
+         "<U0054><U0068><U0030><U0036>";/
+         "<U0054><U0068><U0030><U0037>";/
+         "<U0054><U0068><U0030><U0038>";/
+         "<U0054><U0068><U0030><U0039>";/
          "<U0054><U0068><U0031><U0030>";/
          "<U0054><U0068><U0031><U0031>";/
          "<U0054><U0068><U0031><U0032>"
-mon      "<U0054><U0068><U00E1><U006E><U0067><U0020><U0067><U0069><U00EA><U006E><U0067>";/
+mon      "<U0054><U0068><U00E1><U006E><U0067><U0020><U006D><U1ED9><U0074>";/
          "<U0054><U0068><U00E1><U006E><U0067><U0020><U0068><U0061><U0069>";/
          "<U0054><U0068><U00E1><U006E><U0067><U0020><U0062><U0061>";/
          "<U0054><U0068><U00E1><U006E><U0067><U0020><U0074><U01B0>";/
@@ -286,12 +286,12 @@ mon      "<U0054><U0068><U00E1><U006E><U0067><U0020><U0067><U0069><U00EA><U006E>
          "<U0054><U0068><U00E1><U006E><U0067><U0020><U0074><U00E1><U006D>";/
          "<U0054><U0068><U00E1><U006E><U0067><U0020><U0063><U0068><U00ED><U006E>";/
          "<U0054><U0068><U00E1><U006E><U0067><U0020><U006D><U01B0><U1EDD><U0069>";/
-         "<U0054><U0068><U00E1><U006E><U0067><U0020><U006D><U1ED9><U0074>";/
-         "<U0054><U0068><U00E1><U006E><U0067><U0020><U0063><U0068><U1EA1><U0070>"
-d_t_fmt  "<U0025><U0041><U002C><U0020><U0025><U0064><U0020><U0025><U0042><U0020><U006E><U0103><U006D><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
+         "<U0054><U0068><U00E1><U006E><U0067><U0020><U006D><U01B0><U1EDD><U0069><U0020><U006D><U1ED9><U0074>";/
+         "<U0054><U0068><U00E1><U006E><U0067><U0020><U006D><U01B0><U1EDD><U0069><U0020><U0068><U0061><U0069>"
+d_t_fmt  "<U0025><U0041><U002C><U0020><U0025><U0064><U0020><U0025><U0042><U0020><U004E><U0103><U006D><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
 d_fmt    "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0059>"
 t_fmt    "<U0025><U0054>"
-am_pm    "<U0073><U00E1><U006E><U0067>";"<U0063><U0068><U0069><U1EC1><U0075>"
+am_pm    "<U0041><U004D>";"<U0050><U004D>"
 t_fmt_ampm  "<U0025><U0049><U003A><U0025><U004D><U0020><U0025><U0070>"
 date_fmt  "<U0025><U0041><U002C><U0020><U0025><U0064><U0020><U0025><U0042><U0020><U006E><U0103><U006D><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
 END LC_TIME
@@ -315,7 +315,7 @@ LC_NAME
 % LC_NAME category.
 %
 name_fmt    "<U0025><U0070><U0025><U0074><U0025><U0066><U0025><U0074>/
-<U0025><U0067>"
+<U0025><U006D><U0025><U0074><U0025><U0067>"
 name_gen    ""
 name_mr     "<U00D4><U002E>"
 name_mrs    "<U0042><U002E>"
index 806f87820bc11ac72218ca783bfa1fbb75ae62b8..1f61d17a8259c83e552a28f7201bf79e9dc635e5 100644 (file)
@@ -1,7 +1,15 @@
 escape_char  /
 comment_char  %
 
+% Charset: UTF-8
+
 % ChangeLog
+% 0.3 (2005-10-13):
+%     2005-10-12 Dwayne Bailey <dwayne@translate.org.za>
+%       - Added 'Charset: UTF-8' information
+%       - Update contact information
+%       - Allign spellings of month and weekday names with Dept. of
+%         Art and Culture's: Multilingual Mathematics Dictionary
 % 0.2 (2004-11-02):
 %     2004-11-01 Dwayne Bailey <dwayne@translate.org.za>
 %       - Change all contact information
@@ -24,12 +32,12 @@ source     "Zuza Software Foundation (Translate.org.za)"
 address    "PO Box 28364, Sunnyside, 0132, South Africa"
 contact    "Dwayne Bailey"
 email      "dwayne@translate.org.za"
-tel        "+27 12 343 8389"
-fax        "+27 12 343 0389"
+tel        "+27 12 460 1095"
+fax        "+27 12 460 1095"
 language   "Xhosa"
 territory  "South Africa"
-revision   "0.2"
-date       "2004-11-02"
+revision   "0.3"
+date       "2005-10-13"
 %
 category  "xh_ZA:2003";LC_IDENTIFICATION
 category  "xh_ZA:2003";LC_CTYPE
@@ -77,39 +85,39 @@ abday       "<U0043><U0061><U0077>";/
             "<U004D><U0067><U0071>"
 %
 % The full names of the week days:
-% - Cawe, Mvulo, Lwesibini, Lwesithathu, Lwesine, Lwesihlanu, Mgqibelo
-day         "<U0043><U0061><U0077><U0065>";/
-            "<U004D><U0076><U0075><U006C><U006F>";/
-            "<U004C><U0077><U0065><U0073><U0069><U0062><U0069><U006E><U0069>";/
-            "<U004C><U0077><U0065><U0073><U0069><U0074><U0068><U0061><U0074><U0068><U0075>";/
-            "<U004C><U0077><U0065><U0073><U0069><U006E><U0065>";/
-            "<U004C><U0077><U0065><U0073><U0069><U0068><U006C><U0061><U006E><U0075>";/
-            "<U004D><U0067><U0071><U0069><U0062><U0065><U006C><U006F>"
+% - iCawa, uMvulo, lwesiBini, lwesiThathu, ulweSine, lwesiHlanu, uMgqibelo
+day         "<U0069><U0043><U0061><U0077><U0061>";/
+            "<U0075><U004D><U0076><U0075><U006C><U006F>";/
+            "<U006C><U0077><U0065><U0073><U0069><U0042><U0069><U006E><U0069>";/
+            "<U006C><U0077><U0065><U0073><U0069><U0054><U0068><U0061><U0074><U0068><U0075>";/
+            "<U0075><U006C><U0077><U0065><U0053><U0069><U006E><U0065>";/
+            "<U006C><U0077><U0065><U0073><U0069><U0048><U006C><U0061><U006E><U0075>";/
+            "<U0075><U004D><U0067><U0071><U0069><U0062><U0065><U006C><U006F>"
 %
 % The abbreviations for the months 
-% - Jan, Feb, Mat, Epr, Mey, Jun, Jul, Aga, Sep, Okt, Nov, Dis
-abmon       "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
-            "<U004D><U0061><U0074>";"<U0045><U0070><U0072>";/
-            "<U004D><U0065><U0079>";"<U004A><U0075><U006E>";/
-            "<U004A><U0075><U006C>";"<U0041><U0067><U0061>";/
-            "<U0053><U0065><U0070>";"<U004F><U006B><U0074>";/
-            "<U004E><U006F><U0076>";"<U0044><U0069><U0073>"
+% - Mqu, Mdu, Kwi, Tsh, Can, Sil, Kha, Thu, Msi, Dwa, Nka, Mng
+abmon       "<U004D><U0071><U0075>";"<U004D><U0064><U0075>";/
+            "<U004B><U0077><U0069>";"<U0054><U0073><U0068>";/
+            "<U0043><U0061><U006E>";"<U0053><U0069><U006C>";/
+            "<U004B><U0068><U0061>";"<U0054><U0068><U0075>";/
+            "<U004D><U0073><U0069>";"<U0044><U0077><U0061>";/
+            "<U004E><U006B><U0061>";"<U004D><U006E><U0067>"
 %
 % The full names of the months - 
-% - Janyuwari, Februwari, Matshi, Epreli, Meyi, Juni, Julayi, Agasti, Septemba,
-%   Okthoba, Novemba, Disemba
-mon         "<U004A><U0061><U006E><U0079><U0075><U0077><U0061><U0072><U0069>";/
-            "<U0046><U0065><U0062><U0072><U0075><U0077><U0061><U0072><U0069>";/
-            "<U004D><U0061><U0074><U0073><U0068><U0069>";/
-            "<U0045><U0070><U0072><U0065><U006C><U0069>";/
-            "<U004D><U0065><U0079><U0069>";/
-            "<U004A><U0075><U006E><U0069>";/
-            "<U004A><U0075><U006C><U0061><U0079><U0069>";/
-            "<U0041><U0067><U0061><U0073><U0074><U0069>";/
-            "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0061>";/
-            "<U004F><U006B><U0074><U0068><U006F><U0062><U0061>";/
-            "<U004E><U006F><U0076><U0065><U006D><U0062><U0061>";/
-            "<U0044><U0069><U0073><U0065><U006D><U0062><U0061>"
+% - eyoMqungu, eyoMdumba, eyoKwindla, uTshazimpuzi, uCanzibe, eyeSilimela
+%   eyeKhala, eyeThupa, eyoMsintsi, eyeDwarha, eyeNkanga, eyoMnga
+mon         "<U0065><U0079><U006F><U004D><U0071><U0075><U006E><U0067><U0075>";/
+            "<U0065><U0079><U006F><U004D><U0064><U0075><U006D><U0062><U0061>";/
+            "<U0065><U0079><U006F><U004B><U0077><U0069><U006E><U0064><U006C><U0061>";/
+            "<U0075><U0054><U0073><U0068><U0061><U007A><U0069><U006D><U0070><U0075><U007A><U0069>";/
+            "<U0075><U0043><U0061><U006E><U007A><U0069><U0062><U0065>";/
+            "<U0065><U0079><U0065><U0053><U0069><U006C><U0069><U006D><U0065><U006C><U0061>";/
+            "<U0065><U0079><U0065><U004B><U0068><U0061><U006C><U0061>";/
+            "<U0065><U0079><U0065><U0054><U0068><U0075><U0070><U0061>";/
+            "<U0065><U0079><U006F><U004D><U0073><U0069><U006E><U0074><U0073><U0069>";/
+            "<U0065><U0079><U0065><U0044><U0077><U0061><U0072><U0068><U0061>";/
+            "<U0065><U0079><U0065><U004E><U006B><U0061><U006E><U0067><U0061>";/
+            "<U0065><U0079><U006F><U004D><U006E><U0067><U0061>"
 %
 % Abreviated date and time representation to be referenced by the "%c" field descriptor -
 d_t_fmt     "<U0025><U0061><U0020><U0025><U002D><U0065><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
index 45da1e5b790e5a73dea6d73899469499251f01a2..9f95701199d0a46563d6541d753b72914c6fec58 100644 (file)
@@ -1,7 +1,15 @@
 escape_char  /
 comment_char  %
 
+% Charset: UTF-8
+
 % ChangeLog
+% 0.3 (2005-10-13):
+%     2005-10-12 Dwayne Bailey <dwayne@translate.org.za>
+%        - Added 'Charset: UTF-8' information
+%        - Update contact information
+%        - Allign spellings of month and weekday names with Dept. of
+%          Art and Culture's: Multilingual Mathematics Dictionary
 % 0.2 (2004-10-28):
 %     2004-10-28 Dwayne Bailey <dwayne@translate.org.za>
 %        - Added lang_lib
@@ -27,12 +35,12 @@ source     "Zuza Software Foundation (Translate.org.za)"
 address    "Box 28364, Sunnyside, 0132, South Africa"
 contact    "Dwayne Bailey"
 email      "dwayne@translate.org.za"
-tel        "+27 12 343 0389"
-fax        "+27 12 448 0389"
+tel        "+27 12 460 1095"
+fax        "+27 12 460 1095"
 language   "Zulu"
 territory  "South Africa"
-revision   "0.2"
-date       "2004-10-28"
+revision   "0.3"
+date       "2005-10-13"
 %
 category  "zu_ZA:2003";LC_IDENTIFICATION
 category  "zu_ZA:2003";LC_CTYPE
@@ -82,39 +90,39 @@ abday       "<U0053><U006F><U006E>";/
             "<U004D><U0067><U0071>"
  
 % day - The full names of the week days:
-% - Sonto, Msombuluko, Lwesibili, Lwesithathu, Lwesine, Lwesihlanu, Mgqibelo
-day         "<U0053><U006F><U006E><U0074><U006F>";/
-            "<U004D><U0073><U006F><U006D><U0062><U0075><U006C><U0075><U006B><U006F>";/
-            "<U004C><U0077><U0065><U0073><U0069><U0062><U0069><U006C><U0069>";/
-            "<U004C><U0077><U0065><U0073><U0069><U0074><U0068><U0061><U0074><U0068><U0075>";/
-            "<U004C><U0077><U0065><U0073><U0069><U006E><U0065>";/
-            "<U004C><U0077><U0065><U0073><U0069><U0068><U006C><U0061><U006E><U0075>";/
-            "<U004D><U0067><U0071><U0069><U0062><U0065><U006C><U006F>"
+% - iSonto, uMsombuluko, uLwesibili, uLwesithathu, uLwesine, uLwesihlanu, uMgqibelo
+day         "<U0069><U0053><U006F><U006E><U0074><U006F>";/
+            "<U0075><U004D><U0073><U006F><U006D><U0062><U0075><U006C><U0075><U006B><U006F>";/
+            "<U0075><U004C><U0077><U0065><U0073><U0069><U0062><U0069><U006C><U0069>";/
+            "<U0075><U004C><U0077><U0065><U0073><U0069><U0074><U0068><U0061><U0074><U0068><U0075>";/
+            "<U0075><U004C><U0077><U0065><U0073><U0069><U006E><U0065>";/
+            "<U0075><U004C><U0077><U0065><U0073><U0069><U0068><U006C><U0061><U006E><U0075>";/
+            "<U0075><U004D><U0067><U0071><U0069><U0062><U0065><U006C><U006F>"
  
 % abmon - The abbreviations for the months 
-% - Jan, Feb, Mas, Apr, Mey, Jun, Jul, Aga, Sep, Okt, Nov, Dis
-abmon       "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
-            "<U004D><U0061><U0073>";"<U0041><U0070><U0072>";/
-            "<U004D><U0065><U0079>";"<U004A><U0075><U006E>";/
-            "<U004A><U0075><U006C>";"<U0041><U0067><U0061>";/
-            "<U0053><U0065><U0070>";"<U004F><U006B><U0074>";/
-            "<U004E><U006F><U0076>";"<U0044><U0069><U0073>"
+% - Mas, Ola, Nda, Mba, Aba, Ang, Ntu, Ncw, Man, Mfu, Lwe, Zib
+abmon       "<U004D><U0061><U0073>";"<U004F><U006C><U0061>";/
+            "<U004E><U0064><U0061>";"<U004D><U0062><U0061>";/
+            "<U0041><U0062><U0061>";"<U0041><U006E><U0067>";/
+            "<U004E><U0074><U0075>";"<U004E><U0063><U0077>";/
+            "<U004D><U0061><U006E>";"<U004D><U0066><U0075>";/
+            "<U004C><U0077><U0065>";"<U005A><U0069><U0062>"
  
 % mon - The full names of the months - 
-% - Januwari, Februwari, Mashi, Apreli, Meyi, Juni, Julayi, Agasti, Septemba,
-%   Okthoba, Novemba, Disemba 
-mon         "<U004A><U0061><U006E><U0075><U0077><U0061><U0072><U0069>";/
-            "<U0046><U0065><U0062><U0072><U0075><U0077><U0061><U0072><U0069>";/
-            "<U004D><U0061><U0073><U0068><U0069>";/
-            "<U0041><U0070><U0072><U0065><U006C><U0069>";/
-            "<U004D><U0065><U0079><U0069>";/
-            "<U004A><U0075><U006E><U0069>";/
-            "<U004A><U0075><U006C><U0061><U0079><U0069>";/
-            "<U0041><U0067><U0061><U0073><U0074><U0069>";/
-            "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0061>";/
-            "<U004F><U006B><U0074><U0068><U006F><U0062><U0061>";/
-            "<U004E><U006F><U0076><U0065><U006D><U0062><U0061>";/
-            "<U0044><U0069><U0073><U0065><U006D><U0062><U0061>"
+% - uMasingana, uNhlolanja, uNdasa, uMbasa, uNhlaba, uNhlangulana
+%   uNtulikazi, uNcwaba, uMandulo, uMfumfu, uLwezi, uZibandlela
+mon         "<U0075><U004D><U0061><U0073><U0069><U006E><U0067><U0061><U006E><U0061>";/
+            "<U0075><U004E><U0068><U006C><U006F><U006C><U0061><U006E><U006A><U0061>";/
+            "<U0075><U004E><U0064><U0061><U0073><U0061>";/
+            "<U0075><U004D><U0062><U0061><U0073><U0061>";/
+            "<U0075><U004E><U0068><U006C><U0061><U0062><U0061>";/
+            "<U0075><U004E><U0068><U006C><U0061><U006E><U0067><U0075><U006C><U0061><U006E><U0061>";/
+            "<U0075><U004E><U0074><U0075><U006C><U0069><U006B><U0061><U007A><U0069>";/
+            "<U0075><U004E><U0063><U0077><U0061><U0062><U0061>";/
+            "<U0075><U004D><U0061><U006E><U0064><U0075><U006C><U006F>";/
+            "<U0075><U004D><U0066><U0075><U006D><U0066><U0075>";/
+            "<U0075><U004C><U0077><U0065><U007A><U0069>";/
+            "<U0075><U005A><U0069><U0062><U0061><U006E><U0064><U006C><U0065><U006C><U0061>"
  
 % Abreviated date and time representation to be referenced by the "%c" field descriptor -
 d_t_fmt     "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
index fd61833046ec40ee3bc329760ba29a4d973bfa5f..37693aec43ea57c90e32d8adbae0d5c78ebbc082 100644 (file)
@@ -138,10 +138,11 @@ $(patsubst %,$(objpfx)%.udeps,$(user-interfaces)):
 # We must use $(CFLAGS) to get -O flags that affect #if's in header files.
        $(include-%.defs) | \
        $(CC) $(CFLAGS) $(CPPFLAGS) -M -x c - | \
-       sed -e 's,- *:,$@ $(@:.udeps=.ustamp) $(@:.udeps=.uh) $(@:.udeps=.__h)\
-                         $(@:.udeps=_server.c) $(@:.udeps=_server.h):,' \
+       sed -e 's,- *:,$(.udeps-targets):,' \
            $(sed-remove-objpfx) > $@.new
        mv -f $@.new $@
+.udeps-targets = $@ $(@:.udeps=.ustamp) $(@:.udeps=.uh) $(@:.udeps=.__h) \
+                $(@:.udeps=_server.c) $(@:.udeps=_server.h)
 endif
 
 # Look for the server stub files where they will be written.
index 7c3a0aaa78ac7fb0a5ea9680447f381c0cafcb2f..5ba244b0151193b56a26bb3e4f7b3199aaeb998b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Bernd Schmidt <crux@Pool.Informatik.RWTH-Aachen.DE>, 1997.
 
@@ -285,11 +285,12 @@ __tsearch (const void *key, void **vrootp, __compar_fn_t compar)
       q->key = key;                    /* initialize new node */
       q->red = 1;
       q->left = q->right = NULL;
+
+      if (nextp != rootp)
+       /* There may be two red edges in a row now, which we must avoid by
+          rotating the tree.  */
+       maybe_split_for_insert (nextp, rootp, parentp, r, p_r, 1);
     }
-  if (nextp != rootp)
-    /* There may be two red edges in a row now, which we must avoid by
-       rotating the tree.  */
-    maybe_split_for_insert (nextp, rootp, parentp, r, p_r, 1);
 
   return q;
 }
index fa5c4dfd304113ec81bd18239423911c48cd195f..c912a2d8241053364fd55c848b63dbc49ceb195b 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1996, 1997, 1998, 2001, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1996,1997,1998,2001,2004,2006 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -54,7 +54,7 @@ libnsl-routines = yp_xdr ypclnt ypupdate_xdr \
                  nis_print_group_entry nis_domain_of nis_domain_of_r\
                  nis_modify nis_remove nis_add nis_defaults\
                  nis_findserv nis_callback nis_clone_dir nis_clone_obj\
-                 nis_clone_res
+                 nis_clone_res nss-default
 
 libnss_compat-routines := $(addprefix compat-,grp pwd spwd initgroups)
 libnss_compat-inhibit-o        = $(filter-out .os,$(object-suffixes))
index d6b6a972f6227e49a8778633f26b50f2af080cd5..8cea16396f26dd9a840f0101bee49a9c5e1a7ac2 100644 (file)
@@ -57,6 +57,9 @@ libnsl {
   GLIBC_2.2 {
     xdr_ypall;
   }
+  GLIBC_PRIVATE {
+    _nsl_default_nss;
+  }
 }
 
 libnss_compat {
@@ -117,8 +120,7 @@ libnss_nisplus {
     _nss_nisplus_getservbyname_r; _nss_nisplus_getservbynumber_r;
     _nss_nisplus_getservent_r; _nss_nisplus_getspent_r;
     _nss_nisplus_getspnam_r; _nss_nisplus_netname2user;
-    _nss_nisplus_parse_grent; _nss_nisplus_parse_pwent;
-    _nss_nisplus_parse_spent; _nss_nisplus_setaliasent;
+    _nss_nisplus_setaliasent;
     _nss_nisplus_setetherent; _nss_nisplus_setgrent; _nss_nisplus_sethostent;
     _nss_nisplus_setnetent; _nss_nisplus_setnetgrent; _nss_nisplus_setprotoent;
     _nss_nisplus_setpwent; _nss_nisplus_setrpcent; _nss_nisplus_setservent;
diff --git a/nis/libnsl.h b/nis/libnsl.h
new file mode 100644 (file)
index 0000000..e45f24d
--- /dev/null
@@ -0,0 +1,24 @@
+/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define NSS_FLAG_NETID_AUTHORITATIVE   1
+#define NSS_FLAG_SERVICES_AUTHORITATIVE        2
+
+
+/* Get current set of default flags.  */
+extern int _nsl_default_nss (void);
index 5b432b7981455c2557d133fb1c5f5ed0139ad4a6..32d29ae99f7ebec8ea129617e1e01ebdb4872296 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2001, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2001,2004,2005,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -428,7 +428,7 @@ rec_dirsearch (const_nis_name name, directory_obj *dir, nis_error *status)
            return dir;
          }
 
-       cp = strchr (leaf, '\0');
+       cp = rawmemchr (leaf, '\0');
        *cp++ = '.';
        strcpy (cp, domain);
 
index 0146d53054b96bd72c576e4c0592bbfafd097a5b..23c4707b6fba6c82150fcdd3f795a98046dfa6a5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (c) 1997, 1998, 1999, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -24,7 +24,7 @@
 #include "nis_intern.h"
 
 nis_result *
-nis_checkpoint(const_nis_name dirname)
+nis_checkpoint (const_nis_name dirname)
 {
   nis_result *res;
 
@@ -48,7 +48,6 @@ nis_checkpoint(const_nis_name dirname)
       if (__type_of (NIS_RES_OBJECT (res2)) != NIS_DIRECTORY_OBJ)
        {
          nis_freeresult (res2);
-         nis_freeresult (res);
          NIS_RES_STATUS (res) = NIS_INVALIDOBJ;
          return res;
        }
index 92e883fde993b2b671bb20fb488f56929959b6da..f94a1eeb745f987698ddd301f8be2e568310a83d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 1997, 1998, 2005 Free Software Foundation, Inc.
+/* Copyright (c) 1997, 1998, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -29,15 +29,24 @@ nis_clone_directory (const directory_obj *src, directory_obj *dest)
   char *addr;
   unsigned int size;
   XDR xdrs;
-  directory_obj *res;
 
   if (src == NULL)
-    return (NULL);
+    return NULL;
 
   size = xdr_sizeof ((xdrproc_t)_xdr_directory_obj, (char *)src);
   if ((addr = calloc(1, size)) == NULL)
     return NULL;
 
+  xdrmem_create(&xdrs, addr, size, XDR_ENCODE);
+  if (!_xdr_directory_obj (&xdrs, (directory_obj *)src))
+    {
+      xdr_destroy (&xdrs);
+      free (addr);
+      return NULL;
+    }
+  xdr_destroy (&xdrs);
+
+  directory_obj *res;
   if (dest == NULL)
     {
       if ((res = calloc (1, sizeof (directory_obj))) == NULL)
@@ -49,18 +58,12 @@ nis_clone_directory (const directory_obj *src, directory_obj *dest)
   else
     res = dest;
 
-  xdrmem_create(&xdrs, addr, size, XDR_ENCODE);
-  if (!_xdr_directory_obj (&xdrs, (directory_obj *)src))
-    {
-      xdr_destroy (&xdrs);
-      free (addr);
-      return NULL;
-    }
-  xdr_destroy (&xdrs);
   xdrmem_create (&xdrs, addr, size, XDR_DECODE);
   if (!_xdr_directory_obj (&xdrs, res))
     {
       xdr_destroy (&xdrs);
+      if (res != dest)
+       free (res);
       free (addr);
       return NULL;
     }
index a0e098c1ed0dbfc8de830193849f17f837f7dd47..021f7cb4f4bb968f00ada45c4c33df903ed543a4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 1997, 1998, 2005 Free Software Foundation, Inc.
+/* Copyright (c) 1997, 1998, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -29,7 +29,6 @@ nis_clone_result (const nis_result *src, nis_result *dest)
   char *addr;
   unsigned int size;
   XDR xdrs;
-  nis_result *res;
 
   if (src == NULL)
     return (NULL);
@@ -38,6 +37,16 @@ nis_clone_result (const nis_result *src, nis_result *dest)
   if ((addr = calloc(1, size)) == NULL)
     return NULL;
 
+  xdrmem_create (&xdrs, addr, size, XDR_ENCODE);
+  if (!_xdr_nis_result (&xdrs, (nis_result *)src))
+    {
+      xdr_destroy (&xdrs);
+      free (addr);
+      return NULL;
+    }
+  xdr_destroy (&xdrs);
+
+  nis_result *res;
   if (dest == NULL)
     {
       if ((res = calloc (1, sizeof (nis_result))) == NULL)
@@ -49,18 +58,12 @@ nis_clone_result (const nis_result *src, nis_result *dest)
   else
     res = dest;
 
-  xdrmem_create(&xdrs, addr, size, XDR_ENCODE);
-  if (!_xdr_nis_result (&xdrs, (nis_result *)src))
-    {
-      xdr_destroy (&xdrs);
-      free (addr);
-      return NULL;
-    }
-  xdr_destroy (&xdrs);
-  xdrmem_create(&xdrs, addr, size, XDR_DECODE);
-  if (!_xdr_nis_result(&xdrs, res))
+  xdrmem_create (&xdrs, addr, size, XDR_DECODE);
+  if (!_xdr_nis_result (&xdrs, res))
     {
       xdr_destroy (&xdrs);
+      if (res != dest)
+       free (res);
       free (addr);
       return NULL;
     }
index 3786461d6407c0d5a9085b3b223dc8efe9f33be2..a7808abf4bdf28867f28d8b52bbb4b68f29dc598 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (c) 1997, 1998, 1999, 2000, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
 
@@ -46,7 +46,7 @@ nis_creategroup (const_nis_name group, unsigned int flags)
       else
        return NIS_BADNAME;
 
-      obj = malloc (sizeof (nis_object));
+      obj = calloc (1, sizeof (nis_object));
       if (__builtin_expect (obj == NULL, 0))
        return NIS_NOMEMORY;
 
@@ -57,7 +57,13 @@ nis_creategroup (const_nis_name group, unsigned int flags)
       obj->zo_domain = strdup (domainbuf);
       if (obj->zo_name == NULL || obj->zo_owner == NULL
          || obj->zo_group == NULL || obj->zo_domain == NULL)
-       return NIS_NOMEMORY;
+       {
+         free (obj->zo_group);
+         free (obj->zo_owner);
+         free (obj->zo_name);
+         free (obj);
+         return NIS_NOMEMORY;
+       }
       obj->zo_access = __nis_default_access (NULL, 0);
       obj->zo_ttl = 60 * 60;
       obj->zo_data.zo_type = NIS_GROUP_OBJ;
@@ -66,11 +72,11 @@ nis_creategroup (const_nis_name group, unsigned int flags)
       obj->zo_data.objdata_u.gr_data.gr_members.gr_members_val = NULL;
 
       res = nis_add (buf, obj);
+      nis_free_object (obj);
       if (res == NULL)
        return NIS_NOMEMORY;
       status = NIS_RES_STATUS (res);
       nis_freeresult (res);
-      nis_free_object (obj);
 
       return status;
     }
index 315960c8e8b1b71b4885a8f284f0f5d3d48e1c1a..e57649d5260a6ea4a0627c50f82e4bb604faa7b4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (c) 1997, 1998, 1999, 2000, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -40,7 +40,10 @@ nis_getservlist (const_nis_name dir)
        malloc (sizeof (nis_server *) *
                (NIS_RES_OBJECT (res)->DI_data.do_servers.do_servers_len + 1));
       if (__builtin_expect (serv == NULL, 0))
-       return NULL;
+       {
+         nis_freeresult (res);
+         return NULL;
+       }
 
       for (i = 0; i < NIS_RES_OBJECT (res)->DI_data.do_servers.do_servers_len;
           ++i)
@@ -49,13 +52,41 @@ nis_getservlist (const_nis_name dir)
            &NIS_RES_OBJECT (res)->DI_data.do_servers.do_servers_val[i];
          serv[i] = calloc (1, sizeof (nis_server));
          if (__builtin_expect (serv[i] == NULL, 0))
-           return NULL;
+           {
+           free_all:
+             while (i-- > 0)
+               {
+                 free (serv[i]->pkey.n_bytes);
+                 if (serv[i]->ep.ep_val != NULL)
+                   {
+                     unsigned long int j;
+                     for (j = 0; j < serv[i]->ep.ep_len; ++j)
+                       {
+                         free (serv[i]->ep.ep_val[j].proto);
+                         free (serv[i]->ep.ep_val[j].family);
+                         free (serv[i]->ep.ep_val[j].uaddr);
+                       }
+                     free (serv[i]->ep.ep_val);
+                   }
+                 free (serv[i]->name);
+                 free (serv[i]);
+               }
+
+             free (serv);
+
+             nis_freeresult (res);
+
+             return NULL;
+           }
 
          if (server->name != NULL)
            {
              serv[i]->name = strdup (server->name);
              if (__builtin_expect (serv[i]->name == NULL, 0))
-               return NULL;
+               {
+                 ++i;
+                 goto free_all;
+               }
            }
 
           serv[i]->ep.ep_len = server->ep.ep_len;
@@ -66,7 +97,10 @@ nis_getservlist (const_nis_name dir)
               serv[i]->ep.ep_val =
                malloc (server->ep.ep_len * sizeof (endpoint));
              if (__builtin_expect (serv[i]->ep.ep_val == NULL, 0))
-               return NULL;
+               {
+                 ++i;
+                 goto free_all;
+               }
 
               for (j = 0; j < serv[i]->ep.ep_len; ++j)
                 {
@@ -87,20 +121,20 @@ nis_getservlist (const_nis_name dir)
                    serv[i]->ep.ep_val[j].proto = NULL;
                 }
             }
-          else
-           serv[i]->ep.ep_val = NULL;
+
           serv[i]->key_type = server->key_type;
           serv[i]->pkey.n_len = server->pkey.n_len;
           if (server->pkey.n_len > 0)
             {
               serv[i]->pkey.n_bytes = malloc (server->pkey.n_len);
               if (__builtin_expect (serv[i]->pkey.n_bytes == NULL, 0))
-                return NULL;
+               {
+                 ++i;
+                 goto free_all;
+               }
               memcpy (serv[i]->pkey.n_bytes, server->pkey.n_bytes,
                       server->pkey.n_len);
             }
-          else
-            serv[i]->pkey.n_bytes = NULL;
         }
       serv[i] = NULL;
     }
@@ -111,8 +145,7 @@ nis_getservlist (const_nis_name dir)
        serv[0] = NULL;
     }
 
-  if (res != NULL)
-    nis_freeresult (res);
+  nis_freeresult (res);
 
   return serv;
 }
index f3f9bc9540f2bc8ce9e38397b3d1113133fd1ac0..178b4890ef9a2a66192d87215202e6369fdec889 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (c) 1997, 1998, 1999, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
 
@@ -47,8 +47,7 @@ internal_ismember (const_nis_name principal, const_nis_name group)
   res = nis_lookup (buf, EXPAND_NAME|FOLLOW_LINKS);
   if (res == NULL || NIS_RES_STATUS (res) != NIS_SUCCESS)
     {
-      if (res)
-       nis_freeresult (res);
+      nis_freeresult (res);
       return 0;
     }
 
index 30fd208b75812ad11fb61888bbdef5395bc5c794..e9aea12a86e9eecab2bd5fe8aa3b0c47d0ca6f9d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 1997, 1998, 2004 Free Software Foundation, Inc.
+/* Copyright (c) 1997, 1998, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -63,7 +63,7 @@ nis_local_directory (void)
        __nisdomainname[0] = '\0';
       else
        {
-         char *cp = strchr (__nisdomainname, '\0');
+         char *cp = rawmemchr (__nisdomainname, '\0');
 
          /* Missing trailing dot? */
          if (cp[-1] != '.')
@@ -154,7 +154,7 @@ nis_local_host (void)
        __nishostname[0] = '\0';
       else
        {
-         char *cp = strchr (__nishostname, '\0');
+         char *cp = rawmemchr (__nishostname, '\0');
          int len = cp - __nishostname;
 
          /* Hostname already fully qualified? */
index d9924f92798d9e7a42b8161d9b9ef03dfc789e24..81afc5e8e3f81fc3371244a925c3e961466722e3 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (c) 1997, 1998, 1999, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
 
@@ -39,8 +39,7 @@ nis_ping (const_nis_name dirname, unsigned int utime,
       res = nis_lookup (dirname, MASTER_ONLY);
       if (res == NULL || NIS_RES_STATUS (res) != NIS_SUCCESS)
        {
-         if (res)
-           nis_freeresult (res);
+         nis_freeresult (res);
          return;
        }
       obj = res->objects.objects_val;
@@ -51,8 +50,7 @@ nis_ping (const_nis_name dirname, unsigned int utime,
   /* Check if obj is really a diryectory object */
   if (__type_of (obj) != NIS_DIRECTORY_OBJ)
     {
-      if (res != NULL)
-       nis_freeresult (res);
+      nis_freeresult (res);
       return;
     }
 
@@ -68,6 +66,5 @@ nis_ping (const_nis_name dirname, unsigned int utime,
                   NIS_PING, (xdrproc_t) _xdr_ping_args,
                   (caddr_t) &args, (xdrproc_t) xdr_void,
                   (caddr_t) NULL, 0, NULL);
-  if (res)
-    nis_freeresult (res);
+  nis_freeresult (res);
 }
index 6f0ba8fbd458668bec99ec402e8189dfa130f740..91e6399b9045130248890bb2c0170d19fb88b134 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 1997, 1998, 2000, 2004 Free Software Foundation, Inc.
+/* Copyright (c) 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -45,12 +45,16 @@ nis_print_group_entry (const_nis_name group)
        }
       res = nis_lookup (buf, FOLLOW_LINKS | EXPAND_NAME);
 
-      if (NIS_RES_STATUS(res) != NIS_SUCCESS)
+      if (res == NULL)
        return;
 
-      if ((NIS_RES_NUMOBJ (res) != 1) ||
-         (__type_of (NIS_RES_OBJECT (res)) != NIS_GROUP_OBJ))
-       return;
+      if (NIS_RES_STATUS (res) != NIS_SUCCESS
+         || NIS_RES_NUMOBJ (res) != 1
+         || __type_of (NIS_RES_OBJECT (res)) != NIS_GROUP_OBJ)
+       {
+         nis_freeresult (res);
+         return;
+       }
 
       char *mem_exp[NIS_RES_NUMOBJ (res)];
       char *mem_imp[NIS_RES_NUMOBJ (res)];
index 122c3022ffb54ce556b56dd5d6b2472736241893..21fe13aedfdc6a4ce9dec0c88c5a3e3b6fda283b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 1997, 1998, 1999, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (c) 1997,1998,1999,2004,2005,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -68,7 +68,10 @@ nis_removemember (const_nis_name member, const_nis_name group)
        calloc (NIS_RES_OBJECT(res)->GR_data.gr_members.gr_members_len,
                sizeof (char *));
       if (newmem == NULL)
-       return NIS_NOMEMORY;
+       {
+         nis_freeresult (res);
+         return NIS_NOMEMORY;
+       }
 
       k = NIS_RES_OBJECT (res)[0].GR_data.gr_members.gr_members_len;
       j = 0;
@@ -96,6 +99,7 @@ nis_removemember (const_nis_name member, const_nis_name group)
       if (newp == NULL)
        {
          free (newmem);
+         nis_freeresult (res);
          return NIS_NOMEMORY;
        }
       newmem = newp;
index 2ef28ac59b769fca0acd3db6d2bf4b3b61d69352..f56b499f6001e6f88b41c8a4022acf490fab2b0a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 1997,1998,1999,2003,2004,2005 Free Software Foundation, Inc.
+/* Copyright (c) 1997-1999,2003,2004,2005,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
 
@@ -41,7 +41,15 @@ __create_ib_request (const_nis_name name, unsigned int flags)
 
   /* Not of "[key=value,key=value,...],foo.." format? */
   if (cptr[0] != '[')
-    return (ibreq->ibr_name = strdup (cptr)) == NULL ? NULL : ibreq;
+    {
+      ibreq->ibr_name = strdup (cptr);
+      if (ibreq->ibr_name == NULL)
+       {
+         free (ibreq);
+         return NULL;
+       }
+      return ibreq;
+    }
 
   /* "[key=value,...],foo" format */
   ibreq->ibr_name = strchr (cptr, ']');
@@ -497,15 +505,7 @@ libnsl_hidden_def (nis_list)
 nis_result *
 nis_add_entry (const_nis_name name, const nis_object *obj2, unsigned int flags)
 {
-  nis_object obj;
-  nis_result *res;
-  nis_error status;
-  ib_request *ibreq;
-  size_t namelen = strlen (name);
-  char buf1[namelen + 20];
-  char buf4[namelen + 20];
-
-  res = calloc (1, sizeof (nis_result));
+  nis_result *res = calloc (1, sizeof (nis_result));
   if (res == NULL)
     return NULL;
 
@@ -515,12 +515,18 @@ nis_add_entry (const_nis_name name, const nis_object *obj2, unsigned int flags)
       return res;
     }
 
-  if ((ibreq = __create_ib_request (name, flags)) == NULL)
+  size_t namelen = strlen (name);
+  char buf1[namelen + 20];
+  char buf4[namelen + 20];
+
+  ib_request *ibreq = __create_ib_request (name, flags);
+  if (ibreq == NULL)
     {
       NIS_RES_STATUS (res) = NIS_BADNAME;
       return res;
     }
 
+  nis_object obj;
   memcpy (&obj, obj2, sizeof (nis_object));
 
   if (obj.zo_name == NULL || strlen (obj.zo_name) == 0)
@@ -543,11 +549,12 @@ nis_add_entry (const_nis_name name, const nis_object *obj2, unsigned int flags)
     }
   ibreq->ibr_obj.ibr_obj_len = 1;
 
-  if ((status = __do_niscall (ibreq->ibr_name, NIS_IBADD,
-                             (xdrproc_t) _xdr_ib_request,
-                             (caddr_t) ibreq,
-                             (xdrproc_t) _xdr_nis_result,
-                             (caddr_t) res, 0, NULL)) != NIS_SUCCESS)
+  nis_error status = __do_niscall (ibreq->ibr_name, NIS_IBADD,
+                                  (xdrproc_t) _xdr_ib_request,
+                                  (caddr_t) ibreq,
+                                  (xdrproc_t) _xdr_nis_result,
+                                  (caddr_t) res, 0, NULL);
+  if (status  != NIS_SUCCESS)
     NIS_RES_STATUS (res) = status;
 
   nis_free_request (ibreq);
diff --git a/nis/nss-default.c b/nis/nss-default.c
new file mode 100644 (file)
index 0000000..3287e68
--- /dev/null
@@ -0,0 +1,117 @@
+/* Copyright (C) 1996, 2001, 2004, 2006 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <ctype.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <stdlib.h>
+#include <string.h>
+#include <bits/libc-lock.h>
+
+#include <libnsl.h>
+
+
+/* Path of the file.  */
+static const char default_nss[] = "/etc/default/nss";
+
+/* Flags once read from the file.  */
+static int default_nss_flags;
+
+/* Code to make sure we call 'init' once.  */
+__libc_once_define (static, once);
+
+
+static void
+init (void)
+{
+  FILE *fp = fopen (default_nss, "rc");
+  if (fp != NULL)
+    {
+      char *line = NULL;
+      size_t linelen = 0;
+
+      __fsetlocking (fp, FSETLOCKING_BYCALLER);
+
+      while (!feof_unlocked (fp))
+       {
+         ssize_t n = getline (&line, &linelen, fp);
+         if (n <= 0)
+           break;
+
+         /* There currently are only two variables we expect, so
+            simplify the parsing.  Recognize only
+
+              NETID_AUTHORITATIVE = TRUE
+              SERVICES_AUTHORITATIVE = TRUE
+
+            with arbitrary white spaces.  */
+         char *cp = line;
+         while (isspace (*cp))
+           ++cp;
+
+         /* Recognize comment lines.  */
+         if (*cp == '#')
+           continue;
+
+         static const char netid_authoritative[] = "NETID_AUTHORITATIVE";
+         static const char services_authoritative[]
+           = "SERVICES_AUTHORITATIVE";
+         size_t flag_len;
+         if (strncmp (cp, netid_authoritative,
+                      flag_len = sizeof (netid_authoritative) - 1) != 0
+             && strncmp (cp, services_authoritative,
+                         flag_len = sizeof (services_authoritative) - 1)
+                != 0)
+           continue;
+
+         cp += flag_len;
+         while (isspace (*cp))
+           ++cp;
+         if (*cp++ != '=')
+           continue;
+         while (isspace (*cp))
+           ++cp;
+
+         if (strncmp (cp, "TRUE", 4) != 0)
+           continue;
+         cp += 4;
+
+         while (isspace (*cp))
+           ++cp;
+
+         if (*cp == '\0')
+           default_nss_flags |= (flag_len == sizeof (netid_authoritative) - 1
+                                 ? NSS_FLAG_NETID_AUTHORITATIVE
+                                 : NSS_FLAG_SERVICES_AUTHORITATIVE);
+       }
+
+      free (line);
+
+      fclose (fp);
+    }
+}
+
+
+int
+_nsl_default_nss (void)
+{
+  /* If we have not yet read the file yet do it now.  */
+  __libc_once (once, init);
+
+  return default_nss_flags;
+}
index 40370bae3b7de300fa17c545c625e3850cba5220..cff1e765bb14a79079bbda541bf053c45817dbf3 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 2001, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 2001, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#include <ctype.h>
-#include <stdio.h>
-#include <stdio_ext.h>
-#include <stdlib.h>
-#include <string.h>
-#include <rpcsvc/ypclnt.h>
-
 #include "nss-nis.h"
 #include "nsswitch.h"
 
@@ -50,81 +43,3 @@ const enum nss_status __yperr2nss_tab[] =
 };
 const unsigned int __yperr2nss_count = (sizeof (__yperr2nss_tab)
                                        / sizeof (__yperr2nss_tab[0]));
-
-int _nis_default_nss_flags;
-
-static const char default_nss[] = "/etc/default/nss";
-
-int
-_nis_check_default_nss (void)
-{
-  FILE *fp = fopen (default_nss, "rc");
-  int flags = NSS_FLAG_SET;
-  if (fp != NULL)
-    {
-      char *line = NULL;
-      size_t linelen = 0;
-
-      __fsetlocking (fp, FSETLOCKING_BYCALLER);
-
-      while (!feof_unlocked (fp))
-       {
-         ssize_t n = getline (&line, &linelen, fp);
-         if (n <= 0)
-           break;
-
-         /* There currently are only two variables we expect, so
-            simplify the parsing.  Recognize only
-
-              NETID_AUTHORITATIVE = TRUE
-              SERVICES_AUTHORITATIVE = TRUE
-
-            with arbitrary white spaces.  */
-         char *cp = line;
-         while (isspace (*cp))
-           ++cp;
-
-         /* Recognize comment lines.  */
-         if (*cp == '#')
-           continue;
-
-         static const char netid_authoritative[] = "NETID_AUTHORITATIVE";
-         static const char services_authoritative[]
-           = "SERVICES_AUTHORITATIVE";
-         size_t flag_len;
-         if (strncmp (cp, netid_authoritative,
-                      flag_len = sizeof (netid_authoritative) - 1) != 0
-             && strncmp (cp, services_authoritative,
-                         flag_len = sizeof (services_authoritative) - 1)
-                != 0)
-           continue;
-
-         cp += flag_len;
-         while (isspace (*cp))
-           ++cp;
-         if (*cp++ != '=')
-           continue;
-         while (isspace (*cp))
-           ++cp;
-
-         if (strncmp (cp, "TRUE", 4) != 0)
-           continue;
-         cp += 4;
-
-         while (isspace (*cp))
-           ++cp;
-
-         if (*cp == '\0')
-           flags |= flag_len == sizeof (netid_authoritative) - 1
-                    ? NSS_FLAG_NETID_AUTHORITATIVE
-                    : NSS_FLAG_SERVICES_AUTHORITATIVE;
-       }
-
-      free (line);
-
-      fclose (fp);
-    }
-
-  _nis_default_nss_flags = flags;
-  return flags;
-}
index 659b3a14aa67542fbc175b1573c5763f617a1207..cdf34c648feb47fc2c4556e618fd3365ec76d392 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -36,16 +36,4 @@ yperr2nss (int errval)
   return __yperr2nss_tab[(unsigned int) errval];
 }
 
-#define NSS_FLAG_SET                   1
-#define NSS_FLAG_NETID_AUTHORITATIVE   2
-#define NSS_FLAG_SERVICES_AUTHORITATIVE        4
-extern int _nis_default_nss_flags attribute_hidden;
-extern int _nis_check_default_nss (void) attribute_hidden;
-
-extern inline __attribute__((always_inline)) int
-_nis_default_nss (void)
-{
-  return _nis_default_nss_flags ?: _nis_check_default_nss ();
-}
-
 #endif /* nis/nss-nis.h */
index 3b0887be044f7b202a3d988130db1c4d54861de1..9286e36ba64e379f6b0c699042eeebbd55d3267b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2002, 2003, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
 
@@ -125,52 +125,53 @@ internal_nis_getaliasent_r (struct aliasent *alias, char *buffer,
                            size_t buflen, int *errnop)
 {
   char *domain;
-  char *result;
-  int len;
-  char *outkey;
-  int keylen;
-  char *p;
-  int parse_res;
 
-  if (yp_get_default_domain (&domain))
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
   alias->alias_local = 0;
 
   /* Get the next entry until we found a correct one. */
+  int parse_res;
   do
     {
-      enum nss_status retval;
+      char *result;
+      int len;
+      char *outkey;
+      int keylen;
+      int yperr;
 
       if (new_start)
-        retval = yperr2nss (yp_first (domain, "mail.aliases",
-                                     &outkey, &keylen, &result, &len));
+        yperr = yp_first (domain, "mail.aliases", &outkey, &keylen, &result,
+                         &len);
       else
-        retval = yperr2nss ( yp_next (domain, "mail.aliases", oldkey,
-                                     oldkeylen, &outkey, &keylen,
-                                     &result, &len));
-      if (retval != NSS_STATUS_SUCCESS)
+        yperr = yp_next (domain, "mail.aliases", oldkey, oldkeylen, &outkey,
+                        &keylen, &result, &len);
+
+      if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
        {
+         enum nss_status retval = yperr2nss (yperr);
+
          if (retval == NSS_STATUS_TRYAGAIN)
             *errnop = errno;
           return retval;
         }
 
-      if ((size_t) (len + 1) > buflen)
+      if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
         {
          free (result);
           *errnop = ERANGE;
           return NSS_STATUS_TRYAGAIN;
         }
-      p = strncpy (buffer, result, len);
+      char *p = strncpy (buffer, result, len);
       buffer[len] = '\0';
       while (isspace (*p))
         ++p;
       free (result);
 
-      parse_res = _nss_nis_parse_aliasent (outkey, p, alias, buffer, buflen,
-                                          errnop);
-      if (parse_res == -1)
+      parse_res = _nss_nis_parse_aliasent (outkey, p, alias, buffer,
+                                          buflen, errnop);
+      if (__builtin_expect (parse_res == -1, 0))
        {
          free (outkey);
          *errnop = ERANGE;
@@ -206,56 +207,55 @@ enum nss_status
 _nss_nis_getaliasbyname_r (const char *name, struct aliasent *alias,
                           char *buffer, size_t buflen, int *errnop)
 {
-  enum nss_status retval;
-  int parse_res;
-  char *domain;
-  char *result;
-  int len;
-  char *p;
-  size_t namlen = strlen (name);
-  char name2[namlen + 1];
-  size_t i;
-
   if (name == NULL)
     {
       *errnop = EINVAL;
       return NSS_STATUS_UNAVAIL;
     }
 
-  if (yp_get_default_domain (&domain))
+  size_t namlen = strlen (name);
+  char name2[namlen + 1];
+
+  char *domain;
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
   /* Convert name to lowercase.  */
+  size_t i;
   for (i = 0; i < namlen; ++i)
     name2[i] = _tolower (name[i]);
   name2[i] = '\0';
 
-  retval = yperr2nss (yp_match (domain, "mail.aliases", name2, namlen,
-                               &result, &len));
+  char *result;
+  int len;
+  int yperr = yp_match (domain, "mail.aliases", name2, namlen, &result, &len);
 
-  if (retval != NSS_STATUS_SUCCESS)
+  if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
     {
+      enum nss_status retval = yperr2nss (yperr);
+
       if (retval == NSS_STATUS_TRYAGAIN)
        *errnop = errno;
       return retval;
     }
 
-  if ((size_t) (len + 1) > buflen)
+  if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
     {
       free (result);
       *errnop = ERANGE;
       return NSS_STATUS_TRYAGAIN;
     }
 
-  p = strncpy (buffer, result, len);
+  char *p = strncpy (buffer, result, len);
   buffer[len] = '\0';
   while (isspace (*p))
     ++p;
   free (result);
 
   alias->alias_local = 0;
-  parse_res = _nss_nis_parse_aliasent (name, p, alias, buffer, buflen, errnop);
-  if (parse_res < 1)
+  int parse_res = _nss_nis_parse_aliasent (name, p, alias, buffer, buflen,
+                                          errnop);
+  if (__builtin_expect (parse_res < 1, 0))
     {
       if (parse_res == -1)
        return NSS_STATUS_TRYAGAIN;
index def4c225104912445313bc23b53e0bc36b90ed8a..a3064282ab36ae6788efa9982828f4ca75eae150 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
 
@@ -182,45 +182,46 @@ enum nss_status
 _nss_nis_gethostton_r (const char *name, struct etherent *eth,
                       char *buffer, size_t buflen, int *errnop)
 {
-  struct parser_data *data = (void *) buffer;
-  enum nss_status retval;
-  char *domain, *result, *p;
-  int len, parse_res;
-
   if (name == NULL)
     {
       *errnop = EINVAL;
       return NSS_STATUS_UNAVAIL;
     }
 
-  if (yp_get_default_domain (&domain))
+  char *domain;
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
-  retval = yperr2nss (yp_match (domain, "ethers.byname", name,
-                               strlen (name), &result, &len));
+  char *result;
+  int len;
+  int yperr = yp_match (domain, "ethers.byname", name, strlen (name), &result,
+                       &len);
 
-  if (retval != NSS_STATUS_SUCCESS)
+  if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
     {
+      enum nss_status retval = yperr2nss (yperr);
+
       if (retval == NSS_STATUS_TRYAGAIN)
         *errnop = errno;
       return retval;
     }
 
-  if ((size_t) (len + 1) > buflen)
+  if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
     {
       free (result);
       *errnop = ERANGE;
       return NSS_STATUS_TRYAGAIN;
     }
 
-  p = strncpy (buffer, result, len);
+  char *p = strncpy (buffer, result, len);
   buffer[len] = '\0';
   while (isspace (*p))
     ++p;
   free (result);
 
-  parse_res = _nss_files_parse_etherent (p, eth, data, buflen, errnop);
-  if (parse_res < 1)
+  int parse_res = _nss_files_parse_etherent (p, eth, (void *) buffer, buflen,
+                                            errnop);
+  if (__builtin_expect (parse_res < 1, 0))
     {
       if (parse_res == -1)
        return NSS_STATUS_TRYAGAIN;
@@ -234,54 +235,54 @@ enum nss_status
 _nss_nis_getntohost_r (const struct ether_addr *addr, struct etherent *eth,
                       char *buffer, size_t buflen, int *errnop)
 {
-  struct parser_data *data = (void *) buffer;
-  enum nss_status retval;
-  char *domain, *result, *p;
-  int len, nlen, parse_res;
-  char buf[33];
-
   if (addr == NULL)
     {
       *errnop = EINVAL;
       return NSS_STATUS_UNAVAIL;
     }
 
-  if (yp_get_default_domain (&domain))
+  char *domain;
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
-  nlen = sprintf (buf, "%x:%x:%x:%x:%x:%x",
-                 (int) addr->ether_addr_octet[0],
-                 (int) addr->ether_addr_octet[1],
-                 (int) addr->ether_addr_octet[2],
-                 (int) addr->ether_addr_octet[3],
-                 (int) addr->ether_addr_octet[4],
-                 (int) addr->ether_addr_octet[5]);
-
-  retval = yperr2nss (yp_match (domain, "ethers.byaddr", buf,
-                               nlen, &result, &len));
-
-  if (retval != NSS_STATUS_SUCCESS)
+  char buf[33];
+  int nlen = snprintf (buf, sizeof (buf), "%x:%x:%x:%x:%x:%x",
+                     (int) addr->ether_addr_octet[0],
+                     (int) addr->ether_addr_octet[1],
+                     (int) addr->ether_addr_octet[2],
+                     (int) addr->ether_addr_octet[3],
+                     (int) addr->ether_addr_octet[4],
+                     (int) addr->ether_addr_octet[5]);
+
+  char *result;
+  int len;
+  int yperr = yp_match (domain, "ethers.byaddr", buf, nlen, &result, &len);
+
+  if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
     {
+      enum nss_status retval = yperr2nss (yperr);
+
       if (retval == NSS_STATUS_TRYAGAIN)
         *errnop = errno;
       return retval;
     }
 
-  if ((size_t) (len + 1) > buflen)
+  if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
     {
       free (result);
       *errnop = ERANGE;
       return NSS_STATUS_TRYAGAIN;
     }
 
-  p = strncpy (buffer, result, len);
+  char *p = strncpy (buffer, result, len);
   buffer[len] = '\0';
   while (isspace (*p))
     ++p;
   free (result);
 
-  parse_res = _nss_files_parse_etherent (p, eth, data, buflen, errnop);
-  if (parse_res < 1)
+  int parse_res = _nss_files_parse_etherent (p, eth, (void *) buffer, buflen,
+                                            errnop);
+  if (__builtin_expect (parse_res < 1, 0))
     {
       if (parse_res == -1)
        return NSS_STATUS_TRYAGAIN;
index 8be73325152b5a9feb40618eb89b0058216ec376..68f3ced99205f38eacb7c7ca4024e4e49675305c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-1999, 2001-2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1999, 2001-2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
 
@@ -71,49 +71,52 @@ static enum nss_status
 internal_nis_getgrent_r (struct group *grp, char *buffer, size_t buflen,
                         int *errnop)
 {
-  struct parser_data *data = (void *) buffer;
-  char *domain, *result, *outkey;
-  int len, keylen, parse_res;
-
-  if (yp_get_default_domain (&domain))
+  char *domain;
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
   /* Get the next entry until we found a correct one. */
+  int parse_res;
   do
     {
-      enum nss_status retval;
-      char *p;
+      char *result;
+      char *outkey;
+      int len;
+      int keylen;
+      int yperr;
 
       if (new_start)
-        retval = yperr2nss (yp_first (domain, "group.byname",
-                                      &outkey, &keylen, &result, &len));
+        yperr = yp_first (domain, "group.byname", &outkey, &keylen, &result,
+                         &len);
       else
-        retval = yperr2nss ( yp_next (domain, "group.byname",
-                                      oldkey, oldkeylen,
-                                      &outkey, &keylen, &result, &len));
+        yperr = yp_next (domain, "group.byname", oldkey, oldkeylen, &outkey,
+                        &keylen, &result, &len);
 
-      if (retval != NSS_STATUS_SUCCESS)
+      if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
         {
+         enum nss_status retval = yperr2nss (yperr);
+
           if (retval == NSS_STATUS_TRYAGAIN)
             *errnop = errno;
           return retval;
         }
 
-      if ((size_t) (len + 1) > buflen)
+      if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
         {
           free (result);
           *errnop = ERANGE;
           return NSS_STATUS_TRYAGAIN;
         }
 
-      p = strncpy (buffer, result, len);
+      char *p = strncpy (buffer, result, len);
       buffer[len] = '\0';
       while (isspace (*p))
         ++p;
       free (result);
 
-      parse_res = _nss_files_parse_grent (p, grp, data, buflen, errnop);
-      if (parse_res == -1)
+      parse_res = _nss_files_parse_grent (p, grp, (void *) buffer, buflen,
+                                         errnop);
+      if (__builtin_expect (parse_res == -1, 0))
        {
          free (outkey);
          *errnop = ERANGE;
@@ -149,45 +152,46 @@ enum nss_status
 _nss_nis_getgrnam_r (const char *name, struct group *grp,
                     char *buffer, size_t buflen, int *errnop)
 {
-  struct parser_data *data = (void *) buffer;
-  enum nss_status retval;
-  char *domain, *result, *p;
-  int len, parse_res;
-
   if (name == NULL)
     {
       *errnop = EINVAL;
       return NSS_STATUS_UNAVAIL;
     }
 
-  if (yp_get_default_domain (&domain))
+  char *domain;
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
-  retval = yperr2nss (yp_match (domain, "group.byname", name,
-                               strlen (name), &result, &len));
+  char *result;
+  int len;
+  int yperr = yp_match (domain, "group.byname", name, strlen (name), &result,
+                       &len);
 
-  if (retval != NSS_STATUS_SUCCESS)
+  if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
     {
+      enum nss_status retval = yperr2nss (yperr);
+
       if (retval == NSS_STATUS_TRYAGAIN)
         *errnop = errno;
       return retval;
     }
 
-  if ((size_t) (len + 1) > buflen)
+  if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
     {
       free (result);
       *errnop = ERANGE;
       return NSS_STATUS_TRYAGAIN;
     }
 
-  p = strncpy (buffer, result, len);
+  char *p = strncpy (buffer, result, len);
   buffer[len] = '\0';
   while (isspace (*p))
     ++p;
   free (result);
 
-  parse_res = _nss_files_parse_grent (p, grp, data, buflen, errnop);
-  if (parse_res < 1)
+  int parse_res = _nss_files_parse_grent (p, grp, (void *) buffer, buflen,
+                                         errnop);
+  if (__builtin_expect  (parse_res < 1, 0))
     {
       if (parse_res == -1)
        return NSS_STATUS_TRYAGAIN;
@@ -201,42 +205,42 @@ enum nss_status
 _nss_nis_getgrgid_r (gid_t gid, struct group *grp,
                     char *buffer, size_t buflen, int *errnop)
 {
-  struct parser_data *data = (void *) buffer;
-  enum nss_status retval;
-  char *domain, *result, *p;
-  int len, nlen, parse_res;
-  char buf[32];
-
-  if (yp_get_default_domain (&domain))
+  char *domain;
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
-  nlen = sprintf (buf, "%lu", (unsigned long int) gid);
+  char buf[32];
+  int nlen = sprintf (buf, "%lu", (unsigned long int) gid);
 
-  retval = yperr2nss (yp_match (domain, "group.bygid", buf,
-                               nlen, &result, &len));
+  char *result;
+  int len;
+  int yperr = yp_match (domain, "group.bygid", buf, nlen, &result, &len);
 
-  if (retval != NSS_STATUS_SUCCESS)
+  if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
     {
+      enum nss_status retval = yperr2nss (yperr);
+
       if (retval == NSS_STATUS_TRYAGAIN)
         *errnop = errno;
       return retval;
     }
 
-  if ((size_t) (len + 1) > buflen)
+  if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
     {
       free (result);
       *errnop = ERANGE;
       return NSS_STATUS_TRYAGAIN;
     }
 
-  p = strncpy (buffer, result, len);
+  char *p = strncpy (buffer, result, len);
   buffer[len] = '\0';
   while (isspace (*p))
     ++p;
   free (result);
 
-  parse_res = _nss_files_parse_grent (p, grp, data, buflen, errnop);
-  if (parse_res < 1)
+  int parse_res = _nss_files_parse_grent (p, grp, (void *) buffer, buflen,
+                                         errnop);
+  if (__builtin_expect (parse_res < 1, 0))
     {
       if (parse_res == -1)
        return NSS_STATUS_TRYAGAIN;
index 58a9064f149864fc0523f586d622371595aa5335..4fa03616813fa00e1240fb3c4338f0f2c5ff7dc9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2000, 2002, 2003, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
 
@@ -131,17 +131,11 @@ internal_nis_gethostent_r (struct hostent *host, char *buffer,
                           int af, int flags)
 {
   char *domain;
-  char *result;
-  int len, parse_res;
-  char *outkey;
-  int keylen;
-  struct parser_data *data = (void *) buffer;
-  size_t linebuflen = buffer + buflen - data->linebuffer;
-
-  if (yp_get_default_domain (&domain))
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
-  if (buflen < sizeof *data + 1)
+  struct parser_data *data = (void *) buffer;
+  if (__builtin_expect (buflen < sizeof *data + 1, 0))
     {
       *errnop = ERANGE;
       *h_errnop = NETDB_INTERNAL;
@@ -149,21 +143,26 @@ internal_nis_gethostent_r (struct hostent *host, char *buffer,
     }
 
   /* Get the next entry until we found a correct one. */
+  const size_t linebuflen = buffer + buflen - data->linebuffer;
+  int parse_res;
   do
     {
-      enum nss_status retval;
-      char *p;
-
+      char *result;
+      int len;
+      char *outkey;
+      int keylen;
+      int yperr;
       if (new_start)
-        retval = yperr2nss (yp_first (domain, "hosts.byname",
-                                      &outkey, &keylen, &result, &len));
+        yperr = yp_first (domain, "hosts.byname", &outkey, &keylen, &result,
+                         &len);
       else
-        retval = yperr2nss ( yp_next (domain, "hosts.byname",
-                                      oldkey, oldkeylen,
-                                      &outkey, &keylen, &result, &len));
+        yperr = yp_next (domain, "hosts.byname", oldkey, oldkeylen, &outkey,
+                        &keylen, &result, &len);
 
-      if (retval != NSS_STATUS_SUCCESS)
+      if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
         {
+         enum nss_status retval = yperr2nss (yperr);
+
          switch (retval)
            {
            case NSS_STATUS_TRYAGAIN:
@@ -180,7 +179,7 @@ internal_nis_gethostent_r (struct hostent *host, char *buffer,
          return retval;
        }
 
-      if ((size_t) (len + 1) > linebuflen)
+      if (__builtin_expect ((size_t) (len + 1) > linebuflen, 0))
         {
           free (result);
          *h_errnop = NETDB_INTERNAL;
@@ -188,14 +187,14 @@ internal_nis_gethostent_r (struct hostent *host, char *buffer,
           return NSS_STATUS_TRYAGAIN;
         }
 
-      p = strncpy (data->linebuffer, result, len);
+      char *p = strncpy (data->linebuffer, result, len);
       data->linebuffer[len] = '\0';
       while (isspace (*p))
        ++p;
       free (result);
 
       parse_res = parse_line (p, host, data, buflen, errnop, af, flags);
-      if (parse_res == -1)
+      if (__builtin_expect (parse_res == -1, 0))
        {
          free (outkey);
          *h_errnop = NETDB_INTERNAL;
@@ -235,11 +234,7 @@ internal_gethostbyname2_r (const char *name, int af, struct hostent *host,
                           char *buffer, size_t buflen, int *errnop,
                           int *h_errnop, int flags)
 {
-  enum nss_status retval;
-  char *domain, *result, *p;
-  int len, parse_res;
   struct parser_data *data = (void *) buffer;
-  size_t linebuflen = buffer + buflen - data->linebuffer;
 
   if (name == NULL)
     {
@@ -247,6 +242,7 @@ internal_gethostbyname2_r (const char *name, int af, struct hostent *host,
       return NSS_STATUS_UNAVAIL;
     }
 
+  char *domain;
   if (yp_get_default_domain (&domain))
     return NSS_STATUS_UNAVAIL;
 
@@ -256,24 +252,24 @@ internal_gethostbyname2_r (const char *name, int af, struct hostent *host,
       *errnop = ERANGE;
       return NSS_STATUS_TRYAGAIN;
     }
-  else
-    {
-      /* Convert name to lowercase.  */
-      size_t namlen = strlen (name);
-      char name2[namlen + 1];
-      size_t i;
 
-      for (i = 0; i < namlen; ++i)
-       name2[i] = tolower (name[i]);
-      name2[i] = '\0';
+  /* Convert name to lowercase.  */
+  size_t namlen = strlen (name);
+  char name2[namlen + 1];
+  size_t i;
 
-      retval = yperr2nss (yp_match (domain, "hosts.byname", name2,
-                                   namlen, &result, &len));
+  for (i = 0; i < namlen; ++i)
+    name2[i] = tolower (name[i]);
+  name2[i] = '\0';
 
-    }
+  char *result;
+  int len;
+  int yperr = yp_match (domain, "hosts.byname", name2, namlen, &result, &len);
 
-  if (retval != NSS_STATUS_SUCCESS)
+  if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
     {
+      enum nss_status retval = yperr2nss (yperr);
+
       if (retval == NSS_STATUS_TRYAGAIN)
        {
          *h_errnop = TRY_AGAIN;
@@ -284,7 +280,8 @@ internal_gethostbyname2_r (const char *name, int af, struct hostent *host,
       return retval;
     }
 
-  if ((size_t) (len + 1) > linebuflen)
+  const size_t linebuflen = buffer + buflen - data->linebuffer;
+  if (__builtin_expect ((size_t) (len + 1) > linebuflen, 0))
     {
       free (result);
       *h_errnop = NETDB_INTERNAL;
@@ -292,15 +289,15 @@ internal_gethostbyname2_r (const char *name, int af, struct hostent *host,
       return NSS_STATUS_TRYAGAIN;
     }
 
-  p = strncpy (data->linebuffer, result, len);
+  char *p = strncpy (data->linebuffer, result, len);
   data->linebuffer[len] = '\0';
   while (isspace (*p))
     ++p;
   free (result);
 
-  parse_res = parse_line (p, host, data, buflen, errnop, af, flags);
+  int parse_res = parse_line (p, host, data, buflen, errnop, af, flags);
 
-  if (parse_res < 1 || host->h_addrtype != af)
+  if (__builtin_expect (parse_res < 1 || host->h_addrtype != af, 0))
     {
       if (parse_res == -1)
        {
@@ -351,42 +348,42 @@ _nss_nis_gethostbyaddr_r (const void *addr, socklen_t addrlen, int af,
                          struct hostent *host, char *buffer, size_t buflen,
                          int *errnop, int *h_errnop)
 {
-  enum nss_status retval;
-  char *domain, *result, *p;
-  int len, parse_res;
-  char *buf;
-  struct parser_data *data = (void *) buffer;
-  size_t linebuflen = buffer + buflen - data->linebuffer;
-
-  if (yp_get_default_domain (&domain))
+  char *domain;
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
-  if (buflen < sizeof *data + 1)
+  struct parser_data *data = (void *) buffer;
+  if (__builtin_expect (buflen < sizeof *data + 1, 0))
     {
       *errnop = ERANGE;
       *h_errnop = NETDB_INTERNAL;
       return NSS_STATUS_TRYAGAIN;
     }
 
-  buf = inet_ntoa (*(const struct in_addr *) addr);
+  char *buf = inet_ntoa (*(const struct in_addr *) addr);
 
-  retval = yperr2nss (yp_match (domain, "hosts.byaddr", buf,
-                                strlen (buf), &result, &len));
+  char *result;
+  int len;
+  int yperr = yp_match (domain, "hosts.byaddr", buf, strlen (buf), &result,
+                       &len);
 
-  if (retval != NSS_STATUS_SUCCESS)
+  if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
     {
+      enum nss_status retval = yperr2nss (yperr);
+
       if (retval == NSS_STATUS_TRYAGAIN)
        {
          *h_errnop = TRY_AGAIN;
          *errnop = errno;
        }
-      if (retval == NSS_STATUS_NOTFOUND)
+      else if (retval == NSS_STATUS_NOTFOUND)
        *h_errnop = HOST_NOT_FOUND;
 
       return retval;
     }
 
-  if ((size_t) (len + 1) > linebuflen)
+  const size_t linebuflen = buffer + buflen - data->linebuffer;
+  if (__builtin_expect ((size_t) (len + 1) > linebuflen, 0))
     {
       free (result);
       *errnop = ERANGE;
@@ -394,15 +391,16 @@ _nss_nis_gethostbyaddr_r (const void *addr, socklen_t addrlen, int af,
       return NSS_STATUS_TRYAGAIN;
     }
 
-  p = strncpy (data->linebuffer, result, len);
+  char *p = strncpy (data->linebuffer, result, len);
   data->linebuffer[len] = '\0';
   while (isspace (*p))
     ++p;
   free (result);
 
-  parse_res = parse_line (p, host, data, buflen, errnop, af,
-                         ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0));
-  if (parse_res < 1)
+  int parse_res = parse_line (p, host, data, buflen, errnop, af,
+                             ((_res.options & RES_USE_INET6)
+                              ? AI_V4MAPPED : 0));
+  if (__builtin_expect (parse_res < 1, 0))
     {
       if (parse_res == -1)
        {
index 33a9662b4c2359de1445678e5511ac1ed4efb36f..647adf51192077d48bbc5220606185bfe5affed6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2000,2002,2003,2004,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1998.
 
@@ -30,6 +30,7 @@
 #include <sys/param.h>
 
 #include "nss-nis.h"
+#include <libnsl.h>
 
 /* Get the declaration of the parser function.  */
 #define ENTNAME grent
@@ -99,25 +100,23 @@ static enum nss_status
 internal_getgrent_r (struct group *grp, char *buffer, size_t buflen,
                     int *errnop, intern_t *intern)
 {
-  struct parser_data *data = (void *) buffer;
-  int parse_res;
-  char *p;
-
   if (intern->start == NULL)
     return NSS_STATUS_NOTFOUND;
 
   /* Get the next entry until we found a correct one. */
+  int parse_res;
   do
     {
       if (intern->next == NULL)
        return NSS_STATUS_NOTFOUND;
 
-      p = strncpy (buffer, intern->next->val, buflen);
+      char *p = strncpy (buffer, intern->next->val, buflen);
       while (isspace (*p))
         ++p;
 
-      parse_res = _nss_files_parse_grent (p, grp, data, buflen, errnop);
-      if (parse_res == -1)
+      parse_res = _nss_files_parse_grent (p, grp, (void *) buffer, buflen,
+                                         errnop);
+      if (__builtin_expect (parse_res == -1, 0))
         return NSS_STATUS_TRYAGAIN;
       intern->next = intern->next->next;
     }
@@ -166,13 +165,12 @@ initgroups_netid (uid_t uid, gid_t group, long int *start, long int *size,
   ssize_t keylen = snprintf (key, sizeof (key), "unix.%lu@%s",
                             (unsigned long int) uid, domainname);
 
-  enum nss_status retval;
   char *result;
   int reslen;
-  retval = yperr2nss (yp_match (domainname, "netid.byname", key, keylen,
-                               &result, &reslen));
-  if (retval != NSS_STATUS_SUCCESS)
-    return retval;
+  int yperr = yp_match (domainname, "netid.byname", key, keylen, &result,
+                       &reslen);
+  if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
+    return yperr2nss (yperr);
 
   /* Parse the result: following the colon is a comma separated list of
      group IDs.  */
@@ -207,7 +205,6 @@ initgroups_netid (uid_t uid, gid_t group, long int *start, long int *size,
       if (*start == *size)
        {
          /* Need a bigger buffer.  */
-         gid_t *newgroups;
          long int newsize;
 
          if (limit > 0 && *size == limit)
@@ -219,7 +216,7 @@ initgroups_netid (uid_t uid, gid_t group, long int *start, long int *size,
          else
            newsize = MIN (limit, 2 * *size);
 
-         newgroups = realloc (groups, newsize * sizeof (*groups));
+         gid_t *newgroups = realloc (groups, newsize * sizeof (*groups));
          if (newgroups == NULL)
            goto errout;
          *groupsp = groups = newgroups;
@@ -247,7 +244,7 @@ _nss_nis_initgroups_dyn (const char *user, gid_t group, long int *start,
     return NSS_STATUS_UNAVAIL;
 
   /* Check whether we are supposed to use the netid.byname map.  */
-  if (_nis_default_nss () & NSS_FLAG_NETID_AUTHORITATIVE)
+  if (_nsl_default_nss () & NSS_FLAG_NETID_AUTHORITATIVE)
     {
       /* We need the user ID.  */
       uid_t uid;
index 049bd8cdb467be3cffc3dee11ae53036c9ab241c..5a88b72d9cf7a2a3713c28938b80a5b674562330 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,1997,1999,2000,2002,2003,2004,2005
+/* Copyright (C) 1996,1997,1999,2000,2002,2003,2004,2005,2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
@@ -47,24 +47,25 @@ internal_nis_endnetgrent (struct __netgrent *netgrp)
   netgrp->cursor = NULL;
 }
 
+
 enum nss_status
 _nss_nis_setnetgrent (const char *group, struct __netgrent *netgrp)
 {
-  char *domain;
   int len;
   enum nss_status status;
 
   status = NSS_STATUS_SUCCESS;
 
-  if (group == NULL || group[0] == '\0')
+  if (__builtin_expect (group == NULL || group[0] == '\0', 0))
     return NSS_STATUS_UNAVAIL;
 
-  if (yp_get_default_domain (&domain))
+  char *domain;
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
   status = yperr2nss (yp_match (domain, "netgroup", group, strlen (group),
                                &netgrp->data, &len));
-  if (status == NSS_STATUS_SUCCESS)
+  if (__builtin_expect (status == NSS_STATUS_SUCCESS, 1))
     {
       /* Our implementation of yp_match already allocates a buffer
         which is one byte larger than the value in LEN specifies
@@ -90,6 +91,7 @@ _nss_nis_endnetgrent (struct __netgrent *netgrp)
   return NSS_STATUS_SUCCESS;
 }
 
+
 enum nss_status
 _nss_nis_getnetgrent_r (struct __netgrent *result, char *buffer, size_t buflen,
                        int *errnop)
index ed8439c814e302a111cdec9bb9bc362efdf641ed..9b02302e0b521d0ec84264ce166255d14e9ba7ea 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2003, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
 
@@ -73,28 +73,32 @@ internal_nis_getnetent_r (struct netent *net, char *buffer, size_t buflen,
                          int *errnop, int *herrnop)
 {
   struct parser_data *data = (void *) buffer;
-  char *domain, *result, *outkey;
-  int len, keylen, parse_res;
 
-  if (yp_get_default_domain (&domain))
+  char *domain;
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
   /* Get the next entry until we found a correct one. */
+  int parse_res;
   do
     {
-      enum nss_status retval;
-      char *p;
+      char *result;
+      char *outkey;
+      int len;
+      int keylen;
+      int yperr;
 
       if (new_start)
-        retval = yperr2nss (yp_first (domain, "networks.byname",
-                                      &outkey, &keylen, &result, &len));
+        yperr = yp_first (domain, "networks.byname", &outkey, &keylen, &result,
+                         &len);
       else
-        retval = yperr2nss ( yp_next (domain, "networks.byname",
-                                      oldkey, oldkeylen,
-                                      &outkey, &keylen, &result, &len));
+        yperr = yp_next (domain, "networks.byname", oldkey, oldkeylen, &outkey,
+                        &keylen, &result, &len);
 
-      if (retval != NSS_STATUS_SUCCESS)
+      if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
         {
+         enum nss_status retval = yperr2nss (yperr);
+
           if (retval == NSS_STATUS_TRYAGAIN)
            {
              *herrnop = NETDB_INTERNAL;
@@ -103,7 +107,7 @@ internal_nis_getnetent_r (struct netent *net, char *buffer, size_t buflen,
           return retval;
         }
 
-      if ((size_t) (len + 1) > buflen)
+      if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
         {
           free (result);
          *errnop = ERANGE;
@@ -111,14 +115,14 @@ internal_nis_getnetent_r (struct netent *net, char *buffer, size_t buflen,
           return NSS_STATUS_TRYAGAIN;
         }
 
-      p = strncpy (buffer, result, len);
+      char *p = strncpy (buffer, result, len);
       buffer[len] = '\0';
       while (isspace (*p))
         ++p;
       free (result);
 
       parse_res = _nss_files_parse_netent (p, net, data, buflen, errnop);
-      if (parse_res == -1)
+      if (__builtin_expect (parse_res == -1, 0))
        {
          free (outkey);
          *herrnop = NETDB_INTERNAL;
@@ -155,11 +159,6 @@ enum nss_status
 _nss_nis_getnetbyname_r (const char *name, struct netent *net, char *buffer,
                         size_t buflen, int *errnop, int *herrnop)
 {
-  enum nss_status retval;
-  struct parser_data *data = (void *) buffer;
-  char *domain, *result, *p;
-  int len, parse_res;
-
   if (name == NULL)
     {
       *errnop = EINVAL;
@@ -167,33 +166,36 @@ _nss_nis_getnetbyname_r (const char *name, struct netent *net, char *buffer,
       return NSS_STATUS_UNAVAIL;
     }
 
-  if (yp_get_default_domain (&domain))
+  char *domain;
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
+  struct parser_data *data = (void *) buffer;
   if (buflen < sizeof *data + 1)
     {
       *herrnop = NETDB_INTERNAL;
       *errnop = ERANGE;
       return NSS_STATUS_TRYAGAIN;
     }
-  else
-    {
-      /* Convert name to lowercase.  */
-      size_t namlen = strlen (name);
-      char name2[namlen + 1];
-      size_t i;
 
-      for (i = 0; i < namlen; ++i)
-       name2[i] = _tolower (name[i]);
-      name2[i] = '\0';
+  /* Convert name to lowercase.  */
+  size_t namlen = strlen (name);
+  char name2[namlen + 1];
+  size_t i;
 
-      retval = yperr2nss (yp_match (domain, "networks.byname", name2,
-                                   namlen, &result, &len));
-    }
+  for (i = 0; i < namlen; ++i)
+    name2[i] = _tolower (name[i]);
+  name2[i] = '\0';
 
+  char *result;
+  int len;
+  int yperr = yp_match (domain, "networks.byname", name2, namlen, &result,
+                       &len);
 
-  if (retval != NSS_STATUS_SUCCESS)
+  if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
     {
+      enum nss_status retval = yperr2nss (yperr);
+
       if (retval == NSS_STATUS_TRYAGAIN)
        {
          *errnop = errno;
@@ -202,7 +204,7 @@ _nss_nis_getnetbyname_r (const char *name, struct netent *net, char *buffer,
       return retval;
     }
 
-  if ((size_t) (len + 1) > buflen)
+  if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
     {
       free (result);
       *errnop = ERANGE;
@@ -210,15 +212,15 @@ _nss_nis_getnetbyname_r (const char *name, struct netent *net, char *buffer,
       return NSS_STATUS_TRYAGAIN;
     }
 
-  p = strncpy (buffer, result, len);
+  char *p = strncpy (buffer, result, len);
   buffer[len] = '\0';
   while (isspace (*p))
     ++p;
   free (result);
 
-  parse_res = _nss_files_parse_netent (p, net, data, buflen, errnop);
+  int parse_res = _nss_files_parse_netent (p, net, data, buflen, errnop);
 
-  if (parse_res < 1)
+  if (__builtin_expect (parse_res < 1, 0))
     {
       *herrnop = NETDB_INTERNAL;
       if (parse_res == -1)
@@ -235,32 +237,26 @@ _nss_nis_getnetbyaddr_r (uint32_t addr, int type, struct netent *net,
                         char *buffer, size_t buflen, int *errnop,
                         int *herrnop)
 {
-  struct parser_data *data = (void *) buffer;
   char *domain;
-  char *result;
-  int len;
-  char buf[256];
-  int blen;
-  struct in_addr in;
-  char *p;
-
-  if (yp_get_default_domain (&domain))
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
-  in = inet_makeaddr (addr, 0);
-  strcpy (buf, inet_ntoa (in));
-  blen = strlen (buf);
+  struct in_addr in = inet_makeaddr (addr, 0);
+  char *buf = inet_ntoa (in);
+  size_t blen = strlen (buf);
 
   while (1)
     {
-      enum nss_status retval;
-      int parse_res;
+      char *result;
+      int len;
 
-      retval = yperr2nss (yp_match (domain, "networks.byaddr", buf,
-                                   strlen (buf), &result, &len));
+      int yperr = yp_match (domain, "networks.byaddr", buf, blen, &result,
+                           &len);
 
-       if (retval != NSS_STATUS_SUCCESS)
+      if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
          {
+           enum nss_status retval = yperr2nss (yperr);
+
            if (retval == NSS_STATUS_NOTFOUND)
              {
                if (buf[blen - 2] == '.' && buf[blen - 1] == '0')
@@ -282,7 +278,7 @@ _nss_nis_getnetbyaddr_r (uint32_t addr, int type, struct netent *net,
              }
          }
 
-      if ((size_t) (len + 1) > buflen)
+      if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
        {
          free (result);
          *errnop = ERANGE;
@@ -290,15 +286,16 @@ _nss_nis_getnetbyaddr_r (uint32_t addr, int type, struct netent *net,
          return NSS_STATUS_TRYAGAIN;
        }
 
-        p = strncpy (buffer, result, len);
+        char *p = strncpy (buffer, result, len);
        buffer[len] = '\0';
        while (isspace (*p))
          ++p;
        free (result);
 
-       parse_res = _nss_files_parse_netent (p, net, data, buflen, errnop);
+       int parse_res = _nss_files_parse_netent (p, net, (void *) buffer,
+                                                buflen, errnop);
 
-       if (parse_res < 1)
+       if (__builtin_expect (parse_res < 1, 0))
          {
            *herrnop = NETDB_INTERNAL;
            if (parse_res == -1)
index f1069283ab94b155a3704cd0e348cd726ca3f981..1480a928b5d4647c244c8c974ed545abac2b9629 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-1998, 2000-2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1998, 2000-2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
 
@@ -179,45 +179,46 @@ enum nss_status
 _nss_nis_getprotobyname_r (const char *name, struct protoent *proto,
                           char *buffer, size_t buflen, int *errnop)
 {
-  struct parser_data *data = (void *) buffer;
-  enum nss_status retval;
-  char *domain, *result, *p;
-  int len, parse_res;
-
   if (name == NULL)
     {
       *errnop = EINVAL;
       return NSS_STATUS_UNAVAIL;
     }
 
-  if (yp_get_default_domain (&domain))
+  char *domain;
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
-  retval = yperr2nss (yp_match (domain, "protocols.byname", name,
-                                strlen (name), &result, &len));
+  char *result;
+  int len;
+  int yperr = yp_match (domain, "protocols.byname", name, strlen (name),
+                       &result, &len);
 
-  if (retval != NSS_STATUS_SUCCESS)
+  if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
     {
+      enum nss_status retval = yperr2nss (yperr);
+
       if (retval == NSS_STATUS_TRYAGAIN)
        *errnop = errno;
       return retval;
     }
 
-  if ((size_t) (len + 1) > buflen)
+  if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
     {
       free (result);
       *errnop = ERANGE;
       return NSS_STATUS_TRYAGAIN;
     }
 
-  p = strncpy (buffer, result, len);
+  char *p = strncpy (buffer, result, len);
   buffer[len] = '\0';
   while (isspace (*p))
     ++p;
   free (result);
 
-  parse_res = _nss_files_parse_protoent (p, proto, data, buflen, errnop);
-  if (parse_res < 1)
+  int parse_res = _nss_files_parse_protoent (p, proto, (void *) buffer, buflen,
+                                            errnop);
+  if (__builtin_expect (parse_res < 1, 0))
     {
       if (parse_res == -1)
        return NSS_STATUS_TRYAGAIN;
@@ -231,42 +232,43 @@ enum nss_status
 _nss_nis_getprotobynumber_r (int number, struct protoent *proto,
                             char *buffer, size_t buflen, int *errnop)
 {
-  struct parser_data *data = (void *) buffer;
-  enum nss_status retval;
-  char *domain, *result, *p;
-  int len, nlen, parse_res;
-  char buf[32];
-
-  if (yp_get_default_domain (&domain))
+  char *domain;
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
-  nlen = sprintf (buf, "%d", number);
+  char buf[32];
+  int nlen = snprintf (buf, sizeof (buf), "%d", number);
 
-  retval = yperr2nss (yp_match (domain, "protocols.bynumber", buf,
-                                nlen, &result, &len));
+  char *result;
+  int len;
+  int yperr = yp_match (domain, "protocols.bynumber", buf, nlen, &result,
+                       &len);
 
-  if (retval != NSS_STATUS_SUCCESS)
+  if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
     {
+      enum nss_status retval = yperr2nss (yperr);
+
       if (retval == NSS_STATUS_TRYAGAIN)
        *errnop = errno;
       return retval;
     }
 
-  if ((size_t) (len + 1) > buflen)
+  if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
     {
       free (result);
       *errnop = ERANGE;
       return NSS_STATUS_TRYAGAIN;
     }
 
-  p = strncpy (buffer, result, len);
+  char *p = strncpy (buffer, result, len);
   buffer[len] = '\0';
   while (isspace (*p))
     ++p;
   free (result);
 
-  parse_res = _nss_files_parse_protoent (p, proto, data, buflen, errnop);
-  if (parse_res < 1)
+  int parse_res = _nss_files_parse_protoent (p, proto, (void *) buffer, buflen,
+                                            errnop);
+  if (__builtin_expect (parse_res < 1, 0))
     {
       if (parse_res == -1)
        return NSS_STATUS_TRYAGAIN;
index 5aa41b8c179c0162c896c8021d41d2a0e010f94f..f58eb154adeff17022a91556244ff445a1eb53ef 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-1999,2001,2002,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1999,2001,2002,2005,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
 
@@ -36,10 +36,6 @@ extern int xdecrypt (char *, char *);
 enum nss_status
 _nss_nis_getpublickey (const char *netname, char *pkey, int *errnop)
 {
-  enum nss_status retval;
-  char *domain, *result;
-  int len;
-
   pkey[0] = 0;
 
   if (netname == NULL)
@@ -48,19 +44,23 @@ _nss_nis_getpublickey (const char *netname, char *pkey, int *errnop)
       return NSS_STATUS_UNAVAIL;
     }
 
-  domain = strchr (netname, '@');
-  if (!domain)
+  char *domain = strchr (netname, '@');
+  if (domain == NULL)
     {
       *errnop = EINVAL;
       return NSS_STATUS_UNAVAIL;
     }
   ++domain;
 
-  retval = yperr2nss (yp_match (domain, "publickey.byname", netname,
-                               strlen (netname), &result, &len));
+  char *result;
+  int len;
+  int yperr = yp_match (domain, "publickey.byname", netname, strlen (netname),
+                       &result, &len);
 
-  if (retval != NSS_STATUS_SUCCESS)
+  if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
     {
+      enum nss_status retval = yperr2nss (yperr);
+
       if (retval == NSS_STATUS_TRYAGAIN)
        *errnop = errno;
       return retval;
@@ -73,6 +73,7 @@ _nss_nis_getpublickey (const char *netname, char *pkey, int *errnop)
        *p = 0;
       strncpy (pkey, result, HEXKEYBYTES + 1);
       pkey[HEXKEYBYTES] = '\0';
+      free (result);
     }
   return NSS_STATUS_SUCCESS;
 }
@@ -81,11 +82,6 @@ enum nss_status
 _nss_nis_getsecretkey (const char *netname, char *skey, char *passwd,
                       int *errnop)
 {
-  enum nss_status retval;
-  char buf[2 * (HEXKEYBYTES + 1)];
-  char *domain, *result;
-  int len;
-
   skey[0] = 0;
 
   if (netname == NULL || passwd == NULL)
@@ -94,19 +90,23 @@ _nss_nis_getsecretkey (const char *netname, char *skey, char *passwd,
       return NSS_STATUS_UNAVAIL;
     }
 
-  domain = strchr (netname, '@');
-  if (!domain)
+  char *domain = strchr (netname, '@');
+  if (domain == NULL)
     {
       *errnop = EINVAL;
       return NSS_STATUS_UNAVAIL;
     }
   ++domain;
 
-  retval = yperr2nss (yp_match (domain, "publickey.byname", netname,
-                               strlen (netname), &result, &len));
+  char *result;
+  int len;
+  int yperr = yp_match (domain, "publickey.byname", netname, strlen (netname),
+                       &result, &len);
 
-  if (retval != NSS_STATUS_SUCCESS)
+  if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
     {
+      enum nss_status retval = yperr2nss (yperr);
+
       if (retval == NSS_STATUS_TRYAGAIN)
        *errnop = errno;
       return retval;
@@ -115,20 +115,22 @@ _nss_nis_getsecretkey (const char *netname, char *skey, char *passwd,
   if (result != NULL)
     {
       char *p = strchr (result, ':');
-      if (p == NULL)
-       return NSS_STATUS_SUCCESS;
-
-      ++p;
-      strncpy (buf, p, 2 * (HEXKEYBYTES + 1));
-      buf[2 * HEXKEYBYTES + 1] = '\0';
-      if (!xdecrypt (buf, passwd))
-       return NSS_STATUS_SUCCESS;
-
-      if (memcmp (buf, &(buf[HEXKEYBYTES]), KEYCHECKSUMSIZE) != 0)
-       return NSS_STATUS_SUCCESS;
-
-      buf[HEXKEYBYTES] = '\0';
-      strcpy (skey, buf);
+      if (p != NULL)
+       {
+         char buf[2 * (HEXKEYBYTES + 1)];
+
+         ++p;
+         strncpy (buf, p, 2 * (HEXKEYBYTES + 1));
+         buf[2 * HEXKEYBYTES + 1] = '\0';
+         if (xdecrypt (buf, passwd)
+             && memcmp (buf, &(buf[HEXKEYBYTES]), KEYCHECKSUMSIZE) == 0)
+           {
+             buf[HEXKEYBYTES] = '\0';
+             strcpy (skey, buf);
+           }
+       }
+
+      free (result);
     }
   return NSS_STATUS_SUCCESS;
 }
@@ -194,13 +196,8 @@ enum nss_status
 _nss_nis_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp,
                       gid_t *gidp, int *gidlenp, gid_t *gidlist, int *errnop)
 {
-  char *domain;
-  int yperr;
-  char *lookup;
-  int len;
-
-  domain = strchr (netname, '@');
-  if (!domain)
+  char *domain = strchr (netname, '@');
+  if (domain == NULL)
     {
       *errnop = EINVAL;
       return NSS_STATUS_UNAVAIL;
@@ -208,9 +205,10 @@ _nss_nis_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp,
 
   /* Point past the '@' character */
   ++domain;
-  lookup = NULL;
-  yperr = yp_match (domain, "netid.byname", netname, strlen (netname),
-                   &lookup, &len);
+  char *lookup = NULL;
+  int len;
+  int yperr = yp_match (domain, "netid.byname", netname, strlen (netname),
+                       &lookup, &len);
   switch (yperr)
     {
     case YPERR_SUCCESS:
@@ -223,17 +221,15 @@ _nss_nis_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp,
       return NSS_STATUS_UNAVAIL;
     }
 
-  if (lookup)
-    {
-      enum nss_status err;
-
-      lookup[len] = '\0';
-      err = parse_netid_str (lookup, uidp, gidp, gidlenp, gidlist);
-      free (lookup);
-      return err;
-    }
-  else
+  if (lookup == NULL)
     return NSS_STATUS_NOTFOUND;
 
-  return NSS_STATUS_SUCCESS;
+
+  lookup[len] = '\0';
+
+  enum nss_status err = parse_netid_str (lookup, uidp, gidp, gidlenp, gidlist);
+
+  free (lookup);
+
+  return err;
 }
index 0f56ced014b19d17ea23e69f84c54b6b79b0af14..457574a49bf296386f6700de86154da7be0dd4b9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1998,2001,2002,2003,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
 
@@ -71,31 +71,31 @@ static enum nss_status
 internal_nis_getpwent_r (struct passwd *pwd, char *buffer, size_t buflen,
                         int *errnop)
 {
-  struct parser_data *data = (void *) buffer;
   char *domain;
-  int parse_res;
-
-  if (yp_get_default_domain (&domain))
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
   /* Get the next entry until we found a correct one. */
+  int parse_res;
   do
     {
-      enum nss_status retval;
-      char *result, *outkey, *result2, *p;
-      int len, keylen, len2;
-      size_t namelen;
+      char *result;
+      char *outkey;
+      int len;
+      int keylen;
+      int yperr;
 
       if (new_start)
-        retval = yperr2nss (yp_first (domain, "passwd.byname",
-                                      &outkey, &keylen, &result, &len));
+        yperr = yp_first (domain, "passwd.byname", &outkey, &keylen, &result,
+                         &len);
       else
-        retval = yperr2nss ( yp_next (domain, "passwd.byname",
-                                      oldkey, oldkeylen,
-                                      &outkey, &keylen, &result, &len));
+        yperr = yp_next (domain, "passwd.byname", oldkey, oldkeylen, &outkey,
+                        &keylen, &result, &len);
 
-      if (retval != NSS_STATUS_SUCCESS)
+      if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
         {
+         enum nss_status retval = yperr2nss (yperr);
+
           if (retval == NSS_STATUS_TRYAGAIN)
             *errnop = errno;
           return retval;
@@ -103,7 +103,10 @@ internal_nis_getpwent_r (struct passwd *pwd, char *buffer, size_t buflen,
 
       /* Check for adjunct style secret passwords.  They can be
         recognized by a password starting with "##".  */
-      p = strchr (result, ':');
+      char *p = strchr (result, ':');
+      size_t namelen;
+      char *result2;
+      int len2;
       if (p != NULL    /* This better should be true in all cases.  */
          && p[1] == '#' && p[2] == '#'
          && (namelen = p - result,
@@ -128,7 +131,8 @@ internal_nis_getpwent_r (struct passwd *pwd, char *buffer, size_t buflen,
            }
 
          restlen = len - (p - result);
-         if ((size_t) (namelen + (endp - encrypted) + restlen + 2) > buflen)
+         if (__builtin_expect ((size_t) (namelen + (endp - encrypted)
+                                         + restlen + 2) > buflen, 0))
            {
              free (result2);
              free (result);
@@ -147,7 +151,7 @@ internal_nis_getpwent_r (struct passwd *pwd, char *buffer, size_t buflen,
       else
        {
        non_adjunct:
-         if ((size_t) (len + 1) > buflen)
+         if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
            {
              free (result);
              *errnop = ERANGE;
@@ -162,8 +166,9 @@ internal_nis_getpwent_r (struct passwd *pwd, char *buffer, size_t buflen,
         ++p;
       free (result);
 
-      parse_res = _nss_files_parse_pwent (p, pwd, data, buflen, errnop);
-      if (parse_res == -1)
+      parse_res = _nss_files_parse_pwent (p, pwd, (void *) buffer, buflen,
+                                         errnop);
+      if (__builtin_expect (parse_res == -1, 0))
        {
          free (outkey);
          *errnop = ERANGE;
@@ -199,28 +204,26 @@ enum nss_status
 _nss_nis_getpwnam_r (const char *name, struct passwd *pwd,
                     char *buffer, size_t buflen, int *errnop)
 {
-  struct parser_data *data = (void *) buffer;
-  enum nss_status retval;
-  char *domain, *result, *result2, *p;
-  int len, len2, parse_res;
-  size_t namelen;
-
   if (name == NULL)
     {
       *errnop = EINVAL;
       return NSS_STATUS_UNAVAIL;
     }
 
-  if (yp_get_default_domain (&domain))
+  char *domain;
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
-  namelen = strlen (name);
+  size_t namelen = strlen (name);
 
-  retval = yperr2nss (yp_match (domain, "passwd.byname", name,
-                               namelen, &result, &len));
+  char *result;
+  int len;
+  int yperr = yp_match (domain, "passwd.byname", name, namelen, &result, &len);
 
-  if (retval != NSS_STATUS_SUCCESS)
+  if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
     {
+      enum nss_status retval = yperr2nss (yperr);
+
       if (retval == NSS_STATUS_TRYAGAIN)
        *errnop = errno;
       return retval;
@@ -228,7 +231,9 @@ _nss_nis_getpwnam_r (const char *name, struct passwd *pwd,
 
   /* Check for adjunct style secret passwords.  They can be recognized
      by a password starting with "##".  */
-  p = strchr (result, ':');
+  char *result2;
+  int len2;
+  char *p = strchr (result, ':');
   if (p != NULL        /* This better should be true in all cases.  */
       && p[1] == '#' && p[2] == '#'
       && yp_match (domain, "passwd.adjunct.byname", name, namelen,
@@ -238,7 +243,6 @@ _nss_nis_getpwnam_r (const char *name, struct passwd *pwd,
         therein into original result.  */
       char *encrypted = strchr (result2, ':');
       char *endp;
-      size_t restlen;
 
       if (encrypted == NULL
          || (endp = strchr (++encrypted, ':')) == NULL
@@ -251,8 +255,9 @@ _nss_nis_getpwnam_r (const char *name, struct passwd *pwd,
          goto non_adjunct;
        }
 
-      restlen = len - (p - result);
-      if ((size_t) (namelen + (endp - encrypted) + restlen + 2) > buflen)
+      size_t restlen = len - (p - result);
+      if (__builtin_expect ((size_t) (namelen + (endp - encrypted)
+                                     + restlen + 2) > buflen, 0))
        {
          free (result2);
          free (result);
@@ -271,7 +276,7 @@ _nss_nis_getpwnam_r (const char *name, struct passwd *pwd,
   else
     {
     non_adjunct:
-      if ((size_t) (len + 1) > buflen)
+      if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
        {
          free (result);
          *errnop = ERANGE;
@@ -286,8 +291,9 @@ _nss_nis_getpwnam_r (const char *name, struct passwd *pwd,
     ++p;
   free (result);
 
-  parse_res = _nss_files_parse_pwent (p, pwd, data, buflen, errnop);
-  if (parse_res < 1)
+  int parse_res = _nss_files_parse_pwent (p, pwd, (void *) buffer, buflen,
+                                         errnop);
+  if (__builtin_expect (parse_res < 1, 0))
     {
       if (parse_res == -1)
         return NSS_STATUS_TRYAGAIN;
@@ -302,23 +308,21 @@ enum nss_status
 _nss_nis_getpwuid_r (uid_t uid, struct passwd *pwd,
                     char *buffer, size_t buflen, int *errnop)
 {
-  struct parser_data *data = (void *) buffer;
-  enum nss_status retval;
-  char *domain, *result, *p, *result2;
-  int len, nlen, parse_res, len2;
-  char buf[32];
-  size_t namelen;
-
-  if (yp_get_default_domain (&domain))
+  char *domain;
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
-  nlen = sprintf (buf, "%lu", (unsigned long int) uid);
+  char buf[32];
+  int nlen = snprintf (buf, sizeof (buf), "%lu", (unsigned long int) uid);
 
-  retval = yperr2nss (yp_match (domain, "passwd.byuid", buf,
-                               nlen, &result, &len));
+  char *result;
+  int len;
+  int yperr = yp_match (domain, "passwd.byuid", buf, nlen, &result, &len);
 
-  if (retval != NSS_STATUS_SUCCESS)
+  if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
     {
+      enum nss_status retval = yperr2nss (yperr);
+
       if (retval == NSS_STATUS_TRYAGAIN)
        *errnop = errno;
       return retval;
@@ -326,7 +330,10 @@ _nss_nis_getpwuid_r (uid_t uid, struct passwd *pwd,
 
   /* Check for adjunct style secret passwords.  They can be recognized
      by a password starting with "##".  */
-  p = strchr (result, ':');
+  char *result2;
+  int len2;
+  size_t namelen;
+  char *p = strchr (result, ':');
   if (p != NULL        /* This better should be true in all cases.  */
       && p[1] == '#' && p[2] == '#'
       && (namelen = p - result,
@@ -351,7 +358,8 @@ _nss_nis_getpwuid_r (uid_t uid, struct passwd *pwd,
        }
 
       restlen = len - (p - result);
-      if ((size_t) (namelen + (endp - encrypted) + restlen + 2) > buflen)
+      if (__builtin_expect ((size_t) (namelen + (endp - encrypted)
+                                     + restlen + 2) > buflen, 0))
        {
          free (result2);
          free (result);
@@ -370,7 +378,7 @@ _nss_nis_getpwuid_r (uid_t uid, struct passwd *pwd,
   else
     {
     non_adjunct:
-      if ((size_t) (len + 1) > buflen)
+      if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
        {
          free (result);
          *errnop = ERANGE;
@@ -385,8 +393,9 @@ _nss_nis_getpwuid_r (uid_t uid, struct passwd *pwd,
     ++p;
   free (result);
 
-  parse_res = _nss_files_parse_pwent (p, pwd, data, buflen, errnop);
-  if (parse_res < 1)
+  int parse_res = _nss_files_parse_pwent (p, pwd, (void *) buffer, buflen,
+                                         errnop);
+  if (__builtin_expect (parse_res < 1, 0))
     {
       if (parse_res == -1)
         return NSS_STATUS_TRYAGAIN;
index d1ab94371a685b403ba53953537d7942e2bcbd12..162f3572bfa6a74205dca6431b7b839ab2357232 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1996-1998,2000,2002,2003,2004 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1998,2000,2002,2003,2004,2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
 
@@ -54,7 +55,7 @@ static int
 saveit (int instatus, char *inkey, int inkeylen, char *inval,
         int invallen, char *indata)
 {
-  intern_t *intern = (intern_t *)indata;
+  intern_t *intern = (intern_t *) indata;
 
   if (instatus != YP_TRUE)
     return 1;
@@ -158,7 +159,7 @@ internal_nis_getrpcent_r (struct rpcent *rpc, char *buffer, size_t buflen,
         ++p;
 
       parse_res = _nss_files_parse_rpcent (p, rpc, pdata, buflen, errnop);
-      if (parse_res == -1)
+      if (__builtin_expect (parse_res == -1, 0))
        return NSS_STATUS_TRYAGAIN;
       data->next = data->next->next;
     }
@@ -186,21 +187,18 @@ enum nss_status
 _nss_nis_getrpcbyname_r (const char *name, struct rpcent *rpc,
                         char *buffer, size_t buflen, int *errnop)
 {
-  intern_t data = {NULL, NULL};
-  enum nss_status status;
-  int found;
-
   if (name == NULL)
     {
       *errnop = EINVAL;
       return NSS_STATUS_UNAVAIL;
     }
 
-  status = internal_nis_setrpcent (&data);
-  if (status != NSS_STATUS_SUCCESS)
+  intern_t data = { NULL, NULL };
+  enum nss_status status = internal_nis_setrpcent (&data);
+  if (__builtin_expect (status != NSS_STATUS_SUCCESS, 0))
     return status;
 
-  found = 0;
+  int found = 0;
   while (!found &&
          ((status = internal_nis_getrpcent_r (rpc, buffer, buflen, errnop,
                                              &data)) == NSS_STATUS_SUCCESS))
@@ -226,53 +224,52 @@ _nss_nis_getrpcbyname_r (const char *name, struct rpcent *rpc,
 
   internal_nis_endrpcent (&data);
 
-  if (!found && status == NSS_STATUS_SUCCESS)
+  if (__builtin_expect (!found && status == NSS_STATUS_SUCCESS, 0))
     return NSS_STATUS_NOTFOUND;
-  else
-    return status;
+
+  return status;
 }
 
 enum nss_status
 _nss_nis_getrpcbynumber_r (int number, struct rpcent *rpc,
                           char *buffer, size_t buflen, int *errnop)
 {
-  struct parser_data *data = (void *) buffer;
-  enum nss_status retval;
-  char *domain, *result, *p;
-  int len, nlen, parse_res;
-  char buf[32];
-
-  if (yp_get_default_domain (&domain))
+  char *domain;
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
-  nlen = sprintf (buf, "%d", number);
+  char buf[32];
+  int nlen = snprintf (buf, sizeof (buf), "%d", number);
 
-  retval = yperr2nss (yp_match (domain, "rpc.bynumber", buf,
-                                nlen, &result, &len));
+  char *result;
+  int len;
+  int yperr = yp_match (domain, "rpc.bynumber", buf, nlen, &result, &len);
 
-  if (retval != NSS_STATUS_SUCCESS)
+  if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
     {
+      enum nss_status retval = yperr2nss (yperr);
+
       if (retval == NSS_STATUS_TRYAGAIN)
        *errnop = errno;
       return retval;
     }
 
-  if ((size_t) (len + 1) > buflen)
+  if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
     {
       free (result);
       *errnop = ERANGE;
       return NSS_STATUS_TRYAGAIN;
     }
 
-  p = strncpy (buffer, result, len);
+  char *p = strncpy (buffer, result, len);
   buffer[len] = '\0';
   while (isspace (*p))
     ++p;
   free (result);
 
-  parse_res = _nss_files_parse_rpcent (p, rpc, data, buflen, errnop);
-
-  if (parse_res < 1)
+  int parse_res = _nss_files_parse_rpcent (p, rpc, (void  *) buffer, buflen,
+                                          errnop);
+  if (__builtin_expect (parse_res < 1, 0))
     {
       if (parse_res == -1)
        return NSS_STATUS_TRYAGAIN;
index 1e879d04e350ab62dbb13b1cbbb432224d07ed04..40772ae743c4bd16b977c9bd9525ae32cda1b384 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
 
@@ -27,6 +27,7 @@
 #include <rpcsvc/ypclnt.h>
 
 #include "nss-nis.h"
+#include <libnsl.h>
 
 
 /* Get the declaration of the parser function.  */
@@ -98,29 +99,26 @@ dosearch (int instatus, char *inkey, int inkeylen, char *inval,
 {
   struct search_t *req = (struct search_t *) indata;
 
-  if (instatus != YP_TRUE)
+  if (__builtin_expect (instatus != YP_TRUE, 0))
     return 1;
 
   if (inkey && inkeylen > 0 && inval && invallen > 0)
     {
-      struct parser_data *pdata = (void *) req->buffer;
-      int parse_res;
-      char *p;
-
-      if ((size_t) (invallen + 1) > req->buflen)
+      if (__builtin_expect ((size_t) (invallen + 1) > req->buflen, 0))
        {
          *req->errnop = ERANGE;
          req->status = NSS_STATUS_TRYAGAIN;
          return 1;
        }
 
-      p = strncpy (req->buffer, inval, invallen);
+      char *p = strncpy (req->buffer, inval, invallen);
       req->buffer[invallen] = '\0';
       while (isspace (*p))
         ++p;
 
-      parse_res = _nss_files_parse_servent (p, req->serv, pdata, req->buflen,
-                                           req->errnop);
+      int parse_res = _nss_files_parse_servent (p, req->serv,
+                                               (void *) req->buffer,
+                                               req->buflen, req->errnop);
       if (parse_res == -1)
        {
          req->status = NSS_STATUS_TRYAGAIN;
@@ -237,7 +235,7 @@ internal_nis_getservent_r (struct servent *serv, char *buffer,
         ++p;
 
       parse_res = _nss_files_parse_servent (p, serv, pdata, buflen, errnop);
-      if (parse_res == -1)
+      if (__builtin_expect (parse_res == -1, 0))
         return NSS_STATUS_TRYAGAIN;
       data->next = data->next->next;
     }
@@ -266,60 +264,56 @@ _nss_nis_getservbyname_r (const char *name, const char *protocol,
                          struct servent *serv, char *buffer, size_t buflen,
                          int *errnop)
 {
-  enum nss_status status;
-  char *domain;
-
   if (name == NULL)
     {
       *errnop = EINVAL;
       return NSS_STATUS_UNAVAIL;
     }
 
-  if (yp_get_default_domain (&domain))
+  char *domain;
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
   /* If the protocol is given, we could try if our NIS server knows
      about services.byservicename map. If yes, we only need one query.  */
-  char key[strlen (name) + (protocol ? strlen (protocol) : 0) + 2];
-  char *cp, *result;
-  size_t keylen, len;
-  int int_len;
+  size_t keylen = strlen (name) + 1 + (protocol ? strlen (protocol) : 0);
+  char key[keylen + 1];
 
   /* key is: "name/proto" */
-  cp = stpcpy (key, name);
-  if (protocol)
+  char *cp = stpcpy (key, name);
+  if (protocol != NULL)
     {
       *cp++ = '/';
       strcpy (cp, protocol);
     }
-  keylen = strlen (key);
-  status = yperr2nss (yp_match (domain, "services.byservicename", key,
-                               keylen, &result, &int_len));
-  len = int_len;
+
+  char *result;
+  int int_len;
+  enum nss_status status = yperr2nss (yp_match (domain,
+                                               "services.byservicename", key,
+                                               keylen, &result, &int_len));
+  size_t len = int_len;
 
   /* If we found the key, it's ok and parse the result. If not,
      fall through and parse the complete table. */
-  if (status == NSS_STATUS_SUCCESS)
+  if (__builtin_expect (status == NSS_STATUS_SUCCESS, 1))
     {
-      struct parser_data *pdata = (void *) buffer;
-      int parse_res;
-      char *p;
-
-      if ((size_t) (len + 1) > buflen)
+      if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
        {
          free (result);
          *errnop = ERANGE;
          return NSS_STATUS_TRYAGAIN;
        }
 
-      p = strncpy (buffer, result, len);
+      char *p = strncpy (buffer, result, len);
       buffer[len] = '\0';
       while (isspace (*p))
        ++p;
       free (result);
-      parse_res = _nss_files_parse_servent (p, serv, pdata,
-                                           buflen, errnop);
-      if (parse_res < 0)
+
+      int parse_res = _nss_files_parse_servent (p, serv, (void *) buffer,
+                                               buflen, errnop);
+      if (__builtin_expect (parse_res < 0, 0))
        {
          if (parse_res == -1)
            return NSS_STATUS_TRYAGAIN;
@@ -331,7 +325,7 @@ _nss_nis_getservbyname_r (const char *name, const char *protocol,
     }
 
   /* Check if it is safe to rely on services.byservicename.  */
-  if (_nis_default_nss () & NSS_FLAG_SERVICES_AUTHORITATIVE)
+  if (_nsl_default_nss () & NSS_FLAG_SERVICES_AUTHORITATIVE)
     return status;
 
   struct ypall_callback ypcb;
@@ -360,10 +354,8 @@ _nss_nis_getservbyport_r (int port, const char *protocol,
                          struct servent *serv, char *buffer,
                          size_t buflen, int *errnop)
 {
-  enum nss_status status;
   char *domain;
-
-  if (yp_get_default_domain (&domain))
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
   /* If the protocol is given, we only need one query.
@@ -372,48 +364,45 @@ _nss_nis_getservbyport_r (int port, const char *protocol,
   const char *proto = protocol != NULL ? protocol : "tcp";
   do
     {
+      /* key is: "port/proto" */
       char key[sizeof (int) * 3 + strlen (proto) + 2];
+      size_t keylen = snprintf (key, sizeof (key), "%d/%s", ntohs (port),
+                               proto);
+
       char *result;
-      size_t keylen, len;
       int int_len;
-
-      /* key is: "port/proto" */
-      keylen = snprintf (key, sizeof (key), "%d/%s", ntohs (port), proto);
-      status = yperr2nss (yp_match (domain, "services.byname", key,
-                                   keylen, &result, &int_len));
-      len = int_len;
+      enum nss_status status = yperr2nss (yp_match (domain, "services.byname",
+                                                   key, keylen, &result,
+                                                   &int_len));
+      size_t len = int_len;
 
       /* If we found the key, it's ok and parse the result. If not,
         fall through and parse the complete table. */
       if (status == NSS_STATUS_SUCCESS)
        {
-         struct parser_data *pdata = (void *) buffer;
-         int parse_res;
-         char *p;
-
-         if ((size_t) (len + 1) > buflen)
+         if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
            {
              free (result);
              *errnop = ERANGE;
              return NSS_STATUS_TRYAGAIN;
            }
 
-         p = strncpy (buffer, result, len);
+         char  *p = strncpy (buffer, result, len);
          buffer[len] = '\0';
          while (isspace (*p))
            ++p;
          free (result);
-         parse_res = _nss_files_parse_servent (p, serv, pdata,
-                                               buflen, errnop);
-         if (parse_res < 0)
+         int parse_res = _nss_files_parse_servent (p, serv, (void *) buffer,
+                                                   buflen, errnop);
+         if (__builtin_expect (parse_res < 0, 0))
            {
              if (parse_res == -1)
                return NSS_STATUS_TRYAGAIN;
              else
                return NSS_STATUS_NOTFOUND;
            }
-         else
-           return NSS_STATUS_SUCCESS;
+
+         return NSS_STATUS_SUCCESS;
        }
     }
   while (protocol == NULL && (proto[0] == 't' ? (proto = "udp") : NULL));
@@ -434,7 +423,8 @@ _nss_nis_getservbyport_r (int port, const char *protocol,
   req.buflen = buflen;
   req.errnop = errnop;
   req.status = NSS_STATUS_NOTFOUND;
-  status = yperr2nss (yp_all (domain, "services.byname", &ypcb));
+  enum nss_status status = yperr2nss (yp_all (domain, "services.byname",
+                                             &ypcb));
 
   if (status != NSS_STATUS_SUCCESS)
     return status;
index 99a9ed5f48baa121d2ecfb5e74c877004d3c3b3c..820bfb25e52eeed330c1485733eb8f5e834d23e8 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1998,2001,2002,2003,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
 
@@ -69,48 +69,53 @@ internal_nis_getspent_r (struct spwd *sp, char *buffer, size_t buflen,
                         int *errnop)
 {
   struct parser_data *data = (void *) buffer;
-  char *domain, *result, *outkey;
-  int len, keylen, parse_res;
 
-  if (yp_get_default_domain (&domain))
+  char *domain;
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
   /* Get the next entry until we found a correct one. */
+  int parse_res;
   do
     {
-      enum nss_status retval;
-      char *p;
+      char *result;
+      char *outkey;
+      int len;
+      int keylen;
+      int yperr;
 
       if (new_start)
-        retval = yperr2nss (yp_first (domain, "shadow.byname",
-                                      &outkey, &keylen, &result, &len));
+        yperr = yp_first (domain, "shadow.byname", &outkey, &keylen, &result,
+                         &len);
       else
-        retval = yperr2nss ( yp_next (domain, "shadow.byname",
-                                      oldkey, oldkeylen,
-                                      &outkey, &keylen, &result, &len));
+        yperr = yp_next (domain, "shadow.byname", oldkey, oldkeylen, &outkey,
+                        &keylen, &result, &len);
 
-      if (retval != NSS_STATUS_SUCCESS)
+      if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
         {
+         enum nss_status retval = yperr2nss (yperr);
+
          if (retval == NSS_STATUS_TRYAGAIN)
            *errnop = errno;
           return retval;
         }
 
-      if ((size_t) (len + 1) > buflen)
+      if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
         {
           free (result);
          *errnop = ERANGE;
           return NSS_STATUS_TRYAGAIN;
         }
 
-      p = strncpy (buffer, result, len);
+      char *p = strncpy (buffer, result, len);
       buffer[len] = '\0';
       while (isspace (*p))
         ++p;
       free (result);
 
-      parse_res = _nss_files_parse_spent (p, sp, data, buflen, errnop);
-      if (parse_res == -1)
+      parse_res = _nss_files_parse_spent (p, sp, (void *) buffer, buflen,
+                                         errnop);
+      if (__builtin_expect  (parse_res == -1, 0))
        {
          free (outkey);
          *errnop = ERANGE;
@@ -146,45 +151,46 @@ enum nss_status
 _nss_nis_getspnam_r (const char *name, struct spwd *sp,
                     char *buffer, size_t buflen, int *errnop)
 {
-  struct parser_data *data = (void *) buffer;
-  enum nss_status retval;
-  char *domain, *result, *p;
-  int len, parse_res;
-
   if (name == NULL)
     {
       *errnop = EINVAL;
       return NSS_STATUS_UNAVAIL;
     }
 
-  if (yp_get_default_domain (&domain))
+  char *domain;
+  if (__builtin_expect (yp_get_default_domain (&domain), 0))
     return NSS_STATUS_UNAVAIL;
 
-  retval = yperr2nss (yp_match (domain, "shadow.byname", name,
-                               strlen (name), &result, &len));
+  char *result;
+  int len;
+  int yperr = yp_match (domain, "shadow.byname", name, strlen (name), &result,
+                       &len);
 
-  if (retval != NSS_STATUS_SUCCESS)
+  if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
     {
+      enum nss_status retval = yperr2nss (yperr);
+
       if (retval == NSS_STATUS_TRYAGAIN)
        *errnop = errno;
       return retval;
     }
 
-  if ((size_t) (len + 1) > buflen)
+  if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
     {
       free (result);
       *errnop = ERANGE;
       return NSS_STATUS_TRYAGAIN;
     }
 
-  p = strncpy (buffer, result, len);
+  char *p = strncpy (buffer, result, len);
   buffer[len] = '\0';
   while (isspace (*p))
     ++p;
   free (result);
 
-  parse_res = _nss_files_parse_spent (p, sp, data, buflen, errnop);
-  if (parse_res < 1)
+  int parse_res = _nss_files_parse_spent (p, sp, (void *) buffer, buflen,
+                                         errnop);
+  if (__builtin_expect (parse_res < 1, 0))
     {
       if (parse_res == -1)
        return NSS_STATUS_TRYAGAIN;
index d7926e15668ce8865e8d75451bbddf23e88fcca6..57858721a189b88a7a307891199e5b25554b95e2 100644 (file)
@@ -36,11 +36,11 @@ static u_long next_entry;
 static nis_name tablename_val;
 static size_t tablename_len;
 
-#define NISENTRYVAL(idx,col,res) \
-        ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val)
+#define NISENTRYVAL(idx, col, res) \
+        (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val)
 
-#define NISENTRYLEN(idx,col,res) \
-        ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len)
+#define NISENTRYLEN(idx, col, res) \
+        (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
 
 static enum nss_status
 _nss_create_tablename (int *errnop)
@@ -79,16 +79,12 @@ _nss_nisplus_parse_aliasent (nis_result *result, unsigned long entry,
     return 0;
 
   if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS)
-      || __type_of (&result->objects.objects_val[entry]) != NIS_ENTRY_OBJ
-      || strcmp (result->objects.objects_val[entry].EN_data.en_type,
+      || __type_of (&NIS_RES_OBJECT (result)[entry]) != NIS_ENTRY_OBJ
+      || strcmp (NIS_RES_OBJECT (result)[entry].EN_data.en_type,
                 "mail_aliases") != 0
-      || result->objects.objects_val[entry].EN_data.en_cols.en_cols_len < 2)
+      || NIS_RES_OBJECT (result)[entry].EN_data.en_cols.en_cols_len < 2)
     return 0;
 
-  char *first_unused = buffer + NISENTRYLEN (0, 1, result) + 1;
-  size_t room_left = (buflen - (buflen % __alignof__ (char *))
-                     - NISENTRYLEN (0, 1, result) - 2);
-
   if (NISENTRYLEN (entry, 1, result) >= buflen)
     {
       /* The line is too long for our buffer.  */
@@ -101,13 +97,15 @@ _nss_nisplus_parse_aliasent (nis_result *result, unsigned long entry,
                        NISENTRYLEN (entry, 1, result));
   *cp = '\0';
 
-  if (NISENTRYLEN(entry, 0, result) >= room_left)
-    goto no_more_room;
+  char *first_unused = cp + 1;
+  size_t room_left = buflen - (first_unused - buffer);
 
   alias->alias_local = 0;
   alias->alias_members_len = 0;
-  *first_unused = '\0';
-  ++first_unused;
+
+  if (NISENTRYLEN (entry, 0, result) >= room_left)
+    goto no_more_room;
+
   cp = __stpncpy (first_unused, NISENTRYVAL (entry, 0, result),
                  NISENTRYLEN (entry, 0, result));
   *cp = '\0';
@@ -118,11 +116,20 @@ _nss_nisplus_parse_aliasent (nis_result *result, unsigned long entry,
   if (cp != NULL)
     *cp = '\0';
 
-  first_unused += strlen (alias->alias_name) +1;
+  size_t len = strlen (alias->alias_name) + 1;
+  first_unused += len;
+  room_left -= len;
+
   /* Adjust the pointer so it is aligned for
      storing pointers.  */
-  first_unused += __alignof__ (char *) - 1;
-  first_unused -= ((first_unused - (char *) 0) % __alignof__ (char *));
+  size_t adjust = ((__alignof__ (char *)
+                   - (first_unused - (char *) 0) % __alignof__ (char *))
+                  % __alignof__ (char *));
+  if (room_left < adjust)
+    goto no_more_room;
+  first_unused += adjust;
+  room_left -= adjust;
+
   alias->alias_members = (char **) first_unused;
 
   char *line = buffer;
@@ -146,8 +153,10 @@ _nss_nisplus_parse_aliasent (nis_result *result, unsigned long entry,
       if (line != alias->alias_members[alias->alias_members_len])
        {
          *line++ = '\0';
-         alias->alias_members_len++;
+         ++alias->alias_members_len;
        }
+      else if (*line == ',')
+       ++line;
     }
 
   return alias->alias_members_len == 0 ? 0 : 1;
@@ -304,10 +313,18 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias,
     }
 
   if (__builtin_expect (niserr2nss (result->status) != NSS_STATUS_SUCCESS, 0))
-    return niserr2nss (result->status);
+    {
+      enum nss_status status = niserr2nss (result->status);
+      nis_freeresult (result);
+      return status;
+    }
 
   parse_res = _nss_nisplus_parse_aliasent (result, 0, alias,
                                           buffer, buflen, errnop);
+
+  /* We do not need the lookup result anymore.  */
+  nis_freeresult (result);
+
   if (__builtin_expect (parse_res < 1, 0))
     {
       __set_errno (olderr);
index ca0a9e24815785686216e49ea41c311d00d53427..262042724386fb68aed409e2ea4b6da3dcfe26fd 100644 (file)
@@ -38,11 +38,11 @@ static nis_name tablename_val;
 static u_long tablename_len;
 
 
-#define NISENTRYVAL(idx,col,res) \
-        ((res)->objects.objects_val[(idx)].zo_data.objdata_u.en_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val)
+#define NISENTRYVAL(idx, col, res) \
+        (NIS_RES_OBJECT (res)[idx].zo_data.objdata_u.en_data.en_cols.en_cols_val[col].ec_value.ec_value_val)
 
-#define NISENTRYLEN(idx,col,res) \
-        ((res)->objects.objects_val[(idx)].zo_data.objdata_u.en_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len)
+#define NISENTRYLEN(idx, col, res) \
+        (NIS_RES_OBJECT (res)[idx].zo_data.objdata_u.en_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
 
 static int
 _nss_nisplus_parse_etherent (nis_result *result, struct etherent *ether,
@@ -55,7 +55,7 @@ _nss_nisplus_parse_etherent (nis_result *result, struct etherent *ether,
     return 0;
 
   if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS)
-      || result->objects.objects_len != 1
+      || NIS_RES_NUMOBJ (result) != 1
       || __type_of (NIS_RES_OBJECT (result)) != NIS_ENTRY_OBJ
       || strcmp (NIS_RES_OBJECT (result)->EN_data.en_type,
                 "ethers_tbl") != 0
@@ -63,13 +63,15 @@ _nss_nisplus_parse_etherent (nis_result *result, struct etherent *ether,
     return 0;
 
   /* Generate the ether entry format and use the normal parser */
-  if (NISENTRYLEN (0, 0, result) +1 > room_left)
+  if (NISENTRYLEN (0, 0, result) + 1 > room_left)
     {
       *errnop = ERANGE;
       return -1;
     }
-  strncpy (p, NISENTRYVAL (0, 0, result), NISENTRYLEN (0, 0, result));
-  room_left -= (NISENTRYLEN (0, 0, result) +1);
+  char *cp = __stpncpy (p, NISENTRYVAL (0, 0, result),
+                       NISENTRYLEN (0, 0, result));
+  *cp = '\0';
+  room_left -= NISENTRYLEN (0, 0, result) + 1;
   ether->e_name = p;
 
   struct ether_addr *ea = ether_aton (NISENTRYVAL (0, 1, result));
@@ -261,17 +263,18 @@ _nss_nisplus_gethostton_r (const char *name, struct etherent *eth,
 
   int parse_res = _nss_nisplus_parse_etherent (result, eth, buffer,
                                               buflen, errnop);
+
+  /* We do not need the lookup result anymore.  */
+  nis_freeresult (result);
+
   if (__builtin_expect (parse_res < 1, 0))
     {
       __set_errno (olderr);
 
       if (parse_res == -1)
-       {
-         nis_freeresult (result);
-         return NSS_STATUS_TRYAGAIN;
-       }
-      else
-       return NSS_STATUS_NOTFOUND;
+       return NSS_STATUS_TRYAGAIN;
+
+      return NSS_STATUS_NOTFOUND;
     }
 
   return NSS_STATUS_SUCCESS;
@@ -326,13 +329,14 @@ _nss_nisplus_getntohost_r (const struct ether_addr *addr, struct etherent *eth,
 
   int parse_res = _nss_nisplus_parse_etherent (result, eth, buffer,
                                               buflen, errnop);
+
+  /* We do not need the lookup result anymore.  */
+  nis_freeresult (result);
+
   if (__builtin_expect (parse_res < 1, 0))
     {
       if (parse_res == -1)
-       {
-         nis_freeresult (result);
-         return NSS_STATUS_TRYAGAIN;
-       }
+       return NSS_STATUS_TRYAGAIN;
 
       return NSS_STATUS_NOTFOUND;
     }
index bf002d6dd796cf7884a30013ee76a560f4fa8c42..023e18f93dea8d18ab9c2928e10e8f876f0fbb2e 100644 (file)
@@ -36,15 +36,16 @@ static nis_result *result;
 static nis_name tablename_val;
 static u_long tablename_len;
 
-#define NISENTRYVAL(idx,col,res) \
-        ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val)
+#define NISENTRYVAL(idx, col, res) \
+        (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val)
 
-#define NISENTRYLEN(idx,col,res) \
-        ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len)
+#define NISENTRYLEN(idx, col, res) \
+        (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
 
 /* Get implementation for some internal functions. */
 #include <resolv/mapv4v6addr.h>
 
+
 static int
 _nss_nisplus_parse_hostent (nis_result *result, int af, struct hostent *host,
                            char *buffer, size_t buflen, int *errnop,
@@ -53,27 +54,26 @@ _nss_nisplus_parse_hostent (nis_result *result, int af, struct hostent *host,
   unsigned int i;
   char *first_unused = buffer;
   size_t room_left = buflen;
-  char *data, *p, *line;
 
   if (result == NULL)
     return 0;
 
   if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS) ||
-      __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ ||
-      strcmp(result->objects.objects_val[0].EN_data.en_type,
-            "hosts_tbl") != 0 ||
-      result->objects.objects_val[0].EN_data.en_cols.en_cols_len < 4)
+      __type_of (NIS_RES_OBJECT (result)) != NIS_ENTRY_OBJ ||
+      strcmp(NIS_RES_OBJECT (result)[0].EN_data.en_type, "hosts_tbl") != 0 ||
+      NIS_RES_OBJECT (result)[0].EN_data.en_cols.en_cols_len < 4)
     return 0;
 
-  if (room_left < NISENTRYLEN (0, 2, result) + 1)
+  char *data = first_unused;
+
+  if (room_left < (af == AF_INET6 || (flags & AI_V4MAPPED) != 0
+                  ? IN6ADDRSZ : INADDRSZ))
     {
     no_more_room:
       *errnop = ERANGE;
       return -1;
     }
 
-  data = first_unused;
-
   /* Parse address.  */
   if (af == AF_INET && inet_pton (af, NISENTRYVAL (0, 2, result), data) > 0)
     {
@@ -99,51 +99,53 @@ _nss_nisplus_parse_hostent (nis_result *result, int af, struct hostent *host,
     /* Illegal address: ignore line.  */
     return 0;
 
-  first_unused+=host->h_length;
-  room_left-=host->h_length;
+  first_unused += host->h_length;
+  room_left -= host->h_length;
 
   if (NISENTRYLEN (0, 0, result) + 1 > room_left)
     goto no_more_room;
 
-  p = __stpncpy (first_unused, NISENTRYVAL (0, 0, result),
-                NISENTRYLEN (0, 0, result));
-  *p = '\0';
-  room_left -= (NISENTRYLEN (0, 0, result) + 1);
   host->h_name = first_unused;
-  first_unused += NISENTRYLEN (0, 0, result) +1;
-  p = first_unused;
-
-  line = p;
-  for (i = 0; i < result->objects.objects_len; ++i)
+  first_unused = __stpncpy (first_unused, NISENTRYVAL (0, 0, result),
+                           NISENTRYLEN (0, 0, result));
+  *first_unused++ = '\0';
+  room_left -= NISENTRYLEN (0, 0, result) + 1;
+
+  /* XXX Rewrite at some point to allocate the array first and then
+     copy the strings.  It wasteful to first concatenate the strings
+     to just split them again later.  */
+  char *line = first_unused;
+  for (i = 0; i < NIS_RES_NUMOBJ (result); ++i)
     {
       if (strcmp (NISENTRYVAL (i, 1, result), host->h_name) != 0)
        {
          if (NISENTRYLEN (i, 1, result) + 2 > room_left)
            goto no_more_room;
 
-         *p++ = ' ';
-         p = __stpncpy (p, NISENTRYVAL (i, 1, result),
-                        NISENTRYLEN (i, 1, result));
-         *p = '\0';
-         room_left -= (NISENTRYLEN (i, 1, result) + 1);
+         *first_unused++ = ' ';
+         first_unused = __stpncpy (first_unused, NISENTRYVAL (i, 1, result),
+                                   NISENTRYLEN (i, 1, result));
+         *first_unused = '\0';
+         room_left -= NISENTRYLEN (i, 1, result) + 1;
        }
     }
-  *p++ = '\0';
-  first_unused = p;
+  *first_unused++ = '\0';
 
   /* Adjust the pointer so it is aligned for
      storing pointers.  */
-  first_unused += __alignof__ (char *) - 1;
-  first_unused -= ((first_unused - (char *) 0) % __alignof__ (char *));
-  host->h_addr_list = (char **) first_unused;
-  if (room_left < 2 * sizeof (char *))
+  size_t adjust = ((__alignof__ (char *)
+                   - (first_unused - (char *) 0) % __alignof__ (char *))
+                  % __alignof__ (char *));
+  if (room_left < adjust + 3 * sizeof (char *))
     goto no_more_room;
+  first_unused += adjust;
+  room_left -= adjust;
+  host->h_addr_list = (char **) first_unused;
 
-  room_left -= (2 * sizeof (char *));
+  room_left -= 3 * sizeof (char *);
   host->h_addr_list[0] = data;
   host->h_addr_list[1] = NULL;
   host->h_aliases = &host->h_addr_list[2];
-  host->h_aliases[0] = NULL;
 
   i = 0;
   while (*line != '\0')
@@ -159,23 +161,21 @@ _nss_nisplus_parse_hostent (nis_result *result, int af, struct hostent *host,
        goto no_more_room;
 
       room_left -= sizeof (char *);
-      host->h_aliases[i] = line;
+      host->h_aliases[i++] = line;
 
       while (*line != '\0' && *line != ' ')
        ++line;
 
       if (*line == ' ')
-       {
-         *line = '\0';
-         ++line;
-         ++i;
-       }
-      else
-       host->h_aliases[i+1] = NULL;
+       *line++ = '\0';
     }
+
+  host->h_aliases[i] = NULL;
+
   return 1;
 }
 
+
 static enum nss_status
 _nss_create_tablename (int *errnop)
 {
index 31a8cdf0976c27044e24c11c3f717e60d7bb28ff..24303b1474c25afb609cde3a25b753b033d9a6ee 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
 
 #include "nss-nisplus.h"
 
-#define NISENTRYVAL(idx,col,res) \
-        ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val)
+#define NISENTRYVAL(idx, col, res) \
+        (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val)
 
-#define NISENTRYLEN(idx,col,res) \
-        ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len)
+#define NISENTRYLEN(idx, col, res) \
+        (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
 
 enum nss_status
 _nss_nisplus_getnetgrent_r (struct __netgrent *result, char *buffer,
index 960c0558e90c7b7b65a8c2efd6fbe2358bd209a7..468520c937e73d1303edff49d15cede93b1d04f8 100644 (file)
@@ -36,11 +36,11 @@ static nis_result *result;
 static nis_name tablename_val;
 static u_long tablename_len;
 
-#define NISENTRYVAL(idx,col,res) \
-        ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val)
+#define NISENTRYVAL(idx, col, res) \
+        (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val)
 
-#define NISENTRYLEN(idx,col,res) \
-        ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len)
+#define NISENTRYLEN(idx, col, res) \
+        (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
 
 
 static int
@@ -54,10 +54,10 @@ _nss_nisplus_parse_netent (nis_result *result, struct netent *network,
     return 0;
 
   if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS)
-      || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ
-      || strcmp (result->objects.objects_val[0].EN_data.en_type,
+      || __type_of (NIS_RES_OBJECT (result)) != NIS_ENTRY_OBJ
+      || strcmp (NIS_RES_OBJECT (result)[0].EN_data.en_type,
                 "networks_tbl") != 0
-      || result->objects.objects_val[0].EN_data.en_cols.en_cols_len < 3)
+      || NIS_RES_OBJECT (result)[0].EN_data.en_cols.en_cols_len < 3)
     return 0;
 
   if (NISENTRYLEN (0, 0, result) >= room_left)
@@ -72,39 +72,45 @@ _nss_nisplus_parse_netent (nis_result *result, struct netent *network,
            NISENTRYLEN (0, 0, result));
   first_unused[NISENTRYLEN (0, 0, result)] = '\0';
   network->n_name = first_unused;
-  room_left -= (strlen (first_unused) +1);
-  first_unused += strlen (first_unused) +1;
+  size_t len = strlen (first_unused) + 1;
+  room_left -= len;
+  first_unused += len;
+
   network->n_addrtype = 0;
   network->n_net = inet_network (NISENTRYVAL (0, 2, result));
-  char *p = first_unused;
 
-  char *line = p;
-  for (unsigned int i = 0; i < result->objects.objects_len; ++i)
+  /* XXX Rewrite at some point to allocate the array first and then
+     copy the strings.  It wasteful to first concatenate the strings
+     to just split them again later.  */
+  char *line = first_unused;
+  for (unsigned int i = 0; i < NIS_RES_NUMOBJ (result); ++i)
     {
       if (strcmp (NISENTRYVAL (i, 1, result), network->n_name) != 0)
         {
           if (NISENTRYLEN (i, 1, result) + 2 > room_left)
            goto no_more_room;
 
-         *p++ = ' ';
-          p = __stpncpy (p, NISENTRYVAL (i, 1, result),
-                        NISENTRYLEN (i, 1, result));
-          *p = '\0';
+         *first_unused++ = ' ';
+          first_unused = __stpncpy (first_unused, NISENTRYVAL (i, 1, result),
+                                   NISENTRYLEN (i, 1, result));
           room_left -= (NISENTRYLEN (i, 1, result) + 1);
         }
     }
-  *p++ = '\0';
-  first_unused = p;
+  *first_unused++ = '\0';
 
   /* Adjust the pointer so it is aligned for
      storing pointers.  */
-  first_unused += __alignof__ (char *) - 1;
-  first_unused -= ((first_unused - (char *) 0) % __alignof__ (char *));
-  network->n_aliases = (char **) first_unused;
-  if (room_left < 2 * sizeof (char *))
+  size_t adjust = ((__alignof__ (char *)
+                   - (first_unused - (char *) 0) % __alignof__ (char *))
+                  % __alignof__ (char *));
+  if (room_left < adjust + sizeof (char *))
     goto no_more_room;
-  room_left -= (2 * sizeof (char *));
-  network->n_aliases[0] = NULL;
+  first_unused += adjust;
+  room_left -= adjust;
+  network->n_aliases = (char **) first_unused;
+
+  /* For the terminating NULL pointer.  */
+  room_left -= sizeof (char *);
 
   unsigned int i = 0;
   while (*line != '\0')
@@ -120,24 +126,20 @@ _nss_nisplus_parse_netent (nis_result *result, struct netent *network,
        goto no_more_room;
 
       room_left -= sizeof (char *);
-      network->n_aliases[i] = line;
+      network->n_aliases[i++] = line;
 
       while (*line != '\0' && *line != ' ')
         ++line;
 
       if (*line == ' ')
-       {
-         *line = '\0';
-         ++line;
-          ++i;
-        }
-      else
-        network->n_aliases[i + 1] = NULL;
+       *line++ = '\0';
     }
+  network->n_aliases[i] = NULL;
 
   return 1;
 }
 
+
 static enum nss_status
 _nss_create_tablename (int *errnop)
 {
@@ -443,6 +445,7 @@ _nss_nisplus_getnetbyaddr_r (uint32_t addr, const int type,
                   removed (one by one) */
                buf2[b2len - 2] = '\0';
                b2len -= 2;
+               nis_freeresult (result);
                continue;
              }
 
index b61733a6280a389370c9d8542b93bf2966427d5d..e41751fff2e62b2aeb0e12062b0e3fe72b8b0905 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1999, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
 #include "nisplus-parser.h"
 
 #define NISENTRYVAL(idx,col,res) \
-        ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val)
+        (NIS_RES_OBJECT (res)[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val)
 
 #define NISENTRYLEN(idx,col,res) \
-        ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len)
+        (NIS_RES_OBJECT (res)[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len)
 
 
 int
@@ -44,11 +44,10 @@ _nss_nisplus_parse_pwent (nis_result *result, struct passwd *pw,
     return 0;
 
   if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS)
-      || result->objects.objects_len != 1
-      || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ
-      || strcmp (result->objects.objects_val->EN_data.en_type,
-                "passwd_tbl") != 0
-      || result->objects.objects_val->EN_data.en_cols.en_cols_len < 7)
+      || NIS_RES_NUMOBJ (result) != 1
+      || __type_of (NIS_RES_OBJECT (result)) != NIS_ENTRY_OBJ
+      || strcmp (NIS_RES_OBJECT (result)->EN_data.en_type, "passwd_tbl") != 0
+      || NIS_RES_OBJECT (result)->EN_data.en_cols.en_cols_len < 7)
     return 0;
 
   if (NISENTRYLEN (0, 0, result) >= room_left)
@@ -90,8 +89,6 @@ _nss_nisplus_parse_pwent (nis_result *result, struct passwd *pw,
   if (len == 0) /* If we don't have a uid, it's an invalid shadow entry */
     return 0;
   pw->pw_uid = strtoul (first_unused, NULL, 10);
-  room_left -= (len + 1);
-  first_unused += (len + 1);
 
   if (NISENTRYLEN (0, 3, result) >= room_left)
     goto no_more_room;
@@ -103,8 +100,6 @@ _nss_nisplus_parse_pwent (nis_result *result, struct passwd *pw,
   if (len == 0) /* If we don't have a gid, it's an invalid shadow entry */
     return 0;
   pw->pw_gid = strtoul (first_unused, NULL, 10);
-  room_left -= (len + 1);
-  first_unused += (len + 1);
 
   if (NISENTRYLEN(0, 4, result) >= room_left)
     goto no_more_room;
@@ -143,6 +138,7 @@ _nss_nisplus_parse_pwent (nis_result *result, struct passwd *pw,
 }
 libnss_nisplus_hidden_def (_nss_nisplus_parse_pwent)
 
+
 int
 _nss_nisplus_parse_grent (nis_result *result, u_long entry, struct group *gr,
                          char *buffer, size_t buflen, int *errnop)
@@ -157,10 +153,10 @@ _nss_nisplus_parse_grent (nis_result *result, u_long entry, struct group *gr,
     return 0;
 
   if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS)
-      || __type_of(result->objects.objects_val) != NIS_ENTRY_OBJ
-      || strcmp (result->objects.objects_val[entry].EN_data.en_type,
+      || __type_of(NIS_RES_OBJECT (result)) != NIS_ENTRY_OBJ
+      || strcmp (NIS_RES_OBJECT (result)[entry].EN_data.en_type,
                 "group_tbl") != 0
-      || result->objects.objects_val[entry].EN_data.en_cols.en_cols_len < 4)
+      || NIS_RES_OBJECT (result)[entry].EN_data.en_cols.en_cols_len < 4)
     return 0;
 
   if (NISENTRYLEN (entry, 0, result) >= room_left)
@@ -199,11 +195,9 @@ _nss_nisplus_parse_grent (nis_result *result, u_long entry, struct group *gr,
           NISENTRYLEN (entry, 2, result));
   first_unused[NISENTRYLEN (entry, 2, result)] = '\0';
   len = strlen (first_unused);
-  if (len == 0) /* We should always have an gid */
+  if (len == 0) /* We should always have a gid */
     return 0;
   gr->gr_gid = strtoul (first_unused, NULL, 10);
-  room_left -= (strlen (first_unused) + 1);
-  first_unused += strlen (first_unused) + 1;
 
   if (NISENTRYLEN (entry, 3, result) >= room_left)
     goto no_more_room;
@@ -217,8 +211,13 @@ _nss_nisplus_parse_grent (nis_result *result, u_long entry, struct group *gr,
   first_unused += (len + 1);
   /* Adjust the pointer so it is aligned for
      storing pointers.  */
-  first_unused += __alignof__ (char *) - 1;
-  first_unused -= ((first_unused - (char *) 0) % __alignof__ (char *));
+  size_t adjust = ((__alignof__ (char *)
+                   - (first_unused - (char *) 0) % __alignof__ (char *))
+                  % __alignof__ (char *));
+  if (room_left < adjust)
+    goto no_more_room;
+  first_unused += adjust;
+  room_left -= adjust;
   gr->gr_mem = (char **) first_unused;
 
   count = 0;
@@ -243,12 +242,10 @@ _nss_nisplus_parse_grent (nis_result *result, u_long entry, struct group *gr,
        {
          int is = isspace (*line);
 
-         *line = '\0';
+         *line++ = '\0';
          if (is)
            while (*line != '\0' && (*line == ',' || isspace (*line)))
              ++line;
-         else
-           ++line;
        }
     }
   if (room_left < sizeof (char *))
@@ -260,6 +257,7 @@ _nss_nisplus_parse_grent (nis_result *result, u_long entry, struct group *gr,
 }
 libnss_nisplus_hidden_def (_nss_nisplus_parse_grent)
 
+
 int
 _nss_nisplus_parse_spent (nis_result *result, struct spwd *sp,
                          char *buffer, size_t buflen, int *errnop)
@@ -272,11 +270,10 @@ _nss_nisplus_parse_spent (nis_result *result, struct spwd *sp,
     return 0;
 
   if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS)
-      || result->objects.objects_len != 1
-      || __type_of(result->objects.objects_val) != NIS_ENTRY_OBJ
-      || strcmp (result->objects.objects_val->EN_data.en_type,
-                "passwd_tbl") != 0
-      || result->objects.objects_val[0].EN_data.en_cols.en_cols_len < 8)
+      || NIS_RES_NUMOBJ (result) != 1
+      || __type_of(NIS_RES_OBJECT (result)) != NIS_ENTRY_OBJ
+      || strcmp (NIS_RES_OBJECT (result)->EN_data.en_type, "passwd_tbl") != 0
+      || NIS_RES_OBJECT (result)->EN_data.en_cols.en_cols_len < 8)
     return 0;
 
   if (NISENTRYLEN (0, 0, result) >= room_left)
@@ -314,10 +311,8 @@ _nss_nisplus_parse_spent (nis_result *result, struct spwd *sp,
 
   if (NISENTRYLEN (0, 7, result) > 0)
     {
-      char *line, *cp;
-
-      line = NISENTRYVAL (0, 7, result);
-      cp = strchr (line, ':');
+      char *line = NISENTRYVAL (0, 7, result);
+      char *cp = strchr (line, ':');
       if (cp == NULL)
        return 1;
       *cp++ = '\0';
index a3370aa85eb800cd0ab4c3508b99d9f9956ad6eb..0b96153819d490d29b1dfa1b273f0e4eb78d0e77 100644 (file)
@@ -35,20 +35,20 @@ static nis_result *result;
 static nis_name tablename_val;
 static u_long tablename_len;
 
-#define NISENTRYVAL(idx,col,res) \
-        ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val)
+#define NISENTRYVAL(idx, col, res) \
+        (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val)
+
+#define NISENTRYLEN(idx, col, res) \
+        (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
 
-#define NISENTRYLEN(idx,col,res) \
-        ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len)
 
 static int
-_nss_nisplus_parse_protoent (nis_result * result, struct protoent *proto,
+_nss_nisplus_parse_protoent (nis_result *result, struct protoent *proto,
                             char *buffer, size_t buflen, int *errnop)
 {
   char *first_unused = buffer;
   size_t room_left = buflen;
   unsigned int i;
-  char *p, *line;
 
   if (result == NULL)
     return 0;
@@ -71,41 +71,44 @@ _nss_nisplus_parse_protoent (nis_result * result, struct protoent *proto,
            NISENTRYLEN (0, 0, result));
   first_unused[NISENTRYLEN (0, 0, result)] = '\0';
   proto->p_name = first_unused;
-  room_left -= (strlen (first_unused) +1);
-  first_unused += strlen (first_unused) +1;
+  size_t len = strlen (first_unused) + 1;
+  room_left -= len;
+  first_unused += len;
 
 
-  if (NISENTRYLEN (0, 2, result) + 1 > room_left)
-    goto no_more_room;
   proto->p_proto = atoi (NISENTRYVAL (0, 2, result));
-  p = first_unused;
 
-  line = p;
-  for (i = 0; i < result->objects.objects_len; ++i)
+  /* XXX Rewrite at some point to allocate the array first and then
+     copy the strings.  It wasteful to first concatenate the strings
+     to just split them again later.  */
+  char *line = first_unused;
+  for (i = 0; i < NIS_RES_NUMOBJ (result); ++i)
     {
       if (strcmp (NISENTRYVAL (i, 1, result), proto->p_name) != 0)
         {
           if (NISENTRYLEN (i, 1, result) + 2 > room_left)
             goto no_more_room;
-         *p++ = ' ';
-          p = __stpncpy (p, NISENTRYVAL (i, 1, result),
-                        NISENTRYLEN (i, 1, result));
-          *p = '\0';
-          room_left -= (NISENTRYLEN (i, 1, result) + 1);
+         *first_unused++ = ' ';
+          first_unused = __stpncpy (first_unused, NISENTRYVAL (i, 1, result),
+                                   NISENTRYLEN (i, 1, result));
+          room_left -= NISENTRYLEN (i, 1, result) + 1;
         }
     }
-  *p++ = '\0';
-  first_unused = p;
+  *first_unused++ = '\0';
 
   /* Adjust the pointer so it is aligned for
      storing pointers.  */
-  first_unused += __alignof__ (char *) - 1;
-  first_unused -= ((first_unused - (char *) 0) % __alignof__ (char *));
-  proto->p_aliases = (char **) first_unused;
-  if (room_left < sizeof (char *))
+  size_t adjust = ((__alignof__ (char *)
+                   - (first_unused - (char *) 0) % __alignof__ (char *))
+                  % __alignof__ (char *));
+  if (room_left < adjust + sizeof (char *))
     goto no_more_room;
+  first_unused += adjust;
+  room_left -= adjust;
+  proto->p_aliases = (char **) first_unused;
+
+  /* For the terminating NULL pointer.  */
   room_left -= sizeof (char *);
-  proto->p_aliases[0] = NULL;
 
   i = 0;
   while (*line != '\0')
@@ -120,20 +123,15 @@ _nss_nisplus_parse_protoent (nis_result * result, struct protoent *proto,
         goto no_more_room;
 
       room_left -= sizeof (char *);
-      proto->p_aliases[i] = line;
+      proto->p_aliases[i++] = line;
 
       while (*line != '\0' && *line != ' ')
         ++line;
 
       if (*line == ' ')
-        {
-          *line = '\0';
-          ++line;
-          ++i;
-        }
-      else
-        proto->p_aliases[i+1] = NULL;
+       *line++ = '\0';
     }
+  proto->p_aliases[i] = NULL;
 
   return 1;
 }
index c24e898137a256b3e6aebe1ff0f8f789183c24c2..fe269b2c4892cd699228b75deb7f9f0c83ec78ad 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 1997, 1999, 2001, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (c) 1997,1999,2001,2003,2005,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
 
@@ -91,20 +91,20 @@ _nss_nisplus_getpublickey (const char *netname, char *pkey, int *errnop)
       return retval;
     }
 
-  if (res->objects.objects_len > 1)
+  if (NIS_RES_NUMOBJ (res) > 1)
     {
       /*
        * More than one principal with same uid?
        * something wrong with cred table. Should be unique
        * Warn user and continue.
        */
-      printf (_("DES entry for netname %s not unique\n"), netname);
+      syslog (LOG_ERR, _("DES entry for netname %s not unique\n"), netname);
       nis_freeresult (res);
       return NSS_STATUS_SUCCESS;
     }
 
-  len = ENTRY_LEN (res->objects.objects_val, 3);
-  memcpy (pkey, ENTRY_VAL (res->objects.objects_val,3), len);
+  len = ENTRY_LEN (NIS_RES_OBJECT (res), 3);
+  memcpy (pkey, ENTRY_VAL (NIS_RES_OBJECT (res),3), len);
   pkey[len] = 0;
   cptr = strchr (pkey, ':');
   if (cptr)
@@ -114,6 +114,7 @@ _nss_nisplus_getpublickey (const char *netname, char *pkey, int *errnop)
   return NSS_STATUS_SUCCESS;
 }
 
+
 enum nss_status
 _nss_nisplus_getsecretkey (const char *netname, char *skey, char *passwd,
                           int *errnop)
@@ -172,20 +173,20 @@ _nss_nisplus_getsecretkey (const char *netname, char *skey, char *passwd,
       return retval;
     }
 
-  if (res->objects.objects_len > 1)
+  if (NIS_RES_NUMOBJ (res) > 1)
     {
       /*
        * More than one principal with same uid?
        * something wrong with cred table. Should be unique
        * Warn user and continue.
        */
-      printf (_("DES entry for netname %s not unique\n"), netname);
+      syslog (LOG_ERR, _("DES entry for netname %s not unique\n"), netname);
       nis_freeresult (res);
       return NSS_STATUS_SUCCESS;
     }
 
-  len = ENTRY_LEN (res->objects.objects_val, 4);
-  memcpy (buf, ENTRY_VAL (res->objects.objects_val,4), len);
+  len = ENTRY_LEN (NIS_RES_OBJECT (res), 4);
+  memcpy (buf, ENTRY_VAL (NIS_RES_OBJECT (res), 4), len);
   buf[len] = '\0';
   cptr = strchr (buf, ':');
   if (cptr)
@@ -204,6 +205,7 @@ _nss_nisplus_getsecretkey (const char *netname, char *skey, char *passwd,
   return NSS_STATUS_SUCCESS;
 }
 
+
 /* Parse information from the passed string.
    The format of the string passed is gid,grp,grp, ...  */
 static enum nss_status
@@ -305,7 +307,7 @@ _nss_nisplus_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp,
       return NSS_STATUS_UNAVAIL;
     }
 
-  if (res->objects.objects_len > 1)
+  if (NIS_RES_NUMOBJ (res) > 1)
     /*
      * A netname belonging to more than one principal?
      * Something wrong with cred table. should be unique.
@@ -315,8 +317,8 @@ _nss_nisplus_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp,
            _("netname2user: DES entry for %s in directory %s not unique"),
            netname, domain);
 
-  len = ENTRY_LEN (res->objects.objects_val, 0);
-  strncpy (principal, ENTRY_VAL (res->objects.objects_val, 0), len);
+  len = ENTRY_LEN (NIS_RES_OBJECT (res), 0);
+  strncpy (principal, ENTRY_VAL (NIS_RES_OBJECT (res), 0), len);
   principal[len] = '\0';
   nis_freeresult (res);
 
@@ -328,7 +330,7 @@ _nss_nisplus_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp,
    *     LOCAL entry in **local** cred table.
    */
   domain = nis_local_directory ();
-  if ((strlen (principal) + strlen (domain) + 45) > (size_t) NIS_MAXNAMELEN)
+  if (strlen (principal) + strlen (domain) + 45 > (size_t) NIS_MAXNAMELEN)
     {
       syslog (LOG_ERR, _("netname2user: principal name `%s' too long"),
              principal);
@@ -379,7 +381,7 @@ _nss_nisplus_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp,
       return NSS_STATUS_UNAVAIL;
     }
 
-  if (res->objects.objects_len > 1)
+  if (NIS_RES_NUMOBJ (res) > 1)
     /*
      * A principal can have more than one LOCAL entry?
      * Something wrong with cred table.
@@ -389,15 +391,16 @@ _nss_nisplus_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp,
            _("netname2user: LOCAL entry for %s in directory %s not unique"),
            netname, domain);
   /* Fetch the uid */
-  *uidp = strtoul (ENTRY_VAL (res->objects.objects_val, 2), NULL, 10);
+  *uidp = strtoul (ENTRY_VAL (NIS_RES_OBJECT (res), 2), NULL, 10);
 
   if (*uidp == 0)
     {
       syslog (LOG_ERR, _("netname2user: should not have uid 0"));
+      nis_freeresult (res);
       return NSS_STATUS_NOTFOUND;
     }
 
-  parse_grp_str (ENTRY_VAL (res->objects.objects_val, 3),
+  parse_grp_str (ENTRY_VAL (NIS_RES_OBJECT (res), 3),
                 gidp, gidlenp, gidlist, errnop);
 
   nis_freeresult (res);
index f6ab3fbd87ab86fdd5aca8d3e4eff83d93a4b5bd..1c3faa7dc0d27c324998c9bacf2e2463884f7c88 100644 (file)
@@ -35,11 +35,12 @@ static nis_result *result;
 static nis_name tablename_val;
 static u_long tablename_len;
 
-#define NISENTRYVAL(idx,col,res) \
-        ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val)
+#define NISENTRYVAL(idx, col, res) \
+        (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val)
+
+#define NISENTRYLEN(idx, col, res) \
+        (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
 
-#define NISENTRYLEN(idx,col,res) \
-        ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len)
 
 static int
 _nss_nisplus_parse_rpcent (nis_result *result, struct rpcent *rpc,
@@ -48,17 +49,16 @@ _nss_nisplus_parse_rpcent (nis_result *result, struct rpcent *rpc,
   char *first_unused = buffer;
   size_t room_left = buflen;
   unsigned int i;
-  char *p, *line;
+  char *line;
 
 
   if (result == NULL)
     return 0;
 
   if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS)
-      || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ
-      || strcmp (result->objects.objects_val[0].EN_data.en_type,
-                "rpc_tbl") != 0
-      || result->objects.objects_val[0].EN_data.en_cols.en_cols_len < 3)
+      || __type_of (NIS_RES_OBJECT (result)) != NIS_ENTRY_OBJ
+      || strcmp (NIS_RES_OBJECT (result)[0].EN_data.en_type, "rpc_tbl") != 0
+      || NIS_RES_OBJECT (result)[0].EN_data.en_cols.en_cols_len < 3)
     return 0;
 
   if (NISENTRYLEN (0, 0, result) >= room_left)
@@ -71,37 +71,43 @@ _nss_nisplus_parse_rpcent (nis_result *result, struct rpcent *rpc,
            NISENTRYLEN (0, 0, result));
   first_unused[NISENTRYLEN (0, 0, result)] = '\0';
   rpc->r_name = first_unused;
-  room_left -= (strlen (first_unused) + 1);
-  first_unused += strlen (first_unused) + 1;
+  size_t len = strlen (first_unused) + 1;
+  room_left -= len;
+  first_unused += len;
+
   rpc->r_number = atoi (NISENTRYVAL (0, 2, result));
-  p = first_unused;
 
-  line = p;
-  for (i = 0; i < result->objects.objects_len; ++i)
+  /* XXX Rewrite at some point to allocate the array first and then
+     copy the strings.  It wasteful to first concatenate the strings
+     to just split them again later.  */
+  line = first_unused;
+  for (i = 0; i < NIS_RES_NUMOBJ (result); ++i)
     {
       if (strcmp (NISENTRYVAL (i, 1, result), rpc->r_name) != 0)
         {
           if (NISENTRYLEN (i, 1, result) + 2 > room_left)
            goto no_more_room;
-         *p++ = ' ';
-          p = __stpncpy (p, NISENTRYVAL (i, 1, result),
-                        NISENTRYLEN (i, 1, result));
-          *p = '\0';
-          room_left -= (NISENTRYLEN (i, 1, result) + 1);
+         *first_unused++ = ' ';
+          first_unused = __stpncpy (first_unused, NISENTRYVAL (i, 1, result),
+                                   NISENTRYLEN (i, 1, result));
+          room_left -= NISENTRYLEN (i, 1, result) + 1;
         }
     }
-  ++p;
-  first_unused = p;
+  *first_unused++ = '\0';
 
   /* Adjust the pointer so it is aligned for
      storing pointers.  */
-  first_unused += __alignof__ (char *) - 1;
-  first_unused -= ((first_unused - (char *) 0) % __alignof__ (char *));
-  rpc->r_aliases = (char **) first_unused;
-  if (room_left < sizeof (char *))
+  size_t adjust = ((__alignof__ (char *)
+                   - (first_unused - (char *) 0) % __alignof__ (char *))
+                  % __alignof__ (char *));
+  if (room_left < adjust + sizeof (char *))
     goto no_more_room;
+  first_unused += adjust;
+  room_left -= adjust;
+  rpc->r_aliases = (char **) first_unused;
+
+  /* For the terminating NULL pointer.  */
   room_left -= sizeof (char *);
-  rpc->r_aliases[0] = NULL;
 
   i = 0;
   while (*line != '\0')
@@ -117,24 +123,20 @@ _nss_nisplus_parse_rpcent (nis_result *result, struct rpcent *rpc,
        goto no_more_room;
 
       room_left -= sizeof (char *);
-      rpc->r_aliases[i] = line;
+      rpc->r_aliases[i++] = line;
 
       while (*line != '\0' && *line != ' ')
         ++line;
 
       if (*line == ' ')
-        {
-         *line = '\0';
-         ++line;
-          ++i;
-        }
-      else
-        rpc->r_aliases[i+1] = NULL;
+       *line++ = '\0';
     }
+  rpc->r_aliases[i] = NULL;
 
   return 1;
 }
 
+
 static enum nss_status
 _nss_create_tablename (int *errnop)
 {
index c47dc09a06bc430670663cc439cf4ea99a8d2887..3dd9f4dde6c608472f9cbd37a2e1c0c63d31991c 100644 (file)
@@ -35,11 +35,12 @@ static nis_result *result;
 static nis_name tablename_val;
 static u_long tablename_len;
 
-#define NISENTRYVAL(idx,col,res) \
-  ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_val)
+#define NISENTRYVAL(idx, col, res) \
+  (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val)
+
+#define NISENTRYLEN(idx, col, res) \
+    (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
 
-#define NISENTRYLEN(idx,col,res) \
-    ((res)->objects.objects_val[(idx)].EN_data.en_cols.en_cols_val[(col)].ec_value.ec_value_len)
 
 static int
 _nss_nisplus_parse_servent (nis_result *result, struct servent *serv,
@@ -52,10 +53,9 @@ _nss_nisplus_parse_servent (nis_result *result, struct servent *serv,
     return 0;
 
   if ((result->status != NIS_SUCCESS && result->status != NIS_S_SUCCESS)
-      || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ
-      || strcmp (result->objects.objects_val->EN_data.en_type,
-                "services_tbl") != 0
-      || result->objects.objects_val->EN_data.en_cols.en_cols_len < 4)
+      || __type_of (NIS_RES_OBJECT (result)) != NIS_ENTRY_OBJ
+      || strcmp (NIS_RES_OBJECT (result)->EN_data.en_type, "services_tbl") != 0
+      || NIS_RES_OBJECT (result)->EN_data.en_cols.en_cols_len < 4)
     return 0;
 
   if (NISENTRYLEN (0, 0, result) >= room_left)
@@ -68,8 +68,9 @@ _nss_nisplus_parse_servent (nis_result *result, struct servent *serv,
            NISENTRYLEN (0, 0, result));
   first_unused[NISENTRYLEN (0, 0, result)] = '\0';
   serv->s_name = first_unused;
-  room_left -= (strlen (first_unused) +1);
-  first_unused += strlen (first_unused) +1;
+  size_t len = strlen (first_unused) + 1;
+  room_left -= len;
+  first_unused += len;
 
   if (NISENTRYLEN (0, 2, result) >= room_left)
     goto no_more_room;
@@ -77,38 +78,43 @@ _nss_nisplus_parse_servent (nis_result *result, struct servent *serv,
            NISENTRYLEN (0, 2, result));
   first_unused[NISENTRYLEN (0, 2, result)] = '\0';
   serv->s_proto = first_unused;
-  room_left -= strlen (first_unused) + 1;
-  first_unused += strlen (first_unused) + 1;
+  len = strlen (first_unused) + 1;
+  room_left -= len;
+  first_unused += len;
 
   serv->s_port = htons (atoi (NISENTRYVAL (0, 3, result)));
-  char *p = first_unused;
 
-  char *line = p;
-  for (unsigned int i = 0; i < result->objects.objects_len; ++i)
+  /* XXX Rewrite at some point to allocate the array first and then
+     copy the strings.  It wasteful to first concatenate the strings
+     to just split them again later.  */
+  char *line = first_unused;
+  for (unsigned int i = 0; i < NIS_RES_NUMOBJ (result); ++i)
     {
       if (strcmp (NISENTRYVAL (i, 1, result), serv->s_name) != 0)
         {
           if (NISENTRYLEN (i, 1, result) + 2 > room_left)
             goto no_more_room;
-         *p++ = ' ';
-          p = __stpncpy (p, NISENTRYVAL (i, 1, result),
-                        NISENTRYLEN (i, 1, result));
-          *p = '\0';
-          room_left -= (NISENTRYLEN (i, 1, result) + 1);
+         *first_unused++ = ' ';
+          first_unused = __stpncpy (first_unused, NISENTRYVAL (i, 1, result),
+                                   NISENTRYLEN (i, 1, result));
+          room_left -= NISENTRYLEN (i, 1, result) + 1;
         }
     }
-  *p++ = '\0';
-  first_unused = p;
+  *first_unused++ = '\0';
 
   /* Adjust the pointer so it is aligned for
      storing pointers.  */
-  first_unused += __alignof__ (char *) - 1;
-  first_unused -= ((first_unused - (char *) 0) % __alignof__ (char *));
-  serv->s_aliases = (char **) first_unused;
-  if (room_left < sizeof (char *))
+  size_t adjust = ((__alignof__ (char *)
+                   - (first_unused - (char *) 0) % __alignof__ (char *))
+                  % __alignof__ (char *));
+  if (room_left < adjust + sizeof (char *))
     goto no_more_room;
+  first_unused += adjust;
+  room_left -= adjust;
+  serv->s_aliases = (char **) first_unused;
+
+  /* For the terminating NULL pointer.  */
   room_left -= (sizeof (char *));
-  serv->s_aliases[0] = NULL;
 
   unsigned int i = 0;
   while (*line != '\0')
@@ -124,24 +130,20 @@ _nss_nisplus_parse_servent (nis_result *result, struct servent *serv,
         goto no_more_room;
 
       room_left -= sizeof (char *);
-      serv->s_aliases[i] = line;
+      serv->s_aliases[i++] = line;
 
       while (*line != '\0' && *line != ' ')
         ++line;
 
       if (*line == ' ')
-        {
-         *line = '\0';
-         ++line;
-          ++i;
-       }
-      else
-        serv->s_aliases[i+1] = NULL;
+       *line++ = '\0';
     }
+  serv->s_aliases[i] = NULL;
 
   return 1;
 }
 
+
 static enum nss_status
 _nss_create_tablename (int *errnop)
 {
@@ -320,10 +322,10 @@ _nss_nisplus_getservbyname_r (const char *name, const char *protocol,
         database is correct, we should find it in the first case, too */
       if ((result->status != NIS_SUCCESS
           && result->status != NIS_S_SUCCESS)
-         || __type_of (result->objects.objects_val) != NIS_ENTRY_OBJ
-         || strcmp (result->objects.objects_val->EN_data.en_type,
+         || __type_of (NIS_RES_OBJECT (result)) != NIS_ENTRY_OBJ
+         || strcmp (NIS_RES_OBJECT (result)->EN_data.en_type,
                     "services_tbl") != 0
-         || result->objects.objects_val->EN_data.en_cols.en_cols_len < 4)
+         || NIS_RES_OBJECT (result)->EN_data.en_cols.en_cols_len < 4)
        snprintf (buf, sizeof (buf), "[cname=%s,proto=%s],%s", name, protocol,
                  tablename_val);
       else
index 78adf6aeec19f16c5c33aa757a38e56d8a0af532..65bc8d1f503e64aa9c4c08c2b38e6c1840c75bbe 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2001, 2002, 2003, 2004, 2005
+/* Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
@@ -955,16 +955,22 @@ yp_update (char *domain, char *map, unsigned ypop,
   args.update_args.datum.yp_buf_len = datalen;
   args.update_args.datum.yp_buf_val = data;
 
-  if ((r = yp_master (domain, map, &master)) != 0)
+  if ((r = yp_master (domain, map, &master)) != YPERR_SUCCESS)
     return r;
 
   if (!host2netname (servername, master, domain))
     {
       fputs (_("yp_update: cannot convert host to netname\n"), stderr);
+      free (master);
       return YPERR_YPERR;
     }
 
-  if ((clnt = clnt_create (master, YPU_PROG, YPU_VERS, "tcp")) == NULL)
+  clnt = clnt_create (master, YPU_PROG, YPU_VERS, "tcp");
+
+  /* We do not need the string anymore.  */
+  free (master);
+
+  if (clnt == NULL)
     {
       clnt_pcreateerror ("yp_update: clnt_create");
       return YPERR_RPC;
index 64cea204e30f772a41dfdd85ae71e652bc091b6f..2418fa810622e89ae276a649b1b906d8646eefc4 100644 (file)
@@ -1,3 +1,38 @@
+2006-04-08  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
+       suffix for conditional jumps.
+       * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
+       * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
+       * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
+       * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
+       * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
+       * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
+
+       * init.c (sigcancel_handler): Compare with correct PID even if the
+       thread is in the middle of a fork call.
+       (sighandler_setxid): Likewise.
+       Reported by Suzuki K P <suzuki@in.ibm.com> .
+
+2006-04-07  Jakub Jelinek  <jakub@redhat.com>
+
+       * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
+
+2006-04-06  Ulrich Drepper  <drepper@redhat.com>
+
+       * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
+       fails [Coverity CID 105].
+
+2006-04-05  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/pthread/pthread.h: Add nonnull attributes.
+
+2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
+
+       [BZ #2505]
+       * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
+       Define __lll_rel_instr using lwsync.
+
 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
 
        * allocatestack.c (allocate_stack): Always initialize robust_head.
index 4db3e0c8284d07b5e7bf3025ae0336c5a2ad6873..7cfe803c4237b91e8654c416f2ba18951eb80a12 100644 (file)
@@ -148,6 +148,14 @@ static const struct pthread_functions pthread_functions =
 static void
 sigcancel_handler (int sig, siginfo_t *si, void *ctx)
 {
+#ifdef __ASSUME_CORRECT_SI_PID
+  /* Determine the process ID.  It might be negative if the thread is
+     in the middle of a fork() call.  */
+  pid_t pid = THREAD_GETMEM (THREAD_SELF, pid);
+  if (__builtin_expect (pid < 0, 0))
+    pid = -pid;
+#endif
+
   /* Safety check.  It would be possible to call this function for
      other signals and send a signal from another process.  This is not
      correct and might even be a security problem.  Try to catch as
@@ -156,7 +164,7 @@ sigcancel_handler (int sig, siginfo_t *si, void *ctx)
 #ifdef __ASSUME_CORRECT_SI_PID
       /* Kernels before 2.5.75 stored the thread ID and not the process
         ID in si_pid so we skip this test.  */
-      || si->si_pid != THREAD_GETMEM (THREAD_SELF, pid)
+      || si->si_pid != pid
 #endif
       || si->si_code != SI_TKILL)
     return;
@@ -201,6 +209,14 @@ struct xid_command *__xidcmd attribute_hidden;
 static void
 sighandler_setxid (int sig, siginfo_t *si, void *ctx)
 {
+#ifdef __ASSUME_CORRECT_SI_PID
+  /* Determine the process ID.  It might be negative if the thread is
+     in the middle of a fork() call.  */
+  pid_t pid = THREAD_GETMEM (THREAD_SELF, pid);
+  if (__builtin_expect (pid < 0, 0))
+    pid = -pid;
+#endif
+
   /* Safety check.  It would be possible to call this function for
      other signals and send a signal from another process.  This is not
      correct and might even be a security problem.  Try to catch as
@@ -209,7 +225,7 @@ sighandler_setxid (int sig, siginfo_t *si, void *ctx)
 #ifdef __ASSUME_CORRECT_SI_PID
       /* Kernels before 2.5.75 stored the thread ID and not the process
         ID in si_pid so we skip this test.  */
-      || si->si_pid != THREAD_GETMEM (THREAD_SELF, pid)
+      || si->si_pid != pid
 #endif
       || si->si_code != SI_TKILL)
     return;
index 7b3da8378601dff6d2d4b9f35ac58e01f043cebd..c7f57e235a1ca74349396a7fda38b36542607dcc 100644 (file)
@@ -90,7 +90,7 @@ enum
 /* Bits used in robust mutex implementation.  */
 #define FUTEX_WAITERS          0x80000000
 #define FUTEX_OWNER_DIED       0x40000000
-#define FUTEX_TID_MASK         0x1fffffff
+#define FUTEX_TID_MASK         0x3fffffff
 
 
 /* Internal variables.  */
index ba720af6cd3537544e06ef1facfe3043605c3be5..4bdc7b5b150a853e26162f4c342257b9a1642f4d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -83,51 +83,55 @@ pthread_getattr_np (thread_id, attr)
       if (fp == NULL)
        ret = errno;
       /* We need the limit of the stack in any case.  */
-      else if (getrlimit (RLIMIT_STACK, &rl) != 0)
-       ret = errno;
       else
        {
-         /* We need no locking.  */
-         __fsetlocking (fp, FSETLOCKING_BYCALLER);
+         if (getrlimit (RLIMIT_STACK, &rl) != 0)
+           ret = errno;
+         else
+           {
+             /* We need no locking.  */
+             __fsetlocking (fp, FSETLOCKING_BYCALLER);
 
-         /* Until we found an entry (which should always be the case)
-            mark the result as a failure.  */
-         ret = ENOENT;
+             /* Until we found an entry (which should always be the case)
+                mark the result as a failure.  */
+             ret = ENOENT;
 
-         char *line = NULL;
-         size_t linelen = 0;
-         uintptr_t last_to = 0;
+             char *line = NULL;
+             size_t linelen = 0;
+             uintptr_t last_to = 0;
 
-         while (! feof_unlocked (fp))
-           {
-             if (__getdelim (&line, &linelen, '\n', fp) <= 0)
-               break;
-
-             uintptr_t from;
-             uintptr_t to;
-             if (sscanf (line, "%" SCNxPTR "-%" SCNxPTR, &from, &to) != 2)
-               continue;
-             if (from <= (uintptr_t) __libc_stack_end
-                 && (uintptr_t) __libc_stack_end < to)
+             while (! feof_unlocked (fp))
                {
-                 /* Found the entry.  Now we have the info we need.  */
-                 iattr->stacksize = rl.rlim_cur;
-                 iattr->stackaddr = (void *) to;
-
-                 /* The limit might be too high.  */
-                 if ((size_t) iattr->stacksize
-                     > (size_t) iattr->stackaddr - last_to)
-                   iattr->stacksize = (size_t) iattr->stackaddr - last_to;
-
-                 /* We succeed and no need to look further.  */
-                 ret = 0;
-                 break;
+                 if (__getdelim (&line, &linelen, '\n', fp) <= 0)
+                   break;
+
+                 uintptr_t from;
+                 uintptr_t to;
+                 if (sscanf (line, "%" SCNxPTR "-%" SCNxPTR, &from, &to) != 2)
+                   continue;
+                 if (from <= (uintptr_t) __libc_stack_end
+                     && (uintptr_t) __libc_stack_end < to)
+                   {
+                     /* Found the entry.  Now we have the info we need.  */
+                     iattr->stacksize = rl.rlim_cur;
+                     iattr->stackaddr = (void *) to;
+
+                     /* The limit might be too high.  */
+                     if ((size_t) iattr->stacksize
+                         > (size_t) iattr->stackaddr - last_to)
+                       iattr->stacksize = (size_t) iattr->stackaddr - last_to;
+
+                     /* We succeed and no need to look further.  */
+                     ret = 0;
+                     break;
+                   }
+                 last_to = to;
                }
-             last_to = to;
+
+             free (line);
            }
 
          fclose (fp);
-         free (line);
        }
     }
 
index e03c374c7165d97a2ad22851b02d474b8a9cb894..5f34302e0c23a2b40301a35d67d2421064519a24 100644 (file)
@@ -221,7 +221,7 @@ __BEGIN_DECLS
 extern int pthread_create (pthread_t *__restrict __newthread,
                           __const pthread_attr_t *__restrict __attr,
                           void *(*__start_routine) (void *),
-                          void *__restrict __arg) __THROW;
+                          void *__restrict __arg) __THROW __nonnull ((1, 3));
 
 /* Terminate calling thread.
 
@@ -271,71 +271,78 @@ extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __THROW;
 /* Initialize thread attribute *ATTR with default attributes
    (detachstate is PTHREAD_JOINABLE, scheduling policy is SCHED_OTHER,
     no user-provided stack).  */
-extern int pthread_attr_init (pthread_attr_t *__attr) __THROW;
+extern int pthread_attr_init (pthread_attr_t *__attr) __THROW __nonnull ((1));
 
 /* Destroy thread attribute *ATTR.  */
-extern int pthread_attr_destroy (pthread_attr_t *__attr) __THROW;
+extern int pthread_attr_destroy (pthread_attr_t *__attr)
+     __THROW __nonnull ((1));
 
 /* Get detach state attribute.  */
 extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
-                                       int *__detachstate) __THROW;
+                                       int *__detachstate)
+     __THROW __nonnull ((1, 2));
 
 /* Set detach state attribute.  */
 extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
-                                       int __detachstate) __THROW;
+                                       int __detachstate)
+     __THROW __nonnull ((1));
 
 
 /* Get the size of the guard area created for stack overflow protection.  */
 extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr,
-                                     size_t *__guardsize) __THROW;
+                                     size_t *__guardsize)
+     __THROW __nonnull ((1, 2));
 
 /* Set the size of the guard area created for stack overflow protection.  */
 extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
-                                     size_t __guardsize) __THROW;
+                                     size_t __guardsize)
+     __THROW __nonnull ((1));
 
 
 /* Return in *PARAM the scheduling parameters of *ATTR.  */
 extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
                                       __attr,
                                       struct sched_param *__restrict __param)
-     __THROW;
+     __THROW __nonnull ((1, 2));
 
 /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM.  */
 extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
                                       __const struct sched_param *__restrict
-                                      __param) __THROW;
+                                      __param) __THROW __nonnull ((1, 2));
 
 /* Return in *POLICY the scheduling policy of *ATTR.  */
 extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
                                        __attr, int *__restrict __policy)
-     __THROW;
+     __THROW __nonnull ((1, 2));
 
 /* Set scheduling policy in *ATTR according to POLICY.  */
 extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
-     __THROW;
+     __THROW __nonnull ((1));
 
 /* Return in *INHERIT the scheduling inheritance mode of *ATTR.  */
 extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
                                         __attr, int *__restrict __inherit)
-     __THROW;
+     __THROW __nonnull ((1, 2));
 
 /* Set scheduling inheritance mode in *ATTR according to INHERIT.  */
 extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
-                                        int __inherit) __THROW;
+                                        int __inherit)
+     __THROW __nonnull ((1));
 
 
 /* Return in *SCOPE the scheduling contention scope of *ATTR.  */
 extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
-                                 int *__restrict __scope) __THROW;
+                                 int *__restrict __scope)
+     __THROW __nonnull ((1, 2));
 
 /* Set scheduling contention scope in *ATTR according to SCOPE.  */
 extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
-     __THROW;
+     __THROW __nonnull ((1));
 
 /* Return the previously set address for the stack.  */
 extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
                                      __attr, void **__restrict __stackaddr)
-     __THROW __attribute_deprecated__;
+     __THROW __nonnull ((1, 2)) __attribute_deprecated__;
 
 /* Set the starting address of the stack of the thread to be created.
    Depending on whether the stack grows up or down the value must either
@@ -343,30 +350,32 @@ extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
    minimal size of the block must be PTHREAD_STACK_MIN.  */
 extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
                                      void *__stackaddr)
-     __THROW __attribute_deprecated__;
+     __THROW __nonnull ((1)) __attribute_deprecated__;
 
 /* Return the currently used minimal stack size.  */
 extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
                                      __attr, size_t *__restrict __stacksize)
-     __THROW;
+     __THROW __nonnull ((1, 2));
 
 /* Add information about the minimum stack size needed for the thread
    to be started.  This size must never be less than PTHREAD_STACK_MIN
    and must also not exceed the system limits.  */
 extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
-                                     size_t __stacksize) __THROW;
+                                     size_t __stacksize)
+     __THROW __nonnull ((1));
 
 #ifdef __USE_XOPEN2K
 /* Return the previously set address for the stack.  */
 extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
                                  void **__restrict __stackaddr,
-                                 size_t *__restrict __stacksize) __THROW;
+                                 size_t *__restrict __stacksize)
+     __THROW __nonnull ((1, 2, 3));
 
 /* The following two interfaces are intended to replace the last two.  They
    require setting the address as well as the size since only setting the
    address will make the implementation on some architectures impossible.  */
 extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
-                                 size_t __stacksize) __THROW;
+                                 size_t __stacksize) __THROW __nonnull ((1));
 #endif
 
 #ifdef __USE_GNU
@@ -374,19 +383,22 @@ extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
    the processors represented in CPUSET.  */
 extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
                                        size_t __cpusetsize,
-                                       __const cpu_set_t *__cpuset) __THROW;
+                                       __const cpu_set_t *__cpuset)
+     __THROW __nonnull ((1, 3));
 
 /* Get bit set in CPUSET representing the processors threads created with
    ATTR can run on.  */
 extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr,
                                        size_t __cpusetsize,
-                                       cpu_set_t *__cpuset) __THROW;
+                                       cpu_set_t *__cpuset)
+     __THROW __nonnull ((1, 3));
 
 
 /* Initialize thread attribute *ATTR with attributes corresponding to the
    already running thread TH.  It shall be called on unitialized ATTR
    and destroyed with pthread_attr_destroy when no longer needed.  */
-extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __THROW;
+extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr)
+     __THROW __nonnull ((2));
 #endif
 
 
@@ -396,13 +408,13 @@ extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __THROW;
    and *PARAM.  */
 extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
                                  __const struct sched_param *__param)
-     __THROW;
+     __THROW __nonnull ((3));
 
 /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */
 extern int pthread_getschedparam (pthread_t __target_thread,
                                  int *__restrict __policy,
                                  struct sched_param *__restrict __param)
-     __THROW;
+     __THROW __nonnull ((2, 3));
 
 /* Set the scheduling priority for TARGET_THREAD.  */
 extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
@@ -428,11 +440,13 @@ extern int pthread_yield (void) __THROW;
 /* Limit specified thread TH to run only on the processors represented
    in CPUSET.  */
 extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize,
-                                  __const cpu_set_t *__cpuset) __THROW;
+                                  __const cpu_set_t *__cpuset)
+     __THROW __nonnull ((3));
 
 /* Get bit set in CPUSET representing the processors TH can run on.  */
 extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize,
-                                  cpu_set_t *__cpuset) __THROW;
+                                  cpu_set_t *__cpuset)
+     __THROW __nonnull ((3));
 #endif
 
 
@@ -446,7 +460,7 @@ extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize,
    The initialization functions might throw exception which is why
    this function is not marked with __THROW.  */
 extern int pthread_once (pthread_once_t *__once_control,
-                        void (*__init_routine) (void));
+                        void (*__init_routine) (void)) __nonnull ((1, 2));
 
 
 /* Functions for handling cancellation.
@@ -700,26 +714,30 @@ extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROW;
 /* Initialize a mutex.  */
 extern int pthread_mutex_init (pthread_mutex_t *__mutex,
                               __const pthread_mutexattr_t *__mutexattr)
-     __THROW;
+     __THROW __nonnull ((1));
 
 /* Destroy a mutex.  */
-extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) __THROW;
+extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
+     __THROW __nonnull ((1));
 
 /* Try locking a mutex.  */
-extern int pthread_mutex_trylock (pthread_mutex_t *_mutex) __THROW;
+extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
+     __THROW __nonnull ((1));
 
 /* Lock a mutex.  */
-extern int pthread_mutex_lock (pthread_mutex_t *__mutex) __THROW;
+extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
+     __THROW __nonnull ((1));
 
 #ifdef __USE_XOPEN2K
 /* Wait until lock becomes available, or specified time passes. */
 extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
                                     __const struct timespec *__restrict
-                                    __abstime) __THROW;
+                                    __abstime) __THROW __nonnull ((1, 2));
 #endif
 
 /* Unlock a mutex.  */
-extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) __THROW;
+extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
+     __THROW __nonnull ((1));
 
 
 #ifdef __USE_UNIX98
@@ -727,20 +745,21 @@ extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) __THROW;
 extern int pthread_mutex_getprioceiling (__const pthread_mutex_t *
                                         __restrict __mutex,
                                         int *__restrict __prioceiling)
-     __THROW;
+     __THROW __nonnull ((1, 2));
 
 /* Set the priority ceiling of MUTEX to PRIOCEILING, return old
    priority ceiling value in *OLD_CEILING.  */
 extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
                                         int __prioceiling,
                                         int *__restrict __old_ceiling)
-     __THROW;
+     __THROW __nonnull ((1, 3));
 #endif
 
 
 #ifdef __USE_GNU
 /* Declare the state protected by MUTEX as consistent.  */
-extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) __THROW;
+extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
+     __THROW __nonnull ((1));
 #endif
 
 
@@ -748,60 +767,70 @@ extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) __THROW;
 
 /* Initialize mutex attribute object ATTR with default attributes
    (kind is PTHREAD_MUTEX_TIMED_NP).  */
-extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) __THROW;
+extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
+     __THROW __nonnull ((1));
 
 /* Destroy mutex attribute object ATTR.  */
-extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW;
+extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
+     __THROW __nonnull ((1));
 
 /* Get the process-shared flag of the mutex attribute ATTR.  */
 extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
                                         __restrict __attr,
-                                        int *__restrict __pshared) __THROW;
+                                        int *__restrict __pshared)
+     __THROW __nonnull ((1, 2));
 
 /* Set the process-shared flag of the mutex attribute ATTR.  */
 extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
-                                        int __pshared) __THROW;
+                                        int __pshared)
+     __THROW __nonnull ((1));
 
 #ifdef __USE_UNIX98
 /* Return in *KIND the mutex kind attribute in *ATTR.  */
 extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
-                                     __attr, int *__restrict __kind) __THROW;
+                                     __attr, int *__restrict __kind)
+     __THROW __nonnull ((1, 2));
 
 /* Set the mutex kind attribute in *ATTR to KIND (either PTHREAD_MUTEX_NORMAL,
    PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_ERRORCHECK, or
    PTHREAD_MUTEX_DEFAULT).  */
 extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
-     __THROW;
+     __THROW __nonnull ((1));
 
 /* Return in *PROTOCOL the mutex protocol attribute in *ATTR.  */
 extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t *
                                          __restrict __attr,
-                                         int *__restrict __protocol) __THROW;
+                                         int *__restrict __protocol)
+     __THROW __nonnull ((1, 2));
 
 /* Set the mutex protocol attribute in *ATTR to PROTOCOL (either
    PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, or PTHREAD_PRIO_PROTECT).  */
 extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
-                                         int __protocol) __THROW;
+                                         int __protocol)
+     __THROW __nonnull ((1));
 
 /* Return in *PRIOCEILING the mutex prioceiling attribute in *ATTR.  */
 extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t *
                                             __restrict __attr,
                                             int *__restrict __prioceiling)
-     __THROW;
+     __THROW __nonnull ((1, 2));
 
 /* Set the mutex prioceiling attribute in *ATTR to PRIOCEILING.  */
 extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
-                                            int __prioceiling) __THROW;
+                                            int __prioceiling)
+     __THROW __nonnull ((1));
 #endif
 
 #ifdef __USE_GNU
 /* Get the robustness flag of the mutex attribute ATTR.  */
 extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr,
-                                          int *__robustness) __THROW;
+                                          int *__robustness)
+     __THROW __nonnull ((1, 2));
 
 /* Set the robustness flag of the mutex attribute ATTR.  */
 extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr,
-                                          int __robustness) __THROW;
+                                          int __robustness)
+     __THROW __nonnull ((1));
 #endif
 
 
@@ -812,66 +841,77 @@ extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr,
    the default values if later is NULL.  */
 extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
                                __const pthread_rwlockattr_t *__restrict
-                               __attr) __THROW;
+                               __attr) __THROW __nonnull ((1));
 
 /* Destroy read-write lock RWLOCK.  */
-extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) __THROW;
+extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
+     __THROW __nonnull ((1));
 
 /* Acquire read lock for RWLOCK.  */
-extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) __THROW;
+extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
+     __THROW __nonnull ((1));
 
 /* Try to acquire read lock for RWLOCK.  */
-extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __THROW;
+extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
+  __THROW __nonnull ((1));
 
 # ifdef __USE_XOPEN2K
 /* Try to acquire read lock for RWLOCK or return after specfied time.  */
 extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
                                       __const struct timespec *__restrict
-                                      __abstime) __THROW;
+                                      __abstime) __THROW __nonnull ((1, 2));
 # endif
 
 /* Acquire write lock for RWLOCK.  */
-extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) __THROW;
+extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
+     __THROW __nonnull ((1));
 
 /* Try to acquire write lock for RWLOCK.  */
-extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __THROW;
+extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
+     __THROW __nonnull ((1));
 
 # ifdef __USE_XOPEN2K
 /* Try to acquire write lock for RWLOCK or return after specfied time.  */
 extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
                                       __const struct timespec *__restrict
-                                      __abstime) __THROW;
+                                      __abstime) __THROW __nonnull ((1, 2));
 # endif
 
 /* Unlock RWLOCK.  */
-extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) __THROW;
+extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
+     __THROW __nonnull ((1));
 
 
 /* Functions for handling read-write lock attributes.  */
 
 /* Initialize attribute object ATTR with default values.  */
-extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) __THROW;
+extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
+     __THROW __nonnull ((1));
 
 /* Destroy attribute object ATTR.  */
-extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __THROW;
+extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
+     __THROW __nonnull ((1));
 
 /* Return current setting of process-shared attribute of ATTR in PSHARED.  */
 extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
                                          __restrict __attr,
-                                         int *__restrict __pshared) __THROW;
+                                         int *__restrict __pshared)
+     __THROW __nonnull ((1, 2));
 
 /* Set process-shared attribute of ATTR to PSHARED.  */
 extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
-                                         int __pshared) __THROW;
+                                         int __pshared)
+     __THROW __nonnull ((1));
 
 /* Return current setting of reader/writer preference.  */
 extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *
                                          __restrict __attr,
-                                         int *__restrict __pref) __THROW;
+                                         int *__restrict __pref)
+     __THROW __nonnull ((1, 2));
 
 /* Set reader/write preference.  */
 extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
-                                         int __pref) __THROW;
+                                         int __pref) __THROW __nonnull ((1));
 #endif
 
 
@@ -881,16 +921,19 @@ extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
    the default values if later is NULL.  */
 extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
                              __const pthread_condattr_t *__restrict
-                             __cond_attr) __THROW;
+                             __cond_attr) __THROW __nonnull ((1));
 
 /* Destroy condition variable COND.  */
-extern int pthread_cond_destroy (pthread_cond_t *__cond) __THROW;
+extern int pthread_cond_destroy (pthread_cond_t *__cond)
+     __THROW __nonnull ((1));
 
 /* Wake up one thread waiting for condition variable COND.  */
-extern int pthread_cond_signal (pthread_cond_t *__cond) __THROW;
+extern int pthread_cond_signal (pthread_cond_t *__cond)
+     __THROW __nonnull ((1));
 
 /* Wake up all threads waiting for condition variables COND.  */
-extern int pthread_cond_broadcast (pthread_cond_t *__cond) __THROW;
+extern int pthread_cond_broadcast (pthread_cond_t *__cond)
+     __THROW __nonnull ((1));
 
 /* Wait for condition variable COND to be signaled or broadcast.
    MUTEX is assumed to be locked before.
@@ -898,7 +941,8 @@ extern int pthread_cond_broadcast (pthread_cond_t *__cond) __THROW;
    This function is a cancellation point and therefore not marked with
    __THROW.  */
 extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
-                             pthread_mutex_t *__restrict __mutex);
+                             pthread_mutex_t *__restrict __mutex)
+     __nonnull ((1, 2));
 
 /* Wait for condition variable COND to be signaled or broadcast until
    ABSTIME.  MUTEX is assumed to be locked before.  ABSTIME is an
@@ -910,36 +954,39 @@ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
 extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
                                   pthread_mutex_t *__restrict __mutex,
                                   __const struct timespec *__restrict
-                                  __abstime);
+                                  __abstime) __nonnull ((1, 2, 3));
 
 /* Functions for handling condition variable attributes.  */
 
 /* Initialize condition variable attribute ATTR.  */
-extern int pthread_condattr_init (pthread_condattr_t *__attr) __THROW;
+extern int pthread_condattr_init (pthread_condattr_t *__attr)
+     __THROW __nonnull ((1));
 
 /* Destroy condition variable attribute ATTR.  */
-extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW;
+extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
+     __THROW __nonnull ((1));
 
 /* Get the process-shared flag of the condition variable attribute ATTR.  */
 extern int pthread_condattr_getpshared (__const pthread_condattr_t *
                                         __restrict __attr,
-                                        int *__restrict __pshared) __THROW;
+                                        int *__restrict __pshared)
+     __THROW __nonnull ((1, 2));
 
 /* Set the process-shared flag of the condition variable attribute ATTR.  */
 extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
-                                        int __pshared) __THROW;
+                                        int __pshared) __THROW __nonnull ((1));
 
 #ifdef __USE_XOPEN2K
 /* Get the clock selected for the conditon variable attribute ATTR.  */
 extern int pthread_condattr_getclock (__const pthread_condattr_t *
                                      __restrict __attr,
                                      __clockid_t *__restrict __clock_id)
-     __THROW;
+     __THROW __nonnull ((1, 2));
 
 /* Set the clock selected for the conditon variable attribute ATTR.  */
 extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
-                                     __clockid_t __clock_id) __THROW;
-
+                                     __clockid_t __clock_id)
+     __THROW __nonnull ((1));
 #endif
 
 
@@ -949,19 +996,23 @@ extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
 /* Initialize the spinlock LOCK.  If PSHARED is nonzero the spinlock can
    be shared between different processes.  */
 extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
-     __THROW;
+     __THROW __nonnull ((1));
 
 /* Destroy the spinlock LOCK.  */
-extern int pthread_spin_destroy (pthread_spinlock_t *__lock) __THROW;
+extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
+     __THROW __nonnull ((1));
 
 /* Wait until spinlock LOCK is retrieved.  */
-extern int pthread_spin_lock (pthread_spinlock_t *__lock) __THROW;
+extern int pthread_spin_lock (pthread_spinlock_t *__lock)
+     __THROW __nonnull ((1));
 
 /* Try to lock spinlock LOCK.  */
-extern int pthread_spin_trylock (pthread_spinlock_t *__lock) __THROW;
+extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
+     __THROW __nonnull ((1));
 
 /* Release spinlock LOCK.  */
-extern int pthread_spin_unlock (pthread_spinlock_t *__lock) __THROW;
+extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
+     __THROW __nonnull ((1));
 
 
 /* Functions to handle barriers.  */
@@ -970,29 +1021,36 @@ extern int pthread_spin_unlock (pthread_spinlock_t *__lock) __THROW;
    opened when COUNT waiters arrived.  */
 extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
                                 __const pthread_barrierattr_t *__restrict
-                                __attr, unsigned int __count) __THROW;
+                                __attr, unsigned int __count)
+     __THROW __nonnull ((1));
 
 /* Destroy a previously dynamically initialized barrier BARRIER.  */
-extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __THROW;
+extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
+     __THROW __nonnull ((1));
 
 /* Wait on barrier BARRIER.  */
-extern int pthread_barrier_wait (pthread_barrier_t *__barrier) __THROW;
+extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
+     __THROW __nonnull ((1));
 
 
 /* Initialize barrier attribute ATTR.  */
-extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) __THROW;
+extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
+     __THROW __nonnull ((1));
 
 /* Destroy previously dynamically initialized barrier attribute ATTR.  */
-extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __THROW;
+extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
+     __THROW __nonnull ((1));
 
 /* Get the process-shared flag of the barrier attribute ATTR.  */
 extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
                                           __restrict __attr,
-                                          int *__restrict __pshared) __THROW;
+                                          int *__restrict __pshared)
+     __THROW __nonnull ((1, 2));
 
 /* Set the process-shared flag of the barrier attribute ATTR.  */
 extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
-                                           int __pshared) __THROW;
+                                           int __pshared)
+     __THROW __nonnull ((1));
 #endif
 
 
@@ -1005,7 +1063,8 @@ extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
    DESTR_FUNCTION is not called if the value associated is NULL when
    the key is destroyed.  */
 extern int pthread_key_create (pthread_key_t *__key,
-                              void (*__destr_function) (void *)) __THROW;
+                              void (*__destr_function) (void *))
+     __THROW __nonnull ((1));
 
 /* Destroy KEY.  */
 extern int pthread_key_delete (pthread_key_t __key) __THROW;
@@ -1015,13 +1074,14 @@ extern void *pthread_getspecific (pthread_key_t __key) __THROW;
 
 /* Store POINTER in the thread-specific data slot identified by KEY. */
 extern int pthread_setspecific (pthread_key_t __key,
-                               __const void *__pointer) __THROW;
+                               __const void *__pointer) __THROW ;
 
 
 #ifdef __USE_XOPEN2K
 /* Get ID of CPU-time clock for thread THREAD_ID.  */
 extern int pthread_getcpuclockid (pthread_t __thread_id,
-                                 __clockid_t *__clock_id) __THROW;
+                                 __clockid_t *__clock_id)
+     __THROW __nonnull ((2));
 #endif
 
 
index 223b1110834bbb8a0098bbc81bbb232702e8d9af..88885b735d8b9a616c404a0776a890c6fa58cc65 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef UP
 # define LOCK \
        cmpl    $0, %gs:MULTIPLE_THREADS_OFFSET;                              \
-       je,pt   0f;                                                           \
+       je      0f;                                                           \
        lock;                                                                 \
 0:
 #endif
index 9acd81ae5a2ce3de9bdc9bee2ac19f9c025f8e09..e2da5b04cf01f80b8a9d679a37db47de3b23b354 100644 (file)
@@ -67,7 +67,7 @@ __lll_mutex_lock_wait:
        xchgl   %eax, (%ebx)    /* NB:   lock is implied */
 
        testl   %eax, %eax
-       jnz,pn  1b
+       jnz     1b
 
        popl    %esi
        cfi_adjust_cfa_offset(-4)
index 114284c44cfeb22e48ef221b753711ef9f5d790f..fe7a8b9c66d2008feaaf99ae2bc2772f9fe5ae23 100644 (file)
@@ -82,7 +82,7 @@ pthread_barrier_wait:
 #else
        cmpl    %edx, CURR_EVENT(%ebx)
 #endif
-       je,pn   8b
+       je      8b
 
        /* Increment LEFT.  If this brings the count back to the
           initial count unlock the object.  */
@@ -92,7 +92,7 @@ pthread_barrier_wait:
        xaddl   %edx, LEFT(%ebx)
        subl    $1, %ecx
        cmpl    %ecx, %edx
-       jne,pt  10f
+       jne     10f
 
        /* Release the mutex.  We cannot release the lock before
           waking the waiting threads since otherwise a new thread might
@@ -131,7 +131,7 @@ pthread_barrier_wait:
        xaddl   %edx, LEFT(%ebx)
        subl    $1, %ecx
        cmpl    %ecx, %edx
-       jne,pt  5f
+       jne     5f
 
        /* Release the mutex.  We cannot release the lock before
           waking the waiting threads since otherwise a new thread might
index 318b53a87340004483e4c0cb287a1350db9c3c7e..aa1f9f41ca92da416891667ade8446f0cc91099d 100644 (file)
@@ -49,12 +49,12 @@ sem_timedwait:
 
        movl    (%ecx), %eax
 2:     testl   %eax, %eax
-       je,pn   1f
+       je      1f
 
        leal    -1(%eax), %edx
        LOCK
        cmpxchgl %edx, (%ecx)
-       jne,pn  2b
+       jne     2b
 
        xorl    %eax, %eax
        ret
@@ -117,7 +117,7 @@ sem_timedwait:
        call    __pthread_disable_asynccancel
 
        testl   %esi, %esi
-       je,pt   9f
+       je      9f
        cmpl    $-EWOULDBLOCK, %esi
        jne     3f
 
@@ -128,7 +128,7 @@ sem_timedwait:
        leal    -1(%eax), %ecx
        LOCK
        cmpxchgl %ecx, (%ebx)
-       jne,pn  8b
+       jne     8b
 
        addl    $12, %esp
        cfi_adjust_cfa_offset(-12)
index d36a1088fbc9fd18c75caeec36dd4102ac967210..fbc3b3c9328642de036fc3e5c655c95f13a770cd 100644 (file)
@@ -42,7 +42,7 @@ __new_sem_trywait:
        leal    -1(%eax), %edx
        LOCK
        cmpxchgl %edx, (%ecx)
-       jne,pn  2b
+       jne     2b
        xorl    %eax, %eax
        ret
 
index 3e908aef9c2e0e5f13a87079c20fe2a560118142..b1296275d078a05628650b4f9cae9cd8bb20405b 100644 (file)
@@ -62,7 +62,7 @@ __new_sem_wait:
        leal    -1(%eax), %edx
        LOCK
        cmpxchgl %edx, (%ebx)
-       jne,pn  2b
+       jne     2b
        xorl    %eax, %eax
 
        movl    4(%esp), %esi
index 23e81f4e4b6d04584eb28ef9e47adc12b0706c60..e405f84f25f43dc2f26a9e94d26f67058dfc14b4 100644 (file)
@@ -474,7 +474,7 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
 # define lll_trylock(futex) \
   ({ unsigned char ret;                                                              \
      __asm __volatile ("cmpl $0, %%gs:%P5\n\t"                               \
-                      "je,pt 0f\n\t"                                         \
+                      "je 0f\n\t"                                            \
                       "lock\n"                                               \
                       "0:\tcmpxchgl %2, %1; setne %0"                        \
                       : "=a" (ret), "=m" (futex)                             \
@@ -488,7 +488,7 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
 # define lll_lock(futex) \
   (void) ({ int ignore1, ignore2;                                            \
            __asm __volatile ("cmpl $0, %%gs:%P6\n\t"                         \
-                             "je,pt 0f\n\t"                                  \
+                             "je 0f\n\t"                                     \
                              "lock\n"                                        \
                              "0:\tcmpxchgl %1, %2\n\t"                       \
                              "jnz _L_lock_%=\n\t"                            \
@@ -511,7 +511,7 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
 # define lll_unlock(futex) \
   (void) ({ int ignore;                                                              \
             __asm __volatile ("cmpl $0, %%gs:%P3\n\t"                        \
-                             "je,pt 0f\n\t"                                  \
+                             "je 0f\n\t"                                     \
                              "lock\n"                                        \
                              "0:\tsubl $1,%0\n\t"                            \
                              "jne _L_unlock_%=\n\t"                          \
@@ -551,7 +551,7 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
                        "1:\tmovl %1, %%eax\n\t"                              \
                        LLL_ENTER_KERNEL                                      \
                        "cmpl $0, (%%ebx)\n\t"                                \
-                       "jne,pn 1b\n\t"                                       \
+                       "jne 1b\n\t"                                          \
                        LLL_EBX_LOAD                                          \
                        : "=&a" (__ignore)                                    \
                        : "i" (SYS_futex), LLL_EBX_REG (&tid), "S" (0),       \
index fcc1240fef3d5d0f0e03189d056a9ab506c52673..abd019df47a51f3a4b3e8a6270695507c62b9f38 100644 (file)
 # define __lll_rel_instr       ""
 #else
 # define __lll_acq_instr       "isync"
-# define __lll_rel_instr       "sync"
+# ifdef _ARCH_PWR4
+/*
+ * Newer powerpc64 processors support the new "light weight" sync (lwsync)
+ * So if the build is using -mcpu=[power4,power5,power5+,970] we can
+ * safely use lwsync.
+ */
+#  define __lll_rel_instr      "lwsync"
+# else
+/*
+ * Older powerpc32 processors don't support the new "light weight"
+ * sync (lwsync).  So the only safe option is to use normal sync
+ * for all powerpc32 applications.
+ */
+#  define __lll_rel_instr      "sync"
+# endif
 #endif
 
 /* Set *futex to ID if it is 0, atomically.  Returns the old value */
index e91c289a4f948ce4c7af7be9a4fe8c9938d352e5..0b35964e7b45433b492d62224f2890f484f8e76e 100644 (file)
@@ -1,4 +1,5 @@
-# Copyright (C) 1998,2000,2002,2003,2004,2005 Free Software Foundation, Inc.
+# Copyright (C) 1998,2000,2002,2003,2004,2005,2006
+#      Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -58,9 +59,6 @@ endif
 
 nscd-modules += selinux
 selinux-LIBS := -lselinux $(libaudit)
-endif
-
-LDLIBS-nscd = $(selinux-LIBS)
 
 # The configure.in check for libselinux and its headers did not use
 # $SYSINCLUDES.  The directory specified by --with-headers usually
@@ -69,6 +67,9 @@ LDLIBS-nscd = $(selinux-LIBS)
 # system headers will be ok for this file.
 $(objpfx)nscd_stat.o: sysincludes = # nothing
 $(objpfx)selinux.o: sysincludes = # nothing
+endif
+
+LDLIBS-nscd = $(selinux-LIBS)
 
 distribute := nscd.h nscd-client.h dbg_log.h \
              $(addsuffix .c, $(filter-out xmalloc,$(all-nscd-modules))) \
index 1e3cd7557fb9b9d0b14cc3a7e414bf684af421a4..0426e6346fa8d127d1830db1858b900d6e42e7fb 100644 (file)
@@ -1556,18 +1556,24 @@ main_loop_poll (void)
              /* We have a new incoming connection.  Accept the connection.  */
              int fd = TEMP_FAILURE_RETRY (accept (sock, NULL, NULL));
 
-             /* use the descriptor if we have not reached the limit.  */
-             if (fd >= 0 && firstfree < nconns)
+             /* Use the descriptor if we have not reached the limit.  */
+             if (fd >= 0)
                {
-                 conns[firstfree].fd = fd;
-                 conns[firstfree].events = POLLRDNORM;
-                 starttime[firstfree] = now;
-                 if (firstfree >= nused)
-                   nused = firstfree + 1;
-
-                 do
-                   ++firstfree;
-                 while (firstfree < nused && conns[firstfree].fd != -1);
+                 if (firstfree < nconns)
+                   {
+                     conns[firstfree].fd = fd;
+                     conns[firstfree].events = POLLRDNORM;
+                     starttime[firstfree] = now;
+                     if (firstfree >= nused)
+                       nused = firstfree + 1;
+
+                     do
+                       ++firstfree;
+                     while (firstfree < nused && conns[firstfree].fd != -1);
+                   }
+                 else
+                   /* We cannot use the connection so close it.  */
+                   close (fd);
                }
 
              --n;
index 2941cbdc159a5e39529c375cd72d37b6ee18a88e..917163af78666c64d59e7421ebb34fbb8cc2f6ce 100644 (file)
@@ -491,10 +491,10 @@ write_pid (const char *file)
     return -1;
 
   fprintf (fp, "%d\n", getpid ());
-  if (fflush (fp) || ferror (fp))
-    return -1;
+
+  int result = fflush (fp) || ferror (fp) ? -1 : 0;
 
   fclose (fp);
 
-  return 0;
+  return result;
 }
index 8025168a5e59c6c8fd4043f40534fb4ab96853df..fd749446be3a1f7bfc5ba60c92f40e2f75fee88b 100644 (file)
@@ -176,35 +176,40 @@ get_mapping (request_type type, const char *key,
   struct mapped_database *result = NO_MAPPING;
 #ifdef SCM_RIGHTS
   const size_t keylen = strlen (key) + 1;
-  char resdata[keylen];
   int saved_errno = errno;
 
   int mapfd = -1;
 
   /* Send the request.  */
-  struct iovec iov[2];
-  request_header req;
+  struct
+  {
+    request_header req;
+    char key[keylen];
+  } reqdata;
 
   int sock = open_socket ();
   if (sock < 0)
     goto out;
 
-  req.version = NSCD_VERSION;
-  req.type = type;
-  req.key_len = keylen;
-
-  iov[0].iov_base = &req;
-  iov[0].iov_len = sizeof (req);
-  iov[1].iov_base = (void *) key;
-  iov[1].iov_len = keylen;
+  reqdata.req.version = NSCD_VERSION;
+  reqdata.req.type = type;
+  reqdata.req.key_len = keylen;
+  memcpy (reqdata.key, key, keylen);
 
-  if (__builtin_expect (TEMP_FAILURE_RETRY (__writev (sock, iov, 2))
-                       != iov[0].iov_len + iov[1].iov_len, 0))
+# ifndef MSG_NOSIGNAL
+#  define MSG_NOSIGNAL 0
+# endif
+  if (__builtin_expect (TEMP_FAILURE_RETRY (__send (sock, &reqdata,
+                                                   sizeof (reqdata),
+                                                   MSG_NOSIGNAL))
+                       != sizeof (reqdata), 0))
     /* We cannot even write the request.  */
     goto out_close2;
 
   /* Room for the data sent along with the file descriptor.  We expect
      the key name back.  */
+# define resdata reqdata.key
+  struct iovec iov[1];
   iov[0].iov_base = resdata;
   iov[0].iov_len = keylen;
 
@@ -231,11 +236,7 @@ get_mapping (request_type type, const char *key,
   if (wait_on_socket (sock) <= 0)
     goto out_close2;
 
-# ifndef MSG_NOSIGNAL
-#  define MSG_NOSIGNAL 0
-# endif
-  if (__builtin_expect (TEMP_FAILURE_RETRY (__recvmsg (sock, &msg,
-                                                      MSG_NOSIGNAL))
+  if (__builtin_expect (TEMP_FAILURE_RETRY (__recvmsg (sock, &msg, 0))
                        != keylen, 0))
     goto out_close2;
 
index f00fc1cfe9a1d322f63ed3dafcefba30128f5cd7..5c7ad0999a536c6415d8140e8ac2abaede2d14f3 100644 (file)
@@ -1,5 +1,5 @@
 /* Public key file parser in nss_files module.
-   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -78,6 +78,7 @@ search (const char *netname, char *result, int *errnop, int secret)
        p = __strtok_r (NULL, ":\n", &save_ptr);
       if (p == NULL)  /* malformed line? */
        continue;
+      fclose (stream);
       strcpy (result, p);
       return NSS_STATUS_SUCCESS;
     }
index a0c7b94b0225327c0c99bdc0ec03cf07a929d5f6..57f2f94d59c571096cfcf5dc70bc71230e034f6c 100644 (file)
@@ -88,7 +88,7 @@ tests         := tstgetopt testfnm runtests runptests      \
                   tst-execvp1 tst-execvp2 tst-execlp1 tst-execlp2 \
                   tst-execv1 tst-execv2 tst-execl1 tst-execl2 \
                   tst-execve1 tst-execve2 tst-execle1 tst-execle2 \
-                  tst-execvp3 tst-execvp4 tst-rfc3484
+                  tst-execvp3 tst-execvp4 tst-rfc3484 tst-rfc3484-2
 xtests         := bug-ga2
 ifeq (yes,$(build-shared))
 test-srcs      := globtest
index b72b7c758ab49221d82426a3fc720f4c486cf782..d461108e53ba2ec5b3b5f571884147d466f2cb39 100644 (file)
@@ -1,5 +1,5 @@
 /* Checking macros for unistd functions.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -80,16 +80,16 @@ pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
 #endif
 
 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
-extern int __readlink_chk (__const char *__restrict __path,
-                          char *__restrict __buf, size_t __len,
-                          size_t __buflen)
+extern ssize_t __readlink_chk (__const char *__restrict __path,
+                              char *__restrict __buf, size_t __len,
+                              size_t __buflen)
      __THROW __nonnull ((1, 2)) __wur;
-extern int __REDIRECT_NTH (__readlink_alias,
-                          (__const char *__restrict __path,
-                           char *__restrict __buf, size_t __len), readlink)
+extern ssize_t __REDIRECT_NTH (__readlink_alias,
+                              (__const char *__restrict __path,
+                               char *__restrict __buf, size_t __len), readlink)
      __nonnull ((1, 2)) __wur;
 
-extern __always_inline __nonnull ((1, 2)) __wur int
+extern __always_inline __nonnull ((1, 2)) __wur ssize_t
 __NTH (readlink (__const char *__restrict __path, char *__restrict __buf,
                 size_t __len))
 {
index f6c145d209a20814399853ad4cd565092a112130..d787b9bff9a989c1a66df6fd81f5768ece11d454 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions for data structures and routines for the regular
    expression library.
-   Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005
+   Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
 extern "C" {
 #endif
 
-/* POSIX says that <sys/types.h> must be included (by the caller) before
-   <regex.h>.  */
-
-#if !defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE && defined VMS
-/* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it
-   should be there.  */
-# include <stddef.h>
-#endif
-
 /* The following two types have to be signed and unsigned integer type
    wide enough to hold a value of a pointer.  For most ANSI compilers
    ptrdiff_t and size_t should be likely OK.  Still size of these two
diff --git a/posix/tst-rfc3484-2.c b/posix/tst-rfc3484-2.c
new file mode 100644 (file)
index 0000000..b3987c8
--- /dev/null
@@ -0,0 +1,128 @@
+#include <stdbool.h>
+#include <stdio.h>
+
+/* Internal definitions used in the libc code.  */
+#define __getservbyname_r getservbyname_r
+#define __socket socket
+#define __getsockname getsockname
+#define __inet_aton inet_aton
+#define __gethostbyaddr_r gethostbyaddr_r
+#define __gethostbyname2_r gethostbyname2_r
+
+void
+attribute_hidden
+__check_pf (bool *p1, bool *p2, struct in6addrinfo **in6ai, size_t *in6ailen)
+{
+  *p1 = *p2 = true;
+  *in6ai = NULL;
+  *in6ailen = 0;
+}
+int
+__idna_to_ascii_lz (const char *input, char **output, int flags)
+{
+  return 0;
+}
+int
+__idna_to_unicode_lzlz (const char *input, char **output, int flags)
+{
+  return 0;
+}
+
+#include "../sysdeps/posix/getaddrinfo.c"
+
+service_user *__nss_hosts_database attribute_hidden;
+
+
+/* This is the beginning of the real test code.  The above defines
+   (among other things) the function rfc3484_sort.  */
+
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+# define h(n) n
+#else
+# define h(n) __bswap_constant_32 (n)
+#endif
+
+
+static int
+do_test (void)
+{
+  struct sockaddr_in so1;
+  so1.sin_family = AF_INET;
+  so1.sin_addr.s_addr = h (0xc0a85f19);
+
+  struct sockaddr_in sa1;
+  sa1.sin_family = AF_INET;
+  sa1.sin_addr.s_addr = h (0xe0a85f19);
+
+  struct addrinfo ai1;
+  ai1.ai_family = AF_INET;
+  ai1.ai_addr = (struct sockaddr *) &sa1;
+
+  struct sockaddr_in6 so2;
+  so2.sin6_family = AF_INET6;
+  so2.sin6_addr.s6_addr32[0] = h (0xfec01234);
+  so2.sin6_addr.s6_addr32[1] = 1;
+  so2.sin6_addr.s6_addr32[2] = 1;
+  so2.sin6_addr.s6_addr32[3] = 1;
+
+  struct sockaddr_in6 sa2;
+  sa2.sin6_family = AF_INET6;
+  sa2.sin6_addr.s6_addr32[0] = h (0x07d10001);
+  sa2.sin6_addr.s6_addr32[1] = 1;
+  sa2.sin6_addr.s6_addr32[2] = 1;
+  sa2.sin6_addr.s6_addr32[3] = 1;
+
+  struct addrinfo ai2;
+  ai2.ai_family = AF_INET6;
+  ai2.ai_addr = (struct sockaddr *) &sa2;
+
+
+  struct sort_result results[2];
+
+  results[0].dest_addr = &ai1;
+  results[0].got_source_addr = true;
+  results[0].source_addr_len = sizeof (so1);
+  memcpy (&results[0].source_addr, &so1, sizeof (so1));
+
+  results[1].dest_addr = &ai2;
+  results[1].got_source_addr = true;
+  results[1].source_addr_len = sizeof (so2);
+  memcpy (&results[1].source_addr, &so2, sizeof (so2));
+
+
+  qsort (results, 2, sizeof (results[0]), rfc3484_sort);
+
+  int result = 0;
+  if (results[0].dest_addr->ai_family == AF_INET6)
+    {
+      puts ("wrong order in first test");
+      result |= 1;
+    }
+
+
+  /* And again, this time with the reverse starting order.  */
+  results[1].dest_addr = &ai1;
+  results[1].got_source_addr = true;
+  results[1].source_addr_len = sizeof (so1);
+  memcpy (&results[1].source_addr, &so1, sizeof (so1));
+
+  results[0].dest_addr = &ai2;
+  results[0].got_source_addr = true;
+  results[0].source_addr_len = sizeof (so2);
+  memcpy (&results[0].source_addr, &so2, sizeof (so2));
+
+
+  qsort (results, 2, sizeof (results[0]), rfc3484_sort);
+
+  if (results[0].dest_addr->ai_family == AF_INET6)
+    {
+      puts ("wrong order in second test");
+      result |= 1;
+    }
+
+  return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index 378e43a01197154c263cf0d8b0e2e9006fc2fbaa..abfb76d543b9b7b394c34a422219d46e093fb40c 100644 (file)
 
 void
 attribute_hidden
-__check_pf (bool *p1, bool *p2)
+__check_pf (bool *p1, bool *p2, struct in6addrinfo **in6ai, size_t *in6ailen)
 {
   *p1 = *p2 = true;
+  *in6ai = NULL;
+  *in6ailen = 0;
 }
 int
 __idna_to_ascii_lz (const char *input, char **output, int flags)
index c8e8a0594af22899366c05dee2e28659a2578691..c7a52722ca624b2ef2f5ccfd9ee12ddda43f22bf 100644 (file)
@@ -770,8 +770,9 @@ extern int symlink (__const char *__from, __const char *__to)
 /* Read the contents of the symbolic link PATH into no more than
    LEN bytes of BUF.  The contents are not null-terminated.
    Returns the number of characters read, or -1 for errors.  */
-extern int readlink (__const char *__restrict __path, char *__restrict __buf,
-                    size_t __len) __THROW __nonnull ((1, 2)) __wur;
+extern ssize_t readlink (__const char *__restrict __path,
+                        char *__restrict __buf, size_t __len)
+     __THROW __nonnull ((1, 2)) __wur;
 #endif /* Use BSD.  */
 
 #ifdef __USE_ATFILE
@@ -780,8 +781,8 @@ extern int symlinkat (__const char *__from, int __tofd,
                      __const char *__to) __THROW __nonnull ((1, 3)) __wur;
 
 /* Like readlink but a relative PATH is interpreted relative to FD.  */
-extern int readlinkat (int __fd, __const char *__restrict __path,
-                      char *__restrict __buf, size_t __len)
+extern ssize_t readlinkat (int __fd, __const char *__restrict __path,
+                          char *__restrict __buf, size_t __len)
      __THROW __nonnull ((2, 3)) __wur;
 #endif
 
index b5c18fef040b5f7a691064d09536a39879215d48..fa8d098da0aaa3fdfb97b5e3f5f61f47261cd8a3 100644 (file)
@@ -1,5 +1,4 @@
-# Copyright (C) 1991,1992,1993,1994,1995,1996,1997,1998,2003
-#      Free Software Foundation, Inc.
+# Copyright (C) 1991-1998,2003,2006 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -38,7 +37,7 @@ routines      := signal raise killpg \
                   allocrtsig sigtimedwait sigwaitinfo sigqueue \
                   sighold sigrelse sigignore sigset
 
-tests          := tst-signal tst-sigset tst-sigsimple tst-raise
+tests          := tst-signal tst-sigset tst-sigsimple tst-raise tst-sigset2
 
 distribute     := sigsetops.h testrtsig.h sigset-cvt-mask.h
 
diff --git a/signal/tst-sigset2.c b/signal/tst-sigset2.c
new file mode 100644 (file)
index 0000000..f653323
--- /dev/null
@@ -0,0 +1,184 @@
+/* sigset_SIG_HOLD_bug.c [BZ #1951] */
+#include <errno.h>
+#include <error.h>
+#include <inttypes.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+#define TEST_SIG SIGINT
+
+
+/* Print mask of blocked signals for this process */
+static void
+printSigMask (const char *msg)
+{
+  sigset_t currMask;
+  int sig;
+  int cnt;
+
+  if (msg != NULL)
+    printf ("%s", msg);
+
+  if (sigprocmask (SIG_BLOCK, NULL, &currMask) == -1)
+    error (1, errno, "sigaction");
+
+  cnt = 0;
+  for (sig = 1; sig < NSIG; sig++)
+    {
+      if (sigismember (&currMask, sig))
+       {
+         cnt++;
+         printf ("\t\t%d (%s)\n", sig, strsignal (sig));
+        }
+    }
+
+  if (cnt == 0)
+    printf ("\t\t<empty signal set>\n");
+} /* printSigMask */
+
+static void
+handler (int sig)
+{
+  printf ("Caught signal %d\n", sig);
+  printSigMask ("Signal mask in handler\n");
+  printf ("Handler returning\n");
+  _exit (1);
+} /* handler */
+
+static void
+printDisposition (sighandler_t disp)
+{
+  if (disp == SIG_HOLD)
+    printf ("SIG_HOLD");
+  else if (disp == SIG_DFL)
+    printf ("SIG_DFL");
+  else if (disp == SIG_IGN)
+    printf ("SIG_IGN");
+  else
+    printf ("handled at %" PRIxPTR, (uintptr_t) disp);
+} /* printDisposition */
+
+static int
+returnTest1 (void)
+{
+  sighandler_t prev;
+
+  printf ("===== TEST 1 =====\n");
+  printf ("Blocking signal with sighold()\n");
+  if (sighold (TEST_SIG) == -1)
+    error (1, errno, "sighold");
+  printSigMask ("Signal mask after sighold()\n");
+
+  printf ("About to use sigset() to establish handler\n");
+  prev = sigset (TEST_SIG, handler);
+  if (prev == SIG_ERR)
+    error(1, errno, "sigset");
+
+  printf ("Previous disposition: ");
+  printDisposition (prev);
+  printf (" (should be SIG_HOLD)\n");
+  if (prev != SIG_HOLD)
+    {
+      printf("TEST FAILED!!!\n");
+      return 1;
+    }
+  return 0;
+} /* returnTest1 */
+
+static int
+returnTest2 (void)
+{
+  sighandler_t prev;
+
+  printf ("\n===== TEST 2 =====\n");
+
+  printf ("About to use sigset() to set SIG_HOLD\n");
+  prev = sigset (TEST_SIG, SIG_HOLD);
+  if (prev == SIG_ERR)
+    error (1, errno, "sigset");
+
+  printf ("Previous disposition: ");
+  printDisposition (prev);
+  printf (" (should be SIG_DFL)\n");
+  if (prev != SIG_DFL)
+    {
+      printf("TEST FAILED!!!\n");
+      return 1;
+    }
+  return 0;
+} /* returnTest2 */
+
+static int
+returnTest3 (void)
+{
+  sighandler_t prev;
+
+  printf ("\n===== TEST 3 =====\n");
+
+  printf ("About to use sigset() to set SIG_HOLD\n");
+  prev = sigset (TEST_SIG, SIG_HOLD);
+  if (prev == SIG_ERR)
+    error (1, errno, "sigset");
+
+  printf ("About to use sigset() to set SIG_HOLD (again)\n");
+  prev = sigset (TEST_SIG, SIG_HOLD);
+  if (prev == SIG_ERR)
+    error (1, errno, "sigset");
+
+  printf ("Previous disposition: ");
+  printDisposition (prev);
+  printf (" (should be SIG_HOLD)\n");
+  if (prev != SIG_HOLD)
+    {
+      printf("TEST FAILED!!!\n");
+      return 1;
+    }
+  return 0;
+} /* returnTest3 */
+
+int
+main (int argc, char *argv[])
+{
+  pid_t childPid;
+
+  childPid = fork();
+  if (childPid == -1)
+    error (1, errno, "fork");
+
+  if (childPid == 0)
+    exit (returnTest1 ());
+
+  int status;
+  if (TEMP_FAILURE_RETRY (waitpid (childPid, &status, 0)) != childPid)
+    error (1, errno, "waitpid");
+  int result = !WIFEXITED (status) || WEXITSTATUS (status) != 0;
+
+  childPid = fork();
+  if (childPid == -1)
+    error (1, errno, "fork");
+
+  if (childPid == 0)
+    exit (returnTest2 ());
+
+  if (TEMP_FAILURE_RETRY (waitpid (childPid, &status, 0)) != childPid)
+    error (1, errno, "waitpid");
+  result |= !WIFEXITED (status) || WEXITSTATUS (status) != 0;
+
+  childPid = fork();
+  if (childPid == -1)
+    error (1, errno, "fork");
+
+  if (childPid == 0)
+    exit (returnTest3 ());
+
+  if (TEMP_FAILURE_RETRY (waitpid (childPid, &status, 0)) != childPid)
+    error (1, errno, "waitpid");
+  result |= !WIFEXITED (status) || WEXITSTATUS (status) != 0;
+
+  return result;
+} /* main */
index 269ef664c7d14612d9d6847558596f3ee84b1359..24c03db0a644ba121b7bab1aa1bf933422369729 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index cfd9526ea6f28485d61eaf57b2e891edc7c8b0e1..b86991ee56298577a3790699a3250d73fd3ebdb2 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index f889a189b63be4cc531fdbf6074e49526fe2abc9..49b67f0ba96fad4cb48e4d010b85a5b240a0902e 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "quad.h"
index b45a91ce0c48592291ca2dab6ea133ad70c316ff..c3bb0d247cb7620b3b65e520eb3d27d7169c10df 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index d62c7c02b72179d48f0c720695872ba04f3ba9ef..176bb3c2cb350bd0d746e8aa3c14db4a0334c755 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index 842aa8116efe0a8b56a1f059c82a956174e120b1..916fbfe9748d24ed79ad18ae72dfe3ad6d5d1c78 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "quad.h"
index 86fd8ada86a67b4f3ae4339ee46e65a6427138e5..c8f4420af859b60fff396c3fa1cf6b1896106b93 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -19,8 +28,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #if _FP_W_TYPE_SIZE < 32
 #error "Here's a nickel kid.  Go buy yourself a real computer."
index d1eb97222f79e3a88cbcd308fb8d4fe437c93e6e..efa769e986dd8217e38f404ea149daacc09ccbdd 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index 371465f74dab67f93a9af82910a12a77625c528c..7e01c01d2f4a32d6df3ca169a76d5355f86e24b0 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index 59479b47a04131eb43c6e35a2d729bf469594ed9..fd6ffd1ebefd9c367baec16274253288adfafbdb 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "quad.h"
index e25cc5c822e3a4a4c443552345189605802ff11a..4101639a947bb715f2fb66cbe555cd78d4633624 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index 0f2060e970351ce06c5f9c01d767415d8094cfc4..bbf39429e7f74fe4f2c12fb70b46508493838d9e 100644 (file)
@@ -9,6 +9,15 @@
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -16,8 +25,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #if _FP_W_TYPE_SIZE < 32
 #error "Here's a nickel, kid. Go buy yourself a real computer."
index 220caf930d60adb9f231778e199fcd1fb8f6ffb6..fba22d5a197d9ed2598d708c15366f1a92f808b0 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index 412d2e877c6d9074531680004ef2656f4d60d846..c43cf1edee579938a0d9e0ac4a1cfebeeee36431 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index 537de101c6fb22e6d2b4919d69d1e94dd26facd7..fdfe35af519f078ea0a858550c6335f420c3f3ac 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index 0607005108cc107cb0d59bdb7b589c8416c98bc7..a05f3e39a5f6704583cf5d6f2c73fe3ba2d46ea6 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index d9ef9e843b9d0decb40ee1bb081a52de2bff1c69..384d9bdd5362ce56d0bf4622002737c0922cca87 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index 916b079387e0ddfa3462a4a5cf915e822eeb1716..1d40ed05df75a007a01893793f846c77494e8d98 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index 73a1cc7cbf0b40af42d81f0a50e407b67532c964..ea10ce2dd3b9e489f9c49d9fc19b1e4780b77753 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "quad.h"
index 78bad0ee39b76a5e6355128a600bc917ad62b80c..eb71038bc35a3d7c704a2b8abc1cbc8e902361cb 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "quad.h"
index b350d952724021cc54ebe47624fc5fecca0cb126..d85198f18539eeef3341954d0871b5c6729c1a71 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index c363e5fbcebe2352f540041a506afcc43d49ee3c..492ffdea68077210863391bcd5a35901f5488c1e 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index 6a43cb88effd8ef9b238bb5ed42e33f305972533..5484153837282fcd510215f7dc1dc0c61ce01b6c 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index 3ddcee55dedc6069c8202dcb68c5992abaca36b6..ac9d4b9654f8bbdd68c91989ae9c7385fd6d1b34 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index 0bf5327d1cd4563636c25700291a45736fbbb6dc..86f1fc856295c410258d599f8017ce5e21abd960 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "quad.h"
index 387b9c615bdc3cd7f53df238df753c4207058da3..e0335da47902d7db7f3f595c1482d5bf39a7e7cf 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "quad.h"
index 2c6800010f47d629212b9f838af99e8b76279c93..21e9fb1899c25e9ad44fc89881c93701101a291d 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index 36f05ee4097e802f25ec84471ea111a01e2b1e00..ee57915c3b847f8d0cfbdba399d66468c9f12d9b 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index 03487adfcbbe5482f6ea012ca2b6f5cddc7e9332..564800bc05ab4b98e7fc01474a5313382ddd3a06 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "quad.h"
index d11ddcc9f1717d848c5c8d0339484203f388e4e6..b6d5f8d1d2ad70f12df0b6e73fbe52703046e31b 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index 64006e691b2bf383103b08acff8adf8ef849ee3f..76217fe347871ad0215d20ff690aa74cbee840a6 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index 5a64c70bc2f49d26e70c78542641603a9763b3a6..8c3d9cc619376beaf7669ed2cca06bf6405861c7 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "quad.h"
index dcec2f8360e70dbbd4726cba47c34856903c60ab..2169a3f1988979885da1c62e1a53704512b4ee5a 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index a2437e407101e94b315b93bd62ef4d87b4492d3a..5f08764dc50c7ca07372d85a855ca44ab7e8a33b 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index f0fd3af92d7f6cf12eaf23684ea4c7c1447af418..ab357f051c330d6343bc12f461aea701bd97942a 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "quad.h"
index b43ed35cd7cf2c81d00a0fa244fd23d00b62b7d6..97b488ab68a3d47425c600b2c1c0e40ceb2bd86d 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index 16fbf1dddbfdc728545e1e258609540eea5caca1..2ec16ba7b7f9376c36904e0f2d2775910f302332 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index afc3b7862b720da7330ca3b33892fea3b676da7b..c993716e54aadf861f349bb297bc7c2a09fbdb36 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "quad.h"
index b3af2f16d804af9cb63d2ef394a5efcf56232eca..e0dc8620eeea2dc68db82af3bc6e4879cac9a711 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index d1cdbec7d3bf304eea595177864cf238dc5065ab..d1f3ba2f9f5a18d9236f228552d4c87356371aff 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index 51aa7de3702a7610e9e77c540e9dcec22807a3c9..82ff283d0d9bc4ba47a8786a9977ca874ced8ecd 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "quad.h"
index f5efaaabd8f26c84a075cbed6051e8fd0b887eee..528a9819cef833cbb57ea2f27d56ebe62e68765f 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index 86e0c87a394fddb3d7887a7608c78885b4c254b7..c564bd9539e27197ad9c59561e3e2cf4c359cf78 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index 339ee0381f75dcb7c914905c6141b9defcbeabc3..35e03aaacfedf7cef94db74d10fa5e41e407bc91 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "quad.h"
index e6f8a0f108e8ae26398a3e65c0de8e294f053617..7eb2015ae5697f091e335106f2d189742cf96aa6 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index b493df86097a974df6c6d4be53e1e07365deff55..5df4406872015bc1e894130f6038d1fb8022d4a5 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index 067ff1a3f77f6d7cefab4bb327a0073a57488ced..0abab6ddc3b2e9959a3ec97e72868143b72d9768 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "quad.h"
index cc3ce78f56f0c0574c504b75ef1bfd05ba1fbc6b..54869e9a68d26e3471000936fd26b2ec7d75d04b 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index 48ac33b9141ffad130d02ea396f3ba0fbe1b4d4f..bf5db7a452c6b5c1d21438ee1e0ebe01fb16d920 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index 38fbe97d588c0ff3447c0fb06984ef70dd64c9c9..5524c82df1ce1bf324e96e975fdb651a37b2c331 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "quad.h"
index 9f58ba6a086c6fad7717954a5c2b8cd4805be117..35cd0ba7bb159b816600c79e4a4381d57f23157f 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -19,8 +28,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #define _FP_FRAC_DECL_1(X)     _FP_W_TYPE X##_f
 #define _FP_FRAC_COPY_1(D,S)   (D##_f = S##_f)
index d8b89ff8438c084274bc5b58ad4826b0fc223668..5c9bce4c1792ee760c8d1e4f1ef52b524563d8ee 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -19,8 +28,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #define _FP_FRAC_DECL_2(X)     _FP_W_TYPE X##_f0, X##_f1
 #define _FP_FRAC_COPY_2(D,S)   (D##_f0 = S##_f0, D##_f1 = S##_f1)
index c0ffaafff696d3cf9430abd42dff0f092a8b99f1..34f5098e8c21b624c5b2afca0004535395001868 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -19,8 +28,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #define _FP_FRAC_DECL_4(X)     _FP_W_TYPE X##_f[4]
 #define _FP_FRAC_COPY_4(D,S)                   \
index 01d92357ddfb8ce37a8dd135d50f43e50ab60d54..e0612a5e62f652a6509d2ff8df2d8100515ebdfb 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -18,8 +27,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 /* We need just a few things from here for op-4, if we ever need some
    other macros, they can be added. */
index 957f71dacd77324770ce79e018c7c6d264b76e77..4ec7fade485e04dafa5b24e9b843a5a6b83bf6fc 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -18,8 +27,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #define _FP_DECL(wc, X)                                                \
   _FP_I_TYPE X##_c __attribute__((unused)), X##_s, X##_e;      \
index 578f17e43621b11115428b57cad396ecddbed700..d7840ff06623c0ab8cc89d77e9719c1cb48b16dd 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -19,8 +28,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #if _FP_W_TYPE_SIZE < 32
 #error "Here's a nickel, kid. Go buy yourself a real computer."
index ffb31786af0398faefce2f71453e60824fb752cb..9c3734adf48f68a7289d30aaf48f09b599ef8960 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -19,8 +28,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #if _FP_W_TYPE_SIZE < 32
 #error "Here's a nickel kid.  Go buy yourself a real computer."
index 4d4e5d504ca9224bbb23185f5e9f790741ee3c68..dbf080e7f489a827f2387eb8c8fa5d2670193671 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -19,8 +28,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #ifndef SOFT_FP_H
 #define SOFT_FP_H
index b52cafd04d8a1eb254708649d87ef74b3729b304..90601a3748f77cd37b313724a21abdd230b18aaa 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index 436e8cedad09065ca851f8df0f5b88d588372175..9102b8c3a7fff1a116804574afc8f2a64304fbc3 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index ac2ad6fc5fbba6c6d0e9e7d5dfc87524c2a016f4..5026ae19ad288279d2a4cc08ce1b8e64a95309f4 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "quad.h"
index 81a2585d62248d6fd4679bda64bdf5554845e30b..3978b52998dac3be2a1d607efeddd920547f931e 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index 843fb5055dc86603a7cd0d38b0a14fc6682cb155..f1cbdd1ff1f9a64e090b410c1083680ef562ac73 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index a8e2eead5f67c4fd4102376834c67d8bba261b76..7ba4c8c5ea0f1b745f8df01893f86e73d9c3251c 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "quad.h"
index 0e802d9dfd12f69e3506d9e892b1004bb734f3bd..bd953912e98eb2bbd4461b93bf7cb0e5c5938411 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index e88d476f13519c29e793731a627eac6f1d843415..c3827b08abe919c95540efe4cac198c0c41dd12c 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index 0601cf01fde3df9b800e5ea8a0b95e33c9528e62..676c937e20abbaaa86a44618532dc4e19391dd1b 100644 (file)
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -17,8 +26,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index c44b61d131a4c90eb5717ac906fd2442f36b116c..c83a56327591077f09264fbaa2b890bcb7895d75 100644 (file)
@@ -9,6 +9,15 @@
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -16,8 +25,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "double.h"
index 4924ddcc1ed39320bc92ce0e5f9f64b11297397b..8de75635660ca05790ffdd9bf915b3d6e6a46549 100644 (file)
@@ -9,6 +9,15 @@
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -16,8 +25,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "single.h"
index f0e43c1deeb494c50eb8ec96529cc0986b9e6a5d..134b1d09b8a16fad7c1dc454b09b35f106ea3ec6 100644 (file)
@@ -9,6 +9,15 @@
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
@@ -16,8 +25,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include "soft-fp.h"
 #include "quad.h"
index 8f9b2ac3713cd04a2fd291bb6b54135906a43a5b..7c11c1ac22a7b27d89368c48cc20ec20c9818f45 100644 (file)
@@ -64,10 +64,12 @@ inl-tester-ENV = LANGUAGE=C
 noinl-tester-ENV = LANGUAGE=C
 tst-strxfrm-ENV = LOCPATH=$(common-objpfx)localedata
 bug-strcoll1-ENV = LOCPATH=$(common-objpfx)localedata
+CFLAGS-inl-tester.c = -fno-builtin
 CFLAGS-noinl-tester.c = -fno-builtin
 CFLAGS-tst-strlen.c = -fno-builtin
 CFLAGS-stratcliff.c = -fno-builtin
 CFLAGS-test-ffs.c = -fno-builtin
+CFLAGS-tst-inlcall.c = -fno-builtin
 
 ifeq ($(cross-compiling),no)
 tests: $(objpfx)tst-svc.out
index dfc57fd277b8b61de4e55df466e3de190a6a7aae..21056e84a68d877aaf0a1316ff072e70a50bf8c6 100644 (file)
@@ -551,6 +551,7 @@ inline_struct (definition *def, int flag)
            }
          size = 0;
          i = 0;
+         free (sizestr);
          sizestr = NULL;
          print_stat (indent + 1, &dl->decl);
        }
index 2679720a7f71124e164ebb91a71c62ef80994f47..954657a7e4aad69e911a717dba8753e42c09c7d3 100644 (file)
@@ -531,7 +531,7 @@ generate_guard (const char *pathname)
 
   filename = strrchr (pathname, '/');  /* find last component */
   filename = ((filename == NULL) ? pathname : filename + 1);
-  guard = strdup (filename);
+  guard = extendfile (filename, "_H_RPCGEN");
   /* convert to upper case */
   tmp = guard;
   while (*tmp)
@@ -541,7 +541,6 @@ generate_guard (const char *pathname)
       tmp++;
     }
 
-  guard = extendfile (guard, "_H_RPCGEN");
   return guard;
 }
 
@@ -661,6 +660,7 @@ h_output (const char *infile, const char *define, int extend,
     }
 
   fprintf (fout, "\n#endif /* !_%s */\n", guard);
+  free (guard);
   close_input ();
   close_output (outfilename);
 }
@@ -946,6 +946,8 @@ clnt_output (const char *infile, const char *define, int extend,
   close_output (outfilename);
 }
 
+static const char space[] = " ";
+
 static char *
 file_name (const char *file, const char *ext)
 {
@@ -954,16 +956,17 @@ file_name (const char *file, const char *ext)
 
   if (access (temp, F_OK) != -1)
     return (temp);
-  else
-    return ((char *) " ");
+
+  free (temp);
+  return (char *) space;
 }
 
 static void
 mkfile_output (struct commandline *cmd)
 {
   char *mkfilename;
-  const char *clientname, *clntname, *xdrname, *hdrname;
-  const char *servername, *svcname, *servprogname, *clntprogname;
+  char *clientname, *clntname, *xdrname, *hdrname;
+  char *servername, *svcname, *servprogname, *clntprogname;
 
   svcname = file_name (cmd->infile, "_svc.c");
   clntname = file_name (cmd->infile, "_clnt.c");
@@ -977,8 +980,8 @@ mkfile_output (struct commandline *cmd)
     }
   else
     {
-      servername = " ";
-      clientname = " ";
+      servername = (char *) space;
+      clientname = (char *) space;
     }
   servprogname = extendfile (cmd->infile, "_server");
   clntprogname = extendfile (cmd->infile, "_client");
@@ -988,6 +991,8 @@ mkfile_output (struct commandline *cmd)
       char *cp, *temp;
 
       mkfilename = alloc (strlen ("Makefile.") + strlen (cmd->infile) + 1);
+      if (mkfilename == NULL)
+       abort ();
       temp = rindex (cmd->infile, '.');
       cp = stpcpy (mkfilename, "Makefile.");
       strncpy (cp, cmd->infile, (temp - cmd->infile));
@@ -1046,6 +1051,23 @@ $(LDLIBS) \n\n");
   f_print (fout, "clean:\n\t $(RM) core $(TARGETS) $(OBJECTS_CLNT) \
 $(OBJECTS_SVC) $(CLIENT) $(SERVER)\n\n");
   close_output (mkfilename);
+
+  free (clntprogname);
+  free (servprogname);
+  if (servername != space)
+    free (servername);
+  if (clientname != space)
+    free (clientname);
+  if (mkfilename != (char *) cmd->outfile)
+    free (mkfilename);
+  if (svcname != space)
+    free (svcname);
+  if (clntname != space)
+    free (clntname);
+  if (xdrname != space)
+    free (xdrname);
+  if (hdrname != space)
+    free (hdrname);
 }
 
 /*
index 2a29878d6aefb8dc25eb34c2670abe6166ceccd4..f66538701f0be241062dd2ef2ae0de5728a19c42 100644 (file)
@@ -91,6 +91,7 @@ get_definition (void)
       def_const (defp);
       break;
     case TOK_EOF:
+      free (defp);
       return (NULL);
     default:
       error ("definition keyword expected");
@@ -302,7 +303,9 @@ def_union (definition *defp)
   case_list *cases;
 /*  case_list *tcase; */
   case_list **tailp;
+#if 0
   int flag;
+#endif
 
   defp->def_kind = DEF_UNION;
   scan (TOK_IDENT, &tok);
@@ -322,7 +325,9 @@ def_union (definition *defp)
       cases->case_name = tok.str;
       scan (TOK_COLON, &tok);
       /* now peek at next token */
+#if 0
       flag = 0;
+#endif
       if (peekscan (TOK_CASE, &tok))
        {
 
@@ -339,6 +344,7 @@ def_union (definition *defp)
            }
          while (peekscan (TOK_CASE, &tok));
        }
+#if 0
       else if (flag)
        {
 
@@ -346,6 +352,7 @@ def_union (definition *defp)
          tailp = &cases->next;
          cases = ALLOC (case_list);
        };
+#endif
 
       get_declaration (&dec, DEF_UNION);
       cases->case_decl = dec;
index 42ab2bae8b1e96b69ad84580b6ab461d0d078112..af90ef6973ff23e6e64e4fe08fc6b7ac842e6b5c 100644 (file)
@@ -535,6 +535,7 @@ docppline (const char *line, int *lineno, const char **fname)
   *p = 0;
   if (*file == 0)
     {
+      free (file);
       *fname = NULL;
     }
   else
index c0c115abeb7c22b831d943b4e33c10cd035053ae..67b84f184f01dd3404e5d1d47288f9f65d1c1d94 100644 (file)
@@ -485,6 +485,7 @@ svcudp_enablecache (SVCXPRT *transp, u_long size)
   uc->uc_entries = ALLOC (cache_ptr, size * SPARSENESS);
   if (uc->uc_entries == NULL)
     {
+      mem_free (uc, sizeof (struct udp_cache));
       CACHE_PERROR (_("enablecache: could not allocate cache data"));
       return 0;
     }
@@ -492,6 +493,8 @@ svcudp_enablecache (SVCXPRT *transp, u_long size)
   uc->uc_fifo = ALLOC (cache_ptr, size);
   if (uc->uc_fifo == NULL)
     {
+      mem_free (uc->uc_entries, size * SPARSENESS);
+      mem_free (uc, sizeof (struct udp_cache));
       CACHE_PERROR (_("enablecache: could not allocate cache fifo"));
       return 0;
     }
@@ -545,6 +548,7 @@ cache_set (SVCXPRT *xprt, u_long replylen)
       newbuf = mem_alloc (su->su_iosz);
       if (newbuf == NULL)
        {
+         mem_free (victim, sizeof (struct cache_node));
          CACHE_PERROR (_("cache_set: could not allocate new rpc_buffer"));
          return;
        }
index 1f03d17279c6f5f4fc8d2d48897b2fbe95339e25..13945b97198e8617005bda6e12ffd2573272c809 100644 (file)
@@ -1,5 +1,5 @@
 /* Subroutines needed for unwinding stack frames for exception handling.  */
-/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006
    Free Software Foundation, Inc.
    Contributed by Jason Merrill <jason@cygnus.com>.
 
@@ -595,7 +595,7 @@ end_fde_sort (struct object *ob, struct fde_accumulator *accu, size_t count)
 {
   fde_compare_t fde_compare;
 
-  if (accu->linear && accu->linear->count != count)
+  if (accu->linear->count != count)
     abort ();
 
   if (ob->s.b.mixed_encoding)
index 301b53176e380af05d8263749aefcd7daa5c1c61..5ecf2846f3e03f7b4a0f80a9a28a738199779a8e 100644 (file)
@@ -1,5 +1,5 @@
 /* DWARF2 exception handling and frame unwind runtime interface routines.
-   Copyright (C) 1997,1998,1999,2000,2001,2002,2003,2005
+   Copyright (C) 1997,1998,1999,2000,2001,2002,2003,2005,2006
        Free Software Foundation, Inc.
 
    This file is part of the GNU C Library.
@@ -897,12 +897,16 @@ execute_cfa_program (const unsigned char *insn_ptr,
          break;
 
        case DW_CFA_GNU_window_save:
-         /* ??? Hardcoded for SPARC register window configuration.  */
+         /* ??? Hardcoded for SPARC register window configuration.
+            At least do not do anything for archs which explicitly
+            define a lower register number.  */
+#if DWARF_FRAME_REGISTERS >= 32
          for (reg = 16; reg < 32; ++reg)
            {
              fs->regs.reg[reg].how = REG_SAVED_OFFSET;
              fs->regs.reg[reg].loc.offset = (reg - 16) * sizeof (void *);
            }
+#endif
          break;
 
        case DW_CFA_GNU_args_size:
index 46c66a8f7eeb36e6ac8b5bc403db571ab571f6e7..843e60bba3cdb2f0049ae0784cbd83a4bc8cbbb8 100644 (file)
@@ -68,7 +68,7 @@ extern int __idna_to_unicode_lzlz (const char *input, char **output,
 #define GAIH_EAI        ~(GAIH_OKIFUNSPEC)
 
 #ifndef UNIX_PATH_MAX
-#define UNIX_PATH_MAX  108
+# define UNIX_PATH_MAX  108
 #endif
 
 struct gaih_service
@@ -177,9 +177,9 @@ gaih_local (const char *name, const struct gaih_service *service,
       if (! tp->name[0])
        {
          if (req->ai_socktype)
-           return (GAIH_OKIFUNSPEC | -EAI_SOCKTYPE);
+           return GAIH_OKIFUNSPEC | -EAI_SOCKTYPE;
          else
-           return (GAIH_OKIFUNSPEC | -EAI_SERVICE);
+           return GAIH_OKIFUNSPEC | -EAI_SERVICE;
        }
     }
 
@@ -249,9 +249,10 @@ gaih_local (const char *name, const struct gaih_service *service,
 }
 #endif /* 0 */
 
+
 static int
 gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp,
-              const struct addrinfo *req, struct gaih_servtuple *st)
+               const struct addrinfo *req, struct gaih_servtuple *st)
 {
   struct servent *s;
   size_t tmpbuflen = 1024;
@@ -362,6 +363,7 @@ typedef enum nss_status (*nss_getcanonname_r)
    int *errnop, int *h_errnop);
 extern service_user *__nss_hosts_database attribute_hidden;
 
+
 static int
 gaih_inet (const char *name, const struct gaih_service *service,
           const struct addrinfo *req, struct addrinfo **pai,
@@ -389,9 +391,9 @@ gaih_inet (const char *name, const struct gaih_service *service,
       if (! tp->name[0])
        {
          if (req->ai_socktype)
-           return (GAIH_OKIFUNSPEC | -EAI_SOCKTYPE);
+           return GAIH_OKIFUNSPEC | -EAI_SOCKTYPE;
          else
-           return (GAIH_OKIFUNSPEC | -EAI_SERVICE);
+           return GAIH_OKIFUNSPEC | -EAI_SERVICE;
        }
     }
 
@@ -399,7 +401,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
   if (service != NULL)
     {
       if ((tp->protoflag & GAI_PROTO_NOSERVICE) != 0)
-       return (GAIH_OKIFUNSPEC | -EAI_SERVICE);
+       return GAIH_OKIFUNSPEC | -EAI_SERVICE;
 
       if (service->num < 0)
        {
@@ -443,7 +445,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
                  pst = &(newp->next);
                }
              if (st == (struct gaih_servtuple *) &nullserv)
-               return (GAIH_OKIFUNSPEC | -EAI_SERVICE);
+               return GAIH_OKIFUNSPEC | -EAI_SERVICE;
            }
        }
       else
@@ -538,16 +540,10 @@ gaih_inet (const char *name, const struct gaih_service *service,
          else
            return -EAI_ADDRFAMILY;
 
-       dupname:
          if (req->ai_flags & AI_CANONNAME)
-           {
-             canon = strdup (name);
-             if (canon == NULL)
-               return -EAI_MEMORY;
-           }
+           canon = name;
        }
-
-      if (at->family == AF_UNSPEC)
+      else if (at->family == AF_UNSPEC)
        {
          char *namebuf = (char *) name;
          char *scope_delim = strchr (name, SCOPE_DELIMITER);
@@ -595,7 +591,8 @@ gaih_inet (const char *name, const struct gaih_service *service,
                    }
                }
 
-             goto dupname;
+             if (req->ai_flags & AI_CANONNAME)
+               canon = name;
            }
        }
 
@@ -689,7 +686,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
                    }
                  /* We made requests but they turned out no data.
                     The name is known, though.  */
-                 return (GAIH_OKIFUNSPEC | -EAI_NODATA);
+                 return GAIH_OKIFUNSPEC | -EAI_NODATA;
                }
 
              goto process_list;
@@ -756,7 +753,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
                  free (air);
 
                  if (at->family == AF_UNSPEC)
-                   return (GAIH_OKIFUNSPEC | -EAI_NONAME);
+                   return GAIH_OKIFUNSPEC | -EAI_NONAME;
 
                  goto process_list;
                }
@@ -898,13 +895,13 @@ gaih_inet (const char *name, const struct gaih_service *service,
 
              /* We made requests but they turned out no data.  The name
                 is known, though.  */
-             return (GAIH_OKIFUNSPEC | -EAI_NODATA);
+             return GAIH_OKIFUNSPEC | -EAI_NODATA;
            }
        }
 
     process_list:
       if (at->family == AF_UNSPEC)
-       return (GAIH_OKIFUNSPEC | -EAI_NONAME);
+       return GAIH_OKIFUNSPEC | -EAI_NONAME;
     }
   else
     {
@@ -1098,6 +1095,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
   return 0;
 }
 
+#if 0
 static const struct gaih gaih[] =
   {
     { PF_INET6, gaih_inet },
@@ -1107,6 +1105,7 @@ static const struct gaih gaih[] =
 #endif
     { PF_UNSPEC, NULL }
   };
+#endif
 
 struct sort_result
 {
@@ -1114,6 +1113,7 @@ struct sort_result
   struct sockaddr_storage source_addr;
   uint8_t source_addr_len;
   bool got_source_addr;
+  uint8_t source_addr_flags;
 };
 
 
@@ -1204,7 +1204,7 @@ static const struct prefixlist default_precedence[] =
       96, 20 },
     { { .in6_u = { .u6_addr16 = { 0x0000, 0x0000, 0x0000, 0x0000,
                                  0x0000, 0xffff, 0x0000, 0x0000 } } },
-      96, 10 },
+      96, 100 },
     { { .in6_u = { .u6_addr16 = { 0x0000, 0x0000, 0x0000, 0x0000,
                                  0x0000, 0x0000, 0x0000, 0x0000 } } },
       0, 40 }
@@ -1336,8 +1336,16 @@ rfc3484_sort (const void *p1, const void *p2)
     }
 
 
-  /* Rule 3: Avoid deprecated addresses.
-     That's something only the kernel could decide.  */
+  /* Rule 3: Avoid deprecated addresses.  */
+  if (a1->got_source_addr)
+    {
+      if (!(a1->source_addr_flags & in6ai_deprecated)
+         && (a2->source_addr_flags & in6ai_deprecated))
+       return -1;
+      if ((a1->source_addr_flags & in6ai_deprecated)
+         && !(a2->source_addr_flags & in6ai_deprecated))
+       return 1;
+    }
 
   /* Rule 4: Prefer home addresses.
      Another thing only the kernel can decide.  */
@@ -1372,8 +1380,18 @@ rfc3484_sort (const void *p1, const void *p2)
     return 1;
 
 
-  /* Rule 7: Prefer native transport.
-     XXX How to recognize tunnels?  */
+  /* Rule 7: Prefer native transport.  */
+  if (a1->got_source_addr)
+    {
+      if (!(a1->source_addr_flags & in6ai_temporary)
+         && (a1->source_addr_flags & in6ai_temporary))
+       return -1;
+      if ((a1->source_addr_flags & in6ai_temporary)
+         && !(a1->source_addr_flags & in6ai_temporary))
+       return -1;
+
+      /* XXX Do we need to check anything beside temporary addresses?  */
+    }
 
 
   /* Rule 8: Prefer smaller scope.  */
@@ -1454,15 +1472,23 @@ rfc3484_sort (const void *p1, const void *p2)
 }
 
 
+static int
+in6aicmp (const void *p1, const void *p2)
+{
+  struct in6addrinfo *a1 = (struct in6addrinfo *) p1;
+  struct in6addrinfo *a2 = (struct in6addrinfo *) p2;
+
+  return memcmp (a1->addr, a2->addr, sizeof (a1->addr));
+}
+
+
 int
 getaddrinfo (const char *name, const char *service,
             const struct addrinfo *hints, struct addrinfo **pai)
 {
-  int i = 0, j = 0, last_i = 0;
+  int i = 0, last_i = 0;
   int nresults = 0;
-  struct addrinfo *p = NULL, **end;
-  const struct gaih *g = gaih;
-  const struct gaih *pg = NULL;
+  struct addrinfo *p = NULL;
   struct gaih_service gaih_service, *pservice;
   struct addrinfo local_hints;
 
@@ -1490,15 +1516,23 @@ getaddrinfo (const char *name, const char *service,
   if ((hints->ai_flags & AI_CANONNAME) && name == NULL)
     return EAI_BADFLAGS;
 
+  struct in6addrinfo *in6ai;
+  size_t in6ailen;
+  bool seen_ipv4 = false;
+  bool seen_ipv6 = false;
+  /* We might need information about what kind of interfaces are available.
+     But even if AI_ADDRCONFIG is not used, if the user requested IPv6
+     addresses we have to know whether an address is deprecated or
+     temporary.  */
+  if ((hints->ai_flags & AI_ADDRCONFIG) || hints->ai_family == PF_UNSPEC
+      || hints->ai_family == PF_INET6)
+    /* Determine whether we have IPv4 or IPv6 interfaces or both.  We
+       cannot cache the results since new interfaces could be added at
+       any time.  */
+    __check_pf (&seen_ipv4, &seen_ipv6, &in6ai, &in6ailen);
+
   if (hints->ai_flags & AI_ADDRCONFIG)
     {
-      /* Determine whether we have IPv4 or IPv6 interfaces or both.
-        We cannot cache the results since new interfaces could be
-        added at any time.  */
-      bool seen_ipv4;
-      bool seen_ipv6;
-      __check_pf (&seen_ipv4, &seen_ipv6);
-
       /* Now make a decision on what we return, if anything.  */
       if (hints->ai_family == PF_UNSPEC && (seen_ipv4 || seen_ipv6))
        {
@@ -1513,8 +1547,11 @@ getaddrinfo (const char *name, const char *service,
        }
       else if ((hints->ai_family == PF_INET && ! seen_ipv4)
               || (hints->ai_family == PF_INET6 && ! seen_ipv6))
-       /* We cannot possibly return a valid answer.  */
-       return EAI_NONAME;
+       {
+         /* We cannot possibly return a valid answer.  */
+         free (in6ai);
+         return EAI_NONAME;
+       }
     }
 
   if (service && service[0])
@@ -1525,7 +1562,10 @@ getaddrinfo (const char *name, const char *service,
       if (*c != '\0')
        {
          if (hints->ai_flags & AI_NUMERICSERV)
-           return EAI_NONAME;
+           {
+             free (in6ai);
+             return EAI_NONAME;
+           }
 
          gaih_service.num = -1;
        }
@@ -1535,12 +1575,21 @@ getaddrinfo (const char *name, const char *service,
   else
     pservice = NULL;
 
+  struct addrinfo **end;
   if (pai)
     end = &p;
   else
     end = NULL;
 
   unsigned int naddrs = 0;
+#if 0
+  /* If we would support more protocols than just IPv4 and IPv6 we
+     would iterate over a table with appropriate callback functions.
+     Since we currently only handle IPv4 and IPv6 this is not
+     necessary.  */
+  const struct gaih *g = gaih;
+  const struct gaih *pg = NULL;
+  int j = 0;
   while (g->gaih)
     {
       if (hints->ai_family == g->family || hints->ai_family == AF_UNSPEC)
@@ -1564,6 +1613,7 @@ getaddrinfo (const char *name, const char *service,
                    }
 
                  freeaddrinfo (p);
+                 free (in6ai);
 
                  return -(i & GAIH_EAI);
                }
@@ -1579,7 +1629,35 @@ getaddrinfo (const char *name, const char *service,
     }
 
   if (j == 0)
-    return EAI_FAMILY;
+    {
+      free (in6ai);
+      return EAI_FAMILY;
+    }
+#else
+  if (hints->ai_family == AF_UNSPEC || hints->ai_family == AF_INET
+      || hints->ai_family == AF_INET6)
+    {
+      last_i = gaih_inet (name, pservice, hints, end, &naddrs);
+      if (last_i != 0)
+       {
+         freeaddrinfo (p);
+         free (in6ai);
+
+         return -(i & GAIH_EAI);
+       }
+      if (end)
+       while (*end)
+         {
+           end = &((*end)->ai_next);
+           ++nresults;
+         }
+    }
+  else
+    {
+      free (in6ai);
+      return EAI_FAMILY;
+    }
+#endif
 
   if (naddrs > 1)
     {
@@ -1589,6 +1667,11 @@ getaddrinfo (const char *name, const char *service,
       struct addrinfo *last = NULL;
       char *canonname = NULL;
 
+      /* If we have information about deprecated and temporary address
+        sort the array now.  */
+      if (in6ai != NULL)
+       qsort (in6ai, in6ailen, sizeof (*in6ai), in6aicmp);
+
       for (i = 0, q = p; q != NULL; ++i, last = q, q = q->ai_next)
        {
          results[i].dest_addr = q;
@@ -1603,9 +1686,12 @@ getaddrinfo (const char *name, const char *service,
                      results[i - 1].source_addr_len);
              results[i].source_addr_len = results[i - 1].source_addr_len;
              results[i].got_source_addr = results[i - 1].got_source_addr;
+             results[i].source_addr_flags = results[i - 1].source_addr_flags;
            }
          else
            {
+             results[i].source_addr_flags = 0;
+
              /* We overwrite the type with SOCK_DGRAM since we do not
                 want connect() to connect to the other side.  If we
                 cannot determine the source address remember this
@@ -1620,6 +1706,20 @@ getaddrinfo (const char *name, const char *service,
                {
                  results[i].source_addr_len = sl;
                  results[i].got_source_addr = true;
+
+                 if (q->ai_family == PF_INET6 && in6ai != NULL)
+                   {
+                     /* See whether the address is the list of deprecated
+                        or temporary addresses.  */
+                     struct in6addrinfo tmp;
+                     memcpy (tmp.addr, q->ai_addr, IN6ADDRSZ);
+
+                     struct in6addrinfo *found
+                       = bsearch (&tmp, in6ai, in6ailen, sizeof (*in6ai),
+                                  in6aicmp);
+                     if (found != NULL)
+                       results[i].source_addr_flags = found->flags;
+                   }
                }
              else
                /* Just make sure that if we have to process the same
@@ -1653,6 +1753,8 @@ getaddrinfo (const char *name, const char *service,
       p->ai_canonname = canonname;
     }
 
+  free (in6ai);
+
   if (p)
     {
       *pai = p;
index 31e39d78b5b618d1fad883a37bc61dc46ef6a3be..8f96e3d610e98f830c252bb07e1c7fbc8fec9ef7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -29,8 +29,10 @@ sigset (sig, disp)
      int sig;
      __sighandler_t disp;
 {
-  struct sigaction act, oact;
+  struct sigaction act;
+  struct sigaction oact;
   sigset_t set;
+  sigset_t oset;
 
 #ifdef SIG_HOLD
   /* Handle SIG_HOLD first.  */
@@ -45,10 +47,18 @@ sigset (sig, disp)
        return SIG_ERR;
 
       /* Add the signal set to the current signal mask.  */
-      if (__sigprocmask (SIG_BLOCK, &set, NULL) < 0)
+      if (__sigprocmask (SIG_BLOCK, &set, &oset) < 0)
        return SIG_ERR;
 
-      return SIG_HOLD;
+      /* If the signal was already blocked signal this to the caller.  */
+      if (__sigismember (&oset, sig))
+       return SIG_HOLD;
+
+      /* We need to determine whether a specific handler is installed.  */
+      if (__sigaction (sig, NULL, &oact) < 0)
+       return SIG_ERR;
+
+      return oact.sa_handler;
     }
 #endif /* SIG_HOLD */
 
@@ -75,8 +85,9 @@ sigset (sig, disp)
     return SIG_ERR;
 
   /* Remove the signal set from the current signal mask.  */
-  if (__sigprocmask (SIG_UNBLOCK, &set, NULL) < 0)
+  if (__sigprocmask (SIG_UNBLOCK, &set, &oset) < 0)
     return SIG_ERR;
 
-  return oact.sa_handler;
+  /* If the signal was already blocked return SIG_HOLD.  */
+  return __sigismember (&oset, sig) ? SIG_HOLD : oact.sa_handler;
 }
index 0d4bbc418a1da0bf8d4cbb8e9babf0c71edd1bd4..c8973a0852a7e60c483d5f186269d029815b9b0f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1999, 2000, 2001, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -242,11 +242,15 @@ __gen_tempname (char *tmpl, int kind)
      necessary to try all these combinations.  Instead if a reasonable
      number of names is tried (we define reasonable as 62**3) fail to
      give the system administrator the chance to remove the problems.  */
-  unsigned int attempts_min = 62 * 62 * 62;
+#define ATTEMPTS_MIN (62 * 62 * 62)
 
   /* The number of times to attempt to generate a temporary file.  To
      conform to POSIX, this must be no smaller than TMP_MAX.  */
-  unsigned int attempts = attempts_min < TMP_MAX ? TMP_MAX : attempts_min;
+#if ATTEMPTS_MIN < TMP_MAX
+  unsigned int attempts = TMP_MAX;
+#else
+  unsigned int attempts = ATTEMPTS_MIN;
+#endif
 
   len = strlen (tmpl);
   if (len < 6 || strcmp (&tmpl[len - 6], "XXXXXX"))
index 15da56384eb81fec8236d06315663e04ebc146f3..aed899e8824cc7afe9587e83878524295d180071 100644 (file)
@@ -129,7 +129,7 @@ __NTH (fdimf (float __x, float __y))
 #include <ldsodefs.h>
 #include <dl-procinfo.h>
 
-# if __WORDSIZE == 64
+# if __WORDSIZE == 64 || defined _ARCH_PWR4
 #  define __CPU_HAS_FSQRT 1
 # else
 #  define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
@@ -141,7 +141,7 @@ __NTH (__ieee754_sqrt (double __x))
 {
   double __z;
 
-  /* If the CPU is 64-bit we can use the optional FP instructions we.  */
+  /* If the CPU is 64-bit we can use the optional FP instructions.  */
   if (__CPU_HAS_FSQRT)
   {
     /* Volatile is required to prevent the compiler from moving the
@@ -163,7 +163,7 @@ __NTH (__ieee754_sqrtf (float __x))
 {
   float __z;
 
-  /* If the CPU is 64-bit we can use the optional FP instructions we.  */
+  /* If the CPU is 64-bit we can use the optional FP instructions.  */
   if (__CPU_HAS_FSQRT)
   {
     /* Volatile is required to prevent the compiler from moving the
index e6ba1f979fc34e3ff1832385800d97747fb53549..540b924656e7001515e3b202f4346630f32cd459 100644 (file)
@@ -169,8 +169,8 @@ __ieee754_sqrt (x)
 {
   double z;
 
-  /* If the CPU is 64-bit we can use the optional FP instructions we.  */
-  if ((GLRO (dl_hwcap) & PPC_FEATURE_64) != 0)
+  /* If the CPU is 64-bit we can use the optional FP instructions.  */
+  if (__CPU_HAS_FSQRT)
     {
       /* Volatile is required to prevent the compiler from moving the 
          fsqrt instruction above the branch.  */
index 335935bb18eae432164db3f5c464438207d6218d..b63d31472b0e52d366bc69556ff94bd53033380f 100644 (file)
@@ -146,8 +146,8 @@ __ieee754_sqrtf (x)
 {
   double z;
 
-  /* If the CPU is 64-bit we can use the optional FP instructions we.  */
-  if ((GLRO (dl_hwcap) & PPC_FEATURE_64) != 0)
+  /* If the CPU is 64-bit we can use the optional FP instructions.  */
+  if (__CPU_HAS_FSQRT)
     {
       /* Volatile is required to prevent the compiler from moving the 
          fsqrt instruction above the branch.  */
index 0f1a72335f34fdd1ec4054414a7260a8f118eb5e..6fcc669fb1f97e7c7a5d0ad841fb2833e4f3f261 100644 (file)
 # define __arch_atomic_decrement_if_positive_64(mem) \
     ({ abort (); (*mem)--; })
 
+#ifdef _ARCH_PWR4
+/*
+ * Newer powerpc64 processors support the new "light weight" sync (lwsync)
+ * So if the build is using -mcpu=[power4,power5,power5+,970] we can
+ * safely use lwsync.
+ */
+# define atomic_read_barrier() __asm ("lwsync" ::: "memory")
+/*
+ * "light weight" sync can also be used for the release barrier.
+ */
+# ifndef UP
+#  define __ARCH_REL_INSTR     "lwsync"
+# endif
+#else
 /*
  * Older powerpc32 processors don't support the new "light weight"
  * sync (lwsync).  So the only safe option is to use normal sync
  * for all powerpc32 applications.
  */
 # define atomic_read_barrier() __asm ("sync" ::: "memory")
+#endif
 
 /*
  * Include the rest of the atomic ops macros which are common to both
index fed28f2db01dc77e69cfaa12febe1a88b60c9e52..ad7a8701fddea0ac70ccf2deb4544a28e31b6c97 100644 (file)
@@ -123,6 +123,9 @@ libc {
     #errlist-compat    132
     _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
   }
+  GLIBC_2.5 {
+    splice; sync_file_range; tee;
+  }
   GLIBC_PRIVATE {
     # functions used in other libraries
     __syscall_rt_sigqueueinfo;
index c4a9b77e2eae9bb5037b266d92f94ca5b8d70245..6898fe874328d15e4cb100d61f980314cee3fe38 100644 (file)
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995-1999, 2000, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1995-2000, 2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -173,10 +173,41 @@ struct flock64
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
 
+
+#ifdef __USE_GNU
+# define SYNC_FILE_RANGE_WAIT_BEFORE   1 /* Wait upon writeout of all pages
+                                            in the range before performing the
+                                            write.  */
+# define SYNC_FILE_RANGE_WRITE         2 /* Initiate writeout of all those
+                                            dirty pages in the range which are
+                                            not presently under writeback.  */
+# define SYNC_FILE_RANGE_WAIT_AFTER    4 /* Wait upon writeout of all pages in
+                                            the range after performing the
+                                            write.  */
+#endif
+
 __BEGIN_DECLS
 
+#ifdef __USE_GNU
+
 /* Provide kernel hint to read ahead.  */
 extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
     __THROW;
 
+
+/* Selective file content synch'ing.  */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+                           unsigned int __flags);
+
+
+/* Splice two files together.  */
+extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+    __THROW;
+
+/* In-kernel implementation of tee for pipe buffers.  */
+extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+    __THROW;
+
+#endif
+
 __END_DECLS
index 77e9b83c921713489c3a73eda80c88676f4ad5c3..356a2ece741dd6432c066f1a59a161f7a2d9a4d1 100644 (file)
@@ -1,5 +1,5 @@
 /* System-specific socket constants and types.  Linux version.
-   Copyright (C) 1991,1992,1994-2001, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1991,1992,1994-2001,2004,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -221,7 +221,10 @@ struct msghdr
     size_t msg_iovlen;         /* Number of elements in the vector.  */
 
     void *msg_control;         /* Ancillary data (eg BSD filedesc passing). */
-    size_t msg_controllen;     /* Ancillary data buffer length.  */
+    size_t msg_controllen;     /* Ancillary data buffer length.
+                                  !! The type should be socklen_t but the
+                                  definition of the kernel is incompatible
+                                  with this.  */
 
     int msg_flags;             /* Flags on received message.  */
   };
@@ -230,7 +233,10 @@ struct msghdr
 struct cmsghdr
   {
     size_t cmsg_len;           /* Length of data in cmsg_data plus length
-                                  of cmsghdr structure.  */
+                                  of cmsghdr structure.
+                                  !! The type should be socklen_t but the
+                                  definition of the kernel is incompatible
+                                  with this.  */
     int cmsg_level;            /* Originating protocol.  */
     int cmsg_type;             /* Protocol specific type.  */
 #if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
index ae6f71d89c36d18c9a17a7cadd2ee95ba06c860b..f186182cf68826ec0d6604dd7902bad386cab194 100644 (file)
 #include <linux/netlink.h>
 #include <linux/rtnetlink.h>
 
+#include <not-cancel.h>
 #include <kernel-features.h>
 
 
+#ifndef IFA_F_TEMPORARY
+# define IFA_F_TEMPORARY IFA_F_SECONDARY
+#endif
+
+
 static int
-make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6)
+make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
+             struct in6addrinfo **in6ai, size_t *in6ailen)
 {
   struct
   {
@@ -63,6 +70,12 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6)
   bool done = false;
   char buf[4096];
   struct iovec iov = { buf, sizeof (buf) };
+  struct in6ailist
+  {
+    struct in6addrinfo info;
+    struct in6ailist *next;
+  } *in6ailist = NULL;
+  size_t in6ailistlen = 0;
 
   do
     {
@@ -101,6 +114,42 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6)
                  break;
                case AF_INET6:
                  *seen_ipv6 = true;
+
+                 if (ifam->ifa_flags & (IFA_F_DEPRECATED | IFA_F_TEMPORARY))
+                   {
+                     struct rtattr *rta = IFA_RTA (ifam);
+                     size_t len = (nlmh->nlmsg_len
+                                   - NLMSG_LENGTH (sizeof (*ifam)));
+                     void *local = NULL;
+                     void *address = NULL;
+                     while (RTA_OK (rta, len))
+                       {
+                         switch (rta->rta_type)
+                           {
+                           case IFA_LOCAL:
+                             local = RTA_DATA (rta);
+                             break;
+
+                           case IFA_ADDRESS:
+                             address = RTA_DATA (rta);
+                             break;
+                           }
+
+                         rta = RTA_NEXT (rta, len);
+                       }
+
+                     struct in6ailist *newp = alloca (sizeof (*newp));
+                     newp->info.flags = (((ifam->ifa_flags & IFA_F_DEPRECATED)
+                                          ? in6ai_deprecated : 0)
+                                         | ((ifam->ifa_flags
+                                             & IFA_F_TEMPORARY)
+                                            ? in6ai_temporary : 0));
+                     memcpy (newp->info.addr, address ?: local,
+                             sizeof (newp->info.addr));
+                     newp->next = in6ailist;
+                     in6ailist = newp;
+                     ++in6ailistlen;
+                   }
                  break;
                default:
                  /* Ignore.  */
@@ -110,12 +159,27 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6)
          else if (nlmh->nlmsg_type == NLMSG_DONE)
            /* We found the end, leave the loop.  */
            done = true;
-         else ;
        }
     }
   while (! done);
 
-  __close (fd);
+  close_not_cancel_no_status (fd);
+
+  if (in6ailist != NULL)
+    {
+      *in6ai = malloc (in6ailistlen * sizeof (**in6ai));
+      if (*in6ai == NULL)
+       return -1;
+
+      *in6ailen = in6ailistlen;
+
+      do
+       {
+         (*in6ai)[--in6ailistlen] = in6ailist->info;
+         in6ailist = in6ailist->next;
+       }
+      while (in6ailist != NULL);
+    }
 
   return 0;
 }
@@ -133,8 +197,12 @@ extern int __no_netlink_support attribute_hidden;
 
 void
 attribute_hidden
-__check_pf (bool *seen_ipv4, bool *seen_ipv6)
+__check_pf (bool *seen_ipv4, bool *seen_ipv6,
+           struct in6addrinfo **in6ai, size_t *in6ailen)
 {
+  *in6ai = NULL;
+  *in6ailen = 0;
+
   if (! __no_netlink_support)
     {
       int fd = __socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
@@ -148,7 +216,8 @@ __check_pf (bool *seen_ipv4, bool *seen_ipv6)
       if (fd >= 0
          && __bind (fd, (struct sockaddr *) &nladdr, sizeof (nladdr)) == 0
          && __getsockname (fd, (struct sockaddr *) &nladdr, &addr_len) == 0
-         && make_request (fd, nladdr.nl_pid, seen_ipv4, seen_ipv6) == 0)
+         && make_request (fd, nladdr.nl_pid, seen_ipv4, seen_ipv6,
+                          in6ai, in6ailen) == 0)
        /* It worked.  */
        return;
 
@@ -178,9 +247,6 @@ __check_pf (bool *seen_ipv4, bool *seen_ipv6)
       return;
     }
 
-  *seen_ipv4 = false;
-  *seen_ipv6 = false;
-
   struct ifaddrs *runp;
   for (runp = ifa; runp != NULL; runp = runp->ifa_next)
     if (runp->ifa_addr->sa_family == PF_INET)
index 1a308ca38fac787818c162290e59c7c7e696b7a7..911d85f43d461d4ebcf57bdd044ea95e189c7bd7 100644 (file)
@@ -87,7 +87,7 @@ __getcwd (char *buf, size_t size)
          return NULL;
        }
 
-      alloc_size = PATH_MAX;
+      alloc_size = MAX (PATH_MAX, __getpagesize ());
     }
 
   if (buf == NULL)
index fdcf8d6130b82224800900ffaa88261420bca5bb..a6f89a3cc919449ec5be09f31b838385b04c4fe8 100644 (file)
@@ -1,5 +1,5 @@
 /* Get source filter.  Linux version.
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
 
@@ -112,23 +112,27 @@ getsourcefilter (int s, uint32_t interface, const struct sockaddr *group,
   gf->gf_numsrc = *numsrc;
 
   /* We need to provide the appropriate socket level value.  */
+  int result;
   int sol = __get_sol (group->sa_family, grouplen);
   if (sol == -1)
     {
       __set_errno (EINVAL);
-      return -1;
+      result = -1;
     }
-
-  int result = __getsockopt (s, sol, MCAST_MSFILTER, gf, &needed);
-
-  /* If successful, copy the results to the places the caller wants
-     them in.  */
-  if (result == 0)
+  else
     {
-      *fmode = gf->gf_fmode;
-      memcpy (slist, gf->gf_slist,
-             MIN (*numsrc, gf->gf_numsrc) * sizeof (struct sockaddr_storage));
-      *numsrc = gf->gf_numsrc;
+      result = __getsockopt (s, sol, MCAST_MSFILTER, gf, &needed);
+
+      /* If successful, copy the results to the places the caller wants
+        them in.  */
+      if (result == 0)
+       {
+         *fmode = gf->gf_fmode;
+         memcpy (slist, gf->gf_slist,
+                 MIN (*numsrc, gf->gf_numsrc)
+                 * sizeof (struct sockaddr_storage));
+         *numsrc = gf->gf_numsrc;
+       }
     }
 
   if (! use_alloca)
index 9065825b98bbc69b6e4c9c797a5c72fe6218ab51..a375888106a62a95a30fa820e32891342de10a2f 100644 (file)
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2004
+   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2004, 2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -180,10 +180,41 @@ struct flock64
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
 
+
+#ifdef __USE_GNU
+# define SYNC_FILE_RANGE_WAIT_BEFORE   1 /* Wait upon writeout of all pages
+                                            in the range before performing the
+                                            write.  */
+# define SYNC_FILE_RANGE_WRITE         2 /* Initiate writeout of all those
+                                            dirty pages in the range which are
+                                            not presently under writeback.  */
+# define SYNC_FILE_RANGE_WAIT_AFTER    4 /* Wait upon writeout of all pages in
+                                            the range after performing the
+                                            write.  */
+#endif
+
 __BEGIN_DECLS
 
+#ifdef __USE_GNU
+
 /* Provide kernel hint to read ahead.  */
 extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
     __THROW;
 
+
+/* Selective file content synch'ing.  */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+                           unsigned int __flags);
+
+
+/* Splice two files together.  */
+extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+    __THROW;
+
+/* In-kernel implementation of tee for pipe buffers.  */
+extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+    __THROW;
+
+#endif
+
 __END_DECLS
diff --git a/sysdeps/unix/sysv/linux/i386/sync_file_range.S b/sysdeps/unix/sysv/linux/i386/sync_file_range.S
new file mode 100644 (file)
index 0000000..f39e8a0
--- /dev/null
@@ -0,0 +1,72 @@
+/* Selective file content synch'ing.
+   Copyright (C) 2006 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+#define _ERRNO_H        1
+#include <bits/errno.h>
+
+
+       .text
+ENTRY (sync_file_range)
+#ifdef __NR_sync_file_range
+       pushl   %ebx
+       cfi_adjust_cfa_offset (4)
+       pushl   %esi
+       cfi_adjust_cfa_offset (4)
+       pushl   %edi
+       cfi_adjust_cfa_offset (4)
+       pushl   %ebp
+       cfi_adjust_cfa_offset (4)
+
+       movl    20(%esp), %ebx
+       cfi_rel_offset (ebx, 12)
+       movl    24(%esp), %ecx
+       movl    28(%esp), %edx
+       movl    32(%esp), %esi
+       cfi_rel_offset (esi, 8)
+       movl    36(%esp), %edi
+       cfi_rel_offset (edi, 4)
+       movl    40(%esp), %ebp
+       cfi_rel_offset (ebp, 0)
+
+       movl    $SYS_ify(sync_file_range), %eax
+       ENTER_KERNEL
+
+       popl    %ebp
+       cfi_adjust_cfa_offset (-4)
+       cfi_restore (ebp)
+       popl    %edi
+       cfi_adjust_cfa_offset (-4)
+       cfi_restore (edi)
+       popl    %esi
+       cfi_adjust_cfa_offset (-4)
+       cfi_restore (esi)
+       popl    %ebx
+       cfi_adjust_cfa_offset (-4)
+       cfi_restore (ebx)
+
+       cmpl    $-4095, %eax
+       jae     SYSCALL_ERROR_LABEL
+L(pseudo_end):
+       ret
+#else
+       movl    $-ENOSYS, %eax
+       jmp     SYSCALL_ERROR_LABEL
+#endif
+PSEUDO_END (sync_file_range)
index cb5767955cee4b0da23afd732e4720cde218e761..90423d843410e04b57c011f0c7ae6e8c4a560238 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,1993,1995,1996,1997,1998,1999,2000,2002,2003,2004,2005
+/* Copyright (C) 1992,1993,1995-2000,2002-2005,2006
        Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper, <drepper@gnu.org>, August 1995.
@@ -447,7 +447,7 @@ asm (".L__X'%ebx = 1\n\t"
 
 #define LOADARGS_0
 #ifdef __PIC__
-# if defined I386_USE_SYSENTER
+# if defined I386_USE_SYSENTER && defined SHARED
 #  define LOADARGS_1 \
     "bpushl .L__X'%k3, %k3\n\t"
 #  define LOADARGS_5 \
index d330954d48f7c178a3104754eb8dcc8796295ae4..63a771ddb9ddcfb2858d97a7671d63b1a04be09d 100644 (file)
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux/IA64.
-   Copyright (C) 1999, 2000, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -174,10 +174,41 @@ struct flock64
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
 
+
+#ifdef __USE_GNU
+# define SYNC_FILE_RANGE_WAIT_BEFORE   1 /* Wait upon writeout of all pages
+                                            in the range before performing the
+                                            write.  */
+# define SYNC_FILE_RANGE_WRITE         2 /* Initiate writeout of all those
+                                            dirty pages in the range which are
+                                            not presently under writeback.  */
+# define SYNC_FILE_RANGE_WAIT_AFTER    4 /* Wait upon writeout of all pages in
+                                            the range after performing the
+                                            write.  */
+#endif
+
 __BEGIN_DECLS
 
+#ifdef __USE_GNU
+
 /* Provide kernel hint to read ahead.  */
 extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
     __THROW;
 
+
+/* Selective file content synch'ing.  */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+                           unsigned int __flags);
+
+
+/* Splice two files together.  */
+extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+    __THROW;
+
+/* In-kernel implementation of tee for pipe buffers.  */
+extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+    __THROW;
+
+#endif
+
 __END_DECLS
index 37d25b1a5c8ea083ebb3c29caf72f65291926a75..139e3d5a729d155291e4dafe37b1b0c45b66d79c 100644 (file)
 # define __ASSUME_SENDFILE             1
 #endif
 
+/* Only very old kernels had no real symlinks for terminal descriptors
+   in /proc/self/fd.  */
+#if __LINUX_KERNEL_VERSION >= 131584
+# define __ASSUME_PROC_SELF_FD_SYMLINK 1
+#endif
+
 /* On x86 another `getrlimit' syscall was added in 2.3.25.  */
 #if __LINUX_KERNEL_VERSION >= 131865 && defined __i386__
 # define __ASSUME_NEW_GETRLIMIT_SYSCALL        1
index 19649c01c7f9202332720e0674ff80ceb1f38046..2219271a1b3412bfc5f10f06e34abc1c1a7d2bed 100644 (file)
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux/PowerPC.
-   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004
+   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004, 2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -180,10 +180,41 @@ struct flock64
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
 
+
+#ifdef __USE_GNU
+# define SYNC_FILE_RANGE_WAIT_BEFORE   1 /* Wait upon writeout of all pages
+                                            in the range before performing the
+                                            write.  */
+# define SYNC_FILE_RANGE_WRITE         2 /* Initiate writeout of all those
+                                            dirty pages in the range which are
+                                            not presently under writeback.  */
+# define SYNC_FILE_RANGE_WAIT_AFTER    4 /* Wait upon writeout of all pages in
+                                            the range after performing the
+                                            write.  */
+#endif
+
 __BEGIN_DECLS
 
+#ifdef __USE_GNU
+
 /* Provide kernel hint to read ahead.  */
 extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
     __THROW;
 
+
+/* Selective file content synch'ing.  */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+                           unsigned int __flags);
+
+
+/* Splice two files together.  */
+extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+    __THROW;
+
+/* In-kernel implementation of tee for pipe buffers.  */
+extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+    __THROW;
+
+#endif
+
 __END_DECLS
index f4c92ad7c74be084710bed8e7c01bf2fdb828b22..37b777799c7db1a1240a4c759b432cca7f9666ed 100644 (file)
@@ -84,6 +84,10 @@ ENTRY (BP_SYM (__clone))
        mr      r6,r8
        mr      r7,r9
 
+       /* End FDE now, because in the child the unwind info will be
+          wrong.  */
+       cfi_endproc
+
        /* Do the call.  */
        DO_CALL(SYS_ify(clone))
 
@@ -138,6 +142,8 @@ L(parent):
 L(badargs):
        li      r3,EINVAL
        b       __syscall_error@local
+
+       cfi_startproc
 END (BP_SYM (__clone))
 
 weak_alias (BP_SYM (__clone), BP_SYM (clone))
index 366206d286526b8c7689ab394b5766d6269866bb..f1a55e64dbb7f0d08cb86add450b5af186141b64 100644 (file)
@@ -81,6 +81,10 @@ ENTRY (BP_SYM (__clone))
        mr      r6,r8
        mr      r7,r9
 
+       /* End FDE now, because in the child the unwind info will be
+          wrong.  */
+       cfi_endproc
+
        /* Do the call.  */
        DO_CALL(SYS_ify(clone))
 
@@ -132,6 +136,8 @@ L(parent):
 L(badargs):
        li      r3,EINVAL
        b       JUMPTARGET(__syscall_error)
+
+       cfi_startproc
 END (BP_SYM (__clone))
 
 weak_alias (BP_SYM (__clone), BP_SYM (clone))
index d2d59724119fe647e7ed6fd63a934ddc27462b60..577689f18d91e8df1cb9f2547a7c0105e816c363 100644 (file)
@@ -35,7 +35,7 @@ __BEGIN_DECLS
 /* These definitions are normally provided by ucontext.h via 
    asm/sigcontext.h, asm/ptrace.h, and asm/elf.h.  Otherwise we define 
    them here.  */ 
-#ifndef __PPC64_ELF_H
+#if !defined __PPC64_ELF_H && !defined _ASM_POWERPC_ELF_H
 #define ELF_NGREG       48      /* includes nip, msr, lr, etc. */
 #define ELF_NFPREG      33      /* includes fpscr */
 #if __WORDSIZE == 32
index c2f21ee4ca7a6154239f1d8a522d57e8837a7dc4..9b4a730c0ef6f7882228005413aeb92d228be12d 100644 (file)
@@ -29,7 +29,7 @@
 
 /* Read the contents of the symbolic link PATH relative to FD into no
    more than LEN bytes of BUF.  */
-int
+ssize_t
 readlinkat (fd, path, buf, len)
      int fd;
      const char *path;
index 8c47077580e33661f886cbe728c9dc19138efe44..ad3ef420a1c2428f9684737b18ab9bd4b3b609fa 100644 (file)
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -199,10 +199,41 @@ struct flock64
 # endif
 #endif
 
+
+#ifdef __USE_GNU
+# define SYNC_FILE_RANGE_WAIT_BEFORE   1 /* Wait upon writeout of all pages
+                                            in the range before performing the
+                                            write.  */
+# define SYNC_FILE_RANGE_WRITE         2 /* Initiate writeout of all those
+                                            dirty pages in the range which are
+                                            not presently under writeback.  */
+# define SYNC_FILE_RANGE_WAIT_AFTER    4 /* Wait upon writeout of all pages in
+                                            the range after performing the
+                                            write.  */
+#endif
+
 __BEGIN_DECLS
 
+#ifdef __USE_GNU
+
 /* Provide kernel hint to read ahead.  */
 extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
     __THROW;
 
+
+/* Selective file content synch'ing.  */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+                           unsigned int __flags);
+
+
+/* Splice two files together.  */
+extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+    __THROW;
+
+/* In-kernel implementation of tee for pipe buffers.  */
+extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+    __THROW;
+
+#endif
+
 __END_DECLS
index f5c4d9786fb5bea2aa3aa2e757e7d216c310ca7c..dc223de84466fae9118e4e9d331f5798a7173865 100644 (file)
@@ -1,5 +1,5 @@
 /* Set source filter.  Linux version.
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
 
@@ -57,14 +57,15 @@ setsourcefilter (int s, uint32_t interface, const struct sockaddr *group,
   memcpy (gf->gf_slist, slist, numsrc * sizeof (struct sockaddr_storage));
 
   /* We need to provide the appropriate socket level value.  */
+  int result;
   int sol = __get_sol (group->sa_family, grouplen);
   if (sol == -1)
     {
       __set_errno (EINVAL);
-      return -1;
+      result = -1;
     }
-
-  int result = __setsockopt (s, sol, MCAST_MSFILTER, gf, needed);
+  else
+    result = __setsockopt (s, sol, MCAST_MSFILTER, gf, needed);
 
   if (! use_alloca)
     {
index 9065825b98bbc69b6e4c9c797a5c72fe6218ab51..a375888106a62a95a30fa820e32891342de10a2f 100644 (file)
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2004
+   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2004, 2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -180,10 +180,41 @@ struct flock64
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
 
+
+#ifdef __USE_GNU
+# define SYNC_FILE_RANGE_WAIT_BEFORE   1 /* Wait upon writeout of all pages
+                                            in the range before performing the
+                                            write.  */
+# define SYNC_FILE_RANGE_WRITE         2 /* Initiate writeout of all those
+                                            dirty pages in the range which are
+                                            not presently under writeback.  */
+# define SYNC_FILE_RANGE_WAIT_AFTER    4 /* Wait upon writeout of all pages in
+                                            the range after performing the
+                                            write.  */
+#endif
+
 __BEGIN_DECLS
 
+#ifdef __USE_GNU
+
 /* Provide kernel hint to read ahead.  */
 extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
     __THROW;
 
+
+/* Selective file content synch'ing.  */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+                           unsigned int __flags);
+
+
+/* Splice two files together.  */
+extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+    __THROW;
+
+/* In-kernel implementation of tee for pipe buffers.  */
+extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+    __THROW;
+
+#endif
+
 __END_DECLS
index 5dc8bf32f033fefb7f04c96946a2d31e3e64c13d..b3788f0daf866c42a897474fdf2f89ab7c024735 100644 (file)
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux/SPARC.
-   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004
+   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004, 2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -199,10 +199,41 @@ struct flock64
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
 
+
+#ifdef __USE_GNU
+# define SYNC_FILE_RANGE_WAIT_BEFORE   1 /* Wait upon writeout of all pages
+                                            in the range before performing the
+                                            write.  */
+# define SYNC_FILE_RANGE_WRITE         2 /* Initiate writeout of all those
+                                            dirty pages in the range which are
+                                            not presently under writeback.  */
+# define SYNC_FILE_RANGE_WAIT_AFTER    4 /* Wait upon writeout of all pages in
+                                            the range after performing the
+                                            write.  */
+#endif
+
 __BEGIN_DECLS
 
+#ifdef __USE_GNU
+
 /* Provide kernel hint to read ahead.  */
 extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
     __THROW;
 
+
+/* Selective file content synch'ing.  */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+                           unsigned int __flags);
+
+
+/* Splice two files together.  */
+extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+    __THROW;
+
+/* In-kernel implementation of tee for pipe buffers.  */
+extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+    __THROW;
+
+#endif
+
 __END_DECLS
diff --git a/sysdeps/unix/sysv/linux/sync_file_range.c b/sysdeps/unix/sysv/linux/sync_file_range.c
new file mode 100644 (file)
index 0000000..aabe192
--- /dev/null
@@ -0,0 +1,46 @@
+/* Selective file content synch'ing.
+   Copyright (C) 2006 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+
+#ifdef __NR_sync_file_range
+int
+sync_file_range (int fd, __off64_t from, __off64_t to, int flags)
+{
+  return INLINE_SYSCALL (sync_file_range, 6, fd, (off_t) (from >> 32),
+                        (off_t) (from & 0xffffffff), (off_t) (to >> 32),
+                        (off_t) (to & 0xffffffff), flags);
+}
+#else
+int
+sync_file_range (int fd, __off64_t from, __off64_t to, int flags)
+{
+  __set_errno (ENOSYS);
+  return -1;
+}
+stub_warning (sync_file_range)
+
+# include <stub-tag.h>
+#endif
index 053d7e0ccfbf0fccfc6e570d3f7b04c320fc8340..6bfccd26aa4cc834f39a7821a67d26594ae29cc1 100644 (file)
@@ -70,9 +70,11 @@ setfsgid     EXTRA   setfsgid        i:i     setfsgid
 setfsuid       EXTRA   setfsuid        i:i     setfsuid
 setpgid                -       setpgid         i:ii    __setpgid       setpgid
 sigaltstack    -       sigaltstack     i:PP    __sigaltstack   sigaltstack
+splice         EXTRA   splice          i:iiii  splice
 sysinfo                EXTRA   sysinfo         i:p     sysinfo
 swapon         -       swapon          i:si    __swapon        swapon
 swapoff                -       swapoff         i:s     __swapoff       swapoff
+tee            EXTRA   tee             i:iiii  tee
 unshare                EXTRA   unshare         i:i     unshare
 uselib         EXTRA   uselib          i:s     uselib
 wait4          -       wait4           i:iWiP  __wait4         wait4
index 68d24f195ec294a6dcb42283b8659ee8e3f2f992..aed0fd8e0a76e53bb9c01caea427c4a063d1b846 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,1996-2001,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,1996-2002,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,6 +27,7 @@
 #include <stdlib.h>
 
 #include <stdio-common/_itoa.h>
+#include <kernel-features.h>
 
 #if 0
 /* Is this used anywhere?  It is not exported.  */
@@ -41,7 +42,7 @@ static char *getttyname (const char *dev, dev_t mydev,
 libc_freeres_ptr (static char *getttyname_name);
 
 static char *
-internal_function
+internal_function attribute_compat_text_section
 getttyname (const char *dev, dev_t mydev, ino64_t myino, int save, int *dostat)
 {
   static size_t namelen;
@@ -117,10 +118,12 @@ ttyname (int fd)
   int dostat = 0;
   char *name;
   int save = errno;
-  int len;
 
-  if (!__isatty (fd))
-    return NULL;
+  if (__builtin_expect (!__isatty (fd), 0))
+    {
+      __set_errno (ENOTTY);
+      return NULL;
+    }
 
   /* We try using the /proc filesystem.  */
   *_fitoa_word (fd, __stpcpy (procname, "/proc/self/fd/"), 10, 0) = '\0';
@@ -136,10 +139,19 @@ ttyname (int fd)
        }
     }
 
-  len = __readlink (procname, ttyname_buf, buflen);
-  if (len != -1
-      /* This is for Linux 2.0.  */
-      && ttyname_buf[0] != '[')
+  ssize_t len = __readlink (procname, ttyname_buf, buflen);
+  if (__builtin_expect (len == -1 && errno == ENOENT, 0))
+    {
+      __set_errno (EBADF);
+      return NULL;
+    }
+
+  if (__builtin_expect (len != -1
+#ifndef __ASSUME_PROC_SELF_FD_SYMLINK
+                       /* This is for Linux 2.0.  */
+                       && ttyname_buf[0] != '['
+#endif
+                       , 1))
     {
       if ((size_t) len >= buflen)
        return NULL;
index eee4d862b2318d7c741a6ec2fd0dac954a340d89..bd415f167b415f741b74feb3af016627ea97fe43 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,1995-2001, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,1995-2001,2003,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
 #include <stdlib.h>
 
 #include <stdio-common/_itoa.h>
+#include <kernel-features.h>
 
 static int getttyname_r (char *buf, size_t buflen,
                         dev_t mydev, ino64_t myino, int save,
                         int *dostat) internal_function;
 
 static int
-internal_function
+internal_function attribute_compat_text_section
 getttyname_r (char *buf, size_t buflen, dev_t mydev, ino64_t myino,
              int save, int *dostat)
 {
@@ -99,7 +100,6 @@ __ttyname_r (int fd, char *buf, size_t buflen)
   struct stat64 st, st1;
   int dostat = 0;
   int save = errno;
-  int ret;
 
   /* Test for the absolute minimal size.  This makes life easier inside
      the loop.  */
@@ -115,29 +115,34 @@ __ttyname_r (int fd, char *buf, size_t buflen)
       return ERANGE;
     }
 
+  if (__builtin_expect (!__isatty (fd), 0))
+    {
+      __set_errno (ENOTTY);
+      return ENOTTY;
+    }
+
   /* We try using the /proc filesystem.  */
   *_fitoa_word (fd, __stpcpy (procname, "/proc/self/fd/"), 10, 0) = '\0';
 
-  ret = __readlink (procname, buf, buflen - 1);
-  if (ret == -1 && errno == ENOENT)
+  ssize_t ret = __readlink (procname, buf, buflen - 1);
+  if (__builtin_expect (ret == -1 && errno == ENOENT, 0))
     {
       __set_errno (EBADF);
       return EBADF;
     }
 
-  if (!__isatty (fd))
-    {
-      __set_errno (ENOTTY);
-      return ENOTTY;
-    }
-
-  if (ret == -1 && errno == ENAMETOOLONG)
+  if (__builtin_expect (ret == -1 && errno == ENAMETOOLONG, 0))
     {
       __set_errno (ERANGE);
       return ERANGE;
     }
 
-  if (ret != -1 && buf[0] != '[')
+  if (__builtin_expect (ret != -1
+#ifndef __ASSUME_PROC_SELF_FD_SYMLINK
+                       /* This is for Linux 2.0.  */
+                       && buf[0] != '['
+#endif
+                       , 1))
     {
       buf[ret] = '\0';
       return 0;
index 58904fc4d4c888820e0645a79ccefa1210d344e6..d377db968763173b0e9340102c72c754f2a9b6ef 100644 (file)
@@ -14,3 +14,4 @@ getrlimit     -       getrlimit       i:ip    __getrlimit     getrlimit getrlimit64
 setrlimit      -       setrlimit       i:ip    __setrlimit     setrlimit setrlimit64
 readahead      -       readahead       i:iii   __readahead     readahead
 sendfile       -       sendfile        i:iipi  sendfile        sendfile64
+sync_file_range        -       sync_file_range i:iiii  sync_file_range
index 9198c70bd49d610cf5e7310a04df873819974ad3..2351737f7c5ae84bb3151c6029029cb4791f3cd6 100644 (file)
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux/x86-64.
-   Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -194,10 +194,41 @@ struct flock64
 # define POSIX_FADV_NOREUSE    5 /* Data will be accessed once.  */
 #endif
 
+
+#ifdef __USE_GNU
+# define SYNC_FILE_RANGE_WAIT_BEFORE   1 /* Wait upon writeout of all pages
+                                            in the range before performing the
+                                            write.  */
+# define SYNC_FILE_RANGE_WRITE         2 /* Initiate writeout of all those
+                                            dirty pages in the range which are
+                                            not presently under writeback.  */
+# define SYNC_FILE_RANGE_WAIT_AFTER    4 /* Wait upon writeout of all pages in
+                                            the range after performing the
+                                            write.  */
+#endif
+
 __BEGIN_DECLS
 
+#ifdef __USE_GNU
+
 /* Provide kernel hint to read ahead.  */
 extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
     __THROW;
 
+
+/* Selective file content synch'ing.  */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+                           unsigned int __flags);
+
+
+/* Splice two files together.  */
+extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+    __THROW;
+
+/* In-kernel implementation of tee for pipe buffers.  */
+extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+    __THROW;
+
+#endif
+
 __END_DECLS