[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r19738 - in /fsf/trunk/libc: ./ elf/ manual/ nptl/ ports/ ports/data/ ports/sysdeps/unix/sysv/linux/alpha/nptl/ ports/sysdep...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r19738 - in /fsf/trunk/libc: ./ elf/ manual/ nptl/ ports/ ports/data/ ports/sysdeps/unix/sysv/linux/alpha/nptl/ ports/sysdep...
- From: eglibc@xxxxxxxxxx
- Date: Sat, 21 Jul 2012 00:01:47 -0000
Author: eglibc
Date: Sat Jul 21 00:01:46 2012
New Revision: 19738
Log:
Import glibc-mainline for 2012-07-21
Added:
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/localplt.data
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/localplt.data
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/localplt.data
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/localplt.data
fsf/trunk/libc/sysdeps/generic/localplt.data
fsf/trunk/libc/sysdeps/mach/hurd/llistxattr.c
fsf/trunk/libc/sysdeps/mach/hurd/lremovexattr.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/nptl/localplt.data
fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/localplt.data
fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/localplt.data
fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/nptl/localplt.data
fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-64/nptl/localplt.data
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/localplt.data
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/localplt.data
Removed:
fsf/trunk/libc/ports/data/
fsf/trunk/libc/scripts/data/
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/elf/Makefile
fsf/trunk/libc/manual/lang.texi
fsf/trunk/libc/manual/string.texi
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/tst-pthread-getattr.c
fsf/trunk/libc/ports/ChangeLog.alpha
fsf/trunk/libc/ports/ChangeLog.arm
fsf/trunk/libc/ports/ChangeLog.ia64
fsf/trunk/libc/ports/ChangeLog.m68k
fsf/trunk/libc/ports/ChangeLog.powerpc
fsf/trunk/libc/sysdeps/mach/hurd/getgroups.c
fsf/trunk/libc/sysdeps/mach/hurd/getlogin_r.c
fsf/trunk/libc/sysdeps/mach/hurd/sendto.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sat Jul 21 00:01:46 2012
@@ -1,3 +1,59 @@
+2012-07-20 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * manual/lang.texi (__va_copy): Document primarily as ISO C99
+ va_copy. Document allowing for unavailable va_copy only as
+ pre-C99 compatibility.
+ * manual/string.texi (Copying and Concatenation): Use va_copy
+ instead of __va_copy in concat example.
+
+2012-07-20 Pino Toscano <toscano.pino@xxxxxxxxxx>
+
+ * sysdeps/mach/hurd/sendto.c (create_address_port): New subroutine.
+ (__sendto): Use create_address_port. Initialize APORT and deallocate
+ it if not null.
+
+ * sysdeps/mach/hurd/llistxattr.c: New file, copied from listxattr.c
+ with O_NOLINK passed to __file_name_lookup.
+
+ * sysdeps/mach/hurd/lremovexattr.c: New file, copied from removexattr.c
+ with O_NOLINK passed to __file_name_lookup.
+
+ * sysdeps/mach/hurd/getgroups.c: Return -1 and set EINVAL for
+ negative N or less than NGIDS.
+
+ * sysdeps/mach/hurd/getlogin_r.c: Make LOGIN non-static and change its
+ type to string_t. Set ERANGE as errno and return it if NAME is not big
+ enough. Use memcpy instead of strncpy.
+
+2012-07-20 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * elf/Makefile (check-data): Remove.
+ (localplt.data): New vpath directive.
+ ($(objpfx)check-localplt.out): Use localplt.data from vpath
+ instead of $(check-data).
+ * scripts/data/localplt-generic.data: Move to ...
+ * sysdeps/generic/localplt.data: ... here.
+ * scripts/data/localplt-i386-linux-gnu.data: Move to ...
+ * sysdeps/unix/sysv/linux/i386/nptl/localplt.data: ... here.
+ * scripts/data/localplt-powerpc-linux-gnu.data: Move to ...
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/localplt.data:
+ ... here.
+ * scripts/data/localplt-powerpc64-linux-gnu.data: Move to ...
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/localplt.data:
+ ... here.
+ * scripts/data/localplt-s390-linux-gnu.data: Move to ...
+ * sysdeps/unix/sysv/linux/s390/s390-32/nptl/localplt.data:
+ ... here.
+ * scripts/data/localplt-s390x-linux-gnu.data: Move to ...
+ * sysdeps/unix/sysv/linux/s390/s390-64/nptl/localplt.data:
+ ... here.
+ * scripts/data/localplt-sparc-linux-gnu.data: Move to ...
+ * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/localplt.data:
+ ... here.
+ * scripts/data/localplt-sparc64-linux-gnu.data: Move to ...
+ * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/localplt.data:
+ ... here.
+
2012-07-19 Adhemerval Zanella <azanella@xxxxxxxxxxxxxxxxxx>
* sysdeps/powerpc/tls-macros.h: Split PowerPC definitions in
Modified: fsf/trunk/libc/elf/Makefile
==============================================================================
--- fsf/trunk/libc/elf/Makefile (original)
+++ fsf/trunk/libc/elf/Makefile Sat Jul 21 00:01:46 2012
@@ -947,15 +947,6 @@
mv -f $@T $@
common-generated += $(all-built-dso:$(common-objpfx)%=%.jmprel)
-check-data := $(firstword $(wildcard \
- $(foreach D,$(add-ons) scripts,\
- $(patsubst %,$(..)$D/data/localplt-%.data,\
- $(abi-name) \
- $(addsuffix -$(config-os),\
- $(config-machine) \
- $(base-machine)) \
- generic))))
-
tests: $(objpfx)check-localplt.out
localplt-built-dso := $(addprefix $(common-objpfx),\
@@ -970,12 +961,14 @@
localplt-built-dso += $(filter-out %_nonshared.a, $(shared-thread-library))
endif
+vpath localplt.data $(+sysdep_dirs)
+
$(objpfx)check-localplt.out: $(..)scripts/check-localplt.awk \
$(..)scripts/localplt.awk \
$(localplt-built-dso:=.jmprel) \
- $(check-data)
- LC_ALL=C $(AWK) -f $(filter-out $< $(check-data),$^) | \
- LC_ALL=C $(AWK) -f $< $(check-data) - \
+ localplt.data
+ LC_ALL=C $(AWK) -f $(filter-out $< %localplt.data,$^) | \
+ LC_ALL=C $(AWK) -f $< $(filter %localplt.data,$^) - \
> $@
endif
Modified: fsf/trunk/libc/manual/lang.texi
==============================================================================
--- fsf/trunk/libc/manual/lang.texi (original)
+++ fsf/trunk/libc/manual/lang.texi Sat Jul 21 00:01:46 2012
@@ -463,28 +463,33 @@
of the same type.
@comment stdarg.h
-@comment GNU
-@deftypefn {Macro} void __va_copy (va_list @var{dest}, va_list @var{src})
-The @code{__va_copy} macro allows copying of objects of type
+@comment ISO
+@deftypefn {Macro} void va_copy (va_list @var{dest}, va_list @var{src})
+@deftypefnx {Macro} void __va_copy (va_list @var{dest}, va_list @var{src})
+The @code{va_copy} macro allows copying of objects of type
@code{va_list} even if this is not an integral type. The argument pointer
in @var{dest} is initialized to point to the same argument as the
pointer in @var{src}.
-This macro is a GNU extension but it will hopefully also be available in
-the next update of the ISO C standard.
+This macro was added in ISO C99. When building for strict conformance
+to ISO C90 (@samp{gcc -ansi}), it is not available. The macro
+@code{__va_copy} is available as a GNU extension in any standards
+mode; before GCC 3.0, it was the only macro for this functionality.
@end deftypefn
-If you want to use @code{__va_copy} you should always be prepared for the
+If you want to use @code{va_copy} and be portable to pre-C99 systems,
+you should always be prepared for the
possibility that this macro will not be available. On architectures where a
-simple assignment is invalid, hopefully @code{__va_copy} @emph{will} be available,
-so one should always write something like this:
+simple assignment is invalid, hopefully @code{va_copy} @emph{will} be available,
+so one should always write something like this if concerned about
+pre-C99 portability:
@smallexample
@{
va_list ap, save;
@dots{}
-#ifdef __va_copy
- __va_copy (save, ap);
+#ifdef va_copy
+ va_copy (save, ap);
#else
save = ap;
#endif
Modified: fsf/trunk/libc/manual/string.texi
==============================================================================
--- fsf/trunk/libc/manual/string.texi (original)
+++ fsf/trunk/libc/manual/string.texi Sat Jul 21 00:01:46 2012
@@ -824,7 +824,6 @@
end of the destination string so that the actual copying can start.
This is a common example:
-@cindex __va_copy
@cindex va_copy
@smallexample
/* @r{This function concatenates arbitrarily many strings. The last}
@@ -838,9 +837,7 @@
char *result;
va_start (ap, str);
- /* @r{Actually @code{va_copy}, but this is the name more gcc versions}
- @r{understand.} */
- __va_copy (ap2, ap);
+ va_copy (ap2, ap);
/* @r{Determine how much space we need.} */
for (s = str; s != NULL; s = va_arg (ap, const char *))
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Sat Jul 21 00:01:46 2012
@@ -1,3 +1,13 @@
+2012-07-20 Siddhesh Poyarekar <siddhesh@xxxxxxxxxx>
+
+ * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
+ size.
+ (_MIN): New macro.
+ (allocate_and_test): Return STACKADDR. Access STACKADDR instead
+ of MEM to test.
+ (check_stack_top): Read valued written into STACKADDR in
+ allocate_and_test. Cap stack size to MAX_STACK_SIZE.
+
2012-07-19 Siddhesh Poyarekar <siddhesh@xxxxxxxxxx>
* nptl-init.c (sighandler_setxid): Fix the comment that
Modified: fsf/trunk/libc/nptl/tst-pthread-getattr.c
==============================================================================
--- fsf/trunk/libc/nptl/tst-pthread-getattr.c (original)
+++ fsf/trunk/libc/nptl/tst-pthread-getattr.c Sat Jul 21 00:01:46 2012
@@ -23,16 +23,38 @@
#include <sys/resource.h>
#include <pthread.h>
#include <alloca.h>
+#include <assert.h>
+
+/* There is an obscure bug in the kernel due to which RLIMIT_STACK is sometimes
+ returned as unlimited when it is not, which may cause this test to fail.
+ There is also the other case where RLIMIT_STACK is intentionally set as
+ unlimited or very high, which may result in a vma that is too large and again
+ results in a test case failure. To avoid these problems, we cap the stack
+ size to one less than 8M. See the following mailing list threads for more
+ information about this problem:
+ <http://sourceware.org/ml/libc-alpha/2012-06/msg00599.html>
+ <http://sourceware.org/ml/libc-alpha/2012-06/msg00713.html>. */
+#define MAX_STACK_SIZE (8192 * 1024 - 1)
+
+#define _MIN(l,o) ((l) < (o) ? (l) : (o))
/* Move the stack pointer so that stackaddr is accessible and then check if it
really is accessible. This will segfault if it fails. */
-static void
+static void *
allocate_and_test (void *stackaddr)
{
void *mem = &mem;
- /* FIXME: The difference will be negative for _STACK_GROWSUP. */
+ /* FIXME: mem >= stackaddr for _STACK_GROWSUP. */
mem = alloca ((size_t) (mem - stackaddr));
- *(int *)(mem) = 0;
+ assert (mem <= stackaddr);
+
+ /* We don't access mem here because the compiler may move the stack pointer
+ beyond what we expect, thus making our alloca send the stack pointer
+ beyond stackaddr. Using only stackaddr without the assert may make the
+ compiler think that this instruction is independent of the above alloca
+ and hence reshuffle to do this dereference before the alloca. */
+ *(int *)stackaddr = 42;
+ return stackaddr;
}
static int
@@ -77,17 +99,20 @@
return 1;
}
+ printf ("current rlimit_stack is %zu\n", stack_limit.rlim_cur);
+
if (get_self_pthread_attr ("check_stack_top", &stackaddr, &stacksize))
return 1;
- /* Reduce the rlimit to a page less that what is currently being returned so
- that we ensure that pthread_getattr_np uses rlimit. The figure is
- intentionally unaligned so to verify that pthread_getattr_np returns an
- aligned stacksize that correctly fits into the rlimit. We don't bother
- about the case where the stack is limited by the vma below it and not by
- the rlimit because the stacksize returned in that case is computed from
- the end of that vma and is hence safe. */
- stack_limit.rlim_cur = stacksize - 4095;
+ /* Reduce the rlimit to a page less that what is currently being returned
+ (subject to a maximum of MAX_STACK_SIZE) so that we ensure that
+ pthread_getattr_np uses rlimit. The figure is intentionally unaligned so
+ to verify that pthread_getattr_np returns an aligned stacksize that
+ correctly fits into the rlimit. We don't bother about the case where the
+ stack is limited by the vma below it and not by the rlimit because the
+ stacksize returned in that case is computed from the end of that vma and is
+ hence safe. */
+ stack_limit.rlim_cur = _MIN(stacksize - 4095, MAX_STACK_SIZE);
printf ("Adjusting RLIMIT_STACK to %zu\n", stack_limit.rlim_cur);
if ((ret = setrlimit (RLIMIT_STACK, &stack_limit)))
{
@@ -100,7 +125,10 @@
printf ("Adjusted rlimit: stacksize=%zu, stackaddr=%p\n", stacksize,
stackaddr);
- allocate_and_test (stackaddr);
+
+ /* So that the compiler does not optimize out this call. */
+ stackaddr = allocate_and_test (stackaddr);
+ assert (*(int *)stackaddr == 42);
puts ("Stack top tests done");
Modified: fsf/trunk/libc/ports/ChangeLog.alpha
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.alpha (original)
+++ fsf/trunk/libc/ports/ChangeLog.alpha Sat Jul 21 00:01:46 2012
@@ -1,3 +1,8 @@
+2012-07-20 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * data/localplt-alpha-linux-gnu.data: Move to ...
+ * sysdeps/unix/sysv/linux/alpha/nptl/localplt.data: ... here.
+
2012-07-17 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/alpha/nptl/c++-types.data: Move from
Modified: fsf/trunk/libc/ports/ChangeLog.arm
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.arm (original)
+++ fsf/trunk/libc/ports/ChangeLog.arm Sat Jul 21 00:01:46 2012
@@ -1,3 +1,8 @@
+2012-07-20 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * data/localplt-arm-linux-gnueabi.data: Move to ...
+ * sysdeps/unix/sysv/linux/arm/nptl/localplt.data: ... here.
+
2012-07-17 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/arm/configure.in: Remove TLS check.
Modified: fsf/trunk/libc/ports/ChangeLog.ia64
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.ia64 (original)
+++ fsf/trunk/libc/ports/ChangeLog.ia64 Sat Jul 21 00:01:46 2012
@@ -1,3 +1,8 @@
+2012-07-20 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * data/localplt-ia64-linux-gnu.data: Move to ...
+ * sysdeps/unix/sysv/linux/ia64/nptl/localplt.data: ... here.
+
2012-07-17 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/ia64/nptl/c++-types.data: Move from
Modified: fsf/trunk/libc/ports/ChangeLog.m68k
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.m68k (original)
+++ fsf/trunk/libc/ports/ChangeLog.m68k Sat Jul 21 00:01:46 2012
@@ -1,3 +1,8 @@
+2012-07-20 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * data/localplt-m68k-linux-gnu.data: Move to ...
+ * sysdeps/unix/sysv/linux/m68k/nptl/localplt.data: ... here.
+
2012-07-17 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* data/c++-types-m68k-linux-gnu.data: Move to ...
Modified: fsf/trunk/libc/ports/ChangeLog.powerpc
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.powerpc (original)
+++ fsf/trunk/libc/ports/ChangeLog.powerpc Sat Jul 21 00:01:46 2012
@@ -1,3 +1,9 @@
+2012-07-20 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * data/localplt-powerpcsoft-linux-gnu.data: Move to ...
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/localplt.data:
+ ... here.
+
2012-07-17 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* data/c++-types-powerpcsoft-linux-gnu.data: Move to ...
Added: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data (added)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data Sat Jul 21 00:01:46 2012
@@ -1,0 +1,20 @@
+libc.so: _OtsAddX ?
+libc.so: _OtsConvertFloatXT ?
+libc.so: _OtsCvtQX ?
+libc.so: _OtsDivX ?
+libc.so: _OtsEqlX ?
+libc.so: _OtsGeqX ?
+libc.so: _OtsLssX ?
+libc.so: _OtsMulX ?
+libc.so: _OtsNeqX ?
+libc.so: _OtsSubX ?
+libc.so: _Unwind_Find_FDE
+libc.so: calloc ?
+libc.so: free ?
+libc.so: malloc ?
+libc.so: memalign ?
+libc.so: realloc ?
+libm.so: matherr
+# We used to offer inline functions that used this, so it must be exported.
+# Ought to reorg things such that carg isn't thus forced to use a plt.
+libm.so: __atan2
Added: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/localplt.data
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/localplt.data (added)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/localplt.data Sat Jul 21 00:01:46 2012
@@ -1,0 +1,13 @@
+libc.so: __signbit
+libc.so: calloc
+libc.so: free
+libc.so: fscanf
+libc.so: malloc
+libc.so: memalign
+libc.so: raise
+libc.so: realloc
+libm.so: __signbit
+libm.so: __signbitf
+libm.so: matherr
+libpthread.so: __errno_location
+libpthread.so: raise
Added: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/localplt.data
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/localplt.data (added)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/localplt.data Sat Jul 21 00:01:46 2012
@@ -1,0 +1,8 @@
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr
+libm.so: matherrf
+libm.so: matherrl
Added: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/localplt.data
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/localplt.data (added)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/localplt.data Sat Jul 21 00:01:46 2012
@@ -1,0 +1,8 @@
+libc.so: _Unwind_Find_FDE
+libc.so: __m68k_read_tp
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr
Added: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/localplt.data
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/localplt.data (added)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/localplt.data Sat Jul 21 00:01:46 2012
@@ -1,0 +1,41 @@
+libc.so: _Unwind_Find_FDE
+libc.so: __adddf3 ?
+libc.so: __addsf3 ?
+libc.so: __divdf3 ?
+libc.so: __divsf3 ?
+libc.so: __eqdf2 ?
+libc.so: __eqsf2 ?
+libc.so: __extendsfdf2 ?
+libc.so: __fixdfsi ?
+libc.so: __fixsfsi ?
+libc.so: __fixunsdfsi ?
+libc.so: __floatsidf ?
+libc.so: __floatsisf ?
+libc.so: __floatunsidf ?
+libc.so: __floatunsisf ?
+libc.so: __gedf2 ?
+libc.so: __gtdf2 ?
+libc.so: __ledf2 ?
+libc.so: __ltdf2 ?
+libc.so: __muldf3 ?
+libc.so: __mulsf3 ?
+libc.so: __nedf2 ?
+libc.so: __signbit
+libc.so: __signbitl
+libc.so: __subdf3 ?
+libc.so: __subsf3 ?
+libc.so: __truncdfsf2 ?
+libc.so: __unorddf2 ?
+libc.so: abort ?
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: __signbit
+libm.so: __signbitf
+libm.so: __signbitl
+libm.so: copysignl
+libm.so: fabsl
+libm.so: fegetround
+libm.so: matherr
Added: fsf/trunk/libc/sysdeps/generic/localplt.data
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/localplt.data (added)
+++ fsf/trunk/libc/sysdeps/generic/localplt.data Sat Jul 21 00:01:46 2012
@@ -1,0 +1,9 @@
+# See scripts/check-localplt.awk for how this file is processed.
+# PLT use is required for the malloc family and for matherr because
+# users can define their own functions and have library internals call them.
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr
Modified: fsf/trunk/libc/sysdeps/mach/hurd/getgroups.c
==============================================================================
--- fsf/trunk/libc/sysdeps/mach/hurd/getgroups.c (original)
+++ fsf/trunk/libc/sysdeps/mach/hurd/getgroups.c Sat Jul 21 00:01:46 2012
@@ -30,6 +30,9 @@
int ngids;
void *crit;
+ if (n < 0)
+ return __hurd_fail (EINVAL);
+
crit = _hurd_critical_section_lock ();
__mutex_lock (&_hurd_id.lock);
@@ -53,7 +56,7 @@
/* Now that the lock is released, we can safely copy the
group set into the user's array, which might fault. */
if (ngids > n)
- ngids = n;
+ return __hurd_fail (EINVAL);
memcpy (gidset, gids, ngids * sizeof (gid_t));
}
else
Modified: fsf/trunk/libc/sysdeps/mach/hurd/getlogin_r.c
==============================================================================
--- fsf/trunk/libc/sysdeps/mach/hurd/getlogin_r.c (original)
+++ fsf/trunk/libc/sysdeps/mach/hurd/getlogin_r.c Sat Jul 21 00:01:46 2012
@@ -29,13 +29,20 @@
char *name;
size_t name_len;
{
- static char login[1024]; /* XXX */
+ string_t login;
error_t err;
if (err = __USEPORT (PROC, __proc_getlogin (port, login)))
return errno = err;
- strncpy (name, login, name_len);
+ size_t len = __strnlen (login, sizeof login - 1) + 1;
+ if (len > name_len)
+ {
+ errno = ERANGE;
+ return errno;
+ }
+
+ memcpy (name, login, len);
return 0;
}
libc_hidden_def (getlogin_r)
Added: fsf/trunk/libc/sysdeps/mach/hurd/llistxattr.c
==============================================================================
--- fsf/trunk/libc/sysdeps/mach/hurd/llistxattr.c (added)
+++ fsf/trunk/libc/sysdeps/mach/hurd/llistxattr.c Sat Jul 21 00:01:46 2012
@@ -1,0 +1,35 @@
+/* Access to extended attributes on files. Hurd version.
+ Copyright (C) 2005-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <sys/xattr.h>
+#include <hurd.h>
+#include <hurd/xattr.h>
+#include <fcntl.h>
+
+ssize_t
+llistxattr (const char *path, char *list, size_t size)
+{
+ error_t err;
+ file_t port = __file_name_lookup (path, O_NOLINK, 0);
+ if (port == MACH_PORT_NULL)
+ return -1;
+ err = _hurd_xattr_list (port, list, &size);
+ __mach_port_deallocate (__mach_task_self (), port);
+ return err ? __hurd_fail (err) : size;
+}
Added: fsf/trunk/libc/sysdeps/mach/hurd/lremovexattr.c
==============================================================================
--- fsf/trunk/libc/sysdeps/mach/hurd/lremovexattr.c (added)
+++ fsf/trunk/libc/sysdeps/mach/hurd/lremovexattr.c Sat Jul 21 00:01:46 2012
@@ -1,0 +1,35 @@
+/* Access to extended attributes on files. Hurd version.
+ Copyright (C) 2005-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <sys/xattr.h>
+#include <hurd.h>
+#include <hurd/xattr.h>
+#include <fcntl.h>
+
+ssize_t
+lremovexattr (const char *path, const char *name)
+{
+ error_t err;
+ file_t port = __file_name_lookup (path, O_NOLINK, 0);
+ if (port == MACH_PORT_NULL)
+ return -1;
+ err = _hurd_xattr_remove (port, name);
+ __mach_port_deallocate (__mach_task_self (), port);
+ return __hurd_fail (err);
+}
Modified: fsf/trunk/libc/sysdeps/mach/hurd/sendto.c
==============================================================================
--- fsf/trunk/libc/sysdeps/mach/hurd/sendto.c (original)
+++ fsf/trunk/libc/sysdeps/mach/hurd/sendto.c Sat Jul 21 00:01:46 2012
@@ -33,37 +33,50 @@
const struct sockaddr_un *addr,
socklen_t addr_len)
{
- addr_port_t aport;
+ addr_port_t aport = MACH_PORT_NULL;
error_t err;
size_t wrote;
- if (addr->sun_family == AF_LOCAL)
+ /* Get an address port for the desired destination address. */
+ error_t create_address_port (io_t port,
+ const struct sockaddr_un *addr,
+ socklen_t addr_len,
+ addr_port_t *aport)
{
- /* For the local domain, we must look up the name as a file and talk
- to it with the ifsock protocol. */
- file_t file = __file_name_lookup (addr->sun_path, 0, 0);
- if (file == MACH_PORT_NULL)
- return -1;
- err = __ifsock_getsockaddr (file, &aport);
- __mach_port_deallocate (__mach_task_self (), file);
- if (err == MIG_BAD_ID || err == EOPNOTSUPP)
- /* The file did not grok the ifsock protocol. */
- err = ENOTSOCK;
- if (err)
- return __hurd_fail (err);
+ error_t err_port;
+
+ if (addr->sun_family == AF_LOCAL)
+ {
+ /* For the local domain, we must look up the name as a file and talk
+ to it with the ifsock protocol. */
+ file_t file = __file_name_lookup (addr->sun_path, 0, 0);
+ if (file == MACH_PORT_NULL)
+ return errno;
+ err_port = __ifsock_getsockaddr (file, aport);
+ __mach_port_deallocate (__mach_task_self (), file);
+ if (err_port == MIG_BAD_ID || err_port == EOPNOTSUPP)
+ /* The file did not grok the ifsock protocol. */
+ err_port = ENOTSOCK;
+ }
+ else
+ {
+ err_port = __socket_create_address (port,
+ addr->sun_family,
+ (char *) addr,
+ addr_len,
+ aport);
+ }
+
+ return err_port;
}
- else
- err = EIEIO;
- /* Get an address port for the desired destination address. */
err = HURD_DPORT_USE (fd,
({
- if (err)
- err = __socket_create_address (port,
- addr->sun_family,
- (char *) addr,
- addr_len,
- &aport);
+ if (addr != NULL)
+ err = create_address_port (port, addr, addr_len,
+ &aport);
+ else
+ err = 0;
if (! err)
{
/* Send the data. */
@@ -72,11 +85,12 @@
NULL,
MACH_MSG_TYPE_COPY_SEND, 0,
NULL, 0, &wrote);
- __mach_port_deallocate (__mach_task_self (),
- aport);
}
err;
}));
+
+ if (aport != MACH_PORT_NULL)
+ __mach_port_deallocate (__mach_task_self (), aport);
return err ? __hurd_sockfail (fd, flags, err) : wrote;
}
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/nptl/localplt.data
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/nptl/localplt.data (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/nptl/localplt.data Sat Jul 21 00:01:46 2012
@@ -1,0 +1,7 @@
+libc.so: _Unwind_Find_FDE
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/localplt.data
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/localplt.data (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/localplt.data Sat Jul 21 00:01:46 2012
@@ -1,0 +1,7 @@
+libc.so: _Unwind_Find_FDE
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/localplt.data
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/localplt.data (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/localplt.data Sat Jul 21 00:01:46 2012
@@ -1,0 +1,6 @@
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/nptl/localplt.data
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/nptl/localplt.data (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/nptl/localplt.data Sat Jul 21 00:01:46 2012
@@ -1,0 +1,7 @@
+libc.so: _Unwind_Find_FDE
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-64/nptl/localplt.data
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-64/nptl/localplt.data (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-64/nptl/localplt.data Sat Jul 21 00:01:46 2012
@@ -1,0 +1,7 @@
+libc.so: _Unwind_Find_FDE
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/localplt.data
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/localplt.data (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/localplt.data Sat Jul 21 00:01:46 2012
@@ -1,0 +1,17 @@
+libc.so: _Q_add ?
+libc.so: _Q_div ?
+libc.so: _Q_feq ?
+libc.so: _Q_fge ?
+libc.so: _Q_fle ?
+libc.so: _Q_flt ?
+libc.so: _Q_fne ?
+libc.so: _Q_itoq ?
+libc.so: _Q_mul ?
+libc.so: _Q_sub ?
+libc.so: _Unwind_Find_FDE
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/localplt.data
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/localplt.data (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/localplt.data Sat Jul 21 00:01:46 2012
@@ -1,0 +1,19 @@
+libc.so: _Qp_add ?
+libc.so: _Qp_div ?
+libc.so: _Qp_feq ?
+libc.so: _Qp_fge ?
+libc.so: _Qp_fle ?
+libc.so: _Qp_flt ?
+libc.so: _Qp_fne ?
+libc.so: _Qp_itoq ?
+libc.so: _Qp_mul ?
+libc.so: _Qp_qtod ?
+libc.so: _Qp_sub ?
+libc.so: _Qp_xtoq ?
+libc.so: _Unwind_Find_FDE
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits