Patch for implicit decl warning on solaris2 (+ #include in a macro?)

Neil Booth neil@daikokuya.demon.co.uk
Sun Sep 2 12:35:00 GMT 2001


Kaveh R. Ghazi wrote:-

> The TRANSFER_FROM_TRAMPOLINE macro makes use of `mprotect' so we need
> to include sys/mman.h.  I'd have preferred if there were a way to
> include sys/mman.h directly within TRANSFER_FROM_TRAMPOLINE, but (I
> think) you can 't use cpp directives within a macro. (?)  Is there
> something I can do to `include' similar to the new pragma operator?

No, there is not, and you can't have any kind of directives in a macro
(# only starts a directive as the first token of a line that does not
come from a macro expansion).

Neil.



More information about the Gcc-patches mailing list