[SCM] KDevelop PG-Qt packaging branch, master, updated. debian/0.9.5-2

Modestas Vainius modax at alioth.debian.org
Mon Jun 6 00:22:57 UTC 2011


The following commit has been merged in the master branch:
commit 45844bcb919d6845a799e112910ab9b2bde3a47d
Author: Modestas Vainius <modax at debian.org>
Date:   Mon Jun 6 02:42:26 2011 +0300

    Fix a couple of portability issues (armel, all big endian arches).
    
    This should enable kdevelop-php to build on them.
    
    The patch fix_portability_issues.diff fixes these bugs:
    
    kdev-pg-lexer.ll:inp() - assumption that it is possible to write directly to
    the int pointer as if it was a char pointer is wrong on big endian systems.
    
    kdev-pg-lexer.ll:YY_INPUT() - (c == EOF) (where c is char) will always be false
    on systems where char is unsigned by default [1][2].
    
    ASBeautifier.cpp:beautify() - (c < 0) (where c is char) will always be false on
    systems where char is unsigned by default [1][2].
    
    [1] warning: comparison is always false due to limited range of data type [-Wtype-limits]
    [2] http://www.network-theory.co.uk/docs/gccintro/gccintro_71.html
---
 debian/changelog                           |    2 +
 debian/patches/fix_portability_issues.diff |   62 ++++++++++++++++++++++++++++
 debian/patches/series                      |    1 +
 3 files changed, 65 insertions(+), 0 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0ff9b78..d3d0da0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,7 @@
 kdevelop-pg-qt (0.9.5-2) UNRELEASED; urgency=low
 
+  * Fix a couple of portability issues (armel, all big endian arches). This
+    should enable kdevelop-php to build on them (fix_portability_issues.diff).
 
  -- Modestas Vainius <modax at debian.org>  Mon, 06 Jun 2011 02:15:57 +0300
 
diff --git a/debian/patches/fix_portability_issues.diff b/debian/patches/fix_portability_issues.diff
new file mode 100644
index 0000000..ccea160
--- /dev/null
+++ b/debian/patches/fix_portability_issues.diff
@@ -0,0 +1,62 @@
+From: Modestas Vainius <modax at debian.org>
+Subject: Fix a couple of portability issues
+Forwarded: no
+Origin: vendor
+Last-Update: 2011-06-06
+
+Bugs fixed by this patch:
+
+kdev-pg-lexer.ll:inp() - assumption that it is possible to write directly to
+the int pointer as if it was a char pointer is wrong on big endian systems.
+
+kdev-pg-lexer.ll:YY_INPUT() - (c == EOF) (where c is char) will always be false
+on systems where char is unsigned by default [1][2].
+
+ASBeautifier.cpp:beautify() - (c < 0) (where c is char) will always be false on
+systems where char is unsigned by default [1][2].
+
+[1] warning: comparison is always false due to limited range of data type [-Wtype-limits]
+[2] http://www.network-theory.co.uk/docs/gccintro/gccintro_71.html
+
+--- a/kdev-pg/kdev-pg-lexer.ll
++++ b/kdev-pg/kdev-pg-lexer.ll
+@@ -43,8 +43,8 @@ namespace KDevPG
+ 
+ #define YY_INPUT(buf, result, max_size) \
+   { \
+-    char c = inp(); \
+-    result = (c == EOF) ? YY_NULL : (buf[0] = c, 1); \
++    int c = inp(); \
++    result = (c == EOF) ? YY_NULL : (buf[0] = (char)c, 1); \
+   }
+ 
+ #define YY_USER_ACTION  appendLineBuffer();
+@@ -277,7 +277,7 @@ String      ["]([^
\"]|[\][^
])*[
+ 
+ %%
+ 
+-int ch;
++char ch;
+ int yyLine = 1, currentOffset = 0;
+ bool endOfLine = false;
+ char yyTextLine[256 * 1024];
+@@ -286,7 +286,7 @@ int inp()
+ {
+   if( KDevPG::file.atEnd() )
+     return EOF;
+-  KDevPG::file.getChar( (char*)&ch );
++  KDevPG::file.getChar( &ch );
+   return ch;
+ }
+ 
+--- a/kdev-pg/ASBeautifier.cpp
++++ b/kdev-pg/ASBeautifier.cpp
+@@ -931,7 +931,7 @@ string ASBeautifier::beautify(const stri
+ 
+ 		// check for utf8 characters
+ 		// isalnum() will display an assert message in debug if not bypassed here
+-		if (ch < 0)
++		if (ch & 0x80)
+ 			continue;
+ 
+ 		// handle special characters (i.e. backslash+character such as 
, 	, ...)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9d22d13
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix_portability_issues.diff

-- 
KDevelop PG-Qt packaging



More information about the pkg-kde-commits mailing list