Commit graph

330 commits

Author SHA1 Message Date
Nick Kralevich
a677907ee8 string.h: add __attribute__ ((pure)) to string functions
cdefs.h: Introduce the __purefunc attribute, which allows us to mark
certain functions as being "pure".

http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

  Many functions have no effects except the return value and their
  return value depends only on the parameters and/or global variables.
  Such a function can be subject to common subexpression elimination
  and loop optimization just as an arithmetic operator would be.

string.h: Mark many commently used string functions as "pure", to
allow for additional compiler optimizations.

Change-Id: I42961f90f822b6dbcbc3fd72cdbe774a7adc8785
2012-03-21 08:54:54 -07:00
Ben Cheng
21eab513e7 New additions/bug fixes required/found when porting perf.
New functions:
	tfind
	tsearch
	tdelete
	twalk
	tdestroy (GNU extension)

Bug fix: the current implementation for realpath would crash
	if the second argument (resolved_path) is NULL.

New headers:
	ar.h
	search.h

Change-Id: Ib6c1e42fc186a6d597a6e5a9692b16acaa155804
2012-03-20 12:54:55 -07:00
Ben Cheng
1a823691a2 Update kernel headers and add syscall "perf_event_open"
Change-Id: I43f12b727881df002a8524f2738586c043833bae
2012-03-13 12:28:40 -07:00
Nick Kralevich
9ec0f03a0d Add relro support
Add support for PT_GNU_RELRO. This allows the static linker to
indicate that certain regions of memory should be marked as
"read-only" after dynamic linking is complete.

See:
  * http://www.akkadia.org/drepper/nonselsec.pdf (section 6)
  * http://tk-blog.blogspot.com/2009/02/relro-not-so-well-known-memory.html

Note that this change has no effect on Android right now, because
we don't compile our code with relro enabled.

Change-Id: I6541f8775367e8558b4388f7d105b1ae6e8f046b
2012-03-05 16:44:42 -08:00
Jean-Baptiste Queru
51d22d7ea9 am afab5a70: Merge "Eliminate duplicate constants"
* commit 'afab5a703d30df613848cb30ab3ecceafd76102b':
  Eliminate duplicate constants
2012-02-29 19:08:49 -08:00
Nick Kralevich
9921947e6f Eliminate duplicate constants
include/elf.h contains basically the same values as
linux/auxvec.h. Eliminate dups.

include/sys/exec_elf.h contains basically the same
values as linux/elf.h. Eliminate dups.

Change-Id: I66b8358161bb52223bb657f8f73ba28b324f4fa3
2012-02-29 18:43:51 -08:00
Jean-Baptiste Queru
7c38f53d19 am 7f28e0b4: Merge "Clean up the remnants of SuperH support"
* commit '7f28e0b4501de7c4f8f627fd3e4be323d737ae82':
  Clean up the remnants of SuperH support
2012-02-29 15:38:55 -08:00
Jean-Baptiste Queru
7f28e0b450 Merge "Clean up the remnants of SuperH support" 2012-02-29 14:39:42 -08:00
Nick Kralevich
67e7a93844 Eliminate duplicate constants
include/elf.h contains basically the same values as
linux/auxvec.h. Eliminate dups.

include/sys/exec_elf.h contains basically the same
values as linux/elf.h. Eliminate dups.

Change-Id: I66b8358161bb52223bb657f8f73ba28b324f4fa3
2012-02-29 11:21:53 -08:00
Jean-Baptiste Queru
d6b58b03b8 am 09049311: am cfff36df: am a60ff6c5: Merge "libc: Define new symbol visibility macros"
* commit '09049311a229c427f73e3e0ac873bf344b45aaf2':
  libc: Define new symbol visibility macros
2012-02-13 14:42:48 -08:00
Jean-Baptiste Queru
cfff36df2b am a60ff6c5: Merge "libc: Define new symbol visibility macros"
* commit 'a60ff6c5b2ca76181b387d8c10aee22a2cbcf840':
  libc: Define new symbol visibility macros
2012-02-13 14:25:53 -08:00
Raghu Gandham
b69060f1ae Clean up the remnants of SuperH support 2012-02-09 15:58:46 -08:00
Glenn Kasten
f39a3fe67d Allow C++ to call fdprintf
Change-Id: I1adb7b165ab9f62eaee4e7a9108e8b461350b347
2012-02-09 10:15:45 -08:00
Jean-Baptiste Queru
25b7a16a6e Merge c4cb87f3
Change-Id: I4cc14eba43fde75a7702fdc7ad07d3d949e9c092
2012-02-01 09:46:08 -08:00
Jean-Baptiste Queru
c4cb87f367 Merge 5b892aa7
Change-Id: Ic82bc2866bdb0c93822c94281301fa127fd4bb0c
2012-02-01 07:12:13 -08:00
David 'Digit' Turner
5fbf2e0992 libc: Define new symbol visibility macros
This patch defines a few new macros that can be used to control the
visibility of symbols exported by the C library:

- ENTRY_PRIVATE() can be used in assembly sources to indicate
  that an assembler function should have "hidden" visibility, i.e.
  will never be exported by the C library's shared library.

  This is the equivalent of using __LIBC_HIDDEN__ for a C function,
  but ENTRY_PRIVATE() works like ENTRY(), and must be used with
  END() to tag the end of the function.

- __LIBC_ABI_PUBLIC__ can be used to tag a C functions as being
  part of the C library's public ABI. This is important for a
  few functions that must be exposed by the NDK to maintain
  binary compatibility.

  Once a symbol has been tagged with this macro, it shall
  *never* be removed from the library, even if it becomes
  directly unused due to implementation changes
  (e.g. __is_threaded).

