#include <time.h>
#include <getopt.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
char *strerror (int);
#endif
-static void fatal (char *s1, char *s2, char *s3);
-static void error (char *s1, char *s2, char *s3);
-static void pfatal_with_name (char *name);
-static void pfatal_and_delete (char *name);
-static char *concat (char *s1, char *s2, char *s3);
+static void fatal (const char *s1, const char *s2, const char *s3) NO_RETURN;
+static void error (const char *s1, const char *s2, const char *s3);
+static void pfatal_with_name (char *name) NO_RETURN;
+static void pfatal_and_delete (char *name) NO_RETURN;
+static char *concat (const char *s1, const char *s2, const char *s3);
static long *xmalloc (unsigned int size);
#ifdef MAIL_USE_POP
static int popmail (char *mailbox, char *outfile, int preserve, char *password, int reverse_order);
{
char *inname, *outname;
int indesc, outdesc;
- int nread;
+ ssize_t nread;
int status;
int c, preserve_mail = 0;
string-comparing the two paths, because one or both of them might
be symbolic links pointing to some other directory. */
static char *
-mail_spool_name (inname)
- char *inname;
+mail_spool_name (char *inname)
{
struct stat stat1, stat2;
char *indir, *fname;
/* Print error message and exit. */
static void
-fatal (char *s1, char *s2, char *s3)
+fatal (const char *s1, const char *s2, const char *s3)
{
if (delete_lockname)
unlink (delete_lockname);
are args for it or null. */
static void
-error (char *s1, char *s2, char *s3)
+error (const char *s1, const char *s2, const char *s3)
{
fprintf (stderr, "movemail: ");
if (s3)
/* Return a newly-allocated string whose contents concatenate those of s1, s2, s3. */
static char *
-concat (char *s1, char *s2, char *s3)
+concat (const char *s1, const char *s2, const char *s3)
{
- int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
+ size_t len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
char *result = (char *) xmalloc (len1 + len2 + len3 + 1);
strcpy (result, s1);