aboutsummaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
Diffstat (limited to 'locale')
-rw-r--r--locale/Makefile2
-rw-r--r--locale/lc-collate.c22
-rw-r--r--locale/loadlocale.c7
3 files changed, 29 insertions, 2 deletions
diff --git a/locale/Makefile b/locale/Makefile
index ec80014..87a6706 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -24,7 +24,7 @@ subdir := locale
headers := locale.h
distribute := localeinfo.h categories.def
routines := setlocale loadlocale localeconv
-categories := ctype messages monetary numeric time # collate
+categories := ctype messages monetary numeric time collate
aux = $(categories:%=lc-%) $(categories:%=C-%)
include ../Rules
diff --git a/locale/lc-collate.c b/locale/lc-collate.c
new file mode 100644
index 0000000..8684f23
--- /dev/null
+++ b/locale/lc-collate.c
@@ -0,0 +1,22 @@
+/* Define current locale data for LC_COLLATE category.
+Copyright (C) 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include "localeinfo.h"
+
+_NL_CURRENT_DEFINE (LC_COLLATE);
diff --git a/locale/loadlocale.c b/locale/loadlocale.c
index f3e8e4a..bc9102b 100644
--- a/locale/loadlocale.c
+++ b/locale/loadlocale.c
@@ -106,8 +106,13 @@ _nl_load_locale (int category, char **name)
/* Some systems do not have this flag; it is superfluous. */
#define MAP_FILE 0
#endif
+#ifndef MAP_INHERIT
+ /* Some systems might lack this; they lose. */
+#define MAP_INHERIT 0
+#endif
filedata = (void *) __mmap ((caddr_t) 0, st.st_size,
- PROT_READ, MAP_FILE|MAP_COPY, fd, 0);
+ PROT_READ, MAP_FILE|MAP_COPY|MAP_INHERIT,
+ fd, 0);
if (filedata == (void *) -1)
{
if (errno == ENOSYS)