Commit Graph

5149 Commits

Author SHA1 Message Date
Elliott Hughes
13bab43337 Fix the tzdata update tools.
The recent libcore ZoneInfo changes mean that we can no longer
compile libcore's ZoneInfo against the RI. Luckily, the field in
our data file that we needed ZoneInfo for isn't actually used.
This change removes our dependence on libcore.

I've left the field in to avoid a file format change. We can remove
the field if/when we next have a real need to bump the file format.

(cherry-pick of 90cb5ffb85a9bc2e725824b3ca8db932d02c45db.)

Bug: 16168653
Change-Id: Iedad2252c2b49f4d8bb2c7d9078b39b622444ca7
2014-08-06 17:31:48 -07:00
Christopher Ferris
3e7b8e2a8b Merge "Do a second key cleanup in pthread_exit." into lmp-dev 2014-08-06 23:54:36 +00:00
Christopher Ferris
18d93f2793 Do a second key cleanup in pthread_exit.
During pthread_exit, the keys are cleaned. Unfortunately, a call to
free occurs after the cleanup and the memory for some of the keys
is recreated when using jemalloc. The solution is to do the key
cleanup twice.

Also, modify the pthread_detach__leak test to be less flaky
when run on a jemalloc system.

Bug: 16513133
Change-Id: Ic17e8344bdc1ba053c4f5b6d827a4c19c57860c1
2014-08-06 17:12:30 -07:00
Elliott Hughes
501eb513ae Merge "Upgrade bionic to tzdata2014f." into lmp-dev 2014-08-06 23:54:36 +00:00
Elliott Hughes
f2d8c357ee Merge "Remove misleading arm/arm64 PIC_SYM." 2014-08-06 23:49:29 +00:00
Elliott Hughes
651a0683ca Remove misleading arm/arm64 PIC_SYM.
Bug: 16823325
Change-Id: Ic8ff3a628bb4cd71361e3a1c2cfde4b3d39c50b1
2014-08-07 11:52:38 -07:00
Christopher Ferris
e380960813 Do a second key cleanup in pthread_exit.
During pthread_exit, the keys are cleaned. Unfortunately, a call to
free occurs after the cleanup and the memory for some of the keys
is recreated when using jemalloc. The solution is to do the key
cleanup twice.

Also, modify the pthread_detach__leak test to be less flaky
when run on a jemalloc system.

Bug: 16513133

(cherry picked from commit 18d93f2793)

Change-Id: Idb32e7f9b09e2c088d256ed9eb881df80c81ff8e
2014-08-06 17:57:04 -07:00
Elliott Hughes
6edf8985c1 Merge "Fix the tzdata update tools." into lmp-dev 2014-08-06 23:49:20 +00:00
Elliott Hughes
90cb5ffb85 Fix the tzdata update tools.
The recent libcore ZoneInfo changes mean that we can no longer
compile libcore's ZoneInfo against the RI. Luckily, the field in
our data file that we needed ZoneInfo for isn't actually used.
This change removes our dependence on libcore.

I've left the field in to avoid a file format change. We can remove
the field if/when we next have a real need to bump the file format.

Bug: 16168653
Change-Id: Iedad2252c2b49f4d8bb2c7d9078b39b622444ca7
2014-08-06 15:29:10 -07:00
Elliott Hughes
0dc2c1db6f Upgrade bionic to tzdata2014f.
From the release notes:

  Changes affecting future time stamps

    Russia will subtract an hour from most of its time zones on
    2014-10-26 at 02:00 local time.  (Thanks to Alexander Krivenyshev.)
    There are a few exceptions: Magadan Oblast (Asia/Magadan) and
    Zabaykalsky Krai are subtracting two hours; conversely, Chukotka
    Autonomous Okrug (Asia/Anadyr), Kamchatka Krai (Asia/Kamchatka),
    Kemerovo Oblast (Asia/Novokuznetsk), and the Samara Oblast and the
    Udmurt Republic (Europe/Samara) are not changing their clocks.  The
    changed zones are Europe/Kaliningrad, Europe/Moscow,
    Europe/Simferopol, Europe/Volgograd, Asia/Yekaterinburg, Asia/Omsk,
    Asia/Novosibirsk, Asia/Krasnoyarsk, Asia/Irkutsk, Asia/Yakutsk,
    Asia/Vladivostok, Asia/Khandyga, Asia/Sakhalin, and Asia/Ust-Nera;
    Asia/Magadan will have two hours subtracted; and Asia/Novokuznetsk's
    time zone abbreviation is affected, but not its UTC offset.  Two
    zones are added: Asia/Chita (split from Asia/Yakutsk, and also with
    two hours subtracted) and Asia/Srednekolymsk (split from
    Asia/Magadan, but with only one hour subtracted).  (Thanks to Tim
    Parenti for much of the above.)

  Changes affecting past time stamps

    China's five zones have been simplified to two, since the post-1970
    differences in the other three seem to have been imaginary.  The
    zones Asia/Harbin, Asia/Chongqing, and Asia/Kashgar have been
    removed; backwards-compatibility links still work, albeit with
    different behaviors for time stamps before May 1980.  Asia/Urumqi's
    1980 transition to UTC+8 has been removed, so that it is now at
    UTC+6 and not UTC+8.  (Thanks to Luther Ma and to Alois Treindl;
    Treindl sent helpful translations of two papers by Guo Qingsheng.)

    Some zones have been turned into links, when they differed from
    existing zones only for older UTC offsets where the data were likely
    invented.  These changes affect UTC offsets in pre-1970 time stamps
    only.  This is similar to the change in release 2013e, except this
    time for western Africa.  The affected zones are: Africa/Bamako,
    Africa/Banjul, Africa/Conakry, Africa/Dakar, Africa/Freetown,
    Africa/Lome, Africa/Nouakchott, Africa/Ouagadougou, Africa/Sao_Tome,
    and Atlantic/St_Helena.  This also affects the
    backwards-compatibility link Africa/Timbuktu.  (Thanks to Alan
    Barrett, Stephen Colebourne, Tim Parenti, and David Patte for
    reporting problems in earlier versions of this change.)

    Asia/Shanghai's pre-standard-time UT offset has been changed from
    8:05:57 to 8:05:43, the location of Xujiahui Observatory.  Its
    transition to standard time has been changed from 1928 to 1901.

    Asia/Taipei switched to JWST on 1896-01-01, then to JST on
    1937-10-01, then to CST on 1945-09-21 at 01:00, and did not observe
    DST in 1945.  In 1946 it observed DST from 05-15 through 09-30; in
    1947 from 04-15 through 10-31; and in 1979 from 07-01 through 09-30.
    (Thanks to Yu-Cheng Chuang.)

    Asia/Riyadh's transition to standard time is now 1947-03-14, not
    1950.

    Europe/Helsinki's 1942 fall-back transition was 10-04 at 01:00, not
    10-03 at 00:00.  (Thanks to Konstantin Hyppönen.)

    Pacific/Pago_Pago has been changed from UTC-11:30 to UTC-11 for the
    period from 1911 to 1950.

    Pacific/Chatham has been changed to New Zealand standard time plus
    45 minutes for the period before 1957, reflecting a 1956 remark in
    the New Zealand parliament.

    Europe/Budapest has several pre-1946 corrections: in 1918 the
    transition out of DST was on 09-16, not 09-29; in 1919 it was on
    11-24, not 09-15; in 1945 it was on 11-01, not 11-03; in 1941 the
    transition to DST was 04-08 not 04-06 at 02:00; and there was no DST
    in 1920.

    Africa/Accra is now assumed to have observed DST from 1920 through
    1935.

    Time in Russia before 1927 or so has been corrected by a few seconds
    in the following zones: Europe/Moscow, Asia/Irkutsk, Asia/Tbilisi,
    Asia/Tashkent, Asia/Vladivostok, Asia/Yekaterinburg,
    Europe/Helsinki, and Europe/Riga.  Also, Moscow's location has been
    changed to its Kilometer 0 point.  (Thanks to Vladimir Karpinsky for
    the Moscow changes.)