- __LIBC_ABI_PRIVATE__ can be used for C functions that should
  always be exported by the C library because they are used by
  other libraries in the platform, but should not be exposed
  by the NDK. It is possible to remove such symbols from the
  implementation if all callers are also modified.

+ Add missing END() assembly macro for x86

Change-Id: Ia96236ea0dbec41d57bea634b39d246b30e5e234
2012-01-31 22:19:09 +01:00
David 'Digit' Turner
70b1668a76 remove obsolete SuperH support
We don't have a toolchain anymore, we don't have working original
kernel headers, and nobody is maintaining this so there is really
no point in keeping this here. Details of the patch:

- removed code paths from Android.mk files related to the SuperH
  architecture ("sh")

- removed libc/arch-sh, linker/arch-sh, libc/kernel/arch-sh

- simplified libc/SYSCALLS.TXT

- simplified the scripts in libc/tools/ and libc/kernel/tools

Change-Id: I26b0e1422bdc347489e4573e2fbec0e402f75560

Signed-off-by: David 'Digit' Turner <digit@android.com>
2012-01-31 20:28:23 +01:00
Jean-Baptiste Queru
73fa5fdaf9 Merge 2f80f07d
Change-Id: Iff51b8530dbee01499ba4af0ecd6ab837c8c94fb
2012-01-20 16:47:01 -08:00
Jean-Baptiste Queru
2f80f07d81 am 23f56bbb: Merge "Add extended attribute (xattr) system call wrappers to bionic."
* commit '23f56bbb6ae053996dd821f29379aea0c7166055':
  Add extended attribute (xattr) system call wrappers to bionic.
2012-01-20 11:54:47 -08:00
David 'Digit' Turner
79fcc6948d Merge "libc: remove private declarations from <time.h> and <resolv.h>" 2012-01-19 04:15:38 -08:00
Stephen Smalley
5eb686d105 Add extended attribute (xattr) system call wrappers to bionic.
The xattr system calls are required for the SE Android userspace in
order to get and set file security contexts.  In particular, libselinux
requires these calls.

Change-Id: I78f5eb3d8f3384aed0a5e7c6a6f001781d982017
2012-01-18 08:02:23 -05:00
Nick Kralevich
ea29cd5a4a Eliminate duplicate copies of constants.
sys/personality.h and linux/personality.h contain mostly
identical contents. Eliminate dups.

Change-Id: Ie786edcb5dca57af7ee5b5fdad2949369f1bc4e4
2012-01-17 17:28:42 -08:00
Nick Kralevich
d6045cba4e Don't generate sys/linux-unistd.h
linux-unistd.h was here for reference purposes, but shouldn't
have been accessible to client code. Delete it.

Change-Id: I60c264ff6ca489a48117914bdf6daa486737af8c
2012-01-17 15:56:26 -08:00
Nick Kralevich
023e5409df am 06f51ba1: am f44de270: add personality() system call.
* commit '06f51ba1af2fafeec7fdfcba5d635bd001a31b3e':
  add personality() system call.
2012-01-17 13:09:53 -08:00
Nick Kralevich
06f51ba1af am f44de270: add personality() system call.
* commit 'f44de270bba32c9b1b5eff8a34be07b10ddff238':
  add personality() system call.
2012-01-17 11:45:25 -08:00
Nick Kralevich
f44de270bb add personality() system call.
Change-Id: Ie899def8ea1d705930ed83adae1343c1353e7c57
2012-01-13 15:50:40 -08:00
David 'Digit' Turner
208898ee77 libc: remove private declarations from <time.h> and <resolv.h>
This patch is used to remove private C library declarations from the
public headers (that are exported to the NDK). It should *only* be
submitted after all other patches modifying the users of said
private functions have been submitted to the tree, to avoid
breakages.

Change-Id: I0a5e3014f8e3ac9ed8df86a5cdae506337c23252
2012-01-13 14:24:08 +01:00
David 'Digit' Turner
11f3d5a431 libc: Copy private C library declarations to private/
This patch is the first in a series that aims at cleaning up the
public C library headers (which end up being distributed with the NDK).

<resolv.h> and <time.h> contain declarations that should not be public.
They are used by other parts of the platform, but NDK applications should
not use or rely on them.

So copy them to private <bionic_time.h> and <resolv_iface.h> headers
and use a guard macro to avoid conflicts when both headers are included
at the same time.

The idea is that we're going to fix the other platform modules to
include these private headers. After this is done, we will remove the
duplicate definitions from <resolv.h> and <time.h>

Change-Id: I121c11936951c98ca7165e811126ed8a4a3a394d
2012-01-13 13:26:50 +01:00
Bruce Beare
6519c8124e am e30e9093: sreadahead: adding readahead system call into bionic libc
* commit 'e30e909363c5c706f394050d9cd00ce222caadbf':
  sreadahead: adding readahead system call into bionic libc
2012-01-03 18:37:28 -08:00
Bruce Beare
e30e909363 sreadahead: adding readahead system call into bionic libc
Add bionic libc to support readahead system call.
This is needed to enable sreadahead to work.

Change-Id: I3856e1a3833db82e6cf42fd34af7631bd40cc723
Author: Winson Yung <winson.w.yung@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2012-01-03 15:18:04 -08:00
Ken Sumrall
85aad90956 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
2011-12-14 20:55:43 -08:00
David 'Digit' Turner
de44d0b2bd Merge "libc: provide atomic operations will full barriers for NDK apps." 2011-11-22 02:10:06 -08:00
Jeff Brown
95a17848d3 Merge "Add tgkill syscall." 2011-11-21 13:13:26 -08:00
Jeff Brown
10c8ce59a4 Add tgkill syscall.
Use tgkill instead of tkill to implement pthread_kill.
This is safer in the event that the thread has already terminated
and its id has been reused by a different process.

