Commit graph

6971 commits

Author SHA1 Message Date
Elliott Hughes
296f17af0a Merge "Fix wchar.cpp MIPS narrowing conversion build failure." 2014-05-02 00:15:42 +00:00
Elliott Hughes
f83e644e2c Fix wchar.cpp MIPS narrowing conversion build failure.
Change-Id: Id9103c78958d60337dbdb807b11256c1b31c632a
2014-05-01 17:14:59 -07:00
Elliott Hughes
7da3191069 Merge "Fix wchar.cpp signed/unsigned comparison build failure." 2014-05-01 23:50:35 +00:00
Elliott Hughes
568c86a489 Fix wchar.cpp signed/unsigned comparison build failure.
Change-Id: Id20b91f3d57c4430987b5cc88ac99c245801d73b
2014-05-01 16:49:55 -07:00
Elliott Hughes
f0291ca6b7 Merge "Switch to a working UTF-8 mb/wc implementation." 2014-05-01 23:12:41 +00:00
Elliott Hughes
5a0aa3dee2 Switch to a working UTF-8 mb/wc implementation.
Although glibc gets by with an 8-byte mbstate_t, OpenBSD uses 12 bytes (of
the 128 bytes it reserves!).

We can actually implement UTF-8 encoding/decoding with a 0-byte mbstate_t
which means we can make things work on LP32 too, as long as we accept the
limitation that the caller needs to present us with a complete sequence
before we'll process it.

Our behavior is fine when going from characters to bytes; we just
update the source wchar_t** to say how far through the input we got.

I'll come back and use the 4 bytes we do have to cope with byte sequences
split across multiple input buffers. The fact that we don't support
UTF-8 sequences longer than 4 bytes plus the fact that the first byte of
a UTF-8 sequence encodes the length means we shouldn't need the other
fields OpenBSD used (at the cost of some recomputation in cases where a
sequence is split across buffers).

This patch also makes the minimal changes necessary to setlocale(3) to
make us behave like glibc when an app requests UTF-8. (The difference
being that our "C" locale is the same as our "C.UTF-8" locale.)

Change-Id: Ied327a8c4643744b3611bf6bb005a9b389ba4c2f
2014-05-01 14:46:54 -07:00
Christopher Ferris
cb475651e3 Merge "Add ability to run on host for x86/x86_64." 2014-05-01 21:03:27 +00:00
Christopher Ferris
3347a79664 Add ability to run on host for x86/x86_64.
Change-Id: I063cb71ce0f7247cefacaa653c7b87b7b3e72025
2014-05-01 13:44:57 -07:00
Christopher Ferris
de54b90ed5 Merge "Modify hard-coded directory." 2014-05-01 20:19:20 +00:00
Christopher Ferris
8b1ade5c0b Modify hard-coded directory.
Use the ANDROID_DATA environment variable instead of the hard-coded
directory for these benchmarks.

Change-Id: I00bae7b4a24e81e77fc8f52e1fe99f4d4918f520
2014-05-01 13:10:48 -07:00
Elliott Hughes
8979cfe14b Merge "Keep the kernel header scrubber's data structures in sync." 2014-05-01 17:28:12 +00:00
Elliott Hughes
fddbafdc0a Keep the kernel header scrubber's data structures in sync.
If you rewrite the tokens of a #if you need to rewrite the expression to match
because either might be used later. This was showing up as SIGRTMAX being
rewritten in a #define but not in the #ifndef that guarded it, for which case
I've added a unit test.

Change-Id: I6929675461a1afe272edd667594529fd84a3dc4d
2014-05-01 10:27:49 -07:00
Elliott Hughes
9fb53dd4db Merge "Make SIGRTMIN hide the real-time signals we use internally." 2014-04-30 18:30:15 +00:00
Elliott Hughes
2ae3f60ca3 Merge "Fix the CPU_*_S tests." 2014-04-30 18:29:31 +00:00
Elliott Hughes
2d36750c3a Fix the CPU_*_S tests.
Change-Id: Id67c48b9c12a20b01309490670438bfcd9163465
2014-04-30 10:45:35 -07:00
Elliott Hughes
0990d4fda8 Make SIGRTMIN hide the real-time signals we use internally.
__SIGRTMIN will continue to tell the truth. This matches glibc's
behavior (as evidenced by the fact that we don't need a special case
in the strsignal test now).

