• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 The Android Open Source Project
2 //
3 // This software is licensed under the terms of the GNU General Public
4 // License version 2, as published by the Free Software Foundation, and
5 // may be copied, distributed, and modified under those terms.
6 //
7 // This program is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10 // GNU General Public License for more details.
11 
12 #pragma once
13 
14 #ifdef __cplusplus
15 #define ANDROID_BEGIN_HEADER extern "C" {
16 #define ANDROID_END_HEADER   }
17 #else
18 #define ANDROID_BEGIN_HEADER /* nothing */
19 #define ANDROID_END_HEADER  /* nothing */
20 #endif
21 
22 // ANDROID_GCC_PREREQ(<major>,<minor>) will evaluate to true
23 // iff the current version of GCC is <major>.<minor> or higher.
24 #if defined(__GNUC__) && defined(__GNUC_MINOR__)
25 # define ANDROID_GCC_PREREQ(maj, min) \
26          ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
27 #else
28 # define ANDROID_GCC_PREREQ(maj, min) 0
29 #endif
30