lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Re: [lwip] lwIP for Win32


From: Scott Howard
Subject: [lwip-users] Re: [lwip] lwIP for Win32
Date: Wed, 08 Jan 2003 22:58:36 -0000

If you mean burying an #include directive inside a macro definition,
then I'm afraid this won't work either since #define is also a
preprocessor directive and hence cannot be part of a macro.

I think the only solution here is to use a conditional section,
something like this:

#ifdef MSC
#pragma(push,1)
#endif

(I don't know if MSC really is defined in the Microsoft compiler, but
you would want to use a symbol that was unique to that compiler and
target architecture.)

This is not a great solution either, because as the number of supported
architectures goes up, the source will eventually become littered with
conditionals like this. However it's probably the only approach that
will work if the #pragma directive is required.

Scott

Adam Dunkels wrote:
> 
> Hi Scott and all others!
> 
> Again, I am sorry for not having responded to the mails on the list faster;
> there has been quite a lot of work lately.
> 
> On Saturday 26 January 2002 02.20, you wrote:
> > Preprocessor macros are not able to incorporate other preprocessor
> > directives. This is part of the design of ANSI C, not a
> > compiler-specific issue.
> 
> Ok, thanks for the clarification! Do you think it is possible to use the
> #include file idea instead?
> 
> /adam
> --
> Adam Dunkels <address@hidden>
> http://www.sics.se/~adam
> [This message was sent through the lwip discussion list.]
[This message was sent through the lwip discussion list.]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]