summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Introduce a new error return code:Poul-Henning Kamp2002-08-091-0/+3
| | | | | | | | | #define EDOFUS 88 /* Programming error */ This can be used to signal error situations which indicate that the program logic or assumptions is deficient. Notes: svn path=/head/; revision=101567
* Add safeguards to never use errno == 0 as setrunelocale() error return codeAndrey A. Chernov2002-08-093-7/+5
| | | | Notes: svn path=/head/; revision=101566
* Update TE policy and MAC text conversion routines to support partialRobert Watson2002-08-092-10/+71
| | | | | | | | | | | | | label updates. Biba and MLS already supported this. This permits the userland library to submit relative updates on MAC labels, rather than submitting an entire label to replace the current label. This also requires changes to the MAC modules, which are forthcoming. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=101555
* X-ref mac.3.Robert Watson2002-08-091-0/+1
| | | | Notes: svn path=/head/; revision=101554
* Use '_end' symbol instead of 'end' to initialize minbrk and curbrkAlexander Kabaev2002-08-082-6/+6
| | | | | | | | | | | | | | | | variables. Both symbols are set to the same value by the linker, and _end symbol has less chances to clash with application defined global symbols. alpha, ia64 and sparc64 ports already use _end, i386 is now consistent with them. Reviewed by: bde Approved by: obrien Reported by: pirzyk Notes: svn path=/head/; revision=101536
* Rewrite locale loading procedures, so any load failure will not affectAndrey A. Chernov2002-08-0811-192/+259
| | | | | | | | | | | currently cached data. It allows a number of nice things, like: removing fallback code from single locale loading, remove memory leak when LC_CTYPE data loaded again and again, efficient cache use, not only for setlocale(locale1); setlocale(locale1), but for setlocale(locale1); setlocale("C"); setlocale(locale1) too (i.e. data file loaded only once). Notes: svn path=/head/; revision=101498
* Implement POSIX.1-2001 (XSI)'s ulimit(3).Mike Barcroft2002-08-084-3/+172
| | | | | | | Submitted by: Kyle Martin <mkm@ieee.org> Notes: svn path=/head/; revision=101497
* 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
* Reset __mb_cur_max to 1 when "C" or "POSIX" locales loaded after multibyte oneAndrey A. Chernov2002-08-071-0/+1
| | | | Notes: svn path=/head/; revision=101488
* Fix wrong address when EucInfo > "variable" sizeAndrey A. Chernov2002-08-071-1/+1
| | | | Notes: svn path=/head/; revision=101487
* Correct an inaccuracy in this man page regarding detecting empty fields.Archie Cobbs2002-08-071-4/+5
| | | | | | | MFC after: 2 days Notes: svn path=/head/; revision=101485
* Document file descriptor reopening and current standardization status.Garrett Wollman2002-08-071-0/+19
| | | | Notes: svn path=/head/; revision=101480
* Style fixes in preparation for rewrittingAndrey A. Chernov2002-08-071-15/+15
| | | | Notes: svn path=/head/; revision=101478
* Style fixesAndrey A. Chernov2002-08-071-9/+6
| | | | Notes: svn path=/head/; revision=101471
* Style fixes in preparation of code rewrittingAndrey A. Chernov2002-08-074-34/+43
| | | | Notes: svn path=/head/; revision=101470
* Close descriptor, if error happens in loadCat()Andrey A. Chernov2002-08-071-0/+6
| | | | Notes: svn path=/head/; revision=101450
* Build iswctype.c and manual pages for the functions it defines.Tim J. Robbins2002-08-061-3/+12
| | | | Notes: svn path=/head/; revision=101408
* o Fix a memory leak.Mike Barcroft2002-08-051-11/+15
| | | | | | | | | o Rewrite validmsgverb() so that it works (I'm not sure how it escaped my original testing). o Document nextcomp(). Notes: svn path=/head/; revision=101403
* Add missing prototypes for extension functions to the SYNOPSIS.Tim J. Robbins2002-08-051-0/+14
| | | | Notes: svn path=/head/; revision=101372
* Use In macro instead of Fd. Add crossref to wctype(3). Refer to 1003.1-2001Tim J. Robbins2002-08-051-4/+31
| | | | | | | in STANDARDS section. Document functions which are extensions to the standard. Notes: svn path=/head/; revision=101371
* Use the In macro instead of Fd. Add crossref to wctrans(3). Refer toTim J. Robbins2002-08-051-3/+4
| | | | | | | 1003.1-2001 in STANDARDS section. Notes: svn path=/head/; revision=101370
* Implement the missing <wctype.h> functions: isw*() (iswalnum() etc.),Tim J. Robbins2002-08-051-0/+213
| | | | | | | | | | | towlower() and towupper() required by ISO C90 Amd. 1. iswascii(), iswhexnumber(), iswideogram(), iswnumber(), iswphonogram(), iswrune() and iswspecial() have also been implemented for consistency with the BSD extensions in <ctype.h>. Notes: svn path=/head/; revision=101369
* Reject encoding > ENCODING_LEN at early stage instead of truncating it.Andrey A. Chernov2002-08-051-19/+35
| | | | | | | | Use ptr == NULL instead of !ptr in few places. Move saverr declaration to global section. Notes: svn path=/head/; revision=101366
* Manual pages for wide character classification (isw*) and case conversionTim J. Robbins2002-08-052-0/+192
| | | | | | | | | (tow*) functions from NetBSD, unmodified except for the addition of $FreeBSD$. Obtained from: NetBSD Notes: svn path=/head/; revision=101361
* Implement POSIX.1-2001 (XSI)'s fmtmsg(3).Mike Barcroft2002-08-054-2/+473
| | | | Notes: svn path=/head/; revision=101353
* 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
* Change wctype_t to an unsigned type to avoid warnings.Tim J. Robbins2002-08-041-1/+1
| | | | Notes: svn path=/head/; revision=101314
* Add the ISO C90 Amd. 1 wctrans(3) and towctrans(3) functions.Tim J. Robbins2002-08-043-2/+196
| | | | Notes: svn path=/head/; revision=101313
* Add btowc(3) to SEE ALSO section.Tim J. Robbins2002-08-041-0/+1
| | | | Notes: svn path=/head/; revision=101310
* Use errno to indicate failure reason.Andrey A. Chernov2002-08-041-12/+18
| | | | | | | | Remove incomplete checks for 'name' and 'PatchLocale', they must be already checked at this point. Notes: svn path=/head/; revision=101307
* Fixed some style bugs (unsorting of MLINKS, and more than 1 assignment toBruce Evans2002-08-041-3/+3
| | | | | | | MAN per section). Notes: svn path=/head/; revision=101305
* Rewrite loadlocale() to eliminate LOAD_CATEGORY macro to save space.Andrey A. Chernov2002-08-041-28/+27
| | | | Notes: svn path=/head/; revision=101292
* Nonexistent SIZE_MAX -> SIZE_T_MAXAndrey A. Chernov2002-08-041-1/+1
| | | | Notes: svn path=/head/; revision=101291
* Signal an error instead of giving the caller less memory than they askedTim J. Robbins2002-08-041-0/+7
| | | | | | | | | for when num * size would cause integer overflow. MFC after: 1 week Notes: svn path=/head/; revision=101290
* Add ERRORS section according to POSIX (no errors)Andrey A. Chernov2002-08-031-0/+2
| | | | Notes: svn path=/head/; revision=101277
* Catch empty encoding name tooAndrey A. Chernov2002-08-031-1/+1
| | | | Notes: svn path=/head/; revision=101276
* Fix return codes to match what setrunelocale() returnsAndrey A. Chernov2002-08-031-5/+2
| | | | Notes: svn path=/head/; revision=101272
* Preserve errno in fallback codeAndrey A. Chernov2002-08-031-0/+3
| | | | Notes: svn path=/head/; revision=101269
* Add ISO C90 Amd. 1 btowc(3) and wctob(3) functions.Tim J. Robbins2002-08-034-2/+167
| | | | Notes: svn path=/head/; revision=101267
* Correct use of Nm macro in NAME section and a broken cross reference.Tim J. Robbins2002-08-031-2/+3
| | | | Notes: svn path=/head/; revision=101265
* Return errno provided by fopen, not always ENOENT.Andrey A. Chernov2002-08-031-10/+10
| | | | | | | | Return EFTYPE instead of EINVAL for wrong locale file format. Whitespaces. Notes: svn path=/head/; revision=101263
* Check encoding for ".", ".." and / insideAndrey A. Chernov2002-08-031-1/+5
| | | | Notes: svn path=/head/; revision=101262
* Return EINVAL for NULL or too long encoding, not EFAULTAndrey A. Chernov2002-08-031-1/+1
| | | | Notes: svn path=/head/; revision=101261
* Return ENAMETOOLONG for long PATH_LOCALE, not EFAULTAndrey A. Chernov2002-08-031-1/+1
| | | | Notes: svn path=/head/; revision=101260
* 1) Use errno to indicate faulure reason.Andrey A. Chernov2002-08-031-44/+89
| | | | | | | | | | | | | 2) Move incomplete check for / in locale name from env section to loadlocale(), add check for "." and ".." too. It allows to check any argument, not env only. 3) Redesing LOAD_CATEGORY macro to eliminate code duplication. 4) Try harder in fallback code: if old locale can't be restored, load "C" locale 5) White space formatting, long lines, etc. Notes: svn path=/head/; revision=101259
* Add ISO C90 Amd. 1 wctype(3) and iswctype(3) functions.Tim J. Robbins2002-08-033-2/+179
| | | | Notes: svn path=/head/; revision=101253
* Introduce support for Mandatory Access Control and extensibleRobert Watson2002-08-0218-2/+1878
| | | | | | | | | | | | | | | | | kernel access control. Extensions to libc to provide basic MAC label manipulation facilities for userland. These interface will be replaced in the next month or two with more flexible interfaces, but provide sufficient support to allow use of the Biba and MLS policies for user applications. libc_r wrappers to follow. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=101242
* Sligtly modify previous out-of-bounds fix: just break instead ofAndrey A. Chernov2002-08-021-1/+1
| | | | | | | | return(NULL) for upward compatibility with more LC_* categories may be implemented in future. Notes: svn path=/head/; revision=101223
* Remove an #include <syslog.h>. It's already included conditionallyMaxime Henrion2002-08-021-1/+0
| | | | | | | | | above, as it should be. Submitted by: Olivier Houchard <cognet@ci0.org> Notes: svn path=/head/; revision=101221