OSDN Git Service

android-x86/bionic.git
13 years agoReplace all occurrances of asm with __asm__ in the output headers
Martin Storsjo [Wed, 8 Dec 2010 10:39:05 +0000 (11:39 +0100)]
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

13 years agoAdd a method for replacing tokens in the preprocessed headers
Martin Storsjo [Wed, 8 Dec 2010 10:38:14 +0000 (11:38 +0100)]
Add a method for replacing tokens in the preprocessed headers

Change-Id: I14cf6337945560b012732ae0fe7a247074810678

13 years agoMerge "bionic: Add ARM optimized strcpy()"
Jean-Baptiste Queru [Mon, 22 Nov 2010 21:02:25 +0000 (13:02 -0800)]
Merge "bionic: Add ARM optimized strcpy()"

13 years agobionic: Add ARM optimized strcpy()
Jim Huang [Tue, 10 Aug 2010 09:23:39 +0000 (17:23 +0800)]
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

13 years agoMerge "Bionic: Aliasing problems with frexpf"
Jean-Baptiste Queru [Thu, 18 Nov 2010 02:15:58 +0000 (18:15 -0800)]
Merge "Bionic: Aliasing problems with frexpf"

13 years agoBionic: Aliasing problems with frexpf
Rodrigo Obregon [Fri, 5 Nov 2010 17:15:26 +0000 (12:15 -0500)]
Bionic: Aliasing problems with frexpf

This patch fixes a known bug in bionic libm
due to aliasing issues in gcc 4.2 and 4.4; more
specifically in frexpf.

The function frexpf is used to extract the
mantissa and exponent from a double precision number.

The bug has already been reported here:
https://code.google.com/p/android/issues/detail?id=6697

Change-Id: I2e1f2e0a45906642d2225b9d150ed391d2bf331c
Signed-off-by: Rodrigo Obregon <robregon@ti.com>
13 years agoMerge "Remove duplicated _rand48 implementation. Use stdlib version instead"
Jean-Baptiste Queru [Mon, 25 Oct 2010 23:28:03 +0000 (16:28 -0700)]
Merge "Remove duplicated _rand48 implementation. Use stdlib version instead"

13 years agoRemove duplicated _rand48 implementation. Use stdlib version instead
Jim Huang [Mon, 27 Sep 2010 14:42:28 +0000 (22:42 +0800)]
Remove duplicated _rand48 implementation. Use stdlib version instead

Originally, there are _rand48 (in libc/bionic/_rand48.c) and __rand48
(in libc/stdlib/_rand48.c) implemented in bionic.  Besides the naming,
the functionality is identical.  This patch removes the duplicated
_rand48.  Also, drand48 and erand48 are modified accordingly.

Change-Id: Ie5761a0a97f45df8538222a77edacb7c3e0125d7

13 years agoMerge "resolv: make internal symbols static/hidden"
Jean-Baptiste Queru [Thu, 21 Oct 2010 01:55:52 +0000 (18:55 -0700)]
Merge "resolv: make internal symbols static/hidden"

13 years agoMerge "time64: make helper functions static"
Jean-Baptiste Queru [Thu, 21 Oct 2010 01:54:17 +0000 (18:54 -0700)]
Merge "time64: make helper functions static"

13 years agoMerge "bionic: stubs: Make internal symbol static"
Jean-Baptiste Queru [Thu, 21 Oct 2010 01:52:10 +0000 (18:52 -0700)]
Merge "bionic: stubs: Make internal symbol static"

13 years agoMerge "pthread-timers: Hide internal symbol __timer_table_start_stop"
Jean-Baptiste Queru [Thu, 21 Oct 2010 01:49:51 +0000 (18:49 -0700)]
Merge "pthread-timers: Hide internal symbol __timer_table_start_stop"

13 years agoMerge "stdlib: strtod: Hide internal symbol __dtoa"
Jean-Baptiste Queru [Tue, 19 Oct 2010 22:02:44 +0000 (15:02 -0700)]
Merge "stdlib: strtod: Hide internal symbol __dtoa"

13 years agoMerge "stdio: make internal symbols static/hidden"
Jean-Baptiste Queru [Tue, 19 Oct 2010 21:58:11 +0000 (14:58 -0700)]
Merge "stdio: make internal symbols static/hidden"

