Alexander Stohr wrote (in a message from Saturday 12)
> 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.
This is a leftover from the times where X could get compiled on
non-ansi compiler. Since X11R6.3 an ANSI C compiler is needed.
There's no reason to use this in new code.
We are removing them slowly, whenever a file that still use them
is edited.
Matthieu
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel