Compare commits

...
Author SHA1 Message Date
Luis Machado a519332d6a Additional POWER7 string optimizations.
2010-08-12  Luis Machado  <luisgpm@br.ibm.com>

	* sysdeps/powerpc/powerpc32/power7/memchr.S: New file.
	* sysdeps/powerpc/powerpc32/power7/memrchr.S: New file.
	* sysdeps/powerpc/powerpc32/power7/rawmemchr.S: New file.
	* sysdeps/powerpc/powerpc32/power7/strchr.S: New file.
	* sysdeps/powerpc/powerpc32/power7/strchrnul.S: New file.
	* sysdeps/powerpc/powerpc32/power7/strlen.S: New file.
	* sysdeps/powerpc/powerpc32/power7/strnlen.S: New file.
	* sysdeps/powerpc/powerpc64/power7/memchr.S: New file.
	* sysdeps/powerpc/powerpc64/power7/memrchr.S: New file.
	* sysdeps/powerpc/powerpc64/power7/rawmemchr.S: New file.
	* sysdeps/powerpc/powerpc64/power7/strchr.S: New file.
	* sysdeps/powerpc/powerpc64/power7/strchrnul.S: New file.
	* sysdeps/powerpc/powerpc64/power7/strlen.S: New file.
	* sysdeps/powerpc/powerpc64/power7/strnlen.S: New file.
2010-08-12 14:11:08 -03:00
Luis Machado b9990d9617 POWER6/7 optimizations for copysign. 2010-08-12 13:58:11 -03:00
Luis Machado 90a8fbd8b9 This patch adds 32-bit and 64-bit string compare optimizations for
power7. The code is based on the power4 version.

2010-06-10  Luis Machado  <luisgpm@br.ibm.com>

	* sysdeps/powerpc/powerpc32/power7/memcmp.S: New file
	* sysdeps/powerpc/powerpc64/power7/memcmp.S: New file.
	* sysdeps/powerpc/powerpc32/power7/strncmp.S: New file.
	* sysdeps/powerpc/powerpc64/power7/strncmp.S: New file.
2010-06-14 16:45:55 -05:00
luis 5d5326b135 Experimental Implies fix for all PowerPC platforms.
2010-06-14  Luis Machado  <luisgpm@br.ibm.com>

	* sysdeps/powerpc/powerpc32/970/fpu/Implies: Remove.
	* sysdeps/powerpc/powerpc32/power5/fpu/Implies: Remove.
	* sysdeps/powerpc/powerpc32/power5+/fpu/Implies: Remove.
	* sysdeps/powerpc/powerpc32/power6x/fpu/Implies: Remove.
	* sysdeps/powerpc/powerpc64/970/fpu/Implies: Remove.
	* sysdeps/powerpc/powerpc64/power5/fpu/Implies: Remove.
	* sysdeps/powerpc/powerpc64/power5+/fpu/Implies: Remove.
	* sysdeps/powerpc/powerpc64/power6x/fpu/Implies: Remove.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/970/fpu/Implies: Remove.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/power4/fpu/Implies: Remove.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/power5/fpu/Implies: Remove.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/power5+/fpu/Implies: Remove.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/fpu/Implies: Remove.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/power6x/fpu/Implies: Remove.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/power7/fpu/Implies: Remove.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/970/fpu/Implies: Remove.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/power4/fpu/Implies: Remove.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/power5/fpu/Implies: Remove.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/power5+/fpu/Implies: Remove.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/fpu/Implies: Remove.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/power6x/fpu/Implies: Remove.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/power7/fpu/Implies: Remove.
	* sysdeps/powerpc/powerpc32/970/Implies: Point to power4.
	* sysdeps/powerpc/powerpc32/power5/Implies: Point to power4.
	* sysdeps/powerpc/powerpc32/power5+/Implies: Point to power5.
	* sysdeps/powerpc/powerpc32/power6/Implies: Point to power5+.
	* sysdeps/powerpc/powerpc32/power6x/Implies: Point to power6.
	* sysdeps/powerpc/powerpc64/970/Implies: Point to power4.
	* sysdeps/powerpc/powerpc64/power5/Implies: Point to power4.
	* sysdeps/powerpc/powerpc64/power5+/Implies: Point to power5.
	* sysdeps/powerpc/powerpc64/power6/Implies: Point to power5+.
	* sysdeps/powerpc/powerpc64/power6x/Implies: Point to power6.
	* sysdeps/powerpc/powerpc32/power7/Implies: New file.
	* sysdeps/powerpc/powerpc64/power7/Implies: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/970/Implies: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/cell/Implies: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/power4/Implies: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/power5/Implies: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/Implies: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/power6x/Implies: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/power7/Implies: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/970/Implies: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/cell/Implies: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/power4/Implies: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/power5/Implies: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/Implies: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/power6x/Implies: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/power7/Implies: New file.
2010-06-14 16:09:38 -05:00
Ryan Arnold 91ab06c744 Experimental patch to default PPC64 to no-execstack support. This will need
to be abstracted to remove the guards from common files and put the stack
initialization into a header file that can be overridden.

2010-06-11  Ryan S. Arnold  <rsa@us.ibm.com>

	* elf/dl-load.c (_dl_map_object_from_fd): Set default stack_flags to
	no-exec for ARCH_PPC64.
	* elf/dl-support.c [_dl_stack_flags]: Set default stack_flags to
	no-exec for ARCH_PPC64.
	* elf/rtld.c (_dl_starting_up): Set default stack_flags to no-exec for
	ARCH_PPC64.
2010-06-11 15:11:10 -05:00
Luis Machado 165ab209df Exchange srdi for srwi in 32-bit memset. 2010-05-28 14:58:04 -05:00
Luis Machado 94b1da3a8d Small fix to POWER7 32-bit memset
(cherry-pick from commit ebd2e13d67)
2010-05-28 14:17:23 -05:00
Luis Machado 4d90f0c7da Add missing files.
(cherry pick of commit 33b8d90a1b)

POWER7 optimized memset.

(manual partial merge of commit 4828935d38)
2010-05-20 17:20:07 -05:00
Ryan Arnold 5fe0b279e4 Revert "Power7 memset powerpc32 and powerpc64 .S optimizations."
This reverts commit 0a89b6a6fa.

A corrected version has been pushed upstream and that will be cherry-picked.
2010-05-20 17:05:06 -05:00
Luis Machado 0a89b6a6fa Power7 memset powerpc32 and powerpc64 .S optimizations. 2010-05-14 14:30:11 -05:00
Alan Modra dd1f42ad8a Fix PowerPC64 glibc assembly to properly work with the linker automatic
multiple toc support, which may be needed when a static libc is linked into a
large app.  The requirements are: a) No tail calls are allowed to functions in
a different object file, ie. a plain branch is not allowed.  b) All calls to
functions in a different object file must be followed by a nop.

On PowerPC64, the parameter save area and the cr save location for the current
function are in the previous frame, just like the lr save location.  The
parameter save area, cr save location and lr save location in the current
frame are for use by *called* functions.  In a number of places, glibc
assembly used the wrong area, leaving those functions at the mercy of any
called functions.  We just happen to be lucky so far, but that may change with
future versions of gcc.
2010-05-11 23:43:41 -05:00
Ryan Arnold 3ad0390e7f Merge commit 'origin/release/2.11/master' into local_ibm_2.11 2010-05-11 22:50:40 -05:00
Luis Machado c29c935857 Enable common version of pthread_cond_timedwait to use clock_gettime in VDSO
(cherry pick of commit 7749bf5fe6)
2010-05-11 21:32:26 -05:00
Ulrich Drepper 6d270188ef Fix typos I added in malloc.c
(cherry picked from commit 9d2569846c)
2010-05-12 04:01:28 +02:00
Ryan Arnold 8f0c277566 power7-optimized 64-bit and 32-bit memcpy
(cherry-pick of commit fb084e5e80)
2010-05-11 20:59:48 -05:00
Roland McGrath 32901cc363 Fix a const warning in ldconfig.
(cherry picked from commit 3f7dcb2b0f)
2010-05-12 03:22:45 +02:00
Andreas Schwab b9b562e8bc Fix lookup of collation sequence value during regexp matching
(cherry picked from commit d84acf388e)
2010-05-12 03:21:23 +02:00
Ulrich Drepper 50a66cf517 Fix ldconfig to handle symlinks in chroot correctly.
(cherry picked from commit 7dee26605b)
2010-05-12 03:21:22 +02:00
Ulrich Drepper c4e15a30bd Simplify OOM handling in ldconfig.
(cherry picked from commit f297602394)
2010-05-12 03:21:21 +02:00
Ulrich Drepper 8ef4dbaf6d One more bug in ldconfig -r handling.
(cherry picked from commit 49bd556d43)
2010-05-12 03:21:21 +02:00
Ulrich Drepper 850121f39d Fix handling if newline in addmntent.
(cherry picked from commit ab00f4eac8)
2010-05-12 03:21:20 +02:00
Bruno Haible 15290d7086 BZ #11538: Fix ttyname_r callers not to expect errno was set.
(cherry picked from commit 8c0677fe5d)
2010-05-12 03:21:19 +02:00
Bruno Haible ca27df35b7 BZ #11537: Hurd: Fix ttyname_r error return value.
(cherry picked from commit 6cffee3611)
2010-05-12 03:21:19 +02:00
Emilio Pozuelo Monfort 49c6fd1ff2 Hurd: Fix file_name_lookup_at error case return value.
(cherry picked from commit 67481400c5)
2010-05-12 03:21:18 +02:00
Andreas Schwab 59d5bd49df Don't crash in trace mode when dependencies are missing
(cherry picked from commit 18a26b301b)
2010-05-12 03:21:17 +02:00
Ulrich Drepper 39879d17a4 Fix crash on reloading of gai data in nscd.
(cherry picked from commit ea42a20cae)
2010-05-12 03:21:17 +02:00
Andreas Schwab 1aa9c16a2a Fix fallocate error return on i386.
(cherry picked from commit de240a05b3)
2010-05-12 03:21:16 +02:00
Eric Blake 6b6e2d505c getopt mishandles optstring of "+:"
(cherry picked from commit 66b93be793)
2010-05-12 03:21:15 +02:00
Eric Blake d75c76e1d7 getopt mistakenly allows '-;' as short option
(cherry picked from commit cf0b68196c)
2010-05-12 03:21:15 +02:00
Eric Blake 443a33d804 Fix -W with optional parameters in getopt.
According to the getopt documentation, if "W;" is part of optstring, then '-W
foo' should behave like '--foo'.  But if "foo" uses an optional_argument, this
is not the case, since optarg is not NULL when using -W.

(cherry picked from commit aa7f642769)
2010-05-12 03:21:14 +02:00
Ulrich Drepper 52ade99fe5 Handle DNS timeouts in old-style lookkup code.
(cherry picked from commit 4535680d03)
2010-05-12 03:21:13 +02:00
Ulrich Drepper fbca690a79 Fix aux cache handling in ldconfig with chroot.
(cherry picked from commit 4bc2bcba67)
2010-05-12 03:21:13 +02:00
Ulrich Drepper ed5e4f5aac Fix printing error messages in getopt.
(cherry picked from commit 247fdc8ee6)
2010-05-12 03:21:11 +02:00
Ulrich Drepper 1845ca2309 Declare iruserok and iruserok_af.
(cherry picked from commit 2cd9670885)
2010-05-12 03:21:11 +02:00
Ulrich Drepper 14b56bb117 Add test case for last argp bug.
(cherry picked from commit 7ebaec64a0)
2010-05-12 03:21:10 +02:00
Sergey Poznyakoff ec2c681f5d Fix option aliasing in argp.
(cherry picked from commit 8c6de69d00)
2010-05-12 03:21:09 +02:00
Ulrich Drepper 16c1804e69 Fix retrieving of kernel header version.
(cherry picked from commit 9e37946dba)
2010-05-12 03:21:09 +02:00
Ulrich Drepper 159aeed982 Fix concurrent handling of __cpu_features.
(cherry picked from commit 22f4f44b67)
2010-05-12 03:21:08 +02:00
Ulrich Drepper 043ea9e79d Handle unnecessary padding in getdents64.
The getdents64 syscall adds on 32-but platforms padding which isn't needed
and not included in the userlevel data structure definition.  We have to
avoid copying those padding bytes in the readdir64_r function.

(cherry picked from commit 1a81139728)
2010-05-12 03:21:07 +02:00
Ulrich Drepper ea614f680d Add missing include.
(cherry picked from commit 3fedf0feb7)
2010-05-12 03:21:07 +02:00
Ulrich Drepper 6c4a23bc8d Fix changes to interface list during getifaddrs calls.
(cherry picked from commit b8b14c4cc3)
2010-05-12 03:21:06 +02:00
Ulrich Drepper 02c9c5d2be Document problem with NATs in getaddrinfo.
(cherry picked from commit ed08740859)
2010-05-12 03:21:04 +02:00
Ulrich Drepper 888fec4045 Missing memory barrier in DES initialization.
(cherry picked from commit 647450cfb0)
2010-05-12 03:20:00 +02:00
Ulrich Drepper 64a532ff2c Fix set_max_fast in malloc.
(cherry picked from commit 991eda1ec1)
2010-05-12 02:27:16 +02:00
Andreas Schwab 9914417d12 Fix spurious UNAVAIL status is getaddrinfo
(cherry picked from commit c3dfadb87e)
2010-05-12 02:23:42 +02:00
Andreas Schwab 8469d71f1f Fix typo in cuserid
(cherry picked from commit 34b514dff6)
2010-05-12 02:22:09 +02:00
Jonathan Geisler f273badc6b calls to cuserid() can result in buffer overruns and/or overflows
(cherry picked from commit fd8ccb0427)
2010-05-12 02:21:02 +02:00
Paul Pluzhnikov 877103176f Fix missing dependency of localedata tests on gconv-modules
(cherry picked from commit 234333153e)
2010-05-12 02:17:09 +02:00
Richard Guenther 7dab764e60 Fix R_X86_64_PC32 overflow detection
(cherry picked from commit e39acb1f16)
2010-05-12 02:08:49 +02:00
Ulrich Drepper a82e74eb46 Fix reporting of I/O errors in *dprintf functions.
(cherry picked from commit 7ca890b88e)
2010-05-12 02:03:13 +02:00
Petr Baudis fae1e90fa1 Fix assertion in palloc and pvalloc as well.
(cherry picked from commit 8c0b5f148e)
2010-05-12 02:02:03 +02:00
Jim Meyering 3c0fb4080d manual: fix typo: s/are/is/
* manual/math.texi (BSD Random): Fix a typo: s/are/is/

(cherry picked from commit e2f4aa547a)
2010-05-12 02:01:03 +02:00
Jim Meyering 2da4488386 manual: adjust grammar
* manual/charset.texi: Adjust grammar.

(cherry picked from commit 82acaacb9c)
2010-05-12 02:00:47 +02:00
Jim Meyering a4b67d9bcd manual: fix doubled-words and typos
* manual/charset.texi (Selecting the Conversion): Likewise.
* manual/errno.texi (Error Messages): Likewise.
* manual/getopt.texi (Getopt Long Options): Likewise.
* manual/memory.texi (Resizing the Data Segment): Likewise.
* manual/message.texi (GUI program problems): Likewise.
* manual/resource.texi (CPU Affinity): Likewise.
* manual/stdio.texi (Streams and Threads): Likewise.
* manual/time.texi (High Accuracy Clock): Likewise.

