2599 Commits

Author SHA1 Message Date
David 'Digit' Turner
f8a2c51bf3 LONG_LONG_MIN/MAX: Move declarations to <limits.h>
LONG_LONG_MIN, LONG_LONG_MAX and ULONG_LONG_MAX are
GLibc-specific macros that are better defined in <limits.h>
instead of the current exotic location (<pthread.h>).

Note that GCC's <limits.h> only defines these macros
when __GNU_LIBRARY__ is also defined. This is only the
case when building against GLibc, so manually redefine
the macros here.

Note that using LLONG_MIN/LLONG_MAX/ULLONG_MAX is the
C99-compliant way to get these values, but it's easier
to define these compatibility macros for the sake of
porting existing code.

Change-Id: I8023918d73b4685238054932f94a4006c1ca7d03
2012-10-15 18:52:55 +02:00
Elliott Hughes
fcf901d5c0 Merge "Fix realloc(3) when chk_malloc debugging is on." 2012-10-12 17:09:03 -07:00
Elliott Hughes
e7e274b13a Fix realloc(3) when chk_malloc debugging is on.
The tests for a NULL pointer and size 0 were the wrong way round.

From Intel's patch 9cae4f2ffc4778ed82be04711d8775a84092d4e2.

Change-Id: I118aff3358aa5f34126d74bfaa43f6e2f1a89055
2012-10-12 17:05:05 -07:00
Elliott Hughes
9434e8febc Merge "Make the dlfcn mutex static." 2012-10-12 10:59:59 -07:00
Elliott Hughes
22d629211d Make the dlfcn mutex static.
More style fixes too, and removal of yet another lingering SH reference!

Change-Id: Iebc34a46475dd11845ad172b9108bb6ddd7585bb
2012-10-12 10:50:21 -07:00
Elliott Hughes
db4fdf1aaf Merge "Fix dlerror(3)." 2012-10-12 10:27:44 -07:00
Elliott Hughes
3b297c4079 Fix dlerror(3).
Add unit tests for dlerror(3) in various situations. I think We're at least
as good as glibc now.

Also factor out the ScopedPthreadMutexLock and use it here too.

Bug: http://code.google.com/p/android/issues/detail?id=38398
Change-Id: I040938b4366ab836e3df46d1d8055b92f4ea6ed8
2012-10-11 16:08:51 -07:00
Elliott Hughes
417fd2334a Merge "Fix perf_event_open syscall for x86 and mips" 2012-10-11 10:26:00 -07:00
Shuo Gao
4e75c4b2d7 Fix perf_event_open syscall for x86 and mips
perf_event_open syscall has a different syscall number for
the 3 supported architectures: arm, x86 and mips. Currenlty
only the arm syscall number is defined for all architectures.
Tracing tools like perf will not work on other architectures
than arm.

Add the different values for perf_event_open on x86 and mips
and run gensyscalls.py to update generated headers.

Change-Id: I2ed78bd42c0e5df8dbc51d784be49cccda5fab30
Author: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
2012-10-11 10:24:51 -07:00
Elliott Hughes
1ceb9824ab Merge "Fix a getcwd(3) bug and make our tests run correctly under valgrind." 2012-10-09 18:14:37 -07:00
Elliott Hughes
b83cad7983 Merge "Fix two comment typos." 2012-10-09 17:23:38 -07:00
Elliott Hughes
e5d5f7f0d8 Fix two comment typos.
Change-Id: Icb2d6f7fa97ef5a4409a7606875e416cfab0a4b3
2012-10-09 17:23:09 -07:00
Elliott Hughes
156da96621 Fix a getcwd(3) bug and make our tests run correctly under valgrind.
The getcwd(3) bug was found by valgrind.

Bug: 7291287
Change-Id: I59f3bff1c1392a408b905934eebcd5d894d37492
2012-10-09 17:17:24 -07:00
Elliott Hughes
9a7366e894 am fa7e2586: Merge "Test flags before using "info""
* commit 'fa7e2586176711896e6c0b94c7b811f7cbe29907':
  Test flags before using "info"
2012-10-03 17:41:08 -07:00
Elliott Hughes
fa7e258617 Merge "Test flags before using "info"" 2012-10-03 17:27:51 -07:00
Andy McFadden
1db6f2db49 Test flags before using "info"
Our debugger signal catcher expects to receive three args, but if
somebody cleared SA_SIGINFO we only get one, and bad things happen
when we try to use the second one.  Test to see if SA_SIGINFO is
still set before we try to use the argument.

