Changeset 26660


Ignore:
Timestamp:
2013-01-10T15:51:17+13:00 (11 years ago)
Author:
davidb
Message:

Support for cross-compilation added. This particular set of changes focus on flags that assist cross-compilation with JNI

Location:
main/trunk/greenstone2/common-src/indexers/mgpp/jni
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/indexers/mgpp/jni/MGPPPassesWrapperImpl.cpp

    r16583 r26660  
    2020
    2121#include <jni.h>
     22
     23#ifdef __MINGW32__
     24
     25/* Cross compiling for Windows
     26   Want the type definitions in *win32* version of jni_md.h but
     27   this then leads to C-mangled style functions which we *don't*
     28   want.  The following achieves this */
     29
     30#undef JNIEXPORT
     31#undef JNIIMPORT
     32#undef JNICALL
     33
     34#define JNIEXPORT
     35#define JNIIMPORT
     36#define JNICALL
     37#endif
     38
    2239#include <assert.h>
    2340#include "sysfuncs.h"
  • main/trunk/greenstone2/common-src/indexers/mgpp/jni/MGPPRetrieveWrapperImpl.cpp

    r25147 r26660  
    2323
    2424#include <jni.h>
     25
     26#ifdef __MINGW32__
     27
     28/* Cross compiling for Windows
     29   Want the type definitions in *win32* version of jni_md.h but
     30   this then leads to C-mangled style functions which we *don't*
     31   want.  The following achieves this */
     32
     33#undef JNIEXPORT
     34#undef JNIIMPORT
     35#undef JNICALL
     36
     37#define JNIEXPORT
     38#define JNIIMPORT
     39#define JNICALL
     40#endif
     41
    2542#include "org_greenstone_mgpp_MGPPRetrieveWrapper.h"
    2643#include "TextGet.h"
  • main/trunk/greenstone2/common-src/indexers/mgpp/jni/MGPPSearchWrapperImpl.cpp

    r25246 r26660  
    3131
    3232#include <jni.h>
     33
     34#ifdef __MINGW32__
     35
     36/* Cross compiling for Windows
     37   Want the type definitions in *win32* version of jni_md.h but
     38   this then leads to C-mangled style functions which we *don't*
     39   want.  The following achieves this */
     40
     41#undef JNIEXPORT
     42#undef JNIIMPORT
     43#undef JNICALL
     44
     45#define JNIEXPORT
     46#define JNIIMPORT
     47#define JNICALL
     48#endif
     49
    3350#include "org_greenstone_mgpp_MGPPSearchWrapper.h"
    3451#include "MGPPSearchWrapperImpl.h"
Note: See TracChangeset for help on using the changeset viewer.