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: More xm-*.h cleanup



> __MSDOS__

This is defined by all known MS-DOS-hosted compilers.  If you unlink
an open file on an MS-DOS-based file system, you corrupt the disk.
Very dangerous.

> -/* On MSDOS, write temp files in current dir
> -   because there's no place else we can expect to use.  */
> -#if __MSDOS__
> -#ifndef P_tmpdir
> -#define P_tmpdir "./"
> -#endif
> -#endif

> -#ifndef __MSDOS__
> -  /* In MSDOS, we cannot unlink the temporary file until we are finished using
> -     it.  Otherwise, we delete it now, so that it will be gone even if the
> -     compiler happens to crash.  */
> -  unlink (temp_filename);
> -#endif

> -#ifdef __MSDOS__
>        unlink (temp_filename);
> -#endif


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