Commit Graph

4621 Commits

Author SHA1 Message Date
davidxu
e4bfd01864 Use %esi to store next ucp pointer. Mark end of stack by
setting %ebp to zero, this avoids new gdb to dump a weird
backtrace.
2004-07-02 14:19:44 +00:00
ru
95168a499a Markup, grammar, and spelling fixes. 2004-06-30 20:09:10 +00:00
ru
6ad65dd7e0 Fixed a typo. 2004-06-30 19:32:41 +00:00
tjr
681eb06327 Fix typo: WRDE_DOOFS -> WRDE_DOOFFS.
Noticed by:	Stoned Elipot
2004-06-30 13:55:08 +00:00
rik
d9087231a5 s/SS_CANTSENDMORE/SBS_CANTSENDMORE/ 2004-06-24 10:53:44 +00:00
tjr
d04fd4700f Prefix the names of members of _RuneLocale and its sub-structures
with ``__'' to avoid polluting the namespace. This doesn't change the
documented rune interface at all, but breaks applications that accessed
_RuneLocale directly.
2004-06-23 07:01:44 +00:00
bms
d46dec63e5 Be specific about which socket properties are inherited from the original
socket upon accept(2).

PR:	docs/54995, kern/45733
2004-06-23 00:20:46 +00:00
mpp
4104a7f84f Spelling fixes. 2004-06-21 20:10:35 +00:00
mpp
98d43ce6f1 Spelling fixes. 2004-06-21 19:54:56 +00:00
mpp
02c1e0b63f Spelling fixes. 2004-06-21 19:38:25 +00:00
mpp
d32949cafe Spelling fixes. 2004-06-21 19:30:45 +00:00
mpp
1165f3c380 Spelling fixes. 2004-06-21 18:57:32 +00:00
mpp
da7008d252 PR: docs/67884
Submitted by:	Chirstopger Nehren <apeiron@comcast.net>
2004-06-21 18:24:48 +00:00
kbyanc
c3dd8655c5 CLOCK_PROF and CLOCK_VIRTUAL are implemented now. 2004-06-17 23:13:38 +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
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
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
kbyanc
749e9ea6a2 The maximum value of iovcnt is IOV_MAX, not 16. 2004-06-15 01:24:41 +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
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
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
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
yar
68060b2236 Finally document the option to avoid zombie creation
through ignoring SIGCHLD.
2004-06-07 11:01:39 +00:00
roam
9fb4190027 Fix the ordering in the description of the dlsym() lookup procedure to
reflect src/libexec/rtld-elf/rtld.c rev. 1.68 - the globally-loaded
objects (RTLD_GLOBAL) are searched before the local object's DAG's.

PR:		62770
Submitted by:	Kimura Fuyuki <fuyuki@nigredo.org>
2004-06-03 10:13:26 +00:00
ume
9fe08d77b1 use source address as a hint to determine destination address
by getipnodebyname().
2004-06-02 06:49:36 +00:00
brooks
38ea4501c0 Add Aerospace Corporation copyrights to EUI64 support files.
Suggested by:	marcel, imp
2004-06-01 19:30:13 +00:00
tjr
5dc6beb6a4 Change the signature of ftok from (const char *, char) to (const char *, int)
Obtained from:	NetBSD (christos)
2004-06-01 06:53:07 +00:00
ume
d5d90e3147 Treat IPv4 private address as global scope rather than site scope.
Though it breaks RFC 3484, without this change, dest addr selection
doesn't work well under NAT environment.
2004-05-31 21:09:14 +00:00
ume
2e0618e009 use source address as a hint to determine destination address.
Obtained from:	KAME
2004-05-31 19:27:54 +00:00
tjr
fb60260f98 Buffer partial wide characters more efficiently: instead of storing the
multibyte representation in conversion state objects, store the
accumulated wide character, set number and number of bytes remaining
to avoid having to derive them every time mbrtowc() is called.
2004-05-27 10:54:34 +00:00
brooks
5ae1bd4705 Add support for an /etc/eui64 file modeled on /etc/ethers. The API is
modeled on ethers(3) except that all functions are thread-safe.

Reviewed by:	simokawa
2004-05-26 22:58:06 +00:00
tjr
0efcf2d09b Scan the source string for invalid wide characters in wcsrtombs()
in the dst == NULL case.
2004-05-25 10:45:24 +00:00
tjr
32620504ab Provide trivial macro implementations of getwc(), getwchar(), putwc() and
putwchar() to reduce function call overhead.
2004-05-25 10:42:52 +00:00
tjr
ea28a65744 Grab all the information we need about a character with one call to
__maskrune() instead of one direct call and one through iswprint().
2004-05-23 13:20:09 +00:00
tjr
ac834a03f9 Perform conversions straight from the stream buffer instead of scanning
through byte by byte with mbrtowc(). In the usual case (buffer is big
enough to contain the multibyte character, character does not straddle
buffer boundary) this results in only one call to mbrtowc() for each
wide character read.
2004-05-22 15:41:03 +00:00
tjr
f5a461b270 Associate a multibyte conversion state object with each stream. Reset it
to the initial state when a stream is opened or seeked upon. Use the
stream's conversion state object instead of a freshly-zeroed one in
fgetwc(), fputwc() and ungetwc().

This is only a performance improvement for now, but it would also be
required in order to support state-dependent encodings.
2004-05-22 15:19:41 +00:00
alc
96189f4c1f Update the document date.
Reminded by:	ru@
2004-05-20 18:47:15 +00:00
alc
7d8fea6fb7 Remove a long obsolete paragraph from the BUGS section. 2004-05-19 03:25:17 +00:00
peter
0c866f61b2 For amd64, explicitly compile mcount.po, rather than copying mcount.o. We
need to compile it with -fno-omit-frame-pointers since the mcount code
depends on that, and by default it omits them without -pg.
2004-05-18 22:49:15 +00:00
yar
75331fe5be Clarify and extend paragraphs on interoperation
of fcntl(2), flock(2), and lockf(3) advisory locks.
Add such a paragraph to the flock(2) manpage for the
sake of consistency.

Reviewed by:	Cyrille Lefevre and Kirk McKusick on -arch
MFC after:	2 weeks
2004-05-17 23:09:10 +00:00
kientzle
330e353d70 getgrent() and friends should set errno if there is an error.
Also, clarify the manpage description of when errno is set and
explain that clients should set errno=0 first if they want useful
error information.
2004-05-17 22:15:49 +00:00
kientzle
d686b7f3d6 POSIX prohibits any library function from setting errno to 0.
Correct my previous commit and add a comment to the manpage
indicating that the user must set errno to 0 if they wish to
distinguish "no such user" from "error".

Pointed out by: Jacques Vidrine (nectar@)
2004-05-17 18:27:05 +00:00
tjr
aee8349a0c Use conversion state objects to store the accumulated wide character,
low bound, and the number of bytes remaining instead of storing the
raw byte sequence and deriving them every time mbrtowc() is called.
This is much faster -- about twice as fast in some crude benchmarks.
2004-05-17 12:32:40 +00:00
tjr
b40b6a2d84 Use a simpler and faster buffering scheme for partial multibyte characters. 2004-05-17 11:16:14 +00:00
kientzle
fe9e4fabe1 If getpwent/getpwuid/getpwnam return NULL, they must also set errno. 2004-05-17 06:17:59 +00:00
tjr
9e176d6b08 Use a simpler, faster buffering scheme for partial characters in mbrtowc(). 2004-05-14 15:40:47 +00:00
cognet
85aab3336e Import the softfloat emulation library, needed for FreeBSD/arm right now.
It should become useless when gcc 3.4 will be imported, as libgcc from
gcc 3.4 contains this bits for arm.
2004-05-14 12:13:06 +00:00
cognet
bb6bbd6342 Import the FreeBSD/arm libc bits.
Obtained from:	NetBSD
2004-05-14 12:04:31 +00:00
cognet
90f48ef1d2 We use __arm__, not __arm32__. 2004-05-14 11:51:22 +00:00
cognet
d57448a392 Define malloc_pageshift and malloc_minsize for arm. 2004-05-14 11:50:51 +00:00
bde
856cba4980 Fixed some minor style bugs. 2004-05-13 15:59:38 +00:00
tjr
3aa9288a48 Allow encoding modules to override the default implementations of
mbsrtowcs() and wcsrtombs(). Provide a fast implementation for the
trivial "NONE" encoding.
2004-05-13 11:20:27 +00:00
tjr
e442306798 Fix braino in previous: check that the second byte in the character
buffer is non-null when the character is two bytes long, not when
the buffer is two bytes long.
2004-05-13 03:08:28 +00:00
peadar
ffbf3dfefd Fix some^Wseveral style bugs from last commit.
Remove "sys/types.h" as "sys/param.h" is already included

Use cast rather than back-pointer to convert from public to private
version of FTS data, and so avoid littering fts.h with any of the
details.

Pointed out By: bde, kientzle
2004-05-12 21:38:39 +00:00
josef
8f6801f678 Fix typo.
Submitted by:	Michel Lavondes <fox@vader.aacc.cc.md.us>
PR:		docs/66576
2004-05-12 20:45:51 +00:00
tjr
5ad27cd64f Reduce overhead by calling internal versions of the multibyte conversion
functions directly wherever possible.
2004-05-12 14:26:54 +00:00
tjr
e3f042f4af Move prototypes of various encoding-related functions into a new header
file to avoid extern'ing them all over the place.
2004-05-12 14:09:04 +00:00
ru
96d8fd862e Link radixsort(3) to sradixsort(3), make the latter appear in
the whatis(1) output.
2004-05-12 08:13:40 +00:00
csjp
21e9818fde Document the fact that in a jailed environment, sendto(2) could fail
returning EPERM if the source address specified in the IP header did
not match the address bound to the prison.

Approved by:	bmilekic (mentor)
2004-05-11 16:28:07 +00:00
tjr
d79e71957e In the absence of proper validation, at least check that null bytes
do not appear as anything but the first byte of a multibyte character.
2004-05-11 14:08:22 +00:00
dds
9498b96a34 Remove a trailing newline, to behave as documented in syslog(3):
"A trailing newline is added if none is present."

The code in syslogd, stderr, and console output always adds a newline
at the EOL.  However, the existing code never actually removed a
trailing newline, and apparently relied on syslogd to convert it
into a space character.  Thus, the existing newline was converted
to a trailing space at the EOL by syslogd, while stderr, and console
output resulted in an empty line.

MFC after:	2 weeks
2004-05-10 17:12:52 +00:00
bde
34afa157e8 Fixed style bugs in previous commit (bogus forward declaration and
inconsistent capitalization in comments).
2004-05-10 09:36:26 +00:00
tjr
a8117b04ca Use a binary search to find the range containing a character in
RuneRange arrays. This is much faster when there are hundreds of
ranges (as is the case in UTF-8 locales) and was inspired by a
similar change made by Apple in Darwin.
2004-05-09 13:04:49 +00:00
brueffer
0b4230fd70 o fix a sentence to match with the synopsis [1]
o fix grammar nit

PR:		66289 [1]
Submitted by:	Michel Lavondès <fox@vader.aacc.cc.md.us>
Obtained from:	OpenBSD [1]
MFC after:	3 days
2004-05-09 11:11:21 +00:00
peadar
ea85333e1c The FTS_NOSTAT option is an optimisation that reduces the number
of stat(2) calls by keeping an eye of the number of links a directory
has. It assumes that each subdirectory will have a hard link to its
parent, to represent the ".." node, and stops calling stat(2) when
all links are accounted for in a given directory.

This assumption is really only valid for UNIX-like filesystems: A
concrete example is NTFS. The NTFS "i-node" does contain a link
count, but most/all directories have a link count between 0 and 2
inclusive. The end result is that find on an NTFS volume won't
actually traverse the entire hierarchy of the directories passed
to it. (Those with a link count of two are not traversed at all)

The fix checks the "UFSness" of the filesystem before enabling the
optimisation.

Reviewed By: Tim Kientzle (kientzle@)
2004-05-08 15:09:02 +00:00
kientzle
48b874ba98 A minor refactoring to simplify portability: assign the filename
length to a separate variable so that it will be easier to adapt to
systems that don't have d_namlen in struct dirent.
2004-05-05 06:33:00 +00:00
obrien
08cf798f1d Remove bogus FBSDID. 2004-05-02 20:13:29 +00:00
obrien
c9b83bd8c1 Fix damaged FBSDID. 2004-05-02 20:09:14 +00:00
das
0342c52a18 Merge vfscanf.c, v1.37:
- s/#ifdef FLOATING_POINT/#ifndef NO_FLOATING_POINT/
2004-05-02 10:56:26 +00:00
das
370a72c150 Merge vfprintf.c, v1.65:
- s/#ifdef FLOATING_POINT/#ifndef NO_FLOATING_POINT/
- Remove HEXFLOAT
2004-05-02 10:56:17 +00:00
das
603ccc870f Add option NO_FP_LIBC, which disables floating-point support in
*printf() and *scanf().  Currently, this reduces the size of libc.so
by 9K on i386.  But the real savings are for static binaries that use
*printf() or *scanf() but not strtod(); with an FP-disabled libc,
these binaries will not depend on the gdtoa routines, making each
binary about 22K smaller.
2004-05-02 10:55:07 +00:00
das
94b1a9eeaf - To make it easier to compile *printf() and *scanf() without
floating-point support, remove default definition of FLOATING_POINT
  from the source, and change the compile-time option to
  NO_FLOATING_POINT.
