Commit Graph

3268 Commits

Author SHA1 Message Date
Bruce Evans
bdc5bab2eb Don't leave stack garbage in the reserved fields of the header. 2002-02-15 02:37:08 +00:00
Bruce Evans
2c316efdf3 Fixed style bugs in rev.1.5:
- missing whitespace
- strange version of warn() built out of warnx() + strerror().  Just use
  warn().
- conversion of just one of the two perror()'s to warn*()

Actually use _warn() instead of _warn(), to keep up with namespace-
unpollution for warn().
2002-02-15 02:28:50 +00:00
Warner Losh
63195486ba Use new-style function declations. 2002-02-13 09:30:47 +00:00
Dima Dorfman
c96bb7c5f2 Don't make it seem like vm.max_proc_mmap only affects MAP_FIXED.
PR:		34005
Submitted by:	Steven Grady <grady@digitaldeck..com>,
		Hiten Pandya <hitmaster2k@yahoo.com>
2002-02-10 21:07:56 +00:00
Robert Watson
c0858e0a77 Part III: Update extended attribute system call interface documentation.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-02-10 04:46:28 +00:00
Ruslan Ermilov
2ef702f52a FreeBSD 4.1 bootstrapping aid (__FBSDID is not there). 2002-02-08 09:34:17 +00:00
Alfred Perlstein
866e3c9008 Move the AF_LOCAL check to the AF_INET check since portmap protocol
v. 2 only needs this. That also makes it shorter and simpler.

Submitted by: mbr
2002-02-06 19:14:02 +00:00
Dag-Erling Smørgrav
dc584ddbc5 ANSIfy and remove some dead code.
Sponsored by:	DARPA, NAI Labs
2002-02-06 15:26:07 +00:00
Dag-Erling Smørgrav
ed4d1c46a2 Apply the following mechanical transformations in preparation for
ansification and constification:

    s{\s+__P\((\(.*?\))\)}{$1}g;
    s{\(\s+}{\(}g;
    s{\s+\)}{\)}g;
    s{\s+,}{,}g;
    s{(\s+)(for|if|switch|while)\(}{$1$2 \(}g;
    s{return ([^\(].*?);}{return ($1);}g;
    s{([\w\)])([!=+/\*-]?=)([\w\(+-])}{$1 $2 $3}g;
    s{\s+$}{\n};g

Also add $FreeBSD$ where needed.

MFC after:	1 week
2002-02-06 13:30:31 +00:00
Alfred Perlstein
1c71deff79 balance parens.
Submitted by: mbr
2002-02-05 23:56:29 +00:00
Alfred Perlstein
2abd9cf115 For RPC v2 we need to fill in ret->xp_raddr too. INET_6
is not supported in portmap, so we don't have to care about it.

Submitted by: mbr
2002-02-05 23:46:37 +00:00
Alfred Perlstein
8d6301358e Fix cc -Wall, fix rcsid warnings, add missing prototypes,
change prototypes to be the same as in the original sun tirpc code.
Remove ()P macro in a file where the mayority had ()P already removed.
Add them if the mayority use ()P macros.

Submitted by: mbr
Requested by: bde
2002-02-05 23:43:43 +00:00
Alfred Perlstein
e4db1131b8 Do not call addrinfo on local transport adresses, if returning a
server handle (for reuse or whatever). We just return now a handle
connected to the local rpcbind.

Do not try to call checkcache, if host = NULL;

Submitted by: mbr
2002-02-05 23:12:51 +00:00
Alfred Perlstein
49de9dcd8b style: return(x) -> return (x)
Submitted by: mbr
2002-02-05 19:31:16 +00:00
Alfred Perlstein
08760d5a57 Fix the credential handling code.
In NetBSD, Solaris, xprt->xp_p2 pointed directly to the credentials,
in FreeBSD xprt->xp_verf.oa_base was a pointer to a struct cmessage,
which is defined as follow:

struct cmessage {
        struct cmsghdr cmsg;
        struct cmsgcred cmcred;
};

The credentials were submitted the right way and xprt->xp_p2 pointed to them.
But cb_verf.oa_flavor was still empty. There was an assignment missing
in svc_recv() in svc_vc.c:

msg->rm_call.cb_verf.oa_flavor = AUTH_UNIX;

Also

+       if (addr.ss_family == AF_LOCAL) {
+               xprt->xp_raddr = *(struct sockaddr_in *)xprt->xp_rtaddr.buf;
+               xprt->xp_addrlen = sizeof (struct sockaddr_in);
+       }

was missing. But the first seems not to be needed:

I guess in rpc.yppasswdd there was a typo:

- transp>xp_verf.oa_flavor != AUTH_UNIX) {
+ rqstp->rq_cred.oa_flavor != AUTH_UNIX) {

This little fix does fix the breakage in rpc.yppasswdd :-)

+       if (msg.msg_controllen == 0 ||
+           (msg.msg_flags & MSG_CTRUNC) != 0)
+               return (-1);

We cannot set the cb_verf.oa_length in svc_recv() of svc_vc.c,
the credentials get overwritten then, and that's bad.

Submitted by: mbr
2002-02-05 19:30:30 +00:00
Alfred Perlstein
8858373f83 The clnt_create(KEYSERVSOCK, CRYPT_PROG, CRYPT_VERS, "unix") hacks
were removed and replaced them with clnt_tp_create, now the af_local
support is fixed.

I also removed the hack how rpcinfo contacted rpcbind, now we can
relay on clnt_tp_create create the client-handle for us.  Only
rpcbind itself needs a hardcoded socket-path.

Submitted by: mbr

Also add $FreeBSD
2002-02-05 19:26:04 +00:00
Maxim Sobolev
c6de4ce791 Allow ldd(1) be used on shared libraries in addition to executables. 2002-02-04 10:33:48 +00:00
Bruce Evans
49efc51214 Fixed tab lossage in vendor id and nearby style bugs in previous commit. 2002-02-01 23:26:32 +00:00
Bruce Evans
eb0a30f4c1 Fixed syntax error in previous commit. It was non-fatal because it was
in conditional code that happens not to be compiled, and because gcc
doesn't complain garbage after #endif by default.

Fixed some style bugs in previous commit, 1.8 and 1.1.
2002-02-01 23:16:39 +00:00
Peter Pentchev
b484faa5e0 Return ENONAME if getaddrinfo() is called with AI_NUMERICHOST
and the hostname given is not numeric.

PR:		34390
Submitted by:	Serge van den Boom <svdb@stack.nl>
Approved by:	silence from -net
MFC after:	1 month
2002-02-01 08:35:16 +00:00
David E. O'Brien
60e104f3f5 Fixed slipage in editor. 2002-02-01 07:26:00 +00:00
David E. O'Brien
26a2df7351 Cut-n-paste in `list' mode considered harmful. 2002-02-01 07:25:07 +00:00
David E. O'Brien
a99d101352 * Remove __P and convert to ANSI prototypes.
* Remove 'register'.  (some functions had 7+ register functions...)
* Fix SCM ID's.
2002-02-01 01:39:09 +00:00
David E. O'Brien
b231cb3945 * Remove __P and convert to ANSI prototypes.
* Remove 'register'.  (some functions had 7+ register functions...)
* Fix SCM ID's.
2002-02-01 01:32:19 +00:00
David E. O'Brien
22626efa0f * Remove 'register'. (some functions had 7+ register functions...)
* Fix SCM ID's.
2002-02-01 01:08:48 +00:00
David E. O'Brien
ea8d448a92 Fix SCM ID's. 2002-02-01 00:57:29 +00:00
David E. O'Brien
ec4c2e3605 Fix minor style nit. 2002-01-31 17:26:37 +00:00
Chris D. Faulhaber
ea018aa260 Revert last commit. stdio.h include is for perror(), not strerror() 2002-01-31 13:32:14 +00:00
Chris D. Faulhaber
066f7169c1 strerror(3) is in string.h, not stdio.h
MFC after:	1 week
2002-01-31 13:20:48 +00:00
Bruce Evans
56bcbf00e2 Fixed world breakage due to missing include of <sys/cdefs.h> in previous
commit.

Fixed related style bugs:
basename.c: misplaced '#if 0'
dirname.c: misplaced '#if 0'
getgrent.c: missing '#if 0', and tab lossage in vendor id (the previous
            commit fixed the complete corruption of the vendor id but
	    lost a tab)
getpwent.c: missing '#if 0'
2002-01-31 12:58:36 +00:00
David E. O'Brien
135b57f906 Fix FreeBSD IDs. 2002-01-30 21:36:57 +00:00
Chris D. Faulhaber
60fba73589 Correct function's description.
Obtained from:	TrustedBSD Project
2002-01-29 12:18:45 +00:00
Andrey A. Chernov
831e8f614c Do not try to convert to char already converted C monetary locale members.
Do this conversion on locale load stage instead.
2002-01-28 08:26:38 +00:00
Chris D. Faulhaber
d5af31a255 o return EINVAL if acl_to_text() have been sent a NULL acl. o update copyright dates.
Reviewed by:	rwatson
2002-01-26 19:32:50 +00:00
David Malone
ab09ef008f Use ctime_r to build the timestamp for syslog, so that we don't
clobber a ctime buffer which is passed in.

PR:		34022
Submitted by:	Hartmut Brandt <brandt@fokus.gmd.de>
MFC after:	2 weeks
2002-01-25 21:49:34 +00:00
Alexey Zelkin
a2fb0481d7 get __time_load_locale() prototype from include file, rather than declare
own
2002-01-24 15:38:59 +00:00
Alexey Zelkin
bcbeac34ae * style(9)'fy
* declare prototype for __time_load_locale() in timelocal.h
2002-01-24 15:07:44 +00:00
David Malone
98d1592458 Change brk's prototype from char *brk(const char *) to int brk(const void *)
and sbrk's prototype from char *sbrk(int) to void *sbrk(intptr_t).

This makes us more consistant with NetBSD and standards which include
these functions. Bruce pointed out that ptrdiff_t would probably
have been better than intptr_t, but this doesn't match other
implimentations.

Also remove local declarations of sbrk and unnecessary casting.

PR:		32296
Tested by:	Harti Brandt <brandt@fokus.gmd.de>
MFC after:	1 month
2002-01-24 12:11:31 +00:00
Ruslan Ermilov
0e65089b79 The sixth argument to the NET_RT_IFLIST sysctl is actually 0 for
all interfaces, and ifnet.if_index value for a single interface.
2002-01-23 12:48:08 +00:00
Andrey A. Chernov
ff7448f849 Restore C99 standard conformance information, isblank() _is_ in final
standard document

Pointed by: "Jacques A. Vidrine" <n@nectar.cc>
2002-01-22 20:14:35 +00:00
Mark Murray
5567b258eb Use the proper type (gid_t) for (group)->gr_gid to be orthogonal
with uid_t usage and (user)->pw_uid.

PR:		3242
2002-01-22 17:32:53 +00:00
Ruslan Ermilov
0dc5e09ec6 Fix the description of the O_NONBLOCK flag to match reality.
Prodded by:	Maxim Konovalov <maxim@macomnet.ru>
Obtained from:	BSD/OS
2002-01-22 14:18:55 +00:00
Ruslan Ermilov
0c7f152b7b Fix a typo I made in revision 1.5.
Submitted by:	trevor
2002-01-22 12:38:43 +00:00
Yaroslav Tykhiy
b454be098e Minor typo fix: uquad_t -> u_quad_t. 2002-01-20 16:50:29 +00:00
Matthew Dillon
170ac683f2 I've been meaning to do this for a while. Add an underscore to the
time_to_xxx() and xxx_to_time() functions.  e.g. _time_to_xxx()
instead of time_to_xxx(), to make it more obvious that these are
stopgap functions & placemarkers and not meant to create a defacto
standard.  They will eventually be replaced when a real standard
comes out of committee.
2002-01-19 23:20:02 +00:00
Ruslan Ermilov
89ac4ecce1 mdoc(7) police: tidy up OpenBSD fixes. 2002-01-16 15:21:39 +00:00
Mike Barcroft
4681597d9a Add a few cleanups from rev 1.1:
o Restore vendor ID.
o Order variable types by size.
o Remove a gratuitous temporary variable.

Submitted by:	bde
2002-01-15 17:52:21 +00:00
Mike Barcroft
1936b2c83b o Add prototype for printf(3).
style(9):
o Order variables in declarations.
o Move initialization out of declaration.
o Fix over-indents in previous delta.
2002-01-15 08:50:28 +00:00
Mike Barcroft
f601b5ba4b style(9)
Submitted by:	Joseph Mallett <jmallett@xmach.org>
Reviewed by:	md5(1)
2002-01-15 08:26:58 +00:00
Ruslan Ermilov
491a842962 yp(4) -> yp(8).
PR:		docs/30797
2002-01-14 16:59:03 +00:00
Crist J. Clark
971730fc67 Merge some updates and markup fixes from OpenBSD. This is mainly
motivated by the new "CAVEATS" section.

Inspired by:	alfred noting NetBSD's merging OpenBSD's changes
Obtained from:	OpenBSD
2002-01-14 02:08:02 +00:00
Doug White
2b8877f486 Add xref for timeradd(3).
PR:		13079
2002-01-14 00:38:41 +00:00
Daniel Eischen
aee4cebfe7 Include <stddef.h> to fix build problem when namespace pollution
by <signal.h> (including <time.h> so that NULL is accidentally defined)
is removed.

Style nits.

Submitted by:	bde
2002-01-11 19:46:08 +00:00
Bruce Evans
b9c35b6942 Fixed unsorting and splitting of SRCS in previous commit. 2002-01-11 17:10:35 +00:00
Bruce Evans
614acf2fad Fixed missing backslash in previous commit. 2002-01-11 16:08:49 +00:00
Bruce Evans
b944866c25 Fixed accumulated unsorting and some other style bugs (long lines). 2002-01-11 15:59:30 +00:00
Bruce Evans
afac94af5c Replaced bogus cross references by the usual one for the ctype family
(ctype(3)).
2002-01-11 15:39:50 +00:00
Bruce Evans
87e0032026 Removed assertion that isblank() conforms to C90 too. This assertion
is correct but less than useful.  There is some uncertainty about whether
isblank() is in C99, but it is certainly not in C90.  It just conforms
to C89 because it is a conforming extension.
2002-01-11 15:21:03 +00:00
Bruce Evans
5fb3acfaaf Fixed unsorting of almost all lists in previous commit.
Removed assertion that isblank() is in C99 here too.
2002-01-11 15:15:17 +00:00
Bruce Evans
758671eb0d Fixed unsorting of MLINKS in previous commit.
Fixed unsorting of SRCS in rev.1.18.
2002-01-11 14:57:11 +00:00
Nik Clayton
6a3003ce51 Remove assertion that isblank() is in C99, pointed out by ache. 2002-01-10 12:22:00 +00:00
Daniel Eischen
b66b8326e5 Add getcontext, setcontext, makecontext, and swapcontext. These
functions are defined in SUSv2 and the latest POSIX spec.

Thanks to Bernd Walter <ticso@cicely8.cicely.de> for helping debug my
alpha assembly.

Approved by:	-arch
2002-01-10 02:40:59 +00:00
Sheldon Hearn
7f6a22a549 Document behaviour with respect to interval timers.
PR:		33156
Submitted by:	Peter Jeremy <peter.jeremy@alcatel.com.au>
2002-01-09 14:44:06 +00:00
Ruslan Ermilov
58c0fdd850 mdoc(7) police: add missing markup bits for ``errno''. 2002-01-09 14:03:54 +00:00
Ruslan Ermilov
ce9df6eefc mdoc(7) police:
Stop abusing the .%J macro for where the .Pa macro should have been used.
2002-01-09 14:01:22 +00:00
Nik Clayton
26dabb6003 From the PR:
1. ctype.h defines digittoint(), isnumber() and ishexnmber(), yet
        they are not documented in any of the manpages.

        2. The ctype manpage references a non-existent manpage for
        digittoint().

        3. The isascii() manpage claims it is standards compliant, when
        it isn't.

        4. isblank() claims it is _not_ standards compliant, when it
        is.

Fix by including the appropriate .Nm entries, and with a new digittoint.3
page.

PR:		docs/26451
Submitted by:	Adrian Filipi-Martin <adrian@ubergeeks.com>
2002-01-09 13:43:31 +00:00
John Baldwin
7b5f59222e Fix some 32/64-bit bugs. IPv4 addresses are 32-bits, not longs. On the
alpha these bugs didn't cause any problems because it was little endian,
but on sparc64, we ended up with garbage for the IP address when we tried
to contact the server.  (Usually 3.253.0.0)

Not objected to by:	wpaul
2002-01-08 18:05:03 +00:00
Chris D. Faulhaber
98a32f6de6 Correct phrase 'get an ACL' to 'set an ACL'.
PR:		33660
Submitted by:	Rich Morin <rdm@cfcl.com>, Tom Rhodes <darklogik@pittgoth.com>
2002-01-07 22:46:14 +00:00
Dima Dorfman
bfe4f323ec We are munmap(2), so there's no need to list ourselves in the SEE ALSO
section; instead, list our partner in crime, mmap(2).

PR:		33153
Submitted by:	Faried Nawaz <fn@hungry.org>
2002-01-07 06:12:25 +00:00
Dima Dorfman
cf1b88ff74 Nuke the paragraph that says "One can obtain user connection request
data without confirming the connection by issuing a recvmsg(2) [...]".
There's no such code in the kernel.

PR:		26861
Submitted by:	Richard A Steenbergen <ras@e-gerbil.net>,
		Tom Rhodes <darklogik@pittgoth.com>
2002-01-07 06:10:37 +00:00
Dima Dorfman
b06e8b97a9 Suggest using memmove(3) if src and dst may overlap.
PR:		33298
Submitted by:	Tim J. Robbins <tim@robbins.dropbear.id.au>
2002-01-07 06:03:37 +00:00
Chris Costello
6ba681a185 All information from the "BUGS" section not belonging in "SECURITY
CONSIDERATIONS" moved to "COMPATIBILITY".

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-01-06 21:48:37 +00:00
Chris Costello
e125c135a8 Add new "SECURITY CONSIDERATIONS" sections.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-01-06 21:16:41 +00:00
Chris Costello
41f91cb492 Add a new `SECURITY CONSIDERATIONS' section. Sample code similar to
the first revision of strcpy(3)'s section is included, but should be
removed as the Security Architecture document is committed and
completed.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-01-05 20:44:34 +00:00
Chris Costello
80080d642e Include a section cross-reference to EXAMPLES' in SECURITY
CONSIDERATIONS' as a source for relevant sample code.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-01-05 20:36:47 +00:00
Chris Costello
8680aaea87 Remove the example from SECURITY CONSIDERATIONS. This is mostly
duplicated code from EXAMPLES.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-01-05 20:24:38 +00:00
Yaroslav Tykhiy
f381837242 Minor grammar and punctuation fixes
in the SO_ACCEPTFILTER description.
2002-01-04 18:17:07 +00:00
Yaroslav Tykhiy
996d4dc275 State clearly that one should call listen(2) on a socket
at first and try to set an accept_filter(9) on it only after that.
Also document errno value that will be set if installing the
filter on a non-listening socket.
2002-01-04 18:12:38 +00:00
Chris Costello
17dc85f4d0 Copy the sample `SECURITY CONSIDERATIONS' section from sec-doc.7.
This will be trimmed as the FreeBSD Security Architecture document
is fleshed out and committed.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-01-02 19:56:57 +00:00
Jake Burkholder
29c3ea8424 Connect user trap code to the build. 2002-01-01 21:59:53 +00:00
Jake Burkholder
6ce4e876a7 Add libc side of user trap handling.
Add support for handling floating point disabled traps mostly in userland
for the simple single threaded case.  Not yet enabled by default.
Implement __sparc_utrap_install as specified by the sparc abi.
2002-01-01 21:58:32 +00:00
Andrey A. Chernov
f7388e0d38 Back out errno preserving 2001-12-30 03:34:46 +00:00
Jake Burkholder
1b46a084f3 Make sure curbrk is well aligned. 2001-12-29 06:40:58 +00:00
Jake Burkholder
c0c4d2cf25 Use jmpbuf offsets, not ucontext_t. 2001-12-29 06:40:35 +00:00
Jake Burkholder
cd4f8a8c2c Add .register directives for gcc3.
Adapt to jmpbuf no longer being a ucontext_t.
Restore the context "by hand" in longjmp and call sigprocmask, instead
of just using sigreturn.
2001-12-29 06:39:53 +00:00
Jake Burkholder
c5a29982d3 __infinity is not const. 2001-12-29 06:38:31 +00:00
Jake Burkholder
c1682cb423 Add jmpbuf offsets. Remove ucontext offsets. 2001-12-29 06:38:06 +00:00
Jake Burkholder
5b3fb165d9 Add .register directives for gcc3.
Adapt to jmpbuf no longer being a ucontext_t.
Call abort if longjmperror returns.
2001-12-29 06:37:33 +00:00
Jake Burkholder
cafb96f2df Include utrap.h for soft trap types. 2001-12-29 06:36:07 +00:00
Jake Burkholder
024675337e We use HIDENAME(minbrk) on sparc64 too. 2001-12-29 06:35:19 +00:00
Mike Pritchard
432fda11a4 Add xref to jail(2).
PR:		docs/33177
Submitted by:	Tom Rhodes <darklogik@pittgoth.com>
2001-12-28 09:26:45 +00:00
Hajimu UMEMOTO
676e98714d - Make it possible to turn on RES_INSECURE[12] with /etc/resolv.conf.
- Don't connect datagram socket if RES_INSECURE1.
- Needed to implement IPv6 anycast UDP DNS queries as documented in
  <draft-ietf-ipngwg-dns-discovery-03.txt>.

Obtained from:	KAME
2001-12-26 21:21:10 +00:00
Andrey A. Chernov
98b870fa7b Add "except the handling of errors" into "equivalent to" paragraph.
Pointed by:	bde
Inspired by:	POSIX
2001-12-25 08:43:35 +00:00
Andrey A. Chernov
b12990ca58 Preserve errno.
According to C99:
"The  functions  atof,  atoi,  atol, and atoll need not
affect the value of  the  integer  expression  errno  on  an
error.   If  the  value of the result cannot be represented,
the behavior is undefined."
2001-12-25 04:10:50 +00:00
Alexey Zelkin
0388ec7cac Back out recent replacement of LC_MESSAGES file with directory.
Requested by:   ache
2001-12-24 11:49:49 +00:00
Chris Costello
d06a764812 o Change the layout of the tagged lists to be like those in acl(3).
o Document the following capabilities: CAP_NET_ADMIN, CAP_SYS_RAWIO,
  CAP_SYS_ADMIN, and CAP_SYS_TTY_CONFIG.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2001-12-23 00:19:48 +00:00
Daniel Eischen
8572518672 Save and restore t12 in the jmp_buf. t12 is used during function
calls.

This change allows libc_r to create thread contexts with a different
stack and return address.

With much detective work by: Bernd Walter <ticso@cicely.de>
2001-12-22 06:06:17 +00:00
Peter Wemm
57c3d698c2 The VM_STACK option is long dead. MAP_STACK is available everywhere. 2001-12-21 17:24:10 +00:00
Alexey Zelkin
709eed76bd Slightly re-work locale messages storage scheme. Before this commit
LC_MESSAGES related data was installed to <locale>/LC_MESSAGES file.
Now it go to <locale>/LC_MESSAGES/SYS_LC_MESSAGES file. LC_MESSAGES
directory is supposed to be storage of message catalogs of userland tools.
This should allow us to avoid many potential problems with future
libintl related functionality introduction.

Thanks for useful suggestions about correct way how to replace plain
files with directories at installworld stage to: Ruslan Ermilov <ru>
2001-12-21 13:14:02 +00:00
Alexey Zelkin
f43a321bf0 style(9)'ify 2001-12-20 18:28:52 +00:00
Alexey Zelkin
f2d0f4274b Add my e-mail to copyrights 2001-12-20 15:30:02 +00:00
John Baldwin
6507c9a129 Document that rfork() will return EINVAL if flags not listed in the
manpage are passed in.
2001-12-19 00:59:54 +00:00
Alexey Zelkin
2e394b2fc1 Fix some style bugs
Prompted by:	mike
2001-12-17 15:11:29 +00:00
Peter Wemm
8754b1ac25 clnt_bcast.c:420:33: warning: extra tokens at end of #endif directive 2001-12-15 00:07:37 +00:00
Alexey Zelkin
e578c6f17c * cleanup comments and defines
Reviewed by:	bde
2001-12-14 11:36:37 +00:00
Alexey Zelkin
243e90d646 Also fix cases when thousands separator should be put before number. For
example before for grouping sequence "\003\003" number 123456 was formated
as ",123,456", now "123,456".
2001-12-13 21:05:27 +00:00
Alexey Zelkin
98ee763522 Respect locale while handling of \' flag.
In original version grouping was hardcoded. It assumed that thousands
separator should be inserted to separate each 3 numbers. I.e. grouping
string "\003" was assumed for all cases. In correct case (per POSIX)
vfprintf should respect locale defined non-monetary (LC_NUMERIC
category) grouping sequence.

Also simplify thousands_sep handling.
2001-12-13 19:45:41 +00:00
Ruslan Ermilov
358034bcfe If the OID is missing, sysctl(3) returns ENOENT, not EOPNOTSUPP.
PR:		docs/32793
Submitted by:	Hartmut Brandt <brandt@fokus.gmd.de>
2001-12-13 10:59:00 +00:00
Ruslan Ermilov
6184d98a2a mdoc(7) police: minor markup nits. 2001-12-12 15:02:32 +00:00
Ruslan Ermilov
f7475de715 mdoc(7) police: fix markup, bump document date. 2001-12-12 14:53:51 +00:00
Ruslan Ermilov
f0cc88ffed mdoc(7) police: kill HSBs, add missing comma. 2001-12-12 14:41:53 +00:00
Ruslan Ermilov
9a05e59078 mdoc(7) police: fix markup. 2001-12-12 14:40:09 +00:00
Ruslan Ermilov
2554caf28c mdoc(7) police: Minor formatting nits and optimizations to rev. 1.34. 2001-12-12 14:36:28 +00:00
Ruslan Ermilov
de400a7b97 mdoc(7) police: use no-break space. 2001-12-12 13:46:15 +00:00
Ruslan Ermilov
f079ab33c6 mdoc(7) police: use no-break space, fix markup. 2001-12-12 13:45:35 +00:00
Ruslan Ermilov
5411c22ae5 mdoc(7) police: use non-break space, remove whitespace at EOL, fix markup. 2001-12-12 13:42:25 +00:00
Alexey Zelkin
52d6b43026 Add my e-mail to copyrights 2001-12-11 16:00:47 +00:00
Alexey Zelkin
74f2b97544 * Add my e-mail to copyrights
* style(9)'ify
2001-12-11 15:55:42 +00:00
Alexey Zelkin
b21656a8f4 Fix grouping string handling 2001-12-11 15:26:36 +00:00
Ruslan Ermilov
edd2da71b2 Start using .St macro for POSIX.1-2001. 2001-12-08 19:06:23 +00:00
Alexey Zelkin
a94da0a9f3 Get rid of unused anymore file! Alpha works fine with our strtod() now. 2001-12-07 17:19:09 +00:00
Andrey A. Chernov
f34b139cda Return 'c' back to signed due to potential comparison problems
Use simpler test for valid ranges

Submitted by:	bde
2001-12-07 16:33:47 +00:00
Ruslan Ermilov
6cbb6156c3 Fix a typo.
Submitted by:	"Alexey V. Neyman" <alex.neyman@auriga.ru>
2001-12-07 14:58:41 +00:00
Alexey Zelkin
7ae5c6791e * localeconv() usage is not FLOATING_POINT specific anymore (due to "'" flag
addition) so move locale.h inclusion out of FLOATING_POINT ifdef's.
* add more comments
2001-12-07 12:38:47 +00:00
Wes Peters
556f162ac0 Make strerror and strerror_r use sys_errlist[0] for errnum = 0. Be
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)
2001-12-07 06:28:58 +00:00
Bill Fenner
828829cda5 Remove blank line. 2001-12-07 03:25:26 +00:00
Wes Peters
f61a2ede84 New, improved, more Posix-compliant strerror_r implementation,
complete with documentation.

Reviewed by:	mike@ gad@
MFC after:	1 week
2001-12-06 04:53:31 +00:00
Andrey A. Chernov
8ede26d773 Clarify ' ' space issue 2001-12-05 16:33:11 +00:00
Ruslan Ermilov
dd98d57b45 mdoc(7) police: markup the previous delta. 2001-12-04 16:09:27 +00:00
Dag-Erling Smørgrav
6478822fba Correct some egregious style bugs. 2001-12-04 12:32:35 +00:00
Dag-Erling Smørgrav
a8adfe18ce Add a missing error check. This fixes a bug that would cause pwd_mkdb to
dump core if invoked with an input file that looks like a password file
but isn't (e.g. /etc/group).

PR:		32378
Submitted by:	Maxim Konovalov <maxim@macomnet.ru>
MFC after:	1 week
2001-12-04 12:31:02 +00:00
Anton Berezin
b9449db117 Fix typos getpeerid -> getpeereid.
PR:		docs/32442
Reviewed by:	dd
2001-12-02 23:50:40 +00:00
Peter Wemm
6464bbfa03 Use the merged strtod.c everywhere. This has been tested on alpha and
ia64.
2001-12-02 18:27:40 +00:00
Andrey A. Chernov
e3a3c468a5 Remove specific reference to ASCII space (' '), it is true for localized
spaces too
2001-12-02 12:31:44 +00:00
Andrey A. Chernov
4bd71a3c89 Make it works for non ASCII compatible encodings too.
The only assumption left is that 'A'..'Z' 'a'..'z' both are contiguous
2001-12-02 09:15:54 +00:00
Joseph Koshy
4d44f0b5a3 Add support for sysconf(_SC_NPROCESSORS_CONF) and sysconf(_SC_NPROCESSORS_ONLN).
This API is supported in SVR4.0MP, Solaris, Linux, AIX and Tru64 Unix.

PR:		bin/27489
Submitted by:	Arun Sharma <arun@sharma-home.net>
Reviewed by:	bde (prior version)
2001-12-01 12:07:42 +00:00
Mike Barcroft
de2656d0ed o Stop abusing MD headers with non-MD types.
o Hide nonstandard functions and types in <netinet/in.h> when
  _POSIX_SOURCE is defined.
o Add some missing types (required by POSIX.1-200x) to <netinet/in.h>.
o Restore vendor ID from Rev 1.1 in <netinet/in.h> and make use of new
  __FBSDID() macro.
o Fix some miscellaneous issues in <arpa/inet.h>.
o Correct final argument for the inet_ntop() function (POSIX.1-200x).
o Get rid of the namespace pollution from <sys/types.h> in
  <arpa/inet.h>.

Reviewed by:		fenner
Partially submitted by:	bde
2001-12-01 03:43:01 +00:00
Alexey Zelkin
4a57e677c7 Merge NetBSD's changes from netbsd_strtod.c in preparation of
removing it from our source tree in order to have one version
of strtod() for all arches. netbsd_strtod.c still left in source
tree until alpha folks make sure that our native strtod() works
as well as NetBSD's one.

Reviewed by: peter, bde (some time ago)
2001-11-30 12:48:30 +00:00
Bill Fenner
7735bb0f64 Implement several of the c99 updates to printf(3):
- New length modifiers: hh, j, t, z.
 - New flag: '.  Note that %'f is not yet implemented.
 - Use "inf"/"nan" for efg formats, "INF"/"NAN" for EFG formats.
 - Implemented %q in terms of %ll; if "quad_t" is not "long long"
   %q will break.

Still to do:
 - %C, %S, %lc, %ls (wide character support)
 - %'f (thousands in integer portion of %f)
 - %a/%A (exact hex representation of floating-point numbers)

Garrett Wollman wrote the first version of the vfprintf.c update;
Mike Barcroft wrote the first version of the printf.3 changes.
2001-11-30 06:12:15 +00:00
Andrey A. Chernov
f2f94c9675 Clarify isblank range 2001-11-30 05:39:08 +00:00
Andrey A. Chernov
a72d401cce Clarify valid isspace() range 2001-11-30 02:01:32 +00:00
Andrey A. Chernov
307b922e38 Clarify that is[x]digit() class is the same in any locale 2001-11-29 15:23:46 +00:00
Crist J. Clark
2d69bc9b8e Duh. Back out most of my previous commit. It was mostly covered in the
STANDARDS section of the page. Add one remark there about inet_pton(3)
only understanding decimal values (in contrast to inet_aton(3) and
friends who are happy with 0ac.020.25 for 172.16.0.25).

Caught by:	ru
MFC after:	2 days
2001-11-29 09:44:33 +00:00
Brian Feldman
017e11668f Bump p1003.1-90 to p1003.1-96. 2001-11-29 03:21:16 +00:00
Gregory Neil Shapiro
48343ec717 rename() can't guarantee "to" always exists if it didn't exist in the first
place -- for example, rename("existing", "newfile"); on a read-only file
system.

Reviewed by:	green
MFC after:	3 days
2001-11-29 03:17:12 +00:00
Andrey A. Chernov
2209d8a27c Back out national digits support, POSIX explicetely disallows it:
The definition of character class digit requires that only ten characters
-the ones defining digits- can be specified; alternate digits (for
example, Hindi or Kanji) cannot be specified here. However, the encoding
may vary if an implementation supports more than one encoding.

The definition of character class xdigit requires that the characters
included in character class digit are included here also and allows for
different symbols for the hexadecimal digits 10 through 15.
2001-11-29 03:03:55 +00:00
Crist J. Clark
e1a5ca24ca After the long explanaition of how the inet_* functions interpret
Internet addresses, point out that inet_pton(3) only understands
dotted quads with decimal values.

MFC after:	2 days
2001-11-29 00:56:45 +00:00
Anton Berezin
7d3346ca1f Do not write warning messages on stderr - a caller is expected to check
the return code and errno instead.  Those warnings did not do any good
for daemonized users of initgroups(3), and confused cvs clients that
communicated with non-root cvs pserver.

The committed fix differs from the one suggested in the PR, and was
submitted by ru.

PR:		15421
Approved by:	markm
Discussed on:	-stable, -current at various times
2001-11-28 10:55:02 +00:00
Andrey A. Chernov
87c25490c8 Don't ever assume that isdigit() is always subset of isxdigit() 2001-11-28 06:06:27 +00:00
Andrey A. Chernov
7bbd0c8b5b Fix typo 2001-11-28 05:43:24 +00:00
Andrey A. Chernov
76604b47c1 Use stricter tests to disallow national digits > 9
Optimize national digits code a bit
2001-11-28 05:39:21 +00:00
Andrey A. Chernov
997aec5b67 Allow national (non-ASCII) digits 2001-11-28 04:57:48 +00:00
Andrey A. Chernov
01a0db1367 Allow national (non-ASCII) digits 2001-11-28 03:57:12 +00:00
Bill Fenner
9c5cbc30e7 Implement strtoimax() and strtoumax() 2001-11-28 03:37:06 +00:00
Bill Fenner
3b175d881c Also mention "long long" in synopsis. 2001-11-28 03:36:05 +00:00
John W. De Boskey
a5f75648d8 Return a more meaningful errno when the length of the interpreter
exceeds MAXSHELLCMDLEN to avoid secondary /bin/sh execution.

Update execve man page to reflect change.

Increase MAXSHELLCMDLEN to a slightly more meaningful value.

PR:		kern/32106
Submitted by:	b@etek.chalmers.se
Reviewed by:	bsd
MFC after:	2 weeks
2001-11-28 03:26:58 +00:00
Bill Fenner
b9004c1158 Base 36 is allowed. 2001-11-28 02:35:35 +00:00
Andrey A. Chernov
649ffc6d4b Put back base > 35 check. If someone dislike it, plese discuss it with
standards group first.
2001-11-28 02:17:22 +00:00
Andrey A. Chernov
59d01330c4 Add atoll(3) to conform POSIX and C99 2001-11-28 01:22:08 +00:00
Andrey A. Chernov
7e302fc7a2 Understand national (non-ASCII) digits now
Allow bases >=36 again
Misc cleanup
2001-11-28 00:48:11 +00:00
John Baldwin
a1d8094b9e Use 'mov' instead of 'lea' for setting the syscall number in %eax as that
is clearer about what we are actually doing.

Requested by:	bde
2001-11-27 20:51:26 +00:00
Wes Peters
4f7d6d65dc Must link strerror manpage to strerror_r.
Thanks for the review, Mike.

Submitted by:	Mike Barcroft <mike@FreeBSD.org>
2001-11-27 07:57:31 +00:00
Wes Peters
9c324dc0c0 Add strerror_r function per Posix prototype.
Reviewed by:	Mike Barcroft <mike@FreeBSD.org>
MFC after:	2 weeks
2001-11-27 07:39:46 +00:00
Giorgos Keramidas
fe1b3cedf9 Be more explicit about the fact that realloc() might return a
different pointer than the one passed to it.

PR:		docs/31925
Submitted by:	Andrew <andrew@ugh.net.au>
2001-11-24 03:05:40 +00:00
Ruslan Ermilov
88961d09b1 mdoc(7) police: markup cleanup. 2001-11-22 11:17:58 +00:00
Ruslan Ermilov
1f41435506 mdoc(7) police: add missing comma. 2001-11-22 09:48:54 +00:00
Max Khon
1e45081335 fix compilation (include -> #include) 2001-11-21 20:40:21 +00:00
Ruslan Ermilov
b18f229930 mdoc(7) police: fixed typos and minor markup nits. 2001-11-21 16:19:50 +00:00
Ruslan Ermilov
5e9a6d9d2b mdoc(7) police: general cleanup. 2001-11-21 15:41:49 +00:00
Brian Feldman
70d2a9e100 Should also include namespace.h
Submitted by:	ru
2001-11-21 15:33:40 +00:00
Brian Feldman
a939ced805 Change certain syscalls from x to _x.
Prodded by:	bde
2001-11-21 14:44:52 +00:00
Brian Feldman
13d98e8c66 Introduce readpassphrase(3), a superset of getpass(3). This
comes originally from Todd Miller.

Obtained from:	OpenBSD
2001-11-20 15:15:42 +00:00
Ruslan Ermilov
1ddfc2e3aa mdoc(7) police: minor markup and spelling fixes. 2001-11-20 14:11:07 +00:00
Ruslan Ermilov
2f52231c66 mdoc(7) police: sort xrefs. 2001-11-20 13:58:21 +00:00
Ruslan Ermilov
872013cb2a mdoc(7) police: consistently use the .Ux macro. 2001-11-20 13:54:11 +00:00
Ruslan Ermilov
d3eb181523 mdoc(7) police: remove whitespace at EOL. 2001-11-20 13:43:58 +00:00
Jake Burkholder
125ccd2e6d Actually build new files.
Forgotten by:	jake
2001-11-19 00:19:49 +00:00
Jake Burkholder
b6d97b0c52 Need .type and .size here too. 2001-11-18 04:48:34 +00:00
Jake Burkholder
84a23d72a0 Add more libc stuff.
Obtained from:	netbsd
2001-11-18 04:40:30 +00:00
Jake Burkholder
c8efb16966 Catch up to jmpbuf changes. Define offsets used from assmebly language
in another file so that it is easy to see what they are and keep them in
sync with the headers (grafted from the kernel generated assym.s).
2001-11-18 04:35:09 +00:00
Jake Burkholder
29e5109c5f Remove fork and vfork wrappers. The kernel does the right thing. 2001-11-18 04:31:36 +00:00
Jake Burkholder
3b3cc5736a Add .type and .size pseudo-ops to system call macros so that dynamic binaries
will link.  They must be used for weak symbols as well as strong ones.
2001-11-18 04:29:20 +00:00
Ian Dowse
946708bbea Remove a sentence from the BUGS section that claims non page-aligned
offsets don't work. It should really be documented that the returned
pointer can be in the middle of a fully-valid page when the offset
is not page-aligned, but I couldn't come up with suitable wording.

PR:		kern/22754
2001-11-18 00:47:45 +00:00
Poul-Henning Kamp
7224d02a0d If 'VX' is given, realloc(foo,0) will bail, it shouldn't.
PR:		29376
Submitted by:	Farooq Mela <fmela0@sm.socccd.cc.ca.us>
2001-11-17 10:57:04 +00:00
Poul-Henning Kamp
4b9a9ef10b Correctly call THREAD_UNLOCK() if the recursive call trap is sprung.
Pointed out by:		knu
2001-11-16 18:15:33 +00:00
Dima Dorfman
0157de9706 Create link from directory.3 to readdir_r.3.
PR:		32028
Submitted by:	andrew@ugh.net.au
2001-11-16 15:49:38 +00:00
Robert Watson
5acb7446b0 o Reflect repo-copy of extattr.[c3] from libutil to libc, moving
extattr namespace routines to the libc/posix1e directory.  While
  the extattr calls are not strictly POSIX.1e, POSIX.1e wasn't
  strictly ever approved, so I think that's OK.

Obtained from:	TrustedBSD Project
2001-11-16 05:09:45 +00:00
Mike Barcroft
7a4a63270f o Implement imaxabs(), imaxdiv(), llabs(), lldiv().
o Update abs(3), div(3), labs(3), ldiv(3) to reflect standards
  conformance and add additional references.

Reviewed by:	bde, wollman
2001-11-15 02:05:03 +00:00
Murray Stokely
ac8b27d2ab Cross-reference the fdopen and fileno manpages.
PR:		docs/31866
Submitted by:	W. Campbell <wcampbel@botbay.net>
2001-11-14 16:24:51 +00:00
John Baldwin
4d29433e33 Cleanups after previous change:
- Renumber labels since the previous revision removed one.
- Remove useless and wrong comment.
  - Repeating the function name is just redundant.
  - The previous revision made the comment about %edx useless.
  - The comment about %eax was wrong (but did explain why %eax used to be
    fixed up).

Submitted by:	bde
2001-11-13 16:58:43 +00:00
John Baldwin
7bfd54ac0f The kernel already fixes up %eax for parents that return from fork, so
don't bother manually fixing up %eax for the parent process by testing
the value in %edx and zeroing and already zeroed %eax.
2001-11-13 06:36:43 +00:00
Bruce Evans
ac8e56a7f9 Fixed namespace pollution related to `err' in libc in the same way as for
`warn'.  Now a whole 2 members of the err() family don't cause pollution.

This fixes world breakage in awk for NOSHARED worlds. contrib/awk/msg.c
has had its own version of err() for a long time, but this somehow
didn't cause problems until the update to awk-3.1.0.
2001-11-11 02:48:09 +00:00
Dag-Erling Smørgrav
33ad961d11 Increment the loop counter.
PR:		bin/29218
Submitted by:	Goran Lowkrantz <goran.lowkrantz@ismobile.com>
2001-11-10 17:36:58 +00:00
Ruslan Ermilov
e117e7a5b0 - Put missing prototype for rcmd() in <unistd.h>.
- Clean up the manpage.
- style(9) rcmdsh.c.

Committed from:	BSDCon/EU 2k+1 terminal room
2001-11-09 15:19:25 +00:00
Daniel C. Sobral
8e2f75b833 The algorithm that computes the tables used in the BM search algorithm sometimes
access an array beyond it's length. This only happens in the last iteration of
a loop, and the value fetched is not used then, so the bug is a relatively
innocent one. Fix this by not fetching any value on the last iteration of said
loop.

Submitted by:	MKI <mki@mozone.net>
MFC after:	1 week
2001-11-09 10:17:44 +00:00
Peter Wemm
814620e4d3 Note that the manpage is incorrect about the vector argument. 2001-11-09 01:01:50 +00:00
David E. O'Brien
482a6000bb Fix vendor ID's. 2001-11-07 22:12:52 +00:00
David E. O'Brien
de5fe5d53b rcsid[]->__FBSDID 2001-11-07 19:55:16 +00:00
Bill Fenner
70982dca88 Don't ignore unknown characters. The previous code treated a line like:
hosts:!!!!!!!!@@@@@$%^&*()()*$(files{}{}|||++!)(dns

exactly the same as:

hosts: files dns

Recover from parse errors by looking for the end of a line; this
allows entries without errors to still be parsed even if there is
an erroneous entry earlier in the file.
2001-11-07 00:05:26 +00:00
David Malone
7e1b81799d Add a note explaining why CLOCKS_PER_SEC isn't 1000000.
While I'm here, "of a second" does not belong to CLOCKS_PER_SEC.

PR:		30297
Submitted by:	Bernd Luevelsmeyer <bdluevel@heitec.net>
2001-11-05 21:30:43 +00:00
John Baldwin
93b2ae9fcf - There is no such thing as a socket structure. sockets are integers.
I'm assuming that the comment was regarding socket address structures, so
  correct the comment about pre-zero'ing socket structures to recommend
  pre-zero'ing socket address structures.
- Fix some minor grammar nits.
- This isn't directly submitted by the PR below but is related to it and was
  inspired by it.

PR:		31704
2001-11-05 18:05:56 +00:00
Dima Dorfman
b46884b5b9 Document ENETDOWN.
PR:		31436
Submitted by:	Milon Papezik <milon.papezik@oskarmobil.cz>
2001-11-05 00:44:38 +00:00
Dima Dorfman
8b642e3004 malloc and calloc do not free memory.
PR:		31365
Submitted by:	SUZUKI Koichi <koich@cac.co.jp>
2001-11-05 00:39:27 +00:00
Peter Wemm
b1f214cf5f Make strtod.c work on Alpha as well. strtod.c has got locale support,
the netbsd_strtod.c file we have does not.  More still should be done
here, but this works happily on my Alpha.  I have not (yet?) changed
the Makefile.inc to use this.
2001-11-04 21:30:12 +00:00
Peter Wemm
f29f85e083 Slightly closer to netbsd_strtod.c:
s/IEEE_8087/IEEE_LITTLE_ENDIAN/
s/IEEE_MC68k/IEEE_BIG_ENDIAN/
2001-11-04 18:04:00 +00:00
Doug Rabson
9639b6892e Implement fpsetmask() and fpgetmask(). 2001-11-03 15:52:18 +00:00
Poul-Henning Kamp
0f400b2861 phkmalloc->evilchecks++;
If zero bytes are allocated, return pointer to the middle of page-zero
(which is protected) so that the program will crash if it dereferences
this illgotten pointer.

Inspired & Urged by:	Theo de Raadt <deraadt@cvs.openbsd.org>
2001-11-02 11:32:28 +00:00
Poul-Henning Kamp
b4e471b90f Add notice about early use from malloc.c forbidding malloc use from
this function.
2001-11-02 11:30:42 +00:00
Mark Murray
724641c6f4 Add a long-overdue nail to the deprecated /dev/urandom interface
by asking some things that need unpredictable numbers to read
/dev/random instead.
2001-10-30 21:26:50 +00:00
Mike Barcroft
762e881bab Make the output from assert() look more like the example in the C99
standard.

Requested by:	bde
2001-10-29 07:07:25 +00:00
Matthew Dillon
e8627df69d Add time_to_int(), int_to_time(), time_to_long(), long_to_time(). 2001-10-28 20:13:16 +00:00
Matthew Dillon
237c4e3a9e Add routines to convert time_t to/from fixed-bit fields. These routines
serve two purposes: (1) so we can maintain backwards compatibility with
protocols (rwhod, dump, etc...) that either assume time_t is 32 bits or
assume sizeof(time_t) == sizeof(int), or make other similar assumptions.
(2) To tag such routines (by the presence of these calls) for future
cleanup/extension work.

The 32->64 routine, time32_to_time() (when time_t is 64 bits, that is),
is defined specifically to implement temporal locality to properly set the
msb bits of a 64 bit time_t quantity, using the 50 year rule.  The locality
code has not been implemented yet (and doesn't need to be for a while),
but that is the intent.   This will allow us to maintain backwards protocol
compatibility past 2038.

These routines are intended to be platform and time_t agnostic.

MFC after:	1 week
2001-10-28 19:54:49 +00:00
Mike Barcroft
cb5f460523 Only provide function information in compile environments that support
the C99 variable __func__ and never for C++.  Provide a more meaningful
example in the assert(3) manual.

Reviewed by:	asmodai, bde
2001-10-27 20:11:10 +00:00
Mike Barcroft
c44a27673c Restore K&R prototype. Fix other style bugs.
Reviewed by:	asmodai, bde
2001-10-27 19:37:20 +00:00
Peter Wemm
9213df7cda Explicitly use int32_t for on-disk records for pw_change and pw_expire,
since that is what we use now and this insulates us from any time_t
tweaks here.  We can define a record format that uses 64 bit times if/when
we need to.
2001-10-27 02:13:41 +00:00
Ruslan Ermilov
db8caf03e5 Remove the internal implementation details of wrapping syscalls,
which do not match the reality anyway.

Approved by:	deischen, bde
2001-10-26 17:38:20 +00:00
Doug Rabson
fc5ccf726e Compensate for the way that _setjmp aligns the start of jmp_buf. 2001-10-26 08:26:45 +00:00
Jake Burkholder
e74ea2d01a Minimal libc for sparc64.
Reviewed by:	obrien
2001-10-26 05:40:07 +00:00
Andrey A. Chernov
7686e760b5 In > LONG_MAX test use sseek return value and not _offset which can be not
active.
2001-10-25 22:56:04 +00:00
Peter Wemm
e6d808aee3 De-orbit DEFS.h - the other arches do not use it, and it got replaced
with <machine/asm.h>.

Reviewed by:	bde
2001-10-24 20:29:14 +00:00
Jeroen Ruigrok van der Werven
6cefb54a32 Add __FBSDID.
Change __assert() function to print failing function name.
#if 0 the sccsid block.
This makes us C99 conforming.
2001-10-24 18:12:18 +00:00
Andrey A. Chernov
e41febc84b Help to recover from bad seek (i.e. negative or too big) happens beyond
our pre-check control. Do the same way as refill.c does when it set __SERR,
i.e. clear read and ungetc buffers. Clear EOF flag too.
2001-10-24 17:25:49 +00:00
Andrey A. Chernov
3f498bf72b Back out read buffer invalidating via __SMOD.
It was correct, but not needed because internal buffer cleared on each seek
outside of it.
2001-10-23 23:52:11 +00:00
Andrey A. Chernov
0502fac881 Change comment explaining another usage of __SMOD 2001-10-23 23:05:15 +00:00
Andrey A. Chernov
751fc77994 Disallow fseek() optimization in internal read buffer, if pointer is moved by
seek. It means that beginning of read buffer becomes not the same as current
file position.
2001-10-23 22:48:00 +00:00
Warner Losh
d45672120f Allow users to specify a command to use as remote command instead of
using rcmd directly.  This has been in my tree for a long time, but we
may need to sync with OpenBSD before MFC.

Obtained from: openbsd
PR: 15830

MFC after: 2 months
2001-10-23 06:22:15 +00:00
Dima Dorfman
2716f76b14 Refer to chflags(2) instead of chflags(1) (since we're a section 2
manual page), fix capitalization, and remove chflags reference from
SEE ALSO since the only time it's referenced is with an .Xr, anyway.

Submitted by:	bde
2001-10-23 00:54:58 +00:00
Peter Wemm
b389f073af Fix WAW dependency. p6 is written in the syscall epilogue. 2001-10-22 09:17:14 +00:00
Doug Rabson
694725c201 Fix a few more dependancy violations. 2001-10-22 08:48:11 +00:00
Doug Rabson
61415ba82c Implement setjmp, longjmp, sigsetjmp and siglongjmp. 2001-10-20 15:19:08 +00:00
Doug Rabson
9466885ca4 Add __divdf3(), __divsf3() and __infinity[].
Obtained from:	Intel (for the divide code)
2001-10-20 15:17:31 +00:00
Ruslan Ermilov
4a70bdf9f6 mdoc(7) police: join OS version with the corresponding macro. 2001-10-19 14:44:13 +00:00
Ruslan Ermilov
c764884325 Just use RSYSCALL. 2001-10-19 13:32:24 +00:00
Ruslan Ermilov
3ce88dc6a4 signanosleep(2) hasn't existed since 1998. 2001-10-19 13:01:57 +00:00
Alfred Perlstein
5814ff294d s/kernal/kernel 2001-10-19 07:52:11 +00:00
Jonathan Lemon
c479a8493c 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 Perlstein
4e957fe63c Fix reference to aio_read, should be aio_write 2001-10-16 00:49:19 +00:00
Bruce Evans
18ca70d12d Fixed style bugs in previous commit. 2001-10-15 04:29:06 +00:00
Dima Dorfman
c49c01757a 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
Doug Rabson
a387081c63 Make this compile on ia64. 2001-10-14 13:45:33 +00:00
Matthew Dillon
418fff7e8f Add warning about zeroing-out the socket structure before populating it. 2001-10-13 17:20:51 +00:00
Mike Barcroft
43e13bf58f 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 Barcroft
a9227c40eb 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
Ruslan Ermilov
506d9c18e9 - 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
Michael Reifenberger
91a701cd13 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
Bruce Evans
6eabd84580 Compensate for "Compensate for header dethreading" by backing it out. 2001-10-10 17:48:44 +00:00
Ruslan Ermilov
943873e722 getnetbyaddr() should be serviced by the "networks" database. 2001-10-10 12:49:53 +00:00
Doug Rabson
d9ed7b41fe Adjust so that we don't use relocations which can't exist in a shared
library.
2001-10-10 10:35:01 +00:00
Doug Rabson
d7ed89186f Shorter versions of the byte swapping code. 2001-10-10 10:34:08 +00:00
Andrey A. Chernov
89503316a0 Implement strcasestr() which many others (f.e. Linux) already have. 2001-10-10 02:17:35 +00:00