(cherry-pick of f84bc8d6f6368f1c846124a8168761ee8cc589c0.)

Bug: 7272866
Change-Id: I69a65c25e833aea70acb78f9ba40ed93308583e6
2012-10-03 17:20:06 -07:00
Elliott Hughes
b95ad82f7d am 95a2a7f3: Merge "Fix MIPS build."
* commit '95a2a7f325330830d6227aa683948b325e38e653':
  Fix MIPS build.
2012-10-02 11:31:30 -07:00
Elliott Hughes
95a2a7f325 Merge "Fix MIPS build." 2012-10-02 11:22:33 -07:00
Elliott Hughes
857fed50cb Fix MIPS build.
ARM and x86 have custom memcpy implementations, but MIPS relies on the generic
one, which I recently moved.

Change-Id: I9e49243f63b27a4123f2c6623d6286ec82d333c7
2012-10-02 11:20:07 -07:00
Elliott Hughes
9017254186 am b98204a9: Merge "Move non-upstream code into the libc/bionic directory."
* commit 'b98204a9fb5c84478a9710163df395486443c7f6':
  Move non-upstream code into the libc/bionic directory.
2012-10-02 09:22:03 -07:00
Elliott Hughes
b98204a9fb Merge "Move non-upstream code into the libc/bionic directory." 2012-10-02 09:13:34 -07:00
Elliott Hughes
39d7c6072d am 75f43525: Merge "Always take GCC\'s definition of NULL."
* commit '75f43525550c5cad3980f7dd125cb838836790b8':
  Always take GCC's definition of NULL.
2012-10-01 18:18:06 -07:00
Elliott Hughes
75f4352555 Merge "Always take GCC's definition of NULL." 2012-10-01 18:11:20 -07:00
Elliott Hughes
7d56ccbfaa Always take GCC's definition of NULL.
There's a (bad) definition of NULL in <linux/stddef.h>, and this
definition of NULL, and the One True definition in the <stddef.h> provided
by the compiler. This change at least kills one of the bad duplicates.
Killing the <linux/stddef.h> one is harder, because it's in a generated
file.

Change-Id: Iea4ccb12d6758199f312ea9cd753b84322d5c471
2012-10-01 17:56:58 -07:00
Elliott Hughes
a89864a20b Move non-upstream code into the libc/bionic directory.
I'll need at least one more pass, because there's some upstream code
lurking in libc/bionic, but this is still a step in the right direction.

Change-Id: I55927315972da8327ae01c5240ed587db17e8462
2012-10-01 17:35:49 -07:00
Elliott Hughes
bb7dfcd3b8 am d3bf954e: Merge "Remove useless #defines and incorrect claims from header files."
* commit 'd3bf954e9ffbdee8d732ccb6ad6143dc31b605fc':
  Remove useless #defines and incorrect claims from header files.
2012-10-01 15:50:51 -07:00
Elliott Hughes
d3bf954e9f Merge "Remove useless #defines and incorrect claims from header files." 2012-10-01 15:37:18 -07:00
Elliott Hughes
0cc0d250fd Remove useless #defines and incorrect claims from header files.
The various __need_* macros were write-only.

Change-Id: Id3cca34188e0801fdf93a038b22f2817226ad9c2
2012-10-01 15:12:40 -07:00
Elliott Hughes
a428bc1288 am fe712e6c: Merge "Upgrade seed48 too."
* commit 'fe712e6caedccbbba24bda8429cb0b8cc6057ff1':
  Upgrade seed48 too.
2012-10-01 14:46:46 -07:00
Elliott Hughes
fe712e6cae Merge "Upgrade seed48 too." 2012-10-01 14:38:09 -07:00
Elliott Hughes
31a1060a5a Upgrade seed48 too.
Missed this in 774c7f54ff375d71106283d42779b0cc5f238f87.

Change-Id: Ic24fd67f003d0e2d192cfb08f96f63024ca817eb
2012-10-01 14:14:21 -07:00
Elliott Hughes
b650111a11 am cd195eba: Merge "Upgrade to the current NetBSD rand implementation."
* commit 'cd195eba1f9235b9b9d4dda70142d927b1b9802d':
  Upgrade to the current NetBSD rand implementation.
