This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GNU emacs on cygwin


Kevin Wright asked for the patches I made, again it didn't finish building correctly.
It did produce an executable that would run (although some keys like backspace didn't
seem to work correctly).  Please don't flame if this doesn't work; I only worked on
it during my lunch break ;).  Latest cygwin (via setup) w/ only changes to emacs.

Good Luck,

Bill


to emacs-20.7/src
*** Makefile.~1~	Tue Jan 23 10:45:32 2001
--- Makefile	Tue Jan 23 12:54:10 2001
***************
*** 80,86 ****
  ${libsrc}make-docfile:
  	cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile
  temacs:   $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj}     prefix-args
! 	$(LD) `./prefix-args -Xlinker  ${STARTFLAGS} ${ALL_LDFLAGS} `      -o temacs ${STARTFILES} ${obj} ${otherobj}          ${LIBES}
  prefix-args: prefix-args.c $(config_h)
  	$(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args
  CPP = $(CC) -E
--- 80,86 ----
  ${libsrc}make-docfile:
  	cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile
  temacs:   $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj}     prefix-args
! 	$(LD) `./prefix-args -Xlinker  ${STARTFLAGS} ${ALL_LDFLAGS} `      -o temacs ${STARTFILES} ${obj} ${otherobj}          ${LIBES} -lkernel32
  prefix-args: prefix-args.c $(config_h)
  	$(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args
  CPP = $(CC) -E


*** dispnew.c.~1~	Sun May 31 19:11:48 1998
--- dispnew.c	Tue Jan 23 12:20:12 2001
***************
*** 1290,1296 ****
  		 Also flush out if likely to have more than 1k buffered
  		 otherwise.   I'm told that some telnet connections get
  		 really screwed by more than 1k output at once.  */
! 	      int outq = PENDING_OUTPUT_COUNT (stdout);
  	      if (outq > 900
  		  || (outq > 20 && ((i - 1) % preempt_count == 0)))
  		{
--- 1290,1297 ----
  		 Also flush out if likely to have more than 1k buffered
  		 otherwise.   I'm told that some telnet connections get
  		 really screwed by more than 1k output at once.  */
! //	      int outq = PENDING_OUTPUT_COUNT (stdout);
! 	      int outq = (stdout)->_w;
  	      if (outq > 900
  		  || (outq > 20 && ((i - 1) % preempt_count == 0)))
  		{

*** process.c.~1~	Tue May 23 11:10:16 2000
--- process.c	Tue Jan 23 12:32:34 2001
***************
*** 303,315 ****
  status_convert (w)
       WAITTYPE w;
  {
!   if (WIFSTOPPED (w))
!     return Fcons (Qstop, Fcons (make_number (WSTOPSIG (w)), Qnil));
!   else if (WIFEXITED (w))
      return Fcons (Qexit, Fcons (make_number (WRETCODE (w)),
  				WCOREDUMP (w) ? Qt : Qnil));
!   else if (WIFSIGNALED (w))
!     return Fcons (Qsignal, Fcons (make_number (WTERMSIG (w)),
  				  WCOREDUMP (w) ? Qt : Qnil));
    else
      return Qrun;
--- 303,315 ----
  status_convert (w)
       WAITTYPE w;
  {
!   if (WIFSTOPPED (w.w_status))
!     return Fcons (Qstop, Fcons (make_number (WSTOPSIG (w.w_status)), Qnil));
!   else if (WIFEXITED (w.w_status))
      return Fcons (Qexit, Fcons (make_number (WRETCODE (w)),
  				WCOREDUMP (w) ? Qt : Qnil));
!   else if (WIFSIGNALED (w.w_status))
!     return Fcons (Qsignal, Fcons (make_number (WTERMSIG (w.w_status)),
  				  WCOREDUMP (w) ? Qt : Qnil));
    else
      return Qrun;
***************
*** 362,368 ****
  	{
  #ifndef VMS
  	  /* Cast to suppress warning if the table has const char *.  */
! 	  signame = (char *) sys_siglist[code];
  #else
  	  signame = sys_errlist[code];
  #endif
--- 362,369 ----
  	{
  #ifndef VMS
  	  /* Cast to suppress warning if the table has const char *.  */
! //	  signame = (char *) sys_siglist[code];
! 	  signame = (char *) strsignal(code);
  #else
  	  signame = sys_errlist[code];
  #endif
***************
*** 4069,4075 ****
        do 
  	{
  	  errno = 0;
! 	  pid = wait3 (&w, WNOHANG | WUNTRACED, 0);
  	}
        while (pid <= 0 && errno == EINTR);
  
--- 4070,4076 ----
        do 
  	{
  	  errno = 0;
! 	  pid = wait3 (&w.w_status, WNOHANG | WUNTRACED, 0);
  	}
        while (pid <= 0 && errno == EINTR);
  
***************
*** 4129,4135 ****
  	  XSETINT (p->raw_status_high, u.i >> 16);
  	  
  	  /* If process has terminated, stop waiting for its output.  */
! 	  if ((WIFSIGNALED (w) || WIFEXITED (w))
  	      && XINT (p->infd) >= 0)
  	    clear_desc_flag = 1;
  
--- 4130,4136 ----
  	  XSETINT (p->raw_status_high, u.i >> 16);
  	  
  	  /* If process has terminated, stop waiting for its output.  */
! 	  if ((WIFSIGNALED (w.w_status) || WIFEXITED (w.w_status))
  	      && XINT (p->infd) >= 0)
  	    clear_desc_flag = 1;
  
***************
*** 4153,4170 ****
  	  synch_process_alive = 0;
  
  	  /* Report the status of the synchronous process.  */
! 	  if (WIFEXITED (w))
  	    synch_process_retcode = WRETCODE (w);
! 	  else if (WIFSIGNALED (w))
  	    {
! 	      int code = WTERMSIG (w);
  	      char *signame = 0;
  
  	      if (code < NSIG)
  		{
  #ifndef VMS
  		  /* Suppress warning if the table has const char *.  */
! 		  signame = (char *) sys_siglist[code];
  #else
  		  signame = sys_errlist[code];
  #endif
--- 4154,4172 ----
  	  synch_process_alive = 0;
  
  	  /* Report the status of the synchronous process.  */
! 	  if (WIFEXITED (w.w_status))
  	    synch_process_retcode = WRETCODE (w);
! 	  else if (WIFSIGNALED (w.w_status))
  	    {
! 	      int code = WTERMSIG (w.w_status);
  	      char *signame = 0;
  
  	      if (code < NSIG)
  		{
  #ifndef VMS
  		  /* Suppress warning if the table has const char *.  */
! //		  signame = (char *) sys_siglist[code];
!             signame = (char *) strsignal(code);
  #else
  		  signame = sys_errlist[code];
  #endif

*** mem-limits.h.~1~	Sun Jan 17 10:13:26 1999
--- mem-limits.h	Tue Jan 23 12:44:48 2001
***************
*** 123,129 ****
  
    /* Use the ulimit call, if we seem to have it.  */
  #if !defined (ULIMIT_BREAK_VALUE) || defined (LINUX)
!   lim_data = ulimit (3, 0);
  #endif
  
    /* If that didn't work, just use the macro's value.  */
--- 123,129 ----
  
    /* Use the ulimit call, if we seem to have it.  */
  #if !defined (ULIMIT_BREAK_VALUE) || defined (LINUX)
! //  lim_data = ulimit (3, 0);
  #endif
  
    /* If that didn't work, just use the macro's value.  */

*** emacs.c.~1~	Wed May 24 05:58:54 2000
--- emacs.c	Tue Jan 23 12:46:00 2001
***************
*** 475,481 ****
  #ifndef LINUX
  char * __CTOR_LIST__[2] = { (char *) (-1), 0 };
  #endif
! char * __DTOR_LIST__[2] = { (char *) (-1), 0 };
  #endif /* GCC_CTORS_IN_LIBC */
  void __main ()
  {}
--- 475,481 ----
  #ifndef LINUX
  char * __CTOR_LIST__[2] = { (char *) (-1), 0 };
  #endif
! //char * __DTOR_LIST__[2] = { (char *) (-1), 0 };
  #endif /* GCC_CTORS_IN_LIBC */
  void __main ()
  {}

*** sysdep.c.~1~	Wed May 24 05:59:14 2000
--- sysdep.c	Tue Jan 23 12:50:00 2001
***************
*** 2216,2223 ****
  #ifdef TEXT_END
    return ((char *) TEXT_END);
  #else
!   extern int etext;
!   return ((char *) &etext);
  #endif
  }
   
--- 2216,2224 ----
  #ifdef TEXT_END
    return ((char *) TEXT_END);
  #else
! //  extern int etext;
! //  return ((char *) &etext);
!   return 0;
  #endif
  }
   
***************
*** 2232,2239 ****
  #ifdef DATA_END
    return ((char *) DATA_END);
  #else
!   extern int edata;
!   return ((char *) &edata);
  #endif
  }
  
--- 2233,2241 ----
  #ifdef DATA_END
    return ((char *) DATA_END);
  #else
! //  extern int edata;
! //  return ((char *) &edata);
!   return 0;
  #endif
  }

********************************************************************************
*
*  WARNING WARNING WARNING WARNING WARNING WARNING WARNING
*
* This patch isn't even remotely correct; I just commented out stuff until it
* would compile.
*
********************************************************************************

*** unexec.c.~1~	Mon Jun 29 14:53:56 1998
--- unexec.c	Tue Jan 23 12:39:00 2001
***************
*** 303,309 ****
       ((x).fmagic)!=FMAGIC && ((x).fmagic)!=IMAGIC)
  #define NEWMAGIC FMAGIC
  #else /* IRIS or IBMAIX or not USG */
! static EXEC_HDR_TYPE hdr, ohdr;
  #define NEWMAGIC ZMAGIC
  #endif /* IRIS or IBMAIX not USG */
  #endif /* not HPUX */
--- 303,309 ----
       ((x).fmagic)!=FMAGIC && ((x).fmagic)!=IMAGIC)
  #define NEWMAGIC FMAGIC
  #else /* IRIS or IBMAIX or not USG */
! //static EXEC_HDR_TYPE hdr, ohdr;
  #define NEWMAGIC ZMAGIC
  #endif /* IRIS or IBMAIX not USG */
  #endif /* not HPUX */
***************
*** 737,752 ****
  	  ERROR1("%s doesn't have legal coff magic number\n", a_name);
  	}
  #endif
!       if (read (a_out, &ohdr, sizeof hdr) != sizeof hdr)
! 	{
! 	  PERROR (a_name);
! 	}
! 
!       if (N_BADMAG (ohdr))
! 	{
! 	  ERROR1 ("invalid magic number in %s", a_name);
! 	}
!       hdr = ohdr;
      }
    else
      {
--- 737,752 ----
  	  ERROR1("%s doesn't have legal coff magic number\n", a_name);
  	}
  #endif
! //      if (read (a_out, &ohdr, sizeof hdr) != sizeof hdr)
! //	{
! //	  PERROR (a_name);
! //	}
! 
! //      if (N_BADMAG (ohdr))
! //	{
! //	  ERROR1 ("invalid magic number in %s", a_name);
! //	}
! //      hdr = ohdr;
      }
    else
      {
***************
*** 759,765 ****
  #ifdef MSDOS	/* Demacs 1.1.1 91/10/16 HIRANO Satoshi */
        bzero ((void *)&hdr, sizeof hdr);
  #else
!       bzero (&hdr, sizeof hdr);
  #endif
  #endif
      }
--- 759,765 ----
  #ifdef MSDOS	/* Demacs 1.1.1 91/10/16 HIRANO Satoshi */
        bzero ((void *)&hdr, sizeof hdr);
  #else
! //      bzero (&hdr, sizeof hdr);
  #endif
  #endif
      }
***************
*** 769,786 ****
  
    /* Machine-dependent fixup for header, or maybe for unexec_text_start */
  #ifdef ADJUST_EXEC_HEADER
!   ADJUST_EXEC_HEADER;
  #endif /* ADJUST_EXEC_HEADER */
  
!   hdr.a_trsize = 0;
!   hdr.a_drsize = 0;
!   if (entry_address != 0)
!     hdr.a_entry = entry_address;
  
!   hdr.a_bss = bss_end - bss_start;
!   hdr.a_data = bss_start - data_start;
  #ifdef NO_REMAP
!   hdr.a_text = ohdr.a_text;
  #else /* not NO_REMAP */
    hdr.a_text = data_start - unexec_text_start;
  
--- 769,786 ----
  
    /* Machine-dependent fixup for header, or maybe for unexec_text_start */
  #ifdef ADJUST_EXEC_HEADER
! //  ADJUST_EXEC_HEADER;
  #endif /* ADJUST_EXEC_HEADER */
  
! //  hdr.a_trsize = 0;
! //  hdr.a_drsize = 0;
! //  if (entry_address != 0)
! //    hdr.a_entry = entry_address;
  
! //  hdr.a_bss = bss_end - bss_start;
! //  hdr.a_data = bss_start - data_start;
  #ifdef NO_REMAP
! //  hdr.a_text = ohdr.a_text;
  #else /* not NO_REMAP */
    hdr.a_text = data_start - unexec_text_start;
  
***************
*** 816,825 ****
      }
  #endif /* COFF_ENCAPSULATE */
  
