}
#endif
-#if (defined(UNIX) || defined(VMS)) && (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG))
+#if (defined(UNIX) || defined(VMS) || defined(MSWIN)) \
+ && (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG))
+# define HAVE_PROCESS_STILL_RUNNING
static int process_still_running;
#endif
msg_puts(_("\n process ID: "));
msg_outnum(char_to_long(b0.b0_pid));
#if defined(UNIX) || defined(MSWIN)
- if (mch_process_running((pid_t)char_to_long(b0.b0_pid)))
+ if (mch_process_running(char_to_long(b0.b0_pid)))
{
msg_puts(_(" (STILL RUNNING)"));
-# if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
+# ifdef HAVE_PROCESS_STILL_RUNNING
process_still_running = TRUE;
# endif
}
int fd;
struct block0 b0;
int ret = TRUE;
-#ifdef UNIX
+#if defined(UNIX) || defined(MSWIN)
long pid;
#endif
#if defined(UNIX) || defined(MSWIN)
// process must known and not be running
pid = char_to_long(b0.b0_pid);
- if (pid == 0L || mch_process_running((pid_t)pid))
+ if (pid == 0L || mch_process_running(pid))
ret = FALSE;
#endif
}
#endif
-#if (defined(UNIX) || defined(VMS)) && (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG))
+#ifdef HAVE_PROCESS_STILL_RUNNING
process_still_running = FALSE;
#endif
// It's safe to delete the swap file if all these are true:
name == NULL
? (char_u *)_("Swap file already exists!")
: name,
-# if defined(UNIX) || defined(VMS)
+# ifdef HAVE_PROCESS_STILL_RUNNING
process_still_running
? (char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Quit\n&Abort") :
# endif
(char_u *)_("&Open Read-Only\n&Edit anyway\n&Recover\n&Delete it\n&Quit\n&Abort"), 1, NULL, FALSE);
-# if defined(UNIX) || defined(VMS)
+# ifdef HAVE_PROCESS_STILL_RUNNING
if (process_still_running && choice >= 4)
choice++; /* Skip missing "Delete it" button */
# endif
int mch_get_uname(uid_t uid, char_u *s, int len);
void mch_get_host_name(char_u *s, int len);
long mch_get_pid(void);
-int mch_process_running(pid_t pid);
+int mch_process_running(long pid);
int mch_dirname(char_u *buf, int len);
int mch_FullName(char_u *fname, char_u *buf, int len, int force);
int mch_isFullName(char_u *fname);
int mch_get_user_name(char_u *s, int len);
void mch_get_host_name(char_u *s, int len);
long mch_get_pid(void);
-int mch_process_running(pid_t pid);
+int mch_process_running(long pid);
int mch_dirname(char_u *buf, int len);
long mch_getperm(char_u *name);
int mch_setperm(char_u *name, long perm);