Commit graph

211 commits

Author SHA1 Message Date
Dan Albert
7dfb61dcdc Move gettid() into libcutils.
Change-Id: Ic8a15036833e6d129b7998d954b804be391de399
2015-03-23 13:01:21 -07:00
Dan Albert
47328c96d9 Update string Split API.
Return a new vector rather than appending to the parameter.

Delimiters are also a string rather than a character. Split on any
character in the string.

Change-Id: I039b332ace5578590df9e7ca0e8fa3db28db30a3
2015-03-23 10:23:11 -07:00
Dan Albert
58310b49fc Add google3 style logging to libbase.
ART already had a flavor of this, but it was specialized for their use
case a bit.

Note that the logging.* tests are currently disabled for the device
because there is no good way to capture the output of liblog. We can
make something that will execute logcat and then then scan the output,
but that's messy. Since we know it at least works on the host, we can
add better device tests later.

Change-Id: I47acd87a3312c0a5285b03f9c8dadef0c669f06a
2015-03-20 14:04:35 -07:00
Dan Albert
9c5c08be37 Use mingw on Windows.
LOCAL_CLANG := true is a no-op on Linux/Darwin host builds, but
apparently moves Windows binaries from mingw to clang, which is
completely untested.

Change-Id: Ibbc468d4a19a9e36bbcb93aa030fcc771af020ba
2015-03-19 22:44:50 -07:00
Dan Albert
0f1e54491c Add common string utilities to libbase.
These are useful outside of ART. Nothing changed (aside from fixing
Trim to not segfault on empty strings), so ART should be able to move
to using these.

Change-Id: Id026ebffe8d31f784a91834786ab189680b13a0f
2015-03-16 20:03:03 -07:00
Dan Albert
76d9cad62c Revert "Revert "Add commonly used C++ macros to libbase.""
This reverts commit 0722bae789.
2015-03-16 10:09:07 -07:00
Dan Albert
c007bc3856 Revert "Revert "Create libbase.""
This reverts commit a7870d8816.
2015-03-16 10:08:46 -07:00
Nicolas Geoffray
a7870d8816 Revert "Create libbase."
Breaks internal master.

This reverts commit 98ff77204c.

Change-Id: I18dc6021cb43efff8aa88486c2d980dc2b8eedba
2015-03-16 11:07:29 +00:00
Nicolas Geoffray
0722bae789 Revert "Add commonly used C++ macros to libbase."
Breaks master build.

This reverts commit 7fbdaddfac.

Change-Id: I53d090f7dee8ed30fc49d908939153996cdb2298
2015-03-16 10:46:43 +00:00
Dan Albert
7fbdaddfac Add commonly used C++ macros to libbase.
Change-Id: I74f5dbfc4d99f7e78212a72540e538c1a737e224
2015-03-14 16:36:18 -07:00
Dan Albert
98ff77204c Create libbase.
Move StringPrintf and the string based file I/O from libutils to
libbase.

Change-Id: I0297a6063874b9d92100e0dd5123fddfbda932fe
2015-03-14 16:36:18 -07:00