connectivity/source/parse/sqlflex.l | 18 +++++++++--------- solenv/inc/unxlngppc.mk | 3 +++ 2 files changed, 12 insertions(+), 9 deletions(-)
New commits: commit ad5f0ff5479e9aadb8ecce5e6607ba5cba7170c1 Author: Caolán McNamara <caol...@redhat.com> Date: Mon May 14 13:25:24 2012 +0100 Revert "sw34bf03: #i81127#: patch by pmladek: linux/ppc: remove -fsigned-char" This reverts commit 875c9a28f49c7a73607fcdfac245b648801dccee. because it doesn't make sense to build the dmake modules without -fsigned-char and the gbuild modules with -fsigned-char and we're still got a few bugs where we assume chars are signed Conflicts: solenv/inc/unxlngppc.mk Change-Id: I6ac07fa3ebadd83efd0da1ee69a010b62dfaad59 Signed-off-by: Rene Engelhard <r...@debian.org> diff --git a/solenv/inc/unxlngppc.mk b/solenv/inc/unxlngppc.mk index af528d9..c7f1372 100644 --- a/solenv/inc/unxlngppc.mk +++ b/solenv/inc/unxlngppc.mk @@ -31,3 +31,6 @@ DEFAULTOPT=-Os PICSWITCH:=-fPIC .INCLUDE : unxlng.mk CDEFS+=-DPOWERPC -DPPC +CFLAGS+=-fsigned-char +CFLAGSCC+=-fsigned-char +CFLAGSCXX+=-fsigned-char commit f0effaee1dc13b972ba8ff7b9a3f68b274487ef1 Author: Caolán McNamara <caol...@redhat.com> Date: Mon May 14 14:00:59 2012 +0100 ppc: yyinput returns a int, truncating to (unsigned)char does't work retain this as an int so that on platforms where char is unsigned we don't mangle the value and get this all wrong. Fixes database opening tables on ppc if -fsigned-char is removed Change-Id: I66f0c6b1b19191595f8b348377579f2daabf7ada Signed-off-by: Rene Engelhard <r...@debian.org> diff --git a/connectivity/source/parse/sqlflex.l b/connectivity/source/parse/sqlflex.l index d5b2f14..fd27cb8 100755 --- a/connectivity/source/parse/sqlflex.l +++ b/connectivity/source/parse/sqlflex.l @@ -76,7 +76,7 @@ using namespace connectivity; static ::rtl::OUString aEmptyString; -static sal_Int32 gatherString(sal_Int32 delim, sal_Int32 nTyp); +static sal_Int32 gatherString(int delim, sal_Int32 nTyp); static sal_Int32 gatherName(const sal_Char*); static sal_Int32 gatherNamePre(const sal_Char* ); // has to be set before the parser starts @@ -94,8 +94,8 @@ OSQLScanner* xxx_pGLOBAL_SQLSCAN = NULL; #define YY_INPUT(buf,result,max_size) \ { \ - buf[0] = xxx_pGLOBAL_SQLSCAN->SQLyygetc(); \ - result = buf[0] != -1; \ + int c = xxx_pGLOBAL_SQLSCAN->SQLyygetc(); \ + result = (c == EOF) ? YY_NULL : (buf[0] = c, 1);\ } #define YY_FATAL_ERROR(msg) \ @@ -518,9 +518,9 @@ inline bool checkeof(int c) { return c == 0 || c == EOF; } * nTyp == 1 -> SQL_NODE_STRING * nTyp == 2 -> SQL_NODE_ACCESS_DATE */ -sal_Int32 gatherString( sal_Int32 delim, sal_Int32 nTyp) +sal_Int32 gatherString(int delim, sal_Int32 nTyp) { - sal_Char ch; + int ch; ::rtl::OStringBuffer sBuffer(256); while (!checkeof(ch = yyinput())) @@ -547,7 +547,7 @@ sal_Int32 gatherString( sal_Int32 delim, sal_Int32 nTyp) } else { - sBuffer.append(ch); + sBuffer.append(static_cast<sal_Char>(ch)); } } @@ -555,7 +555,7 @@ sal_Int32 gatherString( sal_Int32 delim, sal_Int32 nTyp) break; else { - sBuffer.append(ch); + sBuffer.append(static_cast<sal_Char>(ch)); } } YY_FATAL_ERROR("Unterminated name string"); @@ -746,7 +746,7 @@ void OSQLScanner::SQLyyerror(sal_Char *fmt) sal_Char *s = Buffer; sal_Int32 nPos = 1; - sal_Int32 ch = SQLyytext ? (SQLyytext[0] == 0 ? ' ' : SQLyytext[0]): ' '; + int ch = SQLyytext ? (SQLyytext[0] == 0 ? ' ' : SQLyytext[0]): ' '; *s++ = ch; while (!checkeof(ch = yyinput())) { @@ -800,7 +800,7 @@ void OSQLScanner::prepareScan(const ::rtl::OUString & rNewStatement, const IPars //------------------------------------------------------------------------------ sal_Int32 OSQLScanner::SQLyygetc(void) { - sal_Int32 nPos = (m_nCurrentPos >= m_sStatement.getLength()) ? -1 : m_sStatement.getStr()[m_nCurrentPos]; + sal_Int32 nPos = (m_nCurrentPos >= m_sStatement.getLength()) ? EOF : m_sStatement.getStr()[m_nCurrentPos]; m_nCurrentPos++; return nPos; }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits