Changeset 26674

Show
Ignore:
Timestamp:
10.01.2013 16:30:25 (6 years ago)
Author:
davidb
Message:

Changes to support cross-compiling using mingw under Linux to produce Windows native binaries/dlls. See comment at the top of the file for more details

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/packages/javagdbm/jni/gdbmjava.c

    r10765 r26674  
    3232#include <string.h> 
    3333 
    34 #if defined (__WIN32__) 
     34#ifdef __MINGW32__ 
     35#define MSDOS 
     36#endif 
     37 
     38#if defined (_MSC_VER) 
    3539#include <gdbmdefs.h> 
    3640#include <gdbmerrno.h> 
     
    4246 
    4347#include <jni.h> 
     48 
     49#ifdef __MINGW32__ 
     50 
     51/* (Cross) compiling for Windows Want the type definitions in *win32* 
     52   version of jni_md.h but with the mingw c compiler this then leads 
     53   to C-mangled style functions (param/num args encoded in function 
     54   name) which we *don't* want.  The following achieves this */ 
     55 
     56#undef JNIEXPORT 
     57#undef JNIIMPORT 
     58#undef JNICALL 
     59 
     60#define JNIEXPORT 
     61#define JNIIMPORT 
     62#define JNICALL 
     63#endif 
    4464 
    4565#include <GdbmFile.h>