2012-10-01 14:13:16 -07:00
Elliott Hughes
cd195eba1f Merge "Upgrade to the current NetBSD rand implementation." 2012-10-01 14:05:09 -07:00
Elliott Hughes
774c7f54ff Upgrade to the current NetBSD rand implementation.
Also add basic unit tests.

Change-Id: I7fc7ef61d47c1e8fdf8b8eff67a635220c3afd56
2012-10-01 13:53:41 -07:00
Elliott Hughes
0fa6279f39 am 5b6346f6: Merge "bionic: linker: Need update the map->l_addr for execution."
* commit '5b6346f6d5dca4022fe0044dd2807c19ac596788':
  bionic: linker: Need update the map->l_addr for execution.
2012-10-01 09:21:08 -07:00
Elliott Hughes
5b6346f6d5 Merge "bionic: linker: Need update the map->l_addr for execution." 2012-10-01 09:09:17 -07:00
Elliott Hughes
bb892a1b63 am d03bfe68: Merge "Define ssize_t if necessary."
* commit 'd03bfe689a6e29aa010a927741f42c08f89ef04d':
  Define ssize_t if necessary.
2012-09-28 10:27:06 -07:00
Elliott Hughes
d03bfe689a Merge "Define ssize_t if necessary." 2012-09-28 10:16:58 -07:00
Elliott Hughes
422b6ef92c Define ssize_t if necessary.
Change-Id: I63801cc1f09be5e4ca20a6da7ec3366ba6441afd
2012-09-28 10:15:52 -07:00
Elliott Hughes
72b08af300 am f9163dd1: Merge "Add getdelim(3) and getline(3) to bionic"
* commit 'f9163dd1f0f6cbd7b8305fa1b2ce46754ed95278':
  Add getdelim(3) and getline(3) to bionic
2012-09-28 09:53:08 -07:00
Elliott Hughes
f9163dd1f0 Merge "Add getdelim(3) and getline(3) to bionic" 2012-09-28 09:44:24 -07:00
Irina Tirdea
eac9eb462e Add getdelim(3) and getline(3) to bionic
Some userspace programs (e.g. perf) need getline.

Changes:
() add getdelim.c, getline.c from NetBSD (http://netbsd.org/) under the
NetBSD Foundation's (TNF) license ("2 clause" Berkeley-style license).
() add stub for reentrant.h header that is needed by getdelim.c
() add tests for getdelim(3) and getline(3).
() update NOTICE file.

Change-Id: I22ed82dd5904b9d7a3695535c04f502be3c27c5d
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
2012-09-27 11:38:57 -07:00
Elliott Hughes
fd6ca57f24 am e4030e0b: Merge "Fix several compiler warnings."
* commit 'e4030e0bfc427e755477bbea69afe60308a62d91':
  Fix several compiler warnings.
2012-09-26 16:04:51 -07:00
Elliott Hughes
e4030e0bfc Merge "Fix several compiler warnings." 2012-09-26 15:51:01 -07:00
Elliott Hughes
2c29bcf77f am 827a2604: Merge "Replace __unused in kernel headers with __linux_unused to avoid conflicts with __unused macro in sys/cdefs.h"
* commit '827a2604ee660df80feb231a1f8bcc96ea6e64ce':
  Replace __unused in kernel headers with __linux_unused to avoid conflicts with __unused macro in sys/cdefs.h
2012-09-26 15:17:07 -07:00
Elliott Hughes
827a2604ee Merge "Replace __unused in kernel headers with __linux_unused to avoid conflicts with __unused macro in sys/cdefs.h" 2012-09-26 14:58:11 -07:00
Elliott Hughes
ac184b2142 Fix several compiler warnings.
Change-Id: I55caa50a5937442734f4fcbdb4edf1c70f335bf8
2012-09-26 14:20:22 -07:00
Elliott Hughes
dd9fbc8646 am 8e630dac: Merge "Simple tests for dladdr(3)."
* commit '8e630dacf61307e4681f04fc6b5ee593f30d91d0':
  Simple tests for dladdr(3).
2012-09-26 12:18:14 -07:00
Elliott Hughes
a48d5e5f12 am 855dde44: Merge "Fix tmpfile(3)."
* commit '855dde44266e3c8384ea419f51f9a5c748253eda':
  Fix tmpfile(3).
2012-09-26 12:18:13 -07:00
Elliott Hughes
8e630dacf6 Merge "Simple tests for dladdr(3)." 2012-09-26 12:10:56 -07:00