Skip to content

Commit

Permalink
* locale/loadlocale.c (_nl_load_locale): Use MAP_INHERIT flag in
Browse files Browse the repository at this point in the history
 	mmap call.

	* configure.in (os=freebsd*|bsdi*): Set base_os=unix/bsd/bsd4.4
 	for these too.

	* sysdeps/unix/sysv/tcsetattr.c: Use |= instead of = to properly
 	set c_oflag value.

	* Makeconfig [! objpfx] (csu-objpfx): Add trailing slash.

	* locale/Makefile (categories): Uncomment collate.
	* locale/lc-collate.c: New file.
  • Loading branch information
Roland McGrath committed Apr 8, 1995
1 parent 8ab69eb commit 883bc19
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 7 deletions.
14 changes: 14 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
Sat Apr 8 00:40:59 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>

* locale/loadlocale.c (_nl_load_locale): Use MAP_INHERIT flag in
mmap call.

* configure.in (os=freebsd*|bsdi*): Set base_os=unix/bsd/bsd4.4
for these too.

* sysdeps/unix/sysv/tcsetattr.c: Use |= instead of = to properly
set c_oflag value.

* Makeconfig [! objpfx] (csu-objpfx): Add trailing slash.

* locale/Makefile (categories): Uncomment collate.
* locale/lc-collate.c: New file.

* malloc/free.c (__malloc_safe_bcopy, memmove): Don't define
#ifdef emacs.
* malloc/realloc.c: Likewise.
Expand Down
2 changes: 1 addition & 1 deletion Makeconfig
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ endif
ifdef objpfx
csu-objpfx = $(objpfx)
else
csu-objpfx = $(..)csu
csu-objpfx = $(..)csu/
endif

ifndef LD
Expand Down
2 changes: 1 addition & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`"
case "$os" in
gnu*)
base_os=mach/hurd ;;
netbsd* | 386bsd*)
netbsd* | 386bsd* | freebsd* | bsdi*)
base_os=unix/bsd/bsd4.4 ;;
osf* | sunos* | ultrix* | newsos* | dynix* | *bsd*)
base_os=unix/bsd ;;
Expand Down
2 changes: 1 addition & 1 deletion locale/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
22 changes: 22 additions & 0 deletions locale/lc-collate.c
Original file line number Diff line number Diff line change
@@ -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);
7 changes: 6 additions & 1 deletion locale/loadlocale.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,14 @@ _nl_load_locale (int category, char **name)
#ifndef MAP_FILE
/* 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)
Expand Down
6 changes: 3 additions & 3 deletions sysdeps/unix/sysv/tcsetattr.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 1992 Free Software Foundation, Inc.
/* Copyright (C) 1992, 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
Expand Down Expand Up @@ -123,9 +123,9 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p),

buf.c_oflag = 0;
if (termios_p->c_oflag & OPOST)
buf.c_oflag = _SYSV_OPOST;
buf.c_oflag |= _SYSV_OPOST;
if (termios_p->c_oflag & ONLCR)
buf.c_oflag = _SYSV_ONLCR;
buf.c_oflag |= _SYSV_ONLCR;

/* So far, buf.c_cflag contains the speed in CBAUD. */
if (termios_p->c_cflag & CSTOPB)
Expand Down

0 comments on commit 883bc19

Please sign in to comment.