Change-Id: I1abe1681d516577afa8cd39c837ef12467f68dd2
2014-04-30 10:06:09 -07:00
Calin Juravle
77473e4085 Merge "Fix cpu_set_t" 2014-04-30 16:09:08 +00:00
Dan Albert
4566731772 Merge "Adds quick_exit(3) and at_quick_exit(3) from freebsd" 2014-04-30 15:39:14 +00:00
Calin Juravle
b743790cca Fix cpu_set_t
- extend CPU_SETSIZE for LP64
- fix CPU_(AND|OR|XOR) macros
- fix CPU_OP_S macro
- fix __sched_cpucount
- tidy up the code

Change-Id: I741afff4d0c473e8a1ee6b4141981dc24467e0d4
2014-04-30 14:30:15 +01:00
Calin Juravle
d4ae59dcf2 Merge "Reserve space in mbstate to allow for proper wchar support" 2014-04-30 10:34:09 +00:00
Elliott Hughes
01933d921e Merge "Switch to OpenBSD stdio wide printf functions." 2014-04-30 03:16:40 +00:00
Dan Albert
b8425c549a Adds quick_exit(3) and at_quick_exit(3) from freebsd
Change-Id: I4fe88abd8f7b8aa45e58aeb2529d59a8d555d338
2014-04-29 19:17:00 -07:00
Elliott Hughes
94336d8ecf Switch to OpenBSD stdio wide printf functions.
Change-Id: Icf4f8685d021ec6b7482ca1cc021ce8184098e4a
2014-04-29 17:39:29 -07:00
Elliott Hughes
85e780d055 Merge "Switch to OpenBSD stdio wide get/put functions." 2014-04-30 00:38:32 +00:00
Elliott Hughes
c932225e10 Switch to OpenBSD stdio wide get/put functions.
Change-Id: I71f8769cdea874e55d397ca7682d9d4e659d3dcb
2014-04-29 17:08:03 -07:00
Elliott Hughes
c19c8e6f71 Merge "Switch to the OpenBSD implementations of the wide scanf functions." 2014-04-29 23:57:11 +00:00
Elliott Hughes
01ae00f317 Switch to the OpenBSD implementations of the wide scanf functions.
This also gets us the C99 wcstoimax and wcstoumax, and a working fgetwc and
ungetwc, all of which are needed in the implementation.

This also brings several other files closer to upstream.

Change-Id: I23b025a8237a6dbb9aa50d2a96765ea729a85579
2014-04-29 16:28:56 -07:00
Elliott Hughes
c6e563c87a Merge "Fix build (signed char issue)." 2014-04-29 23:06:38 +00:00
Elliott Hughes
770491fb4f Fix build (signed char issue).
Change-Id: I05d78f4c1599ed9a0c1285f9eb1e89bc2f55c24d
2014-04-29 16:05:58 -07:00
Elliott Hughes
55cd82762f Merge "Switch to the OpenBSD wcsto* functions." 2014-04-29 22:33:15 +00:00
Elliott Hughes
3d7a0d9b08 Switch to the OpenBSD wcsto* functions.
This replaces a partial set of non-functional functions with a complete
set of functions, all of which actually work.

This requires us to implement mbsnrtowcs and wcsnrtombs which completes
the set of what we need for libc++.

The mbsnrtowcs is basically a copy & paste of wcsnrtombs, but I'm going
to go straight to looking at using the OpenBSD UTF-8 implementation rather
than keep polishing our home-grown turd.

(This patch also opportunistically switches us over to upstream btowc,
mbrlen, and wctob, since they're all trivially expressed in terms of
other functions.)

