summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Fix all the ambiguous or erroneous statements of the brk(2)Yaroslav Tykhiy2001-09-061-55/+87
| | | | | | | | | | | manpage by taking its text from NetBSD and editing it further. This also improves the page's mdoc(7) markup style. Reviewed by: ru Obtained from: NetBSD Notes: svn path=/head/; revision=83148
* correctly wrap macros with { }Alexey Zelkin2001-09-061-2/+3
| | | | Notes: svn path=/head/; revision=83139
* strfmon(3) is not ready to go live.David E. O'Brien2001-09-061-1/+1
| | | | Notes: svn path=/head/; revision=83137
* Add strfmon(3) implementation. It still contains few XXX's because I lostAlexey Zelkin2001-09-052-3/+618
| | | | | | | | | | | | my last version of this work due to HDD crash, but this version cleanly passed all POSIX and SuSv2 tests. I am working on testing scripts which should test this implementation against all locales and surely more fixes will come soon. Reviewed by: ache, silence at -audit & -developers Notes: svn path=/head/; revision=83104
* mdoc(7) police: markup and minor content fixes.Ruslan Ermilov2001-09-052-73/+61
| | | | | | | | | | | | | | | o Removed whitespace at EOL o Removed hard sentence breaks o Added cap_size() to the NAME section o Normalized .Nd descriptions o Fixed the abuses of .Nm and .Va o Fixed some DESCRIPTION texts o Fixed the RETURN VALUES and ERRORS texts to look more traditional Reviewed by: tmm Notes: svn path=/head/; revision=83079
* Add Thomas Moestl and Chris Faulhaber to the author list for POSIX.1eRobert Watson2001-09-051-0/+2
| | | | | | | | | support. Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=83050
* Portability fix: use unsigned cast to guaranteed positive part of expressionAndrey A. Chernov2001-09-042-2/+2
| | | | | | | | in case {L}LONG_MAX > abs({L}LONG_MIN). Non-functional change - we don't have any such platforms. Notes: svn path=/head/; revision=83024
* Remove rcsids and unneded includeAndrey A. Chernov2001-09-046-34/+12
| | | | Notes: svn path=/head/; revision=82995
* 'acc' is not initialized in one hypotetical case, fix itAndrey A. Chernov2001-09-044-8/+8
| | | | Notes: svn path=/head/; revision=82982
* Locale *is* used in strto*l*(), at least for isspace(), so removeAndrey A. Chernov2001-09-048-58/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'locale not used' statement from comments and BUGS section of manpage. strtol(): fix non-portable 'cutoff' calculation using the same method as in strtoll(). Cleanup 'cutoff' calculation, remove unneded casts. Misc. cleanup to make all functions looks the same. Implement EINVAL reaction per POSIX, document it in manpage, corresponding POSIX example quotes here: ------------------------------------------------ If the subject sequence is empty or does not have the expected form, no conversion is performed; the value of str is stored in the object pointed to by endptr, provided that endptr is not a null pointer. If no conversion could be performed, 0 shall be returned and errno may be set to [EINVAL]. [EINVAL] The value of base is not supported. Since 0, {LONG_MIN} or {LLONG_MIN}, and {LONG_MAX} or {LLONG_MAX} are returned on error and are also valid returns on success, an application wishing to check for error situations should set errno to 0, then call strtol( ) or strtoll ( ), then check errno. ----------------------------------------------------- Notes: svn path=/head/; revision=82975
* Implement _setjmp()/_longjmp().Doug Rabson2001-09-041-125/+345
| | | | | | | Obtained from: Intel's EFI toolkit Notes: svn path=/head/; revision=82936
* This does not describe sched_{get,set}scheduler.Dima Dorfman2001-09-031-2/+3
| | | | | | | | PR: 26001 Submitted by: OHSAWA Chitoshi <ohsawa@catv1.ccn-net.ne.jp> Notes: svn path=/head/; revision=82881
* Don't capitalize jail(2) in the middle of a sentence.Dima Dorfman2001-09-031-1/+1
| | | | | | | | PR: 25876 Submitted by: Koizumi Satoru <koizumi@cms.phys.s.u-tokyo.ac.jp> Notes: svn path=/head/; revision=82880
* PT_STEP in ptrace(2) man page is described as 'addr and data fieldsMurray Stokely2001-09-031-3/+3
| | | | | | | | | | | | are not used'. This is incorrect, as addr must be passed (caddr_t)1 to do anything useful. The source for gdb and a short test program will confirm that this man page was in error. PR: docs/27758 Submitted by: Jiangyi Liu <jyliu@163.net> Notes: svn path=/head/; revision=82862
* When __SOPT is cleared, clear __SOFF too.Andrey A. Chernov2001-09-031-1/+1
| | | | | | | NOTE: original stdio bug. Notes: svn path=/head/; revision=82839
* Re-arrange my funopen(3) fix to minimize differences with original stdio code,Andrey A. Chernov2001-09-036-83/+91
| | | | | | | | | no functional changes. Add fp->_offset optimization in _SAPP+_SOPT case Notes: svn path=/head/; revision=82838
* o Sync up prototypes for cap_size() and cap_copy_ext() withRobert Watson2001-09-021-2/+2
| | | | | | | | | | | sys/capability.h--this compiled fine on i386 where (int) and (ssize_t) are the same, but broke on Alpha where they differ. Submitted by: Mike Barcroft <mike@FreeBSD.org> Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=82828
* Internal seeks are overoptimized. They should remember fp->_offset only forAndrey A. Chernov2001-09-022-3/+1
| | | | | | | | | | plain regular files, i.e. files with __SOPT flag set. Fix it, so ftell(stdout) always returns the same as lseek(1, 0, 1) now. NOTE: this bug was in original stdio code Notes: svn path=/head/; revision=82827
* Fix bug in off_t overflow checking: if fp->_offset overflows, just removeAndrey A. Chernov2001-09-021-5/+3
| | | | | | | | __SOFF flag (i.e. we don't have offset) instead of returning EOVERFLOW. It allows again continious reading from non-stop stream. Notes: svn path=/head/; revision=82818
* Remove MLINKS seek.2 to lseek.2, we don't have seek.2 syscallAndrey A. Chernov2001-09-021-1/+0
| | | | Notes: svn path=/head/; revision=82812
* Typo seek(2) -> lseek(2)Andrey A. Chernov2001-09-021-1/+1
| | | | Notes: svn path=/head/; revision=82810
* Move all stdio internal flags processing and setting out of __sread(),Andrey A. Chernov2001-09-029-55/+89
| | | | | | | | | | | | | __swrite() and __sseek() to higher level. According to funopen(3) they all are just wrappers to something like standard read(2), write(2) and lseek(2), i.e. must not touch stdio internals because they are replaceable with any other functions knows nothing about stdio internals. See example of funopen(3) usage in sendmail sources f.e. NOTE: this is original stdio bug, not result of my range checkin added. Notes: svn path=/head/; revision=82807
* Another punctuation fix (missing comma ending preposition).Chris Costello2001-09-011-1/+1
| | | | Notes: svn path=/head/; revision=82761
* o Mention the fact that specifying a fileid of 0 searches all loadedChris Costello2001-09-011-1/+4
| | | | | | | | modules. o Properly terminate a preposition. Notes: svn path=/head/; revision=82760
* Save errno before function call and restore it on success (because manyAndrey A. Chernov2001-09-012-2/+11
| | | | | | | | | internal functions there may fail and set (i.e. overwrite) errno in normal (not error) situation). In original variant errno testing after call (as POSIX suggest) is wrong when errno overwrite happens. Notes: svn path=/head/; revision=82743
* Remove even more unneded checks, original code can't overflows in that placeAndrey A. Chernov2001-09-011-5/+1
| | | | Notes: svn path=/head/; revision=82742
* Remove two checks unneeded now (can't happens)Andrey A. Chernov2001-09-011-4/+0
| | | | Notes: svn path=/head/; revision=82741
* Make fseek(... SEEK_CUR) fails if current file-position is unspecified.Andrey A. Chernov2001-09-012-8/+8
| | | | Notes: svn path=/head/; revision=82740
* Note that prev. commit addition is for ftell/ftelloAndrey A. Chernov2001-09-011-2/+6
| | | | Notes: svn path=/head/; revision=82739
* Describe ESPIPE as result of unspecified file-position indicator value.Andrey A. Chernov2001-09-011-2/+7
| | | | | | | Add more to SEE ALSO section. Notes: svn path=/head/; revision=82738
* Describe file-position behaviour from POSIXAndrey A. Chernov2001-09-011-0/+5
| | | | Notes: svn path=/head/; revision=82737
* Strict in the POSIX sence, if file position is unspecified after ungetc() atAndrey A. Chernov2001-09-011-6/+4
| | | | | | | | | | 0, return that we can't specify it, i.e. error with ESPIPE. (hint from: "Peter S. Housel" <housel@acm.org>) Back out sinit() addition, not needed after various code simplifications. Notes: svn path=/head/; revision=82736
* If lseek to wrong value sucessfully happens despite all pre-checks, set __SERRAndrey A. Chernov2001-09-012-1/+4
| | | | | | | to indicate that stream becomes inconsistent. Notes: svn path=/head/; revision=82735
* If position is underflowed, don't try to hide that fact by recovery, justAndrey A. Chernov2001-09-011-17/+7
| | | | | | | return EIO and set __SERR to mark stream as inconsistent. Notes: svn path=/head/; revision=82734
* Back out disabling ungetc() at 0, use different solution:Andrey A. Chernov2001-09-015-34/+48
| | | | | | | | keep negative offset internally, but return 0 externally in ftell*() I.e. use 0 now as 'unspecified value' per POSIX ungetc() description. Notes: svn path=/head/; revision=82709
* o Attach cap_cmp.c and cap_copy.c to the build.Robert Watson2001-09-011-1/+6
| | | | | | | | | | | o Attach cap_copy_ext.3 and cap_copy_int.3 to the install, and link cap_size.3 to cap_copy_ext.3. Submitted by: tmm Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=82707
* Describe EOVERFLOW I implement per POSIX.Andrey A. Chernov2001-08-311-9/+17
| | | | | | | Sort ERRORS section Notes: svn path=/head/; revision=82705
* Add originally missing __sinit() call.Andrey A. Chernov2001-08-311-0/+4
| | | | Notes: svn path=/head/; revision=82684
* Simplify offset underflow checks even moreAndrey A. Chernov2001-08-311-12/+2
| | | | Notes: svn path=/head/; revision=82683
* Describe that we disallow ungetc at offset 0 now.Andrey A. Chernov2001-08-311-1/+4
| | | | Notes: svn path=/head/; revision=82679
* Disallow ungetc at offset 0 (to prevent negative offset happens), so simplifyAndrey A. Chernov2001-08-312-22/+15
| | | | | | | checks in ftell. Notes: svn path=/head/; revision=82673
* Drop buffer first, _then_ ask for real positionAndrey A. Chernov2001-08-311-4/+4
| | | | Notes: svn path=/head/; revision=82670
* The same big piece of ftell code repeated in 3 places. Simplify things movingAndrey A. Chernov2001-08-313-94/+30
| | | | | | | | it into one subfunction instead. Try to use real offset in strange cases. Notes: svn path=/head/; revision=82668
* If file offset is smaller than internal buffer character left count, just dropAndrey A. Chernov2001-08-312-16/+30
| | | | | | | internal buffer and trust offset, not return error. Notes: svn path=/head/; revision=82659
* Initialize _offset to 0 in fopen(), it helps to optimize fseek/ftellAndrey A. Chernov2001-08-311-0/+2
| | | | Notes: svn path=/head/; revision=82654
* Detect fp->_offset overflow on readAndrey A. Chernov2001-08-311-9/+23
| | | | | | | Use errno to catch negative seek with -1 offset Notes: svn path=/head/; revision=82653
* Add manpage for inet_net_ntop(3) and inet_net_pton(3).Ruslan Ermilov2001-08-313-1/+162
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=82644
* Use ``.Rv -std'' wherever possible.Ruslan Ermilov2001-08-3141-216/+69
| | | | | | | Submitted by: yar Notes: svn path=/head/; revision=82642
* o Use .Fx to refer to FreeBSDRobert Watson2001-08-311-1/+2
| | | | | | | | Submitted by: tmm Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=82617
* o Remove definition of CAP_MAX_BUF_LEN since it is defined inRobert Watson2001-08-311-1/+4
| | | | | | | | | | sys/capability.h now. Submitted by: tmm Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=82616