trap __msl_assertion_failed

This commit is contained in:
chombier 2002-11-22 16:45:37 +00:00
parent 8af171dbb5
commit 68013734f9
2 changed files with 35 additions and 1 deletions

View File

@ -262,6 +262,22 @@ void __assertion_failed(char const *condition, char const *filename, int lineno)
}
}
/*
* __msl_assertion_failed
*/
void __msl_assertion_failed(char const *condition, char const *filename, char const *funcname, int lineno)
{
fprintf(stderr, "Assertion (%s) failed in \"%s\" on line %d\n", condition, filename, lineno);
if ( pthread_getspecific(ssh2threadkey) ) {
abort();
} else {
#undef abort
abort();
#define abort macosabort
}
}
/*
* strsignal
*/

View File

@ -448,7 +448,7 @@ void abort(void)
*/
void __assertion_failed(char const *condition, char const *filename, int lineno)
{
Debugger();
//Debugger();
fprintf( stderr, "Assertion (%s) failed in \"%s\" on line %d\n", condition, filename, lineno );
@ -461,6 +461,24 @@ void __assertion_failed(char const *condition, char const *filename, int lineno)
}
}
/*
* __msl_assertion_failed
*/
void __msl_assertion_failed(char const *condition, char const *filename, char const *funcname, int lineno)
{
//Debugger();
fprintf(stderr, "Assertion (%s) failed in \"%s\" on line %d\n", condition, filename, lineno);
if ( pthread_getspecific(ssh2threadkey) ) {
macosabort();
} else {
#undef abort
abort();
#define abort macosabort
}
}
/*
* lshmalloc
*/