Commit graph

880 commits

Author SHA1 Message Date
David 'Digit' Turner
0d6bbc7af0 am dfe6eda5: Merge "libc: <stdint.h>: fix typo in INTMAX_C()/UINTMAX_C() definition"
* commit 'dfe6eda57e1e463427f941d5d71f8ccb5297d6d2':
  libc: <stdint.h>: fix typo in INTMAX_C()/UINTMAX_C() definition
2011-03-10 12:14:51 -08:00
David 'Digit' Turner
0b73dac8aa am d6722bdd: Merge "libc: <stdint.h>: Proper C++"
* commit 'd6722bdd201e2747c55ec7255db7f1d5864ccdd3':
  libc: <stdint.h>: Proper C++
2011-03-10 12:11:41 -08:00
David 'Digit' Turner
0e5411b4ba libc: <stdint.h>: fix typo in INTMAX_C()/UINTMAX_C() definition
Change-Id: I3c74269901a288c448734dd7eb442a62b9348db8
2011-03-10 20:35:17 +01:00
Paul Lind
865e3789dd [ENDIAN] Build md5 code correctly for bigendian targets
Signed-off-by: Raghu Gandham <raghu@mips.com>
2011-03-10 11:13:50 -08:00
David 'Digit' Turner
08ff1a6474 libc: <stdint.h>: Proper C++
This patch prevents the definition of various macros when <stdint.h> is
included from C++. The ISO C99 standard mentions that when this header
is included from a C++ source file, limit and constant related macros
should only be defined when asked explicitely by defining
__STDC_LIMIT_MACROS and __STD_CONSTANT_MACROS, respectively.

The <stdint.h> lacked the proper #ifdef .. #endif blocks for the
following macros:

    INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, PTRDIFF_MIN, PTRDIFF_MAX
    INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX,
    INPTR_C, UINTPR_C, PTRDIFF_C, INTMAX_C, UINTMAX_C

This is intended to fix http://code.google.com/p/android/issues/detail?id=14380
after we copy this file to development/ndk/platforms/android-3/include/

Change-Id: Ia77e0822edfaaf568ea599d7de673b310eeeaa4a
2011-03-10 18:02:01 +01:00
Mike Lockwood
00588f13d8 am 1a0775f1: am c0fc678e: linux/usb/f_accessory.h: Update USB accessory kernel header
* commit '1a0775f1ca5ed1ef9142be5d8239dc6cc500a46f':
  linux/usb/f_accessory.h: Update USB accessory kernel header
2011-03-10 07:57:17 -08:00
Mike Lockwood
1a0775f1ca am c0fc678e: linux/usb/f_accessory.h: Update USB accessory kernel header
* commit 'c0fc678e969885cf95d2dacaad647cdc3f704f6e':
  linux/usb/f_accessory.h: Update USB accessory kernel header
2011-03-10 07:52:33 -08:00
David 'Digit' Turner
dcf5164daa am 81d79f9f: am 962dcb22: am fed58049: Merge "libc: Fix PTHREAD_RWLOCK_INITIALIZER"
* commit '81d79f9fb38d9ae8a5711f5774aa5a1516f6cc26':
  libc: Fix PTHREAD_RWLOCK_INITIALIZER
  Proxy getnameinfo through netd
  Updated gcc 4.4.3 IA toolchain doesn't require the .ctors list
  Convert cname lenght before use
2011-03-10 01:59:42 -08:00
David 'Digit' Turner
81d79f9fb3 am 962dcb22: am fed58049: Merge "libc: Fix PTHREAD_RWLOCK_INITIALIZER"
* commit '962dcb22218a1a6d4ebd05e4fc4a69875d037234':
  libc: Fix PTHREAD_RWLOCK_INITIALIZER
  Proxy getnameinfo through netd
  Updated gcc 4.4.3 IA toolchain doesn't require the .ctors list
  Convert cname lenght before use
2011-03-10 01:55:35 -08:00
David 'Digit' Turner
962dcb2221 am fed58049: Merge "libc: Fix PTHREAD_RWLOCK_INITIALIZER"
* commit 'fed58049d50083e4c960d89f4bbd516a181c2d18':
  libc: Fix PTHREAD_RWLOCK_INITIALIZER
  Proxy getnameinfo through netd
  Updated gcc 4.4.3 IA toolchain doesn't require the .ctors list
  Convert cname lenght before use
2011-03-10 01:51:19 -08:00
David 'Digit' Turner
ca4462d76c libc: Fix PTHREAD_RWLOCK_INITIALIZER
The macro definition was incorrect and resulted in a compile error
when used.

Fixes http://code.google.com/p/android/issues/detail?id=15306

Change-Id: I8fa6047b63e7f56b53653774327099822c469cd1
2011-03-10 10:23:44 +01:00
Mike Lockwood
c0fc678e96 linux/usb/f_accessory.h: Update USB accessory kernel header
For bugs b/4079236, b/4073248 and b/4080288

Change-Id: I641a0fa93492c7059900f0193c722356d13eeab5
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-09 21:57:00 -05:00
Mike Lockwood
2703b7046c am 6bd73ed4: Add linux/usb/f_accessory.h header for USB accessory driver DO NOT MERGE
* commit '6bd73ed417c52ed57d5f62ea9988b6071a1efbeb':
  Add linux/usb/f_accessory.h header for USB accessory driver DO NOT MERGE
2011-03-09 13:31:58 -08:00
Elliott Hughes
8d26fbb24a Upgrade to tzdata2011c.
Affects Chile and Annette Island, Alaska.