!   if (write (new, &hdr, sizeof hdr) != sizeof hdr)
!     {
!       PERROR (new_name);
!     }
  
  #if 0 /* This #ifndef caused a bug on Linux when using QMAGIC.  */
    /* This adjustment was done above only #ifndef NO_REMAP,
--- 816,825 ----
      }
  #endif /* COFF_ENCAPSULATE */
  
! //  if (write (new, &hdr, sizeof hdr) != sizeof hdr)
! //    {
! //      PERROR (new_name);
! //    }
  
  #if 0 /* This #ifndef caused a bug on Linux when using QMAGIC.  */
    /* This adjustment was done above only #ifndef NO_REMAP,
***************
*** 827,833 ****
    /* #ifndef NO_REMAP  */
  #endif
  #ifdef A_TEXT_OFFSET
!   hdr.a_text -= A_TEXT_OFFSET (ohdr);
  #endif
  
    return 0;
--- 827,833 ----
    /* #ifndef NO_REMAP  */
  #endif
  #ifdef A_TEXT_OFFSET
! //  hdr.a_text -= A_TEXT_OFFSET (ohdr);
  #endif
  
    return 0;
***************
*** 956,962 ****
     the extra A_TEXT_OFFSET bytes, only the actual bytes of code.  */
  
  #ifdef A_TEXT_SEEK