Bug: 16168653
Change-Id: I23827254bcf50dd07a2192ed34b02224d73e07a0
2014-08-06 15:26:13 -07:00
Paul Jensen
8019e6f0fd am 7a5f0952: Merge "Revert most of "Cleanup: Delete dead code."" into lmp-dev
* commit '7a5f0952a293fd6e511db0e0a72e18f20bb4c500':
  Revert most of "Cleanup: Delete dead code."
2014-08-06 19:50:01 +00:00
Elliott Hughes
428483446e am bb91a1b8: Merge "Workaround b/16818336 which fails build under aggressive inlining."
* commit 'bb91a1b845f7c8b3b09d07fe467aa32d2aeddc4f':
  Workaround b/16818336 which fails build under aggressive inlining.
2014-08-06 18:53:23 +00:00
Elliott Hughes
10d197c681 am 8b91980e: Merge "Explain how wcswcs ended up in ndk_cruft.cpp."
* commit '8b91980e4c139558f9cca4e9a0980dad07c06e68':
  Explain how wcswcs ended up in ndk_cruft.cpp.
2014-08-06 18:02:59 +00:00
Elliott Hughes
8b91980e4c Merge "Explain how wcswcs ended up in ndk_cruft.cpp." 2014-08-06 17:20:04 +00:00
Elliott Hughes
1628eb1d43 Explain how wcswcs ended up in ndk_cruft.cpp.
Change-Id: Ie45148095b2d5c3896c0df623d5d06a700c33c70
2014-08-06 10:47:33 -07:00
Elliott Hughes
9d2a05a6dd Revert "Add a hack to <stdlib.h> until we can fix libvpx."
This reverts commit 3fb5097a7e.
libvpx is now fixed.

(cherry-pick of 2be1be47aa9b63568fe6ce1e0a4029b37d90764d.)

Bug: 15598056
Change-Id: Icca974e667f92206505f484bd291726eb0150f68
2014-08-06 13:20:41 -07:00
Dan Albert
bc0d65c114 Merge "Proper MB_CUR_MAX." into lmp-dev 2014-08-06 17:14:55 +00:00
Dan Albert
6035e6cc83 Proper MB_CUR_MAX.
Previously this was hard coded to 4. This is only the case for UTF-8
locales.

As a side effect, this properly reports C.UTF-8 as the default locale
instead of C.

Change-Id: I7c73cc8fe6ffac61d211cd5f75287e36de06f4fc
(cherry picked from commit 1aec7c1a35)
2014-08-06 13:17:43 -07:00
Dan Albert
5b39a44575 Merge "Fix mbsrtowcs(3) src param for finished string." into lmp-dev 2014-08-06 17:19:40 +00:00
Dan Albert
938a8008a6 Fix mbsrtowcs(3) src param for finished string.
A mistake I made while cleaning this up the first time through.
mbstrtowcs(3) sets the src param to null if it finishes the string.

Change-Id: I6263646e25d9537043b7025fd1dd6ae195f365e2
(cherry picked from commit b6cc8e00cd)
2014-08-06 13:00:54 -07:00
Dan Albert
40079b0031 Fixes build.
This change somehow went missing from the vfork change.

Change-Id: I807a2072080eac20601c694e85ba5723220289d8
(cherry picked from commit 9eae8405e8)
2014-08-06 12:32:28 -07:00
Dan Albert
5386a741e7 Revert "Replaces vfork() implementation with fork()"
We're getting cold feet on this one... let's put it back.

This reverts commit 210331d976.

Change-Id: I6b0d3c2b1dbf7f1dc9566979a91b7504c2189269
(cherry picked from commit 6a918870ba)
2014-08-06 12:32:22 -07:00
Elliott Hughes
00a8344ae8 Merge "Workaround b/16818336 which fails build under aggressive inlining." into lmp-dev 2014-08-06 17:14:55 +00:00
Elliott Hughes
0a693b4fc8 am afc86723: Merge "Add an obvious comment to <stdio.h> for fixincludes."
* commit 'afc8672387438f9c8926a12831f43a6dd1f59323':
  Add an obvious comment to <stdio.h> for fixincludes.
2014-08-06 16:13:37 +00:00
Dehao Chen
7aa27e1c1a Workaround b/16818336 which fails build under aggressive inlining.
Change-Id: Ifcd596714c427a2ec39502b9c0af9082ded91884
2014-08-05 18:09:01 -07:00
Dan Albert
909464c2cb am de69069f: Merge "Fixes build."
* commit 'de69069fcfee8d89dfc70da374760ef0c29fe0a4':
  Fixes build.
2014-08-05 21:55:18 +00:00
Dan Albert
dfe8417a58 am a7ef8188: Merge "Revert "Replaces vfork() implementation with fork()""
* commit 'a7ef8188e24446d41c5abbe9addf55cc6a128968':
  Revert "Replaces vfork() implementation with fork()"
2014-08-05 21:43:20 +00:00
Elliott Hughes
df85f50b82 Add an obvious comment to <stdio.h> for fixincludes.
We don't want GCC's fixincludes to touch our <stdio.h> because we
want to support multiple platform versions with one toolchain. Give
them a nice easy unambiguous string to look for.

Bug: http://code.google.com/p/android/issues/detail?id=73728
Change-Id: I15cb9a2c9eb0a44b0965dc2139f224f2b6e68ea1
2014-08-06 09:03:52 -07:00
Dan Albert
9eae8405e8 Fixes build.
This change somehow went missing from the vfork change.

Change-Id: I807a2072080eac20601c694e85ba5723220289d8
2014-08-05 14:46:03 -07:00
Dan Albert
6a918870ba Revert "Replaces vfork() implementation with fork()"
We're getting cold feet on this one... let's put it back.

This reverts commit 210331d976.

Change-Id: I6b0d3c2b1dbf7f1dc9566979a91b7504c2189269
2014-08-05 14:11:38 -07:00
Dehao Chen
28285f85a1 Workaround b/16818336 which fails build under aggressive inlining.
(cherry-pick of 7aa27e1c1a53afe28f6180fd1fc50d096cabea7b.)

Change-Id: Ifcd596714c427a2ec39502b9c0af9082ded91884
2014-08-06 11:43:38 -07:00
Paul Jensen
7a5f0952a2 Merge "Revert most of "Cleanup: Delete dead code."" into lmp-dev 2014-08-05 00:19:02 +00:00
Elliott Hughes
59b0933e6d Explain how wcswcs ended up in ndk_cruft.cpp.
(cherry picked from commit 1628eb1d43)

Change-Id: I335b35038781d0426b3647727e6c4f22c83e187b
2014-08-06 10:58:17 -07:00
Paul Jensen
1544eae56e Revert most of "Cleanup: Delete dead code."
This reverts most of commit 2582f02a01.
The DNS cache flushing code needs to be called when routes change.

Change-Id: I5b04121bc428cc6a2e136b6c3269c395bfb4981f
bug:16549455
2014-08-06 13:38:16 -04:00
Dan Albert
b782c20b82 am 447fe1c2: Merge "Fix mbsrtowcs(3) src param for finished string."
* commit '447fe1c23bc5adaded9a51d3b58f3adaf2cce7b3':
  Fix mbsrtowcs(3) src param for finished string.
2014-07-31 22:28:59 +00:00
Dan Albert
0c4ad535dc am 36bacd23: Merge "Proper MB_CUR_MAX."
* commit '36bacd237de931c48714d1a8aa4aa9522283e407':
  Proper MB_CUR_MAX.
2014-07-31 00:22:22 +00:00
Dan Albert
1aec7c1a35 Proper MB_CUR_MAX.
Previously this was hard coded to 4. This is only the case for UTF-8
locales.

As a side effect, this properly reports C.UTF-8 as the default locale
instead of C.

Change-Id: I7c73cc8fe6ffac61d211cd5f75287e36de06f4fc
2014-07-30 17:09:46 -07:00
Christopher Ferris
30ac3d58ea am 0f7ed163: Merge "Fix memchr with a zero length."
* commit '0f7ed163cf6c1fe6d71a1d7e5fb6d0989213be85':
  Fix memchr with a zero length.
2014-07-30 23:33:45 +00:00
Christopher Ferris
61833de613 Fix memchr with a zero length.
The memchr implementation for 64 bit fails if these conditions occur:

