Commit Graph

7369 Commits

Author SHA1 Message Date
Matthew Dillon
57e6d29b1e Remove all use of the LOG2() macro/inline, undoing some non-optimal cruft
that crept in recently.  GCC will optimize the divides and multiplies for us.

Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
MFC after:	1 day
2003-01-11 01:09:51 +00:00
Daniel Eischen
c54f72859c Increase the scheduler stack to 4 pages. This should prevent a stack
overflow when dumping thread info (generated by receipt of SIGINFO).

Reported by:	jmallet
2003-01-11 00:43:20 +00:00
John Baldwin
f3c6522625 Use the fstype obtained from the GEOM dumpconf output to set the fstype
of BSD part chunks when opening a disk.

Reviewed by:	phk
MFC after:	2 days
2003-01-10 19:45:10 +00:00
John Baldwin
53465bf736 - Make New_Disk() non-static so it can be used in Create_Chunk_DWIM().
- In Create_Chunk_DWIM(), if there is a freebsd chunk that has no
  children chunks, then trying to add a child part chunk will fail even
  though there is free space.  Handle this special case by adding an
  unused chunk the full size of the freebsd chunk as a child of the
  freebsd chunk before adding the new part chunk.  This situation can
  happen when changing the type of an existing slice to be a FreeBSD
  slice type or when installing onto a blank disk on Alpha (which has
  no slices.)

Reviewed by:	phk
MFC after:	2 days
2003-01-10 19:25:38 +00:00
Jacques Vidrine
e0bc74123b About September 2001, I consulted with all the previous authors of
pam_krb5 to consolidate the copyright texts.  The semi-official
pam_krb5 module has been distributed with this new license text ever
since, but I'm just now getting around to updating the text here.
2003-01-10 13:38:44 +00:00
Tim J. Robbins
c24891e9e2 The macro versions of putc() and putchar() are gone. 2003-01-10 07:47:12 +00:00
Tim J. Robbins
9031030003 There is no macro version of getc() anymore. 2003-01-10 07:45:24 +00:00
Tim J. Robbins
72c9dabbb7 Bring the list of function-like macros up to date with reality. 2003-01-10 07:38:38 +00:00
Alfred Perlstein
d2b9b6b10c spell multiple correctly. 2003-01-10 06:52:19 +00:00
Tim J. Robbins
4549f62011 Document clearerr_unlocked(), feof_unlocked(), ferror_unlocked()
and fileno_unlocked().
2003-01-10 06:22:28 +00:00
Tim J. Robbins
4d844c09ac Add a manual page for flockfile(), ftrylockfile(), and funlockfile(). 2003-01-10 05:34:11 +00:00
Tim J. Robbins
cbee408df1 Document getc_unlocked(), getchar_unlocked(), putc_unlocked(),
and putchar_unlocked().
2003-01-10 04:56:20 +00:00
Tim J. Robbins
a5b0089e65 Add function versions of getchar_unlocked(), getc_unlocked(),
putchar_unlocked(), putc_unlocked(), feof_unlocked(), ferror_unlocked(),
clearerr_unlocked(), and fileno_unlocked(). The first four are required
by POSIX. The rest are provided for consistency.
2003-01-10 04:35:08 +00:00
Tim J. Robbins
098b8611cb Avoid a memory leak by using reallocf() instead of realloc(). 2003-01-10 02:58:25 +00:00
Tim J. Robbins
73e8989de8 Prototype __getcwd() to avoid a warning. 2003-01-10 02:54:37 +00:00
Tim J. Robbins
826f01cb9e #include <ctype.h> for prototypes (or macro versions) of
tolower() and isdigit().
2003-01-10 02:46:32 +00:00
Max Khon
f7ed1917e2 pthread_attr_get_np() now takes 'pthread_t' (not 'pthread_t *')
to be consistent with other pthread_XXX functions
2003-01-07 21:43:30 +00:00
Chris Costello
6e238d7604 Correct a couple small typos.
Submitted by:	Attila Nagy <bra@fsn.hu>
2003-01-07 13:18:21 +00:00
Chris Costello
d69f82076b Document the file system firewall interface library functions.
Sponsored by:	DARPA, Network Associates Laboratories
2003-01-07 11:23:43 +00:00
Tim J. Robbins
6398b9c017 #include "namespace.h" to get a prototype for _err(). 2003-01-07 06:55:58 +00:00
Tim J. Robbins
16fdde11b7 Remove an unused variable: mbresult. 2003-01-07 06:20:47 +00:00
Tim J. Robbins
0b4b7b65ed #include <stdlib.h> for free()'s prototype. 2003-01-07 06:17:13 +00:00
Tim J. Robbins
2005f192e5 Use hidden names (_close, _dup2, _waitpid, etc.) where appropriate. 2003-01-07 06:07:56 +00:00
Tim J. Robbins
cdfbf19246 Add waitpid to the list of hidden names for use by wordexp.c and grantpt.c. 2003-01-07 06:05:35 +00:00
Giorgos Keramidas
a58d3725ee Typo fixes.
PR:		docs/46815
Submitted by:	SUZUKI Koichi <koich@cac.co.jp>
2003-01-07 05:06:27 +00:00
Tom Rhodes
dc3b2f9d33 Remove redundant documenation.
PR:		46253
Submitted by:	Jeroen Ruigrok van der Werven <asmodai@wxs.nl>
2003-01-06 23:20:55 +00:00
Tim J. Robbins
b211af11e2 strfmon(3) does not correctly handle multibyte characters in the
format string.
2003-01-06 06:21:25 +00:00
Tim J. Robbins
e2b090f34f Note that the printf(3) and scanf(3) family of functions don't deal with
multibyte characters in the format string correctly.
2003-01-06 06:19:19 +00:00
Marcel Moolenaar
4b1d654efb Port libc_r to ia64. We need to do things slightly different
because we have 2 stacks per thread: the regular downward
memory stack and the irregular upward register stack. This
implementation lets both stacks grow toward each other. An
alternative scheme is to have them grow away from each other.
The alternate scheme has the advantage that both stack grow
toward guard pages. Since libc_r is virtually dead and we
really want the *context stuff for thread switching, we don't
try to be perfect, just functional.
2003-01-06 00:56:23 +00:00
Thomas Moestl
f8a9708151 Build libc_r on sparc64, it should work now. 2003-01-05 22:37:54 +00:00
Thomas Moestl
54a701f52e Add MD definitions for sparc64. This is based on work by des. 2003-01-05 22:37:03 +00:00
Thomas Moestl
e15d881535 Add an implementation of _atomic_lock for sparc64. This was submitted by
des; I tweaked it slightly by extending the membar and making it match
the style of the rest of the sparc64 assembler code.
2003-01-05 22:23:11 +00:00
Thomas Moestl
e506034ec1 Rewrite longjmp() and _longjmp() to directly restore the saved frame,
instead of unwinding the call stack. This makes them usable to switch
stacks, e.g. for libc_r.
Do not save the frame pointer in setjmp() and _setjmp(), it is not needed
any more.
Rename _longjmp() to ___longjmp(), with a weak alias to _longjmp(), like
the other architectures did.
2003-01-05 22:17:32 +00:00
Thomas Moestl
6c83076634 Rename siglongjmp() to __siglongjmp(), with a weak alias to siglongjmp(),
like the other architectures do.
2003-01-05 22:10:06 +00:00
Bill Fenner
a6497df52c Use in_addr_t for the right size of an IPv4 address, and copy into
an unaligned destination using bcopy instead of an assignment.

Submitted by:	Hartmut Brandt <brandt@fokus.gmd.de>
PR:		sparc64/46729
2003-01-05 14:05:24 +00:00
Tim J. Robbins
051900864f No need to include <assert.h> here. 2003-01-05 02:43:18 +00:00
Tim J. Robbins
33161c7a6e strptime(), like strftime(), does not handle multibyte characters
in the format string correctly.
2003-01-04 09:50:04 +00:00
Tim J. Robbins
e751b764f8 Mention in the BUGS section that strftime() does not handle multibyte
characters in the format string correctly.
2003-01-04 09:47:40 +00:00
Yoshihiro Takahashi
404a379e4a Rename the dos_partition structure for pc98 to pc98_partition. 2003-01-04 08:50:48 +00:00
Tim J. Robbins
2f69381059 Fix three warnings:
o #include <stdio.h> to make sprintf()'s prototype visible.
 o Remove unused variable: sbuf.
 o Don't use assignment as truth value.
