Commit Graph

9577 Commits

Author SHA1 Message Date
ru
3666aefb6a Fixed xref. 2005-01-21 10:48:35 +00:00
ru
0f1929cc0e Fixed xrefs. 2005-01-21 10:35:40 +00:00
ache
b05ac67f5e POSIX says that 0[xX] prefix is _optional_ even in base 16 case, make it
really so.

"If the value of base is 16, the characters 0x or 0X may optionally
precede the sequence of letters and digits, following the sign if
present."

Found by:       joerg
2005-01-21 00:42:13 +00:00
ru
ed72feddcb Sort sections. 2005-01-20 09:17:07 +00:00
kientzle
8685dc0202 Support 'CE' records in Rockridge extensions
(specifies that record is extended elsewhere on
the disk).
2005-01-20 04:16:55 +00:00
das
d515c9d41c Cut out the gordian handling of subnormals by bit fiddling, and
instead use the FPU to convert subnormals to normals.  (NB: Further
simplification is possible, such as using the FPU for the rounding
step.)

This fixes a bug reported by stefanf where long double subnormals in
the Intel 80-bit format would be output with one fewer digit than
necessary when the default precision was used.
2005-01-18 18:44:07 +00:00
das
906c1e9b6f Correct the values of FLT_ROUNDS for the FE_UPWARD and FE_DOWNWARD cases. 2005-01-18 15:29:28 +00:00
kientzle
c78b57210e Implement a custom print formatter (archive_string_vsprintf)
for libarchive error messages.  Mostly, this
avoids a portability headache related to
copying va_list arguments (some FreeBSD 5
platforms require va_copy; FreeBSD 4 doesn't
support va_copy at all).  It also dramatically reduces the
size of libarchive for embedded applications:
a minimal "untar" program using libarchive can now be
under 64k statically linked (as opposed to ~100k
using library *printf() functions).

