diff --git a/tensorflow/stream_executor/cuda/cuda_gpu_executor.cc b/tensorflow/stream_executor/cuda/cuda_gpu_executor.cc index d028452e23b..a9289e35c6e 100644 --- a/tensorflow/stream_executor/cuda/cuda_gpu_executor.cc +++ b/tensorflow/stream_executor/cuda/cuda_gpu_executor.cc @@ -201,7 +201,7 @@ static string GetBinaryDir(bool strip_exe) { HMODULE hModule = GetModuleHandle(NULL); GetModuleFileName(hModule, exe_path, MAX_PATH); #else - CHECK_ERR(readlink("/proc/self/exe", exe_path, sizeof(exe_path) - 1)); + PCHECK(readlink("/proc/self/exe", exe_path, sizeof(exe_path) - 1) != -1); #endif #endif // Make sure it's null-terminated: diff --git a/tensorflow/stream_executor/platform/logging.h b/tensorflow/stream_executor/platform/logging.h index 0e9ed49dc87..6bc6ccb517d 100644 --- a/tensorflow/stream_executor/platform/logging.h +++ b/tensorflow/stream_executor/platform/logging.h @@ -21,15 +21,7 @@ limitations under the License. #if !defined(PLATFORM_GOOGLE) -// A CHECK() macro that lets you assert the success of a function that -// returns -1 and sets errno in case of an error. E.g. -// -// CHECK_ERR(mkdir(path, 0700)); -// -// or -// -// int fd = open(filename, flags); CHECK_ERR(fd) << ": open " << filename; -#define CHECK_ERR(invocation) CHECK((invocation) != -1) << #invocation +#define PCHECK(invocation) CHECK(invocation) #endif