X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fspost.c;h=555bb68dceee6ca4cf30403e786eaf1bcdb1d3f9;hb=0f540a390a62d9732f61fdb21f82048093a3d63d;hp=206698ee56e2f6ccfc926cda75f5b19877811517;hpb=66049298f32287c4a411f1931ec4b66b380878a9;p=mmh diff --git a/uip/spost.c b/uip/spost.c index 206698e..555bb68 100644 --- a/uip/spost.c +++ b/uip/spost.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #define uptolow(c) ((isalpha(c) && isupper (c)) ? tolower (c) : c) @@ -55,7 +55,7 @@ struct swit switches[] = { #define VERSIONSW 15 { "version", 0 }, #define HELPSW 16 - { "help", 4 }, + { "help", 0 }, #define DEBUGSW 17 { "debug", -5 }, #define DISTSW 18 @@ -727,9 +727,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));