home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / sgi / 13296 < prev    next >
Encoding:
Text File  |  1992-09-04  |  1.8 KB  |  49 lines

  1. Path: sparky!uunet!contex!felix.contex.com!avinash
  2. From: avinash@felix.contex.com (Avinash Chopde)
  3. Newsgroups: comp.sys.sgi
  4. Subject: Re: X programs in C++, why do they need -DFUNCPROTO ?
  5. Summary: #define NeedFunctionProtoypes 1  *does not* work on SGI machines!
  6. Message-ID: <2925@contex.contex.com>
  7. Date: 4 Sep 92 16:52:41 GMT
  8. References: <2921@contex.contex.com> <1992Sep4.073425.12442@cv.ruu.nl>
  9. Sender: news@contex.contex.com
  10. Lines: 37
  11.  
  12. In article <1992Sep4.073425.12442@cv.ruu.nl>, rvloon@cv.ruu.nl (Ronald van Loon) writes:
  13. > In <2921@contex.contex.com> avinash@felix.contex.com (Avinash Chopde) writes:
  14. > |"I had to provide a -DFUNCPROTO option to the C++ compiler (2.11 and 3.10)
  15. > |"to compile a X program.
  16. ......
  17. > In short, if you want to be sure that Prototypes are used, then define
  18. > NeedFunctionPrototypes to '1'. This should work on all systems, while
  19. > FUNCPROTO might not (other systems use XTFUNCPROTO, for example).
  20.  
  21. But this will not work on SGI machines.
  22. The /usr/include/X11/Intrinsic.h file contains this code:
  23.  
  24. #ifdef FUNCPROTO
  25. #undef NeedFunctionPrototypes
  26. #define NeedFunctionPrototypes 1
  27. #ifdef sgi
  28. #undef NeedWidePrototypes
  29. #define NeedWidePrototypes 0
  30. #endif /* sgi */
  31. #else
  32. #undef NeedFunctionPrototypes
  33. #define NeedFunctionPrototypes 0    /* (avinash) THIS IS THE PROBLEM! */
  34. #undef NeedWidePrototypes
  35. #define NeedWidePrototypes 0
  36. #endif
  37.  
  38. So, even if you define NeedFunctionPrototypes to be 1, if FUNCPROTO
  39. is *not defined*, this code will force-set NeedFunctionPrototypes to 0...
  40. Thus, no prototypes are available....
  41. Is this a X-problem or SGI problem .... who knows ....
  42.  
  43. > Ronald van Loon (rvloon@cv.ruu.nl) 3DCV Group, Utrecht, The Netherlands.
  44. -- 
  45. ---------------------------
  46. Avinash Chopde         office : 617 246 1776x5582
  47. avinash@contex.com     (...!uunet!contex!avinash)
  48.