Commit Graph

2778 Commits

Author SHA1 Message Date
ru
f512fee07c mdoc(7) police: markup and minor content fixes.
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
2001-09-05 14:09:08 +00:00
rwatson
72b8fa9d63 Add Thomas Moestl and Chris Faulhaber to the author list for POSIX.1e
support.

Obtained from:	TrustedBSD Project
2001-09-05 03:36:00 +00:00
ache
c516d85954 Portability fix: use unsigned cast to guaranteed positive part of expression
in case {L}LONG_MAX > abs({L}LONG_MIN).  Non-functional change - we don't
have any such platforms.
2001-09-04 21:28:01 +00:00
ache
a9d341bd9b Remove rcsids and unneded include 2001-09-04 17:41:20 +00:00
ache
48c9c31dbb 'acc' is not initialized in one hypotetical case, fix it 2001-09-04 17:12:15 +00:00
ache
cd61d5ab48 Locale *is* used in strto*l*(), at least for isspace(), so remove
'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.
-----------------------------------------------------
2001-09-04 16:39:11 +00:00
dfr
9d255ceec0 Implement _setjmp()/_longjmp().
Obtained from: Intel's EFI toolkit
2001-09-04 08:27:39 +00:00
dd
e2dcf3d0c9 This does not describe sched_{get,set}scheduler.
PR:		26001
Submitted by:	OHSAWA Chitoshi <ohsawa@catv1.ccn-net.ne.jp>
2001-09-03 17:55:08 +00:00
dd
3ac0264ecd Don't capitalize jail(2) in the middle of a sentence.
PR:		25876
Submitted by:	Koizumi Satoru <koizumi@cms.phys.s.u-tokyo.ac.jp>
2001-09-03 17:49:29 +00:00
murray
66f0420861 PT_STEP in ptrace(2) man page is described as 'addr and data fields
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>
2001-09-03 09:42:40 +00:00
ache
2a55bd67ec When __SOPT is cleared, clear __SOFF too.
NOTE: original stdio bug.
2001-09-03 02:35:10 +00:00
ache
cbe865cf8c Re-arrange my funopen(3) fix to minimize differences with original stdio code,
no functional changes.