MFC after: 14 days
2005-01-16 22:13:51 +00:00
ru
8f12d81a1c Use the \*(If string provided by mdoc(7), to represent infinity. 2005-01-16 16:49:10 +00:00
ru
9bccb183eb Removed redundant .br call. 2005-01-16 16:46:14 +00:00
charnier
dc0aca6cee Standardize 2 error messages: start with lowercase letter. 2005-01-16 11:22:42 +00:00
ru
29dd0f8076 Removed empty line. 2005-01-15 12:45:24 +00:00
ru
d26afd541d Eliminate macro calls inside literal displays. 2005-01-15 12:28:01 +00:00
ru
c68977accb Fixed markup bug. 2005-01-15 12:21:03 +00:00
ru
363d029560 Markup: convert a display to a list. 2005-01-15 11:40:33 +00:00
ru
c71a57d3ca Markup style. 2005-01-15 11:22:13 +00:00
das
f4c183f0ba Add a file missed in the previous commit:
Eliminate gdtoa.mk and move its contents to ${MACHINE_ARCH}/Makefile.inc.
  The purpose of having a separate file involved an abandoned scheme that
  would have kept contrib/gdtoa out of the include path for the rest of libc.
2005-01-15 05:26:32 +00:00
das
0bc7903301 Eliminate gdtoa.mk and move its contents to ${MACHINE_ARCH}/Makefile.inc.
The purpose of having a separate file involved an abandoned scheme that
would have kept contrib/gdtoa out of the include path for the rest of libc.
2005-01-15 05:23:58 +00:00
das
64168d93e5 amd64 assembly versions of sqrt(), lrint(), and llrint() using SSE2. 2005-01-15 03:32:28 +00:00
das
c7466a47ff Most libm routines depend on the rounding mode and/or set exception
flags, so they are not pure.  Remove the __pure2 annotation from them.
I believe that the following routines and their float and long double
counterparts are the only ones here that can be __pure2:

	copysign is* fabs finite fmax fmin fpclassify ilogb nan signbit

When gcc supports FENV_ACCESS, perhaps there will be a new annotation
that allows the other functions to be considered pure when FENV_ACCESS
is off.

Discussed with:	bde
2005-01-15 02:55:10 +00:00
das
3e538fd2f7 Braino. Revert rev 1.50.
Pointy hat to:	das
2005-01-15 00:37:31 +00:00
das
df8ce09fbd Remove numerous references to VAX floating-point and the setting of
errno, replacing them with a discussion of IEEE exceptions where
appropriate.  Cross-reference fenv(3) whenever exceptions are
mentioned.
2005-01-14 23:28:28 +00:00
das
d6994ae2c3 Set math_errhandling to MATH_ERREXCEPT. Now that we have fenv.h, we
basically support this, subject to gcc's lack of FENV_ACCESS support.
In any case, the previous setting of math_errhandling to 0 is not
allowed by POSIX.
2005-01-14 22:03:27 +00:00
das
f5638fda1e Remove some #if 0'd code. 2005-01-14 21:51:46 +00:00
ru
4627268189 Markup fixes. 2005-01-14 21:07:56 +00:00
ru
8ef2048534 Tiny markup nits. 2005-01-14 09:12:05 +00:00
das
4ec986eab3 Mark all inline asms that read the floating-point control or status
registers as volatile.  Instructions that *wrote* to FP state were
already marked volatile, but apparently gcc has license to move
non-volatile asms past volatile asms.  This broke amd64's feupdateenv
at -O2 due to a WAR conflict between fnstsw and fldenv there.
2005-01-14 07:09:23 +00:00
stefanf
17c8f614b7 Fixed too many of "the", and enclose multi-word argument in double quotes.
Obtained from:	ru
2005-01-13 20:33:42 +00:00
das
20067523af Import the subset of J.T. Conklin's single-precision x86-optimized
math routines that appear to be (a) correct and (b) faster than their
MI counterparts on my Pentium 4.

Obtained from:	NetBSD
2005-01-13 18:58:25 +00:00
jon
97f0211303 remember to reset nextgrp in getnetgrent(), so that subsequent calls to getnetgrent() doesn't return bogus information.
MFC after:	3 days
2005-01-13 18:33:01 +00:00
das
5670c96a33 The isnormal() in rev 1.2 should have been isfinite() so subnormals
round correctly.

Noticed by:	stefanf
2005-01-13 15:43:41 +00:00
das
ed0817dc30 Things that are broken, unneeded, and unused since 1997 belong in the attic. 2005-01-13 15:43:22 +00:00
ru
d9ecb772db Markup nits. 2005-01-13 10:43:01 +00:00
ru
a14720c679 Fixed too many of "the", and enclose multi-word argument in double quotes. 2005-01-13 09:35:47 +00:00
stefanf
1bca40ec75 Implement and document ceill(). 2005-01-13 09:11:41 +00:00
stefanf
8ce754f4eb Bump .Dd for the last commit. 2005-01-13 09:08:16 +00:00
ru
5a1651e865 Revert last delta. The ASCII code 0 character is "NUL",
not "NULL", see ascii(7).
2005-01-13 08:49:45 +00:00
stefanf
86ef5da3d7 Hook up and document floorl(). 2005-01-12 22:16:26 +00:00
stefanf
9704cf1a67 Implement floorl(). 2005-01-12 22:10:46 +00:00
stefanf
2f05f40a83 Whitespace nit. 2005-01-12 22:05:41 +00:00
kientzle
e49f75e9e4 Bring some file descriptions in line with reality.
Also, add some hints to help people understand which
functions are most appropriate for typical uses.
2005-01-12 05:56:49 +00:00
brian
32598ce2f6 Fix some signed/unsigned comparisons. Fix prototypes while I'm here.
PR:		28890
Submitted by:	matthias.andree at web dot de
MFC after:	7 days
2005-01-12 03:39:34 +00:00
das
75bc489b6d Add MI implementations of [l]lrint[f]() and [l]lround[f]().
Discussed with:	bde
2005-01-11 23:12:55 +00:00
das
0a78d59d1f Document [l]lrint[f]() and [l]lround[f](). 2005-01-11 23:12:17 +00:00
das
1426450140 Faster lrint() and llrint() implementations for x86. 2005-01-11 23:10:53 +00:00
das
850b1bf882 Mark inline stmxcsr instructions as volatile, since this appears to be
the only way to convince gcc that they read the MXCSR.  The volatile
annotation may be needed elsewhere as well.
2005-01-11 22:10:43 +00:00
ru
5384a04b6a Scheduled mdoc(7) sweep. 2005-01-11 20:50:51 +00:00
ru
47082de5c6 Sanitize the markup, as prompted. 2005-01-11 20:16:03 +00:00
trhodes
209f9251cf Remnant code (broken, unhooked) from a.out which I missed.
Noticed by:	ru
2005-01-11 18:35:40 +00:00
brian
4396a151dc include "alias.h", not <alias.h>
MFC after:	3 days
2005-01-10 10:54:06 +00:00
kientzle
13e3045122 libarchive does much more than just tar ;-) 2005-01-10 05:11:15 +00:00
tjr
55ecebbe93 Implement rpmatch(), a semi-standard interface (as found on AIX, Tru64,
GNU) for determining whether a string is an affirmative or negative
response to a question according to the current locale. This is done
by matching the response against nl_langinfo(3) items YESEXPR and NOEXPR.
2005-01-09 03:55:13 +00:00
kientzle
bec0cf2f38 Recognize and parse symlinks in ISO9660 CDROM images with Rockridge extensions. 2005-01-08 19:56:07 +00:00
kientzle
03cce8d9d5 Documentation improvements. In particular,
expand and clarify the description of the client
callback functions and how they should handle errors.

Thanks to: Antony Dovgal
2005-01-08 19:51:04 +00:00
kientzle
9bbb1dc91d Correctly document the order of arguments
to archive_read_open and archive_write_open.

Thanks to: Antony Dovgal
2005-01-08 18:32:49 +00:00
kientzle
031211eb44 Clear the error buffer on entry
to archive_read_next_header so the
next error doesn't just get appended.

