Commit Graph

664 Commits

Author SHA1 Message Date
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
Wu-cheng Li
7f14f7ba14 am 37443edd: am 7ed132a1: bionic: update processed kernel header msm_camera.h
Merge commit '37443edd9731dbddb1ca0181435d08bcdcafe5c8'

* commit '37443edd9731dbddb1ca0181435d08bcdcafe5c8':
  bionic: update processed kernel header msm_camera.h
2010-07-27 14:35:39 -07:00
Wu-cheng Li
37443edd97 am 7ed132a1: bionic: update processed kernel header msm_camera.h
Merge commit '7ed132a1ae6e00593918090a964f5d5b09d77f84' into gingerbread-plus-aosp

* commit '7ed132a1ae6e00593918090a964f5d5b09d77f84':
  bionic: update processed kernel header msm_camera.h
2010-07-27 14:33:18 -07:00
Wu-cheng Li
7ed132a1ae bionic: update processed kernel header msm_camera.h
Change-Id: If66422d538d0fb0c6ae8a7399c62911635d1fd13
2010-07-27 14:26:21 -07:00
Eric Fischer
a742200641 am a685faf3: am cd7014fd: Update time zone data to the new version 2010k.
Merge commit 'a685faf3e3de181ca6c795b0062432c74073d024'

* commit 'a685faf3e3de181ca6c795b0062432c74073d024':
  Update time zone data to the new version 2010k.
2010-07-26 17:22:50 -07:00
Eric Fischer
a685faf3e3 am cd7014fd: Update time zone data to the new version 2010k.
Merge commit 'cd7014fd0634f1337fc3857f1c61e0d39443c4be' into gingerbread-plus-aosp

* commit 'cd7014fd0634f1337fc3857f1c61e0d39443c4be':
  Update time zone data to the new version 2010k.
2010-07-26 17:17:27 -07:00
Eric Fischer
cd7014fd06 Update time zone data to the new version 2010k.
Change-Id: If657e1783e3f96c52bfe613bad027482d8373c67
2010-07-26 15:53:24 -07:00
David 'Digit' Turner
28518391d1 am 0291b0ca: resolved conflicts for merge of 6774809b to gingerbread-plus-aosp
Merge commit '0291b0cada30c1c8eaaa346577969ff9b4eb5195'

* commit '0291b0cada30c1c8eaaa346577969ff9b4eb5195':
  linker: Support dlopen(NULL, ...) properly.
2010-07-26 12:21:19 -07:00
David 'Digit' Turner
0291b0cada resolved conflicts for merge of 6774809b to gingerbread-plus-aosp
Change-Id: I633c3067c874c215da0c6ede00af41d8e3587d8b
2010-07-26 12:18:37 -07:00
Chih-Wei Huang
26c15a8eb9 Move the atom optimization flags into TARGET_linux-x86.mk.
Setting libc_crt_target_cflags to be non-recursive is necessary.

Change-Id: I5310d86e705f23da126c21ecb33a97a074da584a
2010-07-26 11:29:08 +08:00
Jean-Baptiste Queru
6b9d2d6839 am 6d4d8cb7: resolved conflicts for merge of 4f086aeb to gingerbread-plus-aosp
Merge commit '6d4d8cb79c5578d33ab17806d67b1e53a730fbc3'

* commit '6d4d8cb79c5578d33ab17806d67b1e53a730fbc3':
  Implemented pthread_atfork()
2010-07-23 15:04:24 -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
6774809b62 linker: Support dlopen(NULL, ...) properly.
Change-Id: Icba37823cb350c34848cc466d144c3a0af87c94c
2010-07-23 12:16:15 -07:00
Wu-cheng Li
cc1a72b280 am 4e69dfed: am 9d1f5afc: bionic: update processed kernel header msm_camera.h
Merge commit '4e69dfed0b0fe672e366bb84d5c3feaedc61d630'

* commit '4e69dfed0b0fe672e366bb84d5c3feaedc61d630':
  bionic: update processed kernel header msm_camera.h
2010-07-19 13:50:46 -07:00
Wu-cheng Li
4e69dfed0b am 9d1f5afc: bionic: update processed kernel header msm_camera.h
Merge commit '9d1f5afc34efb8c10672f765704941036fd40da8' into gingerbread-plus-aosp

* commit '9d1f5afc34efb8c10672f765704941036fd40da8':
  bionic: update processed kernel header msm_camera.h
2010-07-19 13:48:34 -07:00
The Android Open Source Project
4b315b35b0 am 77ec41cc: merge from open-source master
Merge commit '77ec41cc22cf0d08e556e6afe4de1f6eae5e9662'

* commit '77ec41cc22cf0d08e556e6afe4de1f6eae5e9662':
  Add kernel header file ipv6_route.h in bionic.
2010-07-19 12:20:03 -07:00
The Android Open Source Project
77ec41cc22 merge from open-source master
Change-Id: Ib65087940790a8d3b72d8d345a11e7c9c53896cd
2010-07-19 12:17:17 -07:00
Wu-cheng Li
9d1f5afc34 bionic: update processed kernel header msm_camera.h
Change-Id: I25598b08e9cafe98a86cdb2e40481d9aedc8dcee
2010-07-19 09:03:18 -07:00
Banavathu, Srinivas Naik
e73a571fd9 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
2010-07-16 16:42:48 -07:00
The Android Open Source Project
be96be7e83 am 90e83bcc: merge from open-source master
Merge commit '90e83bcc1c41a4d6d310b2bd5cb747a53a88fff3'

* commit '90e83bcc1c41a4d6d310b2bd5cb747a53a88fff3':
  Fix undefined reference to dl_iterate_phdr for x86
2010-07-16 13:04:30 -07:00
The Android Open Source Project
90e83bcc1c merge from open-source master
Change-Id: Iadd4a92f0384fdb8afa015613957b7d78b3d100a
2010-07-16 12:59:04 -07:00
Jean-Baptiste Queru
7f2162689c Merge "Fix undefined reference to dl_iterate_phdr for x86" 2010-07-16 07:17:48 -07:00
Mike Lockwood
42f160ddfa Add header for MTP kernel driver.
Change-Id: I072e476c28535198689afbe2320a291fa42fe05b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-15 12:33:44 -04:00
The Android Open Source Project
fb6907d39c am 0e78f786: merge from open-source master
Merge commit '0e78f786777a04af498b43564a8d6ed8e15e8940'

* commit '0e78f786777a04af498b43564a8d6ed8e15e8940':
  Change-Id: I68cc462aeb2460345a53bdb9941ce4bfc10456fb
2010-07-09 10:54:06 -07:00
The Android Open Source Project
4918d4cb0c am 611793d6: merge from open-source master
Merge commit '611793d6abcf504544d6ebccb8c46da06464b701'

