Annotation of embedaddon/strongswan/src/libstrongswan/utils/compat/android.h, revision 1.1.1.2

1.1       misho       1: /*
                      2:  * Copyright (C) 2010-2015 Tobias Brunner
                      3:  * HSR Hochschule fuer Technik Rapperswil
                      4:  *
                      5:  * This program is free software; you can redistribute it and/or modify it
                      6:  * under the terms of the GNU General Public License as published by the
                      7:  * Free Software Foundation; either version 2 of the License, or (at your
                      8:  * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
                      9:  *
                     10:  * This program is distributed in the hope that it will be useful, but
                     11:  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
                     12:  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
                     13:  * for more details.
                     14:  */
                     15: 
                     16: /**
                     17:  * @defgroup android android
                     18:  * @{ @ingroup compat
                     19:  */
                     20: 
                     21: #ifndef ANDROID_H_
                     22: #define ANDROID_H_
                     23: 
                     24: #include <android/api-level.h>
                     25: 
                     26: /* stuff defined in AndroidConfig.h, which is included using the -include
                     27:  * command-line option, thus cannot be undefined using -U CFLAGS options.
                     28:  * the reason we have to undefine these flags in the first place, is that
                     29:  * AndroidConfig.h defines them as 0, which in turn means that they are
                     30:  * actually defined. */
                     31: #undef HAVE_BACKTRACE
                     32: 
                     33: /* API level 21 changed quite a few things, we define some stuff here and not
                     34:  * via CFLAGS in Android.mk files as it is easier to compare versions */
                     35: #if __ANDROID_API__ >= 21
                     36: 
                     37: #define HAVE_PTHREAD_CONDATTR_INIT 1
                     38: #define HAVE_CONDATTR_CLOCK_MONOTONIC 1
                     39: 
1.1.1.2 ! misho      40: #undef TIME_CLOCK_ID
        !            41: #define TIME_CLOCK_ID CLOCK_REALTIME
        !            42: 
1.1       misho      43: #define HAVE_SYS_CAPABILITY_H 1
                     44: 
                     45: #else /* __ANDROID_API__ */
                     46: 
                     47: #define HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC 1
                     48: 
                     49: #endif /* __ANDROID_API__ */
                     50: 
                     51: #endif /** ANDROID_H_ @}*/

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>