Merge "Add TEMP_FAILURE_RETRY macro for darwin"
This commit is contained in:
commit
51ccef27ca
1 changed files with 15 additions and 0 deletions
|
|
@ -274,6 +274,21 @@ static __inline__ int adb_is_absolute_host_path( const char* path )
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TEMP_FAILURE_RETRY is defined by some, but not all, versions of
|
||||||
|
* <unistd.h>. (Alas, it is not as standard as we'd hoped!) So, if it's
|
||||||
|
* not already defined, then define it here.
|
||||||
|
*/
|
||||||
|
#ifndef TEMP_FAILURE_RETRY
|
||||||
|
/* Used to retry syscalls that can return EINTR. */
|
||||||
|
#define TEMP_FAILURE_RETRY(exp) ({ \
|
||||||
|
typeof (exp) _rc; \
|
||||||
|
do { \
|
||||||
|
_rc = (exp); \
|
||||||
|
} while (_rc == -1 && errno == EINTR); \
|
||||||
|
_rc; })
|
||||||
|
#endif
|
||||||
|
|
||||||
#define OS_PATH_SEPARATOR '/'
|
#define OS_PATH_SEPARATOR '/'
|
||||||
#define OS_PATH_SEPARATOR_STR "/"
|
#define OS_PATH_SEPARATOR_STR "/"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue