1. don't use MB_CUR_MAX, but MB_LEN_MAX because MB_CUR_MAX is a variable.
2. return a size_t type.
3. added const cond on do while macros.
4. remove unused variables and code,
The shquote() and shquotev() functions copy strings and transform the
copies by adding shell escape and quoting characters. They are used to
encapsulate arguments to be included in command strings passed to the
system() and popen() functions, so that the arguments will have the cor-
rect values after being evaluated by the shell.
normal operation (/var can get filled up by flodding bogus packets).
sysctl net.inet6.icmp6.nd6_debug will turn on diagnostic messages.
(#define ND6_DEBUG will turn it on by default)
improve stats in ND6 code.
lots of synchronziation with kame (including comments and cometic ones).
used to syslog and also send to stderr).
This behaviour can be changed by setting $LIBC_DIAGASSERT to a
string containing one or more of the following letters:
a abort() after syslog and/or print to stderr
A opposite of a
e print assertion message to stderr
E opposite of e
l log assertion message to syslog
L opposite of l
This allows per-process control of the _DIAGASSERT() behaviour (e.g,
if you want to abort() after the assertion is raised) by modifying the
environment before starting the process.
Note that __DIAGASSERT() is still a no-op unless libc is compiled
with -D_DIAGNOSTIC.
* Implement __assert()/__diagassert() by calling __assert13()/__diagassert13()
with a function of NULL, reducing unnecessary code duplication
the argument, instead of va_list. Might not make a difference on most
ports, depending on toolchain/MD typedefs. Does make a difference on sparc64,
where it wouldn't compile otherwise.
- keep the case consistent between the actual name and what's referenced.
e.g, if it's `foo', don't use '.Nm Foo' at the start of a sentence.
- remove unnecessary `.Nm foo' after the first occurrence (except for
using `.Nm ""' if there's stuff following, or for the 2nd and so on
occurrences in a SYNOPSIS
- use Sx, Ic, Li, Em, Sq, and Xr as appropriate
a user-supplied format string against a fallback format string to ensure
that they will consume arguments of the same type.
libc minor bump for new API entry point.
If an argument of a ctype function is outside "unsigned char"
and if it is not EOF, the behavior is undefined.
The isascii(3) is the sole exception of above and it was used to
be used to check a value was valid for other ctype functions in
ancient systems. On modern systems, the ctype functions take
all values of "unsigned char", and this check is obsolete and
even wrong for non-ASCII systems. However, we leave the isascii()
untouched for now, so as not to change the current behavior.
struct dirent *, rather than non-const. this makes scandir(3) the
same as the scandir implementations in libiberty and glibc, and the
select function has no need to modify the dirent.
AF_INET6 wildcard listening socket. heavily documented in ip6(4).
net.inet6.ip6.bindv6only defines default value. default is 1.
"options INET6_BINDV6ONLY" removes any code fragment that supports
IPV6_BINDV6ONLY == 0 case (not defopt'ed as use of this is rare).
this allows you to disable/enable ICMPv6 node information query/reply
processing (which tells remote end the gethostname(3) setting, interface
addresses on the node, and some other things - documented in
draft-ietf-ipngwg-icmp-name-lookup* or something alike).
to test it, try ping6 -w ::1 with nodeinfo=0 and nodeinfo=1.
(sync with kame change)
On platforms where we can use weak aliases, use
__weak_alias(__errno, __errno_func);
and on platforms where we cannot, just compile the function as
__errno, since on those platforms we cannot make libc thread-safe,
at least using this trick.
Are there any platforms where we cannot do __weak_alias() anymore?
* sl_add(); if realloc() fails return -1 instead of calling err(1,...).
otherwise, return 0.
NOTE: this change resulted in sl_add() changing from returning void to int.
this shouldn't be a problem because a) it returns 0 if ok (aka `void', b)
all invokers of sl_add() in the tree have been changed (mainly code i've
written).
char *
svis(char *dst, int c, int flag, int nextc, const char *extra);
int
strsvis(char *dst, const char *src, int flag, const char *extra);
int
strsvisx(char *dst, const char *src, size_t len, int flag,
const char *extra);
These functions correspond to vis(), strvis(), and strvisx() but have an
additional argument extra, pointing to a NUL terminated list of characters.
These characters will be copied encoded or backslash-escaped into dst. These
functions are useful e. g. to remove the special meaning of certain
characters to shells.
To implement the new functions, vis underwent a major rewrite. Most functions
now use a central macro, SVIS. Performance increase ~ factor 2.
Reviewed by Christos.
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.
the first two items result in the addition of code similar to the
following in various functions:
_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif
stderr and syslog()s to user.debug. (it does not abort).
XXX: implement a scheme similar to $MALLOC_OPTIONS which gives the
user control over whether to stderr, syslog, abort, do nothing, etc...
* There was an off-by-one error that caused the addition of a NUL or slash in fts_build() to
overwrite other memory.
* After fts_palloc(), we need to reset `cp' so that it points to the new path name buffer;
otherwise the addition of the file name before calling fts_stat() could lose.
Also, fix stupidity in the fts_palloc() interface. We don't want N bytes more than the
current buffer size; we want N bytes more than the current length. Just pass in the new
size, since we can't figure it out easily here.
* When not using FTS_NOCHDIR, fts_accpath == fts_name. fts_padjust should not
try to move fts_accpath in this case.
* Previous entries at the same level also need to be adjusted.
* A bug was introduced in rev 1.8 (HI CHRISTOS!!) that caused the maxlen
comparison to always fail (due to type promotions) when sp->fts_pathlen ==
cur->fts_pathlen -- thus causing memory stompage.
* Implement fpgetsticky() for alpha.
* Direct fpsetsticky() and fp{get,set}mask() into alpha kernel via sysarch(2).
* Define new sysarch(2) stub for above and install and distribute sysarch.h
for alpha. (The fpcr IS user mode r/w, but for reasons beyond the scope
of a commit message kernel calls are needed.) And much kernel Magick is
required before these do anything, but this way programs compiled under
1.4 will DTRT on future snapshots and releases.
than returning NS_UNAVAIL. this means that a -ve uid entry in hesiod
doesn't stop getpwent() in its tracks. it also brings it in line with
how nis_getpw() works as well in this situation.
problem tracked down (with much pain & suffereing) by simonb.
XXX: we currently have no support for -ve uids, and this is painful in
XXX: hetrogenous environment... (this -ve check is enforced in __pwscan())
nsswitch.conf and they contain similar information).
XXX: in the case where the given array is too small and -1 is returned,
the returned ngroups will be too large by a factor of the difference
between the given size and the number of matches. this is not considered
to be a major problem, since it's still going to be a smaller figure than
what the previous (non suppressive) behaviour returned.
source has been exhausted. this allows getgrent() across multiple
sources (e.g, ``group: files nis'') to work correctly. the flags are
reset in setgrent()/endgrent().
(as per similar change in getpwent.c rev 1.42)
XXX: this change means that code that uses getgrent() to obtain a list
of groups will have to do duplicate suppression... getgrouplist()
springs to mind; i'm about to modify that
source has been exhausted. this allows getpwent() across multiple
sources (e.g, ``passwd: files nis'') to work correctly. the flags are
reset in setpassent()/endpwent().
this fixes a bug noted in [lib/7449] by thorpej, and tracked down to
getpwent() as being the culprit by simonb.
.Sh "SEE ALSO"
to:
.Sh SEE ALSO
The doc macros check for the latter (actually just for 'SEE' as the first
argument to .Sh) to set the section header SEE ALSO flag, which modifies
some behaviour (e.g. references done with .Rs/.Re).
- The historic mode for netgroups was "files nis". Change the default to
this for when /etc/nsswitch.conf does not exist.
- The nis lookup dispatch was mistakenly conditional on -DHESIOD, not -DYP.
isn't a `+' token in the files database.
(this bug probably crept in when a merge to current occurred)
* ensure that the _bad_getpw callbacks in __getpwcompat have an
argument for error reporting.
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
to _sys_siglist.c, so the warning is shown once at link time, not three times
(once for errlist.c itself, once each for the two includes in _sys_siglist.c).
direct the user to include <errno.h> to generate the correct reference.
Warn about references to the deprecated __sys_signame[] or __sys_nerr, and
direct the user to include <errno.h> and use sys_errlist or sys_nerr instead.
user to include <signal.h> or <unistd.h> to generate the correct reference.
Warn about references to the deprecated __sys_siglist[], and direct the
user to include <signal.h> or <unistd.h> and use sys_siglist instead.