Skip to content

Instantly share code, notes, and snippets.

@ivoronin
Created May 15, 2012 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivoronin/2703440 to your computer and use it in GitHub Desktop.
Save ivoronin/2703440 to your computer and use it in GitHub Desktop.
GobiAPI Patch
Index: libgobi-20120112~1106/GobiConnectionMgmt/GobiConnectionMgmtExports.cpp
===================================================================
--- libgobi-20120112~1106.orig/GobiConnectionMgmt/GobiConnectionMgmtExports.cpp 2012-05-05 15:23:37.892122062 +0400
+++ libgobi-20120112~1106/GobiConnectionMgmt/GobiConnectionMgmtExports.cpp 2012-05-05 15:23:38.000000000 +0400
@@ -39,6 +39,10 @@
#include "StdAfx.h"
#include "GobiConnectionMgmt.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*=========================================================================*/
// Exported Methods
/*=========================================================================*/
@@ -17912,3 +17916,6 @@
ULONG msgID = 37;
return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut );
}
+#ifdef __cplusplus
+}
+#endif
Index: libgobi-20120112~1106/GobiConnectionMgmt/Makefile
===================================================================
--- libgobi-20120112~1106.orig/GobiConnectionMgmt/Makefile 2012-05-05 15:23:37.880122062 +0400
+++ libgobi-20120112~1106/GobiConnectionMgmt/Makefile 2012-05-05 15:23:38.000000000 +0400
@@ -1,15 +1,15 @@
-INCLUDES=-I ../Core -I ../Shared -lrt -L. -lCore
-CXXFLAGS=-m32 -march=i386 -Wunused-variable
+INCLUDES=-I ../Core -I ../Shared -L. -lCore -lrt
+CXXFLAGS=-Wunused-variable -fPIC
LDFLAGS=-melf_i386
DEBUGFLAGS=-g3 -D DEBUG
SOURCES=GobiConnectionMgmtExports.cpp \
GobiConnectionMgmt.cpp \
../Shared/GobiQMICore.cpp
-OUTPUT=GobiConnectionMgmt.so
+OUTPUT=libGobiConnectionMgmt.so.1.0.0
INSTALLDIR=/opt/Qualcomm/GobiExtensibleAPI/
-all: clean $(OUTPUT)
+all: $(OUTPUT)
$(OUTPUT): $(SOURCES) libCore.a
$(CXX) $(CXXFLAGS) -shared $(SOURCES) $(INCLUDES) -o $(OUTPUT)
Index: libgobi-20120112~1106/Core/StdAfx.h
===================================================================
--- libgobi-20120112~1106.orig/Core/StdAfx.h 2012-05-05 15:23:37.908122062 +0400
+++ libgobi-20120112~1106/Core/StdAfx.h 2012-05-05 15:24:24.392121288 +0400
@@ -79,13 +79,15 @@
##arg ); \
}
-#else
+#elif DEBUG
#define TRACE( format, arg... ) \
printf( "%s:%d: " format, \
__FILE__, \
__LINE__, \
##arg )
+#else
+ #define TRACE( format, arg...)
#endif
//---------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment