Provide logb implementation.

logb was taken from upstream bionic's msun folder (as of today). The
only local change is the definition of __weak_reference in s_logb.c.

Fixes the 5 libc++ tests that failed to build with "error: undefined
reference to 'logbl'" in these folders:
numerics/complex.number/complex.member.ops
numerics/complex.number/complex.ops
numerics/complex.number/complex.transcendentals

Change-Id: I112b824107630f3c0861a95ddf4a4a7c11b01999
Merge pull request #14 from awong-dev/logb

Provide logb implementation.
Implement hypotl in terms of hypot.

hypotl() returns invalid results, for example hypotl(3, 4) returns
0x1.3ffffffffffffp+2 instead of 0x1.4p+2. hypot() doesn't have this
problem, and double and long double are both 64 bit on Android.

Fixes 1 failure in libc++'s numerics/complex.number/complex.value.ops

Change-Id: Ia7e54cd22af09ab9246bb78d42b882336775ea4d
Merge pull request #15 from awong-dev/hypotl

Implement hypotl in terms of hypot.
Fix -Wtypedef-redefinition warning for locale_t.

xlocale.h doesn't do much more than defining locale_t, so there's no
harm in just including it directly.

Change-Id: I47dccdc3d35bbee6b59cccfbf3a1c508e795c913
Merge pull request #16 from awong-dev/fixwarn

Fix -Wtypedef-redefinition warning for locale_t.
Copy Bionic's printf/scanf code into sources/android/support.

They were copied from Bionic (as of today), with:

$  cp ~/src/platform_bionic/libc/stdio/{fprintf,fscanf,fvwrite,printf,\
scanf,snprintf,sprintf,sscanf,vasprintf,vfprintf,vfscanf,vprintf,vscanf,\
vsnprintf,vsprintf,vsscanf}.c sources/android/support/src/stdio/
$  cp ~/src/platform_bionic/libc/stdio/{fileext,floatio,fvwrite,local,wcio}.h \
sources/android/support/src/stdio/
$  cp ~/src/platform_bionic/libc/stdlib/strtod.c \
sources/android/support/src/stdio/

As of this commit, these files are unmodified and not built yet.

Change-Id: Ied1d1e4b055df83245a0f0af5635b5950172adab
Add Bionic's printf/scanf implementation files to the build.

The files were added to sources/android/support/src/stdio in the last
commit. This commit adds them to the build. This requires minor changes
to three of the c files, to make them build without the rest of Bionic.

With this commit, printf() (etc) will run the code in
sources/android/support/src/stdio, but the behavior of that function is
still identical to its behavior in Bionic.

Change-Id: I36800b0546877748d0ac6dcfb96ceb44258a6fa1
Merge pull request #17 from awong-dev/hexfloat

Hexfloat
Add FreeBSD wcstoX implementations.

Change-Id: I2c0bfe5fbea6166ffbfa05337ff6061b937696a3
Make locale support compile

Change-Id: Idedf1eb8a6f35ede19c96eaee8b3f70d3b590982
Merge pull request #22 from awong-dev/locale_fixes

Locale fixes. Makes more string.conversions tests pass.
Add support for reading floats starting with 0x to strtod, add hdtoa().

This code is taken from the gdtoa/FreeBSD folder from Apple's Libc, with
minimal changes to make it compile standalone.

Change-Id: Ia7989ea275618ce2566b1da77c594d969bffb341
Add support for %a to the printf family.

This is based on FreeBSD's implementation, but slightly different so
that it looks more similar to the other code in vfprintf.c. The
implementation relies on hdtoa(), which was added in a previous commit.

Change-Id: I8847ae9cbe0acbaabf52a4d314d0ba775da3277b
Add support for %a to the scanf() family.

This was written from scratch (based on the existing hex int parsing
code in the same file). The actual string->double conversion work
is done by strtod(), which was taught about 0x floats in a previous
commit.

Change PFXOK, NZDIGITS to not overlap with DPTOK, EXPOK as all four are
used when parsing floats now.

Change-Id: I79fdfe72099ab5130aaaae57b017750fad1d50cb
Merge pull request #23 from awong-dev/hexfloat

Hexfloat
Add missing wchar file and fix sorting of build files

Change-Id: Ibbbfbbffa23d6423dd6d6df78a308fd2b78ec986
Merge pull request #25 from awong-dev/missing-files

Add missing wchar file and fix sorting of build files
Fix new.delete tests by correctly delegating to gabi new handlers and link methodology.

Previously GABIXX_LIBCXX incorrectly selected the default libc++
implementation for set_new_handler which defined a set handler per
translation unit. This made overriding incomplete.

Furthermore, the linking of libc++.so incorreclty specified -Bsymbolic which,
aside from causing issues with rtti and exception handlers, it also makes the
default implementations of the array operator new, and the single-object
no-throw variant (both of which wrap the normal single-object new) link
directly to the single-object new rather than jump through the PLT. This
means that even if you override single-object new, the default implementations
of these other new operators will NOT find the override. Bad bad bad.

Removed -Bsymbolic and also added --dynamic-list-cpp-new to correctly allow
overriding of operator new. The build script fix is kinda hacked...but
good enough for now.

Change-Id: I1abc21a849efdf4639689d4ae4499819cae32cd2
Merge pull request #26 from awong-dev/new.delete.linking.fix

Fix new.delete tests. Delegate to gabi new handlers and fix link methodology.