Change-Id: Ie4985a69e803bbc7ccd30619799ee5a9fd3737ce
2011-03-07 11:54:12 -08:00
Erik Gilling
da14b0e1dd add linux/nvhdcp.h header
Change-Id: I74a1cf90bc9807002869aa9c7b5eddb065638db2
2011-03-01 14:46:11 -08:00
Mattias Falk
0ee092fb23 Convert cname lenght before use
The length of the cname is sent in big-endian
order. Thus, it has to be converted before used
in android_getaddrinfo_proxy

Change-Id: I1a0cc12780c47f7493fcf06f690515829f88c01e
2011-03-01 12:52:10 -08:00
Brad Fitzpatrick
1ed86fa491 Merge "Proxy getnameinfo through netd" 2011-02-22 07:18:56 -08:00
David Turner
5d90cb30f4 Merge "Updated gcc 4.4.3 IA toolchain doesn't require the .ctors list" 2011-02-22 07:05:32 -08:00
Mattias Falk
149f7dfe04 Proxy getnameinfo through netd
Proxy the parts of getnameinfo that utilize
the dns cache through netd.

Change-Id: I1d57c451ea6b179c34828cf57a4182b262674003
2011-02-22 08:22:16 +01:00
Mike Lockwood
6bd73ed417 Add linux/usb/f_accessory.h header for USB accessory driver DO NOT MERGE
Change-Id: I972d28065ee7e77e93699512310fcd6d5742ed0d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-21 12:35:22 -05:00
David Turner
3224c08bd7 Merge changes I8c481c89,I791406f8,I5f09cef8
* changes:
  libc: ARM: update syscalls with new script
  libc: ARM: add size info to gensyscalls
  Add function marks and size indications
2011-02-18 15:22:27 -08:00
David Turner
0999f8dcf2 Merge "Move the zoneinfo generation tool into bionic." 2011-02-18 14:53:03 -08:00
Elliott Hughes
d40e63ee47 Move the zoneinfo generation tool into bionic.
This also incorporates a bunch of changes to the previous script; this one
requires no setup, can be run from anywhere, and leaves no droppings.

Change-Id: I38f299f03e33950d2a64e9336f4ba7cb3c5cf6f0
2011-02-17 16:20:28 -08:00
Kenny Root
fb723c8749 libc: ARM: update syscalls with new script
Used the new gensyscalls.py script to update the ARM syscalls with the
BEGIN(x) and END(x) macros to give size information for the code of the
syscall. Useful for valgrind.

Change-Id: I8c481c8928401ac110fd19b087f7d67e4db39326
2011-02-17 10:47:47 -08:00
Kenny Root
f540c03bff libc: ARM: add size info to gensyscalls
Add size information to gensyscalls output for ARM syscalls with new
BEGIN(x) and END(x) macros in arch-arm/include/machine/asm.h

Change-Id: I791406f8b17abcb83b70a6d15a65a527de15d3f5
2011-02-17 10:47:20 -08:00
Kenny Root
420878c690 Add function marks and size indications
Add a macro to annotate function end and start using both ENTRY and END
for each function. This allows valgrind (and presumably other debugging
tools) to use the debug symbols to trace the functions.

Change-Id: I5f09cef8e22fb356eb6f5cee952b031e567599b6
2011-02-17 09:07:25 -08:00
Kenny Root
0233509c16 Amend previous commit with needed include
Change-Id: Idae8daaf095d90513820e05f423144ffed4ba913
2011-02-17 07:50:36 -08:00
David Turner
aac93c2370 Merge "Convert cname lenght before use" 2011-02-16 18:58:45 -08:00
Bruce Beare
48e1feaa9d Updated gcc 4.4.3 IA toolchain doesn't require the .ctors list
Change-Id: Ia840a19a45257128eccdcf25d105f500f2d90741
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-02-16 17:50:23 -08:00
Kenny Root
3a3c1853ac Use CLZ on ARMv5 and newer
Change-Id: Ia5aa6974c0343ae43fbcb91304501213048e9ec0
2011-02-16 16:40:08 -08:00
Mike Lockwood
0d06b42327 Merge "Add linux/usb/f_accessory.h header for USB accessory driver" 2011-02-16 05:57:39 -08:00
Elliott Hughes
56d90bb49a Add MODULE_LICENSE_PUBLIC_DOMAIN for the tzdata.
Change-Id: Ie3dd3daef4610f3bd4cbc60f1de854ad28189038
2011-02-15 14:12:24 -08:00
Elliott Hughes
6ac872a0ee Update to 2011b tzdata.
Change-Id: Ic8c9e9a71a52435441db1367fb40b58ae23efe1a
2011-02-15 13:29:40 -08:00
Mike Lockwood
6783f6a736 Add linux/usb/f_accessory.h header for USB accessory driver
Change-Id: Id6ffd75f855028739674c36f30d2592391d90859
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-15 09:20:21 -05:00
Mattias Falk
066ecc8f4a Convert cname lenght before use
The length of the cname is sent in big-endian
order. Thus, it has to be converted before used
in android_getaddrinfo_proxy

Change-Id: I1a0cc12780c47f7493fcf06f690515829f88c01e
2011-02-15 08:44:20 +01:00
Kenny Root
f582340a6a Fix the handle locking in stdio
Fix the handle locking in stdio to use flockfile/funlockfile
internally when and where required.  Macros in <stdio.h> are updated
to automatically call the underlying functions when the process is
threaded to obtain the necessary locking.  A private mutex is added
to protect __sglue, the internal list of FILE handles, and another
to protect the one-time initialization.  Some routines in libc that
use getc() change to use getc_unlocked() as they're either protected
by their own lock or aren't thread-safe routines anyway.