Change-Id: Ied715e11d7eadeceead79f33db5e2b5722954ac9
2011-11-18 16:40:48 -08:00
David 'Digit' Turner
0fec6b9d88 libc: provide atomic operations will full barriers for NDK apps.
__atomic_cmpxchg and other related atomic operations did not
provide memory barriers, which can be a problem for non-platform
code that links against them when it runs on multi-core devices.

This patch does two things to fix this:

- It modifies the existing implementation of the functions
  that are exported by the C library to always provide
  full memory barriers. We need to keep them exported by
  the C library to prevent breaking existing application
  machine code.

- It also modifies <sys/atomics.h> to only export
  always-inlined versions of the functions, to ensure that
  any application code compiled against the new header will
  not rely on the platform version of the functions.

  This ensure that said machine code will run properly on
  all multi-core devices.

This is based on the GCC built-in sync primitives.

The end result should be only slightly slower than the
previous implementation.

Note that the platform code does not use these functions
at all. A previous patch completely removed their usage in
the pthread and libstdc++ code.

+ rename arch-arm/bionic/atomics_arm.S to futex_arm.S
+ rename arch-x86/bionic/atomics_x86.S to futex_x86.S
+ remove arch-x86/include/sys/atomics.h which already
  provided inlined functions to the x86 platform.

Change-Id: I752a594475090cf37fa926bb38209c2175dda539
2011-11-16 17:37:15 +01:00
David 'Digit' Turner
9831ad3ce6 libc: speed-up flockfile()/funlockfile()
For Honeycomb, we added proper file thread-safety for
all FILE* operations. However, we did implement that by
using an out-of-band hash table to map FILE* pointers
to phtread_mutex_t mutexes, because we couldn't change
the size of 'struct _sFILE' without breaking the ABI.

It turns out that our BSD-derived code already has
some support code to extend FILE* objects, so use it
instead. See libc/stdio/fileext.h

This patch gets rid of the hash table, and put the
mutex directly into the sFILE extension.

Change-Id: If1c3fe0a0a89da49c568e9a7560b7827737ff4d0
2011-11-15 13:16:42 +01:00
Mathias Agopian
bda5da074e fix prototype of dladdr
this breaks C++ source code in particular.

Change-Id: Ie06b5d31d23b5455e6950c470adc64dd5e7784df
2011-09-28 12:17:34 -07:00
Robert Greenwalt
8f88cbedc1 am e0a4b678: am cc32fbc3: Merge "Add support for a dns cache per interface"
* commit 'e0a4b67811981ab4c04c437b23c36ae42c444bce':
  Add support for a dns cache per interface
2011-06-27 14:14:07 -07:00
Robert Greenwalt
e0a4b67811 am cc32fbc3: Merge "Add support for a dns cache per interface"
* commit 'cc32fbc3050079aa020ac39afb1c84b5e72737a8':
  Add support for a dns cache per interface
2011-06-23 11:12:19 -07:00
Brian Carlstrom
a94dc678fb Merge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master
Change-Id: I795687c11ca2e8443f7c8c264e209501dab9b2c9
2011-06-22 14:34:39 -07:00
Mattias Falk
23d3e6b21b Add support for a dns cache per interface
Initial commit for dns cache per interface.
Added a type that holds a reference to a
cache and name of associated interface,
address of interface, name server(s)
associated with an interface etc.

New functions to set default interface,
address of name servers etc.

Change-Id: Ie991bc5592fd998409853d8bf77d7fe69035dac5
2011-06-08 15:39:29 +02:00
Jean-Baptiste Queru
09dc7fb1b8 am b127b1f2: Merge "libc: enable IPTOS_MINCOST, fixup gethostbyaddr() proto."
* commit 'b127b1f208e67d74a7ee94ad2bd0ffb2fed3af6b':
  libc: enable IPTOS_MINCOST, fixup gethostbyaddr() proto.
2011-06-07 13:24:04 -07:00
David 'Digit' Turner
cfaf49ddea am 4aa32153: am 2cae7967: Merge "libc: Fix prctl() declaration."
* commit '4aa321538afde20a632ed666f83f40f892505550':
  libc: Fix prctl() declaration.
2011-06-07 10:49:32 -07:00
David 'Digit' Turner
4aa321538a am 2cae7967: Merge "libc: Fix prctl() declaration."
* commit '2cae7967e6049e45eaef71207481b6f8b2456025':
  libc: Fix prctl() declaration.
2011-06-06 12:27:10 -07:00
JP Abgrall
8a51237407 libc: enable IPTOS_MINCOST, fixup gethostbyaddr() proto.
Make netinet/ip.h have IPTOS_MINCOST which matches what
  kernel/common/linux/ip.h has to say.
Fixup gethostbyaddr() 1st arg to match what man has to say.

Change-Id: Iff9647d4a46ea88b1fc32163eb69bb9b27cdf370
2011-06-02 15:28:16 -07:00
Steinar H. Gunderson
c18d76f6ec Add icmp6.h and ip6.h files from current NetBSD libc.
Change-Id: I6b304dfbefaec74c5fb15b216f38d698a55f0642
2011-06-01 11:12:38 -07:00
David 'Digit' Turner
b083bb57f5 libc: Fix prctl() declaration.
This change fixes the prctl() declaration to match GLibc, and allow us
to build gcc-4.6 for Android (among other things). Note that this does
not change the source and binary interfaces.

Change-Id: I3900c957f0da8b3548cbe9da8c41d50099dc19d6
2011-05-26 02:46:41 +02:00
JP Abgrall
f8d02d24ed libc: enable IPTOS_MINCOST, fixup gethostbyaddr() proto.
Make netinet/ip.h have IPTOS_MINCOST which matches what
  kernel/common/linux/ip.h has to say.
