summaryrefslogtreecommitdiff
path: root/lib/libc/string/strerror.c
Commit message (Collapse)AuthorAgeFilesLines
* Per Regents of the University of Calfornia letter, remove advertisingWarner Losh2007-01-091-4/+0
| | | | | | | | | clause. # If I've done so improperly on a file, please let me know. Notes: svn path=/head/; revision=165903
* Unbreak !NLS caseAlexey Zelkin2005-02-271-1/+1
| | | | Notes: svn path=/head/; revision=142693
* Add NLS catalogs support to strerror(), strerror_r() and strsignal().Alexey Zelkin2005-02-271-15/+46
| | | | | | | | | Controlled by NLS define, currently disabled by default. Idea obtained from: NetBSD Notes: svn path=/head/; revision=142667
* Back out the `hiding' of strlcpy and strlcat. Several peopleJacques Vidrine2003-05-011-5/+3
| | | | | | | 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-3/+5
| | | | | | | | | | 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
* Optimize errstr() by reducing the number of times it walks a string.Mike Barcroft2003-01-031-9/+7
| | | | | | | | | | | As a side effect, it makes the code easier to read and requires less pointer arithmetic. Test by: strerror regression test Submitted by: Tim Kientzle <kientzle@acm.org> Notes: svn path=/head/; revision=108603
* Stylistic changes:Mike Barcroft2002-12-201-11/+14
| | | | | | | | | | | | | | o Fix an English error (comma splice) and poorly worded sentence. o Fix KNF ordering of variables (pointers come before arithmetic types). o Restore hand-optimization of sizeof()-1, instead of strlen(). o Remove unneeded local variables in strerror_r(). Test by: strerror regression test Requested by: bde Reviewed by: bde Notes: svn path=/head/; revision=108118
* Rearrange strerror() so that its itoa procedure can be used withMike Barcroft2002-12-181-85/+39
| | | | | | | | | | | | | | | | | | strerror_r(). Doing this allows us to ensure that strerror_r() always fills the supplied buffer regardless of EINVAL or ERANGE errors. strerror()'s semantics have changed slightly such that an argument of 0 is now considered invalid and errno is set to EINVAL. Remove internal regression test for strerror() and strerror_r(). This will be reincarnated in src/tools/regression/lib/libc/string. In strerror(3), add a comment about strerror()'s bogus return type. PR: 44356 Notes: svn path=/head/; revision=108044
* Fix off-by-one error.Jonathan Mini2002-07-031-1/+1
| | | | | | | | | PR: misc/40104 Submitted by: Neal Fachan <neal@isilon.com> MFC after: 3 days Notes: svn path=/head/; revision=99331
* Make strerror and strerror_r use sys_errlist[0] for errnum = 0. BeWes Peters2001-12-071-3/+20
| | | | | | | | | | | | | | more careful about reporting truncation with ERANGE in strerror_r. Set errno to EINVAL for "unknown" errnum in strerror as required by P1003.1-200x Draft June 14, 2001. More carefully document the handling of strerrbuf when errors (ERANGE, EINVAL) are encountered in strerror_r. Reviewed by: bde (ongoing discussion) Notes: svn path=/head/; revision=87480
* New, improved, more Posix-compliant strerror_r implementation,Wes Peters2001-12-061-60/+59
| | | | | | | | | | complete with documentation. Reviewed by: mike@ gad@ MFC after: 1 week Notes: svn path=/head/; revision=87434
* Add strerror_r function per Posix prototype.Wes Peters2001-11-271-19/+74
| | | | | | | | Reviewed by: Mike Barcroft <mike@FreeBSD.org> MFC after: 2 weeks Notes: svn path=/head/; revision=86944
* rcsid[]->__FBSDIDDavid E. O'Brien2001-11-071-4/+2
| | | | Notes: svn path=/head/; revision=86170
* Make the rcsid and FreeBSD IDs more sane in the wcs* and wmem* files.David E. O'Brien2001-05-241-0/+4
| | | | | | | Do the same for the non-wcs*/wmem* files while I'm here. Notes: svn path=/head/; revision=77117
* Fix printing of weird errno's: negative values were printed as largeBruce Evans1994-09-051-5/+9
| | | | | | | | | unsigned's; null termination was only guaranteed for the first call. Fix lint: don't declare externs internally; they were both out of date. Notes: svn path=/head/; revision=2505
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-271-0/+67
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573