Based on OpenBSD change by guenther@openbsd.org
http://www.mail-archive.com/source-changes@cvs.openbsd.org/msg01015.html

Bug: 3446659
Change-Id: Ie82116e358c541718d6709ec45ca6796be5a007b
2011-02-14 09:32:56 -08:00
Mattias Falk
3a4910c616 Use system property to set dns cache size
Use system property ro.net.dns_cache_size to set
the size of the cache. If the system property
is not set the default cache size is defined by
CONFIG_MAX_ENTRIES.

The number of entries in the hash table will be equal
to the number of max entries allowed in the cache.

Change-Id: I77d69d7c178937fa483d0b40512483ad29232d28
2011-02-14 12:41:11 +01:00
Dmitry Shmidt
a3db183abe Update
Change-Id: I41f590dec6bfd26c36cf01601cf03502d02d29af
2011-02-11 11:49:37 -08:00
David Turner
9c2e97e9d3 am b35d80f0: am 76299d19: Merge "Remove an extra register move."
* commit 'b35d80f0b0a6d87ba20aa2de594db19a0ccf93df':
  Remove an extra register move.
2011-02-07 13:51:27 -08:00
David Turner
86ca12cfff am d7cf6382: am 8db7bcb1: Merge "Replace __atomic_XXX with GCC __sync_XXX intrinsics."
* commit 'd7cf638288f100f29f6ba733c50f12ecdb5e192b':
  Replace __atomic_XXX with GCC __sync_XXX intrinsics.
2011-02-07 13:51:25 -08:00
David Turner
761cb55ab3 am dd279aa9: am 2282ecc2: Merge "Use more optimized version of memmove"
* commit 'dd279aa99f6b6310480e28ba1e843a23f722c87e':
  Use more optimized version of memmove
2011-02-07 13:43:54 -08:00
David Turner
76299d196f Merge "Remove an extra register move." 2011-02-06 15:01:57 -08:00
David Turner
8db7bcb14f Merge "Replace __atomic_XXX with GCC __sync_XXX intrinsics." 2011-02-06 15:01:39 -08:00
David 'Digit' Turner
62e1f374d1 Merge "libc: Update auto-gen scripts" 2011-02-06 12:53:23 -08:00
Andy McFadden
4ce737f5df Added _memmove_words
Added a memmove() variant for Dalvik's System.arraycopy()
implementation.  It guarantees 16-bit or 32-bit atomicity depending
on the alignment of the arguments.

Bug 3398352

Change-Id: Ie7bd246305ef0ff8290513663327c5b81680368d
2011-02-04 14:49:49 -08:00
Brad Fitzpatrick
5b98774566 am b8175727: am 9a330512: Merge "Add time-to-live (TTL) support to resolver cache"
* commit 'b8175727c7a165076311f18c29f09bdc27d7be10':
  Add time-to-live (TTL) support to resolver cache
2011-02-03 18:07:54 -08:00
Bruce Beare
f4680b57ed Remove an extra register move.
Change-Id: I63c217b73203b44b1a2e74950b58f2ec12989cab
Author: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-02-03 12:21:04 -08:00
Bruce Beare
0f2001b147 Replace __atomic_XXX with GCC __sync_XXX intrinsics.
Change-Id: I14f275392fcd70cc15e307470e0a099777c7c09e
Author: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-02-03 12:21:03 -08:00
David 'Digit' Turner
d51564f918 Merge "libc: Fix struct user_vfp definition." 2011-02-03 10:31:27 -08:00
David 'Digit' Turner
fc2693110e libc: Update auto-gen scripts
Make the scripts use external/kernel-headers/original by default.

clean_header.py:  Document -k<path>, add -d<path>
find_headers.py:  Make kernel config files optional
update_all.py:    Allow setting the path to kernel headers on the command-line
update_all.py:    Better formatting of output on ttys
update_all.py:    Automatically perform "git add/rm" on affected files.
SYSCALLS.TXT:     Fix typo in __socketcall definition.
checksyscalls.py: Add support for superH architecture in the checks.
gensyscalls.py:   Automatically perform "git add/rm" on affected files.
cpp.py:           Fixed a bug that prevented certain type definitions to
                  be kept in the generated clean header (e.g.
                  struct ethtool_drvinfo in <linux/ethtool.h>)

All scripts will use the content of external/kernel-headers/original by default now.

The generated code removes all empty lines and trailing whitespace. This is useful
to ensure a unified output even if we change the parser again in the future.

The top-level disclaimer has been edited with update instructions to regenerate
the headers when needed.

Also, a warning is now inserted every 8th line in the final output:

/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */

Changes under kernel/arch-arm and kernel/arch-x86 should correspond to whitespace
differences and additionnal struct definitions that were missed by the previous
parser implementation.

Change-Id: Icd1c056bacd766759f3e9b7bb5d63a246f3d656a

WARNING: If you run these script, do not submit the result to gerrit for now.
         It seems there are discrepancies between the content of original headers
         and those currently commited under bionic/libc/kernel/.

         (This problem is the main motivation to insert the warning repeatedly).

         Current list of issues:

           - Missing SuperH headers (i.e. external/kernel-headers/original/asm-sh)
2011-02-03 18:07:41 +01:00
Johannes Carlsson
0f67de14e6 Use more optimized version of memmove
On ARM there is currently no assembler optimized memmove in libc.
There is however a more optimized bcopy which copies long instead
of bytes where possible. This almost doubles the performance in
best case.