13 years agoMerge "__set_errno: Hide internal symbol __set_syscall_errno"
Jean-Baptiste Queru [Tue, 19 Oct 2010 21:53:28 +0000 (14:53 -0700)]
Merge "__set_errno: Hide internal symbol __set_syscall_errno"

13 years agoMerge "Reconcile assembly-only macros in <machine/cpu-features.h>"
Jean-Baptiste Queru [Tue, 19 Oct 2010 21:49:28 +0000 (14:49 -0700)]
Merge "Reconcile assembly-only macros in <machine/cpu-features.h>"

13 years agoMerge "Update ATOM string routines to latest"
Jean-Baptiste Queru [Fri, 15 Oct 2010 16:38:46 +0000 (09:38 -0700)]
Merge "Update ATOM string routines to latest"

13 years ago__set_errno: Hide internal symbol __set_syscall_errno
Jim Huang [Thu, 14 Oct 2010 19:05:25 +0000 (03:05 +0800)]
__set_errno: Hide internal symbol __set_syscall_errno

Change-Id: I21e7ef6bf0bca288069275add43bd53294c0760d

13 years agopthread-timers: Hide internal symbol __timer_table_start_stop
Jim Huang [Thu, 14 Oct 2010 18:27:50 +0000 (02:27 +0800)]
pthread-timers: Hide internal symbol __timer_table_start_stop

Change-Id: If99c5816fe6fa9107aa6bef4697048fabf92283f

13 years agobionic: stubs: Make internal symbol static
Jim Huang [Thu, 14 Oct 2010 18:21:14 +0000 (02:21 +0800)]
bionic: stubs: Make internal symbol static

Thread-specific state for the stubs functions should not be exposed to
applications.

Change-Id: I4d35dab6009dab8db7781671ac5cc9b5f6904e84

13 years agotime64: make helper functions static
Jim Huang [Thu, 14 Oct 2010 18:15:54 +0000 (02:15 +0800)]
time64: make helper functions static

Change-Id: I98d9a5f736482e52904228c171a1bdefd2f5b213

13 years agoresolv: make internal symbols static/hidden
Jim Huang [Thu, 14 Oct 2010 18:02:57 +0000 (02:02 +0800)]
resolv: make internal symbols static/hidden

Change-Id: I988b83613e6252c0cc961555e81c10f856a38b37

13 years agostdlib: strtod: Hide internal symbol __dtoa
Jim Huang [Thu, 14 Oct 2010 17:35:08 +0000 (01:35 +0800)]
stdlib: strtod: Hide internal symbol __dtoa

Change-Id: Iaaec7ea4d04c859fe98ad3331fd71e7d000c826b

13 years agostdio: make internal symbols static/hidden
Jim Huang [Thu, 14 Oct 2010 16:50:45 +0000 (00:50 +0800)]
stdio: make internal symbols static/hidden

Although header libc/stdio/local.h declares the macros and private
variables of stdio, there are several internal symbols exposed
unexpectedly.

Change-Id: Ie7a07f85b70322fb9cd05b3c8e1bcc416061eb4b

13 years agoUpdate ATOM string routines to latest
Bruce Beare [Mon, 11 Oct 2010 19:24:41 +0000 (12:24 -0700)]
Update ATOM string routines to latest

Change-Id: I22a600e7f172681cfd38ff73a64e3fd07b284959
Signed-off-by: Lu, Hongjiu <hongjiu.lu@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
13 years agoMerge "Hide the symbol of helper function __libc_android_abort"
Jean-Baptiste Queru [Mon, 11 Oct 2010 14:13:10 +0000 (07:13 -0700)]
Merge "Hide the symbol of helper function __libc_android_abort"

13 years agoMerge "gethnamaddr: make helper functions static"
Jean-Baptiste Queru [Mon, 11 Oct 2010 01:00:51 +0000 (18:00 -0700)]
Merge "gethnamaddr: make helper functions static"

13 years agoReconcile assembly-only macros in <machine/cpu-features.h>
Jim Huang [Fri, 1 Oct 2010 08:39:08 +0000 (16:39 +0800)]
Reconcile assembly-only macros in <machine/cpu-features.h>

