Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
empty portable.h and spread the include in files
[simgrid.git] / src / xbt / backtrace_linux.c
index 82a3c66..a1a09e1 100644 (file)
@@ -7,6 +7,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#include <unistd.h>
 #include <execinfo.h>
 #include <sys/stat.h>
 
@@ -15,8 +16,8 @@
 #include "xbt/log.h"
 #include "xbt/str.h"
 #include "xbt/module.h"         /* xbt_binary_name */
-#include "xbt_modinter.h"       /* backtrace initialization headers */
-#ifdef HAVE_MC
+#include "src/xbt_modinter.h"       /* backtrace initialization headers */
+#if HAVE_MC
 #define UNW_LOCAL_ONLY
 #include <libunwind.h>
 #endif
@@ -374,8 +375,7 @@ void xbt_ex_setup_backtrace(xbt_ex_t * e) //FIXME: This code could be greatly im
   free(cmd);
 }
 
-#ifdef HAVE_MC
-
+#if HAVE_MC
 int xbt_libunwind_backtrace(void* bt[XBT_BACKTRACE_SIZE], int size){
   
   int i = 0;
@@ -388,7 +388,7 @@ int xbt_libunwind_backtrace(void* bt[XBT_BACKTRACE_SIZE], int size){
   unw_context_t uc;
 
   unw_getcontext (&uc);
-       unw_init_local (&c, &uc);
+  unw_init_local (&c, &uc);
  
   unw_word_t ip;