| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 The Android Open Source Project | 2 * Copyright (C) 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Licensed under the Apache License, Version 2.0 (the "License"); | 4 * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 * you may not use this file except in compliance with the License. | 5 * you may not use this file except in compliance with the License. |
| 6 * You may obtain a copy of the License at | 6 * You may obtain a copy of the License at |
| 7 * | 7 * |
| 8 * http://www.apache.org/licenses/LICENSE-2.0 | 8 * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 * | 9 * |
| 10 * Unless required by applicable law or agreed to in writing, software | 10 * Unless required by applicable law or agreed to in writing, software |
| 11 * distributed under the License is distributed on an "AS IS" BASIS, | 11 * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 * See the License for the specific language governing permissions and | 13 * See the License for the specific language governing permissions and |
| 14 * limitations under the License. | 14 * limitations under the License. |
| 15 */ | 15 */ |
| 16 | 16 |
| 17 #ifndef __CUTILS_PROPERTIES_H | 17 #ifndef __CUTILS_PROPERTIES_H |
| 18 #define __CUTILS_PROPERTIES_H | 18 #define __CUTILS_PROPERTIES_H |
| 19 | 19 |
| 20 #include <sys/cdefs.h> | 20 #include <sys/cdefs.h> |
| 21 #include <stddef.h> | 21 #include <stddef.h> |
| 22 #ifdef ANDROID | |
| 23 #include <sys/system_properties.h> | 22 #include <sys/system_properties.h> |
| 24 #else | |
| 25 #ifndef PROP_NAME_MAX | |
| 26 #define PROP_NAME_MAX 32 | |
| 27 #endif | |
| 28 #ifndef PROP_VALUE_MAX | |
| 29 #define PROP_VALUE_MAX 92 | |
| 30 #endif | |
| 31 #endif | |
| 32 | 23 |
| 33 #ifdef __cplusplus | 24 #ifdef __cplusplus |
| 34 extern "C" { | 25 extern "C" { |
| 35 #endif | 26 #endif |
| 36 | 27 |
| 37 /* System properties are *small* name value pairs managed by the | 28 /* System properties are *small* name value pairs managed by the |
| 38 ** property service. If your data doesn't fit in the provided | 29 ** property service. If your data doesn't fit in the provided |
| 39 ** space it is not appropriate for a system property. | 30 ** space it is not appropriate for a system property. |
| 40 ** | 31 ** |
| 41 ** WARNING: system/bionic/include/sys/system_properties.h also defines | 32 ** WARNING: system/bionic/include/sys/system_properties.h also defines |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 kSystemPropertyList | 81 kSystemPropertyList |
| 91 }; | 82 }; |
| 92 #endif /*HAVE_SYSTEM_PROPERTY_SERVER*/ | 83 #endif /*HAVE_SYSTEM_PROPERTY_SERVER*/ |
| 93 | 84 |
| 94 | 85 |
| 95 #ifdef __cplusplus | 86 #ifdef __cplusplus |
| 96 } | 87 } |
| 97 #endif | 88 #endif |
| 98 | 89 |
| 99 #endif | 90 #endif |
| OLD | NEW |