[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r23012 - in /fsf/trunk/libc: ./ debug/ elf/ io/ login/ math/ ports/ ports/sysdeps/arm/ posix/ resource/ sysdeps/generic/ sys...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r23012 - in /fsf/trunk/libc: ./ debug/ elf/ io/ login/ math/ ports/ ports/sysdeps/arm/ posix/ resource/ sysdeps/generic/ sys...
- From: eglibc@xxxxxxxxxx
- Date: Tue, 07 May 2013 00:02:38 -0000
Author: eglibc
Date: Tue May 7 00:02:35 2013
New Revision: 23012
Log:
Import glibc-mainline for 2013-05-07
Added:
fsf/trunk/libc/elf/dl-writev.h
fsf/trunk/libc/login/getlogin.c
fsf/trunk/libc/login/getlogin_r.c
fsf/trunk/libc/login/getlogin_r_chk.c
fsf/trunk/libc/login/ptsname_r_chk.c
fsf/trunk/libc/login/setlogin.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-writev.h
fsf/trunk/libc/sysdeps/wordsize-64/glob64.c
Removed:
fsf/trunk/libc/debug/getlogin_r_chk.c
fsf/trunk/libc/debug/ptsname_r_chk.c
fsf/trunk/libc/posix/getlogin.c
fsf/trunk/libc/posix/getlogin_r.c
fsf/trunk/libc/posix/setlogin.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/wordsize-64/glob64.c
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/debug/Makefile
fsf/trunk/libc/debug/Versions
fsf/trunk/libc/elf/dl-misc.c
fsf/trunk/libc/io/poll.c
fsf/trunk/libc/login/Makefile
fsf/trunk/libc/login/Versions
fsf/trunk/libc/math/gen-libm-test.pl
fsf/trunk/libc/math/libm-test.inc
fsf/trunk/libc/ports/ChangeLog.arm
fsf/trunk/libc/ports/sysdeps/arm/dl-tlsdesc.S
fsf/trunk/libc/posix/Makefile
fsf/trunk/libc/posix/Versions
fsf/trunk/libc/resource/setrlimit.c
fsf/trunk/libc/sysdeps/generic/not-cancel.h
fsf/trunk/libc/sysdeps/posix/truncate.c
fsf/trunk/libc/sysdeps/powerpc/fpu/e_hypot.c
fsf/trunk/libc/sysdeps/powerpc/fpu/e_hypotf.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Tue May 7 00:02:35 2013
@@ -1,3 +1,72 @@
+2013-05-06 Roland McGrath <roland@xxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/wordsize-64/glob64.c: Moved to ...
+ * sysdeps/wordsize-64/glob64.c: ... here.
+
+ * sysdeps/generic/not-cancel.h (NO_CANCELLATION): New macro.
+ (pause_not_cancel, nanosleep_not_cancel, sigsuspend_not_cancel):
+ New macros.
+
+ * debug/getlogin_r_chk.c: Moved to ...
+ * login/getlogin_r_chk.c: ... here.
+ * debug/Makefile (routines): Move getlogin_r_chk to ...
+ * login/Makefile (routines): ... here.
+ * debug/Versions (libc: GLIBC_2.4): Move getlogin_r_chk to ...
+ * login/Versions (libc: GLIBC_2.4): ... here.
+
+ * io/poll.c (__poll): Renamed from poll.
+ Add libc_hidden_def.
+ (poll): Define as weak alias.
+
+ * debug/ptsname_r_chk.c: Moved to ...
+ * login/ptsname_r_chk.c: ... here.
+ * debug/Makefile (routines): Move ptsname_r_chk to ...
+ * login/Makefile (routines): ... here.
+ * debug/Versions (libc: GLIBC_2.4): Move __ptsname_r_chk to ...
+ * login/Versions (libc: GLIBC_2.4): ... here.
+
+ * posix/getlogin.c: Moved to ...
+ * login/getlogin.c: ... here.
+ * posix/getlogin_r.c: Moved to ...
+ * login/getlogin_r.c: ... here.
+ * posix/getlogin_r.c: Moved to ...
+ * login/getlogin_r.c: ... here.
+ * posix/Makefile (routines): Move getlogin, getlogin_r, setlogin to ...
+ * login/Makefile (routines): ... here.
+ * posix/Versions (libc: GLIBC_2.0): Move setlogin to ...
+ * login/Versions (libc: GLIBC_2.0): ... here.
+
+ * resource/setrlimit.c (__setrlimit): Renamed from setrlimit.
+ (setrlimit): Define as weak alias.
+
+ * sysdeps/posix/truncate.c (__truncate): Renamed from truncate.
+ Call __ names for open, ftruncate, and close.
+ For LENGTH==0 case, just use O_TRUNC rather than calling ftruncate.
+ (truncate): Define as weak alias.
+
+2013-05-06 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * math/gen-libm-test.pl (parse_args): Initialize x before each
+ test of frexp, modf and remquo.
+
+ * math/libm-test.inc (gamma_test): Consistently use TEST_f_f1 to
+ test signgam value.
+
+2013-05-06 Adhemerval Zanella <azanella@xxxxxxxxxxxxxxxxxx>
+
+ [BZ #15418]
+ [BZ #15419]
+ * sysdeps/powerpc/fpu/e_hypot.c: Fix spurious FP exception generated by
+ internal tests.
+ * sysdeps/powerpc/fpu/e_hypotf.c: Likewise.
+
+2013-05-06 Roland McGrath <roland@xxxxxxxxxxxxx>
+
+ * elf/dl-writev.h: New file.
+ * elf/dl-misc.c: Include it.
+ (_dl_debug_vdprintf): Call _dl_writev instead of __writev et al.
+ * sysdeps/unix/sysv/linux/dl-writev.h: New file.
+
2013-05-04 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* math/libm-test.inc (noXFails): Remove variable.
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Tue May 7 00:02:35 2013
@@ -16,7 +16,7 @@
15084, 15085, 15086, 15160, 15214, 15221, 15232, 15234, 15283, 15285,
15287, 15304, 15305, 15307, 15309, 15327, 15330, 15335, 15336, 15337,
15342, 15346, 15361, 15366, 15380, 15394, 15405, 15406, 15409, 15416,
- 15423.
+ 15418, 15419, 15423.
* CVE-2013-0242 Buffer overrun in regexp matcher has been fixed (Bugzilla
#15078).
Modified: fsf/trunk/libc/debug/Makefile
==============================================================================
--- fsf/trunk/libc/debug/Makefile (original)
+++ fsf/trunk/libc/debug/Makefile Tue May 7 00:02:35 2013
@@ -22,6 +22,9 @@
headers := execinfo.h
+# Note that ptsname_r_chk and getlogin_r are not here, but in
+# login/Makefile instead. If that subdir is omitted from the
+# build, its _FORTIFY_SOURCE support will be too.
routines = backtrace backtracesyms backtracesymsfd noophooks \
memcpy_chk memmove_chk mempcpy_chk memset_chk stpcpy_chk \
strcat_chk strcpy_chk strncat_chk strncpy_chk stpncpy_chk \
@@ -30,13 +33,13 @@
gets_chk chk_fail readonly-area fgets_chk fgets_u_chk \
read_chk pread_chk pread64_chk recv_chk recvfrom_chk \
readlink_chk readlinkat_chk getwd_chk getcwd_chk \
- realpath_chk ptsname_r_chk fread_chk fread_u_chk \
+ realpath_chk fread_chk fread_u_chk \
wctomb_chk wcscpy_chk wmemcpy_chk wmemmove_chk wmempcpy_chk \
wcpcpy_chk wcsncpy_chk wcscat_chk wcsncat_chk wmemset_chk \
wcpncpy_chk \
swprintf_chk vswprintf_chk wprintf_chk fwprintf_chk \
vwprintf_chk vfwprintf_chk fgetws_chk fgetws_u_chk \
- confstr_chk getgroups_chk ttyname_r_chk getlogin_r_chk \
+ confstr_chk getgroups_chk ttyname_r_chk \
gethostname_chk getdomainname_chk wcrtomb_chk mbsnrtowcs_chk \
wcsnrtombs_chk mbsrtowcs_chk wcsrtombs_chk mbstowcs_chk \
wcstombs_chk asprintf_chk vasprintf_chk dprintf_chk \
Modified: fsf/trunk/libc/debug/Versions
==============================================================================
--- fsf/trunk/libc/debug/Versions (original)
+++ fsf/trunk/libc/debug/Versions Tue May 7 00:02:35 2013
@@ -23,13 +23,13 @@
__read_chk; __pread_chk; __pread64_chk;
__readlink_chk; __getcwd_chk; __getwd_chk;
__recv_chk; __recvfrom_chk;
- __realpath_chk; __ptsname_r_chk; __wctomb_chk;
+ __realpath_chk; __wctomb_chk;
__stpncpy_chk;
__wcscpy_chk; __wmemcpy_chk; __wmemmove_chk; __wmempcpy_chk; __wcpcpy_chk;
__wcsncpy_chk; __wcscat_chk; __wcsncat_chk; __wmemset_chk; __wcpncpy_chk;
__swprintf_chk; __vswprintf_chk; __wprintf_chk; __fwprintf_chk;
__vwprintf_chk; __vfwprintf_chk; __fgetws_chk; __fgetws_unlocked_chk;
- __confstr_chk; __getgroups_chk; __ttyname_r_chk; __getlogin_r_chk;
+ __confstr_chk; __getgroups_chk; __ttyname_r_chk;
__gethostname_chk; __getdomainname_chk; __wcrtomb_chk; __mbsnrtowcs_chk;
__wcsnrtombs_chk; __mbsrtowcs_chk; __wcsrtombs_chk; __mbstowcs_chk;
__wcstombs_chk;
Removed: fsf/trunk/libc/debug/getlogin_r_chk.c
==============================================================================
--- fsf/trunk/libc/debug/getlogin_r_chk.c (original)
+++ fsf/trunk/libc/debug/getlogin_r_chk.c (removed)
@@ -1,28 +1,0 @@
-/* Copyright (C) 2005-2013 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 <unistd.h>
-
-
-int
-__getlogin_r_chk (char *buf, size_t buflen, size_t nreal)
-{
- if (buflen > nreal)
- __chk_fail ();
-
- return getlogin_r (buf, buflen);
-}
Removed: fsf/trunk/libc/debug/ptsname_r_chk.c
==============================================================================
--- fsf/trunk/libc/debug/ptsname_r_chk.c (original)
+++ fsf/trunk/libc/debug/ptsname_r_chk.c (removed)
@@ -1,28 +1,0 @@
-/* Copyright (C) 2005-2013 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 <stdlib.h>
-
-
-int
-__ptsname_r_chk (int fd, char *buf, size_t buflen, size_t nreal)
-{
- if (buflen > nreal)
- __chk_fail ();
-
- return __ptsname_r (fd, buf, buflen);
-}
Modified: fsf/trunk/libc/elf/dl-misc.c
==============================================================================
--- fsf/trunk/libc/elf/dl-misc.c (original)
+++ fsf/trunk/libc/elf/dl-misc.c Tue May 7 00:02:35 2013
@@ -31,7 +31,8 @@
#include <sys/uio.h>
#include <sysdep.h>
#include <_itoa.h>
-#include <bits/libc-lock.h>
+#include <dl-writev.h>
+
/* Read the whole contents of FILE into new mmap'd space with given
protections. *SIZEP gets the size of the file. On error MAP_FAILED
@@ -239,25 +240,7 @@
}
/* Finally write the result. */
-#ifdef HAVE_INLINED_SYSCALLS
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (writev, err, 3, fd, &iov, niov);
-#elif RTLD_PRIVATE_ERRNO
- /* We have to take this lock just to be sure we don't clobber the private
- errno when it's being used by another thread that cares about it.
- Yet we must be sure not to try calling the lock functions before
- the thread library is fully initialized. */
- if (__builtin_expect (INTUSE (_dl_starting_up), 0))
- __writev (fd, iov, niov);
- else
- {
- __rtld_lock_lock_recursive (GL(dl_load_lock));
- __writev (fd, iov, niov);
- __rtld_lock_unlock_recursive (GL(dl_load_lock));
- }
-#else
- __writev (fd, iov, niov);
-#endif
+ _dl_writev (fd, iov, niov);
}
Added: fsf/trunk/libc/elf/dl-writev.h
==============================================================================
--- fsf/trunk/libc/elf/dl-writev.h (added)
+++ fsf/trunk/libc/elf/dl-writev.h Tue May 7 00:02:35 2013
@@ -1,0 +1,56 @@
+/* Message-writing for the dynamic linker. Generic version.
+ Copyright (C) 2013 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 <sys/uio.h>
+#include <ldsodefs.h>
+#include <bits/libc-lock.h>
+
+/* This is used from only one place: dl-misc.c:_dl_debug_vdprintf.
+ Hence it's in a header with the expectation it will be inlined.
+
+ This is writev, but with a constraint added and others loosened:
+
+ 1. Under RTLD_PRIVATE_ERRNO, it must not clobber the private errno
+ when another thread holds the dl_load_lock.
+ 2. It is not obliged to detect and report errors at all.
+ 3. It's not really obliged to deliver a single atomic write
+ (though it may be preferable). */
+
+static inline void
+_dl_writev (int fd, const struct iovec *iov, size_t niov)
+{
+ /* Note that if __writev is an implementation that calls malloc,
+ this will cause linking problems building the dynamic linker. */
+
+#if RTLD_PRIVATE_ERRNO
+ /* We have to take this lock just to be sure we don't clobber the private
+ errno when it's being used by another thread that cares about it.
+ Yet we must be sure not to try calling the lock functions before
+ the thread library is fully initialized. */
+ if (__builtin_expect (INTUSE (_dl_starting_up), 0))
+ __writev (fd, iov, niov);
+ else
+ {
+ __rtld_lock_lock_recursive (GL(dl_load_lock));
+ __writev (fd, iov, niov);
+ __rtld_lock_unlock_recursive (GL(dl_load_lock));
+ }
+#else
+ __writev (fd, iov, niov);
+#endif
+}
Modified: fsf/trunk/libc/io/poll.c
==============================================================================
--- fsf/trunk/libc/io/poll.c (original)
+++ fsf/trunk/libc/io/poll.c Tue May 7 00:02:35 2013
@@ -1,4 +1,5 @@
-/* Copyright (C) 1994-2013 Free Software Foundation, Inc.
+/* Poll (or wait) for file descriptor I/O availability. Stub version.
+ Copyright (C) 1994-2013 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
@@ -25,13 +26,12 @@
or -1 for errors. */
int
-poll (fds, nfds, timeout)
- struct pollfd *fds;
- nfds_t nfds;
- int timeout;
+__poll (struct pollfd *fds, nfds_t nfds, int timeout)
{
__set_errno (ENOSYS);
return -1;
}
+libc_hidden_def (__poll)
+weak_alias (__poll, poll)
stub_warning (poll)
Modified: fsf/trunk/libc/login/Makefile
==============================================================================
--- fsf/trunk/libc/login/Makefile (original)
+++ fsf/trunk/libc/login/Makefile Tue May 7 00:02:35 2013
@@ -23,8 +23,10 @@
headers := utmp.h bits/utmp.h lastlog.h pty.h
-routines := getutent getutent_r getutid getutline getutid_r getutline_r \
- utmp_file utmpname updwtmp getpt grantpt unlockpt ptsname
+routines := getlogin getlogin_r setlogin getlogin_r_chk \
+ getutent getutent_r getutid getutline getutid_r getutline_r \
+ utmp_file utmpname updwtmp getpt grantpt unlockpt ptsname \
+ ptsname_r_chk
CFLAGS-grantpt.c = -DLIBEXECDIR='"$(libexecdir)"'
Modified: fsf/trunk/libc/login/Versions
==============================================================================
--- fsf/trunk/libc/login/Versions (original)
+++ fsf/trunk/libc/login/Versions Tue May 7 00:02:35 2013
@@ -11,6 +11,7 @@
pututline;
# s*
+ setlogin;
setutent;
# u*
@@ -40,6 +41,10 @@
# p*
posix_openpt;
}
+ GLIBC_2.4 {
+ __getlogin_r_chk;
+ __ptsname_r_chk;
+ }
}
libutil {
Added: fsf/trunk/libc/login/getlogin.c
==============================================================================
--- fsf/trunk/libc/login/getlogin.c (added)
+++ fsf/trunk/libc/login/getlogin.c Tue May 7 00:02:35 2013
@@ -1,0 +1,31 @@
+/* Copyright (C) 1991-2013 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 <stddef.h>
+#include <errno.h>
+#include <unistd.h>
+
+/* Return the login name of the user, or NULL if it can't be determined.
+ The returned pointer, if not NULL, is good only until the next call. */
+char *
+getlogin (void)
+{
+ __set_errno (ENOSYS);
+ return NULL;
+}
+
+stub_warning (getlogin)
Added: fsf/trunk/libc/login/getlogin_r.c
==============================================================================
--- fsf/trunk/libc/login/getlogin_r.c (added)
+++ fsf/trunk/libc/login/getlogin_r.c Tue May 7 00:02:35 2013
@@ -1,0 +1,35 @@
+/* Reentrant function to return the current login name. Stub version.
+ Copyright (C) 1996-2013 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 <unistd.h>
+
+/* Return at most NAME_LEN characters of the login name of the user in NAME.
+ If it cannot be determined or some other error occurred, return the error
+ code. Otherwise return 0. */
+int
+getlogin_r (name, name_len)
+ char *name;
+ size_t name_len;
+{
+ __set_errno (ENOSYS);
+ return errno;
+}
+libc_hidden_def (getlogin_r)
+
+stub_warning (getlogin_r)
Added: fsf/trunk/libc/login/getlogin_r_chk.c
==============================================================================
--- fsf/trunk/libc/login/getlogin_r_chk.c (added)
+++ fsf/trunk/libc/login/getlogin_r_chk.c Tue May 7 00:02:35 2013
@@ -1,0 +1,28 @@
+/* Copyright (C) 2005-2013 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 <unistd.h>
+
+
+int
+__getlogin_r_chk (char *buf, size_t buflen, size_t nreal)
+{
+ if (buflen > nreal)
+ __chk_fail ();
+
+ return getlogin_r (buf, buflen);
+}
Added: fsf/trunk/libc/login/ptsname_r_chk.c
==============================================================================
--- fsf/trunk/libc/login/ptsname_r_chk.c (added)
+++ fsf/trunk/libc/login/ptsname_r_chk.c Tue May 7 00:02:35 2013
@@ -1,0 +1,28 @@
+/* Copyright (C) 2005-2013 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 <stdlib.h>
+
+
+int
+__ptsname_r_chk (int fd, char *buf, size_t buflen, size_t nreal)
+{
+ if (buflen > nreal)
+ __chk_fail ();
+
+ return __ptsname_r (fd, buf, buflen);
+}
Added: fsf/trunk/libc/login/setlogin.c
==============================================================================
--- fsf/trunk/libc/login/setlogin.c (added)
+++ fsf/trunk/libc/login/setlogin.c Tue May 7 00:02:35 2013
@@ -1,0 +1,30 @@
+/* Copyright (C) 1991-2013 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 <unistd.h>
+
+/* Set the login name returned by `getlogin'. */
+int
+setlogin (name)
+ const char *name;
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+stub_warning (setlogin)
Modified: fsf/trunk/libc/math/gen-libm-test.pl
==============================================================================
--- fsf/trunk/libc/math/gen-libm-test.pl (original)
+++ fsf/trunk/libc/math/gen-libm-test.pl Tue May 7 00:02:35 2013
@@ -366,6 +366,7 @@
# special treatment for some functions
if ($args[0] eq 'frexp') {
+ $pre = " x = 123456789;\n";
if (defined $special[0] && $special[0] ne "IGNORE") {
my ($str) = "$call sets x to $special[0]";
$post = " check_int (\"$str\", x, $special[0]";
@@ -379,12 +380,14 @@
$post .= &new_test ($str, undef);
}
} elsif ($args[0] eq 'modf') {
+ $pre = " x = 123.456789;\n";
if (defined $special[0] && $special[0] ne "IGNORE") {
my ($str) = "$call sets x to $special[0]";
$post = " check_float (\"$str\", x, $special[0]";
$post .= &new_test ($str, undef);
}
} elsif ($args[0] eq 'remquo') {
+ $pre = " x = 123456789;\n";
if (defined $special[0] && $special[0] ne "IGNORE") {
my ($str) = "$call sets x to $special[0]";
$post = " check_int (\"$str\", x, $special[0]";
Modified: fsf/trunk/libc/math/libm-test.inc
==============================================================================
--- fsf/trunk/libc/math/libm-test.inc (original)
+++ fsf/trunk/libc/math/libm-test.inc Tue May 7 00:02:35 2013
@@ -9103,11 +9103,11 @@
START (gamma);
- TEST_f_f (gamma, plus_infty, plus_infty);
- TEST_f_f (gamma, 0, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
- TEST_f_f (gamma, -3, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
- TEST_f_f (gamma, minus_infty, plus_infty);
- TEST_f_f (gamma, qnan_value, qnan_value);
+ TEST_f_f1 (gamma, plus_infty, plus_infty, 1);
+ TEST_f_f1 (gamma, 0, plus_infty, 1, DIVIDE_BY_ZERO_EXCEPTION);
+ TEST_f_f1 (gamma, -3, plus_infty, IGNORE, DIVIDE_BY_ZERO_EXCEPTION);
+ TEST_f_f1 (gamma, minus_infty, plus_infty, IGNORE);
+ TEST_f_f1 (gamma, qnan_value, qnan_value, IGNORE);
TEST_f_f1 (gamma, 1, 0, 1);
TEST_f_f1 (gamma, 3, M_LN2l, 1);
@@ -9159,6 +9159,7 @@
TEST_ff_f (hypot, 0.75L, 1.25L, 1.45773797371132511771853821938639577L);
TEST_ff_f (hypot, 1.0L, 0x1p-61L, 1.0L);
+ TEST_ff_f (hypot, 0x1p+0L, 0x1.fp-129L, 0x1p+0L);
#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
TEST_ff_f (hypot, 0x1.23456789abcdef0123456789ab8p-500L, 0x1.23456789abcdef0123456789ab8p-500L, 4.9155782399407039128612180934736799735113e-151L);
#endif
@@ -9170,6 +9171,7 @@
#if !defined TEST_FLOAT && !(defined TEST_DOUBLE && defined TEST_INLINE)
TEST_ff_f (hypot, 0x3p1021L, 0x4p1021L, 0x5p1021L);
+ TEST_ff_f (hypot, 0x1p+0L, 0x0.3ep-1022L, 0x1p+0L);
#endif
#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384 && !defined TEST_INLINE
Modified: fsf/trunk/libc/ports/ChangeLog.arm
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.arm (original)
+++ fsf/trunk/libc/ports/ChangeLog.arm Tue May 7 00:02:35 2013
@@ -1,3 +1,7 @@
+2013-05-06 Roland McGrath <roland@xxxxxxxxxxxxx>
+
+ * sysdeps/arm/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Add missing sfi_breg.
+
2013-04-19 Roland McGrath <roland@xxxxxxxxxxxxx>
* sysdeps/arm/sysdep.h
Modified: fsf/trunk/libc/ports/sysdeps/arm/dl-tlsdesc.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/dl-tlsdesc.S (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/dl-tlsdesc.S Tue May 7 00:02:35 2013
@@ -115,6 +115,7 @@
#endif
cmn r2, #1
ittt ne
+ sfi_breg r1, \
ldrne r3, [r1, #4]
addne r3, r2, r3
rsbne r0, r4, r3
Modified: fsf/trunk/libc/posix/Makefile
==============================================================================
--- fsf/trunk/libc/posix/Makefile (original)
+++ fsf/trunk/libc/posix/Makefile Tue May 7 00:02:35 2013
@@ -40,7 +40,6 @@
getuid geteuid getgid getegid getgroups setuid setgid group_member \
getpgid setpgid getpgrp bsd-getpgrp setpgrp getsid setsid \
getresuid getresgid setresuid setresgid \
- getlogin getlogin_r setlogin \
pathconf sysconf fpathconf \
glob glob64 fnmatch regex \
confstr \
Modified: fsf/trunk/libc/posix/Versions
==============================================================================
--- fsf/trunk/libc/posix/Versions (original)
+++ fsf/trunk/libc/posix/Versions Tue May 7 00:02:35 2013
@@ -52,7 +52,7 @@
# s*
sched_get_priority_max; sched_get_priority_min; sched_getparam;
sched_getscheduler; sched_rr_get_interval; sched_setparam;
- sched_setscheduler; sched_yield; setegid; seteuid; setgid; setlogin;
+ sched_setscheduler; sched_yield; setegid; seteuid; setgid;
setpgid; setpgrp; setsid; setuid; sleep; sysconf;
# t*
Removed: fsf/trunk/libc/posix/getlogin.c
==============================================================================
--- fsf/trunk/libc/posix/getlogin.c (original)
+++ fsf/trunk/libc/posix/getlogin.c (removed)
@@ -1,31 +1,0 @@
-/* Copyright (C) 1991-2013 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 <stddef.h>
-#include <errno.h>
-#include <unistd.h>
-
-/* Return the login name of the user, or NULL if it can't be determined.
- The returned pointer, if not NULL, is good only until the next call. */
-char *
-getlogin (void)
-{
- __set_errno (ENOSYS);
- return NULL;
-}
-
-stub_warning (getlogin)
Removed: fsf/trunk/libc/posix/getlogin_r.c
==============================================================================
--- fsf/trunk/libc/posix/getlogin_r.c (original)
+++ fsf/trunk/libc/posix/getlogin_r.c (removed)
@@ -1,35 +1,0 @@
-/* Reentrant function to return the current login name. Stub version.
- Copyright (C) 1996-2013 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 <unistd.h>
-
-/* Return at most NAME_LEN characters of the login name of the user in NAME.
- If it cannot be determined or some other error occurred, return the error
- code. Otherwise return 0. */
-int
-getlogin_r (name, name_len)
- char *name;
- size_t name_len;
-{
- __set_errno (ENOSYS);
- return errno;
-}
-libc_hidden_def (getlogin_r)
-
-stub_warning (getlogin_r)
Removed: fsf/trunk/libc/posix/setlogin.c
==============================================================================
--- fsf/trunk/libc/posix/setlogin.c (original)
+++ fsf/trunk/libc/posix/setlogin.c (removed)
@@ -1,30 +1,0 @@
-/* Copyright (C) 1991-2013 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 <unistd.h>
-
-/* Set the login name returned by `getlogin'. */
-int
-setlogin (name)
- const char *name;
-{
- __set_errno (ENOSYS);
- return -1;
-}
-
-stub_warning (setlogin)
Modified: fsf/trunk/libc/resource/setrlimit.c
==============================================================================
--- fsf/trunk/libc/resource/setrlimit.c (original)
+++ fsf/trunk/libc/resource/setrlimit.c Tue May 7 00:02:35 2013
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991-2013 Free Software Foundation, Inc.
+/* Set process resource limits. Stub version.
+ Copyright (C) 1991-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,13 +24,11 @@
Only the super-user can increase hard limits.
Return 0 if successful, -1 if not (and sets errno). */
int
-setrlimit (resource, rlimits)
- enum __rlimit_resource resource;
- const struct rlimit *rlimits;
+__setrlimit (enum __rlimit_resource resource, const struct rlimit *rlimits)
{
__set_errno (ENOSYS);
return -1;
}
-
+weak_alias (__setrlimit, setrlimit)
stub_warning (setrlimit)
Modified: fsf/trunk/libc/sysdeps/generic/not-cancel.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/not-cancel.h (original)
+++ fsf/trunk/libc/sysdeps/generic/not-cancel.h Tue May 7 00:02:35 2013
@@ -44,3 +44,11 @@
__fcntl (fd, cmd, val)
# define waitpid_not_cancel(pid, stat_loc, options) \
__waitpid (pid, stat_loc, options)
+#define pause_not_cancel() \
+ __pause ()
+#define nanosleep_not_cancel(requested_time, remaining) \
+ __nanosleep (requested_time, remaining)
+#define sigsuspend_not_cancel(set) \
+ __sigsuspend (set)
+
+#define NO_CANCELLATION 1
Modified: fsf/trunk/libc/sysdeps/posix/truncate.c
==============================================================================
--- fsf/trunk/libc/sysdeps/posix/truncate.c (original)
+++ fsf/trunk/libc/sysdeps/posix/truncate.c Tue May 7 00:02:35 2013
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995-2013 Free Software Foundation, Inc.
+/* Truncate a file given by name. Generic POSIX.1 version.
+ Copyright (C) 1995-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,20 +23,22 @@
/* Truncate PATH to LENGTH bytes. */
int
-truncate (path, length)
- const char *path;
- off_t length;
+__truncate (const char *path, off_t length)
{
int fd, ret, save;
- fd = open (path, O_WRONLY);
+ fd = __open (path, O_WRONLY | (length == 0 ? O_TRUNC : 0));
if (fd < 0)
return -1;
- ret = ftruncate (fd, length);
+ if (length == 0)
+ ret = 0;
+ else
+ ret = __ftruncate (fd, length);
save = errno;
- (void) close (fd);
+ (void) __close (fd);
if (ret < 0)
__set_errno (save);
return ret;
}
+weak_alias (__truncate, truncate)
Modified: fsf/trunk/libc/sysdeps/powerpc/fpu/e_hypot.c
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/fpu/e_hypot.c (original)
+++ fsf/trunk/libc/sysdeps/powerpc/fpu/e_hypot.c Tue May 7 00:02:35 2013
@@ -26,6 +26,7 @@
static const double two1022 = 4.49423283715579e+307;
static const double twoM500 = 3.054936363499605e-151;
static const double twoM600 = 2.4099198651028841e-181;
+static const double two60factor = 1.5592502418239997e+290;
static const double pdnum = 2.225073858507201e-308;
/* __ieee754_hypot(x,y)
@@ -87,9 +88,20 @@
x = y;
y = t;
}
- if (y == 0.0 || (x / y) > two60)
+ if (y == 0.0)
+ return x;
+ /* if y is higher enough, y * 2^60 might overflow. The tests if
+ y >= 1.7976931348623157e+308/2^60 (two60factor) and uses the
+ appropriate check to avoid the overflow exception generation. */
+ if (y > two60factor)
{
- return x + y;
+ if ((x / y) > two60)
+ return x + y;
+ }
+ else
+ {
+ if (x > (y * two60))
+ return x + y;
}
if (x > two500)
{
Modified: fsf/trunk/libc/sysdeps/powerpc/fpu/e_hypotf.c
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/fpu/e_hypotf.c (original)
+++ fsf/trunk/libc/sysdeps/powerpc/fpu/e_hypotf.c Tue May 7 00:02:35 2013
@@ -69,21 +69,7 @@
float
__ieee754_hypotf (float x, float y)
{
- x = fabsf (x);
- y = fabsf (y);
-
TEST_INF_NAN (x, y);
-
- if (y > x)
- {
- float t = y;
- y = x;
- x = t;
- }
- if (y == 0.0 || (x / y) > two30)
- {
- return x + y;
- }
return __ieee754_sqrt ((double) x * x + (double) y * y);
}
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-writev.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-writev.h (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-writev.h Tue May 7 00:02:35 2013
@@ -1,0 +1,38 @@
+/* Message-writing for the dynamic linker. Linux version.
+ Copyright (C) 2013 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 <sys/uio.h>
+#include <sysdep.h>
+
+/* This is used from only one place: dl-misc.c:_dl_debug_vdprintf.
+ Hence it's in a header with the expectation it will be inlined.
+
+ This is writev, but with a constraint added and others loosened:
+
+ 1. Under RTLD_PRIVATE_ERRNO, it must not clobber the private errno
+ when another thread holds the dl_load_lock.
+ 2. It is not obliged to detect and report errors at all.
+ 3. It's not really obliged to deliver a single atomic write
+ (though it may be preferable). */
+
+static inline void
+_dl_writev (int fd, const struct iovec *iov, size_t niov)
+{
+ INTERNAL_SYSCALL_DECL (err);
+ INTERNAL_SYSCALL (writev, err, 3, fd, iov, niov);
+}
Removed: fsf/trunk/libc/sysdeps/unix/sysv/linux/wordsize-64/glob64.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/wordsize-64/glob64.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/wordsize-64/glob64.c (removed)
@@ -1,1 +1,0 @@
-/* glob64 is in glob.c */
Added: fsf/trunk/libc/sysdeps/wordsize-64/glob64.c
==============================================================================
--- fsf/trunk/libc/sysdeps/wordsize-64/glob64.c (added)
+++ fsf/trunk/libc/sysdeps/wordsize-64/glob64.c Tue May 7 00:02:35 2013
@@ -1,0 +1,1 @@
+/* glob64 is in glob.c */
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits