Unix Programming - tmpnam in C

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > August 2005 > tmpnam in C





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author tmpnam in C
lucas

2005-08-22, 5:59 pm

when i compile some programs that i download, they exit with this error:
warning: the use of `tmpnam' is dangerous, better use `mkstemp'

aside from modifying the source code, is there away to tell gcc to use
tmpnam anyway? i know the problems with tmpnam, and i'm not very concerned
with them for the system the programs are run on.

regards,
--
lucas
-------------------------
Perl Coder since 2001
shift || die;
-------------------------
Pascal Bourguignon

2005-08-22, 8:49 pm

lucas <aolblowz@yahoo.com> writes:
> when i compile some programs that i download, they exit with this error:
> warning: the use of `tmpnam' is dangerous, better use `mkstemp'
>
> aside from modifying the source code, is there away to tell gcc to use
> tmpnam anyway? i know the problems with tmpnam, and i'm not very concerned
> with them for the system the programs are run on.


Yes: don't use -Werror

--
__Pascal Bourguignon__ http://www.informatimago.com/
You're always typing.
Well, let's see you ignore my
sitting on your hands.
Måns Rullgård

2005-08-22, 8:49 pm

lucas <aolblowz@yahoo.com> writes:

> when i compile some programs that i download, they exit with this error:
> warning: the use of `tmpnam' is dangerous, better use `mkstemp'
>
> aside from modifying the source code, is there away to tell gcc to use
> tmpnam anyway? i know the problems with tmpnam, and i'm not very concerned
> with them for the system the programs are run on.


That's a warning, not an error. Your program is being compiled and
linked just fine.

--
Måns Rullgård
mru@inprovide.com
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com