The change explicitly isolates the assembly-only macros in header
<machine/cpu-features.h> in order to prevent mis-inclusion in C/C++
source files.

Change-Id: I0258e87c5ac3fd24944fb227290ac3b9cac4bfba

13 years agogethnamaddr: make helper functions static
Jim Huang [Mon, 27 Sep 2010 15:37:10 +0000 (23:37 +0800)]
gethnamaddr: make helper functions static

In order not to conflict with the symbols defined in file
libc/netbsd/getaddrinfo.c, this patch makes the internal/helper
functions static.

Change-Id: I0f85599e0b4ce0a637d005ff1680e1805dec4380

13 years agoHide the symbol of helper function __libc_android_abort
Jim Huang [Mon, 27 Sep 2010 11:23:06 +0000 (19:23 +0800)]
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

13 years agoFixes for the ARM-specific bswap_16, bswap_32, and bswap_64.
Elliott Hughes [Sat, 25 Sep 2010 00:55:58 +0000 (17:55 -0700)]
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

13 years agoMerge "Use ARMv6 instruction for handling byte order"
Jean-Baptiste Queru [Fri, 10 Sep 2010 23:02:59 +0000 (16:02 -0700)]
Merge "Use ARMv6 instruction for handling byte order"

13 years agoMerge "Move the atom optimization flags into TARGET_linux-x86.mk."
Jean-Baptiste Queru [Thu, 9 Sep 2010 21:09:41 +0000 (14:09 -0700)]
Merge "Move the atom optimization flags into TARGET_linux-x86.mk."

13 years agoAdd eventfd system call support
Keith Deacon [Tue, 31 Aug 2010 21:16:01 +0000 (16:16 -0500)]
Add eventfd system call support

13 years agoUse ARMv6 instruction for handling byte order
Jim Huang [Tue, 31 Aug 2010 06:51:44 +0000 (14:51 +0800)]
Use ARMv6 instruction for handling byte order

ARMv6 ISA has several instructions to handle data in different byte order.
For endian conversion (byte swapping) of single data words, it might be a
good idea to use the REV/REV16 instruction simply.

Change-Id: Ic4a5ed6254e082763e54aa70d428f59a0088636e

14 years agobionic: Rename _ARM_HAVE_LDREX_STREX to __ARM_HAVE_LDREX_STREX for consistency
Jim Huang [Sun, 8 Aug 2010 21:35:11 +0000 (05:35 +0800)]
bionic: Rename _ARM_HAVE_LDREX_STREX to __ARM_HAVE_LDREX_STREX for consistency

The patch follows the naming manner in existing macros with prefix
__ARM_HAVE.

Change-Id: I6763ce2bf3ee85fd1da112c719543061d8d19bf4

14 years agoMove the atom optimization flags into TARGET_linux-x86.mk.
Chih-Wei Huang [Mon, 26 Jul 2010 03:29:08 +0000 (11:29 +0800)]
Move the atom optimization flags into TARGET_linux-x86.mk.

Setting libc_crt_target_cflags to be non-recursive is necessary.

Change-Id: I5310d86e705f23da126c21ecb33a97a074da584a

14 years agoImplemented pthread_atfork()
Matt Fischer [Fri, 25 Jun 2010 19:36:39 +0000 (14:36 -0500)]
Implemented pthread_atfork()

Change-Id: Ie6c0bf593315d3507b3c4a6c8903a74a1fa053db

14 years agoAdd kernel header file ipv6_route.h in bionic.
Banavathu, Srinivas Naik [Tue, 29 Jun 2010 18:57:29 +0000 (11:57 -0700)]
Add kernel header file ipv6_route.h in bionic.

The header file is needed to add route to an IPv6 host from user space

Change-Id: I25c8a8d8e48013f127542199bc027f976b9672c1

14 years agoMerge "Fix undefined reference to dl_iterate_phdr for x86"
Jean-Baptiste Queru [Fri, 16 Jul 2010 14:17:48 +0000 (07:17 -0700)]
Merge "Fix undefined reference to dl_iterate_phdr for x86"

