Mercurial > hg > xemacs-beta
comparison src/sysdep.c @ 863:42375619fa45
[xemacs-hg @ 2002-06-04 06:03:59 by andyp]
merge 21.4 windows changes, minimally tested
author | andyp |
---|---|
date | Tue, 04 Jun 2002 06:05:53 +0000 |
parents | 84762348c6f9 |
children | 804517e16990 |
comparison
equal
deleted
inserted
replaced
862:278c743f1578 | 863:42375619fa45 |
---|---|
3164 | 3164 |
3165 int | 3165 int |
3166 qxe_rename (const Intbyte *old, const Intbyte *new) | 3166 qxe_rename (const Intbyte *old, const Intbyte *new) |
3167 { | 3167 { |
3168 #ifdef WIN32_NATIVE | 3168 #ifdef WIN32_NATIVE |
3169 return mswindows_rename (old, new); | 3169 /* Windows rename fails if NEW exists */ |
3170 if (mswindows_rename (old, new) == 0) | |
3171 return 0; | |
3172 /* In some cases errno is EACCES if NEW exists */ | |
3173 if (errno != EEXIST && errno != EACCES) | |
3174 return -1; | |
3175 if (mswindows_unlink (new) != 0) | |
3176 return -1; | |
3170 #else /* not WIN32_NATIVE */ | 3177 #else /* not WIN32_NATIVE */ |
3171 Extbyte *oldout, *newout; | 3178 Extbyte *oldout, *newout; |
3172 PATHNAME_CONVERT_OUT (old, oldout); | 3179 PATHNAME_CONVERT_OUT (old, oldout); |
3173 PATHNAME_CONVERT_OUT (new, newout); | 3180 PATHNAME_CONVERT_OUT (new, newout); |
3174 return rename (oldout, newout); | 3181 return rename (oldout, newout); |
3652 #ifdef USG | 3659 #ifdef USG |
3653 #ifdef AIX | 3660 #ifdef AIX |
3654 const char *sys_siglist[NSIG + 1] = | 3661 const char *sys_siglist[NSIG + 1] = |
3655 { | 3662 { |
3656 /* AIX has changed the signals a bit */ | 3663 /* AIX has changed the signals a bit */ |
3657 /* $$####begin-snarf */ | 3664 DEFER_GETTEXT ("bogus signal"), /* 0 */ |
3658 "bogus signal", /* 0 */ | 3665 DEFER_GETTEXT ("hangup"), /* 1 SIGHUP */ |
3659 "hangup", /* 1 SIGHUP */ | 3666 DEFER_GETTEXT ("interrupt"), /* 2 SIGINT */ |
3660 "interrupt", /* 2 SIGINT */ | 3667 DEFER_GETTEXT ("quit"), /* 3 SIGQUIT */ |
3661 "quit", /* 3 SIGQUIT */ | 3668 DEFER_GETTEXT ("illegal instruction"), /* 4 SIGILL */ |
3662 "illegal instruction", /* 4 SIGILL */ | 3669 DEFER_GETTEXT ("trace trap"), /* 5 SIGTRAP */ |
3663 "trace trap", /* 5 SIGTRAP */ | 3670 DEFER_GETTEXT ("IOT instruction"), /* 6 SIGIOT */ |
3664 "IOT instruction", /* 6 SIGIOT */ | 3671 DEFER_GETTEXT ("crash likely"), /* 7 SIGDANGER */ |
3665 "crash likely", /* 7 SIGDANGER */ | 3672 DEFER_GETTEXT ("floating point exception"), /* 8 SIGFPE */ |
3666 "floating point exception", /* 8 SIGFPE */ | 3673 DEFER_GETTEXT ("kill"), /* 9 SIGKILL */ |
3667 "kill", /* 9 SIGKILL */ | 3674 DEFER_GETTEXT ("bus error"), /* 10 SIGBUS */ |
3668 "bus error", /* 10 SIGBUS */ | 3675 DEFER_GETTEXT ("segmentation violation"), /* 11 SIGSEGV */ |
3669 "segmentation violation", /* 11 SIGSEGV */ | 3676 DEFER_GETTEXT ("bad argument to system call"), /* 12 SIGSYS */ |
3670 "bad argument to system call", /* 12 SIGSYS */ | 3677 DEFER_GETTEXT ("write on a pipe with no one to read it"), /* 13 SIGPIPE */ |
3671 "write on a pipe with no one to read it", /* 13 SIGPIPE */ | 3678 DEFER_GETTEXT ("alarm clock"), /* 14 SIGALRM */ |
3672 "alarm clock", /* 14 SIGALRM */ | 3679 DEFER_GETTEXT ("software termination signal"), /* 15 SIGTERM */ |
3673 "software termination signal", /* 15 SIGTERM */ | 3680 DEFER_GETTEXT ("user defined signal 1"), /* 16 SIGUSR1 */ |
3674 "user defined signal 1", /* 16 SIGUSR1 */ | 3681 DEFER_GETTEXT ("user defined signal 2"), /* 17 SIGUSR2 */ |
3675 "user defined signal 2", /* 17 SIGUSR2 */ | 3682 DEFER_GETTEXT ("death of a child"), /* 18 SIGCLD */ |
3676 "death of a child", /* 18 SIGCLD */ | 3683 DEFER_GETTEXT ("power-fail restart"), /* 19 SIGPWR */ |
3677 "power-fail restart", /* 19 SIGPWR */ | 3684 DEFER_GETTEXT ("bogus signal"), /* 20 */ |
3678 "bogus signal", /* 20 */ | 3685 DEFER_GETTEXT ("bogus signal"), /* 21 */ |
3679 "bogus signal", /* 21 */ | 3686 DEFER_GETTEXT ("bogus signal"), /* 22 */ |
3680 "bogus signal", /* 22 */ | 3687 DEFER_GETTEXT ("bogus signal"), /* 23 */ |
3681 "bogus signal", /* 23 */ | 3688 DEFER_GETTEXT ("bogus signal"), /* 24 */ |
3682 "bogus signal", /* 24 */ | 3689 DEFER_GETTEXT ("LAN I/O interrupt"), /* 25 SIGAIO */ |
3683 "LAN I/O interrupt", /* 25 SIGAIO */ | 3690 DEFER_GETTEXT ("PTY I/O interrupt"), /* 26 SIGPTY */ |
3684 "PTY I/O interrupt", /* 26 SIGPTY */ | 3691 DEFER_GETTEXT ("I/O intervention required"), /* 27 SIGIOINT */ |
3685 "I/O intervention required", /* 27 SIGIOINT */ | |
3686 #ifdef AIXHFT | 3692 #ifdef AIXHFT |
3687 "HFT grant", /* 28 SIGGRANT */ | 3693 "HFT grant", /* 28 SIGGRANT */ |
3688 "HFT retract", /* 29 SIGRETRACT */ | 3694 "HFT retract", /* 29 SIGRETRACT */ |
3689 "HFT sound done", /* 30 SIGSOUND */ | 3695 "HFT sound done", /* 30 SIGSOUND */ |
3690 "HFT input ready", /* 31 SIGMSG */ | 3696 "HFT input ready", /* 31 SIGMSG */ |
3693 0 | 3699 0 |
3694 }; | 3700 }; |
3695 #else /* USG, not AIX */ | 3701 #else /* USG, not AIX */ |
3696 const char *sys_siglist[NSIG + 1] = | 3702 const char *sys_siglist[NSIG + 1] = |
3697 { | 3703 { |
3698 /* $$####begin-snarf */ | 3704 DEFER_GETTEXT ("bogus signal"), /* 0 */ |
3699 "bogus signal", /* 0 */ | 3705 DEFER_GETTEXT ("hangup"), /* 1 SIGHUP */ |
3700 "hangup", /* 1 SIGHUP */ | 3706 DEFER_GETTEXT ("interrupt"), /* 2 SIGINT */ |
3701 "interrupt", /* 2 SIGINT */ | 3707 DEFER_GETTEXT ("quit"), /* 3 SIGQUIT */ |
3702 "quit", /* 3 SIGQUIT */ | 3708 DEFER_GETTEXT ("illegal instruction"), /* 4 SIGILL */ |
3703 "illegal instruction", /* 4 SIGILL */ | 3709 DEFER_GETTEXT ("trace trap"), /* 5 SIGTRAP */ |
3704 "trace trap", /* 5 SIGTRAP */ | 3710 DEFER_GETTEXT ("IOT instruction"), /* 6 SIGIOT */ |
3705 "IOT instruction", /* 6 SIGIOT */ | 3711 DEFER_GETTEXT ("EMT instruction"), /* 7 SIGEMT */ |
3706 "EMT instruction", /* 7 SIGEMT */ | 3712 DEFER_GETTEXT ("floating point exception"), /* 8 SIGFPE */ |
3707 "floating point exception", /* 8 SIGFPE */ | 3713 DEFER_GETTEXT ("kill"), /* 9 SIGKILL */ |
3708 "kill", /* 9 SIGKILL */ | 3714 DEFER_GETTEXT ("bus error"), /* 10 SIGBUS */ |
3709 "bus error", /* 10 SIGBUS */ | 3715 DEFER_GETTEXT ("segmentation violation"), /* 11 SIGSEGV */ |
3710 "segmentation violation", /* 11 SIGSEGV */ | 3716 DEFER_GETTEXT ("bad argument to system call"), /* 12 SIGSYS */ |
3711 "bad argument to system call", /* 12 SIGSYS */ | 3717 DEFER_GETTEXT ("write on a pipe with no one to read it"), /* 13 SIGPIPE */ |
3712 "write on a pipe with no one to read it", /* 13 SIGPIPE */ | 3718 DEFER_GETTEXT ("alarm clock"), /* 14 SIGALRM */ |
3713 "alarm clock", /* 14 SIGALRM */ | 3719 DEFER_GETTEXT ("software termination signal"), /* 15 SIGTERM */ |
3714 "software termination signal", /* 15 SIGTERM */ | 3720 DEFER_GETTEXT ("user defined signal 1"), /* 16 SIGUSR1 */ |
3715 "user defined signal 1", /* 16 SIGUSR1 */ | 3721 DEFER_GETTEXT ("user defined signal 2"), /* 17 SIGUSR2 */ |
3716 "user defined signal 2", /* 17 SIGUSR2 */ | 3722 DEFER_GETTEXT ("death of a child"), /* 18 SIGCLD */ |
3717 "death of a child", /* 18 SIGCLD */ | 3723 DEFER_GETTEXT ("power-fail restart"), /* 19 SIGPWR */ |
3718 "power-fail restart", /* 19 SIGPWR */ | |
3719 #ifdef sun | 3724 #ifdef sun |
3720 "window size changed", /* 20 SIGWINCH */ | 3725 "window size changed", /* 20 SIGWINCH */ |
3721 "urgent socket condition", /* 21 SIGURG */ | 3726 "urgent socket condition", /* 21 SIGURG */ |
3722 "pollable event occurred", /* 22 SIGPOLL */ | 3727 "pollable event occurred", /* 22 SIGPOLL */ |
3723 "stop (cannot be caught or ignored)", /* 23 SIGSTOP */ | 3728 "stop (cannot be caught or ignored)", /* 23 SIGSTOP */ |