- The buffer is 32 byte aligned.
- The buffer contains the character in the first byte.
- The count sent in is zero.

The function should return NULL, but it's not.

Bug: 16676625

(cherry picked from commit e03e1eac0b)

Change-Id: Ie4cca2c445127a0936ee2b96651a8e7204fbaffd
2014-07-30 16:33:11 -07:00
Elliott Hughes
897aca77ee am 83b9826e: Merge "Implement <sys/fsuid.h>."
* commit '83b9826e683db30e9b359737253b87ef8b3ba3df':
  Implement <sys/fsuid.h>.
2014-07-30 23:25:22 +00:00
Elliott Hughes
4f76469e88 Implement <sys/fsuid.h>.
(cherry picked from commit 79310994d2)

Change-Id: I47688273691e5c95e5e9302eba254ccaaaad40ca
2014-07-30 16:18:03 -07:00
Elliott Hughes
abd2844578 am c7706a02: Merge "[MIPSR6] Use C-coded string ops on mips32r6/mips64r6"
* commit 'c7706a02ad90ab73f3a056040d2c4a3464ab1ab1':
  [MIPSR6] Use C-coded string ops on mips32r6/mips64r6
2014-07-30 22:21:57 +00:00
Duane Sand
cd54195262 [MIPSR6] Use C-coded string ops on mips32r6/mips64r6
The existing assembler code uses deprecated lwl/lwr/swl/swr ops.
Replacing those with misalignment-forgiving lw/sw ops may
involve careful performance tuning.

(cherry picked from commit bc5a3ec6df)

Change-Id: I35167da27f2d406339b7f24b4a1fb270c87bc12e
2014-07-30 15:17:12 -07:00
Elliott Hughes
594a527518 am 18a1bbe6: Merge "Only wipe TLS for user-supplied stacks."
* commit '18a1bbe6e18770694d489f2e140e779dc59fde86':
  Only wipe TLS for user-supplied stacks.
2014-07-30 22:02:31 +00:00
Elliott Hughes
11bf8a3025 Only wipe TLS for user-supplied stacks.
Bug: 16667988

(cherry picked from commit 40a5217448)

Change-Id: I7550fa47b76e643323aa3e2a53529e393c829e47
2014-07-30 14:56:34 -07:00
Christopher Ferris
0f7ed163cf Merge "Fix memchr with a zero length." 2014-07-30 20:40:05 +00:00
Christopher Ferris
e03e1eac0b Fix memchr with a zero length.
The memchr implementation for 64 bit fails if these conditions occur:

- The buffer is 32 byte aligned.
- The buffer contains the character in the first byte.
- The count sent in is zero.

The function should return NULL, but it's not.

Bug: 16676625
Change-Id: Iab33cc7a8b79920350c72f054dff0e0a3cde69ce
2014-07-30 16:06:56 -07:00
Elliott Hughes
40a5217448 Only wipe TLS for user-supplied stacks.
Bug: 16667988
Change-Id: Id180ab2bc6713e1612386120a306db5bbf1d6046
2014-07-30 14:49:40 -07:00
Elliott Hughes
4d17c6c39f am f6aa1779: Merge "Revert "Added a bionic systrace class and tracing to pthread_mutex.cpp."" into lmp-dev
* commit 'f6aa17798c5b0015d002b982c3684595b817d2d0':
  Revert "Added a bionic systrace class and tracing to pthread_mutex.cpp."
2014-07-30 16:41:43 +00:00
Dan Albert
b6cc8e00cd Fix mbsrtowcs(3) src param for finished string.
A mistake I made while cleaning this up the first time through.
mbstrtowcs(3) sets the src param to null if it finishes the string.

Change-Id: I6263646e25d9537043b7025fd1dd6ae195f365e2
2014-07-31 11:31:03 -07:00
Christopher Ferris
c701e5b335 Use libunwindbacktrace for debug malloc code.
Create a method of disabling the debug allocation code paths so that
it's possible to use the libunwindbacktrace library without any
modifications.

Use this path to create and destroy the maps for the process. It's not
stricly necessary in the init code since the symbols are not modified
until after the initialize calls.

Also, remove the debug_XXX source files that doesn't need to be in libc.so.

Fix the maps reading code since it was completely broken for 64 bit.

Bug: 16408686

(cherry picked from commit 861c0ef37b)

Change-Id: I04445f0cf9a1e85172b64d57df92eb7939ce2332
2014-07-29 19:30:09 -07:00
Christopher Ferris
4cc7dba978 am 4ad5066e: Merge "Use libunwindbacktrace for debug malloc code."
* commit '4ad5066e1de326e5db46df18eeade9a88bc11bec':
  Use libunwindbacktrace for debug malloc code.
2014-07-30 02:23:58 +00:00
Elliott Hughes
eb0642a2b9 am 17886971: Merge "Remove declarations for things that don\'t exist."
* commit '17886971ffc758270bb3da3fecec86fa5b2bb3c3':
  Remove declarations for things that don't exist.
2014-07-30 01:12:55 +00:00
Elliott Hughes
1242f7eb67 Remove declarations for things that don't exist.
The <grp.h> ones prevent gdb from building out of the box.

(cherry picked from commit f4c1a36a45)

Change-Id: I6958f2f1731de8c03df20b383decd414b78100aa
2014-07-29 17:48:01 -07:00
Elliott Hughes
c7706a02ad Merge "[MIPSR6] Use C-coded string ops on mips32r6/mips64r6" 2014-07-29 21:36:05 +00:00
Elliott Hughes
f6aa17798c Merge "Revert "Added a bionic systrace class and tracing to pthread_mutex.cpp."" into lmp-dev 2014-07-29 21:36:00 +00:00
Elliott Hughes
26c1420fbb Revert "Added a bionic systrace class and tracing to pthread_mutex.cpp."
This reverts commit a09fe118b1.

Change-Id: Ia2eb07b57a25dc2ac76fecc0925efb2bed998156
2014-07-29 23:52:29 +00:00
Dan Albert
7149362d33 en_US.UTF-8 is also supported.
Change-Id: Ic35fad3596dc5e24ee8ae35543a274a471f27bb2
(cherry picked from commit 1abb8bd21d)
2014-07-29 14:20:47 -07:00
Dan Albert
d0a80a927f There is no _MIN for unsigned types.
Change-Id: I49c38e51197b750210bdbf28c9cf6db30452a206
(cherry picked from commit ee7f1b5946)
2014-07-29 14:20:37 -07:00
Dan Albert
4e58609587 Fix mbsrtowcs(3)'s handling of len parameter.
The len parameter is a _maximum_ length. The previous code was treating
it as an exact length, causing the following typical call to fail:

    mbsrtowcs(out, &in, sizeof(out), state); // sizeof(out) > strlen(in)

Change-Id: I48e474fd54ea5f122bc168a4d74bfe08704f28cc
(cherry picked from commit 6b55ba54ef)
2014-07-29 14:20:31 -07:00
Dan Albert
1dd1b88bde __libc_fatal should print a newline to stderr.
Change-Id: I088dc880d7488a65beac8cda95f530f3db41f112
(cherry picked from commit 97e31dedf0)
2014-07-29 14:20:15 -07:00
Elliott Hughes
e9c1d67375 am a7dc7600: Merge "Fix linkage of grantpt(3)."
* commit 'a7dc7600fe1be1f3fd61856b407bb7065307e711':
  Fix linkage of grantpt(3).
2014-07-29 17:52:05 +00:00
Elliott Hughes
2ea0a58e01 Fix linkage of grantpt(3).
Also clean up the implementation of all the pty functions, add tests,
and fix the stub implementations of ttyname(3) and ttyname_r(3).

Bug: https://code.google.com/p/android/issues/detail?id=58888

(cherry picked from commit 4916706cfe)

Change-Id: I5cb7a1c17b156456e4c4818e65f256eb8d045424
2014-07-29 10:48:34 -07:00
Elliott Hughes
1b36954017 am 52f8271f: Merge "Added a bionic systrace class and tracing to pthread_mutex.cpp."
* commit '52f8271fa9fd3f84849465f3c978580fbed866c1':
  Added a bionic systrace class and tracing to pthread_mutex.cpp.
