TEMP_FAILURE_RETRY(x) is a macro that executes x until (x) != -1 || errno != EINTR, and evaluates to the result of the last execution of x. It is provided by both glibc and Bionic, and sometimes is defined outside of libc.
I've been told that a somewhat common mistake people make with this is to include a condition in TEMP_FAILURE_RETRY's argument, e.g.
// Wrote TEMP_FAILURE_RETRY(foo() == 1) // Meant TEMP_FAILURE_RETRY(foo()) == 1
...In the former case, the TEMP_FAILURE_RETRY is useless, since (x == 1) != -1 is always true. It will appear to work, though, since TEMP_FAILURE_RETRY will execute foo() at least once, and it'll evaluate to the value of the condition.
We do have a warning in clang to catch things like (x == y) == -1 (-Wtautological-constant-out-of-range-compare). This warns about these comparisons in C++ on Bionic. It doesn't catch them in C, since typeof(x == y) is an int in C, and it doesn't catch them when using glibc, since glibc just uses a long int to store the result of (x).