summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Remove strtok from adb.Elliott Hughes2015-04-283-17/+11
| | | | | | | | Also fix android::base::Split to behave like Java, Python, and google3. (cherry picked from commit 8d5fa6da44d56511b3e173bc463cbc65ff221b4a) Change-Id: I9388ae37ee8dd4a4a6c2a9a19f068b70d9a78353
* Add ReadFully and WriteFully to libbase.Elliott Hughes2015-04-243-0/+52
| | | | Change-Id: I6b7aa2a93398e7acdd1d74c71d9abed08a72b3c4
* Fix comment typo.Elliott Hughes2015-04-171-1/+1
| | | | Change-Id: I2d7082c44123e90d74b2669ab29d787b9aa64863
* Add base/memory.h.Dan Albert2015-04-091-0/+47
| | | | | | Right now this only includes an API for unaligned reads/writes. Change-Id: Ieb42498aa17cbd1035b66c51bd1c4f16fa2acfdb
* Cleanup base/logging.Dan Albert2015-04-032-40/+26
| | | | | | | | | Some of this code was unused, most didn't need to be exposed, and we can just use basename(3). Also use a better default program name than "unknown". Change-Id: I62d990f64e4fd0c16aa4b7e907dd06e4f26ddcdd
* Support arbitrary loggers.Dan Albert2015-04-034-66/+128
| | | | | | | | | | | While the defaults (logd or stderr) make sense for most use cases, there are places that can only log to the kernel, or need to log to a file, etc. Allow the user to pass in an arbitrary logging object, and provide LogdLogger and StderrLogger as defaults. Change-Id: I62368acc795ff313242bb205d65017404bf64e88
* Support logging to other log buffers.Dan Albert2015-04-032-34/+66
| | | | | | | LOGTO(dest, severity) and PLOGTO(dest, severity) log to other log buffers. For example, `LOGTO(SYSTEM, FATAL) << "Foobar";`. Change-Id: Id1ca1c8fdae72d69b73945ae9b006525d0be1582
* Merge "Remove LogMessage::LogLineLowStack."Dan Albert2015-04-032-48/+0
|\
| * Remove LogMessage::LogLineLowStack.Dan Albert2015-04-022-48/+0
| | | | | | | | | | | | | | This was ported over from ART, but even they only use it in a single place. Change-Id: Ia34dc54b56c764ede79b2957bf3dc8df0f1323ee
* | Don't show lint errors for rvalue references.Dan Albert2015-04-021-1/+1
|/ | | | Change-Id: Ic936c9e3778303d1d26813b844ccd3bb26701550
* Enable building libbase on Windows.Dan Albert2015-03-301-4/+8
| | | | | | | | We have to exclude the logging facilities for now (since we don't have a std::mutex on Windows), but there's plenty else in here that is worth having. Change-Id: I6d1369e34e08ea2e88a0b1130c4462e5d35d99e2
* Merge "Pull in Windows compatibility header."Dan Albert2015-03-271-0/+1
|\
| * Pull in Windows compatibility header.Dan Albert2015-03-261-0/+1
| | | | | | | | | | | | Needed for O_CLOEXEC, O_NOFOLLOW, and DEFFILEMODE. Change-Id: Id6c0465a6559c30ac8c085c28be0d47c9738f02a
* | Include what we use.Dan Albert2015-03-262-0/+2
|/ | | | Change-Id: If510431d3d445de94f781b4fdec2e1b445f7c294
* Move gettid() into libcutils.Dan Albert2015-03-232-23/+6
| | | | Change-Id: Ic8a15036833e6d129b7998d954b804be391de399
* Update string Split API.Dan Albert2015-03-234-28/+63
| | | | | | | | | 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
* Add google3 style logging to libbase.Dan Albert2015-03-209-24/+864
| | | | | | | | | | | | | 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
* Use mingw on Windows.Dan Albert2015-03-191-3/+0
| | | | | | | | 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
* Add common string utilities to libbase.Dan Albert2015-03-164-0/+302
| | | | | | | | 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
* Revert "Revert "Add commonly used C++ macros to libbase.""Dan Albert2015-03-162-1/+189
| | | | This reverts commit 0722bae7892cc7ce9f056138ad38dfaec38bf5de.
* Revert "Revert "Create libbase.""Dan Albert2015-03-169-0/+560
| | | | This reverts commit a7870d88167f619e758b5bcd15b410d16da7c16b.
* Revert "Create libbase."Nicolas Geoffray2015-03-169-560/+0
| | | | | | | | Breaks internal master. This reverts commit 98ff77204cef9bb8f0f27420833233622060a09e. Change-Id: I18dc6021cb43efff8aa88486c2d980dc2b8eedba
* Revert "Add commonly used C++ macros to libbase."Nicolas Geoffray2015-03-162-189/+1
| | | | | | | | Breaks master build. This reverts commit 7fbdaddfac55c8c10d1595313f436221e77211f6. Change-Id: I53d090f7dee8ed30fc49d908939153996cdb2298
* Add commonly used C++ macros to libbase.Dan Albert2015-03-142-1/+189
| | | | Change-Id: I74f5dbfc4d99f7e78212a72540e538c1a737e224
* Create libbase.Dan Albert2015-03-149-0/+560
Move StringPrintf and the string based file I/O from libutils to libbase. Change-Id: I0297a6063874b9d92100e0dd5123fddfbda932fe