Subject: d4x: Fixed FTFBS due to conversion from "const char*" to "char*"
Package: d4x
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu karmic ubuntu-patch
Version: 2.5.7.1-6
Severity: wishlist
Tags: patch
This patch makes the package build also on newer version of g++ which
forbid a conversion from "const char*" to "char*".
In Ubuntu, we've applied the attached patch to achieve the following:
* main/ftp.cc, main/html.cc, main/locstr.cc,
main/face/edit.cc:
- Fixed FTBFS due to conversion from const char* to char* (LP: #428207)
We thought you might be interested in doing the same.
-- System Information:
Debian Release: 5.0
APT prefers jaunty-updates
APT policy: (500, 'jaunty-updates'), (500, 'jaunty-security'), (500,
'jaunty-backports'), (500, 'jaunty')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.28-15-generic (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- d4x-2.5.7.1.orig/main/ftp.cc
+++ d4x-2.5.7.1/main/ftp.cc
@@ -261,7 +261,7 @@
};
static void d4x_ftp_parse_pasv(const char *str,int args[]){
- char *a=index(str,'(');
+ char *a=(char*)index(str,'(');
if (a==NULL) return;
a+=1;
int i=0;
only in patch2:
unchanged:
--- d4x-2.5.7.1.orig/main/html.cc
+++ d4x-2.5.7.1/main/html.cc
@@ -700,7 +700,7 @@
void tHtmlParser::set_content_type(const char *ct){
//Example: text/html; charset=koi8-r
- char *a=index(ct,'=');
+ const char *a=index(ct,'=');
if (a) codepage=a+1;
};
only in patch2:
unchanged:
--- d4x-2.5.7.1.orig/main/locstr.cc
+++ d4x-2.5.7.1/main/locstr.cc
@@ -281,7 +281,7 @@
DBC_RETVAL_IF_FAIL(str!=NULL,NULL);
DBC_RETVAL_IF_FAIL(what!=NULL,NULL);
while (*str){
- char *a=index(what,*str);
+ const char *a=index(what,*str);
if (a) return(str);
str++;
};
@@ -472,7 +472,7 @@
char *escape_char(const char *where,char what,char bywhat){
DBC_RETVAL_IF_FAIL(where!=NULL,NULL);
int num=0;
- char *tmp=index(where,what);
+ const char *tmp=index(where,what);
while(tmp){
num+=1;
tmp=index(tmp+1,what);
@@ -962,17 +962,17 @@
DBC_RETVAL_IF_FAIL(a!=NULL,NULL);
DBC_RETVAL_IF_FAIL(b!=NULL,NULL);
int i=0;
- char *temp=index(b,'/');
+ char *temp=(char*)index(b,'/');
while (temp){
while (*temp=='/') temp+=1;
temp=index(temp,'/');
i+=1;
};
i-=1;
- temp=rindex(a,'/');
+ temp=(char*)rindex(a,'/');
while (temp && i>0){
*temp=0;
- char *tmp=rindex(a,'/');
+ char *tmp=(char*)rindex(a,'/');
*temp='/';
temp=tmp;
i-=1;
only in patch2:
unchanged:
--- d4x-2.5.7.1.orig/main/face/edit.cc
+++ d4x-2.5.7.1/main/face/edit.cc
@@ -1450,7 +1450,7 @@
static void _proxy_port_changed_(GtkEntry *entry,GtkEntry *entryh){
const char *tmp=gtk_entry_get_text(entryh);
- char *tmp1=index(tmp,':');
+ char *tmp1=(char *)index(tmp,':');
if (tmp1){
*tmp1=0;
char *ns=sum_strings(tmp,":",gtk_entry_get_text(entry),NULL);