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
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
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
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
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
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
Tim J. Robbins
97c1c8f886
Be more consistent with "static".
2002-12-27 01:01:03 +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
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
Ceri Davies
9d99e59872
Grammatical fixup: s/be the -1/be -1/
...
MFC after: 1 day
2002-12-19 21:48:43 +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
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
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
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
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
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
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
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
Archie Cobbs
e804e4b013
Describe newly added fields in the KSE and thread mailboxes.
...
Approved by: re
2002-11-22 23:48:38 +00:00