* commit '611793d6abcf504544d6ebccb8c46da06464b701':
  Fix missing NL
2010-07-09 10:49:04 -07:00
The Android Open Source Project
0e78f78677 merge from open-source master
Change-Id: Id84ff747889d6f2c15c0510263e32fdfdd18dbed
2010-07-09 10:48:45 -07:00
The Android Open Source Project
611793d6ab merge from open-source master
Change-Id: Ia22080192681c2ac596582d6cfdac732b1ff4c9f
2010-07-09 10:47:23 -07:00
David 'Digit' Turner
312d86493c am ea5adb57: am cb7e8c5e: libc: update alarm() implementation to return 0 on error.
Merge commit 'ea5adb571e664e5d0444230169062baaa996686f'

* commit 'ea5adb571e664e5d0444230169062baaa996686f':
  libc: update alarm() implementation to return 0 on error.
2010-07-08 19:10:55 -07:00
David 'Digit' Turner
85b0c388ed am 7ab9c068: am ab8b5410: libc: fix fstatfs() implementation.
Merge commit '7ab9c068aac3373fe35a94b01a36d360c2bcb97f'

* commit '7ab9c068aac3373fe35a94b01a36d360c2bcb97f':
  libc: fix fstatfs() implementation.
2010-07-08 19:10:52 -07:00
David 'Digit' Turner
ea5adb571e am cb7e8c5e: libc: update alarm() implementation to return 0 on error.
Merge commit 'cb7e8c5ef3f5f60a848e469ed40610c8946fe7ac' into gingerbread-plus-aosp

* commit 'cb7e8c5ef3f5f60a848e469ed40610c8946fe7ac':
  libc: update alarm() implementation to return 0 on error.
2010-07-08 17:24:45 -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
cb7e8c5ef3 libc: update alarm() implementation to return 0 on error.
This matches the GLibc behaviour, and allows alarm(0xFFFFFFFF) to return 0.

Change-Id: I419aa71b27d6bb2015d15ba6b6112bf62eadcbb8
2010-07-08 17:20:29 -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
Jean-Baptiste Queru
fc6d95b10e Merge "Change-Id: I68cc462aeb2460345a53bdb9941ce4bfc10456fb bionic: fix clearenv() compiler warning and related comment typos" 2010-07-08 15:38:13 -07:00
Bruce Beare
aa46fa2403 Fix undefined reference to dl_iterate_phdr for x86
Change-Id: I22410b27939e8f54da932d7a1104102550c4685f
Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
2010-07-08 14:47:50 -07:00
Bruce Beare
16984423bc Fix missing NL
Change-Id: Ic210fe9f740b9a8235a66d479ad4eddc869998bb
Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
2010-07-08 11:12:36 -07:00
David 'Digit' Turner
cf38531741 resolved conflicts for merge of 2576abf0 to master
Change-Id: Ibd3ed11f3cc27ff12c0464b0f56d7057be6a7b85
2010-07-02 15:22:19 -07:00
David 'Digit' Turner
2576abf0ed am 51976326: libc: Fix sem_post() implementation to wake up all waiting threads.
Merge commit '519763265ec0b634bd9c264a0aca034882458ecc' into gingerbread-plus-aosp

* commit '519763265ec0b634bd9c264a0aca034882458ecc':
  libc: Fix sem_post() implementation to wake up all waiting threads.
2010-07-02 15:12:00 -07:00
David 'Digit' Turner
519763265e libc: Fix sem_post() implementation to wake up all waiting threads.
This also allows us to optimize the case where we increment an
uncontended semaphore (no need to call futex_wake() then).

Change-Id: Iad48efe8551dc66dc89d3e3f18c001e5a6c1939f
2010-07-02 15:09:57 -07:00
The Android Open Source Project
cd122865a5 am 424d027b: merge from open-source master
Merge commit '424d027b6e9b2fff2e79b2d65575c00fcf67d915'

* commit '424d027b6e9b2fff2e79b2d65575c00fcf67d915':
  Regenerate linux/netfilter_ipv6/ip6_tables.h.
2010-07-02 11:43:48 -07:00
The Android Open Source Project
8a5705c7fa am d6f31851: merge from open-source master
Merge commit 'd6f3185148933e4bae17e8f6efe7610cd1cf7769'

* commit 'd6f3185148933e4bae17e8f6efe7610cd1cf7769':
  Allow dlclose() to properly call static C++ destructors.
2010-07-02 11:40:56 -07:00
The Android Open Source Project
424d027b6e merge from open-source master
Change-Id: I895b74454b35da7eba6c0f6250fe2ca6c9907f1d
2010-07-02 11:40:01 -07:00
The Android Open Source Project
d6f3185148 merge from open-source master
Change-Id: I6a15428fd9ce1f1dbbb702ff13c6af8da8f54a1e
2010-07-02 11:37:54 -07:00
Jean-Baptiste Queru
6fce15cea1 Merge "Regenerate linux/netfilter_ipv6/ip6_tables.h." 2010-07-02 10:34:04 -07:00
David 'Digit' Turner
3b43f87d29 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
2010-07-01 23:09:28 -07:00
David 'Digit' Turner
4e6043a355 am 7d1d98b9: am a02b93bd: libc: add sanity checks to pthread_mutex_destroy()
Merge commit '7d1d98b97e947de22aff4c0b67eec7ae68c822ee'

* commit '7d1d98b97e947de22aff4c0b67eec7ae68c822ee':
  libc: add sanity checks to pthread_mutex_destroy()
2010-06-29 12:55:34 -07:00
David 'Digit' Turner
7d1d98b97e am a02b93bd: libc: add sanity checks to pthread_mutex_destroy()
Merge commit 'a02b93bd75a9d156117264d88069566e447397e2' into gingerbread-plus-aosp

* commit 'a02b93bd75a9d156117264d88069566e447397e2':
  libc: add sanity checks to pthread_mutex_destroy()
2010-06-29 12:53:13 -07:00
David 'Digit' Turner
a02b93bd75 libc: add sanity checks to pthread_mutex_destroy()
Change-Id: Iddb2204fa792fa9aca5f19838926dddbb09b74a2
2010-06-28 14:20:22 -07:00
Wink Saville
ccc3d1eea1 Use a recursive lock for pthread_once.
bug: 2292366
Change-Id: I9fc8b790dcfcb30ca94a0beb340d43fe5cd6c22e
2010-06-28 11:41:16 -07:00
Vilmos Nebehaj
c1a534ba0b 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
2010-06-28 15:13:23 +02:00
Chris Peterson
2bf607d599 Change-Id: I68cc462aeb2460345a53bdb9941ce4bfc10456fb
bionic: fix clearenv() compiler warning and related comment typos
2010-06-27 20:53:04 -07:00
Nick Pelly
1deef576b3 am 0a79d213: am fa5755ae: Merge "Add clean headers for 7x30 video codec." into gingerbread
Merge commit '0a79d2135cf607b257319fb6d4638c0313cab388'

* commit '0a79d2135cf607b257319fb6d4638c0313cab388':
  Add clean headers for 7x30 video codec.
2010-06-23 18:01:01 -07:00
Nick Pelly
0a79d2135c am fa5755ae: Merge "Add clean headers for 7x30 video codec." into gingerbread
Merge commit 'fa5755ae980b6f4ac5df37b263ba20f472db31ca' into gingerbread-plus-aosp

* commit 'fa5755ae980b6f4ac5df37b263ba20f472db31ca':
  Add clean headers for 7x30 video codec.
2010-06-23 17:58:38 -07:00
Nick Pelly
fa5755ae98 Merge "Add clean headers for 7x30 video codec." into gingerbread 2010-06-23 17:56:38 -07:00
Nick Pelly
21baae3d71 Add clean headers for 7x30 video codec.
Change-Id: Id4faa5bacb03cc42377527e05c53c6392c776e7d
2010-06-23 16:17:58 -07:00
David 'Digit' Turner
cb43ffeb10 am cb0f5ed8: am 50ace4fe: Remove compiler warnings when building Bionic.
Merge commit 'cb0f5ed8111d4305cf6798aefdb4f9623570c83a'

* commit 'cb0f5ed8111d4305cf6798aefdb4f9623570c83a':
  Remove compiler warnings when building Bionic.
2010-06-23 12:41:50 -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
55cb28032d am e1a739ec: am 6a9b888d: Allow static C++ destructors to be properly called on dlclose().
Merge commit 'e1a739ec38a39fea9e66038dfc7cea364cb6a256'

* commit 'e1a739ec38a39fea9e66038dfc7cea364cb6a256':
  Allow static C++ destructors to be properly called on dlclose().
2010-06-23 10:32:05 -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
e1a739ec38 am 6a9b888d: Allow static C++ destructors to be properly called on dlclose().
Merge commit '6a9b888d7c4b246f6f66360789c72b754ff85021' into gingerbread-plus-aosp

* commit '6a9b888d7c4b246f6f66360789c72b754ff85021':
  Allow static C++ destructors to be properly called on dlclose().
2010-06-22 11:19:25 -07:00
David 'Digit' Turner
6a9b888d7c Allow static C++ destructors to be properly called on dlclose().
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)

Change-Id: Ie771aa204e3acbdf02fd30ebd4150373a1398f39
NOTE: The NDK will need to be modified to enable this feature in
      the shared libraries that are generated through it.
2010-06-18 16:07:10 -07:00
The Android Open Source Project
e8f79c1f5d merge from open-source master
Change-Id: I408b5705b18d9e93e66bfbfeec0e3baefd618dec
2010-06-18 11:33:00 -07:00
David Turner
c6b5cd8d76 Merge "Fix for incorrect reply from sysconf(_SC_NPROCESSORS_ONLN)" 2010-06-16 17:36:32 -07:00
Mikael Ohlson
b44fcd6e8f 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>
2010-06-16 22:02:20 +00:00
Kristian Monsen
70465614e1 Just link fixes for b 2763938.
Added wcsxfrm.c and wmemcmp.c to the src files in Android.mk and removed wcsxfrm from wchar.c

Change-Id: Iab9b45cf78c27880d2941c360340a7af6b8964fe
2010-06-16 14:51:52 +01:00
David 'Digit' Turner
c0141a2bdd am f201ae83: am 6a09cfd9: Merge "wchar.h: improve wchar_t support in Bionic" into kraken
Merge commit 'f201ae83fc1742f34f9b0ff248c0c6c48a55f7a4'

* commit 'f201ae83fc1742f34f9b0ff248c0c6c48a55f7a4':
  wchar.h: improve wchar_t support in Bionic
2010-06-15 07:09:33 -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
9903f1a79a am 49b53c0b: merge from froyo-plus-aosp
Merge commit '49b53c0b948595ac34a52daca5fc6ef6af336b94'

* commit '49b53c0b948595ac34a52daca5fc6ef6af336b94':
  added missing ether_aton and ether_ntoa
2010-06-14 11:20:52 -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
0db9a39e2a am ef5f1ec3: am da3019b5: libc: add missing truncate() declaration
Merge commit 'ef5f1ec301f7be8c35cc073c54f41272e02ae7d2'

* commit 'ef5f1ec301f7be8c35cc073c54f41272e02ae7d2':
  libc: add missing truncate() declaration
2010-06-11 14:44:27 -07:00
David 'Digit' Turner
1120749f04 am 1b5b2305: am ecb6d413: libc: Add missing <termio.h> header
Merge commit '1b5b23059304cfcc8d7d180ffa28ad48d5f20ac5'

* commit '1b5b23059304cfcc8d7d180ffa28ad48d5f20ac5':
  libc: Add missing <termio.h> header
2010-06-11 14:44:20 -07: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
David 'Digit' Turner
8ebb9caa83 am c0b91e65: am 6c8a2f2a: libc: remove cutils dependencies
Merge commit 'c0b91e659abab740e99832a0dce7f9fd3e35d765'

* commit 'c0b91e659abab740e99832a0dce7f9fd3e35d765':
  libc: remove cutils dependencies
2010-06-11 14:01:16 -07:00
David 'Digit' Turner
6c8a2f2a5b libc: remove cutils dependencies
We simply copy the stuff we need from cutils headers.

A future patch will change cutils to include the private <bionic_atomic_inline.h>

Change-Id: Ib6fd9a03bc9e337ce867bd606dc94c2b4438480a
2010-06-11 13:49:09 -07:00
Colin Cross
87d44baab4 Merge "Add headers for new sensors" 2010-06-11 12:01:46 -07:00
David 'Digit' Turner
5ccaf62090 resolved conflicts for merge of 43a3d66f to master
Change-Id: I5e09ee0778f6971ae2c34de23f719328035c61ed
2010-06-09 18:26:37 -07:00
David 'Digit' Turner
038fbae518 sysconf(): Fix line parser for /proc files.
Change-Id: I2678010ee95933de19c8a8e3b2fe65ceb9b86400
2010-06-09 18:15:57 -07:00
Bruce Beare
9205fdf8c6 Add missing termios defns to bring on par with ARM - DO NOT MERGE
Change-Id: I6e16e7ab117b6df07ef24f092de1511fe1e9e7b1
2010-06-09 15:52:28 -07:00
Colin Cross
b508876e4c Add headers for new sensors
Change-Id: I1de2bf65310920b3496c58f05b3c39158de4c51d
2010-06-09 15:51:43 -07:00
David 'Digit' Turner
410b2ae7fb Add sincosl() function to bionic. So that sincos optimization can - DO NOT MERGE
be enabled.

