diff options
| author | Reuben Thomas | 2014-08-09 17:12:33 +0100 |
|---|---|---|
| committer | Reuben Thomas | 2014-08-09 17:12:33 +0100 |
| commit | dcf7e861abd47b7b8f5803704f5e97e0c3cc1153 (patch) | |
| tree | 64a5d55776b9a4b30eda325a836f3bd3e2516058 /src | |
| parent | 5742859f273b82e7dbadf7e9f581fd5d364dc05a (diff) | |
| download | emacs-dcf7e861abd47b7b8f5803704f5e97e0c3cc1153.tar.gz emacs-dcf7e861abd47b7b8f5803704f5e97e0c3cc1153.zip | |
Remove support for DJGPP < 2.02
This also removes some specially-licensed files and lots of accompanying
explanation.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/dosfns.c | 7 | ||||
| -rw-r--r-- | src/msdos.c | 105 |
3 files changed, 5 insertions, 112 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b5831d811d5..bc044923fe8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-08-09 Reuben Thomas <rrt@sc3d.org> | ||
| 2 | |||
| 3 | * msdos.c: | ||
| 4 | * dosfns.c (init_dosfns): Remove support for DJGPP < 2.02. | ||
| 5 | |||
| 1 | 2014-08-09 Jan Djärv <jan.h.d@swipnet.se> | 6 | 2014-08-09 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 7 | ||
| 3 | * widgetprv.h (EmacsFramePart): Remove font. | 8 | * widgetprv.h (EmacsFramePart): Remove font. |
diff --git a/src/dosfns.c b/src/dosfns.c index e557dcba022..bdd296bf658 100644 --- a/src/dosfns.c +++ b/src/dosfns.c | |||
| @@ -370,13 +370,6 @@ init_dosfns (void) | |||
| 370 | Don't OR it with the previous value, so the value recorded at dump | 370 | Don't OR it with the previous value, so the value recorded at dump |
| 371 | time, possibly with `preserve-case' flags set, won't get through. */ | 371 | time, possibly with `preserve-case' flags set, won't get through. */ |
| 372 | __opendir_flags = __OPENDIR_FIND_HIDDEN; | 372 | __opendir_flags = __OPENDIR_FIND_HIDDEN; |
| 373 | |||
| 374 | #if __DJGPP_MINOR__ == 0 | ||
| 375 | /* Under LFN, preserve the case of files as recorded in the directory | ||
| 376 | (in DJGPP 2.01 and later this is automagically done by the library). */ | ||
| 377 | if (!NILP (Fmsdos_long_file_names ())) | ||
| 378 | __opendir_flags |= __OPENDIR_PRESERVE_CASE; | ||
| 379 | #endif /* __DJGPP_MINOR__ == 0 */ | ||
| 380 | } | 373 | } |
| 381 | 374 | ||
| 382 | #ifndef HAVE_X_WINDOWS | 375 | #ifndef HAVE_X_WINDOWS |
diff --git a/src/msdos.c b/src/msdos.c index ccca371583f..9fe078d0746 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -4016,103 +4016,6 @@ unsetenv (const char *name) | |||
| 4016 | #endif | 4016 | #endif |
| 4017 | 4017 | ||
| 4018 | 4018 | ||
| 4019 | #if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2 | ||
| 4020 | |||
| 4021 | /* Augment DJGPP library POSIX signal functions. This is needed | ||
| 4022 | as of DJGPP v2.01, but might be in the library in later releases. */ | ||
| 4023 | |||
| 4024 | #include <libc/bss.h> | ||
| 4025 | |||
| 4026 | /* A counter to know when to re-initialize the static sets. */ | ||
| 4027 | static int sigprocmask_count = -1; | ||
| 4028 | |||
| 4029 | /* Which signals are currently blocked (initially none). */ | ||
| 4030 | static sigset_t current_mask; | ||
| 4031 | |||
| 4032 | /* Which signals are pending (initially none). */ | ||
| 4033 | static sigset_t msdos_pending_signals; | ||
| 4034 | |||
| 4035 | /* Previous handlers to restore when the blocked signals are unblocked. */ | ||
| 4036 | typedef void (*sighandler_t)(int); | ||
| 4037 | static sighandler_t prev_handlers[320]; | ||
| 4038 | |||
| 4039 | /* A signal handler which just records that a signal occurred | ||
| 4040 | (it will be raised later, if and when the signal is unblocked). */ | ||
| 4041 | static void | ||
| 4042 | sig_suspender (int signo) | ||
| 4043 | { | ||
| 4044 | sigaddset (&msdos_pending_signals, signo); | ||
| 4045 | } | ||
| 4046 | |||
| 4047 | int | ||
| 4048 | sigprocmask (int how, const sigset_t *new_set, sigset_t *old_set) | ||
| 4049 | { | ||
| 4050 | int signo; | ||
| 4051 | sigset_t new_mask; | ||
| 4052 | |||
| 4053 | /* If called for the first time, initialize. */ | ||
| 4054 | if (sigprocmask_count != __bss_count) | ||
| 4055 | { | ||
| 4056 | sigprocmask_count = __bss_count; | ||
| 4057 | sigemptyset (&msdos_pending_signals); | ||
| 4058 | sigemptyset (¤t_mask); | ||
| 4059 | for (signo = 0; signo < 320; signo++) | ||
| 4060 | prev_handlers[signo] = SIG_ERR; | ||
| 4061 | } | ||
| 4062 | |||
| 4063 | if (old_set) | ||
| 4064 | *old_set = current_mask; | ||
| 4065 | |||
| 4066 | if (new_set == 0) | ||
| 4067 | return 0; | ||
| 4068 | |||
| 4069 | if (how != SIG_BLOCK && how != SIG_UNBLOCK && how != SIG_SETMASK) | ||
| 4070 | { | ||
| 4071 | errno = EINVAL; | ||
| 4072 | return -1; | ||
| 4073 | } | ||
| 4074 | |||
| 4075 | sigemptyset (&new_mask); | ||
| 4076 | |||
| 4077 | /* DJGPP supports upto 320 signals. */ | ||
| 4078 | for (signo = 0; signo < 320; signo++) | ||
| 4079 | { | ||
| 4080 | if (sigismember (¤t_mask, signo)) | ||
| 4081 | sigaddset (&new_mask, signo); | ||
| 4082 | else if (sigismember (new_set, signo) && how != SIG_UNBLOCK) | ||
| 4083 | { | ||
| 4084 | sigaddset (&new_mask, signo); | ||
| 4085 | |||
| 4086 | /* SIGKILL is silently ignored, as on other platforms. */ | ||
| 4087 | if (signo != SIGKILL && prev_handlers[signo] == SIG_ERR) | ||
| 4088 | prev_handlers[signo] = signal (signo, sig_suspender); | ||
| 4089 | } | ||
| 4090 | if (( how == SIG_UNBLOCK | ||
| 4091 | && sigismember (&new_mask, signo) | ||
| 4092 | && sigismember (new_set, signo)) | ||
| 4093 | || (how == SIG_SETMASK | ||
| 4094 | && sigismember (&new_mask, signo) | ||
| 4095 | && !sigismember (new_set, signo))) | ||
| 4096 | { | ||
| 4097 | sigdelset (&new_mask, signo); | ||
| 4098 | if (prev_handlers[signo] != SIG_ERR) | ||
| 4099 | { | ||
| 4100 | signal (signo, prev_handlers[signo]); | ||
| 4101 | prev_handlers[signo] = SIG_ERR; | ||
| 4102 | } | ||
| 4103 | if (sigismember (&msdos_pending_signals, signo)) | ||
| 4104 | { | ||
| 4105 | sigdelset (&msdos_pending_signals, signo); | ||
| 4106 | raise (signo); | ||
| 4107 | } | ||
| 4108 | } | ||
| 4109 | } | ||
| 4110 | current_mask = new_mask; | ||
| 4111 | return 0; | ||
| 4112 | } | ||
| 4113 | |||
| 4114 | #endif /* not __DJGPP_MINOR__ < 2 */ | ||
| 4115 | |||
| 4116 | #ifndef HAVE_SELECT | 4019 | #ifndef HAVE_SELECT |
| 4117 | #include "sysselect.h" | 4020 | #include "sysselect.h" |
| 4118 | 4021 | ||
| @@ -4259,15 +4162,7 @@ msdos_abort (void) | |||
| 4259 | dos_ttcooked (); | 4162 | dos_ttcooked (); |
| 4260 | ScreenSetCursor (10, 0); | 4163 | ScreenSetCursor (10, 0); |
| 4261 | cputs ("\r\n\nEmacs aborted!\r\n"); | 4164 | cputs ("\r\n\nEmacs aborted!\r\n"); |
| 4262 | #if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2 | ||
| 4263 | if (screen_virtual_segment) | ||
| 4264 | dosv_refresh_virtual_screen (2 * 10 * screen_size_X, 4 * screen_size_X); | ||
| 4265 | /* Generate traceback, so we could tell whodunit. */ | ||
| 4266 | signal (SIGINT, SIG_DFL); | ||
| 4267 | __asm__ __volatile__ ("movb $0x1b,%al;call ___djgpp_hw_exception"); | ||
| 4268 | #else /* __DJGPP_MINOR__ >= 2 */ | ||
| 4269 | raise (SIGABRT); | 4165 | raise (SIGABRT); |
| 4270 | #endif /* __DJGPP_MINOR__ >= 2 */ | ||
| 4271 | exit (2); | 4166 | exit (2); |
| 4272 | } | 4167 | } |
| 4273 | 4168 | ||