summaryrefslogtreecommitdiff
path: root/lib/libc
AgeCommit message (Collapse)Author
2019-07-29correct mispellings of EACCES; from Kris KatterjohnTheo de Raadt
2019-07-26Replace cross-references to sigvec(3) with sigaction(2).Todd C. Miller
OK guenther@
2019-07-25Basic macro cleanup, mostly .Nm -> .Fn because .Nm is not a thingIngo Schwarze
in section 2 and 3; bluhm@ drew my attention to this.
2019-07-25basic macro cleanupIngo Schwarze
2019-07-25Show unveil(2) violators in lastcomm(1) output and daily mail.Alexander Bluhm
input Janne Johansson, schwarze@; OK deraadt@ millert@
2019-07-23Fix comment typo; from OpenSSH PortableDarren Tucker
2019-07-22implement SO_DOMAIN and SO_PROTOCOL so that the domain and the protocolRobert Nagy
can also be retrieved with getsockopt(3) it looks like these will also be in the next issue of posix: http://austingroupbugs.net/view.php?id=840#c2263 ok claudio@, sthen@
2019-07-19Update POSIX reference to the 2008 version and correct the list ofIngo Schwarze
conversion specifications that are extensions; issues reported by Andras Farkas <deepbluemistake at gmail dot com> on misc@. While here, note that alternative conversion modifiers have no effect and that flags and field width specifications are not supported.
2019-07-18obvious bugfix: if the queue is removed while message transmission isIngo Schwarze
blocked, POSIX requires EIDRM rather than EINVAL, and that's what our implementation does and what the ERRORS section already says, too
2019-07-18add STANDARDS, improve HISTORY, and basic macro cleanup:Ingo Schwarze
use .Vt for struct names and and .Fa for struct fields
2019-07-18State that mtype < 1 causes EINVAL as required by POSIXIngo Schwarze
and as implemented by OpenBSD since sysv_msg.c rev. 1.35. Diff from Moritz Buhl <mbuhl at moritzbuhl dot de> requested by bluhm@. While here, add STANDARDS, improve HISTORY, and use the customary .Fa for struct fields rather than .Va.
2019-07-14Unlike gas, clang's assembler complains about duplicate symbol assignments.Philip Guenther
Tweak the PSEUDO() macro to avoid that. problem noted and tested by kettenis@
2019-07-08fix typo: RCF -> RFCTheo Buehler
From Evan Silberman
2019-07-08Get rid of an old convention of wrapping preprocessor constants in curlyanton
braces. no objection from jmc@ and schwarze@
2019-07-05improve verb-tense for explaining the calling convention of __Theo de Raadt
ok guenther jmc
2019-07-05The last consumer of pre-posix realpath behaviour has stoppedTheo de Raadt
requiring it (sftp-server). Remove the /exists///// behaviour from here. The /nonexistant behaviour remains in the kernel and needs to be shot next. There may be ports fallout, but we doubt it. ok beck djm
2019-07-03snprintf/vsnprintf return < 0 on error, rather than -1.Theo de Raadt
2019-07-02The "always hint that getpw operation is happening with access() the YPTheo de Raadt
lock file" would trash errno, creating confusion. One instance found by richardipsum@fastmail, other two identified from original commit ok millert
2019-07-01kevent(2): remove 24hr timeout limitcheloha
As with nanosleep(2), poll(2), and select(2), here we can chip away at the timespec until it's empty. This lets us support the full range of the timespec regardless of the kernel's HZ. Update the manpage accordingly. ok visa@
2019-06-30tweak previous; ok guentherJason McIntyre
2019-06-29Document that getcwd() and realpath() are built on system calls thatPhilip Guenther
have a different calling convention than the standard function...as seen in kdump output. ok deraadt@ schwarze@
2019-06-29two more syscall == -1 checksTheo de Raadt
2019-06-28Specify that {v,}asprintf(3) returns precisely -1 on failure,Ingo Schwarze
and that the ret pointer is either unchanged or set to NULL in this case. Since these two functions are not standardized by POSIX, documenting the actual behaviour is the way to go, and the above matches all non-buggy implementations we are aware of. OK millert@ deraadt@
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2019-06-28delete duplicate .Xr below SEE ALSOIngo Schwarze
2019-06-27The C89 standard only requires that atexit(3) returns a non-zero valueIngo Schwarze
on error, so checking for -1 only is potentially non-portable. Also mention that the C89 standard does not require errno to be set. OK deraadt@ millert@
2019-06-27Simplify the description of [v]snprintf(3), move the descriptionIngo Schwarze
of the return values to RETURN VALUES, deprecate [v]sprintf(3) and fix a punctuation typo. Joint work with and OK millert@.
2019-06-27If we don't receive a reply packet the res_send subquery will already haveMartijn van Duren
set subq_h_errno and ar_count. Remove the ar_datalen == -1 check, so we set ar_h_errno and don't have to (wrongly) guess that ar_h_errno = HOST_NOT_FOUND. This makes sure that if no nameserver responds the h_errno value is set to TRY_AGAIN instead of HOST_NOT_FOUND. OK eric@, deraadt@
2019-06-26an -> a;Jason McIntyre
2019-06-26The POSIX-compatible way of checking for {v,}{f,s,sn,d}printf(3)Theo de Raadt
failure is with < 0, not the more specific -1 from C discussed at length with millert, nicm, schwarze
2019-06-25Use the same text for EOPNOTSUPP as we do in fcntl(2) and lockf(3).Todd C. Miller
In fcntl(2) and lockf(3) the error is EINVAL but the condition is the same. OK anton@
2019-06-25POSIX.1-2008 TC3 is going to clarify how newlocale(3) uses oldloc.Ingo Schwarze
Explicitly state that our implementation now complies with the stricter requirements of TC3 because the newlocale(3) in old OpenBSD releases only complied with the weaker requirements of the old text of the standard. The complaints from our users resulted in both our implementation and the standard being improved. For details, see: http://austingroupbugs.net/view.php?id=1243#c4347
2019-06-24add missing RETURN VALUES section;Ingo Schwarze
also checked that POSIX requires exactly this behaviour
2019-06-21Fix conversions to long double on sparc64Jeremie Courreges-Anglas
Bug exposed by erratic sqlite3 behavior used in ports/devel/proj, as pointed out by landry@. Richard Hipps (SQLite) pointed at the culprit (_Qp_div), many thanks. Adapted from FreeBSD revision 146673 by Stephen Paskaluk and stefanf@FreeBSD. FreeBSD commit message: """ Fix long (and long long) to long double, unsigned to long double and unsigned long (and unsigned long long) to long double conversions. - Add a parameter that specifies the position of the sign bit to the _QP_TTOQ macro, previously it always looked at bit 31. Pass a negative number to disable sign inspection for unsigned types. This fixes _Qp_xtoq(), _Qp_uitoq() and _Qp_uxtoq(). - In the functions __fpu_itof() and __fpu_xtof(), look at the sign bit to decide whether we're doing a conversion from an unsigned type. If so, don't negate the mantissa if the integer exceeds the biggest signed number. """ ok deraadt@
2019-06-20sockatmark(3), recv(2), getsockopt(2), and connect(2) return specificallyTheo de Raadt
-1 to mark failure, not arbitrary values < 0. I believe manual pages should follow the described contract precisely and accurately.
2019-06-17Allow setting of retransmission intervasl via _res.retrans. Ugly API butOtto Moerbeek
it's all we got. ok jca@
2019-06-17Remove old realpath(3), and the userland-vs-kernel realpath verificationTheo de Raadt
code. We now user the simple userland wrapper on top of __realpath(2). The non-POSIX behaviour still remains, that is the next component to fix. From a diff by beck, but I managed to chainsaw it a bit further. Tested in snaps for a couple of days. ok beck
2019-06-15oops - missing .El in previous;Jason McIntyre
2019-06-15realpath(3) doesn't use lstat(2), readlink(2), or getcwd(3) anymore,Theo de Raadt
it is a thin wrapper over the syscall __readlink(2). Improve the list of possible errors. ok millert beck jmc
2019-06-07Cast bitcount to u_in64_t before bit shifting to prevent integer overflowDarren Tucker
on 32bit platforms which cause incorrect results when adding a block >=512M in size. sha1 patch from ante84 at gmail.com via openssh github, sha2 with djm@, ok tedu@
2019-06-02Complete the ld.so boot cleanup: move most libc initialization fromPhilip Guenther
_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. Other cleanups this permits: - move various startup structures into .data.rel.ro - the dl* stubs in libc can be strong and call the callbacks provided via _dl_cb - no longer need to conditionalize dlctl() calls on presence of _DYNAMIC original concept and full diff ok kettenis@ ok deraadt@
2019-05-31Note closefrom(2)'s origins in Solaris 9.cheloha
Manpage input from jmc@ and schwarze@, archaeological input from schwarze@. ok schwarze@
2019-05-30__realpath(2) appears to have improved, so re-enable the code thatTheo de Raadt
checks userland-parsing vs kernel parsing, we are hoping to spot another bug..
2019-05-29There are some bugs in __realpath(2) -- it isn't quite ready so disableTheo de Raadt
calling it until those are fixed.
2019-05-28_thread_sys___realpath must be exported like _thread_sys___getcwd obviously.Theo de Raadt
None will all it, but this is the mechanism by which ramdisk build determines which .o files to build for it's libraries.
2019-05-28Enable the use of the kernel __realpath() system call in the libc wrapper.Bob Beck
For now, this also still uses the existing realpath implmentation and emits a syslog if we see differening results. Once we have run with that for a little while we will remove the old code ok deraadt@
2019-05-26Tweak "RETURN VALUES" sections to mention setting errno, as so manyKenneth R Westerback
other man pages do. ok schwarze@ guenther@ on socket(2). "Similar" tweak on accept(2) requested by guenther@.
2019-05-23Only override size of chunk if we're not given the actual length.Otto Moerbeek
Fixes malloc_conceal...freezero with malloc options C and/or G.
2019-05-19clarify that later flags modify earlier flags;Ingo Schwarze
triggered by a question from Jan Stary <hans at stare dot cz> on misc@; OK otto@
2019-05-16More consistently put remarks about the less useful LC_* categoties,Ingo Schwarze
i.e. those other than LC_CTYPE, into the CAVEATS section, and standardize wording somewhat. OK jmc@