Change-Id: I672cb319689aa4fb3f1f7cd868dda76842bebae9
2010-06-09 14:35:29 -07:00
Jing Yu
506b13d910 Remove a gcc-4.5 compilation warning:
bionic/libc/include/../include/stdlib.h: In function 'int grantpt(int)':
bionic/libc/include/../include/stdlib.h:138:23: warning: parameter '__fd' set but not used [-Wunused-but-set-parameter]

By adding __attribute((unused)) to __fd, the warning is gone, and this
attribute is compatible with gcc-4.4.0, gcc-4.3.1 gcc-4.2.1.
There is no any side effect.

Change-Id: I385f0f4da1013ffd1499e391eac9123aafe1f7a5
2010-06-09 13:24:22 -07:00
David 'Digit' Turner
b8e6c50cfa Fix setjmp()/longjmp() to save FP registers on ARMv7. - DO NOT MERGE
Change-Id: I3a0c2c05e295ac05ed51a531dabda668be204ca0
2010-06-09 13:18:29 -07:00
David 'Digit' Turner
aa4b1d0429 Add missing sysinfo() implementation (already declared in <sys/sysinfo.h>) - DO NOT MERGE
Change-Id: Iac4eb5911ffe4a7ab72b84df44e907685ac816af
2010-06-09 13:12:15 -07:00
David 'Digit' Turner
53f3d63a18 Resolved conflict fpr merge of 7d8574ce to master
Conflicts:
	libc/docs/CHANGES.TXT

Change-Id: I3816ac8346be399b31167b0374a0f018451bb92d
2010-06-08 17:41:10 -07:00
David 'Digit' Turner
7d8574cefe am 6304d8b2: Use private futexes for semaphores, unless they are initialized with pshared != 0. 2010-06-08 17:29:43 -07:00
David 'Digit' Turner
6304d8b218 Use private futexes for semaphores, unless they are initialized with pshared != 0.
Change-Id: I534e36a7171cd37037ae03b910ba71ea6968286d
Note: previously, sem_init() would return an error if pshared != 0.
2010-06-08 17:04:49 -07:00
Jing Yu
e4d8a9205a Merge "Add sincosl() function to bionic. So that sincos optimization can be enabled." 2010-06-07 13:14:45 -07:00
The Android Open Source Project
d881b9e10a am 7980f585: merge from froyo-plus-aosp 2010-06-07 11:22:29 -07:00
The Android Open Source Project
7980f585f7 merge from froyo-plus-aosp
Change-Id: I54d3b035f378d92f287b3dd08987c4041fda9997
2010-06-07 11:19:33 -07:00
The Android Open Source Project
15956f9288 merge from open-source master
Change-Id: I1cc2f1123a296b05c4faaa419374376395e05936
2010-06-07 11:01:49 -07:00
David Turner
16c91eff09 Merge "Add missing termios defns to bring on par with ARM" 2010-06-05 13:07:40 -07:00
Bruce Beare
84baa86362 Add missing termios defns to bring on par with ARM
Change-Id: Ied1871aa0a2e33473b89a4ac6d54e3c44be7f457
2010-06-04 08:14:44 -07:00
Jean-Baptiste Queru
3af8c59b71 am a8a21488: resolved conflicts for merge of 7b6e6fa5 to kraken 2010-06-03 15:08:23 -07:00
Jean-Baptiste Queru
a8a2148863 resolved conflicts for merge of 7b6e6fa5 to kraken
Change-Id: I2b9b80a7fa32c56be2b85ff8be0d6e7ac1848afe
2010-06-03 15:05:04 -07:00
The Android Open Source Project
7b6e6fa572 merge from open-source master
Change-Id: Ib7fc9c6f79f9b13e2175da137005d8968ea85eaf
2010-06-03 14:39:20 -07:00
Jing Yu
9946750609 Add sincosl() function to bionic. So that sincos optimization can
be enabled.

Change-Id: I19671a407dc96a92417c719da938ee0c1669bfb8
2010-06-03 14:13:53 -07:00
David Turner
f982f03832 Merge "pthread: introduce pthread_setname_np() as a mean to give names to threads" 2010-06-03 13:11:52 -07:00
Colin Cross
d5578fb652 Merge "Add headers for new kernel drivers" 2010-06-01 19:24:33 -07:00
Colin Cross
1c7708ea7c Add headers for new kernel drivers
Change-Id: I65e682cef2c20b12faa5e526e82e35ab3ca0c379
2010-06-01 17:46:38 -07:00
Andy McFadden
31b075c7a4 am fcd00ebb: Atomic/SMP update, part 3. 2010-06-01 16:11:07 -07:00
Andy McFadden
fcd00ebbdf Atomic/SMP update, part 3.
Update ARM atomic ops to use LDREX/STREX.  Stripped out #if 0 chunk.

Insert explicit memory barriers in pthread and semaphore code.

For bug 2721865.

Change-Id: I0f153b797753a655702d8be41679273d1d5d6ae7
2010-05-28 16:12:01 -07:00
Andy McFadden
f0107db210 am 4fdbadde: Atomic/SMP update. 2010-05-21 12:08:09 -07:00
Jing Yu
3a4b14bac6 Merge "Remove a gcc-4.5 compilation warning: bionic/libc/include/../include/stdlib.h: In function 'int grantpt(int)': bionic/libc/include/../include/stdlib.h:138:23: warning: parameter '__fd' set but not used [-Wunused-but-set-parameter]" 2010-05-21 10:50:38 -07:00
Jing Yu
bd77d49812 Remove a gcc-4.5 compilation warning:
bionic/libc/include/../include/stdlib.h: In function 'int grantpt(int)':
bionic/libc/include/../include/stdlib.h:138:23: warning: parameter '__fd' set but not used [-Wunused-but-set-parameter]

By adding __attribute((unused)) to __fd, the warning is gone, and this
attribute is compatible with gcc-4.4.0, gcc-4.3.1 gcc-4.2.1.
There is no any side effect.

Change-Id: Id9d2b0aeefdd9c37132da0f00c48387f7d897e83
2010-05-21 10:18:53 -07:00
Andy McFadden
4fdbadde92 Atomic/SMP update.
Added an underscore to _ARM_HAVE_LDREX_STREX to make it match the others.

Added __ARM_HAVE_DMB and __ARM_HAVE_LDREXD when appropriate.

Fixed some typos.

