[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: USE_LSB_TAG and MS-DOS
From: |
Michael Mauger |
Subject: |
Re: USE_LSB_TAG and MS-DOS |
Date: |
Tue, 18 May 2004 12:08:21 -0700 (PDT) |
Below is a patch for the W32 MinGW (GCC) build with USE_LSB_TAG enabled.
There were a couple of references to VALMASK which didn't make sense with
USE_LSB_TAG. There were also a couple of color functions that returned
W32 COLORREFs but treated the return value as Lisp_Int objects. (Thanks
to YAMAMOTO Mitsuharu for pointing us in the right direction.)
I'm now building and using the USE_LSB_TAG emacs on W32 without obvious
problems.
Please review and apply if acceptable.
2004-05-18 Michael Mauger <address@hidden>
* emacs/src/w32fns.c (w32_color_map_lookup): Return Lisp_Object,
not COLORREF.
(x_to_w32_color): Return Lisp_Object, not COLORREF.
* emacs/src/w32proc.c (create_child) [USE_LSB_TAG]: Don't mask
out upper bits of pid.
* emacs/src/w32heap.c (init_heap) [USE_LSB_TAG]: Don't check
address range.
Index: emacs/src/w32heap.c
===================================================================
RCS file: /c/cvsroot/emacs/emacs/src/w32heap.c,v
retrieving revision 1.23
diff -u -r1.23 w32heap.c
--- emacs/src/w32heap.c 1 Sep 2003 15:45:57 -0000 1.23
+++ emacs/src/w32heap.c 18 May 2004 18:14:04 -0000
@@ -245,6 +245,7 @@
exit (1);
}
+#ifndef USE_LSB_TAG
/* Ensure that the addresses don't use the upper tag bits since
the Lisp type goes there. */
if (((unsigned long) data_region_base & ~VALMASK) != 0)
@@ -252,6 +253,7 @@
printf ("Error: The heap was allocated in upper memory.\n");
exit (1);
}
+#endif
data_region_end = data_region_base;
real_data_region_end = data_region_end;
Index: emacs/src/w32proc.c
===================================================================
RCS file: /c/cvsroot/emacs/emacs/src/w32proc.c,v
retrieving revision 1.56
diff -u -r1.56 w32proc.c
--- emacs/src/w32proc.c 1 Sep 2003 15:45:57 -0000 1.56
+++ emacs/src/w32proc.c 18 May 2004 18:31:13 -0000
@@ -366,8 +366,10 @@
if (cp->pid < 0)
cp->pid = -cp->pid;
+#ifndef USE_LSB_TAG
/* pid must fit in a Lisp_Int */
cp->pid = (cp->pid & VALMASK);
+#endif
*pPid = cp->pid;
Index: emacs/src/w32fns.c
===================================================================
RCS file: /c/cvsroot/emacs/emacs/src/w32fns.c,v
retrieving revision 1.232
diff -u -r1.232 w32fns.c
--- emacs/src/w32fns.c 14 May 2004 17:37:26 -0000 1.232
+++ emacs/src/w32fns.c 18 May 2004 18:15:19 -0000
@@ -828,7 +828,7 @@
return Qnil;
}
-COLORREF
+Lisp_Object
w32_color_map_lookup (colorname)
char *colorname;
{
@@ -847,7 +847,7 @@
if (lstrcmpi (SDATA (tem), colorname) == 0)
{
- ret = XUINT (Fcdr (elt));
+ ret = Fcdr (elt);
break;
}
@@ -910,7 +910,7 @@
}
-COLORREF
+Lisp_Object
x_to_w32_color (colorname)
char * colorname;
{
@@ -970,7 +970,7 @@
if (i == 2)
{
UNBLOCK_INPUT;
- return (colorval);
+ return (make_number (colorval));
}
color = end;
}
@@ -1023,7 +1023,7 @@
if (*end != '\0')
break;
UNBLOCK_INPUT;
- return (colorval);
+ return (make_number (colorval));
}
if (*end != '/')
break;
@@ -1064,7 +1064,7 @@
if (*end != '\0')
break;
UNBLOCK_INPUT;
- return (colorval);
+ return (make_number (colorval));
}
if (*end != '/')
break;
- Re: USE_LSB_TAG and MS-DOS, (continued)
- Re: USE_LSB_TAG and MS-DOS, Eli Zaretskii, 2004/05/18
- Re: USE_LSB_TAG and MS-DOS, Andreas Schwab, 2004/05/18
- Re: USE_LSB_TAG and MS-DOS, Stefan Monnier, 2004/05/18
- Re: USE_LSB_TAG and MS-DOS, Eli Zaretskii, 2004/05/18
- Re: USE_LSB_TAG and MS-DOS, Stefan Monnier, 2004/05/18
- Re: USE_LSB_TAG and MS-DOS, Eli Zaretskii, 2004/05/19
- Re: USE_LSB_TAG and MS-DOS, Eli Zaretskii, 2004/05/20
Re: USE_LSB_TAG and MS-DOS, Eli Zaretskii, 2004/05/18
Re: USE_LSB_TAG and MS-DOS, Eli Zaretskii, 2004/05/18
Re: USE_LSB_TAG and MS-DOS,
Michael Mauger <=