summaryrefslogtreecommitdiff
path: root/libcutils/include/cutils/properties.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcutils/include/cutils/properties.h')
-rw-r--r--libcutils/include/cutils/properties.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/libcutils/include/cutils/properties.h b/libcutils/include/cutils/properties.h
index 78d8bc654..d2e08712a 100644
--- a/libcutils/include/cutils/properties.h
+++ b/libcutils/include/cutils/properties.h
@@ -14,30 +14,27 @@
* limitations under the License.
*/
-#pragma once
+#ifndef __CUTILS_PROPERTIES_H
+#define __CUTILS_PROPERTIES_H
#include <sys/cdefs.h>
#include <stddef.h>
-#include <stdint.h>
-
-#if __has_include(<sys/system_properties.h>)
#include <sys/system_properties.h>
-#else
-#define PROP_VALUE_MAX 92
-#endif
+#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
-//
-// Deprecated.
-//
-// See <android-base/properties.h> for better API.
-//
-
-#define PROPERTY_KEY_MAX PROP_NAME_MAX
-#define PROPERTY_VALUE_MAX PROP_VALUE_MAX
+/* System properties are *small* name value pairs managed by the
+** property service. If your data doesn't fit in the provided
+** space it is not appropriate for a system property.
+**
+** WARNING: system/bionic/include/sys/system_properties.h also defines
+** these, but with different names. (TODO: fix that)
+*/
+#define PROPERTY_KEY_MAX PROP_NAME_MAX
+#define PROPERTY_VALUE_MAX PROP_VALUE_MAX
/* property_get: returns the length of the value which will never be
** greater than PROPERTY_VALUE_MAX - 1 and will always be zero terminated.
@@ -149,3 +146,5 @@ int property_get(const char *key, char *value, const char *default_value) {
#ifdef __cplusplus
}
#endif
+
+#endif