From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199607140437.VAA20896@panda.azstarnet.com> Date: Sat, 13 Jul 1996 21:37:26 -0700 From: David Mosberger-Tang Subject: Re: mgetty - anyone compile successfully? >>>>> On Thu, 30 May 1996 19:38:22 +0200 (MET DST), Matthias Cramer said: Matthias> On Wed, 29 May 1996, Brian E.W. Wood wrote: >> I recently moved from a Pentium to an Alpha system (UDB). I have Matthias> I too, but to an Alpha XL ... >> been re-compiling some favorite apps for the new platform. Most >> of them have gone pretty well but mgetty has me stuck. Matthias> I've got the same problem ... >> gcc (version 2.7.2) complains about missing braces around the >> initializer in a struct statement, as well as several >> initializers not being computable at load time. The problem is >> that the braces ARE there, and the code looks OK to me, although >> I am NOT a competent C programmer. Matthias> Same respons with 2.7.0 !!! >> If anyone could point me in the right direction I would >> appreciate it. I found mgetty to be very useful and would like >> to have it back. Matthias> To mee too ... any idea will help me .. This sounds like deja vu all over again. I think the mailing list archives should have pointers to how to fix this. Basically, the problem is that void * != int. The author of mgetty knows about this problem and I hope the latest version has it fixed, though I don't know for sure. If memory serves, the easiest fix is to change the int field in the structure that's causing the problem to a long, and then cast the pointers to long. And no, there are not enough braces there. It's an array of structures, so it needs nested braces. To summarize: gcc is doing perfectly fine (for once, at least! ;-). It's the program that's broken. I hope this doesn't sounds too confusing, but if you take a look at the source, you'll quickly notice what's going on. --david -- To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null