install include files
[MKUltra.git] / test / jni_md.h
blobb6a257ed85e338ce3c164d26d313eb4681ae9b09
1 /*
2 Copyright © 2016-2017 Gene Hightower <gene@digilicious.com>
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, version 3.
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program. See the file LICENSE. If not, see
15 <http://www.gnu.org/licenses/>.
18 #ifndef _JAVASOFT_JNI_MD_H_
19 #define _JAVASOFT_JNI_MD_H_
21 #include <cstdint>
23 typedef int32_t jint;
24 typedef int64_t jlong;
25 typedef signed char jbyte;
27 #ifdef __WIN32__
28 #define JNIEXPORT __declspec(dllexport)
29 #define JNIIMPORT __declspec(dllimport)
30 #define JNICALL __stdcall
31 #endif // __WIN32__
33 #ifdef __APPLE__
34 #define JNIEXPORT __attribute__((visibility("default")))
35 #define JNIIMPORT
36 #define JNICALL
37 #endif // __APPLE__
39 #ifdef __linux__
40 #ifndef __has_attribute
41 #define __has_attribute(x) 0
42 #endif
44 #if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
45 #define JNIEXPORT __attribute__((visibility("default")))
46 #define JNIIMPORT __attribute__((visibility("default")))
47 #else
48 #define JNIEXPORT
49 #define JNIIMPORT
50 #endif
52 #define JNICALL
53 #endif // __linux__
55 #endif // _JAVASOFT_JNI_MD_H_