Commit graph

139 commits

Author SHA1 Message Date
Gabor Kovesdan 3d945c9d67 - Add Brazilian Portuguese catalog [1]
- Fixes for German catalog [2]

PR:		kern/132694 [1], conf/80504 [2]
Submitted by:	Murilo Opsfelder <mopsfelder@gmail.com> [1],
		brueffer [2]
2009-03-16 16:33:08 +00:00
Gabor Kovesdan 8a6a076cb4 - Create the buildworld object directories with mtree instead of various
mkdir calls
- Remove the ugly workaroung from libc NLS, which was to create some of
  these directories
2009-03-15 13:14:06 +00:00
Gabor Kovesdan 49a33c0b43 - Fix object directory creation when running threaded buildworld 2009-03-13 22:41:30 +00:00
Gabor Kovesdan fe73c506a4 - Reenable Native Language Support in libc. This feature was disabled due
to possible breakages in the catalog handling code.  Since then, that
  code has been replaced by the secure code from NetBSD but NLS in libc
  remained turned off.  Tests have shown that the feature is stable and
  working so we can now turn it on again.

- Add several new catalog files:
  - ca_ES.ISO8859-1
  - de_DE.ISO8859-1
  - el_GR.ISO8859-7  (by manolis@ and keramida@)
  - es_ES.ISO8859-1  (kern/123179, by carvay@)
  - fi_FI.ISO8859-1
  - fr_FR.ISO8859-1  (kern/78756, by thierry@)
  - hu_HU.ISO8859-2  (by gabor@)
  - it_IT.ISO8859-15
  - nl_NL.ISO8859-1  (corrections by rene@)
  - no_NO.ISO8859-1
  - mn_MN.UTF-8      (by ganbold@)
  - sk_SK.ISO8859-2
  - sv_SE.ISO8859-1
  (The catalogs without explicit source has been obtained from NetBSD.)

