Hi Stephan,
I looked at new main.h code, and I propose to change it as follows:
#ifdef SAL_OS2
int SAL_CALL osl_setExceptionHook( void);
int SAL_CALL osl_unsetExceptionHook( void);
#define SET_EXCEPTION_HOOK if (osl_setExceptionHook()==0) {
#define UNSET_EXCEPTION_HOOK } osl_unsetExceptionHook()
#else
#define SET_EXCEPTION_HOOK
#define UNSET_EXCEPTION_HOOK
#endif
#define SAL_MAIN_WITH_ARGS_IMPL \
int SAL_CALL main(int argc, char ** argv) \
{ \
int rc; \
SET_EXCEPTION_HOOK; \
osl_setCommandArgs(argc, argv); \
rc = sal_main_with_args(argc, argv); \
UNSET_EXCEPTION_HOOK; \
return rc; \
}
#define SAL_MAIN_IMPL \
int SAL_CALL main(int argc, char ** argv) \
{ \
int rc; \
SET_EXCEPTION_HOOK; \
osl_setCommandArgs(argc, argv); \
rc = sal_main(); \
UNSET_EXCEPTION_HOOK; \
return rc; \
}
the new macros are used to install the OS/2 exception handler, so I can
wrap program execution and dump stack frames at crash.
If you know a better way to put it in common code, please let me know.
thanks,
Bye,
Yuri Dario
/*
* member of TeamOS/2 - Italy
* http://www.os2power.com/yuri
* http://www.teamos2.it
*/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]