+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>
-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
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
+ GLIBC_2.5
%ifdef USE_IN_LIBIO
HURD_CTHREADS_0.3
%endif
/* 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>.
#include <stdio.h>
#include <ctype.h>
#include <getopt.h>
+#include <limits.h>
#define __need_error_t
#include <errno.h>
else
{
int __key = __opt->key;
- return __key > 0 && isprint (__key);
+ return __key > 0 && __key <= UCHAR_MAX && isprint (__key);
}
}
{
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
-/* 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.
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)
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);
cache_name);
/* Free all allocated memory. */
+ free (file_entries_new);
free (file_entries);
free (strings);
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';
*) 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
}
if (memcmp (envline, "POINTER_GUARD", 13) == 0)
- GLRO(dl_pointer_guard) = envline[14] == '0';
+ GLRO(dl_pointer_guard) = envline[14] != '0';
break;
case 14:
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
#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
#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
/* 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.
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)
-# 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
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
$(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 $@
/* 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.
#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>
/* 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.
#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>
/* 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.
#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>
/* 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.
#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>
/* 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.
#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>
#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 */
/* 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)
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)
{
-/* 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.
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
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
#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 *) ∈
- __snprintf (buffer, 18, "%d.%d.%d.%d",
+ unsigned char *bytes = (unsigned char *) ∈
+ __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);
-}
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);
-/* 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.
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] == '_')
/* 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.
break;
}
- return cnt >= 0 ? retval : NULL;
+ return retval;
/* NOTREACHED */
}
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
}
}
- /* 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);
register FTS *sp;
register FTSENT *p, *root;
register int nitems;
- FTSENT *parent, *tmp;
+ FTSENT *parent = NULL;
+ FTSENT *tmp;
/* Options check. */
if (options & ~FTS_OPTIONMASK) {
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) {
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;
} 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)
fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) {
cur->fts_info = FTS_ERR;
SET(FTS_STOP);
+ fts_lfree(head);
return (NULL);
}
if (!nitems) {
if (type == BREAD)
cur->fts_info = FTS_DP;
+ fts_lfree(head);
return (NULL);
}
-/* 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
/* 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;
-/* 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
/* 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;
/* 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.
cookie_io_functions_t iof;
fmemopen_cookie_t *c;
- if (len == 0)
+ if (__builtin_expect (len == 0, 0))
{
einval:
__set_errno (EINVAL);
}
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;
}
-/* 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.
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"));
}
-/* 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.
{
size_t act = 0;
size_t max = 10;
- char *grouping = ignore_content ? NULL : xmalloc (max);
+ char *grouping = xmalloc (max);
do
{
}
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. */
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;
-/* 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.
}
while (isspace (ch));
- if (ch == EOF)
- {
- lr->token.tok = tok_eof;
- return &lr->token;
- };
-
if (ch != lr->comment_char)
break;
+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.
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 \
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 \
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 \
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"
% - 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
--- /dev/null
+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
--- /dev/null
+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
--- /dev/null
+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
% "<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>"
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>"
LC_NUMERIC
decimal_point "<U002E>"
-thousands_sep "<U0020>"
+thousands_sep "<U0027>"
grouping 3;3
END LC_NUMERIC
"<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>";/
% 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
% 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
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
--- /dev/null
+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
+
--- /dev/null
+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
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
<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
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
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
"<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 -
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
"<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>";/
"<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
% 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>"
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
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
"<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>"
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
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
"<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>"
# 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.
-/* 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.
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;
}
-# 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
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))
GLIBC_2.2 {
xdr_ypall;
}
+ GLIBC_PRIVATE {
+ _nsl_default_nss;
+ }
}
libnss_compat {
_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;
--- /dev/null
+/* 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);
-/* 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.
return dir;
}
- cp = strchr (leaf, '\0');
+ cp = rawmemchr (leaf, '\0');
*cp++ = '.';
strcpy (cp, domain);
-/* 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.
#include "nis_intern.h"
nis_result *
-nis_checkpoint(const_nis_name dirname)
+nis_checkpoint (const_nis_name dirname)
{
nis_result *res;
if (__type_of (NIS_RES_OBJECT (res2)) != NIS_DIRECTORY_OBJ)
{
nis_freeresult (res2);
- nis_freeresult (res);
NIS_RES_STATUS (res) = NIS_INVALIDOBJ;
return res;
}
-/* 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.
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)
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;
}
-/* 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.
char *addr;
unsigned int size;
XDR xdrs;
- nis_result *res;
if (src == NULL)
return (NULL);
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)
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;
}
-/* 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.
else
return NIS_BADNAME;
- obj = malloc (sizeof (nis_object));
+ obj = calloc (1, sizeof (nis_object));
if (__builtin_expect (obj == NULL, 0))
return NIS_NOMEMORY;
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;
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;
}
-/* 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.
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)
&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;
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)
{
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;
}
serv[0] = NULL;
}
- if (res != NULL)
- nis_freeresult (res);
+ nis_freeresult (res);
return serv;
}
-/* 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.
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;
}
-/* 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.
__nisdomainname[0] = '\0';
else
{
- char *cp = strchr (__nisdomainname, '\0');
+ char *cp = rawmemchr (__nisdomainname, '\0');
/* Missing trailing dot? */
if (cp[-1] != '.')
__nishostname[0] = '\0';
else
{
- char *cp = strchr (__nishostname, '\0');
+ char *cp = rawmemchr (__nishostname, '\0');
int len = cp - __nishostname;
/* Hostname already fully qualified? */
-/* 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.
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;
/* 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;
}
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);
}
-/* 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.
}
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)];
-/* 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.
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;
if (newp == NULL)
{
free (newmem);
+ nis_freeresult (res);
return NIS_NOMEMORY;
}
newmem = newp;
-/* 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.
/* 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, ']');
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;
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)
}
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);
--- /dev/null
+/* 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;
+}
-/* 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"
};
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;
-}
-/* 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
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 */
-/* 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.
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;
_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;
-/* 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.
_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;
_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;
-/* 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.
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;
_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;
_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;
-/* 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.
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;
}
/* 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:
return retval;
}
- if ((size_t) (len + 1) > linebuflen)
+ if (__builtin_expect ((size_t) (len + 1) > linebuflen, 0))
{
free (result);
*h_errnop = NETDB_INTERNAL;
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;
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)
{
return NSS_STATUS_UNAVAIL;
}
+ char *domain;
if (yp_get_default_domain (&domain))
return NSS_STATUS_UNAVAIL;
*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;
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;
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)
{
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;
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)
{
-/* 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.
#include <sys/param.h>
#include "nss-nis.h"
+#include <libnsl.h>
/* Get the declaration of the parser function. */
#define ENTNAME grent
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;
}
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. */
if (*start == *size)
{
/* Need a bigger buffer. */
- gid_t *newgroups;
long int newsize;
if (limit > 0 && *size == limit)
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;
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;
-/* 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.
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
return NSS_STATUS_SUCCESS;
}
+
enum nss_status
_nss_nis_getnetgrent_r (struct __netgrent *result, char *buffer, size_t buflen,
int *errnop)
-/* 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.
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;
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_netent (p, net, data, buflen, errnop);
- if (parse_res == -1)
+ if (__builtin_expect (parse_res == -1, 0))
{
free (outkey);
*herrnop = NETDB_INTERNAL;
_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;
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;
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_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)
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')
}
}
- 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_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)
-/* 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.
_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;
_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;
-/* 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.
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)
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;
*p = 0;
strncpy (pkey, result, HEXKEYBYTES + 1);
pkey[HEXKEYBYTES] = '\0';
+ free (result);
}
return NSS_STATUS_SUCCESS;
}
_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)
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;
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;
}
_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;
/* 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:
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;
}
-/* 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.
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;
/* 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,
}
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);
else
{
non_adjunct:
- if ((size_t) (len + 1) > buflen)
+ if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
{
free (result);
*errnop = ERANGE;
++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;
_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;
/* 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,
therein into original result. */
char *encrypted = strchr (result2, ':');
char *endp;
- size_t restlen;
if (encrypted == NULL
|| (endp = strchr (++encrypted, ':')) == NULL
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);
else
{
non_adjunct:
- if ((size_t) (len + 1) > buflen)
+ if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
{
free (result);
*errnop = ERANGE;
++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;
_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;
/* 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,
}
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);
else
{
non_adjunct:
- if ((size_t) (len + 1) > buflen)
+ if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
{
free (result);
*errnop = ERANGE;
++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;
-/* 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.
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;
++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;
}
_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))
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;
-/* 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.
#include <rpcsvc/ypclnt.h>
#include "nss-nis.h"
+#include <libnsl.h>
/* Get the declaration of the parser function. */
{
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;
++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;
}
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;
}
/* 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;
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.
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));
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;
-/* 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.
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;
_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;
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)
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. */
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';
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;
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;
}
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);
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,
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
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));
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;
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;
}
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,
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)
{
/* 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')
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)
{
-/* 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,
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
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)
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')
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)
{
removed (one by one) */
buf2[b2len - 2] = '\0';
b2len -= 2;
+ nis_freeresult (result);
continue;
}
-/* 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
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)
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;
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;
}
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)
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)
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;
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;
{
int is = isspace (*line);
- *line = '\0';
+ *line++ = '\0';
if (is)
while (*line != '\0' && (*line == ',' || isspace (*line)))
++line;
- else
- ++line;
}
}
if (room_left < sizeof (char *))
}
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)
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)
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';
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;
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')
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;
}
-/* 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.
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)
return NSS_STATUS_SUCCESS;
}
+
enum nss_status
_nss_nisplus_getsecretkey (const char *netname, char *skey, char *passwd,
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, 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)
return NSS_STATUS_SUCCESS;
}
+
/* Parse information from the passed string.
The format of the string passed is gid,grp,grp, ... */
static enum nss_status
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.
_("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);
* 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);
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.
_("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);
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,
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)
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')
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)
{
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,
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)
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;
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')
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)
{
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
-/* 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.
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;
+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.
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
#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;
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
#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;
/* 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. */
-/* 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.
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);
}
}
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.
/* 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
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
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
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)
/* 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
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.
/* 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
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
/* 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
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
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.
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
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
/* 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. */
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
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;
/* 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
#ifndef UP
# define LOCK \
cmpl $0, %gs:MULTIPLE_THREADS_OFFSET; \
- je,pt 0f; \
+ je 0f; \
lock; \
0:
#endif
xchgl %eax, (%ebx) /* NB: lock is implied */
testl %eax, %eax
- jnz,pn 1b
+ jnz 1b
popl %esi
cfi_adjust_cfa_offset(-4)
#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. */
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
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
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
call __pthread_disable_asynccancel
testl %esi, %esi
- je,pt 9f
+ je 9f
cmpl $-EWOULDBLOCK, %esi
jne 3f
leal -1(%eax), %ecx
LOCK
cmpxchgl %ecx, (%ebx)
- jne,pn 8b
+ jne 8b
addl $12, %esp
cfi_adjust_cfa_offset(-12)
leal -1(%eax), %edx
LOCK
cmpxchgl %edx, (%ecx)
- jne,pn 2b
+ jne 2b
xorl %eax, %eax
ret
leal -1(%eax), %edx
LOCK
cmpxchgl %edx, (%ebx)
- jne,pn 2b
+ jne 2b
xorl %eax, %eax
movl 4(%esp), %esi
# 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) \
# 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" \
# 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" \
"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), \
# 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 */
-# 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
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
# 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))) \
/* 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;
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;
}
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;
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;
/* 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
p = __strtok_r (NULL, ":\n", &save_ptr);
if (p == NULL) /* malformed line? */
continue;
+ fclose (stream);
strcpy (result, p);
return NSS_STATUS_SUCCESS;
}
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
/* 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
#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))
{
/* 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
--- /dev/null
+#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"
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)
/* 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
__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
-# 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
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
--- /dev/null
+/* 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 */
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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."
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
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"
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
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"
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
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"
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
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"
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
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."
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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)
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
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)
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
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) \
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
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. */
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
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; \
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
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."
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
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."
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
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
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
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"
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
}
size = 0;
i = 0;
+ free (sizestr);
sizestr = NULL;
print_stat (indent + 1, &dl->decl);
}
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)
tmp++;
}
- guard = extendfile (guard, "_H_RPCGEN");
return guard;
}
}
fprintf (fout, "\n#endif /* !_%s */\n", guard);
+ free (guard);
close_input ();
close_output (outfilename);
}
close_output (outfilename);
}
+static const char space[] = " ";
+
static char *
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");
}
else
{
- servername = " ";
- clientname = " ";
+ servername = (char *) space;
+ clientname = (char *) space;
}
servprogname = extendfile (cmd->infile, "_server");
clntprogname = extendfile (cmd->infile, "_client");
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));
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);
}
/*
def_const (defp);
break;
case TOK_EOF:
+ free (defp);
return (NULL);
default:
error ("definition keyword expected");
case_list *cases;
/* case_list *tcase; */
case_list **tailp;
+#if 0
int flag;
+#endif
defp->def_kind = DEF_UNION;
scan (TOK_IDENT, &tok);
cases->case_name = tok.str;
scan (TOK_COLON, &tok);
/* now peek at next token */
+#if 0
flag = 0;
+#endif
if (peekscan (TOK_CASE, &tok))
{
}
while (peekscan (TOK_CASE, &tok));
}
+#if 0
else if (flag)
{
tailp = &cases->next;
cases = ALLOC (case_list);
};
+#endif
get_declaration (&dec, DEF_UNION);
cases->case_decl = dec;
*p = 0;
if (*file == 0)
{
+ free (file);
*fname = NULL;
}
else
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;
}
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;
}
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;
}
/* 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>.
{
fde_compare_t fde_compare;
- if (accu->linear && accu->linear->count != count)
+ if (accu->linear->count != count)
abort ();
if (ob->s.b.mixed_encoding)
/* 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.
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:
#define GAIH_EAI ~(GAIH_OKIFUNSPEC)
#ifndef UNIX_PATH_MAX
-#define UNIX_PATH_MAX 108
+# define UNIX_PATH_MAX 108
#endif
struct gaih_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;
}
}
}
#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;
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,
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;
}
}
if (service != NULL)
{
if ((tp->protoflag & GAI_PROTO_NOSERVICE) != 0)
- return (GAIH_OKIFUNSPEC | -EAI_SERVICE);
+ return GAIH_OKIFUNSPEC | -EAI_SERVICE;
if (service->num < 0)
{
pst = &(newp->next);
}
if (st == (struct gaih_servtuple *) &nullserv)
- return (GAIH_OKIFUNSPEC | -EAI_SERVICE);
+ return GAIH_OKIFUNSPEC | -EAI_SERVICE;
}
}
else
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);
}
}
- goto dupname;
+ if (req->ai_flags & AI_CANONNAME)
+ canon = name;
}
}
}
/* 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;
free (air);
if (at->family == AF_UNSPEC)
- return (GAIH_OKIFUNSPEC | -EAI_NONAME);
+ return GAIH_OKIFUNSPEC | -EAI_NONAME;
goto process_list;
}
/* 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
{
return 0;
}
+#if 0
static const struct gaih gaih[] =
{
{ PF_INET6, gaih_inet },
#endif
{ PF_UNSPEC, NULL }
};
+#endif
struct sort_result
{
struct sockaddr_storage source_addr;
uint8_t source_addr_len;
bool got_source_addr;
+ uint8_t source_addr_flags;
};
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 }
}
- /* 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. */
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. */
}
+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;
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))
{
}
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])
if (*c != '\0')
{
if (hints->ai_flags & AI_NUMERICSERV)
- return EAI_NONAME;
+ {
+ free (in6ai);
+ return EAI_NONAME;
+ }
gaih_service.num = -1;
}
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)
}
freeaddrinfo (p);
+ free (in6ai);
return -(i & GAIH_EAI);
}
}
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)
{
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;
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
{
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
p->ai_canonname = canonname;
}
+ free (in6ai);
+
if (p)
{
*pai = p;
-/* 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
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. */
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 */
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;
}
-/* 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
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"))
#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)
{
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
{
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
{
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. */
{
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. */
# 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
#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;
/* 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
# 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
/* 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
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. */
};
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
#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
{
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
{
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. */
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;
}
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);
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;
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)
return NULL;
}
- alloc_size = PATH_MAX;
+ alloc_size = MAX (PATH_MAX, __getpagesize ());
}
if (buf == NULL)
/* 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.
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)
/* 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.
# 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
--- /dev/null
+/* 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)
-/* 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.
#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 \
/* 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
# 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
# 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
/* 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.
# 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
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))
L(badargs):
li r3,EINVAL
b __syscall_error@local
+
+ cfi_startproc
END (BP_SYM (__clone))
weak_alias (BP_SYM (__clone), 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))
L(badargs):
li r3,EINVAL
b JUMPTARGET(__syscall_error)
+
+ cfi_startproc
END (BP_SYM (__clone))
weak_alias (BP_SYM (__clone), BP_SYM (clone))
/* 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
/* 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;
/* 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
# 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
/* 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.
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)
{
/* 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.
# 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
/* 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.
# 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
--- /dev/null
+/* 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
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
-/* 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
#include <stdlib.h>
#include <stdio-common/_itoa.h>
+#include <kernel-features.h>
#if 0
/* Is this used anywhere? It is not exported. */
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;
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';
}
}
- 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;
-/* 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)
{
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. */
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;
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
/* 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
# 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