From: Douglas B Rupp <rupp@gnat.com>
To: DJ Delorie <dj@redhat.com>
Cc: ian@airs.com, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Libiberty for VMS - mkstemps.c don't mix case
Date: Sun, 27 Jun 2010 19:24:00 -0000 [thread overview]
Message-ID: <4C27902E.7030300@gnat.com> (raw)
In-Reply-To: <200907230123.n6N1NYa6000851@greed.delorie.com>
DJ Delorie wrote:
>> VMS has file versioning, I think it would detect it only if the
>> version was specified or the directory was created with single
>> versioning.
>
> Doh! I forgot about that.
>
> Ok, that leads to a new question - shouldn't we specify a version, or
> single versioning, when creating temp files, so that someone else
> can't just create a new copy of the same file with a newer version and
> trip up the compiler? Or do the file permissions pass on to new
> versions?
>
At long last getting back to this discussion. I did some experiments
with forcing the temp file to have a version number for the .s temp file
created by gcc and passed to cc1. Creating the temp file works fine,
but cc1 now gets the fatal error:
"can't open <sometempdir>/cccadaaa.s.1 for writing: file exists"
The problem comes from toplev.c/init_asm_output
asm_out_file = fopen (asm_file_name, "w+b");
The "w+" attribute says open a new file for writing. The file exists,
the filename has a version number on it already, so VMS generates this
error.
If I change the attributes to "a+b" it works fine on VMS.
So what now? Seems to me the VMS behavior is entirely rational in
insisting on a new version and that the Unix behavior is somewhat
arbitrary in ignoring the fact the file already exists.
What is your thinking?
next prev parent reply other threads:[~2010-06-27 17:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-23 0:54 Douglas B Rupp
2009-07-23 1:05 ` DJ Delorie
2009-07-23 1:11 ` Douglas B Rupp
2009-07-23 1:24 ` DJ Delorie
2009-07-23 1:41 ` Douglas B Rupp
2009-07-23 2:24 ` DJ Delorie
2009-07-23 3:38 ` Douglas B Rupp
2010-06-27 19:24 ` Douglas B Rupp [this message]
2010-06-28 0:55 ` Douglas B Rupp
2010-06-28 20:27 ` DJ Delorie
2010-06-28 21:19 ` Douglas B Rupp
2010-06-28 22:21 ` DJ Delorie
2009-07-23 2:50 ` Douglas B Rupp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C27902E.7030300@gnat.com \
--to=rupp@gnat.com \
--cc=dj@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=ian@airs.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).