From 11a5174aa63fde9915c4e9fa2efee7523f943eca Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 25 Jan 1999 00:18:47 +0000 Subject: (DONT_UNLINK_WHILE_OPEN) [__MSDOS__ || _WIN32]: Define. --- src/tac.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/tac.c b/src/tac.c index b547296c9..3d9d9d314 100644 --- a/src/tac.c +++ b/src/tac.c @@ -47,6 +47,15 @@ tac -r -s '.\| #include "error.h" #include "safe-read.h" +#if defined __MSDOS__ || defined _WIN32 +/* Define this to non-zero on systems for which the regular mechanism + (of unlinking an open file and expecting to be able to write, seek + back to the beginning, then reread it) doesn't work. E.g., on Windows + and DOS systems. */ +# define DONT_UNLINK_WHILE_OPEN 1 +#endif + + #ifndef DEFAULT_TMPDIR # define DEFAULT_TMPDIR "/tmp" #endif @@ -374,11 +383,6 @@ tac_file (const char *file) } #if DONT_UNLINK_WHILE_OPEN -/* FIXME: currently this code is never automatically enabled. - Eventually, it will be on systems for which the regular mechanism - (of unlinking an open file and expecting to be able to write, seek - back to the beginning, then reread it) doesn't work. E.g., Windows - and DOS systems. */ static const char *file_to_remove; static FILE *fp_to_close; -- cgit v1.2.3-70-g09d2