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
path: root/newlib
diff options
context:
space:
mode:
Diffstat (limited to 'newlib')
-rw-r--r--newlib/libc/locale/newlocale.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/newlib/libc/locale/newlocale.c b/newlib/libc/locale/newlocale.c
index 08f29dbcc..278f78ed2 100644
--- a/newlib/libc/locale/newlocale.c
+++ b/newlib/libc/locale/newlocale.c
@@ -171,7 +171,10 @@ _newlocale_r (struct _reent *p, int category_mask, const char *locale,
continue;
/* Otherwise load locale data. */
else if (!__loadlocale (&tmp_locale, i, new_categories[i]))
- goto error;
+ {
+ p->_errno = ENOENT;
+ goto error;
+ }
}
}
/* Allocate new locale_t. */