summaryrefslogtreecommitdiff
path: root/lib/libc/nls/msgcat.c
Commit message (Collapse)AuthorAgeFilesLines
* Back out the `hiding' of strlcpy and strlcat. Several peopleJacques Vidrine2003-05-011-1/+1
| | | | | | | vocally objected to this safety belt. Notes: svn path=/head/; revision=114443
* `Hide' strlcpy and strlcat (using the namespace.h / __weak_referenceJacques Vidrine2003-04-291-1/+1
| | | | | | | | | | 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 Notes: svn path=/head/; revision=114256
* Do not include <sys/syslimits.h> directly; it is not intended for generalGarrett Wollman2002-10-271-1/+2
| | | | | | | consumption. Notes: svn path=/head/; revision=106053
* Now, malloc is fixed, remove ENOMEM hardcodeAndrey A. Chernov2002-08-121-12/+11
| | | | Notes: svn path=/head/; revision=101727
* Set errno to ENOMEM for strdup too (due to malloc errno bug)Andrey A. Chernov2002-08-071-3/+4
| | | | Notes: svn path=/head/; revision=101494
* Always set errno to ENOMEM after malloc failed (as workaround).Andrey A. Chernov2002-08-071-8/+8
| | | | | | | Our malloc sometimes forget to set errno, f.e. for size overflow case. Notes: svn path=/head/; revision=101490
* Close descriptor, if error happens in loadCat()Andrey A. Chernov2002-08-071-0/+6
| | | | Notes: svn path=/head/; revision=101450
* Try harder to check lang as path component (".", "..", / inside).Andrey A. Chernov2002-08-041-307/+345
| | | | | | | | Try harder to not overwrite failure errno. style(9) whitespace reformatting for code readability. Notes: svn path=/head/; revision=101316
* Fix the style of the SCM ID's.David E. O'Brien2002-03-221-4/+2
| | | | | | | I believe have made all of libc .c's as consistent as possible. Notes: svn path=/head/; revision=92986
* Removed duplicate VCS ID tags, as per style(9).Ruslan Ermilov2001-08-131-3/+2
| | | | Notes: svn path=/head/; revision=81586
* Remove _THREAD_SAFE and make libc thread-safe by default byDaniel Eischen2001-01-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=71579
* Fix typoAlexey Zelkin2000-09-271-1/+1
| | | | | | | | PR: misc/21596 Submitted by: TOGAWA Satoshi <toga@puyo.org> Notes: svn path=/head/; revision=66412
* Prevent buffer overflow if NLSPATH is too longAndrey A. Chernov2000-09-081-1/+7
| | | | Notes: svn path=/head/; revision=65609
* Fully implement NLSPATH processing as described in SUSv2Andrey A. Chernov2000-09-051-8/+45
| | | | Notes: svn path=/head/; revision=65476
* Oops! don't set errno to ENOMEM explicitly if malloc() failed.Alexey Zelkin2000-09-051-6/+10
| | | | | | | Found by: ache Notes: svn path=/head/; revision=65472
* Finaly cleanup libc/nls code:Alexey Zelkin2000-09-041-196/+163
| | | | | | | | | | | | | | | | * 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 Notes: svn path=/head/; revision=65436
* Rewrite using stdio. It cause program speedup since eliminates lots of smallAndrey A. Chernov2000-09-031-13/+14
| | | | | | | | read() syscalls. It not cause static binary size increasing because stdio already picked via setlocale() called from catopen() Notes: svn path=/head/; revision=65417
* Treat empty lang as "C" lang tooAndrey A. Chernov2000-09-011-1/+1
| | | | Notes: svn path=/head/; revision=65330
* Set rcsid to correct valueAlexey Zelkin2000-09-011-24/+6
| | | | | | | | Resort #include files Remove SYSV compatibility chunks Notes: svn path=/head/; revision=65326
* Remove unused indirect references to cat* functions.Alexey Zelkin2000-09-011-3/+3
| | | | Notes: svn path=/head/; revision=65324
* Fix memory leak introduced by kris in rev 1.22Alexey Zelkin2000-09-011-0/+2
| | | | Notes: svn path=/head/; revision=65323
* setlocale may return NULL, handle this case too by resetting to "C"Andrey A. Chernov2000-09-011-5/+3
| | | | Notes: svn path=/head/; revision=65321
* Move protection code down to handle NL_CAT_LOCALE case too.Andrey A. Chernov2000-09-011-2/+3
| | | | Notes: svn path=/head/; revision=65320
* Protect from badly formed LANG variableAndrey A. Chernov2000-09-011-1/+2
| | | | Notes: svn path=/head/; revision=65319
* catgets: detect if fd becomes invalid after exec and return default responseAndrey A. Chernov2000-08-301-6/+6
| | | | | | | cosmetique, use NULL for pointers comparison Notes: svn path=/head/; revision=65256
* Prevent internal buffer overflow due to expansion of $LANG and/or nameKris Kennaway2000-08-051-3/+11
| | | | | | | | | argument in catopen(). Reviewed by: chris, -audit Notes: svn path=/head/; revision=64274
* Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),Jason Evans2000-01-271-8/+8
| | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=56698
* Add three-tier symbol naming in support of POSIX thread cancellationJason Evans2000-01-121-8/+9
| | | | | | | | | 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(). Notes: svn path=/head/; revision=55837
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Provide meaningful errno value on error returnAndrey A. Chernov1998-07-141-5/+17
| | | | Notes: svn path=/head/; revision=37643
* Return -1 for invalid descriptor in catcloseAndrey A. Chernov1998-04-301-2/+2
| | | | Notes: svn path=/head/; revision=35552
* If passed catgets descriptor is NULL or -1, return default string immediatelyAndrey A. Chernov1998-04-301-1/+3
| | | | Notes: svn path=/head/; revision=35550
* Force loadType to 0Andrey A. Chernov1998-04-301-5/+4
| | | | Notes: svn path=/head/; revision=35549
* Implement NL_CAT_LOCALEAndrey A. Chernov1998-04-301-3/+8
| | | | | | | Manpages cleanup Notes: svn path=/head/; revision=35548
* Prototypes/typedefs cleanupAndrey A. Chernov1998-04-301-18/+19
| | | | | | | Fix error return codes Notes: svn path=/head/; revision=35546
* Add #ifndef __NETBSD_SYSCALLS around calls to issetugid() whichJohn Birrell1998-01-151-2/+6
| | | | | | | do not exist in NetBSD 1.3. Notes: svn path=/head/; revision=32524
* Plug even more failure memory leaksAndrey A. Chernov1997-05-101-6/+32
| | | | Notes: svn path=/head/; revision=25642
* CleanupAndrey A. Chernov1997-05-101-21/+26
| | | | | | | | | Plug failure memory leaks Use issetugid now PR: 3492 Notes: svn path=/head/; revision=25641
* Restricting $LANG was a really bad ideaWarner Losh1997-03-251-4/+2
| | | | | | | Pointed out by: Everybody but Jordan. Notes: svn path=/head/; revision=24254
* Don't honor LANG or NLSPATH if we're setuid/setgid.Warner Losh1997-03-241-3/+8
| | | | | | | | | Fixes PR 2582 Submitted by: Julian Assange Notes: svn path=/head/; revision=24197
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22993
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=21673
* General -Wall warning cleanup, part I.Jordan K. Hubbard1996-07-121-3/+3
| | | | | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu> Notes: svn path=/head/; revision=17141
* and so on...Poul-Henning Kamp1995-10-221-5/+3
| | | | Notes: svn path=/head/; revision=11662
* Add /usr/local/share/nls to default search pathAndrey A. Chernov1995-06-171-2/+2
| | | | Notes: svn path=/head/; revision=9245
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-18/+18
| | | | Notes: svn path=/head/; revision=8870
* Add the nls code for XPG3-style message catalogs to libc.Jordan K. Hubbard1995-03-301-0/+396
Obtained from: NetBSD Notes: svn path=/head/; revision=7494