Skip to content

Instantly share code, notes, and snippets.

@johnbintz
Created November 30, 2010 20:22
Show Gist options
  • Save johnbintz/722325 to your computer and use it in GitHub Desktop.
Save johnbintz/722325 to your computer and use it in GitHub Desktop.
The changes to eclipsecolorer SVN trunk to get it to compile a native library for Mac OS X 10.6 64 bit
Index: colorer/src/zlib/contrib/minizip/ioapi.c
===================================================================
--- colorer/src/zlib/contrib/minizip/ioapi.c (revision 1626)
+++ colorer/src/zlib/contrib/minizip/ioapi.c (working copy)
@@ -1,3 +1,7 @@
+#define fopen64 fopen
+#define fseeko64 fseeko
+#define ftello64 ftello
+
/* ioapi.h -- IO base function header for compress/uncompress .zip
part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
Index: colorer/src/shared/unicode/Encodings.cpp
===================================================================
--- colorer/src/shared/unicode/Encodings.cpp (revision 1626)
+++ colorer/src/shared/unicode/Encodings.cpp (working copy)
@@ -2,6 +2,7 @@
#include<unicode/Encodings.h>
#include<unicode/x_encodings.h>
#include<string.h>
+#include<strings.h>
UnsupportedEncodingException::UnsupportedEncodingException(){};
UnsupportedEncodingException::UnsupportedEncodingException(const String& msg){
@@ -46,7 +47,7 @@
int Encodings::getEncodingIndex(const char *enc){
if (!enc) return -1;
for(int i = 0; i < encAliasesNum; i++)
- if (!stricmp(arr_idxEncodings[i].name, enc)){
+ if (!strcasecmp(arr_idxEncodings[i].name, enc)){
return arr_idxEncodings[i].pos;
};
return -1;
Index: colorer/src/shared/common/Logging.cpp
===================================================================
--- colorer/src/shared/common/Logging.cpp (revision 1626)
+++ colorer/src/shared/common/Logging.cpp (working copy)
@@ -1,5 +1,6 @@
#include<string.h>
+#include<strings.h>
#include"common/Logging.h"
#include"unicode/String.h"
@@ -89,7 +90,7 @@
bool found = false;
for (size_t idx = 0; idx < sizeof(toTrace)/sizeof(toTrace[0]); idx++){
- if (stricmp(toTrace[idx], cname) == 0){
+ if (strcasecmp(toTrace[idx], cname) == 0){
found = true;
}
}
===================================================================
--- eclipsecolorer/libnative/makefile.macos (revision 1626)
+++ eclipsecolorer/libnative/makefile.macos (working copy)
@@ -11,7 +11,7 @@
obj_output=objs
-ARCHFLAGS=-arch i386 -arch ppc7400
+ARCHFLAGS=-arch x86_64
OPTS=-DCOLORER_FEATURE_USE_DL_MALLOC=FALSE -DCOLORER_FEATURE_USE_CHUNK_ALLOC=FALSE
include $(shared_path)makefile.colorer.gcc
@johnbintz
Copy link
Author

Also, you'll need to set the path to jni.h:

export CPLUS_INCLUDE_PATH=/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Headers/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment