Hi,

Thank you for the answer, the problem with that solution or this that I found prior to 
posting this message: http://www.codeproject.com/debug/location_trace.asp

Doesn't take into consideration the fact that MACROs are compile-time things, 
consuming no CPU in run-time. So that solution becomes tricky as CPU time is consumed 
while the original MACRO:
MSG_TEST(flags)

Consumes no CPU...

This is due to the fact that I cannot pre-evaluate the MSG_TEST(flags) part :(

I hope I made myself clear...

BTW:
#define MSG_TEST(flags) ((((unsigned int)flags) & M_DEBUG_LEVEL) < x_debug_level || 
((flags) & M_FATAL))

Thanks
Noam Rathaus
CTO
Beyond Security Ltd.
http://www.securiteam.com 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tal, Shachar
Sent: Tuesday, November 18, 2003 14:09
To: 'Noam Rathaus'; [EMAIL PROTECTED]
Subject: RE: Linux/UNIX/ISO VARARGS to MSVC++ ???


Google is your friend...

Fourth from the top, searching for : variable arguments "#define" "visual
C++"

http://www.experts-exchange.com/Programming/Programming_Languages/Cplusplus/
Q_20281300.html

HTH,

Shachar Tal
Verint Systems



> -----Original Message-----
> From: Noam Rathaus [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 18, 2003 1:42 PM
> To: [EMAIL PROTECTED]
> Subject: Linux/UNIX/ISO VARARGS to MSVC++ ???
> 
> 
> Hi,
> 
> I am trying to find a solution to converting this macro: #define 
> msg(flags, ...) do { if (MSG_TEST(flags)) x_msg((flags), __VA_ARGS__); 
> } while (false) Or this one:
> #define msg(flags, args...) do { if (MSG_TEST(flags)) 
> x_msg((flags), args); } while (false)
> 
> To something that MSVC++ will allow to compile, currently it
> appears that cannot. I will be happy to see someone with a 
> solution to this...
> 
> (BTW, this code is taken from the OpenVPN project, which I am
> trying to build a MFC based GUI for, open sourced of course)
> 
> Thanks
> Noam Rathaus
> CTO
> Beyond Security Ltd.
> http://www.securiteam.com
> 
> 
> ==============================================================
> ==To unsubscribe, send mail to [EMAIL PROTECTED] with the 
> word "unsubscribe" in the message body, e.g., run the command echo 
> unsubscribe | mail [EMAIL PROTECTED]
> 


This electronic message contains information from Verint Systems, which may be 
privileged and confidential.  The information is intended to be for the use of the 
individual(s) or entity named above.  If you are not the intended recipient, be aware 
that any disclosure, copying, distribution or use of the contents of this information 
is prohibited.  If you have received this electronic message in error, please notify 
us by replying to this email.

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the 
message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]




================================================================To unsubscribe, send 
mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to