Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!julius.cs.uiuc.edu!wuarchive!uunet!dev!vrdxhq!grebyn!karl From: karl@grebyn.com (Karl A. Nyberg) Newsgroups: comp.unix.ultrix Subject: stdio.h problem on 4.0 (was News 2.11.19...) Message-ID: <21955@grebyn.com> Date: 12 Sep 90 20:17:20 GMT References: <421@ucunix.SAN.UC.EDU> Sender: karl@grebyn.com Organization: Grebyn Corp. Lines: 17 Distribution: In article <421@ucunix.SAN.UC.EDU> rainwatr@ucunix.san.uc.edu (Don Rainwater) writes: >is that I can't compile the file rfuncs2.c because it doesn't like >having fileno(fp) on the lhs of an assignment operator. (The offending >lines are 314 and 316 in this file, if you're interested. 314 is >something like "fileno(fp) = -1;" and 316 is "fileno(fp) = fno;") This is definitely a problem with Ultrix. 4.0. I just tried recomiling X11R4, fix 14 and got the SAME problem with Xterm. it has to do with the declaration of fileno in /usr/include/stdio.h. The Ultrix 4.0 version has added a cast of (int) over the 3.0 version. This causes some real problems on the lhs of an assignment statement. Solutions: (1) edit /usr/include/stdio.h to drop the cast (2) hand expand the macro -- Karl --