Add strerrordesc_np() and strerrorname_np().

strerrordesc_np() isn't very useful (being just another name for
strerror()), but strerrorname_np() lets you get "ENOSYS" for ENOSYS,
which will make some of our test assertion messages clearer when we
switch over from strerror().

This also adds `%#m` formatting to all the relevant functions.

Test: treehugger
Change-Id: Icfe07a39a307d591c3f4f2a09d008dc021643062
diff --git a/libc/include/string.h b/libc/include/string.h
index e7fd9a5..89b2a45 100644
--- a/libc/include/string.h
+++ b/libc/include/string.h
@@ -116,6 +116,33 @@
 int strerror_r(int __errno_value, char* _Nonnull __buf, size_t __n);
 #endif
 
+/**
+ * [strerrorname_np(3)](http://man7.org/linux/man-pages/man3/strerrordesc_np.3.html)
+ * returns the name of the errno constant corresponding to its argument.
+ * `strerrorname_np(38)` would return "ENOSYS", because `ENOSYS` is errno 38. This
+ * is mostly useful for error reporting in cases where a string like "ENOSYS" is
+ * more readable than a string like "Function not implemented", which would be
+ * returned by strerror().
+ *
+ * Returns a pointer to a string, or null for unknown errno values.
+ *
+ * Available since API level 35.
+ */
+#if defined(__USE_GNU)
+const char* _Nullable strerrorname_np(int __errno_value) __INTRODUCED_IN(35);
+#endif
+
+/**
+ * [strerrordesc_np(3)](http://man7.org/linux/man-pages/man3/strerrordesc_np.3.html)
+ * is like strerror() but without localization. Since Android's strerror()
+ * does not localize, this is the same as strerror() on Android.
+ *
+ * Returns a pointer to a string.
+ */
+#if defined(__USE_GNU)
+const char* _Nonnull strerrordesc_np(int __errno_value) __RENAME(strerror);
+#endif
+
 size_t strnlen(const char* _Nonnull __s, size_t __n) __attribute_pure__;
 char* _Nonnull strncat(char* _Nonnull __dst, const char* _Nonnull __src, size_t __n);
 char* _Nullable strndup(const char* _Nonnull __s, size_t __n);