(cherry picked from commit bbf70ae9ce)
2010-05-12 02:00:32 +02:00
Andreas Krebbel f514e0b227 S/390: Disable two UTF conversion instructions
(cherry picked from commit a3dc465852)
2010-05-12 01:57:36 +02:00
Ulrich Drepper 69ad8afe74 Fix file descriotor leak in nftw with FTW_CHDIR
(cherry picked from commit 247fdf2e2b)
2010-05-12 01:56:33 +02:00
Ulrich Drepper c648b3046e Fix i386 __mpn_lshift unwind info
(cherry picked from commit 1d7223f31a)
2010-05-12 01:54:24 +02:00
Ulrich Drepper b204d65517 Fix endless loop with invalid /etc/shells file.
(cherry picked from commit caa6e77293)
2010-05-12 01:41:59 +02:00
Andreas Schwab 272eb2b141 Don't map U00DF to U1E9E in toupper table.
(cherry picked from commit 1112095740)
2010-05-12 01:40:23 +02:00
Andreas Schwab 4aa960e79d Fix error checking in iconv.
(cherry picked from commit 7a51836002)
2010-05-12 01:40:00 +02:00
Ulrich Drepper 2ce2bf1a98 Add BZ number.
(cherry picked from commit 8549abcb9c)
2010-05-12 01:39:42 +02:00
Joe Landers 721d1acb10 _nl_load_locale() incorrectly handles mmap() failures
(cherry picked from commit 8b2f25c233)
2010-05-12 01:39:27 +02:00
Ulrich Drepper ea8e535ed1 Extend overflow detection in re_dfa_add_node.
(cherry picked from commit 2236464488)
2010-05-12 01:35:30 +02:00
Ulrich Drepper 5238213a22 regex: avoid internal re_realloc overflow
(cherry picked from commit 54dd0ab31f)
2010-05-12 01:33:46 +02:00
Andreas Schwab b95387484e Fix ____longjmp_chk for s390/s390x.
(cherry picked from commit e3b7670be2)
2010-05-12 01:31:53 +02:00
Ulrich Drepper b0e8ad9e4b Remove unnecessary returns.
(cherry picked from commit a7bbf3d742)
2010-05-12 01:30:07 +02:00
Andreas Schwab 72fe1ad152 Use correct type when casting d_tag.
(cherry picked from commit db07e962b6)
2010-05-12 01:28:15 +02:00
Andreas Schwab e73ad37f15 Ignore negative dynamic entry types.
(cherry picked from commit 7a033a828d)
2010-05-12 01:27:29 +02:00
Luis Machado c10c30c990 Cleanup old obsolete PPC_REL16 checks
(correct cherry pick of commit 41288fbb78)
2010-05-11 17:53:36 -05:00
Ulrich Drepper 8c55b16c2f Make unistd.h pre-c((-safe.
(cherry picked from commit 0b689682ad)
2010-05-12 00:53:22 +02:00
Luis Machado fe0e800a1a Cleanup old obsolete PPC_REL16 checks
(cherry pick of commit 41288fbb78)
2010-05-11 17:46:02 -05:00
Ryan Arnold 15fa652cbc power7-optimized classification functions
(cherry-pick of commit 0f507b6c95)
2010-05-11 17:16:52 -05:00
Luis Machado 3963f61d13 Fix POWER7 Implies 2010-05-11 13:41:50 -05:00
Ryan Arnold bcb7566995 This patch is not upstream. It is useful and non-invasive. It allows some
recent versions of GCC to compile GLIBC when altivec is configured.

2009-11-06  Petr Baudis <pasky@suse.cz>

	* include/sys/uio.h: Change __vector to __iovec to avoid clash
	with altivec.
2010-05-11 09:48:21 -05:00
H.J. Lu ec10a41982 memchr overshoots on ia64
(cherry picked from commit 70b7d00fc7)
2010-05-11 01:26:57 +02:00
Ryan S. Arnold 71197fe61f Remove incorrect paring of /proc/stat etc.
(cherry picked from commit 3ed8e24122)
2010-05-10 21:37:36 +02:00
Paul Eggert 11c19d374b regcomp.c: do not ignore memory allocation failure
(cherry picked from commit 21f5de55ec)
2010-01-18 18:01:41 +01:00
Ulrich Drepper 2dfab6cf7c Fix typo in feature selection macro use.
(cherry picked from commit 44dcc00292)
2010-01-18 17:58:38 +01:00
Ulrich Drepper 7b35a400cf Avoid ELF lookup race.
On some architectures the update of the l_used field in the lookup
functions races with setting the other bits in the bitfield.  Simply
avoid this and optimize use of l_used in general.

(cherry picked from commit 2af6396817)
2010-01-18 17:56:49 +01:00
Ulrich Drepper a4b737aa08 Fix a few error cases in *name4_r lookup handling.
(cherry picked from commit a682a1bf55)
2010-01-18 17:54:36 +01:00
Petr Baudis 3decedce64 glibc 2.11.1 release 2009-12-08 21:10:20 +01:00
Andreas Schwab 1db8b35487 Fix infloop in __pthread_disable_asynccancel on x86_64
(cherry picked from commit b55ec98c64)
2009-12-04 14:52:25 +01:00
Ulrich Drepper bc207ace44 Avoid local PLTs.
(cherry picked from commit 0f622686af)
2009-12-04 14:51:20 +01:00
Ulrich Drepper 65a27b0b41 Prevent unintended file desriptor leak in grantpt.
The pt_chown program is completely transparently called.  It might
not be able to live with the various file descriptors the program
has open at the time of the call (e.g., under SELinux).  Close all
but the needed descriptor and connect stdin, stdout, and stderr
with /dev/null.  pt_chown shouldn't print anything when called to
do real work.

(cherry picked from commit 139ee080b6)
2009-12-04 14:50:39 +01:00
Ulrich Drepper 4f9d265e05 Fix startup to security-relevant statically linked binaries.
Before the change they crash on startup.  Perform IREL relocations
earlier to prevent this.

(cherry picked from commit 1c3c269b55)
2009-12-04 14:47:33 +01:00
Ulrich Drepper b15f34af1c Define week, first_weekday, and first_workday for hsb_DE locale.
(cherry picked from commit ee5a5ba672)
2009-12-04 14:47:20 +01:00
Ulrich Drepper ede3f7ef5c Define week, first_weekday, and first_workday for en_DK locale.
(cherry picked from commit 49c7f27194)
2009-12-04 14:47:10 +01:00
Ulrich Drepper 360f6f3a25 Fix week information for nl_NL locale.
(cherry picked from commit 6503cfe2de)
2009-12-04 14:46:56 +01:00
Ulrich Drepper 93721a641a Reinitialize _create_xid state after fork.
Programs forking and using RPC in the forks would use the same XIDs.

(cherry picked from commit c5a8b997e2)
2009-12-04 14:45:00 +01:00
H.J. Lu 8d7c09b162 Properly recover from shorter read.
(cherry picked from commit 6622141795)
2009-11-20 20:23:35 +01:00
Jakub Jelinek 1bc1954c73 Fix sync_file_range on ppc/ppc64.
I've noticed that sync_file_range is a stub on ppc/ppc64.
The kernel on these arches provides sync_file_range2 syscall with swapped
parameters.
The following completely untested patch ought to fix this.
(cherry picked from commit 8ad81b316b)
2009-11-19 23:03:21 +01:00
Ulrich Drepper 16b583ea7e Fix getwc* and putwc* on non-wide streams.
(cherry picked from commit df1934daa7)
2009-11-19 22:18:18 +01:00
Ulrich Drepper 488e337a17 Avoid warnings in CPU_* macros when using const bitsets.
(cherry picked from commit 03ebadd9ea)
2009-11-19 22:16:56 +01:00
Ulrich Drepper b12103e146 Whitespace fixes.
(cherry picked from commit 3933378fd3)
2009-11-18 10:10:40 +01:00
Ulrich Drepper c35a44f325 Add missing test files.
(cherry picked from commit 3a00b16da4)
2009-11-18 10:10:25 +01:00
Paolo Bonzini 1960ded78b Fix ranges with multibyte characters as endpoints.
This is another bug in computing the fastmap.  It was reported by a user
of sed because it usually does not happen with !_LIBC.  However, it is
there in that case too.

The bug is that whenever we have a range at the beginning of the regex,
the regex must be tested on any possible multibyte character.  The reason
why _LIBC masks it, is that in general there is a collation symbol for
each possible multibyte-character lead byte, so all the lead bytes are
in general already part of the fastmap.

The tests use cyrillic characters as an example.  With _LIBC, they pass
without the patch too, but you can make them fail by removing collation
symbols handling.

(cherry picked from commit 815d8147a3)
2009-11-18 10:09:58 +01:00
Ulrich Drepper b39591e9c1 Handle LC_GLOBAL_LOCALE in duplocale.
(cherry picked from commit 7443244740)
2009-11-18 10:09:35 +01:00
Ulrich Drepper c086031db0 Fix _NC_LOCALE_NAME definition.
(cherry picked from commit 4fb9241e4e)
2009-11-18 10:09:03 +01:00
Ulrich Drepper 22bdb3aa5b Add missing Linux MADV_* definitions.
(cherry picked from commit 2866eeb1b7)
2009-11-18 10:08:32 +01:00
Mike Frsyinger c0ca09284e Missing CL.
(cherry picked from commit fabe43aba8)
2009-11-18 10:07:41 +01:00
Mike Frsyinger c78e33c312 Fix building on x86 with older kernel headers.
Fix building on x86 when older linux headers lack __NR_fallocate define.

(cherry picked from commit f9a7bd536e)
2009-11-18 10:06:45 +01:00
Mike Frsyinger 3e224a852a Add missing stdio.h include.
(cherry picked from commit 5ec794b4b5)
2009-11-18 10:06:22 +01:00
Ulrich Drepper dc2d2c7e91 Fix F_SETOWN_EX and F_GETOWN_EX definitions.
(cherry picked from commit 8964681064)
2009-11-14 21:37:33 +01:00
240 changed files with 8848 additions and 1005 deletions
+604
View File
@@ -1,3 +1,607 @@
2010-08-12 Luis Machado <luisgpm@br.ibm.com>
* sysdeps/powerpc/powerpc32/power7/memchr.S: New file.
* sysdeps/powerpc/powerpc32/power7/memrchr.S: New file.
* sysdeps/powerpc/powerpc32/power7/rawmemchr.S: New file.
* sysdeps/powerpc/powerpc32/power7/strchr.S: New file.
* sysdeps/powerpc/powerpc32/power7/strchrnul.S: New file.
* sysdeps/powerpc/powerpc32/power7/strlen.S: New file.
* sysdeps/powerpc/powerpc32/power7/strnlen.S: New file.
* sysdeps/powerpc/powerpc64/power7/memchr.S: New file.
* sysdeps/powerpc/powerpc64/power7/memrchr.S: New file.
* sysdeps/powerpc/powerpc64/power7/rawmemchr.S: New file.
* sysdeps/powerpc/powerpc64/power7/strchr.S: New file.
* sysdeps/powerpc/powerpc64/power7/strchrnul.S: New file.
* sysdeps/powerpc/powerpc64/power7/strlen.S: New file.
* sysdeps/powerpc/powerpc64/power7/strnlen.S: New file.
2010-08-12 Luis Machado <luisgpm@br.ibm.com>
* sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S: New file.
* sysdeps/powerpc/powerpc32/power6/fpu/s_copysignf.S: New file.
* sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S: New file.
* sysdeps/powerpc/powerpc64/power6/fpu/s_copysignf.S: New file.
2010-06-10 Luis Machado <luisgpm@br.ibm.com>
* sysdeps/powerpc/powerpc32/power7/memcmp.S: New file
* sysdeps/powerpc/powerpc64/power7/memcmp.S: New file.
* sysdeps/powerpc/powerpc32/power7/strncmp.S: New file.
* sysdeps/powerpc/powerpc64/power7/strncmp.S: New file.
2010-06-14 Luis Machado <luisgpm@br.ibm.com>
* sysdeps/powerpc/powerpc32/970/fpu/Implies: Remove.
* sysdeps/powerpc/powerpc32/power5/fpu/Implies: Remove.
* sysdeps/powerpc/powerpc32/power5+/fpu/Implies: Remove.
* sysdeps/powerpc/powerpc32/power6x/fpu/Implies: Remove.
* sysdeps/powerpc/powerpc64/970/fpu/Implies: Remove.
* sysdeps/powerpc/powerpc64/power5/fpu/Implies: Remove.
* sysdeps/powerpc/powerpc64/power5+/fpu/Implies: Remove.
* sysdeps/powerpc/powerpc64/power6x/fpu/Implies: Remove.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/970/fpu/Implies: Remove.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/power4/fpu/Implies: Remove.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/power5/fpu/Implies: Remove.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/power5+/fpu/Implies: Remove.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/fpu/Implies: Remove.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/power6x/fpu/Implies: Remove.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/power7/fpu/Implies: Remove.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/970/fpu/Implies: Remove.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/power4/fpu/Implies: Remove.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/power5/fpu/Implies: Remove.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/power5+/fpu/Implies: Remove.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/fpu/Implies: Remove.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/power6x/fpu/Implies: Remove.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/power7/fpu/Implies: Remove.
* sysdeps/powerpc/powerpc32/970/Implies: Point to power4.
* sysdeps/powerpc/powerpc32/power5/Implies: Point to power4.
* sysdeps/powerpc/powerpc32/power5+/Implies: Point to power5.
* sysdeps/powerpc/powerpc32/power6/Implies: Point to power5+.
* sysdeps/powerpc/powerpc32/power6x/Implies: Point to power6.
* sysdeps/powerpc/powerpc64/970/Implies: Point to power4.
* sysdeps/powerpc/powerpc64/power5/Implies: Point to power4.
* sysdeps/powerpc/powerpc64/power5+/Implies: Point to power5.
* sysdeps/powerpc/powerpc64/power6/Implies: Point to power5+.
* sysdeps/powerpc/powerpc64/power6x/Implies: Point to power6.
* sysdeps/powerpc/powerpc32/power7/Implies: New file.
* sysdeps/powerpc/powerpc64/power7/Implies: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/970/Implies: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/cell/Implies: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/power4/Implies: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/power5/Implies: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/Implies: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/power6x/Implies: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/power7/Implies: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/970/Implies: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/cell/Implies: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/power4/Implies: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/power5/Implies: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/Implies: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/power6x/Implies: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/power7/Implies: New file.
2010-06-11 Ryan S. Arnold <rsa@us.ibm.com>
* elf/dl-load.c (_dl_map_object_from_fd): Set default stack_flags to
no-exec for ARCH_PPC64.
* elf/dl-support.c [_dl_stack_flags]: Set default stack_flags to
no-exec for ARCH_PPC64.
* elf/rtld.c (_dl_starting_up): Set default stack_flags to no-exec for
ARCH_PPC64.
2010-05-28 Luis Machado <luisgpm@br.ibm.com>
* sysdeps/powerpc/powerpc32/power7/memcpy.S: Exchange srdi for srwi.
2010-05-24 Luis Machado <luisgpm@br.ibm.com>
* sysdeps/powerpc/powerpc32/power7/memset.S: POWER7 32-bit memset fix.
2010-05-17 Luis Machado <luisgpm@br.ibm.com>
* sysdeps/powerpc/powerpc64/power7/memset.S: New file.
* sysdeps/powerpc/powerpc32/power7/memset.S: New file.
2010-05-01 Alan Modra <amodra@gmail.com>
* sysdeps/powerpc/powerpc32/power4/memcmp.S: Correct cfi for r24.
* sysdeps/powerpc/powerpc64/bsd-_setjmp.S: Move contents..
* sysdeps/powerpc/powerpc64/bsd-setjmp.S: ..and these too..
* sysdeps/powerpc/powerpc64/setjmp.S: ..to here..
* sysdeps/powerpc/powerpc64/setjmp-common.S: ..and here, with some
tidying. Don't tail-call __sigjmp_save for static lib.
* sysdeps/powerpc/powerpc64/sysdep.h (SAVE_ARG, REST_ARG): Correct
save location.
(CFI_SAVE_ARG, CFI_REST_ARG): New macros.
(CALL_MCOUNT): Add eh info, and nop after bl.
(TAIL_CALL_SYSCALL_ERROR): New macro.
(PSEUDO_RET): Use it.
* sysdeps/powerpc/powerpc64/dl-trampoline.S (_dl_runtime_resolve):
Correct save location of integer regs and cr.
(_dl_profile_resolve): Correct cr save location. Delete nops
after bl when SHARED. Reduce cfi size a little by better
placement of cfi directives.
* sysdeps/powerpc/powerpc64/fpu/s_copysign.S (__copysign): Don't
make a stack frame. Instead use parm save area as a temp.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S (__brk): Don't
make a stack frame. Use TAIL_CALL_SYSCALL_ERROR.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S (__clone):
Don't make a stack frame for parent, use parm save area.
Increase child stack frame to 112 bytes. Don't save unused reg,
and adjust reg usage. Set up cfi on error recovery and
epilogue of parent, and use TAIL_CALL_SYSCALL_ERROR, PSEUDO_RET.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
(__makecontext): Add dummy nop after jump to exit.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S (__socket):
Use correct parm save area and cr save, reduce stack frame.
Correct cfi for possible PSEUDO_RET frame setup.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
Branch to local label emitted by PSEUDO_RET rather than
__syscall_error.
2010-02-12 Luis Machado <luisgpm@br.ibm.com>
* sysdeps/powerpc/powerpc32/dl-machine.h: Removed old PPC_REL16
check.
* sysdeps/powerpc/powerpc32/dl-machine.h: Likewise.
* sysdeps/powerpc/powerpc32/elf/start.S: Likewise.
* sysdeps/powerpc/powerpc32/memset.S: Likewise.
* sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S: Likewise.
* sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S: Likewise.
* sysdeps/powerpc/powerpc32/configure.in: Fail if R_PPC_REL16
is not supported.
* sysdeps/powerpc/powerpc32/fpu/s_round.S: Likewise.
* sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Likewise.
* sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Likewise.
* sysdeps/powerpc/powerpc32/fpu/s_floorf.S: Likewise.
* sysdeps/powerpc/powerpc32/fpu/s_ceilf.S: Likewise.
* sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Likewise.
* sysdeps/powerpc/powerpc32/fpu/s_floor.S: Likewise.
* sysdeps/powerpc/powerpc32/fpu/s_roundf.S: Likewise.
* sysdeps/powerpc/powerpc32/fpu/s_rintf.S: Likewise.
* sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Likewise.
* sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise.
* sysdeps/powerpc/powerpc32/fpu/s_lround.S: Likewise.
* sysdeps/powerpc/powerpc32/fpu/s_rint.S: Likewise.
* sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S: Likewise.
* sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S: Likewise.
* sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S: Likewise.
* sysdeps/powerpc/powerpc32/dl-start.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/____longjmp_chk.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S: Likewise.
2010-02-08 Luis Machado <luisgpm@br.ibm.com>
* sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S: New file.
* sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S: New file.
* sysdeps/powerpc/powerpc64/power7/fpu/s_isnanf.S: New file.
* sysdeps/powerpc/powerpc32/power7/fpu/s_isnanf.S: New file.
* sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S: New file.
* sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S: New file.
* sysdeps/powerpc/powerpc64/power7/fpu/s_isinff.S: New file.
* sysdeps/powerpc/powerpc32/power7/fpu/s_isinff.S: New file.
* sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S: New file.
* sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S: New file.
* sysdeps/powerpc/powerpc64/power7/fpu/s_finitef.S: New file.
* sysdeps/powerpc/powerpc32/power7/fpu/s_finitef.S: New file.
2010-02-10 Luis Machado <luisgpm@br.ibm.com>
* sysdeps/powerpc/powerpc64/power7/Implies: Removed.
* sysdeps/powerpc/powerpc64/power7/fpu/Implies: Removed.
* sysdeps/powerpc/powerpc32/power7/Implies: Removed.
* sysdeps/powerpc/powerpc32/power7/fpu/Implies: Removed.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/power7/fpu/Implies: Add
64-bit power7 fpu path.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/power7/fpu/Implies: Add
32-bit power7 fpu math.
2009-11-06 Petr Baudis <pasky@suse.cz>
* include/sys/uio.h: Change __vector to __iovec to avoid clash
with altivec.
2010-05-07 Roland McGrath <roland@redhat.com>
* elf/ldconfig.c (main): Add a const.
2010-05-04 Andreas Schwab <schwab@redhat.com>
* posix/regexec.c (find_collation_sequence_value): Fix skipping
the wide char sequence of the collating element.
2010-05-03 Ulrich Drepper <drepper@redhat.com>
[BZ #11149]
* elf/ldconfig.c (search_dir): Fix handling of symlinks in chroot.
* elf/chroot_canon.c (chroot_canon): Use xmalloc and xrealloc.
* elf/ldconfig.c (parse_conf_include): Don't fall back to
directories named in config file outside the chroot.
2010-05-02 Ulrich Drepper <drepper@redhat.com>
* misc/mntent_r.c (encode_name): The slow loop handles newlines so we
should recognize them as an abort condition.
Patch by Jan Lieskovsky <jlieskov@redhat.com>.
2010-04-25 Bruno Haible <bruno@clisp.org>
[BZ #11538]
* sysdeps/unix/bsd/ptsname.c (__ptsname_r): Use __ttyname_r's return
value instead of errno.
* sysdeps/unix/getlogin.c (getlogin): Likewise.
[BZ #11537]
* sysdeps/mach/hurd/ttyname_r.c (__ttyname_r): Upon failure, return
errno, not -1.
2010-04-24 Emilio Pozuelo Monfort <pochu27@gmail.com>
* hurd/lookup-at.c (__file_name_lookup_at): Fix error return value.
2010-04-14 Andreas Schwab <schwab@redhat.com>
* elf/dl-version.c (_dl_check_map_versions): Avoid index overflow
when dependencies are missing.
2010-04-09 Ulrich Drepper <drepper@redhat.com>
* nscd/aicache.c (addhstaiX): Correct passing memory to address
list to gethostbyname4_r functions.
* resolv/nss_dns/dns-host.c (gaih_getanswer_slice): Optimize
copying of h_name.
2010-04-07 Andreas Schwab <schwab@redhat.com>
* sysdeps/unix/sysv/linux/i386/fallocate.c: Set errno on error.
* sysdeps/unix/sysv/linux/i386/fallocate64.c: Likewise.
2009-12-01 Eric Blake <ebb9@byu.net>
[BZ #11039]
* posix/getopt.c (_getopt_internal_r): Skip optional - or + before
checking lead byte of optstring for :.
[BZ #11040]
* posix/getopt.c (_getopt_internal_r): Reject '-;' as short
option, since it conflicts with "W;" optstring extension.
2009-12-02 Eric Blake <ebb9@byu.net>
[BZ #11041]
* posix/getopt.c (_getopt_internal_r): Handle '-Wfoo' identically
to '--foo', with optional argument or non-ambiguous prefix.
2010-04-05 Ulrich Drepper <drepper@redhat.com>
[BZ #11010]
* resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname3_r): Handle
timeouts from servers.
[BZ #11149]
* elf/ldconfig.c (main): Respect chroot setting when looking for
the aux cache.
2010-04-04 Ulrich Drepper <drepper@redhat.com>
[BZ #11043]
* posix/getopt.c (_getopt_internal_r): Fix arguments printed in error
messages.
[BZ #11070]
* resolv/netdb.h: Declare iruserok and iruserok_af.
* argp/Makefile: Add rules to build and run bug-argp2.
* argp/bug-argp2.c: New file.
2010-02-05 Sergey Poznyakoff <gray@gnu.org.ua>
[BZ #11254]
* argp/argp-parse.c (convert_options): Fix improper use of `|'
between character values.
2010-04-04 Ulrich Drepper <drepper@redhat.com>
[BZ #11287]
* csu/Makefile ($(objpfx)version-info.h): Handle newer kernel headers
which don't define UTS_RELEASE.
2010-04-04 H.J. Lu <hongjiu.lu@intel.com>
Ulrich Drepper <drepper@redhat.com>
[BZ #11292]
* sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features): Allow
concurrent initialization and use of __cpu_features.
2010-04-04 Ulrich Drepper <drepper@redhat.com>
* sysdeps/x86_64/multiarch/init-arch.h (cpu_features): Add tag to
the enum.
2010-04-03 Ulrich Drepper <drepper@redhat.com>
[BZ #11333]
* sysdeps/unix/readdir_r.c (__READDIR_R): Add support for platforms
which include unnecessary padding in d_reclen.
* sysdeps/unix/sysv/linux/i386/readdir64_r.c: Select work-around for
unnecessary padding.
[BZ #11387]
* sysdeps/unix/sysv/linux/ifaddrs.c (map_newlin): Don't abort on
unknown interface, return -1.
(getifaddrs_internal): Rename from getifaddrs. Handle errors in
map_newlink be returning -EAGAIN.
(getifaddrs): If -EAGAIN is returned from getifaddrs_internal try
again.
2010-04-03 Ulrich Drepper <drepper@redhat.com>
[BZ #11438]
* posix/gai.conf: Document problems with IPv4 site-local addresses and
NATs.
[BZ #11449]
* crypt/crypt_util.c (__init_des_r): Add memory barrier before setting
small_tables_initialized.
* malloc/malloc.c (set_max_fast): Fix computation of the value.
2010-03-25 Andreas Schwab <schwab@redhat.com>
* sysdeps/posix/getaddrinfo.c (gaih_inet): Reset no_data before
each action.
2010-03-25 Andreas Schwab <schwab@redhat.com>
* sysdeps/posix/cuserid.c: Fix typo.
2010-03-24 Ulrich Drepper <drepper@redhat.com>
[BZ #11397]
* sysdeps/posix/cuserid.c (cuserid): Make sure the returned string
is NUL terminated.
Patch by Jonathan Geisler <jgeisler@cse.taylor.edu>.
2010-03-02 Richard Guenther <rguenther@suse.de>
* sysdeps/x86_64/dl-machine.h (elf_machine_rela): R_X86_64_PC32
is sign-extending.
2010-02-24 Ulrich Drepper <drepper@redhat.com>
[BZ #11319]
* libio/iovdprintf.c (_IO_vdprintf): Explicitly flush stream before
undoing the stream because _IO_FINISH doesn't report failures.
[BZ #5553]
* malloc/malloc.c (public_vALLOc): Set ar_ptr when trying main_arena.
(public_pVALLOc): Likewise.
Patch by Petr Baudis.
2010-02-22 Jim Meyering <meyering@redhat.com>
* manual/math.texi (BSD Random): Fix a typo: s/are/is/
* manual/charset.texi: Adjust grammar.
* manual/errno.texi (Error Messages): Fix doubled-words and typos.
* manual/charset.texi (Selecting the Conversion): Likewise.
* manual/getopt.texi (Getopt Long Options): Likewise.
* manual/memory.texi (Resizing the Data Segment): Likewise.
* manual/message.texi (GUI program problems): Likewise.
* manual/resource.texi (CPU Affinity): Likewise.
* manual/stdio.texi (Streams and Threads): Likewise.
* manual/time.texi (High Accuracy Clock): Likewise.
2010-02-11 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* sysdeps/s390/s390-64/utf8-utf16-z9.c: Disable hardware
instructions cu21 and cu24. Add well-formedness checking
parameter and adjust the software implementation.
* sysdeps/s390/s390-64/utf16-utf32-z9.c: Likewise.
2010-02-10 Ulrich Drepper <drepper@redhat.com>
[BZ #11271]
* io/ftw.c (ftw_startup): Close descriptor for initial directory
after changing back to it.
2010-02-09 Ulrich Drepper <drepper@redhat.com>
* sysdeps/i386/lshift.S: Fix unwind information.
2010-02-03 Ulrich Drepper <drepper@redhat.com>
[BZ #11242]
* misc/getusershell.c (initshells): Allocate one more byte in input
buffer so that fgets doesn't loop undefinitely.
2010-01-25 Andreas Schwab <schwab@redhat.com>
* iconv/iconv_prog.c (write_output): Fix check for open failure.
2010-01-22 Ulrich Drepper <drepper@redhat.com>
[BZ #11200]
* locale/loadlocale.c (_nl_load_locale): Fix recognition of genuine
mmap resource problem. Patch by Joe Landers <jlanders@vmware.com>.
2010-01-22 Jim Meyering <jim@meyering.net>
[BZ #11184]
* posix/regex_internal.c (re_dfa_add_node): Extend the overflow
detection test. Patch by Paul Eggert.
[BZ #11183]
* posix/regex_internal.c (re_string_realloc_buffers):
Detect and handle internal overflow. Patch by Paul Eggert
2010-01-20 Andreas Schwab <schwab@redhat.com>
* sysdeps/unix/sysv/linux/s390/s390-32/____longjmp_chk.c
(CHECK_SP): Fix check for alternate stack.
* sysdeps/unix/sysv/linux/s390/s390-64/____longjmp_chk.c
(CHECK_SP): Likewise.
2010-01-19 Ulrich Drepper <drepper@redhat.com>
[BZ #11194]
* misc/bits/syslog.h (syslog, vsyslog): Remove unnecessary return.
2010-01-18 Andreas Schwab <schwab@redhat.com>
* elf/dynamic-link.h (elf_get_dynamic_info): Use correct type when
casting d_tag.
* elf/dynamic-link.h (elf_get_dynamic_info): Ignore negative
dynamic entry types.
2010-01-14 Ulrich Drepper <drepper@redhat.com>
* bits/confname.h: Make pre-C99-safe.
2010-02-05 H.J. Lu <hongjiu.lu@intel.com>
[BZ #11230]
* sysdeps/ia64/memchr.S: Don't read beyond the last byte
during recovery.
2010-03-25 Ryan S. Arnold <rsa@us.ibm.com>
* sysdeps/unix/sysv/linux/getsysstats.c (next_line): Remove
redundant and incorrect else block which overwrites current line
with the partial next line.
2010-01-14 Ulrich Drepper <drepper@redhat.com>
[BZ #11127]
* posix/regcomp.c (alc_eclosure_iter): Do not ignore
re_node_set_insert failure; return REG_ESPACE.
Patch by Paul Eggert.
2010-01-06 Ulrich Drepper <drepper@redhat.com>
* dirent/dirent.h: Fix typo in feature selection macro use.
2009-12-15 Ulrich Drepper <drepper@redhat.com>
* include/link.h (struct link_map): Move l_used into its own word.
* elf/dl-lookup.c (_dl_lookup_symbol_x): Only update l_used when it is
still zero.
* elf/dl-object.c (_dl_new_object): Set dl_used if we know it is
never really used.
2009-12-10 Ulrich Drepper <drepper@redhat.com>
[BZ #11000]
* nis/nss_nis/nis-hosts.c (_nss_nis_gethostbyname4_r): Always set
*herrnop before returning.
* nis/nss_nisplus/nisplus-hosts.c (internal_gethostbyname2_r):
Likewise.
* nss/nss_files/files-hosts.c (_nss_files_gethostbyname4_r): Handle
TRYAGAIN errors separately.
* sysdeps/posix/getaddrinfo.c (gaih_inet): Fix error handling of
*name4_r after functions.
2009-11-24 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/grantpt.c (grantpt): Use CLOSE_ALL_FDS is available
before the exec.
* sysdeps/unix/sysv/linux/grantpt.c: New file.
* login/programs/pt_chown.c (main): Don't print message on errors
when doing real work.
* csu/elf-init.c (__libc_csu_irel): New function. Code to perform
irel relocations split out from...
(__libc_csu_init): ...here.
* csu/libc-start.c [!SHARED]: Call __libc_csu_irel early.
2009-11-22 Ulrich Drepper <drepper@redhat.com>
* sunrpc/create_xid.c (_create_xid): Reinitialize state after fork.
2009-11-18 H.J. Lu <hongjiu.lu@intel.com>
[BZ #10162]
* sysdeps/ia64/memchr.S: Don't use a simple loop on data shorter
than software pipeline. Properly recover from shorter read.
2009-11-16 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/sync_file_range.c (sync_file_range):
Implement using sync_file_range2 syscall if __NR_sync_file_range2
is defined.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c: New
file.
2009-11-19 Ulrich Drepper <drepper@redhat.com>
[BZ #10958]
* libio/libio.h (_IO_getwc_unlocked): Check for _wide_data being
initialized before using it.
(_IO_putwc_unlocked): Likewise.
[BZ #10918]
* sysdeps/unix/sysv/linux/bits/sched.h (__CPU_ISSET_S): Use __const
in cast to not throw away const-ness of parameters.
(__CPU_EQUAL_S): Likewise.
(__CPU_OP_S): Likewise.
2009-11-17 Paolo Bonzini <bonzini@gnu.org>
* posix/bug-regex30.c: New file.
* posix/Makefile: Add rules to build and run bug-regex30.
* posix/regcomp.c (re_compile_fastmap_iter): Add all multibyte
character lead bytes when there is a range in a COMPLEX_BRACKET.
Reported by Oleg Bylatov.
2009-11-17 Ulrich Drepper <drepper@redhat.com>
[BZ #10969]
* locale/duplocale.c (__duplocale): Handle LC_GLOBAL_LOCALE special.
* locale/tst-duplocale.c: New file.
* locale/Makefile (tests): Add tst-duplocale.
[BZ #10968]
* locale/langinfo.h (_NL_LOCALE_NAME): Correct definition.
Patch by Bruno Haible <bruno@clisp.org>.
* locale/tst-locname.c: New file.
* locale/Makefile (tests): Add tst-locname.
[BZ #10972]
* sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Add new MADV_*
constants from recent kernels.
* sysdeps/unix/sysv/linux/i386/bits/mman.h: Likewise.
* sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Likewise.
* sysdeps/unix/sysv/linux/s390/bits/mman.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/mman.h: Likewise.
* sysdeps/unix/sysv/linux/sh/bits/mman.h: Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/mman.h: Likewise.
2009-11-09 Mike Frysinger <vapier@gentoo.org>
* sysdeps/unix/sysv/linux/i386/fallocate.c: Include errno.h.
(fallocate): Return ENOSYS if __NR_fallocate is not defined.
* sysdeps/unix/sysv/linux/i386/fallocate64.c: Likewise.
2009-11-06 Mike Frysinger <vapier@gentoo.org>
* posix/bug-regex29.c: Include stdio.h.
2009-11-14 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Update F_SETOWN_EX and
F_GETOWN_EX definitions according to corrected kernel definitions.
* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
2009-11-10 Andreas Schwab <schwab@redhat.com>
* resolv/mapv4v6hostent.h (map_v4v6_hostent): Return non-zero if
+3 -2
View File
@@ -1,4 +1,4 @@
# Copyright (C) 1997, 2002, 2003, 2006, 2007 Free Software Foundation, Inc.
# Copyright (C) 1997,2002,2003,2006,2007,2010 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
@@ -26,12 +26,13 @@ distribute = argp-fmtstream.h argp-namefrob.h
routines = $(addprefix argp-, ba fmtstream fs-xinl help parse pv \
pvh xinl eexst)
tests = argp-test tst-argp1 bug-argp1 tst-argp2
tests = argp-test tst-argp1 bug-argp1 tst-argp2 bug-argp2
CFLAGS-argp-help.c = $(uses-callbacks) -fexceptions
CFLAGS-argp-parse.c = $(uses-callbacks)
CFLAGS-argp-fmtstream.c = -fexceptions
bug-argp1-ARGS = -- --help
bug-argp2-ARGS = -- -d 111 --dstaddr 222 -p 333 --peer 444
include ../Rules
+6 -6
View File
@@ -1,5 +1,5 @@
/* Hierarchial argument parsing, layered over getopt
Copyright (C) 1995-2000, 2002, 2003, 2004 Free Software Foundation, Inc.
Copyright (C) 1995-2000, 2002, 2003, 2004, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -99,7 +99,7 @@ static volatile int _argp_hang;
static const struct argp_option argp_default_options[] =
{
{"help", '?', 0, 0, N_("Give this help list"), -1},
{"help", '?', 0, 0, N_("Give this help list"), -1},
{"usage", OPT_USAGE, 0, 0, N_("Give a short usage message")},
{"program-name",OPT_PROGNAME,"NAME", OPTION_HIDDEN, N_("Set the program name")},
{"HANG", OPT_HANG, "SECS", OPTION_ARG_OPTIONAL | OPTION_HIDDEN,
@@ -164,7 +164,7 @@ static const struct argp argp_default_argp =
static const struct argp_option argp_version_options[] =
{
{"version", 'V', 0, 0, N_("Print program version"), -1},
{"version", 'V', 0, 0, N_("Print program version"), -1},
{0, 0}
};
@@ -364,7 +364,7 @@ convert_options (const struct argp *argp,
values (the sign of the lower bits is preserved
however)... */
cvt->long_end->val =
((opt->key | real->key) & USER_MASK)
((opt->key ? opt->key : real->key) & USER_MASK)
+ (((group - cvt->parser->groups) + 1) << USER_BITS);
/* Keep the LONG_OPTS list terminated. */
@@ -385,7 +385,7 @@ convert_options (const struct argp *argp,
if (children)
/* Assign GROUP's CHILD_INPUTS field some space from
CVT->child_inputs_end.*/
CVT->child_inputs_end.*/
{
unsigned num_children = 0;
while (children[num_children].argp)
@@ -823,7 +823,7 @@ parser_parse_next (struct parser *parser, int *arg_ebadkey)
parser->try_getopt = 0;
if (parser->state.next > 1
&& strcmp (parser->state.argv[parser->state.next - 1], QUOTE)
== 0)
== 0)
/* Not only is this the end of the options, but it's a
`quoted' region, which may have args that *look* like
options, so we definitely shouldn't try to use getopt past
+55
View File
@@ -0,0 +1,55 @@
#include <argp.h>
#include <stdio.h>
#include <stdlib.h>
static struct argp_option argp_options[] = {
{ "dstaddr", 'd', "ADDR", 0,
"set destination (peer) address to ADDR" },
{ "peer", 'p', "ADDR", OPTION_ALIAS },
{ NULL }
};
static error_t parse_opt (int key, char *arg, struct argp_state *state);
static struct argp argp =
{
argp_options, parse_opt
};
static int cnt;
static int
do_test (int argc, char *argv[])
{
int remaining;
argp_parse (&argp, argc, argv, 0, &remaining, NULL);
return cnt != 4;
}
static error_t
parse_opt (int key, char *arg, struct argp_state *state)
{
switch (key)
{
case 'd':
case 'p':
printf ("got '%c' with argument '%s'\n", key, arg);
++cnt;
break;
case 0:
case ARGP_KEY_END:
case ARGP_KEY_NO_ARGS:
case ARGP_KEY_INIT:
case ARGP_KEY_SUCCESS:
case ARGP_KEY_FINI:
// Ignore.
return ARGP_ERR_UNKNOWN;
default:
printf ("invalid key '%x'\n", key);
exit (1);
}
return 0;
}
#define TEST_FUNCTION do_test (argc, argv)
#include "../test-skeleton.c"
+1 -1
View File
@@ -527,7 +527,7 @@ enum
_SC_THREAD_ROBUST_PRIO_INHERIT,
#define _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT
_SC_THREAD_ROBUST_PRIO_PROTECT,
_SC_THREAD_ROBUST_PRIO_PROTECT
#define _SC_THREAD_ROBUST_PRIO_PROTECT _SC_THREAD_ROBUST_PRIO_PROTECT
};
+43 -41
View File
@@ -1,7 +1,7 @@
/*
* UFC-crypt: ultra fast crypt(3) implementation
*
* Copyright (C) 1991, 92, 93, 96, 97, 98, 2000 Free Software Foundation, Inc.
* Copyright (C) 1991-1993,1996-1998,2000,2010 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -27,6 +27,7 @@
#ifdef DEBUG
#include <stdio.h>
#endif
#include <atomic.h>
#include <string.h>
#ifndef STATIC
@@ -114,53 +115,53 @@ static const int perm32[32] = {
* The sboxes
*/
static const int sbox[8][4][16]= {
{ { 14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7 },
{ 0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8 },
{ 4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0 },
{ 15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13 }
},
{ { 14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7 },
{ 0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8 },
{ 4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0 },
{ 15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13 }
},
{ { 15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10 },
{ 3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5 },
{ 0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15 },
{ 13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9 }
},
{ { 15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10 },
{ 3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5 },
{ 0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15 },
{ 13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9 }
},
{ { 10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8 },
{ 13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1 },
{ 13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7 },
{ 1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12 }
},
{ { 10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8 },
{ 13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1 },
{ 13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7 },
{ 1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12 }
},
{ { 7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15 },
{ 13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9 },
{ 10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4 },
{ 3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14 }
},
{ { 7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15 },
{ 13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9 },
{ 10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4 },
{ 3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14 }
},
{ { 2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9 },
{ 14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6 },
{ 4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14 },
{ 11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3 }
},
{ { 2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9 },
{ 14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6 },
{ 4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14 },
{ 11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3 }
},
{ { 12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11 },
{ 10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8 },
{ 9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6 },
{ 4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13 }
},
{ { 12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11 },
{ 10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8 },
{ 9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6 },
{ 4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13 }
},
{ { 4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1 },
{ 13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6 },
{ 1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2 },
{ 6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12 }
},
{ { 4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1 },
{ 13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6 },
{ 1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2 },
{ 6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12 }
},
{ { 13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7 },
{ 1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2 },
{ 7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8 },
{ 2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11 }
}
{ { 13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7 },
{ 1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2 },
{ 7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8 },
{ 2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11 }
}
};
/*
@@ -468,6 +469,7 @@ __init_des_r(__data)
efp[comes_from_word][word_value][o_long] |= mask2;
}
}
atomic_write_barrier ();
small_tables_initialized = 1;
#ifdef __GNU_LIBRARY__
small_tables_done:
+13 -2
View File
@@ -1,5 +1,5 @@
# Makefile for csu code for GNU C library.
# Copyright (C) 1995-2004, 2005, 2006 Free Software Foundation, Inc.
# Copyright (C) 1995-2004, 2005, 2006, 2010 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
@@ -209,8 +209,19 @@ $(objpfx)version-info.h: $(common-objpfx)config.make $(all-Banner-files)
linux*) version=`(printf '%s\n%s\n' \
'#include <linux/version.h>' \
UTS_RELEASE \
| $(CC) $(CPPFLAGS) -E -P - -DNOT_IN_libc=1 | \
| $(CC) $(CPPFLAGS) -O -E -P - -DNOT_IN_libc=1 | \
sed -e 's/"\([^"]*\)".*/\1/p' -e d) 2>/dev/null`;\
if [ -z "$$version" ]; then \
version=`(printf '%s\n%s\n' \
'#include <linux/version.h>' \
LINUX_VERSION_CODE \
| $(CC) $(CPPFLAGS) -O -E -P - -DNOT_IN_libc=1 \
| sed -n -e '/^[123456789].*/p' \
| awk '{v=$$1; \
printf("%d.%d.%d\n", \
v/65535, v/256%256, v%256)}') \
2>/dev/null`; \
fi; \
if [ -z "$$version" ]; then \
if [ -r /proc/version ]; then \
version=`sed 's/.*Linux version \([^ ]*\) .*/>>\1<</' \
+15 -6
View File
@@ -72,15 +72,14 @@ extern void _fini (void);
/* These functions are passed to __libc_start_main by the startup code.
These get statically linked into each program. For dynamically linked
programs, this module will come from libc_nonshared.a and differs from
the libc.a module in that it doesn't call the preinit array. */
the libc.a module in that it doesn't call the preinit array and performs
explicit IREL{,A} relocations. */
void
__libc_csu_init (int argc, char **argv, char **envp)
{
/* For dynamically linked executables the preinit array is executed by
the dynamic linker (before initializing any shared object. */
#ifndef LIBC_NONSHARED
void
__libc_csu_irel (void)
{
# ifdef USE_MULTIARCH
# ifdef ELF_MACHINE_IRELA
{
@@ -98,7 +97,17 @@ __libc_csu_init (int argc, char **argv, char **envp)
}
# endif
# endif
}
#endif
void
__libc_csu_init (int argc, char **argv, char **envp)
{
/* For dynamically linked executables the preinit array is executed by
the dynamic linker (before initializing any shared object. */
#ifndef LIBC_NONSHARED
/* For static executables, preinit happens right before init. */
{
const size_t size = __preinit_array_end - __preinit_array_start;
+6
View File
@@ -24,6 +24,9 @@
#include <bp-sym.h>
extern void __libc_init_first (int argc, char **argv, char **envp);
#ifndef SHARED
extern void __libc_csu_irel (void);
#endif
extern int __libc_multiple_libcs;
@@ -134,6 +137,9 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
}
# endif
/* Performe IREL{,A} relocations. */
__libc_csu_irel ();
/* Initialize the thread library at least a bit since the libgcc
functions are using thread functions if these are available and
we need to setup errno. */
+2 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991-2000, 2003-2005, 2009 Free Software Foundation, Inc.
/* Copyright (C) 1991-2000,2003-2005,2009,2010 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
@@ -218,7 +218,7 @@ extern void seekdir (DIR *__dirp, long int __pos) __THROW __nonnull ((1));
extern long int telldir (DIR *__dirp) __THROW __nonnull ((1));
#endif
#if defined __USE_BSD || defined __USE_MISC || defined __XOPEN_2K8
#if defined __USE_BSD || defined __USE_MISC || defined __XOPEN2K8
/* Return the file descriptor used by DIRP. */
extern int dirfd (DIR *__dirp) __THROW __nonnull ((1));
+3 -7
View File
@@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file inside chroot.
Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2005
Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2005,2010
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -58,9 +58,7 @@ chroot_canon (const char *chroot, const char *name)
return NULL;
}
rpath = malloc (chroot_len + PATH_MAX);
if (rpath == NULL)
return NULL;
rpath = xmalloc (chroot_len + PATH_MAX);
rpath_limit = rpath + chroot_len + PATH_MAX;
@@ -109,9 +107,7 @@ chroot_canon (const char *chroot, const char *name)
new_size += end - start + 1;
else
new_size += PATH_MAX;
new_rpath = (char *) realloc (rpath, new_size);
if (new_rpath == NULL)
goto error;
new_rpath = (char *) xrealloc (rpath, new_size);
rpath = new_rpath;
rpath_limit = rpath + new_size;
+5
View File
@@ -996,8 +996,13 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
}
}
#if (defined (_ARCH_PPC64) || defined (__powerpc64__))
/* Default to no-exec stack on PPC64. */
uint_fast16_t stack_flags = PF_R|PF_W;
#else
/* Presumed absent PT_GNU_STACK. */
uint_fast16_t stack_flags = PF_R|PF_W|PF_X;
#endif
{
/* Scan the program header table, collecting its load commands. */
+4 -3
View File
@@ -777,7 +777,7 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
if (__builtin_expect (protected != 0, 0))
{
/* It is very tricky. We need to figure out what value to
return for the protected symbol. */
return for the protected symbol. */
if (type_class == ELF_RTYPE_CLASS_PLT)
{
if (current_value.s != NULL && current_value.m != undef_map)
@@ -822,7 +822,8 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
version, type_class, flags, skip_map);
/* The object is used. */
current_value.m->l_used = 1;
if (__builtin_expect (current_value.m->l_used == 0, 0))
current_value.m->l_used = 1;
if (__builtin_expect (GLRO(dl_debug_mask)
& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
@@ -844,7 +845,7 @@ _dl_setup_hash (struct link_map *map)
Elf_Symndx nchain;
if (__builtin_expect (map->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM
+ DT_THISPROCNUM + DT_VERSIONTAGNUM
+ DT_THISPROCNUM + DT_VERSIONTAGNUM
+ DT_EXTRANUM + DT_VALNUM] != NULL, 1))
{
Elf32_Word *hash32
+6 -2
View File
@@ -1,5 +1,5 @@
/* Storage management for the chain of loaded shared objects.
Copyright (C) 1995-2002,2004,2006,2007,2008 Free Software Foundation, Inc.
Copyright (C) 1995-2002,2004,2006-2008,2009 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
@@ -67,6 +67,10 @@ _dl_new_object (char *realname, const char *libname, int type,
new->l_name = realname;
new->l_type = type;
/* If we set the bit now since we know it is never used we avoid
dirtying the cache line later. */
if ((GLRO(dl_debug_mask) & DL_DEBUG_UNUSED) == 0)
new->l_used = 1;
new->l_loader = loader;
#if NO_TLS_OFFSET != 0
new->l_tls_offset = NO_TLS_OFFSET;
@@ -174,7 +178,7 @@ _dl_new_object (char *realname, const char *libname, int type,
if (result == NULL)
{
/* We were not able to determine the current directory.
Note that free(origin) is OK if origin == NULL. */
Note that free(origin) is OK if origin == NULL. */
free (origin);
origin = (char *) -1;
goto out;
+7
View File
@@ -126,8 +126,15 @@ ElfW(Phdr) *_dl_phdr;
size_t _dl_phnum;
uint64_t _dl_hwcap __attribute__ ((nocommon));
#if (defined (_ARCH_PPC64) || defined (__powerpc64__))
/* Default to no-exec stack on PPC64. */
/* Prevailing state of the stack, PF_X indicating it's executable. */
ElfW(Word) _dl_stack_flags = PF_R|PF_W;
#else
/* Prevailing state of the stack, PF_X indicating it's executable. */
ElfW(Word) _dl_stack_flags = PF_R|PF_W|PF_X;
#endif
/* If loading a shared object requires that we make the stack executable
when it was not, we do it by calling this function.
+8 -4
View File
@@ -322,10 +322,14 @@ _dl_check_map_versions (struct link_map *map, int verbose, int trace_mode)
while (1)
{
ElfW(Half) ndx = aux->vna_other & 0x7fff;
map->l_versions[ndx].hash = aux->vna_hash;
map->l_versions[ndx].hidden = aux->vna_other & 0x8000;
map->l_versions[ndx].name = &strtab[aux->vna_name];
map->l_versions[ndx].filename = &strtab[ent->vn_file];
/* In trace mode, dependencies may be missing. */
if (__builtin_expect (ndx < map->l_nversions, 1))
{
map->l_versions[ndx].hash = aux->vna_hash;
map->l_versions[ndx].hidden = aux->vna_other & 0x8000;
map->l_versions[ndx].name = &strtab[aux->vna_name];
map->l_versions[ndx].filename = &strtab[ent->vn_file];
}
if (aux->vna_next == 0)
/* No more symbols. */
+10 -5
View File
@@ -103,6 +103,11 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
{
ElfW(Dyn) *dyn = l->l_ld;
ElfW(Dyn) **info;
#if __ELF_NATIVE_CLASS == 32
typedef Elf32_Word d_tag_utype;
#elif __ELF_NATIVE_CLASS == 64
typedef Elf64_Xword d_tag_utype;
#endif
#ifndef RTLD_BOOTSTRAP
if (dyn == NULL)
@@ -113,20 +118,20 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
while (dyn->d_tag != DT_NULL)
{
if (dyn->d_tag < DT_NUM)
if ((d_tag_utype) dyn->d_tag < DT_NUM)
info[dyn->d_tag] = dyn;
else if (dyn->d_tag >= DT_LOPROC &&
dyn->d_tag < DT_LOPROC + DT_THISPROCNUM)
info[dyn->d_tag - DT_LOPROC + DT_NUM] = dyn;
else if ((Elf32_Word) DT_VERSIONTAGIDX (dyn->d_tag) < DT_VERSIONTAGNUM)
else if ((d_tag_utype) DT_VERSIONTAGIDX (dyn->d_tag) < DT_VERSIONTAGNUM)
info[VERSYMIDX (dyn->d_tag)] = dyn;
else if ((Elf32_Word) DT_EXTRATAGIDX (dyn->d_tag) < DT_EXTRANUM)
else if ((d_tag_utype) DT_EXTRATAGIDX (dyn->d_tag) < DT_EXTRANUM)
info[DT_EXTRATAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM
+ DT_VERSIONTAGNUM] = dyn;
else if ((Elf32_Word) DT_VALTAGIDX (dyn->d_tag) < DT_VALNUM)
else if ((d_tag_utype) DT_VALTAGIDX (dyn->d_tag) < DT_VALNUM)
info[DT_VALTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM
+ DT_VERSIONTAGNUM + DT_EXTRANUM] = dyn;
else if ((Elf32_Word) DT_ADDRTAGIDX (dyn->d_tag) < DT_ADDRNUM)
else if ((d_tag_utype) DT_ADDRTAGIDX (dyn->d_tag) < DT_ADDRNUM)
info[DT_ADDRTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM
+ DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM] = dyn;
++dyn;
+29 -9
View File
@@ -773,7 +773,18 @@ search_dir (const struct dir_entry *entry)
{
/* In case of symlink, we check if the symlink refers to
a directory. */
if (__builtin_expect (stat64 (real_file_name, &stat_buf), 0))
char *target_name = real_file_name;
if (opt_chroot)
{
target_name = chroot_canon (opt_chroot, file_name);
if (target_name == NULL)
{
if (strstr (file_name, ".so") == NULL)
error (0, 0, _("Input file %s not found.\n"), file_name);
continue;
}
}
if (__builtin_expect (stat64 (target_name, &stat_buf), 0))
{
if (opt_verbose)
error (0, errno, _("Cannot stat %s"), file_name);
@@ -1174,7 +1185,9 @@ parse_conf_include (const char *config_file, unsigned int lineno,
if (do_chroot && opt_chroot)
{
char *canon = chroot_canon (opt_chroot, pattern);
result = glob64 (canon ?: pattern, 0, NULL, &gl);
if (canon == NULL)
return;
result = glob64 (canon, 0, NULL, &gl);
free (canon);
}
else
@@ -1305,11 +1318,9 @@ main (int argc, char **argv)
p ? (*p = '\0', cache_file) : "/");
if (canon == NULL)
{
error (EXIT_FAILURE, errno,
_("Can't open cache file directory %s\n"),
p ? cache_file : "/");
}
error (EXIT_FAILURE, errno,
_("Can't open cache file directory %s\n"),
p ? cache_file : "/");
if (p)
++p;
@@ -1346,8 +1357,17 @@ main (int argc, char **argv)
add_system_dir (LIBDIR);
}
const char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE;
if (opt_chroot)
{
aux_cache_file = chroot_canon (opt_chroot, aux_cache_file);
if (aux_cache_file == NULL)
error (EXIT_FAILURE, errno, _("Can't open cache file %s\n"),
_PATH_LDCONFIG_AUX_CACHE);
}
if (! opt_ignore_aux_cache)
load_aux_cache (_PATH_LDCONFIG_AUX_CACHE);
load_aux_cache (aux_cache_file);
else
init_aux_cache ();
@@ -1356,7 +1376,7 @@ main (int argc, char **argv)
if (opt_build_cache)
{
save_cache (cache_file);
save_aux_cache (_PATH_LDCONFIG_AUX_CACHE);
save_aux_cache (aux_cache_file);
}
return 0;
+5
View File
@@ -123,7 +123,12 @@ INTVARDEF(_dl_starting_up)
struct rtld_global _rtld_global =
{
/* Default presumption without further information is executable stack. */
#if (defined (_ARCH_PPC64) || defined (__powerpc64__))
/* Default to no-exec stack on PPC64. */
._dl_stack_flags = PF_R|PF_W,
#else
._dl_stack_flags = PF_R|PF_W|PF_X,
#endif
#ifdef _LIBC_REENTRANT
._dl_load_lock = _RTLD_LOCK_RECURSIVE_INITIALIZER,
#endif
+2 -2
View File
@@ -1,5 +1,5 @@
/* Lookup helper function for Hurd implementation of *at functions.
Copyright (C) 2006 Free Software Foundation, Inc.
Copyright (C) 2006,2010 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 @@ __file_name_lookup_at (int fd, int at_flags,
flags |= (at_flags & AT_SYMLINK_NOFOLLOW) ? O_NOLINK : 0;
at_flags &= ~AT_SYMLINK_NOFOLLOW;
if (at_flags != 0)
return __hurd_fail (EINVAL);
return (__hurd_fail (EINVAL), MACH_PORT_NULL);
if (fd == AT_FDCWD || file_name[0] == '/')
return __file_name_lookup (file_name, flags, mode);
+1 -1
View File
@@ -442,7 +442,7 @@ write_output (const char *outbuf, const char *outptr, FILE **output,
if (output_file != NULL && strcmp (output_file, "-") != 0)
{
*output = fopen (output_file, "w");
if (output == NULL)
if (*output == NULL)
error (EXIT_FAILURE, errno, _("cannot open output file"));
}
else
+5 -3
View File
@@ -1,6 +1,6 @@
/* Data structure for communication from the run-time dynamic linker for
loaded ELF shared objects.
Copyright (C) 1995-2006, 2007 Free Software Foundation, Inc.
Copyright (C) 1995-2006, 2007, 2009 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
@@ -180,7 +180,6 @@ struct link_map
unsigned int l_need_tls_init:1; /* Nonzero if GL(dl_init_static_tls)
should be called on this link map
when relocation finishes. */
unsigned int l_used:1; /* Nonzero if the DSO is used. */
unsigned int l_auditing:1; /* Nonzero if the DSO is used in auditing. */
unsigned int l_audit_any_plt:1; /* Nonzero if at least one audit module
is interested in the PLT interception.*/
@@ -239,12 +238,15 @@ struct link_map
struct link_map **l_initfini;
/* List of the dependencies introduced through symbol binding. */
unsigned int l_reldepsmax;
struct link_map_reldeps
{
unsigned int act;
struct link_map *list[];
} *l_reldeps;
unsigned int l_reldepsmax;
/* Nonzero if the DSO is used. */
unsigned int l_used;
/* Various flag words. */
ElfW(Word) l_feature_1;
+4 -4
View File
@@ -2,12 +2,12 @@
#include <misc/sys/uio.h>
/* Now define the internal interfaces. */
extern ssize_t __readv (int __fd, __const struct iovec *__vector,
extern ssize_t __readv (int __fd, __const struct iovec *__iovec,
int __count);
extern ssize_t __libc_readv (int __fd, __const struct iovec *__vector,
extern ssize_t __libc_readv (int __fd, __const struct iovec *__iovec,
int __count);
extern ssize_t __writev (int __fd, __const struct iovec *__vector,
extern ssize_t __writev (int __fd, __const struct iovec *__iovec,
int __count);
extern ssize_t __libc_writev (int __fd, __const struct iovec *__vector,
extern ssize_t __libc_writev (int __fd, __const struct iovec *__iovec,
int __count);
#endif
+2 -1
View File
@@ -1,5 +1,5 @@
/* File tree walker functions.
Copyright (C) 1996-2004, 2006, 2007, 2008 Free Software Foundation, Inc.
Copyright (C) 1996-2004, 2006-2008, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -790,6 +790,7 @@ ftw_startup (const char *dir, int is_nftw, void *func, int descriptors,
{
int save_err = errno;
__fchdir (cwdfd);
close_not_cancel_no_status (cwdfd);
__set_errno (save_err);
}
else if (cwd != NULL)
+4 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1995, 1997-2000, 2001, 2002, 2003, 2006
/* Copyright (C) 1995, 1997-2000, 2001, 2002, 2003, 2006, 2010
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -60,6 +60,9 @@ _IO_vdprintf (d, format, arg)
done = INTUSE(_IO_vfprintf) (&tmpfil.file, format, arg);
if (done != EOF && _IO_do_flush (&tmpfil.file) == EOF)
done = EOF;
_IO_FINISH (&tmpfil.file);
return done;
+8 -6
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991-1995,1997-2006,2007 Free Software Foundation, Inc.
/* Copyright (C) 1991-1995,1997-2006,2007,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Per Bothner <bothner@cygnus.com>.
@@ -442,13 +442,15 @@ extern _IO_wint_t __woverflow (_IO_FILE *, _IO_wint_t);
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
# define _IO_getwc_unlocked(_fp) \
(_IO_BE ((_fp)->_wide_data->_IO_read_ptr >= (_fp)->_wide_data->_IO_read_end,\
0) \
(_IO_BE ((_fp)->_wide_data == NULL \
|| ((_fp)->_wide_data->_IO_read_ptr \
>= (_fp)->_wide_data->_IO_read_end), 0) \
? __wuflow (_fp) : (_IO_wint_t) *(_fp)->_wide_data->_IO_read_ptr++)
# define _IO_putwc_unlocked(_wch, _fp) \
(_IO_BE ((_fp)->_wide_data->_IO_write_ptr \
>= (_fp)->_wide_data->_IO_write_end, 0) \
? __woverflow (_fp, _wch) \
(_IO_BE ((_fp)->_wide_data == NULL \
|| ((_fp)->_wide_data->_IO_write_ptr \
>= (_fp)->_wide_data->_IO_write_end), 0) \
? __woverflow (_fp, _wch) \
: (_IO_wint_t) (*(_fp)->_wide_data->_IO_write_ptr++ = (_wch)))
#endif
+3 -3
View File
@@ -1,4 +1,4 @@
# Copyright (C) 1991,1992,1995-2003,2005 Free Software Foundation, Inc.
# Copyright (C) 1991,1992,1995-2003,2005,2009 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 @@ distribute = localeinfo.h categories.def iso-639.def iso-3166.def \
routines = setlocale findlocale loadlocale loadarchive \
localeconv nl_langinfo nl_langinfo_l mb_cur_max \
newlocale duplocale freelocale uselocale
tests = tst-C-locale
tests = tst-C-locale tst-locname tst-duplocale
categories = ctype messages monetary numeric time paper name \
address telephone measurement identification collate
aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
@@ -104,7 +104,7 @@ CFLAGS-charmap-dir.c = -Wno-write-strings
# This makes sure -DNOT_IN_libc is passed for all these modules.
cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \
$(locale-modules) $(lib-modules))
$(locale-modules) $(lib-modules))
lib := nonlib
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+5 -1
View File
@@ -1,5 +1,5 @@
/* Duplicate handle for selection of locales.
Copyright (C) 1997,2000,2001,2002,2005,2008 Free Software Foundation, Inc.
Copyright (C) 1997,2000-2002,2005,2008,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -37,6 +37,10 @@ __duplocale (__locale_t dataset)
if (dataset == _nl_C_locobj_ptr)
return dataset;
/* Handle a special value. */
if (dataset == LC_GLOBAL_LOCALE)
dataset = &_nl_global_locale;
__locale_t result;
int cnt;
size_t names_len = 0;
+2 -1
View File
@@ -568,7 +568,8 @@ enum
/* This macro produces an item you can pass to `nl_langinfo' or
`nl_langinfo_l' to get the name of the locale in use for CATEGORY. */
#define _NL_LOCALE_NAME(category) _NL_ITEM ((category), -1)
#define _NL_LOCALE_NAME(category) _NL_ITEM ((category), \
_NL_ITEM_INDEX (-1))
#ifdef __USE_GNU
# define NL_LOCALE_NAME(category) _NL_LOCALE_NAME (category)
#endif
+1
View File
@@ -224,6 +224,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
PROT_READ, MAP_FILE|MAP_COPY, fd, 0);
if (__builtin_expect (filedata == MAP_FAILED, 0))
{
filedata = NULL;
if (__builtin_expect (errno, ENOSYS) == ENOSYS)
{
#endif /* _POSIX_MAPPED_FILES */
+14
View File
@@ -0,0 +1,14 @@
#include <locale.h>
#include <stdio.h>
static int
do_test (void)
{
locale_t d = duplocale (LC_GLOBAL_LOCALE);
if (d != (locale_t) 0)
freelocale (d);
return 0;
}
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+20
View File
@@ -0,0 +1,20 @@
#include <langinfo.h>
#include <locale.h>
#include <stdio.h>
#include <string.h>
static int
do_test (void)
{
const char *s = nl_langinfo (_NL_LOCALE_NAME (LC_CTYPE));
if (s == NULL || strcmp (s, "C") != 0)
{
printf ("incorrect locale name returned: %s, expected \"C\"\n", s);
return 1;
}
return 0;
}
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+20
View File
@@ -1,3 +1,23 @@
2010-02-16 Paul Pluzhnikov <ppluzhnikov@google.com>
* Makefile: Add missing gconv-modules dependency.
2010-01-25 Andreas Schwab <schwab@redhat.com>
* locales/i18n: Don't map U00DF to U1E9E in toupper table.
2009-11-24 Ulrich Drepper <drepper@redhat.com>
* locales/hsb_DE: Define week, first_weekday, and first_workday.
2009-11-23 Ulrich Drepper <drepper@redhat.com>
* locales/en_DK: Define week, first_weekday, and first_workday.
2009-11-22 Ulrich Drepper <drepper@redhat.com>
* locales/nl_NL: Define week, first_weekday, and first_workday.
2009-10-30 Ulrich Drepper <drepper@redhat.com>
* locales/it_CH: Fix typos in last change.
+5
View File
@@ -107,6 +107,8 @@ install-others := $(addprefix $(inst_i18ndir)/, \
$(addsuffix .gz, $(charmaps)) \
$(locales))
tests: $(objdir)/iconvdata/gconv-modules
include ../Rules
# Install the charmap files in gzipped format.
@@ -298,3 +300,6 @@ tst-leaks-ENV = MALLOC_TRACE=$(objpfx)tst-leaks.mtrace \
LOCPATH=$(common-objpfx)localedata
$(objpfx)mtrace-tst-leaks: $(objpfx)tst-leaks.out
$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks.mtrace > $@
$(objdir)/iconvdata/gconv-modules:
$(MAKE) -C ../iconvdata subdir=iconvdata $@
+28 -25
View File
@@ -85,34 +85,34 @@ END LC_NUMERIC
LC_TIME
abday "<U0053><U0075><U006E>";"<U004D><U006F><U006E>";/
"<U0054><U0075><U0065>";"<U0057><U0065><U0064>";/
"<U0054><U0068><U0075>";"<U0046><U0072><U0069>";/
"<U0053><U0061><U0074>"
"<U0054><U0075><U0065>";"<U0057><U0065><U0064>";/
"<U0054><U0068><U0075>";"<U0046><U0072><U0069>";/
"<U0053><U0061><U0074>"
day "<U0053><U0075><U006E><U0064><U0061><U0079>";/
"<U004D><U006F><U006E><U0064><U0061><U0079>";/
"<U0054><U0075><U0065><U0073><U0064><U0061><U0079>";/
"<U0057><U0065><U0064><U006E><U0065><U0073><U0064><U0061><U0079>";/
"<U0054><U0068><U0075><U0072><U0073><U0064><U0061><U0079>";/
"<U0046><U0072><U0069><U0064><U0061><U0079>";/
"<U0053><U0061><U0074><U0075><U0072><U0064><U0061><U0079>"
"<U004D><U006F><U006E><U0064><U0061><U0079>";/
"<U0054><U0075><U0065><U0073><U0064><U0061><U0079>";/
"<U0057><U0065><U0064><U006E><U0065><U0073><U0064><U0061><U0079>";/
"<U0054><U0068><U0075><U0072><U0073><U0064><U0061><U0079>";/
"<U0046><U0072><U0069><U0064><U0061><U0079>";/
"<U0053><U0061><U0074><U0075><U0072><U0064><U0061><U0079>"
abmon "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
"<U004D><U0061><U0072>";"<U0041><U0070><U0072>";/
"<U004D><U0061><U0079>";"<U004A><U0075><U006E>";/
"<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/
"<U0053><U0065><U0070>";"<U004F><U0063><U0074>";/
"<U004E><U006F><U0076>";"<U0044><U0065><U0063>"
"<U004D><U0061><U0072>";"<U0041><U0070><U0072>";/
"<U004D><U0061><U0079>";"<U004A><U0075><U006E>";/
"<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/
"<U0053><U0065><U0070>";"<U004F><U0063><U0074>";/
"<U004E><U006F><U0076>";"<U0044><U0065><U0063>"
mon "<U004A><U0061><U006E><U0075><U0061><U0072><U0079>";/
"<U0046><U0065><U0062><U0072><U0075><U0061><U0072><U0079>";/
"<U004D><U0061><U0072><U0063><U0068>";/
"<U0041><U0070><U0072><U0069><U006C>";/
"<U004D><U0061><U0079>";/
"<U004A><U0075><U006E><U0065>";/
"<U004A><U0075><U006C><U0079>";/
"<U0041><U0075><U0067><U0075><U0073><U0074>";/
"<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
"<U004F><U0063><U0074><U006F><U0062><U0065><U0072>";/
"<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
"<U0044><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
"<U0046><U0065><U0062><U0072><U0075><U0061><U0072><U0079>";/
"<U004D><U0061><U0072><U0063><U0068>";/
"<U0041><U0070><U0072><U0069><U006C>";/
"<U004D><U0061><U0079>";/
"<U004A><U0075><U006E><U0065>";/
"<U004A><U0075><U006C><U0079>";/
"<U0041><U0075><U0067><U0075><U0073><U0074>";/
"<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
"<U004F><U0063><U0074><U006F><U0062><U0065><U0072>";/
"<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
"<U0044><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
% date formats following ISO 8601-1988
d_t_fmt "<U0025><U0059><U002D><U0025><U006D><U002D><U0025><U0064><U0054><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0059><U002D><U0025><U006D><U002D><U0025><U0064>"
@@ -122,6 +122,9 @@ t_fmt_ampm ""
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
week 7;19971130;4
first_weekday 2
first_workday 2
END LC_TIME
LC_MESSAGES
+14 -10
View File
@@ -197,7 +197,7 @@ collating-symbol <SPECIAL>
% letter;accent;case;specials
order_start forward;backward/
;forward;position
;forward;position
% <CAPITAL> or <SMALL> letters first:
@@ -2136,16 +2136,16 @@ END LC_NUMERIC
LC_TIME
abday "<U004E><U006A>";"<U0050><U00F3>";/
"<U0057><U0075>";"<U0053><U0072>";/
"<U0160><U0074>";"<U0050><U006A>";/
"<U0053><U006F>"
"<U0057><U0075>";"<U0053><U0072>";/
"<U0160><U0074>";"<U0050><U006A>";/
"<U0053><U006F>"
day "<U004E><U006A><U0065><U0064><U017A><U0065><U006C><U0061>";/
"<U0050><U00F3><U006E><U0064><U017A><U0065><U006C><U0061>";/
"<U0057><U0075><U0074><U006F><U0072><U0061>";/
"<U0053><U0072><U006A><U0065><U0064><U0061>";/
"<U0160><U0074><U0076><U00F3><U0072><U0074><U006B>";/
"<U0050><U006A><U0061><U0074><U006B>";/
"<U0053><U006F><U0062><U006F><U0074><U0061>"
"<U0050><U00F3><U006E><U0064><U017A><U0065><U006C><U0061>";/
"<U0057><U0075><U0074><U006F><U0072><U0061>";/
"<U0053><U0072><U006A><U0065><U0064><U0061>";/
"<U0160><U0074><U0076><U00F3><U0072><U0074><U006B>";/
"<U0050><U006A><U0061><U0074><U006B>";/
"<U0053><U006F><U0062><U006F><U0074><U0061>"
abmon "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
"<U004D><U011B><U0072>";"<U0041><U0070><U0072>";/
"<U004D><U0065><U006A>";"<U004A><U0075><U006E>";/
@@ -2172,6 +2172,10 @@ t_fmt_ampm ""
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
week 7;19971130;4
first_weekday 2
first_workday 2
END LC_TIME
LC_PAPER
+1 -2
View File
@@ -928,8 +928,7 @@ toupper /
(<U006D>,<U004D>);(<U006E>,<U004E>);(<U006F>,<U004F>);(<U0070>,<U0050>);/
(<U0071>,<U0051>);(<U0072>,<U0052>);(<U0073>,<U0053>);(<U0074>,<U0054>);/
(<U0075>,<U0055>);(<U0076>,<U0056>);(<U0077>,<U0057>);(<U0078>,<U0058>);/
(<U0079>,<U0059>);(<U007A>,<U005A>);(<U00B5>,<U039C>);(<U00DF>,<U1E9E>);/
(<U00E0>,<U00C0>);/
(<U0079>,<U0059>);(<U007A>,<U005A>);(<U00B5>,<U039C>);(<U00E0>,<U00C0>);/
(<U00E1>,<U00C1>);(<U00E2>,<U00C2>);(<U00E3>,<U00C3>);(<U00E4>,<U00C4>);/
(<U00E5>,<U00C5>);(<U00E6>,<U00C6>);(<U00E7>,<U00C7>);(<U00E8>,<U00C8>);/
(<U00E9>,<U00C9>);(<U00EA>,<U00CA>);(<U00EB>,<U00CB>);(<U00EC>,<U00CC>);/
+28 -24
View File
@@ -88,33 +88,33 @@ END LC_NUMERIC
LC_TIME
abday "<U007A><U006F>";"<U006D><U0061>";"<U0064><U0069>";/
"<U0077><U006F>";"<U0064><U006F>";"<U0076><U0072>";/
"<U007A><U0061>"
"<U0077><U006F>";"<U0064><U006F>";"<U0076><U0072>";/
"<U007A><U0061>"
day "<U007A><U006F><U006E><U0064><U0061><U0067>";/
"<U006D><U0061><U0061><U006E><U0064><U0061><U0067>";/
"<U0064><U0069><U006E><U0073><U0064><U0061><U0067>";/
"<U0077><U006F><U0065><U006E><U0073><U0064><U0061><U0067>";/
"<U0064><U006F><U006E><U0064><U0065><U0072><U0064><U0061><U0067>";/
"<U0076><U0072><U0069><U006A><U0064><U0061><U0067>";/
"<U007A><U0061><U0074><U0065><U0072><U0064><U0061><U0067>"
"<U006D><U0061><U0061><U006E><U0064><U0061><U0067>";/
"<U0064><U0069><U006E><U0073><U0064><U0061><U0067>";/
"<U0077><U006F><U0065><U006E><U0073><U0064><U0061><U0067>";/
"<U0064><U006F><U006E><U0064><U0065><U0072><U0064><U0061><U0067>";/
"<U0076><U0072><U0069><U006A><U0064><U0061><U0067>";/
"<U007A><U0061><U0074><U0065><U0072><U0064><U0061><U0067>"
abmon "<U006A><U0061><U006E>";"<U0066><U0065><U0062>";/
"<U006D><U0072><U0074>";"<U0061><U0070><U0072>";/
"<U006D><U0065><U0069>";"<U006A><U0075><U006E>";/
"<U006A><U0075><U006C>";"<U0061><U0075><U0067>";/
"<U0073><U0065><U0070>";"<U006F><U006B><U0074>";/
"<U006E><U006F><U0076>";"<U0064><U0065><U0063>"
"<U006D><U0072><U0074>";"<U0061><U0070><U0072>";/
"<U006D><U0065><U0069>";"<U006A><U0075><U006E>";/
"<U006A><U0075><U006C>";"<U0061><U0075><U0067>";/
"<U0073><U0065><U0070>";"<U006F><U006B><U0074>";/
"<U006E><U006F><U0076>";"<U0064><U0065><U0063>"
mon "<U006A><U0061><U006E><U0075><U0061><U0072><U0069>";/
"<U0066><U0065><U0062><U0072><U0075><U0061><U0072><U0069>";/
"<U006D><U0061><U0061><U0072><U0074>";/
"<U0061><U0070><U0072><U0069><U006C>";/
"<U006D><U0065><U0069>";/
"<U006A><U0075><U006E><U0069>";/
"<U006A><U0075><U006C><U0069>";/
"<U0061><U0075><U0067><U0075><U0073><U0074><U0075><U0073>";/
"<U0073><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
"<U006F><U006B><U0074><U006F><U0062><U0065><U0072>";/
"<U006E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
"<U0064><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
"<U0066><U0065><U0062><U0072><U0075><U0061><U0072><U0069>";/
"<U006D><U0061><U0061><U0072><U0074>";/
"<U0061><U0070><U0072><U0069><U006C>";/
"<U006D><U0065><U0069>";/
"<U006A><U0075><U006E><U0069>";/
"<U006A><U0075><U006C><U0069>";/
"<U0061><U0075><U0067><U0075><U0073><U0074><U0075><U0073>";/
"<U0073><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
"<U006F><U006B><U0074><U006F><U0062><U0065><U0072>";/
"<U006E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
"<U0064><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002D><U0025><U006D><U002D><U0025><U0079>"
t_fmt "<U0025><U0054>"
@@ -123,6 +123,10 @@ t_fmt_ampm ""
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
week 7;19971130;4
first_weekday 2
first_workday 2
END LC_TIME
LC_PAPER
+2 -3
View File
@@ -154,8 +154,7 @@ main (int argc, char *argv[])
# define ncap_list (sizeof (cap_list) / sizeof (cap_list[0]))
cap_t caps = cap_init ();
if (caps == NULL)
error (FAIL_ENOMEM, errno,
_("Failed to initialize drop of capabilities"));
return FAIL_ENOMEM;
/* There is no reason why these should not work. */
cap_set_flag (caps, CAP_PERMITTED, ncap_list, cap_list, CAP_SET);
@@ -166,7 +165,7 @@ main (int argc, char *argv[])
cap_free (caps);
if (__builtin_expect (res != 0, 0))
error (FAIL_EXEC, errno, _("cap_set_proc failed"));
return FAIL_EXEC;
}
#endif
+11 -8
View File
@@ -1,5 +1,5 @@
/* Malloc implementation for multiple threads without lock contention.
Copyright (C) 1996-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Copyright (C) 1996-2009, 2010 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.
@@ -2351,7 +2351,8 @@ typedef struct malloc_chunk* mfastbinptr;
*/
#define set_max_fast(s) \
global_max_fast = ((s) == 0)? SMALLBIN_WIDTH: request2size(s)
global_max_fast = (((s) == 0) \
? SMALLBIN_WIDTH: ((s + SIZE_SZ) & ~MALLOC_ALIGN_MASK))
#define get_max_fast() global_max_fast
@@ -3933,9 +3934,10 @@ public_vALLOc(size_t bytes)
if(!p) {
/* Maybe the failure is due to running out of mmapped areas. */
if(ar_ptr != &main_arena) {
(void)mutex_lock(&main_arena.mutex);
p = _int_memalign(&main_arena, pagesz, bytes);
(void)mutex_unlock(&main_arena.mutex);
ar_ptr = &main_arena;
(void)mutex_lock(&ar_ptr->mutex);
p = _int_memalign(ar_ptr, pagesz, bytes);
(void)mutex_unlock(&ar_ptr->mutex);
} else {
#if USE_ARENAS
/* ... or sbrk() has failed and there is still a chance to mmap() */
@@ -3978,9 +3980,10 @@ public_pVALLOc(size_t bytes)
if(!p) {
/* Maybe the failure is due to running out of mmapped areas. */
if(ar_ptr != &main_arena) {
(void)mutex_lock(&main_arena.mutex);
p = _int_memalign(&main_arena, pagesz, rounded_bytes);
(void)mutex_unlock(&main_arena.mutex);
ar_ptr = &main_arena;
(void)mutex_lock(&ar_ptr->mutex);
p = _int_memalign(ar_ptr, pagesz, rounded_bytes);
(void)mutex_unlock(&ar_ptr->mutex);
} else {
#if USE_ARENAS
/* ... or sbrk() has failed and there is still a chance to mmap() */
+5 -5
View File
@@ -393,7 +393,7 @@ We already said above that the currently selected locale for the
by the functions we are about to describe. Each locale uses its own
character set (given as an argument to @code{localedef}) and this is the
one assumed as the external multibyte encoding. The wide character
character set always is UCS-4, at least on GNU systems.
set is always UCS-4, at least on GNU systems.
A characteristic of each multibyte character set is the maximum number
of bytes that can be necessary to represent one character. This
@@ -577,8 +577,8 @@ The @code{btowc} function was introduced in @w{Amendment 1} to @w{ISO C90}
and is declared in @file{wchar.h}.
@end deftypefun
Despite the limitation that the single byte value always is interpreted
in the initial state this function is actually useful most of the time.
Despite the limitation that the single byte value is always interpreted
in the initial state, this function is actually useful most of the time.
Most characters are either entirely single-byte character sets or they
are extension to ASCII. But then it is possible to write code like this
(not that this specific example is very useful):
@@ -607,10 +607,10 @@ that there is no guarantee that one can perform this kind of arithmetic
on the character of the character set used for @code{wchar_t}
representation. In other situations the bytes are not constant at
compile time and so the compiler cannot do the work. In situations like
this it is necessary @code{btowc}.
this, using @code{btowc} is required.
@noindent
There also is a function for the conversion in the other direction.
There is also a function for the conversion in the other direction.
@comment wchar.h
@comment ISO
+1 -1
View File
@@ -1419,7 +1419,7 @@ available on all systems implementing @w{ISO C}. But often the text
@code{perror} generates is not what is wanted and there is no way to
extend or change what @code{perror} does. The GNU coding standard, for
instance, requires error messages to be preceded by the program name and
programs which read some input files should should provide information
programs which read some input files should provide information
about the input file name and the line number in case an error is
encountered while reading the file. For these occasions there are two
functions available which are widely used throughout the GNU project.
+1 -1
View File
@@ -269,7 +269,7 @@ When @code{getopt_long} has no more options to handle, it returns
@var{argv} of the next remaining argument.
@end deftypefun
Since long option names were used before before the @code{getopt_long}
Since long option names were used before the @code{getopt_long}
options was invented there are program interfaces which require programs
to recognize options like @w{@samp{-option value}} instead of
@w{@samp{--option value}}. To enable these programs to use the GNU
+1 -1
View File
@@ -1421,7 +1421,7 @@ pseudo-random number generator.
The GNU C library contains four additional functions which contain the
state as an explicit parameter and therefore make it possible to handle
thread-local PRNGs. Beside this there are no difference. In fact, the
thread-local PRNGs. Beside this there is no difference. In fact, the
four functions already discussed are implemented internally using the
following interfaces.
+1 -1
View File
@@ -2379,7 +2379,7 @@ exceed the process' data storage limit.
@c The Brk system call in Linux (as opposed to the GNU C Library function)
@c is considerably different. It always returns the new end of the data
@c segment, whether it succeeds or fails. The GNU C library Brk determines
@c it's a failure if and only if if the system call returns an address less
@c it's a failure if and only if the system call returns an address less
@c than the address requested.
@end deftypefun
+1 -1
View File
@@ -1466,7 +1466,7 @@ have this problem. But there is a very simple and powerful method to
handle these kind of problems with the @code{gettext} functions.
@noindent
As as example consider the following fictional situation. A GUI program
As an example consider the following fictional situation. A GUI program
has a menu bar with the following entries:
@smallexample
+1 -1
View File
@@ -1288,7 +1288,7 @@ protected from concurrent accesses from different processors.
The POSIX standard up to this date is of not much help to solve this
problem. The Linux kernel provides a set of interfaces to allow
specifying @emph{affinity sets} for a process. The scheduler will
schedule the thread or process on on CPUs specified by the affinity
schedule the thread or process on CPUs specified by the affinity
masks. The interfaces which the GNU C library define follow to some
extend the Linux kernel interface.
+1 -1
View File
@@ -574,7 +574,7 @@ operation itself is avoided. More importantly, functions like
introduction of threads) were implemented as macros which are very fast
if the buffer is not empty. With the addition of locking requirements
these functions are no longer implemented as macros since they would
would expand to too much code.
expand to too much code.
But these macros are still available with the same functionality under the new
names @code{putc_unlocked} and @code{getc_unlocked}. This possibly huge
difference of speed also suggests the use of the @code{_unlocked}
+1 -1
View File
@@ -972,7 +972,7 @@ This counter represents the number of calibration errors (caused by
large offsets or jitter).
@item long int stbcnt
This counter denotes the number of of calibrations where the stability
This counter denotes the number of calibrations where the stability
exceeded the threshold.
@end table
@end deftp
+3 -3
View File
@@ -1,5 +1,5 @@
/* Checking macros for syslog functions.
Copyright (C) 2005, 2007 Free Software Foundation, Inc.
Copyright (C) 2005, 2007, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@ extern void __syslog_chk (int __pri, int __flag, __const char *__fmt, ...)
__extern_always_inline void
syslog (int __pri, __const char *__fmt, ...)
{
return __syslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
__syslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
}
#elif !defined __cplusplus
# define syslog(pri, ...) \
@@ -45,6 +45,6 @@ extern void __vsyslog_chk (int __pri, int __flag, __const char *__fmt,
__extern_always_inline void
vsyslog (int __pri, __const char *__fmt, __gnuc_va_list __ap)
{
return __vsyslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
__vsyslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
}
#endif
+2 -2
View File
@@ -116,7 +116,8 @@ initshells()
}
if (statb.st_size > ~(size_t)0 / sizeof (char *) * 3)
goto init_okshells;
if ((strings = malloc(statb.st_size + 2)) == NULL)
flen = statb.st_size + 3;
if ((strings = malloc(flen)) == NULL)
goto init_okshells;
shells = malloc(statb.st_size / 3 * sizeof (char *));
if (shells == NULL) {
@@ -126,7 +127,6 @@ initshells()
}
sp = shells;
cp = strings;
flen = statb.st_size + 2;
while (fgets_unlocked(cp, flen - (cp - strings), fp) != NULL) {
while (*cp != '#' && *cp != '/' && *cp != '\0')
cp++;
+3 -3
View File
@@ -1,5 +1,5 @@
/* Utilities for reading/writing fstab, mtab, etc.
Copyright (C) 1995-2000, 2001, 2002, 2003, 2006
Copyright (C) 1995-2000, 2001, 2002, 2003, 2006, 2010
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -194,7 +194,7 @@ weak_alias (__getmntent_r, getmntent_r)
const char *rp = name; \
\
while (*rp != '\0') \
if (*rp == ' ' || *rp == '\t' || *rp == '\\') \
if (*rp == ' ' || *rp == '\t' || *rp == '\n' || *rp == '\\') \
break; \
else \
++rp; \
@@ -202,7 +202,7 @@ weak_alias (__getmntent_r, getmntent_r)
if (*rp != '\0') \
{ \
/* In the worst case the length of the string can increase to \
founr times the current length. */ \
four times the current length. */ \
char *wp; \
\
rp = name; \
+25 -22
View File
@@ -70,20 +70,20 @@ LINE_PARSER
{
assert ((flags & AI_V4MAPPED) == 0 || af != AF_UNSPEC);
if (flags & AI_V4MAPPED)
{
map_v4v6_address ((char *) entdata->host_addr,
(char *) entdata->host_addr);
result->h_addrtype = AF_INET6;
result->h_length = IN6ADDRSZ;
}
{
map_v4v6_address ((char *) entdata->host_addr,
(char *) entdata->host_addr);
result->h_addrtype = AF_INET6;
result->h_length = IN6ADDRSZ;
}
else
{
result->h_addrtype = AF_INET;
result->h_length = INADDRSZ;
}
{
result->h_addrtype = AF_INET;
result->h_length = INADDRSZ;
}
}
else if (af != AF_INET
&& inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
&& inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
{
result->h_addrtype = AF_INET6;
result->h_length = IN6ADDRSZ;
@@ -164,14 +164,14 @@ internal_nis_gethostent_r (struct hostent *host, char *buffer,
int keylen;
int yperr;
if (new_start)
yperr = yp_first (domain, "hosts.byname", &outkey, &keylen, &result,
yperr = yp_first (domain, "hosts.byname", &outkey, &keylen, &result,
&len);
else
yperr = yp_next (domain, "hosts.byname", oldkey, oldkeylen, &outkey,
yperr = yp_next (domain, "hosts.byname", oldkey, oldkeylen, &outkey,
&keylen, &result, &len);
if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
{
{
enum nss_status retval = yperr2nss (yperr);
switch (retval)
@@ -191,12 +191,12 @@ internal_nis_gethostent_r (struct hostent *host, char *buffer,
}
if (__builtin_expect ((size_t) (len + 1) > linebuflen, 0))
{
free (result);
{
free (result);
*h_errnop = NETDB_INTERNAL;
*errnop = ERANGE;
return NSS_STATUS_TRYAGAIN;
}
*errnop = ERANGE;
return NSS_STATUS_TRYAGAIN;
}
char *p = strncpy (data->linebuffer, result, len);
data->linebuffer[len] = '\0';
@@ -233,7 +233,7 @@ _nss_nis_gethostent_r (struct hostent *host, char *buffer, size_t buflen,
__libc_lock_lock (lock);
status = internal_nis_gethostent_r (host, buffer, buflen, errnop, h_errnop,
((_res.options & RES_USE_INET6) ? AF_INET6 : AF_INET),
((_res.options & RES_USE_INET6) ? AF_INET6 : AF_INET),
((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0 ));
__libc_lock_unlock (lock);
@@ -346,7 +346,7 @@ _nss_nis_gethostbyname2_r (const char *name, int af, struct hostent *host,
return internal_gethostbyname2_r (name, af, host, buffer, buflen, errnop,
h_errnop,
((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0));
((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0));
}
@@ -456,7 +456,10 @@ _nss_nis_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
{
char *domain;
if (yp_get_default_domain (&domain))
return NSS_STATUS_UNAVAIL;
{
*herrnop = NO_DATA;
return NSS_STATUS_UNAVAIL;
}
/* Convert name to lowercase. */
size_t namlen = strlen (name);
+31 -27
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1997-2003, 2005, 2006, 2008 Free Software Foundation, Inc.
/* Copyright (C) 1997-2003, 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
@@ -38,10 +38,10 @@ static nis_name tablename_val;
static u_long tablename_len;
#define NISENTRYVAL(idx, col, res) \
(NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val)
(NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val)
#define NISENTRYLEN(idx, col, res) \
(NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
(NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
/* Get implementation for some internal functions. */
#include <resolv/mapv4v6addr.h>
@@ -287,15 +287,15 @@ internal_nisplus_gethostent_r (struct hostent *host, char *buffer,
return NSS_STATUS_TRYAGAIN;
}
if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
{
enum nss_status retval = niserr2nss (result->status);
if (retval == NSS_STATUS_TRYAGAIN)
{
*herrnop = NETDB_INTERNAL;
*errnop = errno;
}
return retval;
}
{
enum nss_status retval = niserr2nss (result->status);
if (retval == NSS_STATUS_TRYAGAIN)
{
*herrnop = NETDB_INTERNAL;
*errnop = errno;
}
return retval;
}
}
else
@@ -308,18 +308,18 @@ internal_nisplus_gethostent_r (struct hostent *host, char *buffer,
return NSS_STATUS_TRYAGAIN;
}
if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
{
enum nss_status retval= niserr2nss (result->status);
{
enum nss_status retval= niserr2nss (result->status);
nis_freeresult (result);
result = saved_res;
if (retval == NSS_STATUS_TRYAGAIN)
{
*herrnop = NETDB_INTERNAL;
if (retval == NSS_STATUS_TRYAGAIN)
{
*herrnop = NETDB_INTERNAL;
*errnop = errno;
}
return retval;
}
}
return retval;
}
}
if (_res.options & RES_USE_INET6)
@@ -330,13 +330,13 @@ internal_nisplus_gethostent_r (struct hostent *host, char *buffer,
buflen, errnop, 0);
if (parse_res == -1)
{
{
nis_freeresult (result);
result = saved_res;
*herrnop = NETDB_INTERNAL;
*herrnop = NETDB_INTERNAL;
*errnop = ERANGE;
return NSS_STATUS_TRYAGAIN;
}
return NSS_STATUS_TRYAGAIN;
}
if (saved_res != NULL)
nis_freeresult (saved_res);
@@ -435,6 +435,7 @@ internal_gethostbyname2_r (const char *name, int af, struct hostent *host,
if (result == NULL)
{
*errnop = ENOMEM;
*herrnop = NETDB_INTERNAL;
return NSS_STATUS_TRYAGAIN;
}
@@ -444,10 +445,13 @@ internal_gethostbyname2_r (const char *name, int af, struct hostent *host,
if (retval == NSS_STATUS_TRYAGAIN)
{
*errnop = errno;
*herrnop = NETDB_INTERNAL;
*herrnop = TRY_AGAIN;
}
else
__set_errno (olderr);
{
__set_errno (olderr);
*herrnop = NETDB_INTERNAL;
}
nis_freeresult (result);
return retval;
}
@@ -502,7 +506,7 @@ _nss_nisplus_gethostbyname_r (const char *name, struct hostent *host,
buflen, errnop, h_errnop,
AI_V4MAPPED);
if (status == NSS_STATUS_SUCCESS)
return status;
return status;
}
return internal_gethostbyname2_r (name, AF_INET, host, buffer,
+22
View File
@@ -1,3 +1,25 @@
2010-05-01 Alan Modra <amodra@gmail.com>
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
(PSEUDO): Use correct cr save. Don't use wrong parm save area
to save temps. Correct cfi for possible later frame manipulation.
(DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
(DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
(DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
(DOCARGS_6, UNDOCARGS_6): Likewise.
(CENABLE, CDISABLE): Add nops for non-shared calls.
2010-03-23 Luis Machado <luisgpm@br.ibm.com>
* pthread_cond_timedwait.c: Add check for
HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
(pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
INTERNAL_SYSCALL.
2009-11-27 Andreas Schwab <schwab@redhat.com>
* sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
THREAD_SELF->cancelhandling after returning from futex call.
2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
[BZ #4457]
+10 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
/* Copyright (C) 2003, 2004, 2007, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
@@ -27,6 +27,14 @@
#include <shlib-compat.h>
#ifndef HAVE_CLOCK_GETTIME_VSYSCALL
# undef INTERNAL_VSYSCALL
# define INTERNAL_VSYSCALL INTERNAL_SYSCALL
# undef INLINE_VSYSCALL
# define INLINE_VSYSCALL INLINE_SYSCALL
#else
# include <bits/libc-vdso.h>
#endif
/* Cleanup handler, defined in pthread_cond_wait.c. */
extern void __condvar_cleanup (void *arg)
@@ -102,7 +110,7 @@ __pthread_cond_timedwait (cond, mutex, abstime)
#ifdef __NR_clock_gettime
INTERNAL_SYSCALL_DECL (err);
int ret;
ret = INTERNAL_SYSCALL (clock_gettime, err, 2,
ret = INTERNAL_VSYSCALL (clock_gettime, err, 2,
(cond->__data.__nwaiters
& ((1 << COND_NWAITERS_SHIFT) - 1)),
&rt);
@@ -52,51 +52,70 @@
cfi_offset (lr, 16); \
DOCARGS_##args; /* save syscall args around CENABLE. */ \
CENABLE; \
std 3,72(1); /* store CENABLE return value (MASK). */ \
std 3,112(1); /* store CENABLE return value (MASK). */ \
UNDOCARGS_##args; /* restore syscall args. */ \
DO_CALL (SYS_ify (syscall_name)); \
mfcr 0; /* save CR/R3 around CDISABLE. */ \
std 3,64(1); \
std 0,8(1); \
ld 3,72(1); /* pass MASK to CDISABLE. */ \
std 3,120(1); \
std 0,128+8(1); \
cfi_offset (cr, 8); \
ld 3,112(1); /* pass MASK to CDISABLE. */ \
CDISABLE; \
ld 9,128+16(1); \
ld 0,8(1); /* restore CR/R3. */ \
ld 3,64(1); \
ld 0,128+8(1); /* restore CR/R3. */ \
ld 3,120(1); \
mtlr 9; \
mtcr 0; \
addi 1,1,128;
addi 1,1,128; \
cfi_adjust_cfa_offset (-128); \
cfi_restore (lr); \
cfi_restore (cr)
# define DOCARGS_0
# define UNDOCARGS_0
# define DOCARGS_1 std 3,80(1); DOCARGS_0
# define UNDOCARGS_1 ld 3,80(1); UNDOCARGS_0
# define DOCARGS_1 std 3,128+48(1); DOCARGS_0
# define UNDOCARGS_1 ld 3,128+48(1); UNDOCARGS_0
# define DOCARGS_2 std 4,88(1); DOCARGS_1
# define UNDOCARGS_2 ld 4,88(1); UNDOCARGS_1
# define DOCARGS_2 std 4,128+56(1); DOCARGS_1
# define UNDOCARGS_2 ld 4,128+56(1); UNDOCARGS_1
# define DOCARGS_3 std 5,96(1); DOCARGS_2
# define UNDOCARGS_3 ld 5,96(1); UNDOCARGS_2
# define DOCARGS_3 std 5,128+64(1); DOCARGS_2
# define UNDOCARGS_3 ld 5,128+64(1); UNDOCARGS_2
# define DOCARGS_4 std 6,104(1); DOCARGS_3
# define UNDOCARGS_4 ld 6,104(1); UNDOCARGS_3
# define DOCARGS_4 std 6,128+72(1); DOCARGS_3
# define UNDOCARGS_4 ld 6,128+72(1); UNDOCARGS_3
# define DOCARGS_5 std 7,112(1); DOCARGS_4
# define UNDOCARGS_5 ld 7,112(1); UNDOCARGS_4
# define DOCARGS_5 std 7,128+80(1); DOCARGS_4
# define UNDOCARGS_5 ld 7,128+80(1); UNDOCARGS_4
# define DOCARGS_6 std 8,120(1); DOCARGS_5
# define UNDOCARGS_6 ld 8,120(1); UNDOCARGS_5
# define DOCARGS_6 std 8,128+88(1); DOCARGS_5
# define UNDOCARGS_6 ld 8,128+88(1); UNDOCARGS_5
# ifdef IS_IN_libpthread
# define CENABLE bl JUMPTARGET(__pthread_enable_asynccancel)
# define CDISABLE bl JUMPTARGET(__pthread_disable_asynccancel)
# ifdef SHARED
# define CENABLE bl JUMPTARGET(__pthread_enable_asynccancel)
# define CDISABLE bl JUMPTARGET(__pthread_disable_asynccancel)
# else
# define CENABLE bl JUMPTARGET(__pthread_enable_asynccancel); nop
# define CDISABLE bl JUMPTARGET(__pthread_disable_asynccancel); nop
# endif
# elif !defined NOT_IN_libc
# define CENABLE bl JUMPTARGET(__libc_enable_asynccancel)
# define CDISABLE bl JUMPTARGET(__libc_disable_asynccancel)
# ifdef SHARED
# define CENABLE bl JUMPTARGET(__libc_enable_asynccancel)
# define CDISABLE bl JUMPTARGET(__libc_disable_asynccancel)
# else
# define CENABLE bl JUMPTARGET(__libc_enable_asynccancel); nop
# define CDISABLE bl JUMPTARGET(__libc_disable_asynccancel); nop
# endif
# elif defined IS_IN_librt
# define CENABLE bl JUMPTARGET(__librt_enable_asynccancel)
# define CDISABLE bl JUMPTARGET(__librt_disable_asynccancel)
# ifdef SHARED
# define CENABLE bl JUMPTARGET(__librt_enable_asynccancel)
# define CDISABLE bl JUMPTARGET(__librt_disable_asynccancel)
# else
# define CENABLE bl JUMPTARGET(__librt_enable_asynccancel); nop
# define CDISABLE bl JUMPTARGET(__librt_disable_asynccancel); nop
# endif
# else
# error Unsupported library
# endif
@@ -96,8 +96,8 @@ ENTRY(__pthread_disable_asynccancel)
cmpxchgl %r11d, %fs:CANCELHANDLING
jnz 2b
3: movl %r11d, %eax
andl $(TCB_CANCELING_BITMASK|TCB_CANCELED_BITMASK), %eax
movl %r11d, %eax
3: andl $(TCB_CANCELING_BITMASK|TCB_CANCELED_BITMASK), %eax
cmpl $TCB_CANCELING_BITMASK, %eax
je 4f
1: ret
@@ -111,5 +111,6 @@ ENTRY(__pthread_disable_asynccancel)
addq $CANCELHANDLING, %rdi
LOAD_PRIVATE_FUTEX_WAIT (%esi)
syscall
movl %fs:CANCELHANDLING, %eax
jmp 3b
END(__pthread_disable_asynccancel)
+6 -4
View File
@@ -1,5 +1,5 @@
/* Cache handling for host lookup.
Copyright (C) 2004-2008, 2009 Free Software Foundation, Inc.
Copyright (C) 2004-2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
@@ -111,7 +111,7 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
int old_res_options = _res.options;
_res.options &= ~RES_USE_INET6;
size_t tmpbuf6len = 512;
size_t tmpbuf6len = 1024;
char *tmpbuf6 = alloca (tmpbuf6len);
size_t tmpbuf4len = 0;
char *tmpbuf4 = NULL;
@@ -133,9 +133,11 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
"gethostbyname4_r");
if (fct4 != NULL)
{
struct gaih_addrtuple *at = NULL;
struct gaih_addrtuple atmem;
struct gaih_addrtuple *at;
while (1)
{
at = &atmem;
rc6 = 0;
herrno = 0;
status[1] = DL_CALL_FCT (fct4, (key, &at, tmpbuf6, tmpbuf6len,
@@ -153,7 +155,7 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
goto next_nip;
/* We found the data. Count the addresses and the size. */
for (const struct gaih_addrtuple *at2 = at; at2 != NULL;
for (const struct gaih_addrtuple *at2 = at = &atmem; at2 != NULL;
at2 = at2->next)
{
++naddrs;
+5
View File
@@ -423,6 +423,11 @@ _nss_files_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
if (! keep_stream)
internal_endent ();
}
else if (status == NSS_STATUS_TRYAGAIN)
{
*errnop = errno;
*herrnop = TRY_AGAIN;
}
else
{
*errnop = errno;
+2 -1
View File
@@ -82,7 +82,7 @@ tests := tstgetopt testfnm runtests runptests \
bug-regex17 bug-regex18 bug-regex19 bug-regex20 \
bug-regex21 bug-regex22 bug-regex23 bug-regex24 \
bug-regex25 bug-regex26 bug-regex27 bug-regex28 \
bug-regex29 \
bug-regex29 bug-regex30 \
tst-nice tst-nanosleep tst-regex2 \
transbug tst-rxspencer tst-pcre tst-boost \
bug-ga1 tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \
@@ -195,6 +195,7 @@ bug-regex22-ENV = LOCPATH=$(common-objpfx)localedata
bug-regex23-ENV = LOCPATH=$(common-objpfx)localedata
bug-regex25-ENV = LOCPATH=$(common-objpfx)localedata
bug-regex26-ENV = LOCPATH=$(common-objpfx)localedata
bug-regex30-ENV = LOCPATH=$(common-objpfx)localedata
tst-rxspencer-ARGS = --utf8 rxspencer/tests
tst-rxspencer-ENV = LOCPATH=$(common-objpfx)localedata
tst-pcre-ARGS = PCRE.tests
+1
View File
@@ -1,4 +1,5 @@
#include <regex.h>
#include <stdio.h>
static int
do_test (void)
+103
View File
@@ -0,0 +1,103 @@
/* Russian regular expression tests.
Copyright (C) 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Paolo Bonzini <pbonzini@redhat.com>, 2009.
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 <sys/types.h>
#include <mcheck.h>
#include <regex.h>
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
/* Tests supposed to match. */
struct
{
const char *pattern;
const char *string;
int flags, nmatch;
regmatch_t rm[5];
} tests[] = {
/* U+0413 \xd0\x93 CYRILLIC CAPITAL LETTER GHE
U+0420 \xd0\xa0 CYRILLIC CAPITAL LETTER ER
U+0430 \xd0\xb0 CYRILLIC SMALL LETTER A
U+0433 \xd0\xb3 CYRILLIC SMALL LETTER GHE
U+0440 \xd1\x80 CYRILLIC SMALL LETTER ER
U+044F \xd1\x8f CYRILLIC SMALL LETTER YA */
{ "[\xd0\xb0-\xd1\x8f]", "\xd0\xb3", 0, 1,
{ { 0, 2 } } },
{ "[\xd0\xb0-\xd1\x8f]", "\xd0\x93", REG_ICASE, 1,
{ { 0, 2 } } },
{ "[\xd1\x80-\xd1\x8f]", "\xd0\xa0", REG_ICASE, 1,
{ { 0, 2 } } },
};
static int
do_test (void)
{
if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
{
puts ("setlocale failed");
return 1;
}
int ret = 0;
for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i)
{
regex_t re;
regmatch_t rm[5];
int n = regcomp (&re, tests[i].pattern, tests[i].flags);
if (n != 0)
{
char buf[500];
regerror (n, &re, buf, sizeof (buf));
printf ("regcomp %zd failed: %s\n", i, buf);
ret = 1;
continue;
}
if (regexec (&re, tests[i].string, tests[i].nmatch, rm, 0))
{
printf ("regexec %zd failed\n", i);
ret = 1;
regfree (&re);
continue;
}
for (n = 0; n < tests[i].nmatch; ++n)
if (rm[n].rm_so != tests[i].rm[n].rm_so
|| rm[n].rm_eo != tests[i].rm[n].rm_eo)
{
if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1)
break;
printf ("regexec match failure rm[%d] %d..%d\n",
n, rm[n].rm_so, rm[n].rm_eo);
ret = 1;
break;
}
regfree (&re);
}
return ret;
}
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
+9
View File
@@ -66,3 +66,12 @@
#scopev4 ::ffff:172.16.0.0/108 5
#scopev4 ::ffff:192.168.0.0/112 5
#scopev4 ::ffff:0.0.0.0/96 14
#
# For sites which use site-local IPv4 addresses behind NAT there is
# the problem that even if IPv4 addresses are preferred they do not
# have the same scope and are therefore not sorted first. To change
# this use only these rules:
#
#scopev4 ::ffff:169.254.0.0/112 2
#scopev4 ::ffff:127.0.0.0/104 2
#scopev4 ::ffff:0.0.0.0/96 14
+24 -16
View File
@@ -2,7 +2,8 @@
NOTE: getopt is part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it!
Copyright (C) 1987-1996,1998-2004,2008,2009 Free Software Foundation, Inc.
Copyright (C) 1987-1996,1998-2004,2008,2009,2010
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
@@ -394,8 +395,6 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
int long_only, struct _getopt_data *d, int posixly_correct)
{
int print_errors = d->opterr;
if (optstring[0] == ':')
print_errors = 0;
if (argc < 1)
return -1;
@@ -410,6 +409,10 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
posixly_correct);
d->__initialized = 1;
}
else if (optstring[0] == '-' || optstring[0] == '+')
optstring++;
if (optstring[0] == ':')
print_errors = 0;
/* Test whether ARGV[optind] points to a non-option argument.
Either it does not have option syntax, or there is an environment flag
@@ -679,8 +682,8 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
char *buf;
if (__asprintf (&buf, _("\
%s: option '%s' requires an argument\n"),
argv[0], argv[d->optind - 1]) >= 0)
%s: option '--%s' requires an argument\n"),
argv[0], pfound->name) >= 0)
{
_IO_flockfile (stderr);
@@ -697,8 +700,8 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
}
#else
fprintf (stderr,
_("%s: option '%s' requires an argument\n"),
argv[0], argv[d->optind - 1]);
_("%s: option '--%s' requires an argument\n"),
argv[0], pfound->name);
#endif
}
d->__nextchar += strlen (d->__nextchar);
@@ -788,7 +791,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
if (*d->__nextchar == '\0')
++d->optind;
if (temp == NULL || c == ':')
if (temp == NULL || c == ':' || c == ';')
{
if (print_errors)
{
@@ -910,7 +913,10 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
pfound = p;
indfound = option_index;
}
else
else if (long_only
|| pfound->has_arg != p->has_arg
|| pfound->flag != p->flag
|| pfound->val != p->val)
/* Second or later nonexact match found. */
ambig = 1;
}
@@ -922,7 +928,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
char *buf;
if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"),
argv[0], argv[d->optind]) >= 0)
argv[0], d->optarg) >= 0)
{
_IO_flockfile (stderr);
@@ -938,7 +944,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
}
#else
fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"),
argv[0], argv[d->optind]);
argv[0], d->optarg);
#endif
}
d->__nextchar += strlen (d->__nextchar);
@@ -1001,8 +1007,8 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
char *buf;
if (__asprintf (&buf, _("\
%s: option '%s' requires an argument\n"),
argv[0], argv[d->optind - 1]) >= 0)
%s: option '-W %s' requires an argument\n"),
argv[0], pfound->name) >= 0)
{
_IO_flockfile (stderr);
@@ -1018,15 +1024,17 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
free (buf);
}
#else
fprintf (stderr,
_("%s: option '%s' requires an argument\n"),
argv[0], argv[d->optind - 1]);
fprintf (stderr, _("\
%s: option '-W %s' requires an argument\n"),
argv[0], pfound->name);
#endif
}
d->__nextchar += strlen (d->__nextchar);
return optstring[0] == ':' ? ':' : '?';
}
}
else
d->optarg = NULL;
d->__nextchar += strlen (d->__nextchar);
if (longind != NULL)
*longind = option_index;
+58 -56
View File
@@ -1,6 +1,5 @@
/* Extended regular expression matching and search library.
Copyright (C) 2002,2003,2004,2005,2006,2007,2009
Free Software Foundation, Inc.
Copyright (C) 2002-2007,2009,2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -377,7 +376,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
applies to multibyte character sets; for single byte character
sets, the SIMPLE_BRACKET again suffices. */
if (dfa->mb_cur_max > 1
&& (cset->nchar_classes || cset->non_match
&& (cset->nchar_classes || cset->non_match || cset->nranges
# ifdef _LIBC
|| cset->nequiv_classes
# endif /* _LIBC */
@@ -616,7 +615,7 @@ free_dfa_content (re_dfa_t *dfa)
re_dfastate_t *state = entry->array[j];
free_state (state);
}
re_free (entry->array);
re_free (entry->array);
}
re_free (dfa->state_table);
#ifdef RE_ENABLE_I18N
@@ -1066,8 +1065,8 @@ optimize_utf8 (re_dfa_t *dfa)
}
break;
case OP_PERIOD:
has_period = 1;
break;
has_period = 1;
break;
case OP_BACK_REF:
case OP_ALT:
case END_OF_RE:
@@ -1080,7 +1079,7 @@ optimize_utf8 (re_dfa_t *dfa)
case SIMPLE_BRACKET:
/* Just double check. The non-ASCII range starts at 0x80. */
assert (0x80 % BITSET_WORD_BITS == 0);
for (i = 0x80 / BITSET_WORD_BITS; i < BITSET_WORDS; ++i)
for (i = 0x80 / BITSET_WORD_BITS; i < BITSET_WORDS; ++i)
if (dfa->nodes[node].opr.sbcset[i])
return;
break;
@@ -1161,7 +1160,7 @@ analyze (regex_t *preg)
{
dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len);
if (BE (dfa->inveclosures == NULL, 0))
return REG_ESPACE;
return REG_ESPACE;
ret = calc_inveclosure (dfa);
}
@@ -1183,16 +1182,16 @@ postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)),
if that's the only child). */
while (node->left || node->right)
if (node->left)
node = node->left;
else
node = node->right;
node = node->left;
else
node = node->right;
do
{
reg_errcode_t err = fn (extra, node);
if (BE (err != REG_NOERROR, 0))
return err;
if (node->parent == NULL)
if (node->parent == NULL)
return REG_NOERROR;
prev = node;
node = node->parent;
@@ -1226,7 +1225,7 @@ preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)),
prev = node;
node = node->parent;
if (!node)
return REG_NOERROR;
return REG_NOERROR;
}
node = node->right;
}
@@ -1249,13 +1248,13 @@ optimize_subexps (void *extra, bin_tree_t *node)
}
else if (node->token.type == SUBEXP
&& node->left && node->left->token.type == SUBEXP)
&& node->left && node->left->token.type == SUBEXP)
{
int other_idx = node->left->token.opr.idx;
node->left = node->left->left;
if (node->left)
node->left->parent = node;
node->left->parent = node;
dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx];
if (other_idx < BITSET_WORD_BITS)
@@ -1340,9 +1339,9 @@ calc_first (void *extra, bin_tree_t *node)
node->first = node;
node->node_idx = re_dfa_add_node (dfa, node->token);
if (BE (node->node_idx == -1, 0))
return REG_ESPACE;
return REG_ESPACE;
if (node->token.type == ANCHOR)
dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type;
dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type;
}
return REG_NOERROR;
}
@@ -1364,7 +1363,7 @@ calc_next (void *extra, bin_tree_t *node)
if (node->left)
node->left->next = node->next;
if (node->right)
node->right->next = node->next;
node->right->next = node->next;
break;
}
return REG_NOERROR;
@@ -1643,9 +1642,10 @@ static reg_errcode_t
calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, int node, int root)
{
reg_errcode_t err;
int i, incomplete;
int i;
re_node_set eclosure;
incomplete = 0;
int ret;
int incomplete = 0;
err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1);
if (BE (err != REG_NOERROR, 0))
return err;
@@ -1700,8 +1700,10 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, int node, int root)
}
}
/* Epsilon closures include itself. */
re_node_set_insert (&eclosure, node);
/* An epsilon closure includes itself. */
ret = re_node_set_insert (&eclosure, node);
if (BE (ret < 0, 0))
return REG_ESPACE;
if (incomplete && !root)
dfa->eclosures[node].nelem = 0;
else
@@ -2285,7 +2287,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
&& dfa->word_ops_used == 0)
init_word_char (dfa);
if (token->opr.ctx_type == WORD_DELIM
|| token->opr.ctx_type == NOT_WORD_DELIM)
|| token->opr.ctx_type == NOT_WORD_DELIM)
{
bin_tree_t *tree_first, *tree_last;
if (token->opr.ctx_type == WORD_DELIM)
@@ -2293,13 +2295,13 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
token->opr.ctx_type = WORD_FIRST;
tree_first = create_token_tree (dfa, NULL, NULL, token);
token->opr.ctx_type = WORD_LAST;
}
else
{
}
else
{
token->opr.ctx_type = INSIDE_WORD;
tree_first = create_token_tree (dfa, NULL, NULL, token);
token->opr.ctx_type = INSIDE_NOTWORD;
}
}
tree_last = create_token_tree (dfa, NULL, NULL, token);
tree = create_tree (dfa, tree_first, tree_last, OP_ALT);
if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0))
@@ -2410,7 +2412,7 @@ parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
{
tree = parse_reg_exp (regexp, preg, token, syntax, nest, err);
if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0))
*err = REG_EPAREN;
*err = REG_EPAREN;
if (BE (*err != REG_NOERROR, 0))
return NULL;
}
@@ -2541,11 +2543,11 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
elem = duplicate_tree (elem, dfa);
tree = create_tree (dfa, tree, elem, CONCAT);
if (BE (elem == NULL || tree == NULL, 0))
goto parse_dup_op_espace;
goto parse_dup_op_espace;
tree = create_tree (dfa, tree, NULL, OP_ALT);
if (BE (tree == NULL, 0))
goto parse_dup_op_espace;
goto parse_dup_op_espace;
}
if (old_tree)
@@ -2626,9 +2628,9 @@ build_range_exp (bitset_t sbcset, bracket_elem_t *start_elem,
no MBCSET if dfa->mb_cur_max == 1. */
if (mbcset)
{
/* Check the space of the arrays. */
if (BE (*range_alloc == mbcset->nranges, 0))
{
/* Check the space of the arrays. */
if (BE (*range_alloc == mbcset->nranges, 0))
{
/* There is not enough space, need realloc. */
wchar_t *new_array_start, *new_array_end;
int new_nranges;
@@ -2638,9 +2640,9 @@ build_range_exp (bitset_t sbcset, bracket_elem_t *start_elem,
/* Use realloc since mbcset->range_starts and mbcset->range_ends
are NULL if *range_alloc == 0. */
new_array_start = re_realloc (mbcset->range_starts, wchar_t,
new_nranges);
new_nranges);
new_array_end = re_realloc (mbcset->range_ends, wchar_t,
new_nranges);
new_nranges);
if (BE (new_array_start == NULL || new_array_end == NULL, 0))
return REG_ESPACE;
@@ -2648,10 +2650,10 @@ build_range_exp (bitset_t sbcset, bracket_elem_t *start_elem,
mbcset->range_starts = new_array_start;
mbcset->range_ends = new_array_end;
*range_alloc = new_nranges;
}
}
mbcset->range_starts[mbcset->nranges] = start_wc;
mbcset->range_ends[mbcset->nranges++] = end_wc;
mbcset->range_starts[mbcset->nranges] = start_wc;
mbcset->range_ends[mbcset->nranges++] = end_wc;
}
/* Build the table for single byte characters. */
@@ -2870,8 +2872,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
build below suffices. */
if (nrules > 0 || dfa->mb_cur_max > 1)
{
/* Check the space of the arrays. */
if (BE (*range_alloc == mbcset->nranges, 0))
/* Check the space of the arrays. */
if (BE (*range_alloc == mbcset->nranges, 0))
{
/* There is not enough space, need realloc. */
uint32_t *new_array_start;
@@ -2883,18 +2885,18 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
new_array_start = re_realloc (mbcset->range_starts, uint32_t,
new_nranges);
new_array_end = re_realloc (mbcset->range_ends, uint32_t,
new_nranges);
new_nranges);
if (BE (new_array_start == NULL || new_array_end == NULL, 0))
return REG_ESPACE;
return REG_ESPACE;
mbcset->range_starts = new_array_start;
mbcset->range_ends = new_array_end;
*range_alloc = new_nranges;
}
mbcset->range_starts[mbcset->nranges] = start_collseq;
mbcset->range_ends[mbcset->nranges++] = end_collseq;
mbcset->range_starts[mbcset->nranges] = start_collseq;
mbcset->range_ends[mbcset->nranges++] = end_collseq;
}
/* Build the table for single byte characters. */
@@ -3227,17 +3229,17 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
of having both SIMPLE_BRACKET and COMPLEX_BRACKET. */
if (sbc_idx < BITSET_WORDS)
{
/* Build a tree for simple bracket. */
br_token.type = SIMPLE_BRACKET;
br_token.opr.sbcset = sbcset;
work_tree = create_token_tree (dfa, NULL, NULL, &br_token);
if (BE (work_tree == NULL, 0))
goto parse_bracket_exp_espace;
/* Build a tree for simple bracket. */
br_token.type = SIMPLE_BRACKET;
br_token.opr.sbcset = sbcset;
work_tree = create_token_tree (dfa, NULL, NULL, &br_token);
if (BE (work_tree == NULL, 0))
goto parse_bracket_exp_espace;
/* Then join them by ALT node. */
work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT);
if (BE (work_tree == NULL, 0))
goto parse_bracket_exp_espace;
/* Then join them by ALT node. */
work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT);
if (BE (work_tree == NULL, 0))
goto parse_bracket_exp_espace;
}
else
{
@@ -3256,7 +3258,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
br_token.opr.sbcset = sbcset;
work_tree = create_token_tree (dfa, NULL, NULL, &br_token);
if (BE (work_tree == NULL, 0))
goto parse_bracket_exp_espace;
goto parse_bracket_exp_espace;
}
return work_tree;
@@ -3809,7 +3811,7 @@ duplicate_tree (const bin_tree_t *root, re_dfa_t *dfa)
node = node->parent;
dup_node = dup_node->parent;
if (!node)
return dup_root;
return dup_root;
}
node = node->right;
p_new = &dup_node->right;
+13 -3
View File
@@ -133,7 +133,14 @@ re_string_realloc_buffers (re_string_t *pstr, int new_buf_len)
#ifdef RE_ENABLE_I18N
if (pstr->mb_cur_max > 1)
{
wint_t *new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len);
wint_t *new_wcs;
/* Avoid overflow in realloc. */
const size_t max_object_size = MAX (sizeof (wint_t), sizeof (int));
if (BE (SIZE_MAX / max_object_size < new_buf_len, 0))
return REG_ESPACE;
new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len);
if (BE (new_wcs == NULL, 0))
return REG_ESPACE;
pstr->wcs = new_wcs;
@@ -1404,8 +1411,11 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
re_node_set *new_edests, *new_eclosures;
re_token_t *new_nodes;
/* Avoid overflows. */
if (BE (new_nodes_alloc < dfa->nodes_alloc, 0))
/* Avoid overflows in realloc. */
const size_t max_object_size = MAX (sizeof (re_token_t),
MAX (sizeof (re_node_set),
sizeof (int)));
if (BE (SIZE_MAX / max_object_size < new_nodes_alloc, 0))
return -1;
new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc);
+1 -1
View File
@@ -3998,7 +3998,7 @@ find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
/* Skip the collation sequence value. */
idx += sizeof (uint32_t);
/* Skip the wide char sequence of the collating element. */
idx = idx + sizeof (uint32_t) * (extra[idx] + 1);
idx = idx + sizeof (uint32_t) * (*(int32_t *) (extra + idx) + 1);
/* If we found the entry, return the sequence value. */
if (found)
return *(uint32_t *) (extra + idx);
+24
View File
@@ -516,6 +516,30 @@ extern int ruserok_af (__const char *__rhost, int __suser,
__const char *__remuser, __const char *__locuser,
sa_family_t __af);
/* Check whether user REMUSER on system indicated by IPv4 address
RADDR is allowed to login as LOCUSER. Non-IPv4 (e.g., IPv6) are
not supported. If SUSER is not zero the user tries to become
superuser. Return 0 if it is possible.
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern int iruserok (uint32_t __raddr, int __suser,
__const char *__remuser, __const char *__locuser);
/* This is the equivalent function where the pfamiliy if the address
pointed to by RADDR is determined by the value of AF. It therefore
can be used for IPv6
This function is not part of POSIX and therefore no official
cancellation point. But due to similarity with an POSIX interface
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern int iruserok_af (__const void *__raddr, int __suser,
__const char *__remuser, __const char *__locuser,
sa_family_t __af);
/* Try to allocate reserved port, returning a descriptor for a socket opened
at this port or -1 if unsuccessful. The search for an available port
will start at ALPORT and continues with lower numbers.
+14 -20
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1996-2004, 2007, 2008, 2009 Free Software Foundation, Inc.
/* Copyright (C) 1996-2004, 2007-2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Extended from original form by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -198,21 +198,27 @@ _nss_dns_gethostbyname3_r (const char *name, int af, struct hostent *result,
1024, &host_buffer.ptr, NULL, NULL, NULL);
if (n < 0)
{
if (errno == ESRCH)
switch (errno)
{
case ESRCH:
status = NSS_STATUS_TRYAGAIN;
h_errno = TRY_AGAIN;
break;
case ECONNREFUSED:
case ETIMEDOUT:
status = NSS_STATUS_UNAVAIL;
break;
default:
status = NSS_STATUS_NOTFOUND;
break;
}
else
status = (errno == ECONNREFUSED
? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND);
*h_errnop = h_errno;
if (h_errno == TRY_AGAIN)
*errnop = EAGAIN;
else
__set_errno (olderr);
/* If we are looking for a IPv6 address and mapping is enabled
/* If we are looking for an IPv6 address and mapping is enabled
by having the RES_USE_INET6 bit in _res.options set, we try
another lookup. */
if (af == AF_INET6 && (_res.options & RES_USE_INET6))
@@ -1044,7 +1050,7 @@ gaih_getanswer_slice (const querybuf *answer, int anslen, const char *qname,
++had_error;
continue;
}
if (*firstp)
if (*firstp && canon == NULL)
{
h_name = buffer;
buffer += h_namelen;
@@ -1160,19 +1166,7 @@ gaih_getanswer_slice (const querybuf *answer, int anslen, const char *qname,
if (ttl != 0 && ttlp != NULL)
*ttlp = ttl;
if (canon != NULL)
{
(*pat)->name = canon;
/* Reclaim buffer space. */
if (h_name + h_namelen == buffer)
{
buffer = h_name;
buflen += h_namelen;
}
}
else
(*pat)->name = h_name;
(*pat)->name = canon ?: h_name;
*firstp = 0;
}
+7 -5
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 1998, 2000 Free Software Foundation, Inc.
/* Copyright (c) 1998, 2000, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1998.
@@ -27,7 +27,7 @@
__libc_lock_define_initialized (static, createxid_lock)
static int is_initialized;
static pid_t is_initialized;
static struct drand48_data __rpc_lrand48_data;
unsigned long
@@ -37,13 +37,15 @@ _create_xid (void)
__libc_lock_lock (createxid_lock);
if (!is_initialized)
pid_t pid = getpid ();
if (is_initialized != pid)
{
struct timeval now;
__gettimeofday (&now, (struct timezone *) 0);
__srand48_r (now.tv_sec ^ now.tv_usec, &__rpc_lrand48_data);
is_initialized = 1;
__srand48_r (now.tv_sec ^ now.tv_usec ^ pid,
&__rpc_lrand48_data);
is_initialized = pid;
}
lrand48_r (&__rpc_lrand48_data, &res);
+3 -1
View File
@@ -1,5 +1,5 @@
/* i80386 __mpn_lshift --
Copyright (C) 1992, 1994, 1997-2000, 2005 Free Software Foundation, Inc.
Copyright (C) 1992,1994,1997-2000,2005,2010 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
@@ -55,6 +55,7 @@ ENTRY (BP_SYM (__mpn_lshift))
movl (%esi,%edx,4),%ebx /* read most significant limb */
cfi_rel_offset (ebx, 0)
cfi_remember_state
xorl %eax,%eax
shldl %cl,%ebx,%eax /* compute carry limb */
decl %edx
@@ -95,6 +96,7 @@ L(1): movl (%esi,%edx,4),%eax
LEAVE
ret
cfi_restore_state
L(end): shll %cl,%ebx /* compute least significant limb */
movl %ebx,(%edi) /* store it */
+16 -3
View File
@@ -47,7 +47,7 @@
#define saved_lc r16
#define chr r17
#define len r18
#define pos0 r20
#define last r20
#define val r21
#define tmp r24
#define chrx8 r25
@@ -67,6 +67,7 @@ ENTRY(__memchr)
mov saved_pr = pr // save the predicates
.body
mov ret0 = str
add last = str, in2 // last byte
and tmp = 7, str // tmp = str % 8
cmp.ne p7, p0 = r0, r0 // clear p7
extr.u chr = in1, 0, 8 // chr = (unsigned char) in1
@@ -126,7 +127,16 @@ ENTRY(__memchr)
br.ret.sptk.many b0
.recovery:
adds ret0 = -((MEMLAT + 1) * 8), ret0;;
#if MEMLAT != 6
# error "MEMLAT must be 6!"
#endif
(p[MEMLAT-6]) add ret0 = -8, ret0;;
(p[MEMLAT-5]) add ret0 = -8, ret0;;
(p[MEMLAT-4]) add ret0 = -8, ret0;;
(p[MEMLAT-3]) add ret0 = -8, ret0;;
(p[MEMLAT-2]) add ret0 = -8, ret0;;
(p[MEMLAT-1]) add ret0 = -8, ret0;;
(p[MEMLAT]) add ret0 = -8, ret0;;
(p[MEMLAT+1]) add ret0 = -8, ret0;;
(p[MEMLAT+2]) add ret0 = -8, ret0;;
.l4:
@@ -134,7 +144,10 @@ ENTRY(__memchr)
ld8 tmp = [ret0];; // load the first unchecked 8byte
xor aux[1] = tmp, chrx8;;
czx1.r poschr[1] = aux[1];;
cmp.ne p7, p0 = 8, poschr[1]
cmp.ne p7, p0 = 8, poschr[1];;
(p7) add ret0 = addr[MEMLAT+2], poschr[1];;
(p7) cmp.geu p6, p7 = ret0, last // don't go over the last byte
(p6) br.cond.spnt .notfound;;
(p7) br.cond.spnt .foundit;;
adds ret0 = 8, ret0 // load the next unchecked 8byte
br.sptk .l4;;
+3 -3
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1994, 95, 96, 98 Free Software Foundation, Inc.
/* Copyright (C) 1994,1995,1996,1998,2010 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,13 +34,13 @@ __ttyname_r (int fd, char *buf, size_t buflen)
nodename[0] = '\0';
if (err = HURD_DPORT_USE (fd, __term_get_nodename (port, nodename)))
return __hurd_dfail (fd, err), -1;
return __hurd_dfail (fd, err), errno;
len = strlen (nodename) + 1;
if (len > buflen)
{
errno = EINVAL;
return -1;
return errno;
}
memcpy (buf, nodename, len);
+3 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1996, 1998, 1999, 2001 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1996, 1998, 1999, 2001, 2010 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
@@ -44,5 +44,6 @@ cuserid (s)
if (s == NULL)
s = name;
return strncpy (s, pwptr->pw_name, L_cuserid);
s[L_cuserid - 1] = '\0';
return strncpy (s, pwptr->pw_name, L_cuserid - 1);
}
+3 -7
View File
@@ -702,6 +702,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
while (!no_more)
{
no_data = 0;
nss_gethostbyname4_r fct4
= __nss_lookup_function (nip, "gethostbyname4_r");
if (fct4 != NULL)
@@ -719,13 +720,8 @@ gaih_inet (const char *name, const struct gaih_service *service,
if (status != NSS_STATUS_TRYAGAIN
|| rc != ERANGE || herrno != NETDB_INTERNAL)
{
if (herrno == NETDB_INTERNAL)
{
__set_h_errno (herrno);
_res.options = old_res_options;
return -EAI_SYSTEM;
}
if (herrno == TRY_AGAIN)
if (status == NSS_STATUS_TRYAGAIN
&& herrno == TRY_AGAIN)
no_data = EAI_AGAIN;
else
no_data = herrno == NO_DATA;
+1
View File
@@ -1 +1,2 @@
powerpc/powerpc32/power4/fpu
powerpc/powerpc32/power4
+4 -5
View File
@@ -25,11 +25,10 @@ rm -f conftest*
fi
{ $as_echo "$as_me:$LINENO: result: $libc_cv_ppc_rel16" >&5
$as_echo "$libc_cv_ppc_rel16" >&6; }
if test $libc_cv_ppc_rel16 = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_ASM_PPC_REL16 1
_ACEOF
if test $libc_cv_ppc_rel16 = no; then
{ { $as_echo "$as_me:$LINENO: error: R_PPC_REL16 is not supported. Binutils is too old." >&5
$as_echo "$as_me: error: R_PPC_REL16 is not supported. Binutils is too old." >&2;}
{ (exit 1); exit 1; }; }
fi
# See whether GCC uses -msecure-plt.
+2 -2
View File
@@ -13,8 +13,8 @@ else
libc_cv_ppc_rel16=no
fi
rm -f conftest*])
if test $libc_cv_ppc_rel16 = yes; then
AC_DEFINE(HAVE_ASM_PPC_REL16)
if test $libc_cv_ppc_rel16 = no; then
AC_MSG_ERROR(R_PPC_REL16 is not supported. Binutils is too old.)
fi
# See whether GCC uses -msecure-plt.
+2 -5
View File
@@ -41,16 +41,13 @@ static inline Elf32_Addr * __attribute__ ((const))
ppc_got (void)
{
Elf32_Addr *got;
#ifdef HAVE_ASM_PPC_REL16
asm ("bcl 20,31,1f\n"
"1: mflr %0\n"
" addis %0,%0,_GLOBAL_OFFSET_TABLE_-1b@ha\n"
" addi %0,%0,_GLOBAL_OFFSET_TABLE_-1b@l\n"
: "=b" (got) : : "lr");
#else
asm (" bl _GLOBAL_OFFSET_TABLE_-4@local"
: "=l" (got));
#endif
return got;
}
-5
View File
@@ -47,15 +47,10 @@ _dl_start_user:
passed by value!). */
/* Put our GOT pointer in r31, */
#ifdef HAVE_ASM_PPC_REL16
bcl 20,31,1f
1: mflr r31
addis r31,r31,_GLOBAL_OFFSET_TABLE_-1b@ha
addi r31,r31,_GLOBAL_OFFSET_TABLE_-1b@l
#else
bl _GLOBAL_OFFSET_TABLE_-4@local
mflr r31
#endif
/* the address of _start in r30, */
mr r30,r3
/* &_dl_argc in 29, &_dl_argv in 27, and _dl_loaded in 28. */
-10
View File
@@ -53,10 +53,6 @@ L(start_addresses):
ASM_SIZE_DIRECTIVE(L(start_addresses))
.section ".text"
#if defined PIC && !defined HAVE_ASM_PPC_REL16
L(start_addressesp):
.long L(start_addresses)-L(branch)
#endif
ENTRY(_start)
/* Save the stack pointer, in case we're statically linked under Linux. */
mr r9,r1
@@ -77,16 +73,10 @@ L(branch):
start_addresses in r8. Also load the GOT pointer so that new PLT
calls work, like the one to __libc_start_main. */
#ifdef PIC
# ifdef HAVE_ASM_PPC_REL16
addis r30,r13,_GLOBAL_OFFSET_TABLE_-L(branch)@ha
addis r8,r13,L(start_addresses)-L(branch)@ha
addi r30,r30,_GLOBAL_OFFSET_TABLE_-L(branch)@l
lwzu r13,L(start_addresses)-L(branch)@l(r8)
# else
lwz r8,L(start_addressesp)-L(branch)(r13)
add r8,r13,r8
lwz r13,0(r8)
# endif
#else
lis r8,L(start_addresses)@ha
lwzu r13,L(start_addresses)@l(r8)
@@ -34,15 +34,10 @@ ENTRY (BP_SYM (__longjmp))
# ifdef PIC
mflr r6
cfi_register (lr,r6)
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,1f
1: mflr r5
addis r5,r5,_GLOBAL_OFFSET_TABLE_-1b@ha
addi r5,r5,_GLOBAL_OFFSET_TABLE_-1b@l
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r5
# endif
# ifdef SHARED
lwz r5,_rtld_global_ro@got(r5)
mtlr r6
-7
View File
@@ -31,17 +31,10 @@ ENTRY (__ceil)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,1f
1: mflr r9
addis r9,r9,.LC0-1b@ha
lfs fp13,.LC0-1b@l(r9)
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r10
lwz r9,.LC0@got(10)
lfs fp13,0(r9)
# endif
mtlr r11
cfi_same_value (lr)
#else
-7
View File
@@ -30,17 +30,10 @@ ENTRY (__ceilf)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,1f
1: mflr r9
addis r9,r9,.LC0-1b@ha
lfs fp13,.LC0-1b@l(r9)
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r10
lwz r9,.LC0@got(10)
lfs fp13,0(r9)
# endif
mtlr r11
cfi_same_value (lr)
#else
-7
View File
@@ -31,17 +31,10 @@ ENTRY (__floor)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,1f
1: mflr r9
addis r9,r9,.LC0-1b@ha
lfs fp13,.LC0-1b@l(r9)
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r10
lwz r9,.LC0@got(10)
lfs fp13,0(r9)
# endif
mtlr r11
cfi_same_value (lr)
#else
-7
View File
@@ -30,17 +30,10 @@ ENTRY (__floorf)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,1f
1: mflr r9
addis r9,r9,.LC0-1b@ha
lfs fp13,.LC0-1b@l(r9)
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r10
lwz r9,.LC0@got(10)
lfs fp13,0(r9)
# endif
mtlr r11
cfi_same_value (lr)
#else
-7
View File
@@ -45,17 +45,10 @@ ENTRY (__lround)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,1f
1: mflr r9
addis r9,r9,.LC0-1b@ha
lfs fp10,.LC0-1b@l(r9)
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r10
lwz r9,.LC0@got(10)
lfs fp10,0(r9)
# endif
mtlr r11
cfi_same_value (lr)
#else
-7
View File
@@ -33,17 +33,10 @@ ENTRY (__rint)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,1f
1: mflr r9
addis r9,r9,.LC0-1b@ha
lfs fp13,.LC0-1b@l(r9)
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r10
lwz r9,.LC0@got(10)
lfs fp13,0(r9)
# endif
mtlr r11
cfi_same_value (lr)
#else
-7
View File
@@ -29,17 +29,10 @@ ENTRY (__rintf)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,1f
1: mflr r9
addis r9,r9,.LC0-1b@ha
lfs fp13,.LC0-1b@l(r9)
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r10
lwz r9,.LC0@got(10)
lfs fp13,0(r9)
# endif
mtlr r11
cfi_same_value (lr)
#else
-6
View File
@@ -43,16 +43,10 @@ ENTRY (__round)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,1f
1: mflr r9
addis r9,r9,.LC0-1b@ha
addi r9,r9,.LC0-1b@l
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r10
lwz r9,.LC0@got(10)
# endif
mtlr r11
cfi_same_value (lr)
lfs fp13,0(r9)
-6
View File
@@ -42,16 +42,10 @@ ENTRY (__roundf )
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,1f
1: mflr r9
addis r9,r9,.LC0-1b@ha
addi r9,r9,.LC0-1b@l
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r10
lwz r9,.LC0@got(10)
# endif
mtlr r11
cfi_same_value (lr)
lfs fp13,0(r9)
-7
View File
@@ -38,17 +38,10 @@ ENTRY (__trunc)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,1f
1: mflr r9
addis r9,r9,.LC0-1b@ha
lfs fp13,.LC0-1b@l(r9)
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r10
lwz r9,.LC0@got(10)
lfs fp13,0(r9)
# endif
mtlr r11
cfi_same_value (lr)
#else
-7
View File
@@ -37,17 +37,10 @@ ENTRY (__truncf)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,1f
1: mflr r9
addis r9,r9,.LC0-1b@ha
lfs fp13,.LC0-1b@l(r9)
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r10
lwz r9,.LC0@got(10)
lfs fp13,0(r9)
# endif
mtlr r11
cfi_same_value (lr)
#else
@@ -85,15 +85,10 @@ ENTRY (BP_SYM (__sigsetjmp))
# ifdef PIC
mflr r6
cfi_register(lr,r6)
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,1f
1: mflr r5
addis r5,r5,_GLOBAL_OFFSET_TABLE_-1b@ha
addi r5,r5,_GLOBAL_OFFSET_TABLE_-1b@l
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r5
# endif
mtlr r6
cfi_same_value (lr)
# ifdef SHARED
-7
View File
@@ -256,17 +256,10 @@ L(checklinesize):
beq L(medium)
/* Establishes GOT addressability so we can load __cache_line_size
from static. This value was set from the aux vector during startup. */
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,1f
1: mflr rGOT
addis rGOT,rGOT,__cache_line_size-1b@ha
lwz rCLS,__cache_line_size-1b@l(rGOT)
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr rGOT
lwz rGOT,__cache_line_size@got(rGOT)
lwz rCLS,0(rGOT)
# endif
mtlr rTMP
#else
/* Load __cache_line_size from static. This value was set from the
@@ -53,16 +53,10 @@ ENTRY (__llround)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,1f
1: mflr r9
addis r9,r9,.LC0-1b@ha
addi r9,r9,.LC0-1b@l
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r10
lwz r9,.LC0@got(10)
# endif
mtlr r11
cfi_same_value (lr)
lfd fp9,0(r9)
@@ -63,7 +63,6 @@ EALIGN (__sqrt, 5, 0)
cfi_offset(lr,20-16)
cfi_offset(r30,8-16)
#ifdef SHARED
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,.LCF1
.LCF1:
mflr r30
@@ -71,12 +70,6 @@ EALIGN (__sqrt, 5, 0)
addi r30,r30,_GLOBAL_OFFSET_TABLE_-.LCF1@l
lwz r9,_LIB_VERSION@got(30)
lwz r0,0(r9)
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r30
lwz r9,_LIB_VERSION@got(30)
lwz r0,0(r9)
# endif
#else
lis r9,_LIB_VERSION@ha
lwz r0,_LIB_VERSION@l(r9)
@@ -63,7 +63,6 @@ EALIGN (__sqrtf, 5, 0)
cfi_offset(lr,20-16)
cfi_offset(r30,8-16)
#ifdef SHARED
# ifdef HAVE_ASM_PPC_REL16
bcl 20,31,.LCF1
.LCF1:
mflr r30
@@ -71,12 +70,6 @@ EALIGN (__sqrtf, 5, 0)
addi r30,r30,_GLOBAL_OFFSET_TABLE_-.LCF1@l
lwz r9,_LIB_VERSION@got(30)
lwz r0,0(r9)
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r30
lwz r9,_LIB_VERSION@got(30)
lwz r0,0(r9)
# endif
#else
lis r9,_LIB_VERSION@ha
lwz r0,_LIB_VERSION@l(r9)
+1 -1
View File
@@ -646,7 +646,7 @@ L(Wunaligned):
cfi_offset(r25,(24-64))
andi. rBITDIF, rN, 12 /* Get the W remainder */
stw r24,20(r1)
cfi_offset(r24,(24-64))
cfi_offset(r24,(20-64))
slwi rSHL, rSHL, 3
lwz rWORD6, 0(rSTR2)
lwzu rWORD8, 4(rSTR2)

Some files were not shown because too many files have changed in this diff Show More