Change-Id: I0f81443840de0f1aa73b96f0b51988976793a323
2014-04-29 14:53:11 -07:00
Calin Juravle
eab395e4a8 Reserve space in mbstate to allow for proper wchar support
Bug: 14382788
Change-Id: If023ac9bb65f95135cae7ebe89147e3985a69a96
2014-04-29 20:28:29 +01:00
Christopher Ferris
7fdab460a9 Merge "Fix potential makefile bug." 2014-04-29 15:56:06 +00:00
Christopher Ferris
5090964da0 Fix potential makefile bug.
Since multilib is not set every time, it needs to be per module or
there is a change that another target will use the multilib value set
previously.

Change-Id: I5c30e18d5111705cb3f6e3d4cd9ef8a28c9b746c
2014-04-28 21:10:37 -07:00
Elliott Hughes
07bab525e2 Merge "Add mbtowc and fix mbrtowc." 2014-04-29 00:54:43 +00:00
Elliott Hughes
0a5e26da1e Add mbtowc and fix mbrtowc.
Change-Id: I48786cd82587e61188d40f6fd6e11ac05e857ae9
2014-04-28 17:51:13 -07:00
Elliott Hughes
0fd2e87a0c Merge "Replace our broken wcswcs with the working upstream one." 2014-04-28 23:47:18 +00:00
Elliott Hughes
d299bcfdad Replace our broken wcswcs with the working upstream one.
Change-Id: I2952684df5674d10f0564d92c2cd42597725c0e3
2014-04-28 16:46:24 -07:00
Elliott Hughes
3ac3f3fd0c Merge "Don't use so much stack in tzcode." 2014-04-26 04:51:55 +00:00
Elliott Hughes
329103d3e2 Don't use so much stack in tzcode.
Bug: 14313703
Bug: https://code.google.com/p/android/issues/detail?id=61130
Change-Id: Id9b240fce20d4a6f2660792070e02b2b5f287655
2014-04-25 21:51:26 -07:00
Elliott Hughes
f2dc7d1719 Merge "Pass si_code through to debuggerd." 2014-04-26 03:23:22 +00:00
Elliott Hughes
b7e289ed02 Pass si_code through to debuggerd.
Because we re-raise various signals, we corrupt the si_code that debuggerd
sees when it ptraces our siginfo. One possible solution (shown here) is to
pass the original si_code value in the message we send to debuggerd.

Change-Id: I76f9aa2c0442e5cab611d132532409e700383907
2014-04-25 20:00:45 -07:00
Elliott Hughes
213e46f7ae Merge "Fix brk/sbrk error checking." 2014-04-26 02:39:09 +00:00
Elliott Hughes
533dde4dbf Fix brk/sbrk error checking.
Note that the kernel returns the current break on error or if the requested
break is smaller than the minimum break, or the new break. I don't know where
we got the idea that the kernel could return -1.

Also optimizes the query case.

Also hides an accidentally-exported symbol for LP64.

Change-Id: I0fd6b8b14ddf1ae82935c0c3fc610da5cc74932e
2014-04-25 19:38:33 -07:00
Colin Cross
eff450ff45 Merge "Reserve space in pthread structures for future extensibility." 2014-04-24 22:40:50 +00:00
Calin Juravle
b1cacd4245 Reserve space in pthread structures for future extensibility.
Make our structures equal in size with glibc structures. This should
give us plenty of space to implement any missing feature.

Bug: 13278744
Bug: 12875898
(cherry picked from commit cf83fd77ca)

Change-Id: I76968d31024eb51bc73887687e5ac492eb02a27f
2014-04-24 22:07:52 +00:00
Elliott Hughes
08bfcff0d4 Merge "Allow liblog to pass failure reasons to debuggerd." 2014-04-24 20:29:43 +00:00
Greg Hackmann
ab290718e3 Merge "Revert "Reserve space in pthread structures for future extensibility."" 2014-04-24 18:12:28 +00:00
Greg Hackmann
6b64000ef0 Revert "Reserve space in pthread structures for future extensibility."
This reverts commit cf83fd77ca.

Change-Id: I4f69e86ffe1c267a9018eb489d909237534c6cf9
2014-04-24 18:11:23 +00:00
Calin Juravle
f2aeca505c Merge "Remove an unsed include dir" 2014-04-24 16:40:50 +00:00