X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=include%2Fbabeltrace%2Fbabeltrace-internal.h;fp=include%2Fbabeltrace%2Fbabeltrace-internal.h;h=006bf8f3c7954618eb10fc9772ed6ce4822a6775;hp=1a438ded8abf616b627ebb3792e6135cafd3bfd0;hb=ee389f014f52d42ba945428973d9bcfc368922b3;hpb=aacfaf40b78b1468af3bc1fd3d94eb4054aaee06 diff --git a/include/babeltrace/babeltrace-internal.h b/include/babeltrace/babeltrace-internal.h index 1a438ded..006bf8f3 100644 --- a/include/babeltrace/babeltrace-internal.h +++ b/include/babeltrace/babeltrace-internal.h @@ -86,16 +86,16 @@ extern bt_bool babeltrace_verbose, babeltrace_debug; #define _bt_printf_perror(fp, fmt, args...) \ ({ \ - char buf[PERROR_BUFLEN] = "Error in strerror_r()"; \ - bt_strerror_r(errno, buf, sizeof(buf)); \ - _bt_printfe(fp, "error", buf, fmt, ## args); \ + const char *errstr; \ + errstr = g_strerror(errno); \ + _bt_printfe(fp, "error", errstr, fmt, ## args); \ }) #define _bt_printfl_perror(fp, lineno, fmt, args...) \ ({ \ - char buf[PERROR_BUFLEN] = "Error in strerror_r()"; \ - bt_strerror_r(errno, buf, sizeof(buf)); \ - _bt_printfle(fp, "error", lineno, buf, fmt, ## args); \ + const char *errstr; \ + errstr = g_strerror(errno); \ + _bt_printfle(fp, "error", lineno, errstr, fmt, ## args);\ }) /* printf without lineno information */