Problem compiling the X11R4 distribution with Ultrix-4.0

Christopher Wheeler cwheeler at milton.u.washington.edu
Sat Jul 28 05:24:57 AEST 1990


Does this look evil to you?:
  fileno(stderr) = i;

It does to me!  I was compiling xterm under Ultrix 4.0 and the compiler barfed
all over this assignment.  Since fileno is a macro it expanded to this:
  ((int) (&_iob[2])->_file) = i;

It seems the compiler didn't like the type cast.  Well I replaced the macro
with its expansion minus the type cast and all was fine.  It seems that they 
are trying to direct stderr out to a specified file. But I don't understand
why they didn't just use dup instead of this evil looking assignment?


-------------------------------------------------------------------------------
Christopher D. Wheeler                               
Networks and Distributed Computing       INTERNET: cwheeler at nwnet.net
University of Washington		         : cwheeler at cac.washington.edu 
3737 Brooklyn Ave. NE                        BELL:  (206) 543-5128         
Seattle, WA  98105                          

  



More information about the Comp.unix.ultrix mailing list