Change-Id: I1f1cd27529443358047c385730deaf938ce4e642
2011-02-03 15:17:13 +01:00
David Turner
820e6867e2 Merge "Bug 3330205 Thread safety for bignum powers of 5" 2011-02-03 04:45:51 -08:00
David Turner
d1c780e5d3 Merge changes I6b304dfb,I4a3c2035,I5af12b3f,I0ef33ca6,I149c46e7
* changes:
  Add icmp6.h and ip6.h files from current NetBSD libc.
  Include the Linux ipv6.h header from netinet/in.h, to get things like in6_pktinfo.
  Add IN6ADDR_LOOPBACK_INIT macro to <netinet/in6.h>, as the kernel headers do not provide it anymore.
  Update IPv6 kernel headers with new 2.6.37 headers, cleaned by update_all.py. (It wanted to do many other changes, most of them cosmetic, but I only included the IPv6 changes.)
  Fix syntax error in defaults.py.
2011-02-03 04:44:31 -08:00
Mattias Falk
3e0c5102e6 Add time-to-live (TTL) support to resolver cache
Use the the TTL of the answer as the time a query
shall remain in the resolver cache.

Added some debugging support as well, i.e.
parse answer and print a la dig.

Change-Id: I724d3392245032592f1912f3ca7a81a8987ebbac
2011-02-02 16:40:01 +01:00
David 'Digit' Turner
30b4d82bba libc: Fix struct user_vfp definition.
This patch moves the definition of struct user_vfp from <asm/ptrace.h>
to <asm/user.h> for the ARM platform, in order to match the original
kernel headers.

See patches  94519 and 94520 for a description of the problem and a
fix for debuggerd that uses the structure.

This prevented us from properly re-running the kernel headers cleanup
scripts.

Change-Id: I43718a59ae49b9d89fc2d1c8affb65973fb2919c
2011-02-01 15:28:36 +01:00
David 'Digit' Turner
040e18f362 Merge "libc: fix kernel cleanup script typo." 2011-01-31 07:53:11 -08:00
Steinar H. Gunderson
6846a45882 Add icmp6.h and ip6.h files from current NetBSD libc.
Change-Id: I6b304dfbefaec74c5fb15b216f38d698a55f0642
2011-01-28 18:28:27 +01:00
Steinar H. Gunderson
bdca379412 Include the Linux ipv6.h header from netinet/in.h, to get things like in6_pktinfo.
Change-Id: I4a3c2035ff8e2846352345580756a1bdc2768ec4
2011-01-28 18:28:27 +01:00
Steinar H. Gunderson
3de0321690 Add IN6ADDR_LOOPBACK_INIT macro to <netinet/in6.h>, as the kernel headers do not provide it anymore.
Change-Id: I5af12b3f38097ed165e64a408253dc375aa605d7
2011-01-28 18:28:19 +01:00
David Turner
3b3944e42f am f03e2d3f: am 5d45fa40: am 2081fda6: Merge "Only look up A records if the system has IPv4." into gingerbread
* commit 'f03e2d3f3104a85d64f66a18ab13d5ba5fb4131c':
  Only look up A records if the system has IPv4.
2011-01-21 15:53:46 -08:00
David Turner
f03e2d3f31 am 5d45fa40: am 2081fda6: Merge "Only look up A records if the system has IPv4." into gingerbread
* commit '5d45fa4049d9ba03c0d922ece18d1d2dda119dc7':
  Only look up A records if the system has IPv4.
2011-01-21 15:50:23 -08:00
Colin Cross
5c6a8a6f41 am 84f4753d: am 56faf66f: raise: Send signal to current thread
* commit '84f4753d1b5f89ace0cc89021916f6f5b44e6540':
  raise: Send signal to current thread
2011-01-21 12:40:07 -08:00
Colin Cross
84f4753d1b am 56faf66f: raise: Send signal to current thread
* commit '56faf66fd7a90ea11835f8f0c9a7d6d8b350a09d':
  raise: Send signal to current thread
2011-01-21 12:36:31 -08:00
Colin Cross
56faf66fd7 raise: Send signal to current thread
Change-Id: Ie4318b8ddd01cc2f58f5e07c1d71376953943153
2011-01-21 11:39:15 -08:00
Steinar H. Gunderson
0688023af7 Update IPv6 kernel headers with new 2.6.37 headers, cleaned by update_all.py. (It wanted to do many other changes, most of them cosmetic, but I only included the IPv6 changes.)
Change-Id: I0ef33ca6d890d067949fce772104cd03335f612d
2011-01-20 06:08:40 +01:00
Steinar H. Gunderson
db7c59df6c Fix syntax error in defaults.py.
Change-Id: I149c46e7541af16856264b7f826981ce0d33290b
2011-01-20 06:08:40 +01:00
Glenn Kasten
2cc0d38afb Bug 3330205, 3362385 clock(3) SMP safety and epoch
Change-Id: Ida1e4400489c8c19818c6af5640ab89942c8f712
2011-01-19 16:14:51 -08:00
David Turner
5d45fa4049 am 2081fda6: Merge "Only look up A records if the system has IPv4." into gingerbread
* commit '2081fda69a68505c914324797400b1b798516904':
  Only look up A records if the system has IPv4.
2011-01-18 17:34:33 -08:00
David Turner
2081fda69a Merge "Only look up A records if the system has IPv4." into gingerbread 2011-01-18 17:32:02 -08:00
Steinar H. Gunderson
76b6f084ab am 2be18508: am 2e23e292: Backport (simple cherry-pick) d33019030c to gingerbread.
* commit '2be18508f349b74b60b09e1b1118d879afb5928c':
  Backport (simple cherry-pick) d33019030c to gingerbread.
