openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1716788 - /openoffice/trunk/main/sal/osl/unx/backtrace.c
Date Fri, 27 Nov 2015 04:01:04 GMT
Author: damjan
Date: Fri Nov 27 04:01:03 2015
New Revision: 1716788

URL: http://svn.apache.org/viewvc?rev=1716788&view=rev
Log:
Use the ptrdiff_t printf format code for backtracing on FreeBSD.

Patch by: me


Modified:
    openoffice/trunk/main/sal/osl/unx/backtrace.c

Modified: openoffice/trunk/main/sal/osl/unx/backtrace.c
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/osl/unx/backtrace.c?rev=1716788&r1=1716787&r2=1716788&view=diff
==============================================================================
--- openoffice/trunk/main/sal/osl/unx/backtrace.c (original)
+++ openoffice/trunk/main/sal/osl/unx/backtrace.c Fri Nov 27 04:01:03 2015
@@ -19,7 +19,7 @@
  * 
  *************************************************************/
 
-
+#include "sal/types.h"
 
 
 #ifdef SOLARIS
@@ -184,20 +184,12 @@ void backtrace_symbols_fd( void **buffer
 				if ( dli.dli_fname && dli.dli_fbase )
 				{
 					offset = (ptrdiff_t)*pFramePtr - (ptrdiff_t)dli.dli_fbase;
-#if defined X86_64
-					fprintf( fp, "%s+0x%lx", dli.dli_fname, offset );
-#else
-					fprintf( fp, "%s+0x%x", dli.dli_fname, offset );
-#endif
+					fprintf( fp, "%s+0x%" SAL_PRI_PTRDIFFT "x", dli.dli_fname, offset );
 				}
 				if ( dli.dli_sname && dli.dli_saddr )
 				{
 					offset = (ptrdiff_t)*pFramePtr - (ptrdiff_t)dli.dli_saddr;
-#if defined X86_64
-					fprintf( fp, "(%s+0x%lx)", dli.dli_sname, offset );
-#else
-					fprintf( fp, "(%s+0x%x)", dli.dli_sname, offset );
-#endif
+					fprintf( fp, "(%s+0x%" SAL_PRI_PTRDIFFT "x)", dli.dli_sname, offset );
 				}
 			}
 			fprintf( fp, "[0x%p]\n", *pFramePtr );



Mime
View raw message