tangled
alpha
login
or
join now
jcs.org
/
openbsd-src
0
fork
atom
jcs's openbsd hax
openbsd
0
fork
atom
overview
issues
pulls
pipelines
openbsd-src
/
lib
/
libc
/
stdlib
/
at
jcs
112 files
Makefile.inc
Make our mktemp(3) callback-driven and split into multiple files. Previously, calling any of the mktemp(3) family would pull in lstat(2), open(2) and mkdir(2). Now, only the necessary system calls will be reachable from the binary. OK deraadt@ guenther@
2 years ago
_Exit.c
Update a comment about standards requirements
13 years ago
__mktemp4.c
Make our mktemp(3) callback-driven and split into multiple files. Previously, calling any of the mktemp(3) family would pull in lstat(2), open(2) and mkdir(2). Now, only the necessary system calls will be reachable from the binary. OK deraadt@ guenther@
2 years ago
_rand48.c
zap remaining rcsid.
20 years ago
a64l.3
I am retiring my old email address; replace it with my OpenBSD one.
7 years ago
a64l.c
zap remaining rcsid.
20 years ago
abort.3
stop flushing streams in abort(). it's hackish and unsafe, and no longer required. try to document this fact and some of the history. with feedback from deraadt guenther millert
12 years ago
abort.c
Minimize #includes, particularly to avoid thread_private.h
8 years ago
abs.3
Replace the vague, incorrect, and confusing BUGS sections with CAVEATS clearly stating which arguments have to be avoided, and mention the header files defining the constants required for the checks. Feedback and OK guenther@, OK bluhm@.
7 years ago
abs.c
Wrap <stdlib.h> so that calls go direct and the symbols not in the C standard are all weak. Apply __{BEGIN,END}_HIDDEN_DECLS to gdtoa{,imp}.h, hiding the arch-specific __strtorx, __ULtox_D2A, __strtorQ, __ULtoQ_D2A symbols.
10 years ago
alloca.3
Improve wording in alloca. 1. it's not a bug; it's a caveat. 2. "slightly unsafe" gives me the willies. 3. one .Xr to malloc should suffice ok deraadt jmc
11 years ago
atexit.3
remove please from manual pages ok jmc@ sthen@ millert@
4 years ago
atexit.c
spelling fixes; from paul tagliamonte any changes not taken noted on tech, but chiefly here i did not take the cancelation - cancellation changes;
3 years ago
atexit.h
Move __cxa_thread_atexit* to its own .c file to avoid pulling the code (w/ _dlctl reference) into static executables. It's all Mark's code so put his preferred copyright on it.
8 years ago
atof.3
.Li -> .Vt where appropriate; from josiah frentsos, tweaked by schwarze
3 years ago
atof.c
zap remaining rcsid.
20 years ago
atoi.3
.Li -> .Vt where appropriate; from josiah frentsos, tweaked by schwarze
3 years ago
atoi.c
Wrap <stdlib.h> so that calls go direct and the symbols not in the C standard are all weak. Apply __{BEGIN,END}_HIDDEN_DECLS to gdtoa{,imp}.h, hiding the arch-specific __strtorx, __ULtox_D2A, __strtorQ, __ULtoQ_D2A symbols.
10 years ago
atol.3
.Li -> .Vt where appropriate; from josiah frentsos, tweaked by schwarze
3 years ago
atol.c
zap remaining rcsid.
20 years ago
atoll.3
.Li -> .Vt where appropriate; from josiah frentsos, tweaked by schwarze
3 years ago
atoll.c
ansi ok mpi@ deraadt@
4 years ago
bsearch.3
change Xrs from now-defunct db(3) to dbopen(3); this wasn;t a straight replace: thanks both to schwarze and maja for feedback on how to rewrite parts;
10 years ago
bsearch.c
bsearch(3): support arrays with more than INT_MAX elements
4 years ago
div.3
.Li -> .Vt where appropriate; from josiah frentsos, tweaked by schwarze
3 years ago
div.c
spelling fixes; from paul tagliamonte any changes not taken noted on tech, but chiefly here i did not take the cancelation - cancellation changes;
3 years ago
drand48.c
Only two of the *rand48.c files need <math.h>, so just #include it in them
10 years ago
ecvt.3
I am retiring my old email address; replace it with my OpenBSD one.
7 years ago
ecvt.c
I am retiring my old email address; replace it with my OpenBSD one.
7 years ago
erand48.c
Only two of the *rand48.c files need <math.h>, so just #include it in them
10 years ago
exit.3
Again. Make exit(), fclose(), fflush(), and freopen() comply with POSIX-2008 requirements for setting the underlying file position when flushing read-mode streams, and make an fseek()-after-fflush() not change the underlying file position. This commit fixes some minor problems of the previous.
10 months ago
exit.c
Minimize #includes, particularly to avoid thread_private.h
8 years ago
gcvt.c
spelling fixes; from paul tagliamonte any changes not taken noted on tech, but chiefly here i did not take the cancelation - cancellation changes;
3 years ago
getenv.3
For putenv(3), return an error if string starts with a '=' character. Both FreeBSD and NetBSD have this behavior. OK deraadt@
3 years ago
getenv.c
Zap warning against __findenv usage, it is not exported by libc
2 years ago
getopt.3
If a command or interface first appeared in PWB/UNIX, UNIX System III or UNIX System V mention it. Only do so in manual pages with a pre-existing HISTORY section.
3 years ago
getopt_long.3
.Li -> .Vt where appropriate; from josiah frentsos, tweaked by schwarze
3 years ago
getopt_long.c
This patch fixes one bug and one instance of undesirable behaviour.
5 years ago
getsubopt.3
change some 4.4BSD references to earlier releases ok schwarze@
3 years ago
getsubopt.c
zap remaining rcsid.
20 years ago
hcreate.3
word fix; from edgar pettijohn
8 years ago
hcreate.c
Remove dead support for changing BDB hash algorithm and cache of alternatives
10 years ago
heapsort.c
Use David Musser's introsort algorithm to fall back to heapsort(3) when the recursion depth reaches 2*lg(n + 1). This avoids quicksort's quadratic behavior for pathological input without appreciably changing the average run time.
9 years ago
icdb.c
Set errno more consistently, and fix a warning, ok tedu
9 years ago
icdb_new.3
fix Dt;
9 years ago
imaxabs.3
Replace the vague, incorrect, and confusing BUGS sections with CAVEATS clearly stating which arguments have to be avoided, and mention the header files defining the constants required for the checks. Feedback and OK guenther@, OK bluhm@.
7 years ago
imaxabs.c
Add lldiv(), imaxabs(), imaxdiv(), strtoimax() and strtoumax()
20 years ago
imaxdiv.3
.Li -> .Vt where appropriate; from josiah frentsos, tweaked by schwarze
3 years ago
imaxdiv.c
Add lldiv(), imaxabs(), imaxdiv(), strtoimax() and strtoumax()
20 years ago
insque.3
Minimal maintenance to make this mess slightly less confusing: queue -> list; mention "intrusive"; element -> member at one place; delete a bogus remark that maybe referred to a long-gone implementation in VAX assembly code. Much more could be improved, but i don't want to waste too much time here.
6 years ago
insque.c
XPG requires insque() and remque() to work with linear lists and not just circular lists. Amazingly, they managed to extend the requirements to no longer match the behavior of the VAX instructions they were modeled after, so the trivial VAX ASM versions have to go. Nice job breaking it, X/Open!
11 years ago
jrand48.c
zap remaining rcsid.
20 years ago
l64a.c
zap remaining rcsid.
20 years ago
labs.3
Replace the vague, incorrect, and confusing BUGS sections with CAVEATS clearly stating which arguments have to be avoided, and mention the header files defining the constants required for the checks. Feedback and OK guenther@, OK bluhm@.
7 years ago
labs.c
zap remaining rcsid.
20 years ago
lcong48.c
Wrap <stdlib.h> so that calls go direct and the symbols not in the C standard are all weak. Apply __{BEGIN,END}_HIDDEN_DECLS to gdtoa{,imp}.h, hiding the arch-specific __strtorx, __ULtox_D2A, __strtorQ, __ULtoQ_D2A symbols.
10 years ago
ldiv.3
.Li -> .Vt where appropriate; from josiah frentsos, tweaked by schwarze
3 years ago
ldiv.c
zap remaining rcsid.
20 years ago
llabs.c
Reduce qabs() and qdiv() to aliases of llabs() and lldiv(). Merge the manual pages and call them deprecated there.
9 years ago
lldiv.3
.Li -> .Vt where appropriate; from josiah frentsos, tweaked by schwarze
3 years ago
lldiv.c
Reduce qabs() and qdiv() to aliases of llabs() and lldiv(). Merge the manual pages and call them deprecated there.
9 years ago
lrand48.c
Move the __rand48_* declarations into rand48.h, and then hide both them and __dorand48() and __rand48_deterministic
10 years ago
lsearch.3
change Xrs from now-defunct db(3) to dbopen(3); this wasn;t a straight replace: thanks both to schwarze and maja for feedback on how to rewrite parts;
10 years ago
lsearch.c
lsearch(3): reimplement using lfind(3)
4 years ago
malloc.3
Revert 1.144 of lib/libc/stdlib/malloc.3. It was changed by accident by my previous commit.
10 months ago
malloc.c
Revert r1.286 now that all supported platforms have __builtin_clz.
5 months ago
merge.c
Just return if nmemb is 0. Avoids a NULL dereference and is consistent with the behavior of the other libc sort functions. OK deraadt@
10 years ago
mkdtemp.c
Add mkdtemps(3), like mkdtemp(3) but with a suffix. OK deraadt@ tb@
2 years ago
mkstemp.c
Implement the POSIX-2024 close-on-fork flag, but modified to be reset on exec as preserving it across exec is not necessary for its original purpose and has security and usability concerns.
8 months ago
mktemp.3
Sort NAME, RETURN VALUES, ERRORS, and STANDARDS in the same order as SYNOPSIS. Sort HISTORY chronologically. No text change.
8 months ago
mktemp.c
Make our mktemp(3) callback-driven and split into multiple files. Previously, calling any of the mktemp(3) family would pull in lstat(2), open(2) and mkdir(2). Now, only the necessary system calls will be reachable from the binary. OK deraadt@ guenther@
2 years ago
mrand48.c
Move the __rand48_* declarations into rand48.h, and then hide both them and __dorand48() and __rand48_deterministic
10 years ago
nrand48.c
zap remaining rcsid.
20 years ago
posix_memalign.3
- fix bug wrt posix_memalign(3) of blocks between half a page and a page - document posix_memalign() does not play nice with reacallocarray(3) and freezero(3)
9 years ago
posix_openpt.3
I am retiring my old email address; replace it with my OpenBSD one.
7 years ago
posix_pty.c
I am retiring my old email address; replace it with my OpenBSD one.
7 years ago
ptsname.3
The mdoc(7) .Ft macro does not need quoting of its arguments, but about 10% of our manual pages using this macro employed useless quoting anyway. Remove these quotes such that they do not incite fear, uncertainty, and doubt in developers who happen to look at these pages. jmc@ and tb@ agree with the direction.
10 months ago
qsort.3
correct Research Unix edition "appeared in" use in HISTORY
6 years ago
qsort.c
Don't fall back to heapsort() if we would otherwise switch to insertion sort (when the number of elements is < 7).
8 years ago
radixsort.3
change some 4.4BSD references to earlier releases ok schwarze@
3 years ago
radixsort.c
use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg
18 years ago
rand.3
man pages: add missing word, The foo() ... -> The foo() function ...
4 years ago
rand.c
GNU ld has prefixed the contents of .gnu.warning.SYMBOL sections with "warning: " since 2003, so the messages themselves need not contain the prefix anymore.
8 years ago
rand48.3
The mdoc(7) .Ft macro does not need quoting of its arguments, but about 10% of our manual pages using this macro employed useless quoting anyway. Remove these quotes such that they do not incite fear, uncertainty, and doubt in developers who happen to look at these pages. jmc@ and tb@ agree with the direction.
10 months ago
rand48.h
Only two of the *rand48.c files need <math.h>, so just #include it in them
10 years ago
random.3
Some people still argue that rand(3) and random(3) have suitable deterministic use cases, so explain the situation a bit more. Since the 80's, I estimate around 5 algorithm changes, so any chosen seed is unrepeatable UB.
5 years ago
random.c
GNU ld has prefixed the contents of .gnu.warning.SYMBOL sections with "warning: " since 2003, so the messages themselves need not contain the prefix anymore.
8 years ago
reallocarray.c
Wrap <stdlib.h> so that calls go direct and the symbols not in the C standard are all weak. Apply __{BEGIN,END}_HIDDEN_DECLS to gdtoa{,imp}.h, hiding the arch-specific __strtorx, __ULtox_D2A, __strtorQ, __ULtoQ_D2A symbols.
10 years ago
realpath.3
The mdoc(7) .Ft macro does not need quoting of its arguments, but about 10% of our manual pages using this macro employed useless quoting anyway. Remove these quotes such that they do not incite fear, uncertainty, and doubt in developers who happen to look at these pages. jmc@ and tb@ agree with the direction.
10 months ago
realpath.c
Add PROTO_NORMAL() declarations for the remaining syscalls, to avoid future, inadvertant PLT entries. Move the __getcwd and __realpath declarations to hidden/{stdlib,unistd}.h to consolidate and remove duplication.
2 years ago
recallocarray.c
Type-cast getpagesize() from int to size_t for the comparison with d. getpagesize() will only return positive numbers (there is no negative page size system) and it can not fail. Should fix some compiler warnings seen in -portable projects. OK otto@
5 years ago
remque.c
XPG requires insque() and remque() to work with linear lists and not just circular lists. Amazingly, they managed to extend the requirements to no longer match the behavior of the VAX instructions they were modeled after, so the trivial VAX ASM versions have to go. Nice job breaking it, X/Open!
11 years ago
seed48.c
Overshot w/PROTO_DEPRECATED: seed48_deterministic() is used internally
10 years ago
setenv.c
For putenv(3), return an error if string starts with a '=' character. Both FreeBSD and NetBSD have this behavior. OK deraadt@
3 years ago
srand48.c
Wrap <stdlib.h> so that calls go direct and the symbols not in the C standard are all weak. Apply __{BEGIN,END}_HIDDEN_DECLS to gdtoa{,imp}.h, hiding the arch-specific __strtorx, __ULtox_D2A, __strtorQ, __ULtoQ_D2A symbols.
10 years ago
strtod.3
.Li -> .Vt where appropriate; from josiah frentsos, tweaked by schwarze
3 years ago
strtoimax.c
The 0x (or 0X) prefix in base 16 is optional so only skip over the prefix if the character following it is a valid hex char. The C99 standard is clear that given the string "0xy" zero should be returned and endptr set to point to the "x". OK deraadt@ espie@
8 years ago
strtol.3
Another couple of commas in the wrong place, ok jmc
11 years ago
strtol.c
The 0x (or 0X) prefix in base 16 is optional so only skip over the prefix if the character following it is a valid hex char. The C99 standard is clear that given the string "0xy" zero should be returned and endptr set to point to the "x". OK deraadt@ espie@
8 years ago
strtoll.c
The 0x (or 0X) prefix in base 16 is optional so only skip over the prefix if the character following it is a valid hex char. The C99 standard is clear that given the string "0xy" zero should be returned and endptr set to point to the "x". OK deraadt@ espie@
8 years ago
strtonum.3
.Li -> .Vt where appropriate; from josiah frentsos, tweaked by schwarze
3 years ago
strtonum.c
Wrap <stdlib.h> so that calls go direct and the symbols not in the C standard are all weak. Apply __{BEGIN,END}_HIDDEN_DECLS to gdtoa{,imp}.h, hiding the arch-specific __strtorx, __ULtox_D2A, __strtorQ, __ULtoQ_D2A symbols.
10 years ago
strtoul.3
Replace all 14 instances of .St -ansiC-99 in our tree with .St -isoC-99. The former is not used anywhere in NetBSD, FreeBSD, or DragonFly and not supported by groff, so i'm going to delete it from mandoc(1). We don't need two macros for the same thing.
11 years ago
strtoul.c
The 0x (or 0X) prefix in base 16 is optional so only skip over the prefix if the character following it is a valid hex char. The C99 standard is clear that given the string "0xy" zero should be returned and endptr set to point to the "x". OK deraadt@ espie@
8 years ago
strtoull.c
The 0x (or 0X) prefix in base 16 is optional so only skip over the prefix if the character following it is a valid hex char. The C99 standard is clear that given the string "0xy" zero should be returned and endptr set to point to the "x". OK deraadt@ espie@
8 years ago
strtoumax.c
The 0x (or 0X) prefix in base 16 is optional so only skip over the prefix if the character following it is a valid hex char. The C99 standard is clear that given the string "0xy" zero should be returned and endptr set to point to the "x". OK deraadt@ espie@
8 years ago
system.3
be more forceful about not using these. improvements sthen@, jmc@. okay millert@, jca@ jmc@
10 years ago
system.c
system(3) should ignore SIGINT and SIGQUIT until the shell exits. This got broken when system.c was converted from signal(3) to sigaction(2). Also add SIGINT and SIGQUIT to the set of blocked signals and unblock them in the parent after the signal handlers are installed. Based on a diff from Leon Fischer. OK deraadt@
3 years ago
tfind.c
lint is dead: delete useless LINTLIBRARY comments
10 years ago
thread_atexit.c
Complete the ld.so boot cleanup: move most libc initialization from _csu_finish() to _libc_preinit(), which is an .init_array function in shared libc (and mark it INITFIRST) or a .preinit_array function in static libc, grabbing the _dl_cb callback there from ld.so. Then in _csu_finish(), invoke the dl_clean_boot() callback to free ld.so's startup bits before main() gets control.
6 years ago
tsearch.3
man pages: add missing commas between subordinate and main clauses
4 years ago
tsearch.c
lint is dead: delete useless LINTLIBRARY comments
10 years ago