This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] Fix -save-temps from clobbering input file@apple.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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]