Commit graph

493 commits

Author SHA1 Message Date
The Android Open Source Project
bb7928ccda merge from open-source master
Change-Id: Iecfd2bd3069f70bbe508042cc249fcf7ff24800d
2010-05-12 09:22:50 -07:00
Jean-Baptiste Queru
c3581dc78a Merge "Sometimes the compiler is very right! Found bug in bessel routines for float." 2010-05-11 10:43:56 -07:00
David Turner
7911e057a5 Merge "Reduce compiler anxiety." 2010-05-11 10:20:15 -07:00
David Turner
16b59c4c38 Merge "Added support for LD_PRELOAD" 2010-05-11 10:17:00 -07:00
David Turner
6ba5efd59a Merge "stdio: simplify __fremovelock()" 2010-05-10 16:04:02 -07:00
Jean-Baptiste Queru
161232820c Merge "Reversed order of const and static to hush warning from compiler." 2010-05-10 16:00:22 -07:00
André Goddard Rosa
051ea9bc07 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
2010-05-10 15:42:47 -07:00
Matt Fischer
4fd42c1dc0 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
2010-05-10 15:09:19 -07:00
David Turner
d791da7943 Merge "string: tidy up strndup()" 2010-05-10 14:52:02 -07:00
Scott Turner
c1f8dd9f0b 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
2010-05-07 15:02:36 -07:00
The Android Open Source Project
f450fa5f99 merge from open-source master
Change-Id: If02d33af51017dbd85e91c79ac2e848eda6cf253
2010-05-03 15:33:05 -07:00
David Turner
0be7eda75a Merge "Fix log channel initialization at bionic/logd_write.c." 2010-05-01 15:31:39 -07:00
Jean-Baptiste Queru
716e06071a Merge "added headers for SuperH which automatically generate by update_all.py" 2010-04-29 08:01:50 -07:00
Yi Sun
3472348067 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
2010-04-29 07:50:04 -07:00
André Goddard Rosa
5751c54bf1 bionic: add missing NULL check from memory allocation on record_backtrace()
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>

Change-Id: I739c63c5a7344fff1775580044dc647edf246ebf
2010-04-29 07:37:42 -07:00
André Goddard Rosa
c8a850bcd1 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
2010-04-29 07:33:40 -07:00
André Goddard Rosa
6aed4288eb 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
2010-04-29 07:31:44 -07:00
André Goddard Rosa
e734769276 improve readability of stdlib: fix indentation and remove trailing spaces
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>

Change-Id: I7dd90a0816b5376ffc1de4499d56935e0bd574a1
2010-04-29 07:29:06 -07:00
The Android Open Source Project
5ef5272be9 merge from open-source master
Change-Id: I518bb4ae9d7269957365561d4d609f22cde519db
2010-04-21 09:10:08 -07:00
The Android Open Source Project
95faecefde merge from open-source master
Change-Id: If77618a329fc7b497c44c2585e644bc50e7e1406
2010-04-08 11:11:53 -07:00
Matt Fischer
1698d9ebfc 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
2010-04-08 10:14:47 -05:00
San Mehat
f1cd18bdec 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
2010-04-06 22:02:48 -07:00
San Mehat
9163872132 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>
2010-04-06 18:54:22 -07:00
The Android Open Source Project
1d168621a5 merge from open-source master
Change-Id: I950e9aca87cbb0c35099b1d53cff6378bd0f26f4
2010-03-31 14:24:25 -07:00
The Android Open Source Project
d046725133 merge from open-source master
Change-Id: I483fedf77d978b1c6e52d73eebc14f011bb9f809
2010-03-31 14:19:51 -07:00
The Android Open Source Project
5ffedb22c8 merge from open-source master
Change-Id: I076e0df8656fdf58c229cc9a168cd6d8e16b6d8e
2010-03-31 14:15:30 -07:00
André Goddard Rosa
350bb359fa bionic: fix memory leak in get_malloc_leak_info() error path
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-03-29 21:21:26 -03:00
David Turner
f8916e2e45 Merge "bionic: clear only the part of the buffer which is not overwritten afterward" 2010-03-30 14:52:14 -07:00
David Turner
4ad72f89b1 Merge "linker: fix the undefined weak symbols issue" 2010-03-29 15:49:42 -07:00
Min-su, Kim
3cab22c8cf linker: fix the undefined weak symbols issue 2010-03-29 15:43:09 -07:00
David Turner
8ab5b02b5f Merge changes Ibdc6e3c8,I9bcb91a2
* changes:
  Correct generic memset implementation
  Generic memcpy should define MEMCOPY before including bcopy.c
