[5425] in Athena Bugs

home help back first fref pref prev next nref lref last post

x11r4: moronic conditional in Intrinsic.h

daemon@ATHENA.MIT.EDU (Ken Raeburn)
Thu Jul 5 15:07:06 1990

Date: Thu, 5 Jul 90 15:06:50 EDT
From: Ken Raeburn <Raeburn@MIT.Edu>
To: bugs@ATHENA.MIT.EDU


<X11/Intrinsic.h> contains:

    40  #ifdef XTFUNCPROTO
    41  #undef NeedFunctionPrototypes
    42  #define NeedFunctionPrototypes 1
    43  #else
    44  #undef NeedFunctionPrototypes
    45  #define NeedFunctionPrototypes 0
    46  #undef NeedWidePrototypes
    47  #define NeedWidePrototypes 0
    48  #endif
    49
    50  #ifndef NeedFunctionPrototypes
    51  #if defined(FUNCPROTO) || defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
    52  #define NeedFunctionPrototypes 1
    53  #else
    54  #define NeedFunctionPrototypes 0
    55  #endif /* __STDC__ */
    56  #endif /* NeedFunctionPrototypes */

The first set of lines completely overrides the second.  This is
stupid.

If there are compilers that define __STDC__ or __cplusplus but can't
handle prototypes, the XTFUNCPROTO section should deal only with them.
As written, it always will define NeedFunctionPrototypes to something
(normally 0), ignoring __cplusplus (which should imply that the
prototypes _must_ be there).

home help back first fref pref prev next nref lref last post