MFC after: 7 days
2005-01-08 18:28:11 +00:00
hsu
f37d6c57e7 More fixes to the copyright notice.
Submitted by:	Ken Smith <kensmith@cse.Buffalo.EDU>
2005-01-08 17:16:43 +00:00
hsu
9eb91343d4 Fix copyright notice. 2005-01-08 01:59:36 +00:00
keramida
aaa4e74647 The `timep' argument of utime() is not an array of structs.
Make sure we don't confuse the reader by claiming it is.

PR:		docs/75615
Submitted by:	Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
2005-01-07 14:38:29 +00:00
pjd
5e594055d9 Update manual page after adding 'fts_bignum' field.
Submitted by:	Peter Jeremy <PeterJeremy@optushome.com.au>
MFC after:	5 days
2005-01-07 07:03:19 +00:00
pjd
0c5ce74735 Introduce new field 'fts_bignum' which is 64bit long and will allow to
make utilities like du(1) 64bit-clean.
When this field is used, one cannot use 'fts_number' and 'fts_pointer'
fields.

This commit doesn't break API nor ABI.

This work is part of the BigDisk project:

	http://www.FreeBSD.org/projects/bigdisk/

Discussed on:	arch@
MFC after:	5 days
2005-01-07 00:06:20 +00:00
delphij
e714550b34 Remove an unnecessary defination of New_Chunk, which has been
defined in libdisk.h.
2005-01-05 14:07:31 +00:00
emax
ef08281270 Fix typo: NUL -> NULL
Submitted by:	Markus Brueffer < markus AT brueffer DOT de >
MFC after:	3 days
2005-01-04 20:00:27 +00:00
sobomax
742d1c9a2d Don't ignore the last line of config file (/etc/hosts, /etc/services, etc)
which doesn't end in \n, since it may be very confusing. Also this should
increase consistency, since most other config files work just fine regardless
of the presence of traling \n in the last line.

MFC After:	2 weeks
2005-01-03 11:07:45 +00:00
kientzle
44153c6433 First cut at RockRidge support.
Large thanks to the easy-to-read and well-documented
sys/isofs/cd9660 source code, which provided many of the
details I needed for this exercise.
2005-01-03 05:51:33 +00:00
marcel
0be8a2d8c2 Constify arguments. 2005-01-03 02:56:15 +00:00
kientzle
06cfd21d61 Next round of work on ISO9660 support:
* Reference-count the directory data so that
    we don't leak memory.
  * Correctly step through the directory records
    (skipping unrecognized extensions)
  * Use better defaults for file modes
  * Sort directory entries by offset of the end of the file
    rather than the beginning of the file.  This fixes a
    lot of "out-of-order" problems with zero-length files,
    in particular.
  * Style fixes, remove some debug code, add some error messages.
2005-01-03 01:24:13 +00:00
kientzle
3fc0b6292f Enable ISO9660 support in "read_support_format_all".
In particular, bsdtar should now recognize ISO9660 images.
2005-01-02 05:22:21 +00:00
kientzle
29d37561fb First cut support for extracting from ISO9660 disk images.
This seems to be able to extract a TOC and extract files from
the couple of ISO images I've tested it with.

Treat this as experimental proof-of-concept code for the
moment.  There are still a bunch of debug messages (there
are a few oddities in ISO9660 that I haven't yet figured
out how to handle), a lot of bugs to be addressed (this
code leaks memory very badly), and a lot of missing features (no
Rockridge support, in particular).  I'd appreciate
feedback from anyone who understands ISO9660 format
better than I do. ;-)

Suggested by: Robert Watson
2005-01-02 05:21:15 +00:00
glebius
026ab67e05 Make syslog(3) thread safe.
PR:		bin/72394
Submitted by:	Dan Nelson
Reviewed by:	deischen
MFC after:	2 weeks
2004-12-30 16:05:11 +00:00
dds
8cca71873f Plug memory leak.
PR:		bin/75656
MFC after:	2 weeks
2004-12-30 14:27:57 +00:00
krion
0de6d7a2b1 Add LOG_NTP facility.
Submitted by:	Kurt Jaeger <pi at complx dot LF dot net>
Approved by:	ru
MFC after:	3 days
2004-12-30 13:09:34 +00:00
kientzle
3ba777976f Rewrite the code that hacks a short names to use in
the regular ustar entry.  The old code sometimes created
a too-long name that overflowed the ustar fields and triggered
an internal assertion failure.  This version should be more
robust.

Thanks to: Michal Listos
Fixes: bin/74385
MFC after: 15 days
2004-12-29 23:26:18 +00:00
trhodes
2aa46459ee Catch up with stat.h a bit:
o Sticky bit is actually defined as S_ISTXT not S_ISVTX.
o Sticky bit is wrapped in if __BSD_VISIBLE not _POSIX_SOURCE.
2004-12-29 20:00:29 +00:00
keramida
58e937efb0 Mark up SIGSTOP with .Dv and use .Nm in HISTORY for marking up `signal'.
PR:		docs/75615
Submitted by:	n-kogane@syd.odn.ne.jp
2004-12-29 19:40:56 +00:00
trhodes
769923c308 Various markup and spelling fixes.
PR:		75574
Submitted by:	Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp> (original version)
2004-12-29 02:18:24 +00:00
obrien
afb327def2 Catch up with file 4.12 import. 2004-12-28 04:35:01 +00:00
glebius
b98cd781ae Restore standard behavior: log to console only when normal logging
failed, not always.

PR:		bin/75356
Submitted by:	Mark Knight <markk knigma org>
Pointy hat to:	glebius
MFC after:	3 days
2004-12-24 09:48:44 +00:00
keramida
9992d6428f ``NULL is a specific instance of a null pointer constant; the generic is
a "null pointer".''

Making good use of the excellent explanations sent to me by Ruslan
Ermilov, Garrett Wollman and Bruce Evans, correct the descriptions of
null pointers.  They are just "null pointers", not nil, not NULL or
".Dv NULL".

Suggested by:	ru, wollman, bde
Reviewed by:	ru, wollman
Pointy hat:	keramida
2004-12-23 23:45:25 +00:00
jkoshy
8ae1fed887 Better rendering of the prototype for signal(3).
Suggested by:	ru
2004-12-23 02:48:20 +00:00
wollman
e834322116 Correct speling erors. 2004-12-22 17:31:28 +00:00
keramida
1a7818d0d2 Punctuation marks should be separate arguments in groff macros.
Noticed by:	ru
2004-12-22 16:20:12 +00:00
keramida
592e2c4993 Use .Dv NULL when referring to NULL C pointers, instead of "nil". 2004-12-22 16:15:52 +00:00
keramida
46fa95804b Cross reference init(8) too, instead of vaguely referring to the
"initialization process".
2004-12-22 15:44:21 +00:00
yongari
4b0d04a9a6 Plug memory leak.
MFC after:	1 week
2004-12-22 08:17:18 +00:00
kientzle
c8690d4c1a Include wchar.h to improve our chances of finding
WCHAR_MAX.  This might fix a portability problem on HP_UX.

Thanks to: Susan Kim
2004-12-22 06:40:28 +00:00
kientzle
df72015a3c Portability nit: Some platforms require stdio.h before bzlib.h.
Thanks to: Kurt J. Lidl
2004-12-22 06:30:14 +00:00
kientzle
1db0b0f050 Add __archive_strappend_int to format a decimal
number into a variable-length archive_string.
2004-12-22 06:12:40 +00:00
kientzle
15dfe78baa Don't truncate major/minor numbers written to the legacy
ustar fields.  Later, we're going to permit numeric extensions
for these fields, so we can support large values here.  In particular,
this allows GNU tar to correctly extract such entries even
though it doesn't support the pax extended attributes.

Note: r1.18 and r1.17.2.1 of this file allowed similar treatment
of the uid/gid fields.

Thanks to: Ben Mesander
2004-12-22 02:35:37 +00:00
kientzle
66ddfc8a78 Tune the bidding for tar archives. This
improves the recognition of hardlink entries
with/without bodies (which is implemented through
a look-ahead that uses the bid function).

MFC after: 7 days
2004-12-22 00:49:16 +00:00
ru
8f62cc9941 NOHTML -> NO_HTML 2004-12-21 12:05:11 +00:00
ru
5c04306fea NOINET6 -> NO_INET6 2004-12-21 10:49:29 +00:00
ru
f4c44b761b NOCRYPT -> NO_CRYPT 2004-12-21 10:16:04 +00:00
ru
e1caf1330c NOINSTALLLIB -> NO_INSTALLLIB 2004-12-21 09:51:09 +00:00
ru
74176cc161 NODOCCOMPRESS -> NO_DOCCOMPRESS
NOINFO -> NO_INFO
NOINFOCOMPRESS -> NO_INFOCOMPRESS
NOLINT -> NO_LINT
NOPIC -> NO_PIC
NOPROFILE -> NO_PROFILE
2004-12-21 09:33:47 +00:00
ru
3b01b84505 NOATM -> NO_ATM 2004-12-21 09:08:06 +00:00
ru
ba3655c74f NOLIBC_R -> NO_LIBC_R
NOLIBPTHREAD -> NO_LIBPTHREAD
NOLIBTHR -> NO_LIBTHR
2004-12-21 09:00:26 +00:00
ru
cec60429bb Start the dreaded NOFOO -> NO_FOO conversion.
OK'ed by:	core
2004-12-21 08:47:35 +00:00
deischen
8fe8e68e76 Don't panic when sigsuspend is interrupted by a cancellation.
PR:	75273
2004-12-19 23:23:43 +00:00
deischen
a5b13ff571 Use a generic way to back threads out of wait queues when handling
signals instead of having more intricate knowledge of thread state
within signal handling.

Simplify signal code because of above (by David Xu).

Use macros for libpthread usage of pthread_cleanup_push() and
pthread_cleanup_pop().  This removes some instances of malloc()
and free() from the semaphore and pthread_once() implementations.

When single threaded and forking(), make sure that the current
thread's signal mask is inherited by the forked thread.

Use private mutexes for libc and libpthread.  Signals are
deferred while threads hold private mutexes.  This fix also
breaks www/linuxpluginwrapper; a patch that fixes it is at
http://people.freebsd.org/~deischen/kse/linuxpluginwrapper.diff

Fix race condition in condition variables where handling a
signal (pthread_kill() or kill()) may not see a wakeup
(pthread_cond_signal() or pthread_cond_broadcast()).

In collaboration with:	davidxu
2004-12-18 18:07:37 +00:00
ru
d4138a03c5 Grammar in a comment. 2004-12-18 12:31:12 +00:00
das
0ca0cdb376 GC unused declaration 2004-12-16 20:40:49 +00:00
das
8daeb2e028 Cosmetic changes only:
- style
- remove unused variables
- de-support VAX

Inspired by:	bin/42388
2004-12-16 20:40:37 +00:00
maxim
2b107b7efe o The macro versions of sigemptyset(3), sigfillset(3), sigaddset(3),
sigdelset(3) and sigismember(3) were killed about five years ago.

o The functions (specifically sigismember(3)) could return -1 and
set errno.

PR:		bin/75156
Obtained from:	NetBSD
MFC after:	2 weeks

o Bump the date of the document.
2004-12-16 20:27:55 +00:00
kientzle
62306f4ea9 Be more careful about assembling/disassembling
device numbers.  In particular, this should fix
a bug where archiving a device node with a very
large minor number would sometimes overflow and
corrupt the major number.

Thanks to: Ben Mesander
MFC after: 7 days
2004-12-11 07:11:42 +00:00
trhodes
e10b3efba5 Date business, update. 2004-12-10 15:27:06 +00:00
trhodes
a659824fbd According to the information on:
http://www.opengroup.org/onlinepubs/009695399/functions/swab.html
the prototype for swab() should be in <unistd.h> and not in <string.h>.
Move it, and update to match SUS.  Leave the prototype in string.h for
now, for backwards compat.

