[Libreoffice-commits] .: 3 commits - connectivity/source
Tor Lillqvist
tml at kemper.freedesktop.org
Wed Jul 20 08:14:58 PDT 2011
connectivity/source/drivers/ado/ADriver.cxx | 2 +-
connectivity/source/drivers/ado/makefile.mk | 4 ++++
connectivity/source/drivers/hsqldb/HStorageAccess.cxx | 4 ++--
connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx | 2 +-
4 files changed, 8 insertions(+), 4 deletions(-)
New commits:
commit 4a2d1fd61fadbd950995d9f9de5c5d37908c4511
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Wed Jul 20 18:13:23 2011 +0300
Add a few casts to fix MinGW compilation errors
diff --git a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
index c0a5993..d1572e9 100644
--- a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
@@ -257,7 +257,7 @@ jint read_from_storage_stream_into_buffer( JNIEnv * env, jobject /*obj_this*/,js
if (nBytesRead <= 0)
return -1;
- env->SetByteArrayRegion(buffer,off,nBytesRead,&aData[0]);
+ env->SetByteArrayRegion(buffer,off,nBytesRead,(const jbyte*) &aData[0]);
#ifdef HSQLDB_DBG
if ( logger )
@@ -448,7 +448,7 @@ void write_to_storage_stream_from_buffer( JNIEnv* env, jobject /*obj_this*/, jst
OSL_ENSURE(buf,"buf is NULL");
if ( buf && len > 0 && len <= env->GetArrayLength(buffer))
{
- Sequence< ::sal_Int8 > aData(buf + off,len);
+ Sequence< ::sal_Int8 > aData((const signed char*) buf + off,len);
env->ReleaseByteArrayElements(buffer, buf, JNI_ABORT);
xOut->writeBytes(aData);
#ifdef HSQLDB_DBG
diff --git a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
index 3d3a912..471ceea 100644
--- a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
@@ -294,7 +294,7 @@ SAL_DLLPUBLIC_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_StorageNat
}
OSL_ENSURE(nLen >= nBytesRead,"Buffer is too small!");
OSL_ENSURE(aData.getLength() >= nBytesRead,"Buffer is too small!");
- env->SetByteArrayRegion(buffer,0,nBytesRead,&aData[0]);
+ env->SetByteArrayRegion(buffer,0,nBytesRead,(const jbyte*) &aData[0]);
#ifdef HSQLDB_DBG
aDataLog.write( &aData[0], nBytesRead );
#endif
commit 046a0a124756a415ffb8417a3ad22bd726af909b
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Wed Jul 20 18:04:30 2011 +0300
Win32 header names need to be in lowercase as that is how they are in MinGW
diff --git a/connectivity/source/drivers/ado/ADriver.cxx b/connectivity/source/drivers/ado/ADriver.cxx
index 83a2bcd..d209629 100644
--- a/connectivity/source/drivers/ado/ADriver.cxx
+++ b/connectivity/source/drivers/ado/ADriver.cxx
@@ -39,7 +39,7 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include "connectivity/dbexception.hxx"
#include "resource/ado_res.hrc"
-#include <Objbase.h>
+#include <objbase.h>
#include "resource/sharedresources.hxx"
commit f5a8197871ebf4076613370fd5de301f78365e0f
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Wed Jul 20 18:00:48 2011 +0300
MinGW needs -fpermissive for <adoint.h>
diff --git a/connectivity/source/drivers/ado/makefile.mk b/connectivity/source/drivers/ado/makefile.mk
index 8e65a87..20cd74f 100755
--- a/connectivity/source/drivers/ado/makefile.mk
+++ b/connectivity/source/drivers/ado/makefile.mk
@@ -43,6 +43,10 @@ ENVCFLAGS+=/FR$(SLO)$/
.IF "$(GUI)"=="WNT"
# --- Files -------------------------------------
+.IF "$(COM)" == "GCC"
+CFLAGS+=-fpermissive
+.ENDIF
+
EXCEPTIONSFILES= \
$(SLO)$/ADatabaseMetaDataImpl.obj \
$(SLO)$/Aolevariant.obj \
More information about the Libreoffice-commits
mailing list