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 commit is contained in:
Narayan Kamath 2014-02-19 17:59:05 +00:00
parent 3572fbc8cd
commit c9ae21a5c3
3 changed files with 477 additions and 420 deletions

View File

@ -79,7 +79,6 @@ libc_common_src_files := \
bionic/strntoimax.c \ bionic/strntoimax.c \
bionic/strntoumax.c \ bionic/strntoumax.c \
bionic/strtotimeval.c \ bionic/strtotimeval.c \
bionic/system_properties.c \
bionic/system_properties_compat.c \ bionic/system_properties_compat.c \
bionic/tcgetpgrp.c \ bionic/tcgetpgrp.c \
bionic/tcsetpgrp.c \ bionic/tcsetpgrp.c \
@ -223,6 +222,7 @@ libc_bionic_src_files := \
bionic/stubs.cpp \ bionic/stubs.cpp \
bionic/symlink.cpp \ bionic/symlink.cpp \
bionic/sysconf.cpp \ bionic/sysconf.cpp \
bionic/system_properties.cpp \
bionic/sys_siglist.c \ bionic/sys_siglist.c \
bionic/sys_signame.c \ bionic/sys_signame.c \
bionic/tdestroy.cpp \ bionic/tdestroy.cpp \

View File

@ -139,6 +139,14 @@ int __system_property_foreach_compat(
void (*propfn)(const prop_info *pi, void *cookie), void (*propfn)(const prop_info *pi, void *cookie),
void *cookie); void *cookie);
/* Initialize the system properties area in read only mode.
* Should be done by all processes that need to read system
* properties.
*
* Returns 0 on success, -1 otherwise.
*/
int __system_properties_init();
__END_DECLS __END_DECLS
#endif #endif