14 years agoMerge "Change-Id: I68cc462aeb2460345a53bdb9941ce4bfc10456fb bionic: fix clearenv...
Jean-Baptiste Queru [Thu, 8 Jul 2010 22:38:13 +0000 (15:38 -0700)]
Merge "Change-Id: I68cc462aeb2460345a53bdb9941ce4bfc10456fb bionic: fix clearenv() compiler warning and related comment typos"

14 years agoFix undefined reference to dl_iterate_phdr for x86
Bruce Beare [Thu, 8 Jul 2010 21:47:50 +0000 (14:47 -0700)]
Fix undefined reference to dl_iterate_phdr for x86

Change-Id: I22410b27939e8f54da932d7a1104102550c4685f
Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
14 years agoFix missing NL
Bruce Beare [Fri, 25 Jun 2010 16:02:10 +0000 (09:02 -0700)]
Fix missing NL

Change-Id: Ic210fe9f740b9a8235a66d479ad4eddc869998bb
Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
14 years agoMerge "Regenerate linux/netfilter_ipv6/ip6_tables.h."
Jean-Baptiste Queru [Fri, 2 Jul 2010 17:34:04 +0000 (10:34 -0700)]
Merge "Regenerate linux/netfilter_ipv6/ip6_tables.h."

14 years agoAllow dlclose() to properly call static C++ destructors.
David 'Digit' Turner [Fri, 2 Jul 2010 06:09:28 +0000 (23:09 -0700)]
Allow dlclose() to properly call static C++ destructors.

With this patch _and_ an upcoming build/ patch, the destruction
of static C++ objects contained in shared libraries will happen
properly when dlclose() is called.

Note that this change introduces crtbegin_so.S and crtend_so.S which
are currently ignored by the build system.

+ move definition of __dso_handle to the right place
(before that, all shared libraries used the __dso_handle
global variable from the C library).

Note that we keep a 'weak' __dso_handle in aeabi.c to avoid
breaking the build until the next patch to build/core/combo/
appears. We will be able to remove that later.

+ move bionic/aeabi.c to arch-arm/bionic/ (its proper location)

NOTE: The NDK will need to be modified to enable this feature in
         the shared libraries that are generated through it.

Change-Id: I99cd801375bbaef0581175893d1aa0943211b9bc

14 years agoRegenerate linux/netfilter_ipv6/ip6_tables.h.
Vilmos Nebehaj [Mon, 28 Jun 2010 13:13:23 +0000 (15:13 +0200)]
Regenerate linux/netfilter_ipv6/ip6_tables.h.

Add ip6t_get_target() to kernel_known_generic_statics in
libc/kernel/tools/defaults.py to be able to build ip6tables.

Change-Id: Iadb885db3faa85b2d0070dc2e0ac493af6e62bb6

14 years agoChange-Id: I68cc462aeb2460345a53bdb9941ce4bfc10456fb
Chris Peterson [Mon, 28 Jun 2010 03:53:04 +0000 (20:53 -0700)]
Change-Id: I68cc462aeb2460345a53bdb9941ce4bfc10456fb
bionic: fix clearenv() compiler warning and related comment typos

14 years agomerge from open-source master
The Android Open Source Project [Fri, 18 Jun 2010 18:33:00 +0000 (11:33 -0700)]
merge from open-source master

Change-Id: I408b5705b18d9e93e66bfbfeec0e3baefd618dec

14 years agoMerge "Fix for incorrect reply from sysconf(_SC_NPROCESSORS_ONLN)"
David Turner [Thu, 17 Jun 2010 00:36:32 +0000 (17:36 -0700)]
Merge "Fix for incorrect reply from sysconf(_SC_NPROCESSORS_ONLN)"

14 years agoFix for incorrect reply from sysconf(_SC_NPROCESSORS_ONLN)
Mikael Ohlson [Fri, 21 May 2010 09:20:39 +0000 (11:20 +0200)]
Fix for incorrect reply from sysconf(_SC_NPROCESSORS_ONLN)

When calling sysconf with _SC_NPROCESSORS_ONLN, the value one (1) was
returned on systems with two or more cores, since '/proc/stat' was
incorrectly parsed.

