Commit Graph

5445 Commits

Author SHA1 Message Date
des
90d3b3be8d Back out part of previous commit which was gcc-centric 2001-10-19 10:08:05 +00:00
alfred
bc1db61967 s/kernal/kernel 2001-10-19 07:52:11 +00:00
markm
b3906e40e9 Add library exposed by KDE's use if this module. 2001-10-18 20:05:20 +00:00
des
33b095fe4a Tons of type, style and warning fixes that have been rotting in my tree for
ages - some of which wouldn't be necessary if gcc wasn't broken or TPTB were
willing to do something (-fno-builtin) about it.
2001-10-18 08:29:26 +00:00
jlemon
53432bcb66 Use the new SIOCGIFINDEX ioctl to efficiently map a name to an index.
If the syscall fails, fall back on the old method as a compatability
measure.
2001-10-17 20:08:15 +00:00
alfred
1ac0094263 Fix reference to aio_read, should be aio_write 2001-10-16 00:49:19 +00:00
robert
38bb426327 Make this Makefile suitable for sparc64. 2001-10-15 14:27:37 +00:00
robert
05a6e99f71 Define the types iaddr_t and saddr_t for sparc64. 2001-10-15 13:50:47 +00:00
dd
02eab8be79 Match parenthesis and don't give names to return values.
PR:		31214
2001-10-15 13:34:43 +00:00
peter
67bf36f8c9 Add EFI GPT (238, 0xEE) and EFI System Parition (239, 0xEF) 2001-10-15 07:25:29 +00:00
bde
8988e6343d Fixed style bugs in previous commit. 2001-10-15 04:29:06 +00:00
dd
6f9331d224 link(2) may fail with EPERM if name1 is immutable or append-only.
PR:		31025
Submitted by:	Tim Singletary <tsingle@vetinsite.com>
2001-10-14 22:40:19 +00:00
dfr
0fb5ae6020 Make this compile on ia64. 2001-10-14 13:45:33 +00:00
dillon
a248f5943a Add warning about zeroing-out the socket structure before populating it. 2001-10-13 17:20:51 +00:00
bde
32109f9614 Removed most of the zombie man pages in libm. All relevant parts have
been copied to msun/man (most of them long ago without proper history).
2001-10-13 14:22:08 +00:00
bde
751cb42584 Fixed missing quoting of >= (in ceil.3) and <= (in floor.3) by reverting to
describing these operators in English.  This completes the fix in rev.1.3
(rev.1.2 got this wrong by describing wrong operators in English).

Fixed bitrot and improved English in the DESCRIPTION section.
2001-10-13 13:57:32 +00:00
bde
4b3bfd5932 Fixed missing quoting of [-1, +1].
Submitted by:	phantom
2001-10-13 12:29:25 +00:00
bde
50e729b1f0 Use ".Lb libm" where it will have an effect (not just in the zombie man
pages in libm).

Submitted by:	phantom
2001-10-13 12:23:23 +00:00
bde
cb078bdae4 Backed out "Compensate for header dethreading [mistakes]" mistakes in
alpha files too.
2001-10-13 04:38:46 +00:00
mike
6fb85fc830 Note that strncmp() will not compare characters after a NUL character.
Add a missing word.  Bump document date.

Inspired by:	IEEE Std 1003.1-200x (Draft 7)
MFC after:	3 days
2001-10-11 17:02:44 +00:00
mike
5a6af77527 Clarify that strnstr() will stop searching after in encounters a NUL
character.  Bump document date.  Add a missing comma.
2001-10-11 15:49:06 +00:00
ru
fc8fa0b910 - Bump document date for eaccess(2) addition.
- Mention ``eaccess'' in the NAME section.
- Use intro(2) terminology.
- Markup fixes.

Reviewed by:	rwatson
2001-10-11 15:27:53 +00:00
dfr
0049dee928 Change to track the new calling convention for execve. This version only
needs one line of assembler to initialise gp.
2001-10-11 12:33:05 +00:00
yar
c0a09f42ae Fix the phrase about "both files", which must be left
from login(3). This page, logwtmp(3), speaks of only
one file -- wtmp(5).

MFC after:	1 week
2001-10-11 11:02:50 +00:00
mr
22cefbf470 Fix SysV Semaphore Handling.
Updated by peter following KSE and Giant pushdown.
I've running with this patch for two week with no ill side effects.

