Commit Graph

9166 Commits

Author SHA1 Message Date
Peter Edwards
2909df6916 When required to negate the absoulte result of a division/remainder
operation (by subtracting the absolute result from 0), don't test
for overflow.

This avoids an arithmetic exception when dividing LONG_MIN by 1:
This is the only case that causes overflow, and the resulting value
is correct under 2's compliment arithmetic.

PR:		72024
Approved by:	dwmalone@
Obtained from:	NetBSD
MFC after:	4 days
2004-11-27 20:59:49 +00:00
David Schultz
6004362e66 Don't include sys/user.h merely for its side-effect of recursively
including other headers.
2004-11-27 06:51:39 +00:00
Tim J. Robbins
bd9643b135 Fix computation of the 'n' argument to mbrtowc (through XMBRTOWC) to avoid
reading past 'stop' in various places when converting multibyte characters.
Reading too far caused truncation to not be detected when it should have
been, eventually causing regexec() to loop infinitely in with certain
combinations of patterns and strings in multibyte locales.

PR:		74020
MFC after:	4 weeks
2004-11-21 03:14:32 +00:00
David Schultz
7a62aa8a18 In preparation to remove U areas, don't refer to p_uarea in libkvm.
Reviewed by:	arch@
2004-11-20 02:28:26 +00:00
David E. O'Brien
8e6acec2ef Install the header for libmagic.
PR:		73647
Submitted by:	Uranus <uranus@it.muds.net>
2004-11-19 04:04:14 +00:00
Mark Santcroos
15579150a4 Remove ntp_gettime.c which was a wrapper around sysctlbyname(3).
This is now a native system call.

Reviewed by:	imp, phk, njl, peter
Approved by:	njl
2004-11-18 23:59:19 +00:00
Christian S.J. Peron
ca8d7823c6 -Add a note that currently two syntax styles for label element declaration
is supported.
-Document the new more preferred syntax
-Add examples for the new syntax
-Add a note that the old syntax will be deprecated in the future.

Reviewed by:	rwatson
2004-11-18 15:24:47 +00:00
John Baldwin
d0565c1493 Remove 80386 support from libc. 2004-11-16 21:01:31 +00:00
Yaroslav Tykhiy
49ea9a58a7 Document more fields of struct stat.
Note to mdoc(7) police:
The document date has already been touched today.
2004-11-15 14:16:31 +00:00
Yaroslav Tykhiy
502f968bb9 Use .Vt "struct stat" consistently. 2004-11-15 13:58:52 +00:00
Yaroslav Tykhiy
93d7fd123e Nitpicking on grammar. 2004-11-15 13:55:33 +00:00
Yaroslav Tykhiy
fed4da2585 Improve mdoc(7) markup of the page: add several missing macros,
use .Va instead of .Li for struct stat fields.
2004-11-15 13:45:13 +00:00
Yaroslav Tykhiy
b337489271 Document the S_IS*(mode) macros used to test for file types.
Bump the document date accordingly.
2004-11-15 13:37:56 +00:00
Tim Kientzle
890e938dc3 Since I'm not using the public API for writing
the the pax attributes, I shouldn't try using the public
API for finishing out the attribute entry, either.

This also removes some old dubious state manipulations.
2004-11-15 01:46:33 +00:00
Tim Kientzle
5c79ebdbd7 Pax extended headers were always failing
because the code was using the external API
(archive_write_data) and assuming internal
error-return conventions.  Use the internal
API for writing data.

Thanks to: Joe Marcus Clarke
2004-11-15 01:24:39 +00:00
Tim J. Robbins
2868be0b05 Remove stub libxpg4. All functionality was merged into libc a long time ago. 2004-11-13 23:54:30 +00:00
Bjoern A. Zeeb
6c58990d47 Add knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set.
If turned on  no NIS support and related programs will be built.

