Merge "Move test libraries under /data/nativetests"
diff --git a/libc/Android.bp b/libc/Android.bp
index 4fcd83e..ad31192 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -15,9 +15,12 @@
     "bionic/sigsetmask.c",
     "bionic/system_properties_compat.c",
     "stdio/fread.c",
+    "stdio/parsefloat.c",
     "stdio/refill.c",
     "stdio/stdio.cpp",
     "stdio/stdio_ext.cpp",
+    "stdio/vfscanf.c",
+    "stdio/vfwscanf.c",
     "stdlib/atexit.c",
     "stdlib/exit.c",
 ]
@@ -397,11 +400,8 @@
         "upstream-openbsd/lib/libc/locale/mbstowcs.c",
         "upstream-openbsd/lib/libc/locale/mbtowc.c",
         "upstream-openbsd/lib/libc/locale/wcscoll.c",
-        "upstream-openbsd/lib/libc/locale/wcstod.c",
-        "upstream-openbsd/lib/libc/locale/wcstof.c",
         "upstream-openbsd/lib/libc/locale/wcstoimax.c",
         "upstream-openbsd/lib/libc/locale/wcstol.c",
-        "upstream-openbsd/lib/libc/locale/wcstold.c",
         "upstream-openbsd/lib/libc/locale/wcstoll.c",
         "upstream-openbsd/lib/libc/locale/wcstombs.c",
         "upstream-openbsd/lib/libc/locale/wcstoul.c",
@@ -453,7 +453,6 @@
         "upstream-openbsd/lib/libc/stdio/ungetwc.c",
         "upstream-openbsd/lib/libc/stdio/vasprintf.c",
         "upstream-openbsd/lib/libc/stdio/vdprintf.c",
-        "upstream-openbsd/lib/libc/stdio/vfscanf.c",
         "upstream-openbsd/lib/libc/stdio/vsscanf.c",
         "upstream-openbsd/lib/libc/stdio/vswprintf.c",
         "upstream-openbsd/lib/libc/stdio/vswscanf.c",
@@ -520,7 +519,6 @@
     srcs: [
         "upstream-openbsd/lib/libc/stdio/vfprintf.c",
         "upstream-openbsd/lib/libc/stdio/vfwprintf.c",
-        "upstream-openbsd/lib/libc/stdio/vfwscanf.c",
     ],
     cflags: [
         "-include openbsd-compat.h",
@@ -1365,6 +1363,7 @@
         "bionic/unlink.cpp",
         "bionic/wait.cpp",
         "bionic/wchar.cpp",
+        "bionic/wcstod.cpp",
         "bionic/wctype.cpp",
         "bionic/wmempcpy.cpp",
     ],
diff --git a/libc/arch-arm/bionic/__bionic_clone.S b/libc/arch-arm/bionic/__bionic_clone.S
index b771357..8836748 100644
--- a/libc/arch-arm/bionic/__bionic_clone.S
+++ b/libc/arch-arm/bionic/__bionic_clone.S
@@ -51,7 +51,7 @@
 
     # Are we the child?
     movs    r0, r0
-    beq     1f
+    beq     .L_bc_child
 
     # In the parent, reload saved registers then either return or set errno.
     ldmfd   sp!, {r4, r5, r6, r7}
@@ -60,8 +60,8 @@
     neg     r0, r0
     b       __set_errno_internal
 
-1:  # The child.
-    # Setting lr to 0 will make the unwinder stop at __start_thread
+.L_bc_child:
+    # Setting lr to 0 will make the unwinder stop at __start_thread.
     mov    lr, #0
     # Call __start_thread with the 'fn' and 'arg' we stored on the child stack.
     pop    {r0, r1}
diff --git a/libc/bionic/sys_msg.cpp b/libc/bionic/sys_msg.cpp
index 462c83b..4880356 100644
--- a/libc/bionic/sys_msg.cpp
+++ b/libc/bionic/sys_msg.cpp
@@ -32,8 +32,9 @@
 #include <unistd.h>
 
 int msgctl(int id, int cmd, msqid_ds* buf) {
-#if !defined(__LP64__)
+#if !defined(__LP64__) || defined(__mips__)
   // Annoyingly, the kernel requires this for 32-bit but rejects it for 64-bit.
+  // Mips64 is an exception to this, it requires the flag.
   cmd |= IPC_64;
 #endif
 #if defined(SYS_msgctl)
diff --git a/libc/bionic/sys_sem.cpp b/libc/bionic/sys_sem.cpp
index 058cfef..5e2a05c 100644
--- a/libc/bionic/sys_sem.cpp
+++ b/libc/bionic/sys_sem.cpp
@@ -33,8 +33,9 @@
 #include <unistd.h>
 
 int semctl(int id, int num, int cmd, ...) {
-#if !defined(__LP64__)
+#if !defined(__LP64__) || defined(__mips__)
   // Annoyingly, the kernel requires this for 32-bit but rejects it for 64-bit.
+  // Mips64 is an exception to this, it requires the flag.
   cmd |= IPC_64;
 #endif
   va_list ap;
diff --git a/libc/bionic/sys_shm.cpp b/libc/bionic/sys_shm.cpp
index f780e04..f3b26e7 100644
--- a/libc/bionic/sys_shm.cpp
+++ b/libc/bionic/sys_shm.cpp
@@ -45,8 +45,9 @@
 }
 
 int shmctl(int id, int cmd, struct shmid_ds* buf) {
-#if !defined(__LP64__)
+#if !defined(__LP64__) || defined(__mips__)
   // Annoyingly, the kernel requires this for 32-bit but rejects it for 64-bit.
+  // Mips64 is an exception to this, it requires the flag.
   cmd |= IPC_64;
 #endif
 #if defined(SYS_shmctl)
diff --git a/libc/bionic/wcstod.cpp b/libc/bionic/wcstod.cpp
new file mode 100644
index 0000000..eb66ba0
--- /dev/null
+++ b/libc/bionic/wcstod.cpp
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2016 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.
+ */
+
+#include <wchar.h>
+
+#include <stdlib.h>
+
+#include "local.h"
+
+template <typename float_type> float_type wcstod(const wchar_t* str, wchar_t** end,
+                                                 float_type strtod_fn(const char*, char**)) {
+  // What's the longest span of the input that might be part of the float?
+  size_t max_len = wcsspn(str, L"-+0123456789.xXeEpP()nNaAiIfFtTyY");
+
+  // We know the only valid characters are ASCII, so convert them by brute force.
+  char* ascii_str = new char[max_len + 1];
+  if (!ascii_str) return float_type();
+  for (size_t i = 0; i < max_len; ++i) {
+    ascii_str[i] = str[i] & 0xff;
+  }
+  ascii_str[max_len] = 0;
+
+  // Set up a fake FILE that points to those ASCII characters, for `parsefloat`.
+  FILE f;
+  __sfileext fext;
+  _FILEEXT_SETUP(&f, &fext);
+  f._flags = __SRD;
+  f._bf._base = f._p = reinterpret_cast<unsigned char*>(ascii_str);
+  f._bf._size = f._r = max_len;
+  f._read = [](void*, char*, int) { return 0; }; // aka `eofread`, aka "no more data".
+  f._lb._base = NULL;
+
+  // Ask `parsefloat` to look at the same data more carefully.
+
+  // We can't just do this straight away because we can't construct a suitable FILE*
+  // in the absence of any `fwmemopen` analogous to `fmemopen`. And we don't want to
+  // duplicate the `parsefloat` logic. We also don't want to actually have to have wchar_t
+  // implementations of the ASCII `strtod` logic (though if you were designing a libc
+  // from scratch, you'd probably want to just make that more generic and lose all the
+  // cruft on top).
+  size_t actual_len = parsefloat(&f, ascii_str, ascii_str + max_len);
+
+  // Finally let the ASCII conversion function do the work.
+  char* ascii_end;
+  float_type result = strtod_fn(ascii_str, &ascii_end);
+  if (ascii_end != ascii_str + actual_len) abort();
+
+  if (end) *end = const_cast<wchar_t*>(str) + actual_len;
+
+  delete[] ascii_str;
+  return result;
+}
+
+float wcstof(const wchar_t* s, wchar_t** end) {
+  return wcstod<float>(s, end, strtof);
+}
+
+double wcstod(const wchar_t* s, wchar_t** end) {
+  return wcstod<double>(s, end, strtod);
+}
+
+long double wcstold(const wchar_t* s, wchar_t** end) {
+  return wcstod<long double>(s, end, strtold);
+}
diff --git a/libc/include/android/versioning.h b/libc/include/android/versioning.h
index 3686261..196c28e 100644
--- a/libc/include/android/versioning.h
+++ b/libc/include/android/versioning.h
@@ -27,4 +27,6 @@
 #define __INTRODUCED_IN_X86(api_level) __attribute__((annotate("introduced_in_x86=" #api_level)))
 #define __INTRODUCED_IN_MIPS(api_level) __attribute__((annotate("introduced_in_mips=" #api_level)))
 
+#define __VERSIONER_NO_GUARD __attribute__((annotate("versioner_no_guard")))
+
 #endif /* ANDROID_VERSIONING_H */
diff --git a/libc/include/bits/wctype.h b/libc/include/bits/wctype.h
index b98e500..c968d71 100644
--- a/libc/include/bits/wctype.h
+++ b/libc/include/bits/wctype.h
@@ -58,8 +58,8 @@
 int iswctype(wint_t, wctype_t);
 
 typedef const void* wctrans_t;
-wint_t towctrans(wint_t, wctrans_t) __INTRODUCED_IN_FUTURE;
-wctrans_t wctrans(const char*) __INTRODUCED_IN_FUTURE;
+wint_t towctrans(wint_t, wctrans_t) __INTRODUCED_IN_FUTURE __VERSIONER_NO_GUARD;
+wctrans_t wctrans(const char*) __INTRODUCED_IN_FUTURE __VERSIONER_NO_GUARD;
 
 __END_DECLS
 
diff --git a/libc/include/locale.h b/libc/include/locale.h
index a681a17..c1b6299 100644
--- a/libc/include/locale.h
+++ b/libc/include/locale.h
@@ -96,7 +96,7 @@
   char int_n_sign_posn;
 };
 
-struct lconv* localeconv(void) __INTRODUCED_IN(21);
+struct lconv* localeconv(void) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
 
 locale_t duplocale(locale_t) __INTRODUCED_IN(21);
 void freelocale(locale_t) __INTRODUCED_IN(21);
diff --git a/libc/include/math.h b/libc/include/math.h
index 37aa2cc..3b12764 100644
--- a/libc/include/math.h
+++ b/libc/include/math.h
@@ -259,11 +259,12 @@
 long double fabsl(long double) __pure2;
 long double fdiml(long double, long double);
 long double floorl(long double);
-long double fmal(long double, long double, long double) __INTRODUCED_IN(21);
+long double fmal(long double, long double, long double) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
 long double fmaxl(long double, long double) __pure2;
 long double fminl(long double, long double) __pure2;
 long double fmodl(long double, long double) __INTRODUCED_IN(21);
-long double frexpl(long double value, int*) __INTRODUCED_IN(21); /* fundamentally !__pure2 */
+long double frexpl(long double value, int*)
+    __INTRODUCED_IN(21) __VERSIONER_NO_GUARD; /* fundamentally !__pure2 */
 long double hypotl(long double, long double) __INTRODUCED_IN(21);
 int ilogbl(long double) __pure2;
 long double ldexpl(long double, int);
@@ -280,10 +281,10 @@
 long double modfl(long double, long double*) __INTRODUCED_IN(21); /* fundamentally !__pure2 */
 long double nanl(const char*) __pure2 __INTRODUCED_IN(13);
 long double nearbyintl(long double) __INTRODUCED_IN(21);
-long double nextafterl(long double, long double) __INTRODUCED_IN(21);
-double nexttoward(double, long double) __INTRODUCED_IN(18);
+long double nextafterl(long double, long double) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
+double nexttoward(double, long double) __INTRODUCED_IN(18) __VERSIONER_NO_GUARD;
 float nexttowardf(float, long double);
-long double nexttowardl(long double, long double) __INTRODUCED_IN(18);
+long double nexttowardl(long double, long double) __INTRODUCED_IN(18) __VERSIONER_NO_GUARD;
 long double powl(long double, long double) __INTRODUCED_IN(21);
 long double remainderl(long double, long double) __INTRODUCED_IN(21);
 long double remquol(long double, long double, int*) __INTRODUCED_IN(21);
diff --git a/libc/include/netinet/in.h b/libc/include/netinet/in.h
index 00b5cf9..3574976 100644
--- a/libc/include/netinet/in.h
+++ b/libc/include/netinet/in.h
@@ -47,8 +47,13 @@
 
 int bindresvport(int, struct sockaddr_in*);
 
+#if __ANDROID_API__ >= 24
 extern const struct in6_addr in6addr_any __INTRODUCED_IN(24);
 extern const struct in6_addr in6addr_loopback __INTRODUCED_IN(24);
+#else
+static const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
+static const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
+#endif /* __ANDROID_API__ >= 24 */
 
 __END_DECLS
 
diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h
index 28cd4a8..6b0ec12 100644
--- a/libc/include/stdlib.h
+++ b/libc/include/stdlib.h
@@ -147,14 +147,23 @@
 const char* getprogname(void) __INTRODUCED_IN(21);
 void setprogname(const char*) __INTRODUCED_IN(21);
 
-int mblen(const char*, size_t) __INTRODUCED_IN_FUTURE;
+int mblen(const char*, size_t) __INTRODUCED_IN_FUTURE __VERSIONER_NO_GUARD;
 size_t mbstowcs(wchar_t*, const char*, size_t);
-int mbtowc(wchar_t*, const char*, size_t) __INTRODUCED_IN(21);
-int wctomb(char*, wchar_t) __INTRODUCED_IN(21);
+int mbtowc(wchar_t*, const char*, size_t) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
+int wctomb(char*, wchar_t) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
+
 size_t wcstombs(char*, const wchar_t*, size_t);
 
+#if __ANDROID_API__ >= 21
 size_t __ctype_get_mb_cur_max(void) __INTRODUCED_IN(21);
 #define MB_CUR_MAX __ctype_get_mb_cur_max()
+#else
+/*
+ * 4 is only true for UTF-8 locales, but that's what we default to. We'll need
+ * the NDK compatibility library to fix this properly.
+ */
+#define MB_CUR_MAX 4
+#endif
 
 #if defined(__BIONIC_FORTIFY)
 
diff --git a/libc/include/string.h b/libc/include/string.h
index 18b12bd..4a83c4e 100644
--- a/libc/include/string.h
+++ b/libc/include/string.h
@@ -239,9 +239,7 @@
 
     return __stpncpy_chk2(dst, src, n, bos_dst, bos_src);
 }
-#endif /* __ANDROID_API__ >= 21 */
 
-#if __ANDROID_API__ >= 17
 __BIONIC_FORTIFY_INLINE
 char* strncpy(char* _Nonnull __restrict dst, const char* _Nonnull __restrict src, size_t n) {
     size_t bos_dst = __bos(dst);
@@ -262,7 +260,9 @@
 
     return __strncpy_chk2(dst, src, n, bos_dst, bos_src);
 }
+#endif /* __ANDROID_API__ >= 21 */
 
+#if __ANDROID_API__ >= 17
 __BIONIC_FORTIFY_INLINE
 char* strcat(char* _Nonnull __restrict dst, const char* _Nonnull __restrict src) {
     return __builtin___strcat_chk(dst, src, __bos(dst));
diff --git a/libc/include/sys/select.h b/libc/include/sys/select.h
index 0f454b0..5a8a81d 100644
--- a/libc/include/sys/select.h
+++ b/libc/include/sys/select.h
@@ -61,7 +61,7 @@
 void __FD_SET_chk(int, fd_set*, size_t) __INTRODUCED_IN(21);
 int __FD_ISSET_chk(int, fd_set*, size_t) __INTRODUCED_IN(21);
 
-#if defined(__BIONIC_FORTIFY)
+#if defined(__BIONIC_FORTIFY) && __ANDROID_API__ >= 21
 #define FD_CLR(fd, set) __FD_CLR_chk(fd, set, __bos(set))
 #define FD_SET(fd, set) __FD_SET_chk(fd, set, __bos(set))
 #define FD_ISSET(fd, set) __FD_ISSET_chk(fd, set, __bos(set))
@@ -69,7 +69,7 @@
 #define FD_CLR(fd, set) (__FDS_BITS(set)[__FDELT(fd)] &= ~__FDMASK(fd))
 #define FD_SET(fd, set) (__FDS_BITS(set)[__FDELT(fd)] |= __FDMASK(fd))
 #define FD_ISSET(fd, set) ((__FDS_BITS(set)[__FDELT(fd)] & __FDMASK(fd)) != 0)
-#endif /* defined(__BIONIC_FORTIFY) */
+#endif /* defined(__BIONIC_FORTIFY) && __ANDROID_API >= 21 */
 
 int select(int, fd_set*, fd_set*, fd_set*, struct timeval*);
 int pselect(int, fd_set*, fd_set*, fd_set*, const struct timespec*, const sigset_t*);
diff --git a/libc/include/sys/socket.h b/libc/include/sys/socket.h
index 910fee1..03dc849 100644
--- a/libc/include/sys/socket.h
+++ b/libc/include/sys/socket.h
@@ -114,7 +114,22 @@
    ? (struct cmsghdr*) (msg)->msg_control : (struct cmsghdr*) NULL)
 #define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) &&   (cmsg)->cmsg_len <= (unsigned long)   ((mhdr)->msg_controllen -   ((char*)(cmsg) - (char*)(mhdr)->msg_control)))
 