!   lseek (new, (long) A_TEXT_SEEK (hdr), 0);
  #else
    lseek (new, (long) N_TXTOFF (hdr), 0);
  #endif /* no A_TEXT_SEEK */
--- 956,962 ----
     the extra A_TEXT_OFFSET bytes, only the actual bytes of code.  */
  
  #ifdef A_TEXT_SEEK
! //  lseek (new, (long) A_TEXT_SEEK (hdr), 0);
  #else
    lseek (new, (long) N_TXTOFF (hdr), 0);
  #endif /* no A_TEXT_SEEK */
***************
*** 1044,1055 ****
  
  #else /* !RISCiX */
    ptr = (char *) unexec_text_start;
!   end = ptr + hdr.a_text;
    write_segment (new, ptr, end);
  #endif /* RISCiX */
  
    ptr = (char *) unexec_data_start;
!   end = ptr + hdr.a_data;
  /*  This lseek is certainly incorrect when A_TEXT_OFFSET
      and I believe it is a no-op otherwise.
      Let's see if its absence ever fails.  */
--- 1044,1055 ----
  
  #else /* !RISCiX */
    ptr = (char *) unexec_text_start;
! //  end = ptr + hdr.a_text;
    write_segment (new, ptr, end);
  #endif /* RISCiX */
  
    ptr = (char *) unexec_data_start;
