home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / sgi / 19012 < prev    next >
Encoding:
Text File  |  1993-01-21  |  1.1 KB  |  28 lines

  1. Newsgroups: comp.sys.sgi
  2. Path: sparky!uunet!newsflash.concordia.ca!nstn.ns.ca!cs.dal.ca!biome!silvert
  3. From: silvert@biome.bio.ns.ca (Bill Silvert)
  4. Subject: C compiler problem
  5. Message-ID: <1993Jan21.202055.15307@biome.bio.ns.ca>
  6. Organization: Habitat Ecology Div., Bedford Inst. Oceanography
  7. Distribution: na
  8. Date: Thu, 21 Jan 1993 20:20:55 GMT
  9. Lines: 17
  10.  
  11. I've run into a curious problem compiling the program getwxmap, which
  12. fetches a weather map and displays it on the screen.  It crashes with a
  13. core dump, but if I make the replacement:
  14.  
  15. change
  16.        if ((tosite = (FILE *) popen (command, "w")) == (FILE *) NULL)
  17. to
  18.        if ((tosite = (FILE *) popen (command, "w")) == (FILE *) 0)
  19.  
  20. it compiles and runs fine.  NULL should be defined by stdio.h, and I've
  21. tried including a redundant definition in the file before this code, but
  22. the debugger reports that NULL is not defined.
  23. -- 
  24. ------------------------------------------------------------------------
  25. William Silvert, Habitat Ecology Division, Bedford Inst. of Oceanography
  26. P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2.  Tel. (902)426-1577
  27. InterNet Address: silvert@biome.bio.dfo.ca
  28.