www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/08/23:15:27

Xref: news2.mv.net comp.os.msdos.djgpp:6986
From: frazer AT rtp DOT ericsson DOT se
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Q: Compiling Emacs 19.32
Date: Thu, 08 Aug 1996 15:43:35 GMT
Organization: Ericsson Inc.
Lines: 138
Message-ID: <4ucn83$dei@cnn.exu.ericsson.se>
References: <4ucac5$f6l AT newsfeed DOT cs DOT auc DOT dk>
NNTP-Posting-Host: pc340.rtp.ericsson.se
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019