Commit 45044ed2 authored by Arnaud Blanchard's avatar Arnaud Blanchard
Browse files

Allow SYSTEM_ERROR_RETRY_ON_SPECIFIC_ERRNO macro to be included in a simple 'if' without {}

parent 5a16e9b0
......@@ -130,7 +130,7 @@ if file is NULL this exit with a error message showing the position of the error
#define SYSTEM_SUCCESS_CHECK(command, good_value, ...) do{if ((command) != good_value) blc_fatal_command_system_error(__FILE__, __FUNCTION__, __LINE__, STRINGIFY(command),__VA_ARGS__);}while(0)
/**Like SYSTEM_ERROR_CHECK but the command is reexecuted if the errno is errno_accepted (Usually in case of interruption EINTR).*/
#define SYSTEM_ERROR_RETRY_ON_SPECIFIC_ERRNO(command, bad_value, errno_accepted, ...) while((command) == bad_value) { if (errno!=(errno_accepted)) blc_fatal_command_system_error(__FILE__, __FUNCTION__, __LINE__, STRINGIFY(command),__VA_ARGS__);}
#define SYSTEM_ERROR_RETRY_ON_SPECIFIC_ERRNO(command, bad_value, errno_accepted, ...) do{while((command) == bad_value) { if (errno!=(errno_accepted)) blc_fatal_command_system_error(__FILE__, __FUNCTION__, __LINE__, STRINGIFY(command),__VA_ARGS__);}}while(0)
/**Do a malloc big enough to contain 'type', checks if it succeeds and return the memory casted as 'type*'.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment