summaryrefslogtreecommitdiff
path: root/lib/libc
AgeCommit message (Collapse)Author
2018-05-10Fix typo in RFC number.Theo Buehler
ok benno
2018-04-30Add a missing header when compiling with -DDEBUGdenis
With advice from jca@ OK jca@ millert@
2018-04-28reference hosts(5) instead of networks(5)Ingo Schwarze
2018-04-28Remove references to the obsolete getnetent(3) and networks(5).Ingo Schwarze
2018-04-28Stop talking about /etc/networks, which is no longer used,Ingo Schwarze
and reference gethostby*(3) and /etc/hosts instead. Say that setnetent(3), getnetent(3), and endnetent(3) now do nothing. With feedback from guenther and significant help from deraadt@.
2018-04-28Say that sethostent(3), gethostent(3), and endhostent(3) do nothing.Ingo Schwarze
While here, stop implying plans to support additional address families in the future, and do not call gethostbyname2(3) "advanced". OK deraadt@ guenther@
2018-04-28To allow us to get rid of /etc/networks, make getnetby*(3)Ingo Schwarze
wrappers around gethostby*_async(3). If you had anything of importance in /etc/networks, specify it in /etc/hosts instead. Feedback and OK eric@, OK deraadt@
2018-04-28Minor cleanup, no functional change:Ingo Schwarze
Remove unused headers and a comment implying that we might consider reviving these dead horses in the future, which we do not intend to do. OK deraadt@ guenther@
2018-04-28To allow us to get rid of /etc/networks, make setnetent(3),Ingo Schwarze
getnetent(3), and endnetent(3) do nothing, just like sethostent(3), gethostent(3), and endhostent(3) years ago. OK deraadt@ guenther@
2018-04-27Fix typo in binary-float example in commentPhilip Guenther
2018-04-27<sys/mount.h> and <sys/swap.h> no longer require <sys/param.h>Philip Guenther
ok krw@
2018-04-24Make futex(2) also return ECANCELED in case SA_RESTART was set.Paul Irofti
Prodded by and ok mpi@
2018-04-24Validate timespec and return ECANCELED when interrupted with SA_RESTART.Paul Irofti
Discussing with mpi@ and guenther@, we decided to first fix the existing semaphore implementation with regards to SA_RESTART and POSIX compliant returns in the case where we deal with restartable signals. Currently we return EINTR everywhere which is mostly incorrect as the user can not know if she needs to recall the syscall or not. Return ECANCELED to signal that SA_RESTART was set and EINTR otherwise. Regression tests pass and so does the posixsuite. Timespec validation bits are needed to pass the later. OK mpi@, guenther@
2018-04-22use NULL for pointerTheo de Raadt
2018-04-22mmap() no longer needs to be used. Without providing too many details,Theo de Raadt
describe how an inner-region is found for applying MAP_STACK, and that currently MAP_STACK remains set when the sigaltstack is disabled. ok kettenis guenther schwarze
2018-04-08Actually describe the parameters rather than calling facts BUGSIngo Schwarze
that aren't even small bugs. And stop talking about AF_LOCAL. Feedback and OK guenther@, OK jmc@.
2018-04-07sys/uio.h is not used anymoreOtto Moerbeek
2018-04-04mention which locale categories this is related to, and add SEE ALSOIngo Schwarze
2018-04-04add SEE ALSOIngo Schwarze
2018-04-04Split the useless localeconv(3) function out of the importantIngo Schwarze
setlocale(3) manual page, such that the latter becomes easier to read. No text change.
2018-03-31Mark pthread_equal() as unused inside libcPhilip Guenther
2018-03-30fix MALLOC_STATS; spotted by and ok semarie@Otto Moerbeek
2018-03-29Resolve some code duplication.Ingo Schwarze
Minus eight lines of code, no functional change. OK martijn@.
2018-03-29Fix three bugs in setlocale(3):Ingo Schwarze
1. setlocale(LC_ALL, "A"); setlocale(LC_CTYPE, "T"); setlocale(LC_ALL, NULL); must return "A/T/A/A/A/A", not "A". Fix this by always initializing the LC_ALL entry of newgl to "" in dupgl(). Reported by Karl Williamson <public at khwilliamson dot com> on bugs@, thanks! 2. Do not leak newgl when strdup(3) fails in setlocale(3). 3. For setlocale(LC_ALL, "C/C/fr_FR.UTF-8/C/C/C"); correctly set _GlobalRuneLocale; i found 2. and 3. while looking at the code. Feedback on a buggy earlier version and OK martijn@.
2018-03-22Rewrite, since Karl Williamson <public at khwilliamson dot com>Ingo Schwarze
noticed that this was no good. * More relevant one line description. * Generally more precision, less handwaving. * Delete details regarding features we deliberate do not support. * Write a real RETURN VALUES section. * Delete pointless SEE ALSO section. * Add two useful EXAMPLES. * Do not talk about BUGS we don't have because we avoid the facilities. Using several suggestions from martijn@ and one from stsp@, OK jmc@ stsp@ martijn@ on earlier versions.
2018-03-21on failure, mmap() returns MAP_FAILEDGleydson Soares
OK deraadt
2018-03-16improve markup quality in the cases found by the new "--" style messageIngo Schwarze
2018-03-16Since most (if not all) ARMv8 hardware doesn't actually support trapping ofMark Kettenis
floating-point exceptions, simplify the functions that control the exception masks just like we did on armv7. ok tom@
2018-03-16anton points out that my previous commit completely messed with theJason McIntyre
(unknown to me) relevant ordering of the various promises; restore them now to their original order; partial revert requested by deraadt too
2018-03-13Fix commentsJeremie Courreges-Anglas
ok eric@ a while ago
2018-03-06use _ALIGN() which is uhm a bit OpenBSD-specific, but it means weTheo de Raadt
don't need to use sys/param.h at all, guess which one i believe is greater namespace polution ok otto
2018-03-05typo in kern.maxlocksperuidOtto Moerbeek
2018-03-05Use _MAX_PAGE_SHIFT, rather than #ifdef mips64Theo de Raadt
ok guenther kettenis
2018-03-04various tweaks, in part to try and clean up the amount of verticalJason McIntyre
whitespace in this page; ok deraadt
2018-03-02Return monotonically increasing values.cheloha
The latest POSIX description of times(3) (and all others I can find) suggests that times(3) should return monotonically increasing values and that these values are only useful for real time interval measurement. All extant uses of times(3) confirm that this expectation is shared by application programmers. So, change gettimeofday(2) to clock_gettime(2)/CLOCK_MONOTONIC to ensure the return value increases monotonically, even if the system clock is changed by the superuser. Then update the manpage accordingly. While we're updating the manpage, move the information about the return values to a new RETURN VALUES section to bring times.3 up to speed with other library man pages. Manpage changes kicked around on tech@ with millert@ and jmc@. times.3 ok millert@ tb@ jmc@ times.c ok millert@ tb@
2018-02-28Change floating-point mode/environment control functions to operate onMark Kettenis
both the hardfloat (FPU registers) and softfloat (software) state. This makes these functions work correctly when mixing hardfloat and softfloat code. Disable trapping for softfloat since most (if not all) ARMv7 and ARMv8 hardware that is on the market doesn't support trapping of floating-point exceptions. ok patrick@
2018-02-27improve lining up of tabs inside .Fd macros for terminal output;Ingo Schwarze
from <Edgar at Pettijohn dash web dot com> on tech@
2018-02-11macro fix;Jason McIntyre
2018-02-11Document how MAP_STACK will be used. All stacks must be mmap'd withTheo de Raadt
this attribute. The kernel does so for main-process stacks at execve() time, pthread stack functions do so for new stacks, and stacks provided to sigaltstack() and other user-provided stacks will need to be allocated in that way. Not required yet, but paving the way. Work done with stefan
2018-02-10zap trailing whitespace;Jason McIntyre
2018-02-10add support for binary sysctl payloads by handling them as hexFlorian Obser
strings. this was part of a demo showing how to implement the kernel side of sysctl(3) for setting Semantically Opaque Interface Identifier key material (for RFC 7217), but it seems to be the most straightforward path toward integrating soiikey handling and rc. Originally written by dlg, who commited it some time ago on my request. I then backed it out again, now it's time to put it back in. ok florian@ sthen@ naddy@ tb@ Man page bits tweaked & OK jmc
2018-02-07use consistent style for for loop in unmap(), no functional changeOtto Moerbeek
2018-02-06make sure that all error paths are correctly handled in asr_run_sync()Eric Faurot
and that the result is always properly set when the functions returns. fix issues spotted by claudio@. ok claudio@
2018-01-30keep in sync with ld.so malloc.cOtto Moerbeek
2018-01-30word fix; from edgar pettijohnJason McIntyre
2018-01-28- An error in the multithreaded case could print the wrong function nameOtto Moerbeek
- Start with a full page of struct region_info's - Save an mprotect in the init code: allocate 3 pages with none and make the middle page r/w instead of a r/w allocation and two calls to make the guard pages none
2018-01-26- do not junk pages returned by free_bytes(), all freed chunks are alreadyOtto Moerbeek
junked - freezero(): only clear requested size
2018-01-23use END_STRONG. Yes, everything in the sh ecosystem is different..Theo de Raadt
2018-01-21Implement ffs(3) using the CLZ instructions which has been available everMark Kettenis
since ARMv5. Should be much faster but more importantly it removes the data table from .text which could introduce unwanted ROP gadgets. Based on changes in Android/Bionic by Elliott Hughes. ok patrick@
2018-01-19Use static inline such that the functions are guaranteed to be present whenMark Kettenis
compiled with clang. ok visa@