c52cfb36 | 16-May-2022 |
Antonio Huete Jimenez <tuxillo@quantumachine.net> |
mlockall.2: Point out MCL_CURRENT is not yet implemented (refs #1921). |
56e344b8 | 03-May-2022 |
Sascha Wildner <saw@online.de> |
libc/stdtime: Set errno to EOVERFLOW when there is an overflow.
This fixes various issues such as gmtime() returning NULL on an out-of-bounds time_t but not setting errno, as POSIX requires.
Also,
libc/stdtime: Set errno to EOVERFLOW when there is an overflow.
This fixes various issues such as gmtime() returning NULL on an out-of-bounds time_t but not setting errno, as POSIX requires.
Also, in ctime() and ctime_r(), check the result of localtime() before passing it to asctime{,_r}().
See: https://github.com/eggert/tz/commit/4d306b3a17ce5ce0b33a73a90dc713d3601ea89a
show more ...
|
ea3dc992 | 30-Apr-2022 |
Aaron LI <aly@aaronly.me> |
Add base64(3) man page for b64_ntop() and b64_pton()
Reviewed-and-improved-by: swildner |
3bf574a9 | 30-Apr-2022 |
Aaron LI <aly@aaronly.me> |
libc/net: Fix b64_pton() for some exact-sized buffer
When decoding a base64 string with padding, b64_pton() can fail when the output buffer is exactly the needed size. For example, decoding the fol
libc/net: Fix b64_pton() for some exact-sized buffer
When decoding a base64 string with padding, b64_pton() can fail when the output buffer is exactly the needed size. For example, decoding the following base64 string to buffer[32] would fail:
% dd if=/dev/random bs=32 count=1 | base64 FCiWkKuhdRq3tMmtAt9CpchTTYMlIW3U3gJsavDNxZI=
This commit fixes the above issue.
Reported-by: dczheng Obtained-from: OpenBSD See also: FreeBSD revision 275060, https://reviews.freebsd.org/D1218
show more ...
|
fe2da4c8 | 30-Apr-2022 |
Aaron LI <aly@aaronly.me> |
libc/net: Multiple minor cleanups to base64.c
* Remove unused but included headers. * Use 'unsigned char' instead of 'u_char'. * Properly cast 'char' to 'unsigned char'. * Remove the debug Assert()s
libc/net: Multiple minor cleanups to base64.c
* Remove unused but included headers. * Use 'unsigned char' instead of 'u_char'. * Properly cast 'char' to 'unsigned char'. * Remove the debug Assert()s.
Partially obtained from OpenBSD.
show more ...
|
bd5862e7 | 20-Apr-2022 |
Matthew Dillon <dillon@apollo.backplane.com> |
libc - Protect dbm_*() API with a mutex
* The dbm_*() API is not thread-safe. Generally speaking, libc is expected to be thread-safe these days.
* Protect the dbm_*() API with a mutex in the DB
libc - Protect dbm_*() API with a mutex
* The dbm_*() API is not thread-safe. Generally speaking, libc is expected to be thread-safe these days.
* Protect the dbm_*() API with a mutex in the DB (aka DBM) structure. We use available pthread_mutex_*() stubs for the locking, so they are basically NOPs for applications not linked against pthreads.
* Also protect dbm_delete() and dbm_store() with our new sigblockall() / sigunblockall() mechanism to prevent corruption due to ^C and other regular signals. This mechanism implements a simple kernel/user shared-memory counter and flag, and imposes no additional system calls in DBM's critical paths.
show more ...
|
9495a4fb | 28-Mar-2022 |
Sascha Wildner <saw@online.de> |
Mark up defined values better in some manual pages. |
83810280 | 23-Mar-2022 |
Sascha Wildner <saw@online.de> |
libc: Adjust comment in Versions.def. |
839f7d62 | 21-Mar-2022 |
Sascha Wildner <saw@online.de> |
printf(3)/scanf(3): Make ll and L length modifiers equivalent.
POSIX defines L only for floating point numbers (long double) and ll only for integer numbers (long long), leaving for example %Ld or %
printf(3)/scanf(3): Make ll and L length modifiers equivalent.
POSIX defines L only for floating point numbers (long double) and ll only for integer numbers (long long), leaving for example %Ld or %llg undefined. GCC allows these non-portable combinations as an extension, i.e. -Wformat will not warn about them unless -pedantic is passed.
To avoid surprises with Linux code, go with glibc and make ll and L equivalent. For base code, we still prefer going with the standard, of course.
Interestingly, the alternate printf(3) implementation in libc (enabled by defining USE_XPRINTF in the environment) already treats them equally.
In-discussion-with: zrj
show more ...
|
1d2ce0db | 20-Mar-2022 |
Sascha Wildner <saw@online.de> |
libc_rtld: Reduce the amount of libc code that we compile into it. |
9ef1e017 | 19-Mar-2022 |
Sascha Wildner <saw@online.de> |
Fix some 'any more' vs. 'anymore' confusion in manpages and messages. |
cd85487e | 19-Feb-2022 |
Aaron LI <aly@aaronly.me> |
getopt.3: Clarify option string syntax
The recently added 'option::' syntax requires the following argument (if present) *must* be in the same word as the option name itself (e.g., "-x<arg>"). This
getopt.3: Clarify option string syntax
The recently added 'option::' syntax requires the following argument (if present) *must* be in the same word as the option name itself (e.g., "-x<arg>"). This is different than the normal 'option:' syntax, for which the argument may have a leading white space (e.g., "-x <arg>"). Update the man page to explicitly describe the syntax.
Update to use a list to describe the 3 types of option string syntaxes with examples.
show more ...
|
4cf91089 | 16-Feb-2022 |
Aaron LI <aly@aaronly.me> |
getopt.3: Fix date
Reported-by: swildner |
cf9179ee | 16-Feb-2022 |
Aaron LI <aly@aaronly.me> |
getopt(3): Recognize 'option::' for optional argument
If the option is followed by two colons, then the option argument is optional. This is a GNU extension.
Obtained from NetBSD via FreeBSD (revi
getopt(3): Recognize 'option::' for optional argument
If the option is followed by two colons, then the option argument is optional. This is a GNU extension.
Obtained from NetBSD via FreeBSD (revision 267745).
show more ...
|
5a7b5cad | 14-Feb-2022 |
Sascha Wildner <saw@online.de> |
Remove unneeded .Ns macros in various manual pages. |
c9c6988b | 14-Feb-2022 |
Sascha Wildner <saw@online.de> |
Fix "macro neither callable nor escaped" mandoc warnings in the manpages.
Some of these were affecting the output. |
8ad5bb66 | 30-Jan-2022 |
Sascha Wildner <saw@online.de> |
libc: Add strerror_l() (taken from FreeBSD).
Reported-by: zrj |
7c8da9d9 | 29-Jan-2022 |
Sascha Wildner <saw@online.de> |
libc: Fix building without YP. |
3e885352 | 29-Jan-2022 |
Sascha Wildner <saw@online.de> |
libc: Remove libc checks around manual pages from the Makefile.inc's.
Handle this better by setting NOMAN for libc_rtld. |
562d2ced | 24-Jan-2022 |
Matthew Dillon <dillon@apollo.backplane.com> |
libc - Increase opendir/readdir buffer size
* Increase the directory scan buffer size from 4096 bytes to 16384 bytes, significantly reducing the number of discrete system calls which must be mad
libc - Increase opendir/readdir buffer size
* Increase the directory scan buffer size from 4096 bytes to 16384 bytes, significantly reducing the number of discrete system calls which must be made when scanning very large directories.
show more ...
|
14161303 | 20-Jan-2022 |
Sascha Wildner <saw@online.de> |
sysctl.3: Adjust for pageout daemon algo changes from last year.
Taken-from: dillon's commit message |
31f57c13 | 06-Jan-2022 |
Sascha Wildner <saw@online.de> |
libc/isc: Stop using self assignment for unused variables.
Some checkers complain about this.
Taken-from: FreeBSD |
8202da12 | 03-Jan-2022 |
zrj <rimvydas.jasinskas@gmail.com> |
libc: Fix environment passing in posix_spawnp(3)
The execvPe() was always passing the parent process environment to children (a long standing bug).
While there, replace the deprecated index(3) w
libc: Fix environment passing in posix_spawnp(3)
The execvPe() was always passing the parent process environment to children (a long standing bug).
While there, replace the deprecated index(3) with strchr(3).
Reported-by: falsifian (breakage in hs-git-annex)
show more ...
|
d52e3170 | 31-Dec-2021 |
Sascha Wildner <saw@online.de> |
Add a getentropy(3) manual page.
Taken-from: FreeBSD |
fef748e3 | 30-Dec-2021 |
Matthew Dillon <dillon@apollo.backplane.com> |
libc - Add getentropy()
* Add getentropy(). This function uses getrandom() internally.
Requested-by: zrj, for dports |