+#if __ANDROID_API__ >= 21
 struct cmsghdr* __cmsg_nxthdr(struct msghdr*, struct cmsghdr*) __INTRODUCED_IN(21);
+#else
+/* TODO(danalbert): Move this into libandroid_support. */
+static inline struct cmsghdr* __cmsg_nxthdr(struct msghdr* msg, struct cmsghdr* cmsg) {
+  struct cmsghdr* ptr =
+      __BIONIC_CAST(reinterpret_cast, struct cmsghdr*,
+                    (__BIONIC_CAST(reinterpret_cast, char*, cmsg) + CMSG_ALIGN(cmsg->cmsg_len)));
+  size_t len = __BIONIC_CAST(reinterpret_cast, char*, ptr + 1) -
+               __BIONIC_CAST(reinterpret_cast, char*, msg->msg_control);
+  if (len > msg->msg_controllen) {
+    return NULL;
+  }
+  return ptr;
+}
+#endif /* __ANDROID_API__ >= 21 */
 
 #define SCM_RIGHTS 0x01
 #define SCM_CREDENTIALS 0x02
diff --git a/libc/include/unistd.h b/libc/include/unistd.h
index ac7d4c2..ab8108a 100644
--- a/libc/include/unistd.h
+++ b/libc/include/unistd.h
@@ -489,6 +489,7 @@
 }
 #endif /* __ANDROID_API__ >= 24 */
 
+#if __ANDROID_API__ >= 23
 __BIONIC_FORTIFY_INLINE
 ssize_t readlink(const char* path, char* buf, size_t size) {
     size_t bos = __bos(buf);
@@ -538,6 +539,7 @@
 
     return __readlinkat_chk(dirfd, path, buf, size, bos);
 }
+#endif /* __ANDROID_API__ >= 23 */
 
 #endif /* defined(__BIONIC_FORTIFY) */
 
diff --git a/libc/malloc_debug/tests/malloc_debug_config_tests.cpp b/libc/malloc_debug/tests/malloc_debug_config_tests.cpp
index b8cf7cf..49edaba 100644
--- a/libc/malloc_debug/tests/malloc_debug_config_tests.cpp
+++ b/libc/malloc_debug/tests/malloc_debug_config_tests.cpp
@@ -122,7 +122,7 @@
   "6 malloc_debug     recorded. of frames to capture. The default value is 8000000.\n"
   "6 malloc_debug     If the allocation list fills up, all further allocations are not recorded.\n"
   "6 malloc_debug \n"
-  "6 malloc_debug   record_alloc_file[=FILE]\n"
+  "6 malloc_debug   record_allocs_file[=FILE]\n"
   "6 malloc_debug     This option only has meaning if the record_allocs options has been specified.\n"
   "6 malloc_debug     This is the name of the file to which recording information will be dumped.\n"
   "6 malloc_debug     The default is /data/local/tmp/record_allocs.txt.\n"
diff --git a/libc/upstream-openbsd/lib/libc/stdio/floatio.h b/libc/stdio/floatio.h
similarity index 100%
rename from libc/upstream-openbsd/lib/libc/stdio/floatio.h
rename to libc/stdio/floatio.h
diff --git a/libc/stdio/local.h b/libc/stdio/local.h
index 7be5a7c..575a428 100644
--- a/libc/stdio/local.h
+++ b/libc/stdio/local.h
@@ -147,11 +147,7 @@
 #define __SNPT 0
 #define __SOPT 0
 
-#if defined(__cplusplus)
-#define _EXT(fp) reinterpret_cast<__sfileext*>((fp)->_ext._base)
-#else
-#define _EXT(fp) ((struct __sfileext *)((fp)->_ext._base))
-#endif
+#define _EXT(fp) __BIONIC_CAST(reinterpret_cast, struct __sfileext*, (fp)->_ext._base)
 
 #define _UB(fp) _EXT(fp)->_ub
 #define _FLOCK(fp)  _EXT(fp)->_lock
@@ -171,7 +167,7 @@
 
 #define _FILEEXT_SETUP(f, fext) \
 do { \
-	(f)->_ext._base = (unsigned char *)(fext); \
+	(f)->_ext._base = __BIONIC_CAST(reinterpret_cast, unsigned char*, fext); \
 	_FILEEXT_INIT(f); \
 } while (0)
 
@@ -259,6 +255,9 @@
 extern void __sinit(void); // Not actually implemented.
 #define __sdidinit 1
 
+size_t parsefloat(FILE*, char*, char*);
+size_t wparsefloat(FILE*, wchar_t*, wchar_t*);
+
 __END_DECLS
 
 #endif
