[svn] GnuPG - r4724 - trunk/tools
svn author wk
cvs at cvs.gnupg.org
Wed Mar 26 18:44:57 CET 2008
Author: wk
Date: 2008-03-26 18:44:56 +0100 (Wed, 26 Mar 2008)
New Revision: 4724
Modified:
trunk/tools/ChangeLog
trunk/tools/make-dns-cert.c
Log:
Allow standalone build.
Modified: trunk/tools/ChangeLog
===================================================================
--- trunk/tools/ChangeLog 2008-03-26 16:38:09 UTC (rev 4723)
+++ trunk/tools/ChangeLog 2008-03-26 17:44:56 UTC (rev 4724)
@@ -1,3 +1,9 @@
+2008-03-26 Werner Koch <wk at g10code.com>
+
+ * make-dns-cert.c: Include unistd.h. Use config.h if requested.
+ (cert_key): Protect read against EINTR.
+ (main): Print SVN revision for standalone version.
+
2008-03-05 Werner Koch <wk at g10code.com>
* gpg-connect-agent.c (arithmetic_op): Add logical not, or and and.
Modified: trunk/tools/make-dns-cert.c
===================================================================
--- trunk/tools/make-dns-cert.c 2008-03-26 16:38:09 UTC (rev 4723)
+++ trunk/tools/make-dns-cert.c 2008-03-26 17:44:56 UTC (rev 4724)
@@ -1,5 +1,5 @@
/* make-dns-cert.c - An OpenPGP-to-DNS CERT conversion tool
- * Copyright (C) 2006 Free Software Foundation, Inc.
+ * Copyright (C) 2006, 2008 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -17,7 +17,10 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <unistd.h>
#ifdef HAVE_GETOPT_H
#include <getopt.h>
@@ -26,6 +29,7 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
+#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -72,7 +76,9 @@
{
unsigned char buffer[1024];
- err=read(fd,buffer,1024);
+ do
+ err = read (fd,buffer,1024);
+ while (err == -1 && errno == EINTR);
if(err==-1)
{
fprintf(stderr,"Unable to read key file %s: %s\n",
@@ -181,7 +187,11 @@
}
else if(argc>1 && strcmp(argv[1],"--version")==0)
{
- printf("make-dns-cert (GnuPG) " VERSION "\n");
+#if defined(HAVE_CONFIG_H) && defined(VERSION)
+ printf ("make-dns-cert (GnuPG) " VERSION "\n");
+#else
+ printf ("make-dns-cert gnupg-svn%s\n", "$Revision$");
+#endif
return 0;
}
else if(argc>1 && strcmp(argv[1],"--help")==0)
Property changes on: trunk/tools/make-dns-cert.c
___________________________________________________________________
Name: svn:keywords
+ Revision
More information about the Gnupg-commits
mailing list