getopt(): fix missing carriage return on bad parameters

This affect all command line tools which show the usage on stdout
after an invalid parameter error (printed on stderr)

Change-Id: I8e2cb3fda241ab989dc42055f15082f8b3ba1397
Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>
bionic: Fix aliasing violations

This makes bionic compile with compilers enforcing
strict adherence to aliasing rules (e.g. gcc 4.6
with -Wstrict-aliasing=2 -Werror=strict-aliasing).

Conflicts:

	libc/netbsd/resolv/res_send.c

Change-Id: I640bafe9fef399f856c9e57cb0ab877e8656e522
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Signed-off-by: Evan McClain <aeroevan@gmail.com>
bionic: Add ; after anonymous union declaration

This improves compatibility with different compilers

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
tools/update_all.py: Fix crash on startup when invoked with a parameter

This fixes a crash on startup due to a misspelled variable name when
update_all.py is invoked with a parameter indicating a non-standard
location of kernel headers.

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
bionic: Update fcntl.h clean header

Change-Id: I4ffda59a6d960316b12a6b0c8c7e0df9eb0fe613
Merge "bionic: Fix aliasing violations" into ics
Merge "bionic: Add ; after anonymous union declaration" into ics
Merge "tools/update_all.py: Fix crash on startup when invoked with a parameter" into ics
libm: Add a proper sincos() implementation

Add a proper sincos() implementation that unifies the common
calculations for sin and cos instead of running them twice.

This should cause a speedup even in code not using that
(fairly uncommon) function because gcc can optimize separate
sin() and cos() calls into sincos() calls.

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

Change-Id: I644578ab443506c7404d2638d6d4917ff6c96f20
Avoid multiple dns lookups for the same query

If two or more rapid dns requests for the same server are done
from different threads it turns into separate dns reques, if
the response of the request isn't found in the cache.

This patch avoid multiple request for the same server by
letting subsequents request wait until the first request
has finished.

Change-Id: Ic72ea0e7d3964a4164eddf866feb4357ec4dfe54
Remove expired dns cache entries before removing oldest

A suggestion how to make a smarter delete function when the cache
is full. First look through the entire cache and remove all entries
which have expired. If none use the old solution and just remove
the last entry in the MRU list.

Change-Id: I5f997ab35290a55dc6e1ddf37d725759edf83d36
Remove the meaningless on Linux if_dl.h header.

This was misleading 'configure' into thinking we actually support AF_LINK,
but we're Linux, so we don't, and we never implemented the functions we
declared here either.

Reported to AOSP by Jun-ya Kato.

(cherry-pick of 5056f1fad1187cd67729bb04ba72397d78256f03.)

Change-Id: Ic67f674d2221497c8166994812bb5fc7f0831066
Add the posix_memalign(3) function to bionic

The posix_memalign(3) function is very similar to the traditional
memalign(3) function, but with better error reporting and a guarantee
that the memory it allocates can be freed.  In bionic, memalign(3)
allocated memory can be freed, so posix_memalign(3) is just a wrapper
around memalign(3).

Change-Id: I62ee908aa5ba6b887d8446a00d8298d080a6a299
Merge "bionic: Update fcntl.h clean header" into ics
Merge "Avoid multiple dns lookups for the same query" into ics
Merge "Remove expired dns cache entries before removing oldest" into ics
Merge "Remove the meaningless on Linux if_dl.h header." into ics
Merge "Add the posix_memalign(3) function to bionic" into ics
Merge branch 'ics' of git://github.com/CyanogenMod/android_bionic into ics