The function line_parser_getc (LineParser* p) read 128 characters of
input for each invocation.

The proper and probably aimed for behavior is to read 128 characters
at the first call, then for each subsequent call only return the next
buffered character until a new read is needed and only then read
another 128 characters.

Due to a flipped comparison between the two variables in_len and
in_pos that track the number of bytes of data read into the input
buffer and how much of it has been parsed, a new group of 128
characters were read at almost every call to line_parser_getc,
overwriting the still unhandled bytes from the previous call to
read. This caused the lines to be read to be sampled more than parsed.

Change-Id: I93eec3c8c9b9f19ef798748579d0977111b5c0bb

Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
14 years agomerge from open-source master
The Android Open Source Project [Mon, 14 Jun 2010 17:49:00 +0000 (10:49 -0700)]
merge from open-source master

Change-Id: I63e2bfcf87d190fb063c5b2457ebe6b0d50ddd26

14 years agoadded missing ether_aton and ether_ntoa
Szymon Jakubczak [Wed, 9 Jun 2010 19:53:28 +0000 (15:53 -0400)]
added missing ether_aton and ether_ntoa

Change-Id: I32ee448abde4d5693d393030ed77ddc6d2ad1dfc

14 years agomerge from open-source master
The Android Open Source Project [Mon, 7 Jun 2010 18:01:49 +0000 (11:01 -0700)]
merge from open-source master

Change-Id: I1cc2f1123a296b05c4faaa419374376395e05936

14 years agoMerge "Add missing termios defns to bring on par with ARM"
David Turner [Sat, 5 Jun 2010 20:07:40 +0000 (13:07 -0700)]
Merge "Add missing termios defns to bring on par with ARM"

14 years agoAdd missing termios defns to bring on par with ARM
Bruce Beare [Fri, 4 Jun 2010 15:14:44 +0000 (08:14 -0700)]
Add missing termios defns to bring on par with ARM

Change-Id: Ied1871aa0a2e33473b89a4ac6d54e3c44be7f457

14 years agomerge from open-source master
The Android Open Source Project [Thu, 3 Jun 2010 21:39:20 +0000 (14:39 -0700)]
merge from open-source master

Change-Id: Ib7fc9c6f79f9b13e2175da137005d8968ea85eaf

14 years agoMerge "pthread: introduce pthread_setname_np() as a mean to give names to threads"
David Turner [Thu, 3 Jun 2010 20:11:52 +0000 (13:11 -0700)]
Merge "pthread: introduce pthread_setname_np() as a mean to give names to threads"

14 years agopthread: introduce pthread_setname_np() as a mean to give names to threads
André Goddard Rosa [Thu, 20 May 2010 02:17:16 +0000 (23:17 -0300)]
pthread: introduce pthread_setname_np() as a mean to give names to threads

... so that each cloned process at the kernel level can be named
independently. Tools like 'top' can display the CPU/memory statistics
for each process's thread if "Show Threads" mode is on.

With this function in place, we can convert dalvik/Thread.c setThreadName()
function over this function. This feature ought to be provided by the
underlying C library and not coded directly in Dalvik.

Change-Id: Ifa997665dbaa114e0b126f8c667708be9a4137fd
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
14 years agomerge from open-source master
The Android Open Source Project [Mon, 17 May 2010 17:22:35 +0000 (10:22 -0700)]
merge from open-source master

Change-Id: I5804d8850f2d4fb7b5d5c53d51e153f7ced9646e

14 years agoimprove readability of stdio: fix indentation and remove trailing spaces
André Goddard Rosa [Sun, 31 Jan 2010 00:46:25 +0000 (22:46 -0200)]
improve readability of stdio: fix indentation and remove trailing spaces

Change-Id: Ic51e58a7c75d20bf770dc0ebd7f97a338fbe0036
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
14 years agomerge from open-source master
The Android Open Source Project [Fri, 14 May 2010 20:30:10 +0000 (13:30 -0700)]
merge from open-source master

Change-Id: I9c926a3cd680a96ece026cdec71c6e0fb0b7ad7c

14 years agoMerge "Add declaration for sys_signame[] forgotten in change 12489"
David Turner [Fri, 14 May 2010 19:12:24 +0000 (12:12 -0700)]
Merge "Add declaration for sys_signame[] forgotten in change 12489"

