Expose the portable "strerror_r" used by jniThrowIOException.
Also add one example caller I used to test this, and update the
libnativehelper README file.
diff --git a/include/nativehelper/JNIHelp.h b/include/nativehelper/JNIHelp.h
index 3982797..1e268f8 100644
--- a/include/nativehelper/JNIHelp.h
+++ b/include/nativehelper/JNIHelp.h
@@ -58,6 +58,14 @@
int jniThrowIOException(C_JNIEnv* env, int errnum);
/*
+ * Return a pointer to a locale-dependent error string explaining errno
+ * value 'errnum'. The returned pointer may or may not be equal to 'buf'.
+ * This function is thread-safe (unlike strerror) and portable (unlike
+ * strerror_r).
+ */
+const char* jniStrError(int errnum, char* buf, size_t buflen);
+
+/*
* Create a java.io.FileDescriptor given an integer fd
*/
jobject jniCreateFileDescriptor(C_JNIEnv* env, int fd);