92426585d7
Copy from Base:System/bash based on submit request 18772 from user coolo OBS-URL: https://build.opensuse.org/request/show/18772 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bash?expand=0&rev=43
32 lines
833 B
Diff
32 lines
833 B
Diff
Index: locale.c
|
|
===================================================================
|
|
--- locale.c.orig
|
|
+++ locale.c
|
|
@@ -29,6 +29,10 @@
|
|
#include "bashintl.h"
|
|
#include "bashansi.h"
|
|
#include <stdio.h>
|
|
+#include <sys/types.h>
|
|
+#include <sys/stat.h>
|
|
+#include <unistd.h>
|
|
+#include <errno.h>
|
|
#include "chartypes.h"
|
|
#include <errno.h>
|
|
|
|
@@ -68,6 +72,15 @@ void
|
|
set_default_locale ()
|
|
{
|
|
#if defined (HAVE_SETLOCALE)
|
|
+ struct stat st;
|
|
+
|
|
+ if (stat("/usr/lib/locale/locale-archive", &st) == 0 && st.st_size == 0) {
|
|
+ errno = EINVAL;
|
|
+ sys_error("set_default_locale: broken locale");
|
|
+ fprintf (stderr, "%s: Please remove /usr/lib/locale/locale-archive\n",
|
|
+ get_name_for_error());
|
|
+ sleep(1);
|
|
+ }
|
|
default_locale = setlocale (LC_ALL, "");
|
|
if (default_locale)
|
|
default_locale = savestring (default_locale);
|