missing includes, intializers, consts
[apps/madmutt.git] / pgppubring.c
index 159a9d5..baf5b16 100644 (file)
 #include <time.h>
 #ifdef HAVE_GETOPT_H
 # include <getopt.h>
-#endif
-#include <errno.h>
-
+#else
 extern char *optarg;
 extern int optind;
+#endif
+#include <errno.h>
 
-short Umask;                    /* dirty hack because we need Umask in lib.c but don't want globals.h there */
+short Umask;   /* dirty hack because we need Umask in lib.c but don't want globals.h there */
 
 #include "sha1.h"
 #include "md5.h"
@@ -56,8 +56,8 @@ short Umask;                    /* dirty hack because we need Umask in lib.c but
 #define FGETPOS(fp,pos) fgetpos((fp),&(pos))
 #define FSETPOS(fp,pos) fsetpos((fp),&(pos))
 #else
-#define FGETPOS(fp,pos) pos=ftell((fp));
-#define FSETPOS(fp,pos) fseek((fp),(pos),SEEK_SET)
+#define FGETPOS(fp,pos) pos=ftello((fp));
+#define FSETPOS(fp,pos) fseeko((fp),(pos),SEEK_SET)
 #endif
 
 
@@ -579,7 +579,7 @@ static pgp_key_t pgp_parse_keyblock (FILE * fp)
 #ifdef HAVE_FGETPOS
   fpos_t pos;
 #else
-  long pos;
+  off_t pos;
 #endif
 
   pgp_key_t root = NULL;
@@ -730,7 +730,7 @@ static void pgpring_find_candidates (char *ringfile, const char *hints[],
 #ifdef HAVE_FGETPOS
   fpos_t pos, keypos;
 #else
-  long pos, keypos;
+  off_t pos, keypos;
 #endif
 
   unsigned char *buff = NULL;