X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fspost.c;h=4930cbbf6acec49a0b6959f944fae5cd2b682532;hb=78c6358d8c8c1ee74bf65c672d958e4eae17ee37;hp=76478c87a93a49d91f9c5836b22061cd0c62bf1a;hpb=017a82124bf2ea39ced5aa4c8f969c18b3c2fb90;p=mmh diff --git a/uip/spost.c b/uip/spost.c index 76478c8..4930cbb 100644 --- a/uip/spost.c +++ b/uip/spost.c @@ -6,6 +6,10 @@ * when "sendmail" is the transport system. * * $Id$ + * + * This code is Copyright (c) 2002, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. */ #include @@ -13,8 +17,8 @@ #include #include #include -#include -#include +#include +#include #define uptolow(c) ((isalpha(c) && isupper (c)) ? tolower (c) : c) @@ -727,9 +731,15 @@ make_bcc_file (void) char *vec[6]; FILE * in, *out; +#ifdef HAVE_MKSTEMP + fd = mkstemp(bccfil); + if (fd == -1 || (out = fdopen(fd, "w")) == NULL) + adios (bccfil, "unable to create"); +#else mktemp (bccfil); if ((out = fopen (bccfil, "w")) == NULL) adios (bccfil, "unable to create"); +#endif chmod (bccfil, 0600); fprintf (out, "Date: %s\n", dtimenow (0));