SVN: backtracexx/backtracexx.cpp

pluto pluto at pld-linux.org
Mon Nov 5 20:48:04 CET 2007


Author: pluto
Date: Mon Nov  5 20:48:04 2007
New Revision: 8992

Modified:
   backtracexx/backtracexx.cpp
Log:
- make it strict compatible with standard.


Modified: backtracexx/backtracexx.cpp
==============================================================================
--- backtracexx/backtracexx.cpp	(original)
+++ backtracexx/backtracexx.cpp	Mon Nov  5 20:48:04 2007
@@ -1,6 +1,8 @@
 #include "backtracexx.hpp"
 #include <iomanip>
 #include <iostream>
+#include <cstdlib>
+#include <cstring>
 
 //
 //	TODO:
@@ -43,7 +45,7 @@
 			if ( ::dladdr( reinterpret_cast< void* >( frame.address ), &info ) )
 			{
 				frame.moduleBaseAddress = reinterpret_cast< unsigned long >( info.dli_fbase );
-				if ( info.dli_fname && strlen( info.dli_fname ) )
+				if ( info.dli_fname && std::strlen( info.dli_fname ) )
 					frame.moduleName = info.dli_fname;
 				if ( info.dli_saddr )
 				{
@@ -55,7 +57,7 @@
 						if ( status == 0 )
 						{
 							frame.symbol = demangled;
-							free( demangled );
+							std::free( demangled );
 						}
 						else
 							frame.symbol = info.dli_sname;


More information about the pld-cvs-commit mailing list