Add fp->_offset optimization in _SAPP+_SOPT case
2001-09-03 02:24:37 +00:00
rwatson
fea7223b35 o Sync up prototypes for cap_size() and cap_copy_ext() with
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
2001-09-02 23:13:49 +00:00
ache
eb6143a73e Internal seeks are overoptimized. They should remember fp->_offset only for
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
2001-09-02 21:22:00 +00:00
ache
59ebf79b48 Fix bug in off_t overflow checking: if fp->_offset overflows, just remove
__SOFF flag (i.e. we don't have offset) instead of returning EOVERFLOW.
It allows again continious reading from non-stop stream.
2001-09-02 19:52:09 +00:00
ache
698550762f Remove MLINKS seek.2 to lseek.2, we don't have seek.2 syscall 2001-09-02 19:28:41 +00:00
ache
8e45098f4c Typo seek(2) -> lseek(2) 2001-09-02 19:24:07 +00:00
ache
245c459c3f Move all stdio internal flags processing and setting out of __sread(),
__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.
2001-09-02 19:10:10 +00:00
chris
fe9bd7a606 Another punctuation fix (missing comma ending preposition). 2001-09-01 21:32:52 +00:00
chris
e540bd45f2 o Mention the fact that specifying a fileid of 0 searches all loaded
modules.
o Properly terminate a preposition.
2001-09-01 21:31:33 +00:00
ache
040bf33abb Save errno before function call and restore it on success (because many
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.
2001-09-01 15:28:24 +00:00
ache
77759ea63b Remove even more unneded checks, original code can't overflows in that place 2001-09-01 15:01:37 +00:00
ache
20c6fc0914 Remove two checks unneeded now (can't happens) 2001-09-01 14:48:45 +00:00
ache
0c69b04984 Make fseek(... SEEK_CUR) fails if current file-position is unspecified. 2001-09-01 14:40:01 +00:00
ache
d8648337d6 Note that prev. commit addition is for ftell/ftello 2001-09-01 14:23:30 +00:00
ache
6628a9dfdc Describe ESPIPE as result of unspecified file-position indicator value.
Add more to SEE ALSO section.
2001-09-01 14:11:53 +00:00
ache
162eb9fa4e Describe file-position behaviour from POSIX 2001-09-01 14:01:52 +00:00
ache
8785013776 Strict in the POSIX sence, if file position is unspecified after ungetc() at
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.
2001-09-01 12:13:33 +00:00
ache
625f4c5432 If lseek to wrong value sucessfully happens despite all pre-checks, set __SERR
to indicate that stream becomes inconsistent.
2001-09-01 11:21:28 +00:00
ache
116ee96d9d If position is underflowed, don't try to hide that fact by recovery, just
return EIO and set __SERR to mark stream as inconsistent.
2001-09-01 11:18:53 +00:00
ache
5610a6ae63 Back out disabling ungetc() at 0, use different solution:
keep negative offset internally, but return 0 externally in ftell*()
I.e. use 0 now as 'unspecified value' per POSIX ungetc() description.
2001-09-01 01:56:54 +00:00
rwatson
c4e5554168 o Attach cap_cmp.c and cap_copy.c to the build.
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
2001-09-01 00:00:50 +00:00
ache
74812a92b8 Describe EOVERFLOW I implement per POSIX.
Sort ERRORS section
2001-08-31 23:06:28 +00:00
ache
0ad06d5009 Add originally missing __sinit() call. 2001-08-31 20:36:19 +00:00
ache
689eee076f Simplify offset underflow checks even more 2001-08-31 20:17:32 +00:00
ache
13118a14e0 Describe that we disallow ungetc at offset 0 now. 2001-08-31 20:03:49 +00:00
ache
7d962c74f0 Disallow ungetc at offset 0 (to prevent negative offset happens), so simplify
checks in ftell.
2001-08-31 19:50:25 +00:00
ache
f00df8355c Drop buffer first, _then_ ask for real position 2001-08-31 18:54:44 +00:00
ache
2362fc36bc The same big piece of ftell code repeated in 3 places. Simplify things moving
it into one subfunction instead.
Try to use real offset in strange cases.
2001-08-31 18:23:29 +00:00
ache
ef96044374 If file offset is smaller than internal buffer character left count, just drop
internal buffer and trust offset, not return error.
2001-08-31 14:11:14 +00:00
ache
8479e8b5bb Initialize _offset to 0 in fopen(), it helps to optimize fseek/ftell 2001-08-31 13:14:49 +00:00
ache
ae7b8fc7f6 Detect fp->_offset overflow on read
Use errno to catch negative seek with -1 offset
2001-08-31 12:55:22 +00:00
ru
da7d969a02 Add manpage for inet_net_ntop(3) and inet_net_pton(3).
Obtained from:	NetBSD
2001-08-31 10:54:44 +00:00
ru
69224c0edd Use ``.Rv -std'' wherever possible.
Submitted by:	yar
2001-08-31 09:57:38 +00:00
rwatson
68e6cd77c0 o Use .Fx to refer to FreeBSD
Submitted by:		tmm
Obtained from:	TrustedBSD Project
2001-08-31 02:12:54 +00:00
rwatson
bee0359b32 o Remove definition of CAP_MAX_BUF_LEN since it is defined in
sys/capability.h now.

Submitted by:		tmm
Obtained from:	TrustedBSD Project
2001-08-31 02:11:59 +00:00
rwatson
b7b3700317 Introduce implementations of POSIX.1e non-portable form capability
support functions:
     cap_subset_np()    - Is cap1 a subset of cap2
     cap_equal_np()     - Is cap1 equal to cap2

o Introduce implementations of POSIX.1e capability support functions:
     cap_copy_ext()     - Externalize capability
     cap_copy_int()     - Internalize capability
     cap_size()         - Determine size required for cap_copy_ext()

Submitted by:		tmm
Obtained from:	TrustedBSD Project
2001-08-31 02:07:48 +00:00
alex
e7cbb8efe4 Add Xref to make.conf(5). 2001-08-30 21:44:46 +00:00
ache
831e2fb1cd Try to discard some ungetc data in saved internal buffer checks too,
if offset tends to be negative.
2001-08-30 20:49:47 +00:00
ache
5141c6e8a2 goto dumb; if can't obtain curoff for whence != SEEK_CUR cases, as supposed 2001-08-30 20:19:45 +00:00