Mail Archives: djgpp/1996/08/08/23:15:27
ff AT kom DOT auc DOT dk (Frank Frederiksen) wrote:
>Hi there,
>I have just downloaded emacs 19.32 via ftp. After I unpacked it, I
>read in the install that:
>>The current version of djgpp 2.0 (as of August 1996) has two bugs that
>>affect Emacs. We've included corrected versions of two files from
>>djgpp in the msdos subdirectory: is-exec.c and sigaction.c. To work
>>around the bugs, compile these files and link them into temacs. The
>>next version of djgpp should have these bugs fixed.
>However, I have two problems:
>1) The two .c files are not in the msdos directory as stated, and
>2) how do I specifically compile them and link them into temacs.
>Or should I rather wait for a new release of djgpp?
This sounds suspiciously similar to a problem I had a short time ago
while compiling emacs 19.31. I could not execute any shell/compile/
grep commands from within emacs. The fix was to patch the is-exec.c
and sigaction.c files in the DJGPP sources, recompile the DJGPP
libraries, then recompile emacs. Linking the *.c files into temacs
sounds strange to me, but maybe that's another way around this
problem. If you want to try what I did, get the library sources for
DJGPP from http://www.delorie.com/djgpp/ (and the patch utility),
apply the patch included below, and compile away.
Good Luck,
Scott
*** posix/sys/stat/is_exec.c~0 Sun Nov 12 23:22:48 1995
--- posix/sys/stat/is_exec.c Sat Apr 6 13:09:48 1996
***************
*** 18,23 ****
--- 18,24 ----
#include <libc/stubs.h>
#include <stdio.h>
#include <string.h>
+ #include <ctype.h>
#include <errno.h>
#include <dpmi.h>
#include <go32.h>
***************
*** 182,192 ****
&& strlen(extension) <= ((extension[0]=='.') ? 4 : 3))
{
/* Search the list of extensions in executables[]. */
! char tmp_buf[6];
! tmp_buf[0] = '|';
! strcpy(tmp_buf+1, *extension == '.' ? extension + 1 :
extension);
! strcat(tmp_buf, "|");
if (strstr(non_executables, tmp_buf))
return 0;
else if (strstr(executables, tmp_buf))
--- 183,197 ----
&& strlen(extension) <= ((extension[0]=='.') ? 4 : 3))
{
/* Search the list of extensions in executables[]. */
! char tmp_buf[6], *tp = tmp_buf;
! *tp++ = '|';
! if (*extension == '.')
! extension++;
! while (*extension)
! *tp++ = toupper (*extension++);
! *tp++ = '|';
! *tp = '\0';
if (strstr(non_executables, tmp_buf))
return 0;
else if (strstr(executables, tmp_buf))
*** posix/signal/sigactio.c~0 Sun Apr 2 01:11:10 1995
--- posix/signal/sigactio.c Thu Apr 4 19:50:18 1996
***************
*** 1,19 ****
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <signal.h>
int
sigaction(int _sig, const struct sigaction *_act, struct sigaction
*_oact)
{
if (_oact)
{
/* FIXME */
! _oact->sa_handler = SIG_DFL;
! sigemptyset(&_oact->sa_mask);
_oact->sa_flags = 0;
}
if (_act)
{
! signal(_sig, _act->sa_handler);
}
! return 0;
}
--- 1,35 ----
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <signal.h>
+ #include <errno.h>
int
sigaction(int _sig, const struct sigaction *_act, struct sigaction
*_oact)
{
+ int retval = 0;
+
if (_oact)
{
+ void (*installed_sig)(int) = signal (_sig, SIG_IGN);
+
/* FIXME */
! if (installed_sig == SIG_ERR)
! {
! retval = -1;
! errno = EINVAL;
! }
! else
! signal (_sig, installed_sig);
! _oact->sa_handler = installed_sig;
! retval = sigemptyset(&_oact->sa_mask);
_oact->sa_flags = 0;
}
if (_act)
{
! if (signal(_sig, _act->sa_handler) == SIG_ERR)
! {
! retval = -1;
! errno = EINVAL;
! }
}
! return retval;
}
- Raw text -