Change-Id: I2f55febcff4aeb7de572a514fb2cd2f820dca27c
2010-05-20 15:59:32 -07:00
David 'Digit' Turner
5d726df15e Add missing sysinfo() implementation (already declared in <sys/sysinfo.h>)
Change-Id: Ie9168238c3a8e77daab4f39939756d4c53d8af37
2010-05-20 10:55:45 -07:00
André Goddard Rosa
78c1c04ced 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>
2010-05-19 23:17:16 -03:00
David 'Digit' Turner
8a1d2cf142 Add pthread_rwlock_t implementation to the C library (DO NOT MERGE)
Change-Id: I756d8c26afc37cd7b71117ddbaa02a2cb40fdecb
2010-05-19 14:53:18 -07:00
David 'Digit' Turner
ddd235bd9c Add sincos() and sincosf() implementation.
This is a GLibc-compatibility patch required to simplify our
upcoming toolchain work/porting.

Change-Id: I615a20a449763f86b6e2b0e4f5ab43fb029ceb6d
2010-05-19 11:39:16 -07:00
The Android Open Source Project
204e82d0af am 8e1ee7fd: merge from open-source master 2010-05-17 15:03:01 -07:00
The Android Open Source Project
8e1ee7fd01 merge from open-source master
Change-Id: I5804d8850f2d4fb7b5d5c53d51e153f7ced9646e
2010-05-17 10:22:35 -07:00
André Goddard Rosa
a910abcd19 improve readability of stdio: fix indentation and remove trailing spaces
Change-Id: Ic51e58a7c75d20bf770dc0ebd7f97a338fbe0036
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-05-17 09:34:13 -07:00
The Android Open Source Project
ac65d2f600 am fdf2454d: merge from open-source master 2010-05-14 13:43:56 -07:00
The Android Open Source Project
fdf2454db2 merge from open-source master
Change-Id: I9c926a3cd680a96ece026cdec71c6e0fb0b7ad7c
2010-05-14 13:30:10 -07:00
David Turner
1297428e89 Merge "Add declaration for sys_signame[] forgotten in change 12489" 2010-05-14 12:12:24 -07:00
The Android Open Source Project
1e5db2794b am 4aef0ae6: merge from open-source master 2010-05-13 14:46:26 -07:00
The Android Open Source Project
4aef0ae660 merge from open-source master
Change-Id: I2be62bce462ee53fe9519f433523bd7a44a73d40
2010-05-13 14:31:02 -07:00
David 'Digit' Turner
a418c3b837 Add pthread_rwlock_t implementation to the C library
Change-Id: I14d0a112554756a7294a51fe88c1c408a16b5ff1
2010-05-12 15:59:46 -07:00
Matt Fischer
e4fa46e75c 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
2010-05-12 14:18:36 -05:00
The Android Open Source Project
440de73df9 am bb7928cc: merge from open-source master 2010-05-12 09:51:35 -07:00
The Android Open Source Project
bb7928ccda merge from open-source master
Change-Id: Iecfd2bd3069f70bbe508042cc249fcf7ff24800d
2010-05-12 09:22:50 -07:00
David 'Digit' Turner
5e1daa561a Merge "Fix setjmp()/longjmp() to save FP registers on ARMv7." 2010-05-11 18:16:14 -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
David Turner
d791da7943 Merge "string: tidy up strndup()" 2010-05-10 14:52:02 -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
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
95faecefde merge from open-source master
Change-Id: If77618a329fc7b497c44c2585e644bc50e7e1406
2010-04-08 11:11:53 -07: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
Thorsten Glaser
81569aa72c Add declaration for sys_signame[] forgotten in change 12489 2010-04-05 21:08:30 +02: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
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
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
David 'Digit' Turner
68b5f55671 Fix setjmp()/longjmp() to save FP registers on ARMv7.
Change-Id: I8ec684c8f8ca1ae58c8feb330b97d1e2b81caeef
2010-03-25 13:24:18 -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
David 'Digit' Turner
40e6b82286 Fix indentation in pthread mutex implementation.
This is preliminary work to simplify later changes to support
private futexes.

Change-Id: I06750936a93747a5e3f5a10228cbdc29e39c528c
2010-03-17 11:25:46 -07:00
David Turner
a9c41a8e0a Merge "bionic: remove unneeded variable from chk_realloc()" 2010-03-16 17:26:44 -07:00
David Turner
3f192f55f0 Merge "bionic: equalize the <unknown> program name between ssp.c and libc_init_common.c" 2010-03-16 17:25:53 -07:00
David Turner
dd8f3c80f1 Merge "improve readability of string: fix indentation and remove trailing spaces" 2010-03-16 17:25:04 -07:00
Fabrice Di Meglio
8641833b62 Revert "bionic: pthread: use private futexes by default for mutexes and condvars"
This reverts commit ba9c6f0989.
2010-03-11 14:47:47 -08:00
David 'Digit' Turner
ba9c6f0989 bionic: pthread: use private futexes by default for mutexes and condvars
Private futexes are a recent kernel addition: faster futexes that cannot be
shared between processes. This patch uses them by default, unless the PROCESS_SHARED
attribute flag is used when creating a mutex and/or conditional variable.

Also introduces pthread_condattr_init/destroy/setpshared/getpshared.