PR:		74751
Submitted by:	Craig Rodrigues <rodrigc@crodrigues.org>
Discussed with:	das
2004-12-10 15:24:40 +00:00
grog
37a87b6214 Add pthread_atfork().
PR:  		bin/68841
Submitted by:	Dan Nelson <dnelson@allantgroup.com>
2004-12-10 03:36:45 +00:00
emax
2ed0f4f1ab Add workaround for {not so|too} smart phones that cannot handle SDP attribute
ID ranges that consist of exactly one attribute ID. libsdp(3) will check start
and end of the attribute ID range and if they are the same the range will be
collapsed to one atribute ID.

The problem was observed on Audiovox SMT5600 and Palm Treo 650.

MFC after:	3 days
2004-12-09 18:57:12 +00:00
cognet
ef8150870e Oooops I forgot to commit that.
Use fp_rnd_t, not fp_rnd.

Reported by:	Jia-Shiun Li (jiashiun at gmail dot com)
2004-12-08 18:41:42 +00:00
peter
5d3a1b43b0 Fix inverted #ifdef that I added. Who had the pointy hat last?
Submitted by:  kan
2004-12-06 20:41:09 +00:00
deischen
5a270f5b3c Make sure the first argument to the user function is 16-byte aligned.
Submitted by:	tegge
2004-12-05 21:22:08 +00:00
rse
181d4dfad7 Fix description: the argument to setcontext(3) must have been previously
initialized "by a call to getcontext(3) or makecontext(3)" and not "by a
call to setcontext(3) or makecontext(3)".

MFC after:	3 days
2004-12-03 14:10:04 +00:00
ru
4e1356aa93 MNT_NODEV is deprecated. 2004-11-29 09:56:12 +00:00
kientzle
ffb27cac2c When determining whether filename is too long for a
regular 'ustar' entry, use narrow-character version,
not wide-character version, as the ustar entry always
uses the narrow-character filename.

Thanks to: Michal Listos
Inspired by, but doesn't fix: bin/74385
2004-11-28 17:57:11 +00:00
kientzle
43f45b89f8 Correct the spelling of "archive_write_pax_header"
in an error message.

Thanks to: Michal Listos
Inspired by, but doesn't fix: bin/74385
2004-11-28 17:49:39 +00:00
peadar
a14ee64402 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
das
130bed6547 Don't include sys/user.h merely for its side-effect of recursively
including other headers.
2004-11-27 06:51:39 +00:00
tjr
1f410c73aa 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
das
bab4eb89e3 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
obrien
b1bf787bf2 Install the header for libmagic.
PR:		73647
Submitted by:	Uranus <uranus@it.muds.net>
2004-11-19 04:04:14 +00:00
marks
a420fe6ce1 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
csjp
6f4de09216 -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
jhb
34e5c90f97 Remove 80386 support from libc. 2004-11-16 21:01:31 +00:00
yar
07e57c11e7 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
yar
956c47074f Use .Vt "struct stat" consistently. 2004-11-15 13:58:52 +00:00
yar
4d5cd8fc1a Nitpicking on grammar. 2004-11-15 13:55:33 +00:00
yar
5c10bd5c5f 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
yar
ba23ba1ba9 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
kientzle
35042e9828 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
kientzle
70764b092d 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
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
dougb
bdbbaec34c Ruslan has educated me both on the wisdom of why this approach is
better than mine, and why to wait for review.

Submitted by:	ru
2004-09-24 21:30:54 +00:00
dougb
389acf125b Fix the WANT_BIND_LIBS knob by correctly spelling it as WITH_BIND_LIBS
to match how similar syntax is used in the ports system. Thanks to kris
for pointing out my mistake here.

Install the lwres library unless the user defines NO_BIND, or the new
knob, NO_BIND_LIBS_LWRES. There is at least one potential customer
for this library in the wings. Thanks to nectar for the reminder.
2004-09-24 18:42:05 +00:00
ru
03cf2e6303 Don't expose BIND libraries and their headers to the public by default,
but have a knob (WANT_BIND_LIBS) to build and install them in /usr/lib
and /usr/include.  Rumors are that this may be useful at a later point,
let's see.

What this really means is that all BIND libraries are now internal to
buildworld (by default, unless WANT_BIND_LIBS is defined), and linked
statically into various BIND executables.

While here, removed redundant -I's from CFLAGS in lib/bind makefiles.

Sponsored by:	des
OK'ed by:	dougb
2004-09-24 13:42:00 +00:00
cognet
e06c72a787 _tcb_ctor takes two args. 2004-09-24 13:02:30 +00:00
ssouhlal
650224c287 Make sure we don't call _thr_start_sig_daemon() when SYSTEM_SCOPE_ONLY is defined. This makes libpthread usable on powerpc.
Approved by:	grehan (mentor), deischen
2004-09-24 06:36:31 +00:00
das
b4a1d559bd Remove __isnanl() to avoid conflicting with the same function in libm.
__isnan() and __isnanf() must remain in libc for hysterical raisins.
On the other hand, __isnanl() must live in libm because libm uses it
internally and can't depend on older versions of libc to provide it.
Fortunately, we don't need __isnanl() in both libraries.