14 years agomerge from open-source master
The Android Open Source Project [Thu, 13 May 2010 21:31:02 +0000 (14:31 -0700)]
merge from open-source master

Change-Id: I2be62bce462ee53fe9519f433523bd7a44a73d40

14 years agoSet SA_RESTORER in sigaction()
Matt Fischer [Mon, 11 Jan 2010 02:02:06 +0000 (10:02 +0800)]
Set SA_RESTORER in sigaction()

GDB looks for specific opcode sequences when trying to recognize a stack
frame as a signal trampoline.  The sequences it looks for happen to be those
created when SA_RESTORER is set, since glibc always sets a restorer.  This
patch does the same here, so that the trampolines can be correctly identified.

Change-Id: I0ac574a68818cb24d939c3527f3aaeb04b853d04

14 years agofix build
Jean-Baptiste Queru [Wed, 12 May 2010 17:05:59 +0000 (10:05 -0700)]
fix build

Change-Id: I243c98e20a250e0d40d481f16af481ff070219fd

14 years agomerge from open-source master
The Android Open Source Project [Wed, 12 May 2010 16:22:50 +0000 (09:22 -0700)]
merge from open-source master

Change-Id: Iecfd2bd3069f70bbe508042cc249fcf7ff24800d

14 years agoMerge "Sometimes the compiler is very right! Found bug in bessel routines for float."
Jean-Baptiste Queru [Tue, 11 May 2010 17:43:56 +0000 (10:43 -0700)]
Merge "Sometimes the compiler is very right! Found bug in bessel routines for float."

14 years agoMerge "Reduce compiler anxiety."
David Turner [Tue, 11 May 2010 17:20:15 +0000 (10:20 -0700)]
Merge "Reduce compiler anxiety."

14 years agoMerge "Added support for LD_PRELOAD"
David Turner [Tue, 11 May 2010 17:17:00 +0000 (10:17 -0700)]
Merge "Added support for LD_PRELOAD"

14 years agoMerge "stdio: simplify __fremovelock()"
David Turner [Mon, 10 May 2010 23:04:02 +0000 (16:04 -0700)]
Merge "stdio: simplify __fremovelock()"

14 years agoMerge "Reversed order of const and static to hush warning from compiler."
Jean-Baptiste Queru [Mon, 10 May 2010 23:00:22 +0000 (16:00 -0700)]
Merge "Reversed order of const and static to hush warning from compiler."

14 years agostdio: simplify __fremovelock()
André Goddard Rosa [Sun, 31 Jan 2010 00:45:07 +0000 (22:45 -0200)]
stdio: simplify __fremovelock()

... by removing extraneous NULL check, as free() already does it.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Change-Id: I0445f35c7ad0a049a0e4aee1fbe002ed2f13b94b

14 years agoAdded support for LD_PRELOAD
Matt Fischer [Thu, 31 Dec 2009 18:09:10 +0000 (12:09 -0600)]
Added support for LD_PRELOAD

The LD_PRELOAD environment variable allows the user to specify a list of
libraries which should be unconditionally loaded before any others.  This
makes possible some useful tricks, such as library interposers.

Change-Id: I433d775ab08ef63a5fbe7b21f87a5642954fc32f

14 years agoMerge "string: tidy up strndup()"
David Turner [Mon, 10 May 2010 21:52:02 +0000 (14:52 -0700)]
Merge "string: tidy up strndup()"

14 years agoSometimes the compiler is very right! Found bug in bessel routines for float.
Scott Turner [Sat, 16 Jan 2010 16:30:44 +0000 (11:30 -0500)]
Sometimes the compiler is very right! Found bug in bessel routines for float.

Original compiler error:

target arm C: libm <= bionic/libm/src/e_j0f.c
bionic/libm/src/e_j0f.c: In function 'j0f':
bionic/libm/src/e_j0f.c:66: warning: comparison between signed and unsigned integer expressions
bionic/libm/src/e_j0f.c: In function 'y0f':
bionic/libm/src/e_j0f.c:140: warning: comparison between signed and unsigned integer expressions
target arm C: libm <= bionic/libm/src/e_j1.c