Fixup gethostbyaddr() 1st arg to match what man has to say.

Change-Id: Iff9647d4a46ea88b1fc32163eb69bb9b27cdf370
2011-05-18 16:53:23 -07:00
Elliott Hughes
bf018299bd Fix strerror(3) for errno 0.
Everyone else's C library says "Success". We say "Unknown error: 0", which
isn't really true.

Change-Id: I9f9054779123eda996634e5f7a277789b6805809
2011-05-13 10:54:34 -07:00
JP Abgrall
c5d8d36d4d add net/ethernet.h stub
Some externals tend to use net/ethernet.h. Most of which is in net/if_ether.h.

Change-Id: I465d18136b565e56a4bd6678238fe0afef25d913
2011-04-05 11:48:52 -07:00
David 'Digit' Turner
f5da2df126 am bfe04ea0: am 8c6b848e: am 0e47a919: Merge "libc: <sys/cdefs.h>: Fix the use of __STDC_VERSION__ from C++"
* commit 'bfe04ea0e61c6905c1f6781097bddf07f843eb25':
  libc: <sys/cdefs.h>: Fix the use of __STDC_VERSION__ from C++
2011-03-30 16:38:29 -07:00
David 'Digit' Turner
bfe04ea0e6 am 8c6b848e: am 0e47a919: Merge "libc: <sys/cdefs.h>: Fix the use of __STDC_VERSION__ from C++"
* commit '8c6b848e435b86db58179763da30008ac7d4c24a':
  libc: <sys/cdefs.h>: Fix the use of __STDC_VERSION__ from C++
2011-03-30 08:20:28 -07:00
Ken Sumrall
01d14ab429 am c913b28f: am b130f004: am ae2d5ba3: Add support for the utimensat(2) syscall to bionic.
* commit 'c913b28f20ffb147fca05fe9f8d582e0a915fa9c':
  Add support for the utimensat(2) syscall to bionic.
2011-03-24 22:35:11 -07:00
Ken Sumrall
b130f00493 am ae2d5ba3: Add support for the utimensat(2) syscall to bionic.
* commit 'ae2d5ba31412c4f382ef405000baa866f35dd736':
  Add support for the utimensat(2) syscall to bionic.
2011-03-24 22:31:40 -07:00
Ken Sumrall
ae2d5ba314 Add support for the utimensat(2) syscall to bionic.
The kernel has supported this syscall for quite some time now,
but bionic did not.  Now that there is a need for it, let's
add it to bionic.

Change-Id: Ifcef3e46f1438d79435b600c4e6063857ab16903
2011-03-24 18:18:48 -07:00
David 'Digit' Turner
8eda21baa5 libc: <sys/cdefs.h>: Fix the use of __STDC_VERSION__ from C++
See http://code.google.com/p/android/issues/detail?id=14627 for context.

Change-Id: Idb10b675667d0d6e64dcb1d382be11e45aa6f4c4
2011-03-22 14:22:32 +01:00
Dmitry Shmidt
f8e658cf6b Merge "Return back EAI_ADDRFAMILY definition needed for libnl-2.0" 2011-03-21 16:03:30 -07:00
Dmitry Shmidt
9a48b8e419 Return back EAI_ADDRFAMILY definition needed for libnl-2.0
Change-Id: I86e6ca8ad92da7a81ea4b659dd9fc9be2d6fd3c9
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-03-21 14:45:35 -07:00
satok
0b3c5c50f7 do not merge. Move property setting from libcutils to bionic.
Backport I110b653a58f3

All the other property stuff is already here.  Property setting was
only in libcutils previously to leverage a utility function / constant
or two.

Unfortunately in the process of fixing a race condition we would've
had to do break abstraction boundaries and put some libc-internal
details into libcutils so instead of that we'll just move this
into bionic.

Along with Iee1ca9b7, this now passes:

$ adb shell am instrument -w -e class android.os.SystemPropertiesTest \
  com.android.frameworks.coretests.systemproperties/android.test.InstrumentationTestRunner

  Bug: 3511230

Change-Id: I1b588db3344169621e1279ecc0b660cf4e1015d7
2011-03-15 23:06:58 -07:00
satok
ec7e8cc9dd do not merge. Move property setting from libcutils to bionic.
Backport I110b653a58f3

All the other property stuff is already here.  Property setting was
only in libcutils previously to leverage a utility function / constant
or two.

Unfortunately in the process of fixing a race condition we would've
had to do break abstraction boundaries and put some libc-internal
details into libcutils so instead of that we'll just move this
into bionic.

Along with Iee1ca9b7, this now passes:

$ adb shell am instrument -w -e class android.os.SystemPropertiesTest \
  com.android.frameworks.coretests.systemproperties/android.test.InstrumentationTestRunner

  Bug: 3511230

Change-Id: I1b588db3344169621e1279ecc0b660cf4e1015d7
2011-03-15 11:02:26 +09:00
Brad Fitzpatrick
4399df8f2e Move property setting from libcutils to bionic.
All the other property stuff is already here.  Property setting was
only in libcutils previously to leverage a utility function / constant
or two.

Unfortunately in the process of fixing a race condition we would've
had to do break abstraction boundaries and put some libc-internal
details into libcutils so instead of that we'll just move this
into bionic.

Along with Iee1ca9b7, this now passes:

$ adb shell am instrument -w -e class android.os.SystemPropertiesTest \
  com.android.frameworks.coretests.systemproperties/android.test.InstrumentationTestRunner