Prodded by:	ale
PR:		71698
MT5 candidate
2004-09-24 06:33:22 +00:00
cognet
1c60878375 Arbitraly choose the Variant II for arm. 2004-09-23 23:14:09 +00:00
cognet
8cecfaa3a4 Make setjmp()/longjmp() use sigprocmask. 2004-09-23 23:13:46 +00:00
cognet
ec211a255c Add a dummy set_tp(). 2004-09-23 23:12:57 +00:00
cognet
65373cda62 Always use bx for returning on Xscale.
Obtained from:	NetBSD
2004-09-23 23:11:32 +00:00
cognet
35da58a9fd Fix the align-to-32-bits code.
Obtained from:	NetBSD
2004-09-23 23:10:56 +00:00
cognet
cb15a39d90 Implement .init and .fini. 2004-09-23 23:00:51 +00:00
des
2f716615f3 Instead of hardcoding the BIND version, deduce it from ${BIND_DIR}/version. 2004-09-23 07:52:51 +00:00
des
5ffe6cac97 libpthread is always libpthread, even when it's libc_r.
Reminded by:	ru@
2004-09-23 07:37:19 +00:00
des
3837c22bbe Bump version number after vendor import of 9.3.0. 2004-09-23 07:21:02 +00:00
dougb
bdd79e1531 LOCALSTATEDIR should be /var, since the BIND 9 source appends
things like "run/named.pid" to it.
2004-09-23 04:46:56 +00:00
marcel
b9f196b2c4 Redefine a PTE as a 64-bit integral type instead of a struct of
bit-fields. Unify the PTE defines accordingly and update all
uses.
2004-09-23 00:05:20 +00:00
marcel
f3532c8563 The offset argument to mmap(2) is not a pointer. Use 0 instead of NULL. 2004-09-22 20:26:33 +00:00
mtm
18e7a48541 Remove vestiges of libthr's signal mangling past. This fixes that last
known problem with mysql on libthr: not being able to kill mysqld.
2004-09-22 18:51:16 +00:00
stefanf
5b6654bdf6 Prefer C99's __func__ over GCC's __FUNCTION__. 2004-09-22 16:56:49 +00:00
mtm
59b52ed829 The SUSv3 function say that the affected functions MAY FAIL, if the
specified mutex is invalid. In spec parlance 'MAY FAIL' means it's
up to the implementor. So, remove the check for NULL pointers for two
reasons:
	1. A mutex may be invalid without necessarily being NULL.
	2. If the pointer to the mutex is NULL core-dumping in the
	   vicinity of the problem is much much much better than failing
	   in some other part of the code (especially when the application
	   doesn't check the return value of the function that you oh so
	   helpfully set to EINVAL).
2004-09-22 16:53:23 +00:00
des
dd60f24093 Always link with -lpthread, not -lc_r, because platforms that don't have
full KSE support still have -lpthread as an alias for -lc_r.  The only
thing that's different is the name of the knob that turns it off.

Pointed out by:	ru@
2004-09-22 14:36:12 +00:00
des
41e930f480 Clean up and comment config.mk. Centralize more stuff. Bitch if
POSIX threads libraries are not available.  Add crypto support if
the crypto libraries are available.  Build dnssec-{keygen,signzone}
if crypto is available.

Submitted by:	(in part) dougb@
2004-09-22 12:13:58 +00:00
des
a4c12f8006 Switch from BIND 8 to BIND 9.
Submitted by:	(in part) dougb@, trhodes@
Reviewed by:	dougb@, trhodes@, re@
MFC after:	5 days
2004-09-21 19:01:48 +00:00
des
d59f3ddc7e Update copyright years. 2004-09-21 18:35:21 +00:00
das
2e0425d5d9 Further refine some #ifs:
- Simplify the logic by using __GNUC_PREREQ__.
  Suggested by stefanf.
- Make math.h compile with old (pre-8.0) versions of icc.
  Submitted by sf [sic].
2004-09-17 05:15:33 +00:00
kientzle
e572c5e1cf Fix two ugly errors:
1. The correct cutoff for large uid/gid handling is 1<<18, not 1<<20.
2. Limit the uid/gid in the 'x' extension header (where numeric extensions
are not permitted) to 1<<18, but use the correct value in the regular
header (where numeric extensions are permitted).
Thanks to: Dan Nelson
MFC after: 3 days
2004-09-17 04:39:07 +00:00
pjd
5b5cfb3bca There is no such manual page in FreeBSD. 2004-09-16 18:32:58 +00:00
mtm
3626bc4706 Implement cancellation points in libc interfaces, as specified by POSIX. 2004-09-16 13:55:46 +00:00
kuriyama
83c4913be1 Fix a condition where the hole would be inserted in the wrong
place during a split.

Obtained from:	NetBSD
2004-09-13 22:07:24 +00:00
pjd
578f126aa1 We have now so many GEOM classes that it is better to just skip unknown
classes than exiting.

Reviewed by:	le
OK'ed by:	phk
2004-09-13 16:06:14 +00:00
le
1774dbf956 Ignore geom_stripe providers.
MFC in: one week
2004-09-13 11:28:54 +00:00
kuriyama
46e872d3e6 I found "portsdb -u" dumps core with recent INDEX file, and this is
caused by refering broken (uninitialized?) pointer which is retrieved
from __bt_new() (and from mpool_new()).

I don't know why this linp[0] is read before stored because this
should be controlled by .lower and .upper member of PAGE structure
which are correctly initialized.

But this workaround fixes the problem on my environment and this
module has #ifdef PURIFY option which initializes new and reused
memory from mpool by memset(p, 0xff, size) like as I did.

