Fixes compile with Bison 2.5 and Gcc 4.5.3 for LibO 3.4 RC2.

libreoffice-libs-core-3.4.0.2 requires patch to compile with Bison 2.5 and Gcc
4.5.3.

Basically the compiler errors when it fails to convert a const sal_Char* to a
sal_Char *.

The patch changes the prototype of the error printing function to const
sal_Char*.


--- ./connectivity/inc/connectivity/sqlparse.hxx.orig   2011-05-19 
04:27:40.000000000 -0600
+++ ./connectivity/inc/connectivity/sqlparse.hxx        2011-05-29 
03:31:51.215723596 -0600
@@ -232,7 +232,7 @@ namespace connectivity
         // returns the type for a parameter in a given function name
         static sal_Int32 getFunctionParameterType(sal_uInt32 
_nTokenId,sal_uInt32 _nPos);

-        void error(sal_Char *fmt);
+        void error(const sal_Char *fmt);
         int SQLlex();
 #ifdef YYBISON
         void setParseTree(OSQLParseNode * pNewParseTree);
--- ./connectivity/source/parse/sqlbison.y.orig 2011-05-19 04:27:40.000000000 
-0600
+++ ./connectivity/source/parse/sqlbison.y      2011-05-29 03:38:18.652924536 
-0600
@@ -4333,7 +4333,7 @@ void OSQLParser::reduceLiteral(OSQLParse
 }

 // -------------------------------------------------------------------------
-void OSQLParser::error(sal_Char *fmt)
+void OSQLParser::error(const sal_Char *fmt)
 {
        if(!m_sErrorMessage.getLength())
        {

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to