--- rpl/src/rpl.h 2016/03/22 19:03:36 1.293 +++ rpl/src/rpl.h 2016/03/23 21:51:14 1.294 @@ -798,10 +798,12 @@ pid_t debug_fork(); # else # define __erreur_(i) i # endif -# define __erreur(i) ({ if (strstr(__FUNCTION__, "recherche_variable") \ - == NULL) ufprintf(stderr, \ - "ERROR %d AT %s() FROM %s LINE %d\n", \ - i, __FUNCTION__, __FILE__, __LINE__); BACKTRACE(16); i; }) +# define __erreur(i) ({ int ios; ios = errno; \ + if (strstr(__FUNCTION__, "recherche_variable") \ + == NULL) { if(ios != 0) \ + ufprintf(stderr, "LAST ERROR: %s\n", strerror(ios)); \ + ufprintf(stderr, "ERROR %d AT %s() FROM %s LINE %d\n", \ + i, __FUNCTION__, __FILE__, __LINE__); BACKTRACE(16); } i; }) # endif #else # define __erreur(i) i