[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: patch for binutils/buccom.c
From: |
Nick Clifton |
Subject: |
Re: patch for binutils/buccom.c |
Date: |
13 Mar 2003 15:23:54 +0000 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 |
Hi Robert,
> The following patch allows binutils-2.13-1 to be built on Debian
> Unstable for Powerpc.
> diff -Naur binutils-2.13/binutils/bucomm.c
> - mktemp (tmpname);
> + mkstemp (tmpname);
Unfortunately this patch is insufficient. It has two problems:
1. It leaks file descriptors.
The function make_tempname() is intended to return a temporary
file name, but not open the file. So using mkstemp() allocate a
file descriptor which will never be used or closed.
2. It creates a ordinary file.
One of the users of make_tempname() wants to create a directory,
not a file, and another wants to create a output BFD structure.
Is the problem that the Debian unstable release issues a warning
message when mktemp() is used ? If so, this is an already known
problem and will be fixed one day. Or is the mktemp function
completely absent ?
Cheers
Nick