2011-01-17 12:19:01 -08:00
Steinar H. Gunderson
2be18508f3 am 2e23e292: Backport (simple cherry-pick) d33019030c to gingerbread.
* commit '2e23e29245aa42d0f9419187c94e72dba3888eef':
  Backport (simple cherry-pick) d33019030c to gingerbread.
2011-01-17 12:15:45 -08:00
Steinar H. Gunderson
4eb4c932dc am f4dca7be: Backport (simple cherry-pick) 64b6c43379 to gingerbread.
* commit 'f4dca7be3b7bc181f1534be187428c5a52cb8c6a':
  Backport (simple cherry-pick) 64b6c43379 to gingerbread.
2011-01-17 12:15:44 -08:00
Steinar H. Gunderson
42e449e972 am a798b9f0: Backport (simple cherry-pick) d1624add2b to gingerbread.
* commit 'a798b9f0e171643b0bc7bbf79f14cb018689f715':
  Backport (simple cherry-pick) d1624add2b to gingerbread.
2011-01-17 12:15:41 -08:00
Glenn Kasten
144a5d3c86 Bug 3330205 Thread safety for bignum powers of 5
Change-Id: I739a06f9037a9fb643276f61601f0f3e192581b8
2011-01-17 11:32:11 -08:00
Glenn Kasten
f4e10b721e Merge "Bug 3330205 Put blanks and zeroes in const area" 2011-01-16 08:50:20 -08:00
Lorenzo Colitti
ba96e30fa0 Only look up A records if the system has IPv4.
getaddrinfo only asks DNS for IPv6 addresses if the system
has IPv6 connectivity, but always asks for IPv4 addresses.
Don't ask for IPv4 addresses if there is no IPv4
connectivity.

Change-Id: Iefe9fcb006fabe60b4b11dd4653a7c4a406506f4
2011-01-15 19:02:58 -08:00
Steinar H. Gunderson
2e23e29245 Backport (simple cherry-pick) d33019030c
to gingerbread.

Implement RFC3484 policy table changes from draft-ietf-6man-rfc3484-revise-01.

The changes in a nutshell:

 - Handle v4-mapped as different from v4-compat (this was probably
   an existing bug in our code).
 - Add policy entries for ULA, above most everything else.
 - Put v4-compat, old-style IPv6 site-local and 6bone addresses
   way down in the preference table.

The rest is just shuffling numbers around (no actual changes to
priority).
2011-01-14 21:41:18 +01:00
Steinar H. Gunderson
f4dca7be3b Backport (simple cherry-pick) 64b6c43379
to gingerbread.

Add a new #define IN6_IS_ADDR_ULA, for testing for Universal Local IPv6 Unicast addresses (ULAs). These replace the old site-local IPv6 addresses.
2011-01-14 21:40:57 +01:00
Steinar H. Gunderson
a798b9f0e1 Backport (simple cherry-pick) d1624add2b
to gingerbread.

Don't treat private IPv4 addresses as being in a non-global scope. The effect of this change is essentially to prefer NATed IPv4 over 6to4.
2011-01-14 21:40:34 +01:00
Lorenzo Colitti
f65368a693 Merge "Implement RFC3484 policy table changes from draft-ietf-6man-rfc3484-revise-01." 2011-01-14 12:12:37 -08:00
Steinar H. Gunderson
d33019030c Implement RFC3484 policy table changes from draft-ietf-6man-rfc3484-revise-01.
The changes in a nutshell:

 - Handle v4-mapped as different from v4-compat (this was probably
   an existing bug in our code).
 - Add policy entries for ULA, above most everything else.
 - Put v4-compat, old-style IPv6 site-local and 6bone addresses
   way down in the preference table.

The rest is just shuffling numbers around (no actual changes to
priority).

Change-Id: Ieb111e0edd705992bc9d066befaaee95a8c1a5df
2011-01-13 17:42:58 +01:00
David Turner
e955e6ca6c Merge "Bug 3330205 Thread safe strptime implementation" 2011-01-13 02:34:38 -08:00
Glenn Kasten
b138e4f90f Bug 3330205 Thread safe strptime implementation
Change-Id: I03e72b0253a7a2e015455ab81dbf155ed1e574d2
2011-01-11 09:33:04 -08:00
David 'Digit' Turner
b969b5a32a libc: fix kernel cleanup script typo.
Change-Id: I5fc119be535ed47dadc780234665335efa6b9ac5
2011-01-11 17:23:10 +01:00
Glenn Kasten
43164fcbdf Merge "Bug 3330205 Reentrant MD5" 2011-01-10 16:27:56 -08:00
Glenn Kasten
604085c380 Merge "Bug 3330205 Remove unnecessary static variable" 2011-01-10 16:25:47 -08:00
Glenn Kasten
a37cf34ede Bug 3330205 Reentrant MD5
Change-Id: I4c8e4a8f3ef4cdaac50f32d9e55accb16133ab35
2011-01-09 12:37:26 -08:00
Glenn Kasten
e9d0518394 Bug 3330205 Remove unnecessary static variable
Change-Id: I7e781d26d6565952712f8fb0274d336462b441fd
2011-01-09 11:47:42 -08:00
Glenn Kasten
0946b1f6e9 Bug 3330205 Put blanks and zeroes in const area
Change-Id: I8f25aebd1ded3617dc60951271767281f73b8684
2011-01-09 11:38:56 -08:00
Bruce Beare
684305fe24 am 3c56ce49: use consistent guards for off_t and size_t defines for IA
* commit '3c56ce497d1ea3baa6406c49be82c1245fda2443':
  use consistent guards for off_t and size_t defines for IA