Approved by:	attilio
2009-03-13 10:40:38 +00:00
Daniel Eischen 5f864214bb Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
Daniel Eischen 6fad3aaf15 Add each directory's symbol map file to SYM_MAPS. 2006-03-13 01:15:01 +00:00
Daniel Eischen cce72e8860 Add symbol maps and initial symbol version definitions to libc.
Reviewed by:	davidxu
2006-03-13 00:53:21 +00:00
Pawel Jakub Dawidek 9975a9a287 Better translation. 2005-07-23 21:30:35 +00:00
Jung-uk Kim a0f887f4f3 Use better Korean translation for `trap'
Requested by:	many Korean users from bsdforum.or.kr
Submitted by:	perky
Approved by:	anholt (mentor)
2005-07-16 05:40:14 +00:00
Ruslan Ermilov f789cb8293 Assorted markup fixes.
Approved by:	re
2005-06-15 19:04:04 +00:00
Alexey Zelkin 85faa37735 Add korean NLS message catalogs for libc
Submitted by:	Hye-Shik Chang <perky@FreeBSD.org>
PR:		misc/78290
2005-03-07 13:57:24 +00:00
Pawel Jakub Dawidek b212dd15ff Add polish version of libc NLS catalog. 2005-03-01 14:38:30 +00:00
Alexey Zelkin 0f331b31cf Backout NLS catalog handling, until all edge cases are resolved 2005-02-27 22:17:47 +00:00
Alexey Zelkin 82be63e1bb Enable processing of NLS catalogs while building/installing of libc 2005-02-27 18:09:52 +00:00
Alexey Zelkin c2e31119ea Add russian version of libc NLS catalog
Translated by:	Valeriy Kravchuk <openxs@ipnet.kiev.ua>
		Alexey Dokuchaev <danfe@nsu.ru>
2005-02-27 18:09:09 +00:00
Alexey Zelkin c51d47437b Add template NLS catalog for strerror(), strerror_r() and strsignal()
localization support
2005-02-27 17:59:39 +00:00
Alexey Zelkin efefbdc6d6 . Bump .Dd's
. Note POSIX 1003.1-2001 conformation
. Add ERRORS section for catgets(3)
. Note what catopen(3) returns EINVAL, if catalog is corrupt
2005-02-27 16:30:16 +00:00
Alexey Zelkin fd5cf7c013 Bring in NetBSD's improvements and cleanups to NLS subsystem, making
it type and endian clean and removing of stdio dependency from NLS
functions (catalog files now are processed via mmap())

Also following changes were done (against NetBSD version):

. If mmap() failed, set errno to EINVAL and do not try to munmap() file

Obtained from:	NetBSD
2005-02-27 16:26:49 +00:00
Alexey Zelkin f24d446afb Cleanup prototypes and remove dead code
MFC After:      3 days
2005-02-01 16:04:55 +00:00
Tim J. Robbins 4539e95a0f Remove incomplete support for running FreeBSD userland on old NetBSD kernels
lacking the issetugid() and utrace() syscalls.
2003-10-29 10:45:01 +00:00
Jacques Vidrine d05090827f Back out the `hiding' of strlcpy and strlcat. Several people
vocally objected to this safety belt.
2003-05-01 19:03:14 +00:00
Jacques Vidrine 5723e501ab `Hide' strlcpy and strlcat (using the namespace.h / __weak_reference
technique) so that we don't wind up calling into an application's
version if the application defines them.

Inspired by:	qpopper's interfering and buggy version of strlcpy
2003-04-29 21:13:50 +00:00
Ruslan Ermilov c51d717f0c libc_r wasn't so tied to libc for 22 months. 2002-11-18 09:50:57 +00:00
Garrett Wollman 688dfe4533 Do not include <sys/syslimits.h> directly; it is not intended for general
consumption.
2002-10-27 17:44:33 +00:00
Andrey A. Chernov 7e3c1a3cb7 Now, malloc is fixed, remove ENOMEM hardcode 2002-08-12 11:47:19 +00:00
Andrey A. Chernov 315009a483 Set errno to ENOMEM for strdup too (due to malloc errno bug) 2002-08-07 23:52:28 +00:00
Andrey A. Chernov cb9772d882 Always set errno to ENOMEM after malloc failed (as workaround).
Our malloc sometimes forget to set errno, f.e. for size overflow case.
2002-08-07 22:03:46 +00:00
Andrey A. Chernov dfb18183be Close descriptor, if error happens in loadCat() 2002-08-07 07:02:37 +00:00
Andrey A. Chernov 97c54f7797 Try harder to check lang as path component (".", "..", / inside).
Try harder to not overwrite failure errno.
style(9) whitespace reformatting for code readability.
2002-08-04 14:03:59 +00:00
David E. O'Brien 333fc21e3c Fix the style of the SCM ID's.
I believe have made all of libc .c's as consistent as possible.
2002-03-22 21:53:29 +00:00
Ruslan Ermilov 32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
Ruslan Ermilov 8af1452cf8 Removed duplicate VCS ID tags, as per style(9). 2001-08-13 14:06:34 +00:00
Dima Dorfman 7ebcc426ef Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
Ruslan Ermilov 4a558355e5 MAN[1-9] -> MAN. 2001-03-27 17:27:19 +00:00
Alexey Zelkin 331cc8974c Use .Rv macro instead of hardcoded message 2001-02-12 08:42:56 +00:00
Daniel Eischen d201fe46e3 Remove _THREAD_SAFE and make libc thread-safe by default by
adding (weak definitions to) stubs for some of the pthread
functions.  If the threads library is linked in, the real
pthread functions will pulled in.

Use the following convention for system calls wrapped by the
threads library:
	__sys_foo - actual system call
	_foo - weak definition to __sys_foo
	foo - weak definition to __sys_foo

Change all libc uses of system calls wrapped by the threads
library from foo to _foo.  In order to define the prototypes
for _foo(), we introduce namespace.h and un-namespace.h
(suggested by bde).  All files that need to reference these
system calls, should include namespace.h before any standard
includes, then include un-namespace.h after the standard
includes and before any local includes.  <db.h> is an exception
and shouldn't be included in between namespace.h and
un-namespace.h  namespace.h will define foo to _foo, and
un-namespace.h will undefine foo.

Try to eliminate some of the recursive calls to MT-safe
functions in libc/stdio in preparation for adding a mutex
to FILE.  We have recursive mutexes, but would like to avoid
using them if possible.

Remove uneeded includes of <errno.h> from a few files.

Add $FreeBSD$ to a few files in order to pass commitprep.

Approved by:	-arch
2001-01-24 13:01:12 +00:00
Ruslan Ermilov 4263595653 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
Ruslan Ermilov 251c176f41 mdoc(7) police: use certified section headers wherever possible. 2000-11-17 11:44:16 +00:00
Alexey Zelkin e3950d8e0e Fix typo
PR:		misc/21596
Submitted by:	TOGAWA Satoshi <toga@puyo.org>
2000-09-27 18:24:31 +00:00
Andrey A. Chernov 86797bf956 Prevent buffer overflow if NLSPATH is too long 2000-09-08 11:42:37 +00:00
Andrey A. Chernov 60cff0a75c Add .El 2000-09-06 16:52:01 +00:00
Andrey A. Chernov 89817a4122 Document %-macros and NLSPATH better. 2000-09-05 19:14:34 +00:00
Andrey A. Chernov f3ed913592 Fully implement NLSPATH processing as described in SUSv2 2000-09-05 14:04:21 +00:00
Alexey Zelkin 316321ebdf Oops! don't set errno to ENOMEM explicitly if malloc() failed.
Found by:	ache
2000-09-05 12:23:08 +00:00
Alexey Zelkin 7dc5eb443d * move $FreeBSD$ tag to its usual place (bottom of copyright)
* mdoc cleanup
* document missing errno values (ERRORS section)

Reviewed by:	sheldonh
2000-09-04 13:20:56 +00:00
Alexey Zelkin 49b8dd0db5 Finaly cleanup libc/nls code:
* rewrite catopen() to remove duplicate code chunks and optimize
* if empty string is passed to catopen() as name argument then
   catopen() will set errno to ENOENT (File not found), not EINVAL
* move search code to LOOKUP() macro to shrink amount of duplicated code
* move common resource freeing actions to __nls_free_resources() function
* exclude from build code related to MCLoadAll defintion since it is not
  using at all
* style(9) related whitespace changes

Reviewed by:	ache
2000-09-04 12:09:40 +00:00
Andrey A. Chernov 08ba69b8a4 Rewrite using stdio. It cause program speedup since eliminates lots of small
read() syscalls.  It not cause static binary size increasing because stdio
already picked via setlocale() called from catopen()
2000-09-03 21:05:10 +00:00
Andrey A. Chernov 56338d5acb Treat empty lang as "C" lang too 2000-09-01 13:19:18 +00:00
Alexey Zelkin a8a87cc61b Set rcsid to correct value
Resort #include files
Remove SYSV compatibility chunks
2000-09-01 12:19:00 +00:00
Alexey Zelkin 2873532b59 protect .h file contents correctly. 2000-09-01 12:13:33 +00:00
Alexey Zelkin 6b9175e062 Remove unused indirect references to cat* functions. 2000-09-01 12:10:59 +00:00
Alexey Zelkin a367b9700f Fix memory leak introduced by kris in rev 1.22 2000-09-01 11:56:31 +00:00
Andrey A. Chernov 460b926285 setlocale may return NULL, handle this case too by resetting to "C" 2000-09-01 11:13:38 +00:00
Andrey A. Chernov 016de69d9e Move protection code down to handle NL_CAT_LOCALE case too. 2000-09-01 11:09:34 +00:00
Andrey A. Chernov 53d620a5fb Protect from badly formed LANG variable 2000-09-01 10:54:04 +00:00
Andrey A. Chernov b9b68e50dc catgets: detect if fd becomes invalid after exec and return default response
cosmetique, use NULL for pointers comparison
2000-08-30 11:44:44 +00:00
Andrey A. Chernov d8283f6866 Explicetely describe catalog descriptor lifetime 2000-08-30 10:22:23 +00:00
Kris Kennaway 84b578d562 Prevent internal buffer overflow due to expansion of $LANG and/or name
argument in catopen().

Reviewed by:	chris, -audit
2000-08-05 04:56:43 +00:00
Alexey Zelkin 25bb73e063 Introduce ".Lb" macro to libc manpages.
More libraries manpages updates following.
2000-04-21 09:42:15 +00:00
Sheldon Hearn c6ff3a1bf7 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-02 09:14:21 +00:00
Jason Evans 9233c4d942 Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),
just use _foo() <-- foo().  In the case of a libpthread that doesn't do
call conversion (such as linuxthreads and our upcoming libpthread), this
is adequate.  In the case of libc_r, we still need three names, which are
now _thread_sys_foo() <-- _foo() <-- foo().

Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(),
nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo().

Remove all internal libc usage of: creat(), pause(), sleep(), system(),
tcdrain(), wait(), and waitpid().

Make thread cancellation fully POSIX-compliant.

Suggested by:	deischen
2000-01-27 23:07:25 +00:00
Jason Evans 929273386f Add three-tier symbol naming in support of POSIX thread cancellation
points.  For library functions, the pattern is __sleep() <--
_libc_sleep() <-- sleep().  The arrows represent weak aliases.  For
system calls, the pattern is _read() <-- _libc_read() <-- read().
2000-01-12 09:23:48 +00:00
Alexey Zelkin 466d6dc43b Add gencat(1) to SEE ALSO section.
PR:		docs/13658
Submitted by:	Zahemszky Gabor <zgabor@code.hu>
1999-09-22 22:44:42 +00:00
Peter Wemm 7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Andrey A. Chernov dfb1b7aea6 Provide meaningful errno value on error return 1998-07-14 18:27:43 +00:00
Andrey A. Chernov d1793ae420 Add reference to setlocale(3) 1998-04-30 16:11:50 +00:00
Andrey A. Chernov e3b0c2a695 Return -1 for invalid descriptor in catclose 1998-04-30 13:15:31 +00:00
Andrey A. Chernov e97ef24c18 If passed catgets descriptor is NULL or -1, return default string immediately 1998-04-30 12:25:05 +00:00
Andrey A. Chernov 9ad256ad65 Force loadType to 0 1998-04-30 11:39:08 +00:00
Andrey A. Chernov c897062234 Implement NL_CAT_LOCALE
Manpages cleanup
1998-04-30 11:06:12 +00:00
Andrey A. Chernov 1adba262d7 Prototypes/typedefs cleanup
Fix error return codes
1998-04-30 10:14:55 +00:00
John Birrell c61e516832 Add #ifndef __NETBSD_SYSCALLS around calls to issetugid() which
do not exist in NetBSD 1.3.
1998-01-15 09:58:08 +00:00
Bruce Evans 2bc3b4d735 Removed the subdirectory paths from the definitions of MAN[1-9]. They
were a workaround for limitations in bsd.man.mk that were fixed about
2 years ago.
1997-10-15 16:16:41 +00:00
Andrey A. Chernov 94658e740e Plug even more failure memory leaks 1997-05-10 04:40:40 +00:00
Andrey A. Chernov d0673936fd Cleanup
Plug failure memory leaks
Use issetugid now
PR: 3492
1997-05-10 04:28:17 +00:00
John Birrell 870039320f Changed all paths to be relative to src/lib instead of src/lib/libc
so that all these makefiles can be used to build libc_r too.

Added .if ${LIB} == "c" tests to restrict man page builds to libc
to avoid needlessly building them with libc_r too.

Split libc Makefile into Makefile and Makefile.inc to allow the
libc_r Makefile to include Makefile.inc too.
1997-05-03 03:50:06 +00:00
Warner Losh 4545c5b7a4 Restricting $LANG was a really bad idea
Pointed out by: Everybody but Jordan.
1997-03-25 05:36:37 +00:00
Warner Losh 3f2c98c480 Don't honor LANG or NLSPATH if we're setuid/setgid.
Fixes PR 2582

Submitted by:	 Julian Assange
1997-03-24 06:15:07 +00:00
Peter Wemm 7e546392b5 Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
Wolfram Schneider 75141cc987 Sort cross references. 1997-01-20 23:23:22 +00:00
Jordan K. Hubbard 1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Jordan K. Hubbard 51295a4d3e General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
1996-07-12 18:57:58 +00:00
Jordan K. Hubbard a410855f63 Fixed docs/521. 1996-02-09 12:25:08 +00:00
Mike Pritchard a5ed710ccd Fix even more spelling errors in some more man pages. 1996-01-30 16:34:52 +00:00
Poul-Henning Kamp 739398ee03 and so on... 1995-10-22 14:39:22 +00:00
Andrey A. Chernov 0b2c143cff Add /usr/local/share/nls to default search path 1995-06-17 03:02:21 +00:00
Rodney W. Grimes 6c06b4e2aa Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
Andrey A. Chernov b97843726d Fix manpage rule 1995-04-02 19:35:40 +00:00
Jordan K. Hubbard 6eaef61813 Add the nls code for XPG3-style message catalogs to libc.
Obtained from: NetBSD
1995-03-30 12:47:27 +00:00