! //  end = ptr + hdr.a_data;
  /*  This lseek is certainly incorrect when A_TEXT_OFFSET
      and I believe it is a no-op otherwise.
      Let's see if its absence ever fails.  */
***************
*** 1142,1148 ****
    else
      lseek (a_out, coff_offset + SYMS_START, 0);	/* Position a.out to symtab. */
  #else  /* not COFF */
!   lseek (a_out, SYMS_START, 0);	/* Position a.out to symtab. */
  #endif /* not COFF */
  
    while ((n = read (a_out, page, sizeof page)) > 0)
--- 1142,1148 ----
    else
      lseek (a_out, coff_offset + SYMS_START, 0);	/* Position a.out to symtab. */
  #else  /* not COFF */
! //  lseek (a_out, SYMS_START, 0);	/* Position a.out to symtab. */
  #endif /* not COFF */
  
    while ((n = read (a_out, page, sizeof page)) > 0)

in emacs-20/lib-src

*** movemail.c.~1~	Sun May  2 01:25:16 1999
--- movemail.c	Tue Jan 23 11:19:06 2001
***************
*** 430,436 ****
  #ifdef WINDOWSNT
  	  status = locking (indesc, LK_RLCK, -1L);
  #else
! 	  status = flock (indesc, LOCK_EX);
  #endif
  #endif
  #endif /* not MAIL_USE_LOCKF */
--- 430,436 ----
  #ifdef WINDOWSNT
  	  status = locking (indesc, LK_RLCK, -1L);
  #else
! //	  status = flock (indesc, LOCK_EX);
  #endif
  #endif
  #endif /* not MAIL_USE_LOCKF */
***************
*** 542,549 ****
        exit (0);
      }
  
!   wait (&status);
!   if (!WIFEXITED (status))
      exit (1);
    else if (WRETCODE (status) != 0)
      exit (WRETCODE (status));
--- 542,549 ----
        exit (0);
      }
  
!   wait ((int *) &status);
!   if (!WIFEXITED (status.w_status))
      exit (1);
    else if (WRETCODE (status) != 0)
      exit (WRETCODE (status));


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]