2014-07-29 16:47:01 +00:00
Brigid Smith
a09fe118b1 Added a bionic systrace class and tracing to pthread_mutex.cpp.
bionic_systrace.h contains an implementation of tracing that
can be used with systrace.py and its associated viewer.  pthread_mutex
now uses this tracing to track pthread_mutex contention, which can be
enabled by using the "bionic" command line option to systrace.

Bug: 15116468

(cherry picked from commit a406ee6d5f)

Change-Id: Ic98fc303689fe9384974150d0d258c50806a55e4
2014-07-29 09:41:44 -07:00
Elliott Hughes
3164805b2e am 2be1be47: Revert "Add a hack to <stdlib.h> until we can fix libvpx."
* commit '2be1be47aa9b63568fe6ce1e0a4029b37d90764d':
  Revert "Add a hack to <stdlib.h> until we can fix libvpx."
2014-07-28 23:50:42 +00:00
Elliott Hughes
2be1be47aa Revert "Add a hack to <stdlib.h> until we can fix libvpx."
This reverts commit 3fb5097a7e.
libvpx is now fixed.

Bug: 15598056
Change-Id: Icca974e667f92206505f484bd291726eb0150f68
2014-07-28 16:16:38 -07:00
Elliott Hughes
a032277bb4 am 8a2ecf86: Merge "syscall(3)\'s return type should be long."
* commit '8a2ecf868feebaa39caddc6cdf9500b5385651f0':
  syscall(3)'s return type should be long.
2014-07-28 22:47:57 +00:00
Christopher Ferris
4ad5066e1d Merge "Use libunwindbacktrace for debug malloc code." 2014-07-28 22:45:44 +00:00
Christopher Ferris
861c0ef37b Use libunwindbacktrace for debug malloc code.
Create a method of disabling the debug allocation code paths so that
it's possible to use the libunwindbacktrace library without any
modifications.

Use this path to create and destroy the maps for the process. It's not
stricly necessary in the init code since the symbols are not modified
until after the initialize calls.

Also, remove the debug_XXX source files that doesn't need to be in libc.so.

Fix the maps reading code since it was completely broken for 64 bit.

Bug: 16408686

Change-Id: I6b02ef6ce26fdb7a59ad1029e7cbba9accceb704
2014-07-29 18:10:00 -07:00
Elliott Hughes
a7dc7600fe Merge "Fix linkage of grantpt(3)." 2014-07-28 22:45:44 +00:00
Elliott Hughes
78e4f8fed2 syscall(3)'s return type should be long.
This doesn't require us to change any of the syscall implementations
because (a) the LP32 ones have sizeof(int) == sizeof(long) anyway,
which is how we never noticed this bug before and (b) the LP64 ones
all use a 64-bit register for the result (and for the syscall number
too).

Bug: https://code.google.com/p/android/issues/detail?id=73952
Bug: 16568314

(cherry picked from commit 21972b61ec)

Change-Id: Ifbc424be29e5650ec72a24df25dd35f24fdd5b3c
2014-07-28 15:39:24 -07:00
Elliott Hughes
d201486cdb am b1b60c30: Use vsnprintf(3) in syslog(3).
* commit 'b1b60c30bf321c0fc02264b953b5c16c49d34457':
  Use vsnprintf(3) in syslog(3).
2014-07-28 16:47:40 +00:00
Elliott Hughes
b1b60c30bf Use vsnprintf(3) in syslog(3).
It seemed like a clever trick to use the internal log message formatting
code in syslog(3), but on reflection that means you can't (for example)
format floating point numbers. This patch switches us over to using good
old vsnprintf(3), even though that requires us to jump through a few hoops.

There's no obvious way to unit test this, so I wrote a little program and
ran that.

Bug: 14292866
Change-Id: I9c83500ba9cbb209b6f496067a91bf69434eeef5
2014-07-28 09:33:00 -07:00
Elliott Hughes
4916706cfe Fix linkage of grantpt(3).
Also clean up the implementation of all the pty functions, add tests,
and fix the stub implementations of ttyname(3) and ttyname_r(3).

Bug: https://code.google.com/p/android/issues/detail?id=58888
Change-Id: I0fb36438cd1abf8d4e87c29415f03db9ba13c3c2
2014-07-25 19:55:23 -07:00
Elliott Hughes
c1a6a72560 Remove localtime_tz and strftime_tz.
This also brings our copy of strftime.c much closer to upstream, though
we still have several GNU extensions and hacks to deal with Android32's
broken time_t.

Bug: 15765976

(cherry picked from commit 39d903aea9)

Change-Id: Ie278d3e976b7adc77bad5ce795dd4899cfbf3648
2014-07-25 17:28:52 -07:00
Elliott Hughes
e7e5e37ca4 am 1a918d9b: Merge "Remove localtime_tz and strftime_tz."
* commit '1a918d9be83013cdc8e194edf35b5295eba4ab1c':
  Remove localtime_tz and strftime_tz.
2014-07-25 23:26:24 +00:00
Elliott Hughes
708c112054 Start hiding "private/bionic_time.h".
Bug: 15765976

(cherry picked from commit 905e6d58aa)

Change-Id: Ic7435308e8b521886f42ac7bf59531924921ea67
2014-07-25 15:24:57 -07:00
Elliott Hughes
4b4ee2fc1b am 50a9630c: Merge "Start hiding "private/bionic_time.h"."
* commit '50a9630cc26cbc1e38e3ddc589f04fa5cd91697b':
  Start hiding "private/bionic_time.h".
2014-07-25 22:21:42 +00:00
Elliott Hughes
f4c1a36a45 Remove declarations for things that don't exist.
The <grp.h> ones prevent gdb from building out of the box.

Change-Id: I0efbffad2215cfcd75b4d442dfc972444b51d97c
2014-07-29 16:57:47 -07:00
Brigid Smith
a406ee6d5f Added a bionic systrace class and tracing to pthread_mutex.cpp.
bionic_systrace.h contains an implementation of tracing that
can be used with systrace.py and its associated viewer.  pthread_mutex
now uses this tracing to track pthread_mutex contention, which can be
enabled by using the "bionic" command line option to systrace.

Bug: 15116468
Change-Id: I30ed5b377c91ca4c36568a0e647ddf95d4e4a61a
2014-07-28 19:38:08 -07:00
Dan Albert
779fdd7c0d am a4c14fda: Merge "en_US.UTF-8 is also supported."
* commit 'a4c14fda9176678cadb65fb53f503fda6668f8d1':
  en_US.UTF-8 is also supported.
2014-07-25 19:06:44 +00:00
Elliott Hughes
d00b2327c5 am b902641d: Implement twalk(3), add unit tests.
* commit 'b902641d7303d2ea24c10f6d6e7ff49e7ee75611':
  Implement twalk(3), add unit tests.
2014-07-24 23:36:16 +00:00
Elliott Hughes
b902641d73 Implement twalk(3), add unit tests.
I've also added insque(3) and remque(3) (from NetBSD because the OpenBSD
ones are currently broken for non-circular lists).

I've not added the three hash table functions that should be in this header
because they operate on a single global hash table and thus aren't likely
to be useful.

Bug: https://code.google.com/p/android/issues/detail?id=73719

(cherry picked from commit 3e424d0a24)

Change-Id: I5882a6b48c80fea8ac6b9c27e7b9de10b202b4ff
2014-07-24 15:14:06 -07:00
Elliott Hughes
21972b61ec syscall(3)'s return type should be long.
This doesn't require us to change any of the syscall implementations
because (a) the LP32 ones have sizeof(int) == sizeof(long) anyway,
which is how we never noticed this bug before and (b) the LP64 ones
all use a 64-bit register for the result (and for the syscall number
too).

Bug: https://code.google.com/p/android/issues/detail?id=73952
Change-Id: I9866c3579a7a94de27bfbe80ad7a822c3183c7fb
2014-07-28 12:33:07 -07:00
Elliott Hughes
50a9630cc2 Merge "Start hiding "private/bionic_time.h"." 2014-07-24 20:55:36 +00:00
Elliott Hughes
905e6d58aa Start hiding "private/bionic_time.h".
Bug: 15765976
Change-Id: Ibd9cf07067ec8dffe9fda6c3d498d4ab90708220
2014-07-25 12:03:51 -07:00
Elliott Hughes
39d903aea9 Remove localtime_tz and strftime_tz.
This also brings our copy of strftime.c much closer to upstream, though
we still have several GNU extensions and hacks to deal with Android32's
broken time_t.