Bug: 3511230
Change-Id: I110b653a58f312fbe069dca59892a877ae9bc911
2011-03-14 16:53:18 -07:00
David 'Digit' Turner
8d1f2e6ffc am 638608b1: am da8ea213: Merge "libc: <stdint.h>: Don\'t make __STD_CONSTANT_MACROS available if only __STD_LIMIT_MACROS is defined."
* commit '638608b11afbd255ddbd15e739f0f638791a4305':
  libc: <stdint.h>: Don't make __STD_CONSTANT_MACROS available if only __STD_LIMIT_MACROS is defined.
2011-03-14 10:53:11 -07:00
David 'Digit' Turner
448a1b9f18 am b299039d: am e6e2ba1d: Merge "libc: <pthread.h>: Replace \'#if __cplusplus\' by \'#ifdef __cplusplus\'"
* commit 'b299039d060eb5f523c05e4f9b6934a6b897a54f':
  libc: <pthread.h>: Replace '#if __cplusplus' by '#ifdef __cplusplus'
2011-03-14 10:53:09 -07:00
David 'Digit' Turner
3134b56bb0 am 0d6bbc7a: am dfe6eda5: Merge "libc: <stdint.h>: fix typo in INTMAX_C()/UINTMAX_C() definition"
* commit '0d6bbc7af091ee05dd032492ae594c263404e4aa':
  libc: <stdint.h>: fix typo in INTMAX_C()/UINTMAX_C() definition
2011-03-11 15:40:21 -08:00
David 'Digit' Turner
b868a32df6 am 0b73dac8: am d6722bdd: Merge "libc: <stdint.h>: Proper C++"
* commit '0b73dac8aa9546c0f532c7ea5e0bf72dd029f271':
  libc: <stdint.h>: Proper C++
2011-03-11 15:40:16 -08:00
David 'Digit' Turner
da8ea213ab Merge "libc: <stdint.h>: Don't make __STD_CONSTANT_MACROS available if only __STD_LIMIT_MACROS is defined." 2011-03-11 09:32:33 -08:00
David 'Digit' Turner
847b183f63 libc: <pthread.h>: Replace '#if __cplusplus' by '#ifdef __cplusplus'
See http://code.google.com/p/android/issues/detail?id=15221

Change-Id: Ia7b6668c28737810d6c4941604c6adf232a27c61
2011-03-11 14:51:19 +01:00
David 'Digit' Turner
8b3cea6732 libc: <stdint.h>: Don't make __STD_CONSTANT_MACROS available if only __STD_LIMIT_MACROS is defined.
Change-Id: I8b0ea266eab9c6f75d8407b704953ecaef948221
2011-03-11 14:39:05 +01: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
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
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
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
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
David 'Digit' Turner
62e1f374d1 Merge "libc: Update auto-gen scripts" 2011-02-06 12:53:23 -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
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
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
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 '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
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
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
David 'Digit' Turner
8d8034eae0 am 5c485373: am d3f0638a: libc: fix typo in waitid() declaration.
Merge commit '5c485373563c1183db2ba02ec2aca695d1c87cc8'

* commit '5c485373563c1183db2ba02ec2aca695d1c87cc8':
  libc: fix typo in waitid() declaration.
2010-10-15 00:05:36 -07:00
David 'Digit' Turner
5c48537356 am d3f0638a: libc: fix typo in waitid() declaration.
Merge commit 'd3f0638aeec0b1daf4d3347386a5e441d5a4bcc4' into gingerbread-plus-aosp

* commit 'd3f0638aeec0b1daf4d3347386a5e441d5a4bcc4':
  libc: fix typo in waitid() declaration.
2010-10-13 10:28:31 -07:00
David 'Digit' Turner
d3f0638aee libc: fix typo in waitid() declaration.
The implementation file uses the correct spelling.

Change-Id: I572e336f8695a9754267c8d2e0a67b1b69bacb06
2010-10-13 15:46:55 +02:00
Jean-Baptiste Queru
168f267723 am ff7d9453: am f67e5211: Merge "Hide the symbol of helper function __libc_android_abort"
Merge commit 'ff7d94530db60cf4fe4a4c287ee8821ebdf6263a'

* commit 'ff7d94530db60cf4fe4a4c287ee8821ebdf6263a':
  Hide the symbol of helper function __libc_android_abort
2010-10-12 01:45:31 -07:00
David 'Digit' Turner
364462ea2e am 1aeeeae1: am b8d2233e: Merge "libc: tag missing functions in system headers." into gingerbread
Merge commit '1aeeeae166920f871c1e4ecd960bb92dcaef0896'

* commit '1aeeeae166920f871c1e4ecd960bb92dcaef0896':
  libc: tag missing functions in system headers.
2010-10-11 18:59:30 -07:00
Jean-Baptiste Queru
ff7d94530d am f67e5211: Merge "Hide the symbol of helper function __libc_android_abort"
Merge commit 'f67e5211e045af1b12f646448a5a35f96ba5e8f1' into gingerbread-plus-aosp

* commit 'f67e5211e045af1b12f646448a5a35f96ba5e8f1':
  Hide the symbol of helper function __libc_android_abort
2010-10-11 07:27:01 -07:00
Jean-Baptiste Queru
f67e5211e0 Merge "Hide the symbol of helper function __libc_android_abort" 2010-10-11 07:13:10 -07:00
David 'Digit' Turner
1aeeeae166 am b8d2233e: Merge "libc: tag missing functions in system headers." into gingerbread
Merge commit 'b8d2233e8abc30f33be7d7acc7f3ef6e6aabebac' into gingerbread-plus-aosp

* commit 'b8d2233e8abc30f33be7d7acc7f3ef6e6aabebac':
  libc: tag missing functions in system headers.
2010-10-11 06:11:56 -07:00
David 'Digit' Turner
bb5581ad6e libc: tag missing functions in system headers.
This matches recent changes in the NDK header.
We enclose missing functions in #if 0 .. #endif blocks
with a clear "MISSING" in comments in order to locate
them later.

Change-Id: I87b3a62e777897e75c9243360fb0a82bcc53d9fb
2010-10-09 17:56:55 +02:00
repo sync
319de1758c am 686af0b3: resolved conflicts for merge of defd1622 to gingerbread-plus-aosp
Merge commit '686af0b3a5978356be3b1a97187c765d63f11623'

* commit '686af0b3a5978356be3b1a97187c765d63f11623':
  libc: add <sys/eventfd.h> and corresponding implementations.
2010-09-28 12:48:34 -07:00
David 'Digit' Turner
2336503264 am a511f245: am 9973a564: libc: Add missing waitid() implementation.
Merge commit 'a511f245614d8e6c7700df624e13a41a084ad7e4'

* commit 'a511f245614d8e6c7700df624e13a41a084ad7e4':
  libc: Add missing waitid() implementation.
2010-09-28 12:48:32 -07:00
David 'Digit' Turner
37c4305633 am 052fbd88: am a3ae60d3: libc: Add missing fdatasync() implementation
Merge commit '052fbd88080c88b7f568612dcac7579092c2e3d9'

* commit '052fbd88080c88b7f568612dcac7579092c2e3d9':
  libc: Add missing fdatasync() implementation
2010-09-28 12:48:28 -07:00
David 'Digit' Turner
1e95e58c91 am 5b5212b4: am 307aadb8: Merge "libc: Add missing C++ guards to <pathconf.h>" into gingerbread
Merge commit '5b5212b457f7308f9d7d4011c02af71ef1cad9c4'

* commit '5b5212b457f7308f9d7d4011c02af71ef1cad9c4':
  libc: Add missing C++ guards to <pathconf.h>
2010-09-28 12:48:25 -07:00
David 'Digit' Turner
4903487555 am 5d335a1c: am 032a7135: Merge "libc: add missing O_CLOEXEC from <fcntl.h>" into gingerbread
Merge commit '5d335a1c6552f74e7da2c5f2d97f65eea8cb8c72'

* commit '5d335a1c6552f74e7da2c5f2d97f65eea8cb8c72':
  libc: add missing O_CLOEXEC from <fcntl.h>
2010-09-28 12:48:19 -07:00
David 'Digit' Turner
6f39e611f3 am 914528cd: am 223ddfcf: Merge "libc: Add missing pipe2() declaration and implementation." into gingerbread
Merge commit '914528cdc90dced0c07055d4d986e68adc8da60c'

* commit '914528cdc90dced0c07055d4d986e68adc8da60c':
  libc: Add missing pipe2() declaration and implementation.
2010-09-28 12:48:15 -07:00
David 'Digit' Turner
2172188923 am 9aac3824: am bd8d987b: libc: remove C++ comments from public headers.
Merge commit '9aac38249b579282ae8eaa630de3deaf97c4edff'

* commit '9aac38249b579282ae8eaa630de3deaf97c4edff':
  libc: remove C++ comments from public headers.
2010-09-28 12:48:07 -07:00
repo sync
686af0b3a5 resolved conflicts for merge of defd1622 to gingerbread-plus-aosp
Conflicts:
	libc/arch-arm/syscalls/eventfd.S
	libc/include/sys/eventfd.h
	libc/include/sys/linux-syscalls.h

Change-Id: I02f6e9536aa5478322240c199ff4c2f4367922d0
2010-09-28 12:23:55 +02:00
David 'Digit' Turner
a511f24561 am 9973a564: libc: Add missing waitid() implementation.
Merge commit '9973a564222b842eb7497fd6e659fe8c8c49e2b3' into gingerbread-plus-aosp

* commit '9973a564222b842eb7497fd6e659fe8c8c49e2b3':
  libc: Add missing waitid() implementation.
2010-09-28 00:22:25 -07:00
David 'Digit' Turner
defd162212 libc: add <sys/eventfd.h> and corresponding implementations.
Change-Id: Ide040884c456190226e580513099fdb8377e015b
2010-09-28 09:20:37 +02:00
David 'Digit' Turner
052fbd8808 am a3ae60d3: libc: Add missing fdatasync() implementation
Merge commit 'a3ae60d343661784e3f6f4566b276d8e6b8a06a7' into gingerbread-plus-aosp

* commit 'a3ae60d343661784e3f6f4566b276d8e6b8a06a7':
  libc: Add missing fdatasync() implementation
2010-09-28 00:19:31 -07:00
David 'Digit' Turner
9973a56422 libc: Add missing waitid() implementation.
Change-Id: I312ee608dbf9249e4886a10d45d13e3cda8a9042
2010-09-28 09:18:26 +02:00
David 'Digit' Turner
a3ae60d343 libc: Add missing fdatasync() implementation
Change-Id: I04bb655d77e414021e1f2a973329167ad76ca1c4
2010-09-28 09:17:17 +02:00
David 'Digit' Turner
5b5212b457 am 307aadb8: Merge "libc: Add missing C++ guards to <pathconf.h>" into gingerbread
Merge commit '307aadb8473744c3d946add8b3e4947ada5481aa' into gingerbread-plus-aosp

* commit '307aadb8473744c3d946add8b3e4947ada5481aa':
  libc: Add missing C++ guards to <pathconf.h>
2010-09-28 00:16:40 -07:00
David 'Digit' Turner
307aadb847 Merge "libc: Add missing C++ guards to <pathconf.h>" into gingerbread 2010-09-28 00:15:23 -07:00
David 'Digit' Turner
5d335a1c65 am 032a7135: Merge "libc: add missing O_CLOEXEC from <fcntl.h>" into gingerbread
Merge commit '032a713549c12b79b5dde6ef3dff323b7698110d' into gingerbread-plus-aosp

