This was only ever added to keep strace compiling, but strace has
since (actually, prior) fixed their source to use the less ugly name,
so we don't need this anymore (good riddance, #define!).
This reverts commit bbb34f9536.
Executing test via test_forked() allows us to
avoid undesired global state changes in tests like
atexit, dlopen(.., RTLD_NODELETE) and similar.
Change-Id: I118cdf009269ab5dd7b117c9b61dafa47de2a011
stdin/stdout/stderr are special; their mutexes are initialized by
__sinit. There's no unit test for this, because __sinit has already
been called by the time the first unit test runs, but you could
reproduce this failure with a trivial main() that calls flockfile
or ftrylockfile on one of the standard streams before otherwise
using stdio.
Bug: 18208568
Change-Id: I28d232cf05a9f198a2bed61854d8047b23d2091d
This is a MIPS-only header, and should not be part of the common
headers. See http://b.android.com/79841 for context.
Change-Id: I610bc3ff626b57e7854dad15a4a2f67e1e5ded75
According to https://github.com/ukanth/afwall/pull/213 some OEMs have
shipped a getaddrinfo(3) that crashes given NULL hostnames.
Change-Id: I9cea5fdd68546b7c64cf47e10e2b2b4d672b69d0
The mktime API returned an uncorrect time when TZ is set as empty.
A timezone UTC/GMT+0 should be implied in the empty case. However
mktime keeps previous information about timezone. If mktime was called
with a timezone which has DST before, the "defaulttype" member of
"state" structure wouldn't be 0. Then it would be used next time,
even though UTC/GMT+0 doesn't have DST.
Added initialization of the "defaulttype" in the empty TZ case.
Change-Id: Ic480c63c548c05444134e0aefb30a7b380e3f40b
The old test are implemented in file:
system/extras/tests/bionic/libc/other/test_sysconf.c
This change is to migrate them to bionic/tests with the gtest format.
and since the sysconf is defined in unistd.h, will put the test under
bionic/tests/unistd_test.cpp file as unistd.syscon test
Change-Id: Ie519147c1c86a6c4cefa8c88b18bf58bdfbffbdb
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
On LP32, this makes no difference. Not an ABI change.
On LP64, results are going to be in %rax or x0 whether they're 32- or 64-bit,
and the only difference is going to be whether the top bits are clobbered.
Bug: 18390956
Change-Id: I0bd4496231bdded34c1fa03e895021ac0df7f8e1
Various C and C++ standards explicitly say that stdin/stdout/stderr
should be macros, but glibc makes them global variables too. This
means it's possible to write code that uses those names as locals,
but that code (toybox being an example) won't build on bionic.
If we'd done this earlier, we could have hidden __sF for LP64, but
it's too late now.
Change-Id: I90cf8c73f52b66e1760b8fa2e135b9f9f9651230