aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-03-17Revert "Fix HAVE_RM_CTX -Wundef warnings"Will Newton
This reverts commit 9290130a8de3f30970f741c79dfe8459f798e05f.
2014-03-17Fix HAVE_RM_CTX -Wundef warningsWill Newton
ChangeLog: 2014-03-17 Will Newton <will.newton@linaro.org> * sysdeps/generic/math_private.h: Check whether HAVE_RM_CTX is defined with #ifdef rather than #if.
2014-03-17Fix __STRICT_ANSI__ -Wundef warningsWill Newton
ChangeLog: 2014-03-17 Will Newton <will.newton@linaro.org> * argp/argp-fmtstream.h: Check whether __STRICT_ANSI__ is defined with #ifdef rather than #if. * argp/argp.h: Likewise.
2014-03-17Fix _IO_JUMPS_OFFSET -Wundef warningsWill Newton
ChangeLog: 2014-03-17 Will Newton <will.newton@linaro.org> * libio/genops.c: Check whether _IO_JUMPS_OFFSET is defined with #ifdef rather than #if. * libio/libioP.h: Likewise. * stdio-common/vfprintf.c: Likewise.
2014-03-17Fix HP_SMALL_TIMING_AVAIL -Wundef warningsWill Newton
ChangeLog: 2014-03-17 Will Newton <will.newton@linaro.org> * sysdeps/generic/ldsodefs.h: Check whether HP_SMALL_TIMING_AVAIL is defined with #ifdef rather than #if.
2014-03-17Fix __PTHREAD_MUTEX_HAVE_ELISION -Wundef warningWill Newton
ChangeLog: 2014-03-17 Will Newton <will.newton@linaro.org> * nptl/sysdeps/pthread/pthread.h: Check __PTHREAD_MUTEX_HAVE_ELISION is defined before testing its value.
2014-03-17Change offset in fdopen only if setting O_APPENDSiddhesh Poyarekar
fdopen should only be allowed to change the offset in the file it attaches to if it is setting O_APPEND. If O_APPEND is already set, it should not change the state of the handle.
2014-03-17Fix offset caching for streams and use it for ftell (BZ #16680)Siddhesh Poyarekar
The ftell implementation was made conservative to ensure that incorrectly cached offsets never affect it. However, this causes problems for append mode when a file stream is rewound. Additionally, the 'clever' trick of using stat to get position for append mode files caused more problems than it solved and broke old behavior. I have described the various problems that it caused and then finally the solution. For a and a+ mode files, rewinding the stream should result in ftell returning 0 as the offset, but the stat() trick caused it to (incorrectly) always return the end of file. Now I couldn't find anything in POSIX that specifies the stream position after rewind() for a file opened in 'a' mode, but for 'a+' mode it should be set to 0. For 'a' mode too, it probably makes sense to keep it set to 0 in the interest of retaining old behavior. The initial file position for append mode files is implementation defined, so the implementation could either retain the current file position or move the position to the end of file. The earlier ftell implementation would move the offset to end of file for append-only mode, but retain the old offset for a+ mode. It would also cache the offset (this detail is important). My patch broke this and would set the initial position to end of file for both append modes, thus breaking old behavior. I was ignorant enough to write an incorrect test case for it too. The Change: I have now brought back the behavior of seeking to end of file for append-only streams, but with a slight difference. I don't cache the offset though, since we would want ftell to query the current file position through lseek while the stream is not active. Since the offset is moved to the end of file, we can rely on the file position reported by lseek and we don't need to resort to the stat() nonsense. Finally, the cache is always reliable, except when there are unflished writes in an append mode stream (i.e. both a and a+). In the latter case, it is safe to just do an lseek to SEEK_END. The value can be safely cached too, since the file handle is already active at this point. Incidentally, this is the only state change we affect in the file handle (apart from taking locks of course). I have also updated the test case to correct my impression of the initial file position for a+ streams to the initial behavior. I have verified that this does not break any existing tests in the testsuite and also passes with the new tests.
2014-03-17Fix up return codes for tests in tst-ftell-active-handlerSiddhesh Poyarekar
The test functions used a variable ret to store failure codes for individual tests, but the variable was incorrectly used to record other failure codes too, resulting in overwriting of the tests status. This is now fixed by making sure that the ret variable is used only for recording test failures. * libio/tst-ftell-active-handler.c (do_ftell_test): Don't mix up test status with function return status. (do_write_test): Likewise. (do_append_test): Likewise.
2014-03-17Get rid of __LT_SPINLOCK_INITSiddhesh Poyarekar
We got rid of LinuxThreads in 2005, but we didn't remove __LT_SPINLOCK_INIT back then. Do it now. * nptl/sysdeps/pthread/bits/libc-lockP.h [defined NOT_IN_libc && !defined IS_IN_libpthread && __LT_SPINNOCK_INIT != 0]: Remove.
2014-03-17Add libm-test support for per-rounding-mode manually specified results.Joseph Myers
This patch continues the libm-test move towards automatic testing of all test inputs in all rounding modes by adding gen-libm-test.pl support for tests specifying results in each rounding mode manually. Previously a TEST_* line could specify arguments and results, or arguments, results and flags. Now there is the option of (arguments, results-rd, flags-rd, results-rn, flags-rn, results-rz, flags-rz, results-ru, flags-ru). This is used to replace the separate arrays of results in each rounding mode for lrint, llrint and rint. (In the case of rint, some tests were only in rint_test_data and needed to have expectations for non-default rounding modes added, which I did manually. In various cases there were slight differences in things such as the ordering of tests in the arrays for each mode.) Tested x86_64 and x86. * math/gen-libm-test.pl (parse_args): Handle results specified for each rounding mode separately. * math/libm-test.inc (lrint_test_data): Merge in per-rounding-mode tests and results from lrint_tonearest_test_data, lrint_towardzero_test_data, lrint_downward_test_data and lrint_upward_test_data. (lrint_test): Use ALL_RM_TEST. (lrint_tonearest_test_data): Remove. (lrint_test_tonearest): Likewise. (lrint_towardzero_test_data): Likewise. (lrint_test_towardzero): Likewise. (lrint_downward_test_data): Likewise. (lrint_test_downward): Likewise. (lrint_upward_test_data): Likewise. (lrint_test_upward): Likewise. (llrint_test_data): Merge in per-rounding-mode tests and results from llrint_tonearest_test_data, llrint_towardzero_test_data, llrint_downward_test_data and llrint_upward_test_data. (llrint_test): Use ALL_RM_TEST. (llrint_tonearest_test_data): Remove. (llrint_test_tonearest): Likewise. (llrint_towardzero_test_data): Likewise. (llrint_test_towardzero): Likewise. (llrint_downward_test_data): Likewise. (llrint_test_downward): Likewise. (llrint_upward_test_data): Likewise. (llrint_test_upward): Likewise. (rint_test_data): Merge in per-rounding-mode tests and results from rint_tonearest_test_data, rint_towardzero_test_data, rint_downward_test_data and rint_upward_test_data. Add per-rounding-mode results for tests not in those arrays. (rint_test): Use ALL_RM_TEST. (rint_tonearest_test_data): Remove. (rint_test_tonearest): Likewise. (rint_towardzero_test_data): Likewise. (rint_test_towardzero): Likewise. (rint_downward_test_data): Likewise. (rint_test_downward): Likewise. (rint_upward_test_data): Likewise. (rint_test_upward): Likewise. (main): Don't call removed functions.
2014-03-14Remove "Compiled on ..." crapola from version text.Roland McGrath
2014-03-14Do not terminate default test runs on test failure.Joseph Myers
This patch is an updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00198.html> and <https://sourceware.org/ml/libc-alpha/2014-03/msg00180.html>. Normal practice for software testsuites is that rather than terminating immediately when a test fails, they continue running and report at the end on how many tests passed or failed. The principle behind the glibc testsuite stopping on failure was probably that the expected state is no failures and so any failure indicates a problem such as miscompilation. In practice, while this is fairly close to true for native testing on x86_64 and x86 (kernel bugs and race conditions can still cause intermittent failures), it's less likely to be the case on other platforms, and so people testing glibc run the testsuite with "make -k" and then examine the logs to determine whether the failures are what they expect to fail on that platform, possibly with some automation for the comparison. This patch switches the glibc testsuite to the normal convention of not stopping on failure - unless you use stop-on-test-failure=y, in which case it behaves essentially as it did before (and does not generate overall test summaries on failure). Instead, the summary tests.sum may contain tests that FAILed. At the end of the test run, any FAIL or ERROR lines from tests.sum are printed, and then it exits with error status if there were any such lines. In addition, build failures will also cause the test run to stop - this has the justification that those *do* indicate serious problems that should be promptly fixed and aren't generally hard to fix (but apart from that, avoiding the build stopping on those failures seems harder). Note that unlike the previous patches in this series, this *does* require people with automation around testing glibc to change their processes - either to start using tests.sum / xtests.sum to track failures and compare them with expectations (with or without also using "make -k" and examining "make" logs to identify build failures), or else to use stop-on-test-failure=y and ignore the new tests.sum / xtests.sum mechanism. (If all you check is the exit status from "make check", no changes are needed unless you want to avoid test runs continuing after the first failure.) Tested x86_64. * scripts/evaluate-test.sh: Handle fourth argument to determine whether test run should stop on failure. * Makeconfig (stop-on-test-failure): New variable. (evaluate-test): Pass fourth argument to evaluate-test.sh based on $(stop-on-test-failure). * Makefile (tests): Give a summary of results from testing and exit with failure status if they include an ERROR or FAIL. (xtests): Likewise. * manual/install.texi (Configuring and compiling): Mention stop-on-test-failure=y. * INSTALL: Regenerated.
2014-03-14Get rid of Versions.def source fileRoland McGrath
2014-03-14Compile with -Wundef.Roland McGrath
2014-03-14PowerPC: remove wrong roundl implementation for PowerPC64Adhemerval Zanella
The roundl assembly implementation (sysdeps/powerpc/powerpc64/fpu/s_roundl.S) returns wrong results for some inputs where first double is a exact integer and the precision is determined by second long double. Checking on implementation comments and history, I am very confident the assembly implementation was based on a version before commit 5c68d401698a58cf7da150d9cce769fa6679ba5f that fixes BZ#2423 (Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4). By just removing the implementation and make the build select sysdeps/ieee754/ldbl-128ibm/s_roundl.c instead fixes the failing math. This fixes 16707.
2014-03-14PowerPC: remove wrong nearbyintl implementation for PPC64Adhemerval Zanella
The nearbyintl assembly implementation (sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S) returns wrong results for some inputs where first double is a exact integer and the precision is determined by second long double. Checking on implementation comments and history, I am very confident the assembly implementation was based on a version before commit 5c68d401698a58cf7da150d9cce769fa6679ba5f that fixes BZ#2423 (Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4). By just removing the implementation and make the build select sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c instead fixes the failing math. Fixes BZ#16706.
2014-03-14PowerPC: remove wrong ceill implementation for PowerPC64Adhemerval Zanella
The ceill assembly implementation (sysdeps/powerpc/powerpc64/fpu/s_ceill.S) returns wrong results for some inputs where first double is a exact integer and the precision is determined by second long double. Checking on implementation comments and history, I am very confident the assembly implementation was based on a version before commit 5c68d401698a58cf7da150d9cce769fa6679ba5f that fixes BZ#2423 (Errors in long double (ldbl-128ibm) rounding functions in glibc-2.4). By just removing the implementation and make the build select sysdeps/ieee754/ldbl-128ibm/s_ceill.c instead fixes the failing math. Fixes BZ#16701.
2014-03-14Add truncl tests related to BZ#16414Adhemerval Zanella
2014-03-14Fix two stray cases using #ifdef vs #if for TLS_TCB_AT_TP.Roland McGrath
2014-03-14Check AVX-512 assembler support firstH.J. Lu
It checks AVX-512 assembler support first and sets libc_cv_cc_avx512 to $libc_cv_asm_avx512, instead of yes. GCC won't support AVX-512 if assembler doesn't support it. * sysdeps/x86_64/configure.ac: Check AVX-512 assembler support first. Disable AVX-512 GCC support if assembler doesn't support it. * sysdeps/x86_64/configure: Regenerated.
2014-03-13hppa: Add _STACK_GROWS_* cases to pthread_attr_[sg]etstack.Carlos O'Donell
This is one of a several NPTL patches to build glibc on hppa. The pthread_attr_[sg]etstack functions are defined by POSIX as taking a stackaddr that is the lowest addressable byte of the storage used for the stack. However, the internal iattr variable of the same name in NPTL is actually the final stack address as usable in the stack pointer for the machine. Therefore the NPTL implementation must add and subtract stacksize for _STACK_GROWS_DOWN architectures. HPPA is a _STACK_GROWS_UP architecture and doesn't need to add or subtract anything, the stack address *is* the lowest addressable byte of the storage. Tested on hppa-linux-gnu, with no regressions. Can't impact any other targets because of the conditionals. If nobody objects I'll check this in at the end of the week. I can't see there being any objections to this patch except that it introduces more code to maintain for an old architecture (perhaps we'll get another _S_G_U target in the future?).
2014-03-13stop supporting bash-1.xMike Frysinger
We've stopped supporting toolchain packages older than 2009, so punting bash-1.x is reasonable when bash-2 was released almost 20 years ago.
2014-03-13delete ksh checksMike Frysinger
Nothing in the tree uses ksh anymore, so punt these checks.
2014-03-13sotruss: drop ksh support and add basic POSIX shell supportMike Frysinger
This script works fine under bash as-is, so we don't need ksh anymore. Once we tweak the function style, the code even works (for the most part) under a POSIX shell. The localized strings will be prepended with a $, but it is otherwise functional.
2014-03-13manual: time: fix typo in IST exampleMike Frysinger
The current description says Tuesday when it meant to say Thursday (since that comes before Friday).
2014-03-13tst-longjmp_chk2: add comments/sanity checkMike Frysinger
If the longjmp checking code is slightly broken, this code can loop forever which isn't too helpful. Add a sanity check to keep that from happening. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-03-13Save and restore AVX-512 zmm registers to x86-64 ld.soIgor Zamyatin
AVX-512 ISA adds 512-bit zmm registers. This patch updates _dl_runtime_profile to pass zmm registers to run-time audit. It also changes _dl_x86_64_save_sse and _dl_x86_64_restore_sse to upport zmm registers, which are called when only when RTLD_PREPARE_FOREIGN_CALL is used. Its performance impact is minimum. * config.h.in (HAVE_AVX512_SUPPORT): New #undef. (HAVE_AVX512_ASM_SUPPORT): Likewise. * sysdeps/x86_64/bits/link.h (La_x86_64_zmm): New. (La_x86_64_vector): Add zmm. * sysdeps/x86_64/Makefile (tests): Add tst-audit10. (modules-names): Add tst-auditmod10a and tst-auditmod10b. ($(objpfx)tst-audit10): New target. ($(objpfx)tst-audit10.out): Likewise. (tst-audit10-ENV): New. (AVX512-CFLAGS): Likewise. (CFLAGS-tst-audit10.c): Likewise. (CFLAGS-tst-auditmod10a.c): Likewise. (CFLAGS-tst-auditmod10b.c): Likewise. * sysdeps/x86_64/configure.ac: Set config-cflags-avx512, HAVE_AVX512_SUPPORT and HAVE_AVX512_ASM_SUPPORT. * sysdeps/x86_64/configure: Regenerated. * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Add AVX-512 zmm register support. (_dl_x86_64_save_sse): Likewise. (_dl_x86_64_restore_sse): Likewise. * sysdeps/x86_64/dl-trampoline.h: Updated to support different size vector registers. * sysdeps/x86_64/link-defines.sym (YMM_SIZE): New. (ZMM_SIZE): Likewise. * sysdeps/x86_64/tst-audit10.c: New file. * sysdeps/x86_64/tst-auditmod10a.c: Likewise. * sysdeps/x86_64/tst-auditmod10b.c: Likewise.
2014-03-13Use __ehdr_start, when available, for rtld to get its own headers.Roland McGrath
2014-03-13ChangeLog format fix.Roland McGrath
2014-03-13Add missing elf/tst-pie2.c -- should have been inPaul Pluzhnikov
commit 798212a01311491d5e14fcda687460b75f8ca286
2014-03-13Regenerate INSTALL.Joseph Myers
2014-03-13manual/setjmp.texi: Improve clarity of Sys V context docWill Newton
ChangeLog: 2014-03-13 Will Newton <will.newton@linaro.org> * manual/setjmp.texi (System V contexts): Improve clarity and grammar of documentation.
2014-03-122014-03-12 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov
[BZ #16381] * elf/Makefile (tests): Add tst-pie2. (tests-pie): Add tst-pie2. * elf/tst-pie2.c: New file. * elf/dl-load.c (_dl_map_object_from_fd): Assert correct l_type for ET_EXEC. * elf/rtld.c (map_doit): Load executable as lt_executable. (dl_main): Likewise.
2014-03-12Fix __ASSUME_PSELECT for MicroBlaze (bug 16642).Joseph Myers
Reviewing (for all architectures, with a baseline kernel version of 2.6.32) the kernel support for features for which __ASSUME_* macros would be affected by a move to 2.6.32 as minimum kernel version showed up that __ASSUME_PSELECT was wrongly defined for MicroBlaze, despite the corresponding syscall table entry not being wired up in the MicroBlaze kernel. This patch makes the MicroBlaze kernel-features.h undefine __ASSUME_PSELECT. I'd also encourage wiring it up in the kernel (so you can then make this #undef conditional, and eventually obsolete once a recent-enough kernel is required). I suspect it wasn't wired up because of the mistaken comment in asm/unistd.h "obsolete -> sys_pselect7" (there is no such syscall as pselect7). [BZ #16642] * sysdeps/unix/sysv/linux/microblaze/kernel-features.h (__ASSUME_PSELECT): Undefine.
2014-03-12PowerPC: Fix bzero definition for static libc for PPC32Adhemerval Zanella
This patch fixes an issue for powerpc32-fpu static build which fails with an 'bzero' undefined reference. This patch adds bzero ifunc selector for static builds and fixes the '__bzero_ppc' reference to default memset symbol (since static memset build does not provide ifunc selector). Fixes BZ#16689.
2014-03-12Provide correct buffer length to netgroup queries in nscd (BZ #16695)Siddhesh Poyarekar
The buffer to query netgroup entries is allocated sufficient space for the netgroup entries and the key to be appended at the end, but it sends in an incorrect available length to the NSS netgroup query functions, resulting in overflow of the buffer in some special cases. The fix here is to factor in the key length when sending the available buffer and buffer length to the query functions.
2014-03-12PowerPC: Fix strspn for static buildAdhemerval Zanella
This patch makes the strspn ifunc selector build for static builds.
2014-03-11Fix MIPS libc_feresetround*_ctx to preserve exceptions.Joseph Myers
Testing on mips64 showed missing underflow exceptions (from exp, for example) in non-default rounding modes, caused by libc_feresetround*_ctx wrongly restoring a saved environment without preserving exceptions, when that's only valid for the _noex variants. (I don't know why Steve didn't see this in his testing.) This patch fixes this by using libc_feupdateenv_mips_ctx for the relevant macros and removing the problem definitions. The problem definitions aren't suitable for the _noex macros either because they only discard exceptions in non-default rounding modes, and while for some uses of *_noex/*_NOEX it doesn't matter whether exceptions are discarded, dbl-64/e_remainder.c requires SET_RESTORE_ROUND_NOEX to cause exceptions to be discarded. I think the accumulated set of macros / functions for optimized exception / rounding mode handling could do with a careful review by now, and possible refactoring, and at least one new feature (extracting the saved rounding mode from an environment / context variable - see dbl-64/e_sqrt.c for a case where this could be used). Tested mips64. * sysdeps/mips/math_private.h [__mips_hard_float] (libc_feresetround_ctx): Define to libc_feupdateenv_mips_ctx not libc_feresetround_mips_ctx. [__mips_hard_float] (libc_feresetroundf_ctx): Likewise. [__mips_hard_float] (libc_feresetroundl_ctx): Likewise. [__mips_hard_float] (libc_feresetround_mips_ctx): Remove.
2014-03-11Fix nextafter overflow in non-default rounding modes (bug 16677).Joseph Myers
ISO C requires the result of nextafter to be independent of the rounding mode, even when underflow or overflow occurs. This patch fixes the bug in various nextafter implementations that, having done an overflowing computation to force an overflow exception (correct), they then return the result of that computation rather than an infinity computed some other way (incorrect, when the overflowing result of arithmetic with that sign and rounding mode is finite but the correct result is infinite) - generally by falling through to existing code to return a value that in fact is correct for this case (but was computed by an integer increment and so without generating the exceptions required). Having fixed the bug, the previously deferred conversion of nextafter testing in libm-test.inc to ALL_RM_TEST is also included. Tested x86_64 and x86; also spot-checked results of nextafter tests for powerpc32 and mips64 to test the ldbl-128ibm and ldbl-128 changes. (The m68k change is untested.) [BZ #16677] * math/s_nextafter.c (__nextafter): Do not return value from overflowing computation. * sysdeps/i386/fpu/s_nextafterl.c (__nextafterl): Likewise. * sysdeps/ieee754/flt-32/s_nextafterf.c (__nextafterf): Likewise. * sysdeps/ieee754/ldbl-128/s_nextafterl.c (__nextafterl): Likewise. * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (__nextafterl): Likewise. * sysdeps/m68k/m680x0/fpu/s_nextafterl.c (__nextafterl): Likewise. * math/libm-test.inc (nextafter_test): Use ALL_RM_TEST.
2014-03-11ARM: Fix up setjmp/longjmp changes sfi_* macro use.Roland McGrath
2014-03-11PowerPC: Fix bzero definition for static libc for PPC64Adhemerval Zanella
This patch fixes an issue for powerpc64[le] static build where __bzero is definied in multiple places (memset-ppc64.o and bzero.o). It is now defined only in bzero.o and memset-ppc64.o only defined __bzero_ppc for both dynamic and static library. Fixes BZ#16683.
2014-03-11PowerPC: strspn optimization for PPC64/POWER7Vidya Ranganathan
The optimization is achieved by following techniques: > hashing of needle. > hashing avoids scanning of duplicate entries in needle across the string. > initializing the hash table with Vector instructions (VSX) by quadword access. > unrolling when scanning for character in string across hash table.
2014-03-10PowerPC: strncat optimization for PPC64Adhemerval Zanella
The optimization is achieved by following techniques: 1. Doubleword aligned memory access and compares using cmpb instruction. 2. Loop unrolling for byte load/store. 3. CPU pre-fetch to avoid cache miss.
2014-03-10Mark nscd service as forking in systemd service file (BZ #16639)Siddhesh Poyarekar
Currently the nscd service is installed in systemd as a simple service, which means that it is able to handle its own errors and does not quit. Since nscd does not fit that description, i.e. it can exit on errors like, say, failing to parse nscd.conf, it should be declared as forking instead.
2014-03-08PowerPC: Fix modf/modff optimization return signAdhemerval Zanella
This patch fix the optimized powerpc-fpu modf/modff implementation when using in non-default rounding mode where the zero sign is not as expected. It fixes the libm testsuite tests modf_downward (0) == 0.00000000000000000000e+00 modf_downward (20) == 0.00000000000000000000e+00 modf_downward (21) == 0.00000000000000000000e+00 Where the sign returned was negative.
2014-03-08Add libm-test.inc macro for all-rounding-modes testing.Joseph Myers
This patch adds support in libm-test.inc for automatically running tests of a function in all rounding modes, in the form of a macro ALL_RM_TEST to loop over all rounding modes when running tests of a function, and uses it for functions whose results should always be independent of the rounding mode. Conversion of tests of nextafter to ALL_RM_TEST was deferred because trying that conversion showed up bug 16677. (Finding such a bug of course illustrates the point of testing more systematically in all rounding modes rather than only reactively when bugs get reported in a particular function in a non-default mode.) Conversion of tests where results can depend on the rounding mode will follow once I add gen-libm-test.pl support for using different initializers for the expected results for different rounding modes (again, some conversions may need deferring until bugs are fixed, depending on how straightforward they are to XFAIL in a particular context). Some existing tests get run five times rather than four, with round-to-nearest tests both run in that as default rounding mode and also with it explicitly set with fesetround (FE_TONEAREST). This duplication doesn't seem particularly useful, so ALL_RM_TEST only runs tests four times. Tested x86_64 and x86. * math/libm-test.inc (ALL_RM_TEST): New macro. (ceil_test): Use ALL_RM_TEST. (cimag_test): Likewise. (conj_test): Likewise. (copysign_test): Likewise. (cproj_test): Likewise. (creal_test): Likewise. (fabs_test): Likewise. (floor_test): Likewise. (fmax_test): Likewise. (fmin_test): Likewise. (fmod_test): Likewise. (fpclassify_test): Likewise. (frexp_test): Likewise. (ilogb_test): Likewise. (isfinite_test): Likewise. (finite_test): Likewise. (isgreater_test): Likewise. (isgreaterequal_test): Likewise. (isinf_test): Likewise. (isless_test): Likewise. (islessequal_test): Likewise. (islessgreater_test): Likewise. (isnan_test): Likewise. (isnormal_test): Likewise. (issignaling_test): Likewise. (isunordered_test): Likewise. (logb_test): Likewise. (logb_downward_test_data): Remove. (logb_test_downward): Likewise. (lround_test): Use ALL_RM_TEST. (llround_test): Likewise. (modf_test): Likewise. (nexttoward_test): Likewise. (remainder_test): Likewise. (drem_test): Likewise. (remainder_tonearest_test_data): Likewise. (remainder_test_tonearest): Likewise. (drem_test_tonearest): Likewise. (remainder_towardzero_test_data): Likewise. (remainder_test_towardzero): Likewise. (drem_test_towardzero): Likewise. (remainder_downward_test_data): Likewise. (remainder_test_downward): Likewise. (drem_test_downward): Likewise. (remainder_upward_test_data): Likewise. (remainder_test_upward): Likewise. (drem_test_upward): Likewise. (remquo_test): Use ALL_RM_TEST. Remove comment about x. (round_test): Use ALL_RM_TEST. (signbit_test): Likewise. (trunc_test): Likewise. (significand_test): Likewise. (main): Don't call removed functions.
2014-03-07Fix POSIX namespace for <bits/siginfo.h> (bug 16674).Joseph Myers
<bits/siginfo.h> causes symbols ILL_*, FPE_*, SEGV_* BUS_*, CLD_*, POLL_* and TRAP_* to be exposed in <signal.h> (and <sys/wait.h>), even though those symbols are not in non-XSI POSIX before POSIX.1-2008 and even in POSIX.1-2008 the TRAP_* symbols are XSI-only. This patch conditions the symbols appropriately in the various <bits/siginfo.h> implementations (various <signal.h> and <sys/wait.h> conformtest issues remain for standards other than POSIX (1995/6)). Tested x86_64. [BZ #16674] * bits/siginfo.h (ILL_ILLOPC): Condition on [__USE_XOPEN_EXTENDED || __USE_XOPEN2K8]. (ILL_ILLOPN): Likewise. (ILL_ILLADR): Likewise. (ILL_ILLTRP): Likewise. (ILL_PRVOPC): Likewise. (ILL_PRVREG): Likewise. (ILL_COPROC): Likewise. (ILL_BADSTK): Likewise. (FPE_INTDIV): Likewise. (FPE_INTOVF): Likewise. (FPE_FLTDIV): Likewise. (FPE_FLTOVF): Likewise. (FPE_FLTUND): Likewise. (FPE_FLTRES): Likewise. (FPE_FLTINV): Likewise. (FPE_FLTSUB): Likewise. (SEGV_MAPERR): Likewise. (SEGV_ACCERR): Likewise. (BUS_ADRALN): Likewise. (BUS_ADRERR): Likewise. (BUS_OBJERR): Likewise. (TRAP_BRKPT): Condition on [__USE_XOPEN_EXTENDED]. (TRAP_TRACE): Likewise. (CLD_EXITED): Condition on [__USE_XOPEN_EXTENDED || __USE_XOPEN2K8]. (CLD_KILLED): Likewise. (CLD_DUMPED): Likewise. (CLD_TRAPPED): Likewise. (CLD_STOPPED): Likewise. (CLD_CONTINUED): Likewise. (POLL_IN): Likewise. (POLL_OUT): Likewise. (POLL_MSG): Likewise. (POLL_ERR): Likewise. (POLL_PRI): Likewise. (POLL_HUP): Likewise. * sysdeps/unix/sysv/linux/alpha/bits/siginfo.h (ILL_ILLOPC): Likewise. (ILL_ILLOPN): Likewise. (ILL_ILLADR): Likewise. (ILL_ILLTRP): Likewise. (ILL_PRVOPC): Likewise. (ILL_PRVREG): Likewise. (ILL_COPROC): Likewise. (ILL_BADSTK): Likewise. (FPE_INTDIV): Likewise. (FPE_INTOVF): Likewise. (FPE_FLTDIV): Likewise. (FPE_FLTOVF): Likewise. (FPE_FLTUND): Likewise. (FPE_FLTRES): Likewise. (FPE_FLTINV): Likewise. (FPE_FLTSUB): Likewise. (SEGV_MAPERR): Likewise. (SEGV_ACCERR): Likewise. (BUS_ADRALN): Likewise. (BUS_ADRERR): Likewise. (BUS_OBJERR): Likewise. (BUS_MCEERR_AR): Likewise. (BUS_MCEERR_AO): Likewise. (TRAP_BRKPT): Condition on [__USE_XOPEN_EXTENDED]. (TRAP_TRACE): Likewise. (CLD_EXITED): Condition on [__USE_XOPEN_EXTENDED || __USE_XOPEN2K8]. (CLD_KILLED): Likewise. (CLD_DUMPED): Likewise. (CLD_TRAPPED): Likewise. (CLD_STOPPED): Likewise. (CLD_CONTINUED): Likewise. (POLL_IN): Likewise. (POLL_OUT): Likewise. (POLL_MSG): Likewise. (POLL_ERR): Likewise. (POLL_PRI): Likewise. (POLL_HUP): Likewise. * sysdeps/unix/sysv/linux/bits/siginfo.h (ILL_ILLOPC): Likewise. (ILL_ILLOPN): Likewise. (ILL_ILLADR): Likewise. (ILL_ILLTRP): Likewise. (ILL_PRVOPC): Likewise. (ILL_PRVREG): Likewise. (ILL_COPROC): Likewise. (ILL_BADSTK): Likewise. (FPE_INTDIV): Likewise. (FPE_INTOVF): Likewise. (FPE_FLTDIV): Likewise. (FPE_FLTOVF): Likewise. (FPE_FLTUND): Likewise. (FPE_FLTRES): Likewise. (FPE_FLTINV): Likewise. (FPE_FLTSUB): Likewise. (SEGV_MAPERR): Likewise. (SEGV_ACCERR): Likewise. (BUS_ADRALN): Likewise. (BUS_ADRERR): Likewise. (BUS_OBJERR): Likewise. (BUS_MCEERR_AR): Likewise. (BUS_MCEERR_AO): Likewise. (TRAP_BRKPT): Condition on [__USE_XOPEN_EXTENDED]. (TRAP_TRACE): Likewise. (CLD_EXITED): Condition on [__USE_XOPEN_EXTENDED || __USE_XOPEN2K8]. (CLD_KILLED): Likewise. (CLD_DUMPED): Likewise. (CLD_TRAPPED): Likewise. (CLD_STOPPED): Likewise. (CLD_CONTINUED): Likewise. (POLL_IN): Likewise. (POLL_OUT): Likewise. (POLL_MSG): Likewise. (POLL_ERR): Likewise. (POLL_PRI): Likewise. (POLL_HUP): Likewise. * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h (ILL_ILLOPC): Likewise. (ILL_ILLOPN): Likewise. (ILL_ILLADR): Likewise. (ILL_ILLTRP): Likewise. (ILL_PRVOPC): Likewise. (ILL_PRVREG): Likewise. (ILL_COPROC): Likewise. (ILL_BADSTK): Likewise. (ILL_BADIADDR): Likewise. (ILL_BREAK): Likewise. (FPE_INTDIV): Likewise. (FPE_INTOVF): Likewise. (FPE_FLTDIV): Likewise. (FPE_FLTOVF): Likewise. (FPE_FLTUND): Likewise. (FPE_FLTRES): Likewise. (FPE_FLTINV): Likewise. (FPE_FLTSUB): Likewise. (FPE_DECOVF): Likewise. (FPE_DECDIV): Likewise. (FPE_DECERR): Likewise. (FPE_INVASC): Likewise. (FPE_INVDEC): Likewise. (SEGV_MAPERR): Likewise. (SEGV_ACCERR): Likewise. (SEGV_PSTKOVF): Likewise. (BUS_ADRALN): Likewise. (BUS_ADRERR): Likewise. (BUS_OBJERR): Likewise. (BUS_MCEERR_AR): Likewise. (BUS_MCEERR_AO): Likewise. (TRAP_BRKPT): Condition on [__USE_XOPEN_EXTENDED]. (TRAP_TRACE): Likewise. (TRAP_BRANCH): Likewise. (TRAP_HWBKPT): Likewise. (CLD_EXITED): Condition on [__USE_XOPEN_EXTENDED || __USE_XOPEN2K8]. (CLD_KILLED): Likewise. (CLD_DUMPED): Likewise. (CLD_TRAPPED): Likewise. (CLD_STOPPED): Likewise. (CLD_CONTINUED): Likewise. (POLL_IN): Likewise. (POLL_OUT): Likewise. (POLL_MSG): Likewise. (POLL_ERR): Likewise. (POLL_PRI): Likewise. (POLL_HUP): Likewise. * sysdeps/unix/sysv/linux/mips/bits/siginfo.h (ILL_ILLOPC): Likewise. (ILL_ILLOPN): Likewise. (ILL_ILLADR): Likewise. (ILL_ILLTRP): Likewise. (ILL_PRVOPC): Likewise. (ILL_PRVREG): Likewise. (ILL_COPROC): Likewise. (ILL_BADSTK): Likewise. (FPE_INTDIV): Likewise. (FPE_INTOVF): Likewise. (FPE_FLTDIV): Likewise. (FPE_FLTOVF): Likewise. (FPE_FLTUND): Likewise. (FPE_FLTRES): Likewise. (FPE_FLTINV): Likewise. (FPE_FLTSUB): Likewise. (SEGV_MAPERR): Likewise. (SEGV_ACCERR): Likewise. (BUS_ADRALN): Likewise. (BUS_ADRERR): Likewise. (BUS_OBJERR): Likewise. (BUS_MCEERR_AR): Likewise. (BUS_MCEERR_AO): Likewise. (TRAP_BRKPT): Condition on [__USE_XOPEN_EXTENDED]. (TRAP_TRACE): Likewise. (CLD_EXITED): Condition on [__USE_XOPEN_EXTENDED || __USE_XOPEN2K8]. (CLD_KILLED): Likewise. (CLD_DUMPED): Likewise. (CLD_TRAPPED): Likewise. (CLD_STOPPED): Likewise. (CLD_CONTINUED): Likewise. (POLL_IN): Likewise. (POLL_OUT): Likewise. (POLL_MSG): Likewise. (POLL_ERR): Likewise. (POLL_PRI): Likewise. (POLL_HUP): Likewise. * sysdeps/unix/sysv/linux/s390/bits/siginfo.h (ILL_ILLOPC): Likewise. (ILL_ILLOPN): Likewise. (ILL_ILLADR): Likewise. (ILL_ILLTRP): Likewise. (ILL_PRVOPC): Likewise. (ILL_PRVREG): Likewise. (ILL_COPROC): Likewise. (ILL_BADSTK): Likewise. (FPE_INTDIV): Likewise. (FPE_INTOVF): Likewise. (FPE_FLTDIV): Likewise. (FPE_FLTOVF): Likewise. (FPE_FLTUND): Likewise. (FPE_FLTRES): Likewise. (FPE_FLTINV): Likewise. (FPE_FLTSUB): Likewise. (SEGV_MAPERR): Likewise. (SEGV_ACCERR): Likewise. (BUS_ADRALN): Likewise. (BUS_ADRERR): Likewise. (BUS_OBJERR): Likewise. (BUS_MCEERR_AR): Likewise. (BUS_MCEERR_AO): Likewise. (TRAP_BRKPT): Condition on [__USE_XOPEN_EXTENDED]. (TRAP_TRACE): Likewise. (CLD_EXITED): Condition on [__USE_XOPEN_EXTENDED || __USE_XOPEN2K8]. (CLD_KILLED): Likewise. (CLD_DUMPED): Likewise. (CLD_TRAPPED): Likewise. (CLD_STOPPED): Likewise. (CLD_CONTINUED): Likewise. (POLL_IN): Likewise. (POLL_OUT): Likewise. (POLL_MSG): Likewise. (POLL_ERR): Likewise. (POLL_PRI): Likewise. (POLL_HUP): Likewise. * sysdeps/unix/sysv/linux/sparc/bits/siginfo.h (ILL_ILLOPC): Likewise. (ILL_ILLOPN): Likewise. (ILL_ILLADR): Likewise. (ILL_ILLTRP): Likewise. (ILL_PRVOPC): Likewise. (ILL_PRVREG): Likewise. (ILL_COPROC): Likewise. (ILL_BADSTK): Likewise. (FPE_INTDIV): Likewise. (FPE_INTOVF): Likewise. (FPE_FLTDIV): Likewise. (FPE_FLTOVF): Likewise. (FPE_FLTUND): Likewise. (FPE_FLTRES): Likewise. (FPE_FLTINV): Likewise. (FPE_FLTSUB): Likewise. (SEGV_MAPERR): Likewise. (SEGV_ACCERR): Likewise. (BUS_ADRALN): Likewise. (BUS_ADRERR): Likewise. (BUS_OBJERR): Likewise. (BUS_MCEERR_AR): Likewise. (BUS_MCEERR_AO): Likewise. (TRAP_BRKPT): Condition on [__USE_XOPEN_EXTENDED]. (TRAP_TRACE): Likewise. (CLD_EXITED): Condition on [__USE_XOPEN_EXTENDED || __USE_XOPEN2K8]. (CLD_KILLED): Likewise. (CLD_DUMPED): Likewise. (CLD_TRAPPED): Likewise. (CLD_STOPPED): Likewise. (CLD_CONTINUED): Likewise. (POLL_IN): Likewise. (POLL_OUT): Likewise. (POLL_MSG): Likewise. (POLL_ERR): Likewise. (POLL_PRI): Likewise. (POLL_HUP): Likewise. * sysdeps/unix/sysv/linux/tile/bits/siginfo.h (ILL_ILLOPC): Likewise. (ILL_ILLOPN): Likewise. (ILL_ILLADR): Likewise. (ILL_ILLTRP): Likewise. (ILL_PRVOPC): Likewise. (ILL_PRVREG): Likewise. (ILL_COPROC): Likewise. (ILL_BADSTK): Likewise. (ILL_DBLFLT): Likewise. (ILL_HARDWALL): Likewise. (FPE_INTDIV): Likewise. (FPE_INTOVF): Likewise. (FPE_FLTDIV): Likewise. (FPE_FLTOVF): Likewise. (FPE_FLTUND): Likewise. (FPE_FLTRES): Likewise. (FPE_FLTINV): Likewise. (FPE_FLTSUB): Likewise. (SEGV_MAPERR): Likewise. (SEGV_ACCERR): Likewise. (BUS_ADRALN): Likewise. (BUS_ADRERR): Likewise. (BUS_OBJERR): Likewise. (BUS_MCEERR_AR): Likewise. (BUS_MCEERR_AO): Likewise. (TRAP_BRKPT): Condition on [__USE_XOPEN_EXTENDED]. (TRAP_TRACE): Likewise. (CLD_EXITED): Condition on [__USE_XOPEN_EXTENDED || __USE_XOPEN2K8]. (CLD_KILLED): Likewise. (CLD_DUMPED): Likewise. (CLD_TRAPPED): Likewise. (CLD_STOPPED): Likewise. (CLD_CONTINUED): Likewise. (POLL_IN): Likewise. (POLL_OUT): Likewise. (POLL_MSG): Likewise. (POLL_ERR): Likewise. (POLL_PRI): Likewise. (POLL_HUP): Likewise. * sysdeps/unix/sysv/linux/x86/bits/siginfo.h (ILL_ILLOPC): Likewise. (ILL_ILLOPN): Likewise. (ILL_ILLADR): Likewise. (ILL_ILLTRP): Likewise. (ILL_PRVOPC): Likewise. (ILL_PRVREG): Likewise. (ILL_COPROC): Likewise. (ILL_BADSTK): Likewise. (FPE_INTDIV): Likewise. (FPE_INTOVF): Likewise. (FPE_FLTDIV): Likewise. (FPE_FLTOVF): Likewise. (FPE_FLTUND): Likewise. (FPE_FLTRES): Likewise. (FPE_FLTINV): Likewise. (FPE_FLTSUB): Likewise. (SEGV_MAPERR): Likewise. (SEGV_ACCERR): Likewise. (BUS_ADRALN): Likewise. (BUS_ADRERR): Likewise. (BUS_OBJERR): Likewise. (BUS_MCEERR_AR): Likewise. (BUS_MCEERR_AO): Likewise. (TRAP_BRKPT): Condition on [__USE_XOPEN_EXTENDED]. (TRAP_TRACE): Likewise. (CLD_EXITED): Condition on [__USE_XOPEN_EXTENDED || __USE_XOPEN2K8]. (CLD_KILLED): Likewise. (CLD_DUMPED): Likewise. (CLD_TRAPPED): Likewise. (CLD_STOPPED): Likewise. (CLD_CONTINUED): Likewise. (POLL_IN): Likewise. (POLL_OUT): Likewise. (POLL_MSG): Likewise. (POLL_ERR): Likewise. (POLL_PRI): Likewise. (POLL_HUP): Likewise. * conform/Makefile (test-xfail-POSIX/signal.h/conform): Remove. (test-xfail-POSIX/sys/wait.h/conform): Likewise.
2014-03-07Include all of <time.h> from <sched.h> for older standards (bug 16670).Joseph Myers
This patch fixes one of the header namespace issues shown up by conformtest, <sched.h> failing to expose all symbols from <time.h> as required by older standards. The patch keeps the existing behavior if __USE_XOPEN2K is defined (the default; POSIX.1-2001 was the version that made it optional to expose these symbols), but ensures that all the symbols from <time.h> are exposed if an older standard is selected. Tested x86_64. [BZ #16670] * posix/sched.h [!__USE_XOPEN2K] (__need_time_t): Don't define before #include of <time.h>. [!__USE_XOPEN2K] (__need_timespec): Likewise. * conform/Makefile (test-xfail-POSIX/sched.h/conform): Remove. (test-xfail-UNIX98/sched.h/conform): Likewise.
2014-03-07[PATCH] [AArch64] Optional trapping exceptions support.Marcus Shawcroft
Trapping exceptions in AArch64 are optional. The relevant exception control bits in FPCR are are defined as RES0 hence the absence of support can be detected by reading back the FPCR and comparing with the desired value.