PR:		kern/12014: Fix SysV Semaphore handling
Submitted by:	Peter Jeremy <peter.jeremy@alcatel.com.au>
2001-10-11 08:15:14 +00:00
obrien
286cd7093c Shared libraries from 4.4-FreeBSD needed for proper binary compatibility. 2001-10-10 20:33:20 +00:00
bde
94220967cf Compensate for "Compensate for header dethreading" by backing it out. 2001-10-10 17:48:44 +00:00
ru
293c95419d getnetbyaddr() should be serviced by the "networks" database. 2001-10-10 12:49:53 +00:00
dfr
d6e961ff95 Adjust so that we don't use relocations which can't exist in a shared
library.
2001-10-10 10:35:01 +00:00
dfr
05752fa7a3 Shorter versions of the byte swapping code. 2001-10-10 10:34:08 +00:00
jkh
54ced0e78d Check to see if the devfs MIB exists and return 1 if it exists rather
than making device node(s).
Submitted by:	Hiroo ONO <hiroo@oikumene.gcd.org>
2001-10-10 07:46:04 +00:00
ache
cb74a0f9dc Implement strcasestr() which many others (f.e. Linux) already have. 2001-10-10 02:17:35 +00:00
mike
b9c754f2b1 Document the fact that the strnstr(3) function is not portable.
Requested by:	brian, gad
2001-10-09 17:22:02 +00:00
mike
b47abc5bfe Don't mangle vendor ids to put them in __RCSID. Just ifdef all vendor
id cruft.

Submitted by:	bde
2001-10-09 16:40:04 +00:00
mike
a791aa8e97 Add a new libc function, strnstr(3), which allows one to limit the
number of characters that are searched.  This is especially useful
with file operations and non-NUL terminated strings.

Silence from:	-audit, -hackers
MFC after:	5 days
2001-10-09 01:29:56 +00:00
dfr
2ace3e9fb0 Port to ia64. Actually, just do like the alpha. 2001-10-08 08:29:52 +00:00
deischen
2af9e9b228 Limit maximum poll interval to 60 seconds. This prevents an overflow
from occurring when converting from a timeval/timespec to a timeout in
milliseconds.

Submitted by:	dwmalone
2001-10-07 02:34:43 +00:00
dfr
938988ca22 Make this work on ia64. I have no idea why it works on alpha - it
shouldn't.
2001-10-06 15:58:54 +00:00
dfr
dcbef22cf8 Fix a load of dependancy violations. 2001-10-05 18:52:42 +00:00
wpaul
c2125a4143 Add compatibility functions for the AF_LOCAL RPC transport stuff
that used to live in RPC 4.0. This is needed for yppasswd and
rpc.yppasswdd to work correctly. Patch supplied by Martin Blapp.
2001-10-04 21:03:17 +00:00
dwmalone
76bae86e04 Hopefully improve control message passing over Unix domain sockets.
1) Allow the sending of more than one control message at a time
over a unix domain socket. This should cover the PR 29499.

2) This requires that unp_{ex,in}ternalize and unp_scan understand
mbufs with more than one control message at a time.

3) Internalize and externalize used to work on the mbuf in-place.
This made life quite complicated and the code for sizeof(int) <
sizeof(file *) could end up doing the wrong thing. The patch always
create a new mbuf/cluster now. This resulted in the change of the
prototype for the domain externalise function.

4) You can now send SCM_TIMESTAMP messages.

5) Always use CMSG_DATA(cm) to determine the start where the data
in unp_{ex,in}ternalize. It was using ((struct cmsghdr *)cm + 1)
in some places, which gives the wrong alignment on the alpha.
(NetBSD made this fix some time ago).

This results in an ABI change for discriptor passing and creds
passing on the alpha. (Probably on the IA64 and Spare ports too).

6) Fix userland programs to use CMSG_* macros too.

7) Be more careful about freeing mbufs containing (file *)s.
This is made possible by the prototype change of externalise.

PR:		29499
MFC after:	6 weeks
2001-10-04 13:11:48 +00:00
mike
410b51e14f Include <string.h> to prototype strcpy(3). While I'm here, make use
of the new RCSID macros.

