Merge "Moved nameser.h and namser_compat.h to public include dir"
Moved nameser.h and namser_compat.h to public include dir
This is part of the upstream sync (Net/Open/Free BSDs expose the
nameser.h in their public headers).
Change-Id: Ib063d4e50586748cc70201a8296cd90d2e48bbcf
This is part of the upstream sync (Net/Open/Free BSDs expose the
nameser.h in their public headers).
Change-Id: Ib063d4e50586748cc70201a8296cd90d2e48bbcf
Merge "Moved private dns header to their own dir."
Merge "Renamed the misleading libc/netbsd directory to libc/dns."
Merge "Implement pthread_condattr_{get,set}clock."
Implement pthread_condattr_{get,set}clock.
We only support CLOCK_REALTIME and CLOCK_MONOTONIC for now,
so we us a single bit from pthread_cond_t->value to denote
the clock type. Note that this reduces the width of the counter
to 30 bits, but this should be large enough for all practical
purposes.
bug: 13232338
Change-Id: I857e7da64b3ecbb23eeac7c9f3fbd460f60231bd
We only support CLOCK_REALTIME and CLOCK_MONOTONIC for now,
so we us a single bit from pthread_cond_t->value to denote
the clock type. Note that this reduces the width of the counter
to 30 bits, but this should be large enough for all practical
purposes.
bug: 13232338
Change-Id: I857e7da64b3ecbb23eeac7c9f3fbd460f60231bd
Merge "Switch to upstream alarm(3)."
Switch to upstream alarm(3).
The only way the setitimer call can fail is if the unsigned number of seconds is
too large to fit in the kernel's signed number of seconds. If you schedule a
68-year alarm, glibc will fail by returning 0 and BSD will fail by returning -1.
Change-Id: Ic3721b01428f5402d99f31fd7f2ba2cc58805607
The only way the setitimer call can fail is if the unsigned number of seconds is
too large to fit in the kernel's signed number of seconds. If you schedule a
68-year alarm, glibc will fail by returning 0 and BSD will fail by returning -1.
Change-Id: Ic3721b01428f5402d99f31fd7f2ba2cc58805607
Merge "libc: Make calls to new user-space logger (revisit)"
Moved private dns header to their own dir.
Bug: 13219633
Change-Id: I3435ef7564b9ad3c7b54188a0809440993b36c9e
Bug: 13219633
Change-Id: I3435ef7564b9ad3c7b54188a0809440993b36c9e
libc: Make calls to new user-space logger (revisit)
* TARGET_USES_LOGD is true or false, yes is not valid
* was supposed to be in the libc_bionic definition
Change-Id: I7f15d0fe61205641f7310ba9762df885e6c959d0
* TARGET_USES_LOGD is true or false, yes is not valid
* was supposed to be in the libc_bionic definition
Change-Id: I7f15d0fe61205641f7310ba9762df885e6c959d0
Merge "If the kernel doesn't have MADV_MERGEABLE, stop asking for it."
If the kernel doesn't have MADV_MERGEABLE, stop asking for it.
Note that a dynamically-linked binary will still probably see two attempts ---
one by the dynamic linker (which will set its copy of the flag so it won't try
again) and then one by the executable itself (which gets a new uninitialized
copy of the flag).
Change-Id: Id6b7e47780f0f24d2ca0384a75373f4824fa8f12
Note that a dynamically-linked binary will still probably see two attempts ---
one by the dynamic linker (which will set its copy of the flag so it won't try
again) and then one by the executable itself (which gets a new uninitialized
copy of the flag).
Change-Id: Id6b7e47780f0f24d2ca0384a75373f4824fa8f12
Merge "Remove deprecated and unused constants from <sys/klog.h>."
Remove deprecated and unused constants from <sys/klog.h>.
Change-Id: I23d54b5eaf918859480f927534a3f9e3af602311
Change-Id: I23d54b5eaf918859480f927534a3f9e3af602311
Merge "Fix build."
Fix build.
Change-Id: I71cde79263d5f5a8382865b8151f65c5c05ea17b
Change-Id: I71cde79263d5f5a8382865b8151f65c5c05ea17b
Merge "Add recvmmsg and sendmmsg syscalls."
Merge "Add getprogname/setprogname for BSD compatibility."
Add getprogname/setprogname for BSD compatibility.
This is one less change we have to make when porting BSD code.
Bug: https://code.google.com/p/android/issues/detail?id=34898
Change-Id: If9b1a8d16996c7a19abcce8d3a456afc3e105a41
This is one less change we have to make when porting BSD code.
Bug: https://code.google.com/p/android/issues/detail?id=34898
Change-Id: If9b1a8d16996c7a19abcce8d3a456afc3e105a41
Merge "Fix locatime.c indentation after sync"
Merge "Update tzcode to 2013i"
Fix locatime.c indentation after sync
Bug: 12246757
Change-Id: I8186e75f4899161af48cbf66e8f907dac0a326a2
Bug: 12246757
Change-Id: I8186e75f4899161af48cbf66e8f907dac0a326a2
Renamed the misleading libc/netbsd directory to libc/dns.
Bug: 13219633
Change-Id: Ide43add0b90b3081cc709a22d1ff1f59d65f1104
Bug: 13219633
Change-Id: Ide43add0b90b3081cc709a22d1ff1f59d65f1104
Merge "Vastly reduce the number of read(2)s done in tzload."
Vastly reduce the number of read(2)s done in tzload.
This costs us about 1000 fewer syscalls, which makes "adb shell strace date"
a lot more readable (which is the reason I've been meaning to fix this for a
long time now), but also actually saves a measurable amount of time.
Longer-term we should try to keep the tzdata mmap(2)ed in like libcore
does.
Change-Id: I1dd9c81968a13d3a6a55ba17f8a7d5c1f38cd103
This costs us about 1000 fewer syscalls, which makes "adb shell strace date"
a lot more readable (which is the reason I've been meaning to fix this for a
long time now), but also actually saves a measurable amount of time.
Longer-term we should try to keep the tzdata mmap(2)ed in like libcore
does.
Change-Id: I1dd9c81968a13d3a6a55ba17f8a7d5c1f38cd103
Merge "Fix a leak on error in tzload."
Fix a leak on error in tzload.
Change-Id: Ib5d9aaa7a618e478ce8e5e82f967cf535bb1a5a3
Change-Id: Ib5d9aaa7a618e478ce8e5e82f967cf535bb1a5a3
Add recvmmsg and sendmmsg syscalls.
Also add the corresponding constant, struct, and function declarations
to <sys/socket.h>, and perfunctory tests so we know that the symbols
actually exist.
Signed-off-by: Guillaume Ranquet <guillaumex.ranquet@intel.com>
Change-Id: Ib0d854239d3716be90ad70973c579aff4895a4f7
Also add the corresponding constant, struct, and function declarations
to <sys/socket.h>, and perfunctory tests so we know that the symbols
actually exist.
Signed-off-by: Guillaume Ranquet <guillaumex.ranquet@intel.com>
Change-Id: Ib0d854239d3716be90ad70973c579aff4895a4f7
Merge "Fix x86_64 build"
Fix x86_64 build
Fix types after recent update:
https://android-review.googlesource.com/#/c/83435/
Change-Id: I17ed28af84b7adeb8572e18834e66f3264ec061d
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
Fix types after recent update:
https://android-review.googlesource.com/#/c/83435/
Change-Id: I17ed28af84b7adeb8572e18834e66f3264ec061d
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
Merge "Ensure that <fcntl.h> has the SYNC_FILE_RANGE_* constants."
Merge "libc: Make calls to new user-space logger"
Ensure that <fcntl.h> has the SYNC_FILE_RANGE_* constants.
Needed to build strace at their tip of tree.
Change-Id: I64db00a332088e08e25bc30357293a9308b8a226
Needed to build strace at their tip of tree.
Change-Id: I64db00a332088e08e25bc30357293a9308b8a226
libc: Make calls to new user-space logger
* libc (fatal) logging now makes socket connection to the
user-space logging service.
* Add a TARGET_USES_LOGD make flag for BoardConfig.mk to manage
whether logd is enabled for use or not.
Change-Id: I96ab598c76d6eec86f9d0bc81094c1fb3fb0d9b4
* libc (fatal) logging now makes socket connection to the
user-space logging service.
* Add a TARGET_USES_LOGD make flag for BoardConfig.mk to manage
whether logd is enabled for use or not.
Change-Id: I96ab598c76d6eec86f9d0bc81094c1fb3fb0d9b4
Merge "Fix mips build"
Fix mips build
Change-Id: Ica843d387e115d0b27afd961af73237ec9109ed9
Change-Id: Ica843d387e115d0b27afd961af73237ec9109ed9
Merge "Moved to a more openbsd-like fenv.h"
Moved to a more openbsd-like fenv.h
Factored out common declarations to include/fenv.h and pushed
the implementation to .c files.
Bug: 11050744
Change-Id: I446b13cc4bc599d328343a8d392b07de280f6304
Factored out common declarations to include/fenv.h and pushed
the implementation to .c files.
Bug: 11050744
Change-Id: I446b13cc4bc599d328343a8d392b07de280f6304
Merge "Fix log_backtrace assertion failure caused by LP64 fix."
Fix log_backtrace assertion failure caused by LP64 fix.
When libc.debug.malloc is enabled, stack backtraces fail with:
bionic/libc/bionic/libc_logging.cpp:378: assertion "conversion
specifier unsupported" failed
The cause was a change to the format specifier from "%08x" to
"%0*x" to pass the field width as an additional parameter.
Unfortunately this modifier isn't supported by out_vformat() in
libc_logging.cpp.
Changed to use "%016x" if __LP64__ is defined; "%08x" otherwise.
Bug: 13177507
Change-Id: Ibf07263acf14da086d3c3788872f4b5477bd5708
When libc.debug.malloc is enabled, stack backtraces fail with:
bionic/libc/bionic/libc_logging.cpp:378: assertion "conversion
specifier unsupported" failed
The cause was a change to the format specifier from "%08x" to
"%0*x" to pass the field width as an additional parameter.
Unfortunately this modifier isn't supported by out_vformat() in
libc_logging.cpp.
Changed to use "%016x" if __LP64__ is defined; "%08x" otherwise.
Bug: 13177507
Change-Id: Ibf07263acf14da086d3c3788872f4b5477bd5708
Merge "Switch to current OpenBSD system.c."
Switch to current OpenBSD system.c.
Change-Id: Ie2df60f0d55dca69149ffe064f10183411407987
Change-Id: Ie2df60f0d55dca69149ffe064f10183411407987
Merge "Fix LP64 builds after OpenBSD string changes."
Fix LP64 builds after OpenBSD string changes.
Change-Id: I07202f6484e716d153d0387fcfc023e119438251
Change-Id: I07202f6484e716d153d0387fcfc023e119438251
Merge "More OpenBSD cleanup (primarily string)."
Merge "Added ftw64, nftw64"
Merge "Added mkstemp64"
More OpenBSD cleanup (primarily string).
This patch removes the string/ and wchar/ directories.
Change-Id: Ia489904bc67047e4bc79acb1f3eec21aa3fe5f0d
This patch removes the string/ and wchar/ directories.
Change-Id: Ia489904bc67047e4bc79acb1f3eec21aa3fe5f0d
Merge "Remove <asm/page.h>."
Remove <asm/page.h>.
If we have PAGE_SIZE/PAGESIZE, POSIX says they should be in <limits.h>.
Change-Id: I3c2d574ea2aea81f524874a156361411a4ffa18e
If we have PAGE_SIZE/PAGESIZE, POSIX says they should be in <limits.h>.
Change-Id: I3c2d574ea2aea81f524874a156361411a4ffa18e
Merge "Fix 64-bit build."
Fix 64-bit build.
A warning about signed vs unsigned comparison was converted
into an error here :
...
struct stat st;
if (st.st_size > sizeof(prop_area) {
...
st_size is either an off64_t, which is a signed type. It's
worth investigating why this didn't trigger a warning on 32 bit,
where it's signed as well.
Change-Id: Ib2622bd5c444ddcfa7fb2141f00332cbb4a0818b
A warning about signed vs unsigned comparison was converted
into an error here :
...
struct stat st;
if (st.st_size > sizeof(prop_area) {
...
st_size is either an off64_t, which is a signed type. It's
worth investigating why this didn't trigger a warning on 32 bit,
where it's signed as well.
Change-Id: Ib2622bd5c444ddcfa7fb2141f00332cbb4a0818b
Merge "Move system_properties over to C++."
Move system_properties over to C++.
This change constitutes the minimum amount of
work required to move the code over to C++, address
compiler warnings, and to make it const correct and
idiomatic (within the constraints of being called
from C code).
bug: 13058886
Change-Id: Ic78cf91b7c8e8f07b4ab0781333a9e243763298c
This change constitutes the minimum amount of
work required to move the code over to C++, address
compiler warnings, and to make it const correct and
idiomatic (within the constraints of being called
from C code).
bug: 13058886
Change-Id: Ic78cf91b7c8e8f07b4ab0781333a9e243763298c
Merge "Fix a typo in HACKING.txt."
Fix a typo in HACKING.txt.
Change-Id: If1cc18776d873cb5966186b65b8831677df77aaf
Change-Id: If1cc18776d873cb5966186b65b8831677df77aaf
Merge "Clean up our OpenBSD usage."
Clean up our OpenBSD usage.
Also undo some of the mess where we have OpenBSD <stdio.h> but a mix of
different BSD's implementations.
In this first pass, I've only moved easy OpenBSD stuff.
Change-Id: Iae67b02cde6dba9d8d06fedeb53efbfdac0a8cf6
Also undo some of the mess where we have OpenBSD <stdio.h> but a mix of
different BSD's implementations.
In this first pass, I've only moved easy OpenBSD stuff.
Change-Id: Iae67b02cde6dba9d8d06fedeb53efbfdac0a8cf6
Merge "Fixed int fast types for LP64"
Merge "Stop asking GCC to cause trouble."
Stop asking GCC to cause trouble.
Why do we see so many bogus strict-aliasing warnings? Because we asked GCC to
cause trouble on arm and mips.
Change-Id: I25d7fd036b6afff7ccfa799abe0dc1579ead2847
Why do we see so many bogus strict-aliasing warnings? Because we asked GCC to
cause trouble on arm and mips.
Change-Id: I25d7fd036b6afff7ccfa799abe0dc1579ead2847
Merge "Move the upstream-netbsd libc files into the correct directory."
Move the upstream-netbsd libc files into the correct directory.
I screwed up when I originally imported these files; they're in lib/libc/
in the upstream tree; there is no top-level libc/ (though there is a top-level
common/, so those files stay where they are).
Change-Id: I7c5e2224a4441ab0e33616a855a8c6aacfeac46f
I screwed up when I originally imported these files; they're in lib/libc/
in the upstream tree; there is no top-level libc/ (though there is a top-level
common/, so those files stay where they are).
Change-Id: I7c5e2224a4441ab0e33616a855a8c6aacfeac46f
Merge "Remove two DNS files that weren't being built."
Merge "Unify our assembler macros."
Remove two DNS files that weren't being built.
And switch the makefile to just building everything in the relevant directory.
Change-Id: Ia7785c4dcabb51639c2230026f8a8a9eff919a36
And switch the makefile to just building everything in the relevant directory.
Change-Id: Ia7785c4dcabb51639c2230026f8a8a9eff919a36
Unify our assembler macros.
Our <machine/asm.h> files were modified from upstream, to the extent
that no architecture was actually using the upstream ENTRY or END macros,
assuming that architecture even had such a macro upstream. This patch moves
everyone to the same macros, with just a few tweaks remaining in the
<machine/asm.h> files, which no one should now use directly.
I've removed most of the unused cruft from the <machine/asm.h> files, though
there's still rather a lot in the mips/mips64 ones.
Bug: 12229603
Change-Id: I2fff287dc571ac1087abe9070362fb9420d85d6d
Our <machine/asm.h> files were modified from upstream, to the extent
that no architecture was actually using the upstream ENTRY or END macros,
assuming that architecture even had such a macro upstream. This patch moves
everyone to the same macros, with just a few tweaks remaining in the
<machine/asm.h> files, which no one should now use directly.
I've removed most of the unused cruft from the <machine/asm.h> files, though
there's still rather a lot in the mips/mips64 ones.
Bug: 12229603
Change-Id: I2fff287dc571ac1087abe9070362fb9420d85d6d
Merge "Fix mips64 crt build."
Fix mips64 crt build.
This was broken during the multi-arch makefile changes.
Change-Id: Id25cf3273f63c11fbca1cff944fc5e1bf765c636
This was broken during the multi-arch makefile changes.
Change-Id: Id25cf3273f63c11fbca1cff944fc5e1bf765c636
Merge "Remove useless _C_LABEL from our assembler source."
Remove useless _C_LABEL from our assembler source.
Change-Id: I41a9181537c70ecc69ef8035132c9a83811a40d0
Change-Id: I41a9181537c70ecc69ef8035132c9a83811a40d0
Merge "Stop advertising an arm32-specific hack like it's a build system feature."
Merge "Added script generating additions to libgcc_compat.c from linker errors"
Stop advertising an arm32-specific hack like it's a build system feature.
Change-Id: I3a830b4a3516b6eb8e4f8e6e6b122a22a2e341df
Change-Id: I3a830b4a3516b6eb8e4f8e6e6b122a22a2e341df
Added script generating additions to libgcc_compat.c from linker errors
bug: 12234455
Change-Id: Icac35237f06e75745da5a91d9c4c941d7df4f84d
bug: 12234455
Change-Id: Icac35237f06e75745da5a91d9c4c941d7df4f84d
Merge "Don't explicitly list the tzcode files."
Don't explicitly list the tzcode files.
Change-Id: I3ac19899523ac1f5fd2fdd6c942aefce75a964a4
Change-Id: I3ac19899523ac1f5fd2fdd6c942aefce75a964a4
Merge "Fix signbit / infinite / isinf / isnan unit tests."
Merge "Remove the useless _C_LABEL from generated system calls."
Remove the useless _C_LABEL from generated system calls.
Change-Id: Id1d2fd39972652831ea825f6f9cf940b08f42b5c
Change-Id: Id1d2fd39972652831ea825f6f9cf940b08f42b5c
Merge "Linker writes to wrong memory location when processing DT_MIPS_RLD_MAP"
Merge "Make mips/mips64 syscall stubs more like the other architectures."
Merge "Top-level documentation about working on bionic."
Make mips/mips64 syscall stubs more like the other architectures.
Change-Id: I55f8c1a95f643a6e484f12fbcc25e2c77e55b6b8
Change-Id: I55f8c1a95f643a6e484f12fbcc25e2c77e55b6b8
Merge "Make mips generated assembler more like the mips64 stuff."
Make mips generated assembler more like the mips64 stuff.
I broke the mips build yesterday because it doesn't use
<private/bionic_asm.h> like the other architectures, including mips64.
I want to move mips closer to mips64 to try to avoid this kind of thing
in future.
Change-Id: Idb985587ff355b9e5e765c1f5671dc0144cd2488
I broke the mips build yesterday because it doesn't use
<private/bionic_asm.h> like the other architectures, including mips64.
I want to move mips closer to mips64 to try to avoid this kind of thing
in future.
Change-Id: Idb985587ff355b9e5e765c1f5671dc0144cd2488
Fix signbit / infinite / isinf / isnan unit tests.
Turns out stlport isn't broken. <cmath> (included
transitively via gtest in our case) is not required
to make C99 math macros (like signbit) available, nor is
it required to preserve them if they're already defined.
It is only required to make the equivalent functions in
namespace std available.
I couldn't find any documentation of required behaviour for
programs that include both <math.h> and <cmath>.
I've verified experimentally that llvm's libc++ and gnu
stl behave the same as stlport.
bug: 12935307
Change-Id: I9dc5cc0fd9f4f259abc8eefb280177cdd092a94b
Turns out stlport isn't broken. <cmath> (included
transitively via gtest in our case) is not required
to make C99 math macros (like signbit) available, nor is
it required to preserve them if they're already defined.
It is only required to make the equivalent functions in
namespace std available.
I couldn't find any documentation of required behaviour for
programs that include both <math.h> and <cmath>.
I've verified experimentally that llvm's libc++ and gnu
stl behave the same as stlport.
bug: 12935307
Change-Id: I9dc5cc0fd9f4f259abc8eefb280177cdd092a94b
Top-level documentation about working on bionic.
Change-Id: If0a531865fa9c0d57486b98d4b78e3efcbf4e1d1
Change-Id: If0a531865fa9c0d57486b98d4b78e3efcbf4e1d1
Merge "Use uid_t and gid_t for st_uid and st_gid in struct stat."
Merge "Fix build by avoiding the _C_LABEL macro."
Use uid_t and gid_t for st_uid and st_gid in struct stat.
Change-Id: Ide62dc714d76d881e3aa79e7a59ee6533a23dd00
Change-Id: Ide62dc714d76d881e3aa79e7a59ee6533a23dd00
Fix build by avoiding the _C_LABEL macro.
Change-Id: Ide367c2b65071388bd95fbc81a4ed6ae94aec4e4
Change-Id: Ide367c2b65071388bd95fbc81a4ed6ae94aec4e4
Linker writes to wrong memory location when processing DT_MIPS_RLD_MAP
When bionic's dynamic linker processes the .dynamic section of a MIPS ELF binary and encounters the DT_MIPS_RLD_MAP dynamic array tag, it calculates the address of where to write a pointer to the _r_debug structure. The current implementation simply reads the value given in the d_ptr field and writes the pointer address to that location. However, this value has to be adjusted to reflect the real load address of the binary. Otherwise the linker will write to a faulty location possibly resulting in a crash when linking a MIPS binary that includes DT_MIPS_RLD_MAP. This change corrects that problem.
Change-Id: I1a91874f7ab47289001fe72d9016660c14c70362
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
When bionic's dynamic linker processes the .dynamic section of a MIPS ELF binary and encounters the DT_MIPS_RLD_MAP dynamic array tag, it calculates the address of where to write a pointer to the _r_debug structure. The current implementation simply reads the value given in the d_ptr field and writes the pointer address to that location. However, this value has to be adjusted to reflect the real load address of the binary. Otherwise the linker will write to a faulty location possibly resulting in a crash when linking a MIPS binary that includes DT_MIPS_RLD_MAP. This change corrects that problem.
Change-Id: I1a91874f7ab47289001fe72d9016660c14c70362
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Merge "Add missing file from previous change."
Add missing file from previous change.
Change-Id: Id25000162a9ed76ce756842bdc09fe9afff9528f
Change-Id: Id25000162a9ed76ce756842bdc09fe9afff9528f