It's subtle but ix is masked with 0x7f000000 so it can never ever have a value
greater than 0x80000000. So I switched to using the unmasked hx and added a
cast as a reward to the compiler for being right.

I checked the original routines that e_j0f.c was ported from (in e_j0.c) and
the double's don't use 0x80000000 so this issue didn't exist there.

Let that be a warning to those that just slap on casts to shut up the compiler,
sometimes it's sniffed out a bug for you. :-)

Similar fixes in the other functions.

Change-Id: I7a776e5d4721fc3a9e3bd89179b67e9af3a2ebfa

14 years agomerge from open-source master
The Android Open Source Project [Mon, 3 May 2010 22:33:05 +0000 (15:33 -0700)]
merge from open-source master

Change-Id: If02d33af51017dbd85e91c79ac2e848eda6cf253

14 years agoMerge "Fix log channel initialization at bionic/logd_write.c."
David Turner [Sat, 1 May 2010 22:31:39 +0000 (15:31 -0700)]
Merge "Fix log channel initialization at bionic/logd_write.c."

14 years agoMerge "added headers for SuperH which automatically generate by update_all.py"
Jean-Baptiste Queru [Thu, 29 Apr 2010 15:01:50 +0000 (08:01 -0700)]
Merge "added headers for SuperH which automatically generate by update_all.py"

14 years agolinker: fix the undefined weak symbols issue
Yi Sun [Wed, 2 Dec 2009 08:08:14 +0000 (00:08 -0800)]
linker: fix the undefined weak symbols issue

I'm not sure if this is a correct fix or not.
Also need to find out why 1.6 does not have this issue.

Change-Id: If46c844834bda1e2cbf084a1a45a1832119b3ae3

14 years agobionic: add missing NULL check from memory allocation on record_backtrace()
André Goddard Rosa [Fri, 5 Feb 2010 18:03:09 +0000 (16:03 -0200)]
bionic: add missing NULL check from memory allocation on record_backtrace()

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Change-Id: I739c63c5a7344fff1775580044dc647edf246ebf

14 years agostdio: simplify vasprintf()
André Goddard Rosa [Sun, 31 Jan 2010 00:40:45 +0000 (22:40 -0200)]
stdio: simplify vasprintf()

... by removing unneeded NULL check, as free() already does it.
By the way, we don't need to set a stack variable back to NULL.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Change-Id: Id90eb8f042b5c922c5ff139b11ff8366fb404566

14 years agostdio: simplify asprintf()
André Goddard Rosa [Sun, 31 Jan 2010 00:39:00 +0000 (22:39 -0200)]
stdio: simplify asprintf()

... by removing unneeded NULL check, as free() already does it.
By the way, we don't need to set a stack variable back to NULL.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Change-Id: Id1f72e872f73366dddcea4abc75885a3d9a318c6

14 years agoimprove readability of stdlib: fix indentation and remove trailing spaces
André Goddard Rosa [Fri, 5 Feb 2010 20:32:52 +0000 (18:32 -0200)]
improve readability of stdlib: fix indentation and remove trailing spaces

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Change-Id: I7dd90a0816b5376ffc1de4499d56935e0bd574a1

14 years agomerge from open-source master
The Android Open Source Project [Wed, 21 Apr 2010 16:10:08 +0000 (09:10 -0700)]
merge from open-source master

Change-Id: I518bb4ae9d7269957365561d4d609f22cde519db

14 years agomerge from open-source master
The Android Open Source Project [Thu, 8 Apr 2010 18:11:53 +0000 (11:11 -0700)]
merge from open-source master

Change-Id: If77618a329fc7b497c44c2585e644bc50e7e1406

14 years agoFixed support for RTLD_NEXT in dlsym()
Matt Fischer [Thu, 31 Dec 2009 18:17:56 +0000 (12:17 -0600)]
Fixed support for RTLD_NEXT in dlsym()

The previous implementation of this flag was broken--it behaved identically
to RTLD_DEFAULT.  This adds a proper implementation, which examines the address
of the calling function, and uses it to determine which library to use to begin
the symbol search process.

Change-Id: I2ad2b46363f68932af63a3828a22f9c7987eea67

