aboutsummaryrefslogtreecommitdiffstats
path: root/tools/symcryptrun.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2005-04-15 09:04:43 +0000
committerMarcus Brinkmann <[email protected]>2005-04-15 09:04:43 +0000
commit00853b8a1aa5c4ff8bb10d99e65db52b06f639bf (patch)
tree69121495dca9955829aa816561e795852937e8a0 /tools/symcryptrun.c
parent2005-04-15 Marcus Brinkmann <[email protected]> (diff)
downloadgnupg-00853b8a1aa5c4ff8bb10d99e65db52b06f639bf.tar.gz
gnupg-00853b8a1aa5c4ff8bb10d99e65db52b06f639bf.zip
2005-04-15 Marcus Brinkmann <[email protected]>
* symcryptrun.c (TEMP_FAILURE_RETRY): Define if not defined.
Diffstat (limited to 'tools/symcryptrun.c')
-rw-r--r--tools/symcryptrun.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/symcryptrun.c b/tools/symcryptrun.c
index 9f3a55f8b..b35e4d7a5 100644
--- a/tools/symcryptrun.c
+++ b/tools/symcryptrun.c
@@ -217,6 +217,21 @@ i18n_init(void)
}
+/* This is in the GNU C library in unistd.h. */
+
+#ifndef TEMP_FAILURE_RETRY
+/* Evaluate EXPRESSION, and repeat as long as it returns -1 with `errno'
+ set to EINTR. */
+
+# define TEMP_FAILURE_RETRY(expression) \
+ (__extension__ \
+ ({ long int __result; \
+ do __result = (long int) (expression); \
+ while (__result == -1L && errno == EINTR); \
+ __result; }))
+#endif
+
+
/* Unlink a file, and shred it if SHRED is true. */
int
remove_file (char *name, int shred)