Change-Id: I3a0e2116f467072b046524cb5babc00e41057a53
2010-03-11 11:48:38 -08:00
Colin Cross
1cfbda826c Merge "Only use NEON memcpy if __ARM_NEON__ is defined" 2010-03-10 18:14:25 -08:00
Colin Cross
ecede40222 Only use NEON memcpy if __ARM_NEON__ is defined
Change-Id: I32e6b9385d46efeec15dee8e395a82eef24ba3ea
2010-03-09 16:23:51 -08:00
David 'Digit' Turner
8132626b71 Fix strtod security bug.
To avoid introducing NULL checks everytime a Bigint computation
is performed, introduce a special value (BIGINT_INVALID) and only
check for it when absolutely needed (which means when the code
needs to access the Bigint's internal structure fields).

Change-Id: Ie3954523b0985b6a8cb62340802d8dcf63cbf16f
2010-03-09 15:27:50 -08:00
David 'Digit' Turner
d378c68d74 Fix spurious DNS lookups in the C library.
The problem was that the 'defdname' field of res_state structure
was not properly initialized in __res_vinit(). This field is used
to store the default domain name, which is normally build from
calling gethostname() (see line 549 of res_init.c).

Unfortunately, in the typical Android case, gethostname() returns
an error (the hostname is configured) and a random stack string is
used later to build the DNS search list (see lines 556+ in res_init.c)

For the sake of illustration, let's say the search list is set to
a random value like 'xWLK'.

The end result is that when trying to result an unknown domain name
(e.g. 'www.ptn'), the query fails then the resolver tries to make a
new query with the DNS search list path(s) appended (e.g. 'www.ptn.xWLK').

The patch simply initializes 'defdname' to an empty string to avoid
this when the net.dns.search system property is not set.

Also contains whitespace/formatting fixes
2010-03-08 15:22:13 -08:00
David 'Digit' Turner
d7ed1ae982 Fix timezone management in the C library
Define 'timezone' and 'daylight' global variables that are already
defined in <time.h>

Properly update the 'tm_gmtoff' field in 'struct tm' values.
2010-03-05 14:17:35 -08:00
Bruce Beare
3c543e1da9 x86 syscall system call implementation 2010-03-04 10:29:38 -08:00
Gloria Wang
f199d2d503 QUalcomm H.264 encoder support. 2010-03-03 17:16:48 -08:00
Mike Chan
9f6915631b bonic: libc: cpuacct support for setuid functions
Any of the setuid functions now updates /acct/uid/ with its own tid
before changing users. This is so we can properly account for cpu time
per uid.

Change-Id: I34186cf4d5228cac8439e582a9e26c01ef3011e4
Signed-off-by: Mike Chan <mike@android.com>
2010-03-02 18:18:04 -08:00
Dima Zavin
bd9a90c443 libc: kernel: update pmem header with cache flush ioctl
Change-Id: Ied08844035d4526175dcdcb7f219f9f90c4679d2
Signed-off-by: Dima Zavin <dima@android.com>
2010-03-02 16:10:34 -08:00
Andrei Popescu
eb9d5ed347 add sigaltstack syscall 2010-03-02 11:43:24 +00:00
David 'Digit' Turner
8f8b5310d2 Fix pthread_sigmask() to return correct error values.
Before that, it returned -1 on error and set errno (not Posix)
After the patch, it returns the error code and leaves errno untouched.
2010-03-01 11:30:40 -08:00
David Turner
1f6f493963 Merge "Implement support for RFC 3484 (address selection/sorting) in bionic. (The Java changes required not to mess up the ordering from bionic will arrive in a later commit.) In particular, this will give us more correct behavior when on a 6to4 network, in that IPv4 will usually be preferred over 6to4." 2010-02-24 10:04:09 -08:00
Steinar H. Gunderson
9ab75d4cc8 Implement support for RFC 3484 (address selection/sorting) in bionic. (The
Java changes required not to mess up the ordering from bionic will arrive in a
later commit.) In particular, this will give us more correct behavior when on a
6to4 network, in that IPv4 will usually be preferred over 6to4.

Most of RFC 3484 is implemented -- what's not is rule 3 (avoid deprecated
addresses), 4 (prefer home addresses) and 7 (prefer native transport) as they
require low-level access to the kernel routing table via netlink. (glibc also
started out this way, and these rules are primarily useful in pretty obscure
circumstances, so we should be fine for the time being.)

Also, rule 9 (use longest matching prefix) has been modified so it does not try
to sort IPv4 addresses; given current IPv4 addressing practice these rules are
pretty much meaningless. Finally, I've added support for Teredo as a separate
label, with slightly lower preference than 6to4. (Vista puts the preference
below IPv4 by default. glibc puts the preference together with non-tunneled
IPv6.)

Note that this patch removes support for the "sortlist" directive in
resolv.conf; I've never seen it in actual use, it's irrelevant for Android
(since we don't use resolv.conf anyway), and it's not clear how it would be
implemented alongside RFC 3484.
2010-02-24 11:49:17 +01:00
San Mehat
75c5e25ae3 bionic: syscalls: Add ioprio_set/ioprio_get syscall wrappers
Signed-off-by: San Mehat <san@google.com>
2010-02-23 15:55:29 -08:00
Vladimir Chtchetkine
b55462328f Merge "Merge memory checking functionality from sandbox" 2010-02-17 13:43:15 -08:00
Vladimir Chtchetkine
75fba6888a Merge memory checking functionality from sandbox
Change-Id: I304c789a752c9f4af4944ca14b9bf1e7644da15a
2010-02-16 11:43:18 -08:00
Matt Fischer
e31c1d0b48 Fix pread()/pwrite() stubs
On ARM EABI, 64-bit function parameters must be aligned
to an even/odd register pair.  The weird way these stubs
were written (using separate lo/hi parameters) prevented
this alignment from being enforced by the compiler.
2010-02-12 16:13:46 -06:00
Niko Catania
f31fceaae6 Merge "Changed __get_h_errno linkage to "C"." 2010-02-12 13:46:31 -08:00
David 'Digit' Turner
4f920f685b Fix sem_post() behaviour to wake up multiple waiting threads. 2010-02-12 12:50:32 -08:00
David 'Digit' Turner
294dd0b86b Fix sem_trywait() implementation + update changelog. 2010-02-12 12:18:37 -08:00
Nicolas Catania
2e1a03c16f Changed __get_h_errno linkage to "C".
Bug:2441631
2010-02-12 11:37:25 -08:00
David 'Digit' Turner
1dcf07a84c Fix android_id_from_name to accept "app_0" as a valid ID.
This fixes getpwnam and getpwgrp which returned NULL for "app_0".
"app_0" corresponds to uid/gid 10000 and is perfectly valid.
2010-02-12 11:35:38 -08:00
David Turner
16f7d16f9f Merge "Fix <sys/epoll.h> and <sys/system_properties.h> to include proper C++ inclusion guards" 2010-02-09 14:50:57 -08:00
David 'Digit' Turner
49f0a8f23b Fix <sys/epoll.h> and <sys/system_properties.h> to include proper C++ inclusion guards 2010-02-09 14:05:43 -08:00
Iliyan Malchev
53691d7df2 am 58060c50: am ee424e23: bionic: update processed kernel header a1026.h
Merge commit '58060c50bc4228a7d0253338cae0437211759959'

* commit '58060c50bc4228a7d0253338cae0437211759959':
  bionic: update processed kernel header a1026.h
2010-02-09 09:32:25 -08:00
Iliyan Malchev
58060c50bc am ee424e23: bionic: update processed kernel header a1026.h
Merge commit 'ee424e23c10c051ee4760177c85f6003ff20108c' into eclair-plus-aosp

* commit 'ee424e23c10c051ee4760177c85f6003ff20108c':
  bionic: update processed kernel header a1026.h
2010-02-09 09:25:57 -08:00
Iliyan Malchev
ee424e23c1 bionic: update processed kernel header a1026.h
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-02-08 15:57:09 -08:00
Chris Dearman
bdc6e3c83f Correct generic memset implementation
Signed-off-by: Chris Dearman <chris@mips.com>
2010-02-05 15:13:55 -08:00
Chris Dearman
9bcb91a212 Generic memcpy should define MEMCOPY before including bcopy.c
Signed-off-by: Chris Dearman <chris@mips.com>
2010-02-05 15:13:55 -08:00
André Goddard Rosa
699237baf5 bionic: equalize the <unknown> program name between ssp.c and libc_init_common.c
... for the consistency sake.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-02-05 17:48:07 -02:00
André Goddard Rosa
291100c795 bionic: remove unneeded variable from chk_realloc()
... and simplify the generated code.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-02-05 16:32:56 -02:00
André Goddard Rosa
a28336c735 bionic: on pthread_join(), avoid extra check in case we find the thread
... by using similar logic as used in pthread_detach().

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-02-05 16:21:07 -02:00
André Goddard Rosa
3b06c128cf bionic: ftell() returns a long, not an int
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-02-05 16:05:52 -02:00
Iliyan Malchev
2721fbd208 am c0472409: am d0996bb4: bionic: update processed kernel header tpa2018d1.h
Merge commit 'c0472409d14eebf797df962dd78fc31afbc4bd07'

* commit 'c0472409d14eebf797df962dd78fc31afbc4bd07':
  bionic: update processed kernel header tpa2018d1.h
2010-02-02 16:22:10 -08:00
Iliyan Malchev
34f411e5fd am 7ec87a19: am 276313ec: bionic: add processed kernel headers a1026.h and tpa2018d1.h
Merge commit '7ec87a1926250d3c1f74193bf36417707e691e10'

* commit '7ec87a1926250d3c1f74193bf36417707e691e10':
  bionic: add processed kernel headers a1026.h and tpa2018d1.h
2010-02-02 16:22:06 -08:00
Iliyan Malchev
c0472409d1 am d0996bb4: bionic: update processed kernel header tpa2018d1.h
Merge commit 'd0996bb4cd6b6d0fa7c643a809f01e33adc2638d' into eclair-plus-aosp

* commit 'd0996bb4cd6b6d0fa7c643a809f01e33adc2638d':
  bionic: update processed kernel header tpa2018d1.h
2010-02-02 14:21:05 -08:00
Iliyan Malchev
7ec87a1926 am 276313ec: bionic: add processed kernel headers a1026.h and tpa2018d1.h
Merge commit '276313ec18c18a07e867dffe568a377583cfd905' into eclair-plus-aosp

* commit '276313ec18c18a07e867dffe568a377583cfd905':
  bionic: add processed kernel headers a1026.h and tpa2018d1.h
2010-02-02 14:21:02 -08:00
Iliyan Malchev
d0996bb4cd bionic: update processed kernel header tpa2018d1.h
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-02-02 13:42:55 -08:00
Iliyan Malchev
276313ec18 bionic: add processed kernel headers a1026.h and tpa2018d1.h
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-02-02 11:56:29 -08:00
Tony SIM
1d7a8944d8 added headers for SuperH which automatically generate by update_all.py
base on kernel 2.6.27 arch/sh/include/asm/
2010-02-01 16:06:40 +09:00
Iliyan Malchev
cdcc2648ba bionic: update processed kernel header msm_camera.h
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-01-31 17:22:25 -08:00
André Goddard Rosa
aba3ee7d32 string: tidy up strndup()
It decreases code size:
   text    data     bss     dec     hex filename
    161       0       0     161      a1 strndup-BEFORE.o
    153       0       0     153      99 strndup-AFTER.o

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-01-30 22:29:59 -02:00
André Goddard Rosa
30a419afc3 improve readability of string: fix indentation and remove trailing spaces
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
2010-01-30 22:28:49 -02:00
David 'Digit' Turner
97cf7f3394 Implement clone() C library function properly.
Only provide an implementation for ARM at the moment, since
it requires specific assembly fragments (the standard syscall
stubs cannot be used because the child returns in a different
stack).
2010-01-25 11:18:30 -08:00
David 'Digit' Turner
d6bf8f9229 Add Bionic Changelog in libc/docs/CHANGES.TXT 2010-01-21 16:25:38 -08:00
Colin Cross
fc10b24acc Add implementation of fdprintf, clearenv, and stubs for ttyname_r, *usershell
Change-Id:	I5fe7e8b6ee5edbb49e707c3b6737a58563781fa3
2010-01-15 16:52:35 -08:00
Colin Cross
8c59d96e24 Add killpg function
Change-Id:	I9bc347d264fe38faf2d0f9935d2ebb43a353196e
2010-01-15 16:27:04 -08:00
Colin Cross
64ceac3f49 Add fts, err, and sys/queue for grep
Change-Id:	Id47514a1812d828e95efa2fab0e9c15c5b682b58
2010-01-15 15:57:02 -08:00
Colin Cross
c29731a491 mntent.h requires stdio.h
Change-Id:	If69f64cf088dedb19602bf47627d03400abb9095
2010-01-15 15:57:02 -08:00
Colin Cross
e9d08ba523 Add definition of rlim_t
Change-Id:	Ie8c2451360cbcce9fc1587528a95aca09a03d0de
2010-01-15 15:57:02 -08:00
Colin Cross
2497f65fee Import change from ctype.h revision 1.20 from openbsd
Fixes builds with gcc >= 4.3 with -std=gnu99

Change-Id:	I8729b7f4237fd7a99a82b2fe60573a7afe66b435
2010-01-15 15:57:02 -08:00
Colin Cross
d1cfc947f9 Import include/arpa/telnet.h from BSD
Change-Id:	I684251bfb8ef04f0706866ea55dceebcd2a5b0e1
2010-01-15 15:15:52 -08:00
Colin Cross
4fa7b10564 Import regex from OpenBSD
Change-Id: I7ad7d907ef65e4e345f94777d730813b1270a612
2010-01-15 15:01:44 -08:00
Colin Cross
6458c49c96 Fix ptsname_r(3) return type to match glibc
The gHardy man pages specify the return type of ptsname_r to be char*, but the
return value to be 0 on success, negative on error and the gHardy stdlib.h
defines extern int ptsname_r(...).

Busybox telnetd fails to run successfully without this change.
2010-01-12 12:58:12 -08:00
Elliott Hughes
0b5db51ea6 Merge "Fix usleep(3) return type to be POSIX-compliant." 2010-01-07 15:54:35 -08:00
Ben Cheng
ee84231886 Add user-space ptrace data structure to dump VFP registers and status word. 2009-12-17 12:46:45 -08:00
Elliott Hughes
99d7907611 Fix usleep(3) return type to be POSIX-compliant.
POSIX usleep(3) returns 0 on successful completion, -1 otherwise:
  http://www.opengroup.org/onlinepubs/007908799/xsh/usleep.html

This was found by an external user porting native code:
  http://groups.google.com/group/android-porting/browse_thread/thread/674848f001db0292
2009-12-14 17:07:19 -08:00
Mathias Agopian
278d960aae am f197147a: am ca07064c: am 5f53a182: Revert "Add qsort_r() implementation to the C library."
Merge commit 'f197147a787d7415e6e0a1bad15566836c55befb'

* commit 'f197147a787d7415e6e0a1bad15566836c55befb':
  Revert "Add qsort_r() implementation to the C library."
2009-12-04 04:31:23 -08:00
David 'Digit' Turner
44358b9fed am be71c814: am 20b3097d: am 754c178a: Add qsort_r() implementation to the C library.
Merge commit 'be71c8142d4225dd9af4742ec050f30fcbc2aa5e'

* commit 'be71c8142d4225dd9af4742ec050f30fcbc2aa5e':
  Add qsort_r() implementation to the C library.
2009-12-04 04:29:36 -08:00
Dima Zavin
4cf30fb534 am a0783df1: am df55c642: am e1e68492: Merge change Ifa58a406 into eclair
Merge commit 'a0783df14eaf9b0d858dd42d4e8a64a738314900'

* commit 'a0783df14eaf9b0d858dd42d4e8a64a738314900':
  libc: kernel: Update msm_kgsl.h header
2009-12-03 17:21:46 -08:00
Mathias Agopian
f197147a78 am ca07064c: am 5f53a182: Revert "Add qsort_r() implementation to the C library."
Merge commit 'ca07064c9ebd8523ed88fa09e97feaaafb7e9c15' into eclair-mr2-plus-aosp

* commit 'ca07064c9ebd8523ed88fa09e97feaaafb7e9c15':
  Revert "Add qsort_r() implementation to the C library."
2009-12-03 17:15:16 -08:00
Mathias Agopian
caa17a905a am 5f53a182: Revert "Add qsort_r() implementation to the C library."
Merge commit '5f53a18204ec991f5a77872806eeaa185936aa8c' into eclair-plus-aosp

* commit '5f53a18204ec991f5a77872806eeaa185936aa8c':
  Revert "Add qsort_r() implementation to the C library."
2009-12-03 17:10:45 -08:00
Mathias Agopian
ca07064c9e am 5f53a182: Revert "Add qsort_r() implementation to the C library."
Merge commit '5f53a18204ec991f5a77872806eeaa185936aa8c' into eclair-mr2

* commit '5f53a18204ec991f5a77872806eeaa185936aa8c':
  Revert "Add qsort_r() implementation to the C library."
2009-12-03 17:10:14 -08:00
David 'Digit' Turner
be71c8142d am 20b3097d: am 754c178a: Add qsort_r() implementation to the C library.
Merge commit '20b3097d4cc225d948dac38e778a9d3b3b1549db' into eclair-mr2-plus-aosp

* commit '20b3097d4cc225d948dac38e778a9d3b3b1549db':
  Add qsort_r() implementation to the C library.
2009-12-03 16:44:43 -08:00
Doug Kwan
d548a265ca Add missing symbol type directives. 2009-12-03 16:26:04 -08:00
Mathias Agopian
5f53a18204 Revert "Add qsort_r() implementation to the C library."
This reverts commit 754c178ae5.

Turns out we don't need it afterall (needed a stable sort anyways).
So, we'll make that change in the dev branch instead.
2009-12-03 16:14:40 -08:00
David 'Digit' Turner
20b3097d4c am 754c178a: Add qsort_r() implementation to the C library.
Merge commit '754c178ae551aedcbbfd3bfd1c1c3b710d9ad989' into eclair-mr2

* commit '754c178ae551aedcbbfd3bfd1c1c3b710d9ad989':
  Add qsort_r() implementation to the C library.
2009-12-03 16:00:48 -08:00
David 'Digit' Turner
f7ee5739fa am 754c178a: Add qsort_r() implementation to the C library.
Merge commit '754c178ae551aedcbbfd3bfd1c1c3b710d9ad989' into eclair-plus-aosp

* commit '754c178ae551aedcbbfd3bfd1c1c3b710d9ad989':
  Add qsort_r() implementation to the C library.
2009-12-03 16:00:26 -08:00
David 'Digit' Turner
754c178ae5 Add qsort_r() implementation to the C library.
NOTE: This replaces qsort.c with the FreeBSD version. While
      the patch changes the source, it should not alter the
      implementation that should use the exact same algorithm.
2009-12-03 11:40:15 -08:00
Dima Zavin
a0783df14e am df55c642: am e1e68492: Merge change Ifa58a406 into eclair
Merge commit 'df55c64203ac96fa0447357d1d19e6adee52c8d1' into eclair-mr2-plus-aosp

* commit 'df55c64203ac96fa0447357d1d19e6adee52c8d1':
  libc: kernel: Update msm_kgsl.h header
2009-12-03 02:20:57 -08:00
Dima Zavin
ece132df48 am e1e68492: Merge change Ifa58a406 into eclair
Merge commit 'e1e684920f3bea04f7cccee9f2d7ecd8b9a1ba47' into eclair-plus-aosp

* commit 'e1e684920f3bea04f7cccee9f2d7ecd8b9a1ba47':
  libc: kernel: Update msm_kgsl.h header
2009-12-03 02:14:57 -08:00
Dima Zavin
df55c64203 am e1e68492: Merge change Ifa58a406 into eclair
Merge commit 'e1e684920f3bea04f7cccee9f2d7ecd8b9a1ba47' into eclair-mr2

* commit 'e1e684920f3bea04f7cccee9f2d7ecd8b9a1ba47':
  libc: kernel: Update msm_kgsl.h header
2009-12-03 02:14:56 -08:00
Alexey Tarasov
c22da7ed32 Fix log channel initialization at bionic/logd_write.c.
log_channel_t contains fd member, which is file descriptor for
exact logging channel. change cc05d12716
lacks initialization of this member in __write_to_log_init(), thus
logging code is not working, although not crashable.

Additional details may be found in comments here:
http://review.source.android.com/5617
2009-12-03 11:37:22 +10:00
Dima Zavin
7b12b4a349 libc: kernel: Update msm_kgsl.h header
Change-Id: Ifa58a406c9419c5ad73a1f9456add6dd54bfb2ba
Signed-off-by: Dima Zavin <dima@android.com>
2009-12-02 05:09:56 -08:00
Andy McFadden
5cdb2b73d2 Fix libc logging implementation.
The file descriptor wasn't getting set, so the writev() call was
silently failing.

There's a parallel implementation over in system/core/liblog, but it's
still using the old approach and didn't have this problem.
2009-11-30 17:09:45 -08:00
Android (Google) Code Review
3bbac05726 Merge change Ic1202510
* changes:
  Added a comment.
2009-11-25 16:25:04 -08:00
Andy McFadden
c1202510b6 Added a comment.
The structs for stdin/stdout/stderr are formed with a static initializer
that needs to be updated if something in FILE is changed.
2009-11-25 14:16:53 -08:00
Eric Fischer
780775c812 am ae77aae8: am 07401a68: am cd5df2d9: Rebuild the time zone data files in 32-bit format instead of 64-bit.
Merge commit 'ae77aae80cb78b33f32e65c43a473d5e297b866b'

* commit 'ae77aae80cb78b33f32e65c43a473d5e297b866b':
  Rebuild the time zone data files in 32-bit format instead of 64-bit.
2009-11-24 14:14:02 -08:00