2010-03-29 15:05:47 -07:00
David Turner
87ae0da817 Merge "Atom optimized string and memory routines" 2010-03-29 14:40:05 -07:00
The Android Open Source Project
62ac0dc457 merge from open-source master
Change-Id: I96d2cd063f084fd17116bf7ee08fa7109a3c1ceb
2010-03-29 11:01:59 -07:00
André Goddard Rosa
3f61212781 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>
2010-03-28 21:32:36 -03:00
André Goddard Rosa
acdb052030 stdlib: optimize bsearch()
... by checking most probable condition first (elements do differ)

Change-Id: I424eab9c32a6d9eb82b686ca04025ec8c9097035
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-03-28 21:18:56 -03:00
Bruce Beare
8ff1a2759a Atom optimized string and memory routines
Change-Id: I27b68bb28551c75c9ac84bb9730e2cd8254d8991
2010-03-26 10:54:07 -07:00
Bruce Beare
58f0326362 Android hack for size_t
Change-Id: I3c967fca60f542459dc17be84da47b3b6a26242b
2010-03-26 09:36:01 -07:00
Kenny Root
7e0bfb511e Fix comparison of IPv6 prefixes
Typo assigned prefixlen1 twice instead of to the two different variables
for comparison and difference computation.

Change-Id: I6631b8269ca6aae264c8d7d414127b756838df96
2010-03-24 18:07:26 -07:00
Dima Zavin
4e383b81d0 libc: kernel: update msm_kgsl.h
Change-Id: I8cd5a186071892bdc2b2b29061dd6c1fd927c0f5
Signed-off-by: Dima Zavin <dima@android.com>
2010-03-24 14:13:10 -07:00
David 'Digit' Turner
5207d78c32 Fix typo that broke recursive mutexes implementation.
Change-Id: I832901604b487c6a50304c311b5ba135e153530d
2010-03-23 05:30:55 -07:00
David 'Digit' Turner
b5e4a41606 pthread: Use private futexes by default in condition variables
Now that the system properly uses shared condvars when needed, we
can enable the use of private futexes for them too.

Change-Id: Icf8351fc0a2309f764cba45c65bc3af047720cdf
2010-03-22 17:31:50 -07:00
The Android Open Source Project
377d4c979d merge from open-source master
Change-Id: I70266ee8c520b216773f267e46c8273d2334c31d
2010-03-22 15:55:09 -07:00
David 'Digit' Turner
709a898de8 Merge "Fix strtod security bug." 2010-03-22 15:45:32 -07:00
David 'Digit' Turner
88f06cd84a Use private futexes for pthread_mutex_t.
This does not change the implementation of conditional variables
since we're waiting for other system components to properly use
pthread_condattr_init/setpshared before that.

Also remove an obsolete x86 source file.

Change-Id: Ia3e3fbac35b87a534fb04d4381c3c66b975bc8f7
2010-03-18 17:13:41 -07:00
David Turner
1825fb5d5f Merge "bionic: on pthread_join(), avoid extra check in case we find the thread" 2010-03-18 16:42:49 -07:00
David Turner
c0e464268d Merge "bionic: ftell() returns a long, not an int" 2010-03-18 16:35:42 -07:00
David 'Digit' Turner
ee7b077abf Add pthread_condattr_init/destroy/setpshared/getpshared
Note that this does not change the implementation of conditional variables
which still use shared futexes, independent on the flags being selected.

This will be fixed in a later patch, once our system is modified to use
pthread_condattr_setpshared(attr, PTHREAD_PROCESS_SHARED) properly.

Change-Id: I935de50964cd41f97a13dbfd6626d3407b0406c3
2010-03-18 14:07:42 -07:00
Matt Fischer
e2a8b1fd19 Added support for dladdr()
dladdr() is a GNU extension function, which allows the caller to retrieve
symbol information for a specified memory address.  It is useful for things
like generating backtrace information at runtime.

Change-Id: I3a1def1a6c9c666d93e1e97b7d260dfa5b9b79a9
2010-03-17 16:11:37 -05:00
David Turner
ede2e75f49 Merge "x86 syscall system call implementation" 2010-03-17 14:07:27 -07:00
David Turner
b0ae864dff Merge "Fix pread()/pwrite() stubs" 2010-03-17 14:00:20 -07:00