about summary refs log tree commit diff
path: root/pm_config.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'pm_config.in.h')
-rw-r--r--pm_config.in.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/pm_config.in.h b/pm_config.in.h
index 1e54f06e..f88a7652 100644
--- a/pm_config.in.h
+++ b/pm_config.in.h
@@ -145,6 +145,15 @@
   #define HAVE_VASPRINTF 0
 #endif
 
+/* On Windows, unlinking a file is deleting it, and you can't delete an open
+   file, so unlink of an open file fails.  The errno is (incorrectly) EACCES.
+*/
+#if MSVCRT || defined(__CYGWIN__) || defined(DJGPP)
+  #define CAN_UNLINK_OPEN 0
+#else
+  #define CAN_UNLINK_OPEN 1
+#endif
+
 #ifdef __amigaos__
 #include <clib/exec_protos.h>
 #define getpid() ((pid_t)FindTask(NULL))