* commit '032a713549c12b79b5dde6ef3dff323b7698110d':
  libc: add missing O_CLOEXEC from <fcntl.h>
2010-09-28 00:13:49 -07:00
David 'Digit' Turner
914528cdc9 am 223ddfcf: Merge "libc: Add missing pipe2() declaration and implementation." into gingerbread
Merge commit '223ddfcfc4cb354641e70da31a60556248db5036' into gingerbread-plus-aosp

* commit '223ddfcfc4cb354641e70da31a60556248db5036':
  libc: Add missing pipe2() declaration and implementation.
2010-09-28 00:13:48 -07:00
David 'Digit' Turner
9aac38249b am bd8d987b: libc: remove C++ comments from public headers.
Merge commit 'bd8d987b3c3aa6d9d00cede2cb091f00bdb42204' into gingerbread-plus-aosp

* commit 'bd8d987b3c3aa6d9d00cede2cb091f00bdb42204':
  libc: remove C++ comments from public headers.
2010-09-28 00:13:43 -07:00
David 'Digit' Turner
032a713549 Merge "libc: add missing O_CLOEXEC from <fcntl.h>" into gingerbread 2010-09-28 00:12:13 -07:00
David 'Digit' Turner
223ddfcfc4 Merge "libc: Add missing pipe2() declaration and implementation." into gingerbread 2010-09-28 00:12:08 -07:00
Elliott Hughes
d285151df6 am 8120a8df: am 3cf53d1a: Fixes for the ARM-specific bswap_16, bswap_32, and bswap_64.
Merge commit '8120a8df848e6dec31ef5f00bc0b41ed95ce1310'

* commit '8120a8df848e6dec31ef5f00bc0b41ed95ce1310':
  Fixes for the ARM-specific bswap_16, bswap_32, and bswap_64.
2010-09-27 11:51:39 -07:00
Elliott Hughes
8120a8df84 am 3cf53d1a: Fixes for the ARM-specific bswap_16, bswap_32, and bswap_64.
Merge commit '3cf53d1a7814e1520df09d24b009c16f4f27db0d' into gingerbread-plus-aosp

* commit '3cf53d1a7814e1520df09d24b009c16f4f27db0d':
  Fixes for the ARM-specific bswap_16, bswap_32, and bswap_64.
2010-09-27 11:39:39 -07:00
David 'Digit' Turner
bd8d987b3c libc: remove C++ comments from public headers.
Change-Id: I4af84f912062cd2ff34711c25122fb323f20c032
2010-09-27 17:35:26 +02:00
David 'Digit' Turner
00eea3f8a0 libc: add missing O_CLOEXEC from <fcntl.h>
Change-Id: Ie7ad57898e67800a9fe92bb52589d67ec30e1cd9
2010-09-27 17:33:40 +02:00
David 'Digit' Turner
275cd48511 libc: Add missing pipe2() declaration and implementation.
Change-Id: Iacb914bd6ac5adc60c5671e6fef680ede21f9b0c
2010-09-27 17:33:08 +02:00
David 'Digit' Turner
f33a7700a5 libc: Add missing C++ guards to <pathconf.h>
Change-Id: I94dad48678181d8b02431b1c1f5d507beafb5406
2010-09-27 17:27:14 +02:00
Jim Huang
9d16a79b18 Hide the symbol of helper function __libc_android_abort
Ideally __libc_android_abort would be static, but it could not be
because gcc would not allow calling a static function from an asm
statement.  Instead, using GCC visibility is work around.

Change-Id: Ifff6b9957ca3f0fc03c75c3e42582a48d43cefa2
2010-09-27 22:20:59 +08:00
Elliott Hughes
3cf53d1a78 Fixes for the ARM-specific bswap_16, bswap_32, and bswap_64.
1. Make the feature test work by excluding known-deficient processors, so
we don't have to maintain a complete list of all the processors that support
REV and REV16.

2. Don't abuse 'register' to get an effect similar to GCC's +l constraint,
but which was unnecessarily restrictive.

3. Fix __swap64md so _x isn't clobbered, breaking 64-bit swaps.

4. Make <byteswap.h> (which declars bswap_16 and friends) use <endian.h>
rather than <sys/endian.h>, so we get the machine-dependent implementations.

Change-Id: I6a38fad7a9fbe394aff141489617eb3883e1e944
2010-09-26 11:26:53 -07:00
Keith Deacon
8f670c8e41 am d7b156d2: am 3a1bbee3: Add eventfd system call support
Merge commit 'd7b156d2a38e58ab1e5f9e6a4b420588aeb78b46'

* commit 'd7b156d2a38e58ab1e5f9e6a4b420588aeb78b46':
  Add eventfd system call support
2010-09-08 03:10:44 -07:00
Keith Deacon
d7b156d2a3 am 3a1bbee3: Add eventfd system call support
Merge commit '3a1bbee36b773862e88c6f1895b607c0cd81b499' into gingerbread-plus-aosp

* commit '3a1bbee36b773862e88c6f1895b607c0cd81b499':
  Add eventfd system call support
2010-09-08 03:06:26 -07:00
Keith Deacon
3a1bbee36b Add eventfd system call support 2010-08-31 16:16:01 -05:00
Szymon Jakubczak
75a3689b69 am 41e533af: added missing ether_aton and ether_ntoa
Merge commit '41e533af4a2720c1dc228ba40b6582ca53085c3a'

* commit '41e533af4a2720c1dc228ba40b6582ca53085c3a':
  added missing ether_aton and ether_ntoa