Lost parts rediscovered by:	Danny Braniss <danny at cs.huji.ac.il>
PR:		bin/68303
No objections:	des, gshapiro, nectar
Reviewed by:	ru
Approved by:	rwatson (mentor)
MFC after:	2 weeks
2004-11-13 20:40:32 +00:00
Christian S.J. Peron
668e800b6f Remove un-needed call to close(2). The fd that close is being
called on is invalid and has no use.

Reviewed by:	smkelly
2004-11-13 14:30:34 +00:00
Christian S.J. Peron
2f5d3f6f6a Document the fact that kvm_getenvv(3) requires procfs to be mounted
on /proc in order to operate correctly.

Reviewed by:	simon@, wes@
2004-11-13 14:26:13 +00:00
Mark Murray
34a787bb13 Help Tinderbox and remove libautofs 2004-11-10 22:16:37 +00:00
Warner Losh
dfcc91e219 sranddev() is not magic pixie dust. While it gives a good random
seed, the random number generator rand(3) still sucks and is unlikely
sufficient for crypto use.  Correct what appears to be a cut and paste
error from the srandomdev() man page.

Submitted by: Ben Mesander
2004-11-10 17:25:49 +00:00
Poul-Henning Kamp
54c7ea9dbf Add 0xbf (191) as new Solaris partition identifier.
Submitted by:	Lawrence.Lee@sun.com
2004-11-10 07:50:16 +00:00
Olivier Houchard
31489a9a26 Use the RET macro.
For setjmp() and longjmp(), put the signal mask where it's supposed to be,
instead of in the space reserved for fp regs.
2004-11-09 16:49:14 +00:00
Olivier Houchard
904e5ace47 Add a week alias __siglongjmp => siglongjmp. 2004-11-09 16:44:57 +00:00
Olivier Houchard
c67f8f49be MFKernel: Implement ffs with clz on Xscale. 2004-11-07 16:54:54 +00:00
Tim Kientzle
445ac9fc5b Ooops. ssize_t != int. <sigh>
Thanks to: Oliver Lehmann and Peter Wemm
2004-11-06 05:25:53 +00:00
Peter Wemm
9e6d5a03d4 i386_set_ldt() is not available when running 32 bit binaries on amd64
kernels.  Use the recently exposed direct-set routines instead.  This is
only activated for when we compile i386 support libraries on amd64.
2004-11-06 03:35:51 +00:00
Peter Wemm
2cdea9a39f Cosmetic tweaks to reduce diffs to the i386 counterpart. 2004-11-06 03:33:19 +00:00
Peter Wemm
c5bfff3bab Use the recently exposed fs/gs set functions when compiling libthr to
run as a 32 bit support library for an amd64 kernel.  32 bit consumers of
libthr have zero chance of running on an amd64 kernel since we don't
implement the i386_set_ldt() family of functions.  Note that this commit
doesn't make it actually work, it just removes one more obstacle.
2004-11-06 03:30:53 +00:00
Peter Wemm
5bc7bd5ff2 When building the custom i386 libraries for use on amd64 kernels, we
can't use the i386_set_ldt() family of routines, because they are not
implemented.  Instead, use the recently exposed direct access sysarch
routines for setting what %fs and %gs point to.

Use this for the i386 TLS _set_tp() routine, but only when compiling to
run as a 32 bit support binary for amd64 kernels.
2004-11-06 03:28:26 +00:00
Olivier Houchard
5911b52027 Don't define SOFTFLOAT directly in source files, it's now done in the Makefile. 2004-11-05 23:53:54 +00:00
Olivier Houchard
60497154c8 Fix signalcontext and makecontext. 2004-11-05 23:53:02 +00:00
Olivier Houchard
7a06812fe5 Remove getcontext.S, it is not needed. 2004-11-05 23:52:05 +00:00
Olivier Houchard
30f70b49e0 Import a Makefile for arm. 2004-11-05 23:51:24 +00:00
Olivier Houchard
b341b08336 Partial support of KSE for arm. 2004-11-05 23:49:21 +00:00
Tim Kientzle
b772d06c77 Makefile tweaks:
* Update Version
  * Add a missing MLINK
  * Fix 'distfile' target so it works from a clean checkout
