This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix -save-temps from clobbering input file@apple.com
- To: rth at redhat dot com
- Subject: Re: [PATCH] Fix -save-temps from clobbering input file@apple.com
- From: DJ Delorie <dj at redhat dot com>
- Date: Sat, 3 Nov 2001 21:51:22 -0500
- CC: ira at apple dot com, gcc-patches at gcc dot gnu dot org
- References: <p05100300b80370dcbd9d@[17.202.44.152]> <20011103133326.B11575@redhat.com>
> My thought was use fstat and compare st_dev+st_ino numbers, but
> I don't know how reliable that is on various non-POSIX filesystems.
DJGPP and Cygwin reliably emulate those, except perhaps for a few
exotic cases that we don't need to worry about.
stat is safer than fstat for DJGPP.
Consistency of st_ino between stat and fstat is guaranteed only for
non-zero-length files on most filesystem types.
But it's still something you'd need to check with autoconf, since some
implementations may not even offer an st_ino field.