[PATCH] Warn when using mktemp
Joel Sherrill
joel.sherrill@oarcorp.com
Sat Mar 14 12:18:00 GMT 2009
Corinna Vinschen wrote:
> 2) Why is _mktemp_r in stdio.h rather than in stdlib.h?
>
>
> That looks like a bug to me. I fixed that in the attached patch.
>
> On Mar 13 14:54, Brooks Moses wrote:
>
>> Doing a Google
>> search on "mktemp mkstemp dangerous" mostly finds mailing-list threads
>> of people who are annoyed by the warning.
>>
>
> That's the idea of this warning at least on BSD and on Linux. And I'd
> like to see this warning on Cygwin as well. Cygwin has a link time
> warning for this but on one hand it's using STABS while the new GCC
> for Cygwin now creates Dwarf2, and on the other hand this warning is
> not even visible when linking an application using mktemp.
>
>
I would rather RTEMS follow BSD, GNU/Linux and Cygwin
on this one so we don't need any ifdef's. Feel free to slap
our users for dangerous things too. :)
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the Newlib
mailing list