Fix dns searchdomain use in gethostbyname.

Need to load search domain data before we attempt to use it.
This is a cherry pick of an AOSP change c11f6f0f393e472984b5ac2934e2485855a319c9.

bug:6799630

Change-Id: I4ea1131f06ffdf4037fe67f82af5a0349469b609
Upgrade to tzdata2013i.

From the release notes:

  Changes affecting near-future time stamps:

    Jordan switches back to standard time at 00:00 on December 20, 2013.
    The 2006-2011 transition schedule is planned to resume in 2014.
    (Thanks to Steffen Thorsen.)

  Changes affecting past time stamps:

    In 2004, Cuba began DST on March 28, not April 4.
    (Thanks to Steffen Thorsen.)

Bug: 13193205
Change-Id: I8f26cc50f6b571804a18ff2113b4a47a22bc56dd
Merge "Fix dns searchdomain use in gethostbyname." into klp-dev
Upgrade to tzdata2014a.

From the release notes:

  Changes affecting near-future time stamps

    Turkey begins DST on 2014-03-31, not 03-30.  (Thanks to Faruk Pasin
    for the heads-up, and to Tim Parenti for simplifying the update.)

  Changes affecting past time stamps

    Fiji ended DST on 2014-01-19 at 02:00, not the previously-scheduled
    03:00.  (Thanks to Steffen Thorsen.)

    Ukraine switched from Moscow to Eastern European time on 1990-07-01
    (not 1992-01-01), and observed DST during the entire next winter.
    (Thanks to Vladimir in Moscow via Alois Treindl.)

    In 1988 Israel observed DST from 04-10 to 09-04, not 04-09 to
    09-03.  (Thanks to Avigdor Finkelstein.)

(cherry picked from commit 159b28eb46f03cb1dae6484059e2559f1e42e208)

Bug: 13193205
Change-Id: I3d302039f7e057a97c9d307ce8d32efa056481ed
Allow overlap in resolv uid => DNS iface mapping

When multiple rules exist covering a given uid the one added most
recently will be used.

This allows us to handle the simultaneous tuns case where a new tun is
coming online for an already running VPN.

_resolv_clear_iface_for_uid_range now also takes the iface and removes
only that matching (iface, uid range) entry.

Bug: 12134439
Change-Id: I9b9cfcfae2f38c409022a8c76ccadad7e2babd78
Replace memcpy with the cortex-strings implementation

Benchmarks on a Nexus 10 have shown this implementation to be
up to 12% faster.

Change-Id: I212df99357b338221779cfba118ebfff441c9457
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Add .cfi_startproc/.cfi_endproc wrapper to memcpy

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Fix pthread_detach for already-exited threads.

This fix handles the case when pthread_detach is
called for threads which have already exited.
This is required to avoid any memory leak

Change-Id: I2bf7f41234d93b226132a4c51705f4186f4961c3
Reported-by: Paresh Nakhe <pnakhe@codeaurora.org>
Merge branch 'cm-11.0' of git://github.com/CyanogenMod/android_bionic into cm-11.0
Merge tag 'android-4.4.3_r1' into HEAD

Android 4.4.3 release 1
Merge branch 'cm-11.0' of git://github.com/CyanogenMod/android_bionic into cm-11.0
bionic: update memmove for 32 bits atomic

When src/dst are 32bits aligned, the updated memmove will guarantee
32bits atomic.

Change-Id: I21cb77451270d061b32e3e2d2fda22e7e373b7ff
Merge branch 'cm-11.0' of git://github.com/CyanogenMod/android_bionic into cm-11.0
Fix build for x86. Remove duplicate mcmchr from Android.mk. Other implemented in arch-x86/x86.mk

Change-Id: I90a562960b214dd02b015d3e2715f711907ae9e8
Merge branch 'cm-11.0' of git://github.com/CyanogenMod/android_bionic into cm-11.0
Remove the dependency on the non-uapi __kernel_nlink_t.

The kernel doesn't have an nlink_t; it just uses the equivalent of
uint32_t. We already had a usable __nlink_t in the C library, so
let's just define our nlink_t in terms of __nlink_t, which is what
__nlink_t was meant for anyway.

Note that our struct stat just follows the kernel, and doesn't refer
to nlink_t anyway.

Change-Id: I6f51188d188fab975e286d6f8945fe746200b8d4
DNS: make the same ip type DNS query as the interface address type

Since dns query happens on non-default interface, only query the
 address type that the interface has;otherwise the dns results
 might not be usable.

CRs-fixed: 694805
Change-Id: I4ce900507bf18a9f60a2971cf496aa7c930d540b
Merge branch 'cm-11.0' of git://github.com/CyanogenMod/android_bionic into cm-11.0
Merge branch 'cm-11.0' of git://github.com/CyanogenMod/android_bionic into cm-11.0
Revert "DNS: make the same ip type DNS query as the interface address type"

This reverts commit 53c2af91d6bc2e44c53aea98a06a76834e59fe09.
The reverted commit broke vpn connect.

Change-Id: I7e80dcf1fa1ba86effbe7716d50a5a08be7898ad