Ensure that <stdint.h> defines SIZE_MAX and friends.

We were missing SIG_ATOMIC_MAX, SIG_ATOMIC_MIN, SIZE_MAX,
WCHAR_MAX, WCHAR_MIN, WINT_MAX, and WINT_MIN.

Change-Id: I2535f36bc220fbaea009b483599b7af811c4cb5c
Merge "Ensure that <stdint.h> defines SIZE_MAX and friends."
Slight script cleanup; make gensyscalls work from any directory.

Also remove a ton of dead code.

Change-Id: I1315623695a004f643b155f121cbafe24b715b8a
Merge "Slight script cleanup; make gensyscalls work from any directory."
don't hardcode register r0/v1 when reading the TLS

this leads to much improved code when calling __get_tls()

Change-Id: I21d870fb33c33a921ca55c4e100772e0f7a8d1e4
Merge "don't hardcode register r0/v1 when reading the TLS"
bionic: move system property writing from init to bionic

Move the implementation of writing to the system property area
from init to bionic, next to the reader implementation.  This
will allow full property testing to be added to bionic tests.

Add new accessor and waiting functions to hide the implementation
from watchprops and various bionic users.

Also hide some of the implementation details of the property area
from init by moving them into _system_properties.h, and other details
from everybody by moving them into system_properties.h.

(cherry picked from commit dc1038b7900acb664e99643d2974e1a0f4703781)

Change-Id: I192d3825ee276c5047bc751039fe6cfe226a7cca
bionic: add tests for properties

(cherry picked from commit 37d9f75dde881a0ba1c1b3253b1be19d4096963d)

Change-Id: Iac00ce10a4272032a1cbdbc4204277d6876e3365
Merge changes Iac00ce10,I192d3825

* changes:
  bionic: add tests for properties
  bionic: move system property writing from init to bionic
libc: Introduce __errordecl()

Define __errordecl and replace __attribute__((__error__("foo")))
with __errordecl. Make sure __errordecl is a no-op on clang, as it
generates a compile time warning.

Change-Id: Ifa1a2d3afd6881de9d479fc2adac6737871a2949
libc: add limited FORTIFY_SOURCE support for clang

In 829c089f83ddee37203b52bcb294867a9ae7bdbc, we disabled all
FORTIFY_SOURCE support when compiling under clang. At the time,
we didn't have proper test cases, and couldn't easily create targeted
clang tests.

This change re-enables FORTIFY_SOURCE support under clang for a
limited set of functions, where we have explicit unittests available.
The functions are:

* memcpy
* memmove
* strcpy
* strncpy
* strcat
* strncat
* memset
* strlen (with modifications)
* strchr (with modifications)
* strrchr (with modifications)

It may be possible, in the future, to enable other functions. However,
I need to write unittests first.

For strlen, strchr, and strrchr, clang unconditionally calls the
fortified version of the relevant function. If it doesn't know the
size of the buffer it's dealing with, it passes in ((size_t) -1),
which is the largest possible size_t.

I added two new clang specific unittest files, primarily copied
from fortify?_test.cpp.

I've also rebuild the entire system with these changes, and didn't
observe any obvious problems.

Change-Id: If12a15089bb0ffe93824b485290d05b14355fcaa
bionic: change properties benchmarks to read a single property

The properties benchmarks were reading n properties from a property
area with n properties in it, which was making it hard to compare
the time between runs of different sizes.  Change the benchmark
to read a random property per iteration so the numbers between
runs are comparable.

Change-Id: Ib1648ce0948d9038fce76d209608427376cfb8da
Merge "bionic: change properties benchmarks to read a single property"
libc: Rename fortify error functions.

__umask_error -> __umask_invalid_mode
__creat_error -> __creat_missing_mode
__too_many_args_error -> __creat_too_many_args

Change-Id: I4036f344a3a93628e70f2e948ad73cfed3a967ea
bionic: fix deleting property arrays in property benchmark

Use delete[] to delete arrays allocated with new []

Change-Id: Icc2a6b23df09049c008f7f1f50ed93a277174308
Make LD_PRELOAD failures just warnings.

This matches glibc and makes life easier for developers who want to
sometimes preload a library from init (which has no conditionals); they
can simply move/remove the library to disable.

Change-Id: I579b8633f958235af6e46bb53b378b9e363afb1f
Merge "libc: Introduce __errordecl()"
Merge "bionic: fix deleting property arrays in property benchmark"
Merge "Make LD_PRELOAD failures just warnings."
Merge "libc: add limited FORTIFY_SOURCE support for clang"