rock@rancho.uucp (Rock Kent) (02/20/90)
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* ***************************************************************************
art@pilikia.uucp (Art Neilson) (02/21/90)
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
blarson@umb.umb.edu (Bruce Robert Larson) (02/21/90)
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 > status.w_termsig = 0 ==> status.bytes.low & 0x7f = 0 Since the logical conjunction of status.bytes.low and 0x7f is 0, then it follows that status.bytes.low must be 0. Replace ``status.w_termsig = 0'' on line 169 of nojobs.c with ``status.bytes.low = 0'' and the program will compile. I've compiled bash-1.02 and -1.04 under 386/ix 2.0.2. Even got 1.04 to compile on a 3B2 under Rel. 3.0 (brain-dead compiler)! Bruce
blarson@umb.umb.edu (Bruce Robert Larson) (02/21/90)
In a previous posting I said: > ... > status.w_termsig = 0 ==> status.bytes.low & 0x7f = 0 > > Since the logical conjunction of status.bytes.low and 0x7f is 0, > then it follows that status.bytes.low must be 0. ^^^^ This is wrong. I should have said ``can be 0.'' Status.bytes.low = 0 just happens be the most convenient solution. Bruce