libc: Add <android/api-level.h>
Add a new header that defines __ANDROID_API__ as a constant integer corresponding to the current native API level. This header is included by <sys/cdefs.h> Change-Id: Ib4774e247b395991266245815a24292afc919848 NOTE: This header is already provided by the NDK's platform headers. for levels 3 to 9.
This commit is contained in:
parent
9962cef7c6
commit
23d24394e7
@ -1,7 +1,16 @@
|
||||
Bionic ChangeLog:
|
||||
-----------------
|
||||
|
||||
Differences between current and Android 2.2:
|
||||
Differences between current and Android 2.3:
|
||||
|
||||
- <android/api-level.h>: Added new header to define __ANDROID_API__ to
|
||||
a constant integer corresponding to the native API level. This header
|
||||
also exists in the NDK's platform headers.
|
||||
|
||||
- <sys/cdefs.h>: Include <android/api-level.h>
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Differences between Android 2.3 and Android 2.2:
|
||||
|
||||
- <pthread.h>: Add reader/writer locks implementation. Add sanity
|
||||
checking to pthread_mutex_destroy() (e.g. a locked mutex will return
|
||||
|
33
libc/include/android/api-level.h
Normal file
33
libc/include/android/api-level.h
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (C) 2008 The Android Open Source Project
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef ANDROID_API_LEVEL_H
|
||||
#define ANDROID_API_LEVEL_H
|
||||
|
||||
#define __ANDROID_API__ 10
|
||||
|
||||
#endif /* ANDROID_API_LEVEL_H */
|
@ -497,5 +497,6 @@
|
||||
#endif
|
||||
|
||||
#define __BIONIC__ 1
|
||||
#include <android/api-level.h>
|
||||
|
||||
#endif /* !_SYS_CDEFS_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user