2003-01-04 08:10:55 +00:00
Tim J. Robbins
33c0e6ef8b style(9): return type on separate line from function name. 2003-01-04 07:34:41 +00:00
Tim J. Robbins
fe634ca75f Fix a number of bugs noticed by more extensive testing:
o Call waitpid() if an error occurs after forking the child process
   to avoid leaving zombies around.
 o Handle the WRDE_DOOFS|WRDE_APPEND combination correctly
 o Do not confuse $( substitution with $(( shell arithmetic
     (noticed by wollman)
 o Handle backslash escaping properly
 o Allow $( and ${ to be quoted
2003-01-04 06:07:44 +00:00
Tim J. Robbins
86e1d4729f Rename UL_GETSIZE to UL_GETFSIZE and UL_SETSIZE to UL_SETFSIZE; these are
the names required by 1003.1-2001. The old names are retained for
source compatibility with FreeBSD 5.0 and will be removed before 6.0.
2003-01-04 01:11:49 +00:00
Tim J. Robbins
f2bc7cd262 Remove unused variable: sz. 2003-01-04 00:24:35 +00:00
Tim J. Robbins
e61ca145b8 Remove unused variable: size. 2003-01-04 00:20:54 +00:00
Tim J. Robbins
81b3ad59c2 #include <string.h> for strcmp()'s prototype. 2003-01-04 00:18:50 +00:00
Tim J. Robbins
a97ab40a26 Remove unused variable: omask. 2003-01-04 00:15:15 +00:00
Tim J. Robbins
4ee99abcd1 #include <sys/linker.h> for kldload()'s prototype. 2003-01-04 00:13:00 +00:00
Tim J. Robbins
e8cfa64a75 #include <string.h> for strlen()'s prototype. 2003-01-04 00:11:11 +00:00
Tim J. Robbins
185ec971c5 #include <ctype.h> for isspace()'s prototype (or a macro version). 2003-01-03 23:55:58 +00:00
Tim J. Robbins
2b6839cf10 Add missing #include "namespace.h". 2003-01-03 23:38:21 +00:00
Tim J. Robbins
7599ad308f Remove unused variable: ntmp. 2003-01-03 23:34:26 +00:00
Tim J. Robbins
3ecbeb2d3a #include <string.h> for strcmp()'s prototype. 2003-01-03 23:31:50 +00:00
Tim J. Robbins
43a240930c #include "local.h" to make __svfscanf()'s prototype visible. 2003-01-03 23:27:27 +00:00
Tim J. Robbins
02ba3221ff Remove an unused variable: `sb' in fts_read(). 2003-01-03 23:25:25 +00:00
Tim J. Robbins
d3701b0441 Remove an unused variable, `sverrno', which has not been used since 1.11. 2003-01-03 23:16:55 +00:00
Mike Barcroft
e37f8b5313 Optimize errstr() by reducing the number of times it walks a string.
As a side effect, it makes the code easier to read and requires less
pointer arithmetic.

Test by:	strerror regression test
Submitted by:	Tim Kientzle <kientzle@acm.org>
2003-01-03 16:44:42 +00:00
Poul-Henning Kamp
42c43e6031 Make struct swblock kernel only, to make vm/swap_pager.h userland includable.
Move struct swdevt from sys/conf.h to the more appropriate vm/swap_pager.h.
Adjust #include use in libkvm and pstat(8) to match.
2003-01-03 16:23:12 +00:00
Tim J. Robbins
276ba5b4fa Reset the stream orientation to 0 (unoriented) in freopen(), as required
by the C standard.
2003-01-03 12:27:19 +00:00
Tim J. Robbins
7d3125b3ac It is no longer necessary to include sys/types.h before wordexp.h. 2003-01-03 12:04:36 +00:00
Tim J. Robbins
c0595bfc20 popen() is a function, not an argument. 2003-01-03 05:21:59 +00:00
Tim J. Robbins
77e2381a3e Protect pidlist with a mutex to avoid a race causing a duplicate free()
when the same pipe FILE is pclosed()'d in different threads, and to avoid
corrupting the linked list when adding or removing items. The symptoms of
the linked list getting corrupted were pclose() either not finding the pipe
on the list, or the list becoming circular and pclose() looping infinitely.
2003-01-03 04:35:04 +00:00
Dag-Erling Smørgrav
f8020ddefe Set auto-retry mode to avoid some spurious errors.
Submitted by:	Andre Albsmeier <andre.albsmeier@siemens.com>
MFC after:	7 days
2003-01-03 02:45:10 +00:00
Juli Mallett
d3951ad162 Implement POSIX grantpt(3) functionality, and add a pt_chown utility (akin
to Solaris, it is in /usr/libexec) to perform the handing over of tty nodes
to the user being granted the pty.

Submitted by:	Ryan Younce <ryany@pobox.com>
Reviewed by:	security-officer@, standards@, mike@
2003-01-02 20:44:41 +00:00
Thomas Quinot
464ef179a0 In cgetmatch(3), return -1 if a NULL or 0-length name parameter is used.
This situation most notably arises in chkprintcap, when a /etc/printcap
entry has an empty rp= attribute. In that case, cgetmatch would enter
an infinite loop if any entry in the file has multiple names.

This causes lpd to hang at boot time on 5.0-DP2 when both conditions
are met (:rp=: and multiple names -- not necessarily on the same entry).

Reviewed by:	roberto
2003-01-02 10:19:43 +00:00
Jens Schweikhardt
9d5abbddbf Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
Jens Schweikhardt
d64ada501a Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.
2002-12-30 21:18:15 +00:00
David E. O'Brien
c2e55537ec Back out the s/int */size_t */ commit.
It makes a difference on 64-bit arches, and no one really wants a 2^64
block size [yet].
2002-12-30 11:12:16 +00:00
David E. O'Brien
c20e9fe932 This compiles fine w/WARNS. 2002-12-30 09:25:30 +00:00
Marcel Moolenaar
2bc46a6452 Fix LP64 architectures and especially ia64. Functions that return
a pointer and lack a prototype will have the return value (assumed
to be an integer) zero-extended to a pointer. On ia64 this is
unconditionally fatal as it zeroes-out the region bits, forming an
invalid pointer. Fix the sigsegv by including <stdlib.h>.

Pointy hat: bbraun
2002-12-30 01:41:14 +00:00
Robert Watson
e4c3e988a5 Remove BUGS section indicating that these calls are unimplemented.
Update copyrights.

Obtained from:	TrustedBSD Project
2002-12-29 20:52:42 +00:00
Robert Watson
93724388fc Update acl_set.3, missed in last round:
- Update BUGS: this stuff is implemented.
- Update last modified date.
- Document acl_set_link_np() call.

Obtained from:	TrustedBSD Project
2002-12-29 20:50:30 +00:00
Robert Watson
6394f703dc Update libc POSIX.1e code and documentation to reflect:
- Updated copyrights, modified dates
- Remove "BUGS" entry indicating that ACLs are unimplemented
- Implement acl_*_link() library wrapper variants for get, set,
  delete, aclvalid.
- Document acl_*_link() calls.

Obtained from:	TrustedBSD Project
2002-12-29 20:47:05 +00:00
Mike Barcroft
07842325eb Use useconds_t' instead of u_int' or `unsigned int' where appropriate. 2002-12-29 00:59:09 +00:00
Daniel Eischen
3f28905813 Fix typos in comment.
Submitted by:	Craig Rodrigues <rodrigc@attbi.com>
2002-12-28 05:20:03 +00:00
Jens Schweikhardt
57bd0fc6e8 english(4) police. 2002-12-27 12:15:40 +00:00
Alfred Perlstein
beb24986a7 Silence casting away constness warnings.
Make cgetmatch's locals const.
Make cdbget take a const string and copy it into a buffer.
2002-12-27 08:43:40 +00:00
Tim J. Robbins
cd203b8ead Fix a small typo. 2002-12-27 08:28:53 +00:00
Julian Elischer
57ee6bd3db Slight tuning if teh KSE man page to indicate some functionality is
not yet inplemented and to clear up some wording.
2002-12-27 08:21:15 +00:00
Jake Burkholder
3eb81c6900 Teach libkvm to deal with direct mapped addresses. 2002-12-27 01:45:05 +00:00
Tim J. Robbins
97c1c8f886 Be more consistent with "static". 2002-12-27 01:01:03 +00:00
Yoshihiro Takahashi
7a6b06168b Return an error if the size of the sector is zero. This is for removable
devices that is not inserted any media.

This is MFC candidate.

Submitted by:	ISAKA Yoji <isaka@cory.jp>
2002-12-26 15:50:45 +00:00
Tim J. Robbins
faea1495bf Add an implementation of the POSIX wordexp() and wordfree() functions,
which perform shell-style word expansion on strings. This is still a
little rough around the edges.

PR:		13420
2002-12-26 14:34:18 +00:00
Ruslan Ermilov
074ad11567 Spelling: s/then/than/ where appropriate. 2002-12-24 16:52:31 +00:00
Ruslan Ermilov
facc67676f mdoc(7) police: Deal with self-xrefs. 2002-12-24 13:41:48 +00:00
Tom Rhodes
3c094e54a7 Document protection bits.
PR:		46252
Submitted by:	Jeroen Ruigrok van der Werven <asmodai@wxs.nl>
2002-12-23 19:25:03 +00:00
Ruslan Ermilov
463cfa804d Fixed the abuses of .Ql visible on stderr in troff mode.
PR:		docs/37176
2002-12-23 16:04:51 +00:00
Ruslan Ermilov
fb3acdd2a2 mdoc(7) police: removed gratuitous .Pp call. 2002-12-23 15:21:57 +00:00
Alexander Kabaev
e34402d357 Back out the -fpcc-struct-return fixes.
Approved by:	re (rwatson)
2002-12-22 06:41:09 +00:00
Juli Mallett
6e5328af01 Fix style (no space after return, twice-too-big continuation) and
cast (casting long to a void pointer, rather than intptr_t to a
void pointer) bogons.

Reviewed by:	bde
2002-12-22 03:20:16 +00:00
Rob Braun
81781ca042 Reduce libc's memory footprint by lazily allocating memory used internally
by setproctitle().

Reviewed by: jkh
2002-12-21 22:04:50 +00:00
Rob Braun
5fb691beab Reduce libc.so's memory footprint by lazily allocating memory used internally
by basename() and dirname().
Reviewed by: eric
2002-12-21 07:12:35 +00:00
Tim J. Robbins
2226ce021a Import newer versions of div() and ldiv() from NetBSD which handle
the -fpcc-struct-return calling convention properly instead of
returning garbage. This may break backwards compatibility with some old
binaries that were compiled when -fno-pcc-struct-return was the default.
2002-12-21 05:11:39 +00:00
Tim J. Robbins
4aca04ee5c Document the fact that the printf() family of functions return negative
values (EOF in our case) on error, and some of the possible errno values
in an Errors section.

PR:		39257
2002-12-20 08:28:10 +00:00
Tim J. Robbins
5a7405be50 C99 standardised the vscanf() family of functions, update Standards
section to reflect this.
2002-12-20 07:46:01 +00:00
Mike Barcroft
68cd9bedfb Stylistic changes:
o Fix an English error (comma splice) and poorly worded sentence.
o Fix KNF ordering of variables (pointers come before arithmetic types).
o Restore hand-optimization of sizeof()-1, instead of strlen().
o Remove unneeded local variables in strerror_r().

Test by:	strerror regression test
Requested by:	bde
Reviewed by:	bde
2002-12-20 05:26:10 +00:00
Tom Rhodes
bd8dfc819e Document what really occurs when we obtain an error.
PR:		43357
Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
2002-12-20 01:01:24 +00:00
Matthew Dillon
914d31686b The zalloc pool's size calculation breaks if sbrk() does not return
contiguous chunks of memory.  It happens to do so in the bootstrap
code, but not necessarily in other places.
MFC after:	7 days
2002-12-19 23:23:20 +00:00
Ceri Davies
9d99e59872 Grammatical fixup: s/be the -1/be -1/
MFC after: 1 day
2002-12-19 21:48:43 +00:00
Jake Burkholder
7c6c018c0c Renamed the loader's zipfs to gzipfs. zipfs.c was repo-copied to gzipfs.c. 2002-12-19 19:34:59 +00:00
Ruslan Ermilov
8d436e783f Make accept(), connect(), recvfrom(), recvmsg(), sendmsg(),
and sendto() cancelation points, as required by POSIX.1-2001.

Reviewed by:	deischen
2002-12-19 11:39:20 +00:00
Tim J. Robbins
c0dd63a8a8 Add back the Standards section claiming conformance to 1003.1-2001 and
C99 now that all known standards-related bugs have been fixed.
2002-12-19 10:24:52 +00:00
Tim J. Robbins
37d2356335 Write the message to stderr, not file descriptor 2, so that perror()
writes to the correct stream if stderr has been redirected with freopen().
2002-12-19 09:53:26 +00:00
Tim J. Robbins
a207a8e3f1 Use strerror_r() to format the error message so that strerror()'s static
buffer does not get clobbered.

ISO/IEC 9899:1999 7.21.6.2 3:
"The implementation shall behave as if no library function calls the
strerror function."
2002-12-19 09:50:10 +00:00
Ruslan Ermilov
2efeeba554 mdoc(7) police: "The .Fa argument.". 2002-12-19 09:40:28 +00:00
Ruslan Ermilov
3ca4c01eea mdoc(7) police: Fixed a few .Fa abuses. 2002-12-19 09:33:34 +00:00
Ruslan Ermilov
454e286809 mdoc(7) police: excessive quotes. 2002-12-19 08:13:27 +00:00
David E. O'Brien
f37d6d4463 Update with the 4.7 libraries, and add libposix1e to the mix. 2002-12-18 18:05:07 +00:00
Mike Barcroft
5a98f074e6 Rearrange strerror() so that its itoa procedure can be used with
strerror_r().  Doing this allows us to ensure that strerror_r() always
fills the supplied buffer regardless of EINVAL or ERANGE errors.

strerror()'s semantics have changed slightly such that an argument of
0 is now considered invalid and errno is set to EINVAL.

Remove internal regression test for strerror() and strerror_r().  This
will be reincarnated in src/tools/regression/lib/libc/string.

In strerror(3), add a comment about strerror()'s bogus return type.

PR:	44356
2002-12-18 16:53:31 +00:00
Ruslan Ermilov
5c564bae0a mdoc(7) police: Fixed abuses of the .Ar and .Em macros. 2002-12-18 13:33:04 +00:00
Ruslan Ermilov
1fae73b137 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
Ruslan Ermilov
a0ce78ec1d mdoc(7) police: "The .Fn system call". 2002-12-18 12:39:25 +00:00
Ruslan Ermilov
95f4226b27 mdoc(7) police: "The .Fn function". 2002-12-18 10:13:54 +00:00
Ruslan Ermilov
b92cc9b878 mdoc(7) police: Fixed the .Nm abuse. 2002-12-18 10:10:32 +00:00
Ruslan Ermilov
2faeeff4c9 mdoc(7) police: Tidy up the syscall language.
Stop calling system calls "function calls".

Use "The .Fn system call" a-la "The .Nm utility".

When referring to a non-BSD implementation in
the HISTORY section, call syscall a function,
to be safe.
2002-12-18 09:22:32 +00:00
Tim J. Robbins
e4ceb70f7a Document what happens when the format string contains insufficient
conversion specifications to completely specify the resulting struct tm.

PR:		46331
Submitted by:	Christian S.J. Peron
MFC after:	2 weeks
2002-12-18 05:00:54 +00:00
Martin Blapp
fb4c80619a Change the name for the local unix-socket based protocol
from "unix" back to "local".  Add some compat stuff so both
ways work for some time.

Reviewed by:    phk
Approved by:    imp (UPDATING)
Requested by:   iedowse, lukem@netbsd.org
2002-12-16 22:24:26 +00:00
Dag-Erling Smørgrav
32f0c0487b Merge in most non-style differences from Andrew Korty's pam_ssh 1.7. 2002-12-16 14:33:18 +00:00
Maxim Konovalov
a61f5b202b o getsockopt(2) 'level' argument should be 0, not SOCK_STREAM. It
does not hurt anything because uipc_ctloutput() does not check
sopt->sopt_level.

Pointed out by:	ru
MFC after:	1 week
2002-12-16 13:42:13 +00:00
Matthew Dillon
92da00bb24 This is David Schultz's swapoff code which I am finally able to commit.
This should be considered highly experimental for the moment.

Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
MFC after:	3 weeks
2002-12-15 19:17:57 +00:00
Maxim Konovalov
04e30a1ce6 o Fix bogus getsockopt(2) call: swap SOCK_STREAM and LOCAL_PEERCRED.
The bug does not affect anything because SOCK_STREAM == LOCAL_PEERCRED == 0x1.

PR:		bin/46165
Submitted by:	Alain Thivillon <at@rominet.net>
Reviewed by:	dd
MFC after:	1 week
2002-12-15 09:37:54 +00:00
Ruslan Ermilov
0fcfb0df3a mdoc(7) police: markup overhaul. 2002-12-14 15:29:27 +00:00
Bill Fenner
43ac5a2340 Add an implementation of the POSIX.1 sockatmark(3). 2002-12-13 22:22:55 +00:00
Ruslan Ermilov
c8d40b7d34 mdoc(7) police: sort xrefs in SEE ALSO. 2002-12-13 16:53:51 +00:00
Tom Rhodes
6883c2e5ae Fix the HISTORY to match reality. They were never MFC'ed to 4.X.
Submitted by:	R. Imura <imura@ryu16.org>
Approved by:	re (murray)
2002-12-12 22:22:51 +00:00
Ruslan Ermilov
8d5d039f80 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
Ruslan Ermilov
87e9be3900 mdoc(7) police: .Dt is ALL UPPERCASE.
Approved by:	re
2002-12-12 08:19:47 +00:00
Ruslan Ermilov
051bb54bd3 mdoc(7) police: Added the missing .Os call; it's not strictly
necessary nowadays, but is documented as "required", and may
become so again in the future.

Approved by:	re
2002-12-11 15:55:29 +00:00
Ruslan Ermilov
8416165a24 Fixed the parameter's name.
PR:		docs/46183
Submitted by:	Dirk Gouders <gouders@et.bocholt.fh-ge.de>
Approved by:	re
2002-12-11 14:04:37 +00:00
Ruslan Ermilov
a9a15f3ea4 mdoc(7) police: tiny nits.
Approved by:	re
2002-12-09 14:11:37 +00:00
Ruslan Ermilov
fd779e0181 mdoc(7) police: tiny nits.
Approved by:	re
2002-12-09 14:04:05 +00:00
Ruslan Ermilov
187f61df61 mdoc(7) police: overhaul.
Approved by:	re
2002-12-09 13:54:29 +00:00
Ruslan Ermilov
142de08d3a mdoc(7) police: nits.
Approved by:	re
2002-12-09 13:14:15 +00:00
Ruslan Ermilov
60849ee115 mdoc(7) police: nits.
Approved by:	re
2002-12-09 12:47:18 +00:00
Ruslan Ermilov
e199383992 mdoc(7) police: overhaul. 2002-12-09 12:41:29 +00:00
Daniel Eischen
84001cde8f For now, build and install this as libkse instead of libpthread.
This will avoid any accidental use of an experimental library.

Suggested by:	rwatson
Approved by:	re (jhb)
2002-12-08 22:43:31 +00:00
Peter Wemm
878c9687ec Do not guarantee an overflow of tm_year when doing the binary search in
localtime/mktime/tmcomp and friends on ia64.

Approved by:	re
2002-12-05 19:54:47 +00:00
Ruslan Ermilov
db8993ce9e Capitalize ASCII code names.
Approved by:	re
2002-12-05 08:50:00 +00:00
Ruslan Ermilov
ae82896268 Consistently mark std(in|out|err) with .Dv, because that's how they
are marked up in stdio(3), and because they are defined expressions
of type "FILE *".

Approved by:	re
2002-12-04 18:57:46 +00:00
Ruslan Ermilov
898f520da8 mdoc(7) police: markup overhaul.
Approved by:	re
2002-12-04 17:49:15 +00:00
Ruslan Ermilov
3b29692060 mdoc(7) police: markup overhaul.
Approved by:	re
2002-12-04 16:28:45 +00:00
Ruslan Ermilov
304d1f73fe mdoc(7) police: overhaul.
Approved by:	re
2002-12-04 15:47:41 +00:00
Peter Grehan
8238b87b55 Minimal libc for PowerPC.
Reviewed by: benno

Approved by: re (blanket)
2002-12-04 07:25:14 +00:00
Jake Burkholder
7b628f43e0 Reduce WARNS level to 3 in the non-crypto case to fix make release on sparc64.
This may only be turning up now to changes in the cpp predefines for sparc64,
which may be turning on more strict alignment checking.

Approved by:	re
2002-12-04 04:34:59 +00:00
Jake Burkholder
5afad5832a Update the second copy of libstand to deal with the new ufs2 superblock
format.  The one in sys/boot/libstand is not connected to the build.

Approved by:	re
2002-12-03 16:25:29 +00:00
John Baldwin
ba0b471d64 Break up a bunch of crazy if statements to use a case statement instead
to be cleaner.  Also, when deleting a chunk, try to find the mother chunk
as a whole chunk by default if this isn't a BSD partition or a unused or
whole chunk.  Before we just did this for FreeBSD and FAT slices, which
means that other chunk types such as EFI and mbr (mbr is used for slices
that don't have their own chunk type).

Submitted by:	nyan (mostly)
Approved by:	re
2002-12-02 21:42:29 +00:00
Peter Wemm
a5bf4e71ef Replace rev 1.33 with a real fix. The problem was integer overflows
when trying to store the year in a signed int.  The maximum time_t on ia64
is around 292 billion years in the future, but 'int' and struct tm.tm_year
can only represent then ext 2.1 billion years or so.

This solves the problem of mktime/localtime looping on ia64.  Unfortunately,
the standards say that tm_year is an 'int', so we are still stuck with a
y2147483647 bug.  bash2's configure script looks for bugs in mktime() and
fails on ia64 because of this.  However, mktime() on FreeBSD fails the test
normally anyway so this is no big loss.

This change does not affect any other platforms besides ia64.

Approved by:	re
2002-12-02 01:05:08 +00:00
Bruce Evans
4ce32d5dee Backed out previous commit (alignment suitable for RELENG_4) as planned
since it has been MFC'ed.  See the log message for the previous commit
for more details.  The alignment bug in gcc-3 has not been fixed, but
it is not very serious and the previous commit just moved it (as intended).

Approved by:	re (murray)
2002-12-01 17:36:18 +00:00
Ruslan Ermilov
279062fae1 mdoc(7) police: sweep. 2002-11-29 17:35:09 +00:00
Ruslan Ermilov
92b1f2f7a3 mdoc(7) police: sweep. 2002-11-29 16:42:23 +00:00
Ruslan Ermilov
1798791d24 mdoc(7) police: formatting nits.
Approved by:	re
2002-11-29 15:57:50 +00:00
Dag-Erling Smørgrav
bb16bd87d7 Whitespace nits.
Approved by:	re (bmah)
2002-11-28 20:11:31 +00:00
Dag-Erling Smørgrav
3fdd8a4036 Add a PAM_MODULE_ENTRY to this module so it'll actually do something.
Approved by:	re (bmah)
2002-11-28 20:05:42 +00:00
Hajimu UMEMOTO
c86d6b6cb7 try SIOCGIFINDEX 1st to be able to use network aliasing.
Submitted by:	jlemon
Approved by:	re
2002-11-28 17:46:40 +00:00
Dag-Erling Smørgrav
d5216a4fb7 Implement and document support for an HTTP_REFERER environment variable.
PR:		28171
Submitted by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
Approved by:	re (bmah)
MFC after:	1 week
2002-11-28 12:07:15 +00:00
Kirk McKusick
ada981b228 Create a new 32-bit fs_flags word in the superblock. Add code to move
the old 8-bit fs_old_flags to the new location the first time that the
filesystem is mounted by a new kernel. One of the unused flags in
fs_old_flags is used to indicate that the flags have been moved.
Leave the fs_old_flags word intact so that it will work properly if
used on an old kernel.

Change the fs_sblockloc superblock location field to be in units
of bytes instead of in units of filesystem fragments. The old units
did not work properly when the fragment size exceeeded the superblock
size (8192). Update old fs_sblockloc values at the same time that
the flags are moved.

Suggested by:	BOUWSMA Barry <freebsd-misuser@netscum.dyndns.dk>
Sponsored by:   DARPA & NAI Labs.
2002-11-27 02:18:58 +00:00
Jonathan Mini
e9d0431f0b Schedule spinlocked threads by moving them through the work queue, instead
of the wait queue.

Approved by: re (blanket)
Stolen from: davidxu
2002-11-24 06:45:45 +00:00
Jonathan Mini
4df51f23bb Get the wall clock time from the KSE mailbox, rather than doing another
syscall.
2002-11-24 06:43:21 +00:00
David Xu
2442bdd81b Directly load %edx from mailbox 2002-11-23 04:39:52 +00:00
Archie Cobbs
e804e4b013 Describe newly added fields in the KSE and thread mailboxes.
Approved by:	re
2002-11-22 23:48:38 +00:00
Chris Costello
2db19028d3 Document the `label' capability.
Approved by:	re
Sponsored by:	DARPA, Network Associates Labs
Obtained from:	TrustedBSD Project
2002-11-22 22:22:10 +00:00
David Xu
4949943c48 In _thread_enter_uts, fix eflags saving bug.
In _thread_switch, set current thread pointer in kse mailbox
only after all registers copied out of thread mailbox, kernel will do
upcall at trap time, if set current thread pointer before loading all
registers from thread mailbox, at trap time, the thread mailbox data
will be overwritten by kernel, result is junk data is loaded into CPU.
2002-11-22 11:43:06 +00:00
David Xu
662c0429b9 Fix idle timeout bug, use correct current time of day. 2002-11-20 12:35:59 +00:00
Ruslan Ermilov
c51d717f0c libc_r wasn't so tied to libc for 22 months. 2002-11-18 09:50:57 +00:00
Marcel Moolenaar
ed7ba3cfc2 This file has reincarnated as src/include/uuid.h with a whole new
future ahead of it.
2002-11-18 08:06:39 +00:00
Marcel Moolenaar
c544e42bcf libc header files are normally in src/include. Therefore, uuid.h has
been repo-copied from src/lib/libc/uuid to src/include. Update the
makefiles.

While in src/include/Makefile, reformat and resort INCS. Reverting
the functional change only involves removing uuid.h.

Pompted by: ru
2002-11-18 07:34:56 +00:00
David Xu
4ab365e720 Adjust code for new mailbox format.
Reviewed by: deischen, mini
2002-11-18 02:02:08 +00:00
Peter Wemm
f316609eb4 Oops. Some ut_time stuff slipped through the cracks. These turned out
to be non-fatal due to stack alignment roundups.
2002-11-17 23:46:45 +00:00
Mike Barcroft
4624c61c2d Update SYNOPSIS to reflect the standardized header. Add STANDARDS
section.

PR:	43270
2002-11-17 16:34:07 +00:00
Yoshihiro Takahashi
1cfcbbd71c - Ease sanity check to get cylinders.
- Get the slice name from the result of kern.geom.conftxt.
2002-11-17 13:51:22 +00:00
Doug Barton
7fd268cce6 goto break; != break;
I've no idea if this is the right behavior for the library, but this
at least fixes the build, and matches what seems to be alfred's intent
in the commit message for 1.19.
2002-11-17 08:54:29 +00:00
Alfred Perlstein
f51c1e897d Rework the sysconf(3) interaction with aio:
sysconf.c:
  Use 'break' rather than 'goto yesno' in sysconf.c so that we report a '0'
  return value from the kernel sysctl.

vfs_aio.c:
  Make aio reset its configuration parameters to -1 after unloading
  instead of 0.

posix4_mib.c:
  Initialize the aio configuration parameters to -1
  to indicate that it is not loaded.
  Add a facility (p31b_iscfg()) to determine if a posix4 facility has been
  initialized to avoid having to re-order the SYSINITs.
  Use p31b_iscfg() to determine if aio has had a chance to run yet which
  is likely if it is compiled into the kernel and avoid spamming its
  values.
  Introduce a macro P31B_VALID() instead of doing the same comparison over
  and over.

posix4.h:
  Prototype p31b_iscfg().
2002-11-17 04:15:34 +00:00
Marcel Moolenaar
f8739dd5f9 Implement the lock with a cmpxchg instruction instead of a xchg.
Both are atomic, but the cmpxchg has memory ordering hints. We
give this acquire semantics.

NOTE: The unlock in libc_r is implemented by a "normal" assign
statement. This is not correct on ia64 due to the memory ordering
characteristics of the architecture. We need release semantics
for an unlock.
2002-11-16 17:05:06 +00:00
Daniel Eischen
9ed358fddc Disconnect the userland get/set/swapcontext() functions from
libc.  I want to keep these in some version for the thread
library/ies, but don't know whether to have them repo-copied
to libc_r or renamed and kept in libc.

Change the name of an alpha macro that was changed with the
system call commit.
2002-11-16 06:39:11 +00:00
Alfred Perlstein
3d8ce33a50 Provide more correct default values for sysconf(3) reporting of the AIO
subsystems capabilities:

_SC_AIO_LISTIO_MAX returns the default of _POSIX_AIO_LISTIO_MAX
_SC_AIO_MAX returns the default _POSIX_AIO_MAX
_SC_AIO_PRIO_DELTA_MAX returns the default of 0

Without these adjustments the values returned are -1 even when the
aio side of the kernel returns '0' for them which is incorrect.

Noticed by: Craig Rodrigues <rodrigc@attbi.com>
2002-11-16 06:35:20 +00:00
Marcel Moolenaar
fef38f259f Sort SRCS. 2002-11-16 01:41:33 +00:00
Peter Wemm
6ceeb6902a utmp.ut_time and lastlog.ll_time are explicitly int32_t rather than
time_t.  Deal with the possibility that time_t != int32_t.  This boils
down to this sort of thing:
 -   time(&ut.ut_time);
 +   ut.ut_time = time(NULL);
and similar for ctime(3) etc.  I've kept it minimal for the stuff
that may need to be portable (or 3rd party code), but used Matt's time32
stuff for cases where that isn't as much of a concern.

Approved by: re (jhb)
2002-11-15 22:42:00 +00:00
Yoshihiro Takahashi
021587f8c1 Fixed style(9) 2002-11-15 13:24:29 +00:00
Archie Cobbs
e46cac58cd When about to do an execve(), don't reset the O_NONBLOCK flag on any file
descriptors that have the close-on-exec flag set, as that will have no
effect anyway and might screw something else up if the file descriptor
happens to be shared with another process.

PR:		standards/43335
MFC after:	1 week
2002-11-15 00:34:28 +00:00
Ruslan Ermilov
3f66c888ec Make dynamic PAM modules depend on dynamic PAM library.
Requested by:	des, markm
2002-11-14 19:24:51 +00:00
Robert Drehmel
7ea630865e Define `Sudden_Underflow' when compiling for the Alpha
architecture, mainly to avoid getting a SIGFPE signal sent
when calling strtod(3) with certain input.

The SIGFPE has been sent because the code was not aware that
a Gradual Underflow is handled in software via traps on the
Alpha architecture, but is not implemented in our Alpha kernel
layer.

With `Sudden_Underflow' defined, strtod(3) should not depend
on Gradual Underflow and adjust its calculations accordingly,
which means that other, more subtle errors than the sending of
SIGFPE could be solved by this.

Discussed with:	bde
PR:		alpha/12623
PR:		alpha/17032
PR:		alpha/43567
MFC after:	7 days
2002-11-14 17:06:01 +00:00
Warner Losh
cf04ed1bdf bde points out that the LIBC_MAJOR macro doesn't exist and requests
that we not use it here.  In its place I've put a comment about the
current state of play.

Submitted by: bde
2002-11-14 14:06:14 +00:00
Ruslan Ermilov
bedff4e805 Reset LogTag to NULL in closelog(3). This fixes mysterious crashes
caused by dynamic PAM modules that call openlog(3) and closelog(3),
e.g. ports/security/pam_pwdfile.

What happened here is that the module first registered its "ident"
with openlog(3), then PAM library unloaded module with dlclose(3),
and the next call to syslog(3) resulted in SIGSEGV.

MFC after:	3 days
2002-11-14 12:40:14 +00:00
Marcel Moolenaar
122dd01309 o Fix _longjmp() to return 1 when the return value is given as 0.
o  Remove the unwanted smartness in _longjmp() where it compares
   the current ar.bspstore with the saved ar.bspstore and restores
   ar.rnat based on it. This either avoids saving ar.rnat in the
   jmp_buf or is the consequence of not saving ar.rnat. All this
   complexity breaks libc_r where we use longjmp() to switch to
   different threads and the current ar.bspstore has no relation
   to the saved ar.bspstore. Thus: we save ar.rnat in setjmp()
   and simply restore ar.bspstore and ar.rnat in longjmp().

This code needs a cleanup.
2002-11-14 06:40:23 +00:00
Daniel Eischen
fcfc20c88a Argh, change declaration of two-dimensional array so that it actually
builds.
2002-11-13 21:55:22 +00:00
Daniel Eischen
28c104a549 Make this compile with whatever error-checking is enabled in buildworld
and/or beast.
2002-11-13 19:35:40 +00:00
Daniel Eischen
f38fac1471 At initialization, override the pthread stub routines in libc
by filling in the jump table.

Convert uses of pthread routines within libc_r to use the internal
versions (_pthread_foo instead of pthread_foo).

Remove a couple of globals from application namespace.
2002-11-13 18:13:26 +00:00
Daniel Eischen
fb22a377c6 Use a jump table (a la Solaris) for pthread routines with default
entries in the table being stubs.  While I'm here, add macros to
auto-generate the stubs.  A conforming threads library can override
the stub routines by filling in the jump table.

Add some entries to namespace.h and sync un-namespace.h to it.
Also add a comment to remind folks to update un-namespace.h
when changing namespace.h.
2002-11-13 18:12:09 +00:00
Jacques Vidrine
7c2274dc95 The pam_krb5 module stored a reference to a krb5_ccache structure as
PAM module state (created in pam_sm_authenticate and referenced later
in pam_sm_setcred and pam_sm_acct_mgmt).  However, the krb5_ccache
structure shares some data members with the krb5_context structure
that was used in its creation.  Since a new krb5_context is created
and destroyed at each PAM entry point, this inevitably caused the
krb5_ccache structure to reference free'd memory.

Now instead of storing a pointer to the krb5_ccache structure,
we store the name of the cache (e.g. `MEMORY:0x123CACHE') in
pam_sm_authenticate, and resolve the name in the other entry points.

This bug was uncovered by phkmalloc's free'd memory scrubbing.

Approved by:	re (jhb)
2002-11-13 17:46:15 +00:00
Jacques Vidrine
88c8bcce6c Use krb5_get_err_text' instead of error_message' so that instead of
e.g.

   Unknown error: -1765328378

we get

   Client not found in Kerberos database

Another way to accomplish this would have been to leave
`error_message' alone, but to explicitly load the Kerberos com_err
error tables.  However, I don't really like the idea of a PAM module
dorking with global tables.

Approved by:	re (jhb)
2002-11-13 17:44:29 +00:00
Ruslan Ermilov
b448dd2f9e Actually check if stdbool.h exists when BOOTSTRAPPING. 2002-11-13 13:47:48 +00:00
Ruslan Ermilov
4192cfffe2 Bootstrapping aid for 4.0-RELEASE. 2002-11-13 11:50:40 +00:00
Marcel Moolenaar
c3e6b1182b Handle EFI partitions the same as regular FAT partitions. The only
difference between the two from a low-level point of view is that
the partition type is different. This change adds EFI related cases
to existing switch statements with existing FAT related cases.
2002-11-13 05:31:32 +00:00
Robert Watson
433c28e012 Add LOGIN_SETMAC to the list of flags that can't be set without class
information, since we rely on the pwd entry to know what MAC labels
to set as part of the login process.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-12 22:30:01 +00:00
Archie Cobbs
6578194b8b Fix bogus return values from libc_r's writev() routine in situations where
a partial-write is followed by an error.

PR:		43335
MFC after:	3 days
2002-11-12 19:01:49 +00:00
Jonathan Mini
1cb53a1828 Schedule an idle context to block until timeouts expire without blocking
further upcalls.
2002-11-12 00:55:01 +00:00
Chad David
86b62d35bf - Document the chunk_name() function that replaces chunk_n[].
- Rearrange things a tiny bit.
2002-11-11 19:37:19 +00:00
Chad David
8ff8da756b Remove parameter names from function prototypes (at least one collided
with stdlib.h).

discussed with: phk
2002-11-11 18:55:57 +00:00
Poul-Henning Kamp
efb14d4614 Remove debugging printfs. 2002-11-11 10:08:46 +00:00
Marcel Moolenaar
7aa65edc75 ia64 ABI breaker:
Don't force 16-byte alignment at run-time. Do it at compile-time.
This saves us the pointer fiddling by the setjmp functions and
reduces complexity. While here, increase the jmp_buf by 16 bytes
to an even 512 bytes. Coincidentally, due to the way alignment
was handled prior to this change, the jmp_buf has not changed in
size, but only in how the space is used. Prior to this change
the 16 bytes were reserved for enforcing alignment; now they are
reserved by us for future extensions.
Therefore, this ABI breaker is relatively save: the failure is
always an alignment trap.
2002-11-11 08:11:44 +00:00
Marcel Moolenaar
cd5a1c3b76 MBR slices are named the same on ia64 as they are on i386. 2002-11-11 04:46:39 +00:00
Marcel Moolenaar
40e2de8b79 Given that we have 3 places to document UUID related information,
namely uuidgen(1), uuidgen(2) and uuid(3), the following division
has been choosen:
	uuidgen(1)	A description of the command line utility,
			and other user oriented UUID information.
	uuidgen(2)	A mostly technical description of UUIDs.
	uuid(3)		A description of the functions and other
			programmer oriented UUID information.

According to the division: add more technical contents.

Contributed by: Hiten Pandya <hiten@uk.FreeBSD.org>
Edited and enhanced: marcel
2002-11-11 00:29:01 +00:00
Jake Burkholder
83702273a3 Write the boot block to the first 16 sectors of all partitions, instead of
always to the first 16 sectors of the disk.  The firmware reads the boot
code from a partition, defaulting to 'a' if none is specified, which only
corresponds to the first 16 sectors of the disk if 'a' is first.  Solaris
often makes the swap partition first, instead of the root partition, and
users expect to be able to do the same with freebsd as well.  This also
allows one to temporarily boot from another partition if the boot block
on the root partition gets scrambled somehow.
2002-11-10 21:07:29 +00:00
Marcel Moolenaar
7593e0d3c5 Add efi to the list of types for which we need to return tha name.
Also, return chunk type efi in case we find an EFI partition in
the GPT. We used to return FAT due to a lack of EFI type.
2002-11-10 20:53:10 +00:00
Marcel Moolenaar
c9a3bb24d6 Add an efi chunk type. We need to be able to create an EFI partition
on ia64, because that's where we need to put the loader and the
kernel.
2002-11-10 20:49:28 +00:00
Marcel Moolenaar
255bef40ce General cleanup:
o  Remove all code guarded by !defined(__ia64__). This file is
   specifically written for ia64,
o  Handle the case when read_block() or write_block() fails. We
   don't want sysinstall(8) to signal a thumbs-up on error,
o  Set the starting (cyl,hd,sect) triple to 0xFFFFFF when either
   bios_hd or bios_sect is zero or the LBA us not representable
   with the triple. In that case automaticly initialize the
   ending triple with 0xFFFFFF as well,
o  Reindent Write_Int32() as it was different than the rest of
   the file,
o  Remove some unused variables that appeared to be used but
   were effectively useless.
o  Plug a memory leak: The second timne we read the MBR, we write
   out a modified block, but didn't free the memory after writing.
o  Replace d1->sector_size with 512 when we read/write the MBR.
   We ignore the sector size in cases we shouldn't but adhered to
   it in cases it would be wrong if the sector_size wasn't 512.

This file should eventually be rewritten to write out a GPT. For
now, a MBR will do...
2002-11-10 20:47:02 +00:00
Tim J. Robbins
b18146b4c2 Add cross references to mbrtowc(3) and wcrtomb(3). 2002-11-10 11:14:58 +00:00
Tim J. Robbins
2f5154a2c1 Don't check whether the first byte of the buffer is a null byte when
the buffer has zero length (n == 0).
2002-11-10 10:49:14 +00:00
Warner Losh
c906b66373 Restore Peter's version of static __sF. There's too much pain for it
to be static for 5.0.  I may remove this for 5.1 or 5.2.  No more
binaries or libarires will be generated with __sF starting as of
yesterday.  Originally the plan had been to eliminate this for 5.0,
but we didn't get the __std{in,out,err}p changes merged into -stable
until yesterday (rather than in September 2001 like it should have
been).  Given that didn't happen on time, we can't do the other part
of the scheme now.

# Please do not change this without talking to me first.
2002-11-10 08:44:38 +00:00
Tim J. Robbins
7183f43d95 Describe the n' and ps' arguments to mbrlen(). 2002-11-09 10:21:01 +00:00
Tim J. Robbins
f4937dbebc Typo: pointer to -> pointed to 2002-11-09 09:47:06 +00:00
Tim J. Robbins
490eeb06b4 Use wide character ctype functions directly instead of relying on
4.4BSD extensions to the single-byte ctype functions.
2002-11-09 05:19:08 +00:00
Tim J. Robbins
39df93ae41 Add a missing return statement for the pwcs == NULL case (XSI extension). 2002-11-09 04:13:26 +00:00
Bill Fenner
d5c24aa856 Fix two typos. 2002-11-08 19:10:05 +00:00
Yoshihiro Takahashi
3b6431b5ed - Recognize FAT partition on MBR and PC98 disks.
- Fix to convert to the name of partition.
2002-11-08 15:25:15 +00:00
Robert Watson
963b8cdcc8 Update acl.3 to xref getfacl(1) and setfacl(1), the recommended tools for
manipulating file ACLs.  Update the status of the implementation a bit,
update the copyright, etc.

Obtained from:	TrustedBSD Project
2002-11-08 15:01:28 +00:00
Yoshihiro Takahashi
8704e2bb35 MFi386: revision 1.4. 2002-11-08 14:49:14 +00:00
John Baldwin
a96977d0ab Don't set a variable to a bogus value right before setting it to the
correct value in the next statement.
2002-11-08 14:00:44 +00:00
John Baldwin
7f55ebcd18 Don't set a value to a variable that we don't use. 2002-11-08 14:00:09 +00:00
John Baldwin
2b39144955 - Merge Write_FreeBSD() into Write_Disk().
- Miscellaneous cleanups.
2002-11-08 13:58:00 +00:00
Robert Watson
0285334bc8 License and blurb update authorized by Network Associates. 2002-11-07 20:37:04 +00:00
Yoshihiro Takahashi
ba91558ce9 Fixed pc98 support.
(merged i386 changes from chunk.c 1.41 and disk.c 1.100)
2002-11-07 14:54:53 +00:00
John Baldwin
75bd4c1549 Get this closer to working. The Write_Disk() function's for loop needed
to use the same start condition as the i386 version.  However, since
Alpha's only have one fake "slice" from sysinstall's perspective we don't
need to use a loop, but can just write out the BSD label in the first
fake "slice".
2002-11-07 14:39:21 +00:00
Chris Costello
2834b91a8d o Make the COMPATIBILITY section a bit less redundant.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Labs
2002-11-06 17:38:18 +00:00
Chris Costello
baae0d7638 o Update man page to reflect the new prototypes for mac_{to,from}_text.
o Remove a (currently) no-longer-pertinent entry from errors.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Labs
2002-11-06 17:34:29 +00:00
Robert Watson
ce311c66ec Hook up the userland wrapper for __mac_execve().
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-11-06 03:38:47 +00:00
Juli Mallett
7a9b006d78 Wrap function prototype declarations in __BEGIN_DECLS to do the right thing
with them in non-C cases.

Requested by:	Patrick Hartling <patrick@137.org>
2002-11-05 10:55:16 +00:00
Robert Watson
f8d0815040 License update authorized by NAI: remove clause 3. 2002-11-05 01:42:35 +00:00
Archie Cobbs
83189ac197 Fix bogus return values from libc_r's write() routine in situations where
a partial-write is followed by an error.

PR:		43335
MFC after:	1 week
2002-11-05 00:59:18 +00:00
Robert Watson
1ccff0f490 Clarify language relating to ACLs, Capabtilities, and MAC, since the
implementation status of these services has changed substantially
since this man page was last updated.
2002-11-04 20:52:09 +00:00
Robert Watson
ec05f17e38 Update license, historical information. 2002-11-04 20:45:44 +00:00
Robert Watson
443ab2a0fd Point out that the MAC Framework is considered experimental. 2002-11-04 20:42:58 +00:00
Nick Sayer
e3979b2122 After waiting for help with the markup, I finally decided to just patch
the page myself. The new language is more accurate than what was there
before, but the most accurate way of describing the funcionality eludes
me.

PR:		kern/33904
MFC after:	1 month
2002-11-04 19:30:04 +00:00
Tim J. Robbins
e30609f0b6 Add descriptions for some _PC_* variables from <sys/unistd.h> that
were missing.
2002-11-04 07:21:44 +00:00
Alfred Perlstein
ac1cc6ee11 Backout "compatibility hack" for __sF.
Requested by: Steve Kargl <sgk@troutmask.apl.washington.edu> (submitter)
2002-11-04 03:23:56 +00:00
John Baldwin
da58ad34ef Remove unused MBR gunk leftover from i386. 2002-11-03 21:18:17 +00:00
Yoshihiro Takahashi
0932c866b6 Fix to compile for pc98. 2002-11-03 09:35:08 +00:00
Marcel Moolenaar
62b693d7db Initialize d->bios_cyl. We know the media size in sectors, the number
of heads end the number of sectors per track. If there's an obvious
insanity (heads and sectors are both zero or the media size is not
an integral multiple of heads times sector) we set the number of
cylinders to zero.
2002-11-03 01:37:08 +00:00
Alfred Perlstein
0fc25b925d Provide a hook to make __sF visible outside of libc for commercial apps
if WANT_COMPAT4_STDIO is defined when compiling libc.

Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>
2002-11-02 19:47:53 +00:00
Marcel Moolenaar
12d76c6fec Add support for GPT:
1. When the parition type is not an integer, try to parse the type
   as an UUID. If that succeeds, map the UUID to chunk_e.
2. For GPT partitions, pass the type constructed in point 1 above
   to Add_Chunk.

While here, fix the MBREXT case by only checking if the first 3
characters are MBR. This avoids duplication.
2002-11-02 12:14:04 +00:00
Marcel Moolenaar
0a8575280c Add support for ia64. This is almost identical to i386, except that
with GPT chunks of type "part" do not necessarily live under chunks
of type "freebsd". We don't necessarily have a disklabel.
2002-11-02 12:05:16 +00:00
Poul-Henning Kamp
a6db5ac980 Don't claim all MBR's have subtype 165 on i386.
Spotted by:	Frode Nordahl <frode@nordahl.net>
2002-11-02 10:57:44 +00:00
Kelly Yancey
e0f640e82d Track the number of non-data chararacters stored in socket buffers so that
the data value returned by kevent()'s EVFILT_READ filter on non-TCP
sockets accurately reflects the amount of data that can be read from the
sockets by applications.

PR:		30634
Reviewed by:	-net, -arch
Sponsored by:	NTT Multimedia Communications Labs
MFC after:	2 weeks
2002-11-01 21:27:59 +00:00
Poul-Henning Kamp
0514d63049 Fill in partition 2 with with "whole disk" parameters. 2002-11-01 16:28:19 +00:00
Doug Rabson
ceb336710e * Add stubs for pthread_cond_broadcast.
* Fix typos in rwlock stubs.
* Add pthread_XXX counterparts to the _pthread_XXX stubs which libraries
  like libX11 can use to ensure thread-safety without requiring the use
  of a thread library.

Submitted by: Terry Lambert (pthread_cond_broadcast)
Reviewed by: deischen
2002-11-01 09:37:17 +00:00
Tim J. Robbins
14ffdae94d No need to include floatio.h here: vfscanf() no longer uses anything
it defines.
2002-11-01 05:13:01 +00:00
Archie Cobbs
83999f5a32 Re-apply the previously backed-out commit that fixes the problem where
HUGE_VAL is not properly aligned on some architectures. The previous
fix now works because the two versions of 'math.h' (include/math.h
and lib/msun/src/math.h) have since been merged into one.

PR:	bin/43544
2002-10-31 23:05:20 +00:00
Daniel Eischen
0ece26b0ba Use the strong symbol'd version of pthread_mutex_init so we don't
accidentally call a stub or application provided version of the
same routine.

Submitted by:	dfr
2002-10-31 18:17:58 +00:00
Poul-Henning Kamp
fd4a61e809 Style(9) improvements. 2002-10-31 07:56:40 +00:00
Poul-Henning Kamp
63abca411d Set the sector size for the disk. 2002-10-31 07:55:38 +00:00
Yoshihiro Takahashi
fe1f2a9a84 Restore to pc98 support. 2002-10-31 05:51:25 +00:00
Yoshihiro Takahashi
fecafa765a Use ${MACHINE} variable instead of using '.if .endif' each machines. 2002-10-31 05:43:49 +00:00
Yoshihiro Takahashi
c540b79f8b Add '#include <err.h>' for warn(). 2002-10-31 05:38:48 +00:00
Jake Burkholder
e03494dd17 Actually save the bootblock in the disk structure. Write the bootblock
to the right place on the disk instead of srewn all over it.
2002-10-31 04:25:17 +00:00
Alfred Perlstein
c313cb2abf Make __sF static. This can not be allowed to exist in 5.x. 2002-10-31 01:54:27 +00:00
Poul-Henning Kamp
89a0742e57 Untested alpha disk writer. 2002-10-30 20:54:22 +00:00
Poul-Henning Kamp
ae59d02e12 Write out 15 sectors of boot code. 2002-10-30 20:52:07 +00:00
Dag-Erling Smørgrav
a49b853d94 Use __func__ and break a long line. 2002-10-30 15:01:29 +00:00
Dag-Erling Smørgrav
7504527ed2 Fix a bug in fenner's _fetch_writev() patch (rev 1.36)
Submitted by:	fenner
2002-10-30 14:25:00 +00:00
Tim J. Robbins
f6b767e33f Add two additional references to the See Also section, which contain much
better descriptions of UTF-8 and related issues.
2002-10-30 11:49:05 +00:00
Sheldon Hearn
a4df5101a3 Use "deprecated" instead of "depreciated" where appropriate. 2002-10-30 07:49:11 +00:00
Jonathan Mini
40e044cbd3 Make pthread_sigmask(3) operate on the thread signal mask, not the process
signal mask.
2002-10-30 07:13:27 +00:00
Jonathan Mini
2d9a293b4e Use KSE to schedule threads. 2002-10-30 06:07:18 +00:00
Dag-Erling Smørgrav
66b8df5fdf Recognize the (incorrect) error code a MediaHawk server sends in reply to
unrecognized commands such as MDTM.

Requested by:	Stephen Roome <stephen_roome@pepcross.com>
2002-10-30 06:06:16 +00:00
Dag-Erling Smørgrav
75c3973ab8 Clarify my feelings towards fetch / libfetch. 2002-10-30 04:53:58 +00:00
Dag-Erling Smørgrav
bb13d0af67 Recommit the non-broken parts of 1.34 and 1.37.
Change the type and name of a variable introduced in 1.33.
2002-10-30 04:43:00 +00:00
Dag-Erling Smørgrav
cab8495092 Don't forget to set the error flag when _fetch_read() returns -1. 2002-10-30 04:42:01 +00:00
Marcel Moolenaar
65393a863e Implement DCE 1.1 compliant UUID functions. Immediate use of these
functions is expected for uuidgen(1), mca(8) and gpt(8). Given the
generic use of UUIDs beyond the scope of the DCE 1.1 specification,
visibility of the data structure at all levels of the machine,
including firmware and the wish to not create a permanent build-
time FreeBSD-ism for DCE compliant applications by creating a new
library, it was decided that libc would be the least inappropriate
place. Also, because the UUID functions live in libc under IRIX as
well, we have maximized our portability and left as many options
open as possible.

This implementation introduces an extension not found in the
specification: the status parameter is allowed to be a NULL-
pointer. The reason for introducing the extension is because
the status is almost never of any use.

The manpage that's part of this commit is a minimal place-holder
and is further fleshed-out in the near future.

Approved by: re@
Contributed by: Hiten Mahesh Pandya <hiten@unixdaemons.com>
Sponsored by: marcel :-)
Tested on: alpha, i386, ia64
2002-10-30 03:51:00 +00:00
Warner Losh
a4a37038bb Reinstate revs 1.35-36 and 1.38. Revisions 1.34 and 1.37 were specifically
the root cause of the bus errors I was experiencing.

Submitted by:	fenner
Tested by:	obrien
Prompted by:	peter
2002-10-30 00:17:16 +00:00
Robert Watson
626251ea01 While an interface can be depreciated, we prefer deprecated.
Submitted by:	Wayne Morrison <tewok@tislabs.com>
2002-10-29 20:53:46 +00:00
Poul-Henning Kamp
30820b02ab Getting closer to getting things right:
Always ignore the RAW_PART for BSD.
Having no quirks is not a mistake for an architecture.

Tested by:	DES
2002-10-29 17:12:02 +00:00
Ruslan Ermilov
ff56972e0e Cosmetics. 2002-10-29 15:00:10 +00:00
Ruslan Ermilov
b382ba4fb1 bsd.doc.mk changes:
Don't gratuitously pipe thru a cat(1) if NODOCCOMPRESS.

Only create _stamp.extra when necessary.

Get rid of SOELIMPP and OBJS.

Use Groff version of soelim(1); we need its -I option
for the following to work.

Don't needlessly chdir to SRCDIR.  Only a few documents
need CD_HACK, and those that need it either use refer(1)
or .PSPIC macro which internally uses the .psbb call.
2002-10-29 14:56:09 +00:00
Poul-Henning Kamp
4730deb1e3 Don't call warn(3). 2002-10-29 14:45:43 +00:00
Dag-Erling Smørgrav
6dcfea0f37 Don't forget to '\n'-terminate new entries. This unbreaks chpass -a.
Submitted by:	joerg
2002-10-29 13:58:42 +00:00
David E. O'Brien
b68fbebd5a Fix `pkg_add -r' by backing out revs 1.34-1.38.
Revs 1.37-8 produce a bus error in some environments.
Revs 1.34-6 do not bus error, but write corrupted files.
2002-10-29 12:17:43 +00:00
Poul-Henning Kamp
56d3134bfb Since make release is toast anyway, add wood to the pyre:
This significantly rewamps libdisks discovery of existing disk
layout.

Please send me reports if this does not work as expected on
i386 or sparc64 platforms.

I need to sort out alpha, pc98 and ia64 (in that order) before
testing on those platforms make a lot of sense.

Belived to work for:	i386 sparc64
Unknown state:		pc98 alpha ia64
2002-10-29 12:13:36 +00:00
Tim J. Robbins
a019c0e525 Remove unnecessary inclusion of <rune.h> to make it obvious that this file
does not use the deprecated rune system.
2002-10-29 09:03:57 +00:00
Poul-Henning Kamp
2f7fb9cc47 Fix various minor issues.
Don't explode on 'write' because we access a pointer we just freed.
2002-10-29 07:39:18 +00:00
Poul-Henning Kamp
bab7e1509c the 'd' partition hasn't been magic for years, so allocate it in natural
order instead of last.
2002-10-29 07:37:11 +00:00
Poul-Henning Kamp
b6c0192ce3 Add the write_spar64_disk.c to make life easier for testers.
This file depends on some major surgery in the rest of libdisk which is
not yet committed.
2002-10-29 07:35:36 +00:00
Chris Costello
311e43248d Scoop out examples illustrating the label text format and refer to
maclabel(7) instead.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Labs
2002-10-28 23:06:04 +00:00
Dag-Erling Smørgrav
cf2d89d98b libfetch is now WARNS5 clean in the non-SSL case. 2002-10-28 10:37:31 +00:00
Tim J. Robbins
ae95ea1a26 Cross-reference putc(3). 2002-10-28 10:35:18 +00:00
Dag-Erling Smørgrav
a1d214e88b Allow the admin to specify a different NAS identifier than the hostname.
Submitted by:	Boris Kovalenko <boris@ntmk.ru>
2002-10-28 10:28:46 +00:00
Dag-Erling Smørgrav
32a4a82829 Fix an off-by-one error (> where >= should have been used) which caused
_fetch_writev() to incorrectly report EPIPE in certain cases.

Also fix a number of const warnings by using __DECONST(), plus a signed /
unsigned comparison by casting the rhs to ssize_t.

Submitted by:	fenner, Craig Rodrigues <rodrigc@attbi.com>
2002-10-28 10:19:03 +00:00
Tim J. Robbins
c5929b304e Handle boundary cases more correctly; mblen(s, 0) and mbtowc(NULL, s, 0)
return -1 regardless of what s points to, mbtowc(&w, s, 1) sets w to a
null wide character when s points to a null byte. This seems to be closer
to what most other implementations do, but the C99 standard contradicts
itself for these cases.
2002-10-28 08:24:46 +00:00
Bill Fenner
8497092d00 Up WARNS to 3 if not building with crypto.
Approved by:	des
2002-10-28 01:41:28 +00:00
Garrett Wollman
c9885518de Create a small library function, check_utility_compat(3), to determine
whether a named utility should behave in FreeBSD 4.x-compatible mode
or in a standard mode (default standard).  The configuration is done
malloc(3)-style, with either an environment variable or a symlink.

Update expr(1) to use this new interface.
2002-10-28 00:15:43 +00:00
Garrett Wollman
188c541ceb Update limits and configuration parameters for 1003.1/TC1/D6.
Implement new sysconf keys.  Change the implenentation of
_SC_ASYNCHRONOUS_IO in preparation for the next set of changes.

Move some limits which had been in <sys/syslimits.h> to <limits.h> where
they belong.  They had only ever been in syslimits.h to provide for the
kernel implementation of the CTL_USER MIB branch, which went away with
newsysctl years ago.  (There is a #error in <sys/syslimits.h> which I
will downgrade in the next commit.)
2002-10-27 18:03:02 +00:00
Garrett Wollman
688dfe4533 Do not include <sys/syslimits.h> directly; it is not intended for general
consumption.
2002-10-27 17:44:33 +00:00
Dag-Erling Smørgrav
1a5424b137 Slight amendment to rev 1.34: instead of considering any short read an
error, only report an error if no data was read at all (unless len was
0 to start with).  Otherwise, the final read of practically any transfer
will end in a fatal error.
2002-10-27 17:20:49 +00:00
Dag-Erling Smørgrav
2761348f78 Introduce _fetch_writev(), which is the conn_t version of writev(2). In
the SSL case, it is no different from the old _fetch_write(), but in the
non-SSL case it uses writev(2) to send the entire vector as a single
packet (provided it can fit in one packet).  Implement _fetch_write()
and _fetch_putln() in terms of _fetch_writev().

This should improve performance in the non-SSL case (by reducing protocol
overhead) and solve the problem where too-smart-for-their-own-good
firewalls reject FTP packets that do not end in CRLF.

PR:		bin/44123
Submitted by:	fenner
2002-10-27 16:11:21 +00:00
Dag-Erling Smørgrav
9f788e9c90 Eliminate two cases of undefined behaviour: total in _fetch_write() was
not initialized before use, and _http_growbuf() did not return a value
on success.

Reported by:	Peter Edwards <pmedwards@eircom.net>
MFC after:	2 weeks
2002-10-27 15:43:40 +00:00
Dag-Erling Smørgrav
e24f60e74f Back out the previous commit, and fix the bug rather than try to hide its
symptoms: make timeouts and short transfers fatal, and set errno to an
appropriate value (ETIMEDOUT for a timeout, EPIPE for a short transfer).

MFC after:	2 weeks
2002-10-27 15:08:21 +00:00
Tim J. Robbins
b6f33850e0 Style sweep. 2002-10-27 10:41:21 +00:00
Peter Wemm
7e50af21ba Add back ia64 support that was removed in the last few revisions.
I've cloned write_ia64_disk.c from write_i386_disk.c.
2002-10-27 00:21:02 +00:00
Hajimu UMEMOTO
ddb2984b5d query ip6.arpa then ip6.int for IPv6 reverse lookup. follows RFC3152.
MFC after:	5 days
2002-10-26 19:00:14 +00:00
Alexey Zelkin
1f1e884a91 Add & hookup manpage for pthread_attr_get_np(3).
MFC after:	3 days
2002-10-26 15:04:29 +00:00
Alexey Zelkin
cab33357a5 Hook uthread_attr_get_np.c to build 2002-10-26 13:55:35 +00:00
Alexey Zelkin
6dc0be5f9f Add pthread_attr_get_np() function. This is FreeBSD non-portable POSIX threads
extenston function. It supposed to provide facility to get already created
thread's attributes. Looks like it's last thing we need to make JDK's Hotspot
building without requirement to have source tree.

Reviewed by:	deischen
MFC after:	3 days
2002-10-26 13:53:22 +00:00
Alexey Zelkin
64536616e6 Be more agresive on arguments' checking.
OK'ed by:	deischen
MFC after:	3 days
2002-10-26 13:47:06 +00:00
Hajimu UMEMOTO
a89c1d30b2 - scopeid is u_int32_t
- strtoul pedant.  pointed out by deraadt

Obtained from:	KAME
MFC after:	1 week
2002-10-25 17:07:02 +00:00
Hajimu UMEMOTO
dd521ef192 - kill strcpy
- port range check need to be done before htons.  from deraadt
- %d/%u audit
- correct bad practice in the code - it uses two changing variables
  to manage buffer (buf and buflen).  we eliminate buflen and use
  fixed point (ep) as the ending pointer.
- use snprintf, not sprintf
- pass correct name into q.name.  from lukem@netbsd
- sync comment

Obtained from:	KAME
MFC after:	1 week
2002-10-25 16:24:28 +00:00
Tim J. Robbins
583efa1268 Use an internal buffer for the result when the first argument is NULL. 2002-10-25 13:24:45 +00:00
Tim J. Robbins
79db40061f The ORIENTLOCK macro is no longer needed since all functions use
FLOCKFILE/FUNLOCKFILE explicitly.
2002-10-25 07:01:56 +00:00
Nate Lawson
13cc1c8394 The FTP connection caching needs a better interface -- connections are
closed through _fetch_close() which is the only one who knows the connection
REALLY was closed (since ref -> 0).  However, FTP keeps its own local
cached_connection and checks if it is valid by comparing it to NULL.  This
is bogus since it may have been freed elsewhere by _fetch_close().

This change checks if we are closing the cached_connection and the ref is 1
(soon to be 0).  If so, set cached_connection to NULL so we don't
accidentally reuse it.  The REAL fix should be to move connection caching
to the common.c level (_fetch_* functions) and NULL the cache(s) in
_fetch_close().  Then all layers could benefit from caching.
2002-10-25 01:17:32 +00:00
Andrew Gallatin
b49cf84452 #ifdef out assignToPartition on non x86 arches to unbreak the world
on alpha, sparc64 and ia64
2002-10-24 13:35:52 +00:00
Bruce Evans
74ed384d0d Restored sigaction's name in its prototype. 2002-10-24 13:03:46 +00:00
Sheldon Hearn
a7af55af93 * Modernize aio(4), providing instructions for static and dynamic kernel
linking.

* Fix disorder in the SEE ALSO sections of aio_*(2).

* Remove unnecessary cross-references from the SEE ALSO sections of
  aio_*(2); config(8), kldload(8) and kldunload(8) are cross-referenced
  from aio(4).

* Remove the KERNEL OPTIONS sections from aio_*(2), now that these
  pages cross-reference aio(4), which contains suitable kernel linking
  reference material.
2002-10-24 12:57:05 +00:00
Dag-Erling Smørgrav
47ae1efd8d Add cross-references to the aio(4) manual page.
Submitted by:	Craig Rodrigues <rodrigc@attbi.com>
2002-10-24 12:22:57 +00:00
Tim J. Robbins
fcd7f38f46 Replace wcsstr() with an implementation based on strstr(), which is far
more efficient. The problem with the previous implementation was that it
calculated the length of the first argument ("big") with wcslen() when
it was not necessary.
2002-10-24 02:53:45 +00:00
Tim J. Robbins
1707c9c3f5 Restore Berkeley SCCS id. 2002-10-24 02:48:45 +00:00
Tim J. Robbins
6f9ed74abc Remove the Standards section again until we get these functions sorted
out. This will probably have to wait until after 5.0-R.
2002-10-24 01:24:26 +00:00
Chris Costello
4bae1674ce Place mac_prepare() with the other mac_prepare*() functions. 2002-10-24 01:16:56 +00:00
Chris Costello
0d511a4ea7 mac_free() no longer accepts a void * parameter; only mac_t's are supposed
to be passed.  Point this out in a warning notice, which will eventually
go away, sometime between now and -RELEASE.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-10-24 01:01:29 +00:00
Chris Costello
3261668c1d Remove superfluous empty "FILES" section.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-10-23 23:56:15 +00:00
Chris Costello
b90b17d351 Remove hard sentence breaks.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-10-23 23:55:23 +00:00
Poul-Henning Kamp
d7e9a2ad8a More lobotomy:
remove CHUNK_BSD_COMPAT, it was a bad idea, and now its gone.
        remove DOSPTYP_ONTRACK, missed in OnTrack removal commit.
        unifdef -DHAVE_GEOM
make tst01 compile again.
2002-10-23 21:05:42 +00:00
Poul-Henning Kamp
943599b348 Remove another 10 mindless #ifdefs. 2002-10-23 20:35:42 +00:00
Poul-Henning Kamp
844c9bb884 Rely on sysctl kern.disks to be there, and get rid of one of the far too
many lists of disk device driver names in the system.  At this point
we should really get the names from the XML, but hey...
2002-10-23 20:15:10 +00:00
Poul-Henning Kamp
b485e51552 Remove unnecessary ioctls tickling kernel side to realize that we fiddled
with the disk.  GEOM will automatically retaste when we closet he filedesc.
2002-10-23 20:02:33 +00:00
Poul-Henning Kamp
532dd2fa86 Untangle #ifdefs in the write-end of things by giving each arch its
own file and own copy of WriteDisk() to do things in.

This should have happened years ago, instead of adding #ifdefs all
over the place.
2002-10-23 19:52:32 +00:00
Poul-Henning Kamp
56c0241de6 Separate the struct disklabel filling stuff from the rest of Write_FreeBSD(). 2002-10-23 19:32:18 +00:00
Mark Murray
bf2f52b5fa Remove duplicate declaration. 2002-10-23 17:35:11 +00:00
Mark Murray
d69d15193c Make the first argument of getbsize a size_t* instead of an int*, as this is what the quantity actually is. Fix an easy const while I'm here. 2002-10-23 14:18:07 +00:00
Yoshihiro Takahashi
7bec978084 - The GEOM system does not work on pc98.
- Fix to build w/o the HAVE_GEOM option.
2002-10-23 13:00:09 +00:00
Tim J. Robbins
fb22884400 Fix the NetBSD RCS id's on these files; somehow they were initially
committed with the tags unexpanded.
2002-10-23 11:08:40 +00:00
Tim J. Robbins
1eb0f442c7 Reimplement more efficiently, using a single forward scan (like strrchr(3))
instead of scanning forwards to find the end of the string then scanning
backwards to find the character.
2002-10-23 10:52:04 +00:00
Tim J. Robbins
ec23fdffc7 Reimplement, handling the case where c == L'\0' correctly and fixing
some style(9) bugs.
2002-10-23 10:47:47 +00:00
Poul-Henning Kamp
0bb035b962 Add the new extra argument also in the alpha case. 2002-10-23 10:47:00 +00:00
Hajimu UMEMOTO
aadad92276 query ip6.arpa then ip6.int for IPv6 reverse lookup. follows RFC3152.
Obtained from:	KAME
MFC after:	1 week
2002-10-23 10:45:09 +00:00
Tim J. Robbins
edafcb6d73 Add a Standards section, claiming conformance to IEEE Std. 1003.1-2001.
Also add a note to the Bugs section pointing out that strerror() and
perror() share the same static buffer.
2002-10-23 10:16:21 +00:00
Dag-Erling Smørgrav
02edf2208d Translate to English. 2002-10-23 08:55:14 +00:00
Tim J. Robbins
4bf546e192 Replace this wcsncpy() implementation with one based on strncpy.c to fix
two major bugs:
- off-by-one overflow when the length of the source string exceeds or
  equals the destination buffer size.
- old version was not padding the destination buffer with null wide chars
2002-10-23 04:35:25 +00:00
Robert Watson
84333872d8 If LOGIN_SETMAC is set and MAC is enabled in the kernel, then see
if the user has a 'label' entry in their login class.  If so, attempt
to set that label on the process as part of the credential setup.  If
we're unable to parse the label, or unable to set the label, fail.
In the future, we may also want to warn if a label is set but the
kernel doesn't support MAC.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-23 03:17:22 +00:00
Juli Mallett
a43cf6c23b Use an error message closer to old dumpfs(8) in the case of truncated/no
superblock.

Submitted by:	kkenn

Can't use it verbatim, at least I hate to, as the ", skipped" bit doesn't
make much sense in a library, to me.
2002-10-22 19:36:10 +00:00
Juli Mallett
8b8cd35523 Add the concept of a per-disk error string, and a function which prints it
along with the errno, if one is set.
2002-10-22 19:25:58 +00:00
Max Khon
979187053d remove unused __sys_sigaltstack() declaration
Approved by:	deischen
2002-10-22 17:13:32 +00:00
Alfred Perlstein
9ed01b5d3b Explain to users that they may want to kldload aio.
Move Xref sections.

Submitted by: Craig Rodrigues <rodrigc@attbi.com>
2002-10-22 16:12:27 +00:00
Poul-Henning Kamp
c0e2acef98 No longer needed. 2002-10-22 15:22:36 +00:00
Jake Burkholder
2ecf9f7162 Rename the libc signal trampoline to __sigtramp to match netbsd. This
should allow gdb to detect when we're executing in a signal trampoline.
2002-10-22 15:15:39 +00:00
Poul-Henning Kamp
c087f8a1ce Remove the last traces of bogus MAKEDEV functionality. 2002-10-22 15:07:50 +00:00
Robert Watson
391b1d758d Reflect MAC kernel/user API changes into the libc MAC implementation.
This removes a lot of complexity, since we basically just reserve
space on a retrieval of a label, and pass around strings.  Two new
elements: (1) consumers of the API must now declare what label
elements they are interested in retrieving, or (2) rely on the default
provided in a new configuration file, mac.conf.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-22 14:36:11 +00:00
Poul-Henning Kamp
374ec39bb6 Live with it: I had hoped to find a neat way to deal with all the magic
numbers, but so far havn't come up with anything:  Add an #ifdef PC98.
2002-10-22 11:55:27 +00:00
Poul-Henning Kamp
1e08b0a637 Avoid a lot of #ifdef PC98 code by giving a couple of the Chunk functions
an extra argument for all archs.
2002-10-22 10:51:58 +00:00
Poul-Henning Kamp
fa9e908771 Swing the weed-whacker around libdisk:
Constify some things.
Staticize some things.
Remove some unused things.
Prototype some things.
Don't install a gazillion man-pages links.
Drop support for ON-TRACK disk-manager.
2002-10-22 09:13:02 +00:00
Robert Watson
19eab74a6c .Xr mac.3 and posix1e.3 to mac.9. Point at sys/mac.h in posix1e.3.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-22 01:52:53 +00:00
Poul-Henning Kamp
7d6d1e62a7 Lobotomize MakeDev(), we don't need it with devfs. 2002-10-21 22:03:03 +00:00
Poul-Henning Kamp
1c67107149 Sigh, d_ntracks, not d_nheads. 2002-10-21 20:42:20 +00:00
Poul-Henning Kamp
53894badfd fwheads and fwsectors got swapped underway.
Approved by:	sam
2002-10-21 19:44:07 +00:00
Marcel Moolenaar
8aab0cca45 Implement working on ELF corefiles. Use kvm_read() when reading
memory while mapping a virtual address to a physical address.
This allows us to work with virtual addresses for page tables,
provided it doesn't cause infinite recursion. Currently all
page tables are direct mapped.
2002-10-21 04:21:12 +00:00
Robert Watson
803bf0837b Unhook the per-policy parsing/printing MAC modules in libc to prepare
to bring in the new MAC label management API.  With the new API
revision, we have only policy-agnostic code in libc and the base
kernel.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-21 03:54:24 +00:00
Sam Leffler
5100bb69ac track gratuitous change to sys/i386/include/reg.h 2002-10-21 03:47:22 +00:00
David E. O'Brien
513829ec5e Use a warns setting we can catch regressions with. 2002-10-20 23:50:28 +00:00
Juli Mallett
47a6e68f2c When dumping thread info, only include the filename and line if we actually
know what file! (Prevents use of NULL).

MFC after:	1 day
Reviewed by:	deischen
2002-10-20 22:49:06 +00:00
Sam Leffler
11480fc6ae Another baby step toward getting sysinstall working:
o fillin media s/h/c fields from new XML phk just added; need this because
  sysinstall uses them in the fdisk look-alike
o add new tags to xml parser
o cleanup parser a touch; remove unused tags and move tag parsing stuff to
  a table to simplify future additions
o redo callback to pass 64-bit values since mediasize overflows u_int32_t
o loosen parsing sanity checks a touch to deal with new xml we must handle
o move sector size probing to non-geom handling since we now get it from xml
o remove WHOLE_DISK_SLICE buggery now that we get mediasize from xml
2002-10-20 22:19:37 +00:00
Thomas Moestl
4ed0293602 Adapt to handle the new sparc64 core dump format correctly.
Reviewed by:	jake
2002-10-20 17:06:50 +00:00
Tim J. Robbins
9d649c1fd0 When recycling a cached connection, increment the reference count so that
the heap block does not get freed and reused. This should fix the
pkg_add -r crashes that have been happening for months.
2002-10-20 10:36:27 +00:00
Tim J. Robbins
9619813de9 Cross-reference fmtcheck(3). 2002-10-20 03:56:37 +00:00
Peter Wemm
d7dd6ae7ec Give in on the __sF stuff. I have a better fix in mind that is future
proof, but this should buy me some time for now.
2002-10-19 22:28:07 +00:00
Sam Leffler
bf6e74b5f5 o since you can't use DIOCGDINFO and DIOCGSLICEINFO on drive nodes with geom,
get the xml configuration for the devices and "parse" the information to
  get what's needed
o replace #ifdef DEBUG constructs with DPRINT/DPRINTX to make the code more
  readable

Note the xml "parser" is very very hackish and should be replaced with a
real one.  This one was done to be very small and special-purpose; don't
think about copying it elsewhere.

Approved by:	phk
2002-10-19 16:39:28 +00:00
Tim J. Robbins
118bb75e02 Indent code example with one tab, not two, for consistency with the rest. 2002-10-19 13:48:45 +00:00
Tim J. Robbins
f7383f14ae C89 does not specifiy strsep(), so our strsep() implementation cannot
conform to it.

Obtained from:	OpenBSD
2002-10-19 13:41:22 +00:00
Tim J. Robbins
67c3339291 The ftok() function has not been in libcompat for quite a while. 2002-10-19 13:33:12 +00:00
Marcel Moolenaar
798df0ed06 Add the libz derived files, added in the previous commit, to
CLEANFILES. We were not cleaning up after ourselves.
2002-10-19 02:23:09 +00:00
Mark Murray
08076c086f Oops. Also provide a lint-compatible unused argument warning killer. 2002-10-18 16:24:20 +00:00
Mark Murray
6b83b5cdb8 ISOfy functions, sort headers and mark unused arguments. 2002-10-18 16:22:13 +00:00
Mark Murray
9e542d7dbc Correct the headers needed to use dbopen(3) and friends. 2002-10-18 16:20:08 +00:00
Robert Watson
195426c211 Introduce 'exempt_if_empty' option to pam_wheel(8), which bypasses the
group membership requirement if the group has no explicit members listed
in /etc/group.  By default, this group is the wheel group; setting this
flag restores the default BSD behavior from 4.x.

Reviewed by:	markm
Requested by:	various
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-18 02:37:29 +00:00
Sam Leffler
52dee23d90 not sure if this correct, but it compiles again 2002-10-18 00:26:34 +00:00
Juli Mallett
4aba47f7ce FD locking is not enabled anymore, so the table which contains the owner
of a file descriptor has NULL entries, so don't dereference the table entries
to get the owners ever -- don't print the owners when processing a thread_dump
request as a result of SIGINFO.

Reviewed by:	deischen
2002-10-17 20:26:26 +00:00
Sam Leffler
c1623066ca o ioctl DIOCGDINFO error wasn't checked
o memory wasn't reclaimed in certain cases
o add more msgs under #ifdef DEBUG
o rewrite tangle of for loops for clarity

NB: Open_Disk should redo how it malloc's memory so the caller can free
    everything.  Documentation says the caller can free the disk list to
    reclaim everything but this leaks the indirect strings.  Fixing this
    is simple for the sysctl case but adds complexity to the fallback,
    non-sysctl, case.
2002-10-17 18:34:32 +00:00
Sam Leffler
dda5b5a58a correct arg order to strlcpy/strlcat under #ifdef alpha 2002-10-17 18:23:21 +00:00
Tim J. Robbins
0145ba86d1 Fix off-by-one error when pushing back a multibyte sequence in
wide character class (%l[) and wide string (%ls) conversions.
2002-10-17 13:04:00 +00:00
Tim J. Robbins
63b01047f4 Make part of the previous change clearer; check flags for SUPPRESS directly
instead of checking whether we're using a temporary buffer.
2002-10-17 12:06:29 +00:00
Tim J. Robbins
bd25c6f476 The field width for single-byte string conversions (%c, %s, %[) is the
maximum number of bytes that may be stored in the array, not the maximum
number of wide characters to read. The wording of the standard unfortunately
does not make this clear.
2002-10-17 12:02:36 +00:00
Alfred Perlstein
e6fc380cd2 de-__P() 2002-10-16 22:18:42 +00:00
Robert Drehmel
6c84d0b1a5 - Remove the lsearch() and lfind() functions and their manpage from
the compatibility library libcompat.
 - Add new implementations of lsearch() and lfind() which conform to
   IEEE Std 1003.1-2001 to libc.  Add a new manual page for them and
   add them to the makefile.
 - Add function prototypes for lsearch() and lfind() to the search.h
   header.
2002-10-16 14:29:23 +00:00
Tim J. Robbins
35739e072b Count field width correctly for suppressed multibyte fields (%*lc,
%*ls, %*l[).
2002-10-16 14:07:08 +00:00
Robert Drehmel
e2830bc9e0 Remove unneeded $FreeBSD$ tags. 2002-10-16 14:05:29 +00:00
Robert Drehmel
e768c1be41 - Remove the old insque() and remque() functions and their manual
page from the compatibility library.
 - Add new implementations of insque() and remque() which conform to
   IEEE Std 1003.1-2001 to libc.  Add a new manual page for them and
   connect them to the build.
 - Add the prototypes of insque() and remque() to the search.h
   header.
2002-10-16 14:00:46 +00:00
Tim J. Robbins
6180233fd8 Set the error bit on the stream if an encoding error occurs. Improve
handling of multibyte sequences representing null wide characters.
2002-10-16 12:09:43 +00:00
Tim J. Robbins
9acd2d9b3c Avoid truncating invalid wide characters that are outside the range of
'unsigned char'; signal an error instead.
2002-10-16 11:37:38 +00:00
Tim J. Robbins
185b9d1c2c Add a Bugs section and note that fmtcheck() is out of sync with printf();
it does not recognise any of the conversions or modifiers added in C99.
2002-10-16 04:03:02 +00:00
Tim J. Robbins
927ecbf313 Add support for the XSI %C and %S formats, which are the same as %lc
and %ls.
2002-10-16 03:55:53 +00:00
Ian Dowse
d7cd6ba39b Use kqueue(2) instead of poll(2) to wait for replies and timeouts
in the UDP RPC client code. As a side-effect, this fixes some bugs
that might prevent the RPC call from ever timing out for example
if the server keeps responding with the wrong xid. This could
probably be simplified further by using the EVFILT_TIMER filter.
2002-10-15 22:28:59 +00:00
Max Khon
19521b0699 fix typo in comments (in preparation for MFC)
Approved by:	deischen
2002-10-15 16:40:57 +00:00
Tim J. Robbins
2fe3e5cda7 Add cross-references to the wide character counterparts of these functions. 2002-10-15 10:11:53 +00:00
Maxim Sobolev
f927dfabc9 Eliminate superfluous memory access in memcpy(3)/memmove(3).
Obtained from:	NetBSD
MFC after:	1 week
2002-10-15 09:50:07 +00:00
Tim J. Robbins
616e099e5c Remove stray comma at the end of the See Also list. 2002-10-15 09:49:54 +00:00
Yoshihiro Takahashi
89335c9f46 Fix to check disk geometry.
Submitted by:	kawanobe@st.rim.or.jp (Kawanobe Koh)
2002-10-14 13:15:14 +00:00
Tim J. Robbins
af1c9c0e4d Use a weak reference instead of a macro to make vfscanf an alias
for __vfscanf.
2002-10-14 11:18:21 +00:00
Tim J. Robbins
3a0e6ca553 Write the strvis()'d string out to the history file in history_save(),
not the original string. Fixes the bug where every second line of a
history file was empty.
2002-10-14 10:42:38 +00:00
Tim J. Robbins
0b78986fe2 FA, FB and FC are lead bytes according to recent Microsoft documentation. 2002-10-14 01:50:45 +00:00
Tim J. Robbins
d891f26821 Style changes. Mainly removing excessive whitespace and parens. 2002-10-14 01:46:18 +00:00
Kris Kennaway
56373a5196 Dump in $TMPDIR if !setugid, and use mode 0644 instead of 0666.
MFC after:	2 weeks
2002-10-13 11:23:31 +00:00
Kris Kennaway
61bdf123c3 Ignore TMPDIR if the application is setugid.
MFC after:	2 weeks
2002-10-13 11:22:16 +00:00
Tim J. Robbins
57185ffa08 FreeBSD's libedit does not include NetBSD's readline emulation code.
Remove references to it from the Authors and History sections.
2002-10-13 08:46:57 +00:00
Kris Kennaway
8c12ff22b4 Use buffer-safe string functions for paranoia. 2002-10-12 22:03:22 +00:00
Kris Kennaway
5060afe8bc Zero memory after malloc. This stops sysinstall from dumping core
during disk probing with malloc debugging enabled.

MFC after:	1 week
2002-10-12 22:01:57 +00:00
Mike Barcroft
54e4e385de Add restrict type-qualifier. 2002-10-12 16:13:41 +00:00
Andrey A. Chernov
8a093dade3 Cosmetic: use LCMONETARY_SIZE_{FULL,MIN} defines like in other places 2002-10-12 11:31:07 +00:00
Tim J. Robbins
419c442678 Describe the restrictions on seeking on wide character streams, and also
point out that fseek() clears the ungetwc() buffer.
2002-10-12 09:22:25 +00:00
Tim J. Robbins
bd26dcd103 Fix a typo causing incorrect formatting for negative values in some locales
(at least the French ones), a memory leak upon successful termination, a
pointer arithmetic error causing heap corruption, and an off-by-one bug
causing incorrect amounts of padding at the right of the value.
2002-10-12 04:38:35 +00:00
Tim J. Robbins
2e9212d966 Save errno around calls to free(); at least some code paths clobber it
and we are not interested in any errors it may report.
2002-10-11 23:31:50 +00:00
Tim J. Robbins
d0d87283e9 Document the kind of format string strfmon() expects. Sync the Errors
section with reality.
2002-10-11 23:17:17 +00:00
Tim J. Robbins
2621915fa7 Use the new struct lconv members to determine how to format international
monetary values.
2002-10-11 23:08:03 +00:00
Tim J. Robbins
40a48101d3 Non-negative amounts should not have an extra space in front of them
when the `(' flag is used.
2002-10-11 23:04:59 +00:00
Tim J. Robbins
284d56227c "Left precision" and "right precision" are not flags, but separate parts
of the format string that appear after the field width.
2002-10-11 22:59:22 +00:00
Peter Wemm
74a4ba21f7 Zap the early-adopter transition aid before we get into serious
5.0-R territory, as threatened.  This only affects antique 5.0
systems that have not had a 'make world' done for well over a year.
2002-10-11 22:38:17 +00:00
Ruslan Ermilov
890b32ee41 Build kerberized versions of the PAM library, and install them
into corresponding distributions during "make release".  (This
also cleans the "slib" distribution up from the .o files.)

PR:		misc/43825 (inspired by)
2002-10-11 14:17:09 +00:00
Maxim Konovalov
65edeb2358 Do not allow empty GIDs for non-NIS entries.
MFC after:	2 weeks
2002-10-11 11:35:30 +00:00
Tim J. Robbins
972baa3747 Add a UTF-8 encoding method, which will eventually replace the antique
"UTF2" method. Although UTF-8 and the old UTF2 encoding are compatible
for 16-bit characters, the new UTF-8 implementation is much more strict
about rejecting malformed input and also handles the full 31 bit range
of characters.
2002-10-10 22:56:18 +00:00
Jens Schweikhardt
b2aa8b2a98 Document that write(2) et al can return EROFS for attempts to write the
disk label area.

PR:		43891
Submitted by:	Diomidis D. Spinellis <dds@istlab.dmst.aueb.gr>
MFC after:	3 days
2002-10-10 19:16:10 +00:00
Robert Drehmel
5d38e85ded Fix another spelling mistake. 2002-10-10 14:16:08 +00:00
Robert Drehmel
73fbee5795 Correct a spelling mistake. 2002-10-10 14:14:44 +00:00
Tim J. Robbins
ecab372b7e Add cross-references to wide character versions of these functions. 2002-10-10 04:31:57 +00:00
Tim J. Robbins
ce04c11001 Cross-reference between byte and wide-character stdio functions. Remove
references to fputwc() and fgetwc() being macros while I'm at it.
2002-10-10 04:12:40 +00:00
Alfred Perlstein
534ba86baa de-__P() 2002-10-09 23:22:11 +00:00
Robert Watson
cc7a6f19d0 Add brief mention of the extattr_*_link() system call variants.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-09 22:26:48 +00:00
Tim J. Robbins
f4da1a754d Add support for the 6 new C99 struct lconv members dealing with formatting
international monetary values: int_p_cs_precedes, int_n_cs_precedes,
int_p_sep_by_space, int_n_sep_by_space, int_p_sign_posn, int_n_sign_posn.
This should not break existing binaries or LC_MONETARY data files.

Reviewed by:	ache
MFC after:	1 month
2002-10-09 09:19:28 +00:00
Peter Wemm
cf9f968444 Drop almost 3k from /bin/sync by moving errno to a seperate file
to avoid all syscalls pulling in sys_errlst[].

Noted by:  bde
2002-10-09 08:04:24 +00:00
Archie Cobbs
30e25a918b Add note that there is a kernel-imposed limit on the number of threads
in a KSE group that may be simultaneously blocked in the kernel.
2002-10-08 22:42:42 +00:00
Archie Cobbs
5f384e6a34 Add MLINKS to kse.2. 2002-10-08 17:43:40 +00:00
Yoshihiro Takahashi
6d8c8fabad Fix to support pc98. 2002-10-08 12:13:19 +00:00
Tim J. Robbins
d9e5246b17 Add a note to the Compatiblity section suggesting that these functions
only be used for byte values. Add cross-references to the wide-char
counterparts.
2002-10-06 10:15:38 +00:00
Hajimu UMEMOTO
71918af633 Put giant locks due to make getaddrinfo(), getnameinfo()
and getipnodeby*() thread-safe.
Our res_*() is not thread-safe.  So, we share lock between
getaddrinfo() and getipnodeby*().  Still, we cannot use
getaddrinfo() and getipnodeby*() in conjunction with other
functions which call res_*().

Requested by:	many people
2002-10-06 08:43:35 +00:00
Tim J. Robbins
82f520853b Remove rants/whines about the rune interface being superior to the
ISO C interface.
2002-10-06 06:03:23 +00:00
Tim J. Robbins
bc98899df0 Remove a completely incorrect statement from the Return Values section.
Add cross-references to the restartable mulitybte functions (mbrlen(3) etc.)
2002-10-06 05:58:24 +00:00
Daniel Eischen
be779e1ae2 Once again, remove the i386-specific hacks to save and restore
the FPU state on receiving and returning from a signal.
The FPU save and restore macros are no longer needed, but
remain defined in case we need to use them again (something
else breaks).  They'll be removed permanently once new
syscalls are added to handle the new i386 ucontext size.
2002-10-05 02:22:26 +00:00
Mike Barcroft
ddb4fb5b44 Add restrict type-qualifier to sem_getvalue(). 2002-10-04 21:32:00 +00:00
Poul-Henning Kamp
a5bdf7706c White-space change only. Move closer to style(9). 2002-10-04 18:10:39 +00:00
Ruslan Ermilov
d4a2b97450 Minor tweaks to make this manpage readable. 2002-10-04 15:07:39 +00:00
Ruslan Ermilov
a1c8598e38 Style.
Approved by:	phk
2002-10-04 15:06:44 +00:00
Poul-Henning Kamp
2cf7136979 Connect libbsdxml (nee libexpat) to the build. 2002-10-04 13:40:39 +00:00
Robert Drehmel
45408a8564 Correct the regressive part of my last commit to these files:
use the .Fn macro instead of the .Fo ... .Fc combination to
format function prototypes.

Reminded by:	bde
2002-10-04 11:31:00 +00:00
Poul-Henning Kamp
8a349ed8fe Ok, concensus was to install libexpat under a "private brandname", and after
some deliberation the name "libbsdxml" was chosen since it conveys the two
most important attributes:  "Private to FreeBSD" and "XML".

Add a skeleton man-page to give the credit and point for further
documentation.  (If somebody wants to write a true mdoc manpage for
this I am sure both the eXpat people and I will be grateful).

(Still not connected to the build)
2002-10-04 11:20:18 +00:00
Tim J. Robbins
fd4f1dd9fa Add a placeholder implementation of wcscoll() and wcsxfrm() which gives
locale-sensitive collation only in single-byte locales, and just does
binary comparison for the others with extended character sets.
2002-10-04 03:18:26 +00:00
Peter Wemm
6c3fc0c450 Drop login.c and logwtmp.c from the library build. None of the apps
that we build use it, and any that do should be using the official
login()/logwtmp() in libutil.
2002-10-04 00:24:31 +00:00
David E. O'Brien
8269e8c887 Add stpcpy(3). 2002-10-03 19:39:20 +00:00
Johan Karlsson
208464c323 Actually implement gzip's -c option. minigzip now also doubles
as zcat properly.

PR:		13043
Submitted by:	Toshihiko ARAI <toshi@jp.freebsd.org>
		Jonathan Towne <jontow@twcny.rr.com>

Approved by:	peter, sheldonh (mentor)
MFC After:	2 weeks
2002-10-03 19:30:22 +00:00
Hajimu UMEMOTO
a52b6b83a2 Allocate 64K recieve buffer for DNS responses.
Though res_query.c also defines and refers MAXPACKET, it is not
related to ansbuf.  So, I didn't touch res_query.c.
2002-10-03 17:25:33 +00:00
Tim J. Robbins
17f6e5b0e7 Improve three instances of questionable or confusing grammar. 2002-10-03 14:09:06 +00:00
Tim J. Robbins
28ddc4138c Add an example. 2002-10-03 14:07:26 +00:00
Tim J. Robbins
b06b097805 Document towlower() and towupper() in separate manual pages instead of
trying to confusingly document both on the same page. The new manual pages
are based on tolower(3) and toupper(3) instead of the old towlower(3).
2002-10-03 11:23:06 +00:00
Tim J. Robbins
9981ef2702 Point out that although toupper() and tolower() really accept rune_t's
and not just unsigned char's, callers should use towupper() and towlower()
instead when working with wide characters if portability is a concern.
2002-10-03 11:14:00 +00:00
Ruslan Ermilov
721d559c03 HTTP authentication got broken in rev. 1.49. 2002-10-03 10:42:19 +00:00
Tim J. Robbins
73d6e4a5a2 towlower() appeared twice in the synopsis; one of the occurrences should
have been towupper(). Add towupper() to the Name section while I'm at it.

Obtained from:	NetBSD (junyoung)
2002-10-03 10:40:01 +00:00
Tim J. Robbins
f2a67ef1bd Add an Examples section with an example of how to use the functions. 2002-10-03 08:49:29 +00:00