MFC after:	3 days
2001-10-04 04:42:03 +00:00
bde
71d76cfca4 Fixed various type errors in synopsis. 2001-10-03 16:53:59 +00:00
bde
5e08ed590f Fixed bitrot in synopsis. The TI-RPC changes gave mounds of it, mainly
inconsistently weird const poisoning in the man pages relative to the
headers.
2001-10-03 16:47:56 +00:00
bde
0d986df24b Fixed spelling of rpow in rpow's prototype. 2001-10-03 16:33:00 +00:00
bde
e64f47094e Fixed missing `const' in synopsis. 2001-10-03 16:29:21 +00:00
bde
4982d1b2d3 Fixed return type in synopsis. 2001-10-03 16:25:08 +00:00
bde
a456566921 Fixed bitrot in synopsis. The change of the color type from byte to u_long
had not reached here.
2001-10-03 15:20:03 +00:00
alfred
db8b7f5d13 Avoid getting stuck in system(3) when the internal call to wait4()
is interrupted by saving the pid.

The old code would assign the return value to pid which would trash
it, to fix the problem save a copy of the pid to be used as the
paramter to wait4().

Submitted by: Toshihiko ARAI <toshi@jp.FreeBSD.org>
2001-10-03 11:01:39 +00:00
bde
a3b5ec85c8 Don't install manpage links for the nonexistent functions exp2(),
exp2f(), log2() and log2f().
2001-10-03 06:30:11 +00:00
bde
165444d3d1 Removed .Nm's for the nonexistent functions exp2() and exp2f(). 2001-10-03 06:25:55 +00:00
bde
785e1fd6f3 Made this header self-sufficient.
Fully parenthesized a macro definition.
2001-10-03 05:25:07 +00:00
bde
530af36479 Fixed syntax errors in synopsis. The restrict keyword doesn't exist yet.
The corresponding bugs in <wchar.h> have no effect because the function
prototypes there don't have args so the __restrict "keyword" is
misinterpreted as an arg.
2001-10-03 05:19:47 +00:00
bde
3c074cac44 Fixed wrong arg type in synopsis. 2001-10-03 03:57:42 +00:00
bde
21ecd9170b Fixed bitrot in synopsis. The change of the return type of
Set_Boot_Blocks() from void to int had not reached here.  Callers
still don't check the new return value.
2001-10-03 03:49:48 +00:00
bde
cb1c1e4e9a Fixed misspelled arg type in synopsis. 2001-10-03 01:45:37 +00:00
bde
33b5f090cb Fixed missing include in synopsis. 2001-10-03 00:51:30 +00:00
ume
b0514e8539 - cope with sa_len < sizeof(struct sockaddr).
From: Patrik Lindergren <patrik@datacom.nu>
- delint (pointer cast issue).  from netbsd-current

Obtained from:	KAME
MFC after:	1 week
2001-10-02 13:51:29 +00:00
obrien
abaceb5ee3 Clean this up after the NetBSD syncing. 2001-10-01 23:10:48 +00:00
obrien
9478329f86 Fix ID's after a total boch CVS merge due to multiple people making
commits to these files.
As I sing to CVS:
	Have I told you lately that I hate your guts?  Have I told you
	all SCM's are above you?  You fill my heart with pain, take away
	all my merging joy, grow my troubles that's what you do."
2001-10-01 23:00:29 +00:00
obrien
6ff59f531c Our histedit.h lives in src/include. 2001-10-01 21:08:03 +00:00
ru
727c2b4b9e mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
ru
77d8d49afd Re-applied some of rev. 1.11 and 1.13 fixes that were lost in the last commit.
Fixed some more.
2001-10-01 15:53:07 +00:00
ru
9e260fdb3e mdoc(7) police: don't split author names in the AUTHORS section. 2001-10-01 13:50:03 +00:00
ru
53175e50f7 mdoc(7) police: markup nits. 2001-10-01 12:52:24 +00:00
ru
d15a85ee23 mdoc(7) police: s/atof/atoi/ 2001-10-01 12:44:24 +00:00
obrien
03d1a1b388 Add the 4.4-FreeBSD libperl.so.3 as the version in -CURRENT is .so.4. 2001-10-01 11:25:34 +00:00
obrien
8e328c32b7 Add the 4.4-FreeBSD libedit.so after the sh version bump in -CURRENT due
to the API changes from merging with the NetBSD libedit.
2001-10-01 09:26:23 +00:00
obrien
68b6f3dd6e What was I thinking???
<JEDI MIND TRICK>
	That was not the commit you wanted to get.
</JEDI MIND TRICK>
2001-10-01 09:25:49 +00:00
obrien
fcf29b52c0 What was I thinking....
<JEDI MIND TRICK>
	This is not the commit you wanted to get.
</JEDI MIND TRICK>
2001-10-01 09:22:04 +00:00
obrien
4a85a3467a Add the 4.4-FreeBSD libwrap after the sh version bump in -CURRENT due to
the API changes from merging with the NetBSD libwrap.
2001-10-01 09:17:23 +00:00
obrien
9d46f4f43a + Sync with NetBSD, bringing in feature enhancements.
+ Convert to ANSI-C function definitions
+ style(9)

Submitted by:	kris
2001-10-01 08:41:27 +00:00
dillon
48b7a24ebd Add huff __FBSDID()s puff to whew! libz 2001-09-30 22:39:00 +00:00
dillon
2f71d00c9b Add __FBSDID()s to liby 2001-09-30 22:36:18 +00:00
dillon
0e88e1c7c7 Add __FBSDID()s to libutil 2001-09-30 22:35:07 +00:00
dillon
2d72bd41cf Add __FBSDID()s to libusb 2001-09-30 22:30:55 +00:00
dillon
20f3660ca4 Add __FBSDID()s to libtelnet 2001-09-30 22:30:15 +00:00
dillon
bdb749a9f5 Add __FBSDID()s to libtacplus 2001-09-30 22:29:19 +00:00
dillon
db188ab31c Add __FBSDID()s to libstand 2001-09-30 22:28:01 +00:00
dillon
0c90d0d4c3 Add __FBSDID()s to librpcsvc 2001-09-30 22:15:15 +00:00
dillon
ed4315156b Add __FBSDID()s to libradius 2001-09-30 22:12:36 +00:00
dillon
a3cbbd5881 Add __FBSDID()s to libpam 2001-09-30 22:11:06 +00:00
dillon
624ee2f8ee Add __FBSDID()s to libopie 2001-09-30 22:04:49 +00:00
dillon
330ebb3184 Add __FBSDID()s to libnetgraph 2001-09-30 22:03:54 +00:00
dillon
1c4a4250e6 Add __FBSDID()s to libncurses 2001-09-30 22:02:43 +00:00
dillon
bb1769d86f Add __FBSDID()s to libncp 2001-09-30 22:01:19 +00:00
dillon
304955a186 Add __FBSDID()s to libmp 2001-09-30 21:58:17 +00:00
dillon
bc1ffc42bd add __FBSDID()s to libmd 2001-09-30 21:56:22 +00:00
dillon
66cde86f8d Add __FBSDID()s to libm 2001-09-30 21:53:45 +00:00
dillon
5adfa0ce0f Add __FBSDID()s to libipx 2001-09-30 21:45:06 +00:00
dillon
bd7955155d Add __FBSDID()s to libipsec 2001-09-30 21:43:45 +00:00
dillon
3a3db64dee Add __FBSDID()s to libio 2001-09-30 21:41:46 +00:00
dillon
5b1baf8bcf Add missing '*/' (? why wasn't this caught earlier?) 2001-09-30 21:39:44 +00:00
dillon
bb37da0bd1 Add __FBSDID()s to internal libgnumalloc() 2001-09-30 21:38:17 +00:00
dillon
4f5104ebf0 Add __FBSDID()s to libftpio 2001-09-30 21:36:38 +00:00
dillon
73e37106ba Add __FBSDID()s to libfetch 2001-09-30 21:36:09 +00:00
dillon
8fdbf9fd2f Add __FBSDID()s to libedit 2001-09-30 21:21:36 +00:00
dillon
b7a4fd6221 Add __FBSDID()s to libdisk 2001-09-30 21:16:57 +00:00
dillon
42c54ed53c Add __FBSDID()s to libcam 2001-09-30 21:13:43 +00:00
dillon
803b6750da Add __FBSDID's to libcalendar 2001-09-30 21:09:57 +00:00
dillon
2153b168ec __FBSDID() Cleanup 2001-09-30 21:06:00 +00:00
dillon
9d4bab5ebe Add __FBSDID's to libalias 2001-09-30 21:03:33 +00:00
peter
4ea382aca1 Update COMPAT3X libc from RELENG_3. This solves the problem of running
3.x binaries with a mixture of 3.x and 5.x libraries (eg: Metro-X server).
2001-09-28 22:30:07 +00:00
asmodai
715aa84d63 Add ERRORS section.
Mention thread safety and async-cancel safety status [not].
Add standards compliancy references.
Note strtol() is preferred over atoi().

MFC after:	2 weeks
2001-09-26 20:22:44 +00:00
asmodai
7254a98259 Be explicit about the POSIX version it conforms to [in this case 1990].
Put the error comment under the more appropriate ERRORS section.
2001-09-26 20:10:10 +00:00
asmodai
1057e03061 Change standards compliancy order so that C and POSIX are grouped. 2001-09-26 19:42:39 +00:00
ache
b6d95abd08 1) Back out ~/.login_conf disable
2) Pick only "me" class from ~/.login_conf as documented
2001-09-25 11:07:26 +00:00
murray
7d54bf6748 - Correct capitalization of a function name.
- Add a missing word to form a complete sentence.

PR:		docs/30626
Submitted by:	Dan Lukes <dan@obluda.cz>, and
		swear@blarg.net (Gary W. Swearingen)
2001-09-24 02:51:43 +00:00
ken
9f9207e121 Turn on WARNS?= 2 for libdevstat.
Submitted by:	"Sergey A. Osokin" <osa@freebsd.org.ru>
2001-09-23 23:03:23 +00:00
mike
2124c5cf78 Note that strdup(3) will set errno if memory allocation fails. This
is also required by the forthcoming POSIX.1-200x standard.

Obtained from:	malloc.3
2001-09-23 00:37:42 +00:00
dfr
b069d672e1 Fix a whole bunch of dependancy bugs and make it actually work when the
size is not a multiple of eight.
2001-09-22 18:27:01 +00:00
dfr
18649df8d0 Fix byte swapping - it was totally broken. 2001-09-22 18:22:53 +00:00
ru
8d57751206 Reset ``schg'' flag before removing stale libs. 2001-09-22 08:11:24 +00:00
rwatson
43ed18321b o Modify access(2) man page to describe eaccess(2), and add a symlink
so man eaccess will return the access(2) man page.

Obtained from:	TrustedBSD Project
2001-09-21 21:35:22 +00:00
ru
2981473d12 Fixed the bug that prevented communication with FTP servers behind
NAT in extended passive mode if the server's public IP address was
different from the main NAT address.  This caused a wrong aliasing
link to be created that did not route the incoming packets back to
the original IP address of the server.

	natd -v -n pub0 -redirect_address localFTP publicFTP

Note that even if localFTP == publicFTP, one still needs to supply
the -redirect_address directive.  It is needed as a helper because
extended passive mode's 229 reply does not contain the IP address.

MFC after:	1 week
2001-09-21 14:38:36 +00:00
ru
b6506667e7 Replace our stale-lib cleanup with a better one. (less bloated) 2001-09-21 11:32:51 +00:00
peter
678352084e Replace my stale-lib cleanup with a better one. (less noisy)
Submitted by: ru
2001-09-21 09:22:34 +00:00
peter
626f9d31af Put on my peril-sensitive sunglasses. Remove any old libraries that
we have just installed a replacement for.  This should solve the problem
of having a stale /usr/lib/libc.so.4 after we put a fresh
/usr/lib/compat/libc.so.4 in its place.
2001-09-21 09:10:09 +00:00
ru
771cf8368a Document the FTS_ROOTPARENTLEVEL and FTS_ROOTLEVEL constants. 2001-09-20 12:32:45 +00:00
obrien
141c92968c Shared libraries from 4.4-FreeBSD needed for proper binary compatibility. 2001-09-20 06:22:09 +00:00
sobomax
ca39cb6da3 Add support for loading bzip2-compressed filesystems. Among other things
this would allow to load bzip2-compressed kernels/modules from the loader(8)
(support for that will be committer separately).

MFC after:	1 month
2001-09-18 13:01:12 +00:00
ache
0ee8f35866 First appeared in 5.0, not in 4.4 2001-09-17 08:18:45 +00:00
mike
343aaecd7d style(9)
Silence from:	phantom
2001-09-17 00:23:19 +00:00
dillon
d375fe96be Implement __FBSDID() 2001-09-16 21:35:07 +00:00
rwatson
9863b0aeba Disable per-user .login_conf support due to incorrect merging of local
and globaly settings.  An alternative implementation will be developed.

Reported by:	Przemyslaw Frasunek <venglin@freebsd.lublin.pl>
2001-09-16 16:48:40 +00:00
dillon
8bf69256af Revamp FBSDID's for libatm. Restore original import rcsid as per bde
Reviewed by:	various people
2001-09-15 19:36:55 +00:00
rwatson
91edadf993 o Add a comment noting that the early setting of privileges for the purpose
of NFS home directory and root directory processing fails to include
  additional groups.  This doesn't impact the final credential, but does
  mean that users may be denied login even when additional groups might
  allow it.
2001-09-15 16:12:56 +00:00
dillon
7363b328ce Convert a library to use the new __FBSDID()'s for testing and review
purposes.
2001-09-15 03:42:10 +00:00
ru
030e2044c8 Unbreak build-tools -- build and use up-to-date ${HEADERS}.
These might not be present in /usr/include, or they may be
incompatible with the version we are building (for library
upgrades/downgrades).

This stopped the RELENG_4 buildworld on a -CURRENT box.
Well, this only fixes the issue if MFC'ed.  :-)
2001-09-14 15:27:51 +00:00
guido
b0b6927668 Typo: s/conatains/contains/
MFC after:	1 week
2001-09-12 17:57:31 +00:00
julian
aff3918a2c KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
ru
48443e707b mdoc(7) police: changed pure POSIX text; added missing markup bits. 2001-09-11 09:39:23 +00:00
ru
db3dcabb89 mdoc(7) police: removed commas from the standard (split) AUTHORS block. 2001-09-11 09:26:38 +00:00
asmodai
fb1ad2a222 Add more standards which we conform to.
Note our implementation is not thread nor async-cancel safe.
Explicitely note atof() does not check nor report errors.
Note that strtod() should be used instead.
2001-09-09 21:09:53 +00:00
asmodai
cb6fa75c43 Detail thread-safe and async-cancel-safe status.
Also add C99 conformity status plus clarification that C99 leaves the
flushing of unwritten data, closure of open streams, and removal of
temporary files to the implementation.
2001-09-09 18:52:00 +00:00
ache
5642ea6546 1) If __SAPP stream is not seekable, remove __SAPP flag on first call instead
of repeating unsuccessful lseek call on each write (original stdio bug).

2) Save errno accross _sseek call in _swrite to not touch it in case write
success (original stdio bug).

3) Add _sseek error checking back, but only for __SOPT mode now.
2001-09-07 17:16:02 +00:00
asmodai
f0fdba1cc7 Move to using .In instead of .Fd #include <> for include mark-up.
Inspired by comment from:	dd
2001-09-07 14:46:36 +00:00
phantom
8fd828771b reconnect strfmon.c to build list 2001-09-07 13:03:16 +00:00
asmodai
c6e3253504 Fix some mdoc nits caused by my knowledge not being too up-to-date on
mdocNG.

Submitted by:	dd
2001-09-07 12:38:10 +00:00
dfr
c5cd6f57fa Port to ia64, taking into account the fact that pagesizes may be variable. 2001-09-07 12:32:43 +00:00
asmodai
7c671a32ab Add strfmon.3 to the fray.
This is a first cut, but enough to help people interested in using it
further than before.
More text coming to illustrate use and provide more details.

Based on standards' text.
2001-09-07 09:55:28 +00:00
ache
9f0b8ed26e For now just back out seek error checking in __SAPP case, it cause problems
with non-seekable streams.  Now here is what here was originally, but it is
ugly, producing unneded seek syscall on each non-seekable stream write.  I'll
think about proper solution later.
2001-09-07 02:13:11 +00:00
yar
4e29608365 Fix all the ambiguous or erroneous statements of the brk(2)
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
2001-09-06 12:11:22 +00:00
phantom
9784bbd50b correctly wrap macros with { } 2001-09-06 09:26:28 +00:00
kris
524d719550 Add zopen(), a stdio wrapper for gzipped data streams.
Obtained from:	NetBSD
2001-09-06 09:14:49 +00:00
obrien
484d437d06 strfmon(3) is not ready to go live. 2001-09-06 08:58:42 +00:00
phantom
0b2a8aa112 Add strfmon(3) implementation. It still contains few XXX's because I lost
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
2001-09-05 18:50:02 +00:00
ru
1ecc101a06 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
des
0db879e589 Use fseeko() instead of fseek() (u->offset is already an off_t), and mark
some function arguments as unused.
2001-09-05 12:22:28 +00:00
rwatson
6a02e9ab06 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
36a7b5dd63 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
ed895616ff Remove rcsids and unneded include 2001-09-04 17:41:20 +00:00
ache
5d51401b40 'acc' is not initialized in one hypotetical case, fix it 2001-09-04 17:12:15 +00:00
markm
90cd94fb46 1) repair the return value in the PAM_RETURN() macro (Side effects!!).
2) canonicalise the options use in pam_options().

Submitted by:	Gunnar Kreitz <gunnark@chello.se>
PR:		30250
2001-09-04 17:05:08 +00:00
ache
05ced81948 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
60b84b2ad7 Implement _setjmp()/_longjmp().
Obtained from: Intel's EFI toolkit
2001-09-04 08:27:39 +00:00
dd
c04bc9020f 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
441b4d8fc9 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
dfr
f8fc031664 Remove bogus implementation of _setjmp/_longjmp 2001-09-03 14:19:02 +00:00
murray
f0c4c8f6c8 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
kris
c2afb2f049 Check for malloc failure in a couple of cases
MFC after:	2 weeks
2001-09-03 05:57:06 +00:00
ache
cafec4e6e9 When __SOPT is cleared, clear __SOFF too.
NOTE: original stdio bug.
2001-09-03 02:35:10 +00:00
ache
eb856b3441 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
28f9a3deab 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
a20179f385 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
7016e01313 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
92941cea51 Remove MLINKS seek.2 to lseek.2, we don't have seek.2 syscall 2001-09-02 19:28:41 +00:00
ache
5e04bb177f Typo seek(2) -> lseek(2) 2001-09-02 19:24:07 +00:00
ache
9e2731545a 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
3ac75f8536 Another punctuation fix (missing comma ending preposition). 2001-09-01 21:32:52 +00:00
chris
98b1387ed7 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
1884501edb 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
995dba2741 Remove even more unneded checks, original code can't overflows in that place 2001-09-01 15:01:37 +00:00
ache
ca9e5330a4 Remove two checks unneeded now (can't happens) 2001-09-01 14:48:45 +00:00
ache
8f0ae93dff Make fseek(... SEEK_CUR) fails if current file-position is unspecified. 2001-09-01 14:40:01 +00:00
ache
6c12b81f9e Note that prev. commit addition is for ftell/ftello 2001-09-01 14:23:30 +00:00
ache
881c3de923 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
ce1052ddf1 Describe file-position behaviour from POSIX 2001-09-01 14:01:52 +00:00
ache
95153484d6 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
7969ae86e7 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
d2dd124ce9 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
8600372379 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
623bb334e1 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
4dd49b9b5f Describe EOVERFLOW I implement per POSIX.
Sort ERRORS section
2001-08-31 23:06:28 +00:00
ache
80e4821772 Add originally missing __sinit() call. 2001-08-31 20:36:19 +00:00
ache
35e82e09ce Simplify offset underflow checks even more 2001-08-31 20:17:32 +00:00
ache
e597389e9e Describe that we disallow ungetc at offset 0 now. 2001-08-31 20:03:49 +00:00
ache
dd1a040c2e Disallow ungetc at offset 0 (to prevent negative offset happens), so simplify
checks in ftell.
2001-08-31 19:50:25 +00:00
ache
77380a7fba Drop buffer first, _then_ ask for real position 2001-08-31 18:54:44 +00:00
ache
610e2d4159 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
579639b198 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
a0ba17755e Initialize _offset to 0 in fopen(), it helps to optimize fseek/ftell 2001-08-31 13:14:49 +00:00
ache
6633ea2c9b Detect fp->_offset overflow on read
Use errno to catch negative seek with -1 offset
2001-08-31 12:55:22 +00:00
ru
110427f9fb Add manpage for inet_net_ntop(3) and inet_net_pton(3).
Obtained from:	NetBSD
2001-08-31 10:54:44 +00:00
ru
62a7940402 Use ``.Rv -std'' wherever possible.
Submitted by:	yar
2001-08-31 09:57:38 +00:00
rwatson
0c60d06e85 o Use .Fx to refer to FreeBSD
Submitted by:		tmm
Obtained from:	TrustedBSD Project
2001-08-31 02:12:54 +00:00
rwatson
3e80e7cd1c 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
3760deb245 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
c6c34215f7 Add Xref to make.conf(5). 2001-08-30 21:44:46 +00:00
ache
54afb32fa2 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