2011-01-08 13:14:40 -08:00
Bruce Beare
e66695d083 am ce6c1d61: Simplify variable typing for IA builds
* commit 'ce6c1d6184b76bbaee65d91dd715c771fd1a4652':
  Simplify variable typing for IA builds
2011-01-08 13:14:37 -08:00
Bruce Beare
3c56ce497d use consistent guards for off_t and size_t defines for IA
Change-Id: Ie92b7597883c99e7f4101f4cf5e0ad267b4ee706
2011-01-07 11:42:54 -08:00
Bruce Beare
ce6c1d6184 Simplify variable typing for IA builds
Change-Id: I065e5176b3a15bd74ba832f8827b4a4e4837b0f7
2011-01-07 11:40:42 -08:00
Dmitry Shmidt
015610e64e Merge "Update headers for iproute2 ver 2.6.35" 2011-01-06 16:24:47 -08:00
Dmitry Shmidt
ce69c5e62f Update headers for iproute2 ver 2.6.35
Change-Id: I170cc175b52379be6f5bd1106d43692ca7a629d2
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-01-06 15:30:35 -08:00
Steinar H. Gunderson
64b6c43379 Add a new #define IN6_IS_ADDR_ULA, for testing for Universal Local IPv6 Unicast addresses (ULAs). These replace the old site-local IPv6 addresses.
Change-Id: I2656423764569d07b92b8eb8fe6dcad6eba5b0bb
2011-01-05 13:55:40 +01:00
David 'Digit' Turner
72a23d0560 Merge "libc: Fix the definition of SIGRTMAX" 2011-01-05 00:19:20 -08:00
Lorenzo Colitti
81e03be699 Merge "Don't treat private IPv4 addresses as being in a non-global scope. The effect of this change is essentially to prefer NATed IPv4 over 6to4." 2011-01-04 20:09:37 -08:00
David 'Digit' Turner
2a9b0df9e7 Merge "libc: remove obsolete sha1hash.c source file" 2011-01-04 12:30:23 -08:00
Bruce Beare
3fbd2b3f6d use consistent guards for off_t and size_t defines for IA
Change-Id: I9347ab4407c48c71c99f42583523ebe31a5e67ae
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-01-02 17:00:11 -08:00
Bruce Beare
42c701708f Simplify variable typing for IA builds
Change-Id: I3f080b34360bfade0dbd5e2d8d0365e049162e4c
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-01-02 17:00:10 -08:00
David Turner
ce13670546 am ae5df14f: Merge "Use __asm__ instead of asm in public libc headers"
* commit 'ae5df14f9349a000356cf45ec0292bc21ceb5b3a':
  Use __asm__ instead of asm in public libc headers
2010-12-31 03:03:39 -08:00
David Turner
ae5df14f93 Merge "Use __asm__ instead of asm in public libc headers" 2010-12-31 02:30:33 -08:00
Jean-Baptiste Queru
53c3e86fae am 3d302be4: Merge "android-x86: add sigsetjmp.S"
* commit '3d302be485bc2f62a889fac85e386c9b8775eb59':
  android-x86: add sigsetjmp.S
2010-12-29 11:29:33 -08:00
Jean-Baptiste Queru
3d302be485 Merge "android-x86: add sigsetjmp.S" 2010-12-29 11:01:23 -08:00
Jean-Baptiste Queru
6042658cb5 am b05aa150: Merge "Replace all occurrances of asm with __asm__ in the output headers"
* commit 'b05aa1500035d0e02d30143a0702a72b111f200e':
  Replace all occurrances of asm with __asm__ in the output headers
2010-12-28 11:35:22 -08:00
Jean-Baptiste Queru
b05aa15000 Merge "Replace all occurrances of asm with __asm__ in the output headers" 2010-12-28 11:10:31 -08:00
Chih-Wei Huang
18635d9c17 android-x86: add sigsetjmp.S
It adds two functions sigsetjmp and siglongjmp
that fix compiling errors in bluetooth and mksh.

Copy directly from sigsetjmp.S of OpenBSD.

Change-Id: I4696f82ee6f85d1c93cbdd3c9e40f4917d50f3a6
2010-12-26 09:22:13 -08:00
David Turner
4ad2f19f14 am a4f6d228: Merge "Add a method for replacing tokens in the preprocessed headers"
* commit 'a4f6d2281f979c013080e28b1f658c2ba9a8e9f3':
  Add a method for replacing tokens in the preprocessed headers
2010-12-22 11:29:30 -08:00
David 'Digit' Turner
0546fd7ee0 libc: remove obsolete sha1hash.c source file
The source file is not part of the C library build, so the Android.mk
is unaffected. In other words, this source file was never compiled.

Change-Id: Idec3d5b6ec30dc9ee38296d12dc6e522997df29a
2010-12-20 16:03:07 +01:00
David 'Digit' Turner
5c8c00a95a libc: Fix the definition of SIGRTMAX
After this change, SIGRTMAX will be set to 64 (instead of 32 currently).
Note that this doesn't change the fact that our sigset_t is still defined
as a 32-bit unsigned integer, so most functions that deal with this type
won't support real-time signals though.

Change-Id: Ie1e2f97d646f1664f05a0ac9cac4a43278c3cfa8
2010-12-20 15:58:06 +01:00
David Turner
a4f6d2281f Merge "Add a method for replacing tokens in the preprocessed headers" 2010-12-20 02:43:26 -08:00
Steinar H. Gunderson
d1624add2b Don't treat private IPv4 addresses as being in a non-global scope. The effect of this change is essentially to prefer NATed IPv4 over 6to4.
Change-Id: I53a8613ca9eb61cac0bf18f0b5f98a2d35ab9c50
2010-12-20 11:15:33 +01:00
David 'Digit' Turner
d4a65d28d4 libc: Add missing declarations in <netinet/in.h>
Add missing declarations:
  INET_ADDRSTRLEN
  IN6_IS_ADDR_MC_NODELOCAL
  IN6_IS_ADDR_MC_GLOBAL

