home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!contex!felix.contex.com!avinash
- From: avinash@felix.contex.com (Avinash Chopde)
- Newsgroups: comp.sys.sgi
- Subject: Re: X programs in C++, why do they need -DFUNCPROTO ?
- Summary: #define NeedFunctionProtoypes 1 *does not* work on SGI machines!
- Message-ID: <2925@contex.contex.com>
- Date: 4 Sep 92 16:52:41 GMT
- References: <2921@contex.contex.com> <1992Sep4.073425.12442@cv.ruu.nl>
- Sender: news@contex.contex.com
- Lines: 37
-
- In article <1992Sep4.073425.12442@cv.ruu.nl>, rvloon@cv.ruu.nl (Ronald van Loon) writes:
- > In <2921@contex.contex.com> avinash@felix.contex.com (Avinash Chopde) writes:
- >
- > |"I had to provide a -DFUNCPROTO option to the C++ compiler (2.11 and 3.10)
- > |"to compile a X program.
- ......
- > In short, if you want to be sure that Prototypes are used, then define
- > NeedFunctionPrototypes to '1'. This should work on all systems, while
- > FUNCPROTO might not (other systems use XTFUNCPROTO, for example).
-
- But this will not work on SGI machines.
- The /usr/include/X11/Intrinsic.h file contains this code:
-
- #ifdef FUNCPROTO
- #undef NeedFunctionPrototypes
- #define NeedFunctionPrototypes 1
- #ifdef sgi
- #undef NeedWidePrototypes
- #define NeedWidePrototypes 0
- #endif /* sgi */
- #else
- #undef NeedFunctionPrototypes
- #define NeedFunctionPrototypes 0 /* (avinash) THIS IS THE PROBLEM! */
- #undef NeedWidePrototypes
- #define NeedWidePrototypes 0
- #endif
-
- So, even if you define NeedFunctionPrototypes to be 1, if FUNCPROTO
- is *not defined*, this code will force-set NeedFunctionPrototypes to 0...
- Thus, no prototypes are available....
- Is this a X-problem or SGI problem .... who knows ....
-
- > Ronald van Loon (rvloon@cv.ruu.nl) 3DCV Group, Utrecht, The Netherlands.
- --
- ---------------------------
- Avinash Chopde office : 617 246 1776x5582
- avinash@contex.com (...!uunet!contex!avinash)
-