summaryrefslogtreecommitdiff
path: root/src/tac.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-01-25 00:18:47 +0000
committerJim Meyering <jim@meyering.net>1999-01-25 00:18:47 +0000
commit11a5174aa63fde9915c4e9fa2efee7523f943eca (patch)
tree6c13bc76f49d178a3fcb3d12968f21237de44bb4 /src/tac.c
parenta9ec82981badac0e5664650171d71aa456f6ca8f (diff)
downloadcoreutils-11a5174aa63fde9915c4e9fa2efee7523f943eca.tar.xz
(DONT_UNLINK_WHILE_OPEN) [__MSDOS__ || _WIN32]: Define.
Diffstat (limited to 'src/tac.c')
-rw-r--r--src/tac.c14
1 files 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;