* [PATCHES] 21.3.50 for Cygwin: patch 7
@ 2002-12-10 21:48 Joe Buehler
2002-12-11 0:01 ` Kim F. Storm
0 siblings, 1 reply; 22+ messages in thread
From: Joe Buehler @ 2002-12-10 21:48 UTC (permalink / raw)
This patch set adds unexec() capability to the Cygwin port, and changes
a couple documentation files, as requested on this list.
Many thanks to Andy Piper, who did the coding for Cygwin XEmacs, which
I have just adapted here for GNU emacs. The XEmacs unexec() solution
for Cygwin is pretty elegant. It uses an array in the data segment
for malloc() before unexec(), thereby avoiding all sorts of
heap startup nastiness in a dumped emacs. Dumping consists of
rewriting the .exe file with the data segment filled in,
and the data/bss boundary moved up to truncate bss down to a bare
minimum.
Note that these patches are mostly cvs-generated diffs, but there are
a couple new files at the end that are in raw diff format.
Joe Buehler
Index: lisp/ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.4583
diff -u -r1.4583 ChangeLog
--- lisp/ChangeLog 4 Dec 2002 17:20:06 -0000 1.4583
+++ lisp/ChangeLog 10 Dec 2002 21:11:53 -0000
@@ -1,3 +1,7 @@
+2002-12-10 Joe Buehler <jhpb@draco.hekimian.com>
+
+ * loadup.el: Do not create versioned copy of dumped emacs under Cygwin.
+
2002-12-04 Stefan Monnier <monnier@cs.yale.edu>
* gdb-ui.el (gdb-inferior-io-mode-map): Remove (unused).
Index: lispref/ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lispref/ChangeLog,v
retrieving revision 1.55
diff -u -r1.55 ChangeLog
--- lispref/ChangeLog 4 Dec 2002 04:00:48 -0000 1.55
+++ lispref/ChangeLog 10 Dec 2002 21:11:53 -0000
@@ -1,3 +1,7 @@
+2002-12-10 Joe Buehler <jhpb@draco.hekimian.com>
+
+ * os.texi (System Environment): Added cygwin system-type.
+
2002-12-04 Markus Rost <rost@math.ohio-state.edu>
* variables.texi (File Local Variables): Fix typo.
Index: src/ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/src/ChangeLog,v
retrieving revision 1.2979
diff -u -r1.2979 ChangeLog
--- src/ChangeLog 4 Dec 2002 11:44:42 -0000 1.2979
+++ src/ChangeLog 10 Dec 2002 21:11:57 -0000
@@ -1,3 +1,20 @@
+2002-12-10 Joe Buehler <jhpb@draco.hekimian.com>
+
+ * unexcw.c: Copied file in from XEmacs 21.5.9 for Cygwin unexec().
+
+ * sheap.c: Copied file in from XEmacs 21.5.9 for Cygwin unexec().
+
+ * s/cygwin.h: Use unexcw.c for unexec().
+
+ * Makefile.in: Added sheap.c for Cygwin, moved allocators inside dumped
+ portion of address space.
+
+ * puresize.h: Check pure[] array bounds when deciding whether PURE_P().
+
+ * lastfile.c: Pad my_endbss[] to pagesize under Cygwin, so dumped bss meets minimum size.
+
+ * gmalloc.c (__default_morecore): Use more_static_core() under Cygwin before unexec().
+
2002-12-04 Richard M. Stallman <rms@gnu.org>
* sysdep.c (fcntl.h): Test only HAVE_FCNTL_H.
Index: lispref/os.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/lispref/os.texi,v
retrieving revision 1.50
diff -u -r1.50 os.texi
--- lispref/os.texi 14 Oct 2002 01:34:48 -0000 1.50
+++ lispref/os.texi 10 Dec 2002 20:57:24 -0000
@@ -613,6 +613,9 @@
@item berkeley-unix
Berkeley BSD.
+@item cygwin
+Cygwin.
+
@item dgux
Data General DGUX operating system.
Index: etc/NEWS
===================================================================
RCS file: /cvsroot/emacs/emacs/etc/NEWS,v
retrieving revision 1.756
diff -u -r1.756 NEWS
--- etc/NEWS 4 Dec 2002 11:05:53 -0000 1.756
+++ etc/NEWS 10 Dec 2002 20:56:41 -0000
@@ -55,6 +55,8 @@
item was added to the menu bar that makes it easy accessible
(Help->More Manuals->Introduction to Emacs Lisp).
+** Support for Cygwin was added.
+
---
** Support for AIX 5.1 was added.
Index: lisp/loadup.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/loadup.el,v
retrieving revision 1.126
diff -u -r1.126 loadup.el
--- lisp/loadup.el 30 Sep 2002 06:37:42 -0000 1.126
+++ lisp/loadup.el 10 Dec 2002 20:57:11 -0000
@@ -323,7 +323,7 @@
(dump-emacs "emacs" "temacs")
(message "%d pure bytes used" pure-bytes-used)
;; Recompute NAME now, so that it isn't set when we dump.
- (if (not (memq system-type '(ms-dos windows-nt)))
+ (if (not (memq system-type '(ms-dos windows-nt cygwin)))
(let ((name (concat "emacs-" emacs-version)))
(while (string-match "[^-+_.a-zA-Z0-9]+" name)
(setq name (concat (downcase (substring name 0 (match-beginning 0)))
Index: src/gmalloc.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/gmalloc.c,v
retrieving revision 1.12
diff -u -r1.12 gmalloc.c
--- src/gmalloc.c 3 Nov 2001 15:08:36 -0000 1.12
+++ src/gmalloc.c 10 Dec 2002 20:57:31 -0000
@@ -352,6 +352,10 @@
#include <errno.h>
/* How to really get more memory. */
+#if defined(CYGWIN)
+extern __ptr_t more_static_core PP ((ptrdiff_t __size));
+extern int static_heap_dumped;
+#endif
__ptr_t (*__morecore) PP ((ptrdiff_t __size)) = __default_morecore;
/* Debugging hook for `malloc'. */
@@ -1572,7 +1576,13 @@
__default_morecore (increment)
__malloc_ptrdiff_t increment;
{
- __ptr_t result = (__ptr_t) __sbrk (increment);
+ __ptr_t result;
+#if defined(CYGWIN)
+ if (!static_heap_dumped) {
+ return more_static_core(increment);
+ }
+#endif
+ result = (__ptr_t) __sbrk (increment);
if (result == (__ptr_t) -1)
return NULL;
return result;
Index: src/lastfile.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/lastfile.c,v
retrieving revision 1.7
diff -u -r1.7 lastfile.c
--- src/lastfile.c 17 Jan 1999 19:16:08 -0000 1.7
+++ src/lastfile.c 10 Dec 2002 20:57:36 -0000
@@ -40,10 +40,16 @@
char my_edata[] = "End of Emacs initialized data";
-#ifdef WINDOWSNT
+#if defined(WINDOWSNT) || defined(CYGWIN)
/* Help unexec locate the end of the .bss area used by Emacs (which
isn't always a separate section in NT executables). */
+#if defined(CYGWIN)
+/* Ensure there is enough slack in the .bss to pad with. */
+#define BSS_PADDING 0x1000
+char my_endbss[BSS_PADDING];
+#else
char my_endbss[1];
+#endif
/* The Alpha MSVC linker globally segregates all static and public bss
data, so we must take both into account to determine the true extent
Index: src/puresize.h
===================================================================
RCS file: /cvsroot/emacs/emacs/src/puresize.h,v
retrieving revision 1.66
diff -u -r1.66 puresize.h
--- src/puresize.h 9 Aug 2002 05:08:00 -0000 1.66
+++ src/puresize.h 10 Dec 2002 20:57:37 -0000
@@ -68,7 +68,7 @@
\f
/* Define PURE_P. */
-#ifdef VIRT_ADDR_VARIES
+#if defined(VIRT_ADDR_VARIES) || defined(CYGWIN)
/* For machines like APOLLO where text and data can go anywhere
in virtual memory. */
Index: src/Makefile.in
===================================================================
RCS file: /cvsroot/emacs/emacs/src/Makefile.in,v
retrieving revision 1.262
diff -u -r1.262 Makefile.in
--- src/Makefile.in 25 Nov 2002 19:08:14 -0000 1.262
+++ src/Makefile.in 10 Dec 2002 20:57:26 -0000
@@ -539,6 +539,10 @@
#endif
#endif
+#ifdef CYGWIN
+CYGWIN_OBJ = sheap.o
+#endif
+
#ifdef HAVE_CARBON
XMENU_OBJ =
MAC_OBJ = mac.o macterm.o macfns.o macmenu.o fontset.o
@@ -562,7 +566,7 @@
process.o callproc.o \
region-cache.o sound.o atimer.o \
doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \
- $(MSDOS_OBJ) $(MAC_OBJ)
+ $(MSDOS_OBJ) $(MAC_OBJ) $(CYGWIN_OBJ)
/* Object files used on some machine or other.
These go in the DOC file on all machines
@@ -599,8 +603,6 @@
rallocobj = ralloc.o
#endif
-mallocobj = $(gmallocobj) $(rallocobj) vm-limit.o
-
#endif /* SYSTEM_MALLOC */
@@ -619,7 +621,11 @@
/* define otherobj as list of object files that make-docfile
should not be told about. */
-otherobj= $(termcapobj) lastfile.o $(mallocobj) $(allocaobj) $(widgetobj) $(LIBOBJS)
+#ifdef CYGWIN
+otherobj= $(termcapobj) $(gmallocobj) $(rallocobj) lastfile.o vm-limit.o $(allocaobj) $(widgetobj) $(LIBOBJS)
+#else
+otherobj= $(termcapobj) lastfile.o $(gmallocobj) $(rallocobj) vm-limit.o $(allocaobj) $(widgetobj) $(LIBOBJS)
+#endif
#ifdef HAVE_MOUSE
#define MOUSE_SUPPORT ${lispsource}mouse.elc \
--- src/s/cygwin.h 2002-12-05 16:47:00.000000000 -0500
+++ src/s/cygwin.h 2002-12-09 19:47:26.000000000 -0500
@@ -118,7 +118,7 @@
/* -lutil comes from inetutils and has pty functions in it */
#define LIBS_SYSTEM -lutil
/* undumping is not implemented yet */
-#define CANNOT_DUMP 1
+#define UNEXEC unexcw.o
#define POSIX_SIGNALS 1
/* force the emacs image to start high in memory, so dll relocation
can put things in low memory without causing all sorts of grief for
--- src/sheap.c 2002-12-09 19:43:01.000000000 -0500
+++ src/sheap.c 2002-12-09 17:41:32.000000000 -0500
@@ -0,0 +1,156 @@
+/* Static Heap management routines, copied from XEmacs 21.5.9.
+ Copyright (C) 1994, 1998 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#include <config.h>
+#include <stdio.h>
+#include "lisp.h"
+
+#include <unistd.h>
+#define SHEAP_ADJUSTMENT 0 /* Xemacs build dynamically adjusts this... */
+
+#define STATIC_HEAP_BASE 0x800000
+#define STATIC_HEAP_SLOP 0xf0000
+#define STATIC_HEAP_SIZE \
+(STATIC_HEAP_BASE + SHEAP_ADJUSTMENT + STATIC_HEAP_SLOP)
+#define BLOCKSIZE (1<<12)
+#define ALLOC_UNIT (BLOCKSIZE-1)
+#define ALLOC_MASK ~((unsigned long)(ALLOC_UNIT))
+#define ALIGN_ALLOC(addr) ((((unsigned long)addr) + ALLOC_UNIT) & ALLOC_MASK)
+
+char static_heap_buffer[STATIC_HEAP_SIZE]={0};
+char* static_heap_base=static_heap_buffer;
+char* static_heap_ptr=static_heap_buffer;
+unsigned long static_heap_size=STATIC_HEAP_SIZE;
+int static_heap_initialized=0;
+int static_heap_dumped=0;
+
+void *more_static_core ( ptrdiff_t increment );
+void *more_static_core ( ptrdiff_t increment )
+{
+ int size = (int) increment;
+ void *result;
+
+ if (!static_heap_initialized)
+ {
+#if 0
+#ifdef VALMASK
+ if (((unsigned long) static_heap_base & ~VALMASK) != 0)
+ {
+ printf ("error: The heap was allocated in upper memory.\n");
+ exit (-1);
+ }
+#endif
+#endif
+ static_heap_base=(char*)ALIGN_ALLOC(static_heap_buffer);
+ static_heap_ptr=static_heap_base;
+ static_heap_size=STATIC_HEAP_SIZE -
+ (static_heap_base-static_heap_buffer);
+#ifdef CYGWIN
+ sbrk(BLOCKSIZE); /* force space for fork to work */
+#endif
+ static_heap_initialized=1;
+ }
+
+ result = static_heap_ptr;
+
+ /* we don't need to align - handled by gmalloc. */
+
+ if (size < 0)
+ {
+ if (static_heap_ptr + size < static_heap_base)
+ {
+ return 0;
+ }
+ }
+ else
+ {
+ if (static_heap_ptr + size >= static_heap_base + static_heap_size)
+ {
+ printf(
+
+"\nRequested %d bytes, static heap exhausted! base is %p, current ptr
+is %p. You have exhausted the static heap.
+
+If you are simply trying to compile, remove sheap-adjust.h
+and recompile from the top level. If this doesn't
+work then STATIC_HEAP_SLOP (defined in this file) is too small.
+
+If you want to run temacs, change SHEAP_ADJUSTMENT in sheap-adjust.h
+to 0 or a +ve number. Generally you should *not* try to run temacs
+with a static heap, you should dump first.\n", size,
+static_heap_base, static_heap_ptr);
+
+ exit(-1);
+ return 0;
+ }
+ }
+ static_heap_ptr += size;
+
+ return result;
+}
+
+static void
+sheap_adjust_h (long adjust)
+{
+ FILE *stream = fopen ("sheap-adjust.h", "w");
+
+ if (stream == NULL)
+ report_file_error ("Opening sheap adjustment file",
+ build_string ("sheap-adjust.h"));
+
+ fprintf (stream,
+ "/*\tDo not edit this file!\n"
+ "\tAutomatically generated by XEmacs */\n"
+ "# define SHEAP_ADJUSTMENT (%ld)\n", adjust);
+ fclose (stream);
+}
+
+void report_sheap_usage (int die_if_pure_storage_exceeded);
+void
+report_sheap_usage (int die_if_pure_storage_exceeded)
+{
+ int rc = 0;
+
+ int lost = STATIC_HEAP_SIZE
+ - (static_heap_ptr - static_heap_buffer);
+ char buf[200];
+ sprintf (buf, "Static heap usage: %ld of %ld, slop is %ld",
+ (long) (static_heap_ptr - static_heap_buffer),
+ (long) (STATIC_HEAP_SIZE),
+ (long) STATIC_HEAP_SLOP);
+
+ if (lost > STATIC_HEAP_SLOP) {
+ sprintf (buf + strlen (buf), " -- %ldk wasted", (long)(lost/1024));
+ if (die_if_pure_storage_exceeded) {
+ sheap_adjust_h(STATIC_HEAP_SLOP - lost);
+ sprintf (buf + strlen (buf), " -- reset to %ldk",
+ (long) (STATIC_HEAP_SIZE + STATIC_HEAP_SLOP - lost));
+ rc = -1;
+ }
+ message ("%s", buf);
+ }
+
+ if (rc < 0) {
+ unlink("SATISFIED");
+ fatal ("Static heap size adjusted, Don't Panic! I will restart the `make'");
+ }
+}
+
+
--- src/unexcw.c 2002-12-09 19:44:50.000000000 -0500
+++ src/unexcw.c 2002-12-09 17:17:34.000000000 -0500
@@ -0,0 +1,480 @@
+/* unexec for GNU Emacs on Cygwin, copied from XEmacs 21.5.9.
+ Copyright (C) 1994, 1998 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* This is a complete rewrite, some code snarfed from unexnt.c and
+ unexec.c, Andy Piper (andy@xemacs.org) 13-1-98 */
+
+#include <config.h>
+#include "lisp.h"
+#include "stdio.h"
+#include "fcntl.h"
+
+#define PERROR(arg) \
+do { \
+ perror (arg); \
+ exit (-1); \
+} while (0)
+
+#ifdef MINGW
+#include <../../include/a.out.h>
+#else
+#include <a.out.h>
+#endif
+
+#define ALLOC_UNIT 0xFFFF
+#define ALLOC_MASK ~((unsigned long) (ALLOC_UNIT))
+#define ALIGN_ALLOC(addr) \
+((((unsigned long) addr) + ALLOC_UNIT) & ALLOC_MASK)
+/* Note that all sections must be aligned on a 0x1000 boundary so
+ this is the minimum size that our dummy bss can be. */
+#define BSS_PAD_SIZE 0x1000
+
+/* To prevent zero-initialized variables from being placed into the bss
+ section, use non-zero values to represent an uninitialized state. */
+#define UNINIT_PTR ((void *) 0xF0A0F0A0)
+#define UNINIT_LONG (0xF0A0F0A0L)
+
+static void get_section_info (int a_out, char* a_name);
+static void copy_executable_and_dump_data_section (int a_out, int a_new);
+static void dup_file_area (int a_out, int a_new, long size);
+#if 0
+static void write_int_to_bss (int a_out, int a_new, void* va, void* newval);
+#endif
+
+/* Cached info about the .data section in the executable. */
+void *data_start_va = UNINIT_PTR;
+long data_size = UNINIT_LONG;
+
+/* Cached info about the .bss section in the executable. */
+void *bss_start = UNINIT_PTR;
+long bss_size = UNINIT_LONG;
+int sections_reversed = 0;
+FILHDR f_hdr;
+PEAOUTHDR f_ohdr;
+SCNHDR f_data, f_bss, f_text, f_nextdata;
+
+#define CHECK_AOUT_POS(a) \
+do { \
+ if (lseek (a_out, 0, SEEK_CUR) != a) \
+ { \
+ printf ("we are at %lx, should be at %lx\n", \
+ lseek (a_out, 0, SEEK_CUR), a); \
+ exit (-1); \
+ } \
+} while (0)
+
+/* Dump out .data and .bss sections into a new executable. */
+int
+unexec (char *out_name, char *in_name, unsigned start_data,
+ unsigned d1, unsigned d2)
+{
+ /* ugly nt hack - should be in lisp */
+ int a_new, a_out = -1;
+ char new_name[FILENAME_MAX], a_name[FILENAME_MAX];
+ char *ptr;
+
+ /* Make sure that the input and output filenames have the
+ ".exe" extension...patch them up if they don't. */
+ strcpy (a_name, in_name);
+ ptr = a_name + strlen (a_name) - 4;
+ if (strcmp (ptr, ".exe"))
+ strcat (a_name, ".exe");
+
+ strcpy (new_name, out_name);
+ ptr = new_name + strlen (new_name) - 4;
+ if (strcmp (ptr, ".exe"))
+ strcat (new_name, ".exe");
+
+ /* We need to round off our heap to NT's allocation unit (64KB). */
+ /* round_heap (get_allocation_unit ()); */
+
+ if (a_name && (a_out = open (a_name, O_RDONLY | O_BINARY)) < 0)
+ PERROR (a_name);
+
+ if ((a_new = open (new_name, O_WRONLY | O_TRUNC | O_CREAT | O_BINARY,
+ 0755)) < 0)
+ PERROR (new_name);
+
+ /* Get the interesting section info, like start and size of .bss... */
+ get_section_info (a_out, a_name);
+
+ copy_executable_and_dump_data_section (a_out, a_new);
+
+ close (a_out);
+ close (a_new);
+ return 0;
+}
+
+/* Flip through the executable and cache the info necessary for dumping. */
+static void
+get_section_info (int a_out, char* a_name)
+{
+ extern char my_endbss[];
+ /* From lastfile.c */
+ extern char my_edata[];
+
+ if (read (a_out, &f_hdr, sizeof (f_hdr)) != sizeof (f_hdr))
+ PERROR (a_name);
+
+ if (f_hdr.e_magic != DOSMAGIC)
+ PERROR ("unknown exe header");
+
+ /* Check the NT header signature ... */
+ if (f_hdr.nt_signature != NT_SIGNATURE)
+ PERROR ("invalid nt header");
+
+ /* Flip through the sections for .data and .bss ... */
+ if (f_hdr.f_opthdr > 0)
+ {
+ if (read (a_out, &f_ohdr, AOUTSZ) != AOUTSZ)
+ PERROR (a_name);
+ }
+ /* Loop through .data & .bss section headers, copying them in.
+ With newer lds these are reversed so we have to cope with both */
+ lseek (a_out, sizeof (f_hdr) + f_hdr.f_opthdr, 0);
+
+ if (read (a_out, &f_text, sizeof (f_text)) != sizeof (f_text)
+ || strcmp (f_text.s_name, ".text"))
+ PERROR ("no .text section");
+
+ /* The .bss section. */
+ if (read (a_out, &f_bss, sizeof (f_bss)) != sizeof (f_bss)
+ || (strcmp (f_bss.s_name, ".bss") && strcmp (f_bss.s_name, ".data")))
+ PERROR ("no .bss / .data section");
+
+ /* check for reversed .bss and .data */
+ if (!strcmp (f_bss.s_name, ".data"))
+ {
+ printf (".data and .bss reversed\n");
+ sections_reversed = 1;
+ memcpy (&f_data, &f_bss, sizeof (f_bss));
+ }
+
+ /* The .data section. */
+ if (!sections_reversed)
+ {
+ if (read (a_out, &f_data, sizeof (f_data)) != sizeof (f_data)
+ || strcmp (f_data.s_name, ".data"))
+ PERROR ("no .data section");
+ }
+ else
+ {
+ if (read (a_out, &f_bss, sizeof (f_bss)) != sizeof (f_bss)
+ || strcmp (f_bss.s_name, ".bss"))
+ PERROR ("no .bss section");
+ }
+
+ bss_start = (void *) ((char*)f_ohdr.ImageBase + f_bss.s_vaddr);
+ bss_size = (unsigned long)((char*)&my_endbss-(char*)bss_start);
+
+ /* must keep bss data that we want to be blank as blank */
+ printf ("found bss - keeping %lx of %lx bytes\n", bss_size, f_ohdr.bsize);
+
+ /* The .data section. */
+ data_start_va = (void *) ((char*)f_ohdr.ImageBase + f_data.s_vaddr);
+
+ /* We want to only write Emacs data back to the executable,
+ not any of the library data (if library data is included,
+ then a dumped Emacs won't run on system versions other
+ than the one Emacs was dumped on). */
+ data_size = (unsigned long)my_edata - (unsigned long)data_start_va;
+ printf ("found data - keeping %lx of %lx bytes\n", data_size, f_ohdr.dsize);
+
+ /* The following data section - often .idata */
+ if (read (a_out, &f_nextdata, sizeof (f_nextdata)) != sizeof (f_nextdata)
+ && strcmp (&f_nextdata.s_name[2], "data"))
+ PERROR ("no other data section");
+}
+
+/* The dump routines. */
+
+static void
+copy_executable_and_dump_data_section (int a_out, int a_new)
+{
+ long size = 0;
+ /* NOTE: Some of these were previously declared as unsigned long,
+ but the ones changed to long represent file sizes or pointers,
+ which can't reasonably get above 2G. (A 2G executable???)
+ Furthermore, some were even being compared as in if (x < 0) ... */
+ long new_data_size, new_bss_size, bss_padding, file_sz_change;
+ long data_padding = 0;
+ long f_data_s_scnptr = f_data.s_scnptr;
+ long f_nextdata_s_scnptr = f_nextdata.s_scnptr;
+ unsigned long f_data_s_vaddr = f_data.s_vaddr;
+ unsigned long f_bss_s_vaddr = f_bss.s_vaddr;
+
+ int i;
+ void* empty_space;
+ extern int static_heap_dumped;
+ SCNHDR section;
+ /* calculate new sizes:
+
+ f_ohdr.dsize is the total initialized data size on disk which is
+ f_data.s_size + f_idata.s_size.
+
+ f_ohdr.data_start is the base addres of all data and so should
+ not be changed.
+
+ *.s_vaddr is the virtual address of the start of the section
+ *normalized from f_ohdr.ImageBase.
+
+ *.s_paddr appears to be the number of bytes in the section
+ *actually used (whereas *.s_size is aligned).
+
+ bsize is now 0 since subsumed into .data
+ dsize is dsize + (f_data.s_vaddr - f_bss.s_vaddr)
+ f_data.s_vaddr is f_bss.s_vaddr
+ f_data.s_size is new dsize maybe.
+ what about s_paddr & s_scnptr? */
+
+ /* this is the amount the file increases in size */
+ if (!sections_reversed)
+ {
+ new_bss_size = f_data.s_vaddr - f_bss.s_vaddr;
+ data_padding = 0;
+ }
+ else
+ {
+ new_bss_size = f_nextdata.s_vaddr - f_bss.s_vaddr;
+ data_padding = (f_bss.s_vaddr - f_data.s_vaddr) - f_data.s_size;
+ }
+
+ if ((new_bss_size - bss_size) < BSS_PAD_SIZE)
+ PERROR (".bss free space too small");
+
+ file_sz_change = (new_bss_size + data_padding) - BSS_PAD_SIZE;
+ new_data_size = f_ohdr.dsize + file_sz_change;
+
+ if (!sections_reversed)
+ f_data.s_vaddr = f_bss.s_vaddr;
+ f_data.s_paddr += file_sz_change;
+#if 0
+ if (f_data.s_size + f_nextdata.s_size != f_ohdr.dsize)
+ printf ("section size doesn't tally with dsize %lx != %lx\n",
+ f_data.s_size + f_nextdata.s_size, f_ohdr.dsize);
+#endif
+ f_data.s_size += file_sz_change;
+ lseek (a_new, 0, SEEK_SET);
+ /* write file header */
+ f_hdr.f_symptr += file_sz_change;
+#ifdef NO_DEBUG
+ f_hdr.f_nscns--;
+#endif
+
+ printf ("writing file header\n");
+ if (write (a_new, &f_hdr, sizeof (f_hdr)) != sizeof (f_hdr))
+ PERROR ("failed to write file header");
+ /* write optional header fixing dsize & bsize*/
+ printf ("writing optional header\n");
+ printf ("new data size is %lx, >= %lx\n", new_data_size,
+ f_ohdr.dsize + f_ohdr.bsize);
+ if (new_data_size < (long) (f_ohdr.dsize + f_ohdr.bsize))
+ printf ("warning: new data size is < approx\n");
+ f_ohdr.dsize=new_data_size;
+ f_ohdr.bsize=BSS_PAD_SIZE;
+ if (write (a_new, &f_ohdr, sizeof (f_ohdr)) != sizeof (f_ohdr))
+ PERROR ("failed to write optional header");
+ /* write text as is */
+ printf ("writing text header (unchanged)\n");
+
+ if (write (a_new, &f_text, sizeof (f_text)) != sizeof (f_text))
+ PERROR ("failed to write text header");
+#ifndef NO_DEBUG
+ /* Write small bss section. */
+ if (!sections_reversed)
+ {
+ f_bss.s_size = BSS_PAD_SIZE;
+ f_bss.s_paddr = BSS_PAD_SIZE;
+ f_bss.s_vaddr = f_data.s_vaddr - BSS_PAD_SIZE;
+ if (write (a_new, &f_bss, sizeof (f_bss)) != sizeof (f_bss))
+ PERROR ("failed to write bss header");
+ }
+#endif
+ /* write new data header */
+ printf ("writing .data header\n");
+
+ if (write (a_new, &f_data, sizeof (f_data)) != sizeof (f_data))
+ PERROR ("failed to write data header");
+#ifndef NO_DEBUG
+ /* Write small bss section. */
+ if (sections_reversed)
+ {
+ f_bss.s_size = BSS_PAD_SIZE;
+ f_bss.s_paddr = BSS_PAD_SIZE;
+ f_bss.s_vaddr = f_nextdata.s_vaddr - BSS_PAD_SIZE;
+ if (write (a_new, &f_bss, sizeof (f_bss)) != sizeof (f_bss))
+ PERROR ("failed to write bss header");
+ }
+#endif
+ printf ("writing following data header\n");
+ f_nextdata.s_scnptr += file_sz_change;
+ if (f_nextdata.s_lnnoptr != 0) f_nextdata.s_lnnoptr += file_sz_change;
+ if (f_nextdata.s_relptr != 0) f_nextdata.s_relptr += file_sz_change;
+ if (write (a_new, &f_nextdata, sizeof (f_nextdata)) != sizeof (f_nextdata))
+ PERROR ("failed to write nextdata header");
+
+ /* copy other section headers adjusting the file offset */
+ for (i=0; i<(f_hdr.f_nscns-3); i++)
+ {
+ if (read (a_out, §ion, sizeof (section)) != sizeof (section))
+ PERROR ("no .data section");
+
+ section.s_scnptr += file_sz_change;
+ if (section.s_lnnoptr != 0) section.s_lnnoptr += file_sz_change;
+ if (section.s_relptr != 0) section.s_relptr += file_sz_change;
+
+ if (write (a_new, §ion, sizeof (section)) != sizeof (section))
+ PERROR ("failed to write data header");
+ }
+#ifdef NO_DEBUG
+ /* dump bss to maintain offsets */
+ memset (&f_bss, 0, sizeof (f_bss));
+ if (write (a_new, &f_bss, sizeof (f_bss)) != sizeof (f_bss))
+ PERROR ("failed to write bss header");
+#endif
+ size = lseek (a_new, 0, SEEK_CUR);
+ CHECK_AOUT_POS (size);
+
+ /* copy eveything else until start of data */
+ size = f_data_s_scnptr - lseek (a_out, 0, SEEK_CUR);
+
+ printf ("copying executable up to data section ... %lx bytes\n",
+ size);
+ dup_file_area (a_out, a_new, size);
+
+ CHECK_AOUT_POS (f_data_s_scnptr);
+
+ if (!sections_reversed)
+ {
+ /* dump bss + padding between sections, sans small bss pad */
+ printf ("dumping .bss into executable... %lx bytes\n", bss_size);
+ if (write (a_new, bss_start, bss_size) != bss_size)
+ {
+ PERROR ("failed to write bss section");
+ }
+
+ /* pad, needs to be zero */
+ bss_padding = (new_bss_size - bss_size) - BSS_PAD_SIZE;
+ if (bss_padding < 0)
+ PERROR ("padded .bss too small");
+ printf ("padding .bss ... %lx bytes\n", bss_padding);
+ empty_space = malloc (bss_padding);
+ memset (empty_space, 0, bss_padding);
+ if (write (a_new, empty_space, bss_padding) != bss_padding)
+ PERROR ("failed to write bss section");
+ free (empty_space);
+ }
+
+ /* tell dumped version not to free pure heap */
+ static_heap_dumped = 1;
+ /* Get a pointer to the raw data in our address space. */
+ printf ("dumping .data section... %lx bytes\n", data_size);
+ if (write (a_new, data_start_va, data_size) != data_size)
+ PERROR ("failed to write data section");
+ /* were going to use free again ... */
+ static_heap_dumped = 0;
+
+ size = lseek (a_out, f_data_s_scnptr + data_size, SEEK_SET);
+
+ if (!sections_reversed)
+ {
+ size = f_nextdata_s_scnptr - size;
+ dup_file_area (a_out, a_new, size);
+ }
+ else
+ {
+ /* need to pad to bss with data in file */
+ printf ("padding .data ... %lx bytes\n", data_padding);
+ size = (f_bss_s_vaddr - f_data_s_vaddr) - data_size;
+ dup_file_area (a_out, a_new, size);
+
+ /* dump bss + padding between sections */
+ printf ("dumping .bss into executable... %lx bytes\n", bss_size);
+ if (write (a_new, bss_start, bss_size) != bss_size)
+ PERROR ("failed to write bss section");
+
+ /* pad, needs to be zero */
+ bss_padding = (new_bss_size - bss_size) - BSS_PAD_SIZE;
+ if (bss_padding < 0)
+ PERROR ("padded .bss too small");
+ printf ("padding .bss ... %lx bytes\n", bss_padding);
+ empty_space = malloc (bss_padding);
+ memset (empty_space, 0, bss_padding);
+ if (write (a_new, empty_space, bss_padding) != bss_padding)
+ PERROR ("failed to write bss section");
+ free (empty_space);
+ if (lseek (a_new, 0, SEEK_CUR) != (long) f_nextdata.s_scnptr)
+ {
+ printf ("at %lx should be at %lx\n",
+ lseek (a_new, 0, SEEK_CUR),
+ f_nextdata.s_scnptr);
+ PERROR ("file positioning error\n");
+ }
+ lseek (a_out, f_nextdata_s_scnptr, SEEK_SET);
+ }
+
+ CHECK_AOUT_POS (f_nextdata_s_scnptr);
+
+ /* now dump - nextdata don't need to do this cygwin ds is in .data! */
+ printf ("dumping following data section... %lx bytes\n", f_nextdata.s_size);
+
+ dup_file_area (a_out,a_new,f_nextdata.s_size);
+
+ /* write rest of file */
+ printf ("writing rest of file\n");
+ size = lseek (a_out, 0, SEEK_END);
+ size = size - (f_nextdata_s_scnptr + f_nextdata.s_size); /* length remaining in a_out */
+ lseek (a_out, f_nextdata_s_scnptr + f_nextdata.s_size, SEEK_SET);
+
+ dup_file_area (a_out, a_new, size);
+}
+
+/*
+ * copy from aout to anew
+ */
+static void
+dup_file_area (int a_out, int a_new, long size)
+{
+ char page[BUFSIZ];
+ long n;
+ for (; size > 0; size -= sizeof (page))
+ {
+ n = size > (long) sizeof (page) ? sizeof (page) : size;
+ if (read (a_out, page, n) != n || write (a_new, page, n) != n)
+ PERROR ("dump_out()");
+ }
+}
+
+#if 0
+static void
+write_int_to_bss (int a_out, int a_new, void* va, void* newval)
+{
+ int cpos;
+
+ cpos = lseek (a_new, 0, SEEK_CUR);
+ if (va < bss_start || va > bss_start + f_data.s_size)
+ PERROR ("address not in data space\n");
+ lseek (a_new, f_data.s_scnptr + ((unsigned long)va -
+ (unsigned long)bss_start), SEEK_SET);
+ if (write (a_new, newval, sizeof (int)) != (int) sizeof (int))
+ PERROR ("failed to write int value");
+ lseek (a_new, cpos, SEEK_SET);
+}
+#endif
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-10 21:48 Joe Buehler
@ 2002-12-11 0:01 ` Kim F. Storm
[not found] ` <3DF67390.2020106@hekimian.com>
2002-12-11 19:53 ` Jason Rumney
0 siblings, 2 replies; 22+ messages in thread
From: Kim F. Storm @ 2002-12-11 0:01 UTC (permalink / raw)
Cc: emacs-devel
Joe Buehler <jbuehler@hekimian.com> writes:
> Many thanks to Andy Piper, who did the coding for Cygwin XEmacs, which
> I have just adapted here for GNU emacs.
Joe,
We usually cannot copy (or adapt) stuff from XEmacs, as we require
papers from the original author, as well as anyone who has contributed
with anything but tiny changes to the code.
So, do we have papers from Andy Piper? Can anyone check this?
And if Andy Piper is not the only person who worked on the files you
copied from XEmacs, we need papers from the other authors as well.
If we don't have papers from A.P. and the other contributors already,
*you* will need to contact those authors and ask them to sign papers
(like I suppose you've already done for your work on emacs).
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
[not found] ` <3DF67390.2020106@hekimian.com>
@ 2002-12-11 0:30 ` Kim F. Storm
2002-12-12 14:30 ` Joe Buehler
0 siblings, 1 reply; 22+ messages in thread
From: Kim F. Storm @ 2002-12-11 0:30 UTC (permalink / raw)
Cc: emacs-devel
Joe Buehler <jbuehler@hekimian.com> writes:
> Kim F. Storm wrote:
>
> > We usually cannot copy (or adapt) stuff from XEmacs, as we require
> > papers from the original author, as well as anyone who has contributed
> > with anything but tiny changes to the code.
>
> The files I copied already had copyright notices that say that the FSF
> owns the files. Is that adequate?
We require papers for all "non-tiny" changes that are installed in CVS.
In this case, the file builds on source "owned by FSF", but although
that means that the GPL applies to the changed file, that doesn't make
FSF "owner" of any work derived from that source.
So if the file has been changed "outside" FSF, we require papers!
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-11 0:01 ` Kim F. Storm
[not found] ` <3DF67390.2020106@hekimian.com>
@ 2002-12-11 19:53 ` Jason Rumney
1 sibling, 0 replies; 22+ messages in thread
From: Jason Rumney @ 2002-12-11 19:53 UTC (permalink / raw)
Cc: Joe Buehler
storm@cua.dk (Kim F. Storm) writes:
> So, do we have papers from Andy Piper?
I don't think so, at least not a general assignment. I asked him once
before when someone else made a Cygwin port that turned out to be
entirely based on Andy's code, but he was not willing to sign
anything. The other party did not seem to understand the code well
enough to maintain it anyway, so I did not try to change Andy's mind
at that time.
> And if Andy Piper is not the only person who worked on the files you
> copied from XEmacs, we need papers from the other authors as well.
I think he said he was the only one at that time, but recently Ben
Wing has done a lot of work on the Windows port of XEmacs, so he may
have touched that code since.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-11 0:30 ` Kim F. Storm
@ 2002-12-12 14:30 ` Joe Buehler
2002-12-12 16:16 ` Joe Buehler
` (2 more replies)
0 siblings, 3 replies; 22+ messages in thread
From: Joe Buehler @ 2002-12-12 14:30 UTC (permalink / raw)
Kim F. Storm wrote:
> We require papers for all "non-tiny" changes that are installed in CVS.
>
> In this case, the file builds on source "owned by FSF", but although
> that means that the GPL applies to the changed file, that doesn't make
> FSF "owner" of any work derived from that source.
>
> So if the file has been changed "outside" FSF, we require papers!
Could someone point me to an explanation of all this? I never had to
sign a thing in years past when contributing to GNU emacs. Emacs
has been a huge help for me on my jobs since the 80's, and I want to
contribute back, but it appears to have become something of a pain
to do so.
Joe Buehler
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-12 14:30 ` Joe Buehler
@ 2002-12-12 16:16 ` Joe Buehler
2002-12-12 17:23 ` Eli Zaretskii
2002-12-13 22:21 ` Richard Stallman
2002-12-12 17:09 ` Kim F. Storm
2002-12-12 18:14 ` Paul Eggert
2 siblings, 2 replies; 22+ messages in thread
From: Joe Buehler @ 2002-12-12 16:16 UTC (permalink / raw)
Kim F. Storm wrote:
> It's not that difficult...
That's not what I meant. My question is, WHY? Why all this hassle
with assignment papers? Is FSF being targets by squads of corporate
lawyers?
Joe Buehler
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-12 14:30 ` Joe Buehler
2002-12-12 16:16 ` Joe Buehler
@ 2002-12-12 17:09 ` Kim F. Storm
2002-12-13 22:21 ` Richard Stallman
2002-12-12 18:14 ` Paul Eggert
2 siblings, 1 reply; 22+ messages in thread
From: Kim F. Storm @ 2002-12-12 17:09 UTC (permalink / raw)
Cc: emacs-devel
Joe Buehler <jbuehler@hekimian.com> writes:
> Kim F. Storm wrote:
>
> > We require papers for all "non-tiny" changes that are installed in CVS.
> > In this case, the file builds on source "owned by FSF", but although
> > that means that the GPL applies to the changed file, that doesn't make
> > FSF "owner" of any work derived from that source.
> > So if the file has been changed "outside" FSF, we require papers!
>
> Could someone point me to an explanation of all this? I never had to
> sign a thing in years past when contributing to GNU emacs. Emacs
> has been a huge help for me on my jobs since the 80's, and I want to
> contribute back, but it appears to have become something of a pain
> to do so.
It's not that difficult...
Before you can contribute any major changes to _any_ GNU software
and have it incorporated into the _official_ releases, you need to
sign over your copyright to the FSF.
This typically amounts to signing two pieces of paper:
- one paper [disclaimer] signed by your employer, disclaiming the
right to any of the code that you will be giving to the FSF, and
- one paper [assignment] signed by yourself, signing over the
copyright of your past, present, and future [or a specific piece of]
work (on GNU Emacs) to the FSF.
Even if you have a "generic assigment" covering all changes to Emacs,
you will typically sign a specific assignment paper if you contribute
a larger piece of work (such as a lisp package).
You can get more information from <assign@gnu.org>.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-12 16:16 ` Joe Buehler
@ 2002-12-12 17:23 ` Eli Zaretskii
2002-12-13 22:21 ` Richard Stallman
1 sibling, 0 replies; 22+ messages in thread
From: Eli Zaretskii @ 2002-12-12 17:23 UTC (permalink / raw)
Cc: emacs-devel
On Thu, 12 Dec 2002, Joe Buehler wrote:
> My question is, WHY? Why all this hassle with assignment papers?
Because the FSF wants to be able to prove in court that every line of
code it distributes cannot possibly belong to some proprietor.
> Is FSF being targets by squads of corporate lawyers?
I doubt that, but given the danger that some behemot company like
Microsoft might decide to try, I can understand why the FSF is anxious to
be prepared.
I'm sure Richard will explain this much better, the above is just my HO.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-12 14:30 ` Joe Buehler
2002-12-12 16:16 ` Joe Buehler
2002-12-12 17:09 ` Kim F. Storm
@ 2002-12-12 18:14 ` Paul Eggert
2002-12-13 15:14 ` Joe Buehler
2 siblings, 1 reply; 22+ messages in thread
From: Paul Eggert @ 2002-12-12 18:14 UTC (permalink / raw)
Cc: emacs-devel
> From: Joe Buehler <jbuehler@hekimian.com>
> Date: Thu, 12 Dec 2002 09:30:07 -0500
> > So if the file has been changed "outside" FSF, we require papers!
>
> Could someone point me to an explanation of all this?
See, for example
http://www.geocrawler.com/archives/3/408/1985/7/0/2154410/
where Karen Kolling reported in 1985 how Unipress was obstructing
people from using GNU Emacs freely, citing their copyright claims on
parts of the code written by James Gosling. The papers that you sign
are designed to prevent these sorts of difficulties from happening in
the future.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-12 18:14 ` Paul Eggert
@ 2002-12-13 15:14 ` Joe Buehler
2002-12-14 18:32 ` Richard Stallman
0 siblings, 1 reply; 22+ messages in thread
From: Joe Buehler @ 2002-12-13 15:14 UTC (permalink / raw)
Andy Piper responded to an email I sent him. The unexec() code
was written while he worked for another company (now defunct)
so I suppose that I will have to rewrite the unexec() code.
The other patches are all my own work, though, and I have
submitted the assignment paperwork, so I hope all those
patches will make it into CVS Real Soon Now.
Joe Buehler
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-12 17:09 ` Kim F. Storm
@ 2002-12-13 22:21 ` Richard Stallman
0 siblings, 0 replies; 22+ messages in thread
From: Richard Stallman @ 2002-12-13 22:21 UTC (permalink / raw)
Cc: jbuehler
Before you can contribute any major changes to _any_ GNU software
and have it incorporated into the _official_ releases, you need to
sign over your copyright to the FSF.
This applies only to some GNU packages--those that are FSF-copyrighted.
When people contribute a package to GNU, they can either keep the
copyright or transfer it to the FSF. If they transfer it to the FSF,
then we follow these procedures. If the developers keep the copyright,
it is up to them to decide what to do.
Even if you have a "generic assigment" covering all changes to Emacs,
you will typically sign a specific assignment paper if you contribute
a larger piece of work (such as a lisp package).
Our lawyer said that an general assignment of Emacs changes can cover
a new Lisp package provided the contributor formally tells us to
consider the package a "change to Emacs".
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-12 16:16 ` Joe Buehler
2002-12-12 17:23 ` Eli Zaretskii
@ 2002-12-13 22:21 ` Richard Stallman
1 sibling, 0 replies; 22+ messages in thread
From: Richard Stallman @ 2002-12-13 22:21 UTC (permalink / raw)
Cc: emacs-devel
That's not what I meant. My question is, WHY? Why all this hassle
with assignment papers? Is FSF being targets by squads of corporate
lawyers?
The legal papers serve two purposes:
1. To help assure us that the contributors have the right to contribute
what they try to contribute.
2. To put us in a better position to defend the GPL in court if we
need to.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-13 15:14 ` Joe Buehler
@ 2002-12-14 18:32 ` Richard Stallman
2002-12-16 14:37 ` Joe Buehler
0 siblings, 1 reply; 22+ messages in thread
From: Richard Stallman @ 2002-12-14 18:32 UTC (permalink / raw)
Cc: emacs-devel
The other patches are all my own work, though, and I have
submitted the assignment paperwork, so I hope all those
patches will make it into CVS Real Soon Now.
Is there a plan for who will install them?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-14 18:32 ` Richard Stallman
@ 2002-12-16 14:37 ` Joe Buehler
2002-12-16 15:03 ` Juanma Barranquero
0 siblings, 1 reply; 22+ messages in thread
From: Joe Buehler @ 2002-12-16 14:37 UTC (permalink / raw)
Cc: emacs-devel
Richard Stallman wrote:
> The other patches are all my own work, though, and I have
> submitted the assignment paperwork, so I hope all those
> patches will make it into CVS Real Soon Now.
>
> Is there a plan for who will install them?
I would be happy to put them in myself, but I don't have anything other
than anonymous CVS access.
Joe Buehler
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-16 14:37 ` Joe Buehler
@ 2002-12-16 15:03 ` Juanma Barranquero
2002-12-16 17:33 ` Joe Buehler
0 siblings, 1 reply; 22+ messages in thread
From: Juanma Barranquero @ 2002-12-16 15:03 UTC (permalink / raw)
Cc: emacs-devel
On Mon, 16 Dec 2002 09:37:30 -0500, Joe Buehler <jbuehler@hekimian.com> wrote:
> I would be happy to put them in myself, but I don't have anything other
> than anonymous CVS access.
I can install them, but: do they go in as they are, or is someone
planning to test them a little more?
Because, AFAIK, we're not just talking about the trunk but the
EMACS_21_1_RC branch too, aren't we?
/L/e/k/t/u
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
@ 2002-12-16 15:58 jasonr
2002-12-16 16:40 ` Juanma Barranquero
0 siblings, 1 reply; 22+ messages in thread
From: jasonr @ 2002-12-16 15:58 UTC (permalink / raw)
Cc: emacs-devel
> Because, AFAIK, we're not just talking about the trunk but the
> EMACS_21_1_RC branch too, aren't we?
That would be unnecessarily dangerous and delay the release of 21.3 too much IMHO.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-16 15:58 [PATCHES] 21.3.50 for Cygwin: patch 7 jasonr
@ 2002-12-16 16:40 ` Juanma Barranquero
0 siblings, 0 replies; 22+ messages in thread
From: Juanma Barranquero @ 2002-12-16 16:40 UTC (permalink / raw)
Cc: emacs-devel
On Mon, 16 Dec 2002 15:58:47 +0000 (GMT), jasonr@btinternet.com wrote:
> That would be unnecessarily dangerous and delay the release of 21.3 too much IMHO.
I agree.
I just wrought the issue because the patches were originally developed
against 21.2 and, according to the author, they've been in use for a
while (in the Cygwin-distributed Emacs).
I got the (perhaps erroneous) feeling that Joe was assuming the patches
would appear in the upcoming 21.3 release; when in fact they'd go into
the trunk.
/L/e/k/t/u
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-16 15:03 ` Juanma Barranquero
@ 2002-12-16 17:33 ` Joe Buehler
2002-12-18 10:10 ` Juanma Barranquero
0 siblings, 1 reply; 22+ messages in thread
From: Joe Buehler @ 2002-12-16 17:33 UTC (permalink / raw)
Juanma Barranquero wrote:
> I can install them, but: do they go in as they are, or is someone
> planning to test them a little more?
>
> Because, AFAIK, we're not just talking about the trunk but the
> EMACS_21_1_RC branch too, aren't we?
The posted patches are against the CVS trunk. At least, I did not
tell CVS to use a particular branch when I pulled the code out
of the repository.
Once the patches get merged in, I will be happy to pull it out again
and make sure everything builds OK.
Joe Buehler
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-16 17:33 ` Joe Buehler
@ 2002-12-18 10:10 ` Juanma Barranquero
2002-12-18 13:46 ` Joe Buehler
2002-12-19 18:32 ` Richard Stallman
0 siblings, 2 replies; 22+ messages in thread
From: Juanma Barranquero @ 2002-12-18 10:10 UTC (permalink / raw)
Cc: emacs-devel
On Mon, 16 Dec 2002 12:33:40 -0500, Joe Buehler <jbuehler@hekimian.com> wrote:
> Once the patches get merged in, I will be happy to pull it out again
> and make sure everything builds OK.
I'm patching the sources with your changes (manually... don't ask,
mostly a CR vs CR/LF issue :), and I've seen that there are several
files with the comment "copied from XEmacs 21.5.9".
What's the legal status? Have we papers? Can we install them? I'll
commit your changes to the CVS ASAP if the answer is "yes".
/L/e/k/t/u
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-18 10:10 ` Juanma Barranquero
@ 2002-12-18 13:46 ` Joe Buehler
2002-12-18 16:45 ` Juanma Barranquero
2002-12-19 18:32 ` Richard Stallman
1 sibling, 1 reply; 22+ messages in thread
From: Joe Buehler @ 2002-12-18 13:46 UTC (permalink / raw)
Cc: emacs-devel
Juanma Barranquero wrote:
> I'm patching the sources with your changes (manually... don't ask,
> mostly a CR vs CR/LF issue :), and I've seen that there are several
Thank you for taking the extra time.
> files with the comment "copied from XEmacs 21.5.9".
>
> What's the legal status? Have we papers? Can we install them? I'll
> commit your changes to the CVS ASAP if the answer is "yes".
Do not commit those. There was a discussion on this list -- I need
to rewrite that code. If you just ignore the last set of patches I
posted (patch 7), everything will be OK for now, we just won't
have unexec() for Cygwin yet.
The previous patches (1 - 6) are all my own work, and I have submitted the proper
papers -- though I never got any acknowledgement of that fact, so someone
who is able may want to make sure it didn't get lost in the mail...
--
Joe Buehler
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-18 13:46 ` Joe Buehler
@ 2002-12-18 16:45 ` Juanma Barranquero
0 siblings, 0 replies; 22+ messages in thread
From: Juanma Barranquero @ 2002-12-18 16:45 UTC (permalink / raw)
Cc: emacs-devel
On Wed, 18 Dec 2002 08:46:03 -0500, Joe Buehler <jbuehler@hekimian.com> wrote:
> The previous patches (1 - 6) are all my own work, and I have submitted the proper
> papers -- though I never got any acknowledgement of that fact, so someone
> who is able may want to make sure it didn't get lost in the mail...
OK. Here's the combined patch from yours 1-6 and the stuff from patch 7
that's supposedly trouble-free (adding the cygwin system-type to the
docs, the etc/NEWS entry and some ChangeLog changes, a few lines all in
all).
src/s/cygwin.h is not included, but that file'll go into the CVS
straight from your patch 5, so there's no need to repeat it here.
With this patch applied (and src/s/cygwin.h), my system still bootstraps
fine; but I'm not tested cygwin compilation in any way, just that this
stuff didn't broke MSVC builds.
As all patching/unpatching has been done manually, I suggest you do a
cvs update -C, install this and test it.
As soon as you give the OK and someone from FSF confirms your papers are
at hand I'll commit the patch.
/L/e/k/t/u
Index: ChangeLog
===================================================================
RCS file: /cvs/emacs/ChangeLog,v
retrieving revision 1.294
diff -u -2 -b -r1.294 ChangeLog
--- ChangeLog 15 Dec 2002 19:01:33 -0000 1.294
+++ ChangeLog 18 Dec 2002 16:26:57 -0000
@@ -1,2 +1,10 @@
+2002-12-18 Joe Buehler <jhpb@draco.hekimian.com>
+
+ * Makefile.in: Use @EXEEXT@ for Cygwin.
+ Use USERNAME if LOGNAME is not set (for Cygwin).
+
+ * configure.in:
+ * configure: Add opsys=cygwin.
+
2002-12-09 Markus Rost <rost@math.ohio-state.edu>
Index: Makefile.in
===================================================================
RCS file: /cvs/emacs/Makefile.in,v
retrieving revision 1.273
diff -u -2 -b -r1.273 Makefile.in
--- Makefile.in 8 Dec 2002 13:59:29 -0000 1.273
+++ Makefile.in 18 Dec 2002 16:26:57 -0000
@@ -213,6 +213,6 @@
# What emacs should be called when installed.
-EMACS = `echo emacs | sed '$(TRANSFORM)'`
-EMACSFULL = `echo emacs-${version} | sed '$(TRANSFORM)'`
+EMACS = `echo emacs@EXEEXT@ | sed '$(TRANSFORM)'`
+EMACSFULL = `echo emacs-${version}@EXEEXT@ | sed '$(TRANSFORM)'`
# Subdirectories to make recursively. `lisp' is not included
@@ -356,5 +356,5 @@
libexecdir=${libexecdir} archlibdir=${archlibdir} \
INSTALL_STRIP=${INSTALL_STRIP})
- ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs ${bindir}/$(EMACSFULL)
+ ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs@EXEEXT@ ${bindir}/$(EMACSFULL)
-chmod 1755 ${bindir}/$(EMACSFULL)
rm -f ${bindir}/$(EMACS)
@@ -398,5 +398,5 @@
| (cd $${dest}; umask 022; \
tar -xvf - && cat > /dev/null) || exit 1; \
- find $${dest} -exec chown $$LOGNAME {} ';' ;\
+ find $${dest} -exec chown $${LOGNAME:-$$USERNAME} {} ';' ;\
for subdir in `find $${dest} -type d ! -name RCS ! -name CVS -print` ; do \
chmod a+rx $${subdir} ; \
@@ -437,5 +437,5 @@
(cd ./etc; tar -chf - DOC*) \
|(cd ${docdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \
- (cd $(docdir); chown $${LOGNAME} DOC*; chmod a+r DOC*; \
+ (cd $(docdir); chown $${LOGNAME:-$$USERNAME} DOC*; chmod a+r DOC*; \
if test "`echo DOC-*`" != "DOC-*"; then rm DOC; fi); \
else true; fi
@@ -449,5 +449,5 @@
(cd lisp; tar -chf - *.el *.elc) \
|(cd ${lispdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \
- (cd ${lispdir}; find . -exec chown $${LOGNAME} {} ';') ; \
+ (cd ${lispdir}; find . -exec chown $${LOGNAME:-$$USERNAME} {} ';') ; \
else true; fi
-unset CDPATH; \
@@ -727,5 +727,5 @@
(cd lisp; $(MAKE) $(MFLAGS) bootstrap-clean)
(cd src; $(MAKE) $(MFLAGS) bootstrap)
- (cd lisp; $(MAKE) $(MFLAGS) bootstrap EMACS=../src/bootstrap-emacs)
+ (cd lisp; $(MAKE) $(MFLAGS) bootstrap EMACS=../src/bootstrap-emacs@EXEEXT@)
(cd src; $(MAKE) $(MFLAGS) mostlyclean)
$(MAKE) $(MFLAGS) all
Index: configure
===================================================================
RCS file: /cvs/emacs/configure,v
retrieving revision 1.100
diff -u -2 -b -r1.100 configure
--- configure 28 Nov 2002 01:08:07 -0000 1.100
+++ configure 18 Dec 2002 16:26:58 -0000
@@ -2476,4 +2476,5 @@
machine=intel386
case "${canonical}" in
+ *-cygwin ) opsys=cygwin ;;
*-lynxos* ) opsys=lynxos ;;
*-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
Index: configure.in
===================================================================
RCS file: /cvs/emacs/configure.in,v
retrieving revision 1.317
diff -u -2 -b -r1.317 configure.in
--- configure.in 9 Dec 2002 19:37:58 -0000 1.317
+++ configure.in 18 Dec 2002 16:26:59 -0000
@@ -1044,4 +1044,5 @@
machine=intel386
case "${canonical}" in
+ *-cygwin ) opsys=cygwin ;;
*-lynxos* ) opsys=lynxos ;;
*-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
Index: etc/ChangeLog
===================================================================
RCS file: /cvs/emacs/etc/ChangeLog,v
retrieving revision 1.120
diff -u -2 -b -r1.120 ChangeLog
--- etc/ChangeLog 10 Dec 2002 02:35:49 -0000 1.120
+++ etc/ChangeLog 18 Dec 2002 16:26:59 -0000
@@ -1,2 +1,6 @@
+2002-12-18 Joe Buehler <jhpb@draco.hekimian.com>
+
+ * MACHINES: Added Cygwin.
+
2002-12-10 Kenichi Handa <handa@m17n.org>
Index: etc/MACHINES
===================================================================
RCS file: /cvs/emacs/etc/MACHINES,v
retrieving revision 1.15
diff -u -2 -b -r1.15 MACHINES
--- etc/MACHINES 15 Apr 2002 18:44:53 -0000 1.15
+++ etc/MACHINES 18 Dec 2002 16:26:59 -0000
@@ -633,5 +633,5 @@
i386-*-sol2.4, i386-*-sysv3, i386-intsys-sysv,
i386-*-sysv4, i386-*-sysv4.2,
- i386-*-sysv5.3, i386-*-bsd4.2,
+ i386-*-sysv5.3, i386-*-bsd4.2, i386-*-cygwin,
i386-*-sco3.2v4, i386-*-bsd386, i386-*-386bsd,
i386-*-msdos, i386-*-windowsnt.
@@ -647,4 +647,6 @@
Use i386-*-esix for Esix; Emacs runs as of version 19.6.
Use i386-*-linux-gnu for GNU/Linux systems; Emacs runs as of version 19.26.
+ Use i386-*-cygwin for Cygwin; Emacs runs as of version 21.2, in both X11
+ and non-X11 modes.
Use i386-intsys-sysv for Integrated Solutions 386 machines.
It may also be correct for Microport systems.
Index: etc/NEWS
===================================================================
RCS file: /cvs/emacs/etc/NEWS,v
retrieving revision 1.763
diff -u -2 -b -r1.763 NEWS
--- etc/NEWS 18 Dec 2002 02:44:24 -0000 1.763
+++ etc/NEWS 18 Dec 2002 16:27:02 -0000
@@ -56,4 +56,6 @@
(Help->More Manuals->Introduction to Emacs Lisp).
+** Support for Cygwin was added.
+
---
** Support for AIX 5.1 was added.
Index: lib-src/ChangeLog
===================================================================
RCS file: /cvs/emacs/lib-src/ChangeLog,v
retrieving revision 2.215
diff -u -2 -b -r2.215 ChangeLog
--- lib-src/ChangeLog 11 Dec 2002 23:32:41 -0000 2.215
+++ lib-src/ChangeLog 18 Dec 2002 16:27:03 -0000
@@ -1,2 +1,8 @@
+2002-12-18 Joe Buehler <jhpb@draco.hekimian.com>
+
+ * Makefile.in: Use @EXEEXT@ for Cygwin.
+
+ * pop.c: A Cygwin header file defines _P, so undef it.
+
2002-12-12 Jonathan Kamens <jik@kamens.brookline.ma.us>
Index: lib-src/Makefile.in
===================================================================
RCS file: /cvs/emacs/lib-src/Makefile.in,v
retrieving revision 1.131
diff -u -2 -b -r1.131 Makefile.in
--- lib-src/Makefile.in 18 Nov 2002 04:53:59 -0000 1.131
+++ lib-src/Makefile.in 18 Dec 2002 16:27:03 -0000
@@ -101,13 +101,13 @@
# Things that a user might actually run,
# which should be installed in bindir.
-INSTALLABLES = etags ctags emacsclient b2m ebrowse
+INSTALLABLES = etags@EXEEXT@ ctags@EXEEXT@ emacsclient@EXEEXT@ b2m@EXEEXT@ ebrowse@EXEEXT@
INSTALLABLE_SCRIPTS = rcs-checkin grep-changelog
# Things that Emacs runs internally, or during the build process,
# which should not be installed in bindir.
-UTILITIES= profile digest-doc sorted-doc movemail cvtmail fakemail \
- yow hexl update-game-score
+UTILITIES= profile@EXEEXT@ digest-doc@EXEEXT@ sorted-doc@EXEEXT@ movemail@EXEEXT@ cvtmail@EXEEXT@ fakemail@EXEEXT@ \
+ yow@EXEEXT@ hexl@EXEEXT@ update-game-score@EXEEXT@
-DONT_INSTALL= test-distrib make-docfile
+DONT_INSTALL= test-distrib@EXEEXT@ make-docfile@EXEEXT@
# Like UTILITIES, but they're not system-dependent, and should not be
@@ -273,10 +273,10 @@
#ifdef MOVEMAIL_NEEDS_BLESSING
/* Don\'t charge ahead and do it! Let the installer decide.
- ./blessmail ${archlibdir}/movemail */
+ ./blessmail ${archlibdir}/movemail@EXEEXT@ */
@if [ `wc -l <blessmail` != 2 ] ; then \
dir=`sed -n -e 's/echo mail directory = \(.*\)/\1/p' blessmail`; \
echo Assuming $$dir is really the mail spool directory, you should; \
- echo run lib-src/blessmail ${archlibdir}/movemail; \
- echo as root, to give movemail appropriate permissions.; \
+ echo run lib-src/blessmail ${archlibdir}/movemail@EXEEXT@; \
+ echo as root, to give movemail@EXEEXT@ appropriate permissions.; \
echo Do that after running make install.; \
fi
@@ -359,6 +359,6 @@
tags: TAGS
-TAGS: etags
- etags *.[ch]
+TAGS: etags@EXEEXT@
+ etags@EXEEXT@ *.[ch]
/* This verifies that the non-ASCII characters in the file \`testfile\'
@@ -366,7 +366,7 @@
distribute Emacs. If they were clobbered, all the .elc files were
clobbered too. */
-test-distrib: ${srcdir}/test-distrib.c
- $(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c
- ./test-distrib ${srcdir}/testfile
+test-distrib@EXEEXT@: ${srcdir}/test-distrib.c
+ $(CC) ${ALL_CFLAGS} -o test-distrib@EXEEXT@ ${srcdir}/test-distrib.c
+ ./test-distrib@EXEEXT@ ${srcdir}/testfile
GETOPTOBJS = getopt.o getopt1.o $(ALLOCA)
@@ -390,33 +390,33 @@
${CC} -c ${BASE_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER ${srcdir}/../src/regex.c
-etags: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXPDEPS) ../src/config.h
- $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o etags
+etags@EXEEXT@: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXPDEPS) ../src/config.h
+ $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o etags@EXEEXT@
-ebrowse: ${srcdir}/ebrowse.c $(GETOPTDEPS) ../src/config.h
- $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" ${srcdir}/ebrowse.c $(GETOPTOBJS) $(LOADLIBES) -o ebrowse
+ebrowse@EXEEXT@: ${srcdir}/ebrowse.c $(GETOPTDEPS) ../src/config.h
+ $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" ${srcdir}/ebrowse.c $(GETOPTOBJS) $(LOADLIBES) -o ebrowse@EXEEXT@
/* We depend on etags to assure that parallel makes don\'t write two
etags.o files on top of each other. */
-ctags: etags
- $(CC) ${ALL_CFLAGS} -DCTAGS -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o ctags
+ctags@EXEEXT@: etags@EXEEXT@
+ $(CC) ${ALL_CFLAGS} -DCTAGS -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXPOBJ) $(LOADLIBES) -o ctags@EXEEXT@
-profile: ${srcdir}/profile.c ../src/config.h
- $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c $(LOADLIBES) -o profile
+profile@EXEEXT@: ${srcdir}/profile.c ../src/config.h
+ $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c $(LOADLIBES) -o profile@EXEEXT@
-make-docfile: ${srcdir}/make-docfile.c ../src/config.h
- $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) -o make-docfile
+make-docfile@EXEEXT@: ${srcdir}/make-docfile.c ../src/config.h
+ $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) -o make-docfile@EXEEXT@
-digest-doc: ${srcdir}/digest-doc.c
- $(CC) ${ALL_CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc
+digest-doc@EXEEXT@: ${srcdir}/digest-doc.c
+ $(CC) ${ALL_CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc@EXEEXT@
-sorted-doc: ${srcdir}/sorted-doc.c ${ALLOCA}
- $(CC) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c ${ALLOCA} $(LOADLIBES) -o sorted-doc
+sorted-doc@EXEEXT@: ${srcdir}/sorted-doc.c ${ALLOCA}
+ $(CC) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c ${ALLOCA} $(LOADLIBES) -o sorted-doc@EXEEXT@
-b2m: ${srcdir}/b2m.c ../src/config.h $(GETOPTDEPS)
+b2m@EXEEXT@: ${srcdir}/b2m.c ../src/config.h $(GETOPTDEPS)
$(CC) ${ALL_CFLAGS} ${srcdir}/b2m.c -DVERSION="\"${version}\"" \
- $(GETOPTOBJS) $(LOADLIBES) -o b2m
+ $(GETOPTOBJS) $(LOADLIBES) -o b2m@EXEEXT@
-movemail: movemail.o pop.o $(GETOPTDEPS)
- $(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MAIL) $(LIBS_MOVE) -o movemail
+movemail@EXEEXT@: movemail.o pop.o $(GETOPTDEPS)
+ $(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MAIL) $(LIBS_MOVE) -o movemail@EXEEXT@
movemail.o: ${srcdir}/movemail.c ../src/config.h
@@ -426,44 +426,44 @@
$(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c
-cvtmail: ${srcdir}/cvtmail.c
- $(CC) ${ALL_CFLAGS} ${srcdir}/cvtmail.c $(LOADLIBES) -o cvtmail
+cvtmail@EXEEXT@: ${srcdir}/cvtmail.c
+ $(CC) ${ALL_CFLAGS} ${srcdir}/cvtmail.c $(LOADLIBES) -o cvtmail@EXEEXT@
-fakemail: ${srcdir}/fakemail.c ../src/config.h
- $(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail
+fakemail@EXEEXT@: ${srcdir}/fakemail.c ../src/config.h
+ $(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail@EXEEXT@
-yow: ${srcdir}/yow.c ../src/epaths.h
- $(CC) ${ALL_CFLAGS} ${srcdir}/yow.c $(LOADLIBES) -o yow
+yow@EXEEXT@: ${srcdir}/yow.c ../src/epaths.h
+ $(CC) ${ALL_CFLAGS} ${srcdir}/yow.c $(LOADLIBES) -o yow@EXEEXT@
-emacsclient: ${srcdir}/emacsclient.c ../src/config.h $(GETOPTDEPS)
+emacsclient@EXEEXT@: ${srcdir}/emacsclient.c ../src/config.h $(GETOPTDEPS)
$(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c $(GETOPTOBJS) \
-DVERSION=`sed -n -e '/(defconst emacs-version/ s/^[^"]*\("[^"]*"\).*/\1/p' ${srcdir}/../lisp/version.el` \
- $(LOADLIBES) -o emacsclient
+ $(LOADLIBES) -o emacsclient@EXEEXT@
-hexl: ${srcdir}/hexl.c ../src/config.h
- $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl
+hexl@EXEEXT@: ${srcdir}/hexl.c ../src/config.h
+ $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl@EXEEXT@
-update-game-score: ${srcdir}/update-game-score.c ../src/config.h
+update-game-score@EXEEXT@: ${srcdir}/update-game-score.c ../src/config.h
$(CC) ${ALL_CFLAGS} ${srcdir}/update-game-score.c \
-DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \
- $(LOADLIBES) -o update-game-score
+ $(LOADLIBES) -o update-game-score@EXEEXT@
/* These are NOT included in INSTALLABLES or UTILITIES.
See ../src/Makefile.in. */
-emacstool: ${srcdir}/emacstool.c
- $(CC) ${srcdir}/emacstool.c -o emacstool ${ALL_CFLAGS} \
+emacstool@EXEEXT@: ${srcdir}/emacstool.c
+ $(CC) ${srcdir}/emacstool.c -o emacstool@EXEEXT@ ${ALL_CFLAGS} \
-lsuntool -lsunwindow -lpixrect $(LOADLIBES)
/* For SUN Japanese Language Environment. */
-nemacstool: ${srcdir}/emacstool.c
- $(CC) -o nemacstool -DJLE ${ALL_CFLAGS} ${srcdir}/emacstool.c \
+nemacstool@EXEEXT@: ${srcdir}/emacstool.c
+ $(CC) -o nemacstool@EXEEXT@ -DJLE ${ALL_CFLAGS} ${srcdir}/emacstool.c \
-lsuntool -lmle -lsunwindow -lpixrect $(LOADLIBES)
-xvetool: ${srcdir}/emacstool.c
- $(CC) -o xvetool -DXVIEW ${ALL_CFLAGS} ${srcdir}/emacstool.c \
+xvetool@EXEEXT@: ${srcdir}/emacstool.c
+ $(CC) -o xvetool@EXEEXT@ -DXVIEW ${ALL_CFLAGS} ${srcdir}/emacstool.c \
-lxview -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
$(LOADLIBES)
-xveterm: ${srcdir}/emacstool.c
- $(CC) -o xveterm -DXVIEW -DTTERM ${ALL_CFLAGS} ${srcdir}/emacstool.c \
+xveterm@EXEEXT@: ${srcdir}/emacstool.c
+ $(CC) -o xveterm@EXEEXT@ -DXVIEW -DTTERM ${ALL_CFLAGS} ${srcdir}/emacstool.c \
-lxview -lolgx -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
$(LOADLIBES)
Index: lib-src/pop.c
===================================================================
RCS file: /cvs/emacs/lib-src/pop.c,v
retrieving revision 1.31
diff -u -2 -b -r1.31 pop.c
--- lib-src/pop.c 17 May 2002 11:24:02 -0000 1.31
+++ lib-src/pop.c 18 Dec 2002 16:27:03 -0000
@@ -120,4 +120,7 @@
#endif
+#ifdef _P
+#undef _P
+#endif
#ifndef _P
# ifdef __STDC__
Index: lisp/ChangeLog
===================================================================
RCS file: /cvs/emacs/lisp/ChangeLog,v
retrieving revision 1.4644
diff -u -2 -b -r1.4644 ChangeLog
--- lisp/ChangeLog 18 Dec 2002 05:16:09 -0000 1.4644
+++ lisp/ChangeLog 18 Dec 2002 16:27:05 -0000
@@ -1,2 +1,22 @@
+2002-12-18 Joe Buehler <jhpb@draco.hekimian.com>
+
+ * Makefile.in: Use @EXEEXT@ for Cygwin.
+
+ * comint.el:
+ * dired-aux.el:
+ * dired.el:
+ * dirtrack.el:
+ * dos-w32.el:
+ * fast-lock.el:
+ * filecache.el:
+ * files.el:
+ * hippie-exp.el:
+ * international/mule.el:
+ * net/browse-url.el:
+ * pcomplete.el:
+ * recentf.el:
+ * shell.el:
+ * woman.el: Added cygwin to system-type comparisons.
+
2002-12-18 John Paul Wallington <jpw@shootybangbang.com>
Index: lisp/Makefile.in
===================================================================
RCS file: /cvs/emacs/lisp/Makefile.in,v
retrieving revision 1.38
diff -u -2 -b -r1.38 Makefile.in
--- lisp/Makefile.in 20 Nov 2002 07:15:41 -0000 1.38
+++ lisp/Makefile.in 18 Dec 2002 16:27:05 -0000
@@ -38,5 +38,5 @@
lisptagsfiles1 = $(lisp)/[a-zA-Z]*.el
lisptagsfiles2 = $(lisp)/[a-zA-Z]*/[a-zA-Z]*.el
-ETAGS = ../lib-src/etags
+ETAGS = ../lib-src/etags@EXEEXT@
# Files which should not be compiled. If you change the name `DONTCOMPILE'
Index: lisp/comint.el
===================================================================
RCS file: /cvs/emacs/lisp/comint.el,v
retrieving revision 1.284
diff -u -2 -b -r1.284 comint.el
--- lisp/comint.el 10 Sep 2002 16:44:58 -0000 1.284
+++ lisp/comint.el 18 Dec 2002 16:27:05 -0000
@@ -2534,5 +2534,5 @@
(defvar comint-file-name-chars
- (if (memq system-type '(ms-dos windows-nt))
+ (if (memq system-type '(ms-dos windows-nt cygwin))
"~/A-Za-z0-9_^$!#%&{}@`'.,:()-"
"~/A-Za-z0-9+@:_.$#%,={}-")
@@ -2659,5 +2659,5 @@
"Dynamically complete at point as a filename.
See `comint-dynamic-complete-filename'. Returns t if successful."
- (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt)))
+ (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin)))
(completion-ignored-extensions comint-completion-fignore)
;; If we bind this, it breaks remote directory tracking in rlogin.el.
@@ -2748,5 +2748,5 @@
See also `comint-dynamic-complete-filename'."
- (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt)))
+ (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin)))
(suffix (cond ((not comint-completion-addsuffix) "")
((not (consp comint-completion-addsuffix)) " ")
@@ -2789,5 +2789,5 @@
"List in help buffer possible completions of the filename at point."
(interactive)
- (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt)))
+ (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin)))
;; If we bind this, it breaks remote directory tracking in rlogin.el.
;; I think it was originally bound to solve file completion problems,
Index: lisp/dired-aux.el
===================================================================
RCS file: /cvs/emacs/lisp/dired-aux.el,v
retrieving revision 1.107
diff -u -2 -b -r1.107 dired-aux.el
--- lisp/dired-aux.el 11 Nov 2002 11:44:05 -0000 1.107
+++ lisp/dired-aux.el 18 Dec 2002 16:27:05 -0000
@@ -1259,5 +1259,5 @@
;; case-insensitive, and Emacs will try to move
;; foo -> foo/foo, which fails.
- (if (and (memq system-type '(ms-dos windows-nt))
+ (if (and (memq system-type '(ms-dos windows-nt cygwin))
(eq op-symbol 'move)
dired-one-file
Index: lisp/dired.el
===================================================================
RCS file: /cvs/emacs/lisp/dired.el,v
retrieving revision 1.246
diff -u -2 -b -r1.246 dired.el
--- lisp/dired.el 21 Nov 2002 17:31:51 -0000 1.246
+++ lisp/dired.el 18 Dec 2002 16:27:06 -0000
@@ -66,5 +66,5 @@
;;;###autoload
(defvar dired-chown-program
- (if (memq system-type '(hpux dgux usg-unix-v irix linux gnu/linux))
+ (if (memq system-type '(hpux dgux usg-unix-v irix linux gnu/linux cygwin))
"chown"
(if (file-exists-p "/usr/sbin/chown")
Index: lisp/dirtrack.el
===================================================================
RCS file: /cvs/emacs/lisp/dirtrack.el,v
retrieving revision 1.11
diff -u -2 -b -r1.11 dirtrack.el
--- lisp/dirtrack.el 7 Feb 2001 23:38:46 -0000 1.11
+++ lisp/dirtrack.el 18 Dec 2002 16:27:06 -0000
@@ -6,5 +6,5 @@
;; Created: Sun Nov 17 1996
;; Keywords: processes
-;; Time-stamp: <1999-02-21 01:27:24 pbreton>
+;; Time-stamp: <2002-12-18 10:43:13 jbarranquero>
;; This file is part of GNU Emacs.
@@ -168,5 +168,5 @@
(defcustom dirtrack-directory-function
- (if (memq system-type (list 'ms-dos 'windows-nt))
+ (if (memq system-type (list 'ms-dos 'windows-nt 'cygwin))
'dirtrack-windows-directory-function
'dirtrack-default-directory-function)
@@ -177,5 +177,5 @@
(defcustom dirtrack-canonicalize-function
- (if (memq system-type (list 'ms-dos 'windows-nt))
+ (if (memq system-type (list 'ms-dos 'windows-nt 'cygwin))
'downcase 'identity)
"*Function to apply to the default directory for comparison purposes."
Index: lisp/dos-w32.el
===================================================================
RCS file: /cvs/emacs/lisp/dos-w32.el,v
retrieving revision 1.34
diff -u -2 -b -r1.34 dos-w32.el
--- lisp/dos-w32.el 11 Jul 2002 17:24:10 -0000 1.34
+++ lisp/dos-w32.el 18 Dec 2002 16:27:06 -0000
@@ -198,5 +198,5 @@
"Return FILENAME in a canonicalized form for use with the functions
dealing with untranslated filesystems."
- (if (memq system-type '(ms-dos windows-nt))
+ (if (memq system-type '(ms-dos windows-nt cygwin))
;; The canonical form for DOS/W32 is with A-Z downcased and all
;; directory separators changed to directory-sep-char.
Index: lisp/fast-lock.el
===================================================================
RCS file: /cvs/emacs/lisp/fast-lock.el,v
retrieving revision 1.25
diff -u -2 -b -r1.25 fast-lock.el
--- lisp/fast-lock.el 27 Nov 2001 15:52:52 -0000 1.25
+++ lisp/fast-lock.el 18 Dec 2002 16:27:06 -0000
@@ -554,5 +554,5 @@
(let* ((bufile (expand-file-name buffer-file-truename))
(chars-alist
- (if (memq system-type '(emx windows-nt))
+ (if (memq system-type '(emx windows-nt cygwin))
'((?/ . (?#)) (?# . (?# ?#)) (?: . (?\;)) (?\; . (?\; ?\;)))
'((?/ . (?#)) (?# . (?# ?#)))))
Index: lisp/filecache.el
===================================================================
RCS file: /cvs/emacs/lisp/filecache.el,v
retrieving revision 1.14
diff -u -2 -b -r1.14 filecache.el
--- lisp/filecache.el 30 Apr 2002 20:42:40 -0000 1.14
+++ lisp/filecache.el 18 Dec 2002 16:27:06 -0000
@@ -188,5 +188,5 @@
(defcustom file-cache-completion-ignore-case
- (if (memq system-type (list 'ms-dos 'windows-nt))
+ (if (memq system-type (list 'ms-dos 'windows-nt 'cygwin))
t
completion-ignore-case)
@@ -198,5 +198,5 @@
(defcustom file-cache-case-fold-search
- (if (memq system-type (list 'ms-dos 'windows-nt))
+ (if (memq system-type (list 'ms-dos 'windows-nt 'cygwin))
t
case-fold-search)
@@ -208,5 +208,5 @@
(defcustom file-cache-assoc-function
- (if (memq system-type (list 'ms-dos 'windows-nt))
+ (if (memq system-type (list 'ms-dos 'windows-nt 'cygwin))
'assoc-ignore-case
'assoc)
Index: lisp/files.el
===================================================================
RCS file: /cvs/emacs/lisp/files.el,v
retrieving revision 1.627
diff -u -2 -b -r1.627 files.el
--- lisp/files.el 8 Dec 2002 13:20:42 -0000 1.627
+++ lisp/files.el 18 Dec 2002 16:27:07 -0000
@@ -216,5 +216,5 @@
"\\(/\\.\\.?[^/]\\)\\|" ; leading dots
"\\(/[^/.]+\\.[^/.]*\\.\\)")) ; more than a single dot
- ((memq system-type '(ms-dos windows-nt))
+ ((memq system-type '(ms-dos windows-nt cygwin))
(concat "^\\([^A-Z[-`a-z]\\|..+\\)?:\\|" ; colon except after drive
"[|<>\"?*\000-\031]")) ; invalid characters
@@ -1029,4 +1029,5 @@
;; Novell Netware allows drive letters beyond `Z:'.
(not (and (or (eq system-type 'ms-dos)
+ (eq system-type 'cygwin)
(eq system-type 'windows-nt))
(save-match-data
@@ -1774,5 +1775,5 @@
;; Find first matching alist entry.
(let ((case-fold-search
- (memq system-type '(vax-vms windows-nt))))
+ (memq system-type '(vax-vms windows-nt cygwin))))
(while (and (not mode) alist)
(if (string-match (car (car alist)) name)
@@ -2614,5 +2615,5 @@
(if (file-name-absolute-p backup-directory)
(progn
- (when (memq system-type '(windows-nt ms-dos))
+ (when (memq system-type '(windows-nt ms-dos cygwin))
;; Normalize DOSish file names: downcase the drive
;; letter, if any, and replace the leading "x:" with
@@ -2736,4 +2737,5 @@
;; drive names, they can't be relative, so return the absolute name.
(if (and (or (eq system-type 'ms-dos)
+ (eq system-type 'cygwin)
(eq system-type 'windows-nt))
(not (string-equal (substring fname 0 2)
@@ -3880,5 +3882,5 @@
(save-match-data
(cond
- ((memq system-type '(ms-dos windows-nt))
+ ((memq system-type '(ms-dos windows-nt cygwin))
;; DOS/Windows don't allow `"' in file names. So if the
;; argument has quotes, we can safely assume it is already
Index: lisp/hippie-exp.el
===================================================================
RCS file: /cvs/emacs/lisp/hippie-exp.el,v
retrieving revision 1.24
diff -u -2 -b -r1.24 hippie-exp.el
--- lisp/hippie-exp.el 20 Dec 2001 18:41:15 -0000 1.24
+++ lisp/hippie-exp.el 18 Dec 2002 16:27:07 -0000
@@ -504,5 +504,5 @@
(cond ((memq system-type '(vax-vms axp-vms))
"-a-zA-Z0-9_/.,~^#$+=:\\[\\]")
- ((memq system-type '(ms-dos windows-nt))
+ ((memq system-type '(ms-dos windows-nt cygwin))
"-a-zA-Z0-9_/.,~^#$+=:\\\\")
(t ;; More strange file formats ?
Index: lisp/pcomplete.el
===================================================================
RCS file: /cvs/emacs/lisp/pcomplete.el,v
retrieving revision 1.11
diff -u -2 -b -r1.11 pcomplete.el
--- lisp/pcomplete.el 5 Aug 2002 20:07:12 -0000 1.11
+++ lisp/pcomplete.el 18 Dec 2002 16:27:10 -0000
@@ -140,5 +140,5 @@
:group 'pcomplete)
-(defcustom pcomplete-ignore-case (memq system-type '(ms-dos windows-nt))
+(defcustom pcomplete-ignore-case (memq system-type '(ms-dos windows-nt cygwin))
"*If non-nil, ignore case when doing filename completion."
:type 'boolean
Index: lisp/recentf.el
===================================================================
RCS file: /cvs/emacs/lisp/recentf.el,v
retrieving revision 1.21
diff -u -2 -b -r1.21 recentf.el
--- lisp/recentf.el 29 Apr 2002 09:27:25 -0000 1.21
+++ lisp/recentf.el 18 Dec 2002 16:27:10 -0000
@@ -202,5 +202,5 @@
;;;;
(defconst recentf-case-fold-search
- (memq system-type '(vax-vms windows-nt))
+ (memq system-type '(vax-vms windows-nt cygwin))
"Non-nil if recentf searches and matches should ignore case.")
Index: lisp/shell.el
===================================================================
RCS file: /cvs/emacs/lisp/shell.el,v
retrieving revision 1.117
diff -u -2 -b -r1.117 shell.el
--- lisp/shell.el 31 Oct 2002 23:37:15 -0000 1.117
+++ lisp/shell.el 18 Dec 2002 16:27:10 -0000
@@ -166,5 +166,5 @@
(defvar shell-file-name-chars
- (if (memq system-type '(ms-dos windows-nt))
+ (if (memq system-type '(ms-dos windows-nt cygwin))
"~/A-Za-z0-9_^$!#%&{}@`'.,:()-"
"~/A-Za-z0-9+@:_.$#%,={}-")
Index: lisp/woman.el
===================================================================
RCS file: /cvs/emacs/lisp/woman.el,v
retrieving revision 1.14
diff -u -2 -b -r1.14 woman.el
--- lisp/woman.el 23 Oct 2002 09:08:04 -0000 1.14
+++ lisp/woman.el 18 Dec 2002 16:27:11 -0000
@@ -1348,5 +1348,5 @@
(if (string= (substring dir -1) "/")
(setq dir (substring dir 0 -1)))
- (if (memq system-type '(windows-nt ms-dos)) ; what else?
+ (if (memq system-type '(windows-nt ms-dos cygwin)) ; what else?
;; Match capitalization used by `file-name-directory':
(setq dir (concat (file-name-directory dir)
Index: lisp/gnus/ChangeLog
===================================================================
RCS file: /cvs/emacs/lisp/gnus/ChangeLog,v
retrieving revision 1.224
diff -u -2 -b -r1.224 ChangeLog
--- lisp/gnus/ChangeLog 15 Dec 2002 19:57:31 -0000 1.224
+++ lisp/gnus/ChangeLog 18 Dec 2002 16:27:12 -0000
@@ -1,2 +1,6 @@
+2002-12-18 Joe Buehler <jhpb@draco.hekimian.com>
+
+ * nnheader.el: Added cygwin to system-type comparisons.
+
2002-11-29 ShengHuo ZHU <zsh@cs.rochester.edu>
Index: lisp/gnus/nnheader.el
===================================================================
RCS file: /cvs/emacs/lisp/gnus/nnheader.el,v
retrieving revision 1.15
diff -u -2 -b -r1.15 nnheader.el
--- lisp/gnus/nnheader.el 21 Jun 2002 18:31:10 -0000 1.15
+++ lisp/gnus/nnheader.el 18 Dec 2002 16:27:13 -0000
@@ -654,5 +654,5 @@
;; alone.
(if (and (featurep 'xemacs)
- (memq system-type '(win32 w32 mswindows windows-nt)))
+ (memq system-type '(win32 w32 mswindows windows-nt cygwin)))
;; This is needed on NT and stuff, because
;; file-name-nondirectory is not enough to split
Index: lisp/international/mule.el
===================================================================
RCS file: /cvs/emacs/lisp/international/mule.el,v
retrieving revision 1.171
diff -u -2 -b -r1.171 mule.el
--- lisp/international/mule.el 17 Dec 2002 11:56:56 -0000 1.171
+++ lisp/international/mule.el 18 Dec 2002 16:27:13 -0000
@@ -1607,5 +1607,5 @@
"Return the coding system specified by `auto-coding-alist' for FILENAME."
(let ((alist auto-coding-alist)
- (case-fold-search (memq system-type '(vax-vms windows-nt ms-dos)))
+ (case-fold-search (memq system-type '(vax-vms windows-nt ms-dos cygwin)))
coding-system)
(while (and alist (not coding-system))
Index: lisp/net/browse-url.el
===================================================================
RCS file: /cvs/emacs/lisp/net/browse-url.el,v
retrieving revision 1.25
diff -u -2 -b -r1.25 browse-url.el
--- lisp/net/browse-url.el 11 Dec 2002 06:56:22 -0000 1.25
+++ lisp/net/browse-url.el 18 Dec 2002 16:27:14 -0000
@@ -228,5 +228,5 @@
;;;###autoload
(defcustom browse-url-browser-function
- (if (memq system-type '(windows-nt ms-dos))
+ (if (memq system-type '(windows-nt ms-dos cygwin))
'browse-url-default-windows-browser
'browse-url-default-browser)
@@ -382,5 +382,5 @@
;; applies.
("^/\\([^:@]+@\\)?\\([^:]+\\):/*" . "ftp://\\1\\2/")
- (,@ (if (memq system-type '(windows-nt ms-dos))
+ (,@ (if (memq system-type '(windows-nt ms-dos cygwin))
'(("^\\([a-zA-Z]:\\)[\\/]" . "file:\\1/")
("^[\\/][\\/]+" . "file://"))))
Index: lispref/ChangeLog
===================================================================
RCS file: /cvs/emacs/lispref/ChangeLog,v
retrieving revision 1.59
diff -u -2 -b -r1.59 ChangeLog
--- lispref/ChangeLog 9 Dec 2002 06:09:06 -0000 1.59
+++ lispref/ChangeLog 18 Dec 2002 16:27:14 -0000
@@ -1,2 +1,6 @@
+2002-12-18 Joe Buehler <jhpb@draco.hekimian.com>
+
+ * os.texi (System Environment): Added cygwin system-type.
+
2002-12-07 Markus Rost <rost@math.ohio-state.edu>
@@ -11,4 +15,5 @@
2002-10-23 Kai Gro^[,A_^[(Bjohann <kai.grossjohann@uni-duisburg.de>
+
From Michael Albinus <Michael.Albinus@alcatel.de>.
Index: lispref/os.texi
===================================================================
RCS file: /cvs/emacs/lispref/os.texi,v
retrieving revision 1.50
diff -u -2 -b -r1.50 os.texi
--- lispref/os.texi 14 Oct 2002 01:34:48 -0000 1.50
+++ lispref/os.texi 18 Dec 2002 16:27:16 -0000
@@ -614,4 +614,7 @@
Berkeley BSD.
+@item cygwin
+Cygwin.
+
@item dgux
Data General DGUX operating system.
Index: lwlib/ChangeLog
===================================================================
RCS file: /cvs/emacs/lwlib/ChangeLog,v
retrieving revision 1.74
diff -u -2 -b -r1.74 ChangeLog
--- lwlib/ChangeLog 21 Nov 2002 10:58:13 -0000 1.74
+++ lwlib/ChangeLog 18 Dec 2002 16:27:16 -0000
@@ -1,2 +1,6 @@
+2002-12-18 Joe Buehler <jhpb@draco.hekimian.com>
+
+ * Makefile.in: Use @EXEEXT@ for Cygwin.
+
2002-11-21 Dave Love <fx@gnu.org>
Index: lwlib/Makefile.in
===================================================================
RCS file: /cvs/emacs/lwlib/Makefile.in,v
retrieving revision 1.26
diff -u -2 -b -r1.26 Makefile.in
--- lwlib/Makefile.in 28 Apr 2002 13:33:40 -0000 1.26
+++ lwlib/Makefile.in 18 Dec 2002 16:27:16 -0000
@@ -64,5 +64,5 @@
TAGS:
- ../lib-src/etags $(srcdir)/*.[ch]
+ ../lib-src/etags@EXEEXT@ $(srcdir)/*.[ch]
tags: TAGS
.PHONY: tags
Index: oldXMenu/ChangeLog
===================================================================
RCS file: /cvs/emacs/oldXMenu/ChangeLog,v
retrieving revision 1.14
diff -u -2 -b -r1.14 ChangeLog
--- oldXMenu/ChangeLog 22 Apr 2002 18:27:39 -0000 1.14
+++ oldXMenu/ChangeLog 18 Dec 2002 16:27:16 -0000
@@ -1,2 +1,6 @@
+2002-12-18 Joe Buehler <jhpb@draco.hekimian.com>
+
+ * Makefile.in: Use @EXEEXT@ for Cygwin.
+
2002-04-22 Jan D. <jan.h.d@swipnet.se>
Index: oldXMenu/Makefile.in
===================================================================
RCS file: /cvs/emacs/oldXMenu/Makefile.in,v
retrieving revision 1.1
diff -u -2 -b -r1.1 Makefile.in
--- oldXMenu/Makefile.in 3 Oct 1999 19:36:09 -0000 1.1
+++ oldXMenu/Makefile.in 18 Dec 2002 16:27:16 -0000
@@ -10,5 +10,5 @@
AS = as
LD = ld
- TAGS = etags
+ TAGS = etags@EXEEXT@
RM = rm -f
MV = mv
Index: src/ChangeLog
===================================================================
RCS file: /cvs/emacs/src/ChangeLog,v
retrieving revision 1.2999
diff -u -2 -b -r1.2999 ChangeLog
--- src/ChangeLog 18 Dec 2002 06:16:27 -0000 1.2999
+++ src/ChangeLog 18 Dec 2002 16:27:17 -0000
@@ -1,5 +1,18 @@
+2002-12-18 Joe Buehler <jhpb@draco.hekimian.com>
+
+ * fileio.c: Support // at start of name for Cygwin (just added proper
+ preprocessor tests).
+
+ * keyboard.c: Port to Cygwin (just added proper preprocessor tests).
+
+ * Makefile.in: Use @EXEEXT@ for Cygwin.
+
+ * mem-limits.h: Added ifdef to define BSD4_2 for Cygwin.
+
+ * s/cygwin.h: Added for Cygwin port.
+
2002-12-17 Ben Key <bkey1@tampabay.rr.com>
- * Revisited my earlier fix for the following entry in
- etc/PROBLEMS:
+
+ Revisited my earlier fix for the following entry in etc/PROBLEMS:
"Emacs built on Windows 9x/ME crashes at startup on Windows XP,
or Emacs builtpart of on XP crashes at startup on Windows 9x/ME."
Index: src/Makefile.in
===================================================================
RCS file: /cvs/emacs/src/Makefile.in,v
retrieving revision 1.263
diff -u -2 -b -r1.263 Makefile.in
--- src/Makefile.in 17 Dec 2002 01:25:19 -0000 1.263
+++ src/Makefile.in 18 Dec 2002 16:27:17 -0000
@@ -468,5 +468,5 @@
Note that some people don't have '.' in their paths, so we must
use ./prefix-args. */
-#define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags`
+#define YMF_PASS_LDFLAGS(flags) `./prefix-args@EXEEXT@ -Xlinker flags`
#else
#define YMF_PASS_LDFLAGS(flags) flags
@@ -867,18 +867,18 @@
#endif
-all: emacs OTHER_FILES
+all: emacs@EXEEXT@ OTHER_FILES
-emacs: temacs ${etc}DOC ${lisp}
+emacs@EXEEXT@: temacs@EXEEXT@ ${etc}DOC ${lisp}
#ifdef CANNOT_DUMP
- rm -f emacs
- ln temacs emacs
+ rm -f emacs@EXEEXT@
+ ln temacs@EXEEXT@ emacs@EXEEXT@
#else
#ifdef HAVE_SHM
- LC_ALL=C ./temacs -nl -batch -l loadup dump
+ LC_ALL=C ./temacs@EXEEXT@ -nl -batch -l loadup dump
#else /* ! defined (HAVE_SHM) */
- LC_ALL=C ./temacs -batch -l loadup dump
+ LC_ALL=C ./temacs@EXEEXT@ -batch -l loadup dump
#endif /* ! defined (HAVE_SHM) */
#endif /* ! defined (CANNOT_DUMP) */
- -./emacs -q -batch -f list-load-path-shadows
+ -./emacs@EXEEXT@ -q -batch -f list-load-path-shadows
/* We run make-docfile twice because the command line may get too long
@@ -895,6 +895,6 @@
${libsrc}make-docfile -a ${etc}DOC -d ${srcdir} ${SOME_MACHINE_LISP} ${shortlisp}
-${libsrc}make-docfile:
- cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile
+${libsrc}make-docfile@EXEEXT@:
+ cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile@EXEEXT@
/* Some systems define this to cause parallel Make-ing. */
@@ -903,7 +903,7 @@
#endif
-temacs: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args
+temacs@EXEEXT@: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args@EXEEXT@
$(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \
- -o temacs ${STARTFILES} ${obj} ${otherobj} \
+ -o temacs@EXEEXT@ ${STARTFILES} ${obj} ${otherobj} \
OBJECTS_MACHINE ${LIBES}
@@ -911,6 +911,6 @@
often contain options that have to do with using Emacs's crt0,
which are only good with temacs. */
-prefix-args: prefix-args.c $(config_h)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args
+prefix-args@EXEEXT@: prefix-args.c $(config_h)
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args@EXEEXT@
/* Don't lose if this was not defined. */
@@ -1212,9 +1212,9 @@
${emacsapp}Contents/Resources/Emacs.rsrc
-${emacsapp}Contents/MacOS/Emacs: emacs
+${emacsapp}Contents/MacOS/Emacs: emacs@EXEEXT@
if [ -d ${emacsapp}Contents/MacOS/ ]; then true; else \
mkdir ${emacsapp}Contents/MacOS/; \
fi
- cd ${emacsapp}Contents/MacOS/; cp ../../../../src/emacs Emacs
+ cd ${emacsapp}Contents/MacOS/; cp ../../../../src/emacs@EXEEXT@ Emacs@EXEEXT@
${emacsapp}Contents/Resources/Emacs.rsrc: ../mac/src/Emacs.r
@@ -1225,14 +1225,14 @@
#endif
-${libsrc}emacstool: ${libsrc}emacstool.c
- cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool
+${libsrc}emacstool@EXEEXT@: ${libsrc}emacstool.c
+ cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool@EXEEXT@
bootstrapclean:
- rm -f bootstrap-emacs
+ rm -f bootstrap-emacs@EXEEXT@
mostlyclean:
- rm -f temacs prefix-args core *.core \#* *.o libXMenu11.a liblw.a
+ rm -f temacs@EXEEXT@ prefix-args@EXEEXT@ core *.core \#* *.o libXMenu11.a liblw.a
rm -f ../etc/DOC
- rm -f bootstrap-emacs
+ rm -f bootstrap-emacs@EXEEXT@
clean: mostlyclean
- rm -f emacs-* emacs
+ rm -f emacs-*@EXEEXT@ emacs@EXEEXT@
/**/# This is used in making a distribution.
/**/# Do not use it on development directories!
@@ -1247,5 +1247,5 @@
rm -f TAGS
versionclean:
- -rm -f emacs emacs-* ../etc/DOC*
+ -rm -f emacs@EXEEXT@ emacs-*@EXEEXT@ ../etc/DOC*
extraclean: distclean
-rm -f *~ \#* m/?*~ s/?*~
@@ -1269,13 +1269,13 @@
TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
- ../lib-src/etags --include=TAGS-LISP --include=${lwlibdir}/TAGS \
+ ../lib-src/etags@EXEEXT@ --include=TAGS-LISP --include=${lwlibdir}/TAGS \
--regex='/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \
$(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
frc:
TAGS-LISP: frc
- $(MAKE) -f ${lispdir}Makefile TAGS-LISP ETAGS=../lib-src/etags
+ $(MAKE) -f ${lispdir}Makefile TAGS-LISP ETAGS=../lib-src/etags@EXEEXT@
$(lwlibdir)TAGS:
- (cd $(lwlibdir); $(MAKE) -f $(lwlibdir)Makefile tags ETAGS=../lib-src/etags)
+ (cd $(lwlibdir); $(MAKE) -f $(lwlibdir)Makefile tags ETAGS=../lib-src/etags@EXEEXT@)
tags: TAGS TAGS-LISP $(lwlibdir)TAGS
@@ -1285,19 +1285,19 @@
/* Bootstrapping. */
-bootstrap: bootstrap-emacs
+bootstrap: bootstrap-emacs@EXEEXT@
/* Dump an Emacs executable named bootstrap-emacs containing the
files from loadup.el in source form. */
-bootstrap-emacs: temacs
+bootstrap-emacs@EXEEXT@: temacs@EXEEXT@
#ifdef CANNOT_DUMP
- ln temacs bootstrap-emacs
+ ln temacs@EXEEXT@ bootstrap-emacs@EXEEXT@
#else
#ifdef HAVE_SHM
- ./temacs -nl -batch -l loadup bootstrap
+ ./temacs@EXEEXT@ -nl -batch -l loadup bootstrap
#else /* ! defined (HAVE_SHM) */
- ./temacs --batch --load loadup bootstrap
+ ./temacs@EXEEXT@ --batch --load loadup bootstrap
#endif /* ! defined (HAVE_SHM) */
+ mv -f emacs@EXEEXT@ bootstrap-emacs@EXEEXT@
#endif /* ! defined (CANNOT_DUMP) */
- mv -f emacs bootstrap-emacs
Index: src/fileio.c
===================================================================
RCS file: /cvs/emacs/src/fileio.c,v
retrieving revision 1.468
diff -u -2 -b -r1.468 fileio.c
--- src/fileio.c 17 Dec 2002 11:39:59 -0000 1.468
+++ src/fileio.c 18 Dec 2002 16:27:18 -0000
@@ -2053,11 +2053,11 @@
{
if ((p[0] == '~'
-#if defined (APOLLO) || defined (WINDOWSNT)
- /* // at start of file name is meaningful in Apollo and
- WindowsNT systems. */
+#if defined (APOLLO) || defined (WINDOWSNT) || defined(CYGWIN)
+ /* // at start of file name is meaningful in Apollo,
+ WindowsNT and Cygwin systems. */
|| (IS_DIRECTORY_SEP (p[0]) && p - 1 != nm)
-#else /* not (APOLLO || WINDOWSNT) */
+#else /* not (APOLLO || WINDOWSNT || CYGWIN) */
|| IS_DIRECTORY_SEP (p[0])
-#endif /* not (APOLLO || WINDOWSNT) */
+#endif /* not (APOLLO || WINDOWSNT || CYGWIN) */
)
&& p != nm
@@ -2231,9 +2231,9 @@
for (p = xnm; p != x; p++)
if ((p[0] == '~'
-#if defined (APOLLO) || defined (WINDOWSNT)
+#if defined (APOLLO) || defined (WINDOWSNT) || defined(CYGWIN)
|| (IS_DIRECTORY_SEP (p[0]) && p - 1 != xnm)
-#else /* not (APOLLO || WINDOWSNT) */
+#else /* not (APOLLO || WINDOWSNT || CYGWIN) */
|| IS_DIRECTORY_SEP (p[0])
-#endif /* not (APOLLO || WINDOWSNT) */
+#endif /* not (APOLLO || WINDOWSNT || CYGWIN) */
)
&& p != xnm && IS_DIRECTORY_SEP (p[-1]))
Index: src/keyboard.c
===================================================================
RCS file: /cvs/emacs/src/keyboard.c,v
retrieving revision 1.716
diff -u -2 -b -r1.716 keyboard.c
--- src/keyboard.c 22 Nov 2002 12:23:13 -0000 1.716
+++ src/keyboard.c 18 Dec 2002 16:27:19 -0000
@@ -6493,5 +6493,5 @@
n_to_read = sizeof cbuf;
#else /* no FIONREAD */
-#if defined (USG) || defined (DGUX)
+#if defined (USG) || defined (DGUX) || defined(CYGWIN)
/* Read some input if available, but don't wait. */
n_to_read = sizeof cbuf;
@@ -6550,7 +6550,7 @@
#ifndef FIONREAD
-#if defined (USG) || defined (DGUX)
+#if defined (USG) || defined (DGUX) || defined (CYGWIN)
fcntl (input_fd, F_SETFL, 0);
-#endif /* USG or DGUX */
+#endif /* USG or DGUX or CYGWIN */
#endif /* no FIONREAD */
for (i = 0; i < nread; i++)
Index: src/mem-limits.h
===================================================================
RCS file: /cvs/emacs/src/mem-limits.h,v
retrieving revision 1.31
diff -u -2 -b -r1.31 mem-limits.h
--- src/mem-limits.h 19 Aug 2002 17:45:50 -0000 1.31
+++ src/mem-limits.h 18 Dec 2002 16:27:20 -0000
@@ -47,4 +47,8 @@
#endif
+#ifdef CYGWIN
+#define BSD4_2
+#endif
+
#ifndef BSD4_2
#ifndef USG
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCHES] 21.3.50 for Cygwin: patch 7
2002-12-18 10:10 ` Juanma Barranquero
2002-12-18 13:46 ` Joe Buehler
@ 2002-12-19 18:32 ` Richard Stallman
1 sibling, 0 replies; 22+ messages in thread
From: Richard Stallman @ 2002-12-19 18:32 UTC (permalink / raw)
Cc: emacs-devel
What's the legal status? Have we papers? Can we install them?
In case it isn't clear, the first question means,
who are all the authors of this code?
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2002-12-19 18:32 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-16 15:58 [PATCHES] 21.3.50 for Cygwin: patch 7 jasonr
2002-12-16 16:40 ` Juanma Barranquero
-- strict thread matches above, loose matches on Subject: below --
2002-12-10 21:48 Joe Buehler
2002-12-11 0:01 ` Kim F. Storm
[not found] ` <3DF67390.2020106@hekimian.com>
2002-12-11 0:30 ` Kim F. Storm
2002-12-12 14:30 ` Joe Buehler
2002-12-12 16:16 ` Joe Buehler
2002-12-12 17:23 ` Eli Zaretskii
2002-12-13 22:21 ` Richard Stallman
2002-12-12 17:09 ` Kim F. Storm
2002-12-13 22:21 ` Richard Stallman
2002-12-12 18:14 ` Paul Eggert
2002-12-13 15:14 ` Joe Buehler
2002-12-14 18:32 ` Richard Stallman
2002-12-16 14:37 ` Joe Buehler
2002-12-16 15:03 ` Juanma Barranquero
2002-12-16 17:33 ` Joe Buehler
2002-12-18 10:10 ` Juanma Barranquero
2002-12-18 13:46 ` Joe Buehler
2002-12-18 16:45 ` Juanma Barranquero
2002-12-19 18:32 ` Richard Stallman
2002-12-11 19:53 ` Jason Rumney
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.