property: fix getting dirty serial value

__system_property_serial just returned serial value without
checking if it is dirty, so check and wait until serial
value is not dirty before return

Change-Id: If485b6251b5555b004912c66c7c2cb455a7fdbdc
Signed-off-by: jiaguo <jiaguo@marvell.com>

Conflicts:
	libc/bionic/system_properties.cpp
Add include of float.h for LDBL_MIN_EXP and LDBL_MANT_DIG

(cherry picked from commit 1711c6ea3a0d891da665325c75738a68bd7d501f)

Change-Id: Ia64676b2b904f042fec678003e3f2cd5bd82b510
Fix and clean up strtotimeval

- parsing of fractional part was wrong (always parsed as 0)
- return value was also wrong in the presence of fractional parts
- general style clean up

Change-Id: I1935a63db938dbed7cacb4b5646e993a52c27f1a
Signed-off-by: Weichuan Yan <wchyan@marvell.com>
Added strtotimeval tests.

Change-Id: I3dfd3647a8494490a2d549bdb915968063a7fb99

Conflicts:
	tests/time_test.cpp
Fix deadlock in timer_delete.

If the callback function for a timer did a timer_delete, the function
would never return. The problem was that the timer_delete function would try
to wait until the timer thread has finished. Waiting for yourself to finish
doesn't work very well.

Bug: 13397340
Change-Id: Ica123a5bafbc8660c8a4a909e5c2dead55ca429d

Conflicts:
	libc/bionic/posix_timers.cpp
	tests/time_test.cpp
Add accept4() syscall

Add accept4() using SYSCALLS.TXT and gensyscall

Change-Id: I6f19f29144186d15d46423e10f2cc4b4223719c6

Conflicts:
	libc/SYSCALLS.TXT
	libc/include/sys/socket.h
Add accept4 unit test to bionic.

Change-Id: I1cce5fb8dab16f03164fdd288f35a814d7c49c6a
Small accept4 fixes.

Put the accept4 test in the sorted order, and put the accept4 define in
sorted order.

Also add the missing SYS_RECVMMSG and SYS_SENDMMSG defines.

Change-Id: Iba55354975e0d5027dbee53f6de752c2df719493

Conflicts:
	libc/include/sys/socket.h
	tests/Android.mk
Use the float/double assert macros.

The normal ASSERT_EQ macros don't work quite right for float/double values,
and result in false failures. Use the correct macros instead.

Bug: 13511379
Change-Id: Ic2feee7f3d3569f57b6453b8fa95222846c625cd

Conflicts:
	tests/stdio_test.cpp
	tests/stdlib_test.cpp
FORTIFY_SOURCE: don't define s?printf macros if already defined

Clang specific: Don't #define sprintf and snprintf macros if they
are already defined.

Change-Id: I30fc507d898377e1b8a57a65a147926229e0f9e2

Conflicts:
	libc/include/stdio.h
Clean up CMSG_*HDR in <sys/socket.h>

Removed __CMSG_NXTHDR, __CMSG_FIRSTHDR and cmsg_nxthdr.

Bug: 13418328
Change-Id: I6b1ed58b41b3f37d41e070c4f222b5bfa512bc48

Conflicts:
	libc/include/sys/socket.h
Move accept4 tests into sys_socket_test.cpp.

In addition, create basic recvmmsg, sendmmsg tests.

Change-Id: Ie9f4954446d98b5eb5e553d3c616c1ee67c3cb66

Conflicts:
	tests/sys_socket_test.cpp
Add lconv declaration and localeconv(3)

lconv is taken from ndk/sources/android/support/include/locale.h and
matches
bsd/glibc upstream.
Keep old declaration for 32-bits for compatibility.
localeconv.c and deps are taken from openbsd upstream.
Changed strtod.c accordingly.

Change-Id: I9fcc4d15f5674d192950d80edf26f36006cd31b4
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>

Conflicts:
	libc/arch-arm64/arm64.mk
	libc/arch-mips64/mips64.mk
	libc/arch-x86_64/x86_64.mk
	libc/include/locale.h
	libc/stdlib/strtod.c
Fix math tests.

Bug: 13657654
Change-Id: I39b2f13b5b3d3e6897618ac3aed49a0a08458dd0

Conflicts:
	tests/math_test.cpp
Fix transient failure in select_smoke test.

Make sure there is a delay before the file descriptor is written so that
the select/pselect calls do not return immediately.

Change-Id: If9e481b0e2cfae7ef7abd9cba8fff84078e203d3

Conflicts:
	tests/sys_select_test.cpp
Include sys/types.h and sys/wait.h for waitpid

(cherry picked from commit 8b2c6d44cac206b61dffd965863336e6f803fc66)

Change-Id: Ice1f6d956c11aaefd3d846c12121f08613a94446
Add lsearch(3) for ltrace.

Bug: 13746936
Change-Id: I833c6ba70a1752c04dab7de389f5bebb741662b3

Conflicts:
	libc/Android.mk
	libc/include/search.h
Fix the POSIX timers fix.

If we're not going to wait for the timer threads to exit, we need
another way to ensure that we don't free the data they're using
prematurely. The easiest way to ensure that is to let them free the
data themselves.

Change-Id: Icee17c87bbcb9c3aac5868973f595d08569f33aa