Age | Commit message (Collapse) | Author |
|
emulations left; ok millert@ deraadt@, jmc@ (man pages)
|
|
ok doug@
|
|
ok mpi@
|
|
that setting errno is required by POSIX, but not by ISO C.
|
|
This is unambiguously required both by POSIX and by our own manual page.
It also makes a lot of sense because having a function that can
fail and that sets errno in some failure modes but does not set
errno in other failure modes would be a terrible idea. Such a
function would be ridiculously complicated to use. To detect the
reason for failure, you would have to:
- save errno
- reset errno to zero
- call the function
- inspect the return value to detect failure
- inspect errno to decide about the reason for failure
- if errno is zero, restore the saved errno
That is completely unreasonable, in particular for a seemingly innocous
function like mbtowc(3). Next to no programmer would get that right in
any real-world program.
Note that this bug is very widespread, it also affects NetBSD,
FreeBSD, Solaris 11, and glibc. I will also send a note around to
the other systems.
There may be fallout from programs using the interface incorrectly.
If you run into any, please report that to me.
OK millert@
|
|
OK tb@
|
|
about which options are turned on/off by 's' and 'S'
ok tedu
|
|
ok jca@ gilles@
|
|
from Rafael Neves; input jmc@; OK deraadt@
|
|
/dev/console so the value of "error" is never read. Also mention
that sendsyslog2 can fail due to ENOBUFS in the comment. OK deraadt@
|
|
- Add new root certificates present in Mozilla cert store from CA
organizations who are already in cert.pem (AddTrust, Comodo, DigiCert,
Entrust, GeoTrust, USERTrust).
- Replace Startcom's root with their updated sha256 version present in
Mozilla cert store. (They maintained serial# etc so this is still valid
for existing signed certificates).
- Add two root certificates from CA not previously present:
"C=US, O=Network Solutions L.L.C., CN=Network Solutions Certificate Authority"
"C=PL, O=Unizeto Sp. z o.o., CN=Certum CA" (the latter used by yandex.ru)
We are still listing some certificates that have been removed from
Mozilla's store (1024-bit etc) however these cannot be removed until
cert validation is improved (we don't currently accept a certificate
as valid unless the CA is at the end of a chain).
|
|
|
|
This function doesn't even have an "n" argument, so that non-existent
argument clearly cannot restrict the return value.
|
|
Input and OK jmc@ ratchov@ semarie@
|
|
|
|
|
|
incomplete characters are not an error, do not throw EILSEQ, and
are not supposed to.
OK millert@
|
|
|
|
improvements sthen@, jmc@. okay millert@, jca@ jmc@
|
|
ok tb@ millert@
|
|
There is long-standing consensus that err(1, NULL) is the best idiom
after failure of malloc(3) and friends.
Quirk in the manual noticed by tb@.
|
|
ok tobias@
|
|
hiding the system dependencies away in "sys.h" where they belong.
No binary change on OpenBSD.
Seems reasonable to christos at NetBSD, too.
|
|
|
|
|
|
(CN if available, otherwise OU).
Add a comment identifying the org. Now to get an easy-to-read list
of certificates in the file you can use "grep ^[#=] cert.pem".
Prepared with https://spacehopper.org/format-pem.20160201. If you would
like to verify this commit to ensure that I didn't sneak in any other
changes, it will be easier to use the script rather than do it by hand.
|
|
aren't really useful (the information can be obtained by feeding the cert
into "openssl x509 -in filename -text") and add a separator between certs
showing the CA's CN or OU (similar to the display format in web browsers).
Include both SHA1 and SHA256 fingerprints for all certificates.
ok beck@ zhuk@ jung@
|
|
|
|
* remove unused ifdef'ed header junk
* remove pointless cast of NULL
* wrap two excessively long lines
|
|
Delete the silly ptr_t and ioctl_t typedefs
and delete some "#ifdef notdef" code from "sys.h".
No functional change.
This makes hist.h identical to the NetBSD version.
It reduces the remaining diff from +1526 -734 to +1430 -592.
OK czarkoff@
|
|
KNF: Remove parentheses from return lines. No object change.
This makes emacs.c and prompt.c identical to the NetBSD versions.
It reduces the remaining diff from +2053 -1261 to +1526 -734.
OK czarkoff@
|
|
no change in the generated source files
|
|
* rename fkey_t to funckey_t and el_term_t to el_terminal_t
* rename struct editline member el_term to el_terminal
* rename many functions in terminal.c from term_*() to terminal_*(),
for consistency with the file name and to not look related to <term.h>
No functional change.
This makes refresh.c and sig.c almost identical to the NetBSD versions.
It reduces the remaining diff from +2446 -1805 to +2053 -1420.
OK czarkoff@
|
|
* Rename some types from *key*_t to *keymacro*_t.
* Rename struct editline member el_key to el_keymacro.
* Rename some functions in keymacro.c from key*() to keymacro*().
This removes the conflict of key_clear(), key_end(), and key_print()
with macros in <term.h>. No functional change.
This makes keymacro.h identical to the NetBSD version.
It reduces the remaining diff from +2640 -1998 to +2446 -1805.
OK czarkoff@
|
|
Rename the files key.[hc] to keymacro.[hc] and term.[hc] to terminal.[hc].
The change makes sense because "term.h" conflicts with <term.h>
and the functions key_clear(), key_end(), and key_print() in "key.h"
conflict with macros in <term.h>.
No content change yet, no binary change in *.o after "strip -d".
This reduces the remaining diff from +4634 -3992 to +2640 -1998.
OK czarkoff@, and mmcc@ agrees with the direction.
|
|
from ray@, ok jmc@
|
|
|
|
but it is likely to remain in POSIX for the forseeable future,
and there is nothing wrong with using it, so remove the marker.
By contrast, POSIX 2008 now declared setitimer(3) obsolescent.
While here, remove a few cross references pointing to obsolete or
non-standard functions and update the POSIX reference.
Triggered by a question from <ChrisBennett at bennettconstruction dot us>.
OK millert@ tb@
|
|
which run for many cycles and may even sleep. This leads to other threads
spinning for a long time waiting on the lock. Using a mutex means those
threads go to sleep and get woken up when the lock is released, which results
in a lot less CPU usage. More work is needed to improve the performance of
threaded code that suffers from malloc lock contention, but this diff makes
ports like Firefox significantly more usable.
Tested by many.
ok mpi@, guenther@, tedu@, jca@
|
|
ok jsing@
|
|
David CARLIER
|
|
by POSIX and as FreeBSD, SunOS 10/11, and glibc also do it. Note
that an enquiry to the Austin Group led to the conclusion that this
change probably violates the C standard: C and POSIX unintentionally
conflict. But the POSIX behaviour makes more sense (easier to write
correct error handling code for it, and a lower risk that programs
miss errors) and is much more widespread, and the Austin Group
intends to approach the C committee in order to adjust the C standard.
See: http://austingroupbugs.net/view.php?id=1022
While here, do not set errno a second time, wcrtomb(3) already did that,
and it is required to do it by the standard.
OK millert@ and tedu@, and jca@ no longer objects
|
|
|
|
ok millert@
|
|
|
|
This is of course a no-op on other platforms. Noted by equalsraf from github.
|
|
(well, a syscall, but this is the established practice) in the general
sense.
ok jmc@
|
|
|
|
The current code has already setted it by default since 1.74
any pledge failure tries to make a coredump (default rules for coredump still
applies: so setuid binaries don't create them locally).
ok deraadt@
|
|
|