2010-08-25 09:56:25 -07:00
Szymon Jakubczak
41e533af4a added missing ether_aton and ether_ntoa
Change-Id: I32ee448abde4d5693d393030ed77ddc6d2ad1dfc
2010-08-25 08:46:23 -07:00
Jean-Baptiste Queru
076bc8f92d am 3871d57b: Revert "added missing ether_aton and ether_ntoa"
Merge commit '3871d57ba581236142c9bf2f8be2d34cce7c5829'

* commit '3871d57ba581236142c9bf2f8be2d34cce7c5829':
  Revert "added missing ether_aton and ether_ntoa"
2010-08-18 13:31:49 -07:00
Jean-Baptiste Queru
3871d57ba5 Revert "added missing ether_aton and ether_ntoa"
This reverts commit 4032c1e2df.
2010-08-18 11:15:39 -07:00
Jeff Hamilton
2304a0bf86 Fix pwrite to take a const void* instead of void* for the buffer.
Change-Id: I10b315946b8f8f7e34825410dfef37e0220edbee
2010-08-11 11:28:26 -05:00
Dima Zavin
63673645c4 libc: make lseek64 proto be glibc compatible (loff_t -> off64_t)
Change-Id: Ib79b99be9ca8d4b1f95ceeba416b6abc04187c3c
Signed-off-by: Dima Zavin <dima@android.com>
2010-08-06 11:47:29 -07:00
Dima Zavin
91af9e64b5 am 18c5bcc6: Revert "Set SA_RESTORER in sigaction()"
Merge commit '18c5bcc66a9a7b2178dcdcf04a0716958798ab81' into gingerbread-plus-aosp

* commit '18c5bcc66a9a7b2178dcdcf04a0716958798ab81':
  Revert "Set SA_RESTORER in sigaction()"
2010-07-30 14:19:08 -07:00
Dima Zavin
18c5bcc66a Revert "Set SA_RESTORER in sigaction()"
This reverts commit e4fa46e75c.
2010-07-29 19:12:04 -07:00
Jean-Baptiste Queru
6d4d8cb79c resolved conflicts for merge of 4f086aeb to gingerbread-plus-aosp
Change-Id: Ice2a6d41a7e9d04eca02e15ed189d648d61b5801
2010-07-23 13:53:19 -07:00
Matt Fischer
4f086aeb4a Implemented pthread_atfork()
Change-Id: Ie6c0bf593315d3507b3c4a6c8903a74a1fa053db
2010-07-23 13:10:16 -07:00
David 'Digit' Turner
7ab9c068aa am ab8b5410: libc: fix fstatfs() implementation.
Merge commit 'ab8b54101eed0a4b92ebf8fa6994cd1b4f22d8f4' into gingerbread-plus-aosp

* commit 'ab8b54101eed0a4b92ebf8fa6994cd1b4f22d8f4':
  libc: fix fstatfs() implementation.
2010-07-08 17:22:08 -07:00
David 'Digit' Turner
ab8b54101e libc: fix fstatfs() implementation.
The syscall expects the size of the buffer as the second argument.

Change-Id: I99ede2fec7fcd385ca03ff022c2cffa4297bea8d
2010-07-08 16:52:27 -07:00
David 'Digit' Turner
cb0f5ed811 am 50ace4fe: Remove compiler warnings when building Bionic.
Merge commit '50ace4fec5e8cb5afcbc656a4556fa528adfd760' into gingerbread-plus-aosp

* commit '50ace4fec5e8cb5afcbc656a4556fa528adfd760':
  Remove compiler warnings when building Bionic.
2010-06-23 11:17:07 -07:00
David 'Digit' Turner
50ace4fec5 Remove compiler warnings when building Bionic.
Also add missing declarations to misc. functions.
Fix clearerr() implementation (previous was broken).
Handle feature test macros like _POSIX_C_SOURCE properly.

Change-Id: Icdc973a6b9d550a166fc2545f727ea837fe800c4
2010-06-22 17:51:41 -07:00
David 'Digit' Turner
f201ae83fc am 6a09cfd9: Merge "wchar.h: improve wchar_t support in Bionic" into kraken
Merge commit '6a09cfd9f916e3a60de707ff0806cdeb143d77a4' into gingerbread-plus-aosp

* commit '6a09cfd9f916e3a60de707ff0806cdeb143d77a4':
  wchar.h: improve wchar_t support in Bionic
2010-06-15 07:07:44 -07:00
David 'Digit' Turner
3527fd6f0d wchar.h: improve wchar_t support in Bionic
Change-Id: Iffd41046fd0933c66542abf7627a1569522dfcb2
2010-06-15 07:04:41 -07:00
The Android Open Source Project
49b53c0b94 merge from froyo-plus-aosp
Change-Id: Ibbde24d8ee26259f3eff076ee4d32476f868db85
2010-06-14 11:18:38 -07:00
The Android Open Source Project
04ed4a1c88 merge from open-source master
Change-Id: I63e2bfcf87d190fb063c5b2457ebe6b0d50ddd26
2010-06-14 10:49:00 -07:00
Szymon Jakubczak
4032c1e2df added missing ether_aton and ether_ntoa
Change-Id: I32ee448abde4d5693d393030ed77ddc6d2ad1dfc
2010-06-11 20:48:40 -04:00
David 'Digit' Turner
da3019b553 libc: add missing truncate() declaration
Change-Id: Icb3601bbc9365b75b05ff443a39192f9cd3cbfb7
2010-06-11 14:40:02 -07:00
David 'Digit' Turner
ecb6d41334 libc: Add missing <termio.h> header
Change-Id: Id4e020ed330b3eabf09324f9b6d44d3a0f336d87
2010-06-11 14:39:39 -07:00