diff options
author | 2012-10-16 16:29:17 -0700 | |
---|---|---|
committer | 2012-10-16 16:29:17 -0700 | |
commit | 3fe50abbfd12a8d98717bdaba2f9af30f39affbf (patch) | |
tree | 0adb80eba45478e68bd6206e15ae56b9ba000c1e /libs/utils/ZipFileRO.cpp | |
parent | 23bcd8d298597659622919027c9ea921d5eed513 (diff) | |
parent | 125beceefd44f6abd17ff336bb989e1850965bd8 (diff) |
am 125becee: am 7abbbc68: Merge "Add TEMP_FAILURE_RETRY to ZipUtils"
* commit '125beceefd44f6abd17ff336bb989e1850965bd8':
Add TEMP_FAILURE_RETRY to ZipUtils
Diffstat (limited to 'libs/utils/ZipFileRO.cpp')
-rw-r--r-- | libs/utils/ZipFileRO.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/libs/utils/ZipFileRO.cpp b/libs/utils/ZipFileRO.cpp index ef49c0f2c0..a1bfedb37a 100644 --- a/libs/utils/ZipFileRO.cpp +++ b/libs/utils/ZipFileRO.cpp @@ -20,6 +20,7 @@ #define LOG_TAG "zipro" //#define LOG_NDEBUG 0 #include <utils/Log.h> +#include <utils/Compat.h> #include <utils/ZipFileRO.h> #include <utils/misc.h> #include <utils/threads.h> @@ -32,14 +33,6 @@ #include <assert.h> #include <unistd.h> -#if HAVE_PRINTF_ZD -# define ZD "%zd" -# define ZD_TYPE ssize_t -#else -# define ZD "%ld" -# define ZD_TYPE long -#endif - /* * We must open binary files using open(path, ... | O_BINARY) under Windows. * Otherwise strange read errors will happen. @@ -48,21 +41,6 @@ # define O_BINARY 0 #endif -/* - * 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 - using namespace android; /* |