- Remove the HEXFLOAT option.  It saves an insignificant amount of
  space (<0.1% of the size of libc on i386) and complicates vfprintf()
  and checkfmt().
2004-05-02 10:55:06 +00:00
das
3640d9db93 When *printf() and *scanf() are compiled without floating-point
support, fmtcheck() should not accept format strings that contain
floating-point formats.
2004-05-02 10:55:05 +00:00
ru
13a023ef4a Markup nit. 2004-04-27 09:18:49 +00:00
ache
a7c84134a6 Rewrite split_lines() to operate safely
PR:             62694
Submitted by:   moulin p <moulin.p@calyopea.com>
2004-04-25 19:56:50 +00:00
tjr
2d6eafdb97 Use the correct size to allocate, copy and clear argument type tables
after their change from an array of char to an array of enum.
This fixes problems that occurred when using positional arguments in
format strings, particularly with more than STATIC_ARG_TBL_SIZE (8)
of them.

PR:		65841
Submitted by:	Steven Smith (mostly)
2004-04-22 11:35:12 +00:00
jon
a23a0292a8 Fix a bug that could result in getpw*() incorrectly returning NULL when NIS
adjunct maps are used.  One symtom of this bug is sshd saying:
	login_get_lastlog: Cannot find account for uid X
when logging in.  The problem here is caused by an incorrect reuse of the rv
variable when previous values are needed later.
2004-04-21 21:15:08 +00:00
ru
a2a9798706 Unbreak world. 2004-04-21 09:50:52 +00:00
njl
9f92f4fef4 MFdragonfly: resolver fix for timeouts on unqualified hostnames
res_search only incremented got_servfail for h_errno == TRY_AGAIN *AND*
  hp->rcode == SERVFAIL.  However, there are cases such as timeouts where
  rcode is not always set to SERVFAIL.  This leads to inconsistent nameserver
  operation during multi-domain and truncated dot searches, especially during
  booting when portions of the network are being brought up simultanious with
  dns lookups.

  This patch attempts to correct the problem by unconditionally terminating
  the search if TRY_AGAIN is returned (after res_query has gone through all
  retries and name servers) instead of trying other domain elements in the
  domain seach path.

  This patch should fix reported problems (which I can reproduce) with some
  NFS mounts failing during boot.  This occured because mount_nfs thought the
  host name lookup returned a definitive failure using a non-dotted host name
  when, in fact, it timed out on the first part (host.search.domain.name) and
  got a definitive host-not-found response on the second part (host.).

  Generally speaking, search path name server timeouts can exceed 60 seconds
  per element and most machines which consistently timeout on earlier portions
  of a search path are effectively non-operational due to the imposed delays.
  It is more important for DNS lookups to return the proper error code then
  to be able to recover a valid lookup in later portions of the search path
  in these situations.

Obtained from:	DragonFly
MFC after:	3 weeks
2004-04-21 00:56:38 +00:00
cperciva
dddaa5bce9 Add mention of the fact that timeouts are silently limited to 24 hours.
Observed by:	jmg
2004-04-20 21:07:43 +00:00
cperciva
c8b8f2e516 Document POSIX stupidity: Attempts to mmap zero bytes will succeed (and
have no effect), while attempts to munmap zero bytes will fail.
2004-04-18 23:36:45 +00:00
brueffer
914d5fc9b4 Bring describtion of a sysctl in line with the source:
kern.acct_chkfreq is specified in seconds, not minutes.

Cluebat provided by:	kensmith
2004-04-16 22:53:51 +00:00
brueffer
7ea9992329 Remove unnecessary .Pp macro and bump document date
Submitted by:	ru
2004-04-16 22:38:54 +00:00
brueffer
33bbe12bea List some sysctl variables that influence accounting
PR:		65070
Submitted by:	Marc Silver <marcs@draenor.org>
X-MFC after:	re approval
2004-04-16 20:32:56 +00:00
tjr
8f8a2ad179 Perform some basic validation of multibyte conversion state objects. 2004-04-12 13:09:18 +00:00
tjr
e26da574d5 Remove a nonsensical remark about byte order markers in UTF-8 streams. 2004-04-12 12:58:41 +00:00
mux
de871a9ba9 Belatedly remove the getvfsent(3) API. All the consumers have been
updated to use getvfsbyname(3) or the vfs.conflist sysctl since a
long time, except mount_smbfs(8) which has just been fixed.
2004-04-11 21:36:31 +00:00