Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
blaar
blibs
blc_core
Commits
45044ed2
Commit
45044ed2
authored
Nov 17, 2017
by
Arnaud Blanchard
Browse files
Allow SYSTEM_ERROR_RETRY_ON_SPECIFIC_ERRNO macro to be included in a simple 'if' without {}
parent
5a16e9b0
Changes
1
Show whitespace changes
Inline
Side-by-side
include/blc_tools.h
View file @
45044ed2
...
...
@@ -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*'.
@code{.c}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment