home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / next / bugs / 47 < prev    next >
Encoding:
Internet Message Format  |  1993-01-12  |  2.4 KB

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!bogus.sura.net!howland.reston.ans.net!spool.mu.edu!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!tamsun.tamu.edu!tamsun.tamu.edu!news
  2. From: d1h1883@sc.tamu.edu (Dave Hess)
  3. Newsgroups: comp.sys.next.bugs
  4. Subject: Re: gcc preprocessor and -traditional problem
  5. Date: 12 Jan 1993 17:46:51 GMT
  6. Organization: Texas A&M University, College Station, TX
  7. Lines: 58
  8. Distribution: world
  9. Message-ID: <1iv06bINNqft@tamsun.tamu.edu>
  10. References: <1it2rtINNk7i@tamsun.tamu.edu>
  11. Reply-To: David-Hess@tamu.edu
  12. NNTP-Posting-Host: posaune.tamu.edu
  13.  
  14. In article <1it2rtINNk7i@tamsun.tamu.edu> d1h1883@sc.tamu.edu (Dave Hess)  
  15. writes:
  16.  > 
  17.  > I was trying to put together a package (detex 2.4) that needed to be  
  18. compiled
  19.  > with -traditional and gcc puked on some NeXT include files. gcc apparently
  20.  > won't interpret the funky macros that NeXT uses in some of their #include
  21.  > statements (for the architecture independent stuff) if the -traditional
  22.  > switch is on.
  23.  > 
  24.  
  25. Apparently this is a bug and is known. I was forwarded the following.
  26.  
  27.  > From: Kate Smith <Kate_Smith@NeXT.COM>
  28.  > Date: Wed, 30 Dec 92 14:43:55 -0800
  29.  > To: <serge@Princeton.EDU>
  30.  > Subject: [37670] @!compiler problems - something about the comments in  
  31. math.h
  32.  >
  33.  > Serge,
  34.  > We have a bug with our machine dependant include files when using the  
  35. -traditional flag.  We have an include file that is used to build the name of  
  36. the machine dependant include file that really needs to be included.  This  
  37. file uses an ansi directive that is invalid in traditional mode.
  38.  >
  39.  > So in order for you to get the math.h file included, you need to specify  
  40. the fullpath in your program, or modify math.h to include the proper file.
  41.  >
  42.  > So your program would look like this:
  43.  >     #include </NextDeveloper/Headers/ansi/m68k/math.h>
  44.  >
  45.  >     main()
  46.  >     {
  47.  >         double x;
  48.  >         x=cos(1.2); 
  49.  >         printf("%f\n",x);
  50.  >     }
  51.  >
  52.  > Or you could change math.h to include  
  53. /NextDeveloper/Headers/ansi/m68k/math.h instead of doing the machine  
  54. dependant stuff.
  55.  >
  56.  > Sorry for the inconvenience.
  57.  >
  58.  > Kate
  59.  
  60. It looks like the workaround is to fully qualify pathnames. The problem
  61. is that this won't work on include files that include others. i.e.
  62. <sys/param.h>. I would have to expand by hand all of macros. Ugh.
  63.  
  64. Thanks to Serge J. Goldstein for the info.
  65.  
  66. Dave
  67.  
  68. --
  69. David K. Hess
  70. Graduate Assistant                     David-Hess@tamu.edu
  71. Supercomputer Center                  Texas A&M University
  72.