(Qsystem_char_id): Deleted even if HAVE_CHISE is defined and
[chise/xemacs-chise.git.1] / src / sysdep.c
index ff64273..c307469 100644 (file)
@@ -3158,9 +3158,11 @@ sys_rename (const char *old, const char *new)
   /* Windows rename fails if NEW exists */
   if (rename (old, new) == 0)
     return 0;
-  if (errno != EEXIST)
+  /* In some cases errno is EACCES if NEW exists */
+  if (errno != EEXIST && errno != EACCES)
+    return -1;
+  if (unlink (new) != 0)
     return -1;
-  unlink (new);
 #endif /* WIN32_NATIVE */
   return rename (old, new);
 }
@@ -3582,7 +3584,7 @@ const char *sys_siglist[NSIG + 1] =
     DEFER_GETTEXT ("bad argument to system call"),     /* 12 SIGSYS */
     DEFER_GETTEXT ("write on a pipe with no one to read it"), /* 13 SIGPIPE */
     DEFER_GETTEXT ("alarm clock"),                     /* 14 SIGALRM */
-    DEFER_GETTEXT ("software termination signum"),     /* 15 SIGTERM */
+    DEFER_GETTEXT ("software termination signal"),     /* 15 SIGTERM */
     DEFER_GETTEXT ("user defined signal 1"),           /* 16 SIGUSR1 */
     DEFER_GETTEXT ("user defined signal 2"),           /* 17 SIGUSR2 */
     DEFER_GETTEXT ("death of a child"),                        /* 18 SIGCLD */
@@ -3621,7 +3623,7 @@ const char *sys_siglist[NSIG + 1] =
     DEFER_GETTEXT ("bad argument to system call"),     /* 12 SIGSYS */
     DEFER_GETTEXT ("write on a pipe with no one to read it"), /* 13 SIGPIPE */
     DEFER_GETTEXT ("alarm clock"),                     /* 14 SIGALRM */
-    DEFER_GETTEXT ("software termination signum"),     /* 15 SIGTERM */
+    DEFER_GETTEXT ("software termination signal"),     /* 15 SIGTERM */
     DEFER_GETTEXT ("user defined signal 1"),           /* 16 SIGUSR1 */
     DEFER_GETTEXT ("user defined signal 2"),           /* 17 SIGUSR2 */
     DEFER_GETTEXT ("death of a child"),                        /* 18 SIGCLD */