~ubuntu-branches/ubuntu/precise/gnupg2/precise-proposed

« back to all changes in this revision

Viewing changes to tools/make-dns-cert.c

  • Committer: Bazaar Package Importer
  • Author(s): Eric Dorland
  • Date: 2009-03-08 22:46:47 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090308224647-gq17gatcl71lrc2k
Tags: 2.0.11-1
* New upstream release. (Closes: #496663)
* debian/control: Make the description a little more distinctive than
  gnupg v1's. Thanks Jari Aalto. (Closes: #496323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* make-dns-cert.c - An OpenPGP-to-DNS CERT conversion tool
2
 
 * Copyright (C) 2006 Free Software Foundation, Inc.
 
2
 * Copyright (C) 2006, 2008 Free Software Foundation, Inc.
3
3
 *
4
4
 * This file is part of GnuPG.
5
5
 *
17
17
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18
18
 */
19
19
 
20
 
#include <config.h>
 
20
#ifdef HAVE_CONFIG_H
 
21
# include <config.h>
 
22
#endif
 
23
 
21
24
#include <unistd.h>
22
25
#ifdef HAVE_GETOPT_H
23
26
#include <getopt.h>
26
29
#include <stdlib.h>
27
30
#include <string.h>
28
31
#include <errno.h>
 
32
#include <unistd.h>
29
33
#include <sys/types.h>
30
34
#include <sys/stat.h>
31
35
#include <fcntl.h>
72
76
    {
73
77
      unsigned char buffer[1024];
74
78
 
75
 
      err=read(fd,buffer,1024);
 
79
      do 
 
80
        err = read (fd,buffer,1024);
 
81
      while (err == -1 && errno == EINTR);
76
82
      if(err==-1)
77
83
        {
78
84
          fprintf(stderr,"Unable to read key file %s: %s\n",
181
187
    }
182
188
  else if(argc>1 && strcmp(argv[1],"--version")==0)
183
189
    {
184
 
      printf("make-dns-cert (GnuPG) " VERSION "\n");
 
190
#if defined(HAVE_CONFIG_H) && defined(VERSION)
 
191
      printf ("make-dns-cert (GnuPG) " VERSION "\n");
 
192
#else
 
193
      printf ("make-dns-cert gnupg-svn%d\n", atoi (10+"$Revision: 4728 $"));
 
194
#endif
185
195
      return 0;
186
196
    }
187
197
  else if(argc>1 && strcmp(argv[1],"--help")==0)