summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2011-05-05 11:06:02 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2011-05-05 11:06:02 +0000
commit9dffe5df04949a0dd0f37832415009bf84d882b6 (patch)
tree5218a6b2ebaaa2dcd1c1e55e6858ccacda03397e /libc
parentc46d4a9b60ba79c321ab9075f71751389808a15a (diff)
Merge changes between r13354 and r13697 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@13698 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc')
-rw-r--r--libc/ChangeLog255
-rw-r--r--libc/Makefile54
-rw-r--r--libc/NEWS14
-rw-r--r--libc/conform/data/netdb.h-data2
-rw-r--r--libc/elf/cache.c4
-rw-r--r--libc/elf/dl-load.c24
-rw-r--r--libc/elf/dl-lookup.c2
-rw-r--r--libc/elf/dl-object.c2
-rw-r--r--libc/elf/dl-tls.c5
-rw-r--r--libc/elf/elf.h3
-rw-r--r--libc/elf/ldconfig.c15
-rw-r--r--libc/grp/initgroups.c5
-rw-r--r--libc/include/features.h1
-rw-r--r--libc/include/libc-symbols.h15
-rw-r--r--libc/include/rpc/auth.h30
-rw-r--r--libc/include/rpc/auth_des.h9
-rw-r--r--libc/include/rpc/auth_unix.h3
-rw-r--r--libc/include/rpc/clnt.h39
-rw-r--r--libc/include/rpc/des_crypt.h2
-rw-r--r--libc/include/rpc/key_prot.h23
-rw-r--r--libc/include/rpc/pmap_clnt.h4
-rw-r--r--libc/include/rpc/pmap_prot.h7
-rw-r--r--libc/include/rpc/pmap_rmt.h7
-rw-r--r--libc/include/rpc/rpc_msg.h9
-rw-r--r--libc/include/rpc/svc.h35
-rw-r--r--libc/include/rpc/svc_auth.h4
-rw-r--r--libc/include/rpc/xdr.h95
-rw-r--r--libc/inet/getnameinfo.c4
-rw-r--r--libc/io/fchmod.c4
-rw-r--r--libc/libio/fileops.c38
-rw-r--r--libc/libio/oldfileops.c6
-rw-r--r--libc/libio/wfileops.c4
-rw-r--r--libc/locale/programs/ld-collate.c4
-rw-r--r--libc/malloc/malloc.c4
-rw-r--r--libc/manual/stdio.texi2
-rw-r--r--libc/misc/fchflags.c4
-rw-r--r--libc/misc/ftruncate.c4
-rw-r--r--libc/misc/ftruncate64.c4
-rw-r--r--libc/misc/tst-efgcvt.c4
-rw-r--r--libc/nis/Makefile11
-rw-r--r--libc/nptl/ChangeLog7
-rw-r--r--libc/nptl/allocatestack.c7
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/pthread_kill.c4
-rw-r--r--libc/nptl/sysdeps/unix/sysv/linux/pthread_sigqueue.c4
-rw-r--r--libc/nptl/tst-kill4.c4
-rw-r--r--libc/nscd/connections.c2
-rw-r--r--libc/nscd/selinux.h2
-rw-r--r--libc/nss/Makefile7
-rw-r--r--libc/nss/Versions2
-rw-r--r--libc/nss/getnssent_r.c4
-rw-r--r--libc/nss/nss_files/files-initgroups.c135
-rw-r--r--libc/nss/nsswitch.conf1
-rw-r--r--libc/po/ru.po95
-rw-r--r--libc/resolv/netdb.h4
-rw-r--r--libc/stdlib/Makefile11
-rw-r--r--libc/stdlib/bug-getcontext.c48
-rw-r--r--libc/stdlib/gmp-impl.h4
-rw-r--r--libc/sunrpc/Makefile78
-rw-r--r--libc/sunrpc/auth_des.c25
-rw-r--r--libc/sunrpc/auth_none.c10
-rw-r--r--libc/sunrpc/auth_unix.c38
-rw-r--r--libc/sunrpc/authdes_prot.c29
-rw-r--r--libc/sunrpc/authuxprot.c24
-rw-r--r--libc/sunrpc/clnt_gen.c12
-rw-r--r--libc/sunrpc/clnt_perr.c19
-rw-r--r--libc/sunrpc/clnt_raw.c16
-rw-r--r--libc/sunrpc/clnt_simp.c3
-rw-r--r--libc/sunrpc/clnt_tcp.c30
-rw-r--r--libc/sunrpc/clnt_udp.c38
-rw-r--r--libc/sunrpc/clnt_unix.c50
-rw-r--r--libc/sunrpc/des_crypt.c5
-rw-r--r--libc/sunrpc/des_soft.c3
-rw-r--r--libc/sunrpc/get_myaddr.c5
-rw-r--r--libc/sunrpc/key_call.c90
-rw-r--r--libc/sunrpc/key_prot.c65
-rw-r--r--libc/sunrpc/netname.c13
-rw-r--r--libc/sunrpc/pm_getmaps.c11
-rw-r--r--libc/sunrpc/pm_getport.c19
-rw-r--r--libc/sunrpc/pmap_clnt.c22
-rw-r--r--libc/sunrpc/pmap_prot.c10
-rw-r--r--libc/sunrpc/pmap_prot2.c10
-rw-r--r--libc/sunrpc/pmap_rmt.c46
-rw-r--r--libc/sunrpc/publickey.c3
-rw-r--r--libc/sunrpc/rpc_cmsg.c30
-rw-r--r--libc/sunrpc/rpc_common.c3
-rw-r--r--libc/sunrpc/rpc_dtable.c2
-rw-r--r--libc/sunrpc/rpc_prot.c60
-rw-r--r--libc/sunrpc/rpc_thread.c12
-rw-r--r--libc/sunrpc/rtime.c2
-rw-r--r--libc/sunrpc/svc.c61
-rw-r--r--libc/sunrpc/svc_auth.c2
-rw-r--r--libc/sunrpc/svc_authux.c7
-rw-r--r--libc/sunrpc/svc_raw.c8
-rw-r--r--libc/sunrpc/svc_run.c8
-rw-r--r--libc/sunrpc/svc_simple.c17
-rw-r--r--libc/sunrpc/svc_tcp.c26
-rw-r--r--libc/sunrpc/svc_udp.c25
-rw-r--r--libc/sunrpc/svc_unix.c20
-rw-r--r--libc/sunrpc/svcauth_des.c1
-rw-r--r--libc/sunrpc/xcrypt.c8
-rw-r--r--libc/sunrpc/xdr.c157
-rw-r--r--libc/sunrpc/xdr_array.c9
-rw-r--r--libc/sunrpc/xdr_float.c2
-rw-r--r--libc/sunrpc/xdr_intXX_t.c36
-rw-r--r--libc/sunrpc/xdr_mem.c6
-rw-r--r--libc/sunrpc/xdr_rec.c8
-rw-r--r--libc/sunrpc/xdr_ref.c11
-rw-r--r--libc/sunrpc/xdr_sizeof.c5
-rw-r--r--libc/sunrpc/xdr_stdio.c5
-rw-r--r--libc/sysdeps/generic/tls.h4
-rw-r--r--libc/sysdeps/i386/dl-tls.h5
-rw-r--r--libc/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S2
-rw-r--r--libc/sysdeps/i386/i686/multiarch/memcpy-ssse3.S2
-rw-r--r--libc/sysdeps/i386/stpncpy.S4
-rw-r--r--libc/sysdeps/ia64/dl-tls.h5
-rw-r--r--libc/sysdeps/ia64/fpu/libm_lgammal.S2
-rw-r--r--libc/sysdeps/ia64/fpu/s_erfcl.S2
-rw-r--r--libc/sysdeps/ia64/fpu/s_expm1l.S2
-rw-r--r--libc/sysdeps/ia64/memcmp.S4
-rw-r--r--libc/sysdeps/ia64/strcpy.S4
-rw-r--r--libc/sysdeps/mach/hurd/fchflags.c4
-rw-r--r--libc/sysdeps/mach/hurd/fchmod.c4
-rw-r--r--libc/sysdeps/mach/hurd/ftruncate.c4
-rw-r--r--libc/sysdeps/posix/getaddrinfo.c73
-rw-r--r--libc/sysdeps/powerpc/dl-tls.h5
-rw-r--r--libc/sysdeps/powerpc/powerpc32/dl-machine.c4
-rw-r--r--libc/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S4
-rw-r--r--libc/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S4
-rw-r--r--libc/sysdeps/powerpc/powerpc32/power4/memcpy.S98
-rw-r--r--libc/sysdeps/powerpc/powerpc32/power4/strncmp.S24
-rw-r--r--libc/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S4
-rw-r--r--libc/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S4
-rw-r--r--libc/sysdeps/powerpc/powerpc32/power6/memcpy.S4
-rw-r--r--libc/sysdeps/powerpc/powerpc32/power7/strncmp.S13
-rw-r--r--libc/sysdeps/powerpc/powerpc32/strncmp.S14
-rw-r--r--libc/sysdeps/powerpc/powerpc64/memcpy.S74
-rw-r--r--libc/sysdeps/powerpc/powerpc64/power4/memcmp.S4
-rw-r--r--libc/sysdeps/powerpc/powerpc64/power4/memcpy.S4
-rw-r--r--libc/sysdeps/powerpc/powerpc64/power4/strncmp.S24
-rw-r--r--libc/sysdeps/powerpc/powerpc64/power6/memcpy.S4
-rw-r--r--libc/sysdeps/powerpc/powerpc64/power7/memcmp.S4
-rw-r--r--libc/sysdeps/powerpc/powerpc64/power7/strncmp.S13
-rw-r--r--libc/sysdeps/powerpc/powerpc64/strchr.S4
-rw-r--r--libc/sysdeps/powerpc/powerpc64/strcmp.S4
-rw-r--r--libc/sysdeps/powerpc/powerpc64/strcpy.S4
-rw-r--r--libc/sysdeps/powerpc/powerpc64/strlen.S4
-rw-r--r--libc/sysdeps/powerpc/powerpc64/strncmp.S4
-rw-r--r--libc/sysdeps/s390/dl-tls.h7
-rw-r--r--libc/sysdeps/s390/s390-32/elf/start.S12
-rw-r--r--libc/sysdeps/s390/s390-64/utf16-utf32-z9.c5
-rw-r--r--libc/sysdeps/s390/s390-64/utf8-utf16-z9.c5
-rw-r--r--libc/sysdeps/s390/s390-64/utf8-utf32-z9.c5
-rw-r--r--libc/sysdeps/sh/dl-tls.h5
-rw-r--r--libc/sysdeps/sparc/dl-tls.h5
-rw-r--r--libc/sysdeps/unix/sysv/linux/bits/time.h2
-rw-r--r--libc/sysdeps/unix/sysv/linux/check_pf.c4
-rw-r--r--libc/sysdeps/unix/sysv/linux/ftruncate64.c4
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/sysconf.c2
-rw-r--r--libc/sysdeps/unix/sysv/linux/ifaddrs.c4
-rw-r--r--libc/sysdeps/unix/sysv/linux/pathconf.c19
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c4
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c4
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c16
-rw-r--r--libc/sysdeps/unix/sysv/linux/sys/syscall.h4
-rw-r--r--libc/sysdeps/unix/sysv/linux/truncate64.c4
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S26
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86_64/getcontext.S3
-rw-r--r--libc/sysdeps/x86_64/Versions5
-rw-r--r--libc/sysdeps/x86_64/cacheinfo.c2
-rw-r--r--libc/sysdeps/x86_64/dl-tls.h5
-rw-r--r--libc/sysdeps/x86_64/memcpy.S11
-rw-r--r--libc/sysdeps/x86_64/memmove.c27
-rw-r--r--libc/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S2
-rw-r--r--libc/sysdeps/x86_64/multiarch/memcpy-ssse3.S2
-rw-r--r--libc/sysdeps/x86_64/multiarch/memcpy.S12
-rw-r--r--libc/sysdeps/x86_64/multiarch/memmove.c8
-rw-r--r--libc/time/strptime_l.c4
-rw-r--r--libc/wcsmbs/wchar.h4
178 files changed, 1941 insertions, 1034 deletions
diff --git a/libc/ChangeLog b/libc/ChangeLog
index c4cf88279..e90eaa954 100644
--- a/libc/ChangeLog
+++ b/libc/ChangeLog
@@ -1,3 +1,258 @@
+2011-05-03 Andreas Schwab <schwab@redhat.com>
+
+ * elf/ldconfig.c (add_dir): Don't crash on empty path.
+
+2011-04-28 Maciej Babinski <mbabinski@google.com>
+
+ [BZ #12714]
+ * sysdeps/posix/getaddrinfo.c (gaih_inet): Don't bypass
+ gethostbyname4_r when IPv6 results are possible.
+
+2011-05-02 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #12723]
+ * sysdeps/unix/sysv/linux/pathconf.c (__pathconf): Implement
+ _PC_PIPE_BUF handling.
+
+2011-04-30 Bruno Haible <bruno@clisp.org>
+
+ [BZ #12717]
+ * conform/data/netdb.h-data (getnameinfo): Make POSIX compliant.
+ * resolv/netdb.h (getnameinfo): Change type of flags parameter
+ to 'int'.
+ * inet/getnameinfo.c (getnameinfo): Likewise.
+
+2011-04-29 Ulrich Drepper <drepper@gmail.com>
+
+ * grp/initgroups.c (internal_getgrouplist): Prefer initgroups setting
+ to groups setting in database lookup.
+ * nss/nsswitch.conf: Add initgroups entry.
+
+2011-04-22 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #12685]
+ * libio/fileops.c (_IO_new_file_fopen): Scan up to 7 bytes of the
+ mode string.
+ Patch by Eric Blake <eblake@redhat.com>.
+
+2011-04-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sunrpc/Makefile (need-export-routines): Add svc_run.
+ (routines): Remove svc_run.
+ ($(objpfx)thrsvc): Add $(common-objpfx)linkobj/libc.so.
+ * sunrpc/clnt_perr.c (clnt_perrno): Export.
+ * sunrpc/svc_run.c (svc_run): Likewise.
+ * sunrpc/svc_udp.c (svcudp_create): Likewise.
+
+2011-04-21 Ulrich Drepper <drepper@gmail.com>
+
+ * nss/nss_files/files-initgroups.c (_nss_files_initgroups_dyn): Fix
+ problem in reallocation in last patch.
+
+2011-04-20 Ulrich Drepper <drepper@gmail.com>
+
+ * sunrpc/Makefile: Move inclusion of Rules.
+
+2011-04-19 Ulrich Drepper <drepper@gmail.com>
+
+ * nss/nss_files/files-initgroups.c: New file.
+ * nss/Makefile (libnss_files-routines): Add files-initgroups.
+ * nss/Versions (libnss_files) [GLIBC_PRIVATE]: Export
+ _nss_files_initgroups_dyn.
+
+2011-03-31 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * elf/elf.h (R_ARM_IRELATIVE): Define.
+
+2011-04-19 Ulrich Drepper <drepper@gmail.com>
+
+ * po/ru.po: Update from translation team.
+
+2011-04-17 Ulrich Drepper <drepper@gmail.com>
+
+ * sunrpc/Makefile ($(rpc-compat-routines.os)): Add before-compile to
+ dependencies.
+
+2011-02-06 Mike Frysinger <vapier@gentoo.org>
+
+ [BZ #12653]
+ * sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S: Only protect
+ MEMCPY_CHK with USE_AS_BCOPY ifdef check.
+ * sysdeps/i386/i686/multiarch/memcpy-ssse3.S: Likewise.
+ * sysdeps/x86_64/multiarch/memcpy-ssse3.S: Likewise.
+ * sysdeps/x86_64/multiarch/memcpy-ssse3-back.S: Likewise.
+
+2011-03-28 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/powerpc/powerpc32/power4/strncmp.S: Don't read past
+ differing bytes.
+ * sysdeps/powerpc/powerpc64/power4/strncmp.S: Likewise.
+ * sysdeps/powerpc/powerpc32/power7/strncmp.S: Likewise.
+ * sysdeps/powerpc/powerpc64/power7/strncmp.S: Likewise.
+
+2011-04-17 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #12420]
+ * sysdeps/unix/sysv/linux/x86_64/getcontext.S: Reload context after
+ storing it.
+ * stdlib/bug-getcontext.c: New file.
+ * stdlib/Makefile: Add rules to build and run bug-getcontext.
+
+2011-04-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * sysdeps/s390/s390-64/utf16-utf32-z9.c: Wrap the z9-109
+ instructions into .machine "z9-109".
+ * sysdeps/s390/s390-64/utf8-utf16-z9.c: Likewise.
+ * sysdeps/s390/s390-64/utf8-utf32-z9.c: Likewise.
+
+2011-04-11 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * sysdeps/s390/s390-32/elf/start.S (_start): Skip extra zeroes
+ between environment variables and auxiliary vector.
+
+2011-04-16 Ulrich Drepper <drepper@gmail.com>
+
+ * Makefile: Add rules to build linkobj/libc.so.
+ * include/libc-symbols.h: Define libc_hidden_nolink.
+ * include/rpc/auth.h: Mark functions which are to be hidden.
+ * include/rpc/auth_des.h: Likewise.
+ * include/rpc/auth_unix.h: Likewise.
+ * include/rpc/clnt.h: Likewise.
+ * include/rpc/des_crypt.h: Likewise.
+ * include/rpc/key_prot.h: Likewise.
+ * include/rpc/pmap_clnt.h: Likewise.
+ * include/rpc/pmap_prot.h: Likewise.
+ * include/rpc/pmap_rmt.h: Likewise.
+ * include/rpc/rpc_msg.h: Likewise.
+ * include/rpc/svc.h: Likewise.
+ * include/rpc/svc_auth.h: Likewise.
+ * include/rpc/xdr.h: Likewise.
+ * nis/Makefile: Link all DSOs against linkobj/libc.so.
+ * nss/Makefile: Likewise.
+ * sunrpc/Makefile: Don't install headers. Build library with normal
+ entry points. Don't build rpcinfo. Link RPC tests appropriately.
+ * sunrpc/auth_des.c: Hide exported symbols by default, export some
+ for the compat linking library. Remove use of INTDEF/INTUSE.
+ * sunrpc/auth_none.c: Likewise.
+ * sunrpc/auth_unix.c: Likewise.
+ * sunrpc/authdes_prot.c: Likewise.
+ * sunrpc/authuxprot.c: Likewise.
+ * sunrpc/clnt_gen.c: Likewise.
+ * sunrpc/clnt_perr.c: Likewise.
+ * sunrpc/clnt_raw.c: Likewise.
+ * sunrpc/clnt_simp.c: Likewise.
+ * sunrpc/clnt_tcp.c: Likewise.
+ * sunrpc/clnt_udp.c: Likewise.
+ * sunrpc/clnt_unix.c: Likewise.
+ * sunrpc/des_crypt.c: Likewise.
+ * sunrpc/des_soft.c: Likewise.
+ * sunrpc/get_myaddr.c: Likewise.
+ * sunrpc/key_call.c: Likewise.
+ * sunrpc/key_prot.c: Likewise.
+ * sunrpc/netname.c: Likewise.
+ * sunrpc/pm_getmaps.c: Likewise.
+ * sunrpc/pm_getport.c: Likewise.
+ * sunrpc/pmap_clnt.c: Likewise.
+ * sunrpc/pmap_prot.c: Likewise.
+ * sunrpc/pmap_prot2.c: Likewise.
+ * sunrpc/pmap_rmt.c: Likewise.
+ * sunrpc/publickey.c: Likewise.
+ * sunrpc/rpc_cmsg.c: Likewise.
+ * sunrpc/rpc_common.c: Likewise.
+ * sunrpc/rpc_dtable.c: Likewise.
+ * sunrpc/rpc_prot.c: Likewise.
+ * sunrpc/rpc_thread.c: Likewise.
+ * sunrpc/rtime.c: Likewise.
+ * sunrpc/svc.c: Likewise.
+ * sunrpc/svc_auth.c: Likewise.
+ * sunrpc/svc_authux.c: Likewise.
+ * sunrpc/svc_raw.c: Likewise.
+ * sunrpc/svc_run.c: Likewise.
+ * sunrpc/svc_simple.c: Likewise.
+ * sunrpc/svc_tcp.c: Likewise.
+ * sunrpc/svc_udp.c: Likewise.
+ * sunrpc/svc_unix.c: Likewise.
+ * sunrpc/svcauth_des.c: Likewise.
+ * sunrpc/xcrypt.c: Likewise.
+ * sunrpc/xdr.c: Likewise.
+ * sunrpc/xdr_array.c: Likewise.
+ * sunrpc/xdr_float.c: Likewise.
+ * sunrpc/xdr_intXX_t.c: Likewise.
+ * sunrpc/xdr_mem.c: Likewise.
+ * sunrpc/xdr_rec.c: Likewise.
+ * sunrpc/xdr_ref.c: Likewise.
+ * sunrpc/xdr_sizeof.c: Likewise.
+ * sunrpc/xdr_stdio.c: Likewise.
+
+2011-04-10 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #12650]
+ * sysdeps/i386/dl-tls.h: Define TLS_DTV_UNALLOCATED.
+ * sysdeps/ia64/dl-tls.h: Likewise.
+ * sysdeps/powerpc/dl-tls.h: Likewise.
+ * sysdeps/s390/dl-tls.h: Likewise.
+ * sysdeps/sh/dl-tls.h: Likewise.
+ * sysdeps/sparc/dl-tls.h: Likewise.
+ * sysdeps/x86_64/dl-tls.h: Likewise.
+ * elf/dl-tls.c: Don't define TLS_DTV_UNALLOCATED here.
+
+2011-03-14 Andreas Schwab <schwab@redhat.com>
+
+ * elf/dl-load.c (_dl_dst_substitute): When skipping the first
+ rpath element also skip the following colon.
+ (expand_dynamic_string_token): Add is_path parameter and pass
+ down to DL_DST_REQUIRED and _dl_dst_substitute.
+ (decompose_rpath): Call expand_dynamic_string_token with
+ non-zero is_path. Ignore empty rpaths.
+ (_dl_map_object_from_fd): Call expand_dynamic_string_token
+ with zero is_path.
+
+2011-04-08 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c:
+ Make cancelable.
+
+2011-04-09 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #12655]
+ * sysdeps/unix/sysv/linux/sys/syscall.h: Fix comment.
+ Patch by Filipe David Manana <fdmanana@apache.org>.
+
+2011-04-07 Andreas Schwab <schwab@redhat.com>
+
+ * sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S (CALL_FAIL):
+ Maintain aligned stack.
+ (CHECK_RSP): Remove unused macro.
+
+2011-04-03 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/x86_64/cacheinfo.c (intel_02_known): Fix typo in table.
+ * sysdeps/unix/sysv/linux/i386/sysconf.c (intel_02_known): Likewise.
+
+2011-04-02 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/unix/sysv/linux/bits/time.h (CLOCK_BOOTTIME): Define.
+
+ * include/features.h: Mention __USE_XOPEN2K8 in comment.
+
+2011-03-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #12518]
+ * sysdeps/x86_64/Versions: Add memcpy to GLIBC_2.14.
+ * sysdeps/x86_64/memcpy.S: Provide GLIBC_2_14 memcpy.
+ * sysdeps/x86_64/memmove.c: New file.
+ * sysdeps/x86_64/multiarch/memcpy.S: Include <shlib-compat.h>.
+ (memcpy): Renamed to ...
+ (__new_memcpy): This.
+ (memcpy): Provide GLIBC_2_14 memcpy.
+ * sysdeps/x86_64/multiarch/memmove.c: Include <shlib-compat.h>.
+ (memcpy): Provide GLIBC_2_2_5 memcpy.
+
+2011-04-01 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #12631]
+ * wcsmbs/wchar.h: Make wcpcpy and wcpncpy visible for __USE_XOPEN2K8.
+
2011-03-30 Andreas Schwab <schwab@redhat.com>
* misc/syncfs.c: New file.
diff --git a/libc/Makefile b/libc/Makefile
index 4f395f406..1b86450f9 100644
--- a/libc/Makefile
+++ b/libc/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2002,2003,2004,2005,2006,2008,2009
+# Copyright (C) 1991-2002,2003,2004,2005,2006,2008,2009,2011
# Free Software Foundation, Inc.
# This file is part of the GNU C Library.
@@ -63,8 +63,8 @@ endif # $(AUTOCONF) = no
+subdir_targets := subdir_lib objects objs others subdir_mostlyclean \
subdir_clean subdir_distclean subdir_realclean \
tests xtests subdir_lint.out \
- subdir_update-abi subdir_check-abi \
- subdir_echo-headers \
+ subdir_update-abi subdir_check-abi \
+ subdir_echo-headers \
subdir_install \
subdir_objs subdir_stubs subdir_testclean \
$(addprefix install-, no-libc.a bin lib data headers others)
@@ -144,6 +144,20 @@ lib-noranlib: subdir_lib
ifeq (yes,$(build-shared))
# Build the shared object from the PIC object library.
lib: $(common-objpfx)libc.so
+
+lib: $(common-objpfx)linkobj/libc.so
+
+$(common-objpfx)linkobj/libc.so: $(elfobjdir)/soinit.os $(common-objpfx)linkobj/libc_pic.a $(elfobjdir)/sofini.os $(elfobjdir)/interp.os $(elfobjdir)/ld.so $(common-objpfx)shlib.lds $(common-objpfx)elf/ld.so
+ $(build-shlib)
+
+$(common-objpfx)linkobj/libc_pic.a: $(common-objpfx)libc_pic.a $(common-objpfx)sunrpc/librpc_compat_pic.a
+ $(..)./scripts/mkinstalldirs $(common-objpfx)linkobj
+ (cd $(common-objpfx)linkobj; \
+ $(AR) x ../libc_pic.a; \
+ rm $$($(AR) t ../sunrpc/librpc_compat_pic.a | sed 's/^compat-//'); \
+ $(AR) x ../sunrpc/librpc_compat_pic.a; \
+ $(AR) cr libc_pic.a *.os; \
+ rm *.os)
endif
@@ -267,11 +281,11 @@ tests-clean:
tests: $(objpfx)c++-types-check.out $(objpfx)check-local-headers.out
ifneq ($(CXX),no)
check-data := $(firstword $(wildcard \
- $(foreach D,$(add-ons) scripts,\
- $(patsubst %,$D/data/c++-types-%.data,\
- $(abi-name) \
- $(addsuffix -$(config-os),\
- $(config-machine) \
+ $(foreach D,$(add-ons) scripts,\
+ $(patsubst %,$D/data/c++-types-%.data,\
+ $(abi-name) \
+ $(addsuffix -$(config-os),\
+ $(config-machine) \
$(base-machine))))))
ifneq (,$(check-data))
$(objpfx)c++-types-check.out: $(check-data) scripts/check-c++-types.sh
@@ -428,18 +442,18 @@ install: remove-old-headers
endif
endif
-headers2_0 := __math.h bytesex.h confname.h direntry.h elfclass.h \
- errnos.h fcntlbits.h huge_val.h ioctl-types.h \
- ioctls.h iovec.h jmp_buf.h libc-lock.h local_lim.h \
- mathcalls.h mpool.h nan.h ndbm.h posix1_lim.h \
- posix2_lim.h posix_opt.h resourcebits.h schedbits.h \
- selectbits.h semaphorebits.h sigaction.h sigcontext.h \
- signum.h sigset.h sockaddrcom.h socketbits.h stab.def \
- statbuf.h statfsbuf.h stdio-lock.h stdio_lim.h \
- syscall-list.h termbits.h timebits.h ustatbits.h \
- utmpbits.h utsnamelen.h waitflags.h waitstatus.h \
- xopen_lim.h gnu/types.h sys/ipc_buf.h \
- sys/kernel_termios.h sys/msq_buf.h sys/sem_buf.h \
+headers2_0 := __math.h bytesex.h confname.h direntry.h elfclass.h \
+ errnos.h fcntlbits.h huge_val.h ioctl-types.h \
+ ioctls.h iovec.h jmp_buf.h libc-lock.h local_lim.h \
+ mathcalls.h mpool.h nan.h ndbm.h posix1_lim.h \
+ posix2_lim.h posix_opt.h resourcebits.h schedbits.h \
+ selectbits.h semaphorebits.h sigaction.h sigcontext.h \
+ signum.h sigset.h sockaddrcom.h socketbits.h stab.def \
+ statbuf.h statfsbuf.h stdio-lock.h stdio_lim.h \
+ syscall-list.h termbits.h timebits.h ustatbits.h \
+ utmpbits.h utsnamelen.h waitflags.h waitstatus.h \
+ xopen_lim.h gnu/types.h sys/ipc_buf.h \
+ sys/kernel_termios.h sys/msq_buf.h sys/sem_buf.h \
sys/shm_buf.h sys/socketcall.h sigstack.h
.PHONY: remove-old-headers
diff --git a/libc/NEWS b/libc/NEWS
index 8aa9316d5..2750e852d 100644
--- a/libc/NEWS
+++ b/libc/NEWS
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes. 2011-4-1
+GNU C Library NEWS -- history of user-visible changes. 2011-5-2
Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
See the end for copying conditions.
@@ -7,11 +7,19 @@ using `glibc' in the "product" field.
Version 2.14
-* New Linux interfaces: clock_adjtime, name_to_handle_at, open_by_handle_at
+* The RPC implementation in libc is obsoleted. Old programs keep working
+ but new programs cannot be linked with the routines in libc anymore.
+ Programs in need of RPC functionality must be linked against TI-RPC.
+ The TI-RPC implemtation is IPv6 enabled and there are other benefits.
+ Implemented by Ulrich Drepper.
+
+* New Linux interfaces: clock_adjtime, name_to_handle_at, open_by_handle_at,
+ syncfs
* The following bugs are resolved with this release:
- 11724, 12445, 12454, 12460, 12469, 12489, 12509, 12510, 12583, 12587, 12597
+ 11724, 12420, 12445, 12454, 12460, 12469, 12489, 12509, 12510, 12518, 12583,
+ 12587, 12597, 12631, 12650, 12653, 12655, 12685, 12714, 12717, 12723
Version 2.13
diff --git a/libc/conform/data/netdb.h-data b/libc/conform/data/netdb.h-data
index 254ea6502..95afed81f 100644
--- a/libc/conform/data/netdb.h-data
+++ b/libc/conform/data/netdb.h-data
@@ -89,7 +89,7 @@ function int getaddrinfo (const char*, const char*, const struct addrinfo*, stru
function {struct hostent*} gethostbyaddr (const void*, socklen_t, int)
function {struct hostent*} gethostbyname (const char*)
function {struct hostent*} gethostent (void)
-function int getnameinfo (const struct sockaddr*, socklen_t, char*, socklen_t, char*, socklen_t, unsigned)
+function int getnameinfo (const struct sockaddr*, socklen_t, char*, socklen_t, char*, socklen_t, int)
function {struct netent*} getnetbyaddr (uint32_t, int)
function {struct netent*} getnetbyname (const char*)
function {struct netent*} getnetent (void)
diff --git a/libc/elf/cache.c b/libc/elf/cache.c
index b8561e4b5..09885930d 100644
--- a/libc/elf/cache.c
+++ b/libc/elf/cache.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2003,2005,2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2003,2005,2006,2007,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 1999.
@@ -361,7 +361,7 @@ save_cache (const char *cache_name)
{
/* We could subtract file_entries_new_size from str_offset -
not doing so makes the code easier, the string table
- always begins at the beginning of the the new cache
+ always begins at the beginning of the new cache
struct. */
file_entries_new->libs[idx_new].flags = entry->flags;
file_entries_new->libs[idx_new].osversion = entry->osversion;
diff --git a/libc/elf/dl-load.c b/libc/elf/dl-load.c
index 4a0ae7223..b24617da0 100644
--- a/libc/elf/dl-load.c
+++ b/libc/elf/dl-load.c
@@ -1,5 +1,5 @@
/* Map in a shared object's segments from the file.
- Copyright (C) 1995-2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1995-2005, 2006, 2007, 2009, 2010, 2011 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
@@ -284,6 +284,10 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
name += len;
while (*name != '\0' && (!is_path || *name != ':'))
++name;
+ /* Also skip following colon if this is the first rpath
+ element, but keep an empty element at the end. */
+ if (wp == result && is_path && *name == ':' && name[1] != '\0')
+ ++name;
}
else
/* No DST we recognize. */
@@ -310,7 +314,7 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
belonging to the map is loaded. In this case the path element
containing $ORIGIN is left out. */
static char *
-expand_dynamic_string_token (struct link_map *l, const char *s)
+expand_dynamic_string_token (struct link_map *l, const char *s, int is_path)
{
/* We make two runs over the string. First we determine how large the
resulting string is and then we copy it over. Since this is no
@@ -321,7 +325,7 @@ expand_dynamic_string_token (struct link_map *l, const char *s)
char *result;
/* Determine the number of DST elements. */
- cnt = DL_DST_COUNT (s, 1);
+ cnt = DL_DST_COUNT (s, is_path);
/* If we do not have to replace anything simply copy the string. */
if (__builtin_expect (cnt, 0) == 0)
@@ -335,7 +339,7 @@ expand_dynamic_string_token (struct link_map *l, const char *s)
if (result == NULL)
return NULL;
- return _dl_dst_substitute (l, s, result, 1);
+ return _dl_dst_substitute (l, s, result, is_path);
}
@@ -551,13 +555,21 @@ decompose_rpath (struct r_search_path_struct *sps,
/* Make a writable copy. At the same time expand possible dynamic
string tokens. */
- copy = expand_dynamic_string_token (l, rpath);
+ copy = expand_dynamic_string_token (l, rpath, 1);
if (copy == NULL)
{
errstring = N_("cannot create RUNPATH/RPATH copy");
goto signal_error;
}
+ /* Ignore empty rpaths. */
+ if (*copy == 0)
+ {
+ free (copy);
+ sps->dirs = (char *) -1;
+ return false;
+ }
+
/* Count the number of necessary elements in the result array. */
nelems = 0;
for (cp = copy; *cp != '\0'; ++cp)
@@ -2183,7 +2195,7 @@ _dl_map_object (struct link_map *loader, const char *name,
{
/* The path may contain dynamic string tokens. */
realname = (loader
- ? expand_dynamic_string_token (loader, name)
+ ? expand_dynamic_string_token (loader, name, 0)
: local_strdup (name));
if (realname == NULL)
fd = -1;
diff --git a/libc/elf/dl-lookup.c b/libc/elf/dl-lookup.c
index 79d4306c0..f878cac38 100644
--- a/libc/elf/dl-lookup.c
+++ b/libc/elf/dl-lookup.c
@@ -194,7 +194,7 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
might exist in more than one form
If the library does not provide symbol version information
- there is no problem at at: we simply use the symbol if it
+ there is no problem at all: we simply use the symbol if it
is defined.
These two lookups need to be handled differently if the
diff --git a/libc/elf/dl-object.c b/libc/elf/dl-object.c
index 0a9103d8b..a011f416b 100644
--- a/libc/elf/dl-object.c
+++ b/libc/elf/dl-object.c
@@ -112,7 +112,7 @@ _dl_new_object (char *realname, const char *libname, int type,
/* new->l_global = 0; We use calloc therefore not necessary. */
- /* Use the 'l_scope_mem' array by default for the the 'l_scope'
+ /* Use the 'l_scope_mem' array by default for the 'l_scope'
information. If we need more entries we will allocate a large
array dynamically. */
new->l_scope = new->l_scope_mem;
diff --git a/libc/elf/dl-tls.c b/libc/elf/dl-tls.c
index 824adc196..ea94aa013 100644
--- a/libc/elf/dl-tls.c
+++ b/libc/elf/dl-tls.c
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. Generic version.
- Copyright (C) 2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
+ Copyright (C) 2002-2006,2008,2011 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
@@ -33,9 +33,6 @@
to allow dynamic loading of modules defining IE-model TLS data. */
#define TLS_STATIC_SURPLUS 64 + DL_NNS * 100
-/* Value used for dtv entries for which the allocation is delayed. */
-#define TLS_DTV_UNALLOCATED ((void *) -1l)
-
/* Out-of-memory handler. */
#ifdef SHARED
diff --git a/libc/elf/elf.h b/libc/elf/elf.h
index acb7762f5..ca5abbf40 100644
--- a/libc/elf/elf.h
+++ b/libc/elf/elf.h
@@ -1,5 +1,5 @@
/* This file defines standard ELF types, structures, and macros.
- Copyright (C) 1995-2003,2004,2005,2006,2007,2008,2009,2010
+ Copyright (C) 1995-2003,2004,2005,2006,2007,2008,2009,2010,2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -2359,6 +2359,7 @@ typedef Elf32_Addr Elf32_Conflict;
#define R_ARM_TLS_LE32 108 /* 32 bit offset relative to static
TLS block */
#define R_ARM_THM_TLS_DESCSEQ 129
+#define R_ARM_IRELATIVE 160
#define R_ARM_RXPC25 249
#define R_ARM_RSBREL32 250
#define R_ARM_THM_RPC22 251
diff --git a/libc/elf/ldconfig.c b/libc/elf/ldconfig.c
index cb75a465a..8f4867b6b 100644
--- a/libc/elf/ldconfig.c
+++ b/libc/elf/ldconfig.c
@@ -387,14 +387,17 @@ add_dir (const char *line)
}
/* Canonify path: for now only remove leading and trailing
- whitespace and the trailing slashes slashes. */
- i = strlen (entry->path) - 1;
+ whitespace and the trailing slashes. */
+ i = strlen (entry->path);
- while (isspace (entry->path[i]) && i > 0)
- entry->path[i--] = '\0';
+ while (i > 0 && isspace (entry->path[i - 1]))
+ entry->path[--i] = '\0';
- while (entry->path[i] == '/' && i > 0)
- entry->path[i--] = '\0';
+ while (i > 0 && entry->path[i - 1] == '/')
+ entry->path[--i] = '\0';
+
+ if (i == 0)
+ return;
char *path = entry->path;
if (opt_chroot)
diff --git a/libc/grp/initgroups.c b/libc/grp/initgroups.c
index 180e653c3..25acf2a24 100644
--- a/libc/grp/initgroups.c
+++ b/libc/grp/initgroups.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1989,91,93,1996-2006,2008,2010 Free Software Foundation, Inc.
+/* Copyright (C) 1989,1991,1993,1996-2006,2008,2010,2011
+ 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
@@ -85,7 +86,7 @@ internal_getgrouplist (const char *user, gid_t group, long int *size,
nip = __nss_group_database;
}
else
- no_more = __nss_database_lookup ("group", NULL,
+ no_more = __nss_database_lookup ("initgroups", "group",
"compat [NOTFOUND=return] files", &nip);
while (! no_more)
diff --git a/libc/include/features.h b/libc/include/features.h
index 0468bd074..5f771bdaa 100644
--- a/libc/include/features.h
+++ b/libc/include/features.h
@@ -68,6 +68,7 @@
__USE_UNIX98 Define Single Unix V2 things.
__USE_XOPEN2K Define XPG6 things.
__USE_XOPEN2KXSI Define XPG6 XSI things.
+ __USE_XOPEN2K8 Define XPG7 things.
__USE_XOPEN2K8XSI Define XPG7 XSI things.
__USE_LARGEFILE Define correct standard I/O things.
__USE_LARGEFILE64 Define LFS things with separate names.
diff --git a/libc/include/libc-symbols.h b/libc/include/libc-symbols.h
index 7ea089089..b6ac4eac4 100644
--- a/libc/include/libc-symbols.h
+++ b/libc/include/libc-symbols.h
@@ -1,6 +1,7 @@
/* Support macros for making weak and strong aliases for symbols,
and for using symbol sets and linker warnings with GNU ld.
- Copyright (C) 1995-1998,2000-2006,2008,2009 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998,2000-2006,2008,2009,2011
+ 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
@@ -266,7 +267,7 @@
# else
# define link_warning(symbol, msg) \
asm (".stabs \"" msg "\",30,0,0,0\n\t" \
- ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n");
+ ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n");
# endif /* XCOFF */
# define libc_freeres_ptr(decl) decl
# define __libc_freeres_fn_section
@@ -606,6 +607,15 @@ for linking")
# define hidden_weak(name) \
__hidden_ver1(__GI_##name, name, name) __attribute__((weak));
# define hidden_data_weak(name) hidden_weak(name)
+# define hidden_nolink(name, lib, version) \
+ __hidden_nolink1 (__GI_##name, __EI_##name, name, VERSION_##lib##_##version)
+# define __hidden_nolink1(local, internal, name, version) \
+ __hidden_nolink2 (local, internal, name, version)
+# define __hidden_nolink2(local, internal, name, version) \
+ extern __typeof (name) internal __attribute__ ((alias (#local))); \
+ __hidden_nolink3 (local, internal, #name "@" #version)
+# define __hidden_nolink3(local, internal, vername) \
+ __asm__ (".symver " #internal ", " vername);
# else
/* For assembly, we need to do the opposite of what we do in C:
in assembly gcc __REDIRECT stuff is not in place, so functions
@@ -646,6 +656,7 @@ for linking")
# define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
# define libc_hidden_def(name) hidden_def (name)
# define libc_hidden_weak(name) hidden_weak (name)
+# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
# define libc_hidden_ver(local, name) hidden_ver (local, name)
# define libc_hidden_data_def(name) hidden_data_def (name)
# define libc_hidden_data_weak(name) hidden_data_weak (name)
diff --git a/libc/include/rpc/auth.h b/libc/include/rpc/auth.h
index a03188ed4..0219fd931 100644
--- a/libc/include/rpc/auth.h
+++ b/libc/include/rpc/auth.h
@@ -13,7 +13,7 @@ extern int key_setnet (struct key_netstarg *arg);
#define DECLARE_NSS_PROTOTYPES(service) \
extern enum nss_status _nss_ ##service ## _netname2user \
- (char netname[MAXNETNAMELEN + 1], uid_t *uidp, \
+ (char netname[MAXNETNAMELEN + 1], uid_t *uidp, \
gid_t *gidp, int *gidlenp, gid_t *gidlist, \
int *errnop);
@@ -22,23 +22,23 @@ DECLARE_NSS_PROTOTYPES (nisplus)
#undef DECLARE_NSS_PROTOTYPES
-extern bool_t xdr_des_block_internal (XDR *__xdrs, des_block *__blkp)
- attribute_hidden;
-extern bool_t xdr_opaque_auth_internal (XDR *, struct opaque_auth *)
- attribute_hidden;
-
-extern AUTH *authunix_create_internal (char *__machname, __uid_t __uid,
- __gid_t __gid, int __len,
- __gid_t *__aup_gids) attribute_hidden;
-extern AUTH *authunix_create_default_internal (void) attribute_hidden;
-extern AUTH *authnone_create_internal (void) attribute_hidden;
-extern AUTH *authdes_pk_create_internal (const char *, netobj *, u_int,
- struct sockaddr *,
- des_block *) attribute_hidden;
-
libc_hidden_proto (key_encryptsession_pk)
libc_hidden_proto (key_decryptsession_pk)
libc_hidden_proto (_null_auth)
+libc_hidden_proto (authnone_create)
+libc_hidden_proto (authunix_create)
+libc_hidden_proto (authunix_create_default)
+libc_hidden_proto (xdr_des_block)
+libc_hidden_proto (xdr_opaque_auth)
+libc_hidden_proto (authdes_create)
+libc_hidden_proto (authdes_pk_create)
+libc_hidden_proto (key_decryptsession)
+libc_hidden_proto (key_encryptsession)
+libc_hidden_proto (key_get_conv)
+libc_hidden_proto (key_secretkey_is_set)
+libc_hidden_proto (key_setnet)
+libc_hidden_proto (key_setsecret)
+libc_hidden_proto (netname2host)
#endif
diff --git a/libc/include/rpc/auth_des.h b/libc/include/rpc/auth_des.h
index 6dee05961..c14f06966 100644
--- a/libc/include/rpc/auth_des.h
+++ b/libc/include/rpc/auth_des.h
@@ -3,6 +3,7 @@
#include <sunrpc/rpc/auth_des.h>
libc_hidden_proto (getpublickey)
+libc_hidden_proto (getsecretkey)
libc_hidden_proto (rtime)
extern bool_t xdr_authdes_cred (XDR *xdrs, struct authdes_cred *cred);
@@ -16,9 +17,9 @@ extern enum auth_stat _svcauth_des (register struct svc_req *rqst,
#define DECLARE_NSS_PROTOTYPES(service) \
extern enum nss_status _nss_ ## service ## _getpublickey \
- (const char *netname, char *pkey, int *errnop); \
+ (const char *netname, char *pkey, int *errnop); \
extern enum nss_status _nss_ ## service ## _getsecretkey \
- (const char *netname, char *skey, char *passwd, \
+ (const char *netname, char *skey, char *passwd, \
int *errnop);
DECLARE_NSS_PROTOTYPES (files)
@@ -27,4 +28,8 @@ DECLARE_NSS_PROTOTYPES (nisplus)
#undef DECLARE_NSS_PROTOTYPES
+libc_hidden_proto (authdes_getucred)
+libc_hidden_proto (xdr_authdes_cred)
+libc_hidden_proto (xdr_authdes_verf)
+
#endif
diff --git a/libc/include/rpc/auth_unix.h b/libc/include/rpc/auth_unix.h
index 14928cc67..07031c9bd 100644
--- a/libc/include/rpc/auth_unix.h
+++ b/libc/include/rpc/auth_unix.h
@@ -1,4 +1,3 @@
#include <sunrpc/rpc/auth_unix.h>
-extern bool_t xdr_authunix_parms_internal (XDR *__xdrs,
- struct authunix_parms *__p);
+libc_hidden_proto (xdr_authunix_parms)
diff --git a/libc/include/rpc/clnt.h b/libc/include/rpc/clnt.h
index 75d88a65c..d79a6a7b5 100644
--- a/libc/include/rpc/clnt.h
+++ b/libc/include/rpc/clnt.h
@@ -4,44 +4,27 @@
/* Now define the internal interfaces. */
extern int _openchild (const char *command, FILE **fto, FILE **ffrom);
-extern CLIENT *clnt_create_internal (__const char *__host,
- __const u_long __prog,
- __const u_long __vers,
- __const char *__prot) attribute_hidden;
-extern CLIENT *clnttcp_create_internal (struct sockaddr_in *__raddr,
- u_long __prog, u_long __version,
- int *__sockp, u_int __sendsz,
- u_int __recvsz) attribute_hidden;
-extern CLIENT *clntudp_create_internal (struct sockaddr_in *__raddr,
- u_long __program, u_long __version,
- struct timeval __wait_resend,
- int *__sockp) attribute_hidden;
-extern CLIENT *clntudp_bufcreate_internal (struct sockaddr_in *__raddr,
- u_long __program, u_long __version,
- struct timeval __wait_resend,
- int *__sockp, u_int __sendsz,
- u_int __recvsz) attribute_hidden;
extern CLIENT *__libc_clntudp_bufcreate (struct sockaddr_in *__raddr,
u_long __program, u_long __version,
struct timeval __wait_resend,
int *__sockp, u_int __sendsz,
u_int __recvsz, int __flags);
-extern CLIENT *__libc_clntudp_bufcreate_internal (struct sockaddr_in *__raddr,
- u_long __program,
- u_long __version,
- struct timeval __wait_resend,
- int *__sockp, u_int __sendsz,
- u_int __recvsz, int __flags)
- attribute_hidden;
-extern CLIENT *clntunix_create_internal (struct sockaddr_un *__raddr,
- u_long __program, u_long __version,
- int *__sockp, u_int __sendsz,
- u_int __recvsz) attribute_hidden;
libc_hidden_proto (clnt_sperrno)
libc_hidden_proto (clnt_spcreateerror)
libc_hidden_proto (clnt_perror)
libc_hidden_proto (clnt_sperror)
libc_hidden_proto (_rpc_dtablesize)
+libc_hidden_proto (callrpc)
+libc_hidden_proto (clnt_create)
+libc_hidden_proto (clnt_pcreateerror)
+libc_hidden_proto (clnt_perrno)
+libc_hidden_proto (clntraw_create)
+libc_hidden_proto (clnttcp_create)
+libc_hidden_proto (clntudp_bufcreate)
+libc_hidden_proto (clntudp_create)
+libc_hidden_proto (get_myaddress)
+libc_hidden_proto (clntunix_create)
+libc_hidden_proto (__libc_clntudp_bufcreate)
#endif
diff --git a/libc/include/rpc/des_crypt.h b/libc/include/rpc/des_crypt.h
index 8c4a60ece..44f7e669b 100644
--- a/libc/include/rpc/des_crypt.h
+++ b/libc/include/rpc/des_crypt.h
@@ -9,5 +9,7 @@ extern int xdecrypt (char *secret, char *passwd);
libc_hidden_proto (des_setparity)
libc_hidden_proto (ecb_crypt)
libc_hidden_proto (cbc_crypt)
+libc_hidden_proto (xencrypt)
+libc_hidden_proto (xdecrypt)
#endif
diff --git a/libc/include/rpc/key_prot.h b/libc/include/rpc/key_prot.h
index 2da5de7f7..29d14cc8a 100644
--- a/libc/include/rpc/key_prot.h
+++ b/libc/include/rpc/key_prot.h
@@ -1,15 +1,12 @@
#include <sunrpc/rpc/key_prot.h>
-extern bool_t xdr_cryptkeyres_internal (XDR *xdrs, cryptkeyres *objp)
- attribute_hidden;
-extern bool_t xdr_keystatus_internal (XDR *, keystatus*) attribute_hidden;
-extern bool_t xdr_keybuf_internal (XDR *, keybuf) attribute_hidden;
-extern bool_t xdr_cryptkeyarg_internal (XDR *, cryptkeyarg*) attribute_hidden;
-extern bool_t xdr_cryptkeyarg2_internal (XDR *, cryptkeyarg2*)
- attribute_hidden;
-extern bool_t xdr_key_netstres_internal (XDR *, key_netstres*)
- attribute_hidden;
-extern bool_t xdr_key_netstarg_internal (XDR *, key_netstarg*)
- attribute_hidden;
-extern bool_t xdr_netnamestr_internal (XDR *, netnamestr*) attribute_hidden;
-extern bool_t xdr_unixcred_internal (XDR *, unixcred*) attribute_hidden;
+libc_hidden_proto (xdr_cryptkeyarg)
+libc_hidden_proto (xdr_cryptkeyarg2)
+libc_hidden_proto (xdr_cryptkeyres)
+libc_hidden_proto (xdr_key_netstarg)
+libc_hidden_proto (xdr_key_netstres)
+libc_hidden_proto (xdr_keybuf)
+libc_hidden_proto (xdr_keystatus)
+libc_hidden_proto (xdr_getcredres)
+libc_hidden_proto (xdr_netnamestr)
+libc_hidden_proto (xdr_unixcred)
diff --git a/libc/include/rpc/pmap_clnt.h b/libc/include/rpc/pmap_clnt.h
index b9a7063bb..67628e058 100644
--- a/libc/include/rpc/pmap_clnt.h
+++ b/libc/include/rpc/pmap_clnt.h
@@ -14,4 +14,8 @@ extern u_short __libc_rpc_getport (struct sockaddr_in *address, u_long program,
internal_function;
libc_hidden_proto (__libc_rpc_getport)
+libc_hidden_proto (clnt_broadcast)
+libc_hidden_proto (pmap_getmaps)
+libc_hidden_proto (pmap_rmtcall)
+
#endif
diff --git a/libc/include/rpc/pmap_prot.h b/libc/include/rpc/pmap_prot.h
index 902faba01..2e9076ee3 100644
--- a/libc/include/rpc/pmap_prot.h
+++ b/libc/include/rpc/pmap_prot.h
@@ -1,7 +1,4 @@
#include <sunrpc/rpc/pmap_prot.h>
-
-extern bool_t xdr_pmap_internal (XDR *__xdrs, struct pmap *__regs)
- attribute_hidden;
-extern bool_t xdr_pmaplist_internal (XDR *__xdrs, struct pmaplist **__rp)
- attribute_hidden;
+libc_hidden_proto (xdr_pmap)
+libc_hidden_proto (xdr_pmaplist)
diff --git a/libc/include/rpc/pmap_rmt.h b/libc/include/rpc/pmap_rmt.h
index 63e41cab2..e8822dabe 100644
--- a/libc/include/rpc/pmap_rmt.h
+++ b/libc/include/rpc/pmap_rmt.h
@@ -1,7 +1,4 @@
#include <sunrpc/rpc/pmap_rmt.h>
-extern bool_t xdr_rmtcall_args_internal (XDR *__xdrs,
- struct rmtcallargs *__crp)
- attribute_hidden;
-extern bool_t xdr_rmtcallres_internal (XDR *__xdrs, struct rmtcallres *__crp)
- attribute_hidden;
+libc_hidden_proto (xdr_rmtcall_args)
+libc_hidden_proto (xdr_rmtcallres)
diff --git a/libc/include/rpc/rpc_msg.h b/libc/include/rpc/rpc_msg.h
index 3e518c93d..be1f4838c 100644
--- a/libc/include/rpc/rpc_msg.h
+++ b/libc/include/rpc/rpc_msg.h
@@ -7,8 +7,11 @@ libc_hidden_proto (_seterr_reply)
extern bool_t xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr);
extern bool_t xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar);
-extern bool_t xdr_callmsg_internal (XDR *__xdrs, struct rpc_msg *__cmsg);
-extern bool_t xdr_callhdr_internal (XDR *__xdrs, struct rpc_msg *__cmsg);
-extern bool_t xdr_replymsg_internal (XDR *__xdrs, struct rpc_msg *__rmsg);
+
+libc_hidden_proto (xdr_accepted_reply)
+libc_hidden_proto (xdr_callhdr)
+libc_hidden_proto (xdr_callmsg)
+libc_hidden_proto (xdr_rejected_reply)
+libc_hidden_proto (xdr_replymsg)
#endif
diff --git a/libc/include/rpc/svc.h b/libc/include/rpc/svc.h
index dc758391a..141971ecf 100644
--- a/libc/include/rpc/svc.h
+++ b/libc/include/rpc/svc.h
@@ -10,24 +10,29 @@ libc_hidden_proto (svcerr_noprog)
libc_hidden_proto (svcerr_progvers)
/* Now define the internal interfaces. */
-extern int registerrpc (u_long prognum, u_long versnum, u_long procnum,
- char *(*progname) (char *), xdrproc_t inproc,
- xdrproc_t outproc);
-
extern SVCXPRT *svcfd_create (int fd, u_int sendsize, u_int recvsize);
extern int svcudp_enablecache (SVCXPRT *transp, u_long size);
extern SVCXPRT *svcunixfd_create (int fd, u_int sendsize, u_int recvsize);
-extern bool_t svc_sendreply_internal (SVCXPRT *xprt, xdrproc_t __xdr_results,
- caddr_t __xdr_location) attribute_hidden;
-extern void svcerr_decode_internal (SVCXPRT *__xprt) attribute_hidden;
-extern void svc_getreq_internal (int __rdfds) attribute_hidden;
-extern void svc_getreq_common_internal (const int __fd) attribute_hidden;
-extern void svc_getreqset_internal (fd_set *__readfds) attribute_hidden;
-extern void svc_getreq_poll_internal (struct pollfd *,
- const int) attribute_hidden;
-extern SVCXPRT *svcudp_create_internal (int __sock) attribute_hidden;
-extern SVCXPRT *svcudp_bufcreate_internal (int __sock, u_int __sendsz,
- u_int __recvsz) attribute_hidden;
+
+libc_hidden_proto (svc_exit)
+libc_hidden_proto (svc_getreq)
+libc_hidden_proto (svc_getreqset)
+libc_hidden_proto (svc_run)
+libc_hidden_proto (svc_sendreply)
+libc_hidden_proto (svcerr_decode)
+libc_hidden_proto (svcerr_noproc)
+libc_hidden_proto (svcerr_systemerr)
+libc_hidden_proto (svcerr_weakauth)
+libc_hidden_proto (svcfd_create)
+libc_hidden_proto (svcraw_create)
+libc_hidden_proto (svctcp_create)
+libc_hidden_proto (svcudp_bufcreate)
+libc_hidden_proto (svcudp_create)
+libc_hidden_proto (svcudp_enablecache)
+libc_hidden_proto (svcunix_create)
+libc_hidden_proto (svcunixfd_create)
+libc_hidden_proto (svc_getreq_common)
+libc_hidden_proto (svc_getreq_poll)
#endif
diff --git a/libc/include/rpc/svc_auth.h b/libc/include/rpc/svc_auth.h
index bf5ce91b6..582bb31ae 100644
--- a/libc/include/rpc/svc_auth.h
+++ b/libc/include/rpc/svc_auth.h
@@ -6,7 +6,7 @@ extern enum auth_stat _svcauth_unix (struct svc_req *rqst,
struct rpc_msg *msg);
extern enum auth_stat _svcauth_short (struct svc_req *rqst,
struct rpc_msg *msg);
-extern enum auth_stat _authenticate_internal (struct svc_req *__rqst,
- struct rpc_msg *__msg) attribute_hidden;
+
+libc_hidden_proto (_authenticate)
#endif
diff --git a/libc/include/rpc/xdr.h b/libc/include/rpc/xdr.h
index e10d53e3b..57971d075 100644
--- a/libc/include/rpc/xdr.h
+++ b/libc/include/rpc/xdr.h
@@ -1,54 +1,47 @@
#include <sunrpc/rpc/xdr.h>
-extern bool_t xdr_void_internal (void) attribute_hidden;
-extern bool_t xdr_bool_internal (XDR *__xdrs, bool_t *__bp) attribute_hidden;
-extern bool_t xdr_u_hyper_internal (XDR *__xdrs, u_quad_t *__ullp)
- attribute_hidden;
-extern bool_t xdr_u_long_internal (XDR *__xdrs, u_long *__ulp)
- attribute_hidden;
-extern bool_t xdr_u_int_internal (XDR *__xdrs, u_int *__up)
- attribute_hidden;
-extern bool_t xdr_u_short_internal (XDR *__xdrs, u_short *__usp)
- attribute_hidden;
-extern bool_t xdr_hyper_internal (XDR *__xdrs, quad_t *__ullp)
- attribute_hidden;
-extern bool_t xdr_long_internal (XDR *__xdrs, long *__ulp)
- attribute_hidden;
-extern bool_t xdr_int_internal (XDR *__xdrs, int *__up)
- attribute_hidden;
-extern bool_t xdr_short_internal (XDR *__xdrs, short *__usp)
- attribute_hidden;
-extern bool_t xdr_enum_internal (XDR *__xdrs, enum_t *__ep)
- attribute_hidden;
-extern bool_t xdr_union_internal (XDR *__xdrs, enum_t *__dscmp, char *__unp,
- const struct xdr_discrim *choices,
- xdrproc_t dfault) attribute_hidden;
-extern bool_t xdr_string_internal (XDR *__xdrs, char **__cpp, u_int __maxsize);
-extern bool_t xdr_array_internal (XDR * _xdrs, caddr_t *__addrp,
- u_int *__sizep, u_int __maxsize,
- u_int __elsize, xdrproc_t __elproc)
- attribute_hidden;
-extern bool_t xdr_reference_internal (XDR *__xdrs, caddr_t *__xpp,
- u_int __size, xdrproc_t __proc)
- attribute_hidden;
-extern bool_t xdr_bytes_internal (XDR *xdrs, char **cpp, u_int *sizep,
- u_int maxsize) attribute_hidden;
-extern bool_t xdr_netobj_internal (XDR *__xdrs, struct netobj *__np)
- attribute_hidden;
-extern bool_t xdr_opaque_internal (XDR *__xdrs, caddr_t __cp, u_int __cnt)
- attribute_hidden;
-extern void xdrrec_create_internal (XDR *__xdrs, u_int __sendsize,
- u_int __recvsize, caddr_t __tcp_handle,
- int (*__readit) (char *, char *, int),
- int (*__writeit) (char *, char *, int))
- attribute_hidden;
-extern void xdrmem_create_internal (XDR *, const caddr_t, u_int, enum xdr_op)
- attribute_hidden;
-extern bool_t xdrrec_endofrecord_internal (XDR *__xdrs, bool_t __sendnow)
- attribute_hidden;
-extern bool_t xdrrec_skiprecord_internal (XDR *__xdrs)
- attribute_hidden;
-extern bool_t xdrrec_eof_internal (XDR *__xdrs)
- attribute_hidden;
-
libc_hidden_proto (xdrstdio_create)
+libc_hidden_proto (xdr_array)
+libc_hidden_proto (xdr_bool)
+libc_hidden_proto (xdr_bytes)
+libc_hidden_proto (xdr_char)
+libc_hidden_proto (xdr_double)
+libc_hidden_proto (xdr_enum)
+libc_hidden_proto (xdr_float)
+libc_hidden_proto (xdr_free)
+libc_hidden_proto (xdr_int)
+libc_hidden_proto (xdr_long)
+libc_hidden_proto (xdr_netobj)
+libc_hidden_proto (xdr_opaque)
+libc_hidden_proto (xdr_pointer)
+libc_hidden_proto (xdr_reference)
+libc_hidden_proto (xdr_short)
+libc_hidden_proto (xdr_string)
+libc_hidden_proto (xdr_u_char)
+libc_hidden_proto (xdr_u_int)
+libc_hidden_proto (xdr_u_long)
+libc_hidden_proto (xdr_u_short)
+libc_hidden_proto (xdr_union)
+libc_hidden_proto (xdr_vector)
+libc_hidden_proto (xdr_void)
+libc_hidden_proto (xdr_wrapstring)
+libc_hidden_proto (xdrmem_create)
+libc_hidden_proto (xdrrec_create)
+libc_hidden_proto (xdrrec_endofrecord)
+libc_hidden_proto (xdrrec_eof)
+libc_hidden_proto (xdrrec_skiprecord)
+libc_hidden_proto (xdr_int16_t)
+libc_hidden_proto (xdr_int32_t)
+libc_hidden_proto (xdr_int8_t)
+libc_hidden_proto (xdr_sizeof)
+libc_hidden_proto (xdr_uint16_t)
+libc_hidden_proto (xdr_uint32_t)
+libc_hidden_proto (xdr_uint8_t)
+libc_hidden_proto (xdr_hyper)
+libc_hidden_proto (xdr_u_hyper)
+libc_hidden_proto (xdr_longlong_t)
+libc_hidden_proto (xdr_u_longlong_t)
+libc_hidden_proto (xdr_int64_t)
+libc_hidden_proto (xdr_uint64_t)
+libc_hidden_proto (xdr_quad_t)
+libc_hidden_proto (xdr_u_quad_t)
diff --git a/libc/inet/getnameinfo.c b/libc/inet/getnameinfo.c
index db6b5c7ee..6fb6ad6e1 100644
--- a/libc/inet/getnameinfo.c
+++ b/libc/inet/getnameinfo.c
@@ -159,7 +159,7 @@ nrl_domainname (void)
int
getnameinfo (const struct sockaddr *sa, socklen_t addrlen, char *host,
socklen_t hostlen, char *serv, socklen_t servlen,
- unsigned int flags)
+ int flags)
{
int serrno = errno;
int tmpbuflen = 1024;
@@ -385,7 +385,7 @@ getnameinfo (const struct sockaddr *sa, socklen_t addrlen, char *host,
break;
default:
- return EAI_FAMILY;
+ return EAI_FAMILY;
}
if (serv && (servlen > 0))
diff --git a/libc/io/fchmod.c b/libc/io/fchmod.c
index 4b5eacb3e..ce79daa33 100644
--- a/libc/io/fchmod.c
+++ b/libc/io/fchmod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996, 1997, 2011 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
@@ -21,7 +21,7 @@
#include <sys/stat.h>
#include <sys/types.h>
-/* Change the protections of the file FD refers to to MODE. */
+/* Change the permissions of the file referenced by FD to MODE. */
int
__fchmod (fd, mode)
int fd;
diff --git a/libc/libio/fileops.c b/libc/libio/fileops.c
index d2bcfd7d6..9b03a9c55 100644
--- a/libc/libio/fileops.c
+++ b/libc/libio/fileops.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997-2005, 2006, 2007, 2008, 2009
+/* Copyright (C) 1993, 1995, 1997-2005, 2006, 2007, 2008, 2009, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Per Bothner <bothner@cygnus.com>.
@@ -291,7 +291,7 @@ _IO_new_file_fopen (fp, filename, mode, is32not64)
#ifdef _LIBC
last_recognized = mode;
#endif
- for (i = 1; i < 6; ++i)
+ for (i = 1; i < 7; ++i)
{
switch (*++mode)
{
@@ -515,7 +515,7 @@ new_do_write (fp, data, to_do)
if (fp->_flags & _IO_IS_APPENDING)
/* On a system without a proper O_APPEND implementation,
you would need to sys_seek(0, SEEK_END) here, but is
- is not needed nor desirable for Unix- or Posix-like systems.
+ not needed nor desirable for Unix- or Posix-like systems.
Instead, just indicate that offset (before and after) is
unpredictable. */
fp->_offset = _IO_pos_BAD;
@@ -1005,18 +1005,18 @@ _IO_new_file_seekoff (fp, offset, dir, mode)
/* Adjust for read-ahead (bytes is buffer). */
offset -= fp->_IO_read_end - fp->_IO_read_ptr;
if (fp->_offset == _IO_pos_BAD)
- {
- if (mode != 0)
- goto dumb;
- else
- {
- result = _IO_SYSSEEK (fp, 0, dir);
- if (result == EOF)
- return result;
-
- fp->_offset = result;
- }
- }
+ {
+ if (mode != 0)
+ goto dumb;
+ else
+ {
+ result = _IO_SYSSEEK (fp, 0, dir);
+ if (result == EOF)
+ return result;
+
+ fp->_offset = result;
+ }
+ }
/* Make offset absolute, assuming current pointer is file_ptr(). */
offset += fp->_offset;
if (offset < 0)
@@ -1117,7 +1117,7 @@ resync:
/* We need to do it since it is possible that the file offset in
the kernel may be changed behind our back. It may happen when
we fopen a file and then do a fork. One process may access the
- the file and the kernel file offset will be changed. */
+ file and the kernel file offset will be changed. */
if (fp->_offset >= 0)
_IO_SYSSEEK (fp, fp->_offset, 0);
@@ -1278,7 +1278,7 @@ _IO_new_file_write (f, data, n)
{
f->_flags |= _IO_ERR_SEEN;
break;
- }
+ }
to_do -= count;
data = (void *) ((char *) data + count);
}
@@ -1366,12 +1366,12 @@ _IO_new_file_xsputn (f, data, n)
do_write = to_do - (block_size >= 128 ? to_do % block_size : 0);
if (do_write)
- {
+ {
count = new_do_write (f, s, do_write);
to_do -= count;
if (count < do_write)
return n - to_do;
- }
+ }
/* Now write out the remainder. Normally, this will fit in the
buffer, but it's somewhat messier for line-buffered files,
diff --git a/libc/libio/oldfileops.c b/libc/libio/oldfileops.c
index 3bd0aa175..be99a2500 100644
--- a/libc/libio/oldfileops.c
+++ b/libc/libio/oldfileops.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997-2004, 2005, 2007
+/* Copyright (C) 1993, 1995, 1997-2004, 2005, 2007, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Per Bothner <bothner@cygnus.com>.
@@ -299,7 +299,7 @@ old_do_write (fp, data, to_do)
if (fp->_flags & _IO_IS_APPENDING)
/* On a system without a proper O_APPEND implementation,
you would need to sys_seek(0, SEEK_END) here, but is
- is not needed nor desirable for Unix- or Posix-like systems.
+ not needed nor desirable for Unix- or Posix-like systems.
Instead, just indicate that offset (before and after) is
unpredictable. */
fp->_old_offset = _IO_pos_BAD;
@@ -654,7 +654,7 @@ resync:
/* We need to do it since it is possible that the file offset in
the kernel may be changed behind our back. It may happen when
we fopen a file and then do a fork. One process may access the
- the file and the kernel file offset will be changed. */
+ file and the kernel file offset will be changed. */
if (fp->_old_offset >= 0)
_IO_SYSSEEK (fp, fp->_old_offset, 0);
diff --git a/libc/libio/wfileops.c b/libc/libio/wfileops.c
index 503d341a9..386b06b79 100644
--- a/libc/libio/wfileops.c
+++ b/libc/libio/wfileops.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993,1995,1997-2004,2006,2009 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1995,1997-2004,2006,2009,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper <drepper@cygnus.com>.
Based on the single byte version by Per Bothner <bothner@cygnus.com>.
@@ -759,7 +759,7 @@ resync:
/* We need to do it since it is possible that the file offset in
the kernel may be changed behind our back. It may happen when
we fopen a file and then do a fork. One process may access the
- the file and the kernel file offset will be changed. */
+ file and the kernel file offset will be changed. */
if (fp->_offset >= 0)
_IO_SYSSEEK (fp, fp->_offset, 0);
diff --git a/libc/locale/programs/ld-collate.c b/libc/locale/programs/ld-collate.c
index e60f25a66..573572c11 100644
--- a/libc/locale/programs/ld-collate.c
+++ b/libc/locale/programs/ld-collate.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2003, 2005-2008, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2003, 2005-2008, 2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
@@ -2454,7 +2454,7 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap,
elem_table[idx * 2] = hash;
elem_table[idx * 2 + 1] = obstack_object_size (&extrapool);
- /* The the string itself including length. */
+ /* The string itself including length. */
obstack_1grow (&extrapool, namelen);
obstack_grow (&extrapool, runp->name, namelen);
diff --git a/libc/malloc/malloc.c b/libc/malloc/malloc.c
index 3e06b8755..dccb6cc4f 100644
--- a/libc/malloc/malloc.c
+++ b/libc/malloc/malloc.c
@@ -1,5 +1,5 @@
/* Malloc implementation for multiple threads without lock contention.
- Copyright (C) 1996-2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1996-2009, 2010, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@malloc.de>
and Doug Lea <dl@cs.oswego.edu>, 2001.
@@ -2774,7 +2774,7 @@ mstate av; mchunkptr p; INTERNAL_SIZE_T s;
always true of any allocated chunk; i.e., that each allocated
chunk borders either a previously allocated and still in-use
chunk, or the base of its memory arena. This is ensured
- by making all allocations from the the `lowest' part of any found
+ by making all allocations from the `lowest' part of any found
chunk. This does not necessarily hold however for chunks
recycled via fastbins.
*/
diff --git a/libc/manual/stdio.texi b/libc/manual/stdio.texi
index 9fb209a47..0a70b04d7 100644
--- a/libc/manual/stdio.texi
+++ b/libc/manual/stdio.texi
@@ -4329,7 +4329,7 @@ the same file position.
@item
In a call to @code{fseek} or @code{fseeko} on a text stream, either the
@var{offset} must be zero, or @var{whence} must be @code{SEEK_SET} and
-and the @var{offset} must be the result of an earlier call to @code{ftell}
+the @var{offset} must be the result of an earlier call to @code{ftell}
on the same stream.
@item
diff --git a/libc/misc/fchflags.c b/libc/misc/fchflags.c
index f191194c1..9e252a8d0 100644
--- a/libc/misc/fchflags.c
+++ b/libc/misc/fchflags.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 2004, 2011 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
@@ -20,7 +20,7 @@
#include <stddef.h>
#include <sys/stat.h>
-/* Change the flags of the file FD refers to to FLAGS. */
+/* Change the flags of the file referenced by FD to FLAGS. */
int fchflags (int fd, int flags) __THROW;
diff --git a/libc/misc/ftruncate.c b/libc/misc/ftruncate.c
index d4cca2e26..e3406af04 100644
--- a/libc/misc/ftruncate.c
+++ b/libc/misc/ftruncate.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 1998, 2011 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
@@ -20,7 +20,7 @@
#include <sys/types.h>
#include <unistd.h>
-/* Truncate the file FD refers to to LENGTH bytes. */
+/* Truncate the file referenced by FD to LENGTH bytes. */
int
__ftruncate (fd, length)
int fd;
diff --git a/libc/misc/ftruncate64.c b/libc/misc/ftruncate64.c
index df84b7c3c..a699aed35 100644
--- a/libc/misc/ftruncate64.c
+++ b/libc/misc/ftruncate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2001, 2011 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
@@ -20,7 +20,7 @@
#include <errno.h>
#include <unistd.h>
-/* Truncate the file FD refers to to LENGTH bytes. */
+/* Truncate the file referenced by FD to LENGTH bytes. */
int
__ftruncate64 (fd, length)
int fd;
diff --git a/libc/misc/tst-efgcvt.c b/libc/misc/tst-efgcvt.c
index 632015aed..2b79f2cce 100644
--- a/libc/misc/tst-efgcvt.c
+++ b/libc/misc/tst-efgcvt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2004, 2011 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
@@ -184,7 +184,7 @@ special (void)
(void) ecvt (123.456, 10000, &decpt, &sign);
(void) fcvt (123.456, 10000, &decpt, &sign);
- /* Some tests for for the reentrant functions. */
+ /* Some tests for the reentrant functions. */
/* Use a too small buffer. */
res = ecvt_r (123.456, 10, &decpt, &sign, buf, 1);
if (res == 0)
diff --git a/libc/nis/Makefile b/libc/nis/Makefile
index b0ff354a7..35615d3b0 100644
--- a/libc/nis/Makefile
+++ b/libc/nis/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1996,1997,1998,2001,2004,2006 Free Software Foundation, Inc.
+# Copyright (C) 1996-1998,2001,2004,2006,2011 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -54,9 +54,9 @@ subdir-dirs = $(services-y:%=nss_%)
vpath %.c $(subdir-dirs)
libnsl-routines = yp_xdr ypclnt ypupdate_xdr \
- nis_subr nis_local_names nis_free nis_file \
- nis_print nis_error nis_call nis_lookup\
- nis_table nis_xdr nis_server nis_ping \
+ nis_subr nis_local_names nis_free nis_file \
+ nis_print nis_error nis_call nis_lookup\
+ nis_table nis_xdr nis_server nis_ping \
nis_checkpoint nis_mkdir nis_rmdir nis_getservlist\
nis_verifygroup nis_ismember nis_addmember nis_util\
nis_removemember nis_creategroup nis_destroygroup\
@@ -87,8 +87,9 @@ $(objpfx)libnss_nisplus.so: $(objpfx)libnsl.so$(libnsl.so-version)
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
# This ensures they will load libc.so for needed symbols if loaded by
# a statically-linked program that hasn't already loaded it.
+libnsl-libc = $(common-objpfx)linkobj/libc.so
$(services-y:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: \
- $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
+ $(libnsl-libc) $(common-objpfx)libc_nonshared.a
ifeq ($(build-shared),yes)
diff --git a/libc/nptl/ChangeLog b/libc/nptl/ChangeLog
index 802abcdbc..f99dcfb22 100644
--- a/libc/nptl/ChangeLog
+++ b/libc/nptl/ChangeLog
@@ -1,3 +1,10 @@
+2011-04-10 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #12650]
+ * allocatestack.c (get_cached_stack): Deallocate DTV entries before
+ clearing memory.
+ Patch partly by Robert Rex <robert.rex@exasol.com>.
+
2011-01-19 Roland McGrath <roland@redhat.com>
* pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
diff --git a/libc/nptl/allocatestack.c b/libc/nptl/allocatestack.c
index 831e98e4c..ba251b916 100644
--- a/libc/nptl/allocatestack.c
+++ b/libc/nptl/allocatestack.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2007, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -26,6 +26,7 @@
#include <sys/mman.h>
#include <sys/param.h>
#include <dl-sysdep.h>
+#include <dl-tls.h>
#include <tls.h>
#include <lowlevellock.h>
#include <kernel-features.h>
@@ -241,6 +242,10 @@ get_cached_stack (size_t *sizep, void **memp)
/* Clear the DTV. */
dtv_t *dtv = GET_DTV (TLS_TPADJ (result));
+ for (size_t cnt = 0; cnt < dtv[-1].counter; ++cnt)
+ if (! dtv[1 + cnt].pointer.is_static
+ && dtv[1 + cnt].pointer.val != TLS_DTV_UNALLOCATED)
+ free (dtv[1 + cnt].pointer.val);
memset (dtv, '\0', (dtv[-1].counter + 1) * sizeof (dtv_t));
/* Re-initialize the TLS. */
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/pthread_kill.c b/libc/nptl/sysdeps/unix/sysv/linux/pthread_kill.c
index 75089365c..73434da9d 100644
--- a/libc/nptl/sysdeps/unix/sysv/linux/pthread_kill.c
+++ b/libc/nptl/sysdeps/unix/sysv/linux/pthread_kill.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2006, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -45,7 +45,7 @@ __pthread_kill (threadid, signo)
/* Not a valid thread handle. */
return ESRCH;
- /* Disallow sending the signal we use for cancellation, timers, for
+ /* Disallow sending the signal we use for cancellation, timers,
for the setxid implementation. */
if (signo == SIGCANCEL || signo == SIGTIMER || signo == SIGSETXID)
return EINVAL;
diff --git a/libc/nptl/sysdeps/unix/sysv/linux/pthread_sigqueue.c b/libc/nptl/sysdeps/unix/sysv/linux/pthread_sigqueue.c
index 4440703b6..69f7dcab1 100644
--- a/libc/nptl/sysdeps/unix/sysv/linux/pthread_sigqueue.c
+++ b/libc/nptl/sysdeps/unix/sysv/linux/pthread_sigqueue.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2009.
@@ -49,7 +49,7 @@ pthread_sigqueue (threadid, signo, value)
/* Not a valid thread handle. */
return ESRCH;
- /* Disallow sending the signal we use for cancellation, timers, for
+ /* Disallow sending the signal we use for cancellation, timers,
for the setxid implementation. */
if (signo == SIGCANCEL || signo == SIGTIMER || signo == SIGSETXID)
return EINVAL;
diff --git a/libc/nptl/tst-kill4.c b/libc/nptl/tst-kill4.c
index a1b97e7b2..15626db6b 100644
--- a/libc/nptl/tst-kill4.c
+++ b/libc/nptl/tst-kill4.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2006, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -67,7 +67,7 @@ do_test (void)
/* The following only works because we assume here something about
the implementation. Namely, that the memory allocated for the
- thread descriptor is not going away, that the the TID field is
+ thread descriptor is not going away, that the TID field is
cleared and therefore the signal is sent to process 0, and that
we can savely assume there is no other process with this ID at
that time. */
diff --git a/libc/nscd/connections.c b/libc/nscd/connections.c
index d9878fa59..1e47931bd 100644
--- a/libc/nscd/connections.c
+++ b/libc/nscd/connections.c
@@ -1583,7 +1583,7 @@ nscd_run_prune (void *p)
/* This is the main loop. It is replicated in different threads but
- the the use of the ready list makes sure only one thread handles an
+ the use of the ready list makes sure only one thread handles an
incoming connection. */
static void *
__attribute__ ((__noreturn__))
diff --git a/libc/nscd/selinux.h b/libc/nscd/selinux.h
index 67d981bb0..bc7e1e287 100644
--- a/libc/nscd/selinux.h
+++ b/libc/nscd/selinux.h
@@ -45,7 +45,7 @@ extern void nscd_avc_cache_stats (struct avc_cache_stats *cstats);
extern void nscd_avc_print_stats (struct avc_cache_stats *cstats);
# ifdef HAVE_LIBCAP
-/* Preserve capabilities to connect to connnect to the audit daemon. */
+/* Preserve capabilities to connect to the audit daemon. */
extern cap_t preserve_capabilities (void);
/* Install final capabilities. */
extern void install_real_capabilities (cap_t new_caps);
diff --git a/libc/nss/Makefile b/libc/nss/Makefile
index dc816b156..50aa0b538 100644
--- a/libc/nss/Makefile
+++ b/libc/nss/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1996-1998,2000-2002,2007,2009,2010
+# Copyright (C) 1996-1998,2000-2002,2007,2009,2010,2011
# Free Software Foundation, Inc.
# This file is part of the GNU C Library.
@@ -72,7 +72,7 @@ vpath %.c $(subdir-dirs)
libnss_files-routines := $(addprefix files-,$(databases-y)) \
- files-have_o_cloexec
+ files-initgroups files-have_o_cloexec
distribute += files-XXX.c files-parse.c
@@ -130,7 +130,8 @@ endif
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
# This ensures they will load libc.so for needed symbols if loaded by
# a statically-linked program that hasn't already loaded it.
-$(services:%=$(objpfx)libnss_%.so): $(common-objpfx)libc.so \
+libnss-libc = $(common-objpfx)linkobj/libc.so
+$(services:%=$(objpfx)libnss_%.so): $(libnss-libc) \
$(common-objpfx)libc_nonshared.a
diff --git a/libc/nss/Versions b/libc/nss/Versions
index 7a9d67b42..1c6fd686f 100644
--- a/libc/nss/Versions
+++ b/libc/nss/Versions
@@ -95,5 +95,7 @@ libnss_files {
_nss_netgroup_parseline;
_nss_files_getpublickey;
_nss_files_getsecretkey;
+
+ _nss_files_initgroups_dyn;
}
}
diff --git a/libc/nss/getnssent_r.c b/libc/nss/getnssent_r.c
index c36f6c694..ff9c5bb0e 100644
--- a/libc/nss/getnssent_r.c
+++ b/libc/nss/getnssent_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2004, 2007, 2011 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
@@ -171,7 +171,7 @@ __nss_getent_r (const char *getent_func_name,
status = DL_CALL_FCT (fct.f,
(resbuf, buffer, buflen, &errno, h_errnop));
- /* The the status is NSS_STATUS_TRYAGAIN and errno is ERANGE the
+ /* The status is NSS_STATUS_TRYAGAIN and errno is ERANGE the
provided buffer is too small. In this case we should give
the user the possibility to enlarge the buffer and we should
not simply go on with the next service (even if the TRYAGAIN
diff --git a/libc/nss/nss_files/files-initgroups.c b/libc/nss/nss_files/files-initgroups.c
new file mode 100644
index 000000000..4c7b9f8e6
--- /dev/null
+++ b/libc/nss/nss_files/files-initgroups.c
@@ -0,0 +1,135 @@
+/* Initgroups handling in nss_files module.
+ Copyright (C) 2011 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 <alloca.h>
+#include <errno.h>
+#include <grp.h>
+#include <nss.h>
+#include <stdio_ext.h>
+#include <string.h>
+#include <sys/param.h>
+
+enum nss_status
+_nss_files_initgroups_dyn (const char *user, gid_t group, long int *start,
+ long int *size, gid_t **groupsp, long int limit,
+ int *errnop)
+{
+ FILE *stream = fopen ("/etc/group", "re");
+ if (stream == NULL)
+ {
+ *errnop = errno;
+ return *errnop == ENOMEM ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
+ }
+
+ /* No other thread using this stream. */
+ __fsetlocking (stream, FSETLOCKING_BYCALLER);
+
+ char *line = NULL;
+ size_t linelen = 0;
+ enum nss_status status = NSS_STATUS_SUCCESS;
+
+ size_t buflen = 1024;
+ void *buffer = alloca (buflen);
+ bool buffer_use_malloc = false;
+
+ gid_t *groups = *groupsp;
+
+ /* We have to iterate over the entire file. */
+ while (!feof_unlocked (stream))
+ {
+ ssize_t n = getline (&line, &linelen, stream);
+ if (n < 0)
+ {
+ if (! feof_unlocked (stream))
+ status = ((*errnop = errno) == ENOMEM
+ ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL);
+ break;
+ }
+
+ struct group grp;
+ int res;
+ while ((res = _nss_files_parse_grent (line, &grp, buffer, buflen,
+ errnop)) == -1)
+ {
+ size_t newbuflen = 2 * buflen;
+ if (buffer_use_malloc || ! __libc_use_alloca (buflen + newbuflen))
+ {
+ void *newbuf = realloc (buffer_use_malloc ? buffer : NULL,
+ buflen);
+ if (newbuf == NULL)
+ {
+ *errnop = ENOMEM;
+ status = NSS_STATUS_TRYAGAIN;
+ goto out;
+ }
+ buffer = newbuf;
+ buflen = newbuflen;
+ buffer_use_malloc = true;
+ }
+ else
+ buffer = extend_alloca (buffer, buflen, newbuflen);
+ }
+
+ if (res > 0 && grp.gr_gid != group)
+ for (char **m = grp.gr_mem; *m != NULL; ++m)
+ if (strcmp (*m, user) == 0)
+ {
+ /* Matches user. Insert this group. */
+ if (*start == *size)
+ {
+ /* Need a bigger buffer. */
+ if (limit > 0 && *size == limit)
+ /* We reached the maximum. */
+ goto out;
+
+ long int newsize;
+ if (limit <= 0)
+ newsize = 2 * *size;
+ else
+ newsize = MIN (limit, 2 * *size);
+
+ gid_t *newgroups = realloc (groups,
+ newsize * sizeof (*groups));
+ if (newgroups == NULL)
+ {
+ *errnop = ENOMEM;
+ status = NSS_STATUS_TRYAGAIN;
+ goto out;
+ }
+ *groupsp = groups = newgroups;
+ *size = newsize;
+ }
+
+ groups[*start] = grp.gr_gid;
+ *start += 1;
+
+ break;
+ }
+ }
+
+ out:
+ /* Free memory. */
+ if (buffer_use_malloc)
+ free (buffer);
+ free (line);
+
+ fclose (stream);
+
+ return status;
+}
diff --git a/libc/nss/nsswitch.conf b/libc/nss/nsswitch.conf
index 4d2a76376..73736a61a 100644
--- a/libc/nss/nsswitch.conf
+++ b/libc/nss/nsswitch.conf
@@ -5,6 +5,7 @@
passwd: db files
group: db files
+initgroups: db files
shadow: db files
gshadow: files
diff --git a/libc/po/ru.po b/libc/po/ru.po
index 0ee25d7bc..a36acaaf8 100644
--- a/libc/po/ru.po
+++ b/libc/po/ru.po
@@ -7,19 +7,20 @@
# Oleg Tihonov <ost@tatnipi.ru>, 2005, 2007.
# Dimitriy Ryazantcev <DJm00n@mail.ru>, 2009.
# Pavel Maryanov <acid_jack@ukr.net>, 2009.
-# Yuri Kozlov <yuray@komyakino.ru>, 2009.
+# Yuri Kozlov <yuray@komyakino.ru>, 2009, 2011.
msgid ""
msgstr ""
-"Project-Id-Version: libc 2.9.90\n"
+"Project-Id-Version: libc 2.11.1\n"
"POT-Creation-Date: 2009-02-06 12:40-0800\n"
-"PO-Revision-Date: 2009-03-07 09:59+0300\n"
+"PO-Revision-Date: 2011-04-18 21:17+0400\n"
"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
"Language-Team: Russian <gnu@mx.ru>\n"
+"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-"X-Generator: KBabel 1.11.4\n"
+"X-Generator: Lokalize 1.0\n"
#: argp/argp-help.c:228
#, c-format
@@ -267,7 +268,7 @@ msgstr "невозможно определить знак выхода"
#: debug/pcprofiledump.c:53
msgid "Don't buffer output"
-msgstr "Ðе буферировать вывод"
+msgstr "Ðе буферизировать вывод"
#: debug/pcprofiledump.c:58
msgid "Dump information generated by PC profiling."
@@ -409,17 +410,17 @@ msgstr "Ðевозможно Ñоздать временный кÑш-файл %
#: elf/cache.c:411 elf/cache.c:421 elf/cache.c:425 elf/cache.c:430
#, c-format
msgid "Writing of cache data failed"
-msgstr "ЗапиÑÑŒ данных кÑша неуÑпешна"
+msgstr "ЗапиÑÑŒ данных кÑша завершилаÑÑŒ неудачно"
#: elf/cache.c:435
#, c-format
msgid "Changing access rights of %s to %#o failed"
-msgstr "Изменение прав доÑтупа Ð´Ð»Ñ %s на %#o неуÑпешно"
+msgstr "Изменение прав доÑтупа Ð´Ð»Ñ %s на %#o завершилоÑÑŒ неудачно"
#: elf/cache.c:440
#, c-format
msgid "Renaming of %s to %s failed"
-msgstr "Переименование %s в %s неуÑпешно"
+msgstr "Переименование %s в %s завершилоÑÑŒ неудачно"
#: elf/dl-close.c:378 elf/dl-open.c:460
msgid "cannot create scope list"
@@ -794,7 +795,7 @@ msgstr "Ðевозможно Ñоздать ÑÑылку Ñ %s на %s"
#: elf/ldconfig.c:519
msgid " (changed)\n"
-msgstr " (именено)\n"
+msgstr " (изменено)\n"
#: elf/ldconfig.c:521
msgid " (SKIPPED)\n"
@@ -1112,12 +1113,12 @@ msgstr "Сбой повторного Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ñ€Ð°Ð·Ð´ÐµÐ»Ñемого
#: elf/sprof.c:555 elf/sprof.c:649
#, c-format
msgid "reading of section headers failed"
-msgstr "чтение заголовков Ñекции неуÑпешно"
+msgstr "чтение заголовков Ñекции завершилоÑÑŒ неудачно"
#: elf/sprof.c:563 elf/sprof.c:657
#, c-format
msgid "reading of section header string table failed"
-msgstr "чтение Ñтроки заголовка Ñекции неуÑпешно"
+msgstr "чтение Ñтроки заголовка Ñекции завершилоÑÑŒ неудачно"
#: elf/sprof.c:589
#, c-format
@@ -1132,7 +1133,7 @@ msgstr "невозможно определить Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°"
#: elf/sprof.c:642
#, c-format
msgid "reading of ELF header failed"
-msgstr "Ñчитывание заголовка ELF неуÑпешно"
+msgstr "Ñчитывание заголовка ELF завершилоÑÑŒ неудачно"
#: elf/sprof.c:678
#, c-format
@@ -1237,7 +1238,7 @@ msgstr "перечиÑлить вÑе извеÑтные вÑтроенные к
#: iconv/iconv_prog.c:65 locale/programs/localedef.c:127
msgid "Output control:"
-msgstr "УÑправление выводом:"
+msgstr "Управление выводом:"
#: iconv/iconv_prog.c:66
msgid "omit invalid characters from output"
@@ -1412,7 +1413,7 @@ msgstr "rcmd: %s: неполное чтение"
#: inet/rcmd.c:481
msgid "lstat failed"
-msgstr "lstat неуÑпешна"
+msgstr "lstat завершилÑÑ Ð½ÐµÑƒÐ´Ð°Ñ‡Ð½Ð¾"
#: inet/rcmd.c:488
msgid "cannot open"
@@ -1420,7 +1421,7 @@ msgstr "невозможно открыть"
#: inet/rcmd.c:490
msgid "fstat failed"
-msgstr "fstat неуÑпешна"
+msgstr "fstat завершилÑÑ Ð½ÐµÑƒÐ´Ð°Ñ‡Ð½Ð¾"
#: inet/rcmd.c:492
msgid "bad owner"
@@ -1444,7 +1445,7 @@ msgstr "Ошибка: файл .netrc может запиÑыватьÑÑ Ð´Ñ€Ñƒ
#: inet/ruserpass.c:185
msgid "Remove password or make file unreadable by others."
-msgstr "Удалите пароль или Ñделайте файл нечитаемым другими."
+msgstr "Удалите пароль или Ñделайте файл недоÑтупным Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð´Ñ€ÑƒÐ³Ð¸Ð¼Ð¸."
#: inet/ruserpass.c:277
#, c-format
@@ -1606,7 +1607,7 @@ msgstr "недопуÑтимые имена Ð´Ð»Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½Ð° знако
#: locale/programs/charmap.c:1005 locale/programs/repertoire.c:431
msgid "hexadecimal range format should use only capital characters"
-msgstr "в шеÑтнадцатиричном формате диапазона Ñледует иÑпользовать только заглавные буквы"
+msgstr "в шеÑтнадцатеричном формате диапазона Ñледует иÑпользовать только заглавные буквы"
#: locale/programs/charmap.c:1023 locale/programs/repertoire.c:449
#, c-format
@@ -1897,7 +1898,7 @@ msgstr "%s: неизвеÑтный знак в имени определениÑ
#: locale/programs/ld-collate.c:3164
#, c-format
msgid "%s: unknown character in equivalent definition value"
-msgstr "%s: неизвеÑтный знак в значении Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð°Ñ ÑквивалентноÑти"
+msgstr "%s: неизвеÑтный знак в Ñквиваленте определÑемого значениÑ"
#: locale/programs/ld-collate.c:3174
#, c-format
@@ -2128,7 +2129,7 @@ msgstr "Ñ Ñимвольными именами значений диапазо
#: locale/programs/ld-ctype.c:2517
msgid "with UCS range values one must use the hexadecimal symbolic ellipsis `..'"
-msgstr "Ñ UCS-значениÑми диапазона Ñледует иÑпользовать шеÑтнадцатиричный Ñимвольный ÑллипÑÐ¸Ñ Â«..»"
+msgstr "Ñ UCS-значениÑми диапазона Ñледует иÑпользовать шеÑтнадцатеричный Ñимвольный ÑллипÑÐ¸Ñ Â«..»"
#: locale/programs/ld-ctype.c:2531
msgid "with character code range values one must use the absolute ellipsis `...'"
@@ -2175,7 +2176,7 @@ msgstr "%s: знак «%s» не определен, Ñ…Ð¾Ñ‚Ñ Ð¾Ð½ нужен к
#: locale/programs/ld-ctype.c:3297 locale/programs/ld-ctype.c:3364
#, c-format
msgid "%s: character `%s' in charmap not representable with one byte"
-msgstr "%s: знак «%s» в отображении знаков непредÑтавим одним байтом"
+msgstr "%s: знак «%s» в отображении знаков не предÑтавим одним байтом"
#: locale/programs/ld-ctype.c:3408 locale/programs/ld-ctype.c:3433
#, c-format
@@ -2384,7 +2385,7 @@ msgstr "Ð½ÐµÐ·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ð°Ñ Ñтрока"
#: locale/programs/linereader.c:669
msgid "non-symbolic character value should not be used"
-msgstr "не Ñтоит иÑпользовать неÑимвольное знаковое значение"
+msgstr "не Ñтоит иÑпользовать не Ñимвольное знаковое значение"
#: locale/programs/linereader.c:816
#, c-format
@@ -2688,7 +2689,7 @@ msgstr "Добавление %s\n"
#: locale/programs/locarchive.c:1148
#, c-format
msgid "stat of \"%s\" failed: %s: ignored"
-msgstr "Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ stat Ð´Ð»Ñ Â«%s» неуÑпешна: %s: игнорировано"
+msgstr "Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ stat Ð´Ð»Ñ Â«%s» завершилаÑÑŒ неудачно: %s: игнорировано"
#: locale/programs/locarchive.c:1154
#, c-format
@@ -2788,7 +2789,7 @@ msgid ""
"\n"
"%s"
msgstr ""
-"Владелец уÑтанавлен в текущего пользователÑ, группа уÑтанавлена в «%s», права доÑтупа уÑтанавлены в «%o».\n"
+"Владелец уÑтановлен в текущего пользователÑ, группа уÑтановлена в «%s», права доÑтупа уÑтановлены в «%o».\n"
"\n"
"%s"
@@ -3092,7 +3093,7 @@ msgstr "Переданный объект не того же типа, что о
#: nis/nis_error.h:36
msgid "Modify operation failed"
-msgstr "ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð¼Ð¾Ð´Ð¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ð¸ неуÑпешна"
+msgstr "ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð¿Ð¾ изменению завершилаÑÑŒ неудачно"
#: nis/nis_error.h:37
msgid "Query illegal for named table"
@@ -3112,7 +3113,7 @@ msgstr "Ð”Ð»Ñ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ð° требуетÑÑ Ð¿Ð¾Ð»Ð½Ð°Ñ Ñ€ÐµÑинхро
#: nis/nis_error.h:41
msgid "NIS+ operation failed"
-msgstr "ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ NIS+ неуÑпешна"
+msgstr "ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ NIS+ завершилаÑÑŒ неудачно"
#: nis/nis_error.h:42
msgid "NIS+ service is unavailable or not installed"
@@ -3124,11 +3125,11 @@ msgstr "Да, 42 -- Ñто ÑмыÑл жизни"
#: nis/nis_error.h:44
msgid "Unable to authenticate NIS+ server"
-msgstr "Ðе удалоÑÑŒ аутенфицировать Ñервер NIS+"
+msgstr "Ðе удалоÑÑŒ аутентифицировать Ñервер NIS+"
#: nis/nis_error.h:45
msgid "Unable to authenticate NIS+ client"
-msgstr "Ðе удалоÑÑŒ аутенфицировать клиент NIS+"
+msgstr "Ðе удалоÑÑŒ аутентифицировать клиент NIS+"
#: nis/nis_error.h:46
msgid "No file space on server"
@@ -3577,7 +3578,7 @@ msgstr "ÐеизвеÑÑ‚Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ° ypbind"
#: nis/ypclnt.c:974
msgid "yp_update: cannot convert host to netname\n"
-msgstr "yp_update: невозможно преобразовать хоÑÑ‚ в netname\n"
+msgstr "yp_update: невозможно преобразовать узел в Ñетевое имÑ\n"
#: nis/ypclnt.c:992
msgid "yp_update: cannot get server address\n"
@@ -3586,12 +3587,12 @@ msgstr "yp_update: невозможно получить Ð°Ð´Ñ€ÐµÑ Ñервер
#: nscd/aicache.c:82 nscd/hstcache.c:481
#, c-format
msgid "Haven't found \"%s\" in hosts cache!"
-msgstr "Ðе найдено «%s» в кÑше хоÑтов!"
+msgstr "Ðе найдено «%s» в кÑше узлов!"
#: nscd/aicache.c:84 nscd/hstcache.c:483
#, c-format
msgid "Reloading \"%s\" in hosts cache!"
-msgstr "Перезагрузка «%s» в кÑше хоÑтов!"
+msgstr "Перезагрузка «%s» в кÑше узлов!"
#: nscd/cache.c:150
#, c-format
@@ -3610,7 +3611,7 @@ msgstr "невозможно выполнить stat() Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ð° «%s»:
#: nscd/cache.c:328
#, c-format
msgid "pruning %s cache; time %ld"
-msgstr "очитка %s кÑша; Ð²Ñ€ÐµÐ¼Ñ %ld"
+msgstr "очиÑтка %s кÑша; Ð²Ñ€ÐµÐ¼Ñ %ld"
#: nscd/cache.c:357
#, c-format
@@ -4162,7 +4163,7 @@ msgstr "Ðе удалоÑÑŒ уÑтановить возможноÑти хран
#: nscd/selinux.c:178 nscd/selinux.c:241
#, c-format
msgid "prctl(KEEPCAPS) failed"
-msgstr "prctl(KEEPCAPS) неуÑпешна"
+msgstr "prctl(KEEPCAPS) завершилÑÑ Ð½ÐµÑƒÐ´Ð°Ñ‡Ð½Ð¾"
#: nscd/selinux.c:192
msgid "Failed to initialize drop of capabilities"
@@ -4171,7 +4172,7 @@ msgstr "Ðе удалоÑÑŒ инициализировать возможноÑÑ
#: nscd/selinux.c:193
#, c-format
msgid "cap_init failed"
-msgstr "cap_init неуÑпешна"
+msgstr "cap_init завершилÑÑ Ð½ÐµÑƒÐ´Ð°Ñ‡Ð½Ð¾"
#: nscd/selinux.c:214 nscd/selinux.c:231
msgid "Failed to drop capabilities"
@@ -4180,7 +4181,7 @@ msgstr "Ðе удалоÑÑŒ ÑброÑить возможноÑти"
#: nscd/selinux.c:215 nscd/selinux.c:232
#, c-format
msgid "cap_set_proc failed"
-msgstr "cap_set_proc неуÑпешна"
+msgstr "cap_set_proc завершилÑÑ Ð½ÐµÑƒÐ´Ð°Ñ‡Ð½Ð¾"
#: nscd/selinux.c:240
msgid "Failed to unset keep-capabilities"
@@ -4530,11 +4531,11 @@ msgstr "Ошибка реÑолвера 0 (нет ошибки)"
#: resolv/herror.c:69
msgid "Unknown host"
-msgstr "ÐеизвеÑтный хоÑÑ‚"
+msgstr "ÐеизвеÑтный узел"
#: resolv/herror.c:70
msgid "Host name lookup failure"
-msgstr "Сбой поиÑка имени хоÑта"
+msgstr "Сбой поиÑка имени узла"
#: resolv/herror.c:71
msgid "Unknown server error"
@@ -4685,7 +4686,7 @@ msgstr "RPC: Ошибка удаленной ÑиÑтемы"
#: sunrpc/clnt_perr.c:210
msgid "RPC: Unknown host"
-msgstr "RPC: ÐеизвеÑтный хоÑÑ‚"
+msgstr "RPC: ÐеизвеÑтный узел"
#: sunrpc/clnt_perr.c:214
msgid "RPC: Unknown protocol"
@@ -5077,15 +5078,15 @@ msgstr "rpcinfo: Ðевозможно удалить региÑтрацию пр
#: sunrpc/rpcinfo.c:691
msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n"
-msgstr "Usage: rpcinfo [ -n номер-порта ] -u хоÑÑ‚ номер-программы [ номер-верÑии ]\n"
+msgstr "Usage: rpcinfo [ -n номер-порта ] -u узел номер-программы [ номер-верÑии ]\n"
#: sunrpc/rpcinfo.c:693
msgid " rpcinfo [ -n portnum ] -t host prognum [ versnum ]\n"
-msgstr " rpcinfo [ -n номер-порта ] -t хоÑÑ‚ номер-программы [ номер-верÑии ]\n"
+msgstr " rpcinfo [ -n номер-порта ] -t узел номер-программы [ номер-верÑии ]\n"
#: sunrpc/rpcinfo.c:695
msgid " rpcinfo -p [ host ]\n"
-msgstr " rpcinfo -p [ хоÑÑ‚ ]\n"
+msgstr " rpcinfo -p [ узел ]\n"
#: sunrpc/rpcinfo.c:696
msgid " rpcinfo -b prognum versnum\n"
@@ -5103,7 +5104,7 @@ msgstr "rpcinfo: Ñлужба %s неизвеÑтна\n"
#: sunrpc/rpcinfo.c:759
#, c-format
msgid "rpcinfo: %s is unknown host\n"
-msgstr "rpcinfo: хоÑÑ‚ %s неизвеÑтен\n"
+msgstr "rpcinfo: узел %s неизвеÑтен\n"
#: sunrpc/svc_run.c:70
msgid "svc_run: - out of memory"
@@ -5111,7 +5112,7 @@ msgstr "svc_run: недоÑтаточно памÑти"
#: sunrpc/svc_run.c:90
msgid "svc_run: - poll failed"
-msgstr "svc_run: -- Ð¾Ð¿Ñ€Ð¾Ñ Ð½ÐµÑƒÑпешен"
+msgstr "svc_run: — Ð¾Ð¿Ñ€Ð¾Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐ¸Ð»ÑÑ Ð½ÐµÑƒÐ´Ð°Ñ‡Ð½Ð¾"
#: sunrpc/svc_simple.c:87
#, c-format
@@ -5767,12 +5768,12 @@ msgstr "Слишком длинное Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°"
#. TRANS The remote host for a requested network connection is down.
#: sysdeps/gnu/errlist.c:726
msgid "Host is down"
-msgstr "ХоÑÑ‚ выключен"
+msgstr "Узел выключен"
#. TRANS The remote host for a requested network connection is not reachable.
#: sysdeps/gnu/errlist.c:735
msgid "No route to host"
-msgstr "Ðет пути до хоÑта"
+msgstr "Ðет маршрута до узла"
#. TRANS Directory not empty, where an empty directory was expected. Typically,
#. TRANS this error occurs when you are trying to delete a directory.
@@ -5804,7 +5805,7 @@ msgstr "Превышена диÑÐºÐ¾Ð²Ð°Ñ ÐºÐ²Ð¾Ñ‚Ð°"
#. TRANS the NFS file system on the local host.
#: sysdeps/gnu/errlist.c:787
msgid "Stale NFS file handle"
-msgstr "УÑтаревший Ñ…Ñндл файла NFS"
+msgstr "УÑтаревший деÑкриптор файла NFS"
#. TRANS An attempt was made to NFS-mount a remote file system with a file name that
#. TRANS already specifies an NFS-mounted file.
@@ -6174,7 +6175,7 @@ msgstr "Ошибка в неизвеÑтной ÑиÑтеме ошибок: "
#: sysdeps/posix/gai_strerror-strs.h:1
msgid "Address family for hostname not supported"
-msgstr "СемейÑтво адреÑов не поддерживаетÑÑ Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ð¾Ð³Ð¾ имени хоÑта"
+msgstr "СемейÑтво адреÑов не поддерживаетÑÑ Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ð¾Ð³Ð¾ имени узла"
#: sysdeps/posix/gai_strerror-strs.h:2
msgid "Temporary failure in name resolution"
@@ -6198,7 +6199,7 @@ msgstr "Ошибка Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð¸Ñ Ð¿Ð°Ð¼Ñти"
#: sysdeps/posix/gai_strerror-strs.h:7
msgid "No address associated with hostname"
-msgstr "С именем хоÑта не ÑвÑзано ни одного адреÑа"
+msgstr "С именем узла не ÑвÑзано ни одного адреÑа"
#: sysdeps/posix/gai_strerror-strs.h:8
msgid "Name or service not known"
diff --git a/libc/resolv/netdb.h b/libc/resolv/netdb.h
index e60dc4405..6b76a25d3 100644
--- a/libc/resolv/netdb.h
+++ b/libc/resolv/netdb.h
@@ -1,4 +1,4 @@
- /* Copyright (C) 1996-2004, 2009, 2010 Free Software Foundation, Inc.
+ /* Copyright (C) 1996-2004, 2009, 2010, 2011 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
@@ -679,7 +679,7 @@ extern __const char *gai_strerror (int __ecode) __THROW;
extern int getnameinfo (__const struct sockaddr *__restrict __sa,
socklen_t __salen, char *__restrict __host,
socklen_t __hostlen, char *__restrict __serv,
- socklen_t __servlen, unsigned int __flags);
+ socklen_t __servlen, int __flags);
#endif /* POSIX */
#ifdef __USE_GNU
diff --git a/libc/stdlib/Makefile b/libc/stdlib/Makefile
index 8881c7dab..60f23f35b 100644
--- a/libc/stdlib/Makefile
+++ b/libc/stdlib/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1991-2009, 2011 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -80,7 +80,7 @@ tests := tst-strtol tst-strtod testrand testsort testdiv \
test-a64l tst-qsort tst-system bug-strtod2 \
tst-atof1 tst-atof2 tst-strtod2 tst-rand48-2 \
tst-makecontext tst-qsort2 tst-makecontext2 tst-strtod6 \
- tst-unsetenv1 tst-makecontext3
+ tst-unsetenv1 tst-makecontext3 bug-getcontext
tests-$(OPTION_EGLIBC_LOCALE_CODE) \
+= tst-strtod3 tst-strtod4 tst-strtod5 testmb2
tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
@@ -159,3 +159,10 @@ $(objpfx)tst-putenv: $(objpfx)tst-putenvmod.so
$(objpfx)tst-putenvmod.so: $(objpfx)tst-putenvmod.os
$(build-module)
CFLAGS-tst-putenvmod.c = -DNOT_IN_libc=1
+
+ifeq ($(build-shared),yes)
+link-libm = $(common-objpfx)math/libm.so
+else
+link-libm = $(common-objpfx)math/libm.a
+endif
+$(objpfx)bug-getcontext: $(link-libm)
diff --git a/libc/stdlib/bug-getcontext.c b/libc/stdlib/bug-getcontext.c
new file mode 100644
index 000000000..745aa1f20
--- /dev/null
+++ b/libc/stdlib/bug-getcontext.c
@@ -0,0 +1,48 @@
+/* BZ 12420 */
+
+#include <errno.h>
+#include <fenv.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <ucontext.h>
+
+static int
+do_test (void)
+{
+ int except_mask = FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW;
+ int status = feenableexcept (except_mask);
+
+ except_mask = fegetexcept ();
+ if (except_mask == -1)
+ {
+ printf("\nBefore getcontext(): fegetexcept returned: %d\n",
+ except_mask);
+ return 1;
+ }
+
+ ucontext_t ctx;
+ status = getcontext(&ctx);
+ if (status)
+ {
+ printf("\ngetcontext failed, errno: %d.\n", errno);
+ return 1;
+ }
+
+ printf ("\nDone with getcontext()!\n");
+ fflush (NULL);
+
+ int mask = fegetexcept ();
+ if (mask != except_mask)
+ {
+ printf("\nAfter getcontext(): fegetexcept returned: %d, expected: %d.\n",
+ mask, except_mask);
+ return 1;
+ }
+
+ printf("\nAt end fegetexcept() returned %d, expected: %d.\n",
+ mask, except_mask);
+ return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/libc/stdlib/gmp-impl.h b/libc/stdlib/gmp-impl.h
index 85e419d36..984885d05 100644
--- a/libc/stdlib/gmp-impl.h
+++ b/libc/stdlib/gmp-impl.h
@@ -1,6 +1,6 @@
/* Include file for internal GNU MP types and definitions.
-Copyright (C) 1991, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+Copyright (C) 1991, 1993, 1994, 1995, 1996, 2011 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -241,7 +241,7 @@ extern mp_size_t __gmp_default_fp_limb_precision;
(r) = _r; \
(q) = _q; \
} while (0)
-/* Like udiv_qrnnd_preinv, but for for any value D. DNORM is D shifted left
+/* Like udiv_qrnnd_preinv, but for any value D. DNORM is D shifted left
so that its most significant bit is set. LGUP is ceil(log2(D)). */
#define udiv_qrnnd_preinv2gen(q, r, nh, nl, d, di, dnorm, lgup) \
do { \
diff --git a/libc/sunrpc/Makefile b/libc/sunrpc/Makefile
index c5d7eeaa5..49e9f4924 100644
--- a/libc/sunrpc/Makefile
+++ b/libc/sunrpc/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1994-2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1994-2004, 2005, 2006, 2011 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
@@ -49,47 +49,62 @@ subdir := sunrpc
rpcsvc = bootparam_prot.x nlm_prot.x rstat.x \
yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
rusers.x spray.x nfs_prot.x rquota.x key_prot.x
-headers = $(addprefix rpc/,auth.h auth_unix.h clnt.h netdb.h pmap_clnt.h \
- pmap_prot.h pmap_rmt.h rpc.h rpc_msg.h svc.h \
- svc_auth.h types.h xdr.h auth_des.h \
- des_crypt.h key_prot.h rpc_des.h) \
- $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
+headers_in_tirpc = $(addprefix rpc/,auth.h auth_unix.h clnt.h pmap_clnt.h \
+ pmap_prot.h pmap_rmt.h rpc.h rpc_msg.h \
+ svc.h svc_auth.h types.h xdr.h auth_des.h \
+ des_crypt.h)
+headers_not_in_tirpc = $(addprefix rpc/,netdb.h key_prot.h rpc_des.h) \
+ $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
$(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
generated-dirs := rpcsvc
+include ../Makeconfig
+
+ifeq ($(versioning),yes)
+need-export-routines-$(OPTION_EGLIBC_SUNRPC) += \
+ auth_des auth_unix clnt_gen clnt_perr clnt_tcp \
+ clnt_udp get_myaddr key_call netname pm_getport \
+ rpc_thread svc svc_tcp svc_udp xdr_array xdr \
+ xdr_intXX_t xdr_mem xdr_ref xdr_sizeof xdr_stdio \
+ svc_run
+
+need-export-routines-y += xcrypt
+
+need-export-routines := $(need-export-routines-y)
+
routines-$(OPTION_EGLIBC_SUNRPC) \
- += auth_none auth_unix authuxprot bindrsvprt \
- clnt_gen clnt_perr clnt_raw clnt_simp clnt_tcp \
- clnt_udp rpc_dtable get_myaddr getrpcport \
- pmap_clnt pm_getmaps pm_getport pmap_prot \
- pmap_prot2 pmap_rmt rpc_prot rpc_common rpc_cmsg rpc_thread \
- svc svc_auth svc_authux svc_raw svc_run svc_simple \
- svc_tcp svc_udp xdr xdr_array xdr_float xdr_mem \
- xdr_rec xdr_ref xdr_stdio publickey xdr_sizeof \
- auth_des authdes_prot \
- key_call key_prot netname openchild rtime svcauth_des \
- clnt_unix svc_unix create_xid xdr_intXX_t
+ += auth_none authuxprot bindrsvprt clnt_raw clnt_simp \
+ rpc_dtable getrpcport pmap_clnt pm_getmaps pmap_prot pmap_prot2 \
+ pmap_rmt rpc_prot rpc_common rpc_cmsg svc_auth svc_authux svc_raw \
+ svc_simple xdr_float xdr_rec publickey authdes_prot \
+ key_prot openchild rtime svcauth_des \
+ clnt_unix svc_unix create_xid
# xdecrypt is also used by nss/nss_files/files-key.c.
-routines-y += xcrypt des_crypt des_impl des_soft
+routines-y += des_crypt des_impl des_soft $(need-export-routines)
+
+# We only add the RPC for compatibility to libc.so.
+shared-only-routines = $(routines)
+endif
-others-$(OPTION_EGLIBC_SUNRPC) += rpcinfo
+# We do not build rpcinfo anymore. It is not needed for a bootstrap
+# and not wanted on complete systems.
+# others-$(OPTION_EGLIBC_SUNRPC) += rpcinfo
+# install-sbin-$(OPTION_EGLIBC_SUNRPC) += rpcinfo
install-bin-$(OPTION_EGLIBC_SUNRPC) += rpcgen
-install-sbin-$(OPTION_EGLIBC_SUNRPC) += rpcinfo
rpcgen-objs = rpc_main.o rpc_hout.o rpc_cout.o rpc_parse.o \
rpc_scan.o rpc_util.o rpc_svcout.o rpc_clntout.o \
rpc_tblout.o rpc_sample.o
# These headers are part of rpcgen.
distribute := proto.h rpc_util.h rpc_parse.h rpc_scan.h \
+ $(headers_in_tirpc) $(headers_not_in_tirpc) \
$(rpcgen-objs:.o=.c) etc.rpc \
errqueue.h
extra-objs-$(OPTION_EGLIBC_SUNRPC) += $(rpcgen-objs)
all: # Make this the default target; it will be defined in Rules.
-include ../Makeconfig
-
install-others-$(OPTION_EGLIBC_SUNRPC) += $(inst_sysconfdir)/rpc
tests-$(OPTION_EGLIBC_SUNRPC) = tst-xdrmem tst-xdrmem2
@@ -115,6 +130,19 @@ librpcsvc-inhibit-o = .os # Build no shared rpcsvc library.
omit-deps = $(librpcsvc-routines)
endif
+include ../Rules
+
+ifeq (yes,$(build-shared))
+rpc-compat-routines = $(addprefix compat-,$(need-export-routines))
+rpc-compat-routines.os = $(addprefix $(objpfx), \
+ $(addsuffix .os,$(rpc-compat-routines)))
+subdir_lib: $(objpfx)librpc_compat_pic.a
+$(objpfx)librpc_compat_pic.a: $(rpc-compat-routines.os)
+ $(AR) cr$(verbose) $@ $^
+$(rpc-compat-routines.os): $(objpfx)compat-%.os: %.c $(before-compile)
+ $(compile-command.c) -DEXPORT_RPC_SYMBOLS
+endif
+
CFLAGS-xbootparam_prot.c = -Wno-unused $(PIC-ccflag)
CFLAGS-xnlm_prot.c = -Wno-unused $(PIC-ccflag)
CFLAGS-xrstat.c = -Wno-unused $(PIC-ccflag)
@@ -136,7 +164,9 @@ CFLAGS-openchild.c = -fexceptions
CPPFLAGS += -D_RPC_THREAD_SAFE_
-include ../Rules
+$(objpfx)tst-getmyaddr: $(common-objpfx)linkobj/libc.so
+$(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so
+$(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so
$(objpfx)rpcgen: $(addprefix $(objpfx),$(rpcgen-objs)) \
$(sort $(filter $(common-objpfx)libc%,$(link-libc))) \
@@ -213,4 +243,4 @@ ifneq ($(no_deps),t)
endif
endif
-$(objpfx)thrsvc: $(shared-thread-library)
+$(objpfx)thrsvc: $(common-objpfx)linkobj/libc.so $(shared-thread-library)
diff --git a/libc/sunrpc/auth_des.c b/libc/sunrpc/auth_des.c
index 0228562b8..96bbcfc32 100644
--- a/libc/sunrpc/auth_des.c
+++ b/libc/sunrpc/auth_des.c
@@ -51,8 +51,6 @@
#define debug(msg) /* printf("%s\n", msg) */
-extern bool_t INTUSE(xdr_authdes_cred) (XDR *, struct authdes_cred *);
-extern bool_t INTUSE(xdr_authdes_verf) (XDR *, struct authdes_verf *);
/*
* DES authenticator operations vector
@@ -79,8 +77,8 @@ static const struct auth_ops authdes_ops = {
*/
struct ad_private {
char *ad_fullname; /* client's full name */
- u_int ad_fullnamelen; /* length of name, rounded up */
- char *ad_servername; /* server's full name */
+ u_int ad_fullnamelen; /* length of name, rounded up */
+ char *ad_servername; /* server's full name */
u_int ad_servernamelen; /* length of name, rounded up */
uint32_t ad_window; /* client specified window */
bool_t ad_dosync; /* synchronize? */
@@ -91,7 +89,7 @@ struct ad_private {
struct authdes_verf ad_verf; /* storage for verifier */
struct rpc_timeval ad_timestamp; /* timestamp sent */
des_block ad_xkey; /* encrypted conversation key */
- u_char ad_pkey[1024]; /* Servers actual public key */
+ u_char ad_pkey[1024]; /* Servers actual public key */
};
@@ -114,8 +112,13 @@ authdes_create (const char *servername, u_int window,
pkey.n_bytes = pkey_data;
pkey.n_len = strlen (pkey_data) + 1;
- return INTUSE(authdes_pk_create) (servername, &pkey, window, syncaddr, ckey);
+ return authdes_pk_create (servername, &pkey, window, syncaddr, ckey);
}
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (authdes_create)
+#else
+libc_hidden_nolink (authdes_create, GLIBC_2_1)
+#endif
AUTH *
authdes_pk_create (const char *servername, netobj *pkey, u_int window,
@@ -205,7 +208,11 @@ failed:
}
return NULL;
}
-INTDEF(authdes_pk_create)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (authdes_pk_create)
+#else
+libc_hidden_nolink (authdes_pk_create, GLIBC_2_1)
+#endif
/*
* Implement the five authentication operations
@@ -309,7 +316,7 @@ authdes_marshal (AUTH *auth, XDR *xdrs)
ATTEMPT (xdr_putint32 (xdrs, &auth->ah_cred.oa_flavor));
ATTEMPT (xdr_putint32 (xdrs, &len));
}
- ATTEMPT (INTUSE(xdr_authdes_cred) (xdrs, cred));
+ ATTEMPT (xdr_authdes_cred (xdrs, cred));
len = (2 + 1) * BYTES_PER_XDR_UNIT;
if ((ixdr = xdr_inline (xdrs, 2 * BYTES_PER_XDR_UNIT)) != NULL)
@@ -322,7 +329,7 @@ authdes_marshal (AUTH *auth, XDR *xdrs)
ATTEMPT (xdr_putint32 (xdrs, &auth->ah_verf.oa_flavor));
ATTEMPT (xdr_putint32 (xdrs, &len));
}
- ATTEMPT (INTUSE(xdr_authdes_verf) (xdrs, verf));
+ ATTEMPT (xdr_authdes_verf (xdrs, verf));
return TRUE;
}
diff --git a/libc/sunrpc/auth_none.c b/libc/sunrpc/auth_none.c
index 57b3418c5..5f252a954 100644
--- a/libc/sunrpc/auth_none.c
+++ b/libc/sunrpc/auth_none.c
@@ -81,10 +81,10 @@ authnone_create_once (void)
ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth;
ap->no_client.ah_ops = (struct auth_ops *) &ops;
xdrs = &xdr_stream;
- INTUSE(xdrmem_create) (xdrs, ap->marshalled_client,
- (u_int) MAX_MARSHAL_SIZE, XDR_ENCODE);
- (void) INTUSE(xdr_opaque_auth) (xdrs, &ap->no_client.ah_cred);
- (void) INTUSE(xdr_opaque_auth) (xdrs, &ap->no_client.ah_verf);
+ xdrmem_create (xdrs, ap->marshalled_client,
+ (u_int) MAX_MARSHAL_SIZE, XDR_ENCODE);
+ (void) xdr_opaque_auth (xdrs, &ap->no_client.ah_cred);
+ (void) xdr_opaque_auth (xdrs, &ap->no_client.ah_verf);
ap->mcnt = XDR_GETPOS (xdrs);
XDR_DESTROY (xdrs);
}
@@ -95,7 +95,7 @@ authnone_create (void)
__libc_once (authnone_private_guard, authnone_create_once);
return &authnone_private.no_client;
}
-INTDEF (authnone_create)
+libc_hidden_nolink (authnone_create, GLIBC_2_0)
static bool_t
authnone_marshal (AUTH *client, XDR *xdrs)
diff --git a/libc/sunrpc/auth_unix.c b/libc/sunrpc/auth_unix.c
index 301055bf1..858523eb8 100644
--- a/libc/sunrpc/auth_unix.c
+++ b/libc/sunrpc/auth_unix.c
@@ -134,8 +134,8 @@ no_memory:
/*
* Serialize the parameters into origcred
*/
- INTUSE(xdrmem_create) (&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE);
- if (!INTUSE(xdr_authunix_parms) (&xdrs, &aup))
+ xdrmem_create (&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE);
+ if (!xdr_authunix_parms (&xdrs, &aup))
abort ();
au->au_origcred.oa_length = len = XDR_GETPOS (&xdrs);
au->au_origcred.oa_flavor = AUTH_UNIX;
@@ -151,7 +151,7 @@ no_memory:
marshal_new_auth (auth);
return auth;
}
-INTDEF (authunix_create)
+libc_hidden_nolink (authunix_create, GLIBC_2_0)
/*
* Returns an auth handle with parameters determined by doing lots of
@@ -208,15 +208,18 @@ authunix_create_default (void)
/* This braindamaged Sun code forces us here to truncate the
list of groups to NGRPS members since the code in
authuxprot.c transforms a fixed array. Grrr. */
- AUTH *result = INTUSE(authunix_create) (machname, uid, gid, MIN (NGRPS, len),
- gids);
+ AUTH *result = authunix_create (machname, uid, gid, MIN (NGRPS, len), gids);
if (max_nr_groups >= ALLOCA_LIMIT || retry)
free (gids);
return result;
}
-INTDEF (authunix_create_default)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (authunix_create_default)
+#else
+libc_hidden_nolink (authunix_create_default, GLIBC_2_0)
+#endif
/*
* authunix operations
@@ -245,8 +248,7 @@ authunix_validate (AUTH *auth, struct opaque_auth *verf)
if (verf->oa_flavor == AUTH_SHORT)
{
au = AUTH_PRIVATE (auth);
- INTUSE(xdrmem_create) (&xdrs, verf->oa_base, verf->oa_length,
- XDR_DECODE);
+ xdrmem_create (&xdrs, verf->oa_base, verf->oa_length, XDR_DECODE);
if (au->au_shcred.oa_base != NULL)
{
@@ -254,14 +256,14 @@ authunix_validate (AUTH *auth, struct opaque_auth *verf)
au->au_shcred.oa_length);
au->au_shcred.oa_base = NULL;
}
- if (INTUSE(xdr_opaque_auth) (&xdrs, &au->au_shcred))
+ if (xdr_opaque_auth (&xdrs, &au->au_shcred))
{
auth->ah_cred = au->au_shcred;
}
else
{
xdrs.x_op = XDR_FREE;
- (void) INTUSE(xdr_opaque_auth) (&xdrs, &au->au_shcred);
+ (void) xdr_opaque_auth (&xdrs, &au->au_shcred);
au->au_shcred.oa_base = NULL;
auth->ah_cred = au->au_origcred;
}
@@ -289,9 +291,9 @@ authunix_refresh (AUTH *auth)
/* first deserialize the creds back into a struct authunix_parms */
aup.aup_machname = NULL;
aup.aup_gids = (gid_t *) NULL;
- INTUSE(xdrmem_create) (&xdrs, au->au_origcred.oa_base,
- au->au_origcred.oa_length, XDR_DECODE);
- stat = INTUSE(xdr_authunix_parms) (&xdrs, &aup);
+ xdrmem_create (&xdrs, au->au_origcred.oa_base,
+ au->au_origcred.oa_length, XDR_DECODE);
+ stat = xdr_authunix_parms (&xdrs, &aup);
if (!stat)
goto done;
@@ -300,7 +302,7 @@ authunix_refresh (AUTH *auth)
aup.aup_time = now.tv_sec;
xdrs.x_op = XDR_ENCODE;
XDR_SETPOS (&xdrs, 0);
- stat = INTUSE(xdr_authunix_parms) (&xdrs, &aup);
+ stat = xdr_authunix_parms (&xdrs, &aup);
if (!stat)
goto done;
auth->ah_cred = au->au_origcred;
@@ -308,7 +310,7 @@ authunix_refresh (AUTH *auth)
done:
/* free the struct authunix_parms created by deserializing */
xdrs.x_op = XDR_FREE;
- (void) INTUSE(xdr_authunix_parms) (&xdrs, &aup);
+ (void) xdr_authunix_parms (&xdrs, &aup);
XDR_DESTROY (&xdrs);
return stat;
}
@@ -343,9 +345,9 @@ marshal_new_auth (AUTH *auth)
XDR *xdrs = &xdr_stream;
struct audata *au = AUTH_PRIVATE (auth);
- INTUSE(xdrmem_create) (xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE);
- if ((!INTUSE(xdr_opaque_auth) (xdrs, &(auth->ah_cred))) ||
- (!INTUSE(xdr_opaque_auth) (xdrs, &(auth->ah_verf))))
+ xdrmem_create (xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE);
+ if ((!xdr_opaque_auth (xdrs, &(auth->ah_cred))) ||
+ (!xdr_opaque_auth (xdrs, &(auth->ah_verf))))
perror (_("auth_unix.c: Fatal marshalling problem"));
else
au->au_mpos = XDR_GETPOS (xdrs);
diff --git a/libc/sunrpc/authdes_prot.c b/libc/sunrpc/authdes_prot.c
index 0d1b5353f..0a25bac14 100644
--- a/libc/sunrpc/authdes_prot.c
+++ b/libc/sunrpc/authdes_prot.c
@@ -45,26 +45,25 @@ xdr_authdes_cred (XDR *xdrs, struct authdes_cred *cred)
/*
* Unrolled xdr
*/
- ATTEMPT (INTUSE(xdr_enum) (xdrs, (enum_t *) & cred->adc_namekind));
+ ATTEMPT (xdr_enum (xdrs, (enum_t *) & cred->adc_namekind));
switch (cred->adc_namekind)
{
case ADN_FULLNAME:
- ATTEMPT (INTUSE(xdr_string) (xdrs, &cred->adc_fullname.name,
- MAXNETNAMELEN));
- ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & cred->adc_fullname.key,
- sizeof (des_block)));
- ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & cred->adc_fullname.window,
- sizeof (cred->adc_fullname.window)));
+ ATTEMPT (xdr_string (xdrs, &cred->adc_fullname.name, MAXNETNAMELEN));
+ ATTEMPT (xdr_opaque (xdrs, (caddr_t) & cred->adc_fullname.key,
+ sizeof (des_block)));
+ ATTEMPT (xdr_opaque (xdrs, (caddr_t) & cred->adc_fullname.window,
+ sizeof (cred->adc_fullname.window)));
return (TRUE);
case ADN_NICKNAME:
- ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & cred->adc_nickname,
- sizeof (cred->adc_nickname)));
+ ATTEMPT (xdr_opaque (xdrs, (caddr_t) & cred->adc_nickname,
+ sizeof (cred->adc_nickname)));
return TRUE;
default:
return FALSE;
}
}
-INTDEF(xdr_authdes_cred)
+libc_hidden_nolink (xdr_authdes_cred, GLIBC_2_1)
bool_t
@@ -73,10 +72,10 @@ xdr_authdes_verf (register XDR *xdrs, register struct authdes_verf *verf)
/*
* Unrolled xdr
*/
- ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & verf->adv_xtimestamp,
- sizeof (des_block)));
- ATTEMPT (INTUSE(xdr_opaque) (xdrs, (caddr_t) & verf->adv_int_u,
- sizeof (verf->adv_int_u)));
+ ATTEMPT (xdr_opaque (xdrs, (caddr_t) & verf->adv_xtimestamp,
+ sizeof (des_block)));
+ ATTEMPT (xdr_opaque (xdrs, (caddr_t) & verf->adv_int_u,
+ sizeof (verf->adv_int_u)));
return TRUE;
}
-INTDEF(xdr_authdes_verf)
+libc_hidden_nolink (xdr_authdes_verf, GLIBC_2_1)
diff --git a/libc/sunrpc/authuxprot.c b/libc/sunrpc/authuxprot.c
index 74db8a24b..64da1799e 100644
--- a/libc/sunrpc/authuxprot.c
+++ b/libc/sunrpc/authuxprot.c
@@ -45,22 +45,22 @@
bool_t
xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p)
{
- if (INTUSE(xdr_u_long) (xdrs, &(p->aup_time))
- && INTUSE(xdr_string) (xdrs, &(p->aup_machname), MAX_MACHINE_NAME)
+ if (xdr_u_long (xdrs, &(p->aup_time))
+ && xdr_string (xdrs, &(p->aup_machname), MAX_MACHINE_NAME)
&& (sizeof (uid_t) == sizeof (short int)
- ? INTUSE(xdr_u_short) (xdrs, (u_short *) & (p->aup_uid))
- : INTUSE(xdr_u_int) (xdrs, (u_int *) & (p->aup_uid)))
+ ? xdr_u_short (xdrs, (u_short *) & (p->aup_uid))
+ : xdr_u_int (xdrs, (u_int *) & (p->aup_uid)))
&& (sizeof (gid_t) == sizeof (short int)
- ? INTUSE(xdr_u_short) (xdrs, (u_short *) & (p->aup_gid))
- : INTUSE(xdr_u_int) (xdrs, (u_int *) & (p->aup_gid)))
- && INTUSE(xdr_array) (xdrs, (caddr_t *) & (p->aup_gids),
- & (p->aup_len), NGRPS, sizeof (gid_t),
- (sizeof (gid_t) == sizeof (short int)
- ? (xdrproc_t) INTUSE(xdr_u_short)
- : (xdrproc_t) INTUSE(xdr_u_int))))
+ ? xdr_u_short (xdrs, (u_short *) & (p->aup_gid))
+ : xdr_u_int (xdrs, (u_int *) & (p->aup_gid)))
+ && xdr_array (xdrs, (caddr_t *) & (p->aup_gids),
+ & (p->aup_len), NGRPS, sizeof (gid_t),
+ (sizeof (gid_t) == sizeof (short int)
+ ? (xdrproc_t) xdr_u_short
+ : (xdrproc_t) xdr_u_int)))
{
return TRUE;
}
return FALSE;
}
-INTDEF(xdr_authunix_parms)
+libc_hidden_nolink (xdr_authunix_parms, GLIBC_2_0)
diff --git a/libc/sunrpc/clnt_gen.c b/libc/sunrpc/clnt_gen.c
index a562f41b3..2b7096cf2 100644
--- a/libc/sunrpc/clnt_gen.c
+++ b/libc/sunrpc/clnt_gen.c
@@ -64,7 +64,7 @@ clnt_create (const char *hostname, u_long prog, u_long vers,
sun.sun_family = AF_UNIX;
strcpy (sun.sun_path, hostname);
sock = RPC_ANYSOCK;
- client = INTUSE(clntunix_create) (&sun, prog, vers, &sock, 0, 0);
+ client = clntunix_create (&sun, prog, vers, &sock, 0, 0);
if (client == NULL)
return NULL;
#if 0
@@ -134,7 +134,7 @@ clnt_create (const char *hostname, u_long prog, u_long vers,
case IPPROTO_UDP:
tv.tv_sec = 5;
tv.tv_usec = 0;
- client = INTUSE(clntudp_create) (&sin, prog, vers, tv, &sock);
+ client = clntudp_create (&sin, prog, vers, tv, &sock);
if (client == NULL)
{
return NULL;
@@ -148,7 +148,7 @@ clnt_create (const char *hostname, u_long prog, u_long vers,
#endif
break;
case IPPROTO_TCP:
- client = INTUSE(clnttcp_create) (&sin, prog, vers, &sock, 0, 0);
+ client = clnttcp_create (&sin, prog, vers, &sock, 0, 0);
if (client == NULL)
{
return NULL;
@@ -172,4 +172,8 @@ clnt_create (const char *hostname, u_long prog, u_long vers,
}
return client;
}
-INTDEF (clnt_create)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (clnt_create)
+#else
+libc_hidden_nolink (clnt_create, GLIBC_2_0)
+#endif
diff --git a/libc/sunrpc/clnt_perr.c b/libc/sunrpc/clnt_perr.c
index f48c53af6..e6b2460ec 100644
--- a/libc/sunrpc/clnt_perr.c
+++ b/libc/sunrpc/clnt_perr.c
@@ -130,14 +130,18 @@ clnt_sperror (CLIENT * rpch, const char *msg)
return str;
}
-libc_hidden_def (clnt_sperror)
+libc_hidden_nolink (clnt_sperror, GLIBC_2_0)
void
clnt_perror (CLIENT * rpch, const char *msg)
{
(void) __fxprintf (NULL, "%s", clnt_sperror (rpch, msg));
}
+#ifdef EXPORT_RPC_SYMBOLS
libc_hidden_def (clnt_perror)
+#else
+libc_hidden_nolink (clnt_perror, GLIBC_2_0)
+#endif
struct rpc_errtab
@@ -266,7 +270,11 @@ clnt_perrno (enum clnt_stat num)
{
(void) __fxprintf (NULL, "%s", clnt_sperrno (num));
}
-
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (clnt_perrno)
+#else
+libc_hidden_nolink (clnt_perrno, GLIBC_2_0)
+#endif
char *
clnt_spcreateerror (const char *msg)
@@ -303,13 +311,18 @@ clnt_spcreateerror (const char *msg)
return str;
}
-libc_hidden_def (clnt_spcreateerror)
+libc_hidden_nolink (clnt_spcreateerror, GLIBC_2_0)
void
clnt_pcreateerror (const char *msg)
{
(void) __fxprintf (NULL, "%s", clnt_spcreateerror (msg));
}
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (clnt_pcreateerror)
+#else
+libc_hidden_nolink (clnt_pcreateerror, GLIBC_2_0)
+#endif
struct auth_errtab
{
diff --git a/libc/sunrpc/clnt_raw.c b/libc/sunrpc/clnt_raw.c
index 7a8030e41..95e3eae98 100644
--- a/libc/sunrpc/clnt_raw.c
+++ b/libc/sunrpc/clnt_raw.c
@@ -109,9 +109,8 @@ clntraw_create (u_long prog, u_long vers)
call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
call_msg.rm_call.cb_prog = prog;
call_msg.rm_call.cb_vers = vers;
- INTUSE(xdrmem_create) (xdrs, clp->mashl_callmsg.msg, MCALL_MSG_SIZE,
- XDR_ENCODE);
- if (!INTUSE(xdr_callhdr) (xdrs, &call_msg))
+ xdrmem_create (xdrs, clp->mashl_callmsg.msg, MCALL_MSG_SIZE, XDR_ENCODE);
+ if (!xdr_callhdr (xdrs, &call_msg))
{
perror (_ ("clnt_raw.c: fatal header serialization error"));
}
@@ -121,15 +120,16 @@ clntraw_create (u_long prog, u_long vers)
/*
* Set xdrmem for client/server shared buffer
*/
- INTUSE(xdrmem_create) (xdrs, clp->_raw_buf, UDPMSGSIZE, XDR_FREE);
+ xdrmem_create (xdrs, clp->_raw_buf, UDPMSGSIZE, XDR_FREE);
/*
* create client handle
*/
client->cl_ops = (struct clnt_ops *) &client_ops;
- client->cl_auth = INTUSE(authnone_create) ();
+ client->cl_auth = authnone_create ();
return client;
}
+libc_hidden_nolink (clntraw_create, GLIBC_2_0)
static enum clnt_stat
clntraw_call (h, proc, xargs, argsp, xresults, resultsp, timeout)
@@ -172,7 +172,7 @@ call_again:
* We have to call server input routine here because this is
* all going on in one process. Yuk.
*/
- INTUSE(svc_getreq) (1);
+ svc_getreq (1);
/*
* get results
@@ -182,7 +182,7 @@ call_again:
msg.acpted_rply.ar_verf = _null_auth;
msg.acpted_rply.ar_results.where = resultsp;
msg.acpted_rply.ar_results.proc = xresults;
- if (!INTUSE(xdr_replymsg) (xdrs, &msg))
+ if (!xdr_replymsg (xdrs, &msg))
return RPC_CANTDECODERES;
_seterr_reply (&msg, &error);
status = error.re_status;
@@ -209,7 +209,7 @@ call_again:
if (msg.acpted_rply.ar_verf.oa_base != NULL)
{
xdrs->x_op = XDR_FREE;
- (void) INTUSE(xdr_opaque_auth) (xdrs, &(msg.acpted_rply.ar_verf));
+ (void) xdr_opaque_auth (xdrs, &(msg.acpted_rply.ar_verf));
}
}
diff --git a/libc/sunrpc/clnt_simp.c b/libc/sunrpc/clnt_simp.c
index b7a64e65b..d2dd3b307 100644
--- a/libc/sunrpc/clnt_simp.c
+++ b/libc/sunrpc/clnt_simp.c
@@ -119,7 +119,7 @@ callrpc (const char *host, u_long prognum, u_long versnum, u_long procnum,
memcpy ((char *) &server_addr.sin_addr, hp->h_addr, hp->h_length);
server_addr.sin_family = AF_INET;
server_addr.sin_port = 0;
- if ((crp->client = INTUSE(clntudp_create) (&server_addr, (u_long) prognum,
+ if ((crp->client = clntudp_create (&server_addr, (u_long) prognum,
(u_long) versnum, timeout, &crp->socket)) == NULL)
return (int) get_rpc_createerr().cf_stat;
crp->valid = 1;
@@ -139,6 +139,7 @@ callrpc (const char *host, u_long prognum, u_long versnum, u_long procnum,
crp->valid = 0;
return (int) clnt_stat;
}
+libc_hidden_nolink (callrpc, GLIBC_2_0)
#ifdef _RPC_THREAD_SAFE_
void
diff --git a/libc/sunrpc/clnt_tcp.c b/libc/sunrpc/clnt_tcp.c
index 8527868a7..a07f50a1b 100644
--- a/libc/sunrpc/clnt_tcp.c
+++ b/libc/sunrpc/clnt_tcp.c
@@ -188,9 +188,8 @@ clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers,
/*
* pre-serialize the static part of the call msg and stash it away
*/
- INTUSE(xdrmem_create) (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE,
- XDR_ENCODE);
- if (!INTUSE(xdr_callhdr) (&(ct->ct_xdrs), &call_msg))
+ xdrmem_create (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE, XDR_ENCODE);
+ if (!xdr_callhdr (&(ct->ct_xdrs), &call_msg))
{
if (ct->ct_closeit)
{
@@ -205,11 +204,11 @@ clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers,
* Create a client handle which uses xdrrec for serialization
* and authnone for authentication.
*/
- INTUSE(xdrrec_create) (&(ct->ct_xdrs), sendsz, recvsz,
- (caddr_t) ct, readtcp, writetcp);
+ xdrrec_create (&(ct->ct_xdrs), sendsz, recvsz,
+ (caddr_t) ct, readtcp, writetcp);
h->cl_ops = (struct clnt_ops *) &tcp_ops;
h->cl_private = (caddr_t) ct;
- h->cl_auth = INTUSE(authnone_create) ();
+ h->cl_auth = authnone_create ();
return h;
fooy:
@@ -220,7 +219,11 @@ fooy:
mem_free ((caddr_t) h, sizeof (CLIENT));
return ((CLIENT *) NULL);
}
-INTDEF (clnttcp_create)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (clnttcp_create)
+#else
+libc_hidden_nolink (clnttcp_create, GLIBC_2_0)
+#endif
static enum clnt_stat
clnttcp_call (h, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout)
@@ -260,10 +263,10 @@ call_again:
{
if (ct->ct_error.re_status == RPC_SUCCESS)
ct->ct_error.re_status = RPC_CANTENCODEARGS;
- (void) INTUSE(xdrrec_endofrecord) (xdrs, TRUE);
+ (void) xdrrec_endofrecord (xdrs, TRUE);
return (ct->ct_error.re_status);
}
- if (!INTUSE(xdrrec_endofrecord) (xdrs, shipnow))
+ if (!xdrrec_endofrecord (xdrs, shipnow))
return ct->ct_error.re_status = RPC_CANTSEND;
if (!shipnow)
return RPC_SUCCESS;
@@ -284,11 +287,11 @@ call_again:
{
reply_msg.acpted_rply.ar_verf = _null_auth;
reply_msg.acpted_rply.ar_results.where = NULL;
- reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)INTUSE(xdr_void);
- if (!INTUSE(xdrrec_skiprecord) (xdrs))
+ reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void;
+ if (!xdrrec_skiprecord (xdrs))
return (ct->ct_error.re_status);
/* now decode and validate the response header */
- if (!INTUSE(xdr_replymsg) (xdrs, &reply_msg))
+ if (!xdr_replymsg (xdrs, &reply_msg))
{
if (ct->ct_error.re_status == RPC_SUCCESS)
continue;
@@ -318,8 +321,7 @@ call_again:
if (reply_msg.acpted_rply.ar_verf.oa_base != NULL)
{
xdrs->x_op = XDR_FREE;
- (void) INTUSE(xdr_opaque_auth) (xdrs,
- &(reply_msg.acpted_rply.ar_verf));
+ (void) xdr_opaque_auth (xdrs, &(reply_msg.acpted_rply.ar_verf));
}
} /* end successful completion */
else
diff --git a/libc/sunrpc/clnt_udp.c b/libc/sunrpc/clnt_udp.c
index 6bb1ca37e..7aa86a64c 100644
--- a/libc/sunrpc/clnt_udp.c
+++ b/libc/sunrpc/clnt_udp.c
@@ -57,7 +57,6 @@
#include <kernel-features.h>
-extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *);
extern u_long _create_xid (void);
/*
@@ -165,8 +164,8 @@ __libc_clntudp_bufcreate (struct sockaddr_in *raddr, u_long program,
call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
call_msg.rm_call.cb_prog = program;
call_msg.rm_call.cb_vers = version;
- INTUSE(xdrmem_create) (&(cu->cu_outxdrs), cu->cu_outbuf, sendsz, XDR_ENCODE);
- if (!INTUSE(xdr_callhdr) (&(cu->cu_outxdrs), &call_msg))
+ xdrmem_create (&(cu->cu_outxdrs), cu->cu_outbuf, sendsz, XDR_ENCODE);
+ if (!xdr_callhdr (&(cu->cu_outxdrs), &call_msg))
{
goto fooy;
}
@@ -229,7 +228,7 @@ __libc_clntudp_bufcreate (struct sockaddr_in *raddr, u_long program,
cu->cu_closeit = FALSE;
}
cu->cu_sock = *sockp;
- cl->cl_auth = INTUSE(authnone_create) ();
+ cl->cl_auth = authnone_create ();
return cl;
fooy:
if (cu)
@@ -238,17 +237,21 @@ fooy:
mem_free ((caddr_t) cl, sizeof (CLIENT));
return (CLIENT *) NULL;
}
-INTDEF (__libc_clntudp_bufcreate)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (__libc_clntudp_bufcreate)
+#else
+libc_hidden_nolink (__libc_clntudp_bufcreate, GLIBC_PRIVATE)
+#endif
CLIENT *
clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version,
struct timeval wait, int *sockp, u_int sendsz,
u_int recvsz)
{
- return INTUSE(__libc_clntudp_bufcreate) (raddr, program, version, wait,
- sockp, sendsz, recvsz, 0);
+ return __libc_clntudp_bufcreate (raddr, program, version, wait,
+ sockp, sendsz, recvsz, 0);
}
-INTDEF (clntudp_bufcreate)
+libc_hidden_nolink (clntudp_bufcreate, GLIBC_2_0)
CLIENT *
clntudp_create (raddr, program, version, wait, sockp)
@@ -258,10 +261,14 @@ clntudp_create (raddr, program, version, wait, sockp)
struct timeval wait;
int *sockp;
{
- return INTUSE(__libc_clntudp_bufcreate) (raddr, program, version, wait,
- sockp, UDPMSGSIZE, UDPMSGSIZE, 0);
+ return __libc_clntudp_bufcreate (raddr, program, version, wait,
+ sockp, UDPMSGSIZE, UDPMSGSIZE, 0);
}
-INTDEF (clntudp_create)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (clntudp_create)
+#else
+libc_hidden_nolink (clntudp_create, GLIBC_2_0)
+#endif
static int
is_network_up (int sock)
@@ -465,7 +472,7 @@ send_again:
continue;
/* see if reply transaction id matches sent id.
- Don't do this if we only wait for a replay */
+ Don't do this if we only wait for a replay */
if (xargs != NULL
&& (*((u_int32_t *) (cu->cu_inbuf))
!= *((u_int32_t *) (cu->cu_outbuf))))
@@ -477,8 +484,8 @@ send_again:
/*
* now decode and validate the response
*/
- INTUSE(xdrmem_create) (&reply_xdrs, cu->cu_inbuf, (u_int) inlen, XDR_DECODE);
- ok = INTUSE(xdr_replymsg) (&reply_xdrs, &reply_msg);
+ xdrmem_create (&reply_xdrs, cu->cu_inbuf, (u_int) inlen, XDR_DECODE);
+ ok = xdr_replymsg (&reply_xdrs, &reply_msg);
/* XDR_DESTROY(&reply_xdrs); save a few cycles on noop destroy */
if (ok)
{
@@ -494,8 +501,7 @@ send_again:
if (reply_msg.acpted_rply.ar_verf.oa_base != NULL)
{
xdrs->x_op = XDR_FREE;
- (void) INTUSE(xdr_opaque_auth) (xdrs,
- &(reply_msg.acpted_rply.ar_verf));
+ (void) xdr_opaque_auth (xdrs, &(reply_msg.acpted_rply.ar_verf));
}
} /* end successful completion */
else
diff --git a/libc/sunrpc/clnt_unix.c b/libc/sunrpc/clnt_unix.c
index 02b14893d..5d361b303 100644
--- a/libc/sunrpc/clnt_unix.c
+++ b/libc/sunrpc/clnt_unix.c
@@ -173,9 +173,8 @@ clntunix_create (struct sockaddr_un *raddr, u_long prog, u_long vers,
/*
* pre-serialize the static part of the call msg and stash it away
*/
- INTUSE(xdrmem_create) (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE,
- XDR_ENCODE);
- if (!INTUSE(xdr_callhdr) (&(ct->ct_xdrs), &call_msg))
+ xdrmem_create (&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE, XDR_ENCODE);
+ if (!xdr_callhdr (&(ct->ct_xdrs), &call_msg))
{
if (ct->ct_closeit)
__close (*sockp);
@@ -188,11 +187,11 @@ clntunix_create (struct sockaddr_un *raddr, u_long prog, u_long vers,
* Create a client handle which uses xdrrec for serialization
* and authnone for authentication.
*/
- INTUSE(xdrrec_create) (&(ct->ct_xdrs), sendsz, recvsz,
- (caddr_t) ct, readunix, writeunix);
+ xdrrec_create (&(ct->ct_xdrs), sendsz, recvsz,
+ (caddr_t) ct, readunix, writeunix);
h->cl_ops = (struct clnt_ops *) &unix_ops;
h->cl_private = (caddr_t) ct;
- h->cl_auth = INTUSE(authnone_create) ();
+ h->cl_auth = authnone_create ();
return h;
fooy:
@@ -203,7 +202,7 @@ fooy:
mem_free ((caddr_t) h, sizeof (CLIENT));
return (CLIENT *) NULL;
}
-INTDEF (clntunix_create)
+libc_hidden_nolink (clntunix_create, GLIBC_2_1)
static enum clnt_stat
clntunix_call (h, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout)
@@ -243,10 +242,10 @@ call_again:
{
if (ct->ct_error.re_status == RPC_SUCCESS)
ct->ct_error.re_status = RPC_CANTENCODEARGS;
- (void) INTUSE(xdrrec_endofrecord) (xdrs, TRUE);
+ (void) xdrrec_endofrecord (xdrs, TRUE);
return ct->ct_error.re_status;
}
- if (!INTUSE(xdrrec_endofrecord) (xdrs, shipnow))
+ if (!xdrrec_endofrecord (xdrs, shipnow))
return ct->ct_error.re_status = RPC_CANTSEND;
if (!shipnow)
return RPC_SUCCESS;
@@ -265,11 +264,11 @@ call_again:
{
reply_msg.acpted_rply.ar_verf = _null_auth;
reply_msg.acpted_rply.ar_results.where = NULL;
- reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)INTUSE(xdr_void);
- if (!INTUSE(xdrrec_skiprecord) (xdrs))
+ reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void;
+ if (!xdrrec_skiprecord (xdrs))
return ct->ct_error.re_status;
/* now decode and validate the response header */
- if (!INTUSE(xdr_replymsg) (xdrs, &reply_msg))
+ if (!xdr_replymsg (xdrs, &reply_msg))
{
if (ct->ct_error.re_status == RPC_SUCCESS)
continue;
@@ -299,8 +298,7 @@ call_again:
if (reply_msg.acpted_rply.ar_verf.oa_base != NULL)
{
xdrs->x_op = XDR_FREE;
- (void) INTUSE(xdr_opaque_auth) (xdrs,
- &(reply_msg.acpted_rply.ar_verf));
+ (void) xdr_opaque_auth (xdrs, &(reply_msg.acpted_rply.ar_verf));
}
} /* end successful completion */
else
@@ -549,18 +547,18 @@ readunix (char *ctptr, char *buf, int len)
while (TRUE)
{
switch (__poll (&fd, 1, milliseconds))
- {
- case 0:
- ct->ct_error.re_status = RPC_TIMEDOUT;
- return -1;
-
- case -1:
- if (errno == EINTR)
- continue;
- ct->ct_error.re_status = RPC_CANTRECV;
- ct->ct_error.re_errno = errno;
- return -1;
- }
+ {
+ case 0:
+ ct->ct_error.re_status = RPC_TIMEDOUT;
+ return -1;
+
+ case -1:
+ if (errno == EINTR)
+ continue;
+ ct->ct_error.re_status = RPC_CANTRECV;
+ ct->ct_error.re_errno = errno;
+ return -1;
+ }
break;
}
switch (len = __msgread (ct->ct_sock, buf, len))
diff --git a/libc/sunrpc/des_crypt.c b/libc/sunrpc/des_crypt.c
index 57dce6ae8..8745900b8 100644
--- a/libc/sunrpc/des_crypt.c
+++ b/libc/sunrpc/des_crypt.c
@@ -32,6 +32,7 @@
#include <sys/types.h>
#include <rpc/des_crypt.h>
+#include <abi-versions.h>
#include "des.h"
extern int _des_crypt (char *, unsigned, struct desparams *);
@@ -101,7 +102,7 @@ cbc_crypt (char *key, char *buf, unsigned int len, unsigned int mode,
COPY8 (dp.des_ivec, ivec);
return err;
}
-libc_hidden_def (cbc_crypt)
+libc_hidden_nolink (cbc_crypt, GLIBC_2_1)
/*
* ECB mode encryption
@@ -114,4 +115,4 @@ ecb_crypt (char *key, char *buf, unsigned int len, unsigned int mode)
dp.des_mode = ECB;
return common_crypt (key, buf, len, mode, &dp);
}
-libc_hidden_def (ecb_crypt)
+libc_hidden_nolink (ecb_crypt, GLIBC_2_1)
diff --git a/libc/sunrpc/des_soft.c b/libc/sunrpc/des_soft.c
index 20a3214da..27d918c64 100644
--- a/libc/sunrpc/des_soft.c
+++ b/libc/sunrpc/des_soft.c
@@ -32,6 +32,7 @@ static char sccsid[] = "@(#)des_soft.c 2.2 88/08/10 4.0 RPCSRC; from 1.13 88/02/
*/
#include <rpc/des_crypt.h>
+#include <abi-versions.h>
/*
* Table giving odd parity in the low bit for ASCII characters
*/
@@ -69,4 +70,4 @@ des_setparity (char *p)
p++;
}
}
-libc_hidden_def (des_setparity)
+libc_hidden_nolink (des_setparity, GLIBC_2_1)
diff --git a/libc/sunrpc/get_myaddr.c b/libc/sunrpc/get_myaddr.c
index 1906cfad4..def5b7a74 100644
--- a/libc/sunrpc/get_myaddr.c
+++ b/libc/sunrpc/get_myaddr.c
@@ -96,3 +96,8 @@ get_myaddress (struct sockaddr_in *addr)
if no interface is up. Probably this won't happen (at least
loopback is there) but still... */
}
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (get_myaddress)
+#else
+libc_hidden_nolink (get_myaddress, GLIBC_2_0)
+#endif
diff --git a/libc/sunrpc/key_call.c b/libc/sunrpc/key_call.c
index 4ab6b97bc..6d08bf8e8 100644
--- a/libc/sunrpc/key_call.c
+++ b/libc/sunrpc/key_call.c
@@ -70,8 +70,8 @@ key_setsecret (char *secretkey)
{
keystatus status;
- if (!key_call ((u_long) KEY_SET, (xdrproc_t) INTUSE(xdr_keybuf), secretkey,
- (xdrproc_t) INTUSE(xdr_keystatus), (char *) &status))
+ if (!key_call ((u_long) KEY_SET, (xdrproc_t) xdr_keybuf, secretkey,
+ (xdrproc_t) xdr_keystatus, (char *) &status))
return -1;
if (status != KEY_SUCCESS)
{
@@ -80,6 +80,7 @@ key_setsecret (char *secretkey)
}
return 0;
}
+libc_hidden_nolink (key_setsecret, GLIBC_2_1)
/* key_secretkey_is_set() returns 1 if the keyserver has a secret key
* stored for the caller's effective uid; it returns 0 otherwise
@@ -93,8 +94,8 @@ key_secretkey_is_set (void)
struct key_netstres kres;
memset (&kres, 0, sizeof (kres));
- if (key_call ((u_long) KEY_NET_GET, (xdrproc_t) INTUSE(xdr_void),
- (char *) NULL, (xdrproc_t) INTUSE(xdr_key_netstres),
+ if (key_call ((u_long) KEY_NET_GET, (xdrproc_t) xdr_void,
+ (char *) NULL, (xdrproc_t) xdr_key_netstres,
(char *) &kres) &&
(kres.status == KEY_SUCCESS) &&
(kres.key_netstres_u.knet.st_priv_key[0] != 0))
@@ -105,6 +106,11 @@ key_secretkey_is_set (void)
}
return 0;
}
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (key_secretkey_is_set)
+#else
+libc_hidden_nolink (key_secretkey_is_set, GLIBC_2_1)
+#endif
int
key_encryptsession (char *remotename, des_block *deskey)
@@ -114,8 +120,8 @@ key_encryptsession (char *remotename, des_block *deskey)
arg.remotename = remotename;
arg.deskey = *deskey;
- if (!key_call ((u_long) KEY_ENCRYPT, (xdrproc_t) INTUSE(xdr_cryptkeyarg),
- (char *) &arg, (xdrproc_t) INTUSE(xdr_cryptkeyres),
+ if (!key_call ((u_long) KEY_ENCRYPT, (xdrproc_t) xdr_cryptkeyarg,
+ (char *) &arg, (xdrproc_t) xdr_cryptkeyres,
(char *) &res))
return -1;
@@ -127,6 +133,7 @@ key_encryptsession (char *remotename, des_block *deskey)
*deskey = res.cryptkeyres_u.deskey;
return 0;
}
+libc_hidden_nolink (key_encryptsession, GLIBC_2_1)
int
key_decryptsession (char *remotename, des_block *deskey)
@@ -136,8 +143,8 @@ key_decryptsession (char *remotename, des_block *deskey)
arg.remotename = remotename;
arg.deskey = *deskey;
- if (!key_call ((u_long) KEY_DECRYPT, (xdrproc_t) INTUSE(xdr_cryptkeyarg),
- (char *) &arg, (xdrproc_t) INTUSE(xdr_cryptkeyres),
+ if (!key_call ((u_long) KEY_DECRYPT, (xdrproc_t) xdr_cryptkeyarg,
+ (char *) &arg, (xdrproc_t) xdr_cryptkeyres,
(char *) &res))
return -1;
if (res.status != KEY_SUCCESS)
@@ -148,6 +155,7 @@ key_decryptsession (char *remotename, des_block *deskey)
*deskey = res.cryptkeyres_u.deskey;
return 0;
}
+libc_hidden_nolink (key_decryptsession, GLIBC_2_1)
int
key_encryptsession_pk (char *remotename, netobj *remotekey,
@@ -159,8 +167,8 @@ key_encryptsession_pk (char *remotename, netobj *remotekey,
arg.remotename = remotename;
arg.remotekey = *remotekey;
arg.deskey = *deskey;
- if (!key_call ((u_long) KEY_ENCRYPT_PK, (xdrproc_t) INTUSE(xdr_cryptkeyarg2),
- (char *) &arg, (xdrproc_t) INTUSE(xdr_cryptkeyres),
+ if (!key_call ((u_long) KEY_ENCRYPT_PK, (xdrproc_t) xdr_cryptkeyarg2,
+ (char *) &arg, (xdrproc_t) xdr_cryptkeyres,
(char *) &res))
return -1;
@@ -172,7 +180,7 @@ key_encryptsession_pk (char *remotename, netobj *remotekey,
*deskey = res.cryptkeyres_u.deskey;
return 0;
}
-libc_hidden_def (key_encryptsession_pk)
+libc_hidden_nolink (key_encryptsession_pk, GLIBC_2_1)
int
key_decryptsession_pk (char *remotename, netobj *remotekey,
@@ -184,8 +192,8 @@ key_decryptsession_pk (char *remotename, netobj *remotekey,
arg.remotename = remotename;
arg.remotekey = *remotekey;
arg.deskey = *deskey;
- if (!key_call ((u_long) KEY_DECRYPT_PK, (xdrproc_t) INTUSE(xdr_cryptkeyarg2),
- (char *) &arg, (xdrproc_t) INTUSE(xdr_cryptkeyres),
+ if (!key_call ((u_long) KEY_DECRYPT_PK, (xdrproc_t) xdr_cryptkeyarg2,
+ (char *) &arg, (xdrproc_t) xdr_cryptkeyres,
(char *) &res))
return -1;
@@ -197,7 +205,7 @@ key_decryptsession_pk (char *remotename, netobj *remotekey,
*deskey = res.cryptkeyres_u.deskey;
return 0;
}
-libc_hidden_def (key_decryptsession_pk)
+libc_hidden_nolink (key_decryptsession_pk, GLIBC_2_1)
int
key_gendes (des_block *key)
@@ -212,14 +220,14 @@ key_gendes (des_block *key)
sin.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
__bzero (sin.sin_zero, sizeof (sin.sin_zero));
socket = RPC_ANYSOCK;
- client = INTUSE(clntudp_bufcreate) (&sin, (u_long) KEY_PROG,
- (u_long) KEY_VERS, trytimeout, &socket,
- RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
+ client = clntudp_bufcreate (&sin, (u_long) KEY_PROG, (u_long) KEY_VERS,
+ trytimeout, &socket, RPCSMALLMSGSIZE,
+ RPCSMALLMSGSIZE);
if (client == NULL)
return -1;
- stat = clnt_call (client, KEY_GEN, (xdrproc_t) INTUSE(xdr_void), NULL,
- (xdrproc_t) INTUSE(xdr_des_block), (caddr_t) key,
+ stat = clnt_call (client, KEY_GEN, (xdrproc_t) xdr_void, NULL,
+ (xdrproc_t) xdr_des_block, (caddr_t) key,
tottimeout);
clnt_destroy (client);
__close (socket);
@@ -228,15 +236,19 @@ key_gendes (des_block *key)
return 0;
}
+#ifdef EXPORT_RPC_SYMBOLS
libc_hidden_def (key_gendes)
+#else
+libc_hidden_nolink (key_gendes, GLIBC_2_1)
+#endif
int
key_setnet (struct key_netstarg *arg)
{
keystatus status;
- if (!key_call ((u_long) KEY_NET_PUT, (xdrproc_t) INTUSE(xdr_key_netstarg),
- (char *) arg,(xdrproc_t) INTUSE(xdr_keystatus),
+ if (!key_call ((u_long) KEY_NET_PUT, (xdrproc_t) xdr_key_netstarg,
+ (char *) arg,(xdrproc_t) xdr_keystatus,
(char *) &status))
return -1;
@@ -247,14 +259,15 @@ key_setnet (struct key_netstarg *arg)
}
return 1;
}
+libc_hidden_nolink (key_setnet, GLIBC_2_1)
int
key_get_conv (char *pkey, des_block *deskey)
{
cryptkeyres res;
- if (!key_call ((u_long) KEY_GET_CONV, (xdrproc_t) INTUSE(xdr_keybuf), pkey,
- (xdrproc_t) INTUSE(xdr_cryptkeyres), (char *) &res))
+ if (!key_call ((u_long) KEY_GET_CONV, (xdrproc_t) xdr_keybuf, pkey,
+ (xdrproc_t) xdr_cryptkeyres, (char *) &res))
return -1;
if (res.status != KEY_SUCCESS)
@@ -265,6 +278,7 @@ key_get_conv (char *pkey, des_block *deskey)
*deskey = res.cryptkeyres_u.deskey;
return 0;
}
+libc_hidden_nolink (key_get_conv, GLIBC_2_1)
/*
* Hack to allow the keyserver to use AUTH_DES (for authenticated
@@ -322,7 +336,7 @@ key_call_keyenvoy (u_long proc, xdrproc_t xdr_arg, char *arg,
xdrstdio_create (&xdrargs, fargs, XDR_ENCODE);
xdrstdio_create (&xdrrslt, frslt, XDR_DECODE);
- if (!INTUSE(xdr_u_long) (&xdrargs, &proc) || !(*xdr_arg) (&xdrargs, arg))
+ if (!xdr_u_long (&xdrargs, &proc) || !(*xdr_arg) (&xdrargs, arg))
{
debug ("xdr args");
success = 0;
@@ -421,16 +435,16 @@ getkeyserv_handle (int vers)
/* if uid has changed, build client handle again */
if (kcp->uid != __geteuid ())
{
- kcp->uid = __geteuid ();
- auth_destroy (kcp->client->cl_auth);
- kcp->client->cl_auth =
- INTUSE(authunix_create) ((char *)"", kcp->uid, 0, 0, NULL);
- if (kcp->client->cl_auth == NULL)
- {
- clnt_destroy (kcp->client);
- kcp->client = NULL;
- return ((CLIENT *) NULL);
- }
+ kcp->uid = __geteuid ();
+ auth_destroy (kcp->client->cl_auth);
+ kcp->client->cl_auth =
+ authunix_create ((char *)"", kcp->uid, 0, 0, NULL);
+ if (kcp->client->cl_auth == NULL)
+ {
+ clnt_destroy (kcp->client);
+ kcp->client = NULL;
+ return ((CLIENT *) NULL);
+ }
}
/* Change the version number to the new one */
clnt_control (kcp->client, CLSET_VERS, (void *)&vers);
@@ -439,16 +453,14 @@ getkeyserv_handle (int vers)
if ((kcp->client == (CLIENT *) NULL))
/* Use the AF_UNIX transport */
- kcp->client = INTUSE(clnt_create) ("/var/run/keyservsock", KEY_PROG, vers,
- "unix");
+ kcp->client = clnt_create ("/var/run/keyservsock", KEY_PROG, vers, "unix");
if (kcp->client == (CLIENT *) NULL)
return (CLIENT *) NULL;
kcp->uid = __geteuid ();
kcp->pid = __getpid ();
- kcp->client->cl_auth = INTUSE(authunix_create) ((char *)"", kcp->uid, 0, 0,
- NULL);
+ kcp->client->cl_auth = authunix_create ((char *)"", kcp->uid, 0, 0, NULL);
if (kcp->client->cl_auth == NULL)
{
clnt_destroy (kcp->client);
@@ -470,7 +482,7 @@ getkeyserv_handle (int vers)
static int
internal_function
key_call_socket (u_long proc, xdrproc_t xdr_arg, char *arg,
- xdrproc_t xdr_rslt, char *rslt)
+ xdrproc_t xdr_rslt, char *rslt)
{
CLIENT *clnt;
struct timeval wait_time;
diff --git a/libc/sunrpc/key_prot.c b/libc/sunrpc/key_prot.c
index 8592bee9a..dd73f5e3c 100644
--- a/libc/sunrpc/key_prot.c
+++ b/libc/sunrpc/key_prot.c
@@ -28,73 +28,73 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "rpc/key_prot.h"
+#include <rpc/key_prot.h>
bool_t
xdr_keystatus (XDR * xdrs, keystatus * objp)
{
- if (!INTUSE(xdr_enum) (xdrs, (enum_t *) objp))
+ if (!xdr_enum (xdrs, (enum_t *) objp))
return FALSE;
return TRUE;
}
-INTDEF(xdr_keystatus)
+libc_hidden_nolink (xdr_keystatus, GLIBC_2_0)
bool_t
xdr_keybuf (XDR * xdrs, keybuf objp)
{
- if (!INTUSE(xdr_opaque) (xdrs, objp, HEXKEYBYTES))
+ if (!xdr_opaque (xdrs, objp, HEXKEYBYTES))
return FALSE;
return TRUE;
}
-INTDEF(xdr_keybuf)
+libc_hidden_nolink (xdr_keybuf, GLIBC_2_0)
bool_t
xdr_netnamestr (XDR * xdrs, netnamestr * objp)
{
- if (!INTUSE(xdr_string) (xdrs, objp, MAXNETNAMELEN))
+ if (!xdr_string (xdrs, objp, MAXNETNAMELEN))
return FALSE;
return TRUE;
}
-INTDEF(xdr_netnamestr)
+libc_hidden_nolink (xdr_netnamestr, GLIBC_2_1)
bool_t
xdr_cryptkeyarg (XDR * xdrs, cryptkeyarg * objp)
{
- if (!INTUSE(xdr_netnamestr) (xdrs, &objp->remotename))
+ if (!xdr_netnamestr (xdrs, &objp->remotename))
return FALSE;
- if (!INTUSE(xdr_des_block) (xdrs, &objp->deskey))
+ if (!xdr_des_block (xdrs, &objp->deskey))
return FALSE;
return TRUE;
}
-INTDEF(xdr_cryptkeyarg)
+libc_hidden_nolink (xdr_cryptkeyarg, GLIBC_2_0)
bool_t
xdr_cryptkeyarg2 (XDR * xdrs, cryptkeyarg2 * objp)
{
- if (!INTUSE(xdr_netnamestr) (xdrs, &objp->remotename))
+ if (!xdr_netnamestr (xdrs, &objp->remotename))
return FALSE;
- if (!INTUSE(xdr_netobj) (xdrs, &objp->remotekey))
+ if (!xdr_netobj (xdrs, &objp->remotekey))
return FALSE;
- if (!INTUSE(xdr_des_block) (xdrs, &objp->deskey))
+ if (!xdr_des_block (xdrs, &objp->deskey))
return FALSE;
return TRUE;
}
-INTDEF(xdr_cryptkeyarg2)
+libc_hidden_nolink (xdr_cryptkeyarg2, GLIBC_2_0)
bool_t
xdr_cryptkeyres (XDR * xdrs, cryptkeyres * objp)
{
- if (!INTUSE(xdr_keystatus) (xdrs, &objp->status))
+ if (!xdr_keystatus (xdrs, &objp->status))
return FALSE;
switch (objp->status)
{
case KEY_SUCCESS:
- if (!INTUSE(xdr_des_block) (xdrs, &objp->cryptkeyres_u.deskey))
+ if (!xdr_des_block (xdrs, &objp->cryptkeyres_u.deskey))
return FALSE;
break;
default:
@@ -102,32 +102,32 @@ xdr_cryptkeyres (XDR * xdrs, cryptkeyres * objp)
}
return TRUE;
}
-INTDEF(xdr_cryptkeyres)
+libc_hidden_nolink (xdr_cryptkeyres, GLIBC_2_0)
bool_t
xdr_unixcred (XDR * xdrs, unixcred * objp)
{
- if (!INTUSE(xdr_u_int) (xdrs, &objp->uid))
+ if (!xdr_u_int (xdrs, &objp->uid))
return FALSE;
- if (!INTUSE(xdr_u_int) (xdrs, &objp->gid))
+ if (!xdr_u_int (xdrs, &objp->gid))
return FALSE;
- if (!INTUSE(xdr_array) (xdrs, (void *) &objp->gids.gids_val,
- (u_int *) & objp->gids.gids_len, MAXGIDS,
- sizeof (u_int), (xdrproc_t) INTUSE(xdr_u_int)))
+ if (!xdr_array (xdrs, (void *) &objp->gids.gids_val,
+ (u_int *) & objp->gids.gids_len, MAXGIDS,
+ sizeof (u_int), (xdrproc_t) xdr_u_int))
return FALSE;
return TRUE;
}
-INTDEF(xdr_unixcred)
+libc_hidden_nolink (xdr_unixcred, GLIBC_2_1)
bool_t
xdr_getcredres (XDR * xdrs, getcredres * objp)
{
- if (!INTUSE(xdr_keystatus) (xdrs, &objp->status))
+ if (!xdr_keystatus (xdrs, &objp->status))
return FALSE;
switch (objp->status)
{
case KEY_SUCCESS:
- if (!INTUSE(xdr_unixcred) (xdrs, &objp->getcredres_u.cred))
+ if (!xdr_unixcred (xdrs, &objp->getcredres_u.cred))
return FALSE;
break;
default:
@@ -135,29 +135,30 @@ xdr_getcredres (XDR * xdrs, getcredres * objp)
}
return TRUE;
}
+libc_hidden_nolink (xdr_getcredres, GLIBC_2_1)
bool_t
xdr_key_netstarg (XDR * xdrs, key_netstarg * objp)
{
- if (!INTUSE(xdr_keybuf) (xdrs, objp->st_priv_key))
+ if (!xdr_keybuf (xdrs, objp->st_priv_key))
return FALSE;
- if (!INTUSE(xdr_keybuf) (xdrs, objp->st_pub_key))
+ if (!xdr_keybuf (xdrs, objp->st_pub_key))
return FALSE;
- if (!INTUSE(xdr_netnamestr) (xdrs, &objp->st_netname))
+ if (!xdr_netnamestr (xdrs, &objp->st_netname))
return FALSE;
return TRUE;
}
-INTDEF(xdr_key_netstarg)
+libc_hidden_nolink (xdr_key_netstarg, GLIBC_2_0)
bool_t
xdr_key_netstres (XDR * xdrs, key_netstres * objp)
{
- if (!INTUSE(xdr_keystatus) (xdrs, &objp->status))
+ if (!xdr_keystatus (xdrs, &objp->status))
return FALSE;
switch (objp->status)
{
case KEY_SUCCESS:
- if (!INTUSE(xdr_key_netstarg) (xdrs, &objp->key_netstres_u.knet))
+ if (!xdr_key_netstarg (xdrs, &objp->key_netstres_u.knet))
return FALSE;
break;
default:
@@ -165,4 +166,4 @@ xdr_key_netstres (XDR * xdrs, key_netstres * objp)
}
return TRUE;
}
-INTDEF(xdr_key_netstres)
+libc_hidden_nolink (xdr_key_netstres, GLIBC_2_0)
diff --git a/libc/sunrpc/netname.c b/libc/sunrpc/netname.c
index 07ff768e6..e1f1cf68f 100644
--- a/libc/sunrpc/netname.c
+++ b/libc/sunrpc/netname.c
@@ -55,7 +55,7 @@ user2netname (char netname[MAXNETNAMELEN + 1], const uid_t uid,
netname[i - 1] = '\0';
return 1;
}
-libc_hidden_def (user2netname)
+libc_hidden_nolink (user2netname, GLIBC_2_1)
int
host2netname (char netname[MAXNETNAMELEN + 1], const char *host,
@@ -116,7 +116,11 @@ host2netname (char netname[MAXNETNAMELEN + 1], const char *host,
sprintf (netname, "%s.%s@%s", OPSYS, hostname, domainname);
return 1;
}
+#ifdef EXPORT_RPC_SYMBOLS
libc_hidden_def (host2netname)
+#else
+libc_hidden_nolink (host2netname, GLIBC_2_1)
+#endif
int
getnetname (char name[MAXNETNAMELEN + 1])
@@ -131,7 +135,7 @@ getnetname (char name[MAXNETNAMELEN + 1])
dummy = user2netname (name, uid, NULL);
return (dummy);
}
-libc_hidden_def (getnetname)
+libc_hidden_nolink (getnetname, GLIBC_2_1)
/* Type of the lookup function for netname2user. */
typedef int (*netname2user_function) (const char netname[MAXNETNAMELEN + 1],
@@ -181,7 +185,11 @@ netname2user (const char netname[MAXNETNAMELEN + 1], uid_t * uidp, gid_t * gidp,
return status == NSS_STATUS_SUCCESS;
}
+#ifdef EXPORT_RPC_SYMBOLS
libc_hidden_def (netname2user)
+#else
+libc_hidden_nolink (netname2user, GLIBC_2_1)
+#endif
int
netname2host (const char netname[MAXNETNAMELEN + 1], char *hostname,
@@ -208,3 +216,4 @@ netname2host (const char netname[MAXNETNAMELEN + 1], char *hostname,
return 1;
}
+libc_hidden_nolink (netname2host, GLIBC_2_1)
diff --git a/libc/sunrpc/pm_getmaps.c b/libc/sunrpc/pm_getmaps.c
index a62b3c73b..6b61d324f 100644
--- a/libc/sunrpc/pm_getmaps.c
+++ b/libc/sunrpc/pm_getmaps.c
@@ -43,6 +43,7 @@
#include <errno.h>
#include <libintl.h>
#include <unistd.h>
+#include <not-cancel.h>
/*
@@ -66,12 +67,11 @@ pmap_getmaps (struct sockaddr_in *address)
if (socket != -1)
closeit = true;
- client = INTUSE(clnttcp_create) (address, PMAPPROG,
- PMAPVERS, &socket, 50, 500);
+ client = clnttcp_create (address, PMAPPROG, PMAPVERS, &socket, 50, 500);
if (client != (CLIENT *) NULL)
{
- if (CLNT_CALL (client, PMAPPROC_DUMP, (xdrproc_t)INTUSE(xdr_void), NULL,
- (xdrproc_t)INTUSE(xdr_pmaplist), (caddr_t)&head,
+ if (CLNT_CALL (client, PMAPPROC_DUMP, (xdrproc_t)xdr_void, NULL,
+ (xdrproc_t)xdr_pmaplist, (caddr_t)&head,
minutetimeout) != RPC_SUCCESS)
{
clnt_perror (client, _("pmap_getmaps.c: rpc problem"));
@@ -80,7 +80,8 @@ pmap_getmaps (struct sockaddr_in *address)
}
/* We only need to close the socket here if we opened it. */
if (closeit)
- (void) __close (socket);
+ close_not_cancel (socket);
address->sin_port = 0;
return head;
}
+libc_hidden_nolink (pmap_getmaps, GLIBC_2_0)
diff --git a/libc/sunrpc/pm_getport.c b/libc/sunrpc/pm_getport.c
index da3477603..58974a566 100644
--- a/libc/sunrpc/pm_getport.c
+++ b/libc/sunrpc/pm_getport.c
@@ -107,13 +107,12 @@ __libc_rpc_getport (address, program, version, protocol, timeout_sec,
socket = __get_socket(address);
if (socket != -1)
closeit = true;
- client = INTUSE(clnttcp_create) (address, PMAPPROG, PMAPVERS, &socket,
- RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
+ client = clnttcp_create (address, PMAPPROG, PMAPVERS, &socket,
+ RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
}
else
- client = INTUSE(clntudp_bufcreate) (address, PMAPPROG, PMAPVERS, timeout,
- &socket, RPCSMALLMSGSIZE,
- RPCSMALLMSGSIZE);
+ client = clntudp_bufcreate (address, PMAPPROG, PMAPVERS, timeout,
+ &socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
if (client != (CLIENT *) NULL)
{
struct rpc_createerr *ce = &get_rpc_createerr ();
@@ -121,8 +120,8 @@ __libc_rpc_getport (address, program, version, protocol, timeout_sec,
parms.pm_vers = version;
parms.pm_prot = protocol;
parms.pm_port = 0; /* not needed or used */
- if (CLNT_CALL (client, PMAPPROC_GETPORT, (xdrproc_t)INTUSE(xdr_pmap),
- (caddr_t)&parms, (xdrproc_t)INTUSE(xdr_u_short),
+ if (CLNT_CALL (client, PMAPPROC_GETPORT, (xdrproc_t)xdr_pmap,
+ (caddr_t)&parms, (xdrproc_t)xdr_u_short,
(caddr_t)&port, tottimeout) != RPC_SUCCESS)
{
ce->cf_stat = RPC_PMAPFAILURE;
@@ -140,7 +139,11 @@ __libc_rpc_getport (address, program, version, protocol, timeout_sec,
address->sin_port = 0;
return port;
}
+#ifdef EXPORT_RPC_SYMBOLS
libc_hidden_def (__libc_rpc_getport)
+#else
+libc_hidden_nolink (__libc_rpc_getport, GLIBC_PRIVATE)
+#endif
/*
@@ -157,4 +160,4 @@ pmap_getport (address, program, version, protocol)
{
return __libc_rpc_getport (address, program, version, protocol, 5, 60);
}
-libc_hidden_def (pmap_getport)
+libc_hidden_nolink (pmap_getport, GLIBC_2_0)
diff --git a/libc/sunrpc/pmap_clnt.c b/libc/sunrpc/pmap_clnt.c
index 965469f52..36479f0e5 100644
--- a/libc/sunrpc/pmap_clnt.c
+++ b/libc/sunrpc/pmap_clnt.c
@@ -112,17 +112,16 @@ pmap_set (u_long program, u_long version, int protocol, u_short port)
if (!__get_myaddress (&myaddress))
return FALSE;
- client = INTUSE(clntudp_bufcreate) (&myaddress, PMAPPROG, PMAPVERS,
- timeout, &socket, RPCSMALLMSGSIZE,
- RPCSMALLMSGSIZE);
+ client = clntudp_bufcreate (&myaddress, PMAPPROG, PMAPVERS, timeout, &socket,
+ RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
if (client == (CLIENT *) NULL)
return (FALSE);
parms.pm_prog = program;
parms.pm_vers = version;
parms.pm_prot = protocol;
parms.pm_port = port;
- if (CLNT_CALL (client, PMAPPROC_SET, (xdrproc_t)INTUSE(xdr_pmap),
- (caddr_t)&parms, (xdrproc_t)INTUSE(xdr_bool), (caddr_t)&rslt,
+ if (CLNT_CALL (client, PMAPPROC_SET, (xdrproc_t)xdr_pmap,
+ (caddr_t)&parms, (xdrproc_t)xdr_bool, (caddr_t)&rslt,
tottimeout) != RPC_SUCCESS)
{
clnt_perror (client, _("Cannot register service"));
@@ -132,7 +131,7 @@ pmap_set (u_long program, u_long version, int protocol, u_short port)
/* (void)close(socket); CLNT_DESTROY closes it */
return rslt;
}
-libc_hidden_def (pmap_set)
+libc_hidden_nolink (pmap_set, GLIBC_2_0)
/*
* Remove the mapping between program,version and port.
@@ -149,19 +148,18 @@ pmap_unset (u_long program, u_long version)
if (!__get_myaddress (&myaddress))
return FALSE;
- client = INTUSE(clntudp_bufcreate) (&myaddress, PMAPPROG, PMAPVERS,
- timeout, &socket, RPCSMALLMSGSIZE,
- RPCSMALLMSGSIZE);
+ client = clntudp_bufcreate (&myaddress, PMAPPROG, PMAPVERS, timeout, &socket,
+ RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
if (client == (CLIENT *) NULL)
return FALSE;
parms.pm_prog = program;
parms.pm_vers = version;
parms.pm_port = parms.pm_prot = 0;
- CLNT_CALL (client, PMAPPROC_UNSET, (xdrproc_t)INTUSE(xdr_pmap),
- (caddr_t)&parms, (xdrproc_t)INTUSE(xdr_bool), (caddr_t)&rslt,
+ CLNT_CALL (client, PMAPPROC_UNSET, (xdrproc_t)xdr_pmap,
+ (caddr_t)&parms, (xdrproc_t)xdr_bool, (caddr_t)&rslt,
tottimeout);
CLNT_DESTROY (client);
/* (void)close(socket); CLNT_DESTROY already closed it */
return rslt;
}
-libc_hidden_def (pmap_unset)
+libc_hidden_nolink (pmap_unset, GLIBC_2_0)
diff --git a/libc/sunrpc/pmap_prot.c b/libc/sunrpc/pmap_prot.c
index 8362e128f..5a2e05272 100644
--- a/libc/sunrpc/pmap_prot.c
+++ b/libc/sunrpc/pmap_prot.c
@@ -43,10 +43,10 @@ xdr_pmap (xdrs, regs)
struct pmap *regs;
{
- if (INTUSE(xdr_u_long) (xdrs, &regs->pm_prog) &&
- INTUSE(xdr_u_long) (xdrs, &regs->pm_vers) &&
- INTUSE(xdr_u_long) (xdrs, &regs->pm_prot))
- return INTUSE(xdr_u_long) (xdrs, &regs->pm_port);
+ if (xdr_u_long (xdrs, &regs->pm_prog) &&
+ xdr_u_long (xdrs, &regs->pm_vers) &&
+ xdr_u_long (xdrs, &regs->pm_prot))
+ return xdr_u_long (xdrs, &regs->pm_port);
return FALSE;
}
-INTDEF(xdr_pmap)
+libc_hidden_nolink (xdr_pmap, GLIBC_2_0)
diff --git a/libc/sunrpc/pmap_prot2.c b/libc/sunrpc/pmap_prot2.c
index bd180bce8..3213898ce 100644
--- a/libc/sunrpc/pmap_prot2.c
+++ b/libc/sunrpc/pmap_prot2.c
@@ -92,7 +92,7 @@ xdr_pmaplist (xdrs, rp)
while (TRUE)
{
more_elements = (bool_t) (*rp != NULL);
- if (!INTUSE(xdr_bool) (xdrs, &more_elements))
+ if (!xdr_bool (xdrs, &more_elements))
return FALSE;
if (!more_elements)
return TRUE; /* we are done */
@@ -103,11 +103,11 @@ xdr_pmaplist (xdrs, rp)
*/
if (freeing)
next = (*rp)->pml_next;
- if (!INTUSE(xdr_reference) (xdrs, (caddr_t *) rp,
- (u_int) sizeof (struct pmaplist),
- (xdrproc_t) INTUSE(xdr_pmap)))
+ if (!xdr_reference (xdrs, (caddr_t *) rp,
+ (u_int) sizeof (struct pmaplist),
+ (xdrproc_t) xdr_pmap))
return FALSE;
rp = freeing ? &next : &((*rp)->pml_next);
}
}
-INTDEF(xdr_pmaplist)
+libc_hidden_nolink (xdr_pmaplist, GLIBC_2_0)
diff --git a/libc/sunrpc/pmap_rmt.c b/libc/sunrpc/pmap_rmt.c
index c07b4b189..16f322773 100644
--- a/libc/sunrpc/pmap_rmt.c
+++ b/libc/sunrpc/pmap_rmt.c
@@ -79,7 +79,7 @@ pmap_rmtcall (addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_p
enum clnt_stat stat;
addr->sin_port = htons (PMAPPORT);
- client = INTUSE(clntudp_create) (addr, PMAPPROG, PMAPVERS, timeout, &socket);
+ client = clntudp_create (addr, PMAPPROG, PMAPVERS, timeout, &socket);
if (client != (CLIENT *) NULL)
{
a.prog = prog;
@@ -91,8 +91,8 @@ pmap_rmtcall (addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_p
r.results_ptr = resp;
r.xdr_results = xdrres;
stat = CLNT_CALL (client, PMAPPROC_CALLIT,
- (xdrproc_t)INTUSE(xdr_rmtcall_args),
- (caddr_t)&a, (xdrproc_t)INTUSE(xdr_rmtcallres),
+ (xdrproc_t)xdr_rmtcall_args,
+ (caddr_t)&a, (xdrproc_t)xdr_rmtcallres,
(caddr_t)&r, tout);
CLNT_DESTROY (client);
}
@@ -104,6 +104,7 @@ pmap_rmtcall (addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_p
addr->sin_port = 0;
return stat;
}
+libc_hidden_nolink (pmap_rmtcall, GLIBC_2_0)
/*
@@ -115,13 +116,13 @@ xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap)
{
u_int lenposition, argposition, position;
- if (INTUSE(xdr_u_long) (xdrs, &(cap->prog)) &&
- INTUSE(xdr_u_long) (xdrs, &(cap->vers)) &&
- INTUSE(xdr_u_long) (xdrs, &(cap->proc)))
+ if (xdr_u_long (xdrs, &(cap->prog)) &&
+ xdr_u_long (xdrs, &(cap->vers)) &&
+ xdr_u_long (xdrs, &(cap->proc)))
{
u_long dummy_arglen = 0;
lenposition = XDR_GETPOS (xdrs);
- if (!INTUSE(xdr_u_long) (xdrs, &dummy_arglen))
+ if (!xdr_u_long (xdrs, &dummy_arglen))
return FALSE;
argposition = XDR_GETPOS (xdrs);
if (!(*(cap->xdr_args)) (xdrs, cap->args_ptr))
@@ -129,14 +130,14 @@ xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap)
position = XDR_GETPOS (xdrs);
cap->arglen = (u_long) position - (u_long) argposition;
XDR_SETPOS (xdrs, lenposition);
- if (!INTUSE(xdr_u_long) (xdrs, &(cap->arglen)))
+ if (!xdr_u_long (xdrs, &(cap->arglen)))
return FALSE;
XDR_SETPOS (xdrs, position);
return TRUE;
}
return FALSE;
}
-INTDEF(xdr_rmtcall_args)
+libc_hidden_nolink (xdr_rmtcall_args, GLIBC_2_0)
/*
* XDR remote call results
@@ -150,16 +151,16 @@ xdr_rmtcallres (xdrs, crp)
caddr_t port_ptr;
port_ptr = (caddr_t) crp->port_ptr;
- if (INTUSE(xdr_reference) (xdrs, &port_ptr, sizeof (u_long),
- (xdrproc_t) INTUSE(xdr_u_long))
- && INTUSE(xdr_u_long) (xdrs, &crp->resultslen))
+ if (xdr_reference (xdrs, &port_ptr, sizeof (u_long),
+ (xdrproc_t) xdr_u_long)
+ && xdr_u_long (xdrs, &crp->resultslen))
{
crp->port_ptr = (u_long *) port_ptr;
return (*(crp->xdr_results)) (xdrs, crp->results_ptr);
}
return FALSE;
}
-INTDEF(xdr_rmtcallres)
+libc_hidden_nolink (xdr_rmtcallres, GLIBC_2_0)
/*
@@ -212,7 +213,7 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
resultproc_t eachresult; /* call with each result obtained */
{
enum clnt_stat stat = RPC_FAILED;
- AUTH *unix_auth = INTUSE(authunix_create_default) ();
+ AUTH *unix_auth = authunix_create_default ();
XDR xdr_stream;
XDR *xdrs = &xdr_stream;
struct timeval t;
@@ -276,9 +277,9 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
r.port_ptr = &port;
r.xdr_results = xresults;
r.results_ptr = resultsp;
- INTUSE(xdrmem_create) (xdrs, outbuf, MAX_BROADCAST_SIZE, XDR_ENCODE);
- if ((!INTUSE(xdr_callmsg) (xdrs, &msg))
- || (!INTUSE(xdr_rmtcall_args) (xdrs, &a)))
+ xdrmem_create (xdrs, outbuf, MAX_BROADCAST_SIZE, XDR_ENCODE);
+ if ((!xdr_callmsg (xdrs, &msg))
+ || (!xdr_rmtcall_args (xdrs, &a)))
{
stat = RPC_CANTENCODEARGS;
goto done_broad;
@@ -311,7 +312,7 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
recv_again:
msg.acpted_rply.ar_verf = _null_auth;
msg.acpted_rply.ar_results.where = (caddr_t) & r;
- msg.acpted_rply.ar_results.proc = (xdrproc_t) INTUSE(xdr_rmtcallres);
+ msg.acpted_rply.ar_results.proc = (xdrproc_t) xdr_rmtcallres;
milliseconds = t.tv_sec * 1000 + t.tv_usec / 1000;
switch (__poll(&fd, 1, milliseconds))
{
@@ -346,8 +347,8 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
* see if reply transaction id matches sent id.
* If so, decode the results.
*/
- INTUSE(xdrmem_create) (xdrs, inbuf, (u_int) inlen, XDR_DECODE);
- if (INTUSE(xdr_replymsg) (xdrs, &msg))
+ xdrmem_create (xdrs, inbuf, (u_int) inlen, XDR_DECODE);
+ if (xdr_replymsg (xdrs, &msg))
{
if (((u_int32_t) msg.rm_xid == (u_int32_t) xid) &&
(msg.rm_reply.rp_stat == MSG_ACCEPTED) &&
@@ -368,8 +369,8 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
#endif
}
xdrs->x_op = XDR_FREE;
- msg.acpted_rply.ar_results.proc = (xdrproc_t)INTUSE(xdr_void);
- (void) INTUSE(xdr_replymsg) (xdrs, &msg);
+ msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void;
+ (void) xdr_replymsg (xdrs, &msg);
(void) (*xresults) (xdrs, resultsp);
xdr_destroy (xdrs);
if (done)
@@ -387,3 +388,4 @@ done_broad:
AUTH_DESTROY (unix_auth);
return stat;
}
+libc_hidden_nolink (clnt_broadcast, GLIBC_2_0)
diff --git a/libc/sunrpc/publickey.c b/libc/sunrpc/publickey.c
index dbadacaec..9e44199dd 100644
--- a/libc/sunrpc/publickey.c
+++ b/libc/sunrpc/publickey.c
@@ -76,7 +76,7 @@ getpublickey (const char *name, char *key)
return status == NSS_STATUS_SUCCESS;
}
-libc_hidden_def (getpublickey)
+libc_hidden_nolink (getpublickey, GLIBC_2_0)
int
@@ -119,3 +119,4 @@ getsecretkey (const char *name, char *key, const char *passwd)
return status == NSS_STATUS_SUCCESS;
}
+libc_hidden_nolink (getsecretkey, GLIBC_2_0)
diff --git a/libc/sunrpc/rpc_cmsg.c b/libc/sunrpc/rpc_cmsg.c
index 2fe401c0a..ed70104b6 100644
--- a/libc/sunrpc/rpc_cmsg.c
+++ b/libc/sunrpc/rpc_cmsg.c
@@ -125,8 +125,8 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
buf = XDR_INLINE (xdrs, RNDUP (oa->oa_length));
if (buf == NULL)
{
- if (INTUSE(xdr_opaque) (xdrs, oa->oa_base,
- oa->oa_length) == FALSE)
+ if (xdr_opaque (xdrs, oa->oa_base,
+ oa->oa_length) == FALSE)
return FALSE;
}
else
@@ -142,8 +142,8 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
buf = XDR_INLINE (xdrs, 2 * BYTES_PER_XDR_UNIT);
if (buf == NULL)
{
- if (INTUSE(xdr_enum) (xdrs, &oa->oa_flavor) == FALSE ||
- INTUSE(xdr_u_int) (xdrs, &oa->oa_length) == FALSE)
+ if (xdr_enum (xdrs, &oa->oa_flavor) == FALSE ||
+ xdr_u_int (xdrs, &oa->oa_length) == FALSE)
{
return FALSE;
}
@@ -165,8 +165,8 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
buf = XDR_INLINE (xdrs, RNDUP (oa->oa_length));
if (buf == NULL)
{
- if (INTUSE(xdr_opaque) (xdrs, oa->oa_base,
- oa->oa_length) == FALSE)
+ if (xdr_opaque (xdrs, oa->oa_base,
+ oa->oa_length) == FALSE)
return FALSE;
}
else
@@ -182,16 +182,16 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
}
}
if (
- INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_xid)) &&
- INTUSE(xdr_enum) (xdrs, (enum_t *) & (cmsg->rm_direction)) &&
+ xdr_u_long (xdrs, &(cmsg->rm_xid)) &&
+ xdr_enum (xdrs, (enum_t *) & (cmsg->rm_direction)) &&
(cmsg->rm_direction == CALL) &&
- INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
+ xdr_u_long (xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
(cmsg->rm_call.cb_rpcvers == RPC_MSG_VERSION) &&
- INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_prog)) &&
- INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_vers)) &&
- INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_proc)) &&
- INTUSE(xdr_opaque_auth) (xdrs, &(cmsg->rm_call.cb_cred)))
- return INTUSE(xdr_opaque_auth) (xdrs, &(cmsg->rm_call.cb_verf));
+ xdr_u_long (xdrs, &(cmsg->rm_call.cb_prog)) &&
+ xdr_u_long (xdrs, &(cmsg->rm_call.cb_vers)) &&
+ xdr_u_long (xdrs, &(cmsg->rm_call.cb_proc)) &&
+ xdr_opaque_auth (xdrs, &(cmsg->rm_call.cb_cred)))
+ return xdr_opaque_auth (xdrs, &(cmsg->rm_call.cb_verf));
return FALSE;
}
-INTDEF(xdr_callmsg)
+libc_hidden_nolink (xdr_callmsg, GLIBC_2_0)
diff --git a/libc/sunrpc/rpc_common.c b/libc/sunrpc/rpc_common.c
index 90904025b..44b4b38f4 100644
--- a/libc/sunrpc/rpc_common.c
+++ b/libc/sunrpc/rpc_common.c
@@ -28,6 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <rpc/rpc.h>
+#include <shlib-compat.h>
#ifdef _RPC_THREAD_SAFE_
#undef svc_fdset
@@ -44,7 +45,7 @@
section but we cannot add const to the type because this isn't how
the variable is declared. So we use the section attribute. */
struct opaque_auth _null_auth __attribute__ ((nocommon));
-libc_hidden_def (_null_auth)
+libc_hidden_nolink (_null_auth, GLIBC_2_0)
fd_set svc_fdset;
struct rpc_createerr rpc_createerr;
struct pollfd *svc_pollfd;
diff --git a/libc/sunrpc/rpc_dtable.c b/libc/sunrpc/rpc_dtable.c
index 44faa9fb1..9bee21549 100644
--- a/libc/sunrpc/rpc_dtable.c
+++ b/libc/sunrpc/rpc_dtable.c
@@ -46,4 +46,4 @@ _rpc_dtablesize (void)
return size;
}
-libc_hidden_def (_rpc_dtablesize)
+libc_hidden_nolink (_rpc_dtablesize, GLIBC_2_0)
diff --git a/libc/sunrpc/rpc_prot.c b/libc/sunrpc/rpc_prot.c
index efbb35330..b19dff765 100644
--- a/libc/sunrpc/rpc_prot.c
+++ b/libc/sunrpc/rpc_prot.c
@@ -52,12 +52,12 @@ bool_t
xdr_opaque_auth (XDR *xdrs, struct opaque_auth *ap)
{
- if (INTUSE(xdr_enum) (xdrs, &(ap->oa_flavor)))
- return INTUSE(xdr_bytes) (xdrs, &ap->oa_base,
+ if (xdr_enum (xdrs, &(ap->oa_flavor)))
+ return xdr_bytes (xdrs, &ap->oa_base,
&ap->oa_length, MAX_AUTH_BYTES);
return FALSE;
}
-INTDEF(xdr_opaque_auth)
+libc_hidden_nolink (xdr_opaque_auth, GLIBC_2_0)
/*
* XDR a DES block
@@ -65,9 +65,9 @@ INTDEF(xdr_opaque_auth)
bool_t
xdr_des_block (XDR *xdrs, des_block *blkp)
{
- return INTUSE(xdr_opaque) (xdrs, (caddr_t) blkp, sizeof (des_block));
+ return xdr_opaque (xdrs, (caddr_t) blkp, sizeof (des_block));
}
-INTDEF(xdr_des_block)
+libc_hidden_nolink (xdr_des_block, GLIBC_2_0)
/* * * * * * * * * * * * * * XDR RPC MESSAGE * * * * * * * * * * * * * * * */
@@ -78,24 +78,24 @@ bool_t
xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar)
{
/* personalized union, rather than calling xdr_union */
- if (!INTUSE(xdr_opaque_auth) (xdrs, &(ar->ar_verf)))
+ if (!xdr_opaque_auth (xdrs, &(ar->ar_verf)))
return FALSE;
- if (!INTUSE(xdr_enum) (xdrs, (enum_t *) & (ar->ar_stat)))
+ if (!xdr_enum (xdrs, (enum_t *) & (ar->ar_stat)))
return FALSE;
switch (ar->ar_stat)
{
case SUCCESS:
return ((*(ar->ar_results.proc)) (xdrs, ar->ar_results.where));
case PROG_MISMATCH:
- if (!INTUSE(xdr_u_long) (xdrs, &(ar->ar_vers.low)))
+ if (!xdr_u_long (xdrs, &(ar->ar_vers.low)))
return FALSE;
- return (INTUSE(xdr_u_long) (xdrs, &(ar->ar_vers.high)));
+ return (xdr_u_long (xdrs, &(ar->ar_vers.high)));
default:
return TRUE;
}
return TRUE; /* TRUE => open ended set of problems */
}
-INTDEF(xdr_accepted_reply)
+libc_hidden_nolink (xdr_accepted_reply, GLIBC_2_0)
/*
* XDR the MSG_DENIED part of a reply message union
@@ -104,26 +104,26 @@ bool_t
xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr)
{
/* personalized union, rather than calling xdr_union */
- if (!INTUSE(xdr_enum) (xdrs, (enum_t *) & (rr->rj_stat)))
+ if (!xdr_enum (xdrs, (enum_t *) & (rr->rj_stat)))
return FALSE;
switch (rr->rj_stat)
{
case RPC_MISMATCH:
- if (!INTUSE(xdr_u_long) (xdrs, &(rr->rj_vers.low)))
+ if (!xdr_u_long (xdrs, &(rr->rj_vers.low)))
return FALSE;
- return INTUSE(xdr_u_long) (xdrs, &(rr->rj_vers.high));
+ return xdr_u_long (xdrs, &(rr->rj_vers.high));
case AUTH_ERROR:
- return INTUSE(xdr_enum) (xdrs, (enum_t *) & (rr->rj_why));
+ return xdr_enum (xdrs, (enum_t *) & (rr->rj_why));
}
return FALSE;
}
-INTDEF(xdr_rejected_reply)
+libc_hidden_nolink (xdr_rejected_reply, GLIBC_2_0)
static const struct xdr_discrim reply_dscrm[3] =
{
- {(int) MSG_ACCEPTED, (xdrproc_t) INTUSE(xdr_accepted_reply)},
- {(int) MSG_DENIED, (xdrproc_t) INTUSE(xdr_rejected_reply)},
+ {(int) MSG_ACCEPTED, (xdrproc_t) xdr_accepted_reply},
+ {(int) MSG_DENIED, (xdrproc_t) xdr_rejected_reply},
{__dontcare__, NULL_xdrproc_t}};
/*
@@ -134,15 +134,15 @@ xdr_replymsg (xdrs, rmsg)
XDR *xdrs;
struct rpc_msg *rmsg;
{
- if (INTUSE(xdr_u_long) (xdrs, &(rmsg->rm_xid)) &&
- INTUSE(xdr_enum) (xdrs, (enum_t *) & (rmsg->rm_direction)) &&
+ if (xdr_u_long (xdrs, &(rmsg->rm_xid)) &&
+ xdr_enum (xdrs, (enum_t *) & (rmsg->rm_direction)) &&
(rmsg->rm_direction == REPLY))
- return INTUSE(xdr_union) (xdrs, (enum_t *) & (rmsg->rm_reply.rp_stat),
- (caddr_t) & (rmsg->rm_reply.ru), reply_dscrm,
- NULL_xdrproc_t);
+ return xdr_union (xdrs, (enum_t *) & (rmsg->rm_reply.rp_stat),
+ (caddr_t) & (rmsg->rm_reply.ru), reply_dscrm,
+ NULL_xdrproc_t);
return FALSE;
}
-INTDEF(xdr_replymsg)
+libc_hidden_nolink (xdr_replymsg, GLIBC_2_0)
/*
@@ -160,14 +160,14 @@ xdr_callhdr (xdrs, cmsg)
cmsg->rm_call.cb_rpcvers = RPC_MSG_VERSION;
if (
(xdrs->x_op == XDR_ENCODE) &&
- INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_xid)) &&
- INTUSE(xdr_enum) (xdrs, (enum_t *) & (cmsg->rm_direction)) &&
- INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
- INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_prog)))
- return INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_vers));
+ xdr_u_long (xdrs, &(cmsg->rm_xid)) &&
+ xdr_enum (xdrs, (enum_t *) & (cmsg->rm_direction)) &&
+ xdr_u_long (xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
+ xdr_u_long (xdrs, &(cmsg->rm_call.cb_prog)))
+ return xdr_u_long (xdrs, &(cmsg->rm_call.cb_vers));
return FALSE;
}
-INTDEF(xdr_callhdr)
+libc_hidden_nolink (xdr_callhdr, GLIBC_2_0)
/* ************************** Client utility routine ************* */
@@ -277,4 +277,4 @@ _seterr_reply (struct rpc_msg *msg,
break;
}
}
-libc_hidden_def (_seterr_reply)
+libc_hidden_nolink (_seterr_reply, GLIBC_2_0)
diff --git a/libc/sunrpc/rpc_thread.c b/libc/sunrpc/rpc_thread.c
index 796bf086f..ac4c18fce 100644
--- a/libc/sunrpc/rpc_thread.c
+++ b/libc/sunrpc/rpc_thread.c
@@ -97,7 +97,7 @@ __rpc_thread_svc_fdset (void)
return &svc_fdset;
return &tvp->svc_fdset_s;
}
-libc_hidden_def (__rpc_thread_svc_fdset)
+libc_hidden_nolink (__rpc_thread_svc_fdset, GLIBC_2_2_3)
struct rpc_createerr *
__rpc_thread_createerr (void)
@@ -109,7 +109,7 @@ __rpc_thread_createerr (void)
return &rpc_createerr;
return &tvp->rpc_createerr_s;
}
-libc_hidden_def (__rpc_thread_createerr)
+libc_hidden_nolink (__rpc_thread_createerr, GLIBC_2_2_3)
struct pollfd **
__rpc_thread_svc_pollfd (void)
@@ -121,7 +121,11 @@ __rpc_thread_svc_pollfd (void)
return &svc_pollfd;
return &tvp->svc_pollfd_s;
}
+#ifdef EXPORT_RPC_SYMBOLS
libc_hidden_def (__rpc_thread_svc_pollfd)
+#else
+libc_hidden_nolink (__rpc_thread_svc_pollfd, GLIBC_2_2_3)
+#endif
int *
__rpc_thread_svc_max_pollfd (void)
@@ -133,6 +137,10 @@ __rpc_thread_svc_max_pollfd (void)
return &svc_max_pollfd;
return &tvp->svc_max_pollfd_s;
}
+#ifdef EXPORT_RPC_SYMBOLS
libc_hidden_def (__rpc_thread_svc_max_pollfd)
+#else
+libc_hidden_nolink (__rpc_thread_svc_max_pollfd, GLIBC_2_2_3)
+#endif
#endif /* _RPC_THREAD_SAFE_ */
diff --git a/libc/sunrpc/rtime.c b/libc/sunrpc/rtime.c
index 768c621e0..8506df554 100644
--- a/libc/sunrpc/rtime.c
+++ b/libc/sunrpc/rtime.c
@@ -140,4 +140,4 @@ rtime (struct sockaddr_in *addrp, struct rpc_timeval *timep,
timep->tv_usec = 0;
return 0;
}
-libc_hidden_def (rtime)
+libc_hidden_nolink (rtime, GLIBC_2_1)
diff --git a/libc/sunrpc/svc.c b/libc/sunrpc/svc.c
index f7454174a..e1f4a322e 100644
--- a/libc/sunrpc/svc.c
+++ b/libc/sunrpc/svc.c
@@ -115,7 +115,7 @@ xprt_register (SVCXPRT *xprt)
POLLRDNORM | POLLRDBAND);
}
}
-libc_hidden_def (xprt_register)
+libc_hidden_nolink (xprt_register, GLIBC_2_0)
/* De-activate a transport handle. */
void
@@ -136,7 +136,11 @@ xprt_unregister (SVCXPRT *xprt)
svc_pollfd[i].fd = -1;
}
}
+#ifdef EXPORT_RPC_SYMBOLS
libc_hidden_def (xprt_unregister)
+#else
+libc_hidden_nolink (xprt_unregister, GLIBC_2_0)
+#endif
/* ********************** CALLOUT list related stuff ************* */
@@ -211,7 +215,11 @@ pmap_it:
return TRUE;
}
+#ifdef EXPORT_RPC_SYMBOLS
libc_hidden_def (svc_register)
+#else
+libc_hidden_nolink (svc_register, GLIBC_2_0)
+#endif
/* Remove a service program from the callout list. */
void
@@ -234,7 +242,7 @@ svc_unregister (rpcprog_t prog, rpcvers_t vers)
if (! svc_is_mapped (prog, vers))
pmap_unset (prog, vers);
}
-libc_hidden_def (svc_unregister)
+libc_hidden_nolink (svc_unregister, GLIBC_2_0)
/* ******************* REPLY GENERATION ROUTINES ************ */
@@ -253,7 +261,11 @@ svc_sendreply (register SVCXPRT *xprt, xdrproc_t xdr_results,
rply.acpted_rply.ar_results.proc = xdr_results;
return SVC_REPLY (xprt, &rply);
}
-INTDEF (svc_sendreply)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (svc_sendreply)
+#else
+libc_hidden_nolink (svc_sendreply, GLIBC_2_0)
+#endif
/* No procedure error reply */
void
@@ -267,6 +279,11 @@ svcerr_noproc (register SVCXPRT *xprt)
rply.acpted_rply.ar_stat = PROC_UNAVAIL;
SVC_REPLY (xprt, &rply);
}
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (svcerr_noproc)
+#else
+libc_hidden_nolink (svcerr_noproc, GLIBC_2_0)
+#endif
/* Can't decode args error reply */
void
@@ -280,7 +297,11 @@ svcerr_decode (register SVCXPRT *xprt)
rply.acpted_rply.ar_stat = GARBAGE_ARGS;
SVC_REPLY (xprt, &rply);
}
-INTDEF (svcerr_decode)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (svcerr_decode)
+#else
+libc_hidden_nolink (svcerr_decode, GLIBC_2_0)
+#endif
/* Some system error */
void
@@ -294,6 +315,11 @@ svcerr_systemerr (register SVCXPRT *xprt)
rply.acpted_rply.ar_stat = SYSTEM_ERR;
SVC_REPLY (xprt, &rply);
}
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (svcerr_systemerr)
+#else
+libc_hidden_nolink (svcerr_systemerr, GLIBC_2_0)
+#endif
/* Authentication error reply */
void
@@ -307,7 +333,7 @@ svcerr_auth (SVCXPRT *xprt, enum auth_stat why)
rply.rjcted_rply.rj_why = why;
SVC_REPLY (xprt, &rply);
}
-libc_hidden_def (svcerr_auth)
+libc_hidden_nolink (svcerr_auth, GLIBC_2_0)
/* Auth too weak error reply */
void
@@ -315,6 +341,7 @@ svcerr_weakauth (SVCXPRT *xprt)
{
svcerr_auth (xprt, AUTH_TOOWEAK);
}
+libc_hidden_nolink (svcerr_weakauth, GLIBC_2_0)
/* Program unavailable error reply */
void
@@ -328,7 +355,7 @@ svcerr_noprog (register SVCXPRT *xprt)
rply.acpted_rply.ar_stat = PROG_UNAVAIL;
SVC_REPLY (xprt, &rply);
}
-libc_hidden_def (svcerr_noprog)
+libc_hidden_nolink (svcerr_noprog, GLIBC_2_0)
/* Program version mismatch error reply */
void
@@ -345,7 +372,7 @@ svcerr_progvers (register SVCXPRT *xprt, rpcvers_t low_vers,
rply.acpted_rply.ar_vers.high = high_vers;
SVC_REPLY (xprt, &rply);
}
-libc_hidden_def (svcerr_progvers)
+libc_hidden_nolink (svcerr_progvers, GLIBC_2_0)
/* ******************* SERVER INPUT STUFF ******************* */
@@ -372,9 +399,9 @@ svc_getreq (int rdfds)
FD_ZERO (&readfds);
readfds.fds_bits[0] = rdfds;
- INTUSE(svc_getreqset) (&readfds);
+ svc_getreqset (&readfds);
}
-INTDEF (svc_getreq)
+libc_hidden_nolink (svc_getreq, GLIBC_2_0)
void
svc_getreqset (fd_set *readfds)
@@ -391,9 +418,9 @@ svc_getreqset (fd_set *readfds)
maskp = readfds->fds_bits;
for (sock = 0; sock < setsize; sock += NFDBITS)
for (mask = *maskp++; (bit = ffsl (mask)); mask ^= (1L << (bit - 1)))
- INTUSE(svc_getreq_common) (sock + bit - 1);
+ svc_getreq_common (sock + bit - 1);
}
-INTDEF (svc_getreqset)
+libc_hidden_nolink (svc_getreqset, GLIBC_2_0)
void
svc_getreq_poll (struct pollfd *pfdp, int pollretval)
@@ -412,14 +439,18 @@ svc_getreq_poll (struct pollfd *pfdp, int pollretval)
if (p->revents & POLLNVAL)
xprt_unregister (xports[p->fd]);
else
- INTUSE(svc_getreq_common) (p->fd);
+ svc_getreq_common (p->fd);
if (++fds_found >= pollretval)
break;
}
}
}
-INTDEF (svc_getreq_poll)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (svc_getreq_poll)
+#else
+libc_hidden_nolink (svc_getreq_poll, GLIBC_2_2)
+#endif
void
@@ -465,7 +496,7 @@ svc_getreq_common (const int fd)
r.rq_xprt->xp_verf.oa_flavor = _null_auth.oa_flavor;
r.rq_xprt->xp_verf.oa_length = 0;
}
- else if ((why = INTUSE(_authenticate) (&r, &msg)) != AUTH_OK)
+ else if ((why = _authenticate (&r, &msg)) != AUTH_OK)
{
svcerr_auth (xprt, why);
goto call_done;
@@ -511,7 +542,7 @@ svc_getreq_common (const int fd)
}
while (stat == XPRT_MOREREQS);
}
-INTDEF (svc_getreq_common)
+libc_hidden_nolink (svc_getreq_common, GLIBC_2_2)
#ifdef _RPC_THREAD_SAFE_
diff --git a/libc/sunrpc/svc_auth.c b/libc/sunrpc/svc_auth.c
index 2ccfdaa7c..facbb1398 100644
--- a/libc/sunrpc/svc_auth.c
+++ b/libc/sunrpc/svc_auth.c
@@ -105,7 +105,7 @@ _authenticate (register struct svc_req *rqst, struct rpc_msg *msg)
return AUTH_REJECTEDCRED;
}
-INTDEF(_authenticate)
+libc_hidden_nolink (_authenticate, GLIBC_2_1)
static enum auth_stat
_svcauth_null (struct svc_req *rqst, struct rpc_msg *msg)
diff --git a/libc/sunrpc/svc_authux.c b/libc/sunrpc/svc_authux.c
index 1de08bc9f..0c6b0242c 100644
--- a/libc/sunrpc/svc_authux.c
+++ b/libc/sunrpc/svc_authux.c
@@ -67,8 +67,7 @@ _svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg)
aup->aup_machname = area->area_machname;
aup->aup_gids = area->area_gids;
auth_len = (u_int) msg->rm_call.cb_cred.oa_length;
- INTUSE(xdrmem_create) (&xdrs, msg->rm_call.cb_cred.oa_base, auth_len,
- XDR_DECODE);
+ xdrmem_create (&xdrs, msg->rm_call.cb_cred.oa_base, auth_len, XDR_DECODE);
buf = XDR_INLINE (&xdrs, auth_len);
if (buf != NULL)
{
@@ -106,10 +105,10 @@ _svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg)
goto done;
}
}
- else if (!INTUSE(xdr_authunix_parms) (&xdrs, aup))
+ else if (!xdr_authunix_parms (&xdrs, aup))
{
xdrs.x_op = XDR_FREE;
- (void) INTUSE(xdr_authunix_parms) (&xdrs, aup);
+ (void) xdr_authunix_parms (&xdrs, aup);
stat = AUTH_BADCRED;
goto done;
}
diff --git a/libc/sunrpc/svc_raw.c b/libc/sunrpc/svc_raw.c
index 3dd4827ad..90f5d96e6 100644
--- a/libc/sunrpc/svc_raw.c
+++ b/libc/sunrpc/svc_raw.c
@@ -85,10 +85,10 @@ svcraw_create (void)
srp->server.xp_port = 0;
srp->server.xp_ops = (struct xp_ops *) &server_ops;
srp->server.xp_verf.oa_base = srp->verf_body;
- INTUSE(xdrmem_create) (&srp->xdr_stream, srp->_raw_buf, UDPMSGSIZE,
- XDR_FREE);
+ xdrmem_create (&srp->xdr_stream, srp->_raw_buf, UDPMSGSIZE, XDR_FREE);
return &srp->server;
}
+libc_hidden_nolink (svcraw_create, GLIBC_2_0)
static enum xprt_stat
svcraw_stat (SVCXPRT *xprt)
@@ -109,7 +109,7 @@ svcraw_recv (xprt, msg)
xdrs = &srp->xdr_stream;
xdrs->x_op = XDR_DECODE;
XDR_SETPOS (xdrs, 0);
- if (!INTUSE(xdr_callmsg) (xdrs, msg))
+ if (!xdr_callmsg (xdrs, msg))
return FALSE;
return TRUE;
}
@@ -125,7 +125,7 @@ svcraw_reply (SVCXPRT *xprt, struct rpc_msg *msg)
xdrs = &srp->xdr_stream;
xdrs->x_op = XDR_ENCODE;
XDR_SETPOS (xdrs, 0);
- if (!INTUSE(xdr_replymsg) (xdrs, msg))
+ if (!xdr_replymsg (xdrs, msg))
return FALSE;
(void) XDR_GETPOS (xdrs); /* called just for overhead */
return TRUE;
diff --git a/libc/sunrpc/svc_run.c b/libc/sunrpc/svc_run.c
index de6c3c77b..09f40dd18 100644
--- a/libc/sunrpc/svc_run.c
+++ b/libc/sunrpc/svc_run.c
@@ -46,6 +46,7 @@ svc_exit (void)
svc_pollfd = NULL;
svc_max_pollfd = 0;
}
+libc_hidden_nolink (svc_exit, GLIBC_2_0)
void
svc_run (void)
@@ -92,7 +93,7 @@ svc_run (void)
case 0:
continue;
default:
- INTUSE(svc_getreq_poll) (my_pollfd, i);
+ svc_getreq_poll (my_pollfd, i);
continue;
}
break;
@@ -100,3 +101,8 @@ svc_run (void)
free (my_pollfd);
}
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (svc_run)
+#else
+libc_hidden_nolink (svc_run, GLIBC_2_0)
+#endif
diff --git a/libc/sunrpc/svc_simple.c b/libc/sunrpc/svc_simple.c
index 4b178bf51..49b1211bf 100644
--- a/libc/sunrpc/svc_simple.c
+++ b/libc/sunrpc/svc_simple.c
@@ -69,8 +69,8 @@ static SVCXPRT *transp;
#endif
int
-registerrpc (u_long prognum, u_long versnum, u_long procnum,
- char *(*progname) (char *), xdrproc_t inproc, xdrproc_t outproc)
+__registerrpc (u_long prognum, u_long versnum, u_long procnum,
+ char *(*progname) (char *), xdrproc_t inproc, xdrproc_t outproc)
{
struct proglst_ *pl;
char *buf;
@@ -85,7 +85,7 @@ registerrpc (u_long prognum, u_long versnum, u_long procnum,
}
if (transp == 0)
{
- transp = INTUSE(svcudp_create) (RPC_ANYSOCK);
+ transp = svcudp_create (RPC_ANYSOCK);
if (transp == NULL)
{
buf = strdup (_("couldn't create an rpc server\n"));
@@ -123,6 +123,7 @@ registerrpc (u_long prognum, u_long versnum, u_long procnum,
free (buf);
return -1;
}
+compat_symbol (libc, __registerrpc, registerrpc, GLIBC_2_0);
static void
universal (struct svc_req *rqstp, SVCXPRT *transp_l)
@@ -138,8 +139,8 @@ universal (struct svc_req *rqstp, SVCXPRT *transp_l)
*/
if (rqstp->rq_proc == NULLPROC)
{
- if (INTUSE(svc_sendreply) (transp_l, (xdrproc_t)INTUSE(xdr_void),
- (char *) NULL) == FALSE)
+ if (svc_sendreply (transp_l, (xdrproc_t)xdr_void,
+ (char *) NULL) == FALSE)
{
__write (STDERR_FILENO, "xxx\n", 4);
exit (1);
@@ -155,14 +156,14 @@ universal (struct svc_req *rqstp, SVCXPRT *transp_l)
__bzero (xdrbuf, sizeof (xdrbuf)); /* required ! */
if (!svc_getargs (transp_l, pl->p_inproc, xdrbuf))
{
- INTUSE(svcerr_decode) (transp_l);
+ svcerr_decode (transp_l);
return;
}
outdata = (*(pl->p_progname)) (xdrbuf);
- if (outdata == NULL && pl->p_outproc != (xdrproc_t)INTUSE(xdr_void))
+ if (outdata == NULL && pl->p_outproc != (xdrproc_t)xdr_void)
/* there was an error */
return;
- if (!INTUSE(svc_sendreply) (transp_l, pl->p_outproc, outdata))
+ if (!svc_sendreply (transp_l, pl->p_outproc, outdata))
{
if (__asprintf (&buf, _("trouble replying to prog %d\n"),
pl->p_prognum) < 0)
diff --git a/libc/sunrpc/svc_tcp.c b/libc/sunrpc/svc_tcp.c
index dd6648504..74f2cd9cf 100644
--- a/libc/sunrpc/svc_tcp.c
+++ b/libc/sunrpc/svc_tcp.c
@@ -186,6 +186,11 @@ svctcp_create (int sock, u_int sendsize, u_int recvsize)
xprt_register (xprt);
return xprt;
}
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (svctcp_create)
+#else
+libc_hidden_nolink (svctcp_create, GLIBC_2_0)
+#endif
/*
* Like svtcp_create(), except the routine takes any *open* UNIX file
@@ -196,6 +201,7 @@ svcfd_create (int fd, u_int sendsize, u_int recvsize)
{
return makefd_xprt (fd, sendsize, recvsize);
}
+libc_hidden_nolink (svcfd_create, GLIBC_2_0)
static SVCXPRT *
internal_function
@@ -215,8 +221,8 @@ makefd_xprt (int fd, u_int sendsize, u_int recvsize)
return NULL;
}
cd->strm_stat = XPRT_IDLE;
- INTUSE(xdrrec_create) (&(cd->xdrs), sendsize, recvsize,
- (caddr_t) xprt, readtcp, writetcp);
+ xdrrec_create (&(cd->xdrs), sendsize, recvsize,
+ (caddr_t) xprt, readtcp, writetcp);
xprt->xp_p2 = NULL;
xprt->xp_p1 = (caddr_t) cd;
xprt->xp_verf.oa_base = cd->verf_body;
@@ -308,9 +314,9 @@ readtcp (char *xprtptr, char *buf, int len)
case 0:
goto fatal_err;
default:
- if ((pollfd.revents & POLLERR) || (pollfd.revents & POLLHUP)
- || (pollfd.revents & POLLNVAL))
- goto fatal_err;
+ if ((pollfd.revents & POLLERR) || (pollfd.revents & POLLHUP)
+ || (pollfd.revents & POLLNVAL))
+ goto fatal_err;
break;
}
}
@@ -353,7 +359,7 @@ svctcp_stat (SVCXPRT *xprt)
if (cd->strm_stat == XPRT_DIED)
return XPRT_DIED;
- if (!INTUSE(xdrrec_eof) (&(cd->xdrs)))
+ if (!xdrrec_eof (&(cd->xdrs)))
return XPRT_MOREREQS;
return XPRT_IDLE;
}
@@ -365,8 +371,8 @@ svctcp_recv (SVCXPRT *xprt, struct rpc_msg *msg)
XDR *xdrs = &(cd->xdrs);
xdrs->x_op = XDR_DECODE;
- (void) INTUSE(xdrrec_skiprecord) (xdrs);
- if (INTUSE(xdr_callmsg) (xdrs, msg))
+ (void) xdrrec_skiprecord (xdrs);
+ if (xdr_callmsg (xdrs, msg))
{
cd->x_id = msg->rm_xid;
return TRUE;
@@ -400,7 +406,7 @@ svctcp_reply (SVCXPRT *xprt, struct rpc_msg *msg)
xdrs->x_op = XDR_ENCODE;
msg->rm_xid = cd->x_id;
- stat = INTUSE(xdr_replymsg) (xdrs, msg);
- (void) INTUSE(xdrrec_endofrecord) (xdrs, TRUE);
+ stat = xdr_replymsg (xdrs, msg);
+ (void) xdrrec_endofrecord (xdrs, TRUE);
return stat;
}
diff --git a/libc/sunrpc/svc_udp.c b/libc/sunrpc/svc_udp.c
index f989484aa..71be4f822 100644
--- a/libc/sunrpc/svc_udp.c
+++ b/libc/sunrpc/svc_udp.c
@@ -152,8 +152,7 @@ svcudp_bufcreate (sock, sendsz, recvsz)
}
su->su_iosz = ((MAX (sendsz, recvsz) + 3) / 4) * 4;
rpc_buffer (xprt) = buf;
- INTUSE(xdrmem_create) (&(su->su_xdrs), rpc_buffer (xprt), su->su_iosz,
- XDR_DECODE);
+ xdrmem_create (&(su->su_xdrs), rpc_buffer (xprt), su->su_iosz, XDR_DECODE);
su->su_cache = NULL;
xprt->xp_p2 = (caddr_t) su;
xprt->xp_verf.oa_base = su->su_verfbody;
@@ -184,15 +183,23 @@ svcudp_create: xp_pad is too small for IP_PKTINFO\n"));
xprt_register (xprt);
return xprt;
}
-INTDEF (svcudp_bufcreate)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (svcudp_bufcreate)
+#else
+libc_hidden_nolink (svcudp_bufcreate, GLIBC_2_0)
+#endif
SVCXPRT *
svcudp_create (sock)
int sock;
{
- return INTUSE(svcudp_bufcreate) (sock, UDPMSGSIZE, UDPMSGSIZE);
+ return svcudp_bufcreate (sock, UDPMSGSIZE, UDPMSGSIZE);
}
-INTDEF (svcudp_create)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (svcudp_create)
+#else
+libc_hidden_nolink (svcudp_create, GLIBC_2_0)
+#endif
static enum xprt_stat
svcudp_stat (xprt)
@@ -278,7 +285,7 @@ again:
return FALSE;
xdrs->x_op = XDR_DECODE;
XDR_SETPOS (xdrs, 0);
- if (!INTUSE(xdr_callmsg) (xdrs, msg))
+ if (!xdr_callmsg (xdrs, msg))
return FALSE;
su->su_xid = msg->rm_xid;
if (su->su_cache != NULL)
@@ -319,7 +326,7 @@ svcudp_reply (xprt, msg)
xdrs->x_op = XDR_ENCODE;
XDR_SETPOS (xdrs, 0);
msg->rm_xid = su->su_xid;
- if (INTUSE(xdr_replymsg) (xdrs, msg))
+ if (xdr_replymsg (xdrs, msg))
{
slen = (int) XDR_GETPOS (xdrs);
#ifdef IP_PKTINFO
@@ -495,6 +502,7 @@ svcudp_enablecache (SVCXPRT *transp, u_long size)
su->su_cache = (char *) uc;
return 1;
}
+libc_hidden_nolink (svcudp_enablecache, GLIBC_2_0)
/*
@@ -553,8 +561,7 @@ cache_set (SVCXPRT *xprt, u_long replylen)
victim->cache_replylen = replylen;
victim->cache_reply = rpc_buffer (xprt);
rpc_buffer (xprt) = newbuf;
- INTUSE(xdrmem_create) (&(su->su_xdrs), rpc_buffer (xprt), su->su_iosz,
- XDR_ENCODE);
+ xdrmem_create (&(su->su_xdrs), rpc_buffer (xprt), su->su_iosz, XDR_ENCODE);
victim->cache_xid = su->su_xid;
victim->cache_proc = uc->uc_proc;
victim->cache_vers = uc->uc_vers;
diff --git a/libc/sunrpc/svc_unix.c b/libc/sunrpc/svc_unix.c
index 29b71b292..c74b2cbdc 100644
--- a/libc/sunrpc/svc_unix.c
+++ b/libc/sunrpc/svc_unix.c
@@ -187,6 +187,7 @@ svcunix_create (int sock, u_int sendsize, u_int recvsize, char *path)
xprt_register (xprt);
return xprt;
}
+libc_hidden_nolink (svcunix_create, GLIBC_2_1)
/*
* Like svunix_create(), except the routine takes any *open* UNIX file
@@ -197,6 +198,7 @@ svcunixfd_create (int fd, u_int sendsize, u_int recvsize)
{
return makefd_xprt (fd, sendsize, recvsize);
}
+libc_hidden_nolink (svcunixfd_create, GLIBC_2_1)
static SVCXPRT *
internal_function
@@ -216,8 +218,8 @@ makefd_xprt (int fd, u_int sendsize, u_int recvsize)
return NULL;
}
cd->strm_stat = XPRT_IDLE;
- INTUSE(xdrrec_create) (&(cd->xdrs), sendsize, recvsize,
- (caddr_t) xprt, readunix, writeunix);
+ xdrrec_create (&(cd->xdrs), sendsize, recvsize,
+ (caddr_t) xprt, readunix, writeunix);
xprt->xp_p2 = NULL;
xprt->xp_p1 = (caddr_t) cd;
xprt->xp_verf.oa_base = cd->verf_body;
@@ -332,9 +334,9 @@ __msgread (int sock, void *data, size_t cnt)
if (len >= 0)
{
if (msg.msg_flags & MSG_CTRUNC || len == 0)
- return 0;
+ return 0;
else
- return len;
+ return len;
}
if (errno == EINTR)
goto restart;
@@ -460,7 +462,7 @@ svcunix_stat (SVCXPRT *xprt)
if (cd->strm_stat == XPRT_DIED)
return XPRT_DIED;
- if (!INTUSE(xdrrec_eof) (&(cd->xdrs)))
+ if (!xdrrec_eof (&(cd->xdrs)))
return XPRT_MOREREQS;
return XPRT_IDLE;
}
@@ -472,8 +474,8 @@ svcunix_recv (SVCXPRT *xprt, struct rpc_msg *msg)
XDR *xdrs = &(cd->xdrs);
xdrs->x_op = XDR_DECODE;
- INTUSE(xdrrec_skiprecord) (xdrs);
- if (INTUSE(xdr_callmsg) (xdrs, msg))
+ xdrrec_skiprecord (xdrs);
+ if (xdr_callmsg (xdrs, msg))
{
cd->x_id = msg->rm_xid;
/* set up verifiers */
@@ -513,7 +515,7 @@ svcunix_reply (SVCXPRT *xprt, struct rpc_msg *msg)
xdrs->x_op = XDR_ENCODE;
msg->rm_xid = cd->x_id;
- stat = INTUSE(xdr_replymsg) (xdrs, msg);
- (void) INTUSE(xdrrec_endofrecord) (xdrs, TRUE);
+ stat = xdr_replymsg (xdrs, msg);
+ (void) xdrrec_endofrecord (xdrs, TRUE);
return stat;
}
diff --git a/libc/sunrpc/svcauth_des.c b/libc/sunrpc/svcauth_des.c
index 19d0f5473..b9656e25d 100644
--- a/libc/sunrpc/svcauth_des.c
+++ b/libc/sunrpc/svcauth_des.c
@@ -583,6 +583,7 @@ authdes_getucred (const struct authdes_cred *adc, uid_t * uid, gid_t * gid,
groups[i] = cred->groups[i];
return 1;
}
+libc_hidden_nolink (authdes_getucred, GLIBC_2_1)
static void
internal_function
diff --git a/libc/sunrpc/xcrypt.c b/libc/sunrpc/xcrypt.c
index 337fd2c5a..8b7642b50 100644
--- a/libc/sunrpc/xcrypt.c
+++ b/libc/sunrpc/xcrypt.c
@@ -89,7 +89,7 @@ passwd2des_internal (char *pw, char *key)
#ifdef _LIBC
libc_hidden_def (passwd2des_internal)
-strong_alias (passwd2des_internal, passwd2des)
+compat_symbol (libc, passwd2des_internal, passwd2des, GLIBC_2_1);
#else
void passwd2des (char *pw, char *key)
{
@@ -127,6 +127,7 @@ xencrypt (char *secret, char *passwd)
free (buf);
return 1;
}
+libc_hidden_nolink (xencrypt, GLIBC_2_0)
/*
* Decrypt secret key using passwd
@@ -159,6 +160,11 @@ xdecrypt (char *secret, char *passwd)
free (buf);
return 1;
}
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdecrypt)
+#else
+libc_hidden_nolink (xdecrypt, GLIBC_2_1)
+#endif
/*
* Hex to binary conversion
diff --git a/libc/sunrpc/xdr.c b/libc/sunrpc/xdr.c
index d8e782edd..f770685de 100644
--- a/libc/sunrpc/xdr.c
+++ b/libc/sunrpc/xdr.c
@@ -71,6 +71,11 @@ xdr_free (xdrproc_t proc, char *objp)
x.x_op = XDR_FREE;
(*proc) (&x, objp);
}
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_free)
+#else
+libc_hidden_nolink (xdr_free, GLIBC_2_0)
+#endif
/*
* XDR nothing
@@ -80,7 +85,11 @@ xdr_void (void)
{
return TRUE;
}
-INTDEF(xdr_void)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_void)
+#else
+libc_hidden_nolink (xdr_void, GLIBC_2_0)
+#endif
/*
* XDR integers
@@ -109,14 +118,18 @@ xdr_int (XDR *xdrs, int *ip)
}
return FALSE;
#elif INT_MAX == LONG_MAX
- return INTUSE(xdr_long) (xdrs, (long *) ip);
+ return xdr_long (xdrs, (long *) ip);
#elif INT_MAX == SHRT_MAX
- return INTUSE(xdr_short) (xdrs, (short *) ip);
+ return xdr_short (xdrs, (short *) ip);
#else
#error unexpected integer sizes in_xdr_int()
#endif
}
-INTDEF(xdr_int)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_int)
+#else
+libc_hidden_nolink (xdr_int, GLIBC_2_0)
+#endif
/*
* XDR unsigned integers
@@ -144,14 +157,18 @@ xdr_u_int (XDR *xdrs, u_int *up)
}
return FALSE;
#elif UINT_MAX == ULONG_MAX
- return INTUSE(xdr_u_long) (xdrs, (u_long *) up);
+ return xdr_u_long (xdrs, (u_long *) up);
#elif UINT_MAX == USHRT_MAX
- return INTUSE(xdr_short) (xdrs, (short *) up);
+ return xdr_short (xdrs, (short *) up);
#else
#error unexpected integer sizes in_xdr_u_int()
#endif
}
-INTDEF(xdr_u_int)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_u_int)
+#else
+libc_hidden_nolink (xdr_u_int, GLIBC_2_0)
+#endif
/*
* XDR long integers
@@ -175,7 +192,11 @@ xdr_long (XDR *xdrs, long *lp)
return FALSE;
}
-INTDEF(xdr_long)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_long)
+#else
+libc_hidden_nolink (xdr_long, GLIBC_2_0)
+#endif
/*
* XDR unsigned long integers
@@ -210,7 +231,11 @@ xdr_u_long (XDR *xdrs, u_long *ulp)
}
return FALSE;
}
-INTDEF(xdr_u_long)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_u_long)
+#else
+libc_hidden_nolink (xdr_u_long, GLIBC_2_0)
+#endif
/*
* XDR hyper integers
@@ -242,8 +267,11 @@ xdr_hyper (XDR *xdrs, quad_t *llp)
return FALSE;
}
-INTDEF(xdr_hyper)
-
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_hyper)
+#else
+libc_hidden_nolink (xdr_hyper, GLIBC_2_1_1)
+#endif
/*
* XDR hyper integers
@@ -275,19 +303,33 @@ xdr_u_hyper (XDR *xdrs, u_quad_t *ullp)
return FALSE;
}
-INTDEF(xdr_u_hyper)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_u_hyper)
+#else
+libc_hidden_nolink (xdr_u_hyper, GLIBC_2_1_1)
+#endif
bool_t
xdr_longlong_t (XDR *xdrs, quad_t *llp)
{
- return INTUSE(xdr_hyper) (xdrs, llp);
+ return xdr_hyper (xdrs, llp);
}
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_longlong_t)
+#else
+libc_hidden_nolink (xdr_longlong_t, GLIBC_2_1_1)
+#endif
bool_t
xdr_u_longlong_t (XDR *xdrs, u_quad_t *ullp)
{
- return INTUSE(xdr_u_hyper) (xdrs, ullp);
+ return xdr_u_hyper (xdrs, ullp);
}
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_u_longlong_t)
+#else
+libc_hidden_nolink (xdr_u_longlong_t, GLIBC_2_1_1)
+#endif
/*
* XDR short integers
@@ -316,7 +358,11 @@ xdr_short (XDR *xdrs, short *sp)
}
return FALSE;
}
-INTDEF(xdr_short)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_short)
+#else
+libc_hidden_nolink (xdr_short, GLIBC_2_0)
+#endif
/*
* XDR unsigned short integers
@@ -345,7 +391,11 @@ xdr_u_short (XDR *xdrs, u_short *usp)
}
return FALSE;
}
-INTDEF(xdr_u_short)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_u_short)
+#else
+libc_hidden_nolink (xdr_u_short, GLIBC_2_0)
+#endif
/*
@@ -357,13 +407,18 @@ xdr_char (XDR *xdrs, char *cp)
int i;
i = (*cp);
- if (!INTUSE(xdr_int) (xdrs, &i))
+ if (!xdr_int (xdrs, &i))
{
return FALSE;
}
*cp = i;
return TRUE;
}
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_char)
+#else
+libc_hidden_nolink (xdr_char, GLIBC_2_0)
+#endif
/*
* XDR an unsigned char
@@ -374,13 +429,18 @@ xdr_u_char (XDR *xdrs, u_char *cp)
u_int u;
u = (*cp);
- if (!INTUSE(xdr_u_int) (xdrs, &u))
+ if (!xdr_u_int (xdrs, &u))
{
return FALSE;
}
*cp = u;
return TRUE;
}
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_u_char)
+#else
+libc_hidden_nolink (xdr_u_char, GLIBC_2_0)
+#endif
/*
* XDR booleans
@@ -409,7 +469,11 @@ xdr_bool (XDR *xdrs, bool_t *bp)
}
return FALSE;
}
-INTDEF(xdr_bool)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_bool)
+#else
+libc_hidden_nolink (xdr_bool, GLIBC_2_0)
+#endif
/*
* XDR enumerations
@@ -448,19 +512,23 @@ xdr_enum (XDR *xdrs, enum_t *ep)
}
return FALSE;
#else
- return INTUSE(xdr_long) (xdrs, (long *) ep);
+ return xdr_long (xdrs, (long *) ep);
#endif
}
else if (sizeof (enum sizecheck) == sizeof (short))
{
- return INTUSE(xdr_short) (xdrs, (short *) ep);
+ return xdr_short (xdrs, (short *) ep);
}
else
{
return FALSE;
}
}
-INTDEF(xdr_enum)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_enum)
+#else
+libc_hidden_nolink (xdr_enum, GLIBC_2_0)
+#endif
/*
* XDR opaque data
@@ -511,7 +579,11 @@ xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt)
}
return FALSE;
}
-INTDEF(xdr_opaque)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_opaque)
+#else
+libc_hidden_nolink (xdr_opaque, GLIBC_2_0)
+#endif
/*
* XDR counted bytes
@@ -531,7 +603,7 @@ xdr_bytes (xdrs, cpp, sizep, maxsize)
/*
* first deal with the length since xdr bytes are counted
*/
- if (!INTUSE(xdr_u_int) (xdrs, sizep))
+ if (!xdr_u_int (xdrs, sizep))
{
return FALSE;
}
@@ -563,7 +635,7 @@ xdr_bytes (xdrs, cpp, sizep, maxsize)
/* fall into ... */
case XDR_ENCODE:
- return INTUSE(xdr_opaque) (xdrs, sp, nodesize);
+ return xdr_opaque (xdrs, sp, nodesize);
case XDR_FREE:
if (sp != NULL)
@@ -575,7 +647,11 @@ xdr_bytes (xdrs, cpp, sizep, maxsize)
}
return FALSE;
}
-INTDEF(xdr_bytes)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_bytes)
+#else
+libc_hidden_nolink (xdr_bytes, GLIBC_2_0)
+#endif
/*
* Implemented here due to commonality of the object.
@@ -586,9 +662,13 @@ xdr_netobj (xdrs, np)
struct netobj *np;
{
- return INTUSE(xdr_bytes) (xdrs, &np->n_bytes, &np->n_len, MAX_NETOBJ_SZ);
+ return xdr_bytes (xdrs, &np->n_bytes, &np->n_len, MAX_NETOBJ_SZ);
}
-INTDEF(xdr_netobj)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_netobj)
+#else
+libc_hidden_nolink (xdr_netobj, GLIBC_2_0)
+#endif
/*
* XDR a discriminated union
@@ -614,7 +694,7 @@ xdr_union (xdrs, dscmp, unp, choices, dfault)
/*
* we deal with the discriminator; it's an enum
*/
- if (!INTUSE(xdr_enum) (xdrs, dscmp))
+ if (!xdr_enum (xdrs, dscmp))
{
return FALSE;
}
@@ -636,7 +716,7 @@ xdr_union (xdrs, dscmp, unp, choices, dfault)
return ((dfault == NULL_xdrproc_t) ? FALSE :
(*dfault) (xdrs, unp, LASTUNSIGNED));
}
-INTDEF(xdr_union)
+libc_hidden_nolink (xdr_union, GLIBC_2_0)
/*
@@ -682,7 +762,7 @@ xdr_string (xdrs, cpp, maxsize)
case XDR_DECODE:
break;
}
- if (!INTUSE(xdr_u_int) (xdrs, &size))
+ if (!xdr_u_int (xdrs, &size))
{
return FALSE;
}
@@ -716,7 +796,7 @@ xdr_string (xdrs, cpp, maxsize)
/* fall into ... */
case XDR_ENCODE:
- return INTUSE(xdr_opaque) (xdrs, sp, size);
+ return xdr_opaque (xdrs, sp, size);
case XDR_FREE:
mem_free (sp, nodesize);
@@ -725,7 +805,11 @@ xdr_string (xdrs, cpp, maxsize)
}
return FALSE;
}
-INTDEF(xdr_string)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_string)
+#else
+libc_hidden_nolink (xdr_string, GLIBC_2_0)
+#endif
/*
* Wrapper for xdr_string that can be called directly from
@@ -736,9 +820,14 @@ xdr_wrapstring (xdrs, cpp)
XDR *xdrs;
char **cpp;
{
- if (INTUSE(xdr_string) (xdrs, cpp, LASTUNSIGNED))
+ if (xdr_string (xdrs, cpp, LASTUNSIGNED))
{
return TRUE;
}
return FALSE;
}
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_wrapstring)
+#else
+libc_hidden_nolink (xdr_wrapstring, GLIBC_2_0)
+#endif
diff --git a/libc/sunrpc/xdr_array.c b/libc/sunrpc/xdr_array.c
index 03df57b89..05162ec41 100644
--- a/libc/sunrpc/xdr_array.c
+++ b/libc/sunrpc/xdr_array.c
@@ -70,7 +70,7 @@ xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc)
bool_t stat = TRUE;
/* like strings, arrays are really counted arrays */
- if (!INTUSE(xdr_u_int) (xdrs, sizep))
+ if (!xdr_u_int (xdrs, sizep))
{
return FALSE;
}
@@ -127,7 +127,11 @@ xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc)
}
return stat;
}
-INTDEF(xdr_array)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_array)
+#else
+libc_hidden_nolink (xdr_array, GLIBC_2_0)
+#endif
/*
* xdr_vector():
@@ -161,3 +165,4 @@ xdr_vector (xdrs, basep, nelem, elemsize, xdr_elem)
}
return TRUE;
}
+libc_hidden_nolink (xdr_vector, GLIBC_2_0)
diff --git a/libc/sunrpc/xdr_float.c b/libc/sunrpc/xdr_float.c
index 3925f5bf9..1a9c26061 100644
--- a/libc/sunrpc/xdr_float.c
+++ b/libc/sunrpc/xdr_float.c
@@ -158,6 +158,7 @@ xdr_float(xdrs, fp)
}
return (FALSE);
}
+libc_hidden_nolink (xdr_float, GLIBC_2_0)
/*
* This routine works on Suns (Sky / 68000's) and Vaxen.
@@ -299,3 +300,4 @@ xdr_double(xdrs, dp)
}
return (FALSE);
}
+libc_hidden_nolink (xdr_double, GLIBC_2_0)
diff --git a/libc/sunrpc/xdr_intXX_t.c b/libc/sunrpc/xdr_intXX_t.c
index 6c1fca2b2..ceba8beb8 100644
--- a/libc/sunrpc/xdr_intXX_t.c
+++ b/libc/sunrpc/xdr_intXX_t.c
@@ -20,11 +20,7 @@
#include <rpc/types.h>
/* We play dirty tricks with aliases. */
-#define xdr_quad_t Xdr_quad_t
-#define xdr_u_quad_t Xdr_u_quad_t
#include <rpc/xdr.h>
-#undef xdr_quad_t
-#undef xdr_u_quad_t
/* XDR 64bit integers */
@@ -41,7 +37,7 @@ xdr_int64_t (XDR *xdrs, int64_t *ip)
return (XDR_PUTINT32(xdrs, &t1) && XDR_PUTINT32(xdrs, &t2));
case XDR_DECODE:
if (!XDR_GETINT32(xdrs, &t1) || !XDR_GETINT32(xdrs, &t2))
- return FALSE;
+ return FALSE;
*ip = ((int64_t) t1) << 32;
*ip |= (uint32_t) t2; /* Avoid sign extension. */
return TRUE;
@@ -51,7 +47,14 @@ xdr_int64_t (XDR *xdrs, int64_t *ip)
return FALSE;
}
}
-strong_alias (xdr_int64_t, xdr_quad_t)
+libc_hidden_nolink (xdr_int64_t, GLIBC_2_1_1)
+
+bool_t
+xdr_quad_t (XDR *xdrs, quad_t *ip)
+{
+ return xdr_int64_t (xdrs, (int64_t *) ip);
+}
+libc_hidden_nolink (xdr_quad_t, GLIBC_2_3_4)
/* XDR 64bit unsigned integers */
bool_t
@@ -70,7 +73,7 @@ xdr_uint64_t (XDR *xdrs, uint64_t *uip)
case XDR_DECODE:
if (!XDR_GETINT32(xdrs, (int32_t *) &t1) ||
!XDR_GETINT32(xdrs, (int32_t *) &t2))
- return FALSE;
+ return FALSE;
*uip = ((uint64_t) t1) << 32;
*uip |= t2;
return TRUE;
@@ -80,7 +83,14 @@ xdr_uint64_t (XDR *xdrs, uint64_t *uip)
return FALSE;
}
}
-strong_alias (xdr_int64_t, xdr_u_quad_t)
+libc_hidden_nolink (xdr_uint64_t, GLIBC_2_1_1)
+
+bool_t
+xdr_u_quad_t (XDR *xdrs, u_quad_t *ip)
+{
+ return xdr_uint64_t (xdrs, (uint64_t *) ip);
+}
+libc_hidden_nolink (xdr_u_quad_t, GLIBC_2_3_4)
/* XDR 32bit integers */
bool_t
@@ -98,6 +108,7 @@ xdr_int32_t (XDR *xdrs, int32_t *lp)
return FALSE;
}
}
+libc_hidden_nolink (xdr_int32_t, GLIBC_2_1)
/* XDR 32bit unsigned integers */
bool_t
@@ -115,6 +126,11 @@ xdr_uint32_t (XDR *xdrs, uint32_t *ulp)
return FALSE;
}
}
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_uint32_t)
+#else
+libc_hidden_nolink (xdr_uint32_t, GLIBC_2_1)
+#endif
/* XDR 16bit integers */
bool_t
@@ -138,6 +154,7 @@ xdr_int16_t (XDR *xdrs, int16_t *ip)
return FALSE;
}
}
+libc_hidden_nolink (xdr_int16_t, GLIBC_2_1)
/* XDR 16bit unsigned integers */
bool_t
@@ -161,6 +178,7 @@ xdr_uint16_t (XDR *xdrs, uint16_t *uip)
return FALSE;
}
}
+libc_hidden_nolink (xdr_uint16_t, GLIBC_2_1)
/* XDR 8bit integers */
bool_t
@@ -184,6 +202,7 @@ xdr_int8_t (XDR *xdrs, int8_t *ip)
return FALSE;
}
}
+libc_hidden_nolink (xdr_int8_t, GLIBC_2_1)
/* XDR 8bit unsigned integers */
bool_t
@@ -207,3 +226,4 @@ xdr_uint8_t (XDR *xdrs, uint8_t *uip)
return FALSE;
}
}
+libc_hidden_nolink (xdr_uint8_t, GLIBC_2_1)
diff --git a/libc/sunrpc/xdr_mem.c b/libc/sunrpc/xdr_mem.c
index c4f471540..093a71873 100644
--- a/libc/sunrpc/xdr_mem.c
+++ b/libc/sunrpc/xdr_mem.c
@@ -78,7 +78,11 @@ xdrmem_create (XDR *xdrs, const caddr_t addr, u_int size, enum xdr_op op)
xdrs->x_private = xdrs->x_base = addr;
xdrs->x_handy = size;
}
-INTDEF(xdrmem_create)
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdrmem_create)
+#else
+libc_hidden_nolink (xdrmem_create, GLIBC_2_0)
+#endif
/*
* Nothing needs to be done for the memory case. The argument is clearly
diff --git a/libc/sunrpc/xdr_rec.c b/libc/sunrpc/xdr_rec.c
index 977b0bb73..1e13d34ba 100644
--- a/libc/sunrpc/xdr_rec.c
+++ b/libc/sunrpc/xdr_rec.c
@@ -192,7 +192,7 @@ xdrrec_create (XDR *xdrs, u_int sendsize,
rstrm->fbtbc = 0;
rstrm->last_frag = TRUE;
}
-INTDEF(xdrrec_create)
+libc_hidden_nolink (xdrrec_create, GLIBC_2_0)
/*
@@ -480,7 +480,7 @@ xdrrec_skiprecord (XDR *xdrs)
rstrm->last_frag = FALSE;
return TRUE;
}
-INTDEF(xdrrec_skiprecord)
+libc_hidden_nolink (xdrrec_skiprecord, GLIBC_2_0)
/*
* Lookahead function.
@@ -504,7 +504,7 @@ xdrrec_eof (XDR *xdrs)
return TRUE;
return FALSE;
}
-INTDEF(xdrrec_eof)
+libc_hidden_nolink (xdrrec_eof, GLIBC_2_0)
/*
* The client must tell the package when an end-of-record has occurred.
@@ -531,7 +531,7 @@ xdrrec_endofrecord (XDR *xdrs, bool_t sendnow)
rstrm->out_finger += BYTES_PER_XDR_UNIT;
return TRUE;
}
-INTDEF(xdrrec_endofrecord)
+libc_hidden_nolink (xdrrec_endofrecord, GLIBC_2_0)
/*
diff --git a/libc/sunrpc/xdr_ref.c b/libc/sunrpc/xdr_ref.c
index dda40abb3..b4bdb52ef 100644
--- a/libc/sunrpc/xdr_ref.c
+++ b/libc/sunrpc/xdr_ref.c
@@ -93,7 +93,7 @@ xdr_reference (xdrs, pp, size, proc)
}
return stat;
}
-INTDEF(xdr_reference)
+libc_hidden_nolink (xdr_reference, GLIBC_2_0)
/*
@@ -126,7 +126,7 @@ xdr_pointer (xdrs, objpp, obj_size, xdr_obj)
bool_t more_data;
more_data = (*objpp != NULL);
- if (!INTUSE(xdr_bool) (xdrs, &more_data))
+ if (!xdr_bool (xdrs, &more_data))
{
return FALSE;
}
@@ -135,5 +135,10 @@ xdr_pointer (xdrs, objpp, obj_size, xdr_obj)
*objpp = NULL;
return TRUE;
}
- return INTUSE(xdr_reference) (xdrs, objpp, obj_size, xdr_obj);
+ return xdr_reference (xdrs, objpp, obj_size, xdr_obj);
}
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_pointer)
+#else
+libc_hidden_nolink (xdr_pointer, GLIBC_2_0)
+#endif
diff --git a/libc/sunrpc/xdr_sizeof.c b/libc/sunrpc/xdr_sizeof.c
index 270121bc3..0119486c3 100644
--- a/libc/sunrpc/xdr_sizeof.c
+++ b/libc/sunrpc/xdr_sizeof.c
@@ -158,3 +158,8 @@ xdr_sizeof (xdrproc_t func, void *data)
free (x.x_private);
return stat == TRUE ? x.x_handy : 0;
}
+#ifdef EXPORT_RPC_SYMBOLS
+libc_hidden_def (xdr_sizeof)
+#else
+libc_hidden_nolink (xdr_sizeof, GLIBC_2_1)
+#endif
diff --git a/libc/sunrpc/xdr_stdio.c b/libc/sunrpc/xdr_stdio.c
index 94886015e..c68f004b3 100644
--- a/libc/sunrpc/xdr_stdio.c
+++ b/libc/sunrpc/xdr_stdio.c
@@ -190,5 +190,8 @@ xdrstdio_putint32 (XDR *xdrs, const int32_t *ip)
return FALSE;
return TRUE;
}
-
+#ifdef EXPORT_RPC_SYMBOLS
libc_hidden_def (xdrstdio_create)
+#else
+libc_hidden_nolink (xdrstdio_create, GLIBC_2_0)
+#endif
diff --git a/libc/sysdeps/generic/tls.h b/libc/sysdeps/generic/tls.h
index 06e41ad12..aa7f9aa57 100644
--- a/libc/sysdeps/generic/tls.h
+++ b/libc/sysdeps/generic/tls.h
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. Generic version.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2011 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
@@ -71,6 +71,6 @@
THREAD_DTV()
This macro returns the address of the DTV of the current thread.
- This normally is done using the the thread register which points
+ This normally is done using the thread register which points
to the dtv or the TCB (from which the DTV can found).
*/
diff --git a/libc/sysdeps/i386/dl-tls.h b/libc/sysdeps/i386/dl-tls.h
index 58705c778..21b949bd1 100644
--- a/libc/sysdeps/i386/dl-tls.h
+++ b/libc/sysdeps/i386/dl-tls.h
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. i386 version.
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -58,3 +58,6 @@ strong_alias (___tls_get_addr, ___tls_get_addr_internal)
# endif
#endif
+
+/* Value used for dtv entries for which the allocation is delayed. */
+#define TLS_DTV_UNALLOCATED ((void *) -1l)
diff --git a/libc/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S b/libc/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S
index 48a109ccd..8e8118382 100644
--- a/libc/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S
+++ b/libc/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S
@@ -110,7 +110,7 @@ __i686.get_pc_thunk.bx:
#endif
.section .text.ssse3,"ax",@progbits
-#if defined SHARED && !defined NOT_IN_libc && !defined USE_AS_BCOPY
+#if !defined USE_AS_BCOPY
ENTRY (MEMCPY_CHK)
movl 12(%esp), %eax
cmpl %eax, 16(%esp)
diff --git a/libc/sysdeps/i386/i686/multiarch/memcpy-ssse3.S b/libc/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
index ec9eeb95e..f64f8d214 100644
--- a/libc/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
+++ b/libc/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
@@ -110,7 +110,7 @@ __i686.get_pc_thunk.bx:
#endif
.section .text.ssse3,"ax",@progbits
-#if defined SHARED && !defined NOT_IN_libc && !defined USE_AS_BCOPY
+#if !defined USE_AS_BCOPY
ENTRY (MEMCPY_CHK)
movl 12(%esp), %eax
cmpl %eax, 16(%esp)
diff --git a/libc/sysdeps/i386/stpncpy.S b/libc/sysdeps/i386/stpncpy.S
index c163a3359..8a3633bcb 100644
--- a/libc/sysdeps/i386/stpncpy.S
+++ b/libc/sysdeps/i386/stpncpy.S
@@ -1,7 +1,7 @@
/* copy no more then N bytes from SRC to DEST, returning the address of
the terminating '\0' in DEST.
For Intel 80x86, x>=3.
- Copyright (C) 1994-1997,2000,2002,2005 Free Software Foundation, Inc.
+ Copyright (C) 1994-1997,2000,2002,2005,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
Some bug fixes by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
@@ -56,7 +56,7 @@ ENTRY (BP_SYM (__stpncpy))
ALIGN(4)
/* Four times unfolded loop with two loop counters. We get the
- the third value (the source address) by using the index+base
+ third value (the source address) by using the index+base
addressing mode. */
L(2): movb (%eax,%esi), %dl /* load current char */
movb %dl, (%eax) /* and store it */
diff --git a/libc/sysdeps/ia64/dl-tls.h b/libc/sysdeps/ia64/dl-tls.h
index 26f3d2adf..5e9a165d7 100644
--- a/libc/sysdeps/ia64/dl-tls.h
+++ b/libc/sysdeps/ia64/dl-tls.h
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. IA-64 version.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2011 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
@@ -28,3 +28,6 @@
#define DONT_USE_TLS_INDEX 1
extern void *__tls_get_addr (size_t m, size_t offset);
+
+/* Value used for dtv entries for which the allocation is delayed. */
+#define TLS_DTV_UNALLOCATED ((void *) -1l)
diff --git a/libc/sysdeps/ia64/fpu/libm_lgammal.S b/libc/sysdeps/ia64/fpu/libm_lgammal.S
index 407b3452c..351befb14 100644
--- a/libc/sysdeps/ia64/fpu/libm_lgammal.S
+++ b/libc/sysdeps/ia64/fpu/libm_lgammal.S
@@ -7463,7 +7463,7 @@ lgammal_spec:
{ .mfb
nop.m 0
nop.f 0
- // branch out if if x is natval, nan, +inf
+ // branch out if x is natval, nan, +inf
(p6) br.cond.spnt lgammal_nan_pinf
};;
{ .mfb
diff --git a/libc/sysdeps/ia64/fpu/s_erfcl.S b/libc/sysdeps/ia64/fpu/s_erfcl.S
index 266e1e1c9..31ffc2db1 100644
--- a/libc/sysdeps/ia64/fpu/s_erfcl.S
+++ b/libc/sysdeps/ia64/fpu/s_erfcl.S
@@ -168,7 +168,7 @@
// Case exp_small:
//
// Here, exp(X) and exp(X) - 1 can all be
-// appproximated by a relatively simple polynomial.
+// approximated by a relatively simple polynomial.
//
// This polynomial resembles the truncated Taylor series
//
diff --git a/libc/sysdeps/ia64/fpu/s_expm1l.S b/libc/sysdeps/ia64/fpu/s_expm1l.S
index 5f135faf6..a3a6e401e 100644
--- a/libc/sysdeps/ia64/fpu/s_expm1l.S
+++ b/libc/sysdeps/ia64/fpu/s_expm1l.S
@@ -139,7 +139,7 @@
// Case exp_small:
//
// Here, exp(X) and exp(X) - 1 can all be
-// appproximated by a relatively simple polynomial.
+// approximated by a relatively simple polynomial.
//
// This polynomial resembles the truncated Taylor series
//
diff --git a/libc/sysdeps/ia64/memcmp.S b/libc/sysdeps/ia64/memcmp.S
index 2eed49a2e..fcc66d06a 100644
--- a/libc/sysdeps/ia64/memcmp.S
+++ b/libc/sysdeps/ia64/memcmp.S
@@ -1,6 +1,6 @@
/* Optimized version of the standard memcmp() function.
This file is part of the GNU C Library.
- Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2004, 2011 Free Software Foundation, Inc.
Contributed by Dan Pop <Dan.Pop@cern.ch>.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +25,7 @@
in1: src (aka s2)
in2: byte count
- In this form, it assumes little endian mode. For big endian mode, the
+ In this form, it assumes little endian mode. For big endian mode,
the two shifts in .l2 must be inverted:
shl tmp1[0] = r[1 + MEMLAT], sh1 // tmp1 = w0 << sh1
diff --git a/libc/sysdeps/ia64/strcpy.S b/libc/sysdeps/ia64/strcpy.S
index 8745c8e8e..5001f831c 100644
--- a/libc/sysdeps/ia64/strcpy.S
+++ b/libc/sysdeps/ia64/strcpy.S
@@ -1,6 +1,6 @@
/* Optimized version of the standard strcpy() function.
This file is part of the GNU C Library.
- Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2003, 2011 Free Software Foundation, Inc.
Contributed by Dan Pop <Dan.Pop@cern.ch>.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,7 +24,7 @@
in0: dest
in1: src
- In this form, it assumes little endian mode. For big endian mode, the
+ In this form, it assumes little endian mode. For big endian mode,
the two shifts in .l2 must be inverted:
shl value = r[1], sh1 // value = w0 << sh1
diff --git a/libc/sysdeps/mach/hurd/fchflags.c b/libc/sysdeps/mach/hurd/fchflags.c
index 71bcbf0c9..dbf19ba4b 100644
--- a/libc/sysdeps/mach/hurd/fchflags.c
+++ b/libc/sysdeps/mach/hurd/fchflags.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94, 97, 98 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 97, 98, 11 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,7 @@
#include <hurd.h>
#include <hurd/fd.h>
-/* Change the flags of the file FD refers to to FLAGS. */
+/* Change the flags of the file referenced by FD to FLAGS. */
/* XXX should be __fchflags? */
int
diff --git a/libc/sysdeps/mach/hurd/fchmod.c b/libc/sysdeps/mach/hurd/fchmod.c
index 025b09200..e8714dced 100644
--- a/libc/sysdeps/mach/hurd/fchmod.c
+++ b/libc/sysdeps/mach/hurd/fchmod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994, 1995, 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,7 @@
#include <hurd.h>
#include <hurd/fd.h>
-/* Change the protections of the file FD refers to to MODE. */
+/* Change the permissions of the file referenced by FD to MODE. */
int
__fchmod (fd, mode)
int fd;
diff --git a/libc/sysdeps/mach/hurd/ftruncate.c b/libc/sysdeps/mach/hurd/ftruncate.c
index 404459e6d..b38393ea3 100644
--- a/libc/sysdeps/mach/hurd/ftruncate.c
+++ b/libc/sysdeps/mach/hurd/ftruncate.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 97, 98 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 97, 98, 11 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,7 @@
#include <hurd.h>
#include <hurd/fd.h>
-/* Truncate the file FD refers to to LENGTH bytes. */
+/* Truncate the file referenced by FD to LENGTH bytes. */
int
__ftruncate (fd, length)
int fd;
diff --git a/libc/sysdeps/posix/getaddrinfo.c b/libc/sysdeps/posix/getaddrinfo.c
index c61c72a24..7bd89c45c 100644
--- a/libc/sysdeps/posix/getaddrinfo.c
+++ b/libc/sysdeps/posix/getaddrinfo.c
@@ -510,12 +510,10 @@ gaih_inet (const char *name, const struct gaih_service *service,
int no_more;
int old_res_options;
- /* If we do not have to look for IPv4 and IPv6 together, use
- the simple, old functions. */
- if (req->ai_family == AF_INET
- || (req->ai_family == AF_INET6
- && ((req->ai_flags & AI_V4MAPPED) == 0
- || (req->ai_flags & AI_ALL) == 0)))
+ /* If we do not have to look for IPv6 addresses, use
+ the simple, old functions, which do not support
+ IPv6 scope ids. */
+ if (req->ai_family == AF_INET)
{
int family = req->ai_family;
size_t tmpbuflen = 512;
@@ -525,7 +523,6 @@ gaih_inet (const char *name, const struct gaih_service *service,
struct hostent *h;
int herrno;
- simple_again:
while (1)
{
rc = __gethostbyname2_r (name, family, &th, tmpbuf,
@@ -537,44 +534,30 @@ gaih_inet (const char *name, const struct gaih_service *service,
if (rc == 0)
{
- if (h == NULL)
- {
- if (req->ai_family == AF_INET6
- && (req->ai_flags & AI_V4MAPPED)
- && family == AF_INET6)
- {
- /* Try again, this time looking for IPv4
- addresses. */
- family = AF_INET;
- goto simple_again;
- }
- }
- else
- {
- /* We found data, now convert it into the list. */
- for (int i = 0; h->h_addr_list[i]; ++i)
- {
- if (*pat == NULL)
- {
- *pat = __alloca (sizeof (struct gaih_addrtuple));
- (*pat)->scopeid = 0;
- }
- (*pat)->next = NULL;
- (*pat)->family = req->ai_family;
- if (family == req->ai_family)
- memcpy ((*pat)->addr, h->h_addr_list[i],
- h->h_length);
- else
- {
- uint32_t *addr = (uint32_t *) (*pat)->addr;
- addr[3] = *(uint32_t *) h->h_addr_list[i];
- addr[2] = htonl (0xffff);
- addr[1] = 0;
- addr[0] = 0;
- }
- pat = &((*pat)->next);
- }
- }
+ if (h != NULL)
+ /* We found data, now convert it into the list. */
+ for (int i = 0; h->h_addr_list[i]; ++i)
+ {
+ if (*pat == NULL)
+ {
+ *pat = __alloca (sizeof (struct gaih_addrtuple));
+ (*pat)->scopeid = 0;
+ }
+ (*pat)->next = NULL;
+ (*pat)->family = req->ai_family;
+ if (family == req->ai_family)
+ memcpy ((*pat)->addr, h->h_addr_list[i],
+ h->h_length);
+ else
+ {
+ uint32_t *addr = (uint32_t *) (*pat)->addr;
+ addr[3] = *(uint32_t *) h->h_addr_list[i];
+ addr[2] = htonl (0xffff);
+ addr[1] = 0;
+ addr[0] = 0;
+ }
+ pat = &((*pat)->next);
+ }
}
else
{
diff --git a/libc/sysdeps/powerpc/dl-tls.h b/libc/sysdeps/powerpc/dl-tls.h
index 957d4b4b9..9ab81f996 100644
--- a/libc/sysdeps/powerpc/dl-tls.h
+++ b/libc/sysdeps/powerpc/dl-tls.h
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. PowerPC version.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2011 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
@@ -47,3 +47,6 @@ extern void *__tls_get_addr (tls_index *ti);
# define GET_ADDR_OFFSET (ti->ti_offset + TLS_DTV_OFFSET)
# define __TLS_GET_ADDR(__ti) (__tls_get_addr (__ti) - TLS_DTV_OFFSET)
#endif
+
+/* Value used for dtv entries for which the allocation is delayed. */
+#define TLS_DTV_UNALLOCATED ((void *) -1l)
diff --git a/libc/sysdeps/powerpc/powerpc32/dl-machine.c b/libc/sysdeps/powerpc/powerpc32/dl-machine.c
index 33a010184..77cd0d5d6 100644
--- a/libc/sysdeps/powerpc/powerpc32/dl-machine.c
+++ b/libc/sysdeps/powerpc/powerpc32/dl-machine.c
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation functions. PowerPC version.
- Copyright (C) 1995-2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1995-2006, 2008, 2011 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
@@ -205,7 +205,7 @@ __elf_preferred_address (struct link_map *loader, size_t maplength,
(1) and (3), this is obvious because only one instruction is
changed and the PPC architecture guarantees that aligned stores are
atomic. For (5), this is more tricky. When changing (4) to (5),
- the `b' instruction is first changed to to `mtctr'; this is safe
+ the `b' instruction is first changed to `mtctr'; this is safe
and is why the `lwzu' instruction is not just a simple `addi'.
Once this is done, and is visible to all processors, the `lwzu' can
safely be changed to a `lwz'. */
diff --git a/libc/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S b/libc/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S
index 8be3cf184..c03dfa37f 100644
--- a/libc/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S
+++ b/libc/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S
@@ -1,5 +1,5 @@
/* sqrt function. PowerPC32 version.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@
This part of the function is a leaf routine, so no need to stack a
frame or execute prologue/epilogue code. This means it is safe to
transfer directly to w_sqrt as long as the input value (f1) is
- preserved. Putting the the sqrt result into f2 (double parameter 2)
+ preserved. Putting the sqrt result into f2 (double parameter 2)
allows passing both the input value and sqrt result into the extended
wrapper so there is no need to recompute.
diff --git a/libc/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S b/libc/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S
index 9fa282c16..050323da5 100644
--- a/libc/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S
+++ b/libc/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S
@@ -1,5 +1,5 @@
/* sqrtf function. PowerPC32 version.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@
This part of the function is a leaf routine, so no need to stack a
frame or execute prologue/epilogue code. This means it is safe to
transfer directly to w_sqrt as long as the input value (f1) is
- preserved. Putting the the sqrt result into f2 (float parameter 2)
+ preserved. Putting the sqrt result into f2 (float parameter 2)
allows passing both the input value and sqrt result into the extended
wrapper so there is no need to recompute.
diff --git a/libc/sysdeps/powerpc/powerpc32/power4/memcpy.S b/libc/sysdeps/powerpc/powerpc32/power4/memcpy.S
index 73020c6da..d6c6e6851 100644
--- a/libc/sysdeps/powerpc/powerpc32/power4/memcpy.S
+++ b/libc/sysdeps/powerpc/powerpc32/power4/memcpy.S
@@ -1,5 +1,5 @@
/* Optimized memcpy implementation for PowerPC32 on PowerPC64.
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2011 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
@@ -24,10 +24,10 @@
/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
Returns 'dst'.
- Memcpy handles short copies (< 32-bytes) using a binary move blocks
- (no loops) of lwz/stw. The tail (remaining 1-3) bytes is handled
- with the appropriate combination of byte and halfword load/stores.
- There is minimal effort to optimize the alignment of short moves.
+ Memcpy handles short copies (< 32-bytes) using a binary move blocks
+ (no loops) of lwz/stw. The tail (remaining 1-3) bytes is handled
+ with the appropriate combination of byte and halfword load/stores.
+ There is minimal effort to optimize the alignment of short moves.
Longer moves (>= 32-bytes) justify the effort to get at least the
destination word (4-byte) aligned. Further optimization is
@@ -43,7 +43,7 @@ EALIGN (BP_SYM (memcpy), 5, 0)
stw 30,20(1)
cfi_offset(30,(20-32))
mr 30,3
- cmplwi cr1,5,31
+ cmplwi cr1,5,31
stw 31,24(1)
cfi_offset(31,(24-32))
neg 0,3
@@ -52,13 +52,13 @@ EALIGN (BP_SYM (memcpy), 5, 0)
clrlwi 10,4,30 /* check alignment of src. */
cmplwi cr6,5,8
ble- cr1,.L2 /* If move < 32 bytes use short move code. */
- cmplw cr6,10,11
+ cmplw cr6,10,11
mr 12,4
srwi 9,5,2 /* Number of full words remaining. */
mtcrf 0x01,0
mr 31,5
beq .L0
-
+
subf 31,0,5
/* Move 0-3 bytes as needed to get the destination word aligned. */
1: bf 31,2f
@@ -72,17 +72,17 @@ EALIGN (BP_SYM (memcpy), 5, 0)
sth 6,0(3)
addi 3,3,2
0:
- clrlwi 10,12,30 /* check alignment of src again. */
+ clrlwi 10,12,30 /* check alignment of src again. */
srwi 9,31,2 /* Number of full words remaining. */
-
- /* Copy words from source to destination, assuming the destination is
+
+ /* Copy words from source to destination, assuming the destination is
aligned on a word boundary.
At this point we know there are at least 25 bytes left (32-7) to copy.
- The next step is to determine if the source is also word aligned.
+ The next step is to determine if the source is also word aligned.
If not branch to the unaligned move code at .L6. which uses
a load, shift, store strategy.
-
+
Otherwise source and destination are word aligned, and we can use
the optimized word copy loop. */
.L0:
@@ -92,16 +92,16 @@ EALIGN (BP_SYM (memcpy), 5, 0)
/* Move words where destination and source are word aligned.
Use an unrolled loop to copy 4 words (16-bytes) per iteration.
- If the the copy is not an exact multiple of 16 bytes, 1-3
+ If the copy is not an exact multiple of 16 bytes, 1-3
words are copied as needed to set up the main loop. After
- the main loop exits there may be a tail of 1-3 bytes. These bytes are
+ the main loop exits there may be a tail of 1-3 bytes. These bytes are
copied a halfword/byte at a time as needed to preserve alignment. */
srwi 8,31,4 /* calculate the 16 byte loop count */
cmplwi cr1,9,4
cmplwi cr6,11,0
mr 11,12
-
+
bf 30,1f
lwz 6,0(12)
lwz 7,4(12)
@@ -112,7 +112,7 @@ EALIGN (BP_SYM (memcpy), 5, 0)
addi 10,3,8
bf 31,4f
lwz 0,8(12)
- stw 0,8(3)
+ stw 0,8(3)
blt cr1,3f
addi 11,12,12
addi 10,3,12
@@ -126,7 +126,7 @@ EALIGN (BP_SYM (memcpy), 5, 0)
addi 11,12,4
stw 6,0(3)
addi 10,3,4
-
+
.align 4
4:
lwz 6,0(11)
@@ -140,14 +140,14 @@ EALIGN (BP_SYM (memcpy), 5, 0)
addi 11,11,16
addi 10,10,16
bdnz 4b
-3:
+3:
clrrwi 0,31,2
mtcrf 0x01,31
beq cr6,0f
.L9:
add 3,3,0
add 12,12,0
-
+
/* At this point we have a tail of 0-3 bytes and we know that the
destination is word aligned. */
2: bf 30,1f
@@ -165,27 +165,27 @@ EALIGN (BP_SYM (memcpy), 5, 0)
lwz 31,24(1)
addi 1,1,32
blr
-
-/* Copy up to 31 bytes. This is divided into two cases 0-8 bytes and
- 9-31 bytes. Each case is handled without loops, using binary
- (1,2,4,8) tests.
-
+
+/* Copy up to 31 bytes. This is divided into two cases 0-8 bytes and
+ 9-31 bytes. Each case is handled without loops, using binary
+ (1,2,4,8) tests.
+
In the short (0-8 byte) case no attempt is made to force alignment
- of either source or destination. The hardware will handle the
- unaligned load/stores with small delays for crossing 32- 64-byte, and
+ of either source or destination. The hardware will handle the
+ unaligned load/stores with small delays for crossing 32- 64-byte, and
4096-byte boundaries. Since these short moves are unlikely to be
- unaligned or cross these boundaries, the overhead to force
+ unaligned or cross these boundaries, the overhead to force
alignment is not justified.
-
+
The longer (9-31 byte) move is more likely to cross 32- or 64-byte
boundaries. Since only loads are sensitive to the 32-/64-byte
- boundaries it is more important to align the source than the
+ boundaries it is more important to align the source than the
destination. If the source is not already word aligned, we first
- move 1-3 bytes as needed. While the destination and stores may
+ move 1-3 bytes as needed. While the destination and stores may
still be unaligned, this is only an issue for page (4096 byte
- boundary) crossing, which should be rare for these short moves.
- The hardware handles this case automatically with a small delay. */
-
+ boundary) crossing, which should be rare for these short moves.
+ The hardware handles this case automatically with a small delay. */
+
.align 4
.L2:
mtcrf 0x01,5
@@ -248,11 +248,11 @@ EALIGN (BP_SYM (memcpy), 5, 0)
lwz 6,0(12)
addi 12,12,4
stw 6,0(3)
- addi 3,3,4
+ addi 3,3,4
2: /* Move 2-3 bytes. */
bf 30,1f
lhz 6,0(12)
- sth 6,0(3)
+ sth 6,0(3)
bf 31,0f
lbz 7,2(12)
stb 7,2(3)
@@ -292,7 +292,7 @@ EALIGN (BP_SYM (memcpy), 5, 0)
6:
bf 30,5f
lhz 7,4(4)
- sth 7,4(3)
+ sth 7,4(3)
bf 31,0f
lbz 8,6(4)
stb 8,6(3)
@@ -301,7 +301,7 @@ EALIGN (BP_SYM (memcpy), 5, 0)
addi 1,1,32
blr
.align 4
-5:
+5:
bf 31,0f
lbz 6,4(4)
stb 6,4(3)
@@ -318,15 +318,15 @@ EALIGN (BP_SYM (memcpy), 5, 0)
/* Copy words where the destination is aligned but the source is
not. Use aligned word loads from the source, shifted to realign
- the data, to allow aligned destination stores.
+ the data, to allow aligned destination stores.
Use an unrolled loop to copy 4 words (16-bytes) per iteration.
A single word is retained for storing at loop exit to avoid walking
off the end of a page within the loop.
- If the copy is not an exact multiple of 16 bytes, 1-3
+ If the copy is not an exact multiple of 16 bytes, 1-3
words are copied as needed to set up the main loop. After
- the main loop exits there may be a tail of 1-3 bytes. These bytes are
+ the main loop exits there may be a tail of 1-3 bytes. These bytes are
copied a halfword/byte at a time as needed to preserve alignment. */
-
+
cmplwi cr6,11,0 /* are there tail bytes left ? */
subf 5,10,12 /* back up src pointer to prev word alignment */
@@ -381,8 +381,8 @@ EALIGN (BP_SYM (memcpy), 5, 0)
.align 4
4:
/* copy 16 bytes at a time */
- slw 0,6,10
- srw 8,7,9
+ slw 0,6,10
+ srw 8,7,9
or 0,0,8
lwz 6,0(5)
stw 0,0(4)
@@ -391,13 +391,13 @@ EALIGN (BP_SYM (memcpy), 5, 0)
or 0,0,8
lwz 7,4(5)
stw 0,4(4)
- slw 0,6,10
- srw 8,7,9
+ slw 0,6,10
+ srw 8,7,9
or 0,0,8
lwz 6,8(5)
stw 0,8(4)
slw 0,7,10
- srw 8,6,9
+ srw 8,6,9
or 0,0,8
lwz 7,12(5)
stw 0,12(4)
@@ -406,8 +406,8 @@ EALIGN (BP_SYM (memcpy), 5, 0)
bdnz+ 4b
8:
/* calculate and store the final word */
- slw 0,6,10
- srw 8,7,9
+ slw 0,6,10
+ srw 8,7,9
or 0,0,8
stw 0,0(4)
3:
diff --git a/libc/sysdeps/powerpc/powerpc32/power4/strncmp.S b/libc/sysdeps/powerpc/powerpc32/power4/strncmp.S
index fc0835ebe..12d829344 100644
--- a/libc/sysdeps/powerpc/powerpc32/power4/strncmp.S
+++ b/libc/sysdeps/powerpc/powerpc32/power4/strncmp.S
@@ -1,5 +1,5 @@
/* Optimized strcmp implementation for PowerPC32.
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2011 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
@@ -33,7 +33,7 @@ EALIGN (BP_SYM(strncmp), 4, 0)
#define rSTR2 r4 /* second string arg */
#define rN r5 /* max string length */
/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and and that support was never completed.
+ was inherited from PPC32 and that support was never completed.
Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */
#define rWORD1 r6 /* current word in s1 */
#define rWORD2 r7 /* current word in s2 */
@@ -58,7 +58,7 @@ EALIGN (BP_SYM(strncmp), 4, 0)
clrlwi rN, rN, 30
addi rFEFE, rFEFE, -0x101
addi r7F7F, r7F7F, 0x7f7f
- cmplwi cr1, rN, 0
+ cmplwi cr1, rN, 0
beq L(unaligned)
mtctr rTMP /* Power4 wants mtctr 1st in dispatch group. */
@@ -66,7 +66,7 @@ EALIGN (BP_SYM(strncmp), 4, 0)
lwz rWORD2, 0(rSTR2)
b L(g1)
-L(g0):
+L(g0):
lwzu rWORD1, 4(rSTR1)
bne- cr1, L(different)
lwzu rWORD2, 4(rSTR2)
@@ -76,11 +76,11 @@ L(g1): add rTMP, rFEFE, rWORD1
and. rTMP, rTMP, rNEG
cmpw cr1, rWORD1, rWORD2
beq+ L(g0)
-
+
/* OK. We've hit the end of the string. We need to be careful that
we don't compare two strings as different because of gunk beyond
the end of the strings... */
-
+
L(endstring):
and rTMP, r7F7F, rWORD1
beq cr1, L(equal)
@@ -139,33 +139,34 @@ L(u1):
bdz L(u4)
cmpw rWORD1, rWORD2
beq- cr1, L(u4)
+ bne- L(u4)
lbzu rWORD3, 1(rSTR1)
lbzu rWORD4, 1(rSTR2)
- bne- L(u4)
cmpwi cr1, rWORD3, 0
bdz L(u3)
cmpw rWORD3, rWORD4
beq- cr1, L(u3)
+ bne- L(u3)
lbzu rWORD1, 1(rSTR1)
lbzu rWORD2, 1(rSTR2)
- bne- L(u3)
cmpwi cr1, rWORD1, 0
bdz L(u4)
cmpw rWORD1, rWORD2
beq- cr1, L(u4)
+ bne- L(u4)
lbzu rWORD3, 1(rSTR1)
lbzu rWORD4, 1(rSTR2)
- bne- L(u4)
cmpwi cr1, rWORD3, 0
bdz L(u3)
cmpw rWORD3, rWORD4
beq- cr1, L(u3)
+ bne- L(u3)
lbzu rWORD1, 1(rSTR1)
lbzu rWORD2, 1(rSTR2)
- beq+ L(u1)
+ b L(u1)
L(u3): sub rRTN, rWORD3, rWORD4
- blr
+ blr
L(u4): sub rRTN, rWORD1, rWORD2
blr
L(ux):
@@ -173,4 +174,3 @@ L(ux):
blr
END (BP_SYM (strncmp))
libc_hidden_builtin_def (strncmp)
-
diff --git a/libc/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S b/libc/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S
index 27a1a0dcb..1c0f70dc5 100644
--- a/libc/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S
+++ b/libc/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S
@@ -1,5 +1,5 @@
/* sqrt function. PowerPC32 version.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2011 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
@@ -35,7 +35,7 @@
This part of the function looks like a leaf routine, so no need to
stack a frame or execute prologue/epilogue code. It is safe to
branch directly to w_sqrt as long as the input value (f1) is
- preserved. Putting the the sqrt result into f2 (float parameter 2)
+ preserved. Putting the sqrt result into f2 (float parameter 2)
allows passing both the input value and sqrt result into the extended
wrapper so there is no need to recompute.
diff --git a/libc/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S b/libc/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S
index 891485554..e638cc102 100644
--- a/libc/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S
+++ b/libc/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S
@@ -1,5 +1,5 @@
/* sqrtf function. PowerPC32 version.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2011 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
@@ -35,7 +35,7 @@
This part of the function looks like a leaf routine, so no need to
stack a frame or execute prologue/epilogue code. It is safe to
branch directly to w_sqrt as long as the input value (f1) is
- preserved. Putting the the sqrt result into f2 (float parameter 2)
+ preserved. Putting the sqrt result into f2 (float parameter 2)
allows passing both the input value and sqrt result into the extended
wrapper so there is no need to recompute.
diff --git a/libc/sysdeps/powerpc/powerpc32/power6/memcpy.S b/libc/sysdeps/powerpc/powerpc32/power6/memcpy.S
index cafe9174f..b5e289dd5 100644
--- a/libc/sysdeps/powerpc/powerpc32/power6/memcpy.S
+++ b/libc/sysdeps/powerpc/powerpc32/power6/memcpy.S
@@ -1,5 +1,5 @@
/* Optimized memcpy implementation for PowerPC32 on POWER6.
- Copyright (C) 2003, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2009, 2011 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
@@ -100,7 +100,7 @@ EALIGN (BP_SYM (memcpy), 5, 0)
/* Move words where destination and source are word aligned.
Use an unrolled loop to copy 4 words (16-bytes) per iteration.
- If the the copy is not an exact multiple of 16 bytes, 1-3
+ If the copy is not an exact multiple of 16 bytes, 1-3
words are copied as needed to set up the main loop. After
the main loop exits there may be a tail of 1-3 bytes. These bytes are
copied a halfword/byte at a time as needed to preserve alignment. */
diff --git a/libc/sysdeps/powerpc/powerpc32/power7/strncmp.S b/libc/sysdeps/powerpc/powerpc32/power7/strncmp.S
index ba72d0a02..6a1422a7c 100644
--- a/libc/sysdeps/powerpc/powerpc32/power7/strncmp.S
+++ b/libc/sysdeps/powerpc/powerpc32/power7/strncmp.S
@@ -1,5 +1,5 @@
/* Optimized strcmp implementation for POWER7/PowerPC32.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011 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
@@ -35,7 +35,7 @@ EALIGN (BP_SYM(strncmp),4,0)
#define rSTR2 r4 /* second string arg */
#define rN r5 /* max string length */
/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and and that support was never completed.
+ was inherited from PPC32 and that support was never completed.
Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */
#define rWORD1 r6 /* current word in s1 */
#define rWORD2 r7 /* current word in s2 */
@@ -141,30 +141,31 @@ L(u1):
bdz L(u4)
cmpw rWORD1,rWORD2
beq cr1,L(u4)
+ bne L(u4)
lbzu rWORD3,1(rSTR1)
lbzu rWORD4,1(rSTR2)
- bne L(u4)
cmpwi cr1,rWORD3,0
bdz L(u3)
cmpw rWORD3,rWORD4
beq cr1,L(u3)
+ bne L(u3)
lbzu rWORD1,1(rSTR1)
lbzu rWORD2,1(rSTR2)
- bne L(u3)
cmpwi cr1,rWORD1,0
bdz L(u4)
cmpw rWORD1,rWORD2
beq cr1,L(u4)
+ bne L(u4)
lbzu rWORD3,1(rSTR1)
lbzu rWORD4,1(rSTR2)
- bne L(u4)
cmpwi cr1,rWORD3,0
bdz L(u3)
cmpw rWORD3,rWORD4
beq cr1,L(u3)
+ bne L(u3)
lbzu rWORD1,1(rSTR1)
lbzu rWORD2,1(rSTR2)
- beq L(u1)
+ b L(u1)
L(u3): sub rRTN,rWORD3,rWORD4
blr
diff --git a/libc/sysdeps/powerpc/powerpc32/strncmp.S b/libc/sysdeps/powerpc/powerpc32/strncmp.S
index 3e0fff5ac..6b736e7b2 100644
--- a/libc/sysdeps/powerpc/powerpc32/strncmp.S
+++ b/libc/sysdeps/powerpc/powerpc32/strncmp.S
@@ -1,5 +1,5 @@
/* Optimized strcmp implementation for PowerPC32.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2011 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
@@ -33,7 +33,7 @@ EALIGN (BP_SYM(strncmp), 4, 0)
#define rSTR2 r4 /* second string arg */
#define rN r5 /* max string length */
/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and and that support was never completed.
+ was inherited from PPC32 and that support was never completed.
Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */
#define rWORD1 r6 /* current word in s1 */
#define rWORD2 r7 /* current word in s2 */
@@ -56,7 +56,7 @@ EALIGN (BP_SYM(strncmp), 4, 0)
clrlwi rN, rN, 30
addi rFEFE, rFEFE, -0x101
addi r7F7F, r7F7F, 0x7f7f
- cmplwi cr1, rN, 0
+ cmplwi cr1, rN, 0
beq L(unaligned)
mtctr rTMP /* Power4 wants mtctr 1st in dispatch group. */
@@ -64,7 +64,7 @@ EALIGN (BP_SYM(strncmp), 4, 0)
lwz rWORD2, 0(rSTR2)
b L(g1)
-L(g0):
+L(g0):
lwzu rWORD1, 4(rSTR1)
bne- cr1, L(different)
lwzu rWORD2, 4(rSTR2)
@@ -74,11 +74,11 @@ L(g1): add rTMP, rFEFE, rWORD1
and. rTMP, rTMP, rNEG
cmpw cr1, rWORD1, rWORD2
beq+ L(g0)
-
+
/* OK. We've hit the end of the string. We need to be careful that
we don't compare two strings as different because of gunk beyond
the end of the strings... */
-
+
L(endstring):
and rTMP, r7F7F, rWORD1
beq cr1, L(equal)
@@ -154,7 +154,7 @@ L(u1):
lbzu rWORD1, 1(rSTR1)
bne+ cr1, L(u0)
-L(u2): lbzu rWORD1, -1(rSTR1)
+L(u2): lbzu rWORD1, -1(rSTR1)
L(u3): sub rRTN, rWORD1, rWORD2
blr
END (BP_SYM (strncmp))
diff --git a/libc/sysdeps/powerpc/powerpc64/memcpy.S b/libc/sysdeps/powerpc/powerpc64/memcpy.S
index f395de906..28fc6cf5b 100644
--- a/libc/sysdeps/powerpc/powerpc64/memcpy.S
+++ b/libc/sysdeps/powerpc/powerpc64/memcpy.S
@@ -1,5 +1,5 @@
/* Optimized memcpy implementation for PowerPC64.
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2011 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
@@ -24,10 +24,10 @@
/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
Returns 'dst'.
- Memcpy handles short copies (< 32-bytes) using a binary move blocks
- (no loops) of lwz/stw. The tail (remaining 1-3) bytes is handled
- with the appropriate combination of byte and halfword load/stores.
- There is minimal effort to optimize the alignment of short moves.
+ Memcpy handles short copies (< 32-bytes) using a binary move blocks
+ (no loops) of lwz/stw. The tail (remaining 1-3) bytes is handled
+ with the appropriate combination of byte and halfword load/stores.
+ There is minimal effort to optimize the alignment of short moves.
The 64-bit implementations of POWER3 and POWER4 do a reasonable job
of handling unligned load/stores that do not cross 32-byte boundries.
@@ -49,13 +49,13 @@ EALIGN (BP_SYM (memcpy), 5, 0)
clrldi 10,4,61 /* check alignement of src. */
cmpldi cr6,5,8
ble- cr1,.L2 /* If move < 32 bytes use short move code. */
- cmpld cr6,10,11
+ cmpld cr6,10,11
mr 12,4
srdi 9,5,3 /* Number of full double words remaining. */
mtcrf 0x01,0
mr 31,5
beq .L0
-
+
subf 31,0,5
/* Move 0-7 bytes as needed to get the destination doubleword alligned. */
1: bf 31,2f
@@ -74,17 +74,17 @@ EALIGN (BP_SYM (memcpy), 5, 0)
stw 6,0(3)
addi 3,3,4
0:
- clrldi 10,12,61 /* check alignement of src again. */
+ clrldi 10,12,61 /* check alignement of src again. */
srdi 9,31,3 /* Number of full double words remaining. */
-
+
/* Copy doublewords from source to destination, assumpting the
destination is aligned on a doubleword boundary.
At this point we know there are at least 25 bytes left (32-7) to copy.
- The next step is to determine if the source is also doubleword aligned.
+ The next step is to determine if the source is also doubleword aligned.
If not branch to the unaligned move code at .L6. which uses
a load, shift, store strategy.
-
+
Otherwise source and destination are doubleword aligned, and we can
the optimized doubleword copy loop. */
.L0:
@@ -94,16 +94,16 @@ EALIGN (BP_SYM (memcpy), 5, 0)
/* Move doublewords where destination and source are DW aligned.
Use a unrolled loop to copy 4 doubleword (32-bytes) per iteration.
- If the the copy is not an exact multiple of 32 bytes, 1-3
+ If the copy is not an exact multiple of 32 bytes, 1-3
doublewords are copied as needed to set up the main loop. After
- the main loop exits there may be a tail of 1-7 bytes. These byte are
+ the main loop exits there may be a tail of 1-7 bytes. These byte are
copied a word/halfword/byte at a time as needed to preserve alignment. */
srdi 8,31,5
cmpldi cr1,9,4
cmpldi cr6,11,0
mr 11,12
-
+
bf 30,1f
ld 6,0(12)
ld 7,8(12)
@@ -114,7 +114,7 @@ EALIGN (BP_SYM (memcpy), 5, 0)
addi 10,3,16
bf 31,4f
ld 0,16(12)
- std 0,16(3)
+ std 0,16(3)
blt cr1,3f
addi 11,12,24
addi 10,3,24
@@ -128,7 +128,7 @@ EALIGN (BP_SYM (memcpy), 5, 0)
addi 11,12,8
std 6,0(3)
addi 10,3,8
-
+
.align 4
4:
ld 6,0(11)
@@ -143,7 +143,7 @@ EALIGN (BP_SYM (memcpy), 5, 0)
std 0,24(10)
addi 10,10,32
bdnz 4b
-3:
+3:
rldicr 0,31,0,60
mtcrf 0x01,31
@@ -151,7 +151,7 @@ EALIGN (BP_SYM (memcpy), 5, 0)
.L9:
add 3,3,0
add 12,12,0
-
+
/* At this point we have a tail of 0-7 bytes and we know that the
destiniation is double word aligned. */
4: bf 29,2f
@@ -172,29 +172,29 @@ EALIGN (BP_SYM (memcpy), 5, 0)
ld 31,-8(1)
ld 3,-16(1)
blr
-
-/* Copy up to 31 bytes. This divided into two cases 0-8 bytes and 9-31
- bytes. Each case is handled without loops, using binary (1,2,4,8)
- tests.
-
+
+/* Copy up to 31 bytes. This divided into two cases 0-8 bytes and 9-31
+ bytes. Each case is handled without loops, using binary (1,2,4,8)
+ tests.
+
In the short (0-8 byte) case no attempt is made to force alignment
- of either source or destination. The hardware will handle the
- unaligned load/stores with small delays for crossing 32- 64-byte, and
+ of either source or destination. The hardware will handle the
+ unaligned load/stores with small delays for crossing 32- 64-byte, and
4096-byte boundaries. Since these short moves are unlikely to be
- unaligned or cross these boundaries, the overhead to force
+ unaligned or cross these boundaries, the overhead to force
alignment is not justified.
-
+
The longer (9-31 byte) move is more likely to cross 32- or 64-byte
boundaries. Since only loads are sensitive to the 32-/64-byte
- boundaries it is more important to align the source then the
+ boundaries it is more important to align the source then the
destination. If the source is not already word aligned, we first
- move 1-3 bytes as needed. Since we are only word aligned we don't
- use double word load/stores to insure that all loads are aligned.
+ move 1-3 bytes as needed. Since we are only word aligned we don't
+ use double word load/stores to insure that all loads are aligned.
While the destination and stores may still be unaligned, this
is only an issue for page (4096 byte boundary) crossing, which
should be rare for these short moves. The hardware handles this
- case automatically with a small delay. */
-
+ case automatically with a small delay. */
+
.align 4
.L2:
mtcrf 0x01,5
@@ -257,11 +257,11 @@ EALIGN (BP_SYM (memcpy), 5, 0)
lwz 6,0(12)
addi 12,12,4
stw 6,0(3)
- addi 3,3,4
+ addi 3,3,4
2: /* Move 2-3 bytes. */
bf 30,1f
lhz 6,0(12)
- sth 6,0(3)
+ sth 6,0(3)
bf 31,0f
lbz 7,2(12)
stb 7,2(3)
@@ -282,7 +282,7 @@ EALIGN (BP_SYM (memcpy), 5, 0)
mr 12,4
bne cr6,4f
/* Would have liked to use use ld/std here but the 630 processors are
- slow for load/store doubles that are not at least word aligned.
+ slow for load/store doubles that are not at least word aligned.
Unaligned Load/Store word execute with only a 1 cycle penaltity. */
lwz 6,0(4)
lwz 7,4(4)
@@ -298,14 +298,14 @@ EALIGN (BP_SYM (memcpy), 5, 0)
6:
bf 30,5f
lhz 7,4(4)
- sth 7,4(3)
+ sth 7,4(3)
bf 31,0f
lbz 8,6(4)
stb 8,6(3)
ld 3,-16(1)
blr
.align 4
-5:
+5:
bf 31,0f
lbz 6,4(4)
stb 6,4(3)
diff --git a/libc/sysdeps/powerpc/powerpc64/power4/memcmp.S b/libc/sysdeps/powerpc/powerpc64/power4/memcmp.S
index a5e0c758d..9406a8ca2 100644
--- a/libc/sysdeps/powerpc/powerpc64/power4/memcmp.S
+++ b/libc/sysdeps/powerpc/powerpc64/power4/memcmp.S
@@ -1,5 +1,5 @@
/* Optimized strcmp implementation for PowerPC64.
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2011 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
@@ -33,7 +33,7 @@ EALIGN (BP_SYM(memcmp), 4, 0)
#define rSTR2 r4 /* second string arg */
#define rN r5 /* max string length */
/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and and that support was never completed.
+ was inherited from PPC32 and that support was never completed.
Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */
#define rWORD1 r6 /* current word in s1 */
#define rWORD2 r7 /* current word in s2 */
diff --git a/libc/sysdeps/powerpc/powerpc64/power4/memcpy.S b/libc/sysdeps/powerpc/powerpc64/power4/memcpy.S
index 56f313b4b..64f8fe8e6 100644
--- a/libc/sysdeps/powerpc/powerpc64/power4/memcpy.S
+++ b/libc/sysdeps/powerpc/powerpc64/power4/memcpy.S
@@ -1,5 +1,5 @@
/* Optimized memcpy implementation for PowerPC64.
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2011 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
@@ -96,7 +96,7 @@ EALIGN (BP_SYM (memcpy), 5, 0)
/* Move doublewords where destination and source are DW aligned.
Use a unrolled loop to copy 4 doubleword (32-bytes) per iteration.
- If the the copy is not an exact multiple of 32 bytes, 1-3
+ If the copy is not an exact multiple of 32 bytes, 1-3
doublewords are copied as needed to set up the main loop. After
the main loop exits there may be a tail of 1-7 bytes. These byte are
copied a word/halfword/byte at a time as needed to preserve alignment. */
diff --git a/libc/sysdeps/powerpc/powerpc64/power4/strncmp.S b/libc/sysdeps/powerpc/powerpc64/power4/strncmp.S
index 7a1665d2b..5ca53cc16 100644
--- a/libc/sysdeps/powerpc/powerpc64/power4/strncmp.S
+++ b/libc/sysdeps/powerpc/powerpc64/power4/strncmp.S
@@ -1,5 +1,5 @@
/* Optimized strcmp implementation for PowerPC64.
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2011 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
@@ -34,7 +34,7 @@ EALIGN (BP_SYM(strncmp), 4, 0)
#define rSTR2 r4 /* second string arg */
#define rN r5 /* max string length */
/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and and that support was never completed.
+ was inherited from PPC32 and that support was never completed.
Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */
#define rWORD1 r6 /* current word in s1 */
#define rWORD2 r7 /* current word in s2 */
@@ -59,7 +59,7 @@ EALIGN (BP_SYM(strncmp), 4, 0)
clrldi rN, rN, 61
addi rFEFE, rFEFE, -0x101
addi r7F7F, r7F7F, 0x7f7f
- cmpldi cr1, rN, 0
+ cmpldi cr1, rN, 0
beq L(unaligned)
mtctr rTMP /* Power4 wants mtctr 1st in dispatch group. */
@@ -70,7 +70,7 @@ EALIGN (BP_SYM(strncmp), 4, 0)
add rFEFE, rFEFE, rTMP
b L(g1)
-L(g0):
+L(g0):
ldu rWORD1, 8(rSTR1)
bne- cr1, L(different)
ldu rWORD2, 8(rSTR2)
@@ -80,11 +80,11 @@ L(g1): add rTMP, rFEFE, rWORD1
and. rTMP, rTMP, rNEG
cmpd cr1, rWORD1, rWORD2
beq+ L(g0)
-
+
/* OK. We've hit the end of the string. We need to be careful that
we don't compare two strings as different because of gunk beyond
the end of the strings... */
-
+
L(endstring):
and rTMP, r7F7F, rWORD1
beq cr1, L(equal)
@@ -143,33 +143,34 @@ L(u1):
bdz L(u4)
cmpd rWORD1, rWORD2
beq- cr1, L(u4)
+ bne- L(u4)
lbzu rWORD3, 1(rSTR1)
lbzu rWORD4, 1(rSTR2)
- bne- L(u4)
cmpdi cr1, rWORD3, 0
bdz L(u3)
cmpd rWORD3, rWORD4
beq- cr1, L(u3)
+ bne- L(u3)
lbzu rWORD1, 1(rSTR1)
lbzu rWORD2, 1(rSTR2)
- bne- L(u3)
cmpdi cr1, rWORD1, 0
bdz L(u4)
cmpd rWORD1, rWORD2
beq- cr1, L(u4)
+ bne- L(u4)
lbzu rWORD3, 1(rSTR1)
lbzu rWORD4, 1(rSTR2)
- bne- L(u4)
cmpdi cr1, rWORD3, 0
bdz L(u3)
cmpd rWORD3, rWORD4
beq- cr1, L(u3)
+ bne- L(u3)
lbzu rWORD1, 1(rSTR1)
lbzu rWORD2, 1(rSTR2)
- beq+ L(u1)
+ b L(u1)
L(u3): sub rRTN, rWORD3, rWORD4
- blr
+ blr
L(u4): sub rRTN, rWORD1, rWORD2
blr
L(ux):
@@ -177,4 +178,3 @@ L(ux):
blr
END (BP_SYM (strncmp))
libc_hidden_builtin_def (strncmp)
-
diff --git a/libc/sysdeps/powerpc/powerpc64/power6/memcpy.S b/libc/sysdeps/powerpc/powerpc64/power6/memcpy.S
index d105f8302..1edc7c98b 100644
--- a/libc/sysdeps/powerpc/powerpc64/power6/memcpy.S
+++ b/libc/sysdeps/powerpc/powerpc64/power6/memcpy.S
@@ -1,5 +1,5 @@
/* Optimized memcpy implementation for PowerPC64.
- Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2007, 2011 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
@@ -119,7 +119,7 @@ EALIGN (BP_SYM (memcpy), 7, 0)
/* Move doublewords where destination and source are DW aligned.
Use a unrolled loop to copy 16 doublewords (128-bytes) per iteration.
- If the the copy is not an exact multiple of 128 bytes, 1-15
+ If the copy is not an exact multiple of 128 bytes, 1-15
doublewords are copied as needed to set up the main loop. After
the main loop exits there may be a tail of 1-7 bytes. These byte
are copied a word/halfword/byte at a time as needed to preserve
diff --git a/libc/sysdeps/powerpc/powerpc64/power7/memcmp.S b/libc/sysdeps/powerpc/powerpc64/power7/memcmp.S
index f1afffb4e..dcf0f9da7 100644
--- a/libc/sysdeps/powerpc/powerpc64/power7/memcmp.S
+++ b/libc/sysdeps/powerpc/powerpc64/power7/memcmp.S
@@ -1,5 +1,5 @@
/* Optimized memcmp implementation for POWER7/PowerPC64.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011 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
@@ -35,7 +35,7 @@ EALIGN (BP_SYM(memcmp),4,0)
#define rSTR2 r4 /* second string arg */
#define rN r5 /* max string length */
/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and and that support was never completed.
+ was inherited from PPC32 and that support was never completed.
Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */
#define rWORD1 r6 /* current word in s1 */
#define rWORD2 r7 /* current word in s2 */
diff --git a/libc/sysdeps/powerpc/powerpc64/power7/strncmp.S b/libc/sysdeps/powerpc/powerpc64/power7/strncmp.S
index 34f1e52df..498b19c71 100644
--- a/libc/sysdeps/powerpc/powerpc64/power7/strncmp.S
+++ b/libc/sysdeps/powerpc/powerpc64/power7/strncmp.S
@@ -1,5 +1,5 @@
/* Optimized strcmp implementation for POWER7/PowerPC64.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@ EALIGN (BP_SYM(strncmp),4,0)
#define rSTR2 r4 /* second string arg */
#define rN r5 /* max string length */
/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and and that support was never completed.
+ was inherited from PPC32 and that support was never completed.
Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */
#define rWORD1 r6 /* current word in s1 */
#define rWORD2 r7 /* current word in s2 */
@@ -145,30 +145,31 @@ L(u1):
bdz L(u4)
cmpd rWORD1,rWORD2
beq cr1,L(u4)
+ bne L(u4)
lbzu rWORD3,1(rSTR1)
lbzu rWORD4,1(rSTR2)
- bne L(u4)
cmpdi cr1,rWORD3,0
bdz L(u3)
cmpd rWORD3,rWORD4
beq cr1,L(u3)
+ bne L(u3)
lbzu rWORD1,1(rSTR1)
lbzu rWORD2,1(rSTR2)
- bne L(u3)
cmpdi cr1,rWORD1,0
bdz L(u4)
cmpd rWORD1,rWORD2
beq cr1,L(u4)
+ bne L(u4)
lbzu rWORD3,1(rSTR1)
lbzu rWORD4,1(rSTR2)
- bne L(u4)
cmpdi cr1,rWORD3,0
bdz L(u3)
cmpd rWORD3,rWORD4
beq cr1,L(u3)
+ bne L(u3)
lbzu rWORD1,1(rSTR1)
lbzu rWORD2,1(rSTR2)
- beq L(u1)
+ b L(u1)
L(u3): sub rRTN,rWORD3,rWORD4
blr
diff --git a/libc/sysdeps/powerpc/powerpc64/strchr.S b/libc/sysdeps/powerpc/powerpc64/strchr.S
index 93ea61e49..d31a26cd6 100644
--- a/libc/sysdeps/powerpc/powerpc64/strchr.S
+++ b/libc/sysdeps/powerpc/powerpc64/strchr.S
@@ -1,5 +1,5 @@
/* Optimized strchr implementation for PowerPC64.
- Copyright (C) 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000, 2002, 2003, 2011 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
@@ -31,7 +31,7 @@ ENTRY (BP_SYM (strchr))
#define rTMP1 r0
#define rRTN r3 /* outgoing result */
/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and and that support was never completed.
+ was inherited from PPC32 and that support was never completed.
Currently PPC gcc does not support -fbounds-check or -fbounded-pointers.
These artifacts are left in the code as a reminder in case we need
bounded pointer support in the future. */
diff --git a/libc/sysdeps/powerpc/powerpc64/strcmp.S b/libc/sysdeps/powerpc/powerpc64/strcmp.S
index 4d7eb21bf..53d82e372 100644
--- a/libc/sysdeps/powerpc/powerpc64/strcmp.S
+++ b/libc/sysdeps/powerpc/powerpc64/strcmp.S
@@ -1,5 +1,5 @@
/* Optimized strcmp implementation for PowerPC64.
- Copyright (C) 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000, 2002, 2003, 2011 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
@@ -33,7 +33,7 @@ EALIGN (BP_SYM(strcmp), 4, 0)
#define rSTR1 r3 /* first string arg */
#define rSTR2 r4 /* second string arg */
/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and and that support was never completed.
+ was inherited from PPC32 and that support was never completed.
Current PPC gcc does not support -fbounds-check or -fbounded-pointers.
These artifacts are left in the code as a reminder in case we need
bounded pointer support in the future. */
diff --git a/libc/sysdeps/powerpc/powerpc64/strcpy.S b/libc/sysdeps/powerpc/powerpc64/strcpy.S
index e9e9fc78c..17653b29c 100644
--- a/libc/sysdeps/powerpc/powerpc64/strcpy.S
+++ b/libc/sysdeps/powerpc/powerpc64/strcpy.S
@@ -1,5 +1,5 @@
/* Optimized strcpy implementation for PowerPC64.
- Copyright (C) 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000, 2002, 2003, 2011 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
@@ -31,7 +31,7 @@ EALIGN (BP_SYM (strcpy), 4, 0)
#define rTMP r0
#define rRTN r3 /* incoming DEST arg preserved as result */
/* Note. The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and and that support was never completed.
+ was inherited from PPC32 and that support was never completed.
Current PPC gcc does not support -fbounds-check or -fbounded-pointers.
These artifacts are left in the code as a reminder in case we need
bounded pointer support in the future. */
diff --git a/libc/sysdeps/powerpc/powerpc64/strlen.S b/libc/sysdeps/powerpc/powerpc64/strlen.S
index 4c1385aea..aa2289634 100644
--- a/libc/sysdeps/powerpc/powerpc64/strlen.S
+++ b/libc/sysdeps/powerpc/powerpc64/strlen.S
@@ -1,5 +1,5 @@
/* Optimized strlen implementation for PowerPC64.
- Copyright (C) 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000, 2002, 2003, 2011 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
@@ -96,7 +96,7 @@ ENTRY (BP_SYM (strlen))
#define rTMP4 r12
/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and and that support was never completed.
+ was inherited from PPC32 and that support was never completed.
Current PPC gcc does not support -fbounds-check or -fbounded-pointers.
These artifacts are left in the code as a reminder in case we need
bounded pointer support in the future. */
diff --git a/libc/sysdeps/powerpc/powerpc64/strncmp.S b/libc/sysdeps/powerpc/powerpc64/strncmp.S
index 34479e2e9..84e7b6906 100644
--- a/libc/sysdeps/powerpc/powerpc64/strncmp.S
+++ b/libc/sysdeps/powerpc/powerpc64/strncmp.S
@@ -1,5 +1,5 @@
/* Optimized strcmp implementation for PowerPC64.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2011 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
@@ -34,7 +34,7 @@ EALIGN (BP_SYM(strncmp), 4, 0)
#define rSTR2 r4 /* second string arg */
#define rN r5 /* max string length */
/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and and that support was never completed.
+ was inherited from PPC32 and that support was never completed.
Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */
#define rWORD1 r6 /* current word in s1 */
#define rWORD2 r7 /* current word in s2 */
diff --git a/libc/sysdeps/s390/dl-tls.h b/libc/sysdeps/s390/dl-tls.h
index 056046285..7295abc6b 100644
--- a/libc/sysdeps/s390/dl-tls.h
+++ b/libc/sysdeps/s390/dl-tls.h
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. s390 version.
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2011 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
@@ -72,6 +72,9 @@ __tls_get_offset:\n\
# define __TLS_GET_ADDR(__ti) \
({ extern char _GLOBAL_OFFSET_TABLE_[] attribute_hidden; \
(void *) __tls_get_offset ((char *) (__ti) - _GLOBAL_OFFSET_TABLE_) \
- + (unsigned long) __builtin_thread_pointer (); })
+ + (unsigned long) __builtin_thread_pointer (); })
#endif
+
+/* Value used for dtv entries for which the allocation is delayed. */
+#define TLS_DTV_UNALLOCATED ((void *) -1l)
diff --git a/libc/sysdeps/s390/s390-32/elf/start.S b/libc/sysdeps/s390/s390-32/elf/start.S
index 8e48abbcc..c568f824f 100644
--- a/libc/sysdeps/s390/s390-32/elf/start.S
+++ b/libc/sysdeps/s390/s390-32/elf/start.S
@@ -75,6 +75,18 @@ _start:
ltr %r5,%r5
jne .L12
+ /* Usually the auxiliary vector can be expected directly after
+ the environment variables. But we have to skip extra zeros
+ because the loader might have removed unsecure variables for
+ setuid programs. */
+
+.L26: l %r5,0(%r6)
+ la %r6,4(%r6)
+ ltr %r5,%r5
+ jz .L26
+
+ ahi %r6,-4
+
/* Obtain the needed values from the auxiliary vector. */
lhi %r7,16 /* AT_HWCAP */
diff --git a/libc/sysdeps/s390/s390-64/utf16-utf32-z9.c b/libc/sysdeps/s390/s390-64/utf16-utf32-z9.c
index 14daf2118..5bcaaaede 100644
--- a/libc/sysdeps/s390/s390-64/utf16-utf32-z9.c
+++ b/libc/sysdeps/s390/s390-64/utf16-utf32-z9.c
@@ -169,7 +169,10 @@ gconv_end (struct __gconv_step *data)
register unsigned long long outlen asm("11") = outend - outptr; \
uint64_t cc = 0; \
\
- asm volatile ("0: " INSTRUCTION " \n\t" \
+ asm volatile (".machine push \n\t" \
+ ".machine \"z9-109\" \n\t" \
+ "0: " INSTRUCTION " \n\t" \
+ ".machine pop \n\t" \
" jo 0b \n\t" \
" ipm %2 \n" \
: "+a" (pOutput), "+a" (pInput), "+d" (cc), \
diff --git a/libc/sysdeps/s390/s390-64/utf8-utf16-z9.c b/libc/sysdeps/s390/s390-64/utf8-utf16-z9.c
index 5f73f3c59..812a42fae 100644
--- a/libc/sysdeps/s390/s390-64/utf8-utf16-z9.c
+++ b/libc/sysdeps/s390/s390-64/utf8-utf16-z9.c
@@ -151,7 +151,10 @@ gconv_end (struct __gconv_step *data)
register unsigned long long outlen asm("11") = outend - outptr; \
uint64_t cc = 0; \
\
- asm volatile ("0: " INSTRUCTION " \n\t" \
+ asm volatile (".machine push \n\t" \
+ ".machine \"z9-109\" \n\t" \
+ "0: " INSTRUCTION " \n\t" \
+ ".machine pop \n\t" \
" jo 0b \n\t" \
" ipm %2 \n" \
: "+a" (pOutput), "+a" (pInput), "+d" (cc), \
diff --git a/libc/sysdeps/s390/s390-64/utf8-utf32-z9.c b/libc/sysdeps/s390/s390-64/utf8-utf32-z9.c
index 17ef8bc89..0ffd848c8 100644
--- a/libc/sysdeps/s390/s390-64/utf8-utf32-z9.c
+++ b/libc/sysdeps/s390/s390-64/utf8-utf32-z9.c
@@ -155,7 +155,10 @@ gconv_end (struct __gconv_step *data)
register unsigned long long outlen asm("11") = outend - outptr; \
uint64_t cc = 0; \
\
- asm volatile ("0: " INSTRUCTION " \n\t" \
+ asm volatile (".machine push \n\t" \
+ ".machine \"z9-109\" \n\t" \
+ "0: " INSTRUCTION " \n\t" \
+ ".machine pop \n\t" \
" jo 0b \n\t" \
" ipm %2 \n" \
: "+a" (pOutput), "+a" (pInput), "+d" (cc), \
diff --git a/libc/sysdeps/sh/dl-tls.h b/libc/sysdeps/sh/dl-tls.h
index 98e2f1904..cf607903d 100644
--- a/libc/sysdeps/sh/dl-tls.h
+++ b/libc/sysdeps/sh/dl-tls.h
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. SH version.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,3 +27,6 @@ typedef struct
extern void *__tls_get_addr (tls_index *ti);
+
+/* Value used for dtv entries for which the allocation is delayed. */
+#define TLS_DTV_UNALLOCATED ((void *) -1l)
diff --git a/libc/sysdeps/sparc/dl-tls.h b/libc/sysdeps/sparc/dl-tls.h
index 6edf8d525..fb2535e1c 100644
--- a/libc/sysdeps/sparc/dl-tls.h
+++ b/libc/sysdeps/sparc/dl-tls.h
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. SPARC version.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,3 +27,6 @@ typedef struct
extern void *__tls_get_addr (tls_index *ti);
+
+/* Value used for dtv entries for which the allocation is delayed. */
+#define TLS_DTV_UNALLOCATED ((void *) -1l)
diff --git a/libc/sysdeps/unix/sysv/linux/bits/time.h b/libc/sysdeps/unix/sysv/linux/bits/time.h
index 02a05114f..a0d4b7823 100644
--- a/libc/sysdeps/unix/sysv/linux/bits/time.h
+++ b/libc/sysdeps/unix/sysv/linux/bits/time.h
@@ -71,6 +71,8 @@ extern long int __sysconf (int);
# define CLOCK_REALTIME_COARSE 5
/* Monotonic system-wide clock, updated only on ticks. */
# define CLOCK_MONOTONIC_COARSE 6
+/* Monotonic system-wide clock that includes time spent in suspension. */
+# define CLOCK_BOOTTIME 7
/* Flag to indicate time is absolute. */
# define TIMER_ABSTIME 1
diff --git a/libc/sysdeps/unix/sysv/linux/check_pf.c b/libc/sysdeps/unix/sysv/linux/check_pf.c
index b789a32ea..c053adcda 100644
--- a/libc/sysdeps/unix/sysv/linux/check_pf.c
+++ b/libc/sysdeps/unix/sysv/linux/check_pf.c
@@ -1,5 +1,5 @@
/* Determine protocol families for which interfaces exist. Linux version.
- Copyright (C) 2003, 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2007, 2008, 2010, 2011 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
@@ -240,7 +240,7 @@ out_fail:
}
-/* We don't know if we have NETLINK support compiled in in our
+/* We don't know if we have NETLINK support compiled into our
Kernel. */
#if __ASSUME_NETLINK_SUPPORT == 0
/* Define in ifaddrs.h. */
diff --git a/libc/sysdeps/unix/sysv/linux/ftruncate64.c b/libc/sysdeps/unix/sysv/linux/ftruncate64.c
index 60e7ae0ac..533071943 100644
--- a/libc/sysdeps/unix/sysv/linux/ftruncate64.c
+++ b/libc/sysdeps/unix/sysv/linux/ftruncate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997,1998,1999,2000,2001,2003,2005,2006
+/* Copyright (C) 1997,1998,1999,2000,2001,2003,2005,2006,2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -34,7 +34,7 @@ extern int __have_no_truncate64;
#endif
-/* Truncate the file FD refers to to LENGTH bytes. */
+/* Truncate the file referenced by FD to LENGTH bytes. */
int
__ftruncate64 (int fd, off64_t length)
{
diff --git a/libc/sysdeps/unix/sysv/linux/i386/sysconf.c b/libc/sysdeps/unix/sysv/linux/i386/sysconf.c
index 1f5d3b06b..6d8e9ab7a 100644
--- a/libc/sysdeps/unix/sysv/linux/i386/sysconf.c
+++ b/libc/sysdeps/unix/sysv/linux/i386/sysconf.c
@@ -135,7 +135,7 @@ static const struct intel_02_cache_info
{ 0xdc, 12, 64, M(_SC_LEVEL3_CACHE_SIZE), 2097152 },
{ 0xdd, 12, 64, M(_SC_LEVEL3_CACHE_SIZE), 4194304 },
{ 0xde, 12, 64, M(_SC_LEVEL3_CACHE_SIZE), 8388608 },
- { 0xe3, 16, 64, M(_SC_LEVEL3_CACHE_SIZE), 2097152 },
+ { 0xe2, 16, 64, M(_SC_LEVEL3_CACHE_SIZE), 2097152 },
{ 0xe3, 16, 64, M(_SC_LEVEL3_CACHE_SIZE), 4194304 },
{ 0xe4, 16, 64, M(_SC_LEVEL3_CACHE_SIZE), 8388608 },
{ 0xea, 24, 64, M(_SC_LEVEL3_CACHE_SIZE), 12582912 },
diff --git a/libc/sysdeps/unix/sysv/linux/ifaddrs.c b/libc/sysdeps/unix/sysv/linux/ifaddrs.c
index 84f223ddb..ca8c490cb 100644
--- a/libc/sysdeps/unix/sysv/linux/ifaddrs.c
+++ b/libc/sysdeps/unix/sysv/linux/ifaddrs.c
@@ -1,5 +1,5 @@
/* getifaddrs -- get names and addresses of all network interfaces
- Copyright (C) 2003-2008, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2003-2008, 2009, 2010, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,7 +38,7 @@
#include "netlinkaccess.h"
-/* We don't know if we have NETLINK support compiled in in our
+/* We don't know if we have NETLINK support compiled into our
Kernel, so include the old implementation as fallback. */
#if __ASSUME_NETLINK_SUPPORT == 0
int __no_netlink_support attribute_hidden;
diff --git a/libc/sysdeps/unix/sysv/linux/pathconf.c b/libc/sysdeps/unix/sysv/linux/pathconf.c
index ae597fb5b..52610a14d 100644
--- a/libc/sysdeps/unix/sysv/linux/pathconf.c
+++ b/libc/sysdeps/unix/sysv/linux/pathconf.c
@@ -1,5 +1,5 @@
/* Get file-specific information about a file. Linux version.
- Copyright (C) 1991,1995,1996,1998-2003,2008,2010 Free Software Foundation, Inc.
+ Copyright (C) 1991,1995,1996,1998-2003,2008,2010,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,6 +36,8 @@ long int
__pathconf (const char *file, int name)
{
struct statfs fsbuf;
+ int fd;
+ int flags;
switch (name)
{
@@ -51,6 +53,21 @@ __pathconf (const char *file, int name)
case _PC_CHOWN_RESTRICTED:
return __statfs_chown_restricted (__statfs (file, &fsbuf), &fsbuf);
+ case _PC_PIPE_BUF:
+ flags = O_RDONLY|O_NONBLOCK|O_NOCTTY;
+#ifdef O_CLOEXEC
+ flags |= O_CLOEXEC;
+#endif
+ fd = open_not_cancel_2 (file, flags);
+ if (fd >= 0)
+ {
+ long int r = __fcntl (fd, F_GETPIPE_SZ);
+ close_not_cancel_no_status (fd);
+ if (r > 0)
+ return r;
+ }
+ /* FALLTHROUGH */
+
default:
return posix_pathconf (file, name);
}
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c
index e83f7f04b..3d70be892 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2002,2005,2006 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2002,2005,2006,2011 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
@@ -32,7 +32,7 @@ extern int __have_no_truncate64;
#endif
-/* Truncate the file FD refers to to LENGTH bytes. */
+/* Truncate the file referenced by FD to LENGTH bytes. */
int
__ftruncate64 (fd, length)
int fd;
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c
index f107e8437..d1f55e4fc 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997,1998,1999,2000,2002,2005,2006
+/* Copyright (C) 1997,1998,1999,2000,2002,2005,2006,2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -34,7 +34,7 @@ int __have_no_truncate64;
#endif
-/* Truncate the file FD refers to to LENGTH bytes. */
+/* Truncate the file referenced by FD to LENGTH bytes. */
int
truncate64 (path, length)
const char *path;
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
index 1ca4ce66d..ccbca4d25 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
@@ -1,5 +1,5 @@
/* Selective file content synch'ing.
- Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007, 2009, 2011 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
@@ -21,7 +21,7 @@
#include <fcntl.h>
#include <sys/types.h>
-#include <sysdep.h>
+#include <sysdep-cancel.h>
#include <sys/syscall.h>
@@ -29,7 +29,17 @@
int
sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
{
- return INLINE_SYSCALL (sync_file_range2, 4, fd, flags, from, to);
+ if (SINGLE_THREAD_P)
+ return INLINE_SYSCALL (sync_file_range2, 4, fd, flags, from, to);
+
+ int result;
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
+ result = INLINE_SYSCALL (sync_file_range2, 4, fd, flags, from, to);
+
+ LIBC_CANCEL_RESET (oldtype);
+
+ return result;
}
#else
int
diff --git a/libc/sysdeps/unix/sysv/linux/sys/syscall.h b/libc/sysdeps/unix/sysv/linux/sys/syscall.h
index 445ca3763..0fd72d075 100644
--- a/libc/sysdeps/unix/sysv/linux/sys/syscall.h
+++ b/libc/sysdeps/unix/sysv/linux/sys/syscall.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2011 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
@@ -19,7 +19,7 @@
#ifndef _SYSCALL_H
#define _SYSCALL_H 1
-/* This file should list the numbers of the system the system knows.
+/* This file should list the numbers of the system calls the system knows.
But instead of duplicating this we use the information available
from the kernel sources. */
#include <asm/unistd.h>
diff --git a/libc/sysdeps/unix/sysv/linux/truncate64.c b/libc/sysdeps/unix/sysv/linux/truncate64.c
index f43cffe01..63efed816 100644
--- a/libc/sysdeps/unix/sysv/linux/truncate64.c
+++ b/libc/sysdeps/unix/sysv/linux/truncate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2000,2003,2004,2005,2006
+/* Copyright (C) 1997-2000,2003,2004,2005,2006,2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -34,7 +34,7 @@
int __have_no_truncate64;
#endif
-/* Truncate the file FD refers to to LENGTH bytes. */
+/* Truncate the file referenced by FD to LENGTH bytes. */
int
truncate64 (const char *path, off64_t length)
{
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S b/libc/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
index da35115b9..3881082cf 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
+++ b/libc/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001,2004,2005,2006,2009,2010 Free Software Foundation, Inc.
+/* Copyright (C) 2001,2004,2005,2006,2009,2010,2011 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
@@ -30,19 +30,23 @@ longjmp_msg:
//#define __longjmp ____longjmp_chk
#ifdef PIC
-# define CALL_FAIL leaq longjmp_msg(%rip), %rdi; \
- call __GI___fortify_fail
+# define CALL_FAIL subq $8, %rsp; \
+ cfi_remember_state; \
+ cfi_def_cfa_offset(16); \
+ leaq longjmp_msg(%rip), %rdi; \
+ call __GI___fortify_fail; \
+ nop; \
+ cfi_restore_state
#else
-# define CALL_FAIL movq $longjmp_msg, %rdi; \
- call __fortify_fail
+# define CALL_FAIL subq $8, %rsp; \
+ cfi_remember_state; \
+ cfi_def_cfa_offset(16); \
+ movq $longjmp_msg, %rdi; \
+ call __fortify_fail; \
+ nop; \
+ cfi_restore_state
#endif
-#define CHECK_RSP(reg) \
- cmpq reg, %rsp; \
- jbe .Lok; \
- CALL_FAIL; \
-.Lok:
-
/* Jump to the position specified by ENV, causing the
setjmp call there to return VAL, or 1 if VAL is 0.
void __longjmp (__jmp_buf env, int val). */
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/getcontext.S b/libc/sysdeps/unix/sysv/linux/x86_64/getcontext.S
index 4bbc7a4d2..1a31d72da 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/getcontext.S
+++ b/libc/sysdeps/unix/sysv/linux/x86_64/getcontext.S
@@ -1,5 +1,5 @@
/* Save current context.
- Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 2002.
@@ -62,6 +62,7 @@ ENTRY(__getcontext)
movq %rcx, oFPREGS(%rdi)
/* Save the floating-point environment. */
fnstenv (%rcx)
+ fldenv (%rcx)
stmxcsr oMXCSR(%rdi)
/* Save the current signal mask with
diff --git a/libc/sysdeps/x86_64/Versions b/libc/sysdeps/x86_64/Versions
index 253a65f04..a437f85e6 100644
--- a/libc/sysdeps/x86_64/Versions
+++ b/libc/sysdeps/x86_64/Versions
@@ -1,3 +1,8 @@
+libc {
+ GLIBC_2.14 {
+ memcpy;
+ }
+}
libm {
GLIBC_2.1 {
# A generic bug got this omitted from other configurations' version
diff --git a/libc/sysdeps/x86_64/cacheinfo.c b/libc/sysdeps/x86_64/cacheinfo.c
index bd4be3d2d..fdba6efef 100644
--- a/libc/sysdeps/x86_64/cacheinfo.c
+++ b/libc/sysdeps/x86_64/cacheinfo.c
@@ -130,7 +130,7 @@ static const struct intel_02_cache_info
{ 0xdc, 12, 64, M(_SC_LEVEL3_CACHE_SIZE), 2097152 },
{ 0xdd, 12, 64, M(_SC_LEVEL3_CACHE_SIZE), 4194304 },
{ 0xde, 12, 64, M(_SC_LEVEL3_CACHE_SIZE), 8388608 },
- { 0xe3, 16, 64, M(_SC_LEVEL3_CACHE_SIZE), 2097152 },
+ { 0xe2, 16, 64, M(_SC_LEVEL3_CACHE_SIZE), 2097152 },
{ 0xe3, 16, 64, M(_SC_LEVEL3_CACHE_SIZE), 4194304 },
{ 0xe4, 16, 64, M(_SC_LEVEL3_CACHE_SIZE), 8388608 },
{ 0xea, 24, 64, M(_SC_LEVEL3_CACHE_SIZE), 12582912 },
diff --git a/libc/sysdeps/x86_64/dl-tls.h b/libc/sysdeps/x86_64/dl-tls.h
index 9b389edb4..c382cd848 100644
--- a/libc/sysdeps/x86_64/dl-tls.h
+++ b/libc/sysdeps/x86_64/dl-tls.h
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. x86-64 version.
- Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,3 +27,6 @@ typedef struct dl_tls_index
extern void *__tls_get_addr (tls_index *ti);
+
+/* Value used for dtv entries for which the allocation is delayed. */
+#define TLS_DTV_UNALLOCATED ((void *) -1l)
diff --git a/libc/sysdeps/x86_64/memcpy.S b/libc/sysdeps/x86_64/memcpy.S
index b4545ac9f..724d44e6c 100644
--- a/libc/sysdeps/x86_64/memcpy.S
+++ b/libc/sysdeps/x86_64/memcpy.S
@@ -31,6 +31,12 @@
# define RETVAL (0)
#else
# define RETVAL (-8)
+# if defined SHARED && !defined USE_MULTIARCH && !defined NOT_IN_libc
+# define memcpy __memcpy
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name) \
+ .globl __GI_memcpy; __GI_memcpy = __memcpy
+# endif
#endif
#define SAVE0 (RETVAL - 8)
#define SAVE1 (SAVE0 - 8)
@@ -571,4 +577,9 @@ END(memcpy)
#ifndef USE_AS_MEMPCPY
libc_hidden_builtin_def (memcpy)
+# if defined SHARED && !defined USE_MULTIARCH && !defined NOT_IN_libc
+# undef memcpy
+# include <shlib-compat.h>
+versioned_symbol (libc, __memcpy, memcpy, GLIBC_2_14);
+# endif
#endif
diff --git a/libc/sysdeps/x86_64/memmove.c b/libc/sysdeps/x86_64/memmove.c
new file mode 100644
index 000000000..1a6f87dc8
--- /dev/null
+++ b/libc/sysdeps/x86_64/memmove.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 2011 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 "string/memmove.c"
+
+#if !defined memmove && !defined NOT_IN_libc
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT (libc, GLIBC_2_2_5, GLIBC_2_14)
+compat_symbol (libc, memmove, memcpy, GLIBC_2_2_5);
+#endif
+#endif
diff --git a/libc/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S b/libc/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S
index 48c974e97..bdd114a1b 100644
--- a/libc/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S
+++ b/libc/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S
@@ -49,7 +49,7 @@
ud2
.section .text.ssse3,"ax",@progbits
-#if defined SHARED && !defined NOT_IN_libc
+#if !defined USE_AS_BCOPY
ENTRY (MEMCPY_CHK)
cmpq %rdx, %rcx
jb HIDDEN_JUMPTARGET (__chk_fail)
diff --git a/libc/sysdeps/x86_64/multiarch/memcpy-ssse3.S b/libc/sysdeps/x86_64/multiarch/memcpy-ssse3.S
index 9a878d35f..cd7e45f25 100644
--- a/libc/sysdeps/x86_64/multiarch/memcpy-ssse3.S
+++ b/libc/sysdeps/x86_64/multiarch/memcpy-ssse3.S
@@ -49,7 +49,7 @@
ud2
.section .text.ssse3,"ax",@progbits
-#if defined SHARED && !defined NOT_IN_libc
+#if !defined USE_AS_BCOPY
ENTRY (MEMCPY_CHK)
cmpq %rdx, %rcx
jb HIDDEN_JUMPTARGET (__chk_fail)
diff --git a/libc/sysdeps/x86_64/multiarch/memcpy.S b/libc/sysdeps/x86_64/multiarch/memcpy.S
index 8e9fb190d..9863014f5 100644
--- a/libc/sysdeps/x86_64/multiarch/memcpy.S
+++ b/libc/sysdeps/x86_64/multiarch/memcpy.S
@@ -1,5 +1,6 @@
/* Multiple versions of memcpy
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011
+ Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -19,6 +20,7 @@
02111-1307 USA. */
#include <sysdep.h>
+#include <shlib-compat.h>
#include <init-arch.h>
/* Define multiple versions only for the definition in lib and for
@@ -26,8 +28,8 @@
happened. */
#if defined SHARED && !defined NOT_IN_libc
.text
-ENTRY(memcpy)
- .type memcpy, @gnu_indirect_function
+ENTRY(__new_memcpy)
+ .type __new_memcpy, @gnu_indirect_function
cmpl $0, KIND_OFFSET+__cpu_features(%rip)
jne 1f
call __init_cpu_features
@@ -39,7 +41,7 @@ ENTRY(memcpy)
jz 2f
leaq __memcpy_ssse3_back(%rip), %rax
2: ret
-END(memcpy)
+END(__new_memcpy)
# undef ENTRY
# define ENTRY(name) \
@@ -68,6 +70,8 @@ END(memcpy)
by the indirect call in the PLT. */
# define libc_hidden_builtin_def(name) \
.globl __GI_memcpy; __GI_memcpy = __memcpy_sse2
+
+versioned_symbol (libc, __new_memcpy, memcpy, GLIBC_2_14);
#endif
#include "../memcpy.S"
diff --git a/libc/sysdeps/x86_64/multiarch/memmove.c b/libc/sysdeps/x86_64/multiarch/memmove.c
index 379862722..04de89129 100644
--- a/libc/sysdeps/x86_64/multiarch/memmove.c
+++ b/libc/sysdeps/x86_64/multiarch/memmove.c
@@ -1,5 +1,6 @@
/* Multiple versions of memmove.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011
+ 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
@@ -20,6 +21,7 @@
#include <string.h>
#ifndef NOT_IN_libc
+#include <shlib-compat.h>
#include "init-arch.h"
#define MEMMOVE __memmove_sse2
@@ -42,4 +44,8 @@ libc_ifunc (memmove,
? (HAS_FAST_COPY_BACKWARD
? __memmove_ssse3_back : __memmove_ssse3)
: __memmove_sse2);
+
+#if SHLIB_COMPAT (libc, GLIBC_2_2_5, GLIBC_2_14)
+compat_symbol (libc, memmove, memcpy, GLIBC_2_2_5);
+#endif
#endif
diff --git a/libc/time/strptime_l.c b/libc/time/strptime_l.c
index 2559cc35f..2bd24e607 100644
--- a/libc/time/strptime_l.c
+++ b/libc/time/strptime_l.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002,2004,2005,2007,2008,2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2004,2005,2007,2008,2010,2011 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
@@ -214,7 +214,7 @@ static void
day_of_the_week (struct tm *tm)
{
/* We know that January 1st 1970 was a Thursday (= 4). Compute the
- the difference between this data in the one on TM and so determine
+ difference between this data in the one on TM and so determine
the weekday. */
int corr_year = 1900 + tm->tm_year - (tm->tm_mon < 2);
int wday = (-473
diff --git a/libc/wcsmbs/wchar.h b/libc/wcsmbs/wchar.h
index 886131b4a..80d7ae2b5 100644
--- a/libc/wcsmbs/wchar.h
+++ b/libc/wcsmbs/wchar.h
@@ -554,8 +554,10 @@ extern float wcstof_l (__const wchar_t *__restrict __nptr,
extern long double wcstold_l (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
__locale_t __loc) __THROW;
+#endif /* use GNU */
+#ifdef __USE_XOPEN2K8
/* Copy SRC to DEST, returning the address of the terminating L'\0' in
DEST. */
extern wchar_t *wcpcpy (wchar_t *__restrict __dest,
@@ -566,12 +568,10 @@ extern wchar_t *wcpcpy (wchar_t *__restrict __dest,
extern wchar_t *wcpncpy (wchar_t *__restrict __dest,
__const wchar_t *__restrict __src, size_t __n)
__THROW;
-#endif /* use GNU */
/* Wide character I/O functions. */
-#ifdef __USE_XOPEN2K8
/* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces
a wide character string. */
extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW;