Merge "Linker: clear error for incorrect page size load." into main
diff --git a/benchmarks/README.md b/benchmarks/README.md
index 6b6c448..319db25 100644
--- a/benchmarks/README.md
+++ b/benchmarks/README.md
@@ -189,6 +189,5 @@
Some devices have a `perf-setup.sh` script that locks CPU and GPU frequencies. Some TradeFed
benchmarks appear to be using the script. For more information:
- * run `get_build_var BOARD_PERFSETUP_SCRIPT`
- * run `m perf-setup` to install the script into `${OUT}/data/local/tmp/perf-setup.sh`
+ * run `adb shell perf-setup.sh` to execute the script, it is already by default be installed on device for eng and userdebug build
* see: https://android.googlesource.com/platform/platform_testing/+/refs/heads/main/scripts/perf-setup/
diff --git a/docs/status.md b/docs/status.md
index 7ebd195..0436c40 100644
--- a/docs/status.md
+++ b/docs/status.md
@@ -55,6 +55,9 @@
Current libc symbols: https://android.googlesource.com/platform/bionic/+/main/libc/libc.map.txt
+New libc functions in API level 36:
+ * `qsort_r` (new POSIX addition).
+
New libc functions in V (API level 35):
* New `android_crash_detail_register`, `android_crash_detail_unregister`,
`android_crash_detail_replace_name`, and `android_crash_detail_replace_data`
diff --git a/libc/Android.bp b/libc/Android.bp
index 7788a48..42ffd37 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -389,6 +389,7 @@
"upstream-freebsd/lib/libc/stdlib/hdestroy_r.c",
"upstream-freebsd/lib/libc/stdlib/hsearch_r.c",
"upstream-freebsd/lib/libc/stdlib/qsort.c",
+ "upstream-freebsd/lib/libc/stdlib/qsort_r.c",
"upstream-freebsd/lib/libc/stdlib/quick_exit.c",
"upstream-freebsd/lib/libc/string/wcpcpy.c",
"upstream-freebsd/lib/libc/string/wcpncpy.c",
@@ -2226,7 +2227,7 @@
nocrt: true,
stl: "none",
visibility: [
- "//packages/modules/Virtualization/vmbase",
+ "//packages/modules/Virtualization/libs/libvmbase",
],
}
diff --git a/libc/SYSCALLS.TXT b/libc/SYSCALLS.TXT
index a8c70e5..182de17 100644
--- a/libc/SYSCALLS.TXT
+++ b/libc/SYSCALLS.TXT
@@ -65,7 +65,7 @@
int tgkill(pid_t tgid, pid_t tid, int sig) all
void* __brk:brk(void*) all
-int __execve:execve(const char*, char* const*, char* const*) all
+int execve(const char*, char* const*, char* const*) all
int __ptrace:ptrace(int request, int pid, void* addr, void* data) all
# <sys/resource.h>
@@ -330,7 +330,7 @@
int __eventfd:eventfd2(unsigned int, int) all
-void __exit_group:exit_group(int) all
+void _exit|_Exit:exit_group(int) all
void __exit:exit(int) all
int inotify_init1(int) all
diff --git a/libc/arch-x86/string/cache.h b/libc/arch-x86/string/cache.h
deleted file mode 100644
index 33719a0..0000000
--- a/libc/arch-x86/string/cache.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-Copyright (c) 2010, Intel Corporation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
-
- * Neither the name of Intel Corporation nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifdef FOR_ATOM
-#define SHARED_CACHE_SIZE (512 * 1024) /* Atom L2 Cache */
-#endif
-#ifdef FOR_SILVERMONT
-#define SHARED_CACHE_SIZE (1024 * 1024) /* Silvermont L2 Cache */
-#endif
-
-#define DATA_CACHE_SIZE (24 * 1024) /* Atom and Silvermont L1 Data Cache */
-
-#define SHARED_CACHE_SIZE_HALF (SHARED_CACHE_SIZE / 2)
-#define DATA_CACHE_SIZE_HALF (DATA_CACHE_SIZE / 2)
diff --git a/libc/arch-x86/string/sse2-memmove-slm.S b/libc/arch-x86/string/sse2-memmove-slm.S
index 79b5d1b..7f42374 100644
--- a/libc/arch-x86/string/sse2-memmove-slm.S
+++ b/libc/arch-x86/string/sse2-memmove-slm.S
@@ -29,7 +29,6 @@
*/
#define FOR_SILVERMONT
-#include "cache.h"
#ifndef MEMMOVE
# define MEMMOVE memmove_generic
@@ -94,6 +93,8 @@
#define RETURN_END POP (%ebx); ret
#define RETURN RETURN_END; CFI_PUSH (%ebx)
+#define SETUP_PIC_REG(x) call __x86.get_pc_thunk.x
+
.section .text.sse2,"ax",@progbits
ENTRY (MEMMOVE)
ENTRANCE
@@ -193,7 +194,13 @@
cmp %edi, %ebx
jbe L(mm_copy_remaining_forward)
- cmp $SHARED_CACHE_SIZE_HALF, %ecx
+ PUSH(%ebx)
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmp __x86_shared_cache_size_half@GOTOFF(%ebx), %ecx
+ /* Restore ebx. We can place a pop before jump as it doesn't affect any flags. */
+ POP(%ebx)
+
jae L(mm_large_page_loop_forward)
.p2align 4
@@ -424,7 +431,13 @@
cmp %edi, %ebx
jae L(mm_main_loop_backward_end)
- cmp $SHARED_CACHE_SIZE_HALF, %ecx
+ PUSH(%ebx)
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmp __x86_shared_cache_size_half@GOTOFF(%ebx), %ecx
+ /* Restore ebx. We can place a pop before jump as it doesn't affect any flags. */
+ POP(%ebx)
+
jae L(mm_large_page_loop_backward)
.p2align 4
diff --git a/libc/arch-x86/string/sse2-memset-atom.S b/libc/arch-x86/string/sse2-memset-atom.S
index 320afec..e43ead0 100644
--- a/libc/arch-x86/string/sse2-memset-atom.S
+++ b/libc/arch-x86/string/sse2-memset-atom.S
@@ -31,7 +31,6 @@
#include <private/bionic_asm.h>
#define FOR_ATOM
-#include "cache.h"
#ifndef L
# define L(label) .L##label
@@ -64,6 +63,8 @@
#define RETURN RETURN_END; CFI_PUSH(%ebx)
#define JMPTBL(I, B) I - B
+#define SETUP_PIC_REG(x) call __x86.get_pc_thunk.x
+
/* Load an entry in a jump table into EBX and branch to it. TABLE is a
jump table with relative offsets. */
# define BRANCH_TO_JMPTBL_ENTRY(TABLE) \
@@ -256,14 +257,20 @@
ALIGN(4)
L(128bytesormore):
PUSH(%ebx)
- mov $SHARED_CACHE_SIZE, %ebx
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ mov __x86_shared_cache_size@GOTOFF(%ebx), %ebx
cmp %ebx, %ecx
jae L(128bytesormore_nt_start)
POP(%ebx)
# define RESTORE_EBX_STATE CFI_PUSH(%ebx)
- cmp $DATA_CACHE_SIZE, %ecx
+ PUSH(%ebx)
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmp __x86_data_cache_size@GOTOFF(%ebx), %ecx
+ POP(%ebx)
jae L(128bytes_L2_normal)
subl $128, %ecx
diff --git a/libc/arch-x86/string/sse2-memset-slm.S b/libc/arch-x86/string/sse2-memset-slm.S
index 5cff141..e4c8fa1 100644
--- a/libc/arch-x86/string/sse2-memset-slm.S
+++ b/libc/arch-x86/string/sse2-memset-slm.S
@@ -31,7 +31,6 @@
#include <private/bionic_asm.h>
#define FOR_SILVERMONT
-#include "cache.h"
#ifndef L
# define L(label) .L##label
@@ -64,6 +63,8 @@
# define RETURN RETURN_END; CFI_PUSH(%ebx)
# define JMPTBL(I, B) I - B
+#define SETUP_PIC_REG(x) call __x86.get_pc_thunk.x
+
/* Load an entry in a jump table into EBX and branch to it. TABLE is a
jump table with relative offsets. */
# define BRANCH_TO_JMPTBL_ENTRY(TABLE) \
@@ -177,14 +178,18 @@
ALIGN(4)
L(128bytesormore):
PUSH(%ebx)
- mov $SHARED_CACHE_SIZE, %ebx
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ mov __x86_shared_cache_size@GOTOFF(%ebx), %ebx
cmp %ebx, %ecx
jae L(128bytesormore_nt_start)
POP(%ebx)
PUSH(%ebx)
- mov $DATA_CACHE_SIZE, %ebx
+ SETUP_PIC_REG(bx)
+ add $_GLOBAL_OFFSET_TABLE_, %ebx
+ mov __x86_data_cache_size@GOTOFF(%ebx), %ebx
cmp %ebx, %ecx
jae L(128bytes_L2_normal)
diff --git a/libc/arch-x86/string/ssse3-memcpy-atom.S b/libc/arch-x86/string/ssse3-memcpy-atom.S
index fe3082e..83e1985 100644
--- a/libc/arch-x86/string/ssse3-memcpy-atom.S
+++ b/libc/arch-x86/string/ssse3-memcpy-atom.S
@@ -29,7 +29,6 @@
*/
#define FOR_ATOM
-#include "cache.h"
#ifndef MEMCPY
# define MEMCPY memcpy_atom
diff --git a/libc/arch-x86_64/string/avx2-memset-kbl.S b/libc/arch-x86_64/string/avx2-memset-kbl.S
index ca62a9f..35d682a 100644
--- a/libc/arch-x86_64/string/avx2-memset-kbl.S
+++ b/libc/arch-x86_64/string/avx2-memset-kbl.S
@@ -30,7 +30,6 @@
#include <private/bionic_asm.h>
-#include "cache.h"
#ifndef L
# define L(label) .L##label
@@ -117,11 +116,8 @@
cmpq %rcx, %rdx
je L(done)
-#ifdef SHARED_CACHE_SIZE
- cmp $SHARED_CACHE_SIZE, %r8
-#else
- cmp __x86_64_shared_cache_size(%rip), %r8
-#endif
+ cmp __x86_shared_cache_size(%rip), %r8
+
ja L(non_temporal_loop)
ALIGN (4)
diff --git a/libc/arch-x86_64/string/cache.h b/libc/arch-x86_64/string/cache.h
deleted file mode 100644
index 4131509..0000000
--- a/libc/arch-x86_64/string/cache.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-Copyright (c) 2014, Intel Corporation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
-
- * Neither the name of Intel Corporation nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/* Values are optimized for Core Architecture */
-#define SHARED_CACHE_SIZE (4096*1024) /* Core Architecture L2 Cache */
-#define DATA_CACHE_SIZE (24*1024) /* Core Architecture L1 Data Cache */
-
-#define SHARED_CACHE_SIZE_HALF (SHARED_CACHE_SIZE / 2)
-#define DATA_CACHE_SIZE_HALF (DATA_CACHE_SIZE / 2)
diff --git a/libc/arch-x86_64/string/sse2-memmove-slm.S b/libc/arch-x86_64/string/sse2-memmove-slm.S
index 7395028..8b32680 100644
--- a/libc/arch-x86_64/string/sse2-memmove-slm.S
+++ b/libc/arch-x86_64/string/sse2-memmove-slm.S
@@ -28,7 +28,6 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "cache.h"
#ifndef MEMMOVE
# define MEMMOVE memmove
@@ -189,8 +188,9 @@
cmp %r8, %rbx
jbe L(mm_copy_remaining_forward)
- cmp $SHARED_CACHE_SIZE_HALF, %rdx
- jae L(mm_large_page_loop_forward)
+ cmp __x86_shared_cache_size_half(%rip), %rdx
+
+ ja L(mm_overlapping_check_forward)
.p2align 4
L(mm_main_loop_forward):
@@ -414,8 +414,9 @@
cmp %r9, %rbx
jae L(mm_recalc_len)
- cmp $SHARED_CACHE_SIZE_HALF, %rdx
- jae L(mm_large_page_loop_backward)
+ cmp __x86_shared_cache_size_half(%rip), %rdx
+
+ ja L(mm_overlapping_check_backward)
.p2align 4
L(mm_main_loop_backward):
@@ -481,6 +482,13 @@
/* Big length copy forward part. */
.p2align 4
+
+L(mm_overlapping_check_forward):
+ mov %rsi, %r9
+ add %rdx, %r9
+ cmp __x86_shared_cache_size(%rip), %r9
+ jbe L(mm_main_loop_forward)
+
L(mm_large_page_loop_forward):
movdqu (%r8, %rsi), %xmm0
movdqu 16(%r8, %rsi), %xmm1
@@ -498,6 +506,14 @@
/* Big length copy backward part. */
.p2align 4
+
+L(mm_overlapping_check_backward):
+ mov %rdi, %r11
+ sub %rsi, %r11 /* r11 = dst - src, diff */
+ add %rdx, %r11
+ cmp __x86_shared_cache_size(%rip), %r11
+ jbe L(mm_main_loop_backward)
+
L(mm_large_page_loop_backward):
movdqu -64(%r9, %r8), %xmm0
movdqu -48(%r9, %r8), %xmm1
diff --git a/libc/arch-x86_64/string/sse2-memset-slm.S b/libc/arch-x86_64/string/sse2-memset-slm.S
index cceadd2..84ab327 100644
--- a/libc/arch-x86_64/string/sse2-memset-slm.S
+++ b/libc/arch-x86_64/string/sse2-memset-slm.S
@@ -30,7 +30,6 @@
#include <private/bionic_asm.h>
-#include "cache.h"
#ifndef L
# define L(label) .L##label
@@ -116,11 +115,8 @@
cmpq %rcx, %rdx
je L(return)
-#ifdef SHARED_CACHE_SIZE
- cmp $SHARED_CACHE_SIZE, %r8
-#else
- cmp __x86_64_shared_cache_size(%rip), %r8
-#endif
+ cmp __x86_shared_cache_size(%rip), %r8
+
ja L(128bytesmore_nt)
ALIGN (4)
diff --git a/libc/arch-x86_64/string/sse4-memcmp-slm.S b/libc/arch-x86_64/string/sse4-memcmp-slm.S
index 8a8b180..46ad78d 100644
--- a/libc/arch-x86_64/string/sse4-memcmp-slm.S
+++ b/libc/arch-x86_64/string/sse4-memcmp-slm.S
@@ -28,7 +28,6 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "cache.h"
#ifndef MEMCMP
# define MEMCMP memcmp
@@ -353,11 +352,7 @@
ALIGN (4)
L(512bytesormore):
-#ifdef DATA_CACHE_SIZE_HALF
- mov $DATA_CACHE_SIZE_HALF, %r8
-#else
- mov __x86_64_data_cache_size_half(%rip), %r8
-#endif
+ mov __x86_data_cache_size_half(%rip), %r8
mov %r8, %r9
shr $1, %r8
add %r9, %r8
@@ -669,11 +664,7 @@
ALIGN (4)
L(512bytesormorein2aligned):
-#ifdef DATA_CACHE_SIZE_HALF
- mov $DATA_CACHE_SIZE_HALF, %r8
-#else
- mov __x86_64_data_cache_size_half(%rip), %r8
-#endif
+ mov __x86_data_cache_size_half(%rip), %r8
mov %r8, %r9
shr $1, %r8
add %r9, %r8
diff --git a/libc/bionic/abort.cpp b/libc/bionic/abort.cpp
index c8bba01..1b7a5e6 100644
--- a/libc/bionic/abort.cpp
+++ b/libc/bionic/abort.cpp
@@ -29,27 +29,27 @@
#include <signal.h>
#include <stdlib.h>
-#include <sys/syscall.h>
#include <unistd.h>
#include "private/bionic_inline_raise.h"
void abort() {
- // Don't block SIGABRT to give any signal handler a chance; we ignore
- // any errors -- X311J doesn't allow abort to return anyway.
- sigset64_t mask;
- sigfillset64(&mask);
- sigdelset64(&mask, SIGABRT);
+ // Since abort() must not return, there's no error checking in this function:
+ // there's no way to report an error anyway.
- sigprocmask64(SIG_SETMASK, &mask, nullptr);
+ // Unblock SIGABRT to give any signal handler a chance.
+ sigset64_t mask;
+ sigemptyset64(&mask);
+ sigaddset64(&mask, SIGABRT);
+ sigprocmask64(SIG_UNBLOCK, &mask, nullptr);
+
+ // Use inline_raise() to raise SIGABRT without adding an uninteresting
+ // stack frame that anyone investigating the crash would have to ignore.
inline_raise(SIGABRT);
- // If SIGABRT is ignored or it's caught and the handler returns,
- // remove the SIGABRT signal handler and raise SIGABRT again.
- struct sigaction64 sa = { .sa_handler = SIG_DFL, .sa_flags = SA_RESTART };
- sigaction64(SIGABRT, &sa, nullptr);
-
- sigprocmask64(SIG_SETMASK, &mask, nullptr);
+ // If that signal was ignored or was caught and the handler returned,
+ // remove the signal handler and raise SIGABRT again.
+ signal(SIGABRT, SIG_DFL);
inline_raise(SIGABRT);
// If we get this far, just exit.
diff --git a/libc/bionic/exec.cpp b/libc/bionic/exec.cpp
index 863aa97..56544d0 100644
--- a/libc/bionic/exec.cpp
+++ b/libc/bionic/exec.cpp
@@ -41,10 +41,8 @@
#include "private/FdPath.h"
#include "private/__bionic_get_shell_path.h"
-#include "pthread_internal.h"
extern "C" char** environ;
-extern "C" int __execve(const char* pathname, char* const* argv, char* const* envp);
enum { ExecL, ExecLE, ExecLP };
@@ -183,8 +181,3 @@
if (errno == ENOENT) errno = EBADF;
return -1;
}
-
-__attribute__((no_sanitize("memtag"))) int execve(const char* pathname, char* const* argv,
- char* const* envp) {
- return __execve(pathname, argv, envp);
-}
diff --git a/libc/bionic/exit.cpp b/libc/bionic/exit.cpp
index 04baac2..8eda5b2 100644
--- a/libc/bionic/exit.cpp
+++ b/libc/bionic/exit.cpp
@@ -26,24 +26,22 @@
* SUCH DAMAGE.
*/
+#include <pthread.h>
#include <stdlib.h>
#include <unistd.h>
#include "private/bionic_defs.h"
-#include "pthread_internal.h"
extern "C" void __cxa_finalize(void* dso_handle);
extern "C" void __cxa_thread_finalize();
-extern "C" __noreturn void __exit_group(int status);
-__attribute__((no_sanitize("memtag"))) void _exit(int status) {
- __exit_group(status);
-}
-
-__strong_alias(_Exit, _exit);
+static pthread_mutex_t g_exit_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
__BIONIC_WEAK_FOR_NATIVE_BRIDGE
void exit(int status) {
+ // https://austingroupbugs.net/view.php?id=1845
+ pthread_mutex_lock(&g_exit_mutex);
+
__cxa_thread_finalize();
__cxa_finalize(nullptr);
_exit(status);
diff --git a/libc/bionic/libc_init_common.cpp b/libc/bionic/libc_init_common.cpp
index 939e4e1..94ba7e4 100644
--- a/libc/bionic/libc_init_common.cpp
+++ b/libc/bionic/libc_init_common.cpp
@@ -64,6 +64,28 @@
__BIONIC_WEAK_VARIABLE_FOR_NATIVE_BRIDGE
const char* __progname;
+#if defined(__i386__) || defined(__x86_64__)
+// Default sizes based on the old hard-coded values for Atom/Silvermont (x86) and Core 2 (x86-64)...
+size_t __x86_data_cache_size = 24 * 1024;
+size_t __x86_data_cache_size_half = __x86_data_cache_size / 2;
+size_t __x86_shared_cache_size = sizeof(long) == 8 ? 4096 * 1024 : 1024 * 1024;
+size_t __x86_shared_cache_size_half = __x86_shared_cache_size / 2;
+// ...overwritten at runtime based on the cpu's reported cache sizes.
+static void __libc_init_x86_cache_info() {
+ // Handle the case where during early boot /sys fs may not yet be ready,
+ // resulting in sysconf() returning 0, leading to crashes.
+ // In that case (basically just init), we keep the defaults.
+ if (sysconf(_SC_LEVEL1_DCACHE_SIZE) != 0) {
+ __x86_data_cache_size = sysconf(_SC_LEVEL1_DCACHE_SIZE);
+ __x86_data_cache_size_half = __x86_data_cache_size / 2;
+ }
+ if (sysconf(_SC_LEVEL2_CACHE_SIZE) != 0) {
+ __x86_shared_cache_size = sysconf(_SC_LEVEL2_CACHE_SIZE);
+ __x86_shared_cache_size_half = __x86_shared_cache_size / 2;
+ }
+}
+#endif
+
void __libc_init_globals() {
// Initialize libc globals that are needed in both the linker and in libc.
// In dynamic binaries, this is run at least twice for different copies of the
@@ -78,8 +100,10 @@
#if !defined(__LP64__)
static void __check_max_thread_id() {
if (gettid() > 65535) {
- async_safe_fatal("Limited by the size of pthread_mutex_t, 32 bit bionic libc only accepts "
- "pid <= 65535, but current pid is %d", gettid());
+ async_safe_fatal("32-bit pthread_mutex_t only supports pids <= 65535; "
+ "current pid %d; "
+ "`echo 65535 > /proc/sys/kernel/pid_max` as root",
+ gettid());
}
}
#endif
@@ -173,6 +197,10 @@
__system_properties_init(); // Requires 'environ'.
__libc_init_fdsan(); // Requires system properties (for debug.fdsan).
__libc_init_fdtrack();
+
+#if defined(__i386__) || defined(__x86_64__)
+ __libc_init_x86_cache_info();
+#endif
}
void __libc_init_fork_handler() {
@@ -182,9 +210,9 @@
extern "C" void scudo_malloc_set_add_large_allocation_slack(int add_slack);
-__BIONIC_WEAK_FOR_NATIVE_BRIDGE void __libc_set_target_sdk_version(int target __unused) {
+__BIONIC_WEAK_FOR_NATIVE_BRIDGE void __libc_set_target_sdk_version(int target_api_level __unused) {
#if defined(USE_SCUDO) && !__has_feature(hwaddress_sanitizer)
- scudo_malloc_set_add_large_allocation_slack(target < __ANDROID_API_S__);
+ scudo_malloc_set_add_large_allocation_slack(target_api_level < 31);
#endif
}
diff --git a/libc/bionic/pthread_create.cpp b/libc/bionic/pthread_create.cpp
index a8d09eb..ba20c51 100644
--- a/libc/bionic/pthread_create.cpp
+++ b/libc/bionic/pthread_create.cpp
@@ -118,12 +118,15 @@
static void __init_shadow_call_stack(pthread_internal_t* thread __unused) {
#if defined(__aarch64__) || defined(__riscv)
- // Allocate the stack and the guard region.
+ // Allocate the shadow call stack and its guard region.
char* scs_guard_region = reinterpret_cast<char*>(
- mmap(nullptr, SCS_GUARD_REGION_SIZE, 0, MAP_PRIVATE | MAP_ANON, -1, 0));
+ mmap(nullptr, SCS_GUARD_REGION_SIZE, PROT_NONE, MAP_PRIVATE | MAP_ANON, -1, 0));
+ if (scs_guard_region == MAP_FAILED) {
+ async_safe_fatal("failed to allocate shadow stack: %m");
+ }
thread->shadow_call_stack_guard_region = scs_guard_region;
- // The address is aligned to SCS_SIZE so that we only need to store the lower log2(SCS_SIZE) bits
+ // Align the address to SCS_SIZE so that we only need to store the lower log2(SCS_SIZE) bits
// in jmp_buf. See the SCS commentary in pthread_internal.h for more detail.
char* scs_aligned_guard_region =
reinterpret_cast<char*>(align_up(reinterpret_cast<uintptr_t>(scs_guard_region), SCS_SIZE));
@@ -349,7 +352,7 @@
extern "C" int __rt_sigprocmask(int, const sigset64_t*, sigset64_t*, size_t);
__attribute__((no_sanitize("hwaddress")))
-#ifdef __aarch64__
+#if defined(__aarch64__)
// This function doesn't return, but it does appear in stack traces. Avoid using return PAC in this
// function because we may end up resetting IA, which may confuse unwinders due to mismatching keys.
__attribute__((target("branch-protection=bti")))
@@ -368,13 +371,13 @@
__set_stack_and_tls_vma_name(false);
__init_additional_stacks(thread);
__rt_sigprocmask(SIG_SETMASK, &thread->start_mask, nullptr, sizeof(thread->start_mask));
-#ifdef __aarch64__
+#if defined(__aarch64__)
// Chrome's sandbox prevents this prctl, so only reset IA if the target SDK level is high enough.
// Furthermore, processes loaded from vendor partitions may have their own sandboxes that would
- // reject the prctl. Because no devices launched with PAC enabled before S, we can avoid issues on
- // upgrading devices by checking for PAC support before issuing the prctl.
+ // reject the prctl. Because no devices launched with PAC enabled before API level 31, we can
+ // avoid issues on upgrading devices by checking for PAC support before issuing the prctl.
static const bool pac_supported = getauxval(AT_HWCAP) & HWCAP_PACA;
- if (pac_supported && android_get_application_target_sdk_version() >= __ANDROID_API_S__) {
+ if (pac_supported && android_get_application_target_sdk_version() >= 31) {
prctl(PR_PAC_RESET_KEYS, PR_PAC_APIAKEY, 0, 0, 0);
}
#endif
diff --git a/libc/bionic/pthread_sigqueue.cpp b/libc/bionic/pthread_sigqueue.cpp
index 93c349e..7c10b25 100644
--- a/libc/bionic/pthread_sigqueue.cpp
+++ b/libc/bionic/pthread_sigqueue.cpp
@@ -40,14 +40,16 @@
int pthread_sigqueue(pthread_t t, int sig, const union sigval value) {
ErrnoRestorer errno_restorer;
+ pid_t pid = getpid();
+
pid_t tid = __pthread_internal_gettid(t, "pthread_sigqueue");
if (tid == -1) return ESRCH;
- siginfo_t siginfo;
- siginfo.si_code = SI_QUEUE;
- siginfo.si_pid = getpid();
+ siginfo_t siginfo = { .si_code = SI_QUEUE };
+ siginfo.si_signo = sig;
+ siginfo.si_pid = pid;
siginfo.si_uid = getuid();
siginfo.si_value = value;
- return syscall(__NR_rt_tgsigqueueinfo, getpid(), tid, sig, &siginfo) ? errno : 0;
+ return syscall(__NR_rt_tgsigqueueinfo, pid, tid, sig, &siginfo) ? errno : 0;
}
diff --git a/libc/bionic/signal.cpp b/libc/bionic/signal.cpp
index 2cf9940..5979ed7 100644
--- a/libc/bionic/signal.cpp
+++ b/libc/bionic/signal.cpp
@@ -219,10 +219,8 @@
}
int sigqueue(pid_t pid, int sig, const sigval value) {
- siginfo_t info;
- memset(&info, 0, sizeof(siginfo_t));
+ siginfo_t info = { .si_code = SI_QUEUE };
info.si_signo = sig;
- info.si_code = SI_QUEUE;
info.si_pid = getpid();
info.si_uid = getuid();
info.si_value = value;
diff --git a/libc/include/android/versioning.h b/libc/include/android/versioning.h
index 64528e1..6bab291 100644
--- a/libc/include/android/versioning.h
+++ b/libc/include/android/versioning.h
@@ -22,8 +22,8 @@
#define __INTRODUCED_IN(api_level) __attribute__((__annotate__("introduced_in=" #api_level)))
#define __INTRODUCED_IN_NO_GUARD_FOR_NDK(api_level) __attribute__((__annotate__("introduced_in=" #api_level))) __VERSIONER_NO_GUARD
-#define __DEPRECATED_IN(api_level, ...) __attribute__((__annotate__("deprecated_in=" #api_level)))
-#define __REMOVED_IN(api_level, ...) __attribute__((__annotate__("obsoleted_in=" #api_level)))
+#define __DEPRECATED_IN(api_level, msg) __attribute__((__annotate__("deprecated_in=" #api_level)))
+#define __REMOVED_IN(api_level, msg) __attribute__((__annotate__("obsoleted_in=" #api_level)))
#define __INTRODUCED_IN_32(api_level) __attribute__((__annotate__("introduced_in_32=" #api_level)))
#define __INTRODUCED_IN_64(api_level) __attribute__((__annotate__("introduced_in_64=" #api_level)))
@@ -55,8 +55,8 @@
#endif
#define __INTRODUCED_IN(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
-#define __DEPRECATED_IN(api_level, ...) __BIONIC_AVAILABILITY(deprecated=api_level __VA_OPT__(,message=) __VA_ARGS__)
-#define __REMOVED_IN(api_level, ...) __BIONIC_AVAILABILITY(obsoleted=api_level __VA_OPT__(,message=) __VA_ARGS__)
+#define __DEPRECATED_IN(api_level, msg) __BIONIC_AVAILABILITY(deprecated=api_level, message=msg)
+#define __REMOVED_IN(api_level, msg) __BIONIC_AVAILABILITY(obsoleted=api_level, message=msg)
// The same availability attribute can't be annotated multiple times. Therefore, the macros are
// defined for the configuration that it is valid for so that declarations like the below doesn't
diff --git a/libc/include/dlfcn.h b/libc/include/dlfcn.h
index a90c4f8..d65a409 100644
--- a/libc/include/dlfcn.h
+++ b/libc/include/dlfcn.h
@@ -146,7 +146,11 @@
*/
#define RTLD_LOCAL 0
-/** Not supported on Android; Android always uses RTLD_NOW. */
+/**
+ * Not supported on Android. Android always uses RTLD_NOW for security reasons.
+ * Resolving all undefined symbols before dlopen() returns means that RELRO
+ * protections can be applied to the PLT before dlopen() returns.
+ */
#define RTLD_LAZY 0x00001
/** A dlopen() flag to resolve all undefined symbols before dlopen() returns. */
diff --git a/libc/include/netinet/in6.h b/libc/include/netinet/in6.h
index ae20f83..44b3e3e 100644
--- a/libc/include/netinet/in6.h
+++ b/libc/include/netinet/in6.h
@@ -89,7 +89,7 @@
(IN6_IS_ADDR_MULTICAST(a) && (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_GLOBAL))
#define IN6_ARE_ADDR_EQUAL(a, b) \
- (memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0)
+ (__builtin_memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0)
#define INET6_ADDRSTRLEN 46
diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h
index d0efc4c..b160e6b 100644
--- a/libc/include/stdlib.h
+++ b/libc/include/stdlib.h
@@ -114,7 +114,20 @@
*/
__wur void* _Nullable bsearch(const void* _Nonnull __key, const void* _Nullable __base, size_t __nmemb, size_t __size, int (* _Nonnull __comparator)(const void* _Nonnull __lhs, const void* _Nonnull __rhs));
-void qsort(void* _Nullable __base, size_t __nmemb, size_t __size, int (* _Nonnull __comparator)(const void* _Nullable __lhs, const void* _Nullable __rhs));
+/**
+ * [qsort(3)](http://man7.org/linux/man-pages/man3/qsort.3.html) sorts an array
+ * of n elements each of the given size, using the given comparator.
+ */
+void qsort(void* _Nullable __array, size_t __n, size_t __size, int (* _Nonnull __comparator)(const void* _Nullable __lhs, const void* _Nullable __rhs));
+
+/**
+ * [qsort_r(3)](http://man7.org/linux/man-pages/man3/qsort_r.3.html) sorts an
+ * array of n elements each of the given size, using the given comparator,
+ * and passing the given context argument to the comparator.
+ *
+ * Available since API level 36.
+ */
+void qsort_r(void* _Nullable __array, size_t __n, size_t __size, int (* _Nonnull __comparator)(const void* _Nullable __lhs, const void* _Nullable __rhs, void* _Nullable __context), void* _Nullable __context) __INTRODUCED_IN(36);
uint32_t arc4random(void);
uint32_t arc4random_uniform(uint32_t __upper_bound);
diff --git a/libc/include/sys/_system_properties.h b/libc/include/sys/_system_properties.h
index 078e857..05612b3 100644
--- a/libc/include/sys/_system_properties.h
+++ b/libc/include/sys/_system_properties.h
@@ -26,8 +26,7 @@
* SUCH DAMAGE.
*/
-#ifndef _INCLUDE_SYS__SYSTEM_PROPERTIES_H
-#define _INCLUDE_SYS__SYSTEM_PROPERTIES_H
+#pragma once
#include <sys/cdefs.h>
#include <stdint.h>
@@ -40,13 +39,67 @@
__BEGIN_DECLS
+/**
+ * Reads the global serial number of the system properties _area_.
+ *
+ * Called to predict if a series of cached __system_property_find()
+ * objects will have seen __system_property_serial() values change.
+ * Also aids the converse, as changes in the global serial can
+ * also be used to predict if a failed __system_property_find()
+ * could in turn now find a new object; thus preventing the
+ * cycles of effort to poll __system_property_find().
+ *
+ * Typically called at beginning of a cache cycle to signal if _any_ possible
+ * changes have occurred since last. If there is, one may check each individual
+ * __system_property_serial() to confirm dirty, or __system_property_find()
+ * to check if the property now exists. If a call to __system_property_add()
+ * or __system_property_update() has completed between two calls to
+ * __system_property_area_serial() then the second call will return a larger
+ * value than the first call. Beware of race conditions as changes to the
+ * properties are not atomic, the main value of this call is to determine
+ * whether the expensive __system_property_find() is worth retrying to see if
+ * a property now exists.
+ *
+ * Returns the serial number on success, -1 on error.
+ */
+uint32_t __system_property_area_serial(void);
+
+/**
+ * Reads the serial number of a specific system property previously returned by
+ * __system_property_find(). This is a cheap way to check whether a system
+ * property has changed or not.
+ *
+ * Returns the serial number on success, -1 on error.
+ */
+uint32_t __system_property_serial(const prop_info* _Nonnull __pi);
+
+//
+// libc implementation detail.
+//
+
+/**
+ * Initializes the system properties area in read-only mode.
+ *
+ * This is called automatically during libc initialization,
+ * so user code should never need to call this.
+ *
+ * Returns 0 on success, -1 otherwise.
+ */
+int __system_properties_init(void);
+
+//
+// init implementation details.
+//
+
#define PROP_SERVICE_NAME "property_service"
#define PROP_SERVICE_FOR_SYSTEM_NAME "property_service_for_system"
#define PROP_DIRNAME "/dev/__properties__"
+// Messages sent to init.
#define PROP_MSG_SETPROP 1
#define PROP_MSG_SETPROP2 0x00020001
+// Status codes returned by init (but not passed from libc to the caller).
#define PROP_SUCCESS 0
#define PROP_ERROR_READ_CMD 0x0004
#define PROP_ERROR_READ_DATA 0x0008
@@ -58,93 +111,62 @@
#define PROP_ERROR_HANDLE_CONTROL_MESSAGE 0x0020
#define PROP_ERROR_SET_FAILED 0x0024
-/*
-** This was previously for testing, but now that SystemProperties is its own testable class,
-** there is never a reason to call this function and its implementation simply returns -1.
-*/
-int __system_property_set_filename(const char* __unused __filename);
-
-/*
-** Initialize the area to be used to store properties. Can
-** only be done by a single process that has write access to
-** the property area.
-*/
+/**
+ * Initializes the area to be used to store properties.
+ *
+ * Can only be done by the process that has write access to the property area,
+ * typically init.
+ *
+ * See __system_properties_init() for the equivalent for all other processes.
+ */
int __system_property_area_init(void);
-/* Read the global serial number of the system properties
-**
-** Called to predict if a series of cached __system_property_find
-** objects will have seen __system_property_serial values change.
-** But also aids the converse, as changes in the global serial can
-** also be used to predict if a failed __system_property_find
-** could in-turn now find a new object; thus preventing the
-** cycles of effort to poll __system_property_find.
-**
-** Typically called at beginning of a cache cycle to signal if _any_ possible
-** changes have occurred since last. If there is, one may check each individual
-** __system_property_serial to confirm dirty, or __system_property_find
-** to check if the property now exists. If a call to __system_property_add
-** or __system_property_update has completed between two calls to
-** __system_property_area_serial then the second call will return a larger
-** value than the first call. Beware of race conditions as changes to the
-** properties are not atomic, the main value of this call is to determine
-** whether the expensive __system_property_find is worth retrying to see if
-** a property now exists.
-**
-** Returns the serial number on success, -1 on error.
-*/
-uint32_t __system_property_area_serial(void);
-
-/* Add a new system property. Can only be done by a single
-** process that has write access to the property area, and
-** that process must handle sequencing to ensure the property
-** does not already exist and that only one property is added
-** or updated at a time.
-**
-** Returns 0 on success, -1 if the property area is full.
-*/
+/**
+ * Adds a new system property.
+ * Can only be done by the process that has write access to the property area --
+ * typically init -- which must handle sequencing to ensure that only one property is
+ * updated at a time.
+ *
+ * Returns 0 on success, -1 if the property area is full.
+ */
int __system_property_add(const char* _Nonnull __name, unsigned int __name_length, const char* _Nonnull __value, unsigned int __value_length);
-/* Update the value of a system property returned by
-** __system_property_find. Can only be done by a single process
-** that has write access to the property area, and that process
-** must handle sequencing to ensure that only one property is
-** updated at a time.
-**
-** Returns 0 on success, -1 if the parameters are incorrect.
-*/
+/**
+ * Updates the value of a system property returned by __system_property_find().
+ * Can only be done by the process that has write access to the property area --
+ * typically init -- which must handle sequencing to ensure that only one property is
+ * updated at a time.
+ *
+ * Returns 0 on success, -1 if the parameters are incorrect.
+ */
int __system_property_update(prop_info* _Nonnull __pi, const char* _Nonnull __value, unsigned int __value_length);
-/* Read the serial number of a system property returned by
-** __system_property_find.
-**
-** Returns the serial number on success, -1 on error.
-*/
-uint32_t __system_property_serial(const prop_info* _Nonnull __pi);
-
-/* Initialize the system properties area in read only mode.
- * Should be done by all processes that need to read system
- * properties.
+/**
+ * Reloads the system properties from disk.
+ * Not intended for use by any apps except the Zygote.
+ * Should only be called from the main thread.
+ *
+ * Pointers received from functions such as __system_property_find()
+ * may be invalidated by calls to this function.
*
* Returns 0 on success, -1 otherwise.
- */
-int __system_properties_init(void);
-
-/*
- * Reloads the system properties from disk.
- * Not intended for use by any apps except the Zygote. Should only be called from the main thread.
*
- * NOTE: Any pointers received from methods such as __system_property_find should be assumed to be
- * invalid after this method is called.
- *
- * Returns 0 on success, -1 if the system properties failed to re-initialize (same conditions as
- * __system properties_init)
+ * Available since API level 35.
*/
-int __system_properties_zygote_reload(void) __INTRODUCED_IN(__ANDROID_API_V__);
+int __system_properties_zygote_reload(void) __INTRODUCED_IN(35);
-/* Deprecated: use __system_property_wait instead. */
+//
+// Deprecated functions.
+//
+
+/** Deprecated: use __system_property_wait instead. */
uint32_t __system_property_wait_any(uint32_t __old_serial);
-__END_DECLS
+/**
+ * Deprecated: previously for testing, but now that SystemProperties is its own
+ * testable class, there is never a reason to call this function and its
+ * implementation simply returns -1.
+ */
+int __system_property_set_filename(const char* __unused __filename);
-#endif
+__END_DECLS
diff --git a/libc/include/sys/select.h b/libc/include/sys/select.h
index 84c2621..437a234 100644
--- a/libc/include/sys/select.h
+++ b/libc/include/sys/select.h
@@ -44,7 +44,7 @@
typedef unsigned long fd_mask;
/**
- * The limit on the largest fd that can be used with this API.
+ * The limit on the largest fd that can be used with fd_set.
* Use <poll.h> instead.
*/
#define FD_SETSIZE 1024
@@ -52,6 +52,9 @@
/**
* The type of a file descriptor set. Limited to 1024 fds.
+ * The underlying system calls do not have this limit,
+ * and callers can allocate their own sets with calloc().
+ *
* Use <poll.h> instead.
*/
typedef struct {
@@ -60,30 +63,27 @@
#define __FDELT(fd) ((fd) / NFDBITS)
#define __FDMASK(fd) (1UL << ((fd) % NFDBITS))
-#define __FDS_BITS(type,set) (__BIONIC_CAST(static_cast, type, set)->fds_bits)
-
-/* Inline loop so we don't have to declare memset. */
-#define FD_ZERO(set) \
- do { \
- size_t __i; \
- for (__i = 0; __i < sizeof(fd_set)/sizeof(fd_mask); ++__i) { \
- (set)->fds_bits[__i] = 0; \
- } \
- } while (0)
+#define __FDS_BITS(type, set) (__BIONIC_CAST(static_cast, type, set)->fds_bits)
void __FD_CLR_chk(int, fd_set* _Nonnull , size_t);
void __FD_SET_chk(int, fd_set* _Nonnull, size_t);
int __FD_ISSET_chk(int, const fd_set* _Nonnull, size_t);
-#define __FD_CLR(fd, set) (__FDS_BITS(fd_set*,set)[__FDELT(fd)] &= ~__FDMASK(fd))
-#define __FD_SET(fd, set) (__FDS_BITS(fd_set*,set)[__FDELT(fd)] |= __FDMASK(fd))
-#define __FD_ISSET(fd, set) ((__FDS_BITS(const fd_set*,set)[__FDELT(fd)] & __FDMASK(fd)) != 0)
+/** FD_CLR() with no bounds checking for users that allocated their own set. */
+#define __FD_CLR(fd, set) (__FDS_BITS(fd_set*, set)[__FDELT(fd)] &= ~__FDMASK(fd))
+/** FD_SET() with no bounds checking for users that allocated their own set. */
+#define __FD_SET(fd, set) (__FDS_BITS(fd_set*, set)[__FDELT(fd)] |= __FDMASK(fd))
+/** FD_ISSET() with no bounds checking for users that allocated their own set. */
+#define __FD_ISSET(fd, set) ((__FDS_BITS(const fd_set*, set)[__FDELT(fd)] & __FDMASK(fd)) != 0)
-/** Removes `fd` from the given set. Use <poll.h> instead. */
+/** Removes all 1024 fds from the given set. Use <poll.h> instead. */
+#define FD_ZERO(set) __builtin_memset(set, 0, sizeof(*__BIONIC_CAST(static_cast, const fd_set*, set)))
+
+/** Removes `fd` from the given set. Limited to fds under 1024. Use <poll.h> instead. */
#define FD_CLR(fd, set) __FD_CLR_chk(fd, set, __bos(set))
-/** Adds `fd` to the given set. Use <poll.h> instead. */
+/** Adds `fd` to the given set. Limited to fds under 1024. Use <poll.h> instead. */
#define FD_SET(fd, set) __FD_SET_chk(fd, set, __bos(set))
-/** Tests whether `fd` is in the given set. Use <poll.h> instead. */
+/** Tests whether `fd` is in the given set. Limited to fds under 1024. Use <poll.h> instead. */
#define FD_ISSET(fd, set) __FD_ISSET_chk(fd, set, __bos(set))
/**
diff --git a/libc/libc.map.txt b/libc/libc.map.txt
index 2c8ec07..35e67c8 100644
--- a/libc/libc.map.txt
+++ b/libc/libc.map.txt
@@ -8,29 +8,29 @@
__atomic_swap; # arm
__b64_ntop;
__b64_pton;
- __cmsg_nxthdr; # introduced=21
- __connect; # arm x86 introduced=21
- __ctype_get_mb_cur_max; # introduced=21
+ __cmsg_nxthdr;
+ __connect; # arm x86
+ __ctype_get_mb_cur_max;
__cxa_atexit;
__cxa_finalize;
__cxa_thread_atexit_impl; # introduced=23
__dn_comp;
__dn_count_labels;
__dn_skipname;
- __epoll_pwait; # arm x86 introduced=21
+ __epoll_pwait; # arm x86
__errno;
- __exit; # arm x86 introduced=21
- __fadvise64; # x86 introduced=21
+ __exit; # arm x86
+ __fadvise64; # x86
__fbufsize; # introduced=23
__fcntl64; # arm x86
- __FD_CLR_chk; # introduced=21
- __FD_ISSET_chk; # introduced=21
- __FD_SET_chk; # introduced=21
- __fgets_chk; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
+ __FD_CLR_chk;
+ __FD_ISSET_chk;
+ __FD_SET_chk;
+ __fgets_chk;
__flbf; # introduced=23
__fp_nquery;
__fp_query;
- __fpclassify; # introduced=21
+ __fpclassify;
__fpclassifyd;
__fpclassifyf;
__fpclassifyl;
@@ -41,9 +41,9 @@
__fstatfs64; # arm x86
__fwritable; # introduced=23
__get_h_errno;
- __getcpu; # arm x86 introduced-arm=12 introduced-x86=12
+ __getcpu; # arm x86
__getcwd; # arm x86
- __getpid; # arm x86 introduced=21
+ __getpid; # arm x86
__getpriority; # arm x86
__gnu_basename; # introduced=23
__gnu_strerror_r; # introduced=23
@@ -55,24 +55,24 @@
__isinf;
__isinff;
__isinfl;
- __isnan; # introduced=21
- __isnanf; # introduced=21
+ __isnan;
+ __isnanf;
__isnanl;
__isnormal;
__isnormalf;
__isnormall;
__isthreaded; # arm x86 var
- __libc_current_sigrtmax; # introduced=21
- __libc_current_sigrtmin; # introduced=21
+ __libc_current_sigrtmax;
+ __libc_current_sigrtmin;
__libc_init;
__llseek; # arm x86
__loc_aton;
__loc_ntoa;
__memchr_chk; # introduced=23
- __memcpy_chk; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
- __memmove_chk; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
+ __memcpy_chk;
+ __memmove_chk;
__memrchr_chk; # introduced=23
- __memset_chk; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
+ __memset_chk;
__mmap2; # arm x86
__ns_format_ttl; # arm x86 introduced=22
__ns_get16; # arm x86 introduced=22
@@ -96,9 +96,9 @@
__ns_skiprr; # arm x86 introduced=22
__ns_sprintrr; # arm x86 introduced=22
__ns_sprintrrf; # arm x86 introduced=22
- __open_2; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
+ __open_2;
__openat; # arm x86
- __openat_2; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
+ __openat_2;
__p_cdname;
__p_cdnname;
__p_class;
@@ -113,23 +113,23 @@
__p_type;
__p_type_syms; # var
__poll_chk; # introduced=23
- __ppoll; # arm x86 introduced=21
+ __ppoll; # arm x86
__ppoll_chk; # introduced=23
__ppoll64_chk; # introduced=28
__pread64_chk; # introduced=23
__pread_chk; # introduced=23
__progname; # var
- __pselect6; # arm x86 introduced=21
+ __pselect6; # arm x86
__pthread_cleanup_pop;
__pthread_cleanup_push;
__ptrace; # arm x86
__putlong;
__putshort;
- __read_chk; # introduced=21
+ __read_chk;
__readlink_chk; # introduced=23
__readlinkat_chk; # introduced=23
__reboot; # arm x86
- __recvfrom_chk; # introduced=21
+ __recvfrom_chk;
__register_atfork; # introduced=23
__res_close;
__res_dnok;
@@ -152,83 +152,83 @@
__res_send_setqhook;
__res_send_setrhook;
__rt_sigaction; # arm x86
- __rt_sigpending; # arm x86 introduced=21
+ __rt_sigpending; # arm x86
__rt_sigprocmask; # arm x86
- __rt_sigsuspend; # arm x86 introduced=21
+ __rt_sigsuspend; # arm x86
__rt_sigtimedwait; # arm x86
- __sched_cpualloc; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
- __sched_cpucount; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
- __sched_cpufree; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
- __sched_getaffinity; # arm x86 introduced=12
+ __sched_cpualloc;
+ __sched_cpucount;
+ __sched_cpufree;
+ __sched_getaffinity; # arm x86
__set_thread_area; # x86
- __set_tid_address; # arm x86 introduced=21
+ __set_tid_address; # arm x86
__set_tls; # arm
__sF; # var
- __sigaction; # arm x86 introduced=21
- __snprintf_chk; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
- __socket; # arm x86 introduced=21
- __sprintf_chk; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
+ __sigaction; # arm x86
+ __snprintf_chk;
+ __socket; # arm x86
+ __sprintf_chk;
__stack_chk_fail;
__stack_chk_guard; # var
__statfs64; # arm x86
- __stpcpy_chk; # introduced=21
- __stpncpy_chk; # introduced=21
- __stpncpy_chk2; # introduced=21
- __strcat_chk; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
- __strchr_chk; # introduced-arm=18 introduced-arm64=21 introduced-x86=18 introduced-x86_64=21
- __strcpy_chk; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
- __strlcat_chk; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
- __strlcpy_chk; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
- __strlen_chk; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
- __strncat_chk; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
- __strncpy_chk; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
- __strncpy_chk2; # introduced=21
- __strrchr_chk; # introduced-arm=18 introduced-arm64=21 introduced-x86=18 introduced-x86_64=21
+ __stpcpy_chk;
+ __stpncpy_chk;
+ __stpncpy_chk2;
+ __strcat_chk;
+ __strchr_chk;
+ __strcpy_chk;
+ __strlcat_chk;
+ __strlcpy_chk;
+ __strlen_chk;
+ __strncat_chk;
+ __strncpy_chk;
+ __strncpy_chk2;
+ __strrchr_chk;
__sym_ntop;
__sym_ntos;
__sym_ston;
__system_property_area_serial; # introduced=23
__system_property_find;
__system_property_find_nth;
- __system_property_foreach; # introduced-arm=19 introduced-arm64=21 introduced-x86=19 introduced-x86_64=21
+ __system_property_foreach;
__system_property_get;
__system_property_read;
- __system_property_serial; # introduced-arm=19 introduced-arm64=21 introduced-x86=19 introduced-x86_64=21
- __system_property_set; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
+ __system_property_serial;
+ __system_property_set;
__timer_create; # arm x86
__timer_delete; # arm x86
__timer_getoverrun; # arm x86
__timer_gettime; # arm x86
__timer_settime; # arm x86
- __umask_chk; # introduced-arm=18 introduced-arm64=21 introduced-x86=18 introduced-x86_64=21
- __vsnprintf_chk; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
- __vsprintf_chk; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
+ __umask_chk;
+ __vsnprintf_chk;
+ __vsprintf_chk;
__waitid; # arm x86
_ctype_; # var
- _Exit; # introduced=21
+ _Exit;
_exit;
_flushlbf; # introduced=23
_getlong;
_getshort;
_longjmp;
- _resolv_delete_cache_for_net; # introduced=21
- _resolv_flush_cache_for_net; # introduced=21
- _resolv_set_nameservers_for_net; # introduced=21
+ _resolv_delete_cache_for_net;
+ _resolv_flush_cache_for_net;
+ _resolv_set_nameservers_for_net;
_setjmp;
- _tolower; # introduced=21
+ _tolower;
_tolower_tab_; # arm x86 var
- _toupper; # introduced=21
+ _toupper;
_toupper_tab_; # arm x86 var
abort;
- abs; # introduced-arm=19 introduced-arm64=21 introduced-x86=19 introduced-x86_64=21
+ abs;
accept;
- accept4; # introduced=21
+ accept4;
access;
acct;
alarm;
alphasort;
- alphasort64; # introduced=21
- android_set_abort_message; # introduced=21
+ alphasort64;
+ android_set_abort_message;
arc4random;
arc4random_buf;
arc4random_uniform;
@@ -237,8 +237,8 @@
asctime64_r; # arm x86
asctime_r;
asprintf;
- at_quick_exit; # introduced=21
- atof; # introduced=21
+ at_quick_exit;
+ atof;
atoi;
atol;
atoll;
@@ -249,18 +249,18 @@
brk;
bsearch;
btowc;
- c16rtomb; # introduced=21
- c32rtomb; # introduced=21
+ c16rtomb;
+ c32rtomb;
cacheflush; # arm
calloc;
capget;
capset;
- cfgetispeed; # introduced=21
- cfgetospeed; # introduced=21
- cfmakeraw; # introduced=21
- cfsetispeed; # introduced=21
- cfsetospeed; # introduced=21
- cfsetspeed; # introduced=21
+ cfgetispeed;
+ cfgetospeed;
+ cfmakeraw;
+ cfsetispeed;
+ cfsetospeed;
+ cfsetspeed;
chdir;
chmod;
chown;
@@ -274,13 +274,13 @@
clock_gettime;
clock_nanosleep;
clock_settime;
- clone; # introduced-arm=9 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
+ clone;
close;
closedir;
closelog;
connect;
creat;
- creat64; # introduced=21
+ creat64;
ctime;
ctime64; # arm x86
ctime64_r; # arm x86
@@ -294,20 +294,20 @@
dirname_r; # arm x86
div;
dn_expand;
- dprintf; # introduced=21
+ dprintf;
drand48;
dup;
dup2;
- dup3; # introduced=21
- duplocale; # introduced=21
- endmntent; # introduced=21
+ dup3;
+ duplocale;
+ endmntent;
endservent;
endutent;
environ; # var
epoll_create;
- epoll_create1; # introduced=21
+ epoll_create1;
epoll_ctl;
- epoll_pwait; # introduced=21
+ epoll_pwait;
epoll_wait;
erand48;
err;
@@ -317,10 +317,10 @@
error_one_per_line; # var introduced=23
error_print_progname; # var introduced=23
errx;
- ether_aton; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
- ether_aton_r; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
- ether_ntoa; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
- ether_ntoa_r; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
+ ether_aton;
+ ether_aton_r;
+ ether_ntoa;
+ ether_ntoa_r;
eventfd;
eventfd_read;
eventfd_write;
@@ -330,11 +330,11 @@
execv;
execve;
execvp;
- execvpe; # introduced=21
+ execvpe;
exit;
faccessat;
- fallocate; # introduced=21
- fallocate64; # introduced=21
+ fallocate;
+ fallocate64;
fchdir;
fchmod;
fchmodat;
@@ -351,7 +351,7 @@
ferror;
ferror_unlocked; # introduced=23
fflush;
- ffs; # introduced-arm=9 introduced-arm64=21 introduced-x86=18 introduced-x86_64=21
+ ffs;
fgetc;
fgetln;
fgetpos;
@@ -378,7 +378,7 @@
fread;
free;
freeaddrinfo;
- freelocale; # introduced=21
+ freelocale;
fremovexattr;
freopen;
fscanf;
@@ -387,30 +387,30 @@
fsetpos;
fsetxattr;
fstat;
- fstat64; # introduced=21
+ fstat64;
fstatat;
- fstatat64; # introduced=21
+ fstatat64;
fstatfs;
- fstatfs64; # introduced=21
- fstatvfs; # introduced-arm=19 introduced-arm64=21 introduced-x86=19 introduced-x86_64=21
- fstatvfs64; # introduced=21
+ fstatfs64;
+ fstatvfs;
+ fstatvfs64;
fsync;
ftell;
ftello;
ftok;
ftruncate;
- ftruncate64; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
+ ftruncate64;
ftrylockfile;
- fts_children; # introduced=21
- fts_close; # introduced=21
- fts_open; # introduced=21
- fts_read; # introduced=21
- fts_set; # introduced=21
- ftw; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
- ftw64; # introduced=21
+ fts_children;
+ fts_close;
+ fts_open;
+ fts_read;
+ fts_set;
+ ftw;
+ ftw64;
funlockfile;
funopen;
- futimens; # introduced-arm=19 introduced-arm64=21 introduced-x86=19 introduced-x86_64=21
+ futimens;
fwide;
fwprintf;
fwrite;
@@ -421,13 +421,13 @@
get_nprocs_conf; # introduced=23
get_phys_pages; # introduced=23
getaddrinfo;
- getauxval; # introduced-arm=18 introduced-arm64=21 introduced-x86=18 introduced-x86_64=21
+ getauxval;
getc;
getc_unlocked;
getchar;
getchar_unlocked;
getcwd;
- getdelim; # introduced-arm=18 introduced-arm64=21 introduced-x86=18 introduced-x86_64=21
+ getdelim;
getegid;
getenv;
geteuid;
@@ -445,41 +445,41 @@
gethostent;
gethostname;
getitimer;
- getline; # introduced-arm=18 introduced-arm64=21 introduced-x86=18 introduced-x86_64=21
+ getline;
getlogin;
getmntent;
- getmntent_r; # introduced=21
+ getmntent_r;
getnameinfo;
getnetbyaddr;
getnetbyname;
getopt;
getopt_long;
getopt_long_only;
- getpagesize; # introduced=21
+ getpagesize;
getpeername;
getpgid;
getpgrp;
getpid;
getppid;
getpriority;
- getprogname; # introduced=21
+ getprogname;
getprotobyname;
getprotobynumber;
getpt;
getpwnam;
- getpwnam_r; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
+ getpwnam_r;
getpwuid;
- getpwuid_r; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
+ getpwuid_r;
getresgid;
getresuid;
getrlimit;
- getrlimit64; # introduced=21
+ getrlimit64;
getrusage;
gets;
getservbyname;
getservbyport;
getservent;
- getsid; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
+ getsid;
getsockname;
getsockopt;
gettid;
@@ -493,21 +493,21 @@
gmtime64; # arm x86
gmtime64_r; # arm x86
gmtime_r;
- grantpt; # introduced=21
+ grantpt;
herror;
hstrerror;
- htonl; # introduced=21
- htons; # introduced=21
+ htonl;
+ htons;
if_indextoname;
if_nametoindex;
- imaxabs; # introduced-arm=19 introduced-arm64=21 introduced-x86=19 introduced-x86_64=21
- imaxdiv; # introduced-arm=19 introduced-arm64=21 introduced-x86=19 introduced-x86_64=21
+ imaxabs;
+ imaxdiv;
inet_addr;
inet_aton;
- inet_lnaof; # introduced=21
- inet_makeaddr; # introduced=21
- inet_netof; # introduced=21
- inet_network; # introduced=21
+ inet_lnaof;
+ inet_makeaddr;
+ inet_netof;
+ inet_network;
inet_nsap_addr;
inet_nsap_ntoa;
inet_ntoa;
@@ -515,96 +515,96 @@
inet_pton;
init_module;
initgroups;
- initstate; # introduced=21
+ initstate;
inotify_add_watch;
inotify_init;
- inotify_init1; # introduced=21
+ inotify_init1;
inotify_rm_watch;
- insque; # introduced=21
+ insque;
ioctl;
isalnum;
- isalnum_l; # introduced=21
+ isalnum_l;
isalpha;
- isalpha_l; # introduced=21
+ isalpha_l;
isascii;
isatty;
isblank;
- isblank_l; # introduced=21
+ isblank_l;
iscntrl;
- iscntrl_l; # introduced=21
+ iscntrl_l;
isdigit;
- isdigit_l; # introduced=21
- isfinite; # introduced=21
- isfinitef; # introduced=21
- isfinitel; # introduced=21
+ isdigit_l;
+ isfinite;
+ isfinitef;
+ isfinitel;
isgraph;
- isgraph_l; # introduced=21
- isinf; # introduced=21
- isinff; # introduced=21
- isinfl; # introduced=21
+ isgraph_l;
+ isinf;
+ isinff;
+ isinfl;
islower;
- islower_l; # introduced=21
+ islower_l;
isnan;
isnanf;
- isnanl; # introduced=21
- isnormal; # introduced=21
- isnormalf; # introduced=21
- isnormall; # introduced=21
+ isnanl;
+ isnormal;
+ isnormalf;
+ isnormall;
isprint;
- isprint_l; # introduced=21
+ isprint_l;
ispunct;
- ispunct_l; # introduced=21
+ ispunct_l;
isspace;
- isspace_l; # introduced=21
+ isspace_l;
isupper;
- isupper_l; # introduced=21
+ isupper_l;
iswalnum;
- iswalnum_l; # introduced=21
+ iswalnum_l;
iswalpha;
- iswalpha_l; # introduced=21
- iswblank; # introduced=21
- iswblank_l; # introduced=21
+ iswalpha_l;
+ iswblank;
+ iswblank_l;
iswcntrl;
- iswcntrl_l; # introduced=21
+ iswcntrl_l;
iswctype;
- iswctype_l; # introduced=21
+ iswctype_l;
iswdigit;
- iswdigit_l; # introduced=21
+ iswdigit_l;
iswgraph;
- iswgraph_l; # introduced=21
+ iswgraph_l;
iswlower;
- iswlower_l; # introduced=21
+ iswlower_l;
iswprint;
- iswprint_l; # introduced=21
+ iswprint_l;
iswpunct;
- iswpunct_l; # introduced=21
+ iswpunct_l;
iswspace;
- iswspace_l; # introduced=21
+ iswspace_l;
iswupper;
- iswupper_l; # introduced=21
+ iswupper_l;
iswxdigit;
- iswxdigit_l; # introduced=21
+ iswxdigit_l;
isxdigit;
- isxdigit_l; # introduced=21
+ isxdigit_l;
jrand48;
kill;
killpg;
klogctl;
- labs; # introduced-arm=19 introduced-arm64=21 introduced-x86=19 introduced-x86_64=21
+ labs;
lchown;
lcong48; # introduced=23
ldexp;
ldiv;
- lfind; # introduced=21
+ lfind;
lgetxattr;
link;
- linkat; # introduced=21
+ linkat;
listen;
listxattr;
- llabs; # introduced-arm=19 introduced-arm64=21 introduced-x86=19 introduced-x86_64=21
+ llabs;
lldiv;
llistxattr;
- localeconv; # introduced=21
+ localeconv;
localtime;
localtime64; # arm x86
localtime64_r; # arm x86
@@ -613,26 +613,26 @@
longjmp;
lrand48;
lremovexattr;
- lsearch; # introduced=21
+ lsearch;
lseek;
lseek64;
lsetxattr;
lstat;
- lstat64; # introduced=21
+ lstat64;
madvise;
mallinfo;
malloc;
malloc_info; # introduced=23
- malloc_usable_size; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
+ malloc_usable_size;
mbrlen;
- mbrtoc16; # introduced=21
- mbrtoc32; # introduced=21
+ mbrtoc16;
+ mbrtoc32;
mbrtowc;
mbsinit;
- mbsnrtowcs; # introduced=21
+ mbsnrtowcs;
mbsrtowcs;
- mbstowcs; # introduced=21
- mbtowc; # introduced=21
+ mbstowcs;
+ mbtowc;
memalign;
memccpy;
memchr;
@@ -647,37 +647,37 @@
mkdir;
mkdirat;
mkdtemp;
- mkfifo; # introduced=21
+ mkfifo;
mkfifoat; # introduced=23
mknod;
- mknodat; # introduced=21
+ mknodat;
mkostemp; # introduced=23
mkostemp64; # introduced=23
mkostemps; # introduced=23
mkostemps64; # introduced=23
mkstemp;
- mkstemp64; # introduced=21
+ mkstemp64;
mkstemps;
mkstemps64; # introduced=23
mktemp;
mktime;
mktime64; # arm x86
mlock;
- mlockall; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
+ mlockall;
mmap;
- mmap64; # introduced=21
+ mmap64;
mount;
mprotect;
mrand48;
mremap;
msync;
munlock;
- munlockall; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
+ munlockall;
munmap;
nanosleep;
- newlocale; # introduced=21
- nftw; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
- nftw64; # introduced=21
+ newlocale;
+ nftw;
+ nftw64;
nice;
nrand48;
ns_format_ttl; # arm64 x86_64 riscv64 introduced=22
@@ -703,14 +703,14 @@
ns_sprintrr; # arm64 x86_64 riscv64 introduced=22
ns_sprintrrf; # arm64 x86_64 riscv64 introduced=22
nsdispatch;
- ntohl; # introduced=21
- ntohs; # introduced=21
+ ntohl;
+ ntohs;
open;
- open64; # introduced=21
+ open64;
open_memstream; # introduced=23
open_wmemstream; # introduced=23
openat;
- openat64; # introduced=21
+ openat64;
opendir;
openlog;
openpty; # introduced=23
@@ -728,26 +728,26 @@
pipe2;
poll;
popen;
- posix_fadvise; # introduced=21
- posix_fadvise64; # introduced=21
- posix_fallocate; # introduced=21
- posix_fallocate64; # introduced=21
+ posix_fadvise;
+ posix_fadvise64;
+ posix_fallocate;
+ posix_fallocate64;
posix_madvise; # introduced=23
- posix_memalign; # introduced=17
- posix_openpt; # introduced=21
- ppoll; # introduced=21
+ posix_memalign;
+ posix_openpt;
+ ppoll;
prctl;
pread;
- pread64; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
+ pread64;
printf;
prlimit; # arm64 x86_64 riscv64
- prlimit64; # introduced=21
+ prlimit64;
process_vm_readv; # introduced=23
process_vm_writev; # introduced=23
pselect;
- psiginfo; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
- psignal; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
- pthread_atfork; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
+ psiginfo;
+ psignal;
+ pthread_atfork;
pthread_attr_destroy;
pthread_attr_getdetachstate;
pthread_attr_getguardsize;
@@ -770,15 +770,15 @@
pthread_cond_signal;
pthread_cond_timedwait;
pthread_cond_timedwait_monotonic; # arm x86
- pthread_cond_timedwait_monotonic_np; # introduced-arm=9 introduced-x86=9 introduced-arm64=28 introduced-x64_64=28
+ pthread_cond_timedwait_monotonic_np; # introduced-arm=9 introduced-x86=9 introduced-arm64=28 introduced-x64_64=28 introduced-riscv64=28
pthread_cond_timedwait_relative_np; # arm x86
pthread_cond_timeout_np; # arm x86
pthread_cond_wait;
pthread_condattr_destroy;
- pthread_condattr_getclock; # introduced=21
+ pthread_condattr_getclock;
pthread_condattr_getpshared;
pthread_condattr_init;
- pthread_condattr_setclock; # introduced=21
+ pthread_condattr_setclock;
pthread_condattr_setpshared;
pthread_create;
pthread_detach;
@@ -788,7 +788,7 @@
pthread_getcpuclockid;
pthread_getschedparam;
pthread_getspecific;
- pthread_gettid_np; # introduced=21
+ pthread_gettid_np;
pthread_join;
pthread_key_create;
pthread_key_delete;
@@ -797,7 +797,7 @@
pthread_mutex_init;
pthread_mutex_lock;
pthread_mutex_lock_timeout_np; # arm x86
- pthread_mutex_timedlock; # introduced=21
+ pthread_mutex_timedlock;
pthread_mutex_trylock;
pthread_mutex_unlock;
pthread_mutexattr_destroy;
@@ -840,30 +840,31 @@
putw; # arm x86
putwc;
putwchar;
- pvalloc; # arm x86 introduced=17
+ pvalloc; # arm x86
pwrite;
- pwrite64; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
+ pwrite64;
qsort;
- quick_exit; # introduced=21
+ qsort_r; # introduced=36
+ quick_exit;
raise;
- rand; # introduced=21
- rand_r; # introduced=21
- random; # introduced=21
+ rand;
+ rand_r;
+ random;
read;
readahead;
readdir;
- readdir64; # introduced=21
- readdir64_r; # introduced=21
+ readdir64;
+ readdir64_r;
readdir_r;
readlink;
- readlinkat; # introduced=21
+ readlinkat;
readv;
realloc;
realpath;
reboot;
recv;
recvfrom;
- recvmmsg; # introduced=21
+ recvmmsg;
recvmsg;
regcomp;
regerror;
@@ -871,7 +872,7 @@
regfree;
remove;
removexattr;
- remque; # introduced=21
+ remque;
rename;
renameat;
res_init;
@@ -883,16 +884,16 @@
rmdir;
sbrk;
scandir;
- scandir64; # introduced=21
+ scandir64;
scanf;
sched_get_priority_max;
sched_get_priority_min;
- sched_getaffinity; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
- sched_getcpu; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
+ sched_getaffinity;
+ sched_getcpu;
sched_getparam;
sched_getscheduler;
sched_rr_get_interval;
- sched_setaffinity; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
+ sched_setaffinity;
sched_setparam;
sched_setscheduler;
sched_yield;
@@ -911,8 +912,8 @@
sem_wait;
send;
sendfile;
- sendfile64; # introduced=21
- sendmmsg; # introduced=21
+ sendfile64;
+ sendmmsg;
sendmsg;
sendto;
setbuf;
@@ -920,8 +921,8 @@
setegid;
setenv;
seteuid;
- setfsgid; # introduced=21
- setfsuid; # introduced=21
+ setfsgid;
+ setfsuid;
setgid;
setgroups;
sethostname; # introduced=23
@@ -930,22 +931,22 @@
setlinebuf;
setlocale;
setlogmask;
- setmntent; # introduced=21
- setns; # introduced=21
+ setmntent;
+ setns;
setpgid;
setpgrp;
setpriority;
- setprogname; # introduced=21
+ setprogname;
setregid;
setresgid;
setresuid;
setreuid;
setrlimit;
- setrlimit64; # introduced=21
+ setrlimit64;
setservent;
setsid;
setsockopt;
- setstate; # introduced=21
+ setstate;
settimeofday;
setuid;
setutent;
@@ -953,22 +954,22 @@
setxattr;
shutdown;
sigaction;
- sigaddset; # introduced=21
+ sigaddset;
sigaltstack;
- sigblock; # arm x86 arm64 x86_64
- sigdelset; # introduced=21
- sigemptyset; # introduced=21
- sigfillset; # introduced=21
+ sigblock;
+ sigdelset;
+ sigemptyset;
+ sigfillset;
siginterrupt;
- sigismember; # introduced=21
- siglongjmp; # introduced-arm=9 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
- signal; # introduced=21
- signalfd; # introduced-arm=18 introduced-arm64=21 introduced-x86=18 introduced-x86_64=21
+ sigismember;
+ siglongjmp;
+ signal;
+ signalfd;
sigpending;
sigprocmask;
sigqueue; # introduced=23
- sigsetjmp; # introduced-arm=9 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
- sigsetmask; # arm x86 arm64 x86_64
+ sigsetjmp;
+ sigsetmask;
sigsuspend;
sigtimedwait; # introduced=23
sigwait;
@@ -977,23 +978,23 @@
snprintf;
socket;
socketpair;
- splice; # introduced=21
+ splice;
sprintf;
- srand; # introduced=21
+ srand;
srand48;
- srandom; # introduced=21
+ srandom;
sscanf;
stat;
- stat64; # introduced=21
+ stat64;
statfs;
- statfs64; # introduced=21
- statvfs; # introduced-arm=19 introduced-arm64=21 introduced-x86=19 introduced-x86_64=21
- statvfs64; # introduced=21
+ statfs64;
+ statvfs;
+ statvfs64;
stderr; # var introduced=23
stdin; # var introduced=23
stdout; # var introduced=23
- stpcpy; # introduced=21
- stpncpy; # introduced=21
+ stpcpy;
+ stpncpy;
strcasecmp;
strcasecmp_l; # introduced=23
strcasestr;
@@ -1001,7 +1002,7 @@
strchr;
strcmp;
strcoll;
- strcoll_l; # introduced=21
+ strcoll_l;
strcpy;
strcspn;
strdup;
@@ -1009,7 +1010,7 @@
strerror_l; # introduced=23
strerror_r;
strftime;
- strftime_l; # introduced=21
+ strftime_l;
strlcat;
strlcpy;
strlen;
@@ -1028,27 +1029,27 @@
strspn;
strstr;
strtod;
- strtof; # introduced=21
+ strtof;
strtoimax;
strtok;
strtok_r;
strtol;
- strtold; # introduced=21
- strtold_l; # introduced=21
+ strtold;
+ strtold_l;
strtoll;
- strtoll_l; # introduced=21
+ strtoll_l;
strtoul;
strtoull;
- strtoull_l; # introduced=21
+ strtoull_l;
strtoumax;
strxfrm;
- strxfrm_l; # introduced=21
- swapoff; # introduced-arm=19 introduced-arm64=21 introduced-x86=19 introduced-x86_64=21
- swapon; # introduced-arm=19 introduced-arm64=21 introduced-x86=19 introduced-x86_64=21
+ strxfrm_l;
+ swapoff;
+ swapon;
swprintf;
swscanf;
symlink;
- symlinkat; # introduced=21
+ symlinkat;
sync;
sys_siglist; # var
sys_signame; # var
@@ -1057,54 +1058,54 @@
sysinfo;
syslog;
system;
- tcdrain; # introduced=21
- tcflow; # introduced=21
- tcflush; # introduced=21
- tcgetattr; # introduced=21
+ tcdrain;
+ tcflow;
+ tcflush;
+ tcgetattr;
tcgetpgrp;
- tcgetsid; # introduced=21
- tcsendbreak; # introduced=21
- tcsetattr; # introduced=21
+ tcgetsid;
+ tcsendbreak;
+ tcsetattr;
tcsetpgrp;
tdelete;
tdestroy;
- tee; # introduced=21
+ tee;
telldir; # introduced=23
tempnam;
tfind;
tgkill;
time;
- timegm; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
+ timegm;
timegm64; # arm x86
- timelocal; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
+ timelocal;
timelocal64; # arm x86
timer_create;
timer_delete;
timer_getoverrun;
timer_gettime;
timer_settime;
- timerfd_create; # introduced-arm=19 introduced-arm64=21 introduced-x86=19 introduced-x86_64=21
- timerfd_gettime; # introduced-arm=19 introduced-arm64=21 introduced-x86=19 introduced-x86_64=21
- timerfd_settime; # introduced-arm=19 introduced-arm64=21 introduced-x86=19 introduced-x86_64=21
+ timerfd_create;
+ timerfd_gettime;
+ timerfd_settime;
times;
timezone; # var
tmpfile;
tmpnam;
toascii;
tolower;
- tolower_l; # introduced=21
+ tolower_l;
toupper;
- toupper_l; # introduced=21
+ toupper_l;
towlower;
- towlower_l; # introduced=21
+ towlower_l;
towupper;
- towupper_l; # introduced=21
+ towupper_l;
truncate;
- truncate64; # introduced=21
+ truncate64;
tsearch;
ttyname;
ttyname_r;
- twalk; # introduced=21
+ twalk;
tzname; # var
tzset;
umask;
@@ -1117,16 +1118,16 @@
unlinkat;
unlockpt;
unsetenv;
- unshare; # introduced-arm=17 introduced-arm64=21 introduced-x86=17 introduced-x86_64=21
- uselocale; # introduced=21
+ unshare;
+ uselocale;
usleep;
utime;
- utimensat; # introduced-arm=12 introduced-arm64=21 introduced-x86=12 introduced-x86_64=21
+ utimensat;
utimes;
utmpname;
valloc; # arm x86
vasprintf;
- vdprintf; # introduced=21
+ vdprintf;
verr;
verrx;
vfdprintf; # arm x86 versioned=28
@@ -1134,22 +1135,22 @@
vfprintf;
vfscanf;
vfwprintf;
- vfwscanf; # introduced=21
- vmsplice; # introduced=21
+ vfwscanf;
+ vmsplice;
vprintf;
vscanf;
vsnprintf;
vsprintf;
vsscanf;
vswprintf;
- vswscanf; # introduced=21
+ vswscanf;
vsyslog;
vwarn;
vwarnx;
vwprintf;
- vwscanf; # introduced=21
+ vwscanf;
wait;
- wait4; # introduced-arm=18 introduced-arm64=21 introduced-x86=18 introduced-x86_64=21
+ wait4;
waitid;
waitpid;
warn;
@@ -1163,7 +1164,7 @@
wcschr;
wcscmp;
wcscoll;
- wcscoll_l; # introduced=21
+ wcscoll_l;
wcscpy;
wcscspn;
wcsdup;
@@ -1177,33 +1178,33 @@
wcsncmp;
wcsncpy;
wcsnlen;
- wcsnrtombs; # introduced=21
+ wcsnrtombs;
wcspbrk;
wcsrchr;
wcsrtombs;
wcsspn;
wcsstr;
wcstod;
- wcstof; # introduced=21
- wcstoimax; # introduced=21
+ wcstof;
+ wcstoimax;
wcstok;
wcstol;
- wcstold; # introduced=21
- wcstold_l; # introduced=21
- wcstoll; # introduced=21
- wcstoll_l; # introduced=21
- wcstombs; # introduced=21
+ wcstold;
+ wcstold_l;
+ wcstoll;
+ wcstoll_l;
+ wcstombs;
wcstoul;
- wcstoull; # introduced=21
- wcstoull_l; # introduced=21
- wcstoumax; # introduced=21
+ wcstoull;
+ wcstoull_l;
+ wcstoumax;
wcswidth;
wcsxfrm;
- wcsxfrm_l; # introduced=21
+ wcsxfrm_l;
wctob;
- wctomb; # introduced=21
+ wctomb;
wctype;
- wctype_l; # introduced=21
+ wctype_l;
wcwidth;
wmemchr;
wmemcmp;
@@ -1341,7 +1342,7 @@
wctrans_l; # introduced=26
} LIBC_N;
-LIBC_P { # introduced=P
+LIBC_P { # introduced=28
global:
__freading;
__free_hook;
@@ -1442,7 +1443,7 @@
wcstoul_l;
} LIBC_O;
-LIBC_Q { # introduced=Q
+LIBC_Q { # introduced=29
global:
___tls_get_addr; # x86
__aeabi_read_tp; # arm
@@ -1478,7 +1479,7 @@
android_mallopt; # apex llndk
} LIBC_P;
-LIBC_R { # introduced=R
+LIBC_R { # introduced=30
global:
__mempcpy_chk;
__tls_get_addr; # arm64
@@ -1548,7 +1549,7 @@
_Unwind_VRS_Set; # arm
} LIBC_Q;
-LIBC_S { # introduced=S
+LIBC_S { # introduced=31
global:
__libc_get_static_tls_bounds;
__libc_register_thread_exit_callback;
@@ -1563,7 +1564,7 @@
process_madvise;
} LIBC_R;
-LIBC_T { # introduced=Tiramisu
+LIBC_T { # introduced=33
global:
backtrace;
backtrace_symbols;
@@ -1574,7 +1575,7 @@
pwritev64v2;
} LIBC_S;
-LIBC_U { # introduced=UpsideDownCake
+LIBC_U { # introduced=34
global:
__freadahead;
close_range;
@@ -1584,7 +1585,7 @@
posix_spawn_file_actions_addfchdir_np;
} LIBC_T;
-LIBC_V { # introduced=VanillaIceCream
+LIBC_V { # introduced=35
global:
android_crash_detail_register;
android_crash_detail_unregister;
diff --git a/libc/upstream-freebsd/lib/libc/stdlib/qsort_r.c b/libc/upstream-freebsd/lib/libc/stdlib/qsort_r.c
new file mode 100644
index 0000000..b382b40
--- /dev/null
+++ b/libc/upstream-freebsd/lib/libc/stdlib/qsort_r.c
@@ -0,0 +1,6 @@
+/*
+ * This file is in the public domain. Originally written by Garrett
+ * A. Wollman.
+ */
+#define I_AM_QSORT_R
+#include "qsort.c"
diff --git a/libfdtrack/fdtrack.cpp b/libfdtrack/fdtrack.cpp
index 3627c84..e446f56 100644
--- a/libfdtrack/fdtrack.cpp
+++ b/libfdtrack/fdtrack.cpp
@@ -269,8 +269,10 @@
if (fatal) {
// Find the most common stack.
size_t max = 0;
+ size_t total = 0;
StackInfo* stack = nullptr;
for (size_t i = 0; i < stacks.count; ++i) {
+ total += stacks.data[i].count;
if (stacks.data[i].count > max) {
stack = &stacks.data[i];
max = stack->count;
@@ -287,7 +289,7 @@
char* p = buf;
p += async_safe_format_buffer(buf, sizeof(buf),
"aborting due to fd leak: see \"open files\" in the tombstone; "
- "most common stack (%zu/%zu) is\n", max, stacks.count);
+ "most common stack (%zu/%zu) is\n", max, total);
for (size_t i = 0; i < stack->stack_depth; ++i) {
ssize_t bytes_left = buf + sizeof(buf) - p;
diff --git a/libm/Android.bp b/libm/Android.bp
index 00d90a0..9fd79f8 100644
--- a/libm/Android.bp
+++ b/libm/Android.bp
@@ -161,8 +161,6 @@
"upstream-freebsd/lib/msun/src/s_nextafterf.c",
"upstream-freebsd/lib/msun/src/s_remquo.c",
"upstream-freebsd/lib/msun/src/s_remquof.c",
- "upstream-freebsd/lib/msun/src/s_rint.c",
- "upstream-freebsd/lib/msun/src/s_rintf.c",
"upstream-freebsd/lib/msun/src/s_round.c",
"upstream-freebsd/lib/msun/src/s_roundf.c",
"upstream-freebsd/lib/msun/src/s_scalbln.c",
@@ -179,17 +177,15 @@
"upstream-freebsd/lib/msun/src/s_tanh.c",
"upstream-freebsd/lib/msun/src/s_tanhf.c",
"upstream-freebsd/lib/msun/src/s_tgammaf.c",
- "upstream-freebsd/lib/msun/src/s_trunc.c",
- "upstream-freebsd/lib/msun/src/s_truncf.c",
"upstream-freebsd/lib/msun/src/w_cabs.c",
"upstream-freebsd/lib/msun/src/w_cabsf.c",
"upstream-freebsd/lib/msun/src/w_cabsl.c",
"upstream-freebsd/lib/msun/src/w_drem.c",
"upstream-freebsd/lib/msun/src/w_dremf.c",
- // The FreeBSD complex functions appear to be better, but they're incomplete.
- // We take the FreeBSD implementations when they exist, but fill out the rest
- // of <complex.h> from NetBSD...
+ // The FreeBSD complex function implementations appear to be better
+ // than the other BSDs', but they're incomplete. We take the FreeBSD
+ // implementations when they exist, but fill out the rest from NetBSD...
"upstream-netbsd/lib/libm/complex/ccoshl.c",
"upstream-netbsd/lib/libm/complex/ccosl.c",
"upstream-netbsd/lib/libm/complex/cephes_subrl.c",
@@ -275,10 +271,23 @@
arch: {
arm: {
srcs: [
- "arm/fenv.c",
- "upstream-freebsd/lib/msun/src/s_ceil.c",
- "upstream-freebsd/lib/msun/src/s_ceilf.c",
+ "fenv-arm.c",
],
+ armv7_a_neon: {
+ // armv7 arm32 has no instructions to implement these as
+ // builtins, so we build the portable implementations for armv7,
+ // because the NDK still supports armv7.
+ srcs: [
+ "upstream-freebsd/lib/msun/src/s_ceil.c",
+ "upstream-freebsd/lib/msun/src/s_ceilf.c",
+ "upstream-freebsd/lib/msun/src/s_floor.c",
+ "upstream-freebsd/lib/msun/src/s_floorf.c",
+ "upstream-freebsd/lib/msun/src/s_rint.c",
+ "upstream-freebsd/lib/msun/src/s_rintf.c",
+ "upstream-freebsd/lib/msun/src/s_trunc.c",
+ "upstream-freebsd/lib/msun/src/s_truncf.c",
+ ],
+ },
instruction_set: "arm",
version_script: ":libm.arm.map",
no_libcrt: true,
@@ -292,7 +301,7 @@
arm64: {
srcs: [
- "arm64/fenv.c",
+ "fenv-arm64.c",
],
exclude_srcs: [
"upstream-freebsd/lib/msun/src/s_fma.c",
@@ -309,19 +318,15 @@
"upstream-freebsd/lib/msun/src/s_lrintf.c",
"upstream-freebsd/lib/msun/src/s_lround.c",
"upstream-freebsd/lib/msun/src/s_lroundf.c",
- "upstream-freebsd/lib/msun/src/s_rint.c",
- "upstream-freebsd/lib/msun/src/s_rintf.c",
"upstream-freebsd/lib/msun/src/s_round.c",
"upstream-freebsd/lib/msun/src/s_roundf.c",
- "upstream-freebsd/lib/msun/src/s_trunc.c",
- "upstream-freebsd/lib/msun/src/s_truncf.c",
],
version_script: ":libm.arm64.map",
},
riscv64: {
srcs: [
- "riscv64/fenv.c",
+ "fenv-riscv64.c",
],
exclude_srcs: [
@@ -339,31 +344,22 @@
"upstream-freebsd/lib/msun/src/s_lrintf.c",
"upstream-freebsd/lib/msun/src/s_lround.c",
"upstream-freebsd/lib/msun/src/s_lroundf.c",
- "upstream-freebsd/lib/msun/src/s_rint.c",
- "upstream-freebsd/lib/msun/src/s_rintf.c",
"upstream-freebsd/lib/msun/src/s_round.c",
"upstream-freebsd/lib/msun/src/s_roundf.c",
- "upstream-freebsd/lib/msun/src/s_trunc.c",
- "upstream-freebsd/lib/msun/src/s_truncf.c",
],
version_script: ":libm.riscv64.map",
},
x86: {
srcs: [
- "i387/fenv.c",
- "x86/lrint.S",
- "x86/lrintf.S",
+ "fenv-x86.c",
],
exclude_srcs: [
+ "upstream-freebsd/lib/msun/src/s_llrint.c",
+ "upstream-freebsd/lib/msun/src/s_llrintf.c",
"upstream-freebsd/lib/msun/src/s_lrint.c",
"upstream-freebsd/lib/msun/src/s_lrintf.c",
- "upstream-freebsd/lib/msun/src/s_rint.c",
- "upstream-freebsd/lib/msun/src/s_rintf.c",
- "upstream-freebsd/lib/msun/src/s_trunc.c",
- "upstream-freebsd/lib/msun/src/s_truncf.c",
],
- local_include_dirs: ["i387"],
// The x86 ABI doesn't include this, which is needed for the
// roundss/roundsd instructions that we've used since Android M.
cflags: ["-msse4.1"],
@@ -372,19 +368,13 @@
x86_64: {
srcs: [
- "amd64/fenv.c",
- "x86_64/lrint.S",
- "x86_64/lrintf.S",
+ "fenv-x86_64.c",
],
exclude_srcs: [
"upstream-freebsd/lib/msun/src/s_llrint.c",
"upstream-freebsd/lib/msun/src/s_llrintf.c",
"upstream-freebsd/lib/msun/src/s_lrint.c",
"upstream-freebsd/lib/msun/src/s_lrintf.c",
- "upstream-freebsd/lib/msun/src/s_rint.c",
- "upstream-freebsd/lib/msun/src/s_rintf.c",
- "upstream-freebsd/lib/msun/src/s_trunc.c",
- "upstream-freebsd/lib/msun/src/s_truncf.c",
],
version_script: ":libm.x86_64.map",
},
@@ -396,10 +386,7 @@
],
cflags: [
- "-D_BSD_SOURCE",
- "-DFLT_EVAL_METHOD=0",
"-include freebsd-compat.h",
- "-include fenv-access.h",
"-fno-builtin",
"-fno-math-errno",
"-Wall",
@@ -503,6 +490,8 @@
cmd: "$(location generate-version-script) x86_64 $(in) $(out)",
}
+// Because of a historical accidnt, ldexp() is in libc,
+// even though ldexpf() and ldexpl() are in libm.
filegroup {
name: "libc_ldexp_srcs",
srcs: ["upstream-freebsd/lib/msun/src/s_scalbn.c"],
diff --git a/libm/NOTICE b/libm/NOTICE
index 3c0e783..bcdce54 100644
--- a/libm/NOTICE
+++ b/libm/NOTICE
@@ -244,34 +244,6 @@
-------------------------------------------------------------------
-Copyright (C) 2021 The Android Open Source Project
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
--------------------------------------------------------------------
-
Copyright (C) 2022 The Android Open Source Project
All rights reserved.
@@ -540,36 +512,6 @@
-------------------------------------------------------------------
-Copyright (c) 2014, Intel Corporation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
-
- * Neither the name of Intel Corporation nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------------------------------------------------------
-
Copyright (c) 2017 Steven G. Kargl
All rights reserved.
@@ -622,17 +564,6 @@
-------------------------------------------------------------------
-From: @(#)s_ilogb.c 5.1 93/09/24
-====================================================
-Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
-
-Developed at SunPro, a Sun Microsystems, Inc. business.
-Permission to use, copy, modify, and distribute this
-software is freely granted, provided that this notice
-is preserved.
-
--------------------------------------------------------------------
-
SPDX-License-Identifier: BSD-2-Clause
Copyright (c) 2003, Steven G. Kargl
diff --git a/libm/builtins.cpp b/libm/builtins.cpp
index 41e145b..97db425 100644
--- a/libm/builtins.cpp
+++ b/libm/builtins.cpp
@@ -18,13 +18,12 @@
#include "fpmath.h"
-double fabs(double x) { return __builtin_fabs(x); }
-float fabsf(float x) { return __builtin_fabsf(x); }
-long double fabsl(long double x) { return __builtin_fabsl(x); }
-
-#if defined(__aarch64__) || defined(__riscv) || defined(__i386__) || defined(__x86_64__)
-float ceilf(float x) { return __builtin_ceilf(x); }
+#if defined(__arm__) && (__ARM_ARCH <= 7)
+// armv7 arm32 has no instructions to implement these builtins,
+// so we include the msun source in the .bp file instead.
+#else
double ceil(double x) { return __builtin_ceil(x); }
+float ceilf(float x) { return __builtin_ceilf(x); }
#if defined(__ILP32__)
__weak_reference(ceil, ceill);
#endif
@@ -34,21 +33,16 @@
float copysignf(float x, float y) { return __builtin_copysignf(x, y); }
long double copysignl(long double x, long double y) { return __builtin_copysignl(x, y); }
-#if defined(__arm__) && (__ARM_ARCH < 8)
-// armv8 arm32 has a single-instruction implementation for these, but
-// armv7 arm32 doesn't, so __builtin_ doesn't work for arm32.
-#include "math_private.h"
-namespace s_floor {
-#include "upstream-freebsd/lib/msun/src/s_floor.c"
-}
-namespace s_floorf {
-#include "upstream-freebsd/lib/msun/src/s_floorf.c"
-}
-float floorf(float x) { return s_floorf::floorf(x); }
-double floor(double x) { return s_floor::floor(x); }
+double fabs(double x) { return __builtin_fabs(x); }
+float fabsf(float x) { return __builtin_fabsf(x); }
+long double fabsl(long double x) { return __builtin_fabsl(x); }
+
+#if defined(__arm__) && (__ARM_ARCH <= 7)
+// armv7 arm32 has no instructions to implement these builtins,
+// so we include the msun source in the .bp file instead.
#else
-float floorf(float x) { return __builtin_floorf(x); }
double floor(double x) { return __builtin_floor(x); }
+float floorf(float x) { return __builtin_floorf(x); }
#if defined(__ILP32__)
__weak_reference(floor, floorl);
#endif
@@ -65,7 +59,7 @@
double fmin(double x, double y) { return __builtin_fmin(x, y); }
#endif
-#if defined(__aarch64__) || defined(__riscv)
+#if defined(__aarch64__) || defined(__riscv) || defined(__i386__) || defined(__x86_64__)
long lrint(double x) { return __builtin_lrint(x); }
long lrintf(float x) { return __builtin_lrintf(x); }
long long llrint(double x) { return __builtin_llrint(x); }
@@ -79,28 +73,34 @@
long long llroundf(float x) { return __builtin_llroundf(x); }
#endif
-#if defined(__aarch64__) || defined(__riscv) || defined(__i386__) || defined(__x86_64__)
-float rintf(float x) { return __builtin_rintf(x); }
+#if defined(__arm__) && (__ARM_ARCH <= 7)
+// armv7 arm32 has no instructions to implement these builtins,
+// so we include the msun source in the .bp file instead.
+#else
double rint(double x) { return __builtin_rint(x); }
+float rintf(float x) { return __builtin_rintf(x); }
#if defined(__ILP32__)
__weak_reference(rint, rintl);
#endif
#endif
#if defined(__aarch64__) || defined(__riscv)
-float roundf(float x) { return __builtin_roundf(x); }
double round(double x) { return __builtin_round(x); }
+float roundf(float x) { return __builtin_roundf(x); }
#endif
-float sqrtf(float x) { return __builtin_sqrtf(x); }
double sqrt(double x) { return __builtin_sqrt(x); }
+float sqrtf(float x) { return __builtin_sqrtf(x); }
#if defined(__ILP32__)
__weak_reference(sqrt, sqrtl);
#endif
-#if defined(__aarch64__) || defined(__riscv) || defined(__i386__) || defined(__x86_64__)
-float truncf(float x) { return __builtin_truncf(x); }
+#if defined(__arm__) && (__ARM_ARCH <= 7)
+// armv7 arm32 has no instructions to implement these builtins,
+// so we include the msun source in the .bp file instead.
+#else
double trunc(double x) { return __builtin_trunc(x); }
+float truncf(float x) { return __builtin_truncf(x); }
#if defined(__ILP32__)
__weak_reference(trunc, truncl);
#endif
diff --git a/libm/fake_long_double.c b/libm/fake_long_double.c
index 5f9b980..68492bc 100644
--- a/libm/fake_long_double.c
+++ b/libm/fake_long_double.c
@@ -29,9 +29,7 @@
long double fminl(long double a1, long double a2) { return fmin(a1, a2); }
int ilogbl(long double a1) { return ilogb(a1); }
long long llrintl(long double a1) { return llrint(a1); }
-#if !defined(__i386__) // x86 has an assembler lrint/lrintl.
long lrintl(long double a1) { return lrint(a1); }
-#endif
long long llroundl(long double a1) { return llround(a1); }
long lroundl(long double a1) { return lround(a1); }
long double modfl(long double a1, long double* a2) { double i; double f = modf(a1, &i); *a2 = i; return f; }
diff --git a/libm/fenv-access.h b/libm/fenv-access.h
deleted file mode 100644
index 7acb34d..0000000
--- a/libm/fenv-access.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#pragma once
-
-#if defined(__x86_64__) || defined(__i386__)
-#pragma STDC FENV_ACCESS ON
-#endif
diff --git a/libm/arm/fenv.c b/libm/fenv-arm.c
similarity index 100%
rename from libm/arm/fenv.c
rename to libm/fenv-arm.c
diff --git a/libm/arm64/fenv.c b/libm/fenv-arm64.c
similarity index 100%
rename from libm/arm64/fenv.c
rename to libm/fenv-arm64.c
diff --git a/libm/riscv64/fenv.c b/libm/fenv-riscv64.c
similarity index 100%
rename from libm/riscv64/fenv.c
rename to libm/fenv-riscv64.c
diff --git a/libm/i387/fenv.c b/libm/fenv-x86.c
similarity index 100%
rename from libm/i387/fenv.c
rename to libm/fenv-x86.c
diff --git a/libm/amd64/fenv.c b/libm/fenv-x86_64.c
similarity index 100%
rename from libm/amd64/fenv.c
rename to libm/fenv-x86_64.c
diff --git a/libm/freebsd-compat.h b/libm/freebsd-compat.h
index a3c7cd4..9555ff9 100644
--- a/libm/freebsd-compat.h
+++ b/libm/freebsd-compat.h
@@ -16,9 +16,12 @@
#pragma once
+// Since we're implementing all the extensions,
+// we need to make sure we get all their declarations when we include <math.h>.
+#define _BSD_SOURCE
+
// Some FreeBSD source includes <complex.h> and assumes <math.h> from that.
#include <math.h>
-#include <float.h>
#define __weak_reference(sym,alias) \
__asm__(".weak " #alias); \
diff --git a/libm/libm.map.txt b/libm/libm.map.txt
index a931b93..b9a0db2 100644
--- a/libm/libm.map.txt
+++ b/libm/libm.map.txt
@@ -8,23 +8,23 @@
acosf;
acosh;
acoshf;
- acoshl; # introduced=21
- acosl; # introduced=21
+ acoshl;
+ acosl;
asin;
asinf;
asinh;
asinhf;
- asinhl; # introduced=21
- asinl; # introduced=21
+ asinhl;
+ asinl;
atan;
atan2;
atan2f;
- atan2l; # introduced=21
+ atan2l;
atanf;
atanh;
atanhf;
- atanhl; # introduced=21
- atanl; # introduced=21
+ atanhl;
+ atanl;
cabs; # introduced=23
cabsf; # introduced=23
cabsl; # introduced-arm=21 introduced-arm64=23 introduced-x86=21 introduced-x86_64=23
@@ -45,7 +45,7 @@
catanhf; # introduced=23
cbrt;
cbrtf;
- cbrtl; # introduced=21
+ cbrtl;
ccos; # introduced=23
ccosf; # introduced=23
ccosh; # introduced=23
@@ -68,8 +68,8 @@
cosf;
cosh;
coshf;
- coshl; # introduced=21
- cosl; # introduced=21
+ coshl;
+ cosl;
cproj; # introduced=23
cprojf; # introduced=23
cprojl; # introduced-arm=21 introduced-arm64=23 introduced-x86=21 introduced-x86_64=23
@@ -92,38 +92,38 @@
erf;
erfc;
erfcf;
- erfcl; # introduced=21
+ erfcl;
erff;
- erfl; # introduced=21
+ erfl;
exp;
exp2;
exp2f;
- exp2l; # introduced=21
+ exp2l;
expf;
- expl; # introduced=21
+ expl;
expm1;
expm1f;
- expm1l; # introduced=21
+ expm1l;
fabs;
fabsf;
fabsl;
fdim;
fdimf;
fdiml;
- feclearexcept; # introduced-arm=21 introduced-arm64=21 introduced-x86=9 introduced-x86_64=21
- fedisableexcept; # introduced-arm=21 introduced-arm64=21 introduced-x86=9 introduced-x86_64=21
- feenableexcept; # introduced-arm=21 introduced-arm64=21 introduced-x86=9 introduced-x86_64=21
- fegetenv; # introduced-arm=21 introduced-arm64=21 introduced-x86=9 introduced-x86_64=21
- fegetexcept; # introduced-arm=21 introduced-arm64=21 introduced-x86=9 introduced-x86_64=21
- fegetexceptflag; # introduced-arm=21 introduced-arm64=21 introduced-x86=9 introduced-x86_64=21
- fegetround; # introduced-arm=21 introduced-arm64=21 introduced-x86=9 introduced-x86_64=21
- feholdexcept; # introduced-arm=21 introduced-arm64=21 introduced-x86=9 introduced-x86_64=21
- feraiseexcept; # introduced-arm=21 introduced-arm64=21 introduced-x86=9 introduced-x86_64=21
- fesetenv; # introduced-arm=21 introduced-arm64=21 introduced-x86=9 introduced-x86_64=21
- fesetexceptflag; # introduced-arm=21 introduced-arm64=21 introduced-x86=9 introduced-x86_64=21
- fesetround; # introduced-arm=21 introduced-arm64=21 introduced-x86=9 introduced-x86_64=21
- fetestexcept; # introduced-arm=21 introduced-arm64=21 introduced-x86=9 introduced-x86_64=21
- feupdateenv; # introduced-arm=21 introduced-arm64=21 introduced-x86=9 introduced-x86_64=21
+ feclearexcept;
+ fedisableexcept;
+ feenableexcept;
+ fegetenv;
+ fegetexcept;
+ fegetexceptflag;
+ fegetround;
+ feholdexcept;
+ feraiseexcept;
+ fesetenv;
+ fesetexceptflag;
+ fesetround;
+ fetestexcept;
+ feupdateenv;
finite;
finitef;
floor;
@@ -131,7 +131,7 @@
floorl;
fma;
fmaf;
- fmal; # introduced=21
+ fmal;
fmax;
fmaxf;
fmaxl;
@@ -140,17 +140,17 @@
fminl;
fmod;
fmodf;
- fmodl; # introduced=21
+ fmodl;
frexp;
frexpf;
- frexpl; # introduced=21
+ frexpl;
gamma;
gamma_r;
gammaf;
gammaf_r;
hypot;
hypotf;
- hypotl; # introduced=21
+ hypotl;
ilogb;
ilogbf;
ilogbl;
@@ -166,77 +166,77 @@
lgamma_r;
lgammaf;
lgammaf_r;
- lgammal; # introduced=21
+ lgammal;
lgammal_r; # introduced=23
llrint;
llrintf;
- llrintl; # introduced=21
+ llrintl;
llround;
llroundf;
llroundl;
log;
log10;
log10f;
- log10l; # introduced=21
+ log10l;
log1p;
log1pf;
- log1pl; # introduced=21
- log2; # introduced-arm=18 introduced-arm64=21 introduced-x86=18 introduced-x86_64=21
- log2f; # introduced-arm=18 introduced-arm64=21 introduced-x86=18 introduced-x86_64=21
- log2l; # introduced-arm=18 introduced-arm64=21 introduced-x86=18 introduced-x86_64=21
+ log1pl;
+ log2;
+ log2f;
+ log2l;
logb;
logbf;
- logbl; # introduced-arm=18 introduced-arm64=21 introduced-x86=18 introduced-x86_64=21
+ logbl;
logf;
- logl; # introduced=21
+ logl;
lrint;
lrintf;
- lrintl; # introduced=21
+ lrintl;
lround;
lroundf;
lroundl;
modf;
modff;
- modfl; # introduced=21
- nan; # introduced-arm=13 introduced-arm64=21 introduced-x86=9 introduced-x86_64=21
- nanf; # introduced-arm=13 introduced-arm64=21 introduced-x86=9 introduced-x86_64=21
- nanl; # introduced-arm=13 introduced-arm64=21 introduced-x86=13 introduced-x86_64=21
+ modfl;
+ nan;
+ nanf;
+ nanl;
nearbyint;
nearbyintf;
- nearbyintl; # introduced=21
+ nearbyintl;
nextafter;
nextafterf;
- nextafterl; # introduced=21
- nexttoward; # introduced-arm=18 introduced-arm64=21 introduced-x86=18 introduced-x86_64=21
+ nextafterl;
+ nexttoward;
nexttowardf;
- nexttowardl; # introduced-arm=18 introduced-arm64=21 introduced-x86=18 introduced-x86_64=21
+ nexttowardl;
pow;
powf;
- powl; # introduced=21
+ powl;
remainder;
remainderf;
- remainderl; # introduced=21
+ remainderl;
remquo;
remquof;
- remquol; # introduced=21
+ remquol;
rint;
rintf;
- rintl; # introduced=21
+ rintl;
round;
roundf;
roundl;
scalb;
scalbf;
- scalbln; # introduced-arm=9 introduced-arm64=21 introduced-x86=18 introduced-x86_64=21
- scalblnf; # introduced-arm=9 introduced-arm64=21 introduced-x86=18 introduced-x86_64=21
- scalblnl; # introduced-arm=9 introduced-arm64=21 introduced-x86=18 introduced-x86_64=21
+ scalbln;
+ scalblnf;
+ scalblnl;
scalbn;
scalbnf;
scalbnl;
signgam; # var
significand;
significandf;
- significandl; # introduced=21
+ significandl;
sin;
sincos;
sincosf;
@@ -244,20 +244,20 @@
sinf;
sinh;
sinhf;
- sinhl; # introduced=21
- sinl; # introduced=21
+ sinhl;
+ sinl;
sqrt;
sqrtf;
- sqrtl; # introduced=21
+ sqrtl;
tan;
tanf;
tanh;
tanhf;
- tanhl; # introduced=21
- tanl; # introduced=21
+ tanhl;
+ tanl;
tgamma;
- tgammaf; # introduced-arm=13 introduced-arm64=21 introduced-x86=9 introduced-x86_64=21
- tgammal; # introduced=21
+ tgammaf;
+ tgammal;
trunc;
truncf;
truncl;
@@ -271,7 +271,7 @@
*;
};
-LIBC_O { # introduced=O
+LIBC_O { # introduced=26
global:
cacoshl;
cacosl;
diff --git a/libm/significandl.c b/libm/significandl.c
index c5d7dd4..b672110 100644
--- a/libm/significandl.c
+++ b/libm/significandl.c
@@ -22,11 +22,13 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
*/
#include <math.h>
+// This function is only in glibc.
+// musl and NetBSD/OpenBSD just have the double and float variants,
+// while FreeBSD and iOS/macOS have none.
long double significandl(long double x) {
return scalbnl(x, -ilogbl(x));
}
diff --git a/libm/upstream-freebsd/lib/msun/bsdsrc/b_exp.c b/libm/upstream-freebsd/lib/msun/bsdsrc/b_exp.c
index c667293..44cd519 100644
--- a/libm/upstream-freebsd/lib/msun/bsdsrc/b_exp.c
+++ b/libm/upstream-freebsd/lib/msun/bsdsrc/b_exp.c
@@ -29,10 +29,6 @@
* SUCH DAMAGE.
*/
-/* @(#)exp.c 8.1 (Berkeley) 6/4/93 */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* EXP(X)
* RETURN THE EXPONENTIAL OF X
* DOUBLE PRECISION (IEEE 53 bits, VAX D FORMAT 56 BITS)
diff --git a/libm/upstream-freebsd/lib/msun/bsdsrc/b_log.c b/libm/upstream-freebsd/lib/msun/bsdsrc/b_log.c
index 9d09ac7..a82140b 100644
--- a/libm/upstream-freebsd/lib/msun/bsdsrc/b_log.c
+++ b/libm/upstream-freebsd/lib/msun/bsdsrc/b_log.c
@@ -29,10 +29,6 @@
* SUCH DAMAGE.
*/
-/* @(#)log.c 8.2 (Berkeley) 11/30/93 */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* Table-driven natural logarithm.
*
* This code was derived, with minor modifications, from:
diff --git a/libm/upstream-freebsd/lib/msun/bsdsrc/b_tgamma.c b/libm/upstream-freebsd/lib/msun/bsdsrc/b_tgamma.c
index 493ced3..8369477 100644
--- a/libm/upstream-freebsd/lib/msun/bsdsrc/b_tgamma.c
+++ b/libm/upstream-freebsd/lib/msun/bsdsrc/b_tgamma.c
@@ -42,10 +42,6 @@
* porting to other precisions.
*/
-/* @(#)gamma.c 8.1 (Berkeley) 6/4/93 */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include "math.h"
diff --git a/libm/upstream-freebsd/lib/msun/ld128/e_lgammal_r.c b/libm/upstream-freebsd/lib/msun/ld128/e_lgammal_r.c
index 53d3af1..f8079b7 100644
--- a/libm/upstream-freebsd/lib/msun/ld128/e_lgammal_r.c
+++ b/libm/upstream-freebsd/lib/msun/ld128/e_lgammal_r.c
@@ -1,4 +1,3 @@
-/* @(#)e_lgamma_r.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* See e_lgamma_r.c for complete comments.
*
diff --git a/libm/upstream-freebsd/lib/msun/ld128/e_powl.c b/libm/upstream-freebsd/lib/msun/ld128/e_powl.c
index 12b92a1..f5a993c 100644
--- a/libm/upstream-freebsd/lib/msun/ld128/e_powl.c
+++ b/libm/upstream-freebsd/lib/msun/ld128/e_powl.c
@@ -59,9 +59,6 @@
*
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/ld128/e_rem_pio2l.h b/libm/upstream-freebsd/lib/msun/ld128/e_rem_pio2l.h
index fcef399..0ea1a70 100644
--- a/libm/upstream-freebsd/lib/msun/ld128/e_rem_pio2l.h
+++ b/libm/upstream-freebsd/lib/msun/ld128/e_rem_pio2l.h
@@ -1,4 +1,3 @@
-/* From: @(#)e_rem_pio2.c 1.4 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -13,9 +12,6 @@
* Optimized by Bruce D. Evans.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* ld128 version of __ieee754_rem_pio2l(x,y)
*
* return the remainder of x rem pi/2 in y[0]+y[1]
@@ -58,7 +54,7 @@
pio2_3 = 2.0670321098263988236499468110329591e-43L, /* 0x127044533e63a0105e00000000000.0p-254 */
pio2_3t = -2.5650587247459238361625433492959285e-65L; /* -0x159c4ec64ddaeb5f78671cbfb2210.0p-327 */
-static inline __always_inline int
+static __always_inline int
__ieee754_rem_pio2l(long double x, long double *y)
{
union IEEEl2bits u,u1;
diff --git a/libm/upstream-freebsd/lib/msun/ld128/invtrig.c b/libm/upstream-freebsd/lib/msun/ld128/invtrig.c
index 3ba767b..75aef7b 100644
--- a/libm/upstream-freebsd/lib/msun/ld128/invtrig.c
+++ b/libm/upstream-freebsd/lib/msun/ld128/invtrig.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "invtrig.h"
/*
diff --git a/libm/upstream-freebsd/lib/msun/ld128/invtrig.h b/libm/upstream-freebsd/lib/msun/ld128/invtrig.h
index 3f505c5..4876be8 100644
--- a/libm/upstream-freebsd/lib/msun/ld128/invtrig.h
+++ b/libm/upstream-freebsd/lib/msun/ld128/invtrig.h
@@ -24,8 +24,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <float.h>
diff --git a/libm/upstream-freebsd/lib/msun/ld128/k_cosl.c b/libm/upstream-freebsd/lib/msun/ld128/k_cosl.c
index 422357b..c756266 100644
--- a/libm/upstream-freebsd/lib/msun/ld128/k_cosl.c
+++ b/libm/upstream-freebsd/lib/msun/ld128/k_cosl.c
@@ -1,4 +1,3 @@
-/* From: @(#)k_cos.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -11,9 +10,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* ld128 version of k_cos.c. See ../src/k_cos.c for most comments.
*/
diff --git a/libm/upstream-freebsd/lib/msun/ld128/k_expl.h b/libm/upstream-freebsd/lib/msun/ld128/k_expl.h
index 3faf7a7..86811dd 100644
--- a/libm/upstream-freebsd/lib/msun/ld128/k_expl.h
+++ b/libm/upstream-freebsd/lib/msun/ld128/k_expl.h
@@ -30,9 +30,6 @@
* Optimized by Bruce D. Evans.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* ld128 version of k_expl.h. See ../ld80/s_expl.c for most comments.
*
diff --git a/libm/upstream-freebsd/lib/msun/ld128/k_sinl.c b/libm/upstream-freebsd/lib/msun/ld128/k_sinl.c
index 09472d6..f2b17ba 100644
--- a/libm/upstream-freebsd/lib/msun/ld128/k_sinl.c
+++ b/libm/upstream-freebsd/lib/msun/ld128/k_sinl.c
@@ -1,4 +1,3 @@
-/* From: @(#)k_sin.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -11,9 +10,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* ld128 version of k_sin.c. See ../src/k_sin.c for most comments.
*/
diff --git a/libm/upstream-freebsd/lib/msun/ld128/k_tanl.c b/libm/upstream-freebsd/lib/msun/ld128/k_tanl.c
index d7ec0b9..8aff0d1 100644
--- a/libm/upstream-freebsd/lib/msun/ld128/k_tanl.c
+++ b/libm/upstream-freebsd/lib/msun/ld128/k_tanl.c
@@ -1,5 +1,3 @@
-/* From: @(#)k_tan.c 1.5 04/04/22 SMI */
-
/*
* ====================================================
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
@@ -11,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* ld128 version of k_tan.c. See ../src/k_tan.c for most comments.
*/
diff --git a/libm/upstream-freebsd/lib/msun/ld128/s_erfl.c b/libm/upstream-freebsd/lib/msun/ld128/s_erfl.c
index e29c969..227c31f 100644
--- a/libm/upstream-freebsd/lib/msun/ld128/s_erfl.c
+++ b/libm/upstream-freebsd/lib/msun/ld128/s_erfl.c
@@ -1,4 +1,3 @@
-/* @(#)s_erf.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* See s_erf.c for complete comments.
*
diff --git a/libm/upstream-freebsd/lib/msun/ld128/s_exp2l.c b/libm/upstream-freebsd/lib/msun/ld128/s_exp2l.c
index bcbdc5f..249cb4c 100644
--- a/libm/upstream-freebsd/lib/msun/ld128/s_exp2l.c
+++ b/libm/upstream-freebsd/lib/msun/ld128/s_exp2l.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include <stdint.h>
diff --git a/libm/upstream-freebsd/lib/msun/ld128/s_expl.c b/libm/upstream-freebsd/lib/msun/ld128/s_expl.c
index 0274a8f..e1358e2 100644
--- a/libm/upstream-freebsd/lib/msun/ld128/s_expl.c
+++ b/libm/upstream-freebsd/lib/msun/ld128/s_expl.c
@@ -28,9 +28,6 @@
* Optimized by Bruce D. Evans.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* ld128 version of s_expl.c. See ../ld80/s_expl.c for most comments.
*/
diff --git a/libm/upstream-freebsd/lib/msun/ld128/s_logl.c b/libm/upstream-freebsd/lib/msun/ld128/s_logl.c
index bc53884..e9133ec 100644
--- a/libm/upstream-freebsd/lib/msun/ld128/s_logl.c
+++ b/libm/upstream-freebsd/lib/msun/ld128/s_logl.c
@@ -26,9 +26,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/**
* Implementation of the natural logarithm of x for 128-bit format.
*
@@ -447,7 +444,7 @@
#endif
#ifdef STRUCT_RETURN
-static inline __always_inline void
+static __always_inline void
k_logl(long double x, struct ld *rp)
#else
long double
diff --git a/libm/upstream-freebsd/lib/msun/ld128/s_nanl.c b/libm/upstream-freebsd/lib/msun/ld128/s_nanl.c
index cde3f18..b90d024 100644
--- a/libm/upstream-freebsd/lib/msun/ld128/s_nanl.c
+++ b/libm/upstream-freebsd/lib/msun/ld128/s_nanl.c
@@ -24,8 +24,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/catrig.c b/libm/upstream-freebsd/lib/msun/src/catrig.c
index 82061b5..45af164 100644
--- a/libm/upstream-freebsd/lib/msun/src/catrig.c
+++ b/libm/upstream-freebsd/lib/msun/src/catrig.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <float.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/catrigf.c b/libm/upstream-freebsd/lib/msun/src/catrigf.c
index fb4a6bf..da90629 100644
--- a/libm/upstream-freebsd/lib/msun/src/catrigf.c
+++ b/libm/upstream-freebsd/lib/msun/src/catrigf.c
@@ -40,9 +40,6 @@
* a few comments on the right of declarations remain.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <float.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/catrigl.c b/libm/upstream-freebsd/lib/msun/src/catrigl.c
index e66f87a..faf9d29 100644
--- a/libm/upstream-freebsd/lib/msun/src/catrigl.c
+++ b/libm/upstream-freebsd/lib/msun/src/catrigl.c
@@ -39,9 +39,6 @@
* a few comments on the right of declarations remain.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <float.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/e_acos.c b/libm/upstream-freebsd/lib/msun/src/e_acos.c
index 6623355..af51fe1 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_acos.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_acos.c
@@ -1,5 +1,4 @@
-/* @(#)e_acos.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -11,9 +10,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* acos(x)
* Method :
* acos(x) = pi/2 - asin(x)
diff --git a/libm/upstream-freebsd/lib/msun/src/e_acosf.c b/libm/upstream-freebsd/lib/msun/src/e_acosf.c
index 64f1c5a..42ba126 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_acosf.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_acosf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/e_acosh.c b/libm/upstream-freebsd/lib/msun/src/e_acosh.c
index 7947995..0e5640b 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_acosh.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_acosh.c
@@ -1,5 +1,4 @@
-/* @(#)e_acosh.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -12,9 +11,6 @@
*
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* acosh(x)
* Method :
* Based on
diff --git a/libm/upstream-freebsd/lib/msun/src/e_acoshf.c b/libm/upstream-freebsd/lib/msun/src/e_acoshf.c
index 781ccf2..b6fbd2c 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_acoshf.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_acoshf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/e_acoshl.c b/libm/upstream-freebsd/lib/msun/src/e_acoshl.c
index b9f3aed..6bfa624 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_acoshl.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_acoshl.c
@@ -1,6 +1,5 @@
/* from: FreeBSD: head/lib/msun/src/e_acosh.c 176451 2008-02-22 02:30:36Z das */
-/* @(#)e_acosh.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -13,9 +12,6 @@
*
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* See e_acosh.c for complete comments.
*
diff --git a/libm/upstream-freebsd/lib/msun/src/e_acosl.c b/libm/upstream-freebsd/lib/msun/src/e_acosl.c
index d33c8fe..2098143 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_acosl.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_acosl.c
@@ -1,5 +1,4 @@
-/* @(#)e_acos.c 1.3 95/01/18 */
/* FreeBSD: head/lib/msun/src/e_acos.c 176451 2008-02-22 02:30:36Z das */
/*
* ====================================================
@@ -12,9 +11,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* See comments in e_acos.c.
* Converted to long double by David Schultz <das@FreeBSD.ORG>.
diff --git a/libm/upstream-freebsd/lib/msun/src/e_asin.c b/libm/upstream-freebsd/lib/msun/src/e_asin.c
index fa180ab..530bf79 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_asin.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_asin.c
@@ -1,5 +1,4 @@
-/* @(#)e_asin.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -11,9 +10,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* asin(x)
* Method :
* Since asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ...
diff --git a/libm/upstream-freebsd/lib/msun/src/e_asinf.c b/libm/upstream-freebsd/lib/msun/src/e_asinf.c
index db4b9b6..a2ee1a1 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_asinf.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_asinf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/e_asinl.c b/libm/upstream-freebsd/lib/msun/src/e_asinl.c
index a85765f..bb2320e 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_asinl.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_asinl.c
@@ -1,5 +1,4 @@
-/* @(#)e_asin.c 1.3 95/01/18 */
/* FreeBSD: head/lib/msun/src/e_asin.c 176451 2008-02-22 02:30:36Z das */
/*
* ====================================================
@@ -12,9 +11,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* See comments in e_asin.c.
* Converted to long double by David Schultz <das@FreeBSD.ORG>.
diff --git a/libm/upstream-freebsd/lib/msun/src/e_atan2.c b/libm/upstream-freebsd/lib/msun/src/e_atan2.c
index 0b2e721..ab5fc72 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_atan2.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_atan2.c
@@ -1,5 +1,4 @@
-/* @(#)e_atan2.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -12,9 +11,6 @@
*
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* atan2(y,x)
* Method :
* 1. Reduce y to positive by atan2(y,x)=-atan2(-y,x).
diff --git a/libm/upstream-freebsd/lib/msun/src/e_atan2f.c b/libm/upstream-freebsd/lib/msun/src/e_atan2f.c
index 4ea001d..408f364 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_atan2f.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_atan2f.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/e_atan2l.c b/libm/upstream-freebsd/lib/msun/src/e_atan2l.c
index 94ebdec..a27fd3e 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_atan2l.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_atan2l.c
@@ -1,5 +1,4 @@
-/* @(#)e_atan2.c 1.3 95/01/18 */
/* FreeBSD: head/lib/msun/src/e_atan2.c 176451 2008-02-22 02:30:36Z das */
/*
* ====================================================
@@ -13,9 +12,6 @@
*
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* See comments in e_atan2.c.
* Converted to long double by David Schultz <das@FreeBSD.ORG>.
diff --git a/libm/upstream-freebsd/lib/msun/src/e_atanh.c b/libm/upstream-freebsd/lib/msun/src/e_atanh.c
index 41f3bca..0cc0b92 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_atanh.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_atanh.c
@@ -1,5 +1,4 @@
-/* @(#)e_atanh.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -12,9 +11,6 @@
*
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* atanh(x)
* Method :
* 1.Reduced x to positive by atanh(-x) = -atanh(x)
diff --git a/libm/upstream-freebsd/lib/msun/src/e_atanhf.c b/libm/upstream-freebsd/lib/msun/src/e_atanhf.c
index 46643be..a2d6b69 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_atanhf.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_atanhf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/e_atanhl.c b/libm/upstream-freebsd/lib/msun/src/e_atanhl.c
index 11d56ea..cb70727 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_atanhl.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_atanhl.c
@@ -1,6 +1,5 @@
/* from: FreeBSD: head/lib/msun/src/e_atanh.c 176451 2008-02-22 02:30:36Z das */
-/* @(#)e_atanh.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -13,9 +12,6 @@
*
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* See e_atanh.c for complete comments.
*
diff --git a/libm/upstream-freebsd/lib/msun/src/e_cosh.c b/libm/upstream-freebsd/lib/msun/src/e_cosh.c
index 071663e..5c3614e 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_cosh.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_cosh.c
@@ -1,5 +1,4 @@
-/* @(#)e_cosh.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -11,9 +10,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* cosh(x)
* Method :
* mathematically cosh(x) if defined to be (exp(x)+exp(-x))/2
diff --git a/libm/upstream-freebsd/lib/msun/src/e_coshf.c b/libm/upstream-freebsd/lib/msun/src/e_coshf.c
index 1673315..40443b8 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_coshf.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_coshf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/e_coshl.c b/libm/upstream-freebsd/lib/msun/src/e_coshl.c
index 4e3b283..efb5094 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_coshl.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_coshl.c
@@ -11,9 +11,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* See e_cosh.c for complete comments.
*
diff --git a/libm/upstream-freebsd/lib/msun/src/e_fmod.c b/libm/upstream-freebsd/lib/msun/src/e_fmod.c
index 6d5f533..77afd11 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_fmod.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_fmod.c
@@ -1,5 +1,4 @@
-/* @(#)e_fmod.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -11,9 +10,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* fmod(x,y)
* Return x mod y in exact arithmetic
diff --git a/libm/upstream-freebsd/lib/msun/src/e_fmodf.c b/libm/upstream-freebsd/lib/msun/src/e_fmodf.c
index 3cef921..a7d1a0c 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_fmodf.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_fmodf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* fmodf(x,y)
* Return x mod y in exact arithmetic
diff --git a/libm/upstream-freebsd/lib/msun/src/e_fmodl.c b/libm/upstream-freebsd/lib/msun/src/e_fmodl.c
index ad3bcc3..d5997e1 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_fmodl.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_fmodl.c
@@ -1,4 +1,3 @@
-/* @(#)e_fmod.c 1.3 95/01/18 */
/*-
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include <stdint.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/e_gamma.c b/libm/upstream-freebsd/lib/msun/src/e_gamma.c
index a13f3e2..43541ad 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_gamma.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_gamma.c
@@ -1,5 +1,4 @@
-/* @(#)e_gamma.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -12,9 +11,6 @@
*
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* gamma(x)
* Return the logarithm of the Gamma function of x.
*
diff --git a/libm/upstream-freebsd/lib/msun/src/e_gamma_r.c b/libm/upstream-freebsd/lib/msun/src/e_gamma_r.c
index 2d996ca..f317ae4 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_gamma_r.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_gamma_r.c
@@ -1,5 +1,4 @@
-/* @(#)e_gamma_r.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -12,9 +11,6 @@
*
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* gamma_r(x, signgamp)
* Reentrant version of the logarithm of the Gamma function
* with user provide pointer for the sign of Gamma(x).
diff --git a/libm/upstream-freebsd/lib/msun/src/e_gammaf.c b/libm/upstream-freebsd/lib/msun/src/e_gammaf.c
index 563c148..98da571 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_gammaf.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_gammaf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* gammaf(x)
* Return the logarithm of the Gamma function of x.
*
diff --git a/libm/upstream-freebsd/lib/msun/src/e_gammaf_r.c b/libm/upstream-freebsd/lib/msun/src/e_gammaf_r.c
index d7fc2db..ae80c1b 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_gammaf_r.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_gammaf_r.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* gammaf_r(x, signgamp)
* Reentrant version of the logarithm of the Gamma function
* with user provide pointer for the sign of Gamma(x).
diff --git a/libm/upstream-freebsd/lib/msun/src/e_hypot.c b/libm/upstream-freebsd/lib/msun/src/e_hypot.c
index 8e3f931..a291af5 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_hypot.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_hypot.c
@@ -1,5 +1,4 @@
-/* @(#)e_hypot.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -11,9 +10,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* hypot(x,y)
*
* Method :
diff --git a/libm/upstream-freebsd/lib/msun/src/e_hypotf.c b/libm/upstream-freebsd/lib/msun/src/e_hypotf.c
index a3b8c86..e45486e 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_hypotf.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_hypotf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/e_hypotl.c b/libm/upstream-freebsd/lib/msun/src/e_hypotl.c
index fc43538..d8e060a 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_hypotl.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_hypotl.c
@@ -1,4 +1,3 @@
-/* From: @(#)e_hypot.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* long double version of hypot(). See e_hypot.c for most comments. */
#include <float.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/e_j0.c b/libm/upstream-freebsd/lib/msun/src/e_j0.c
index c43ab69..b19661c 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_j0.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_j0.c
@@ -1,4 +1,3 @@
-/* @(#)e_j0.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* j0(x), y0(x)
* Bessel function of the first and second kinds of order zero.
* Method -- j0(x):
diff --git a/libm/upstream-freebsd/lib/msun/src/e_j0f.c b/libm/upstream-freebsd/lib/msun/src/e_j0f.c
index 290be04..de04a9f 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_j0f.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_j0f.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* See e_j0.c for complete comments.
*/
diff --git a/libm/upstream-freebsd/lib/msun/src/e_j1.c b/libm/upstream-freebsd/lib/msun/src/e_j1.c
index ee3f6fc..06a74b0 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_j1.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_j1.c
@@ -1,4 +1,3 @@
-/* @(#)e_j1.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* j1(x), y1(x)
* Bessel function of the first and second kinds of order zero.
* Method -- j1(x):
diff --git a/libm/upstream-freebsd/lib/msun/src/e_j1f.c b/libm/upstream-freebsd/lib/msun/src/e_j1f.c
index e1f4498..28cee8e 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_j1f.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_j1f.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* See e_j1.c for complete comments.
*/
diff --git a/libm/upstream-freebsd/lib/msun/src/e_jn.c b/libm/upstream-freebsd/lib/msun/src/e_jn.c
index 6b876ce..0a71566 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_jn.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_jn.c
@@ -1,4 +1,3 @@
-/* @(#)e_jn.c 1.4 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* jn(n, x), yn(n, x)
* floating point Bessel's function of the 1st and 2nd kind
diff --git a/libm/upstream-freebsd/lib/msun/src/e_jnf.c b/libm/upstream-freebsd/lib/msun/src/e_jnf.c
index ba58622..b55eaf5 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_jnf.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_jnf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* See e_jn.c for complete comments.
*/
diff --git a/libm/upstream-freebsd/lib/msun/src/e_lgamma.c b/libm/upstream-freebsd/lib/msun/src/e_lgamma.c
index 9c4a30e..46e7c25 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_lgamma.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_lgamma.c
@@ -1,5 +1,4 @@
-/* @(#)e_lgamma.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -12,9 +11,6 @@
*
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* lgamma(x)
* Return the logarithm of the Gamma function of x.
*
diff --git a/libm/upstream-freebsd/lib/msun/src/e_lgamma_r.c b/libm/upstream-freebsd/lib/msun/src/e_lgamma_r.c
index c020b63..30edd65 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_lgamma_r.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_lgamma_r.c
@@ -1,4 +1,3 @@
-/* @(#)e_lgamma_r.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* lgamma_r(x, signgamp)
* Reentrant version of the logarithm of the Gamma function
* with user provide pointer for the sign of Gamma(x).
diff --git a/libm/upstream-freebsd/lib/msun/src/e_lgammaf.c b/libm/upstream-freebsd/lib/msun/src/e_lgammaf.c
index 00a816c..cc34e44 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_lgammaf.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_lgammaf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* lgammaf(x)
* Return the logarithm of the Gamma function of x.
*
diff --git a/libm/upstream-freebsd/lib/msun/src/e_lgammaf_r.c b/libm/upstream-freebsd/lib/msun/src/e_lgammaf_r.c
index fdd2321..3f863ce 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_lgammaf_r.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_lgammaf_r.c
@@ -14,9 +14,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/e_lgammal.c b/libm/upstream-freebsd/lib/msun/src/e_lgammal.c
index ebc2fc7..51e3216 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_lgammal.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_lgammal.c
@@ -1,4 +1,3 @@
-/* @(#)e_lgamma.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/e_log10.c b/libm/upstream-freebsd/lib/msun/src/e_log10.c
index 595c238..3647fb0 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_log10.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_log10.c
@@ -1,5 +1,4 @@
-/* @(#)e_log10.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -11,9 +10,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* Return the base 10 logarithm of x. See e_log.c and k_log.h for most
* comments.
diff --git a/libm/upstream-freebsd/lib/msun/src/e_log10f.c b/libm/upstream-freebsd/lib/msun/src/e_log10f.c
index d0c3a53..ee01d6f 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_log10f.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_log10f.c
@@ -9,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* Float version of e_log10.c. See the latter for most comments.
*/
diff --git a/libm/upstream-freebsd/lib/msun/src/e_rem_pio2.c b/libm/upstream-freebsd/lib/msun/src/e_rem_pio2.c
index 47b6513..16a57a0 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_rem_pio2.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_rem_pio2.c
@@ -1,5 +1,4 @@
-/* @(#)e_rem_pio2.c 1.4 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -13,9 +12,6 @@
* Optimized by Bruce D. Evans.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* __ieee754_rem_pio2(x,y)
*
* return the remainder of x rem pi/2 in y[0]+y[1]
@@ -49,7 +45,7 @@
pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
#ifdef INLINE_REM_PIO2
-static __inline __always_inline
+static __always_inline
#endif
int
__ieee754_rem_pio2(double x, double *y)
@@ -166,7 +162,7 @@
/* set z = scalbn(|x|,ilogb(x)-23) */
GET_LOW_WORD(low,x);
e0 = (ix>>20)-1046; /* e0 = ilogb(z)-23; */
- INSERT_WORDS(z, ix - ((int32_t)(e0<<20)), low);
+ INSERT_WORDS(z, ix - ((int32_t)((u_int32_t)e0<<20)), low);
for(i=0;i<2;i++) {
tx[i] = (double)((int32_t)(z));
z = (z-tx[i])*two24;
diff --git a/libm/upstream-freebsd/lib/msun/src/e_rem_pio2f.c b/libm/upstream-freebsd/lib/msun/src/e_rem_pio2f.c
index 597f613..84cd9bf 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_rem_pio2f.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_rem_pio2f.c
@@ -14,9 +14,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* __ieee754_rem_pio2f(x,y)
*
* return the remainder of x rem pi/2 in *y
@@ -41,7 +38,7 @@
pio2_1t = 1.58932547735281966916e-08; /* 0x3E5110b4, 0x611A6263 */
#ifdef INLINE_REM_PIO2F
-static __inline __always_inline
+static __always_inline
#endif
int
__ieee754_rem_pio2f(float x, double *y)
@@ -70,7 +67,7 @@
}
/* set z = scalbn(|x|,ilogb(|x|)-23) */
e0 = (ix>>23)-150; /* e0 = ilogb(|x|)-23; */
- SET_FLOAT_WORD(z, ix - ((int32_t)(e0<<23)));
+ SET_FLOAT_WORD(z, ix - ((int32_t)((u_int32_t)e0<<23)));
tx[0] = z;
n = __kernel_rem_pio2(tx,ty,e0,1,0);
if(hx<0) {*y = -ty[0]; return -n;}
diff --git a/libm/upstream-freebsd/lib/msun/src/e_remainder.c b/libm/upstream-freebsd/lib/msun/src/e_remainder.c
index 13156d8..a5fb714 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_remainder.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_remainder.c
@@ -1,5 +1,4 @@
-/* @(#)e_remainder.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -11,9 +10,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* remainder(x,p)
* Return :
* returns x REM p = x - [x/p]*p as if in infinite
diff --git a/libm/upstream-freebsd/lib/msun/src/e_remainderf.c b/libm/upstream-freebsd/lib/msun/src/e_remainderf.c
index e0dcfd1..4a6ff63 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_remainderf.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_remainderf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/e_remainderl.c b/libm/upstream-freebsd/lib/msun/src/e_remainderl.c
index 2295673..7a681cd 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_remainderl.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_remainderl.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <math.h>
long double
diff --git a/libm/upstream-freebsd/lib/msun/src/e_scalb.c b/libm/upstream-freebsd/lib/msun/src/e_scalb.c
index 84a6893..28d2ae6 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_scalb.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_scalb.c
@@ -1,5 +1,4 @@
-/* @(#)e_scalb.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -11,9 +10,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* scalb(x, fn) is provide for
* passing various standard test suite. One
diff --git a/libm/upstream-freebsd/lib/msun/src/e_scalbf.c b/libm/upstream-freebsd/lib/msun/src/e_scalbf.c
index 28483a5..557a5a0 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_scalbf.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_scalbf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/e_sinh.c b/libm/upstream-freebsd/lib/msun/src/e_sinh.c
index 9fe8999..5eec75e 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_sinh.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_sinh.c
@@ -1,5 +1,4 @@
-/* @(#)e_sinh.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -11,9 +10,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* sinh(x)
* Method :
* mathematically sinh(x) if defined to be (exp(x)-exp(-x))/2
diff --git a/libm/upstream-freebsd/lib/msun/src/e_sinhf.c b/libm/upstream-freebsd/lib/msun/src/e_sinhf.c
index 082beb1..e9fe732 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_sinhf.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_sinhf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/e_sinhl.c b/libm/upstream-freebsd/lib/msun/src/e_sinhl.c
index 38d3df1..cf481b2 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_sinhl.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_sinhl.c
@@ -11,9 +11,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* See e_sinh.c for complete comments.
*
diff --git a/libm/upstream-freebsd/lib/msun/src/e_sqrtl.c b/libm/upstream-freebsd/lib/msun/src/e_sqrtl.c
index 67c777f..a785536 100644
--- a/libm/upstream-freebsd/lib/msun/src/e_sqrtl.c
+++ b/libm/upstream-freebsd/lib/msun/src/e_sqrtl.c
@@ -26,9 +26,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <fenv.h>
#include <float.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/k_cos.c b/libm/upstream-freebsd/lib/msun/src/k_cos.c
index c4702e6..2eb5e04 100644
--- a/libm/upstream-freebsd/lib/msun/src/k_cos.c
+++ b/libm/upstream-freebsd/lib/msun/src/k_cos.c
@@ -1,5 +1,4 @@
-/* @(#)k_cos.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -11,9 +10,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* __kernel_cos( x, y )
* kernel cos function on [-pi/4, pi/4], pi/4 ~ 0.785398164
diff --git a/libm/upstream-freebsd/lib/msun/src/k_cosf.c b/libm/upstream-freebsd/lib/msun/src/k_cosf.c
index f7a2c0a..934c1c7 100644
--- a/libm/upstream-freebsd/lib/msun/src/k_cosf.c
+++ b/libm/upstream-freebsd/lib/msun/src/k_cosf.c
@@ -14,11 +14,6 @@
* ====================================================
*/
-#ifndef INLINE_KERNEL_COSDF
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-#endif
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/k_exp.c b/libm/upstream-freebsd/lib/msun/src/k_exp.c
index 1b86cd6..383616d 100644
--- a/libm/upstream-freebsd/lib/msun/src/k_exp.c
+++ b/libm/upstream-freebsd/lib/msun/src/k_exp.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include "math.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/k_expf.c b/libm/upstream-freebsd/lib/msun/src/k_expf.c
index 7071632..2af0c6d 100644
--- a/libm/upstream-freebsd/lib/msun/src/k_expf.c
+++ b/libm/upstream-freebsd/lib/msun/src/k_expf.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include "math.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/k_log.h b/libm/upstream-freebsd/lib/msun/src/k_log.h
index aaff8bd..da8f008 100644
--- a/libm/upstream-freebsd/lib/msun/src/k_log.h
+++ b/libm/upstream-freebsd/lib/msun/src/k_log.h
@@ -1,5 +1,4 @@
-/* @(#)e_log.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -11,9 +10,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* k_log1p(f):
* Return log(1+f) - f for 1+f in ~[sqrt(2)/2, sqrt(2)].
diff --git a/libm/upstream-freebsd/lib/msun/src/k_logf.h b/libm/upstream-freebsd/lib/msun/src/k_logf.h
index 71c547e..72b6751 100644
--- a/libm/upstream-freebsd/lib/msun/src/k_logf.h
+++ b/libm/upstream-freebsd/lib/msun/src/k_logf.h
@@ -9,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* Float version of k_log.h. See the latter for most comments.
*/
diff --git a/libm/upstream-freebsd/lib/msun/src/k_rem_pio2.c b/libm/upstream-freebsd/lib/msun/src/k_rem_pio2.c
index 0a717f7..3d49d14 100644
--- a/libm/upstream-freebsd/lib/msun/src/k_rem_pio2.c
+++ b/libm/upstream-freebsd/lib/msun/src/k_rem_pio2.c
@@ -1,5 +1,4 @@
-/* @(#)k_rem_pio2.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -11,9 +10,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* __kernel_rem_pio2(x,y,e0,nx,prec)
* double x[],y[]; int e0,nx,prec;
diff --git a/libm/upstream-freebsd/lib/msun/src/k_sin.c b/libm/upstream-freebsd/lib/msun/src/k_sin.c
index 12ee8c1..5b97d86 100644
--- a/libm/upstream-freebsd/lib/msun/src/k_sin.c
+++ b/libm/upstream-freebsd/lib/msun/src/k_sin.c
@@ -1,5 +1,4 @@
-/* @(#)k_sin.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -11,9 +10,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* __kernel_sin( x, y, iy)
* kernel sin function on ~[-pi/4, pi/4] (except on -0), pi/4 ~ 0.7854
* Input x is assumed to be bounded by ~pi/4 in magnitude.
diff --git a/libm/upstream-freebsd/lib/msun/src/k_sincos.h b/libm/upstream-freebsd/lib/msun/src/k_sincos.h
index 6f03be2..796e72a 100644
--- a/libm/upstream-freebsd/lib/msun/src/k_sincos.h
+++ b/libm/upstream-freebsd/lib/msun/src/k_sincos.h
@@ -11,9 +11,6 @@
* k_sin.c and k_cos.c merged by Steven G. Kargl.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
static const double
S1 = -1.66666666666666324348e-01, /* 0xBFC55555, 0x55555549 */
S2 = 8.33333333332248946124e-03, /* 0x3F811111, 0x1110F8A6 */
diff --git a/libm/upstream-freebsd/lib/msun/src/k_sincosf.h b/libm/upstream-freebsd/lib/msun/src/k_sincosf.h
index 073986d..f031016 100644
--- a/libm/upstream-freebsd/lib/msun/src/k_sincosf.h
+++ b/libm/upstream-freebsd/lib/msun/src/k_sincosf.h
@@ -11,9 +11,6 @@
* k_sinf.c and k_cosf.c merged by Steven G. Kargl.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* |sin(x)/x - s(x)| < 2**-37.5 (~[-4.89e-12, 4.824e-12]). */
static const double
S1 = -0x15555554cbac77.0p-55, /* -0.166666666416265235595 */
diff --git a/libm/upstream-freebsd/lib/msun/src/k_sincosl.h b/libm/upstream-freebsd/lib/msun/src/k_sincosl.h
index 6425f14..cf8536c 100644
--- a/libm/upstream-freebsd/lib/msun/src/k_sincosl.h
+++ b/libm/upstream-freebsd/lib/msun/src/k_sincosl.h
@@ -12,9 +12,6 @@
* k_sinl.c and k_cosl.c merged by Steven G. Kargl
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#if LDBL_MANT_DIG == 64 /* ld80 version of k_sincosl.c. */
#if defined(__amd64__) || defined(__i386__)
diff --git a/libm/upstream-freebsd/lib/msun/src/k_sinf.c b/libm/upstream-freebsd/lib/msun/src/k_sinf.c
index 0841759..ebebd96 100644
--- a/libm/upstream-freebsd/lib/msun/src/k_sinf.c
+++ b/libm/upstream-freebsd/lib/msun/src/k_sinf.c
@@ -14,11 +14,6 @@
* ====================================================
*/
-#ifndef INLINE_KERNEL_SINDF
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-#endif
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/k_tan.c b/libm/upstream-freebsd/lib/msun/src/k_tan.c
index 2e86c3b..92f30a6 100644
--- a/libm/upstream-freebsd/lib/msun/src/k_tan.c
+++ b/libm/upstream-freebsd/lib/msun/src/k_tan.c
@@ -1,5 +1,3 @@
-/* @(#)k_tan.c 1.5 04/04/22 SMI */
-
/*
* ====================================================
* Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
@@ -10,10 +8,6 @@
* ====================================================
*/
-/* INDENT OFF */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* __kernel_tan( x, y, k )
* kernel tan function on ~[-pi/4, pi/4] (except on -0), pi/4 ~ 0.7854
* Input x is assumed to be bounded by ~pi/4 in magnitude.
diff --git a/libm/upstream-freebsd/lib/msun/src/k_tanf.c b/libm/upstream-freebsd/lib/msun/src/k_tanf.c
index 5be1445..83bfad9 100644
--- a/libm/upstream-freebsd/lib/msun/src/k_tanf.c
+++ b/libm/upstream-freebsd/lib/msun/src/k_tanf.c
@@ -13,11 +13,6 @@
* ====================================================
*/
-#ifndef INLINE_KERNEL_TANDF
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-#endif
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/math_private.h b/libm/upstream-freebsd/lib/msun/src/math_private.h
index a55d97a..f3f7985 100644
--- a/libm/upstream-freebsd/lib/msun/src/math_private.h
+++ b/libm/upstream-freebsd/lib/msun/src/math_private.h
@@ -10,8 +10,6 @@
*/
/*
- * from: @(#)fdlibm.h 5.1 93/09/24
- * $FreeBSD$
*/
#ifndef _MATH_PRIVATE_H_
diff --git a/libm/upstream-freebsd/lib/msun/src/s_asinh.c b/libm/upstream-freebsd/lib/msun/src/s_asinh.c
index a1b9169..daebf21 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_asinh.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_asinh.c
@@ -1,4 +1,3 @@
-/* @(#)s_asinh.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* asinh(x)
* Method :
* Based on
diff --git a/libm/upstream-freebsd/lib/msun/src/s_asinhf.c b/libm/upstream-freebsd/lib/msun/src/s_asinhf.c
index 72bcefe..4e622d5 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_asinhf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_asinhf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_asinhl.c b/libm/upstream-freebsd/lib/msun/src/s_asinhl.c
index ba28f59..b939fae 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_asinhl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_asinhl.c
@@ -1,6 +1,5 @@
/* from: FreeBSD: head/lib/msun/src/e_acosh.c 176451 2008-02-22 02:30:36Z das */
-/* @(#)s_asinh.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -12,9 +11,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* See s_asinh.c for complete comments.
*
diff --git a/libm/upstream-freebsd/lib/msun/src/s_atan.c b/libm/upstream-freebsd/lib/msun/src/s_atan.c
index 566f5dc..bff8b5c 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_atan.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_atan.c
@@ -1,4 +1,3 @@
-/* @(#)s_atan.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* atan(x)
* Method
* 1. Reduce x to positive by atan(x) = -atan(-x).
diff --git a/libm/upstream-freebsd/lib/msun/src/s_atanf.c b/libm/upstream-freebsd/lib/msun/src/s_atanf.c
index b3a371f..2c38014 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_atanf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_atanf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_atanl.c b/libm/upstream-freebsd/lib/msun/src/s_atanl.c
index ff29c3c..d9e6174 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_atanl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_atanl.c
@@ -1,4 +1,3 @@
-/* @(#)s_atan.c 5.1 93/09/24 */
/* FreeBSD: head/lib/msun/src/s_atan.c 176451 2008-02-22 02:30:36Z das */
/*
* ====================================================
@@ -11,9 +10,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* See comments in s_atan.c.
* Converted to long double by David Schultz <das@FreeBSD.ORG>.
diff --git a/libm/upstream-freebsd/lib/msun/src/s_carg.c b/libm/upstream-freebsd/lib/msun/src/s_carg.c
index f203198..ea7edfd 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_carg.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_carg.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_cargf.c b/libm/upstream-freebsd/lib/msun/src/s_cargf.c
index 6ea487c..25ab65e 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_cargf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_cargf.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_cargl.c b/libm/upstream-freebsd/lib/msun/src/s_cargl.c
index ba39438..8a1a108 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_cargl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_cargl.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_cbrt.c b/libm/upstream-freebsd/lib/msun/src/s_cbrt.c
index 4353d34..6bf8424 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_cbrt.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_cbrt.c
@@ -1,4 +1,3 @@
-/* @(#)s_cbrt.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -12,9 +11,6 @@
* Optimized by Bruce D. Evans.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_cbrtf.c b/libm/upstream-freebsd/lib/msun/src/s_cbrtf.c
index 454f974..a225d3e 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_cbrtf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_cbrtf.c
@@ -14,9 +14,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_cbrtl.c b/libm/upstream-freebsd/lib/msun/src/s_cbrtl.c
index b15c96e..f1950e2 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_cbrtl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_cbrtl.c
@@ -14,9 +14,6 @@
* and David A. Schultz.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#ifdef __i386__
#include <ieeefp.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_ccosh.c b/libm/upstream-freebsd/lib/msun/src/s_ccosh.c
index 0fd9206..3d46c99 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_ccosh.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_ccosh.c
@@ -38,9 +38,6 @@
* must satisfy both cosh(conj(z)) == conj(cosh(z)) and cosh(-z) == cosh(z).
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_ccoshf.c b/libm/upstream-freebsd/lib/msun/src/s_ccoshf.c
index 2db8403..aeb2dec 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_ccoshf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_ccoshf.c
@@ -30,9 +30,6 @@
* Float version of ccosh(). See s_ccosh.c for details.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_ceil.c b/libm/upstream-freebsd/lib/msun/src/s_ceil.c
index 929f813..e6699bc 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_ceil.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_ceil.c
@@ -1,4 +1,3 @@
-/* @(#)s_ceil.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* ceil(x)
* Return x rounded toward -inf to integral value
diff --git a/libm/upstream-freebsd/lib/msun/src/s_ceilf.c b/libm/upstream-freebsd/lib/msun/src/s_ceilf.c
index 23bfe04..cc19afa 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_ceilf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_ceilf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_ceill.c b/libm/upstream-freebsd/lib/msun/src/s_ceill.c
index 2d1045f..ded36c1 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_ceill.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_ceill.c
@@ -7,13 +7,8 @@
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
- *
- * From: @(#)s_ceil.c 5.1 93/09/24
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* ceill(x)
* Return x rounded toward -inf to integral value
diff --git a/libm/upstream-freebsd/lib/msun/src/s_cexp.c b/libm/upstream-freebsd/lib/msun/src/s_cexp.c
index 8db763d..0151768 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_cexp.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_cexp.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <float.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_cexpf.c b/libm/upstream-freebsd/lib/msun/src/s_cexpf.c
index 7247301..a6c0c99 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_cexpf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_cexpf.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_cimag.c b/libm/upstream-freebsd/lib/msun/src/s_cimag.c
index 0b14fd7..5779b2a 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_cimag.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_cimag.c
@@ -24,8 +24,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <complex.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_cimagf.c b/libm/upstream-freebsd/lib/msun/src/s_cimagf.c
index 42a1efd..ca2bdf2 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_cimagf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_cimagf.c
@@ -24,8 +24,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <complex.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_cimagl.c b/libm/upstream-freebsd/lib/msun/src/s_cimagl.c
index 9707bc3..3986430 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_cimagl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_cimagl.c
@@ -24,8 +24,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <complex.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_clog.c b/libm/upstream-freebsd/lib/msun/src/s_clog.c
index 8150fa7..2129890 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_clog.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_clog.c
@@ -24,9 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <float.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_clogf.c b/libm/upstream-freebsd/lib/msun/src/s_clogf.c
index 19a9445..2204e1e 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_clogf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_clogf.c
@@ -24,9 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <float.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_clogl.c b/libm/upstream-freebsd/lib/msun/src/s_clogl.c
index e59a137..075bdb4 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_clogl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_clogl.c
@@ -24,9 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <float.h>
#ifdef __i386__
diff --git a/libm/upstream-freebsd/lib/msun/src/s_conj.c b/libm/upstream-freebsd/lib/msun/src/s_conj.c
index a83abd8..1203ba6 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_conj.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_conj.c
@@ -24,8 +24,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <complex.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_conjf.c b/libm/upstream-freebsd/lib/msun/src/s_conjf.c
index f9eb146..9720998 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_conjf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_conjf.c
@@ -24,8 +24,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <complex.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_conjl.c b/libm/upstream-freebsd/lib/msun/src/s_conjl.c
index 4b86f2e..ef084f4 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_conjl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_conjl.c
@@ -24,8 +24,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <complex.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_cos.c b/libm/upstream-freebsd/lib/msun/src/s_cos.c
index 29804f4..44ecad9 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_cos.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_cos.c
@@ -1,4 +1,3 @@
-/* @(#)s_cos.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* cos(x)
* Return cosine function of x.
*
diff --git a/libm/upstream-freebsd/lib/msun/src/s_cosl.c b/libm/upstream-freebsd/lib/msun/src/s_cosl.c
index 6f0b36f..32fc8b2 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_cosl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_cosl.c
@@ -26,9 +26,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* Limited testing on pseudorandom numbers drawn within [-2e8:4e8] shows
* an accuracy of <= 0.7412 ULP.
diff --git a/libm/upstream-freebsd/lib/msun/src/s_cpow.c b/libm/upstream-freebsd/lib/msun/src/s_cpow.c
index cdc57bd..b887db5 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_cpow.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_cpow.c
@@ -43,9 +43,6 @@
*
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <float.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_cpowf.c b/libm/upstream-freebsd/lib/msun/src/s_cpowf.c
index aeb773b..1442910 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_cpowf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_cpowf.c
@@ -43,9 +43,6 @@
*
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <math.h>
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_cpowl.c b/libm/upstream-freebsd/lib/msun/src/s_cpowl.c
index 5d43b55..39797ca 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_cpowl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_cpowl.c
@@ -43,9 +43,6 @@
*
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <math.h>
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_cproj.c b/libm/upstream-freebsd/lib/msun/src/s_cproj.c
index 5b0d4ed..9eebb45 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_cproj.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_cproj.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <float.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_cprojf.c b/libm/upstream-freebsd/lib/msun/src/s_cprojf.c
index 0d76e75..13d90ba 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_cprojf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_cprojf.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_cprojl.c b/libm/upstream-freebsd/lib/msun/src/s_cprojl.c
index 7fc35d2..083b5fa 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_cprojl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_cprojl.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_creal.c b/libm/upstream-freebsd/lib/msun/src/s_creal.c
index 5c8734e..b3a82f0 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_creal.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_creal.c
@@ -24,8 +24,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <complex.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_crealf.c b/libm/upstream-freebsd/lib/msun/src/s_crealf.c
index a93421f..36fc115 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_crealf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_crealf.c
@@ -24,8 +24,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <complex.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_creall.c b/libm/upstream-freebsd/lib/msun/src/s_creall.c
index b4eb9ef..b56143a 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_creall.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_creall.c
@@ -24,8 +24,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <complex.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_csinh.c b/libm/upstream-freebsd/lib/msun/src/s_csinh.c
index b3928ce..e7ed10e 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_csinh.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_csinh.c
@@ -38,9 +38,6 @@
* must satisfy both sinh(conj(z)) == conj(sinh(z)) and sinh(-z) == -sinh(z).
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_csinhf.c b/libm/upstream-freebsd/lib/msun/src/s_csinhf.c
index a8d6f2d..c439275 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_csinhf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_csinhf.c
@@ -30,9 +30,6 @@
* Float version of csinh(). See s_csinh.c for details.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_csqrt.c b/libm/upstream-freebsd/lib/msun/src/s_csqrt.c
index d96c344..c40b5a6 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_csqrt.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_csqrt.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <float.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_csqrtf.c b/libm/upstream-freebsd/lib/msun/src/s_csqrtf.c
index e3ef4d0..b572451 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_csqrtf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_csqrtf.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_csqrtl.c b/libm/upstream-freebsd/lib/msun/src/s_csqrtl.c
index d564133..0f375f3 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_csqrtl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_csqrtl.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <float.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_ctanh.c b/libm/upstream-freebsd/lib/msun/src/s_ctanh.c
index aa4e10c..6904363 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_ctanh.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_ctanh.c
@@ -65,9 +65,6 @@
* precision. I also handle large x differently.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_ctanhf.c b/libm/upstream-freebsd/lib/msun/src/s_ctanhf.c
index e9ebe4f..551e143 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_ctanhf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_ctanhf.c
@@ -30,9 +30,6 @@
* Hyperbolic tangent of a complex argument z. See s_ctanh.c for details.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_erf.c b/libm/upstream-freebsd/lib/msun/src/s_erf.c
index ab2dc19..a9de122 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_erf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_erf.c
@@ -1,4 +1,3 @@
-/* @(#)s_erf.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* double erf(double x)
* double erfc(double x)
* x
diff --git a/libm/upstream-freebsd/lib/msun/src/s_erff.c b/libm/upstream-freebsd/lib/msun/src/s_erff.c
index d6cfbd2..6c8f406 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_erff.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_erff.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_expm1.c b/libm/upstream-freebsd/lib/msun/src/s_expm1.c
index 844f103..cdc225e 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_expm1.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_expm1.c
@@ -1,4 +1,3 @@
-/* @(#)s_expm1.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* expm1(x)
* Returns exp(x)-1, the exponential of x minus 1.
*
diff --git a/libm/upstream-freebsd/lib/msun/src/s_expm1f.c b/libm/upstream-freebsd/lib/msun/src/s_expm1f.c
index b47daac..6887bf2 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_expm1f.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_expm1f.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include "math.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_fdim.c b/libm/upstream-freebsd/lib/msun/src/s_fdim.c
index b81dbac..4f56ee4 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_fdim.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_fdim.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <math.h>
#define DECL(type, fn) \
diff --git a/libm/upstream-freebsd/lib/msun/src/s_finite.c b/libm/upstream-freebsd/lib/msun/src/s_finite.c
index 4c51352..a3fd599 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_finite.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_finite.c
@@ -1,4 +1,3 @@
-/* @(#)s_finite.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* finite(x) returns 1 is x is finite, else 0;
* no branching!
diff --git a/libm/upstream-freebsd/lib/msun/src/s_finitef.c b/libm/upstream-freebsd/lib/msun/src/s_finitef.c
index c62239e..9a4a876 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_finitef.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_finitef.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* finitef(x) returns 1 is x is finite, else 0;
* no branching!
diff --git a/libm/upstream-freebsd/lib/msun/src/s_floor.c b/libm/upstream-freebsd/lib/msun/src/s_floor.c
index 65f696a..7ca65b1 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_floor.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_floor.c
@@ -1,4 +1,3 @@
-/* @(#)s_floor.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* floor(x)
* Return x rounded toward -inf to integral value
diff --git a/libm/upstream-freebsd/lib/msun/src/s_floorf.c b/libm/upstream-freebsd/lib/msun/src/s_floorf.c
index 6b510de..d497157 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_floorf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_floorf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* floorf(x)
* Return x rounded toward -inf to integral value
diff --git a/libm/upstream-freebsd/lib/msun/src/s_floorl.c b/libm/upstream-freebsd/lib/msun/src/s_floorl.c
index 6cec3e7..3b54cab 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_floorl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_floorl.c
@@ -7,13 +7,8 @@
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
- *
- * From: @(#)s_floor.c 5.1 93/09/24
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* floorl(x)
* Return x rounded toward -inf to integral value
diff --git a/libm/upstream-freebsd/lib/msun/src/s_fma.c b/libm/upstream-freebsd/lib/msun/src/s_fma.c
index 2fd7075..6c889a6 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_fma.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_fma.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <fenv.h>
#include <float.h>
#include <math.h>
@@ -225,17 +222,17 @@
case FE_TONEAREST:
return (z);
case FE_TOWARDZERO:
- if (x > 0.0 ^ y < 0.0 ^ z < 0.0)
+ if ((x > 0.0) ^ (y < 0.0) ^ (z < 0.0))
return (z);
else
return (nextafter(z, 0));
case FE_DOWNWARD:
- if (x > 0.0 ^ y < 0.0)
+ if ((x > 0.0) ^ (y < 0.0))
return (z);
else
return (nextafter(z, -INFINITY));
default: /* FE_UPWARD */
- if (x > 0.0 ^ y < 0.0)
+ if ((x > 0.0) ^ (y < 0.0))
return (nextafter(z, INFINITY));
else
return (z);
@@ -247,7 +244,7 @@
zs = copysign(DBL_MIN, zs);
fesetround(FE_TONEAREST);
- /* work around clang bug 8100 */
+ /* work around clang issue #8472 */
volatile double vxs = xs;
/*
@@ -279,7 +276,7 @@
* rounding modes.
*/
fesetround(oround);
- /* work around clang bug 8100 */
+ /* work around clang issue #8472 */
volatile double vrlo = r.lo;
adj = vrlo + xy.lo;
return (ldexp(r.hi + adj, spread));
diff --git a/libm/upstream-freebsd/lib/msun/src/s_fmaf.c b/libm/upstream-freebsd/lib/msun/src/s_fmaf.c
index ae979cb..5f3d5d1 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_fmaf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_fmaf.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <fenv.h>
#include "math.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_fmal.c b/libm/upstream-freebsd/lib/msun/src/s_fmal.c
index a0622a2..80c835d 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_fmal.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_fmal.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <fenv.h>
#include <float.h>
#include <math.h>
@@ -206,17 +203,17 @@
case FE_TONEAREST:
return (z);
case FE_TOWARDZERO:
- if (x > 0.0 ^ y < 0.0 ^ z < 0.0)
+ if ((x > 0.0) ^ (y < 0.0) ^ (z < 0.0))
return (z);
else
return (nextafterl(z, 0));
case FE_DOWNWARD:
- if (x > 0.0 ^ y < 0.0)
+ if ((x > 0.0) ^ (y < 0.0))
return (z);
else
return (nextafterl(z, -INFINITY));
default: /* FE_UPWARD */
- if (x > 0.0 ^ y < 0.0)
+ if ((x > 0.0) ^ (y < 0.0))
return (nextafterl(z, INFINITY));
else
return (z);
@@ -228,7 +225,7 @@
zs = copysignl(LDBL_MIN, zs);
fesetround(FE_TONEAREST);
- /* work around clang bug 8100 */
+ /* work around clang issue #8472 */
volatile long double vxs = xs;
/*
@@ -260,7 +257,7 @@
* rounding modes.
*/
fesetround(oround);
- /* work around clang bug 8100 */
+ /* work around clang issue #8472 */
volatile long double vrlo = r.lo;
adj = vrlo + xy.lo;
return (ldexpl(r.hi + adj, spread));
diff --git a/libm/upstream-freebsd/lib/msun/src/s_fmax.c b/libm/upstream-freebsd/lib/msun/src/s_fmax.c
index 42bd11c..5d437fc 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_fmax.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_fmax.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_fmaxf.c b/libm/upstream-freebsd/lib/msun/src/s_fmaxf.c
index 10667d3..1572572 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_fmaxf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_fmaxf.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <math.h>
#include "fpmath.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_fmaxl.c b/libm/upstream-freebsd/lib/msun/src/s_fmaxl.c
index bf42587..73e2a4b 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_fmaxl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_fmaxl.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <math.h>
#include "fpmath.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_fmin.c b/libm/upstream-freebsd/lib/msun/src/s_fmin.c
index e79071d..a349e5d 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_fmin.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_fmin.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_fminf.c b/libm/upstream-freebsd/lib/msun/src/s_fminf.c
index 19ffd42..5c2537e 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_fminf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_fminf.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <math.h>
#include "fpmath.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_fminl.c b/libm/upstream-freebsd/lib/msun/src/s_fminl.c
index c906f1d..7ac17e3 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_fminl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_fminl.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <math.h>
#include "fpmath.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_frexp.c b/libm/upstream-freebsd/lib/msun/src/s_frexp.c
index 318a991..90aea67 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_frexp.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_frexp.c
@@ -1,4 +1,3 @@
-/* @(#)s_frexp.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* for non-zero x
* x = frexp(arg,&exp);
diff --git a/libm/upstream-freebsd/lib/msun/src/s_frexpf.c b/libm/upstream-freebsd/lib/msun/src/s_frexpf.c
index 5a7c486..bca27b5 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_frexpf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_frexpf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_frexpl.c b/libm/upstream-freebsd/lib/msun/src/s_frexpl.c
index 7101615..32f1264 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_frexpl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_frexpl.c
@@ -24,8 +24,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <float.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_ilogb.c b/libm/upstream-freebsd/lib/msun/src/s_ilogb.c
index a930bc9..27e0bbb 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_ilogb.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_ilogb.c
@@ -1,4 +1,3 @@
-/* @(#)s_ilogb.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* ilogb(double x)
* return the binary exponent of non-zero x
* ilogb(0) = FP_ILOGB0
diff --git a/libm/upstream-freebsd/lib/msun/src/s_ilogbf.c b/libm/upstream-freebsd/lib/msun/src/s_ilogbf.c
index 93fe295..e0f8fee 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_ilogbf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_ilogbf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <limits.h>
#include "math.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_ilogbl.c b/libm/upstream-freebsd/lib/msun/src/s_ilogbl.c
index 3211f44..4d8fb8f 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_ilogbl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_ilogbl.c
@@ -1,5 +1,4 @@
/*
- * From: @(#)s_ilogb.c 5.1 93/09/24
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include <limits.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_llrint.c b/libm/upstream-freebsd/lib/msun/src/s_llrint.c
index 7c959ec..5e27603 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_llrint.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_llrint.c
@@ -1,6 +1,3 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#define type double
#define roundit rint
#define dtype long long
diff --git a/libm/upstream-freebsd/lib/msun/src/s_llrintf.c b/libm/upstream-freebsd/lib/msun/src/s_llrintf.c
index 7ec6015..b117f7c 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_llrintf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_llrintf.c
@@ -1,6 +1,3 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#define type float
#define roundit rintf
#define dtype long long
diff --git a/libm/upstream-freebsd/lib/msun/src/s_llrintl.c b/libm/upstream-freebsd/lib/msun/src/s_llrintl.c
index 6ef8375..82f4529 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_llrintl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_llrintl.c
@@ -1,6 +1,3 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#define type long double
#define roundit rintl
#define dtype long long
diff --git a/libm/upstream-freebsd/lib/msun/src/s_llround.c b/libm/upstream-freebsd/lib/msun/src/s_llround.c
index 827dfc1..3983ce1 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_llround.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_llround.c
@@ -1,6 +1,3 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#define type double
#define roundit round
#define dtype long long
diff --git a/libm/upstream-freebsd/lib/msun/src/s_llroundf.c b/libm/upstream-freebsd/lib/msun/src/s_llroundf.c
index c037a18..827d915 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_llroundf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_llroundf.c
@@ -1,6 +1,3 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#define type float
#define roundit roundf
#define dtype long long
diff --git a/libm/upstream-freebsd/lib/msun/src/s_llroundl.c b/libm/upstream-freebsd/lib/msun/src/s_llroundl.c
index 02c44eb..40cad84 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_llroundl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_llroundl.c
@@ -1,6 +1,3 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#define type long double
#define roundit roundl
#define dtype long long
diff --git a/libm/upstream-freebsd/lib/msun/src/s_log1p.c b/libm/upstream-freebsd/lib/msun/src/s_log1p.c
index 3cc77bd..7131bea 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_log1p.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_log1p.c
@@ -1,4 +1,3 @@
-/* @(#)s_log1p.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* double log1p(double x)
*
* Method :
diff --git a/libm/upstream-freebsd/lib/msun/src/s_log1pf.c b/libm/upstream-freebsd/lib/msun/src/s_log1pf.c
index df04c67..dad567b 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_log1pf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_log1pf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include "math.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_logb.c b/libm/upstream-freebsd/lib/msun/src/s_logb.c
index a47e354..ec777fd 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_logb.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_logb.c
@@ -1,4 +1,3 @@
-/* @(#)s_logb.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* double logb(x)
* IEEE 754 logb. Included to pass IEEE test suite. Not recommend.
diff --git a/libm/upstream-freebsd/lib/msun/src/s_logbf.c b/libm/upstream-freebsd/lib/msun/src/s_logbf.c
index 3ab190d..0416a9c 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_logbf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_logbf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_logbl.c b/libm/upstream-freebsd/lib/msun/src/s_logbl.c
index ee1a91f..1641dfb 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_logbl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_logbl.c
@@ -1,5 +1,4 @@
/*
- * From: @(#)s_ilogb.c 5.1 93/09/24
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include <limits.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_lrint.c b/libm/upstream-freebsd/lib/msun/src/s_lrint.c
index be00cbb..b1e9654 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_lrint.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_lrint.c
@@ -26,12 +26,10 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
#include <fenv.h>
#include <math.h>
#ifndef type
-__FBSDID("$FreeBSD$");
#define type double
#define roundit rint
#define dtype long
diff --git a/libm/upstream-freebsd/lib/msun/src/s_lrintf.c b/libm/upstream-freebsd/lib/msun/src/s_lrintf.c
index a757ded..1c040e8 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_lrintf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_lrintf.c
@@ -1,6 +1,3 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#define type float
#define roundit rintf
#define dtype long
diff --git a/libm/upstream-freebsd/lib/msun/src/s_lrintl.c b/libm/upstream-freebsd/lib/msun/src/s_lrintl.c
index 497b442..91614e8 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_lrintl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_lrintl.c
@@ -1,6 +1,3 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#define type long double
#define roundit rintl
#define dtype long
diff --git a/libm/upstream-freebsd/lib/msun/src/s_lround.c b/libm/upstream-freebsd/lib/msun/src/s_lround.c
index 00f4b95..ae2f5ce 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_lround.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_lround.c
@@ -26,13 +26,11 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
#include <sys/limits.h>
#include <fenv.h>
#include <math.h>
#ifndef type
-__FBSDID("$FreeBSD$");
#define type double
#define roundit round
#define dtype long
diff --git a/libm/upstream-freebsd/lib/msun/src/s_lroundf.c b/libm/upstream-freebsd/lib/msun/src/s_lroundf.c
index e24fe7f..86e63cc 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_lroundf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_lroundf.c
@@ -1,6 +1,3 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#define type float
#define roundit roundf
#define dtype long
diff --git a/libm/upstream-freebsd/lib/msun/src/s_lroundl.c b/libm/upstream-freebsd/lib/msun/src/s_lroundl.c
index e410827..57a2e90 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_lroundl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_lroundl.c
@@ -1,6 +1,3 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#define type long double
#define roundit roundl
#define dtype long
diff --git a/libm/upstream-freebsd/lib/msun/src/s_modf.c b/libm/upstream-freebsd/lib/msun/src/s_modf.c
index ab13191..6ee2d5a 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_modf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_modf.c
@@ -1,4 +1,3 @@
-/* @(#)s_modf.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,10 +9,6 @@
* ====================================================
*/
-#ifndef lint
-static char rcsid[] = "$FreeBSD$";
-#endif
-
/*
* modf(double x, double *iptr)
* return fraction part of x, and return x's integral part in *iptr.
diff --git a/libm/upstream-freebsd/lib/msun/src/s_modff.c b/libm/upstream-freebsd/lib/msun/src/s_modff.c
index 062259c..39f6c1c 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_modff.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_modff.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_modfl.c b/libm/upstream-freebsd/lib/msun/src/s_modfl.c
index 8e5c4d3..32470eb 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_modfl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_modfl.c
@@ -34,8 +34,6 @@
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
- *
- * $FreeBSD$
*/
#include <float.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_nan.c b/libm/upstream-freebsd/lib/msun/src/s_nan.c
index 1345f22..d129a55 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_nan.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_nan.c
@@ -24,8 +24,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <sys/endian.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_nearbyint.c b/libm/upstream-freebsd/lib/msun/src/s_nearbyint.c
index ae6ffde..3dcaf98 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_nearbyint.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_nearbyint.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <fenv.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_nextafter.c b/libm/upstream-freebsd/lib/msun/src/s_nextafter.c
index 52dd21c..1b394e5 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_nextafter.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_nextafter.c
@@ -1,4 +1,3 @@
-/* @(#)s_nextafter.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* IEEE functions
* nextafter(x,y)
* return the next machine floating-point number of x in the
diff --git a/libm/upstream-freebsd/lib/msun/src/s_nextafterf.c b/libm/upstream-freebsd/lib/msun/src/s_nextafterf.c
index 96e21ef..418b126 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_nextafterf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_nextafterf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_nextafterl.c b/libm/upstream-freebsd/lib/msun/src/s_nextafterl.c
index 9c61a43..fe5a010 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_nextafterl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_nextafterl.c
@@ -1,4 +1,3 @@
-/* @(#)s_nextafter.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* IEEE functions
* nextafter(x,y)
* return the next machine floating-point number of x in the
diff --git a/libm/upstream-freebsd/lib/msun/src/s_nexttoward.c b/libm/upstream-freebsd/lib/msun/src/s_nexttoward.c
index b2a50d3..5482dc2 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_nexttoward.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_nexttoward.c
@@ -1,4 +1,3 @@
-/* @(#)s_nextafter.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* We assume that a long double has a 15-bit exponent. On systems
* where long double is the same as double, nexttoward() is an alias
diff --git a/libm/upstream-freebsd/lib/msun/src/s_nexttowardf.c b/libm/upstream-freebsd/lib/msun/src/s_nexttowardf.c
index 9ddfff9..05c89f4 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_nexttowardf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_nexttowardf.c
@@ -9,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include "fpmath.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_remquo.c b/libm/upstream-freebsd/lib/msun/src/s_remquo.c
index 6a111df..206d290 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_remquo.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_remquo.c
@@ -1,4 +1,3 @@
-/* @(#)e_fmod.c 1.3 95/01/18 */
/*-
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include "math.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_remquof.c b/libm/upstream-freebsd/lib/msun/src/s_remquof.c
index f4c1016..9cd1485 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_remquof.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_remquof.c
@@ -1,4 +1,3 @@
-/* @(#)e_fmod.c 1.3 95/01/18 */
/*-
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_remquol.c b/libm/upstream-freebsd/lib/msun/src/s_remquol.c
index a9f5813..0dadcea 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_remquol.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_remquol.c
@@ -1,4 +1,3 @@
-/* @(#)e_fmod.c 1.3 95/01/18 */
/*-
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include <stdint.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_rint.c b/libm/upstream-freebsd/lib/msun/src/s_rint.c
index c56f8fb..d82a9d0 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_rint.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_rint.c
@@ -1,4 +1,3 @@
-/* @(#)s_rint.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* rint(x)
* Return x rounded to integral value according to the prevailing
diff --git a/libm/upstream-freebsd/lib/msun/src/s_rintf.c b/libm/upstream-freebsd/lib/msun/src/s_rintf.c
index f8743a4..3f0cb90 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_rintf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_rintf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include <stdint.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_rintl.c b/libm/upstream-freebsd/lib/msun/src/s_rintl.c
index 790edbc..72c9cab 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_rintl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_rintl.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_round.c b/libm/upstream-freebsd/lib/msun/src/s_round.c
index a112bc5..c1b55f5 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_round.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_round.c
@@ -26,9 +26,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include "math.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_roundf.c b/libm/upstream-freebsd/lib/msun/src/s_roundf.c
index bb6f77c..7c09e09 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_roundf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_roundf.c
@@ -26,9 +26,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_roundl.c b/libm/upstream-freebsd/lib/msun/src/s_roundl.c
index 9e85423..bc5dfe5 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_roundl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_roundl.c
@@ -26,9 +26,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#ifdef __i386__
#include <ieeefp.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_scalbln.c b/libm/upstream-freebsd/lib/msun/src/s_scalbln.c
index e8c6377..42e4669 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_scalbln.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_scalbln.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <math.h>
#define NMAX 65536
diff --git a/libm/upstream-freebsd/lib/msun/src/s_significand.c b/libm/upstream-freebsd/lib/msun/src/s_significand.c
index eed80ec..62571bb 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_significand.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_significand.c
@@ -1,4 +1,3 @@
-/* @(#)s_signif.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* significand(x) computes just
* scalb(x, (double) -ilogb(x)),
diff --git a/libm/upstream-freebsd/lib/msun/src/s_significandf.c b/libm/upstream-freebsd/lib/msun/src/s_significandf.c
index b33ab7b..3cdaa4d 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_significandf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_significandf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_sin.c b/libm/upstream-freebsd/lib/msun/src/s_sin.c
index 17ea846..614bcc2 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_sin.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_sin.c
@@ -1,4 +1,3 @@
-/* @(#)s_sin.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* sin(x)
* Return sine function of x.
*
diff --git a/libm/upstream-freebsd/lib/msun/src/s_sincos.c b/libm/upstream-freebsd/lib/msun/src/s_sincos.c
index 85e8d74..4e819ea 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_sincos.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_sincos.c
@@ -12,9 +12,6 @@
* algorithms are contained in the original files.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include "math.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_sincosl.c b/libm/upstream-freebsd/lib/msun/src/s_sincosl.c
index 3dd3457..7fb69aa 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_sincosl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_sincosl.c
@@ -26,9 +26,6 @@
* s_sinl.c and s_cosl.c merged by Steven G. Kargl.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#ifdef __i386__
#include <ieeefp.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_sinl.c b/libm/upstream-freebsd/lib/msun/src/s_sinl.c
index c5ee106..d0b7b34 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_sinl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_sinl.c
@@ -26,9 +26,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#ifdef __i386__
#include <ieeefp.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/s_tan.c b/libm/upstream-freebsd/lib/msun/src/s_tan.c
index 196c27e..20b9516 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_tan.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_tan.c
@@ -1,4 +1,3 @@
-/* @(#)s_tan.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* tan(x)
* Return tangent function of x.
*
diff --git a/libm/upstream-freebsd/lib/msun/src/s_tanf.c b/libm/upstream-freebsd/lib/msun/src/s_tanf.c
index 4fe8c17..2462f96 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_tanf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_tanf.c
@@ -14,9 +14,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <float.h>
#include "math.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_tanh.c b/libm/upstream-freebsd/lib/msun/src/s_tanh.c
index 6d26c69..cc8daed 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_tanh.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_tanh.c
@@ -1,4 +1,3 @@
-/* @(#)s_tanh.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/* Tanh(x)
* Return the Hyperbolic Tangent of x
*
diff --git a/libm/upstream-freebsd/lib/msun/src/s_tanhf.c b/libm/upstream-freebsd/lib/msun/src/s_tanhf.c
index f537be4..e56813a 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_tanhf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_tanhf.c
@@ -13,9 +13,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include "math.h"
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/s_tanhl.c b/libm/upstream-freebsd/lib/msun/src/s_tanhl.c
index b753186..3285b9a 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_tanhl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_tanhl.c
@@ -1,6 +1,5 @@
/* from: FreeBSD: head/lib/msun/src/s_tanhl.c XXX */
-/* @(#)s_tanh.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -12,9 +11,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* See s_tanh.c for complete comments.
*
diff --git a/libm/upstream-freebsd/lib/msun/src/s_tanl.c b/libm/upstream-freebsd/lib/msun/src/s_tanl.c
index c21e38d..3736477 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_tanl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_tanl.c
@@ -26,9 +26,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* Limited testing on pseudorandom numbers drawn within [0:4e8] shows
* an accuracy of <= 1.5 ULP where 247024 values of x out of 40 million
diff --git a/libm/upstream-freebsd/lib/msun/src/s_tgammaf.c b/libm/upstream-freebsd/lib/msun/src/s_tgammaf.c
index 6cbd356..9fa9df9 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_tgammaf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_tgammaf.c
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <math.h>
/*
diff --git a/libm/upstream-freebsd/lib/msun/src/s_trunc.c b/libm/upstream-freebsd/lib/msun/src/s_trunc.c
index 63a6753..3ec59f2 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_trunc.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_trunc.c
@@ -1,4 +1,3 @@
-/* @(#)s_floor.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* trunc(x)
* Return x rounded toward 0 to integral value
diff --git a/libm/upstream-freebsd/lib/msun/src/s_truncf.c b/libm/upstream-freebsd/lib/msun/src/s_truncf.c
index 384eaee..3f4db30 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_truncf.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_truncf.c
@@ -1,4 +1,3 @@
-/* @(#)s_floor.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,9 +9,6 @@
* ====================================================
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* truncf(x)
* Return x rounded toward 0 to integral value
diff --git a/libm/upstream-freebsd/lib/msun/src/s_truncl.c b/libm/upstream-freebsd/lib/msun/src/s_truncl.c
index 9e2b511..81e794d 100644
--- a/libm/upstream-freebsd/lib/msun/src/s_truncl.c
+++ b/libm/upstream-freebsd/lib/msun/src/s_truncl.c
@@ -7,13 +7,8 @@
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
- *
- * From: @(#)s_floor.c 5.1 93/09/24
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
/*
* truncl(x)
* Return x rounded toward 0 to integral value
diff --git a/libm/upstream-freebsd/lib/msun/src/w_cabs.c b/libm/upstream-freebsd/lib/msun/src/w_cabs.c
index 543b858..4986461 100644
--- a/libm/upstream-freebsd/lib/msun/src/w_cabs.c
+++ b/libm/upstream-freebsd/lib/msun/src/w_cabs.c
@@ -5,9 +5,6 @@
* Placed into the Public Domain, 1994.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <float.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/w_cabsf.c b/libm/upstream-freebsd/lib/msun/src/w_cabsf.c
index b5065c8..aedbdef 100644
--- a/libm/upstream-freebsd/lib/msun/src/w_cabsf.c
+++ b/libm/upstream-freebsd/lib/msun/src/w_cabsf.c
@@ -5,11 +5,6 @@
* Placed into the Public Domain, 1994.
*/
-#ifndef lint
-static const char rcsid[] =
- "$FreeBSD$";
-#endif /* not lint */
-
#include <complex.h>
#include <math.h>
#include "math_private.h"
diff --git a/libm/upstream-freebsd/lib/msun/src/w_cabsl.c b/libm/upstream-freebsd/lib/msun/src/w_cabsl.c
index b715e0c..1539944 100644
--- a/libm/upstream-freebsd/lib/msun/src/w_cabsl.c
+++ b/libm/upstream-freebsd/lib/msun/src/w_cabsl.c
@@ -7,9 +7,6 @@
* Modified by Steven G. Kargl for the long double type.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <complex.h>
#include <math.h>
diff --git a/libm/upstream-freebsd/lib/msun/src/w_dremf.c b/libm/upstream-freebsd/lib/msun/src/w_dremf.c
index 4bfcff2..18df078 100644
--- a/libm/upstream-freebsd/lib/msun/src/w_dremf.c
+++ b/libm/upstream-freebsd/lib/msun/src/w_dremf.c
@@ -4,7 +4,6 @@
* Written by J.T. Conklin, <jtc@wimsey.com>
* Placed into the Public Domain, 1994.
*/
-/* $FreeBSD$ */
#include "math.h"
#include "math_private.h"
diff --git a/libm/x86/lrint.S b/libm/x86/lrint.S
deleted file mode 100644
index df26b30..0000000
--- a/libm/x86/lrint.S
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-Copyright (c) 2014, Intel Corporation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
-
- * Neither the name of Intel Corporation nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include <private/bionic_asm.h>
-
-ENTRY(lrint)
- // LP32 sizeof(long) == 4.
- movsd 0x4(%esp),%xmm0
- cvtsd2si %xmm0, %eax
- ret
-END(lrint)
-
-// LP32 sizeof(long double) == sizeof(double).
-ALIAS_SYMBOL(lrintl, lrint);
diff --git a/libm/x86/lrintf.S b/libm/x86/lrintf.S
deleted file mode 100644
index d2dae03..0000000
--- a/libm/x86/lrintf.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-Copyright (c) 2014, Intel Corporation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
-
- * Neither the name of Intel Corporation nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include <private/bionic_asm.h>
-
-ENTRY(lrintf)
- // LP32 sizeof(long) == 4.
- movss 0x4(%esp),%xmm0
- cvtss2si %xmm0, %eax
- ret
-END(lrintf)
diff --git a/libm/x86_64/lrint.S b/libm/x86_64/lrint.S
deleted file mode 100644
index d678761..0000000
--- a/libm/x86_64/lrint.S
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-Copyright (c) 2014, Intel Corporation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
-
- * Neither the name of Intel Corporation nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include <private/bionic_asm.h>
-
-ENTRY(lrint)
- // LP64 sizeof(long) == 8.
- cvtsd2si %xmm0, %rax
- ret
-END(lrint)
-
-// LP64 sizeof(long long) == sizeof(long).
-ALIAS_SYMBOL(llrint, lrint);
diff --git a/libm/x86_64/lrintf.S b/libm/x86_64/lrintf.S
deleted file mode 100644
index 3d3acfb..0000000
--- a/libm/x86_64/lrintf.S
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-Copyright (c) 2014, Intel Corporation
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
-
- * Neither the name of Intel Corporation nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include <private/bionic_asm.h>
-
-ENTRY(lrintf)
- // LP64 sizeof(long) == 8.
- cvtss2si %xmm0, %rax
- ret
-END(lrintf)
-
-// LP64 sizeof(long long) == sizeof(long).
-ALIAS_SYMBOL(llrintf, lrintf);
diff --git a/linker/Android.bp b/linker/Android.bp
index 694d1f5..563cf3d 100644
--- a/linker/Android.bp
+++ b/linker/Android.bp
@@ -14,6 +14,16 @@
],
}
+linker_common_flags = [
+ "-fno-stack-protector",
+ "-Wstrict-overflow=5",
+ "-fvisibility=hidden",
+ "-Wall",
+ "-Wextra",
+ "-Wunused",
+ "-Werror",
+]
+
// ========================================================
// linker_wrapper - Linux Bionic (on the host)
// ========================================================
@@ -36,15 +46,7 @@
},
},
- cflags: [
- "-fno-stack-protector",
- "-Wstrict-overflow=5",
- "-fvisibility=hidden",
- "-Wall",
- "-Wextra",
- "-Wno-unused",
- "-Werror",
- ],
+ cflags: linker_common_flags,
srcs: [
"linker_wrapper.cpp",
@@ -83,26 +85,8 @@
},
},
- cflags: [
- "-fno-stack-protector",
- "-Wstrict-overflow=5",
- "-fvisibility=hidden",
- "-Wall",
- "-Wextra",
- "-Wunused",
- "-Werror",
- ],
-
- // TODO: split out the asflags.
- asflags: [
- "-fno-stack-protector",
- "-Wstrict-overflow=5",
- "-fvisibility=hidden",
- "-Wall",
- "-Wextra",
- "-Wunused",
- "-Werror",
- ],
+ cflags: linker_common_flags,
+ asflags: linker_common_flags,
product_variables: {
debuggable: {
diff --git a/linker/linker.cpp b/linker/linker.cpp
index e13d37d..4365ea5 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -387,7 +387,7 @@
auto length = readlink(proc_self_fd, buf, sizeof(buf));
if (length == -1) {
if (!is_first_stage_init()) {
- PRINT("readlink(\"%s\") failed: %s [fd=%d]", proc_self_fd, strerror(errno), fd);
+ PRINT("readlink(\"%s\" [fd=%d]) failed: %m", proc_self_fd, fd);
}
return false;
}
@@ -1185,7 +1185,7 @@
struct stat file_stat;
if (TEMP_FAILURE_RETRY(fstat(task->get_fd(), &file_stat)) != 0) {
- DL_OPEN_ERR("unable to stat file for the library \"%s\": %s", name, strerror(errno));
+ DL_OPEN_ERR("unable to stat file for the library \"%s\": %m", name);
return false;
}
if (file_offset >= file_stat.st_size) {
@@ -1215,7 +1215,7 @@
struct statfs fs_stat;
if (TEMP_FAILURE_RETRY(fstatfs(task->get_fd(), &fs_stat)) != 0) {
- DL_OPEN_ERR("unable to fstatfs file for the library \"%s\": %s", name, strerror(errno));
+ DL_OPEN_ERR("unable to fstatfs file for the library \"%s\": %m", name);
return false;
}
@@ -3364,13 +3364,13 @@
get_realpath());
add_dlwarning(get_realpath(), "text relocations");
if (phdr_table_unprotect_segments(phdr, phnum, load_bias, should_pad_segments_) < 0) {
- DL_ERR("can't unprotect loadable segments for \"%s\": %s", get_realpath(), strerror(errno));
+ DL_ERR("can't unprotect loadable segments for \"%s\": %m", get_realpath());
return false;
}
}
#endif
- if (!relocate(lookup_list)) {
+ if (this != solist_get_vdso() && !relocate(lookup_list)) {
return false;
}
@@ -3380,8 +3380,7 @@
if (has_text_relocations) {
// All relocations are done, we can protect our segments back to read-only.
if (phdr_table_protect_segments(phdr, phnum, load_bias, should_pad_segments_) < 0) {
- DL_ERR("can't protect segments for \"%s\": %s",
- get_realpath(), strerror(errno));
+ DL_ERR("can't protect segments for \"%s\": %m", get_realpath());
return false;
}
}
@@ -3397,15 +3396,13 @@
if (extinfo && (extinfo->flags & ANDROID_DLEXT_WRITE_RELRO)) {
if (phdr_table_serialize_gnu_relro(phdr, phnum, load_bias,
extinfo->relro_fd, relro_fd_offset) < 0) {
- DL_ERR("failed serializing GNU RELRO section for \"%s\": %s",
- get_realpath(), strerror(errno));
+ DL_ERR("failed serializing GNU RELRO section for \"%s\": %m", get_realpath());
return false;
}
} else if (extinfo && (extinfo->flags & ANDROID_DLEXT_USE_RELRO)) {
if (phdr_table_map_gnu_relro(phdr, phnum, load_bias,
extinfo->relro_fd, relro_fd_offset) < 0) {
- DL_ERR("failed mapping GNU RELRO section for \"%s\": %s",
- get_realpath(), strerror(errno));
+ DL_ERR("failed mapping GNU RELRO section for \"%s\": %m", get_realpath());
return false;
}
}
@@ -3418,8 +3415,7 @@
bool soinfo::protect_relro() {
if (phdr_table_protect_gnu_relro(phdr, phnum, load_bias, should_pad_segments_) < 0) {
- DL_ERR("can't enable GNU RELRO protection for \"%s\": %s",
- get_realpath(), strerror(errno));
+ DL_ERR("can't enable GNU RELRO protection for \"%s\": %m", get_realpath());
return false;
}
return true;
diff --git a/linker/linker_config.cpp b/linker/linker_config.cpp
index 70430b8..613c781 100644
--- a/linker/linker_config.cpp
+++ b/linker/linker_config.cpp
@@ -254,11 +254,10 @@
// the failure with INFO rather than DL_WARN. e.g. A binary in
// /data/local/tmp may attempt to stat /postinstall. See
// http://b/120996057.
- INFO("%s:%zd: warning: path \"%s\" couldn't be resolved: %s",
+ INFO("%s:%zd: warning: path \"%s\" couldn't be resolved: %m",
ld_config_file_path,
cp.lineno(),
- value.c_str(),
- strerror(errno));
+ value.c_str());
resolved_path = value;
}
diff --git a/linker/linker_debug.cpp b/linker/linker_debug.cpp
index b0aae79..e6211f7 100644
--- a/linker/linker_debug.cpp
+++ b/linker/linker_debug.cpp
@@ -30,13 +30,14 @@
#include <unistd.h>
-void linker_log_va_list(int prio __unused, const char* fmt, va_list ap) {
-#if LINKER_DEBUG_TO_LOG
- async_safe_format_log_va_list(5 - prio, "linker", fmt, ap);
-#else
- async_safe_format_fd_va_list(STDOUT_FILENO, fmt, ap);
- write(STDOUT_FILENO, "\n", 1);
-#endif
+void linker_log_va_list(int prio, const char* fmt, va_list ap) {
+ va_list ap2;
+ va_copy(ap2, ap);
+ async_safe_format_log_va_list(5 - prio, "linker", fmt, ap2);
+ va_end(ap2);
+
+ async_safe_format_fd_va_list(STDERR_FILENO, fmt, ap);
+ write(STDERR_FILENO, "\n", 1);
}
void linker_log(int prio, const char* fmt, ...) {
diff --git a/linker/linker_debug.h b/linker/linker_debug.h
index 477b009..3aab185 100644
--- a/linker/linker_debug.h
+++ b/linker/linker_debug.h
@@ -33,11 +33,6 @@
// INFO, TRACE, and DEBUG calls in the source). This will only
// affect new processes being launched.
-// By default, traces are sent to logcat, with the "linker" tag. You can
-// change this to go to stdout instead by setting the definition of
-// LINKER_DEBUG_TO_LOG to 0.
-#define LINKER_DEBUG_TO_LOG 1
-
#define TRACE_DEBUG 1
#define DO_TRACE_LOOKUP 1
#define DO_TRACE_RELO 1
diff --git a/linker/linker_main.cpp b/linker/linker_main.cpp
index 2b230a8..0e5fb96 100644
--- a/linker/linker_main.cpp
+++ b/linker/linker_main.cpp
@@ -73,6 +73,25 @@
void __libc_init_mte(const memtag_dynamic_entries_t* memtag_dynamic_entries, const void* phdr_start,
size_t phdr_count, uintptr_t load_bias, void* stack_top);
+__printflike(1, 2) static void __linker_error(const char* fmt, ...) {
+ va_list ap;
+
+ va_start(ap, fmt);
+ async_safe_format_fd_va_list(STDERR_FILENO, fmt, ap);
+ write(STDERR_FILENO, "\n", 1);
+ va_end(ap);
+
+ va_start(ap, fmt);
+ async_safe_format_log_va_list(ANDROID_LOG_FATAL, "linker", fmt, ap);
+ va_end(ap);
+
+ _exit(EXIT_FAILURE);
+}
+
+static void __linker_cannot_link(const char* argv0) {
+ __linker_error("CANNOT LINK EXECUTABLE \"%s\": %s", argv0, linker_get_error_buffer());
+}
+
// These should be preserved static to avoid emitting
// RELATIVE relocations for the part of the code running
// before linker links itself.
@@ -167,22 +186,21 @@
return;
}
- soinfo* si = soinfo_alloc(&g_default_namespace, "[vdso]", nullptr, 0, 0);
+ vdso = soinfo_alloc(&g_default_namespace, "[vdso]", nullptr, 0, 0);
- si->phdr = reinterpret_cast<ElfW(Phdr)*>(reinterpret_cast<char*>(ehdr_vdso) + ehdr_vdso->e_phoff);
- si->phnum = ehdr_vdso->e_phnum;
- si->base = reinterpret_cast<ElfW(Addr)>(ehdr_vdso);
- si->size = phdr_table_get_load_size(si->phdr, si->phnum);
- si->load_bias = get_elf_exec_load_bias(ehdr_vdso);
+ vdso->phdr = reinterpret_cast<ElfW(Phdr)*>(reinterpret_cast<char*>(ehdr_vdso) + ehdr_vdso->e_phoff);
+ vdso->phnum = ehdr_vdso->e_phnum;
+ vdso->base = reinterpret_cast<ElfW(Addr)>(ehdr_vdso);
+ vdso->size = phdr_table_get_load_size(vdso->phdr, vdso->phnum);
+ vdso->load_bias = get_elf_exec_load_bias(ehdr_vdso);
- si->prelink_image();
- si->link_image(SymbolLookupList(si), si, nullptr, nullptr);
- // prevents accidental unloads...
- si->set_dt_flags_1(si->get_dt_flags_1() | DF_1_NODELETE);
- si->set_linked();
- si->call_constructors();
+ if (!vdso->prelink_image() || !vdso->link_image(SymbolLookupList(vdso), vdso, nullptr, nullptr)) {
+ __linker_cannot_link(g_argv[0]);
+ }
- vdso = si;
+ // Prevent accidental unloads...
+ vdso->set_dt_flags_1(vdso->get_dt_flags_1() | DF_1_NODELETE);
+ vdso->set_linked();
}
// Initializes an soinfo's link_map_head field using other fields from the
@@ -216,8 +234,7 @@
if (TEMP_FAILURE_RETRY(stat(exe_path, &result.file_stat) == -1)) {
// Fallback to argv[0] for the case where /proc isn't available
if (TEMP_FAILURE_RETRY(stat(arg_path, &result.file_stat) == -1)) {
- async_safe_fatal("unable to stat either \"/proc/self/exe\" or \"%s\": %s",
- arg_path, strerror(errno));
+ async_safe_fatal("unable to stat either \"/proc/self/exe\" or \"%s\": %m", arg_path);
}
exe_path = arg_path;
}
@@ -239,27 +256,6 @@
static char kFallbackLinkerPath[] = "/system/bin/linker";
#endif
-__printflike(1, 2)
-static void __linker_error(const char* fmt, ...) {
- va_list ap;
-
- va_start(ap, fmt);
- async_safe_format_fd_va_list(STDERR_FILENO, fmt, ap);
- va_end(ap);
-
- va_start(ap, fmt);
- async_safe_format_log_va_list(ANDROID_LOG_FATAL, "linker", fmt, ap);
- va_end(ap);
-
- _exit(EXIT_FAILURE);
-}
-
-static void __linker_cannot_link(const char* argv0) {
- __linker_error("CANNOT LINK EXECUTABLE \"%s\": %s\n",
- argv0,
- linker_get_error_buffer());
-}
-
// Load an executable. Normally the kernel has already loaded the executable when the linker
// starts. The linker can be invoked directly on an executable, though, and then the linker must
// load it. This function doesn't load dependencies or resolve relocations.
@@ -267,26 +263,26 @@
ExecutableInfo result = {};
if (orig_path[0] != '/') {
- __linker_error("error: expected absolute path: \"%s\"\n", orig_path);
+ __linker_error("error: expected absolute path: \"%s\"", orig_path);
}
off64_t file_offset;
android::base::unique_fd fd(open_executable(orig_path, &file_offset, &result.path));
if (fd.get() == -1) {
- __linker_error("error: unable to open file \"%s\"\n", orig_path);
+ __linker_error("error: unable to open file \"%s\"", orig_path);
}
if (TEMP_FAILURE_RETRY(fstat(fd.get(), &result.file_stat)) == -1) {
- __linker_error("error: unable to stat \"%s\": %s\n", result.path.c_str(), strerror(errno));
+ __linker_error("error: unable to stat \"%s\": %m", result.path.c_str());
}
ElfReader elf_reader;
if (!elf_reader.Read(result.path.c_str(), fd.get(), file_offset, result.file_stat.st_size)) {
- __linker_error("error: %s\n", linker_get_error_buffer());
+ __linker_error("error: %s", linker_get_error_buffer());
}
address_space_params address_space;
if (!elf_reader.Load(&address_space)) {
- __linker_error("error: %s\n", linker_get_error_buffer());
+ __linker_error("error: %s", linker_get_error_buffer());
}
result.phdr = elf_reader.loaded_phdr();
@@ -333,11 +329,7 @@
if (getenv("LD_SHOW_AUXV") != nullptr) ld_show_auxv(args.auxv);
-#if defined(__LP64__)
- INFO("[ Android dynamic linker (64-bit) ]");
-#else
- INFO("[ Android dynamic linker (32-bit) ]");
-#endif
+ INFO("[ Android dynamic linker (" ABI_STRING ") ]");
// These should have been sanitized by __libc_init_AT_SECURE, but the test
// doesn't cost us anything.
@@ -401,8 +393,7 @@
if (note_gnu_property.IsBTICompatible() &&
(phdr_table_protect_segments(somain->phdr, somain->phnum, somain->load_bias,
somain->should_pad_segments(), ¬e_gnu_property) < 0)) {
- __linker_error("error: can't protect segments for \"%s\": %s", exe_info.path.c_str(),
- strerror(errno));
+ __linker_error("error: can't protect segments for \"%s\": %m", exe_info.path.c_str());
}
}
#endif
@@ -427,7 +418,7 @@
// and the NDK no longer supports earlier API levels.
if (elf_hdr->e_type != ET_DYN) {
__linker_error("error: %s: Android only supports position-independent "
- "executables (-fPIE)\n", exe_info.path.c_str());
+ "executables (-fPIE)", exe_info.path.c_str());
}
// Use LD_LIBRARY_PATH and LD_PRELOAD (but only if we aren't setuid/setgid).
@@ -695,7 +686,7 @@
// fallback.
__libc_sysinfo = reinterpret_cast<void*>(__libc_int0x80);
#endif
- __linker_error("error: linker cannot load itself\n");
+ __linker_error("error: linker cannot load itself");
}
static ElfW(Addr) __attribute__((noinline))
diff --git a/linker/linker_note_gnu_property_test.cpp b/linker/linker_note_gnu_property_test.cpp
index 41fc47b..960118c 100644
--- a/linker/linker_note_gnu_property_test.cpp
+++ b/linker/linker_note_gnu_property_test.cpp
@@ -137,18 +137,18 @@
dump_member("entries ", entries);
if (entries > 0) {
std::cout << " raw data:";
- const uintptr_t offset = note->nhdr.n_descsz + 16;
- for (uintptr_t offs = 16; offs < offset; ++offs) {
+ const uintptr_t end = note->nhdr.n_descsz + 16;
+ for (uintptr_t offset = 16; offset < end; ++offset) {
std::cout << std::hex;
- if ((offs % 8) == 0) {
+ if ((offset % 8) == 0) {
std::cout << "\n ";
}
- auto value = static_cast<unsigned>(section[offs]);
+ auto value = static_cast<unsigned>(section[offset]);
std::cout << " ";
if (value < 0x10) {
std::cout << "0";
}
- std::cout << static_cast<unsigned>(section[offs]);
+ std::cout << static_cast<unsigned>(section[offset]);
}
std::cout << std::dec << "\n";
}
diff --git a/linker/linker_phdr.cpp b/linker/linker_phdr.cpp
index 30f3161..e89acb5 100644
--- a/linker/linker_phdr.cpp
+++ b/linker/linker_phdr.cpp
@@ -363,7 +363,7 @@
}
if (!phdr_fragment_.Map(fd_, file_offset_, header_.e_phoff, size)) {
- DL_ERR("\"%s\" phdr mmap failed: %s", name_.c_str(), strerror(errno));
+ DL_ERR("\"%s\" phdr mmap failed: %m", name_.c_str());
return false;
}
@@ -389,7 +389,7 @@
}
if (!shdr_fragment_.Map(fd_, file_offset_, header_.e_shoff, size)) {
- DL_ERR("\"%s\" shdr mmap failed: %s", name_.c_str(), strerror(errno));
+ DL_ERR("\"%s\" shdr mmap failed: %m", name_.c_str());
return false;
}
@@ -482,7 +482,7 @@
}
if (!dynamic_fragment_.Map(fd_, file_offset_, dynamic_shdr->sh_offset, dynamic_shdr->sh_size)) {
- DL_ERR("\"%s\" dynamic section mmap failed: %s", name_.c_str(), strerror(errno));
+ DL_ERR("\"%s\" dynamic section mmap failed: %m", name_.c_str());
return false;
}
@@ -495,7 +495,7 @@
}
if (!strtab_fragment_.Map(fd_, file_offset_, strtab_shdr->sh_offset, strtab_shdr->sh_size)) {
- DL_ERR("\"%s\" strtab section mmap failed: %s", name_.c_str(), strerror(errno));
+ DL_ERR("\"%s\" strtab section mmap failed: %m", name_.c_str());
return false;
}
@@ -924,7 +924,7 @@
fd_,
file_offset_ + file_page_start);
if (seg_addr == MAP_FAILED) {
- DL_ERR("couldn't map \"%s\" segment %zd: %s", name_.c_str(), i, strerror(errno));
+ DL_ERR("couldn't map \"%s\" segment %zd: %m", name_.c_str(), i);
return false;
}
@@ -985,7 +985,7 @@
-1,
0);
if (zeromap == MAP_FAILED) {
- DL_ERR("couldn't zero fill \"%s\" gap: %s", name_.c_str(), strerror(errno));
+ DL_ERR("couldn't zero fill \"%s\" gap: %m", name_.c_str());
return false;
}
diff --git a/linker/linker_relocate.cpp b/linker/linker_relocate.cpp
index 3e36114..8f85871 100644
--- a/linker/linker_relocate.cpp
+++ b/linker/linker_relocate.cpp
@@ -189,8 +189,7 @@
if (phdr_table_protect_segments(relocator.si->phdr, relocator.si->phnum,
relocator.si->load_bias,
relocator.si->should_pad_segments()) < 0) {
- DL_ERR("can't protect segments for \"%s\": %s",
- relocator.si->get_realpath(), strerror(errno));
+ DL_ERR("can't protect segments for \"%s\": %m", relocator.si->get_realpath());
return false;
}
return true;
@@ -200,8 +199,8 @@
if (phdr_table_unprotect_segments(relocator.si->phdr, relocator.si->phnum,
relocator.si->load_bias,
relocator.si->should_pad_segments()) < 0) {
- DL_ERR("can't unprotect loadable segments for \"%s\": %s",
- relocator.si->get_realpath(), strerror(errno));
+ DL_ERR("can't unprotect loadable segments for \"%s\": %m",
+ relocator.si->get_realpath());
return false;
}
return true;
@@ -627,7 +626,7 @@
android_relocs_[1] == 'P' &&
android_relocs_[2] == 'S' &&
android_relocs_[3] == '2') {
- DEBUG("[ android relocating %s ]", get_realpath());
+ DEBUG("[ relocating %s android rel/rela ]", get_realpath());
const uint8_t* packed_relocs = android_relocs_ + 4;
const size_t packed_relocs_size = android_relocs_size_ - 4;
diff --git a/linker/linker_soinfo.cpp b/linker/linker_soinfo.cpp
index d915503..b2170d8 100644
--- a/linker/linker_soinfo.cpp
+++ b/linker/linker_soinfo.cpp
@@ -159,11 +159,6 @@
break;
}
}
-
- if (IsGeneral) {
- TRACE_TYPE(LOOKUP, "NOT FOUND %s in %s@%p",
- name, lib->si_->get_realpath(), reinterpret_cast<void*>(lib->si_->base));
- }
}
// Search the library's hash table chain.
@@ -186,21 +181,11 @@
memcmp(lib->strtab_ + sym->st_name, name, name_len + 1) == 0 &&
is_symbol_global_and_defined(lib->si_, sym)) {
*si_found_in = lib->si_;
- if (IsGeneral) {
- TRACE_TYPE(LOOKUP, "FOUND %s in %s (%p) %zd",
- name, lib->si_->get_realpath(), reinterpret_cast<void*>(sym->st_value),
- static_cast<size_t>(sym->st_size));
- }
return sym;
}
}
++sym_idx;
} while ((chain_value & 1) == 0);
-
- if (IsGeneral) {
- TRACE_TYPE(LOOKUP, "NOT FOUND %s in %s@%p",
- name, lib->si_->get_realpath(), reinterpret_cast<void*>(lib->si_->base));
- }
}
}
@@ -338,9 +323,6 @@
// test against bloom filter
if ((1 & (bloom_word >> h1) & (bloom_word >> h2)) == 0) {
- TRACE_TYPE(LOOKUP, "NOT FOUND %s in %s@%p",
- symbol_name.get_name(), get_realpath(), reinterpret_cast<void*>(base));
-
return nullptr;
}
@@ -348,9 +330,6 @@
uint32_t n = gnu_bucket_[hash % gnu_nbucket_];
if (n == 0) {
- TRACE_TYPE(LOOKUP, "NOT FOUND %s in %s@%p",
- symbol_name.get_name(), get_realpath(), reinterpret_cast<void*>(base));
-
return nullptr;
}
@@ -363,16 +342,10 @@
check_symbol_version(versym, n, verneed) &&
strcmp(get_string(s->st_name), symbol_name.get_name()) == 0 &&
is_symbol_global_and_defined(this, s)) {
- TRACE_TYPE(LOOKUP, "FOUND %s in %s (%p) %zd",
- symbol_name.get_name(), get_realpath(), reinterpret_cast<void*>(s->st_value),
- static_cast<size_t>(s->st_size));
return symtab_ + n;
}
} while ((gnu_chain_[n++] & 1) == 0);
- TRACE_TYPE(LOOKUP, "NOT FOUND %s in %s@%p",
- symbol_name.get_name(), get_realpath(), reinterpret_cast<void*>(base));
-
return nullptr;
}
@@ -392,18 +365,10 @@
if (check_symbol_version(versym, n, verneed) &&
strcmp(get_string(s->st_name), symbol_name.get_name()) == 0 &&
is_symbol_global_and_defined(this, s)) {
- TRACE_TYPE(LOOKUP, "FOUND %s in %s (%p) %zd",
- symbol_name.get_name(), get_realpath(),
- reinterpret_cast<void*>(s->st_value),
- static_cast<size_t>(s->st_size));
return symtab_ + n;
}
}
- TRACE_TYPE(LOOKUP, "NOT FOUND %s in %s@%p %x %zd",
- symbol_name.get_name(), get_realpath(),
- reinterpret_cast<void*>(base), hash, hash % nbucket_);
-
return nullptr;
}
diff --git a/linker/linker_utils.cpp b/linker/linker_utils.cpp
index cd03eed..9abe542 100644
--- a/linker/linker_utils.cpp
+++ b/linker/linker_utils.cpp
@@ -207,7 +207,7 @@
if (realpath(original_path, resolved_path) != nullptr) {
struct stat s;
if (stat(resolved_path, &s) == -1) {
- DL_WARN("Warning: cannot stat file \"%s\": %s (ignoring)", resolved_path, strerror(errno));
+ DL_WARN("Warning: cannot stat file \"%s\": %m (ignoring)", resolved_path);
return "";
}
if (!S_ISDIR(s.st_mode)) {
@@ -226,8 +226,7 @@
std::string entry_path;
if (parse_zip_path(normalized_path.c_str(), &zip_path, &entry_path)) {
if (realpath(zip_path.c_str(), resolved_path) == nullptr) {
- DL_WARN("Warning: unable to resolve \"%s\": %s (ignoring)",
- zip_path.c_str(), strerror(errno));
+ DL_WARN("Warning: unable to resolve \"%s\": %m (ignoring)", zip_path.c_str());
return "";
}
diff --git a/tests/float_test.cpp b/tests/float_test.cpp
index 3ef4593..a2b7ecb 100644
--- a/tests/float_test.cpp
+++ b/tests/float_test.cpp
@@ -122,3 +122,7 @@
#error LDBL_HAS_SUBNORM
#endif
}
+
+TEST(float_h, FLT_EVAL_METHOD_exact) {
+ ASSERT_EQ(0, FLT_EVAL_METHOD);
+}
diff --git a/tests/headers/posix/stdlib_h.c b/tests/headers/posix/stdlib_h.c
index 52580cf..95769b4 100644
--- a/tests/headers/posix/stdlib_h.c
+++ b/tests/headers/posix/stdlib_h.c
@@ -112,6 +112,9 @@
FUNCTION(ptsname, char* (*f)(int));
FUNCTION(putenv, int (*f)(char*));
FUNCTION(qsort, void (*f)(void*, size_t, size_t, int (*)(const void*, const void*)));
+#if !defined(__GLIBC__) // Our glibc is too old.
+ FUNCTION(qsort_r, void (*f)(void*, size_t, size_t, int (*)(const void*, const void*, void*), void*));
+#endif
FUNCTION(rand, int (*f)(void));
FUNCTION(rand_r, int (*f)(unsigned*));
FUNCTION(random, long (*f)(void));
diff --git a/tests/headers/posix/unistd_h.c b/tests/headers/posix/unistd_h.c
index 0b2cee5..f66609d 100644
--- a/tests/headers/posix/unistd_h.c
+++ b/tests/headers/posix/unistd_h.c
@@ -331,6 +331,9 @@
FUNCTION(fdatasync, int (*f)(int));
FUNCTION(fexecve, int (*f)(int, char* const[], char* const[]));
FUNCTION(fork, pid_t (*f)(void));
+#if !defined(__GLIBC__) // Our glibc is too old.
+ FUNCTION(_Fork, pid_t (*f)(void));
+#endif
FUNCTION(fpathconf, long (*f)(int, int));
FUNCTION(fsync, int (*f)(int));
FUNCTION(ftruncate, int (*f)(int, off_t));
diff --git a/tests/malloc_test.cpp b/tests/malloc_test.cpp
index a5916d3..813f348 100644
--- a/tests/malloc_test.cpp
+++ b/tests/malloc_test.cpp
@@ -1627,6 +1627,7 @@
#if !defined(__BIONIC__)
GTEST_SKIP() << "Only valid on bionic";
#endif
+ SKIP_WITH_HWASAN << "Only test system allocator, not hwasan allocator.";
if (IsLowRamDevice()) {
GTEST_SKIP() << "Skipped on low memory devices.";
@@ -1657,6 +1658,7 @@
#if !defined(__BIONIC__)
GTEST_SKIP() << "Only valid on bionic";
#endif
+ SKIP_WITH_HWASAN << "Only test system allocator, not hwasan allocator.";
if (IsLowRamDevice()) {
GTEST_SKIP() << "Skipped on low memory devices.";
@@ -1687,6 +1689,7 @@
#if !defined(__BIONIC__)
GTEST_SKIP() << "Only valid on bionic";
#endif
+ SKIP_WITH_HWASAN << "Only test system allocator, not hwasan allocator.";
if (IsLowRamDevice()) {
GTEST_SKIP() << "Skipped on low memory devices.";
diff --git a/tests/prebuilt-elf-files/arm64/libtest_empty.so b/tests/prebuilt-elf-files/arm64/libtest_empty.so
index d8775b6..76c569b 100755
--- a/tests/prebuilt-elf-files/arm64/libtest_empty.so
+++ b/tests/prebuilt-elf-files/arm64/libtest_empty.so
Binary files differ
diff --git a/tests/prebuilt-elf-files/x86_64/libtest_empty.so b/tests/prebuilt-elf-files/x86_64/libtest_empty.so
index c3f3638..ce519b2 100755
--- a/tests/prebuilt-elf-files/x86_64/libtest_empty.so
+++ b/tests/prebuilt-elf-files/x86_64/libtest_empty.so
Binary files differ
diff --git a/tests/stdlib_test.cpp b/tests/stdlib_test.cpp
index 4793150..3216066 100644
--- a/tests/stdlib_test.cpp
+++ b/tests/stdlib_test.cpp
@@ -29,6 +29,7 @@
#include <limits>
#include <string>
+#include <thread>
#include <android-base/file.h>
#include <android-base/macros.h>
@@ -430,6 +431,31 @@
ASSERT_STREQ("charlie", entries[2].name);
}
+TEST(stdlib, qsort_r) {
+ struct s {
+ char name[16];
+ static int comparator(const void* lhs, const void* rhs, void* context) {
+ int* count_p = reinterpret_cast<int*>(context);
+ *count_p += 1;
+ return strcmp(reinterpret_cast<const s*>(lhs)->name, reinterpret_cast<const s*>(rhs)->name);
+ }
+ };
+ s entries[3];
+ strcpy(entries[0].name, "charlie");
+ strcpy(entries[1].name, "bravo");
+ strcpy(entries[2].name, "alpha");
+
+ int count;
+ void* context = &count;
+
+ count = 0;
+ qsort_r(entries, 3, sizeof(s), s::comparator, context);
+ ASSERT_STREQ("alpha", entries[0].name);
+ ASSERT_STREQ("bravo", entries[1].name);
+ ASSERT_STREQ("charlie", entries[2].name);
+ ASSERT_EQ(count, 3);
+}
+
static void* TestBug57421_child(void* arg) {
pthread_t main_thread = reinterpret_cast<pthread_t>(arg);
pthread_join(main_thread, nullptr);
@@ -650,6 +676,58 @@
AssertChildExited(pid, 99);
}
+static void exit_from_atexit_func4() {
+ std::thread([] { exit(4); }).detach();
+ usleep(1000);
+ fprintf(stderr, "4");
+}
+
+static void exit_from_atexit_func3() {
+ std::thread([] { exit(3); }).detach();
+ fprintf(stderr, "3");
+ usleep(1000);
+ // This should cause us to exit with status 99,
+ // but not before printing "4",
+ // and without re-running the previous atexit handlers.
+ exit(99);
+}
+
+static void exit_from_atexit_func2() {
+ std::thread([] { exit(2); }).detach();
+ fprintf(stderr, "2");
+ usleep(1000);
+ // Register another atexit handler from within an atexit handler.
+ atexit(exit_from_atexit_func3);
+}
+
+static void exit_from_atexit_func1() {
+ // These atexit handlers all spawn another thread that tries to exit,
+ // and sleep to try to lose the race.
+ // The lock in exit() should ensure that only the first thread to call
+ // exit() can ever win (but see exit_from_atexit_func3() for a subtelty).
+ std::thread([] { exit(1); }).detach();
+ usleep(1000);
+ fprintf(stderr, "1");
+}
+
+static void exit_torturer() {
+ atexit(exit_from_atexit_func4);
+ // We deliberately don't register exit_from_atexit_func3() here;
+ // see exit_from_atexit_func2().
+ atexit(exit_from_atexit_func2);
+ atexit(exit_from_atexit_func1);
+ exit(0);
+}
+
+TEST(stdlib, exit_torture) {
+ // Test that the atexit() handlers are run in the defined order (reverse
+ // order of registration), even though one of them is registered by another
+ // when it runs, and that we get the exit code from the last call to exit()
+ // on the first thread to call exit() (rather than one of the other threads
+ // or a deadlock from the second call on the same thread).
+ ASSERT_EXIT(exit_torturer(), testing::ExitedWithCode(99), "1234");
+}
+
TEST(unistd, _Exit) {
pid_t pid = fork();
ASSERT_NE(-1, pid) << strerror(errno);