#define POP_MAILDIR "/usr/spool/pop"
char buffer[BUFSIZ];
-char tmpfile[512]; /* tmp file */
+char xtmpfile[512]; /* tmp file */
int newmail; /* fd for temp message */
int maildrop; /* file descriptor for drop */
extern int errno;
-
+extern int sys_nerr;
+extern char *sys_errlist[];
main (argc, argv)
}
close(newmail);
- unlink(tmpfile);
+ unlink(xtmpfile);
exit(status);
}
{
int nchar;
- sprintf(tmpfile, "/tmp/tpop.%d", getpid());
- if((newmail = open(tmpfile, O_RDWR|O_CREAT, 0600)) == -1)
+ sprintf(xtmpfile, "/tmp/tpop.%d", getpid());
+ if((newmail = open(xtmpfile, O_RDWR|O_CREAT, 0600)) == -1)
{
- fprintf(stderr, "unable to open temporary file, \"%s\".\n", tmpfile);
+ fprintf(stderr, "unable to open temporary file, \"%s\".\n", xtmpfile);
return(-1);
}
int
-open_drop(drop)
+open_drop(name)
char *name;
{
char dropfile[512];