[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#376159: Open21xx Bug Report



Michel Dänzer <daenzer@debian.org> writes:

> On Sat, 2007-08-11 at 15:55 +0000, Paul Wise wrote:
>> Looks like it never built/worked on those platforms:
>> 
>> http://buildd.debian.org/build.php?arch=&pkg=open21xx
>> 
>> Hopefully someone on the porter lists will be able to help (CCed).
>> 
>> If no-one replies, I'm willing to use the Debian development machines to
>> help you fix this issue. I'm not familiar with the open21xx source or
>> package, and I have little time for Debian stuff, so I'll need some
>> direction and hints about this.
>
> Given the list of failing architectures, I think the most likely cause
> is some code relying on char being signed by default. And indeed,
> building the as21 directory with -fsigned-char makes it build for me.

You're right, as21/cpp.c was comparing a plain char to EOF.  I've
uploaded the attached patch, let's see if it works.

Thanks,

Matej
--- open21xx-0.7.5.orig/as21/cpp.c
+++ open21xx-0.7.5/as21/cpp.c
@@ -235,7 +235,7 @@
         /* - 2 to leave room for testing comments and quotes */
         while (chars_read < max_size - 2)
         {
-            ch = buf[chars_read] = getc( yyin );
+            buf[chars_read] = ch = getc( yyin );
             if (ch == EOF)
             {
                 goto read_done;

Reply to: