summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
AgeCommit message (Collapse)Author
2023-05-07RISC-V support that works on QEMU with a single hart.skrll
Thanks for Simon Burge for plic(4).
2023-02-21hcreate.3: fix typorillig
2022-12-04lib: Mark up error names in man pages with .Eruwe
2022-12-04Sections 2 and 3 have RETURN VALUES, not DIAGNOSTICSuwe
2022-11-30Trailing whitespaceskrll
2022-11-27reallocarray.3: minor grammar and style tweaksgutteridge
2022-11-15posix_openpt.3: add a history sectiongutteridge
2022-10-28put reallocarray() in the public namespacewiz
reallocarray() will be part of the next POSIX release, see https://austingroupbugs.net/view.php?id=1218 adapt an errno value to match POSIX expectations As discussed on tech-userlevel
2022-10-04posix_openpt.3: reflect changes from r. 1.45 of tty_ptm.cgutteridge
2022-09-28posix_openpt.3: reflect flag changes from r. 1.44 of tty_ptm.cgutteridge
Some flags are now accepted, others are still ignored. (E.g., other BSDs would return EINVAL if O_RDWR wasn't passed, and we now accept O_NONBLOCK but not O_CLOEXEC.)
2022-09-06posix_openpt.3: add caveats about oflagsgutteridge
The NetBSD implementation differs from other BSDs in that it does not return EINVAL if invalid oflags are submitted, since it completely ignores them. This is surprising to upstream projects that may expect otherwise.
2022-08-31reallocarr(3): Touch up xrefs.riastradh
2022-08-31reallocarr(3): Bump date. Note overflow is handled internally.riastradh
2022-08-31reallocarr(3): Clarify semantics.riastradh
2022-08-18fix whitespace prefix behaviorchristos
2022-08-17PR/56967: John Zaitseff: Reduce diff with FreeBSD, fixes various bugs.christos
2022-05-31fix various typos in comments, documentation and messages.andvar
2022-05-24fix various typos in comment, documentation and log messages.andvar
2022-05-23s/beggining/beginning/ in comments.andvar
2022-04-19lib: remove CONSTCOND commentrillig
Since 2021-01-31, lint doesn't need it anymore for the common pattern of 'do ... while (0)'.
2022-03-14system(3): Simplify initialization of argp.riastradh
2022-03-14system(3): Switch from vfork/execve to posix_spawn.riastradh
Changes by me: - Minor style nits. - Set errno on posix_spawn failure. - Handle edge cases of SIGINT/SIGQUIT set to SIG_IGN by caller. Author: Nikita Ronja Gillmann <nikita@NetBSD.org> Committer: Taylor R Campbell <riastradh@NetBSD.org>
2022-03-13Avoid referencing uninit'd memory.kre
2022-03-12reallocarr returns errno. preserve it.christos
2022-03-12_env: use reallocarrnia
2022-03-12hcreate(3): use reallocarr instead of malloc(x * y)nia
2022-02-11libc/getenv: remove trailing whitespacerillig
No binary change.
2022-01-04getopt_long(3): "index" is an argument, not a field.uwe
2022-01-04getopt_long(3): use NULL, not 0, for flag in the example.uwe
2022-01-02ptsname(3): fix equivalence exampleuwe
The buffer is static, don't make it appear that we are returning a pointer to a local variable.
2021-12-05jemalloc.3: fix malformed CVS Idrillig
2021-12-05s/supress/suppress/msaitoh
2021-10-29Add "--" 'options end' parameter to the sh -c call that runs thekre
command, so that the command cannot appear to be more options (which always then fails, as there would be no arg for "-c" to treat as the command string in that case). For the full (LONG) explanation, see: http://mail-index.netbsd.org/current-users/2021/10/29/msg041629.html
2021-10-29reallocarr does not set errno.nia
2021-10-29radixsort(3): use reallocarr instead of malloc(x * y)nia
2021-08-30Remove lint workaroundschristos
2021-08-12fix typos in "environment" word.andvar
2021-04-20Instead of compiling files with -fcommon, create an include file and declarechristos
the 3 symbols that need to be common using an attribute. Put all the 3 symbol definitions in libc in one place (initfini.c). Reviewed by joerg@
2021-02-26arrange for tools buildchristos
2021-02-16Correct floating-point terminology.riastradh
Might want to harmonize the printf(3) and wprintf(3) descriptions of `%a'.
2020-05-15Hook up proper fork lock handling for malloc:joerg
- lock all relevant mutexes just before fork - unlock all mutexes just after fork in the parent - full reinit non-spinlocks in the child This is not using the normal pthread_atfork interface to ensure order of operation, malloc is used as implementation detail too often.
2020-05-03turn off TLS for mips on old jemalloc. it doesn't work.mrg
2020-04-22Use __mc68010__ to distinguish m68000 (sun2) from other m68k ports;rin
__mc68000__ is defined both for m68000 and m68k.
2020-04-22Fix previous for libhack, where _REENTRANT is not defined;rin
arenas_map_key is used only when NO_TLS && _REENTRANT.
2020-04-21Switch to using TLS in old jemalloc for everywhere but VAX and sun2.joerg
2020-02-23Change the previous cast from unsigned int to unsigned longkamil
This code produces the same result and is consistent with the previous lines. Only the least significant 16 bites (unsigned short) are meaningful.
2020-02-22Avoid undefined behavior in the rand48(3) implementationkamil
Instead of implicid promotion to signed int, explicitly cast the arguments to unsigned int. _rand48.c:53:27, signed integer overflow: 58989 * 58970 cannot be represented in type 'int' _rand48.c:53:38, signed integer overflow: -2093025904 + -1496809120 cannot be represented in type 'int' _rand48.c:53:57, signed integer overflow: 57068 * 42787 cannot be represented in type 'int' New and old code produce the same code as tested with: #include <stdio.h> #include <stdlib.h> #define COUNT 1000 * 1000 int main(void) { FILE *fp; int i; fp = fopen("numbers.txt", "w+"); if (!fp) abort(); for(i = 0; i < COUNT; i++) { fprintf(fp, "%f\n", drand48()); fprintf(fp, "%ld\n", lrand48()); fprintf(fp, "%ld\n", mrand48()); } fclose(fp); return 0; }
2020-02-22Reorder words to fix grammarkamil
Noted by <leot>
2020-02-22rand48: Document that short integers are unsignedkamil
2020-02-22Improve readability of __dorand48()kamil
Break long lines into shorter instructions per line. No Functional Change.