summaryrefslogtreecommitdiffstats
path: root/libc/upstream-openbsd
Commit message (Collapse)AuthorAgeFilesLines
* bionic: Teach fnmatch(3) to handle UTF-8 characters in patternsTom Marshall2016-04-131-24/+90
| | | | | | | | | | | | | | | | | | | | | This is NOT comprehensive UTF-8 support. It is just a quick hack to make alternation work in bracket expressions so that the system file manager can find files with non-ASCII names in root mode. Bracket expressions that contain non-ASCII ranges are explicitly avoided to avoid the complexities of unicode collation rules. Things like the following will now work: fnmatch("те[с][т].jpg", "тест.jpg", 0); fnmatch("test[αβγ].txt", "testβ.txt", 0); Things like the following will still fail: fnmatch("тес[а-я].txt", "тест.txt", 0); Jira: CYNGNOS-2336 Change-Id: If38dc6692bc22d20128b0cd8a7632754a496d7fb
* Hide __atexitDmitriy Ivanov2015-06-041-1/+0
| | | | | | Bug: http://b/21640806 Change-Id: I778b35c8c7538859179e97fcf5a82db2fcd9e50f (cherry picked from commit 9cf6fc304bbbfb26911e0b624b80d862c40b0308)
* Unregister pthread_atfork handlers on dlclose()Dmitriy Ivanov2015-04-242-249/+0
| | | | | Bug: http://b/20339788 Change-Id: I874c87faa377645fa9e0752f4fc166d81fd9ef7e
* Revert "Unregister pthread_atfork handlers on dlclose()"Dimitry Ivanov2015-04-242-0/+249
| | | | | | | | | The visibility control in pthread_atfork.h is incorrect. It breaks 64bit libc.so by hiding pthread_atfork. This reverts commit 6df122f8528f9b9fcf7dfea14ae98b0ef66274e1. Change-Id: I21e4b344d500c6f6de0ccb7420b916c4e233dd34
* Unregister pthread_atfork handlers on dlclose()Dmitriy Ivanov2015-04-222-249/+0
| | | | Change-Id: I326fdf6bb06bed12743f08980b5c69d849c015b8
* Call __cxa_thread_finalize for the main thread.Dmitriy Ivanov2015-04-151-59/+0
| | | | | | Bug: http://b/20231984 Bug: http://b/16696563 Change-Id: I71cfddd0d404d1d4a593ec8d3bca9741de8cb90f
* Fix memchr overflow.Elliott Hughes2015-02-142-0/+86
| | | | | | | | | The overflow's actually in the generic C implementation of memchr. While I'm here, let's switch our generic memrchr to the OpenBSD version too. Bug: https://code.google.com/p/android/issues/detail?id=147048 Change-Id: I296ae06a1ee196d2c77c95a22f11ee4d658962da
* Fix mips build.Elliott Hughes2015-01-272-142/+0
| | | | | | | Move various mips-only things into the arch-mips directory. As soon as mips writes assembler replacements, we can remove these. Change-Id: Ia7308559bc361f5c8df3e1d456b381865e060b93
* Clean up <stdlib.h> slightly.Elliott Hughes2015-01-263-17/+140
| | | | | | | Interestingly, this mostly involves cleaning up our implementation of various <string.h> functions. Change-Id: Ifaef49b5cb997134f7bc0cc31bdac844bdb9e089
* Add TEMP_FAILURE_RETRY to stdio's low-level read/write functions.Elliott Hughes2015-01-201-89/+0
| | | | | | | | This is correctness rather than performance, but found while investigating performance. Bug: 18593728 Change-Id: Idbdfed89d1931fcfae65db29d662108d4bbd9b65
* Sync with upstream OpenBSD stdio.Elliott Hughes2015-01-137-30/+23
| | | | | | Mainly to get the __atexit_register_cleanup removals we suggested. Change-Id: I58d40b8c5b8401bfb6bfffe8f3430ac0718af917
* Clean up paths.h.Yabin Cui2015-01-091-0/+5
| | | | | Bug: 18905946 Change-Id: I02cd1ddd5c0b0af165685413bc1fb12ca6bf5f33
* Merge "Remove more BSD cruft from the public headers."Elliott Hughes2014-12-231-0/+3
|\
| * Remove more BSD cruft from the public headers.Elliott Hughes2014-12-191-0/+3
| | | | | | | | Change-Id: I1e3097f745b526db448bf72fbc05fb2ba23929a0
* | Fix nan output in the printf family.Elliott Hughes2014-12-202-8/+6
|/ | | | | Bug: https://code.google.com/p/android/issues/detail?id=82452 Change-Id: I51f226c8b033de6e81baeea5e6db3de6ed196f73
* Avoid pathological behavior in OpenBSD's fread.Elliott Hughes2014-12-021-88/+0
| | | | | | Bug: https://code.google.com/p/android/issues/detail?id=81155 Bug: 18556607 Change-Id: Idc60976b79610e2202cc42dc393dcb4ca6c42e05
* Sync with upstream OpenBSD fts.c.Elliott Hughes2014-11-212-0/+41
| | | | Change-Id: Ia7e26b603f6461095b5a8d7e8a6cdf4f8279fa84
* Ensure we initialize stdin/stdout/stderr's recursive mutexes.Elliott Hughes2014-11-031-178/+0
| | | | | Bug: 18208568 Change-Id: I9da16ce0f9375bc363d1d02be706d73fd3b1e150
* Switch to OpenBSD fopen/fclose.Elliott Hughes2014-09-242-0/+149
| | | | | | | | | | | | | This means all our stdio implementation is now the OpenBSD implementation. The only thing we lose is the STDIO_THREAD_LOCK calls but they were no-ops anyway. We should probably talk to upstream about this. Either fix the locking or, preferably, encourage them to move away from this pooling (especially since there's no eviction policy). Bug: 17154680 Change-Id: Ie2523e444a7d0965b8d141d57e3e11f6432d5b9a
* Sync with upstream findfp.c.Elliott Hughes2014-09-242-9/+10
| | | | Change-Id: Ib298f46de0c4d0fd4ce0a9b456c163e8b8b06342
* Switch to OpenBSD flags.c.Elliott Hughes2014-09-231-0/+105
| | | | Change-Id: I0a35e5bd9f8edba27e0c73e5c8150636346d6a81
* CLOEXEC support in fdopen, freopen, and mkostemp/mkostemps.Elliott Hughes2014-09-233-10/+38
| | | | Change-Id: I74ea88e0d4973d6ab3c57da7d8bb643c31592b14
* Pull in upstream fixes to reject invalid bases.Elliott Hughes2014-09-236-20/+60
| | | | | | Also add tests to make sure the full set works correctly. Change-Id: I3e7f237f12c9c93e1185a97c9717803e7e55a73c
* Merge "Sync with some upstream OpenBSD #include cleanup."Elliott Hughes2014-09-235-10/+10
|\
| * Sync with some upstream OpenBSD #include cleanup.Elliott Hughes2014-09-235-10/+10
| | | | | | | | Change-Id: Ibcd7adb19e9a6b9ad8c24d77e23935f19f56a144
* | Switch to OpenBSD insque/remque/killpg.Elliott Hughes2014-09-233-0/+147
|/ | | | Change-Id: Ie02290ad3187b1c1596dd776fd1c8a743a55f7ef
* Ignore all __weak_alias in OpenBSD libC.Chih-Hung Hsieh2014-08-281-0/+3
| | | | | | | | | | | | | GCC assembler allows xyz to be redeclared as weak, by __weak_alias(xyz, _xyz), while _xyz is undefined. Clang does not like that but silently generates no code. It will reject its own .s file if the assembly code is saved first. Since we have no reason to define xyz or _xyz as weak symbol now, and _xyz is a macro to xyz, we simplify libC to have only xyz defined as global. BUG: 17186746 Change-Id: I24b154425838683cae69248cc750c59e26fd5467
* Switch to OpenBSD <err.h> implementation.Elliott Hughes2014-08-269-0/+404
| | | | Change-Id: Ia950d88871a30f68e74f9ac7dbd87788e128e02f
* Switch to OpenBSD daemon(3).Elliott Hughes2014-08-261-0/+64
| | | | Change-Id: I1fd0be09fdb24aa6f1d945410eba5987f8a949b4
* Merge "Switch to OpenBSD res_random."Elliott Hughes2014-08-261-0/+275
|\
| * Switch to OpenBSD res_random.Elliott Hughes2014-07-211-0/+275
| | | | | | | | Change-Id: Ia971d647832893e9bb4601697132a105524d2f96
* | Add POSIX-2008 fmemopen, open_memstream, and open_wmemstream.Elliott Hughes2014-08-203-0/+510
| | | | | | | | | | Bug: 17164505 Change-Id: I59e28a08ff8b6ab632230b11a5807cfd5278aeb5
* | Fix _BSD_SOURCE/__USE_BSD.Elliott Hughes2014-08-191-2/+2
| | | | | | | | | | Bug: 14659579 Change-Id: I80ec9584f054c02d1078828f6bca759c42bc1d4c
* | Implement twalk(3), add unit tests.Elliott Hughes2014-07-243-0/+244
| | | | | | | | | | | | | | | | | | | | | | | | I've also added insque(3) and remque(3) (from NetBSD because the OpenBSD ones are currently broken for non-circular lists). I've not added the three hash table functions that should be in this header because they operate on a single global hash table and thus aren't likely to be useful. Bug: https://code.google.com/p/android/issues/detail?id=73719 Change-Id: I97397a7b921e2e860fd9c8032cafd9097380498a
* | Use upstream OpenBSD's arc4random.Elliott Hughes2014-07-214-0/+344
|/ | | | | | | The getentropy_linux.c is lightly modified to build on Android, but we're now completely in sync with upstream OpenBSD's arc4random implementation. Change-Id: If32229fc28aba908035fb38703190d41ddcabc95
* Fix visibility for a bunch more symbols.Elliott Hughes2014-07-141-4/+12
| | | | | | Bug: 11156955 Bug: 15291317 Change-Id: I664f25cce7c17085a101d6593d8e01525a1f6a90
* Merge "Sync upstream-openbsd."Elliott Hughes2014-07-148-32/+18
|\
| * Sync upstream-openbsd.Elliott Hughes2014-07-148-32/+18
| | | | | | | | Change-Id: I5b9961a57e2ff05f63bd218c130bf8347850b9be
* | Upstream atexitDmitriy Ivanov2014-07-144-26/+251
|/ | | | Change-Id: Ia454a2181b5058ed9783dc02b6b1805d0e4d2715
* Merge "Revert "Revert "Hide _tolower_tab_ and _toupper_tab_ on LP64."""Dan Albert2014-07-021-0/+6
|\
| * Revert "Revert "Hide _tolower_tab_ and _toupper_tab_ on LP64.""Dan Albert2014-07-011-0/+6
| | | | | | | | | | | | This reverts commit 715242fd0f69e73a6aca19e32b8979fa0f384788. Change-Id: Ia9892fa3b03287129aa72a49974cef9fd94ae735
* | Switch to upstream OpenBSD mktemp.c.Elliott Hughes2014-07-021-0/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | Almost all of our stdio is actually OpenBSD, so although this isn't really a core part of stdio (it doesn't touch struct FILE, for example) it probably makes sense for it to come from the same upstream. My actual motivation though is that it's the only FreeBSD file we have compiler warnings from. This patch moves us over to -Werror by default, with only the DNS code having -Wno-error. Change-Id: Id244a5b445cba41b0a1ca30298ca7b1ed177810c
* | Sync to current upstream arc4random.Elliott Hughes2014-06-241-0/+222
|/ | | | | | | | | | This is actually revision 1.33, which is no longer the latest, but it's as close to head as we can currently reasonably get. I've also switched to the OpenBSD getentropy_linux.c implementation of getentropy, lightly modified to try to report an error on failure. Bug: 14499627 Change-Id: Ia7c561184b1f366c9bf66f248aa60f0d53535fcb
* Revert "Hide _tolower_tab_ and _toupper_tab_ on LP64."Dan Albert2014-06-191-6/+0
| | | | | | This reverts commit dd4ad5c463c9bd479e8acf81227708717aafe204. Change-Id: If3c9771825e460ce68604082f4feb0ca783e56c6
* Hide _tolower_tab_ and _toupper_tab_ on LP64.Dan Albert2014-06-181-0/+6
| | | | | | | We can't hide them on LP32 because they appeared in NDK headers. Bug: 11156955 Change-Id: I22bf5a0f4d330c04b49565bc598cd0568128d4fc
* Removes wcswcs from bionic for LP64.Dan Albert2014-06-041-5/+0
| | | | | Bug: 13935372 Change-Id: I0deb15e769da4fa81bb65a87f3c86db5163a5796
* Cherrypick upstream OpenBSD's vfwprintf.c revision 1.11.Elliott Hughes2014-06-041-7/+1
| | | | | | | | | | | revision 1.11 date: 2014/06/04 07:45:25; author: stsp; state: Exp; lines: +1 -7; commitid: zJPRH5RUO224FmQu; Remove assigned but unused local variables and macro from vfwprintf(). Found by Elliott @ google ok mpi@ Change-Id: I716edc0c4d736a484a5317942de8e87bd8c6fd26
* Remove issetugid.Elliott Hughes2014-05-291-0/+3
| | | | | Bug: 14569474 Change-Id: I752c77ed53c724f144f0b618443eb95e87f2929a
* Switch to POSIX dprintf/vdprintf.Elliott Hughes2014-05-222-0/+121
| | | | | Bug: 11156955 Change-Id: I734bd02db514367ab119a48304aae9767958e367
* Switch back to OpenBSD inet_ntop now they're FORTIFY clean.Elliott Hughes2014-05-191-3/+3
| | | | Change-Id: I04798a4966c352a8a12feebdff9646e3bad5933f