[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Warning on 'mktemp' [Cygwin]
From: |
Angelo Graziosi |
Subject: |
Warning on 'mktemp' [Cygwin] |
Date: |
Sun, 23 May 2010 13:58:57 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 |
On Cygwin I find this warning:
[...]
/tmp/emacs/lib-src/movemail.c: In function ‘main’:
/tmp/emacs/lib-src/movemail.c:305: warning: call to ‘mktemp’ declared
with attribute warning: the use of `mktemp' is dangerous; use `mkstemp'
instead
[...]
Note that 'configure' says: "checking for mkstemp... yes", so I have
applied this patch:
================
$ cat movemail.c.patch
--- movemail.c.orig 2010-04-02 23:54:26.000000000 +0200
+++ movemail.c 2010-05-23 12:35:06.296875000 +0200
@@ -302,7 +302,7 @@
p--;
*p = 0;
strcpy (p, "EXXXXXX");
- mktemp (tempname);
+ mkstemp (tempname);
unlink (tempname);
while (1)
================
and the warning disappeared. But is it safe apply it, at least locally
on Cygwin?
Thanks,
Angelo.
- Warning on 'mktemp' [Cygwin],
Angelo Graziosi <=