14 years agoam 91638721: kernel_headers: Update rtnetlink/pkt_sched headers for 2.6.32
San Mehat [Wed, 7 Apr 2010 05:02:48 +0000 (22:02 -0700)]
am 91638721: kernel_headers: Update rtnetlink/pkt_sched headers for 2.6.32

Merge commit '9163872132a3e92f986b1d684badb1dd4482ad8e' into froyo-plus-aosp

* commit '9163872132a3e92f986b1d684badb1dd4482ad8e':
  kernel_headers: Update rtnetlink/pkt_sched headers for 2.6.32

14 years agokernel_headers: Update rtnetlink/pkt_sched headers for 2.6.32
San Mehat [Wed, 7 Apr 2010 01:49:49 +0000 (18:49 -0700)]
kernel_headers: Update rtnetlink/pkt_sched headers for 2.6.32

For: For http://b/issue?id=2576057

Change-Id: I553ca14974aaec4434e384979e0bb7007dcf6033
Signed-off-by: San Mehat <san@google.com>
14 years agoAdd declaration for sys_signame[] forgotten in change 12489
Thorsten Glaser [Tue, 1 Dec 2009 14:12:01 +0000 (15:12 +0100)]
Add declaration for sys_signame[] forgotten in change 12489

14 years agomerge from open-source master
The Android Open Source Project [Wed, 31 Mar 2010 21:24:25 +0000 (14:24 -0700)]
merge from open-source master

Change-Id: I950e9aca87cbb0c35099b1d53cff6378bd0f26f4

14 years agomerge from open-source master
The Android Open Source Project [Wed, 31 Mar 2010 21:19:51 +0000 (14:19 -0700)]
merge from open-source master

Change-Id: I483fedf77d978b1c6e52d73eebc14f011bb9f809

14 years agomerge from open-source master
The Android Open Source Project [Wed, 31 Mar 2010 21:15:30 +0000 (14:15 -0700)]
merge from open-source master

Change-Id: I076e0df8656fdf58c229cc9a168cd6d8e16b6d8e

14 years agobionic: fix memory leak in get_malloc_leak_info() error path
André Goddard Rosa [Fri, 5 Feb 2010 18:01:05 +0000 (16:01 -0200)]
bionic: fix memory leak in get_malloc_leak_info() error path

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
14 years agoMerge "bionic: clear only the part of the buffer which is not overwritten afterward"
David Turner [Tue, 30 Mar 2010 21:52:14 +0000 (14:52 -0700)]
Merge "bionic: clear only the part of the buffer which is not overwritten afterward"

14 years agoMerge "linker: fix the undefined weak symbols issue"
David Turner [Mon, 29 Mar 2010 22:49:42 +0000 (15:49 -0700)]
Merge "linker: fix the undefined weak symbols issue"

14 years agolinker: fix the undefined weak symbols issue
Min-su, Kim [Tue, 19 Jan 2010 01:05:33 +0000 (10:05 +0900)]
linker: fix the undefined weak symbols issue

14 years agoMerge changes Ibdc6e3c8,I9bcb91a2
David Turner [Mon, 29 Mar 2010 22:05:47 +0000 (15:05 -0700)]
Merge changes Ibdc6e3c8,I9bcb91a2

* changes:
  Correct generic memset implementation
  Generic memcpy should define MEMCOPY before including bcopy.c

14 years agoMerge "Atom optimized string and memory routines"
David Turner [Mon, 29 Mar 2010 21:40:05 +0000 (14:40 -0700)]
Merge "Atom optimized string and memory routines"

14 years agomerge from open-source master
The Android Open Source Project [Mon, 29 Mar 2010 18:01:59 +0000 (11:01 -0700)]
merge from open-source master

Change-Id: I96d2cd063f084fd17116bf7ee08fa7109a3c1ceb

14 years agobionic: clear only the part of the buffer which is not overwritten afterward
André Goddard Rosa [Mon, 29 Mar 2010 00:32:36 +0000 (21:32 -0300)]
bionic: clear only the part of the buffer which is not overwritten afterward

Change-Id: I5ddd93f0557e5a7401460dc9fc8a55b330a79c3a
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>