Commit Graph

9246 Commits

Author SHA1 Message Date
tjr
6d227fe7bb Remove stub libxpg4. All functionality was merged into libc a long time ago. 2004-11-13 23:54:30 +00:00
bz
4b83c5852a 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
csjp
da083b47d0 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
csjp
f7e2997810 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
markm
83f5b34ae1 Help Tinderbox and remove libautofs 2004-11-10 22:16:37 +00:00
imp
eae3ce693c 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
phk
2c5aa5f739 Add 0xbf (191) as new Solaris partition identifier.
Submitted by:	Lawrence.Lee@sun.com
2004-11-10 07:50:16 +00:00
cognet
98ebb25e56 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
cognet
527c39f49b Add a week alias __siglongjmp => siglongjmp. 2004-11-09 16:44:57 +00:00
cognet
913f8c4e59 MFKernel: Implement ffs with clz on Xscale. 2004-11-07 16:54:54 +00:00
kientzle
88e4a8c0bd Ooops. ssize_t != int. <sigh>
Thanks to: Oliver Lehmann and Peter Wemm
2004-11-06 05:25:53 +00:00
peter
09f7cb0cec 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
1028f02dbd Cosmetic tweaks to reduce diffs to the i386 counterpart. 2004-11-06 03:33:19 +00:00
peter
6185c69a2b 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
290cd3dfdf 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
cognet
2077bcdd9e Don't define SOFTFLOAT directly in source files, it's now done in the Makefile. 2004-11-05 23:53:54 +00:00
cognet
0008c63bf1 Fix signalcontext and makecontext. 2004-11-05 23:53:02 +00:00
cognet
5ee799d6b4 Remove getcontext.S, it is not needed. 2004-11-05 23:52:05 +00:00
cognet
0a1d64fa35 Import a Makefile for arm. 2004-11-05 23:51:24 +00:00
cognet
2310011fe2 Partial support of KSE for arm. 2004-11-05 23:49:21 +00:00
kientzle
6f08a572ae 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
kientzle
343d17a8c0 Remove the unused archive_string_sprintf() utility function. 2004-11-05 05:32:04 +00:00
kientzle
9b557730b5 Revert 1.24: Brain glitch. <sigh> 2004-11-05 05:29:36 +00:00
kientzle
fef2e8cee8 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
kientzle
0a60201e3c archive.h gets built in ${.OBJDIR} 2004-11-05 05:23:18 +00:00
kientzle
a807fa6b30 Update a comment. 2004-11-05 05:16:40 +00:00
glebius
dfc6a366e7 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
delphij
1afcf75278 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
ru
ca889aec18 Fixed "make clean". 2004-11-04 08:25:03 +00:00
davidxu
de118d09d1 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
green
63795987cf 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
e0e7753e22 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
acf0f61a8a 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
a60695c920 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
kientzle
62bf72a32d 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
yar
cea378a301 Reword the last change a bit, add mdoc(7) markup.
Discussed with:	bde
2004-10-25 13:35:03 +00:00
ru
17f9167e24 For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:46:50 +00:00
ru
5db2b9d5b3 For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
ru
8ae7259f83 -O2 compile isn't quite ready for WARNS=2 yet. 2004-10-24 10:42:15 +00:00
davidxu
a4118f925e Check unhandled signals before thread marks itself as DEAD,
this reduces chances of signal losting problem found by
Peter Holm <peter@holm.cc>
2004-10-23 23:37:54 +00:00
davidxu
df721e35be 1. Move thread list flags into new separate member, and atomically
put DEAD thread on GC list, this closes a race between pthread_join
   and thr_cleanup.
2. Introduce a mutex to protect tcb initialization, tls allocation and
   deallocation code in rtld seems no lock protection or it is broken,
   under stress testing, memory is corrupted.

Reviewed by: deischen
patch partly provided by: deischen
2004-10-23 23:28:36 +00:00
rwatson
b59317a711 Modify libugidfw(3) to use MBI_* permission flags from mac_bsdextended.h
instead of using the V* permission flags from vnode.h.  Remove include
of vnode.h.

Requested by:	phk
2004-10-21 11:21:13 +00:00
davidxu
261287ba18 Decrease reference count if we won't use the thread, this avoids memory
leak under some cases.
2004-10-21 03:42:24 +00:00
obrien
90b43fec07 libsmb is now WARNS 2 clean on 64-bit platforms. 2004-10-19 18:07:26 +00:00
obrien
7594c00ef8 style.Makefile(5) 2004-10-19 18:06:29 +00:00
ru
d2f67f65f7 uniq(1) is not an install tool, and using it was causing
"uniq: not found" during the installworld.

Spotted by:	Roman Neuhauser
2004-10-18 22:18:23 +00:00
obrien
01b9294461 Sync with sys/i386/include/endian.h: use the single instruction 'bswap'. 2004-10-18 17:19:36 +00:00
ru
fe926ccb1e Replaced afterinstall: with FILES. 2004-10-18 16:26:25 +00:00
yar
faf553262e Since sendfile(2) works on regular files only,
which have no negative offsets, "negative" and
"invalid" are equivalent WRT the offset argument.

Suggested by:	bde
2004-10-18 10:02:04 +00:00
kientzle
be9dd83458 Revert 1.18: It broke Athlon64 builds, which
probably means it also requires a .so version
bump.  Defer it until I finish some related
work on cleaning up error returns throughout
the library.

Thanks to: Conrad J. Sabatier
2004-10-18 05:31:01 +00:00
kientzle
920ed4ea19 Use STDERR_FILENO instead of 2, as POSIX intended.
Thanks to: Alfred Perlstein
2004-10-18 04:34:30 +00:00
ache
bc82f1441b Remove setrunelocale() 2004-10-18 02:06:18 +00:00
kientzle
28af6eb5e1 Correctly report write errors from the lowest-level
output routines back to the compression layer.
2004-10-17 23:47:30 +00:00
kientzle
2f1227d293 Refine the error-checking and reporting in the
"compress" format decompression code.  In particular,
distinguish between EOF and fatal data errors.
2004-10-17 23:40:10 +00:00
kientzle
094933a38d Correct the return type of archive_write_data
to match the documentation.

MFC after: 30 days
2004-10-17 23:37:09 +00:00
kientzle
229af4a116 Don't rely on stdio here. 2004-10-17 23:35:16 +00:00
alfred
6102082486 Document EMSGSIZE return from recvmsg due to insufficient free files
when transfering rights (file descriptors.)
2004-10-17 07:13:34 +00:00
tjr
3d89cd8c71 Remove the obsolete <rune.h> interface. 2004-10-17 06:51:50 +00:00
tjr
e40fa30ce6 Remove support for the obsolete UTF2 encoding. 2004-10-17 02:29:15 +00:00
tjr
173f5d041b Bump the libc major version number to 6. 2004-10-17 01:52:48 +00:00
stefanf
9046c35b6c Document that the length modifier l is ignored for floating point
conversion specifiers (a, A, e, E, f, F, g and G).
2004-10-16 16:00:01 +00:00
yar
3cb7a30757 Explain it is a negative offset that EINVAL may indicate.
Now readers won't get an impression that pointing to beyond
the current end of file will result in EINVAL.

MFC after:	1 week
2004-10-16 09:53:35 +00:00
yar
ada175da60 Improve mdoc(7) markup. 2004-10-16 09:46:38 +00:00
yar
4a839deb31 Give details on what will happen if the `offset' argument
to sendfile(2) falls beyond the end of file.

Touch .Dd.

PR:		bin/72649 (in the audit trail)
MFC after:	1 week
2004-10-16 09:39:25 +00:00
obrien
3d93a60e7f Enable building with LIBC_SCCS defined.
Bug submitted by:	Andrea Campi <andrea+freebsd_current@webcom.it>
2004-10-16 06:32:43 +00:00
obrien
877c41c595 Try to bring some sanity to the SCM ID's.
+ spell LIBC_SCCS consistently
+ enable builds with LIBC_SCCS defined to not syntax error
+ minor SCM reformatting to try to have some consistency
2004-10-16 06:11:35 +00:00
stefanf
bcc253c058 Remove extra closing parenthesis added in revision 1.4.
Noticed by:	Andrea Campi
2004-10-14 21:31:42 +00:00
mtm
ce193bdc46 1. Now that it's a thread's state is changed from within the kernel, where
no userland locks are heald, the dead thread lock can no longer protect
   access to it. Therefore, instead of using an if (!dead)...else clause
   after walking the active threads list test the thread pointer before
   deciding not to walk the dead threads list. If the thread pointer is null
   it means it was not found in the active threads list and the dead threads
   list should be checked.

2. Do not free the stack of a thread that is not marked dead. This is the
   2nd and final part of eliminating the race to free a thread's stack.

MFC after: 3 days
2004-10-13 11:42:20 +00:00
keramida
c857f72425 Correctly document the return value of strerror() and strerror_r() and
the contents of the returned buffer for unknown error codes.

PR:		docs/72578
Submitted by:	Jilles Tjoelker <jilles@stack.nl>
MFC after:	3 days
2004-10-12 14:52:52 +00:00
obrien
89db558372 Build as a shared lib again.
Discussed with:	kientzle
2004-10-11 22:04:05 +00:00
peter
9213c0d6bf Belatedly catch up with the dev_t/cdev changes from a few months back.
Extract the struct cdev pointer and the tty device from inside rather than
incorrectly casting the 'struct cdev *' pointer to a 'dev_t' int.  Not
that this was particularly important since it was only used for reading
vmcore files.
2004-10-11 21:56:27 +00:00
das
62f7d2f10d More updates for math(3):
- Make some minor rearrangements in the introduction.
- Mention the problem with argument reduction on i386.
- Add recently-implemented functions to the table.
- Un-document the error bounds that only apply to the old 4BSD math
  library, and fill in the correct values where I know them.  No
  attempt has been made to document bounds lower than 1 ulp, although
  smaller bounds are usually achievable in round-to-nearest mode.
2004-10-11 20:13:52 +00:00
stefanf
5198725430 Add and document ilogbl(), a long double version of ilogb(). 2004-10-11 18:13:52 +00:00
stefanf
3725fb7eda Use the FP_ILOG macros from <math.h> rather than hardcoded return values.
Also be prepared for FP_ILOGBNAN != INT_MAX.

Reviewed by:	md5
2004-10-09 17:14:28 +00:00
maxim
ac8a3b40c2 o Backout rev. 1.16, see 1.3 commit log for more info.
Requested by:	bde

o Remove unneeded sys/types.h and netinet/in.h from the synopsis and
the example.
o We do have struct in_addr in arpa/inet.h, so no need for netinet/in.h.
o Mention where AF_* constants defined are.

Educated by:	bde
2004-10-09 17:13:58 +00:00
keramida
65c5851ae2 Delete a .Fn that had no argument and
properly terminate a .Bl with a matching .El

MFC after:	3 days
2004-10-09 04:03:08 +00:00
davidxu
7e9cf9f934 if system scope thread didn't set timeout, don't call clock_gettime syscall
before and after sleeping.

Reviewed by: deischen
2004-10-08 22:57:30 +00:00
glebius
baf8b008c9 When send()ing to syslogd return ENOBUFS keep trying until success.
This fixes a case, when DoSed syslogd completely loses messages.

PR:		bin/72366
Discussed with:	dwmalone, millert@OpenBSD.org
Approved by:	julian (mentor)
Obtained from:	OpenBSD (rev. 1.17, 1.21 by millert)
MFC after:	3 months
2004-10-08 21:15:21 +00:00
julian
f5ef5456b3 Make less wrong for desciptions of signal handling
MFC in: 1 week
2004-10-08 20:40:30 +00:00
mtm
9c7869cb6f Remove a reference to a non-existent syscall: _thr_exit(). The
actual name is thr_exit(). How this ever worked is beyond me.
2004-10-08 14:48:02 +00:00
davidxu
c4a10c9c77 Use PTHREAD_SCOPE_SYSTEM to decide what should be done. 2004-10-07 14:23:15 +00:00
davidxu
3b8ee1c512 Follow kernel change, restore signal mask correctly by using a command
of kse_thr_interrupt.
2004-10-07 13:52:18 +00:00
jhb
a217c8967b - Fix the compile to chase the p_rux changes.
- Add a comment noting that the ru_[us]times values being read aren't
  actually valid and need to be computed from the raw values.

Submitted by:	many (1)
2004-10-06 17:10:56 +00:00
mtm
0a21f474dc Close a race between a thread exiting and the freeing of it's stack.
After some discussion the best option seems to be to signal the thread's
death from within the kernel. This requires that thr_exit() take an
argument.

Discussed with: davidxu, deischen, marcel
MFC after: 3 days
2004-10-06 14:23:00 +00:00
davidxu
0a270f4e6a Allocate red zone and stack space together and then split red zone from
allocated space, orignal code left red zone unallocated, but those space
can be allocated by user code, and result was providing no protection.
2004-10-06 08:11:07 +00:00
jkoshy
1e91c0db48 Mutually cross-reference sysexits(3) and err(3). Add text to err(3)
recommending that the standard exit codes in sysexits(3) be used.

Reviewed by:    ru
2004-10-04 14:04:37 +00:00
stefanf
06aa92a1b8 Don't add integers to void pointers. 2004-10-03 15:58:20 +00:00
stefanf
f3f8ad79f6 Don't add integers to void pointers. 2004-10-03 15:48:32 +00:00
stefanf
edc6f2e4d7 Directly include <runetype.h> for _CurrentRuneLocale, <_ctype.h> doesn't
include it in all cases.
2004-10-03 15:42:59 +00:00
obrien
cb28f451c0 Finish the de-orbital burn of our previous FreeBSD version compat libs
living in usr/src.  We need to use them from ports to record dependencies.

Discussed with:	re(scottl)
2004-10-02 05:48:09 +00:00
scottl
e3a0a37e82 Enable the new compat4x libs. 2004-10-02 01:47:56 +00:00
scottl
828266c91d Update libc, libc_r, and libperl and add libhistory, libm, libopie, libpcap,
and libreadline from 4.10.
2004-10-02 01:46:20 +00:00
kensmith
a56900ba68 Prepare for 5.3 release by updating libraries that had changed in
4.10 and adding libraries whose version got bumped recently.
Updated libraries: libc, libc_r, and libperl.  Added: libhistory,
libm, libopie, libpcap, and libreadline.
2004-10-01 20:33:26 +00:00
kensmith
911789fdaa Bump the library version numbers for the following libraries:
/lib/{libm,libreadline}
	/usr/lib/{libhistory,libopie,libpcap}

in preparation for doing the same thing to RELENG_5.  HUGE amounts of
help for determining what to bump provided by kris.

Discussed on:	freebsd-current
Approved by:	re (not required for commit but something like this should be)
2004-10-01 15:38:07 +00:00
maxim
53a9ecac89 Reflect the fact addr2ascii(3) and ascii2addr(3) need sys/socket.h
for AF_* constants.

Submitted by:	Matthew George
MFC after:	2 weeks
2004-09-29 17:54:30 +00:00
pjd
b897378c21 Backout manual page updates.
Requested by:	ru
2004-09-26 12:08:31 +00:00
deischen
e06ce725da Add a wrapper for execve(). The exec'd process must be started with
the signal mask and pending signals of the calling thread.  These
are stored in userland in libpthread.

There is a small race condition in this patch which could cause
problems if a signal arrives after setting the (kernel) signal
mask and before exec'ing.  The thread's set of pending signals
also are not yet installed in the exec'd process.  Both of these
will be corrected with the addition of a special syscall.

Reported & Tested by:	Joost Bekkers <joost at jodocus dot org>
Reviewed by:	julian, davidxu
2004-09-26 06:50:15 +00:00
dougb
5887a0ecf4 Fix up the man file installation for the new BIND 9 sources:
1. Install man files and links for the lwres library.

2. Fix the path in various files to say /etc/namedb/ instead of just /etc.

3. Correctly install the conf file man pages for named and rndc.
2004-09-26 06:36:11 +00:00
pjd
afbc779ed0 Take the lastest fixes from NetBSD.
Obtained from:	NetBSD
2004-09-25 14:11:34 +00:00
trhodes
632ac71095 Fix build in the !NOATM case by using the begemot library in place of
using libisc which was a part of BIND8.

Discussed with:	des, re, dougb
Submitted by:	harti (one part)
Reviewed by:	harti (previous version)
2004-09-24 22:10:34 +00:00