[context] a couple of build fixes for Solaris (10)

First is to get the definition of mprotect() that takes void * rather than char * by defining _XPG4_2, which causes a compilation failure with Solaris Studio 12.3. Second is a workaround for a bug in their csignal header which uses the same include guard that signal.h uses, which csignal includes (leaving SIGSTKSZ undefined). Attached if of any help. Regards Luke Elliott.

Am 06.07.2012 15:12, schrieb Luke Elliott:
First is to get the definition of mprotect() that takes void * rather than char * by defining _XPG4_2, which causes a compilation failure with Solaris Studio 12.3.
Second is a workaround for a bug in their csignal header which uses the same include guard that signal.h uses, which csignal includes (leaving SIGSTKSZ undefined).
Attached if of any help.
of course - thank you, Luke best regards, Oliver

On 2012-07-06 15:12, Luke Elliott wrote:
First is to get the definition of mprotect() that takes void * rather than char * by defining _XPG4_2, which causes a compilation failure with Solaris Studio 12.3.
_XPG4_2 is an internal macro. The correct macros to use are _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED. See for instance: http://stackoverflow.com/questions/1034587/how-does-xpg4-2-and-other-defines...

Am 07.07.2012 11:23, schrieb Bjorn Reese:
On 2012-07-06 15:12, Luke Elliott wrote:
First is to get the definition of mprotect() that takes void * rather than char * by defining _XPG4_2, which causes a compilation failure with Solaris Studio 12.3.
_XPG4_2 is an internal macro. The correct macros to use are _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED. See for instance:
http://stackoverflow.com/questions/1034587/how-does-xpg4-2-and-other-defines...
_XOPEN_SOURCE=1 and _XOPEN_SOURCE_EXTENDED=1 applied to compiler on Solaris
participants (3)
-
Bjorn Reese
-
Luke Elliott
-
Oliver Kowalke