Package: epos
Version: 1:2.5.27-1
Severity: normal
Tags: patch
When building 'epos' on amd64/unstable with gcc-4.0,
I get the following error:
Making all in nnet
make[4]: Entering directory `/epos-2.5.27/src/nnet'
if /bin/sh ../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../..
-I./.. -w -DEPOS -ggdb -DBASE_DIR=/usr/share/epos -Wall -Wunused -gstabs+ -O
-MT enumstring.lo -MD -MP -MF ".deps/enumstring.Tpo" \
-c -o enumstring.lo `test -f 'enumstring.cc' || echo './'`enumstring.cc; \
then mv -f ".deps/enumstring.Tpo" ".deps/enumstring.Plo"; \
else rm -f ".deps/enumstring.Tpo"; exit 1; \
fi
mkdir .libs
g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I./.. -w -DEPOS -ggdb
-DBASE_DIR=/usr/share/epos -Wall -Wunused -gstabs+ -O -MT enumstring.lo -MD -MP
-MF .deps/enumstring.Tpo -c enumstring.cc -fPIC -DPIC -o .libs/enumstring.lo
slowstring.h:61: error: invalid use of constructor as a template
slowstring.h:61: note: use 'CBasicString<T>::CBasicString' instead of
'CBasicString<T>::CBasicString<T>' to name the constructor in a qualified name
make[4]: *** [enumstring.lo] Error 1
make[4]: Leaving directory `/epos-2.5.27/src/nnet'
With the attached patch 'epos' can be compiled
on amd64 using gcc-4.0.
Regards
Andreas Jochens
diff -urN ../tmp-orig/epos-2.5.27/src/block.cc ./src/block.cc
--- ../tmp-orig/epos-2.5.27/src/block.cc 2004-08-30 21:51:45.000000000
+0200
+++ ./src/block.cc 2005-04-12 20:53:50.172107265 +0200
@@ -22,7 +22,7 @@
#define END_OF_SWITCH 2 // by unit length
#define END_OF_RULES 3
#define LAST_SPECIAL_RULE END_OF_RULES
-#define ORDINARY_RULE(x) (((unsigned int)(x)) > LAST_SPECIAL_RULE)
+#define ORDINARY_RULE(x) (((unsigned long)(x)) > LAST_SPECIAL_RULE)
#define MAX_WORDS_PER_LINE 64
#define DOLLAR '$' //These symbols are used to
represent
@@ -126,7 +126,7 @@
}
}
if (again > 1) diatax("Badly placed count");
- int last_as_special = (int)rulist[n_rules];
+ long last_as_special = (long)rulist[n_rules];
if (last_as_special != terminator) switch (last_as_special) {
case END_OF_BLOCK: diatax("No block to terminate");
case END_OF_CHOICE: diatax("No choice to terminate");
@@ -527,7 +527,7 @@
try {
rule *r = parse_rule(file, vars, count);
if (ORDINARY_RULE(r)) return r;
- if ((int)r != END_OF_RULES) diatax("No rule follows a
conditional rule");
+ if ((long)r != END_OF_RULES) diatax("No rule follows a
conditional rule");
shriek(811, "No rule follows a conditional rule at the end of
%s", file->current_file);
} catch (any_exception *e) {
if (e->code / 10 != 81) throw e;
diff -urN ../tmp-orig/epos-2.5.27/src/epos.h ./src/epos.h
--- ../tmp-orig/epos-2.5.27/src/epos.h 2004-02-15 19:13:52.000000000 +0100
+++ ./src/epos.h 2005-04-12 20:54:20.133254770 +0200
@@ -84,7 +84,7 @@
#define U_VOID 120
extern int unused_variable;
-#define unuse(x) (unused_variable = (int)(x));
+#define unuse(x) (unused_variable = (long)(x));
extern const bool is_monolith;
diff -urN ../tmp-orig/epos-2.5.27/src/nnet/neural.cc ./src/nnet/neural.cc
--- ../tmp-orig/epos-2.5.27/src/nnet/neural.cc 2004-02-15 19:15:29.000000000
+0100
+++ ./src/nnet/neural.cc 2005-04-12 20:53:50.176106484 +0200
@@ -671,7 +671,7 @@
case 'i': fprintf (file, "%i", int_val); break;
case 'c': fprintf (file, "%c", char_val); break;
case 'b': fprintf (file, "%s", bool_val ? "true" : "false");
break;
- case 'u': fprintf (file, "unit var %u", unsigned (unit_val));
break;
+ case 'u': fprintf (file, "unit var %lu", (unsigned
long)(unit_val)); break;
default: fprintf (file, "Cannot print value type %c",
value_type);
}
}
diff -urN ../tmp-orig/epos-2.5.27/src/nnet/slowstring.h ./src/nnet/slowstring.h
--- ../tmp-orig/epos-2.5.27/src/nnet/slowstring.h 2004-02-15
17:25:27.000000000 +0100
+++ ./src/nnet/slowstring.h 2005-04-12 20:53:50.177106288 +0200
@@ -58,7 +58,7 @@
typedef CString RStr;
template<class T>
-CBasicString<T>::CBasicString<T> ()
+CBasicString<T>::CBasicString ()
{
data = new T;
data[0] = 0;
diff -urN ../tmp-orig/epos-2.5.27/src/options.cc ./src/options.cc
--- ../tmp-orig/epos-2.5.27/src/options.cc 2004-02-15 19:20:27.000000000
+0100
+++ ./src/options.cc 2005-04-12 20:53:50.178106093 +0200
@@ -87,7 +87,7 @@
}
}
-#define LANGS_OFFSET ((int)&((configuration *)NULL)->langs)
+#define LANGS_OFFSET ((long)&((configuration *)NULL)->langs)
#define LANGS_LENGTH ((*cfg)->n_langs * sizeof(void *))
void cow_configuration(configuration **cfg)
@@ -727,7 +727,7 @@
* The order of cowing cfg, lang and voice, is important.
*/
-#define VOICES_OFFSET ((int)&((lang *)NULL)->voicetab)
+#define VOICES_OFFSET ((long)&((lang *)NULL)->voicetab)
#define VOICES_LENGTH (this_lang->n_voices * sizeof(void *))
bool set_option(epos_option *o, const char *value)
diff -urN ../tmp-orig/epos-2.5.27/src/options.lst ./src/options.lst
--- ../tmp-orig/epos-2.5.27/src/options.lst 2004-02-15 17:12:42.000000000
+0100
+++ ./src/options.lst 2005-04-12 20:53:50.180105702 +0200
@@ -119,17 +119,17 @@
#define CHANNEL O_CHANNEL
#define CHARSET O_CHARSET
-#define OPTION(name,type,default) {"C:" stringify(name) + 2, type, OS_CFG,
A_PUBLIC, A_PUBLIC, true, false, (int)&((configuration *)NULL)->name},
+#define OPTION(name,type,default) {"C:" stringify(name) + 2, type, OS_CFG,
A_PUBLIC, A_PUBLIC, true, false, (long)&((configuration *)NULL)->name},
#define OPTIONAGGR(x)
-#define OPTIONITEM(id,name,type, default) {"C:" stringify(name) + 2, type,
OS_CFG, A_PUBLIC, A_PUBLIC, true, false, (int)&((configuration *)NULL)->id},
+#define OPTIONITEM(id,name,type, default) {"C:" stringify(name) + 2, type,
OS_CFG, A_PUBLIC, A_PUBLIC, true, false, (long)&((configuration *)NULL)->id},
#define OPTIONAGGRENDS
#define VOICE_OPTION(name,type,default) OPTION(name,type,default)
#define LNG_OPTION(name,type,default) OPTION(name,type,default)
#define OPTIONARRAY(name, type, default, number) {"C:" stringify(name) + 2,
type, OS_CFG, \
- A_PUBLIC, A_PUBLIC, true, true, (int)&((configuration
*)NULL)->name},
+ A_PUBLIC, A_PUBLIC, true, true, (long)&((configuration
*)NULL)->name},
#define STATICARRAY(name, type, default, number)
#define LNG_OPTIONARRAY(name, type, default, number) \
OPTIONARRAY(name, type, default, number)
@@ -217,13 +217,13 @@
#define OPTIONAGGRENDS
#define OPTION(x,y,z)
-#define VOICE_OPTION(name,type,default) {"L:" stringify(name) + 2, type,
OS_LANG, A_PUBLIC, A_PUBLIC, true, false, (int)&((lang *)NULL)->name},
-#define LNG_OPTION(name,type,default) {"L:" stringify(name) + 2, type,
OS_LANG, A_PUBLIC, A_PUBLIC, true, false, (int)&((lang *)NULL)->name},
+#define VOICE_OPTION(name,type,default) {"L:" stringify(name) + 2, type,
OS_LANG, A_PUBLIC, A_PUBLIC, true, false, (long)&((lang *)NULL)->name},
+#define LNG_OPTION(name,type,default) {"L:" stringify(name) + 2, type,
OS_LANG, A_PUBLIC, A_PUBLIC, true, false, (long)&((lang *)NULL)->name},
#define OPTIONARRAY(name, type, default, number)
#define STATICARRAY(name, type, default, number)
#define LNG_OPTIONARRAY(name, type, default, number) {"L:" stringify(name) +
2, type, OS_LANG, \
- A_PUBLIC, A_PUBLIC, true, true, (int)&((lang *)NULL)->name},
+ A_PUBLIC, A_PUBLIC, true, true, (long)&((lang *)NULL)->name},
#undef CONFIG_LANG_DESCRIBE
@@ -299,7 +299,7 @@
#define CHANNEL O_CHANNEL
#define CHARSET O_CHARSET
-#define VOICE_OPTION(name,type,default) {"V:" stringify(name) + 2, type,
OS_VOICE, A_PUBLIC, A_PUBLIC, true, false, (int)&((voice *)NULL)->name},
+#define VOICE_OPTION(name,type,default) {"V:" stringify(name) + 2, type,
OS_VOICE, A_PUBLIC, A_PUBLIC, true, false, (long)&((voice *)NULL)->name},
#define STATICARRAY(name, type, default, number)
@@ -361,14 +361,14 @@
#define CHARSET O_CHARSET
#undef STATIC_OPTION
-#define STATIC_OPTION(name,type,default) {"S:" stringify(name) + 2, type,
OS_STATIC, A_PUBLIC, A_PUBLIC, true, false, (int)&((static_configuration
*)NULL)->name},
+#define STATIC_OPTION(name,type,default) {"S:" stringify(name) + 2, type,
OS_STATIC, A_PUBLIC, A_PUBLIC, true, false, (long)&((static_configuration
*)NULL)->name},
#define OPTION(name,type,default)
#define VOICE_OPTION(name,type,default)
#define LNG_OPTION(name,type,default)
#define STATICARRAY(name, type, default, number) {"S:" stringify(name) + 2,
type, OS_STATIC, \
- A_PUBLIC, A_PUBLIC, true, true, (int)&((static_configuration
*)NULL)->name},
+ A_PUBLIC, A_PUBLIC, true, true, (long)&((static_configuration
*)NULL)->name},
#undef CONFIG_STATIC_DESCRIBE
diff -urN ../tmp-orig/epos-2.5.27/src/unit.cc ./src/unit.cc
--- ../tmp-orig/epos-2.5.27/src/unit.cc 2005-03-07 17:36:38.000000000 +0100
+++ ./src/unit.cc 2005-04-12 20:53:50.182105312 +0200
@@ -1596,10 +1596,10 @@
if (lastborn && lastborn->prev && !m->disjoint(lastborn->prev->m))
insane("disjointness problem");
if (scfg->ptr_trusted) return;
- if (prev && (unsigned int) prev<0x8000000) insane("prev");
- if (next && (unsigned int) next<0x8000000) insane("next");
- if (firstborn && (unsigned int) firstborn<0x8000000)
insane("firstborn");
- if (lastborn && (unsigned int) lastborn<0x8000000) insane("lastborn");
+ if (prev && (unsigned long) prev<0x8000000) insane("prev");
+ if (next && (unsigned long) next<0x8000000) insane("next");
+ if (firstborn && (unsigned long) firstborn<0x8000000)
insane("firstborn");
+ if (lastborn && (unsigned long) lastborn<0x8000000) insane("lastborn");
}
void
diff -urN ../tmp-orig/epos-2.5.27/src/waveform.cc ./src/waveform.cc
--- ../tmp-orig/epos-2.5.27/src/waveform.cc 2005-03-09 01:07:18.000000000
+0100
+++ ./src/waveform.cc 2005-04-12 20:53:50.183105116 +0200
@@ -667,14 +667,14 @@
inline char *
wavefm::get_ophase_buff(const w_ophase *p)
{
- char *tmp = (char *)this + (int)p->buff;
+ char *tmp = (char *)this + (long)p->buff;
return p->inlined ? tmp : *(char **)tmp;
}
inline int
wavefm::get_ophase_len(const w_ophase *p)
{
- return (p->inlined ? (int)p->len : *(int *)((char *)this +
(int)p->len)) + p->adjustment;
+ return (p->inlined ? (long)p->len : *(int *)((char *)this +
(long)p->len)) + p->adjustment;
}
inline bool
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]