Commit Graph

8734 Commits

Author SHA1 Message Date
mpp
da7008d252 PR: docs/67884
Submitted by:	Chirstopger Nehren <apeiron@comcast.net>
2004-06-21 18:24:48 +00:00
stefanf
bcffee208f Completely remove s_ilogb.S as the assembler implementation gives very little
speed improvement to none at all over the MI version.

Submitted by:	bde
2004-06-20 10:42:23 +00:00
das
2e83c4463a Uncomment some functions that we now support. 2004-06-20 10:39:09 +00:00
das
1dc40d294e Cross-reference round(3) and trunc(3) as appropriate. 2004-06-20 09:27:17 +00:00
das
59cebf2b44 Connect scalbln(), trunc(), and the associated documentation to the build. 2004-06-20 09:27:03 +00:00
das
62b8ef8dc2 Declare scalbln(), scalblnf(), trunc(), and truncf(). 2004-06-20 09:26:41 +00:00
das
a97ec37c72 Implement trunc() and truncf(). 2004-06-20 09:25:43 +00:00
das
dd81b94d1c Add trivial implementations of scalbln() and scalblnf().
These routines are specified in C99 for the sake of
architectures where an int isn't big enough to represent
the full range of floating-point exponents.  However,
even the 128-bit long double format has an exponent smaller
than 15 bits, so for all practical purposes, scalbln() and
scalblnf() are aliases for scalbn() and scalbnf(), respectively.
2004-06-20 09:25:27 +00:00
gad
bc3947b883 Fill in the some new fields 'struct kinfo_proc', namely ki_childstime,
ki_childutime, and ki_emul.  Also uses the timeradd() macro to correct
the calculation of ki_childtime.  That will correct the value returned
when ki_childtime.tv_usec > 1,000,000.

This also implements a new KERN_PROC_GID option for kvm_getprocs().
It also implements the KERN_PROC_RGID and KERN_PROC_SESSION options
which were added to sys/kern/kern_proc.c revision 1.203.

PR:		bin/65803  (a very tiny piece of the PR)
Submitted by:	Cyrille Lefevre
2004-06-19 14:08:10 +00:00
stefanf
c3b1d7dffc Document ilogb()'s return values in terms of the FP_ILOGB* macros. 2004-06-19 09:33:29 +00:00
stefanf
ac3aff3300 Return the same result as the MI version for 0.0, INFINITY and NaN.
Reviewed by:	standards@
2004-06-19 09:30:00 +00:00
stefanf
127bbb4fe3 Our MI implementation of ilogb() returns -INT_MAX for the argument 0.0 rather
than INT_MIN, so adjust FP_ILOGB0 to reflect this.  Use <machine/_limits.h> for
INT_MAX's value while there.

Reviewed by:	standards@
2004-06-19 09:25:21 +00:00
kientzle
a04c1a531b Ignore file flag bits that we don't support. In particular, this
corrects a segfault seen when archiving files from NTFS (which sets
bits in st_flags that are not documented in <sys/stat.h>.)

Thanks to: Doug Rabson
2004-06-19 04:19:27 +00:00
das
5cfbdc1d4a Memory's free, but all the world ain't a VAX anymore. Bring math.3
kicking and screaming into the 1980's.  This change converts most of
the markup from man(7) to mdoc(7) format, and I believe it removes or
updates everything that was flat out wrong.  However, much work is
still needed to sanitize the markup, improve coverage, and reduce
overlap with other manpages.  Some of the sections would better belong
in a philosophy_of_w_kahan.3 manpage, but they are informative and
remain at least as reminders of topics to cover.

Reviewed by:	doc@, trhodes@
2004-06-19 03:25:28 +00:00
kbyanc
c3dd8655c5 CLOCK_PROF and CLOCK_VIRTUAL are implemented now. 2004-06-17 23:13:38 +00:00
phk
40dd98a3bd Second half of the dev_t cleanup.
The big lines are:
	NODEV -> NULL
	NOUDEV -> NODEV
	udev_t -> dev_t
	udev2dev() -> findcdev()

Various minor adjustments including handling of userland access to kernel
space struct cdev etc.
2004-06-17 17:16:53 +00:00
rwatson
41d29518c8 Add reference to mac_get_link() in man page, which was omitted when
mac_get_link() and mac_set_link() were added.
2004-06-17 16:08:36 +00:00
kientzle
a6a34c96e8 Always restore permissions for regular files, even if the
file already exists on disk.

