Fix macros to ensure lack of side-effects
Fix macros to ensure lack of side-effects

Except in the case when preprocessor macros really should have a
return value they probably should be wrapped in do { } while
(0).  The biggest problem is macros that have several
statements:

    #define macro statement1 ; statement2

Suddenly the following fails:

    if (1)
        macro ;

Also, gcc tends to spit out warnings when macros use an if :

    #define macro if (1) statement1

Let's see what happens when we try to wrap the macro in an if:

    if (condition)
        macro ;
    else
        statement ;

This results in:

    if (condition)
        if (1) statement1 ;
    else
        statement ;

and gcc will typically spit out a warning about ambiguous
if/else construction (and suggests braces).
guillermocalvo/protothread,ivangag/protothread,mikewang01/protothread,fjgo/protothread,ivangag/protothread,ruelsison/protothread,fjgo/protothread,gicho/protothread,ruelsison/protothread,wbober/protothread,wbober/protothread,zj2089/protothread,gicho/protothread,guillermocalvo/protothread,zj2089/protothread,mikewang01/protothread