summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/reallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-05-27Use getprogname() instead of __progname to make portability easier.nicm2-5/+4
2016-05-27No need to show the messages if we skip in case of /usr/lib on nfs.rpe1-7/+4
OK deraadt
2016-05-27Add function comments.rpe1-1/+4
OK sthen, deraadt
2016-05-27rename(2) operation requires "rpath cpath" at the underlying operationderaadt1-2/+2
(the src path lookup is considered a rpath operation) noticed by kristaps, discussed with semarie
2016-05-27Remove the non ELF macrosderaadt9-142/+13
ok millert
2016-05-27When resampling, use the exact resampling factor instead of the ratioratchov2-4/+32
between input and output block sizes. This was inherited from sndiod, but is not required for files because they are continuous streams of samples and do not need to be split in blocks of equal duration. This change makes playback/recording rate match exactly the requested sample rate.
2016-05-27Flush rec buffer if there's less than one block space left and refillratchov1-2/+4
play buffer if there's less than one block of data left. This is the correct condition in the general case. No behaviour change, as all input/output is multiple of the block size.
2016-05-27Simplify slot_fill() and slot_flush(). No behaviour changeratchov1-12/+8
2016-05-27Make resamp_do() get the exact number input and output samples andratchov3-54/+119
provide routines to calculate them. This way we don't rely on it to calculate the bytes procuded/consumed anymore. No behaviour change.
2016-05-27Per the libtls man page, tls_init() must be called prior to any otherjsing2-6/+4
tls_* function; so actually do that.
2016-05-27Rename some of the internal error setting functions to more closely followjsing3-14/+48
existing naming standards. Also provide functions for setting a struct tls_error * directly (rather than having to have a struct tls * or a struct tls_config *).
2016-05-27Avoid leaking ca_mem when freeing a tls_config.jsing1-1/+2
2016-05-27Fix function parameters that do not have an underscore prefix.jsing1-10/+10
2016-05-27typo fixes; Anthony Coultersthen2-5/+5
2016-05-27Return "400 Bad Request" instead of "500 Server Internal Error" forkrw1-3/+5
requests lacking "HTTP/<version>". This makes it more obvious that httpd(8) does not attempt to support HTTP v0.9 (circa 1991), when "GET <url>\r\n" was valid. ok millert@ florian@
2016-05-27Revert CHAR_T removal. Some signedness flaws were introduced.martijn50-284/+292
Found the hard way by jca@
2016-05-27syncsthen1-7/+1
2016-05-27Modify com_init to match the com driver initializaiton, and addbeck2-2/+17
a short delay so that baud rate changes on the console have a chance of working. Lots of help from theo on this one. Makes my serial console on my APU work for an unattended reboot instead of hanging when garbage is echoed to the tty. ok deraadt@
2016-05-26The destination string is declared as "s" but referred to as "dst"millert1-5/+5
in some cases. Be consistent and use "dst" everywhere like for strlcat(3) and strncat(3). From Tim Kuijsten.
2016-05-26Use "cc -E" instead of "cpp". OK deraadt@ natano@millert2-5/+5
2016-05-26mklocale(1) can handle C-style and shell-style comments natively,millert1-3/+2
no need for cpp here. From natano@
2016-05-26Zap the 'l' from ARFLAGS, totally useless these days.zhuk1-2/+2
Found while comparing qmake specs of different *BSDs. okay deraadt@ and millert@
2016-05-26test the new utf8 moduleschwarze3-2/+77
2016-05-26Re-introduce vnode-to-filename mappingstefan2-6/+74
The name cache walking code got adapted to the new name cache layout. Along with the previous commit, procmap is now able to map a vnode to a filename as long as it is in the name cache. "nice stuff" deraadt@
2016-05-26for textrels (sthen ran into one...):deraadt1-2/+2
Ignore the listed protection (which may contain X) when making page writeable temporary.
2016-05-26Copy ELF headers into guest VM memorystefan1-12/+10
This gives ddb access to the symbols of the kernel running inside the VM. ok mlarkin@
2016-05-26whitespace found during reviewderaadt4-10/+10
2016-05-26The doforce variable isn't modified anywhere. Also, the only filesystemnatano2-10/+3
left using it is fuse. It has been removed from all other filesystems. ok millert deraadt
2016-05-26Use S_ISDIR instead of doing it by hand. No binary change.millert1-3/+2
2016-05-26Rename variables to a less ambiguous name better matching their purpose.rpe1-11/+11
OK krw
2016-05-26- rename rebuildlibs() to reorder_libs()rpe1-7/+32
- move the info message inside the function - skip reordering if /usr/lib is on a nfs mounted filesystem - temporarily remount rw if /usr/lib is on a ro ffs file-system OK deraadt
2016-05-26Extend 0x1234 keys form to more bits so that Unicode keys work.nicm1-4/+5
2016-05-26tests for the two segfaults in backref() that were just fixedschwarze1-1/+4
2016-05-26Fix an oversight that caused the test program to segfault:schwarze1-2/+2
Don't try to calculate strlen(NULL).
2016-05-26systematically test all combinations of REG_STARTEND, REG_NEWLINE,schwarze1-9/+85
and REG_NOTBOL with line and word anchors
2016-05-26Make amaps use less kernel memory (2nd try)stefan3-195/+513
The original diff would crash at least i386 and powerpc, as spotted by guenther@ The reason was an incorrect use of sizeof in amap_lookups(). Confirmation that powerpc works by mpi@ and mglocker@ "throw it in" deraadt@ Original commit message: This is achieved by grouping amap slots into chunks that are allocated on-demand by pool(9). Endless "fltamapcopy" loops because of kmem shortage should be solved now. The kmem savings are also important to later enable vmm(4) to use larged shared memory mappings for guest VM RAM. This adapts libkvm also because the amap structure layout has changed. Testing and fix of libkvm glitch in initial diff by tb@ Feedback and "time to get this in" kettenis@
2016-05-26support for testing REG_STARTEND together with REG_NOTBOLschwarze1-1/+4
2016-05-26fputs(3) now returns a non-negative number (as opposed to 0) on successfulmillert1-10/+8
completion, just like puts(3). Found the hard way in portable code. OK jmc@
2016-05-26Just nuke environ instead of trying to unsetenv everything because thatnicm1-12/+4
doesn't necessarily work if there is an entry with an empty name.
2016-05-26Improve and clarify a few bits; with input from jmc@, ok yasuoka, jmcmikeb1-12/+13
2016-05-26Calculate elapsed time in poll() and subtract that from the remaining timejmatthew1-4/+19
when restarting poll() after receiving a signal. The ruby runtime send signals to threads periodically, so without accounting for elapsed time, the timeout would never expire if we didn't get a response from a nameserver. ok deraadt@ eric@
2016-05-26Make format conversion routines return the number of framesratchov3-54/+57
consumed from both input and output buffers. No behaviour change.
2016-05-26Change the way regexec handles REG_STARTEND combined with REG_NOTBOL.martijn2-20/+62
The new code sees this combination as a continuation of string at offset pmatch[0].rm_so, instead of a new string which starts at that offset. This change fixes a search quirk in vi and is needed for upcoming fixes in ed/sed/vi. This new behaviour is also used in gnu regex. Lots of help from schwarze@ Manpage bits by schwarze@ OK schwarze@ and millert@
2016-05-26Remove superfluous loop counter to set alternate video interface since wemglocker1-6/+4
store the alternate video interface number already. From Patrick Keshishian, thanks!
2016-05-26Use a fat16 partition starting at sector 2048/1MB everywhere to simplifyjsg4-37/+3
things. OMAP can still load the first u-boot stage (MLO) from the fs and imx u-boot can load files off fat. The offset allows space for the u-boot images placed at raw offsets on imx and sunxi. discussed with kettenis
2016-05-25To prevent screwing up terminal settings when printing to theschwarze7-67/+370
terminal, for ASCII and UTF-8, escape bytes not forming characters and bytes forming non-printable characters with vis(3) VIS_OCTAL. For other character sets, abort printing of the current string in these cases. In particular, * let scp(1) respect the local user's LC_CTYPE locale(1); * sanitize data received from the remote host; * sanitize filenames, usernames, and similar data even locally; * take character display widths into account for the progressmeter. This is believed to be sufficient to keep the local terminal safe on OpenBSD, but bad things can still happen on other systems with state-dependent locales because many places in the code print unencoded ASCII characters into the output stream. Using feedback from djm@ and martijn@, various aspects discussed with many others. deraadt@ says it should go in now, i probably already hesitated too long
2016-05-25KNF with respect to indentation; no code changeschwarze1-28/+27
2016-05-25use a consistent naming for chipsets;jmc1-5/+5
issue found by ross l richardson help/ok stsp
2016-05-25Fix another one-byte buffer underflow (read access only).schwarze1-7/+4
This change touches code that only runs when REG_BASIC is given and the regular expression is anchored with [[:<:]] or \< _and_ uses backreferences. Simplify the logic while here, already looking at the previous character if REG_STARTEND and REG_NOTBOL are both in use, in anticipation of martijn@'s upcoming patch which will further improve REG_STARTEND. OK millert@ martijn@ Also tested by Pedro Giffuni (pfg) on FreeBSD.
2016-05-25Must extract uvm_vnode from uvm_object first before reading the vnodestefan1-3/+11
Otherwise procmap interprets the uvm_vnode contents as a vnode, yielding bogus values. This should cure the "procmap: invalid address (ffffffffffffffff) == -1 vs. 656 @ ffffffffffffffff" error messages that appear sporadically. ok deraadt@