GNUPG-1-9-BRANCH gnupg/tools (ChangeLog symcryptrun.c)

cvs user marcus cvs at cvs.gnupg.org
Fri Apr 15 10:48:20 CEST 2005


    Date: Friday, April 15, 2005 @ 11:04:43
  Author: marcus
    Path: /cvs/gnupg/gnupg/tools
     Tag: GNUPG-1-9-BRANCH

Modified: ChangeLog symcryptrun.c

2005-04-15  Marcus Brinkmann  <marcus at g10code.de>

	* symcryptrun.c (TEMP_FAILURE_RETRY): Define if not defined.


---------------+
 ChangeLog     |    2 ++
 symcryptrun.c |   15 +++++++++++++++
 2 files changed, 17 insertions(+)


Index: gnupg/tools/ChangeLog
diff -u gnupg/tools/ChangeLog:1.25.2.70 gnupg/tools/ChangeLog:1.25.2.71
--- gnupg/tools/ChangeLog:1.25.2.70	Fri Apr 15 04:24:44 2005
+++ gnupg/tools/ChangeLog	Fri Apr 15 11:04:43 2005
@@ -1,5 +1,7 @@
 2005-04-15  Marcus Brinkmann  <marcus at g10code.de>
 
+	* symcryptrun.c (TEMP_FAILURE_RETRY): Define if not defined.
+
 	* symcryptrun.c (remove_file): New function.
 	(confucius_copy_file): Accept new argument PLAIN and shred the
 	file if it is set on error.
Index: gnupg/tools/symcryptrun.c
diff -u gnupg/tools/symcryptrun.c:1.1.2.4 gnupg/tools/symcryptrun.c:1.1.2.5
--- gnupg/tools/symcryptrun.c:1.1.2.4	Fri Apr 15 04:24:44 2005
+++ gnupg/tools/symcryptrun.c	Fri Apr 15 11:04:43 2005
@@ -217,6 +217,21 @@
 }
 
 
+/* 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)




More information about the Gnupg-commits mailing list