Please feel free to fix the real bug instead of my workaround.
2004-09-10 14:45:00 +00:00
kuriyama
3deecb5cd5 Fix format strings to unbreak with -DDEBUG option. 2004-09-10 05:44:17 +00:00
yar
ab6f621526 Use the recently introduced RES_DFLRETRY parameter instead of a well-hidden
constant for the default number of retries.
2004-09-09 17:42:18 +00:00
alfred
b9d36a3baf bump .Dd
requested by: ru
2004-09-09 10:54:08 +00:00
alfred
1d00793bf6 Add/document autoreq_getxid(3), which gets the autofs request
transaction id from the request, this is useful for debugging.

Fix the autoh_freeall(3) function to properly free the array of
auto handles.  Before it was freeing individual members of the list
OK, however it was then advancing the pointer and freeing the wrong
data for the whole list.
2004-09-09 01:23:27 +00:00
alfred
19d2139e02 Remove debug output. 2004-09-08 20:08:18 +00:00
alfred
52322e338f Fix a .Fn that should be an .Fa.
Clear up the spelling and language when describing how to select/poll for
an autofs event.
2004-09-08 19:47:29 +00:00
alfred
8337118014 sync with private code:
fix a 5.x'ism that 4.x needs protection from.
make this code compile standalone.
2004-09-08 08:44:14 +00:00
tjr
16f5889d65 Fix two problems with REG_ICASE that were introduced with the addition of
multibyte character support:
- In CHadd(), avoid writing past the end of the character set bitmap when
  the opposite-case counterpart of wide characters with values less than
  NC have values greater than or equal to NC.
- In CHaddtype(), fix a braino that caused alphabetic characters to be
  added to all character classes! (but only with REG_ICASE)

PR:		71367
2004-09-05 08:30:42 +00:00
julian
5813d27029 Refactor a bunch of scheduler code to give basically the same behaviour
but with slightly cleaned up interfaces.

The KSE structure has become the same as the "per thread scheduler
private data" structure. In order to not make the diffs too great
one is #defined as the other at this time.

The KSE (or td_sched) structure is  now allocated per thread and has no
allocation code of its own.

Concurrency for a KSEGRP is now kept track of via a simple pair of counters
rather than using KSE structures as tokens.

Since the KSE structure is different in each scheduler, kern_switch.c
is now included at the end of each scheduler. Nothing outside the
scheduler knows the contents of the KSE (aka td_sched) structure.

The fields in the ksegrp structure that are to do with the scheduler's
queueing mechanisms are now moved to the kg_sched structure.
(per ksegrp scheduler private data structure). In other words how the
scheduler queues and keeps track of threads is no-one's business except
the scheduler's. This should allow people to write experimental
schedulers with completely different internal structuring.

A scheduler call sched_set_concurrency(kg, N) has been added that
notifies teh scheduler that no more than N threads from that ksegrp
should be allowed to be on concurrently scheduled. This is also
used to enforce 'fainess' at this time so that a ksegrp with
10000 threads can not swamp a the run queue and force out a process
with 1 thread, since the current code will not set the concurrency above
NCPU, and both schedulers will not allow more than that many
onto the system run queue at a time. Each scheduler should eventualy develop
their own methods to do this now that they are effectively separated.

Rejig libthr's kernel interface to follow the same code paths as
linkse for scope system threads. This has slightly hurt libthr's performance
but I will work to recover as much of it as I can.

Thread exit code has been cleaned up greatly.
exit and exec code now transitions a process back to
'standard non-threaded mode' before taking the next step.
Reviewed by:	scottl, peter
MFC after:	1 week
2004-09-05 02:09:54 +00:00
kientzle
2a0558f74f Some old tar archives rely on "regular-file-plus-trailing-slash" to
denote a directory.  Unfortunately, in the presence of GNU or POSIX
extensions, this code was checking the truncated filename stored in the
regular header rather than the full filename stored in the extended
attribute.  As a result, long filenames with '/' in just the right
position would trigger this check and be erroneously marked as
directories.  Move the check so it only considers the full filename.
Note: the check can't simply be disabled for archives that contain
these extensions because there are some very broken archivers out
there.

Thanks to: Will Froning
MFC after: 3 days
2004-09-04 21:49:42 +00:00
iedowse
3233ec4422 Reset the seek pointer to 0 when a file is successfully opened,
since otherwise the initial seek offset will contain the directory
offset of the filesystem block that contained its directory entry.
This bug was mostly harmless because typically the directory is
less than one filesystem block in size so the offset would be zero.
It did however generally break loading a kernel from the (large)
kernel compile directory.

Also reset the seek pointer when a new inode is opened in read_inode(),
though this is not actually necessary now because all callers set
it afterwards.
2004-09-04 14:54:01 +00:00
marcel
7f85950ec5 Unbreak memmove(). Return the dst argument. While here, fix the END
macro to actually reference memmove, not memcpy.
2004-09-04 00:23:15 +00:00
marcel
a035e5e43c Unbreak memcpy(). memcpy() is defined to return the dst argument.
By using r8 instead of r14 to do the swap, we put the dst argument
in the return register. Since bcopy() doesn't clobber r8, we don't
have to do anything else. This fixes ports/textproc/aspell.
2004-09-04 00:04:58 +00:00
alfred
5e8c83f99a Normalize the makefile.
submitted by: ru
2004-09-03 18:01:34 +00:00
alfred
6a5b1eb495 Hook libautofs to the build. 2004-09-03 17:39:00 +00:00
roam
14bb07bf2a Add a BUGS section and copy the wording from mmap(2)'s MAP_NOSYNC,
documenting the obsoleteness of the msync(2) syscall and its single
remaining purpose.

