Internal cleanup change.
PiperOrigin-RevId: 254254951
This commit is contained in:
parent
4443a53d76
commit
3e3b915613
@ -201,7 +201,7 @@ static string GetBinaryDir(bool strip_exe) {
|
|||||||
HMODULE hModule = GetModuleHandle(NULL);
|
HMODULE hModule = GetModuleHandle(NULL);
|
||||||
GetModuleFileName(hModule, exe_path, MAX_PATH);
|
GetModuleFileName(hModule, exe_path, MAX_PATH);
|
||||||
#else
|
#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
|
||||||
#endif
|
#endif
|
||||||
// Make sure it's null-terminated:
|
// Make sure it's null-terminated:
|
||||||
|
@ -21,15 +21,7 @@ limitations under the License.
|
|||||||
|
|
||||||
#if !defined(PLATFORM_GOOGLE)
|
#if !defined(PLATFORM_GOOGLE)
|
||||||
|
|
||||||
// A CHECK() macro that lets you assert the success of a function that
|
#define PCHECK(invocation) CHECK(invocation)
|
||||||
// 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
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user