Bug: 15765976
Change-Id: Ic9ef36e8acd3619504ecc4d73feec2b61fd4dfa1
2014-07-25 15:50:31 -07:00
Dan Albert
1abb8bd21d en_US.UTF-8 is also supported.
Change-Id: Ic35fad3596dc5e24ee8ae35543a274a471f27bb2
2014-07-25 11:24:03 -07:00
Elliott Hughes
f1e83cc34a Use vsnprintf(3) in syslog(3).
It seemed like a clever trick to use the internal log message formatting
code in syslog(3), but on reflection that means you can't (for example)
format floating point numbers. This patch switches us over to using good
old vsnprintf(3), even though that requires us to jump through a few hoops.

There's no obvious way to unit test this, so I wrote a little program and
ran that.

(cherry-pick of b1b60c30bf321c0fc02264b953b5c16c49d34457.)

Bug: 14292866
Change-Id: I9c83500ba9cbb209b6f496067a91bf69434eeef5
2014-07-28 09:43:21 -07:00
Christopher Ferris
efbb837dc4 am bc74ecfa: HACK: Disable syslog going to android log.
* commit 'bc74ecfaf5de47056fd8a48db65c0e5aef892f0c':
  HACK: Disable syslog going to android log.
2014-07-24 19:47:58 +00:00
Colin Cross
abca870989 am 49fbec6d: HACK: remove %m support from printf.
* commit '49fbec6d9aee62462a4acf3ba47788ca1e35be37':
  HACK: remove %m support from printf.
2014-07-24 19:23:45 +00:00
Elliott Hughes
c6f39339de am 8dbe3f0f: Merge "[MIPS] Drop soft-fp targets"
* commit '8dbe3f0f51f0cd26c22df82bdef9a2f8caea7ef6':
  [MIPS] Drop soft-fp targets
2014-07-24 18:29:55 +00:00
Duane Sand
5ade7e3f6b [MIPS] Drop soft-fp targets
(cherry picked from commit ba23bd0a40)

Change-Id: Ica09192c2760d38ceebc14e23a5d3ba94c20764c
2014-07-24 11:17:55 -07:00
Duane Sand
c86950cb3f [MIPSR6] setjmp supports mips32r6 and FP64A/FPXX reg models
Save and restore floating point registers via 64-bit
load/stores when possible.  Use assembler's builtin macro
ops to generate pairs of 32-bit load/stores on Mips I cpus.

Some cpus or FR modes have only 16 even-numbered dp fp regs.
This is exposed by _MIPS_FPSET, defined by existing compilers.

(cherry picked from commit dd37251c47)

Change-Id: Ibd43653701a363a77af85121d3cbd229d132a06a
2014-07-23 21:04:20 -07:00
Elliott Hughes
0caa27b148 am 7d22a451: Merge "[MIPSR6] setjmp supports mips32r6 and FP64A/FPXX reg models"
* commit '7d22a4519610f830178bbff32d961a2784354397':
  [MIPSR6] setjmp supports mips32r6 and FP64A/FPXX reg models
2014-07-24 04:03:03 +00:00
Christopher Ferris
bc74ecfaf5 HACK: Disable syslog going to android log.
Bug: 14292866

Change-Id: I3adc448dbacfeecd32508ddccf27be3aa653e466
2014-07-23 18:08:09 -07:00
Elliott Hughes
79310994d2 Implement <sys/fsuid.h>.
Change-Id: I1e5e50444a1b5a430ba5b5d9b8b1d91219af5e92
2014-07-30 15:19:29 -07:00
Elliott Hughes
d6f614a4e1 Merge "Implement twalk(3), add unit tests." 2014-07-24 22:07:52 +00:00
Elliott Hughes
3e424d0a24 Implement twalk(3), add unit tests.
I've also added insque(3) and remque(3) (from NetBSD because the OpenBSD
ones are currently broken for non-circular lists).

I've not added the three hash table functions that should be in this header
because they operate on a single global hash table and thus aren't likely
to be useful.

Bug: https://code.google.com/p/android/issues/detail?id=73719
Change-Id: I97397a7b921e2e860fd9c8032cafd9097380498a
2014-07-24 14:55:29 -07:00
Colin Cross
49fbec6d9a HACK: remove %m support from printf.
The change that added this support causes a cpu hard lock on one
device.  This code clearly isn't at fault, but disabling it to
unblock until we can find a real fix.

Bug: 16484311
Change-Id: I33834dc49d959ae403b10d2c7cad12ae2950f772
2014-07-23 14:56:20 -07:00
Duane Sand
bc5a3ec6df [MIPSR6] Use C-coded string ops on mips32r6/mips64r6
The existing assembler code uses deprecated lwl/lwr/swl/swr ops.
Replacing those with misalignment-forgiving lw/sw ops may
involve careful performance tuning.

Change-Id: I47a042f7b22b87d7d52e46c29c44b1db1ba8b693
2014-07-23 14:00:21 -07:00
Elliott Hughes
0200a28583 am f9bfc2ff: Merge "Fix belated review comments on syslog change."
* commit 'f9bfc2ff8eb5db99a106a8a384498165361291ce':
  Fix belated review comments on syslog change.
2014-07-23 20:18:59 +00:00
Elliott Hughes
4126c12961 Fix belated review comments on syslog change.
Bug: 14292866

(cherry picked from commit afe6360627)

Change-Id: I8e3cc6b37b2539e51a27261ffb5d6e58266ce11d
2014-07-23 13:11:15 -07:00
Elliott Hughes
7d22a45196 Merge "[MIPSR6] setjmp supports mips32r6 and FP64A/FPXX reg models" 2014-07-23 18:45:08 +00:00
Duane Sand
dd37251c47 [MIPSR6] setjmp supports mips32r6 and FP64A/FPXX reg models
Save and restore floating point registers via 64-bit
load/stores when possible.  Use assembler's builtin macro
ops to generate pairs of 32-bit load/stores on Mips I cpus.

Some cpus or FR modes have only 16 even-numbered dp fp regs.
This is exposed by _MIPS_FPSET, defined by existing compilers.

Change-Id: I7f617a3ffea8da41c402ef3a68ab32c91d3d7622
2014-07-23 13:57:30 -07:00
Elliott Hughes
e34ce3741f am 2aa142ff: Fix generate-NOTICE to cope better with BSD __COPYRIGHT macros.
* commit '2aa142ffb20337e60f81642bed1c11d24a3756b1':
  Fix generate-NOTICE to cope better with BSD __COPYRIGHT macros.
2014-07-23 18:42:30 +00:00
Elliott Hughes
afe6360627 Fix belated review comments on syslog change.
Bug: 14292866
Change-Id: I3cd92084cb55b5673f6ba62d51952941b79deb51
2014-07-23 11:38:38 -07:00
Elliott Hughes
2aa142ffb2 Fix generate-NOTICE to cope better with BSD __COPYRIGHT macros.
(cherry picked from commit 5d2f86f363)

Change-Id: Iddf22c8d9ff7a4d1205d37bb58c6235af681d795
2014-07-23 11:36:21 -07:00
Duane Sand
ba23bd0a40 [MIPS] Drop soft-fp targets
Change-Id: I583bf8242d3034ebfc48548499cdb3316094c8e3
2014-07-24 18:04:21 +00:00
Elliott Hughes
5cd06abdcf am ea42a6ca: Merge "Fix a couple of bugs in generate-NOTICE and regenerate the NOTICE files."
* commit 'ea42a6caea9d5cb5a92939ba0696856306b1d56b':
  Fix a couple of bugs in generate-NOTICE and regenerate the NOTICE files.
2014-07-23 16:42:30 +00:00
Elliott Hughes
4ac83fad3c Fix a couple of bugs in generate-NOTICE and regenerate the NOTICE files.
(cherry picked from commit 3758a244cf)