2004-11-05 05:38:15 +00:00
Tim Kientzle
88507deac2 Remove the unused archive_string_sprintf() utility function. 2004-11-05 05:32:04 +00:00
Tim Kientzle
48cbe7223a Revert 1.24: Brain glitch. <sigh> 2004-11-05 05:29:36 +00:00
Tim Kientzle
3ede53f3e1 Clean up the error handling in the
write path.  In particular, this should
solve some problems people have seen with
bsdtar not exiting on various write errors.
2004-11-05 05:26:30 +00:00
Tim Kientzle
9fb9f10286 archive.h gets built in ${.OBJDIR} 2004-11-05 05:23:18 +00:00
Tim Kientzle
3702bc7eb3 Update a comment. 2004-11-05 05:16:40 +00:00
Gleb Smirnoff
240d5a9b1c Protect against local flooder of /var/run/log. Do not loop forever in
syslog(3) if we are a priveleged program (sshd, su, etc.).

- Make syslogd open an additional socket /var/run/logpriv, with 0600
  permissions.
- In libc, try to use this socket.
- Do not loop forever if we are using this socket (partial backout of 1.31)

Reviewed by:	dwmalone, Andrea Campi <andrea webcom it>
Approved by:	julian (mentor)
MFC after:	1 month
2004-11-04 23:09:57 +00:00
Xin LI
d9506686f3 Add glibc-style strftime(3) padding specifiers, namely, -(no padding),
_(use space as padding), and 0(zero padding).

These GNU extensions are widely used ones that is worthy for us to
have.

Discussed with:	stefanf, roam, -current
Approved by:	murray
Prodded by:	ports/72722, ports/72723
MFC After:	1 month
2004-11-04 08:34:57 +00:00
Ruslan Ermilov
4d6b7f436d Fixed "make clean". 2004-11-04 08:25:03 +00:00
David Xu
4dd715ced2 Save cancelflags in signal frame, this fixes a problem that
a thread in pthread_cond_wait handled a signal can no longer
be canceled.

Reviewed by: deischen
2004-11-01 10:49:34 +00:00
Brian Feldman
64926afd50 Make pthread_mutex_trylock(3) return EBUSY on failure, as all software
packages expect and seems to be most correct according to the slightly-
ambiguous standards.

MFC after:		1 month
Corroborated by:	POSIX <http://tinyurl.com/4uvub>
Reviewed by: 		silence on threads@
2004-10-31 05:03:50 +00:00
Marcel Moolenaar
a1107cc375 Don't barf when we encounter an UUID for GPT partitions. Instead, add
the GPT partition on i386 and adm64 as type=gpt, subtype=0 and with the
sname set to the UUID. This prevents sysinstall from bombing out. This
also makes sure the GPT partition shows up in sysinstall so as to avoid
accidental "clobberage".

PR:	bin/72896
2004-10-31 01:28:59 +00:00
Peter Wemm
66e1a311f5 Fix brk(3). The stack was unbalanced when we jumped to cerror. Oops!
This causes nasty things like SEGV or a cpu spin when we return.

Submitted by: "James R. Van Artsalen" <james@jrv.org>
2004-10-27 17:11:43 +00:00
Ceri Davies
47c01d89b4 Add necessary whitespace to correct cross references.
PR:		docs/73193
Submitted by:	Jilles Tjoelker <jilles at stack.nl>
2004-10-27 11:26:51 +00:00
Tim Kientzle
6b31624278 Allow tar format to read and accept an empty (or non-existent)
file.  In particular, this allows bsdtar to append (-r) to
an empty file.

Thanks to: Ryan Sommers

While I'm here, straighten out a misleading comment about GNU-compatible
sparse file handling.
2004-10-27 05:15:23 +00:00