Pointed out by: www/resin3 port (whose distfile contains the same file
  twice with different permissions and relies on the permissions associated
  with the second instance)
Thanks again to: Kris Kennaway
2004-06-17 03:09:06 +00:00
ume
1290261039 Rename variable name from name' to hostname'.
This is a corresponding change to bin/67994.  I'll soon commit
bin/67994 into 4-STABLE.  Actually, 5-CURRENT's getaddrinfo()
doesn't have the problem mentiond in bin/67994.  However, it is
good to be in sync variable name with 4-STABLE and KAME.

PR:		bin/67994
Submitted by:	JINMEI Tatuya <jinmei@ocean.jinmei.org>
2004-06-16 16:41:23 +00:00
julian
79f004cd9f This library has to change whenever the kernel process structure changes. 2004-06-16 00:34:31 +00:00
davidxu
682485c4b3 Avoid to touch red zone, in libpthread, ucontext may be saved by kernel's
get_mcontext, and libpthread will use signalcontext to deliver signal in
userland, it looks same as kernel's send_sig does.

Reviewed by: deischen, tjr
2004-06-15 21:46:36 +00:00
kientzle
d163cf7939 Be a little more careful about creating directories:
* Restore directories with 0700 permissions initially,
   then use the fixup pass to correct the permissions
 * Trim trailing "/" and "/." in mkdirpath()

Suggested by: Garrett Wollman
2004-06-15 07:12:04 +00:00
kbyanc
749e9ea6a2 The maximum value of iovcnt is IOV_MAX, not 16. 2004-06-15 01:24:41 +00:00
stefanf
fa309e933e Use %zu to print values with type size_t. 2004-06-14 20:55:30 +00:00
bms
012043d125 Document the location of the header file which declares the function
prototypes documented in this manual page.

PR:		bin/4459
2004-06-14 18:41:24 +00:00
bms
5ec68b5ea1 Date bump.
Requested by:	krion
2004-06-14 14:24:18 +00:00
bms
4561ab95f2 Document some return values.
PR:		bin/22198
Submitted by:	Nick Johnson (with cleanups)
2004-06-14 14:18:41 +00:00
stefanf
819398b145 Merge changes from the tzcode2004a import. Wherever possible I tried to bring
us closer to the vendor branch.

Requested by:	wollman
2004-06-14 10:31:52 +00:00
das
37428870e0 Use .Dv instead of .Li for all the RLIMIT_* constants.
Requested by:	ru
2004-06-14 01:32:40 +00:00
das
c0ccc29a8f Document RLIMIT_AS. While here, correct an insertion sort error. 2004-06-13 22:19:29 +00:00
stefanf
4c4645815b Remove a stale reference to %Ef and %EF from a comment. 2004-06-13 16:20:23 +00:00
davidxu
c72d8a4de4 Check pending signals, if there is signal will be unblocked by
sigsuspend, thread shouldn't wait, in old code, it may be
ignored.
When a signal handler is invoked in sigsuspend, thread gets
two different signal masks, one is in thread structure,
sigprocmask() can retrieve it, another is in ucontext
which is a third parameter of signal handler, the former is
the result of sigsuspend mask ORed with sigaction's sa_mask
and current signal, the later is the mask in thread structure
before sigsuspend is called. After signal handler is called,
the mask in ucontext should be copied into thread structure,
and becomes CURRENT signal mask, then sigsuspend returns to
user code.

Reviewed by: deischen
Tested by: Sean McNeil <sean@mcneil.com>
2004-06-12 07:40:01 +00:00
das
699d33669c The references to scalbn and scalbnf should be scalb and scalbf.
(The former are actually useful, and ieee_test(3) only documents
functions that aren't.)  Add a sentence describing the domain of
scalb() and scalbf().
2004-06-12 04:40:47 +00:00
kensmith
975177ce24 Change defualt time zone from GMT to UTC. This will not be MFC-ed, and
was done before 5-STABLE on purpose...
2004-06-11 03:34:02 +00:00
das
388fd1cd29 Shift the FPSR contents by the correct amount so feupdateenv() raises
the correct exceptions from the old environment.
2004-06-11 02:35:30 +00:00
das
a19b0e4d1e Insert a missing '~' in feholdexcept(), so that it correctly clears
the exception flags in the mxcsr as well as the x87 FPU.
2004-06-11 02:35:19 +00:00
das
7765c93088 Fix a bug where rintf() rounded the wrong way in round-to-nearest mode
on all inputs of the form x.75, where x is an even integer and
log2(x) = 21.  A similar problem occurred when rounding upward.
The bug involves the following snippet copied from rint():

	i>>=1;
	if((i0&i)!=0) i0 = (i0&(~i))|((0x100000)>>j0);

The constant 0x100000 should be 0x200000.  Apparently this case was
never tested.

It turns out that the bit manipulation is completely superfluous
anyway, so remove it.  (It tries to simulate 90% of the rounding
process that the FPU does anyway.)  Also, the special case of +-0 is
handled twice (in different ways), so remove the second instance.

Throw in some related simplifications from bde:

- Work around a bug where gcc fails to clip to float precision by
  declaring two float variables as volatile.  Previously, we
  tricked gcc into generating correct code by declaring some
  float constants as doubles.

- Remove additional superfluous bit manipulation.

- Minor reorganization.

- Include <sys/types.h> explicitly.

Note that some of the equivalent lines in rint() also appear to be
unnecessary, but I'll defer to the numerical analysts who wrote it,
since I can't test all 2^64 cases.

Discussed with:	bde
2004-06-09 21:24:52 +00:00
das
2e3c47ad48 Include <sys/cdefs.h> earlier to get the various visibility constants.
Previously, we were relying on <sys/_types.h> to include it implicitly.
2004-06-09 10:32:05 +00:00
stefanf
d7af95e868 Avoid assignments to cast expressions.
Reviewed by:	md5
Approved by:	das (mentor)
2004-06-08 13:08:19 +00:00
stefanf
3a40eb39cf Signal handlers are supposed to take an int parameter.
Approved by:	das (mentor)
2004-06-08 12:24:47 +00:00
stefanf
80a3e78252 Remove a couple of casts added for an ancient Sun compiler.
Approved by:	das (mentor)
2004-06-08 12:20:40 +00:00
stefanf
76718df136 The third operand of the conditional operator should have type void too.
Approved by:	das (mentor)
2004-06-08 12:03:48 +00:00
das
86ee9527d4 In fts_build(), if we try to chdir and fail (e.g. due to lack of search
permission), try to continue in FTS_DONTCHDIR mode.  Of course this
won't work for long paths, but we can't descend more than one pathname
component beyond the directory anyway if we lack search permission.

Here is a transcript demonstrating the change, where oldls is ls(1)
linked with the old fts(3):

	das@VARK:~> mkdir t && touch t/{a,b,c} && chmod u-x t
	das@VARK:~> oldls t
	a       b       c
	das@VARK:~> oldls -l t
	das@VARK:~> \ls t
	a       b       c
	das@VARK:~> \ls -l t
	ls: a: Permission denied
	ls: b: Permission denied
	ls: c: Permission denied

I had forgotten about this patch until bde reminded me.  He reports
using it without problems for over a year.

PR:	45723
2004-06-08 06:23:23 +00:00
das
9372d79f04 Rename cantwrite() to prepwrite(). The latter is less confusing,
since the macro isn't really a predicate, and it has side-effects.
Also, don't set errno if prepwrite() fails, since this is done in
prepwrite() now.
2004-06-08 05:45:48 +00:00
das
a1e60d89fb Rename cantwrite() to prepwrite(). The latter is less confusing,
since the macro isn't really a predicate, and it has side-effects.
2004-06-08 05:45:32 +00:00
das
55edbf12e7 Set errno to EBADF on attempts to write to a stream that is not
writable.  Affected callers include fwrite(), put?(), and *printf().
The issue of whether this is the right errno for funopened streams is
unresolved, but that's an obscure case, and some errno is better than
no errno.

Discussed with:	bde, jkh
2004-06-08 05:44:52 +00:00
kientzle
71abd863dc Correct some spelling errors. 2004-06-08 00:23:27 +00:00
yar
913f695456 Use ".In" to mark up C include file names. 2004-06-07 21:52:20 +00:00
yar
7c97f69840 Each sentence should begin on a new line. 2004-06-07 21:48:02 +00:00
yar
62c876af4f Extend and improve the mdoc(7) markup of this page.
Reviewed by:	ru
2004-06-07 21:43:14 +00:00