Xref: utzoo comp.unix.i386:3092 comp.unix.microport:4011 Path: utzoo!attcan!uunet!fernwood!decwrl!dogie.macc.wisc.edu!uwm.edu!rpi!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucsd!helios.ee.lbl.gov!nosc!humu!pegasus!pilikia!art From: art@pilikia.uucp (Art Neilson) Newsgroups: comp.unix.i386,comp.unix.microport Subject: Re: Trying to get BASH going. Summary: bad define Keywords: bash Message-ID: <1990Feb21.070638.176@pilikia.uucp> Date: 21 Feb 90 07:06:38 GMT References: <1990Feb20.070242.4567@rancho.uucp> Reply-To: art@pilikia.UUCP (Art Neilson) Organization: Bank of Hawaii Lines: 41 In article <1990Feb20.070242.4567@rancho.uucp> rock@rancho.uucp (Rock Kent) writes: >I've been trying the get the GNU Bourne Again Shell (BASH) to compile >on a Microport V/386 system. I'm currently failing the compile in >nojobs.c at line 169 with an illegal lhs of assignment operator: > status.w_termsig = 0; >This apparently conflicts with line 22 of jobs.h: > #define w_termsig bytes.low & 0x7f > >As you can probably tell, I'm not a C programmer. I tried compiling >under both cc and gcc (Greenhills). I would appreciate help on this >one from someone who has the BASH up and running under some i386 >system. > >*************************************************************************** >*Rock Kent rock@rancho.uucp POB 8964, Rancho Sante Fe, CA. 92067* >*************************************************************************** The problem here is with the defines on lines 22 & 24 or the included file jobs.h as listed below: 22 #define w_termsig bytes.low & 0x7f 23 #define w_stopsig bytes.high 24 #define w_retcode bytes.high The statement on line 169 or nojobs.c would expand as follows given the define expansion from above: status.bytes.low & 0x7f = status.bytes.high = 0; In C we can't have a calculation on the LHS (Left Hand Side) of an assignment. The LHS must evaluate to an address in memory. What I did to resolve the problem was to comment out the line at 169 and add the following replacement line immediately afterward: status.bytes.low = status.bytes.high = 0; -- Arthur W. Neilson III | ARPA: manapua!pilikia!art@nosc.mil Bank of Hawaii Tech Support | UUCP: uunet!ucsd!nosc!manapua!pilikia!art