OSLib V6.00 alpha

Tom Hughes tom at compton.nu
Thu Apr 6 23:44:48 BST 2000


In message <200004062210.PAA01777 at purple.trimedia.sv.sc.philips.com>
          "Jonathan Coxhead" <jonathan at doves.demon.co.uk> wrote:

>    (3) All the varying-size types have been misdefined, e g:
>
>       #define wimp_WINDOW(N) \
>          struct \
>             {  wimp_WINDOW_MEMBERS \
>                wimp_icon icons [UNKNOWN]; \
>             }
>
> should be
>
>       #define wimp_WINDOW(N) \
>          struct \
>             {  wimp_WINDOW_MEMBERS \
>                wimp_icon icons [N]; \
>             }
>
>    The resulting error is not typically diagnosable at compile-time---
> if you compile your programme with the new headers, you will get
> memory corruption at run-time. So this is a pretty severe problem.
> There are 66 instances of it, altogether.

Oops. That's my fault when I did the base struct edits. the attached
should fix it.

Tom

-- 
Tom Hughes (tom at compton.nu)
http://www.compton.nu/
...Sure, Reagan has promised to take senility tests.  But what if he forgets?
-------------- next part --------------
Index: cheader
===================================================================
RCS file: /home/cvs/riscos/oslib/Tools/DefMod/c/cheader,v
retrieving revision 1.2
diff -c -r1.2 cheader
*** cheader	2000/03/04 12:42:53	1.2
--- cheader	2000/04/06 22:42:48
***************
*** 811,817 ****
                 if ((rc = Print_Decl (file, t->data AS list.members [i],
                       NULL, t->data AS list.members [i]->name, TRUE, 0)) < 0)
                    goto finish;
!                if ((rc = fprintf (file, " [UNKNOWN]; \\\n      }")) < 0)
                    goto finish;
  
                 if ((rc = fprintf (file, "\n\n")) < 0)
--- 811,817 ----
                 if ((rc = Print_Decl (file, t->data AS list.members [i],
                       NULL, t->data AS list.members [i]->name, TRUE, 0)) < 0)
                    goto finish;
!                if ((rc = fprintf (file, " [N]; \\\n      }")) < 0)
                    goto finish;
  
                 if ((rc = fprintf (file, "\n\n")) < 0)


More information about the oslib-team mailing list