Change-Id: I6ffb83b4a7b7746b095205c664cf025a72ead179
2014-07-23 09:39:40 -07:00
Elliott Hughes
3ff6d95a9b Remove the unused swab.S.
(cherry picked from commit ca70453e84)

Change-Id: I4dc13de0bdeb7abb3bd47b0397546ad7d1f11d49
2014-07-22 20:43:55 -07:00
Elliott Hughes
ad87093f04 am e26ac7f7: Merge "Remove the unused swab.S."
* commit 'e26ac7f776c4011d17e7609efafa116ac4db25ff':
  Remove the unused swab.S.
2014-07-23 03:33:41 +00:00
Elliott Hughes
b5031b5d6b am 79b5a396: Merge "[MIPS] Allow united mipsel and mips64el gcc toolchain"
* commit '79b5a396178e798af4ba9b327b884ae014f15bb2':
  [MIPS] Allow united mipsel and mips64el gcc toolchain
2014-07-23 02:44:48 +00:00
Duane Sand
5d7775c6df [MIPS] Allow united mipsel and mips64el gcc toolchain
Explicitly tell 32-bit links that they are doing 32-bit links.
This is needed when using united 32-bit and 64-bit toolchains.
This is harmless when using older separate 32-only toolchains.

(cherry picked from commit f541650828)

Change-Id: I8df0ee7d36c6409458e18bea4e0e8b132edf77dc
2014-07-22 19:41:49 -07:00
Sreeram Ramachandran
1a1d0b7abf am 2582f02a: Cleanup: Delete dead code.
* commit '2582f02a01cd56c56a4e6c9de4444a6ec937cc37':
  Cleanup: Delete dead code.
2014-07-23 00:10:16 +00:00
Elliott Hughes
ca70453e84 Remove the unused swab.S.
Change-Id: Id30eac5a21b649d6a039a0d7ca0496177fbfb571
2014-07-22 20:21:31 -07:00
Sreeram Ramachandran
2582f02a01 Cleanup: Delete dead code.
Bug: 15413389
Change-Id: I315468832ef18ffc84174e54774ab63b86d284dc
2014-07-22 11:24:17 -07:00
Elliott Hughes
5d2f86f363 Fix generate-NOTICE to cope better with BSD __COPYRIGHT macros.
Change-Id: I99f9d2e0a28342663cec6aed483e1a23c12e5e87
2014-07-23 11:10:48 -07:00
Duane Sand
f541650828 [MIPS] Allow united mipsel and mips64el gcc toolchain
Explicitly tell 32-bit links that they are doing 32-bit links.
This is needed when using united 32-bit and 64-bit toolchains.
This is harmless when using older separate 32-only toolchains.

Change-Id: I70cbd3f5867e59b1f6f829793444242fb0894aa6
2014-07-22 14:27:48 -07:00
Elliott Hughes
ea42a6caea Merge "Fix a couple of bugs in generate-NOTICE and regenerate the NOTICE files." 2014-07-22 16:25:43 +00:00
Elliott Hughes
3758a244cf Fix a couple of bugs in generate-NOTICE and regenerate the NOTICE files.
Change-Id: Id6fcb74292e661504d0758bfce24abdc18cb8d32
2014-07-22 21:29:00 -07:00
Elliott Hughes
6209c81d40 Use upstream OpenBSD's arc4random.
The getentropy_linux.c is lightly modified to build on Android, but we're now
completely in sync with upstream OpenBSD's arc4random implementation.

(cherry picked from commit 2b67d7dee0)

Change-Id: Icc939b5fa2fcac3e15ff93735d2d34f67e9bb149
2014-07-21 19:17:15 -07:00
Elliott Hughes
55383d57d4 am 4d421901: Merge "Use upstream OpenBSD\'s arc4random."
* commit '4d421901e587fd1563da94baf59b015017c01b91':
  Use upstream OpenBSD's arc4random.
2014-07-22 02:07:58 +00:00
Elliott Hughes
b76613627d Rewrite syslog(3) to use Android logging.
Since we don't have syslogd on Android and you can't run one on a non-rooted
device, it's more useful if syslog output just goes to the regular Android
logging system.

Bug: 14292866

(cherry picked from commit 3ad8ecb64e)

Change-Id: I3038855ca4f22532bf6d2c45d3f8028b866975f9
2014-07-21 18:55:04 -07:00
Elliott Hughes
85287b29ea am 925d388e: Merge "Rewrite syslog(3) to use Android logging."
* commit '925d388e24945afb17f66d5c132f993e6a0d4fee':
  Rewrite syslog(3) to use Android logging.
2014-07-22 01:54:47 +00:00
Dan Albert
607458ffe1 am b828eaeb: Merge "There is no _MIN for unsigned types."
* commit 'b828eaeb4512baba6d43a56da682bd7329079822':
  There is no _MIN for unsigned types.
2014-07-22 00:43:15 +00:00
Elliott Hughes
0f7d882bb7 Switch to OpenBSD res_random.
Change-Id: Ia971d647832893e9bb4601697132a105524d2f96
2014-07-21 15:31:53 -07:00
Dan Albert
e226b64061 am 1fb90a8a: Merge "Fix mbsrtowcs(3)\'s handling of len parameter."
* commit '1fb90a8aa0086f7e4f7960a5b916b8605a9a3c96':
  Fix mbsrtowcs(3)'s handling of len parameter.
2014-07-21 18:56:06 +00:00
Dan Albert
75fcd01a6e am e9731387: Merge "__libc_fatal should print a newline to stderr."
* commit 'e9731387f46938dd73fcda0193460b33655400c4':
  __libc_fatal should print a newline to stderr.
2014-07-21 18:23:56 +00:00
Elliott Hughes
4d421901e5 Merge "Use upstream OpenBSD's arc4random." 2014-07-21 15:45:37 +00:00
Elliott Hughes
2b67d7dee0 Use upstream OpenBSD's arc4random.
The getentropy_linux.c is lightly modified to build on Android, but we're now
completely in sync with upstream OpenBSD's arc4random implementation.

Change-Id: If32229fc28aba908035fb38703190d41ddcabc95
2014-07-21 14:38:16 -07:00
Dan Albert
ee7f1b5946 There is no _MIN for unsigned types.
Change-Id: I49c38e51197b750210bdbf28c9cf6db30452a206
2014-07-21 17:16:30 -07:00
Elliott Hughes
925d388e24 Merge "Rewrite syslog(3) to use Android logging." 2014-07-19 23:20:08 +00:00
Elliott Hughes
3ad8ecb64e Rewrite syslog(3) to use Android logging.
Since we don't have syslogd on Android and you can't run one on a non-rooted
device, it's more useful if syslog output just goes to the regular Android
logging system.

Bug: 14292866
Change-Id: Icee7f088b97f88ccbdaf471b98cbac7f19f9210a
2014-07-21 16:56:48 -07:00
Hans Boehm
ed68221a82 Define atomic_charN_t only if charN_t is supported.
Some platform code is apparently compiled with switches that do
not support char16_t and char32_t.  This caused stdatomic.h to fail
to compile.  This CL makes stdatomic.h usable in those environments.

(cherry picked from commit 8b002362d9)
Change-Id: Ie5a17f20b8b545c97128d00605b4eabd2a6bfe3e
2014-07-18 17:53:01 -07:00
Elliott Hughes
2199ac3113 am 7dd126a3: Merge "Clean up some misinformation around prctl."
* commit '7dd126a38ca501818b07927f310dcc0f531c0f1f':
  Clean up some misinformation around prctl.
2014-07-18 23:35:08 +00:00
Dan Albert
97e31dedf0 __libc_fatal should print a newline to stderr.
Change-Id: I088dc880d7488a65beac8cda95f530f3db41f112
2014-07-21 11:10:00 -07:00
Elliott Hughes
fbd0081923 Merge "Clean up some misinformation around prctl." into lmp-dev 2014-07-18 22:16:50 +00:00
Elliott Hughes
de24f1ac00 Clean up some misinformation around prctl.
prctl shouldn't be in <unistd.h>.

(cherry picked from commit 9c07aee83b)

Change-Id: I70cda886fbf4d58d82dc70adaa981506ebff9949
2014-07-18 16:54:28 -07:00
Elliott Hughes
291da8d353 Remove SIOCKILLADDR from <sys/socket.h>.
(cherry picked from commit 8a3d1ca183)

Change-Id: Idb5cc4cff3ece7fa8740db12a19438d1a1c9a6a8
2014-07-18 16:53:23 -07:00
Elliott Hughes
b5bef263b3 Remove PR_SET_TIMERSLACK_PID from <sys/prctl.h>.
(cherry picked from commit 9f165d24f0)

Change-Id: I009d3742cefbf36115f09824f267a0265ae215bf
2014-07-18 16:52:24 -07:00
Christopher Ferris
e8bc581333 Use the mmap/munmap for allocation routines.
To avoid any issues calling malloc related routines, use mmap/munmap.
Specifically, this avoids any problems when this is compiled into a
malloc debug shared library.

(cherry picked from commit 6425327c32)

Change-Id: If43d12b2c588c9abcbfbbd2c53702cdac7695a73
2014-07-18 15:23:32 -07:00
Christopher Ferris
3a23030ded am 3c2b71ad: Merge "Use the mmap/munmap for allocation routines."
* commit '3c2b71ad5612721c7073a4396cdad2c00e86ba54':
  Use the mmap/munmap for allocation routines.
2014-07-18 22:13:21 +00:00
Elliott Hughes
6e47ddab72 am d18b87f3: Merge "Remove SIOCKILLADDR from <sys/socket.h>."
* commit 'd18b87f38de8644acdcd1a112bd06d3a70d2ea1d':
  Remove SIOCKILLADDR from <sys/socket.h>.
2014-07-18 00:24:35 +00:00
Elliott Hughes
1a04da8750 am 76282482: Merge "Remove PR_SET_TIMERSLACK_PID from <sys/prctl.h>."
* commit '76282482dbb05bf97a834d20b3ccf98de3f5a31d':
  Remove PR_SET_TIMERSLACK_PID from <sys/prctl.h>.
2014-07-18 00:24:34 +00:00
Dan Albert
1fb90a8aa0 Merge "Fix mbsrtowcs(3)'s handling of len parameter." 2014-07-17 22:34:19 +00:00
Dan Albert
6b55ba54ef Fix mbsrtowcs(3)'s handling of len parameter.
The len parameter is a _maximum_ length. The previous code was treating
it as an exact length, causing the following typical call to fail:

    mbsrtowcs(out, &in, sizeof(out), state); // sizeof(out) > strlen(in)

Change-Id: I48e474fd54ea5f122bc168a4d74bfe08704f28cc
2014-07-21 11:45:48 -07:00
Elliott Hughes
9c07aee83b Clean up some misinformation around prctl.
prctl shouldn't be in <unistd.h>.

Change-Id: I29609fc91c033e1ad143b75d9b4eb17aefbd63d6
2014-07-18 16:15:32 -07:00
Christopher Ferris
6425327c32 Use the mmap/munmap for allocation routines.
To avoid any issues calling malloc related routines, use mmap/munmap.
Specifically, this avoids any problems when this is compiled into a
malloc debug shared library.

Change-Id: Iae2d197145da43dc103ad6024357d8cc2374378f
2014-07-18 14:16:51 -07:00
Elliott Hughes
d18b87f38d Merge "Remove SIOCKILLADDR from <sys/socket.h>." 2014-07-17 22:33:42 +00:00
Elliott Hughes
8a3d1ca183 Remove SIOCKILLADDR from <sys/socket.h>.
Change-Id: I6b64a9abe01c786a9ec26aee1517cb981a4860fb
2014-07-17 17:10:02 -07:00
Elliott Hughes
9f165d24f0 Remove PR_SET_TIMERSLACK_PID from <sys/prctl.h>.
Change-Id: Ie70f23c80e8473ac9617b74967d7c84709f5b00d
2014-07-17 17:12:35 -07:00
Elliott Hughes
d377833de6 am 6bf42ddc: Merge "Fix private/bionic_name_mem.h build breakage."
* commit '6bf42ddc7962dec56840eb370bfe7b0469a4efb1':
  Fix private/bionic_name_mem.h build breakage.
2014-07-17 22:16:45 +00:00
Elliott Hughes
b46696858b Fix private/bionic_name_mem.h build breakage.
(cherry picked from commit 2f9c6e38b8)

Change-Id: Ia8e96da98802d312011df866ac1baaa48f97811c
2014-07-17 15:15:44 -07:00
Elliott Hughes
d648f557f1 Remove non-standard prctl constants from <sys/prctl.h>.
Also remove __bionic_name_mem which has exactly one caller, and is only
ever expected to be used in this one place.

(cherry picked from commit d7453860a6)

Change-Id: I26b7638609e9d4eaf4f21ae29721ea27d4176702
2014-07-17 15:15:37 -07:00
Elliott Hughes
2f9c6e38b8 Fix private/bionic_name_mem.h build breakage.
Change-Id: I8fe9c63dbbb5911721ca56791c0bff4bdf403314
2014-07-17 15:09:17 -07:00
Elliott Hughes
fdd6414093 am 169e2bf6: Merge "Remove non-standard prctl constants from <sys/prctl.h>."
* commit '169e2bf6bd092ea3599cfe3426766988ec66658a':
  Remove non-standard prctl constants from <sys/prctl.h>.
2014-07-17 21:54:26 +00:00
Christopher Ferris
a694517909 Merge "Add gen syscalls step to instructions." into lmp-dev 2014-07-17 21:15:46 +00:00
Christopher Ferris
013c9b8035 Add gen syscalls step to instructions.
Also, fix incorrect path to some tools.

(cherry picked from commit ea271fdf26)

Change-Id: Ie93cbc84b9a46d622b0b462a33bed0ee129992cb
2014-07-18 16:56:33 -07:00
Elliott Hughes
d7453860a6 Remove non-standard prctl constants from <sys/prctl.h>.
Also remove __bionic_name_mem which has exactly one caller, and is only
ever expected to be used in this one place.

Change-Id: I833744f91e887639f5b2d1269f966ee9032af207
2014-07-17 14:26:33 -07:00
Hans Boehm
ec76a21f27 am 43363ab7: Merge "Define atomic_charN_t only if charN_t is supported."
* commit '43363ab7202a935e12cf6a38d32a48433bdc3705':
  Define atomic_charN_t only if charN_t is supported.
2014-07-17 12:59:40 +00:00
Elliott Hughes
9a7fdb2dae ptrace(3) should be varargs.
Bug: 16352070

(cherry picked from commit 98b088dce7)

Change-Id: I6193ef44df9a5668020916eaca90b47fc4c8ab77
2014-07-16 16:59:31 -07:00
Elliott Hughes
51b9d5bad9 am 94f84d36: Merge "ptrace(3) should be varargs."
* commit '94f84d36a9f16030546a667bab6c66a59e41e4bd':
  ptrace(3) should be varargs.
2014-07-16 23:49:52 +00:00
Hans Boehm
43363ab720 Merge "Define atomic_charN_t only if charN_t is supported." 2014-07-16 23:31:38 +00:00
Hans Boehm
8b002362d9 Define atomic_charN_t only if charN_t is supported.
Some platform code is apparently compiled with switches that do
not support char16_t and char32_t.  This caused stdatomic.h to fail
to compile.  This CL makes stdatomic.h usable in those environments.

Change-Id: Ie5a17f20b8b545c97128d00605b4eabd2a6bfe3e
2014-07-16 17:31:05 -07:00
Elliott Hughes
3002131da3 Use VDSO for clock_gettime(2) and gettimeofday(2).
Bug: 15387103

(cherry picked from commit 625993dfbb)

Change-Id: I0e156d7049ba1495902259071a96936592e74025
2014-07-16 15:15:53 -07:00
Elliott Hughes
98b088dce7 ptrace(3) should be varargs.
Bug: 16352070
Change-Id: Ied72e6e79eaf912fc93fc49ae7637af321a31a59
2014-07-16 16:07:10 -07:00
Elliott Hughes
379b1580dc am f13aa6fc: Merge "Use VDSO for clock_gettime(2) and gettimeofday(2)."
* commit 'f13aa6fc5b66d1c98b7fd4b43e20515033707e56':
  Use VDSO for clock_gettime(2) and gettimeofday(2).
