#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"
#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
#ifdef HAVE_FGETPOS
fpos_t pos;
#else
- long pos;
+ off_t pos;
#endif
pgp_key_t root = NULL;
#ifdef HAVE_FGETPOS
fpos_t pos, keypos;
#else
- long pos, keypos;
+ off_t pos, keypos;
#endif
unsigned char *buff = NULL;