bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: javacomp: conftest.java is deleted before compiling


From: Eric Blake
Subject: Re: javacomp: conftest.java is deleted before compiling
Date: Fri, 20 Sep 2013 06:43:36 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

On 09/20/2013 01:22 AM, Daiki Ueno wrote:
> Hi,
> 
> Regarding the bug report for gettext:
> https://lists.gnu.org/archive/html/bug-gettext/2013-09/msg00010.html
> 
> javacomp.c has the following code to check if javac can compile some
> Java programs.  First, it writes out some code snippet to a temporary
> file and then call javac command on the written file.  Like this:
> 
>  write_temp_file (tmpdir, conftest_file_name,
>                   get_goodcode_snippet (source_version));

> As fopen_temp uses "D" mode on Windows, which implies the file will be
> deleted on close (fwriteerror_temp here).  Thus, after calling
> write_temp_file, the file will be deleted immediately.  Maybe we should
> use plain fopen/fwriteerror here?

That's not the first time I've encountered a problem with mingw's
temporary files being deleted on close.  See this m4 commit:

git.sv.gnu.org/cgit/m4.git/commit/?id=11199a26

So yes, it sounds like we need to avoid temporary files if we want them
to persist past the close.  Are you up to writing a patch along those lines?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]