mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-29 17:38:59 +00:00
1efe6686fc
swiftc(1) requires every -D option to be prefixed with -Xcc, which is not easy to achieve using autoconf. Now instead of setting configuration macros like HAVE_LSEEK64 on the command line using -D, they are defined in config.h, which is generated by ./configure, ignored by Git, and included by all headers and source files that use any configuration macro. The dependency on Makefile has been replaced with a dependency on Makefile.in and config.h, which helps avoid some redundant full recompiles after running ./configure, because the configure script does not overwrit config.h if its content does not change.
39 lines
1.2 KiB
C
39 lines
1.2 KiB
C
/*
|
|
Serval DNA JNI common definitions
|
|
Copyright (C) 2016 Flinders University
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public License
|
|
as published by the Free Software Foundation; either version 2
|
|
of the License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
*/
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#ifndef HAVE_JNI_H
|
|
#error <jni.h> is not available
|
|
#endif
|
|
|
|
#include <jni.h>
|
|
|
|
// Stop OpenJDK 7 from foisting their UNUSED() macro on us in <jni_md.h>
|
|
// N.B. This means that "feature.h" can only be included _after_ this header
|
|
// file, because it defines UNUSED().
|
|
#ifdef UNUSED
|
|
# undef UNUSED
|
|
#endif
|
|
|
|
// Throw a Java exception and return -1.
|
|
int jni_throw(JNIEnv *env, const char *class_name, const char *msg);
|