2014-07-16 21:44:46 +00:00
Elliott Hughes
625993dfbb Use VDSO for clock_gettime(2) and gettimeofday(2).
Bug: 15387103
Change-Id: Ifc3608ea65060c1dc38120b10b6e79874f182a36
2014-07-16 14:27:43 -07:00
Dan Albert
a446505874 Merge "Remove isascii_l(3)." into lmp-dev 2014-07-16 13:12:22 +00:00
Christopher Ferris
f64411e7a8 am 64035c4a: Merge "Add gen syscalls step to instructions."
* commit '64035c4a4b52ce87398e3a5945ad6b755c8f35b1':
  Add gen syscalls step to instructions.
2014-07-16 02:56:22 +00:00
Elliott Hughes
99c8508a6e am 52023cb7: Merge "Regenerate the syscalls list after the uapi update."
* commit '52023cb725ade3a4ace8631af8d6df5b47dc4def':
  Regenerate the syscalls list after the uapi update.
2014-07-16 02:56:22 +00:00
Elliott Hughes
97ba2a5cc4 Regenerate the syscalls list after the uapi update.
(cherry picked from commit 3fa60e10bc)

Change-Id: Id545a5b0b0953967effd819177f0dadb134f2011
2014-07-15 19:09:12 -07:00
Dan Albert
da8accfefe Remove isascii_l(3).
Had intended to remove this one before submitting the locale changes,
but forgot. It isn't a standard ctype function, so we don't need it.

Change-Id: Ie9c09fa6c61b1101b5992fa06da30e373a0c6bf7
2014-07-15 16:49:30 -07:00
Christopher Ferris
cdf48775d4 am 73c963e4: Fix BIONIC_ROUND_UP_POWER_OF_2 for 64 bit.
* commit '73c963e4c5bf111df3abe9ad7eac98a918b88bb3':
  Fix BIONIC_ROUND_UP_POWER_OF_2 for 64 bit.
2014-07-15 21:46:28 +00:00
Christopher Ferris
64035c4a4b Merge "Add gen syscalls step to instructions." 2014-07-15 20:47:30 +00:00
Christopher Ferris
ea271fdf26 Add gen syscalls step to instructions.
Also, fix incorrect path to some tools.

Change-Id: I409fc02d7077f0d2811d90be19550e70f5d73c0e
2014-07-15 19:02:33 -07:00
Elliott Hughes
3fa60e10bc Regenerate the syscalls list after the uapi update.
Change-Id: I117c5b18f735376dd3ab5061018dc7db9c046202
2014-07-15 18:39:27 -07:00
Christopher Ferris
73c963e4c5 Fix BIONIC_ROUND_UP_POWER_OF_2 for 64 bit.
There were two bugs here:

- For 64 bit values, this did not properly round up.
- The macro rounded to the power of 2 less than value, not to the power
  of 2 greater than value.

(cherry picked from commit 27047faf28)

Change-Id: Idf1ec67854e1eb423704e599ae1c6b674d36618d
2014-07-15 13:23:06 -07:00
Elliott Hughes
ca276c40df Fix visibility for a bunch more symbols.
Bug: 11156955
Bug: 15291317

(cherry picked from commit a167eef548)

Change-Id: Ib038ad34ef59631f7b4ed6dff2b7956001b8b159
2014-07-14 18:59:51 -07:00
Christopher Ferris
27047faf28 Fix BIONIC_ROUND_UP_POWER_OF_2 for 64 bit.
There were two bugs here:

- For 64 bit values, this did not properly round up.
- The macro rounded to the power of 2 less than value, not to the power
  of 2 greater than value.

Change-Id: If8cb41536a9d2f5c1bc213676f1e67a7903a36b0
2014-07-15 12:33:48 -07:00
Dan Albert
84491f5b06 am 5656a0c4: Merge "Remove isascii_l(3)."
* commit '5656a0c4943a9b14baa4fc135980f91591723156':
  Remove isascii_l(3).
2014-07-15 00:31:07 +00:00
Elliott Hughes
1d31b55443 am ee3608f9: Merge "Fix visibility for a bunch more symbols."
* commit 'ee3608f9d3259a0ef22a27932a3f5149fb2763c8':
  Fix visibility for a bunch more symbols.
2014-07-14 23:15:15 +00:00
Dan Albert
e612add051 Remove isascii_l(3).
Had intended to remove this one before submitting the locale changes,
but forgot. It isn't a standard ctype function, so we don't need it.

Change-Id: Ie9c09fa6c61b1101b5992fa06da30e373a0c6bf7
2014-07-14 15:48:02 -07:00
Elliott Hughes
99ae0983c0 Implement rand/srand in terms of random/srandom.
Code developed for glibc or older versions of bionic might expect more
randomness than the BSD implementation provides.

Bug: 15829381

(cherry picked from commit 76c241b091)

Change-Id: If721b3f16efdb21cb67df5ec5034c0ba905bd029
2014-07-14 14:06:11 -07:00
Elliott Hughes
caaf71ebb3 Sync upstream-openbsd.
(cherry picked from commit 4f0b67a8db)

Change-Id: I8753959853312ab978bc4eb1bbbcdc7d1b007b95
2014-07-14 13:59:03 -07:00
Dmitriy Ivanov
38778e3b6c Upstream atexit
Change-Id: Ia454a2181b5058ed9783dc02b6b1805d0e4d2715
(cherry picked from commit 53c3c271dc)
2014-07-14 13:29:34 -07:00
Elliott Hughes
ac56fc8663 am 673bff01: Merge "Implement rand/srand in terms of random/srandom."
* commit '673bff01aed0c08991b98841ed0bfad78a589672':
  Implement rand/srand in terms of random/srandom.
2014-07-14 19:28:49 +00:00
Elliott Hughes
6d3032891a am 4ae93869: Merge "Sync upstream-openbsd."
* commit '4ae938698c89e9e3c79008d9a833db726779accd':
  Sync upstream-openbsd.
2014-07-14 19:21:32 +00:00
Dmitriy Ivanov
7ba7686b46 am 91f2074e: Merge "Upstream atexit"
* commit '91f2074e5f4e475d7c88d9cdaeb7dcdc9d9ff882':
  Upstream atexit
2014-07-14 19:21:31 +00:00
Elliott Hughes
673bff01ae Merge "Implement rand/srand in terms of random/srandom." 2014-07-14 17:20:33 +00:00
Elliott Hughes
76c241b091 Implement rand/srand in terms of random/srandom.
Code developed for glibc or older versions of bionic might expect more
randomness than the BSD implementation provides.

Bug: 15829381
Change-Id: Ia5a908a816e0a5f0639f514107a6384a51ec157e
2014-07-14 12:02:22 -07:00
Dmitriy Ivanov
53c3c271dc Upstream atexit
Change-Id: Ia454a2181b5058ed9783dc02b6b1805d0e4d2715
2014-07-14 12:05:16 -07:00
Elliott Hughes
4ae938698c Merge "Sync upstream-openbsd." 2014-07-14 17:15:23 +00:00
Elliott Hughes
4f0b67a8db Sync upstream-openbsd.
Change-Id: I5b9961a57e2ff05f63bd218c130bf8347850b9be
2014-07-14 11:22:59 -07:00
Elliott Hughes
a167eef548 Fix visibility for a bunch more symbols.
Bug: 11156955
Bug: 15291317
Change-Id: I664f25cce7c17085a101d6593d8e01525a1f6a90
2014-07-14 15:13:30 -07:00
Elliott Hughes
e2b177a5d1 am 83ce99d8: Merge "Define SIOCKILLADDR which isn\'t in the common kernel uapi headers."
* commit '83ce99d8b7e2b15b2169e6e6e18e871ad35abb6c':
  Define SIOCKILLADDR which isn't in the common kernel uapi headers.
2014-07-12 12:59:27 +00:00
Elliott Hughes
f6968e3c08 Define SIOCKILLADDR which isn't in the common kernel uapi headers.
(cherry picked from commit 2ba2888cac)

Change-Id: I3845871bb44dae94d9a0428af0f562ddfb8bd660
2014-07-11 22:37:13 -07:00