CVS update: samba/source/include

crh at samba.anu.edu.au crh at samba.anu.edu.au
Wed Aug 12 04:56:05 EST 1998


Date:	Wednesday August 12, 1998 @ 4:56
Author:	crh

Update of /data/cvs/samba/source/include
In directory samba:/tmp/cvs-serv19920

Modified Files:
	smb.h 
Log Message:
I've come up with a different scheme for doing the DEBUG() and DEBUGADD()
macros that meets the RVALUE requirement and doesn't use the (a?b:c) format
that Andrew called "ugly".  I've added the new macros but kept the old
macros within a #if 0..#else..#endif block in case I've missed somthing.

Basically, I've used

  (void)( (a) && (b) )

or

  (void)( (a) && (b) && (c) )

instead of

  ( (a) ? (void)(b) : (void)(c) )

or similar.  I have this compiled and running now.

Here's the diff:

$ cvs diff smb.h
Enter passphrase for RSA key 'crh at Ruby': 
Index: smb.h
===================================================================
RCS file: /data/cvs/samba/source/include/smb.h,v
retrieving revision 1.172
diff -r1.172 smb.h
143a144,145
> #if 0
> 
150a153,164
> 
> #else
> 
> #define DEBUG( level, body ) \
>   (void)( (DEBUGLEVEL >= (level)) \
>        && (dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) )) \
>        && (dbgtext body) )
> 
> #define DEBUGADD( level, body ) \
>   (void)( (DEBUGLEVEL >= (level)) && (dbgtext body) )
> 
> #endif

Chris -)-----




More information about the samba-cvs mailing list