diff --git a/libc/stdio/parsefloat.c b/libc/stdio/parsefloat.c
new file mode 100644
index 0000000..e911da4
--- /dev/null
+++ b/libc/stdio/parsefloat.c
@@ -0,0 +1,336 @@
+/*-
+ * Copyright (c) 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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 <ctype.h>
+#include <stdlib.h>
+
+#include "local.h"
+#include "floatio.h"
+
+#define	BUF		513	/* Maximum length of numeric string. */
+
+size_t parsefloat(FILE *fp, char *buf, char *end) {
+	char *commit, *p;
+	int infnanpos = 0;
+	enum {
+		S_START, S_GOTSIGN, S_INF, S_NAN, S_MAYBEHEX,
+		S_DIGITS, S_FRAC, S_EXP, S_EXPDIGITS
+	} state = S_START;
+	unsigned char c;
+	int gotmantdig = 0, ishex = 0;
+
+	/*
+	 * We set commit = p whenever the string we have read so far
+	 * constitutes a valid representation of a floating point
+	 * number by itself.  At some point, the parse will complete
+	 * or fail, and we will ungetc() back to the last commit point.
+	 * To ensure that the file offset gets updated properly, it is
+	 * always necessary to read at least one character that doesn't
+	 * match; thus, we can't short-circuit "infinity" or "nan(...)".
+	 */
+	commit = buf - 1;
+	for (p = buf; p < end; ) {
+		c = *fp->_p;
+reswitch:
+		switch (state) {
+		case S_START:
+			state = S_GOTSIGN;
+			if (c == '-' || c == '+')
+				break;
+			else
+				goto reswitch;
+		case S_GOTSIGN:
+			switch (c) {
+			case '0':
+				state = S_MAYBEHEX;
+				commit = p;
+				break;
+			case 'I':
+			case 'i':
+				state = S_INF;
+				break;
+			case 'N':
+			case 'n':
+				state = S_NAN;
+				break;
+			default:
+				state = S_DIGITS;
+				goto reswitch;
+			}
+			break;
+		case S_INF:
+			if (infnanpos > 6 ||
+			    (c != "nfinity"[infnanpos] &&
+			     c != "NFINITY"[infnanpos]))
+				goto parsedone;
+			if (infnanpos == 1 || infnanpos == 6)
+				commit = p;	/* inf or infinity */
+			infnanpos++;
+			break;
+		case S_NAN:
+			switch (infnanpos) {
+			case -1:	/* XXX kludge to deal with nan(...) */
+				goto parsedone;
+			case 0:
+				if (c != 'A' && c != 'a')
+					goto parsedone;
+				break;
+			case 1:
+				if (c != 'N' && c != 'n')
+					goto parsedone;
+				else
+					commit = p;
+				break;
+			case 2:
+				if (c != '(')
+					goto parsedone;
+				break;
+			default:
+				if (c == ')') {
+					commit = p;
+					infnanpos = -2;
+				} else if (!isalnum(c) && c != '_')
+					goto parsedone;
+				break;
+			}
+			infnanpos++;
+			break;
+		case S_MAYBEHEX:
+			state = S_DIGITS;
+			if (c == 'X' || c == 'x') {
+				ishex = 1;
+				break;
+			} else {	/* we saw a '0', but no 'x' */
+				gotmantdig = 1;
+				goto reswitch;
+			}
+		case S_DIGITS:
+			if ((ishex && isxdigit(c)) || isdigit(c))
+				gotmantdig = 1;
+			else {
+				state = S_FRAC;
+				if (c != '.')
+					goto reswitch;
+			}
+			if (gotmantdig)
+				commit = p;
+			break;
+		case S_FRAC:
+			if (((c == 'E' || c == 'e') && !ishex) ||
+			    ((c == 'P' || c == 'p') && ishex)) {
+				if (!gotmantdig)
+					goto parsedone;
+				else
+					state = S_EXP;
+			} else if ((ishex && isxdigit(c)) || isdigit(c)) {
+				commit = p;
+				gotmantdig = 1;
+			} else
+				goto parsedone;
+			break;
+		case S_EXP:
+			state = S_EXPDIGITS;
+			if (c == '-' || c == '+')
+				break;
+			else
+				goto reswitch;
+		case S_EXPDIGITS:
+			if (isdigit(c))
+				commit = p;
+			else
+				goto parsedone;
+			break;
+		default:
+			abort();
+		}
+		*p++ = c;
+		if (--fp->_r > 0)
+			fp->_p++;
+		else if (__srefill(fp))
+			break;	/* EOF */
+	}
+
+parsedone:
+	while (commit < --p)
+		(void)ungetc(*(unsigned char *)p, fp);
+	*++commit = '\0';
+	return commit - buf;
+}
+
+size_t wparsefloat(FILE *fp, wchar_t *buf, wchar_t *end) {
+	wchar_t *commit, *p;
+	int infnanpos = 0;
+	enum {
+		S_START, S_GOTSIGN, S_INF, S_NAN, S_MAYBEHEX,
+		S_DIGITS, S_FRAC, S_EXP, S_EXPDIGITS
+	} state = S_START;
+	wint_t c;
+	int gotmantdig = 0, ishex = 0;
+
+	/*
+	 * We set commit = p whenever the string we have read so far
+	 * constitutes a valid representation of a floating point
+	 * number by itself.  At some point, the parse will complete
+	 * or fail, and we will ungetc() back to the last commit point.
+	 * To ensure that the file offset gets updated properly, it is
+	 * always necessary to read at least one character that doesn't
+	 * match; thus, we can't short-circuit "infinity" or "nan(...)".
+	 */
+	commit = buf - 1;
+	c = WEOF;
+	for (p = buf; p < end; ) {
+		if ((c = __fgetwc_unlock(fp)) == WEOF)
+			break;
+reswitch:
+		switch (state) {
+		case S_START:
+			state = S_GOTSIGN;
+			if (c == '-' || c == '+')
+				break;
+			else
+				goto reswitch;
+		case S_GOTSIGN:
+			switch (c) {
+			case '0':
+				state = S_MAYBEHEX;
+				commit = p;
+				break;
+			case 'I':
+			case 'i':
+				state = S_INF;
+				break;
+			case 'N':
+			case 'n':
+				state = S_NAN;
+				break;
+			default:
+				state = S_DIGITS;
+				goto reswitch;
+			}
+			break;
+		case S_INF:
+			if (infnanpos > 6 ||
+			    (c != (wint_t)"nfinity"[infnanpos] &&
+			     c != (wint_t)"NFINITY"[infnanpos]))
+				goto parsedone;
+			if (infnanpos == 1 || infnanpos == 6)
+				commit = p;	/* inf or infinity */
+			infnanpos++;
+			break;
+		case S_NAN:
+			switch (infnanpos) {
+			case -1:	/* XXX kludge to deal with nan(...) */
+				goto parsedone;
+			case 0:
+				if (c != 'A' && c != 'a')
+					goto parsedone;
+				break;
+			case 1:
+				if (c != 'N' && c != 'n')
+					goto parsedone;
+				else
+					commit = p;
+				break;
+			case 2:
+				if (c != '(')
+					goto parsedone;
+				break;
+			default:
+				if (c == ')') {
+					commit = p;
+					infnanpos = -2;
+				} else if (!iswalnum(c) && c != '_')
+					goto parsedone;
+				break;
+			}
+			infnanpos++;
+			break;
+		case S_MAYBEHEX:
+			state = S_DIGITS;
+			if (c == 'X' || c == 'x') {
+				ishex = 1;
+				break;
+			} else {	/* we saw a '0', but no 'x' */
+				gotmantdig = 1;
+				goto reswitch;
+			}
+		case S_DIGITS:
+			if ((ishex && iswxdigit(c)) || iswdigit(c))
+				gotmantdig = 1;
+			else {
+				state = S_FRAC;
+				if (c != L'.')
+					goto reswitch;
+			}
+			if (gotmantdig)
+				commit = p;
+			break;
+		case S_FRAC:
+			if (((c == 'E' || c == 'e') && !ishex) ||
+			    ((c == 'P' || c == 'p') && ishex)) {
+				if (!gotmantdig)
+					goto parsedone;
+				else
+					state = S_EXP;
+			} else if ((ishex && iswxdigit(c)) || iswdigit(c)) {
+				commit = p;
+				gotmantdig = 1;
+			} else
+				goto parsedone;
+			break;
+		case S_EXP:
+			state = S_EXPDIGITS;
+			if (c == '-' || c == '+')
+				break;
+			else
+				goto reswitch;
+		case S_EXPDIGITS:
+			if (iswdigit(c))
+				commit = p;
+			else
+				goto parsedone;
+			break;
+		default:
+			abort();
+		}
+		*p++ = c;
+		c = WEOF;
+	}
+
+parsedone:
+	if (c != WEOF)
+		ungetwc(c, fp);
+	while (commit < --p)
+		ungetwc(*p, fp);
+	*++commit = '\0';
+	return (int)(commit - buf);
+}
diff --git a/libc/upstream-openbsd/lib/libc/stdio/vfscanf.c b/libc/stdio/vfscanf.c
similarity index 90%
rename from libc/upstream-openbsd/lib/libc/stdio/vfscanf.c
rename to libc/stdio/vfscanf.c
index abefe32..e47d0df 100644
--- a/libc/upstream-openbsd/lib/libc/stdio/vfscanf.c
+++ b/libc/stdio/vfscanf.c
@@ -346,14 +346,14 @@
 					wcp = NULL;
 				n = 0;
 				while (width != 0) {
-					if (n == MB_CUR_MAX) {
+					if (n == (int)MB_CUR_MAX) {
 						fp->_flags |= __SERR;
 						goto input_failure;
 					}
 					buf[n++] = *fp->_p;
 					fp->_p++;
 					fp->_r--;
-					bzero(&mbs, sizeof(mbs));
+					memset(&mbs, 0, sizeof(mbs));
 					nconv = mbrtowc(wcp, buf, n, &mbs);
 					if (nconv == (size_t)-1) {
 						fp->_flags |= __SERR;
@@ -383,7 +383,7 @@
 			if (flags & SUPPRESS) {
 				size_t sum = 0;
 				for (;;) {
-					if ((n = fp->_r) < width) {
+					if ((n = fp->_r) < (int)width) {
 						sum += n;
 						width -= n;
 						fp->_p += n;
@@ -428,14 +428,14 @@
 				n = 0;
 				nchars = 0;
 				while (width != 0) {
-					if (n == MB_CUR_MAX) {
+					if (n == (int)MB_CUR_MAX) {
 						fp->_flags |= __SERR;
 						goto input_failure;
 					}
 					buf[n++] = *fp->_p;
 					fp->_p++;
 					fp->_r--;
-					bzero(&mbs, sizeof(mbs));
+					memset(&mbs, 0, sizeof(mbs));
 					nconv = mbrtowc(wcp, buf, n, &mbs);
 					if (nconv == (size_t)-1) {
 						fp->_flags |= __SERR;
@@ -532,14 +532,14 @@
 					wcp = &twc;
 				n = 0;
 				while (!isspace(*fp->_p) && width != 0) {
-					if (n == MB_CUR_MAX) {
+					if (n == (int)MB_CUR_MAX) {
 						fp->_flags |= __SERR;
 						goto input_failure;
 					}
 					buf[n++] = *fp->_p;
 					fp->_p++;
 					fp->_r--;
-					bzero(&mbs, sizeof(mbs));
+					memset(&mbs, 0, sizeof(mbs));
 					nconv = mbrtowc(wcp, buf, n, &mbs);
 					if (nconv == (size_t)-1) {
 						fp->_flags |= __SERR;
@@ -760,96 +760,25 @@
 #ifdef FLOATING_POINT
 		case CT_FLOAT:
 			/* scan a floating point number as if by strtod */
-#ifdef hardway
 			if (width == 0 || width > sizeof(buf) - 1)
 				width = sizeof(buf) - 1;
-#else
-			/* size_t is unsigned, hence this optimisation */
-			if (--width > sizeof(buf) - 2)
-				width = sizeof(buf) - 2;
-			width++;
-#endif
-			flags |= SIGNOK | NDIGITS | DPTOK | EXPOK;
-			for (p = buf; width; width--) {
-				c = *fp->_p;
-				/*
-				 * This code mimicks the integer conversion
-				 * code, but is much simpler.
-				 */
-				switch (c) {
-
-				case '0': case '1': case '2': case '3':
-				case '4': case '5': case '6': case '7':
-				case '8': case '9':
-					flags &= ~(SIGNOK | NDIGITS);
-					goto fok;
-
-				case '+': case '-':
-					if (flags & SIGNOK) {
-						flags &= ~SIGNOK;
-						goto fok;
-					}
-					break;
-				case '.':
-					if (flags & DPTOK) {
-						flags &= ~(SIGNOK | DPTOK);
-						goto fok;
-					}
-					break;
-				case 'e': case 'E':
-					/* no exponent without some digits */
-					if ((flags&(NDIGITS|EXPOK)) == EXPOK) {
-						flags =
-						    (flags & ~(EXPOK|DPTOK)) |
-						    SIGNOK | NDIGITS;
-						goto fok;
-					}
-					break;
-				}
-				break;
-		fok:
-				*p++ = c;
-				if (--fp->_r > 0)
-					fp->_p++;
-				else if (__srefill(fp))
-					break;	/* EOF */
-			}
-			/*
-			 * If no digits, might be missing exponent digits
-			 * (just give back the exponent) or might be missing
-			 * regular digits, but had sign and/or decimal point.
-			 */
-			if (flags & NDIGITS) {
-				if (flags & EXPOK) {
-					/* no digits at all */
-					while (p > buf)
-						ungetc(*(u_char *)--p, fp);
-					goto match_failure;
-				}
-				/* just a bad exponent (e and maybe sign) */
-				c = *(u_char *)--p;
-				if (c != 'e' && c != 'E') {
-					(void) ungetc(c, fp);/* sign */
-					c = *(u_char *)--p;
-				}
-				(void) ungetc(c, fp);
-			}
+			if ((width = parsefloat(fp, buf, buf + width)) == 0)
+				goto match_failure;
 			if ((flags & SUPPRESS) == 0) {
-				*p = '\0';
 				if (flags & LONGDBL) {
-					long double res = strtold(buf,
-					    (char **)NULL);
+					long double res = strtold(buf, &p);
 					*va_arg(ap, long double *) = res;
 				} else if (flags & LONG) {
-					double res = strtod(buf, (char **)NULL);
+					double res = strtod(buf, &p);
 					*va_arg(ap, double *) = res;
 				} else {
-					float res = strtof(buf, (char **)NULL);
+					float res = strtof(buf, &p);
 					*va_arg(ap, float *) = res;
 				}
+				if ((size_t)(p - buf) != width) abort();
 				nassigned++;
 			}
-			nread += p - buf;
+			nread += width;
 			break;
 #endif /* FLOATING_POINT */
 		}
diff --git a/libc/upstream-openbsd/lib/libc/stdio/vfwscanf.c b/libc/stdio/vfwscanf.c
similarity index 89%
rename from libc/upstream-openbsd/lib/libc/stdio/vfwscanf.c
rename to libc/stdio/vfwscanf.c
index cbb36be..0a7bfa9 100644
--- a/libc/upstream-openbsd/lib/libc/stdio/vfwscanf.c
+++ b/libc/stdio/vfwscanf.c
@@ -95,6 +95,9 @@
 	(cclcompl ? (wmemchr(ccls, (_c), ccle - ccls) == NULL) : \
 	(wmemchr(ccls, (_c), ccle - ccls) != NULL))
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wframe-larger-than="
+
 /*
  * vfwscanf
  */
@@ -120,9 +123,6 @@
 	size_t nconv;		/* number of bytes in mb. conversion */
 	char mbbuf[MB_LEN_MAX];	/* temporary mb. character buffer */
  	mbstate_t mbs;
-#ifdef FLOATING_POINT
-	wchar_t decimal_point = 0;
-#endif
 
 	/* `basefix' is used to avoid `if' tests in the integer scanner */
 	static short basefix[17] =
@@ -371,7 +371,7 @@
 				if (!(flags & SUPPRESS))
 					mbp = va_arg(ap, char *);
 				n = 0;
-				bzero(&mbs, sizeof(mbs));
+				memset(&mbs, 0, sizeof(mbs));
 				while (width != 0 &&
 				    (wi = __fgetwc_unlock(fp)) != WEOF) {
 					if (width >= MB_CUR_MAX &&
@@ -436,7 +436,7 @@
 				if (!(flags & SUPPRESS))
 					mbp = va_arg(ap, char *);
 				n = 0;
-				bzero(&mbs, sizeof(mbs));
+				memset(&mbs, 0, sizeof(mbs));
 				while ((wi = __fgetwc_unlock(fp)) != WEOF &&
 				    width != 0 && INCCL(wi)) {
 					if (width >= MB_CUR_MAX &&
@@ -497,7 +497,7 @@
 			} else {
 				if (!(flags & SUPPRESS))
 					mbp = va_arg(ap, char *);
-				bzero(&mbs, sizeof(mbs));
+				memset(&mbs, 0, sizeof(mbs));
 				while ((wi = __fgetwc_unlock(fp)) != WEOF &&
 				    width != 0 &&
 				    !iswspace(wi)) {
@@ -686,95 +686,23 @@
 			if (width == 0 || width > sizeof(buf) /
 			    sizeof(*buf) - 1)
 				width = sizeof(buf) / sizeof(*buf) - 1;
-			flags |= SIGNOK | NDIGITS | DPTOK | EXPOK;
-			for (p = buf; width; width--) {
-				c = __fgetwc_unlock(fp);
-				/*
-				 * This code mimicks the integer conversion
-				 * code, but is much simpler.
-				 */
-				switch (c) {
-
-				case '0': case '1': case '2': case '3':
-				case '4': case '5': case '6': case '7':
-				case '8': case '9':
-					flags &= ~(SIGNOK | NDIGITS);
-					goto fok;
-
-				case '+': case '-':
-					if (flags & SIGNOK) {
-						flags &= ~SIGNOK;
-						goto fok;
-					}
-					break;
-				case 'e': case 'E':
-					/* no exponent without some digits */
-					if ((flags&(NDIGITS|EXPOK)) == EXPOK) {
-						flags =
-						    (flags & ~(EXPOK|DPTOK)) |
-						    SIGNOK | NDIGITS;
-						goto fok;
-					}
-					break;
-				default:
-					if (decimal_point == 0) {
-						bzero(&mbs, sizeof(mbs));
-						nconv = mbrtowc(&decimal_point,
-						    localeconv()->decimal_point,
-					    	    MB_CUR_MAX, &mbs);
-						if (nconv == 0 ||
-						    nconv == (size_t)-1 ||
-						    nconv == (size_t)-2)
-							decimal_point = '.';
-					}
-					if (c == decimal_point &&
-					    (flags & DPTOK)) {
-						flags &= ~(SIGNOK | DPTOK);
-						goto fok;
-					}
-					break;
-				}
-				if (c != WEOF)
-					__ungetwc(c, fp);
-				break;
-		fok:
-				*p++ = c;
-			}
-			/*
-			 * If no digits, might be missing exponent digits
-			 * (just give back the exponent) or might be missing
-			 * regular digits, but had sign and/or decimal point.
-			 */
-			if (flags & NDIGITS) {
-				if (flags & EXPOK) {
-					/* no digits at all */
-					while (p > buf)
-						__ungetwc(*--p, fp);
-					goto match_failure;
-				}
-				/* just a bad exponent (e and maybe sign) */
-				c = *--p;
-				if (c != 'e' && c != 'E') {
-					__ungetwc(c, fp);/* sign */
-					c = *--p;
-				}
-				__ungetwc(c, fp);
-			}
+			if ((width = wparsefloat(fp, buf, buf + width)) == 0)
+				goto match_failure;
 			if ((flags & SUPPRESS) == 0) {
-				*p = 0;
 				if (flags & LONGDBL) {
-					long double res = wcstold(buf, NULL);
+					long double res = wcstold(buf, &p);
 					*va_arg(ap, long double *) = res;
 				} else if (flags & LONG) {
-					double res = wcstod(buf, NULL);
+					double res = wcstod(buf, &p);
 					*va_arg(ap, double *) = res;
 				} else {
-					float res = wcstof(buf, NULL);
+					float res = wcstof(buf, &p);
 					*va_arg(ap, float *) = res;
 				}
+				if (p - buf != (ptrdiff_t)width) abort();
 				nassigned++;
 			}
-			nread += p - buf;
+			nread += width;
 			nconversions++;
 			break;
 #endif /* FLOATING_POINT */
@@ -785,6 +713,7 @@
 match_failure:
 	return (nassigned);
 }
+#pragma GCC diagnostic pop
 
 int
 vfwscanf(FILE * __restrict fp, const wchar_t * __restrict fmt, __va_list ap)
diff --git a/libc/upstream-openbsd/android/include/gd_qnan.h b/libc/upstream-openbsd/android/include/gd_qnan.h
index e8e907b..e5bf973 100644
--- a/libc/upstream-openbsd/android/include/gd_qnan.h
+++ b/libc/upstream-openbsd/android/include/gd_qnan.h
@@ -14,35 +14,20 @@
  * limitations under the License.
  */
 
-#if __arm__
+//
+// The values in this file came from reading the bits of <math.h>'s NAN back from a union.
+//
 
-#define f_QNAN  0xffffffff
-
-#define d_QNAN0 0xffffffff
-#define d_QNAN1 0xffffffff
-
-#elif __mips__
-
-#define f_QNAN  0x7fbfffff
-
-#define d_QNAN0 0x7ff7ffff
-#define d_QNAN1 0xffffffff
-
-#else
-
-#define f_QNAN  0xffc00000
+#define f_QNAN 0x7fc00000
 
 #define d_QNAN0 0x00000000
-#define d_QNAN1 0xfff80000
+#define d_QNAN1 0x7ff80000
 
-#endif
-
-/* long double. */
 #if __LP64__
-#define ld_QNAN0 0x7fff8000
+#define ld_QNAN0 0x00000000
 #define ld_QNAN1 0x00000000
 #define ld_QNAN2 0x00000000
-#define ld_QNAN3 0x00000000
+#define ld_QNAN3 0x7fff8000
 #else
-/* sizeof(long double) == sizeof(double), so we shouldn't be trying to use these constants. */
+// LP32 sizeof(long double) == sizeof(double), so LP32 shouldn't try to use these constants.
 #endif
diff --git a/libc/upstream-openbsd/lib/libc/locale/_wcstod.h b/libc/upstream-openbsd/lib/libc/locale/_wcstod.h
deleted file mode 100644
index ae993ad..0000000
--- a/libc/upstream-openbsd/lib/libc/locale/_wcstod.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/*	$OpenBSD: _wcstod.h,v 1.2 2013/06/02 15:22:20 matthew Exp $	*/
-/* $NetBSD: wcstod.c,v 1.4 2001/10/28 12:08:43 yamt Exp $ */
-
-/*-
- * Copyright (c)1999, 2000, 2001 Citrus 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:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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 AUTHOR 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 AUTHOR 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.
- *
- *	$Citrus: xpg4dl/FreeBSD/lib/libc/locale/wcstod.c,v 1.2 2001/09/27 16:23:57 yamt Exp $
- */
-
-/*
- * function template for wcstof, wcstod and wcstold.
- *
- * parameters:
- *	FUNCNAME : function name
- *      float_type : return type
- *      STRTOD_FUNC : conversion function
- */
-
-float_type
-FUNCNAME(const wchar_t *nptr, wchar_t **endptr)
-{
-	const wchar_t *src;
-	size_t size;
-	const wchar_t *start;
-	const wchar_t *aftersign;
-
-	/*
-	 * check length of string and call strtod
-	 */
-	src = nptr;
-
-	/* skip space first */
-	while (iswspace(*src)) {
-		src++;
-	}
-
-	/* get length of string */
-	start = src;
-	if (*src && wcschr(L"+-", *src))
-		src++;
-	aftersign = src;
-	if (wcsncasecmp(src, L"inf", 3) == 0) {
-		src += 3;
-		if (wcsncasecmp(src, L"inity", 5) == 0)
-			src += 5;
-		goto match;
-	}
-	if (wcsncasecmp(src, L"nan", 3) == 0) {
-		src += 3;
-		if (*src == L'(') {
-			size = 1;
-			while (src[size] != L'\0' && src[size] != L')')
-				size++;
-			if (src[size] == L')')
-				src += size + 1;
-		}
-		goto match;
-	}
-	size = wcsspn(src, L"0123456789");
-	src += size;
-	if (*src == L'.') {/* XXX use localeconv */
-		src++;
-		size = wcsspn(src, L"0123456789");
-		src += size;
-	}
-	if (*src && wcschr(L"Ee", *src)) {
-		src++;
-		if (*src && wcschr(L"+-", *src))
-			src++;
-		size = wcsspn(src, L"0123456789");
-		src += size;
-	}
-match:
-	size = src - start;
-
-	/*
-	 * convert to a char-string and pass it to strtod.
-	 */
-	if (src > aftersign) {
-		mbstate_t st;
-		char *buf;
-		char *end;
-		const wchar_t *s;
-		size_t size_converted;
-		float_type result;
-		size_t bufsize;
-
-		s = start;
-		memset(&st, 0, sizeof(st));
-		bufsize = wcsnrtombs(NULL, &s, size, 0, &st);
-
-		buf = malloc(bufsize + 1);
-		if (!buf) {
-			errno = ENOMEM; /* XXX */
-			goto fail;
-		}
-
-		s = start;
-		memset(&st, 0, sizeof(st));
-		size_converted = wcsnrtombs(buf, &s, size, bufsize, &st);
-		if (size_converted != bufsize) {
-			/* XXX should not happen */
-			free(buf);
-			errno = EILSEQ;
-			goto fail;
-		}
-
-		buf[bufsize] = 0;
-		result = STRTOD_FUNC(buf, &end);
-
-		if (endptr) {
-			const char *s = buf;
-			memset(&st, 0, sizeof(st));
-			size = mbsnrtowcs(NULL, &s, end - buf, 0, &st);
-
-			/* LINTED bad interface */
-			*endptr = (wchar_t*)start + size;
-		}
-
-		free(buf);
-
-		return result;
-	}
-
-fail:
-	if (endptr)
-		/* LINTED bad interface */
-		*endptr = (wchar_t*)nptr;
-
-	return 0;
-}
diff --git a/libc/upstream-openbsd/lib/libc/locale/wcstod.c b/libc/upstream-openbsd/lib/libc/locale/wcstod.c
deleted file mode 100644
index 957d0a1..0000000
--- a/libc/upstream-openbsd/lib/libc/locale/wcstod.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/*	$OpenBSD: wcstod.c,v 1.3 2009/01/13 18:18:31 kettenis Exp $	*/
-
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <wchar.h>
-#include <wctype.h>
-
-#define FUNCNAME	wcstod
-typedef double		float_type;
-#define STRTOD_FUNC	strtod
-
-#include "_wcstod.h"
diff --git a/libc/upstream-openbsd/lib/libc/locale/wcstof.c b/libc/upstream-openbsd/lib/libc/locale/wcstof.c
deleted file mode 100644
index 40d76c7..0000000
--- a/libc/upstream-openbsd/lib/libc/locale/wcstof.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/*	$OpenBSD: wcstof.c,v 1.1 2009/01/13 18:18:31 kettenis Exp $	*/
-
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <wchar.h>
-#include <wctype.h>
-
-#define FUNCNAME	wcstof
-typedef float		float_type;
-#define STRTOD_FUNC	strtof
-
-#include "_wcstod.h"
diff --git a/libc/upstream-openbsd/lib/libc/locale/wcstold.c b/libc/upstream-openbsd/lib/libc/locale/wcstold.c
deleted file mode 100644
index a642542..0000000
--- a/libc/upstream-openbsd/lib/libc/locale/wcstold.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/*	$OpenBSD: wcstold.c,v 1.1 2009/01/13 18:18:31 kettenis Exp $	*/
-
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <wchar.h>
-#include <wctype.h>
-
-#define FUNCNAME	wcstold
-typedef long double	float_type;
-#define STRTOD_FUNC	strtold
-
-#include "_wcstod.h"
diff --git a/libm/libm.arm.map b/libm/libm.arm.map
index a61dc2e..3052f03 100644
--- a/libm/libm.arm.map
+++ b/libm/libm.arm.map
@@ -1,7 +1,7 @@
 # Generated by genversion-scripts.py. Do not edit.
 LIBC {
   global:
-    __fe_dfl_env;
+    __fe_dfl_env; # var
     __signbit;
     __signbitf;
     __signbitl;
@@ -9,59 +9,59 @@
     acosf;
     acosh;
     acoshf;
-    acoshl;
-    acosl;
+    acoshl; # introduced=21
+    acosl; # introduced=21
     asin;
     asinf;
     asinh;
     asinhf;
-    asinhl;
-    asinl;
+    asinhl; # introduced=21
+    asinl; # introduced=21
     atan;
     atan2;
     atan2f;
-    atan2l;
+    atan2l; # introduced=21
     atanf;
     atanh;
     atanhf;
-    atanhl;
-    atanl;
-    cabs;
-    cabsf;
-    cabsl;
-    cacos;
-    cacosf;
-    cacosh;
-    cacoshf;
-    carg;
-    cargf;
-    cargl;
-    casin;
-    casinf;
-    casinh;
-    casinhf;
-    catan;
-    catanf;
-    catanh;
-    catanhf;
+    atanhl; # introduced=21
+    atanl; # introduced=21
+    cabs; # introduced=23
+    cabsf; # introduced=23
+    cabsl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    cacos; # introduced=23
+    cacosf; # introduced=23
+    cacosh; # introduced=23
+    cacoshf; # introduced=23
+    carg; # introduced=23
+    cargf; # introduced=23
+    cargl; # introduced=23
+    casin; # introduced=23
+    casinf; # introduced=23
+    casinh; # introduced=23
+    casinhf; # introduced=23
+    catan; # introduced=23
+    catanf; # introduced=23
+    catanh; # introduced=23
+    catanhf; # introduced=23
     cbrt;
     cbrtf;
-    cbrtl;
-    ccos;
-    ccosf;
-    ccosh;
-    ccoshf;
+    cbrtl; # introduced=21
+    ccos; # introduced=23
+    ccosf; # introduced=23
+    ccosh; # introduced=23
+    ccoshf; # introduced=23
     ceil;
     ceilf;
     ceill;
-    cexp;
-    cexpf;
-    cimag;
-    cimagf;
-    cimagl;
-    conj;
-    conjf;
-    conjl;
+    cexp; # introduced=23
+    cexpf; # introduced=23
+    cimag; # introduced=23
+    cimagf; # introduced=23
+    cimagl; # introduced=23
+    conj; # introduced=23
+    conjf; # introduced=23
+    conjl; # introduced=23
     copysign;
     copysignf;
     copysignl;
@@ -69,62 +69,62 @@
     cosf;
     cosh;
     coshf;
-    coshl;
-    cosl;
-    cproj;
-    cprojf;
-    cprojl;
-    creal;
-    crealf;
-    creall;
-    csin;
-    csinf;
-    csinh;
-    csinhf;
-    csqrt;
-    csqrtf;
-    csqrtl;
-    ctan;
-    ctanf;
-    ctanh;
-    ctanhf;
+    coshl; # introduced=21
+    cosl; # introduced=21
+    cproj; # introduced=23
+    cprojf; # introduced=23
+    cprojl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    creal; # introduced=23
+    crealf; # introduced=23
+    creall; # introduced=23
+    csin; # introduced=23
+    csinf; # introduced=23
+    csinh; # introduced=23
+    csinhf; # introduced=23
+    csqrt; # introduced=23
+    csqrtf; # introduced=23
+    csqrtl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    ctan; # introduced=23
+    ctanf; # introduced=23
+    ctanh; # introduced=23
+    ctanhf; # introduced=23
     drem;
     dremf;
     erf;
     erfc;
     erfcf;
-    erfcl;
+    erfcl; # introduced=21
     erff;
-    erfl;
+    erfl; # introduced=21
     exp;
     exp2;
     exp2f;
-    exp2l;
+    exp2l; # introduced=21
     expf;
-    expl;
+    expl; # introduced=21
     expm1;
     expm1f;
-    expm1l;
+    expm1l; # introduced=21
     fabs;
     fabsf;
     fabsl;
     fdim;
     fdimf;
     fdiml;
-    feclearexcept;
-    fedisableexcept;
-    feenableexcept;
-    fegetenv;
-    fegetexcept;
-    fegetexceptflag;
-    fegetround;
-    feholdexcept;
-    feraiseexcept;
-    fesetenv;
-    fesetexceptflag;
-    fesetround;
-    fetestexcept;
-    feupdateenv;
+    feclearexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fedisableexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feenableexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetexceptflag; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetround; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feholdexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feraiseexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetexceptflag; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetround; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fetestexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feupdateenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
     finite;
     finitef;
     floor;
@@ -132,7 +132,7 @@
     floorl;
     fma;
     fmaf;
-    fmal;
+    fmal; # introduced=21
     fmax;
     fmaxf;
     fmaxl;
@@ -141,17 +141,17 @@
     fminl;
     fmod;
     fmodf;
-    fmodl;
+    fmodl; # introduced=21
     frexp;
     frexpf;
-    frexpl;
+    frexpl; # introduced=21
     gamma;
     gamma_r;
     gammaf;
     gammaf_r;
     hypot;
     hypotf;
-    hypotl;
+    hypotl; # introduced=21
     ilogb;
     ilogbf;
     ilogbl;
@@ -167,77 +167,77 @@
     lgamma_r;
     lgammaf;
     lgammaf_r;
-    lgammal;
-    lgammal_r;
+    lgammal; # introduced=21
+    lgammal_r; # introduced=23
     llrint;
     llrintf;
-    llrintl;
+    llrintl; # introduced=21
     llround;
     llroundf;
     llroundl;
     log;
     log10;
     log10f;
-    log10l;
+    log10l; # introduced=21
     log1p;
     log1pf;
-    log1pl;
-    log2;
-    log2f;
-    log2l;
+    log1pl; # introduced=21
+    log2; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    log2f; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    log2l; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     logb;
     logbf;
-    logbl;
+    logbl; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     logf;
-    logl;
+    logl; # introduced=21
     lrint;
     lrintf;
-    lrintl;
+    lrintl; # introduced=21
     lround;
     lroundf;
     lroundl;
     modf;
     modff;
-    modfl;
-    nan;
-    nanf;
-    nanl;
+    modfl; # introduced=21
+    nan; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    nanf; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    nanl; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=13 introduced-x86_64=21
     nearbyint;
     nearbyintf;
-    nearbyintl;
+    nearbyintl; # introduced=21
     nextafter;
     nextafterf;
-    nextafterl;
-    nexttoward;
+    nextafterl; # introduced=21
+    nexttoward; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     nexttowardf;
-    nexttowardl;
+    nexttowardl; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     pow;
     powf;
-    powl;
+    powl; # introduced=21
     remainder;
     remainderf;
-    remainderl;
+    remainderl; # introduced=21
     remquo;
     remquof;
-    remquol;
+    remquol; # introduced=21
     rint;
     rintf;
-    rintl;
+    rintl; # introduced=21
     round;
     roundf;
     roundl;
     scalb;
     scalbf;
-    scalbln;
-    scalblnf;
-    scalblnl;
+    scalbln; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    scalblnf; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    scalblnl; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     scalbn;
     scalbnf;
     scalbnl;
-    signgam;
+    signgam; # var
     significand;
     significandf;
-    significandl;
+    significandl; # introduced=21
     sin;
     sincos;
     sincosf;
@@ -245,20 +245,20 @@
     sinf;
     sinh;
     sinhf;
-    sinhl;
-    sinl;
+    sinhl; # introduced=21
+    sinl; # introduced=21
     sqrt;
     sqrtf;
-    sqrtl;
+    sqrtl; # introduced=21
     tan;
     tanf;
     tanh;
     tanhf;
-    tanhl;
-    tanl;
+    tanhl; # introduced=21
+    tanl; # introduced=21
     tgamma;
-    tgammaf;
-    tgammal;
+    tgammaf; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    tgammal; # introduced=21
     trunc;
     truncf;
     truncl;
diff --git a/libm/libm.arm64.map b/libm/libm.arm64.map
index 11032ca..3e259dd 100644
--- a/libm/libm.arm64.map
+++ b/libm/libm.arm64.map
@@ -1,7 +1,7 @@
 # Generated by genversion-scripts.py. Do not edit.
 LIBC {
   global:
-    __fe_dfl_env;
+    __fe_dfl_env; # var
     __signbit;
     __signbitf;
     __signbitl;
@@ -9,59 +9,59 @@
     acosf;
     acosh;
     acoshf;
-    acoshl;
-    acosl;
+    acoshl; # introduced=21
+    acosl; # introduced=21
     asin;
     asinf;
     asinh;
     asinhf;
-    asinhl;
-    asinl;
+    asinhl; # introduced=21
+    asinl; # introduced=21
     atan;
     atan2;
     atan2f;
-    atan2l;
+    atan2l; # introduced=21
     atanf;
     atanh;
     atanhf;
-    atanhl;
-    atanl;
-    cabs;
-    cabsf;
-    cabsl;
-    cacos;
-    cacosf;
-    cacosh;
-    cacoshf;
-    carg;
-    cargf;
-    cargl;
-    casin;
-    casinf;
-    casinh;
-    casinhf;
-    catan;
-    catanf;
-    catanh;
-    catanhf;
+    atanhl; # introduced=21
+    atanl; # introduced=21
+    cabs; # introduced=23
+    cabsf; # introduced=23
+    cabsl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    cacos; # introduced=23
+    cacosf; # introduced=23
+    cacosh; # introduced=23
+    cacoshf; # introduced=23
+    carg; # introduced=23
+    cargf; # introduced=23
+    cargl; # introduced=23
+    casin; # introduced=23
+    casinf; # introduced=23
+    casinh; # introduced=23
+    casinhf; # introduced=23
+    catan; # introduced=23
+    catanf; # introduced=23
+    catanh; # introduced=23
+    catanhf; # introduced=23
     cbrt;
     cbrtf;
-    cbrtl;
-    ccos;
-    ccosf;
-    ccosh;
-    ccoshf;
+    cbrtl; # introduced=21
+    ccos; # introduced=23
+    ccosf; # introduced=23
+    ccosh; # introduced=23
+    ccoshf; # introduced=23
     ceil;
     ceilf;
     ceill;
-    cexp;
-    cexpf;
-    cimag;
-    cimagf;
-    cimagl;
-    conj;
-    conjf;
-    conjl;
+    cexp; # introduced=23
+    cexpf; # introduced=23
+    cimag; # introduced=23
+    cimagf; # introduced=23
+    cimagl; # introduced=23
+    conj; # introduced=23
+    conjf; # introduced=23
+    conjl; # introduced=23
     copysign;
     copysignf;
     copysignl;
@@ -69,62 +69,62 @@
     cosf;
     cosh;
     coshf;
-    coshl;
-    cosl;
-    cproj;
-    cprojf;
-    cprojl;
-    creal;
-    crealf;
-    creall;
-    csin;
-    csinf;
-    csinh;
-    csinhf;
-    csqrt;
-    csqrtf;
-    csqrtl;
-    ctan;
-    ctanf;
-    ctanh;
-    ctanhf;
+    coshl; # introduced=21
+    cosl; # introduced=21
+    cproj; # introduced=23
+    cprojf; # introduced=23
+    cprojl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    creal; # introduced=23
+    crealf; # introduced=23
+    creall; # introduced=23
+    csin; # introduced=23
+    csinf; # introduced=23
+    csinh; # introduced=23
+    csinhf; # introduced=23
+    csqrt; # introduced=23
+    csqrtf; # introduced=23
+    csqrtl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    ctan; # introduced=23
+    ctanf; # introduced=23
+    ctanh; # introduced=23
+    ctanhf; # introduced=23
     drem;
     dremf;
     erf;
     erfc;
     erfcf;
-    erfcl;
+    erfcl; # introduced=21
     erff;
-    erfl;
+    erfl; # introduced=21
     exp;
     exp2;
     exp2f;
-    exp2l;
+    exp2l; # introduced=21
     expf;
-    expl;
+    expl; # introduced=21
     expm1;
     expm1f;
-    expm1l;
+    expm1l; # introduced=21
     fabs;
     fabsf;
     fabsl;
     fdim;
     fdimf;
     fdiml;
-    feclearexcept;
-    fedisableexcept;
-    feenableexcept;
-    fegetenv;
-    fegetexcept;
-    fegetexceptflag;
-    fegetround;
-    feholdexcept;
-    feraiseexcept;
-    fesetenv;
-    fesetexceptflag;
-    fesetround;
-    fetestexcept;
-    feupdateenv;
+    feclearexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fedisableexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feenableexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetexceptflag; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetround; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feholdexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feraiseexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetexceptflag; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetround; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fetestexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feupdateenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
     finite;
     finitef;
     floor;
@@ -132,7 +132,7 @@
     floorl;
     fma;
     fmaf;
-    fmal;
+    fmal; # introduced=21
     fmax;
     fmaxf;
     fmaxl;
@@ -141,17 +141,17 @@
     fminl;
     fmod;
     fmodf;
-    fmodl;
+    fmodl; # introduced=21
     frexp;
     frexpf;
-    frexpl;
+    frexpl; # introduced=21
     gamma;
     gamma_r;
     gammaf;
     gammaf_r;
     hypot;
     hypotf;
-    hypotl;
+    hypotl; # introduced=21
     ilogb;
     ilogbf;
     ilogbl;
@@ -167,77 +167,77 @@
     lgamma_r;
     lgammaf;
     lgammaf_r;
-    lgammal;
-    lgammal_r;
+    lgammal; # introduced=21
+    lgammal_r; # introduced=23
     llrint;
     llrintf;
-    llrintl;
+    llrintl; # introduced=21
     llround;
     llroundf;
     llroundl;
     log;
     log10;
     log10f;
-    log10l;
+    log10l; # introduced=21
     log1p;
     log1pf;
-    log1pl;
-    log2;
-    log2f;
-    log2l;
+    log1pl; # introduced=21
+    log2; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    log2f; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    log2l; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     logb;
     logbf;
-    logbl;
+    logbl; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     logf;
-    logl;
+    logl; # introduced=21
     lrint;
     lrintf;
-    lrintl;
+    lrintl; # introduced=21
     lround;
     lroundf;
     lroundl;
     modf;
     modff;
-    modfl;
-    nan;
-    nanf;
-    nanl;
+    modfl; # introduced=21
+    nan; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    nanf; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    nanl; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=13 introduced-x86_64=21
     nearbyint;
     nearbyintf;
-    nearbyintl;
+    nearbyintl; # introduced=21
     nextafter;
     nextafterf;
-    nextafterl;
-    nexttoward;
+    nextafterl; # introduced=21
+    nexttoward; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     nexttowardf;
-    nexttowardl;
+    nexttowardl; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     pow;
     powf;
-    powl;
+    powl; # introduced=21
     remainder;
     remainderf;
-    remainderl;
+    remainderl; # introduced=21
     remquo;
     remquof;
-    remquol;
+    remquol; # introduced=21
     rint;
     rintf;
-    rintl;
+    rintl; # introduced=21
     round;
     roundf;
     roundl;
     scalb;
     scalbf;
-    scalbln;
-    scalblnf;
-    scalblnl;
+    scalbln; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    scalblnf; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    scalblnl; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     scalbn;
     scalbnf;
     scalbnl;
-    signgam;
+    signgam; # var
     significand;
     significandf;
-    significandl;
+    significandl; # introduced=21
     sin;
     sincos;
     sincosf;
@@ -245,20 +245,20 @@
     sinf;
     sinh;
     sinhf;
-    sinhl;
-    sinl;
+    sinhl; # introduced=21
+    sinl; # introduced=21
     sqrt;
     sqrtf;
-    sqrtl;
+    sqrtl; # introduced=21
     tan;
     tanf;
     tanh;
     tanhf;
-    tanhl;
-    tanl;
+    tanhl; # introduced=21
+    tanl; # introduced=21
     tgamma;
-    tgammaf;
-    tgammal;
+    tgammaf; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    tgammal; # introduced=21
     trunc;
     truncf;
     truncl;
diff --git a/libm/libm.map.txt b/libm/libm.map.txt
index 66dfd19..c77e1d1 100644
--- a/libm/libm.map.txt
+++ b/libm/libm.map.txt
@@ -1,6 +1,6 @@
 LIBC {
   global:
-    __fe_dfl_env;
+    __fe_dfl_env; # var
     __signbit;
     __signbitf;
     __signbitl;
@@ -8,59 +8,59 @@
     acosf;
     acosh;
     acoshf;
-    acoshl;
-    acosl;
+    acoshl; # introduced=21
+    acosl; # introduced=21
     asin;
     asinf;
     asinh;
     asinhf;
-    asinhl;
-    asinl;
+    asinhl; # introduced=21
+    asinl; # introduced=21
     atan;
     atan2;
     atan2f;
-    atan2l;
+    atan2l; # introduced=21
     atanf;
     atanh;
     atanhf;
-    atanhl;
-    atanl;
-    cabs;
-    cabsf;
-    cabsl;
-    cacos;
-    cacosf;
-    cacosh;
-    cacoshf;
-    carg;
-    cargf;
-    cargl;
-    casin;
-    casinf;
-    casinh;
-    casinhf;
-    catan;
-    catanf;
-    catanh;
-    catanhf;
+    atanhl; # introduced=21
+    atanl; # introduced=21
+    cabs; # introduced=23
+    cabsf; # introduced=23
+    cabsl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    cacos; # introduced=23
+    cacosf; # introduced=23
+    cacosh; # introduced=23
+    cacoshf; # introduced=23
+    carg; # introduced=23
+    cargf; # introduced=23
+    cargl; # introduced=23
+    casin; # introduced=23
+    casinf; # introduced=23
+    casinh; # introduced=23
+    casinhf; # introduced=23
+    catan; # introduced=23
+    catanf; # introduced=23
+    catanh; # introduced=23
+    catanhf; # introduced=23
     cbrt;
     cbrtf;
-    cbrtl;
-    ccos;
-    ccosf;
-    ccosh;
-    ccoshf;
+    cbrtl; # introduced=21
+    ccos; # introduced=23
+    ccosf; # introduced=23
+    ccosh; # introduced=23
+    ccoshf; # introduced=23
     ceil;
     ceilf;
     ceill;
-    cexp;
-    cexpf;
-    cimag;
-    cimagf;
-    cimagl;
-    conj;
-    conjf;
-    conjl;
+    cexp; # introduced=23
+    cexpf; # introduced=23
+    cimag; # introduced=23
+    cimagf; # introduced=23
+    cimagl; # introduced=23
+    conj; # introduced=23
+    conjf; # introduced=23
+    conjl; # introduced=23
     copysign;
     copysignf;
     copysignl;
@@ -68,62 +68,62 @@
     cosf;
     cosh;
     coshf;
-    coshl;
-    cosl;
-    cproj;
-    cprojf;
-    cprojl;
-    creal;
-    crealf;
-    creall;
-    csin;
-    csinf;
-    csinh;
-    csinhf;
-    csqrt;
-    csqrtf;
-    csqrtl;
-    ctan;
-    ctanf;
-    ctanh;
-    ctanhf;
+    coshl; # introduced=21
+    cosl; # introduced=21
+    cproj; # introduced=23
+    cprojf; # introduced=23
+    cprojl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    creal; # introduced=23
+    crealf; # introduced=23
+    creall; # introduced=23
+    csin; # introduced=23
+    csinf; # introduced=23
+    csinh; # introduced=23
+    csinhf; # introduced=23
+    csqrt; # introduced=23
+    csqrtf; # introduced=23
+    csqrtl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    ctan; # introduced=23
+    ctanf; # introduced=23
+    ctanh; # introduced=23
+    ctanhf; # introduced=23
     drem;
     dremf;
     erf;
     erfc;
     erfcf;
-    erfcl;
+    erfcl; # introduced=21
     erff;
-    erfl;
+    erfl; # introduced=21
     exp;
     exp2;
     exp2f;
-    exp2l;
+    exp2l; # introduced=21
     expf;
-    expl;
+    expl; # introduced=21
     expm1;
     expm1f;
-    expm1l;
+    expm1l; # introduced=21
     fabs;
     fabsf;
     fabsl;
     fdim;
     fdimf;
     fdiml;
-    feclearexcept;
-    fedisableexcept;
-    feenableexcept;
-    fegetenv;
-    fegetexcept;
-    fegetexceptflag;
-    fegetround;
-    feholdexcept;
-    feraiseexcept;
-    fesetenv;
-    fesetexceptflag;
-    fesetround;
-    fetestexcept;
-    feupdateenv;
+    feclearexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fedisableexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feenableexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetexceptflag; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetround; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feholdexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feraiseexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetexceptflag; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetround; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fetestexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feupdateenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
     finite;
     finitef;
     floor;
@@ -131,7 +131,7 @@
     floorl;
     fma;
     fmaf;
-    fmal;
+    fmal; # introduced=21
     fmax;
     fmaxf;
     fmaxl;
@@ -140,17 +140,17 @@
     fminl;
     fmod;
     fmodf;
-    fmodl;
+    fmodl; # introduced=21
     frexp;
     frexpf;
-    frexpl;
+    frexpl; # introduced=21
     gamma;
     gamma_r;
     gammaf;
     gammaf_r;
     hypot;
     hypotf;
-    hypotl;
+    hypotl; # introduced=21
     ilogb;
     ilogbf;
     ilogbl;
@@ -166,77 +166,77 @@
     lgamma_r;
     lgammaf;
     lgammaf_r;
-    lgammal;
-    lgammal_r;
+    lgammal; # introduced=21
+    lgammal_r; # introduced=23
     llrint;
     llrintf;
-    llrintl;
+    llrintl; # introduced=21
     llround;
     llroundf;
     llroundl;
     log;
     log10;
     log10f;
-    log10l;
+    log10l; # introduced=21
     log1p;
     log1pf;
-    log1pl;
-    log2;
-    log2f;
-    log2l;
+    log1pl; # introduced=21
+    log2; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    log2f; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    log2l; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     logb;
     logbf;
-    logbl;
+    logbl; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     logf;
-    logl;
+    logl; # introduced=21
     lrint;
     lrintf;
-    lrintl;
+    lrintl; # introduced=21
     lround;
     lroundf;
     lroundl;
     modf;
     modff;
-    modfl;
-    nan;
-    nanf;
-    nanl;
+    modfl; # introduced=21
+    nan; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    nanf; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    nanl; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=13 introduced-x86_64=21
     nearbyint;
     nearbyintf;
-    nearbyintl;
+    nearbyintl; # introduced=21
     nextafter;
     nextafterf;
-    nextafterl;
-    nexttoward;
+    nextafterl; # introduced=21
+    nexttoward; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     nexttowardf;
-    nexttowardl;
+    nexttowardl; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     pow;
     powf;
-    powl;
+    powl; # introduced=21
     remainder;
     remainderf;
-    remainderl;
+    remainderl; # introduced=21
     remquo;
     remquof;
-    remquol;
+    remquol; # introduced=21
     rint;
     rintf;
-    rintl;
+    rintl; # introduced=21
     round;
     roundf;
     roundl;
     scalb;
     scalbf;
-    scalbln;
-    scalblnf;
-    scalblnl;
+    scalbln; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    scalblnf; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    scalblnl; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     scalbn;
     scalbnf;
     scalbnl;
-    signgam;
+    signgam; # var
     significand;
     significandf;
-    significandl;
+    significandl; # introduced=21
     sin;
     sincos;
     sincosf;
@@ -244,20 +244,20 @@
     sinf;
     sinh;
     sinhf;
-    sinhl;
-    sinl;
+    sinhl; # introduced=21
+    sinl; # introduced=21
     sqrt;
     sqrtf;
-    sqrtl;
+    sqrtl; # introduced=21
     tan;
     tanf;
     tanh;
     tanhf;
-    tanhl;
-    tanl;
+    tanhl; # introduced=21
+    tanl; # introduced=21
     tgamma;
-    tgammaf;
-    tgammal;
+    tgammaf; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    tgammal; # introduced=21
     trunc;
     truncf;
     truncl;
diff --git a/libm/libm.mips.map b/libm/libm.mips.map
index 8353627..2f01cfa 100644
--- a/libm/libm.mips.map
+++ b/libm/libm.mips.map
@@ -1,7 +1,7 @@
 # Generated by genversion-scripts.py. Do not edit.
 LIBC {
   global:
-    __fe_dfl_env;
+    __fe_dfl_env; # var
     __signbit;
     __signbitf;
     __signbitl;
@@ -9,59 +9,59 @@
     acosf;
     acosh;
     acoshf;
-    acoshl;
-    acosl;
+    acoshl; # introduced=21
+    acosl; # introduced=21
     asin;
     asinf;
     asinh;
     asinhf;
-    asinhl;
-    asinl;
+    asinhl; # introduced=21
+    asinl; # introduced=21
     atan;
     atan2;
     atan2f;
-    atan2l;
+    atan2l; # introduced=21
     atanf;
     atanh;
     atanhf;
-    atanhl;
-    atanl;
-    cabs;
-    cabsf;
-    cabsl;
-    cacos;
-    cacosf;
-    cacosh;
-    cacoshf;
-    carg;
-    cargf;
-    cargl;
-    casin;
-    casinf;
-    casinh;
-    casinhf;
-    catan;
-    catanf;
-    catanh;
-    catanhf;
+    atanhl; # introduced=21
+    atanl; # introduced=21
+    cabs; # introduced=23
+    cabsf; # introduced=23
+    cabsl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    cacos; # introduced=23
+    cacosf; # introduced=23
+    cacosh; # introduced=23
+    cacoshf; # introduced=23
+    carg; # introduced=23
+    cargf; # introduced=23
+    cargl; # introduced=23
+    casin; # introduced=23
+    casinf; # introduced=23
+    casinh; # introduced=23
+    casinhf; # introduced=23
+    catan; # introduced=23
+    catanf; # introduced=23
+    catanh; # introduced=23
+    catanhf; # introduced=23
     cbrt;
     cbrtf;
-    cbrtl;
-    ccos;
-    ccosf;
-    ccosh;
-    ccoshf;
+    cbrtl; # introduced=21
+    ccos; # introduced=23
+    ccosf; # introduced=23
+    ccosh; # introduced=23
+    ccoshf; # introduced=23
     ceil;
     ceilf;
     ceill;
-    cexp;
-    cexpf;
-    cimag;
-    cimagf;
-    cimagl;
-    conj;
-    conjf;
-    conjl;
+    cexp; # introduced=23
+    cexpf; # introduced=23
+    cimag; # introduced=23
+    cimagf; # introduced=23
+    cimagl; # introduced=23
+    conj; # introduced=23
+    conjf; # introduced=23
+    conjl; # introduced=23
     copysign;
     copysignf;
     copysignl;
@@ -69,62 +69,62 @@
     cosf;
     cosh;
     coshf;
-    coshl;
-    cosl;
-    cproj;
-    cprojf;
-    cprojl;
-    creal;
-    crealf;
-    creall;
-    csin;
-    csinf;
-    csinh;
-    csinhf;
-    csqrt;
-    csqrtf;
-    csqrtl;
-    ctan;
-    ctanf;
-    ctanh;
-    ctanhf;
+    coshl; # introduced=21
+    cosl; # introduced=21
+    cproj; # introduced=23
+    cprojf; # introduced=23
+    cprojl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    creal; # introduced=23
+    crealf; # introduced=23
+    creall; # introduced=23
+    csin; # introduced=23
+    csinf; # introduced=23
+    csinh; # introduced=23
+    csinhf; # introduced=23
+    csqrt; # introduced=23
+    csqrtf; # introduced=23
+    csqrtl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    ctan; # introduced=23
+    ctanf; # introduced=23
+    ctanh; # introduced=23
+    ctanhf; # introduced=23
     drem;
     dremf;
     erf;
     erfc;
     erfcf;
-    erfcl;
+    erfcl; # introduced=21
     erff;
-    erfl;
+    erfl; # introduced=21
     exp;
     exp2;
     exp2f;
-    exp2l;
+    exp2l; # introduced=21
     expf;
-    expl;
+    expl; # introduced=21
     expm1;
     expm1f;
-    expm1l;
+    expm1l; # introduced=21
     fabs;
     fabsf;
     fabsl;
     fdim;
     fdimf;
     fdiml;
-    feclearexcept;
-    fedisableexcept;
-    feenableexcept;
-    fegetenv;
-    fegetexcept;
-    fegetexceptflag;
-    fegetround;
-    feholdexcept;
-    feraiseexcept;
-    fesetenv;
-    fesetexceptflag;
-    fesetround;
-    fetestexcept;
-    feupdateenv;
+    feclearexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fedisableexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feenableexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetexceptflag; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetround; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feholdexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feraiseexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetexceptflag; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetround; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fetestexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feupdateenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
     finite;
     finitef;
     floor;
@@ -132,7 +132,7 @@
     floorl;
     fma;
     fmaf;
-    fmal;
+    fmal; # introduced=21
     fmax;
     fmaxf;
     fmaxl;
@@ -141,17 +141,17 @@
     fminl;
     fmod;
     fmodf;
-    fmodl;
+    fmodl; # introduced=21
     frexp;
     frexpf;
-    frexpl;
+    frexpl; # introduced=21
     gamma;
     gamma_r;
     gammaf;
     gammaf_r;
     hypot;
     hypotf;
-    hypotl;
+    hypotl; # introduced=21
     ilogb;
     ilogbf;
     ilogbl;
@@ -167,77 +167,77 @@
     lgamma_r;
     lgammaf;
     lgammaf_r;
-    lgammal;
-    lgammal_r;
+    lgammal; # introduced=21
+    lgammal_r; # introduced=23
     llrint;
     llrintf;
-    llrintl;
+    llrintl; # introduced=21
     llround;
     llroundf;
     llroundl;
     log;
     log10;
     log10f;
-    log10l;
+    log10l; # introduced=21
     log1p;
     log1pf;
-    log1pl;
-    log2;
-    log2f;
-    log2l;
+    log1pl; # introduced=21
+    log2; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    log2f; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    log2l; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     logb;
     logbf;
-    logbl;
+    logbl; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     logf;
-    logl;
+    logl; # introduced=21
     lrint;
     lrintf;
-    lrintl;
+    lrintl; # introduced=21
     lround;
     lroundf;
     lroundl;
     modf;
     modff;
-    modfl;
-    nan;
-    nanf;
-    nanl;
+    modfl; # introduced=21
+    nan; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    nanf; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    nanl; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=13 introduced-x86_64=21
     nearbyint;
     nearbyintf;
-    nearbyintl;
+    nearbyintl; # introduced=21
     nextafter;
     nextafterf;
-    nextafterl;
-    nexttoward;
+    nextafterl; # introduced=21
+    nexttoward; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     nexttowardf;
-    nexttowardl;
+    nexttowardl; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     pow;
     powf;
-    powl;
+    powl; # introduced=21
     remainder;
     remainderf;
-    remainderl;
+    remainderl; # introduced=21
     remquo;
     remquof;
-    remquol;
+    remquol; # introduced=21
     rint;
     rintf;
-    rintl;
+    rintl; # introduced=21
     round;
     roundf;
     roundl;
     scalb;
     scalbf;
-    scalbln;
-    scalblnf;
-    scalblnl;
+    scalbln; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    scalblnf; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    scalblnl; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     scalbn;
     scalbnf;
     scalbnl;
-    signgam;
+    signgam; # var
     significand;
     significandf;
-    significandl;
+    significandl; # introduced=21
     sin;
     sincos;
     sincosf;
@@ -245,20 +245,20 @@
     sinf;
     sinh;
     sinhf;
-    sinhl;
-    sinl;
+    sinhl; # introduced=21
+    sinl; # introduced=21
     sqrt;
     sqrtf;
-    sqrtl;
+    sqrtl; # introduced=21
     tan;
     tanf;
     tanh;
     tanhf;
-    tanhl;
-    tanl;
+    tanhl; # introduced=21
+    tanl; # introduced=21
     tgamma;
-    tgammaf;
-    tgammal;
+    tgammaf; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    tgammal; # introduced=21
     trunc;
     truncf;
     truncl;
diff --git a/libm/libm.mips64.map b/libm/libm.mips64.map
index 11032ca..3e259dd 100644
--- a/libm/libm.mips64.map
+++ b/libm/libm.mips64.map
@@ -1,7 +1,7 @@
 # Generated by genversion-scripts.py. Do not edit.
 LIBC {
   global:
-    __fe_dfl_env;
+    __fe_dfl_env; # var
     __signbit;
     __signbitf;
     __signbitl;
@@ -9,59 +9,59 @@
     acosf;
     acosh;
     acoshf;
-    acoshl;
-    acosl;
+    acoshl; # introduced=21
+    acosl; # introduced=21
     asin;
     asinf;
     asinh;
     asinhf;
-    asinhl;
-    asinl;
+    asinhl; # introduced=21
+    asinl; # introduced=21
     atan;
     atan2;
     atan2f;
-    atan2l;
+    atan2l; # introduced=21
     atanf;
     atanh;
     atanhf;
-    atanhl;
-    atanl;
-    cabs;
-    cabsf;
-    cabsl;
-    cacos;
-    cacosf;
-    cacosh;
-    cacoshf;
-    carg;
-    cargf;
-    cargl;
-    casin;
-    casinf;
-    casinh;
-    casinhf;
-    catan;
-    catanf;
-    catanh;
-    catanhf;
+    atanhl; # introduced=21
+    atanl; # introduced=21
+    cabs; # introduced=23
+    cabsf; # introduced=23
+    cabsl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    cacos; # introduced=23
+    cacosf; # introduced=23
+    cacosh; # introduced=23
+    cacoshf; # introduced=23
+    carg; # introduced=23
+    cargf; # introduced=23
+    cargl; # introduced=23
+    casin; # introduced=23
+    casinf; # introduced=23
+    casinh; # introduced=23
+    casinhf; # introduced=23
+    catan; # introduced=23
+    catanf; # introduced=23
+    catanh; # introduced=23
+    catanhf; # introduced=23
     cbrt;
     cbrtf;
-    cbrtl;
-    ccos;
-    ccosf;
-    ccosh;
-    ccoshf;
+    cbrtl; # introduced=21
+    ccos; # introduced=23
+    ccosf; # introduced=23
+    ccosh; # introduced=23
+    ccoshf; # introduced=23
     ceil;
     ceilf;
     ceill;
-    cexp;
-    cexpf;
-    cimag;
-    cimagf;
-    cimagl;
-    conj;
-    conjf;
-    conjl;
+    cexp; # introduced=23
+    cexpf; # introduced=23
+    cimag; # introduced=23
+    cimagf; # introduced=23
+    cimagl; # introduced=23
+    conj; # introduced=23
+    conjf; # introduced=23
+    conjl; # introduced=23
     copysign;
     copysignf;
     copysignl;
@@ -69,62 +69,62 @@
     cosf;
     cosh;
     coshf;
-    coshl;
-    cosl;
-    cproj;
-    cprojf;
-    cprojl;
-    creal;
-    crealf;
-    creall;
-    csin;
-    csinf;
-    csinh;
-    csinhf;
-    csqrt;
-    csqrtf;
-    csqrtl;
-    ctan;
-    ctanf;
-    ctanh;
-    ctanhf;
+    coshl; # introduced=21
+    cosl; # introduced=21
+    cproj; # introduced=23
+    cprojf; # introduced=23
+    cprojl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    creal; # introduced=23
+    crealf; # introduced=23
+    creall; # introduced=23
+    csin; # introduced=23
+    csinf; # introduced=23
+    csinh; # introduced=23
+    csinhf; # introduced=23
+    csqrt; # introduced=23
+    csqrtf; # introduced=23
+    csqrtl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    ctan; # introduced=23
+    ctanf; # introduced=23
+    ctanh; # introduced=23
+    ctanhf; # introduced=23
     drem;
     dremf;
     erf;
     erfc;
     erfcf;
-    erfcl;
+    erfcl; # introduced=21
     erff;
-    erfl;
+    erfl; # introduced=21
     exp;
     exp2;
     exp2f;
-    exp2l;
+    exp2l; # introduced=21
     expf;
-    expl;
+    expl; # introduced=21
     expm1;
     expm1f;
-    expm1l;
+    expm1l; # introduced=21
     fabs;
     fabsf;
     fabsl;
     fdim;
     fdimf;
     fdiml;
-    feclearexcept;
-    fedisableexcept;
-    feenableexcept;
-    fegetenv;
-    fegetexcept;
-    fegetexceptflag;
-    fegetround;
-    feholdexcept;
-    feraiseexcept;
-    fesetenv;
-    fesetexceptflag;
-    fesetround;
-    fetestexcept;
-    feupdateenv;
+    feclearexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fedisableexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feenableexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetexceptflag; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetround; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feholdexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feraiseexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetexceptflag; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetround; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fetestexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feupdateenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
     finite;
     finitef;
     floor;
@@ -132,7 +132,7 @@
     floorl;
     fma;
     fmaf;
-    fmal;
+    fmal; # introduced=21
     fmax;
     fmaxf;
     fmaxl;
@@ -141,17 +141,17 @@
     fminl;
     fmod;
     fmodf;
-    fmodl;
+    fmodl; # introduced=21
     frexp;
     frexpf;
-    frexpl;
+    frexpl; # introduced=21
     gamma;
     gamma_r;
     gammaf;
     gammaf_r;
     hypot;
     hypotf;
-    hypotl;
+    hypotl; # introduced=21
     ilogb;
     ilogbf;
     ilogbl;
@@ -167,77 +167,77 @@
     lgamma_r;
     lgammaf;
     lgammaf_r;
-    lgammal;
-    lgammal_r;
+    lgammal; # introduced=21
+    lgammal_r; # introduced=23
     llrint;
     llrintf;
-    llrintl;
+    llrintl; # introduced=21
     llround;
     llroundf;
     llroundl;
     log;
     log10;
     log10f;
-    log10l;
+    log10l; # introduced=21
     log1p;
     log1pf;
-    log1pl;
-    log2;
-    log2f;
-    log2l;
+    log1pl; # introduced=21
+    log2; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    log2f; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    log2l; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     logb;
     logbf;
-    logbl;
+    logbl; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     logf;
-    logl;
+    logl; # introduced=21
     lrint;
     lrintf;
-    lrintl;
+    lrintl; # introduced=21
     lround;
     lroundf;
     lroundl;
     modf;
     modff;
-    modfl;
-    nan;
-    nanf;
-    nanl;
+    modfl; # introduced=21
+    nan; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    nanf; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    nanl; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=13 introduced-x86_64=21
     nearbyint;
     nearbyintf;
-    nearbyintl;
+    nearbyintl; # introduced=21
     nextafter;
     nextafterf;
-    nextafterl;
-    nexttoward;
+    nextafterl; # introduced=21
+    nexttoward; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     nexttowardf;
-    nexttowardl;
+    nexttowardl; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     pow;
     powf;
-    powl;
+    powl; # introduced=21
     remainder;
     remainderf;
-    remainderl;
+    remainderl; # introduced=21
     remquo;
     remquof;
-    remquol;
+    remquol; # introduced=21
     rint;
     rintf;
-    rintl;
+    rintl; # introduced=21
     round;
     roundf;
     roundl;
     scalb;
     scalbf;
-    scalbln;
-    scalblnf;
-    scalblnl;
+    scalbln; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    scalblnf; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    scalblnl; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     scalbn;
     scalbnf;
     scalbnl;
-    signgam;
+    signgam; # var
     significand;
     significandf;
-    significandl;
+    significandl; # introduced=21
     sin;
     sincos;
     sincosf;
@@ -245,20 +245,20 @@
     sinf;
     sinh;
     sinhf;
-    sinhl;
-    sinl;
+    sinhl; # introduced=21
+    sinl; # introduced=21
     sqrt;
     sqrtf;
-    sqrtl;
+    sqrtl; # introduced=21
     tan;
     tanf;
     tanh;
     tanhf;
-    tanhl;
-    tanl;
+    tanhl; # introduced=21
+    tanl; # introduced=21
     tgamma;
-    tgammaf;
-    tgammal;
+    tgammaf; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    tgammal; # introduced=21
     trunc;
     truncf;
     truncl;
diff --git a/libm/libm.x86.map b/libm/libm.x86.map
index 11032ca..3e259dd 100644
--- a/libm/libm.x86.map
+++ b/libm/libm.x86.map
@@ -1,7 +1,7 @@
 # Generated by genversion-scripts.py. Do not edit.
 LIBC {
   global:
-    __fe_dfl_env;
+    __fe_dfl_env; # var
     __signbit;
     __signbitf;
     __signbitl;
@@ -9,59 +9,59 @@
     acosf;
     acosh;
     acoshf;
-    acoshl;
-    acosl;
+    acoshl; # introduced=21
+    acosl; # introduced=21
     asin;
     asinf;
     asinh;
     asinhf;
-    asinhl;
-    asinl;
+    asinhl; # introduced=21
+    asinl; # introduced=21
     atan;
     atan2;
     atan2f;
-    atan2l;
+    atan2l; # introduced=21
     atanf;
     atanh;
     atanhf;
-    atanhl;
-    atanl;
-    cabs;
-    cabsf;
-    cabsl;
-    cacos;
-    cacosf;
-    cacosh;
-    cacoshf;
-    carg;
-    cargf;
-    cargl;
-    casin;
-    casinf;
-    casinh;
-    casinhf;
-    catan;
-    catanf;
-    catanh;
-    catanhf;
+    atanhl; # introduced=21
+    atanl; # introduced=21
+    cabs; # introduced=23
+    cabsf; # introduced=23
+    cabsl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    cacos; # introduced=23
+    cacosf; # introduced=23
+    cacosh; # introduced=23
+    cacoshf; # introduced=23
+    carg; # introduced=23
+    cargf; # introduced=23
+    cargl; # introduced=23
+    casin; # introduced=23
+    casinf; # introduced=23
+    casinh; # introduced=23
+    casinhf; # introduced=23
+    catan; # introduced=23
+    catanf; # introduced=23
+    catanh; # introduced=23
+    catanhf; # introduced=23
     cbrt;
     cbrtf;
-    cbrtl;
-    ccos;
-    ccosf;
-    ccosh;
-    ccoshf;
+    cbrtl; # introduced=21
+    ccos; # introduced=23
+    ccosf; # introduced=23
+    ccosh; # introduced=23
+    ccoshf; # introduced=23
     ceil;
     ceilf;
     ceill;
-    cexp;
-    cexpf;
-    cimag;
-    cimagf;
-    cimagl;
-    conj;
-    conjf;
-    conjl;
+    cexp; # introduced=23
+    cexpf; # introduced=23
+    cimag; # introduced=23
+    cimagf; # introduced=23
+    cimagl; # introduced=23
+    conj; # introduced=23
+    conjf; # introduced=23
+    conjl; # introduced=23
     copysign;
     copysignf;
     copysignl;
@@ -69,62 +69,62 @@
     cosf;
     cosh;
     coshf;
-    coshl;
-    cosl;
-    cproj;
-    cprojf;
-    cprojl;
-    creal;
-    crealf;
-    creall;
-    csin;
-    csinf;
-    csinh;
-    csinhf;
-    csqrt;
-    csqrtf;
-    csqrtl;
-    ctan;
-    ctanf;
-    ctanh;
-    ctanhf;
+    coshl; # introduced=21
+    cosl; # introduced=21
+    cproj; # introduced=23
+    cprojf; # introduced=23
+    cprojl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    creal; # introduced=23
+    crealf; # introduced=23
+    creall; # introduced=23
+    csin; # introduced=23
+    csinf; # introduced=23
+    csinh; # introduced=23
+    csinhf; # introduced=23
+    csqrt; # introduced=23
+    csqrtf; # introduced=23
+    csqrtl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    ctan; # introduced=23
+    ctanf; # introduced=23
+    ctanh; # introduced=23
+    ctanhf; # introduced=23
     drem;
     dremf;
     erf;
     erfc;
     erfcf;
-    erfcl;
+    erfcl; # introduced=21
     erff;
-    erfl;
+    erfl; # introduced=21
     exp;
     exp2;
     exp2f;
-    exp2l;
+    exp2l; # introduced=21
     expf;
-    expl;
+    expl; # introduced=21
     expm1;
     expm1f;
-    expm1l;
+    expm1l; # introduced=21
     fabs;
     fabsf;
     fabsl;
     fdim;
     fdimf;
     fdiml;
-    feclearexcept;
-    fedisableexcept;
-    feenableexcept;
-    fegetenv;
-    fegetexcept;
-    fegetexceptflag;
-    fegetround;
-    feholdexcept;
-    feraiseexcept;
-    fesetenv;
-    fesetexceptflag;
-    fesetround;
-    fetestexcept;
-    feupdateenv;
+    feclearexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fedisableexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feenableexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetexceptflag; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetround; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feholdexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feraiseexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetexceptflag; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetround; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fetestexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feupdateenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
     finite;
     finitef;
     floor;
@@ -132,7 +132,7 @@
     floorl;
     fma;
     fmaf;
-    fmal;
+    fmal; # introduced=21
     fmax;
     fmaxf;
     fmaxl;
@@ -141,17 +141,17 @@
     fminl;
     fmod;
     fmodf;
-    fmodl;
+    fmodl; # introduced=21
     frexp;
     frexpf;
-    frexpl;
+    frexpl; # introduced=21
     gamma;
     gamma_r;
     gammaf;
     gammaf_r;
     hypot;
     hypotf;
-    hypotl;
+    hypotl; # introduced=21
     ilogb;
     ilogbf;
     ilogbl;
@@ -167,77 +167,77 @@
     lgamma_r;
     lgammaf;
     lgammaf_r;
-    lgammal;
-    lgammal_r;
+    lgammal; # introduced=21
+    lgammal_r; # introduced=23
     llrint;
     llrintf;
-    llrintl;
+    llrintl; # introduced=21
     llround;
     llroundf;
     llroundl;
     log;
     log10;
     log10f;
-    log10l;
+    log10l; # introduced=21
     log1p;
     log1pf;
-    log1pl;
-    log2;
-    log2f;
-    log2l;
+    log1pl; # introduced=21
+    log2; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    log2f; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    log2l; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     logb;
     logbf;
-    logbl;
+    logbl; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     logf;
-    logl;
+    logl; # introduced=21
     lrint;
     lrintf;
-    lrintl;
+    lrintl; # introduced=21
     lround;
     lroundf;
     lroundl;
     modf;
     modff;
-    modfl;
-    nan;
-    nanf;
-    nanl;
+    modfl; # introduced=21
+    nan; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    nanf; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    nanl; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=13 introduced-x86_64=21
     nearbyint;
     nearbyintf;
-    nearbyintl;
+    nearbyintl; # introduced=21
     nextafter;
     nextafterf;
-    nextafterl;
-    nexttoward;
+    nextafterl; # introduced=21
+    nexttoward; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     nexttowardf;
-    nexttowardl;
+    nexttowardl; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     pow;
     powf;
-    powl;
+    powl; # introduced=21
     remainder;
     remainderf;
-    remainderl;
+    remainderl; # introduced=21
     remquo;
     remquof;
-    remquol;
+    remquol; # introduced=21
     rint;
     rintf;
-    rintl;
+    rintl; # introduced=21
     round;
     roundf;
     roundl;
     scalb;
     scalbf;
-    scalbln;
-    scalblnf;
-    scalblnl;
+    scalbln; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    scalblnf; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    scalblnl; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     scalbn;
     scalbnf;
     scalbnl;
-    signgam;
+    signgam; # var
     significand;
     significandf;
-    significandl;
+    significandl; # introduced=21
     sin;
     sincos;
     sincosf;
@@ -245,20 +245,20 @@
     sinf;
     sinh;
     sinhf;
-    sinhl;
-    sinl;
+    sinhl; # introduced=21
+    sinl; # introduced=21
     sqrt;
     sqrtf;
-    sqrtl;
+    sqrtl; # introduced=21
     tan;
     tanf;
     tanh;
     tanhf;
-    tanhl;
-    tanl;
+    tanhl; # introduced=21
+    tanl; # introduced=21
     tgamma;
-    tgammaf;
-    tgammal;
+    tgammaf; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    tgammal; # introduced=21
     trunc;
     truncf;
     truncl;
diff --git a/libm/libm.x86_64.map b/libm/libm.x86_64.map
index 11032ca..3e259dd 100644
--- a/libm/libm.x86_64.map
+++ b/libm/libm.x86_64.map
@@ -1,7 +1,7 @@
 # Generated by genversion-scripts.py. Do not edit.
 LIBC {
   global:
-    __fe_dfl_env;
+    __fe_dfl_env; # var
     __signbit;
     __signbitf;
     __signbitl;
@@ -9,59 +9,59 @@
     acosf;
     acosh;
     acoshf;
-    acoshl;
-    acosl;
+    acoshl; # introduced=21
+    acosl; # introduced=21
     asin;
     asinf;
     asinh;
     asinhf;
-    asinhl;
-    asinl;
+    asinhl; # introduced=21
+    asinl; # introduced=21
     atan;
     atan2;
     atan2f;
-    atan2l;
+    atan2l; # introduced=21
     atanf;
     atanh;
     atanhf;
-    atanhl;
-    atanl;
-    cabs;
-    cabsf;
-    cabsl;
-    cacos;
-    cacosf;
-    cacosh;
-    cacoshf;
-    carg;
-    cargf;
-    cargl;
-    casin;
-    casinf;
-    casinh;
-    casinhf;
-    catan;
-    catanf;
-    catanh;
-    catanhf;
+    atanhl; # introduced=21
+    atanl; # introduced=21
+    cabs; # introduced=23
+    cabsf; # introduced=23
+    cabsl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    cacos; # introduced=23
+    cacosf; # introduced=23
+    cacosh; # introduced=23
+    cacoshf; # introduced=23
+    carg; # introduced=23
+    cargf; # introduced=23
+    cargl; # introduced=23
+    casin; # introduced=23
+    casinf; # introduced=23
+    casinh; # introduced=23
+    casinhf; # introduced=23
+    catan; # introduced=23
+    catanf; # introduced=23
+    catanh; # introduced=23
+    catanhf; # introduced=23
     cbrt;
     cbrtf;
-    cbrtl;
-    ccos;
-    ccosf;
-    ccosh;
-    ccoshf;
+    cbrtl; # introduced=21
+    ccos; # introduced=23
+    ccosf; # introduced=23
+    ccosh; # introduced=23
+    ccoshf; # introduced=23
     ceil;
     ceilf;
     ceill;
-    cexp;
-    cexpf;
-    cimag;
-    cimagf;
-    cimagl;
-    conj;
-    conjf;
-    conjl;
+    cexp; # introduced=23
+    cexpf; # introduced=23
+    cimag; # introduced=23
+    cimagf; # introduced=23
+    cimagl; # introduced=23
+    conj; # introduced=23
+    conjf; # introduced=23
+    conjl; # introduced=23
     copysign;
     copysignf;
     copysignl;
@@ -69,62 +69,62 @@
     cosf;
     cosh;
     coshf;
-    coshl;
-    cosl;
-    cproj;
-    cprojf;
-    cprojl;
-    creal;
-    crealf;
-    creall;
-    csin;
-    csinf;
-    csinh;
-    csinhf;
-    csqrt;
-    csqrtf;
-    csqrtl;
-    ctan;
-    ctanf;
-    ctanh;
-    ctanhf;
+    coshl; # introduced=21
+    cosl; # introduced=21
+    cproj; # introduced=23
+    cprojf; # introduced=23
+    cprojl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    creal; # introduced=23
+    crealf; # introduced=23
+    creall; # introduced=23
+    csin; # introduced=23
+    csinf; # introduced=23
+    csinh; # introduced=23
+    csinhf; # introduced=23
+    csqrt; # introduced=23
+    csqrtf; # introduced=23
+    csqrtl; # introduced-arm=21 introduced-arm64=23 introduced-mips=21 introduced-mips64=23 introduced-x86=21 introduced-x86_64=23
+    ctan; # introduced=23
+    ctanf; # introduced=23
+    ctanh; # introduced=23
+    ctanhf; # introduced=23
     drem;
     dremf;
     erf;
     erfc;
     erfcf;
-    erfcl;
+    erfcl; # introduced=21
     erff;
-    erfl;
+    erfl; # introduced=21
     exp;
     exp2;
     exp2f;
-    exp2l;
+    exp2l; # introduced=21
     expf;
-    expl;
+    expl; # introduced=21
     expm1;
     expm1f;
-    expm1l;
+    expm1l; # introduced=21
     fabs;
     fabsf;
     fabsl;
     fdim;
     fdimf;
     fdiml;
-    feclearexcept;
-    fedisableexcept;
-    feenableexcept;
-    fegetenv;
-    fegetexcept;
-    fegetexceptflag;
-    fegetround;
-    feholdexcept;
-    feraiseexcept;
-    fesetenv;
-    fesetexceptflag;
-    fesetround;
-    fetestexcept;
-    feupdateenv;
+    feclearexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fedisableexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feenableexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetexceptflag; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fegetround; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feholdexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feraiseexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetexceptflag; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fesetround; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    fetestexcept; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    feupdateenv; # introduced-arm=21 introduced-arm64=21 introduced-mips=21 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
     finite;
     finitef;
     floor;
@@ -132,7 +132,7 @@
     floorl;
     fma;
     fmaf;
-    fmal;
+    fmal; # introduced=21
     fmax;
     fmaxf;
     fmaxl;
@@ -141,17 +141,17 @@
     fminl;
     fmod;
     fmodf;
-    fmodl;
+    fmodl; # introduced=21
     frexp;
     frexpf;
-    frexpl;
+    frexpl; # introduced=21
     gamma;
     gamma_r;
     gammaf;
     gammaf_r;
     hypot;
     hypotf;
-    hypotl;
+    hypotl; # introduced=21
     ilogb;
     ilogbf;
     ilogbl;
@@ -167,77 +167,77 @@
     lgamma_r;
     lgammaf;
     lgammaf_r;
-    lgammal;
-    lgammal_r;
+    lgammal; # introduced=21
+    lgammal_r; # introduced=23
     llrint;
     llrintf;
-    llrintl;
+    llrintl; # introduced=21
     llround;
     llroundf;
     llroundl;
     log;
     log10;
     log10f;
-    log10l;
+    log10l; # introduced=21
     log1p;
     log1pf;
-    log1pl;
-    log2;
-    log2f;
-    log2l;
+    log1pl; # introduced=21
+    log2; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    log2f; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    log2l; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     logb;
     logbf;
-    logbl;
+    logbl; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     logf;
-    logl;
+    logl; # introduced=21
     lrint;
     lrintf;
-    lrintl;
+    lrintl; # introduced=21
     lround;
     lroundf;
     lroundl;
     modf;
     modff;
-    modfl;
-    nan;
-    nanf;
-    nanl;
+    modfl; # introduced=21
+    nan; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    nanf; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    nanl; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=13 introduced-x86_64=21
     nearbyint;
     nearbyintf;
-    nearbyintl;
+    nearbyintl; # introduced=21
     nextafter;
     nextafterf;
-    nextafterl;
-    nexttoward;
+    nextafterl; # introduced=21
+    nexttoward; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     nexttowardf;
-    nexttowardl;
+    nexttowardl; # introduced-arm=18 introduced-arm64=21 introduced-mips=18 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     pow;
     powf;
-    powl;
+    powl; # introduced=21
     remainder;
     remainderf;
-    remainderl;
+    remainderl; # introduced=21
     remquo;
     remquof;
-    remquol;
+    remquol; # introduced=21
     rint;
     rintf;
-    rintl;
+    rintl; # introduced=21
     round;
     roundf;
     roundl;
     scalb;
     scalbf;
-    scalbln;
-    scalblnf;
-    scalblnl;
+    scalbln; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    scalblnf; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
+    scalblnl; # introduced-arm=9 introduced-arm64=21 introduced-mips=9 introduced-mips64=21 introduced-x86=18 introduced-x86_64=21
     scalbn;
     scalbnf;
     scalbnl;
-    signgam;
+    signgam; # var
     significand;
     significandf;
-    significandl;
+    significandl; # introduced=21
     sin;
     sincos;
     sincosf;
@@ -245,20 +245,20 @@
     sinf;
     sinh;
     sinhf;
-    sinhl;
-    sinl;
+    sinhl; # introduced=21
+    sinl; # introduced=21
     sqrt;
     sqrtf;
-    sqrtl;
+    sqrtl; # introduced=21
     tan;
     tanf;
     tanh;
     tanhf;
-    tanhl;
-    tanl;
+    tanhl; # introduced=21
+    tanl; # introduced=21
     tgamma;
-    tgammaf;
-    tgammal;
+    tgammaf; # introduced-arm=13 introduced-arm64=21 introduced-mips=13 introduced-mips64=21 introduced-x86=9 introduced-x86_64=21
+    tgammal; # introduced=21
     trunc;
     truncf;
     truncl;
diff --git a/linker/linker_utils.cpp b/linker/linker_utils.cpp
index e7447e4..05ac687 100644
--- a/linker/linker_utils.cpp
+++ b/linker/linker_utils.cpp
@@ -164,6 +164,11 @@
                    std::vector<std::string>* resolved_paths) {
   resolved_paths->clear();
   for (const auto& path : paths) {
+    // skip empty paths
+    if (path.empty()) {
+      continue;
+    }
+
     char resolved_path[PATH_MAX];
     const char* original_path = path.c_str();
     if (realpath(original_path, resolved_path) != nullptr) {
diff --git a/tests/math_data_test.h b/tests/math_data_test.h
index 0aba701..42dc42c 100644
--- a/tests/math_data_test.h
+++ b/tests/math_data_test.h
@@ -16,6 +16,7 @@
 
 #include <gtest/gtest.h>
 
+#include <math.h>
 #include <fenv.h>
 
 template <typename RT, typename T1>
@@ -102,7 +103,28 @@
   uint64_t sign_magnitude;
 };
 
-// TODO: long double.
+template <> union fp_u<long double> {
+  long double value;
+#if defined(__LP64__)
+  struct {
+    unsigned fracl;
+    unsigned fraclm;
+    unsigned frachm;
+    unsigned frach:16;
+    unsigned exp:15;
+    unsigned sign:1;
+  } bits;
+  __int128_t sign_magnitude;
+#else
+  struct {
+      unsigned fracl;
+      unsigned frach:20;
+      unsigned exp:11;
+      unsigned sign:1;
+  } bits;
+  uint64_t sign_magnitude;
+#endif
+};
 
 template <typename T>
 static inline auto SignAndMagnitudeToBiased(const T& value) -> decltype(fp_u<T>::sign_magnitude) {
@@ -134,14 +156,8 @@
       return ::testing::AssertionSuccess();
     }
 
-    // Output the actual and expected values as hex floating point.
-    char expected_str[64];
-    char actual_str[64];
-    snprintf(expected_str, sizeof(expected_str), "%a", expected);
-    snprintf(actual_str, sizeof(actual_str), "%a", actual);
-
     return ::testing::AssertionFailure()
-        << "expected (" << expected_str << ") != actual (" << actual_str << ")";
+        << "expected (" << std::hexfloat << expected << ") != actual (" << actual << ")";
   }
 };
 
@@ -282,4 +298,3 @@
                         data[i].expected, f(data[i].input1, data[i].input2, data[i].input3)) << "Failed on element " << i;
   }
 }
-
diff --git a/tests/stdio_test.cpp b/tests/stdio_test.cpp
index ecba4ad..79c5e92 100644
--- a/tests/stdio_test.cpp
+++ b/tests/stdio_test.cpp
@@ -402,51 +402,135 @@
 }
 
 template <typename T>
-void CheckInfNan(int snprintf_fn(T*, size_t, const T*, ...),
-                 const T* fmt, const T* fmt_plus,
-                 const T* minus_inf, const T* inf_, const T* plus_inf,
-                 const T* minus_nan, const T* nan_, const T* plus_nan) {
+static void CheckInfNan(int snprintf_fn(T*, size_t, const T*, ...),
+                        int sscanf_fn(const T*, const T*, ...),
+                        const T* fmt_string, const T* fmt, const T* fmt_plus,
+                        const T* minus_inf, const T* inf_, const T* plus_inf,
+                        const T* minus_nan, const T* nan_, const T* plus_nan) {
   T buf[BUFSIZ];
+  float f;
 
-  snprintf_fn(buf, sizeof(buf), fmt, nan(""));
+  // NaN.
+
+  snprintf_fn(buf, sizeof(buf), fmt, nanf(""));
   EXPECT_STREQ(nan_, buf) << fmt;
-  snprintf_fn(buf, sizeof(buf), fmt, -nan(""));
+  EXPECT_EQ(1, sscanf_fn(buf, fmt, &f));
+  EXPECT_TRUE(isnan(f));
+
+  snprintf_fn(buf, sizeof(buf), fmt, -nanf(""));
   EXPECT_STREQ(minus_nan, buf) << fmt;
-  snprintf_fn(buf, sizeof(buf), fmt_plus, nan(""));
+  EXPECT_EQ(1, sscanf_fn(buf, fmt, &f));
+  EXPECT_TRUE(isnan(f));
+
+  snprintf_fn(buf, sizeof(buf), fmt_plus, nanf(""));
   EXPECT_STREQ(plus_nan, buf) << fmt_plus;
-  snprintf_fn(buf, sizeof(buf), fmt_plus, -nan(""));
+  EXPECT_EQ(1, sscanf_fn(buf, fmt, &f));
+  EXPECT_TRUE(isnan(f));
+
+  snprintf_fn(buf, sizeof(buf), fmt_plus, -nanf(""));
   EXPECT_STREQ(minus_nan, buf) << fmt_plus;
+  EXPECT_EQ(1, sscanf_fn(buf, fmt, &f));
+  EXPECT_TRUE(isnan(f));
 
-  snprintf_fn(buf, sizeof(buf), fmt, HUGE_VAL);
+  // Inf.
+
+  snprintf_fn(buf, sizeof(buf), fmt, HUGE_VALF);
   EXPECT_STREQ(inf_, buf) << fmt;
-  snprintf_fn(buf, sizeof(buf), fmt, -HUGE_VAL);
+  EXPECT_EQ(1, sscanf_fn(buf, fmt, &f));
+  EXPECT_EQ(HUGE_VALF, f);
+
+  snprintf_fn(buf, sizeof(buf), fmt, -HUGE_VALF);
   EXPECT_STREQ(minus_inf, buf) << fmt;
-  snprintf_fn(buf, sizeof(buf), fmt_plus, HUGE_VAL);
+  EXPECT_EQ(1, sscanf_fn(buf, fmt, &f));
+  EXPECT_EQ(-HUGE_VALF, f);
+
+  snprintf_fn(buf, sizeof(buf), fmt_plus, HUGE_VALF);
   EXPECT_STREQ(plus_inf, buf) << fmt_plus;
-  snprintf_fn(buf, sizeof(buf), fmt_plus, -HUGE_VAL);
+  EXPECT_EQ(1, sscanf_fn(buf, fmt, &f));
+  EXPECT_EQ(HUGE_VALF, f);
+
+  snprintf_fn(buf, sizeof(buf), fmt_plus, -HUGE_VALF);
   EXPECT_STREQ(minus_inf, buf) << fmt_plus;
+  EXPECT_EQ(1, sscanf_fn(buf, fmt, &f));
+  EXPECT_EQ(-HUGE_VALF, f);
+
+  // Check case-insensitivity.
+  snprintf_fn(buf, sizeof(buf), fmt_string, "[InFiNiTy]");
+  EXPECT_EQ(1, sscanf_fn(buf, fmt, &f)) << buf;
+  EXPECT_EQ(HUGE_VALF, f);
+  snprintf_fn(buf, sizeof(buf), fmt_string, "[NaN]");
+  EXPECT_EQ(1, sscanf_fn(buf, fmt, &f)) << buf;
+  EXPECT_TRUE(isnan(f));
 }
 
-TEST(STDIO_TEST, snprintf_inf_nan) {
-  CheckInfNan(snprintf, "%a", "%+a", "-inf", "inf", "+inf", "-nan", "nan", "+nan");
-  CheckInfNan(snprintf, "%A", "%+A", "-INF", "INF", "+INF", "-NAN", "NAN", "+NAN");
-  CheckInfNan(snprintf, "%e", "%+e", "-inf", "inf", "+inf", "-nan", "nan", "+nan");
-  CheckInfNan(snprintf, "%E", "%+E", "-INF", "INF", "+INF", "-NAN", "NAN", "+NAN");
-  CheckInfNan(snprintf, "%f", "%+f", "-inf", "inf", "+inf", "-nan", "nan", "+nan");
-  CheckInfNan(snprintf, "%F", "%+F", "-INF", "INF", "+INF", "-NAN", "NAN", "+NAN");
-  CheckInfNan(snprintf, "%g", "%+g", "-inf", "inf", "+inf", "-nan", "nan", "+nan");
-  CheckInfNan(snprintf, "%G", "%+G", "-INF", "INF", "+INF", "-NAN", "NAN", "+NAN");
+TEST(STDIO_TEST, snprintf_sscanf_inf_nan) {
+  CheckInfNan(snprintf, sscanf, "%s",
+              "[%a]", "[%+a]",
+              "[-inf]", "[inf]", "[+inf]",
+              "[-nan]", "[nan]", "[+nan]");
+  CheckInfNan(snprintf, sscanf, "%s",
+              "[%A]", "[%+A]",
+              "[-INF]", "[INF]", "[+INF]",
+              "[-NAN]", "[NAN]", "[+NAN]");
+  CheckInfNan(snprintf, sscanf, "%s",
+              "[%e]", "[%+e]",
+              "[-inf]", "[inf]", "[+inf]",
+              "[-nan]", "[nan]", "[+nan]");
+  CheckInfNan(snprintf, sscanf, "%s",
+              "[%E]", "[%+E]",
+              "[-INF]", "[INF]", "[+INF]",
+              "[-NAN]", "[NAN]", "[+NAN]");
+  CheckInfNan(snprintf, sscanf, "%s",
+              "[%f]", "[%+f]",
+              "[-inf]", "[inf]", "[+inf]",
+              "[-nan]", "[nan]", "[+nan]");
+  CheckInfNan(snprintf, sscanf, "%s",
+              "[%F]", "[%+F]",
+              "[-INF]", "[INF]", "[+INF]",
+              "[-NAN]", "[NAN]", "[+NAN]");
+  CheckInfNan(snprintf, sscanf, "%s",
+              "[%g]", "[%+g]",
+              "[-inf]", "[inf]", "[+inf]",
+              "[-nan]", "[nan]", "[+nan]");
+  CheckInfNan(snprintf, sscanf, "%s",
+              "[%G]", "[%+G]",
+              "[-INF]", "[INF]", "[+INF]",
+              "[-NAN]", "[NAN]", "[+NAN]");
 }
 
-TEST(STDIO_TEST, wsprintf_inf_nan) {
-  CheckInfNan(swprintf, L"%a", L"%+a", L"-inf", L"inf", L"+inf", L"-nan", L"nan", L"+nan");
-  CheckInfNan(swprintf, L"%A", L"%+A", L"-INF", L"INF", L"+INF", L"-NAN", L"NAN", L"+NAN");
-  CheckInfNan(swprintf, L"%e", L"%+e", L"-inf", L"inf", L"+inf", L"-nan", L"nan", L"+nan");
-  CheckInfNan(swprintf, L"%E", L"%+E", L"-INF", L"INF", L"+INF", L"-NAN", L"NAN", L"+NAN");
-  CheckInfNan(swprintf, L"%f", L"%+f", L"-inf", L"inf", L"+inf", L"-nan", L"nan", L"+nan");
-  CheckInfNan(swprintf, L"%F", L"%+F", L"-INF", L"INF", L"+INF", L"-NAN", L"NAN", L"+NAN");
-  CheckInfNan(swprintf, L"%g", L"%+g", L"-inf", L"inf", L"+inf", L"-nan", L"nan", L"+nan");
-  CheckInfNan(swprintf, L"%G", L"%+G", L"-INF", L"INF", L"+INF", L"-NAN", L"NAN", L"+NAN");
+TEST(STDIO_TEST, swprintf_swscanf_inf_nan) {
+  CheckInfNan(swprintf, swscanf, L"%s",
+              L"[%a]", L"[%+a]",
+              L"[-inf]", L"[inf]", L"[+inf]",
+              L"[-nan]", L"[nan]", L"[+nan]");
+  CheckInfNan(swprintf, swscanf, L"%s",
+              L"[%A]", L"[%+A]",
+              L"[-INF]", L"[INF]", L"[+INF]",
+              L"[-NAN]", L"[NAN]", L"[+NAN]");
+  CheckInfNan(swprintf, swscanf, L"%s",
+              L"[%e]", L"[%+e]",
+              L"[-inf]", L"[inf]", L"[+inf]",
+              L"[-nan]", L"[nan]", L"[+nan]");
+  CheckInfNan(swprintf, swscanf, L"%s",
+              L"[%E]", L"[%+E]",
+              L"[-INF]", L"[INF]", L"[+INF]",
+              L"[-NAN]", L"[NAN]", L"[+NAN]");
+  CheckInfNan(swprintf, swscanf, L"%s",
+              L"[%f]", L"[%+f]",
+              L"[-inf]", L"[inf]", L"[+inf]",
+              L"[-nan]", L"[nan]", L"[+nan]");
+  CheckInfNan(swprintf, swscanf, L"%s",
+              L"[%F]", L"[%+F]",
+              L"[-INF]", L"[INF]", L"[+INF]",
+              L"[-NAN]", L"[NAN]", L"[+NAN]");
+  CheckInfNan(swprintf, swscanf, L"%s",
+              L"[%g]", L"[%+g]",
+              L"[-inf]", L"[inf]", L"[+inf]",
+              L"[-nan]", L"[nan]", L"[+nan]");
+  CheckInfNan(swprintf, swscanf, L"%s",
+              L"[%G]", L"[%+G]",
+              L"[-INF]", L"[INF]", L"[+INF]",
+              L"[-NAN]", L"[NAN]", L"[+NAN]");
 }
 
 TEST(STDIO_TEST, snprintf_d_INT_MAX) {
@@ -646,15 +730,34 @@
   fclose(fp);
 }
 
-TEST(STDIO_TEST, sscanf) {
-  char s1[123];
-  int i1;
-  double d1;
-  char s2[123];
-  ASSERT_EQ(3, sscanf("  hello 123 1.23 ", "%s %i %lf %s", s1, &i1, &d1, s2));
-  ASSERT_STREQ("hello", s1);
-  ASSERT_EQ(123, i1);
-  ASSERT_DOUBLE_EQ(1.23, d1);
+TEST(STDIO_TEST, sscanf_swscanf) {
+  struct stuff {
+    char s1[123];
+    int i1;
+    double d1;
+    float f1;
+    char s2[123];
+
+    void Check() {
+      ASSERT_STREQ("hello", s1);
+      ASSERT_EQ(123, i1);
+      ASSERT_DOUBLE_EQ(1.23, d1);
+      ASSERT_FLOAT_EQ(9.0f, f1);
+      ASSERT_STREQ("world", s2);
+    }
+  } s;
+
+  memset(&s, 0, sizeof(s));
+  ASSERT_EQ(5, sscanf("  hello 123 1.23 0x1.2p3 world",
+                      "%s %i %lf %f %s",
+                      s.s1, &s.i1, &s.d1, &s.f1, s.s2));
+  s.Check();
+
+  memset(&s, 0, sizeof(s));
+  ASSERT_EQ(5, swscanf(L"  hello 123 1.23 0x1.2p3 world",
+                       L"%s %i %lf %f %s",
+                       s.s1, &s.i1, &s.d1, &s.f1, s.s2));
+  s.Check();
 }
 
 TEST(STDIO_TEST, cantwrite_EBADF) {
diff --git a/tests/stdlib_test.cpp b/tests/stdlib_test.cpp
index 773230f..5b9442f 100644
--- a/tests/stdlib_test.cpp
+++ b/tests/stdlib_test.cpp
@@ -17,16 +17,18 @@
 #include <gtest/gtest.h>
 
 #include "BionicDeathTest.h"
+#include "math_data_test.h"
 #include "TemporaryFile.h"
 #include "utils.h"
 
 #include <errno.h>
+#include <fcntl.h>
 #include <libgen.h>
 #include <limits.h>
+#include <math.h>
 #include <pthread.h>
 #include <stdint.h>
 #include <stdlib.h>
-#include <fcntl.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 
@@ -288,16 +290,65 @@
   ASSERT_DOUBLE_EQ(1.23, atof("1.23"));
 }
 
+template <typename T>
+static void CheckStrToFloat(T fn(const char* s, char** end)) {
+  FpUlpEq<0, T> pred;
+
+  EXPECT_PRED_FORMAT2(pred, 9.0, fn("9.0", nullptr));
+  EXPECT_PRED_FORMAT2(pred, 9.0, fn("0.9e1", nullptr));
+  EXPECT_PRED_FORMAT2(pred, 9.0, fn("0x1.2p3", nullptr));
+
+  EXPECT_TRUE(isnan(fn("+nan", nullptr)));
+  EXPECT_TRUE(isnan(fn("nan", nullptr)));
+  EXPECT_TRUE(isnan(fn("-nan", nullptr)));
+
+  EXPECT_TRUE(isnan(fn("+nan(0xff)", nullptr)));
+  EXPECT_TRUE(isnan(fn("nan(0xff)", nullptr)));
+  EXPECT_TRUE(isnan(fn("-nan(0xff)", nullptr)));
+
+  char* p;
+  EXPECT_TRUE(isnan(fn("+nanny", &p)));
+  EXPECT_STREQ("ny", p);
+  EXPECT_TRUE(isnan(fn("nanny", &p)));
+  EXPECT_STREQ("ny", p);
+  EXPECT_TRUE(isnan(fn("-nanny", &p)));
+  EXPECT_STREQ("ny", p);
+
+  EXPECT_EQ(0, fn("muppet", &p));
+  EXPECT_STREQ("muppet", p);
+  EXPECT_EQ(0, fn("  muppet", &p));
+  EXPECT_STREQ("  muppet", p);
+
+  EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("+inf", nullptr));
+  EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("inf", nullptr));
+  EXPECT_EQ(-std::numeric_limits<T>::infinity(), fn("-inf", nullptr));
+
+  EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("+infinity", nullptr));
+  EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("infinity", nullptr));
+  EXPECT_EQ(-std::numeric_limits<T>::infinity(), fn("-infinity", nullptr));
+
+  EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("+infinitude", &p));
+  EXPECT_STREQ("initude", p);
+  EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("infinitude", &p));
+  EXPECT_STREQ("initude", p);
+  EXPECT_EQ(-std::numeric_limits<T>::infinity(), fn("-infinitude", &p));
+  EXPECT_STREQ("initude", p);
+
+  // Check case-insensitivity.
+  EXPECT_EQ(std::numeric_limits<T>::infinity(), fn("InFiNiTy", nullptr));
+  EXPECT_TRUE(isnan(fn("NaN", nullptr)));
+}
+
 TEST(stdlib, strtod) {
-  ASSERT_DOUBLE_EQ(1.23, strtod("1.23", NULL));
+  CheckStrToFloat(strtod);
 }
 
 TEST(stdlib, strtof) {
-  ASSERT_FLOAT_EQ(1.23, strtof("1.23", NULL));
+  CheckStrToFloat(strtof);
 }
 
 TEST(stdlib, strtold) {
-  ASSERT_DOUBLE_EQ(1.23, strtold("1.23", NULL));
+  CheckStrToFloat(strtold);
 }
 
 TEST(stdlib, strtof_2206701) {
diff --git a/tests/time_test.cpp b/tests/time_test.cpp
index 48c299a..2a46d8b 100644
--- a/tests/time_test.cpp
+++ b/tests/time_test.cpp
@@ -124,7 +124,10 @@
 TEST(time, mktime_EOVERFLOW) {
   struct tm t;
   memset(&t, 0, sizeof(tm));
-  t.tm_year = 0;
+
+  // LP32 year range is 1901-2038, so this year is guaranteed not to overflow.
+  t.tm_year = 2016 - 1900;
+
   t.tm_mon = 2;
   t.tm_mday = 10;
 
@@ -132,7 +135,10 @@
   ASSERT_NE(static_cast<time_t>(-1), mktime(&t));
   ASSERT_EQ(0, errno);
 
+  // This will overflow for LP32 or LP64.
   t.tm_year = INT_MAX;
+
+  errno = 0;
   ASSERT_EQ(static_cast<time_t>(-1), mktime(&t));
   ASSERT_EQ(EOVERFLOW, errno);
 }
diff --git a/tests/wchar_test.cpp b/tests/wchar_test.cpp
index 000dc98..db51c08 100644
--- a/tests/wchar_test.cpp
+++ b/tests/wchar_test.cpp
@@ -22,6 +22,8 @@
 #include <stdint.h>
 #include <wchar.h>
 
+#include "math_data_test.h"
+
 #define NUM_WCHARS(num_bytes) ((num_bytes)/sizeof(wchar_t))
 
 TEST(wchar, sizeof_wchar_t) {
@@ -389,14 +391,6 @@
   ASSERT_EQ('\x20', *invalid);
 }
 
-TEST(wchar, wcstod) {
-  ASSERT_DOUBLE_EQ(1.23, wcstod(L"1.23", NULL));
-}
-
-TEST(wchar, wcstof) {
-  ASSERT_FLOAT_EQ(1.23f, wcstof(L"1.23", NULL));
-}
-
 TEST(wchar, wcstol) {
   ASSERT_EQ(123L, wcstol(L"123", NULL, 0));
 }
@@ -405,10 +399,6 @@
   ASSERT_EQ(123LL, wcstol(L"123", NULL, 0));
 }
 
-TEST(wchar, wcstold) {
-  ASSERT_DOUBLE_EQ(1.23L, wcstold(L"1.23", NULL));
-}
-
 TEST(wchar, wcstoul) {
   ASSERT_EQ(123UL, wcstoul(L"123", NULL, 0));
 }
@@ -672,3 +662,64 @@
   wchar_t dst[6];
   ASSERT_EQ(&dst[4], wmempcpy(dst, L"hello", 4));
 }
+
+template <typename T>
+static void CheckWcsToFloat(T fn(const wchar_t* s, wchar_t** end)) {
+  FpUlpEq<0, T> pred;
+
+  EXPECT_PRED_FORMAT2(pred, 9.0, fn(L"9.0", nullptr));
+  EXPECT_PRED_FORMAT2(pred, 9.0, fn(L"0.9e1", nullptr));
+  EXPECT_PRED_FORMAT2(pred, 9.0, fn(L"0x1.2p3", nullptr));
+
+  EXPECT_TRUE(isnan(fn(L"+nan", nullptr)));
+  EXPECT_TRUE(isnan(fn(L"nan", nullptr)));
+  EXPECT_TRUE(isnan(fn(L"-nan", nullptr)));
+
+  EXPECT_TRUE(isnan(fn(L"+nan(0xff)", nullptr)));
+  EXPECT_TRUE(isnan(fn(L"nan(0xff)", nullptr)));
+  EXPECT_TRUE(isnan(fn(L"-nan(0xff)", nullptr)));
+
+  wchar_t* p;
+  EXPECT_TRUE(isnan(fn(L"+nanny", &p)));
+  EXPECT_STREQ(L"ny", p);
+  EXPECT_TRUE(isnan(fn(L"nanny", &p)));
+  EXPECT_STREQ(L"ny", p);
+  EXPECT_TRUE(isnan(fn(L"-nanny", &p)));
+  EXPECT_STREQ(L"ny", p);
+
+  EXPECT_EQ(0, fn(L"muppet", &p));
+  EXPECT_STREQ(L"muppet", p);
+  EXPECT_EQ(0, fn(L"  muppet", &p));
+  EXPECT_STREQ(L"  muppet", p);
+
+  EXPECT_EQ(std::numeric_limits<T>::infinity(), fn(L"+inf", nullptr));
+  EXPECT_EQ(std::numeric_limits<T>::infinity(), fn(L"inf", nullptr));
+  EXPECT_EQ(-std::numeric_limits<T>::infinity(), fn(L"-inf", nullptr));
+
+  EXPECT_EQ(std::numeric_limits<T>::infinity(), fn(L"+infinity", nullptr));
+  EXPECT_EQ(std::numeric_limits<T>::infinity(), fn(L"infinity", nullptr));
+  EXPECT_EQ(-std::numeric_limits<T>::infinity(), fn(L"-infinity", nullptr));
+
+  EXPECT_EQ(std::numeric_limits<T>::infinity(), fn(L"+infinitude", &p));
+  EXPECT_STREQ(L"initude", p);
+  EXPECT_EQ(std::numeric_limits<T>::infinity(), fn(L"infinitude", &p));
+  EXPECT_STREQ(L"initude", p);
+  EXPECT_EQ(-std::numeric_limits<T>::infinity(), fn(L"-infinitude", &p));
+  EXPECT_STREQ(L"initude", p);
+
+  // Check case-insensitivity.
+  EXPECT_EQ(std::numeric_limits<T>::infinity(), fn(L"InFiNiTy", nullptr));
+  EXPECT_TRUE(isnan(fn(L"NaN", nullptr)));
+}
+
+TEST(wchar, wcstod) {
+  CheckWcsToFloat(wcstod);
+}
+
+TEST(wchar, wcstof) {
+  CheckWcsToFloat(wcstof);
+}
+
+TEST(wchar, wcstold) {
+  CheckWcsToFloat(wcstold);
+}
diff --git a/tools/versioner/src/DeclarationDatabase.cpp b/tools/versioner/src/DeclarationDatabase.cpp
index 88f7b55..02383bb 100644
--- a/tools/versioner/src/DeclarationDatabase.cpp
+++ b/tools/versioner/src/DeclarationDatabase.cpp
@@ -84,6 +84,7 @@
     std::string declaration_name = getDeclName(named_decl);
     bool is_extern = named_decl->getFormalLinkage() == ExternalLinkage;
     bool is_definition = false;
+    bool no_guard = false;
 
     if (auto function_decl = dyn_cast<FunctionDecl>(decl)) {
       declaration_type = DeclarationType::function;
@@ -140,7 +141,9 @@
     // Find and parse __ANDROID_AVAILABILITY_DUMP__ annotations.
     for (const AnnotateAttr* attr : decl->specific_attrs<AnnotateAttr>()) {
       llvm::StringRef annotation = attr->getAnnotation();
-      if (annotation == "introduced_in_future") {
+      if (annotation == "versioner_no_guard") {
+        no_guard = true;
+      } else if (annotation == "introduced_in_future") {
         // Tag the compiled-for arch, since this can vary across archs.
         availability.arch_availability[type.arch].future = true;
       } else {
@@ -200,11 +203,13 @@
       declaration.location = location;
       declaration.is_extern = is_extern;
       declaration.is_definition = is_definition;
+      declaration.no_guard = no_guard;
       declaration.availability.insert(std::make_pair(type, availability));
       symbol_it->second.declarations.insert(std::make_pair(location, declaration));
     } else {
       if (declaration_it->second.is_extern != is_extern ||
-          declaration_it->second.is_definition != is_definition) {
+          declaration_it->second.is_definition != is_definition ||
+          declaration_it->second.no_guard != no_guard) {
         errx(1, "varying declaration of '%s' at %s:%u:%u", declaration_name.c_str(),
              location.filename.c_str(), location.start.line, location.start.column);
       }
diff --git a/tools/versioner/src/DeclarationDatabase.h b/tools/versioner/src/DeclarationDatabase.h
index b130ca9..8f43d79 100644
--- a/tools/versioner/src/DeclarationDatabase.h
+++ b/tools/versioner/src/DeclarationDatabase.h
@@ -148,6 +148,7 @@
 
   bool is_extern;
   bool is_definition;
+  bool no_guard;
   std::map<CompilationType, DeclarationAvailability> availability;
 
   bool calculateAvailability(DeclarationAvailability* output) const;
@@ -161,6 +162,9 @@
 
     fprintf(out, "%s ", is_extern ? "extern" : "static");
     fprintf(out, "%s ", is_definition ? "definition" : "declaration");
+    if (no_guard) {
+      fprintf(out, "no_guard ");
+    }
     fprintf(out, "@ %s:%u:%u", StripPrefix(location.filename, base_path).str().c_str(),
             location.start.line, location.start.column);
 
diff --git a/tools/versioner/src/Preprocessor.cpp b/tools/versioner/src/Preprocessor.cpp
index 8d0b943..3c86486 100644
--- a/tools/versioner/src/Preprocessor.cpp
+++ b/tools/versioner/src/Preprocessor.cpp
@@ -452,6 +452,11 @@
       const Location& location = decl_it.first;
       const Declaration& decl = decl_it.second;
 
+      if (decl.no_guard) {
+        // No guard required.
+        continue;
+      }
+
       DeclarationAvailability macro_guard = calculateRequiredGuard(decl);
       if (!macro_guard.empty()) {
         guards[location.filename][location] = macro_guard;
diff --git a/tools/versioner/tests/preprocessor_no_guard/expected/foo.h b/tools/versioner/tests/preprocessor_no_guard/expected/foo.h
new file mode 100644
index 0000000..2bf1dbf
--- /dev/null
+++ b/tools/versioner/tests/preprocessor_no_guard/expected/foo.h
@@ -0,0 +1 @@
+int foo() __VERSIONER_NO_GUARD __INTRODUCED_IN(14);
diff --git a/tools/versioner/tests/preprocessor_no_guard/headers/foo.h b/tools/versioner/tests/preprocessor_no_guard/headers/foo.h
new file mode 100644
index 0000000..2bf1dbf
--- /dev/null
+++ b/tools/versioner/tests/preprocessor_no_guard/headers/foo.h
@@ -0,0 +1 @@
+int foo() __VERSIONER_NO_GUARD __INTRODUCED_IN(14);
diff --git a/tools/versioner/tests/preprocessor_no_guard/run.sh b/tools/versioner/tests/preprocessor_no_guard/run.sh
new file mode 100644
index 0000000..1b0aae2
--- /dev/null
+++ b/tools/versioner/tests/preprocessor_no_guard/run.sh
@@ -0,0 +1,4 @@
+rm -rf out
+set -e
+versioner headers -i -o out
+diff -q -w -B out expected