i am seeing constructs like this at
several locations of the XFree86 sources:

*.h:
  extern char *Xpermalloc(
  #if NeedFunctionPrototypes
      unsingend int /* size */
  #endif
  );

*.c:
  char *Xpermalloc(unsigned int length)
  { ... }

  #if NeedFunctionPrototypes
  XrmQuark XrmStringToQuark(
      _Xconst char *name)
  #else
  XrmQuark XrmStringToQuark(name)
      XrmString name;
  #endif
  { ... }

for my impression the applied macro check
is obsolete nowadays and should not used
any longer for current coding. the phrase
inside the first #if #endif is a needed one.

i think for the second one the if-case is 
probably the prefered coding style whilst 
the else-case is the obsolete coding style.

am i right? this is a pure leftover?
or am i wrong and some targets do still
have some heavy dependencys on that?

are there some coding guidlines somewhere
in the tree that do outline on that subject?
i am personally targetting on compatible
coding and avoiding breakage of other codes.

-Alex.

PS: i am hoping for a response of some long term 
    XFree86 developer to answer this.

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to