[Libreoffice-commits] core.git: connectivity/source

Fridrich Å trba fridrich.strba at bluewin.ch
Tue Feb 19 03:11:00 PST 2013


 connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 4c7d04c681a44caff1eba8f2022dacdf1242b1b5
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Tue Feb 19 12:10:25 2013 +0100

    g_strcmp0 is not in our baseline glib2
    
    Change-Id: I65b4ea5bb8beacef79e963e4dd78fa764f3ab697

diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
index 11742c1..32bce4d 100644
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
@@ -39,6 +39,17 @@ using namespace com::sun::star::beans;
 using namespace com::sun::star::sdbc;
 using namespace com::sun::star::sdbcx;
 
+namespace
+{
+    int libo_strcmp0 (const char *str1, const char *str2)
+    {
+         if (!str1)
+             return -(str1 != str2);
+         if (!str2)
+             return str1 != str2;
+         return strcmp (str1, str2);
+    }
+}
 
 namespace connectivity
 {
@@ -1090,7 +1101,7 @@ bool isSourceBackend(ESource *pSource, const char *backendname)
         return false;
 
     gpointer extension = e_source_get_extension (pSource, E_SOURCE_EXTENSION_ADDRESS_BOOK);
-    return extension && g_strcmp0 (e_source_backend_get_backend_name (extension), backendname) == 0;
+    return extension && libo_strcmp0 (e_source_backend_get_backend_name (extension), backendname) == 0;
 }
 
 Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables(


More information about the Libreoffice-commits mailing list