Apache OpenOffice (AOO) Bugzilla – Issue 15896
sal/osl/unx/signal.c and C++...
Last modified: 2003-06-21 17:13:38 UTC
Hi, the author of this code probably really likes C++, but this code is compiled with C compiler. --- signal.c.~1.13.~ 2003-06-18 23:50:15.000000000 +0200 +++ signal.c 2003-06-21 15:46:35.000000000 +0200 @@ -327,13 +327,12 @@ void *stackframes[1024]; int iFrame; int nFrames = backtrace( stackframes, sizeof(stackframes)/sizeof(stackframes[0])); + FILE *xmlout = fopen( pXMLTempName, "w" ); + FILE *stackout = fopen( pStackTempName, "w" ); pXMLTempName = tmpnam( szXMLTempNameBuffer ); pStackTempName = tmpnam( szStackTempNameBuffer ); - FILE *xmlout = fopen( pXMLTempName, "w" ); - FILE *stackout = fopen( pStackTempName, "w" ); - fprintf( xmlout, "<errormail:Stack type=\"%s\">\n", STACKTYPE ); for ( iFrame = 0; iFrame < nFrames; iFrame++ ) @@ -447,11 +446,10 @@ static void PrintStack( int sig ) { void *buffer[MAX_FRAME_COUNT]; + int size = backtrace( buffer, sizeof(buffer) / sizeof(buffer[0]) ); fprintf( stderr, "\n\nFatal exception: Signal %d\n", sig ); - int size = backtrace( buffer, sizeof(buffer) / sizeof(buffer[0]) ); - if ( size > 0 ) { fputs( "Stack:\n", stderr );
As Kevin pointed out, this patch in not correct. Attached is new version signal.diff.
Created attachment 7033 [details] New signal.c diff
Kevin approved new patch in dev@porting, so I commited it.
-