It has been reported that these prevent compilation of the Boost libraries
with the NDK. The corresponding patch has already been performed under
development/ndk/platforms/android-3/include.

Change-Id: I4ac514973daf3c06a8ef5538d7df79142a98e562
2010-12-16 20:53:03 +01:00
David 'Digit' Turner
95d751feac libc: Add ftruncate64 and improve 64-bit parameter syscall handling.
This patch improves the handling of 64-bit parameters in syscalls on ARM.
The ARM EABI mandates that 64-bit quantities be passed in even/odd register
pairs, which requires special treatment.

This allows us to simplify our implementations of pread() and pwrite()
and remove the C stubs for pread64() and pwrite64().

Also add ftruncate64() to <unistd.h>

Change-Id: I407e2fd223ba0093dd2d0b04c6152fadfc9ce3ef

Bug 3107933
2010-12-16 17:04:41 +01:00
David 'Digit' Turner
4a7f31fad7 libc: Remove duplicate eventfd declaration from SYSCALLS.TXT
The second declaration came from an incorrect change in AOSP.
The eventfd stubs are not affected by this, they are already correct.

Change-Id: Icfc7612a68fc37a48dde2687137960a5d1dbc534
2010-12-16 14:57:31 +01:00
Bruce Beare
ff3129b0fe sigsetmask.c was not processing the "mask" argument.
Change-Id: I79b898ea5b882e8c0564e25466e827a9bedda6e8
Author: yhe19 <yunan.he@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2010-12-09 15:17:28 -08:00
Yu Shan Emily Lau
abdffc4e23 Revert "sigsetmask.c was not processing the "mask" argument."
This reverts commit 9a9c1619b8.
2010-12-09 11:57:42 -08:00
Martin Storsjo
c9205dba43 Replace all occurrances of asm with __asm__ in the output headers
asm() conflicts with userland code compiled with -std=c99, the userland
libc should only use __asm__() instead. Therefore, this transformation
has to be applied to all exported headers.

This only changes arch-arm/asm/byteorder.h.

Change-Id: I1cf88c37201c3a91668d387293a18885c316d53c
2010-12-08 11:41:37 +01:00
Martin Storsjo
d32c8052fc Add a method for replacing tokens in the preprocessed headers
Change-Id: I14cf6337945560b012732ae0fe7a247074810678
2010-12-08 11:40:59 +01:00
Martin Storsjo
5775163f04 Use __asm__ instead of asm in public libc headers
If compiling userland code with -std=c99, the current header produces an
error. The content of this header originally is a kernel internal header,
where asm() is acceptable. In a header visible to userland, this should be
__asm__ instead.

Change-Id: I4d3188dd96f7836148ca89f5053d0389dd459d6e
2010-12-08 09:40:12 +01:00
David 'Digit' Turner
6a916acce2 Merge "<sched.h>: Add sched_getcpu() and cpu_set_t" 2010-12-07 04:51:40 -08:00
David 'Digit' Turner
6451571aef Merge "<time.h>: Add timegm(), timelocal() and others." 2010-12-07 04:26:32 -08:00
David 'Digit' Turner
b338686778 Merge "libc: Add <android/api-level.h>" 2010-12-07 04:26:27 -08:00
David Turner
bd4ab138d8 am e05762a5: am 8e6435ea: Merge "Add defines for CAIF support"
* commit 'e05762a5312261b96d20597eb6c3a61abaeac2cf':
  Add defines for CAIF support
2010-12-06 16:44:46 -08:00
Jean-Baptiste Queru
5d7995be24 am b11d7c3e: am bcb0a925: Merge "sigsetmask.c was not processing the "mask" argument."
* commit 'b11d7c3eca0e5bc04c14afe82a530429f173706c':
  sigsetmask.c was not processing the "mask" argument.
2010-12-06 16:44:30 -08:00
David Turner
e05762a531 am 8e6435ea: Merge "Add defines for CAIF support"
* commit '8e6435ead5b118f1fd458d4acbdd0bf86754ab1b':
  Add defines for CAIF support
2010-12-06 13:31:43 -08:00
David Turner
8e6435ead5 Merge "Add defines for CAIF support" 2010-12-06 13:18:37 -08:00
Jean-Baptiste Queru
b11d7c3eca am bcb0a925: Merge "sigsetmask.c was not processing the "mask" argument."
* commit 'bcb0a925b0d6d545bbd9a4ebd9ac61bdacbfa2fe':
  sigsetmask.c was not processing the "mask" argument.
2010-12-06 10:55:14 -08:00
David 'Digit' Turner
72e6fd4242 <sched.h>: Add sched_getcpu() and cpu_set_t
This adds the cpu_set_t type definition and related functions
and macros used to handle CPU thread affinity.

  sched_getcpu()
  sched_setaffinity()
  sched_getaffinity()

Change-Id: If382ecafde8926341a88478062b275553645065b
2010-12-06 13:42:54 +01:00
David 'Digit' Turner
6481b91520 <time.h>: Add timegm(), timelocal() and others.
Add timegm(), timelocal(), time2posix() and posix2time() to the
C library.

