Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2016-08-23 18:49:24 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-08-23 18:51:14 +0300
commit463a8afaa58b80926b0236e14a6171f45c1b784f (patch)
tree6ef3bc150434889e49388b8520ed4ed95095b7cc /winsup/cygwin
parent80e0ad1e77a9365b85ffda62aa1471e5c8768743 (diff)
Implement missing POSIX-1.2008 function strerror_l
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/common.din1
-rw-r--r--winsup/cygwin/errno.cc7
2 files changed, 8 insertions, 0 deletions
diff --git a/winsup/cygwin/common.din b/winsup/cygwin/common.din
index 8f7a282f4..7fce58719 100644
--- a/winsup/cygwin/common.din
+++ b/winsup/cygwin/common.din
@@ -1345,6 +1345,7 @@ strcpy NOSIGFE
strcspn NOSIGFE
strdup SIGFE
strerror SIGFE
+strerror_l SIGFE
strerror_r SIGFE
strfmon SIGFE
strfmon_l SIGFE
diff --git a/winsup/cygwin/errno.cc b/winsup/cygwin/errno.cc
index 7e07a6178..9168e9b4d 100644
--- a/winsup/cygwin/errno.cc
+++ b/winsup/cygwin/errno.cc
@@ -403,6 +403,13 @@ strerror (int errnum)
return result;
}
+extern "C" char *
+strerror_l (int errnum, locale_t locale)
+{
+ /* We don't provide localized system error messages (yet?). */
+ return strerror (errnum);
+}
+
/* Newlib's <string.h> provides declarations for two strerror_r
variants, according to preprocessor feature macros. However, it
returns "" instead of "Unknown error ...", so we override both