henry@zoo.toronto.edu (Henry Spencer) (12/17/90)
As of the latest patch, we're seeing reports that compiling C News under
Xenix leads to peculiar errors of the form:
> warning.c(19) : error C2143: syntax error : missing ';' before 'storage class'
My tentative diagnosis is "your supplier may claim that your <string.h> is
ANSI-conforming, but it isn't". The code in warning.c is trying to use
the ANSI function strerror(), and something in <string.h> is fouling up
magnificently. If you hit this, try telling build that (a) you do not have
an ANSI-conforming <string.h> and (b) you don't have strerror() either.
I have not yet seen enough details to confirm diagnosis or fix.
--
"The average pointer, statistically, |Henry Spencer at U of Toronto Zoology
points somewhere in X." -Hugh Redelmeier| henry@zoo.toronto.edu utzoo!henry
news@camco.Celestial.COM (Bill Campbell) (12/18/90)
In <1990Dec16.234811.6293@zoo.toronto.edu> henry@zoo.toronto.edu (Henry Spencer) writes: >As of the latest patch, we're seeing reports that compiling C News under >Xenix leads to peculiar errors of the form: >> warning.c(19) : error C2143: syntax error : missing ';' before 'storage class' >My tentative diagnosis is "your supplier may claim that your <string.h> is >ANSI-conforming, but it isn't". The code in warning.c is trying to use >the ANSI function strerror(), and something in <string.h> is fouling up >magnificently. If you hit this, try telling build that (a) you do not have >an ANSI-conforming <string.h> and (b) you don't have strerror() either. >I have not yet seen enough details to confirm diagnosis or fix. >-- >"The average pointer, statistically, |Henry Spencer at U of Toronto Zoology >points somewhere in X." -Hugh Redelmeier| henry@zoo.toronto.edu utzoo!henry The xenix include file string.h has an extraneous reference to strerror(). I just removed this and fixed that problem. If you are using the most recent version of gcc from robobar there is a script that puts wrappers around all the SCO supplied headers, makes a few changes and puts the new headers in /usr/local/lib/gcc-include which is automatically scanned before /usr/include for library files. I also found some problems with SCO's headers in that they decided to declare several functions as (unsigned chars *) rather than (char *) in their prototypes. This occurred in term.h and tinfo.h. -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Software UUCP: ...!thebes!camco!bill 6641 East Mercer Way uunet!camco!bill Mercer Island, WA 98040; (206) 947-5591
ronald@robobar.co.uk (Ronald S H Khoo) (12/18/90)
henry@zoo.toronto.edu (Henry Spencer) writes: > As of the latest patch, we're seeing reports that compiling C News under > Xenix leads to peculiar errors of the form: > > > warning.c(19) : error C2143: syntax error : missing ';' before 'storage class' > > My tentative diagnosis is "your supplier may claim that your <string.h> is > ANSI-conforming, but it isn't". as in /usr/include/string.h:/* #define strerror(err) ( sys_errlist[err] ); */ possibly ? Can you guess why mine's commented out ? :-) -- ronald@robobar.co.uk +44 81 991 1142 (O) +44 71 229 7741 (H)
henry@zoo.toronto.edu (Henry Spencer) (12/28/90)
In article <580@camco.Celestial.COM> news@camco.Celestial.COM (Bill Campbell) writes: >The xenix include file string.h has an extraneous reference to >strerror(). I just removed this and fixed that problem. In fact, I'm told that the Xenix string.h strerror() definition is *almost* correct... but whatever lunkhead wrote it put a semicolon on the end of the #define! This is more or less harmless until you come to use strerror() in a complicated expression or a declaration, which may be why they didn't spot it. (A less charitable possibility would be that they didn't test it at all, but it being the holidays, let's be charitable. :-)) -- "The average pointer, statistically, |Henry Spencer at U of Toronto Zoology points somewhere in X." -Hugh Redelmeier| henry@zoo.toronto.edu utzoo!henry
sef@kithrup.COM (Sean Eric Fagan) (12/28/90)
In article <1990Dec28.071117.28485@zoo.toronto.edu> henry@zoo.toronto.edu (Henry Spencer) writes: >In fact, I'm told that the Xenix string.h strerror() definition is *almost* >correct... but whatever lunkhead wrote it put a semicolon on the end of the >#define! Hey! I resent that! I am *not* a lunkhead! A chowderbrain, mayhaps, but not a lunkhead! >This is more or less harmless until you come to use strerror() in >a complicated expression or a declaration, which may be why they didn't spot >it. (A less charitable possibility would be that they didn't test it at all, >but it being the holidays, let's be charitable. :-)) Sadly, I *did* test it. It was put in at the last minute, simply because it was so easy to put in like that (that is, it was a simple change to the header file, not changing the library and adding a whole new file to compile and put into the archive [not a trivial task, I'm afraid]). However, the ANSI standard was, at that time, merely a draft, and I mereley an overeager young programmer whose interpretation of the text was a bit short. (This is why I made it into a function for the next release of the devsys: you needed to be able to take the *address* of the function, and couldn't do that with a macro. Also, the way the header file is implemented requires / causes name space pollution, and I was working very hard on cleaning that up after that one release.) In any event, you can blame me for it, and I apologise. You may send nasty hate mail to me all you wish. I am hanging my head down in shame. *sniff* -- Sean Eric Fagan | "I made the universe, but please don't blame me for it; sef@kithrup.COM | I had a bellyache at the time." -----------------+ -- The Turtle (Stephen King, _It_) Any opinions expressed are my own, and generally unpopular with others.