Change-Id: I34d5771ed83dd994870a5ca58a511d01898b1ffb
2010-12-06 12:25:52 +01:00
David 'Digit' Turner
23d24394e7 libc: Add <android/api-level.h>
Add a new header that defines __ANDROID_API__ as a constant integer
corresponding to the current native API level. This header is included
by <sys/cdefs.h>

Change-Id: Ib4774e247b395991266245815a24292afc919848
NOTE: This header is already provided by the NDK's platform headers.
      for levels 3 to 9.
2010-12-06 12:05:11 +01:00
Bruce Beare
9a9c1619b8 sigsetmask.c was not processing the "mask" argument.
Change-Id: I79b898ea5b882e8c0564e25466e827a9bedda6e8
Author: yhe19 <yunan.he@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2010-12-03 16:48:47 -08:00
Bruce Beare
2bf3ec03c3 Add defines for CAIF support
Change-Id: I32d2e02814f1965ebdcecb804e947ff303dbe230
Author: Mark Gross <mark.gross@intel.com>
Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
2010-12-03 16:14:59 -08:00
Ed Heyl
9962cef7c6 Merge "Add mkdtemp() prototype to stdlib.h." 2010-12-02 13:20:15 -08:00
tedbo
ad1ff2fb26 Add mkdtemp() prototype to stdlib.h.
The mkdtemp() function is implemented in libc/stdio/mktemp.c but not
exposed in stdlib.h. This change adds the prototype to stdlib.h.

Change-Id: I5a98650c665d2e45b2cf6ed3382742f7bdc7c88a
2010-11-30 12:45:02 -08:00
tedbo
16e02c2e3b Add wcscasecmp() and wcsncasecmp() prototypes to wchar.h.
The above prototypes are missing from libc/include/wchar.h but
the functions are present (although with a limited implementation)
in libc.

Change-Id: I1b7c6accfc59ff0f56f3f41a9d3c075e935ac54a
2010-11-29 13:15:07 -08:00
Kenny Root
72e64e0869 Add support for pread64/pwrite64
64-bit pread() and pwrite() is needed for ZipFileRO to be able to read
ludicrously large ZIP files just in case someone is crazy enough to do
it.

Also fix a license header that was apparently mangled.

Change-Id: I6819ef8b36e46b63b40749c95717b1ecf9307033
2010-11-24 13:14:50 -08:00
Iliyan Malchev
c1974ee144 bionic: update processed kernel header tegra_audio.h
Change-Id: Idefc8cae9315f1f4f340330ee1b38a7c0acb5fd8
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-11-22 16:52:22 -08:00
Jean-Baptiste Queru
9c8ea7fa3f am 24dc9363: resolved conflicts for merge of 1bc98ccb to gingerbread-plus-aosp
* commit '24dc936346b4a31005ac28c4bd464320cca9320a':
  bionic: Add ARM optimized strcpy()
2010-11-22 13:38:44 -08:00
Jean-Baptiste Queru
24dc936346 resolved conflicts for merge of 1bc98ccb to gingerbread-plus-aosp
Change-Id: Ief9ec3d0472660e26864e082e03c26e09a043b9d
2010-11-22 13:34:59 -08:00
Jim Huang
73c04b3269 bionic: Add ARM optimized strcpy()
Reference results of the experiments on Qualcomm MSM7x25 (524MHz):

[original C code]
             prc thr   usecs/call      samples   errors cnt/samp
size
strcpy_1k      1   1     14.56159           99        0     1000
1024

[ARM optimized code]
             prc thr   usecs/call      samples   errors cnt/samp
size
strcpy_1k      1   1      3.46653           99        0     1000
1024

The work was derived from ARM Ltd.

Change-Id: I906ac53bb7a7285e14693c77d3ce8d4ed6f98bfd
2010-11-22 13:01:32 -08:00
Erik Gilling
6c57fbf7a7 update linux/tegrafb.h
Change-Id: Ib09e70b51b900447d17e9f992b0f81fd5f638677
2010-11-18 16:10:50 -08:00
Mike Lockwood
88fb10f838 Update f_mtp.h kernel header
Driver has changed to support transferring > 4 gigabyte files

Change-Id: I9ddca13e8e906a403fe84c9af27ec1fab565be77
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-11-16 17:33:50 -05:00
Dima Zavin
c343d3fcd3 kernel/linux: add tegra avp/rpc/sema headers
Change-Id: I7b8ee1e3e6a5db6a090f106d3d70f2122e12124c
Signed-off-by: Dima Zavin <dima@android.com>
2010-11-05 15:40:27 -07:00
Elliott Hughes
ff590cadc2 Use a modern chdir(2)-free realpath(3) implementation.
(This is the current OpenBSD implementation.)

Bug: 3055824, 2281992
Change-Id: Iafa8f78e8d6e44c036a547c7210a13d559b7483a
2010-11-04 17:53:06 -07:00
David Turner
fb76fd5b61 Merge "Add missing PTRACE_SETVFPREGS." 2010-11-04 03:20:31 -07:00
Doug Kwan
459436f2f6 Add missing PTRACE_SETVFPREGS.
Change-Id: I070903ea7ceb90a3ff54fbae09c0ac70a7af1e3d
2010-11-03 16:51:32 -07:00
Iliyan Malchev
bb3bcbc6dc bionic: update processed cpcap_audio.h and spi/cpcap.h headers
Change-Id: Ied7210d4f03eec3218c51cea8ee2e667d2014153
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-11-02 15:58:36 -07:00
Iliyan Malchev
8465bf90ea bionic: update processed cpcap_audio.h
Change-Id: I8c8b917268cae4ff7a79e9f60522df59f8ed499a
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-11-01 16:04:12 -07:00