medfall

Log | Files | Refs

commit 7eb42474eaced08011a4daab79f6ce48149bc50e
parent 29050d4ed2bed6f4d042f742ab29108745065318
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Tue May  9 00:00:58 +0300

win32_backtrace.h compile fixes

Diffstat:
win32_backtrace.h | 5+++--
win32_thread.h | 4++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/win32_backtrace.h b/win32_backtrace.h @@ -4,7 +4,7 @@ #include <dbghelp.h> inline void print_backtrace() { - int max_symbol_len = 1024; + const int max_symbol_len = 1024; HANDLE process = GetCurrentProcess(); SymInitialize( process, NULL, TRUE ); @@ -22,11 +22,12 @@ inline void print_backtrace() { SymFromAddr( process, addr64, NULL, symbol ); IMAGEHLP_LINE64 line; + DWORD col; line.SizeOfStruct = sizeof( line ); BOOL has_file_info = SymGetLineFromAddr64( process, addr64, &col, &line ); if( has_file_info ) { - printf( "%s (%s:%d - 0x%l64x)\n", symbol->Name, line->FileName, line->LineNumber, symbol->Address ); + printf( "%s (%s:%d - 0x%l64x)\n", symbol->Name, line.FileName, line.LineNumber, symbol->Address ); } else { printf( "%s (0x%l64x)\n", symbol->Name, symbol->Address ); diff --git a/win32_thread.h b/win32_thread.h @@ -6,14 +6,14 @@ #include "log.h" #define THREAD( f ) DWORD WINAPI f( void * data ) -typedef THREAD( ThreadCallback ); +typedef THREAD( ThreadProc ); #define THREAD_END return 0 struct Thread { HANDLE handle; }; -inline void thread_init( Thread * thread, ThreadCallback callback, void * data ) { +inline void thread_init( Thread * thread, ThreadProc callback, void * data ) { DWORD id; HANDLE handle = CreateThread( 0, 0, callback, data, 0, &id ); if( handle == NULL ) {