naddy
eea0705fca
fix wcscasecmp() parameters; <wchar.h> was correct
13 years ago
jmc
091afd940e
tweak previous (my fault);
13 years ago
espie
7b1036f191
wcs(n)casecmp support, manpage comments from jmc@, okay deraadt@
13 years ago
otto
be0afe8548
save errno dance in wrterror() and malloc_dump(); prompted by and ok deraadt@
13 years ago
otto
535636b5df
introduce symbolic constant for initial number of regions
13 years ago
otto
01b4849121
zap regions_bits and rework MALLOC_MAXSHIFT a bit; ok djm@
13 years ago
otto
6ebcec8c72
Avoid fp computations for stats, this make calling malloc_dump() safe in more
cases.
13 years ago
otto
86e4380bcc
fix comment, the bitmap is an array of u_short now
13 years ago
otto
fc442e2a61
Introduce leak detection code for MALLOC_STATS
13 years ago
otto
e726d97c87
Move MALLOC_STATS code to bottom of file, so the real stuff is more at the top.
13 years ago
otto
0ec9d0391a
Up until now, malloc scanned the bits of the chunk bitmap from
position zero, skipping a random number of free slots and then
picking the next free one. This slowed things down, especially if
the number of full slots increases.
This changes the scannning to start at a random position in the
bitmap and then taking the first available free slot, wrapping if
the end of the bitmap is reached. Of course we'll still scan more
if the bitmap becomes more full, but the extra iterations skipping
free slots and then some full slots are avoided.
The random number is derived from a global, which is incremented
by a few random bits every time a chunk is needed (with a small optimization
if only one free slot is left).
Thanks to the testers!
13 years ago
otto
fe5a32734e
Now that we use an array of u_short for the chunk bitmap change a few
1UL to 1U.
13 years ago
otto
dcc6e6f049
More efficient scanning for free chunks while not losing any randomization;
thanks to all testers.
13 years ago
otto
9679bf7a9f
Tweak the description of the optional parts around =. Found this in my
tree, no idea where it came from; ok millert@ jmc@
13 years ago
stsp
4ddc8c789a
Add a wcswidth man page (based on FreeBSD), and fix the implementation
to return -1 in case of an unprintable character.
ok nicm jmc
13 years ago
espie
9766982215
tweak for clarity, ok millert@, jmc@
13 years ago
deraadt
563890ecd9
wrong type for variable; spotted by christian.siebert@cs.tu-chemnitz.de
ok guenther
13 years ago
guenther
48c37b4271
Fix PR 6267: recheck POSIXLY_CORRECT each time getopt_long() starts a new
argv and don't suppress the handling of leading '-' in optstring when
POSIXLY_CORRECT is set.
Based on patch from Eric Blake.
ok and manpage update from millert@, manpage ok jmc@
13 years ago
claudio
2528dce4db
Correct msgbuf_write() example. OK jmc@ and nicm@
13 years ago
matthew
a86644214c
Fix __cxa_finalize() so that calling __cxa_finalize(NULL) properly
invokes handlers registered with __cxa_atexit().
"seems right" deraadt@
13 years ago
schwarze
07ff512110
Correctly escape a literal colon in an enclosure;
the \: roff escape is an optional line break.
13 years ago
jmc
aae2647dbc
superceded -> superseded;
14 years ago
krw
d15a9b6dbc
Update to better describe reality, i.e. disklabel(8) UID usage.
ok jmc@ jsing@
14 years ago
millert
58a7be37c3
Do not attempt to prepend /dev/ to path if it already contains a slash.
OK jsing@
14 years ago
otto
c709ba9eaa
remove comment that hasn't been true for quite a while now;
ok deraadt@ djm@
14 years ago
millert
aab35837b7
Always return a pointer to the static buffer in realpath, even if
path and realpath are the same. This matches the manual and avoids
a bogus cast to non-const. OK jsing@, previous version OK kettenis@
14 years ago
millert
642ed026af
opendev() path argument should be const. OK deraadt@
14 years ago
dhill
bc96223819
avoid pointer arithmetic on void *
tested for a while by me.
ok otto@
14 years ago
jmc
6a45e9cb55
involes -> involves; from Carlos Alberto Pereira Gomes
14 years ago
jsing
96b190e24d
Document isduid(3).
Tweaks from jmc@
ok jmc@ krw@
14 years ago
jsing
46beb6358d
Crank minor due to the addition of isduid().
14 years ago
jsing
9f93f11b6d
Teach readlabelfs() how to handle DUIDs.
ok krw@
14 years ago
jsing
972351062d
Factor out DUID identification code so that it can easily be reused.
ok krw@
14 years ago
nicm
f6bf132ce8
imsg.h requires sys/uio.h, ok deraadt
14 years ago
mikeb
af6c901202
remove skipjack and cast from the libc; ok deraadt
14 years ago
otto
5228178676
print the pointer value that caused the error (if available); ok
deraadt@ nicm@ (on an earlier version)
14 years ago
millert
ee4033dab1
Make gcvt() better match printf("%g") behavior, it now passes regress.
OK deraadt@
14 years ago
matthew
d3d805ce3b
Add timingsafe_bcmp(3) to libc, mention that it's already in the
kernel in kern(9), and remove it from OpenSSH.
ok deraadt@, djm@
14 years ago
jmc
9340c58635
more wacky macro fixing;
14 years ago
jmc
a72152100f
observe the following spelling:
- wide character (noun)
- wide-character (adjective)
this is the "fix of least resistance", and appears to be in line with
posix style; a tiny fix still needed for curses, but i'll mail that
upstream;
14 years ago
millert
9ee6c65862
Check for duplicate variables in the environment when setting a value
via setenv() or putenv(). OK miod@
14 years ago
ray
12d761c542
Sync hcreate(3) with NetBSD, adding some caveats.
OK jmc
14 years ago
blambert
a8e65c8a60
getopt_long.c replaced getopt.c 6+ years ago; we can retire
the REPLACE_GETOPT macro, at long last
ok millert@
14 years ago
tedu
af419260cf
update our recommended hash function to sha256 and note md5 is broken.
ok deraadt jmc millert sobrado
14 years ago
jmc
cb5ae567b3
no more rmd160(1);
14 years ago
naddy
cc68d8828e
Document new unsetenv() error returns.
From Nicolas Legrand <nlegrand@ethelred.fr>; ok jmc@
14 years ago
naddy
55ff65210b
Make unsetenv(NULL) and unsetenv("") give EINVAL, per POSIX. ok deraadt@
14 years ago
chl
808c2fbfb4
add missing headers needed for close() and ioctl().
ok krw@ millert@
14 years ago
nicm
850892b351
Protect against multiple inclusion, from Christiano F. Haesbaert.
ok deraadt@
14 years ago
jsing
16f4bfd65e
If a request to opendev(3) is given in the form of a disklabel UID,
open /dev/diskmap and perform a DIOCMAP ioctl in order to open the actual
device. As a result, all programs which make use of opendev(3) can now
operate with disklabel UIDs.
Feedback from millert@
ok millert@ krw@ thib@
14 years ago