PR:		70916
Submitted by:	Radim Kolar <hsn@netmag.cz>
MFC after:	3 days
2004-09-03 06:24:25 +00:00
alfred
ffce5199dd Hook autofs to the build. 2004-09-02 20:44:56 +00:00
tjr
287bbead5a Septepber -> September
Noticed by:	ru
2004-09-01 23:28:27 +00:00
tjr
5aeafe8019 Back out the previous change. glob() still does use strcmp() to order
pathnames.
2004-09-01 11:02:55 +00:00
kientzle
43e23069c3 Per Ruslan, bsd.lib.mk already has support for dynamically-generated
.h files.  This simplifies the Makefile here a bit and makes it behave
better in a couple of situations.  While I'm here, clean up some comments
and try to improve the organization a bit.

Thanks to: Ruslan Ermilov (The Marvelous Makefile Guru)
2004-09-01 05:06:42 +00:00
alfred
e39e879ede Enter the autofs. 2004-08-31 16:26:01 +00:00
obrien
1c315f997f Start 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-08-29 18:27:00 +00:00
tjr
e6b28daa66 Add cross-reference to ftw(3). 2004-08-29 06:39:58 +00:00
roam
a50eabd4f1 Remove the misleading description of the 'key' argument to
mpool_open(3) - it is *not* really used for synchronization; in fact,
it is not used at all.

PR:		70929
Submitted by:	Martin Kammerhofer <dada@sbox.tugraz.at>
MFC after:	3 days
2004-08-27 14:51:21 +00:00
kientzle
73bbade427 Cache uid-from-uname and gid-from-gname lookups during extraction.
This should provide a big performance boost for folks using NIS or LDAP.

MFC after: 3 days
Thanks to: Jun Kuriyama (for reminding me that this was still on my TODO list)
2004-08-27 03:40:48 +00:00
nectar
1871435a01 Correct a denial-of-service vulnerability in zlib.
For reference, this bug was first reported at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=252253

Submitted by:	"Dmitry V. Levin" <ldv@altlinux.org>
2004-08-26 19:37:06 +00:00
des
cc42042e49 Don't forget to va_end() the va_list we get from va_copy().
Submitted by:	Sean McNeil <sean@mcneil.com>
MFC after:	3 days
2004-08-26 06:25:28 +00:00
kientzle
2222ae0c1d Don't edit permissions of pre-existing directories during extract.
This closes a security hole.  Otherwise, libarchive will happily
extract into directories to which it lacks write permissions by
resetting the permissions during the extract.

Thanks to: Kris Kennaway
2004-08-26 03:53:43 +00:00
kientzle
f9cf91fb01 It is not legal to re-use a va_list variable. This caused
a crash on amd64, in particular.

Thanks to: Sean McNeil
2004-08-26 03:33:53 +00:00
davidxu
8eb09c15b9 Add missing brackets. It was committed from wrong tree. 2004-08-26 02:41:01 +00:00
davidxu
a4dbc4af0d gcc -O2 cleanup. tested for a long time.
Reviewed by: deischen
2004-08-25 23:42:40 +00:00
marcel
52736a0a13 Make profiling actually work. The gcc compiler emits a call to the
_mcount() stub when profiling is enabled. Emit this code sequence
for assembly routines as welli (MCOUNT definition in <machine/asm.h>.
We do not pass the GOT entry however as the 4th argument, because it's
not used. The _mcount() stub calls __mcount(), which does the actual
work. Define _MCOUNT_DECL to define __mcount. We do not have an
implementation of mcount(), so we define MCOUNT as empty, but have a
weak alias to _mcount() in _mcount.S.
Note that the _mcount() stub in the kernel is slightly different from
the stub in userland. This is because we do not have to worry about
nested routines in the kernel.
2004-08-25 07:42:34 +00:00
alfred
ae585ca60f note that it is the caller's responsibility to free any buffer passed
to setvbuf(3) and friends.
2004-08-24 21:48:21 +00:00
tjr
7a17b3190a Replace the current implementations of ftw() and nftw() with the OpenBSD
implementations written by Todd C. Miller. These are cleaner, less buggy
and actively maintained.
2004-08-24 13:00:55 +00:00
peter
f0aa809d44 struct tm.tm_year is listed as 'years since 1900', and is signed. On
64 bit systems, years roughly -2^31 through 2^31 can be represented in
time_t without any trouble.  32 bit time_t systems only range from
roughly 1902 through 2038.  As a consequence, none of the date munging
code for all the various calendar tweaks before then is present.  There
are other problems including the fact that there was no 'year zero' and
so on.  So rather than get excited about trying to figure out when the
calendar jumped by two weeks etc, simply disallow negative (ie: prior to
1900) years.

This happens to have an important side effect.  If you bzero a 'struct
tm', it corresponds to 'Jan 0, 1900, 00:00 GMT'.  This happens to be
representable (after canonification) in 64 bit time_t space.  Zero tm
structs are generally an error and mktime normally returns -1 for them.
Interestingly, it tries to canonify the 'jan 0' to 'dec 31, 1899', ie:
year -1.  This conveniently trips the negative year test above, which
means we can trivially detect the null 'tm' struct.

This actually tripped up code at work. :-/  (Don't ask)
2004-08-24 00:15:37 +00:00
dfr
e31ba8b9a7 Make sure we allocate at least enough space for the TCB for variant I TLS.
MFC after: 3 days
2004-08-23 15:30:05 +00:00