From: Michael Mauger <mmaug@yahoo.com>
Subject: Re: USE_LSB_TAG and MS-DOS
Date: Tue, 18 May 2004 12:08:21 -0700 (PDT) [thread overview]
Message-ID: <20040518190821.72383.qmail@web60305.mail.yahoo.com> (raw)
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 <mmaug@yahoo.com>
* 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;
next reply other threads:[~2004-05-18 19:08 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-18 19:08 Michael Mauger [this message]
2004-05-18 22:10 ` USE_LSB_TAG and MS-DOS Stefan Monnier
2004-05-18 23:32 ` Jason Rumney
2004-05-19 14:58 ` Michael Mauger
-- strict thread matches above, loose matches on Subject: below --
2004-05-15 13:07 Eli Zaretskii
2004-05-15 15:10 ` Jason Rumney
2004-05-15 18:24 ` Eli Zaretskii
2004-05-17 8:13 ` Jason Rumney
2004-05-17 8:45 ` YAMAMOTO Mitsuharu
2004-05-18 20:34 ` Jason Rumney
2004-05-17 10:13 ` Eli Zaretskii
2004-05-17 10:30 ` Jason Rumney
2004-05-16 23:40 ` Stefan Monnier
2004-05-17 6:10 ` Eli Zaretskii
2004-05-17 16:22 ` Stefan Monnier
2004-05-17 22:31 ` Miles Bader
2004-05-18 13:36 ` Stefan Monnier
2004-05-18 15:00 ` Eli Zaretskii
2004-05-18 14:59 ` Andreas Schwab
2004-05-18 15:13 ` Stefan Monnier
2004-05-18 18:45 ` Eli Zaretskii
2004-05-18 19:12 ` Stefan Monnier
2004-05-19 6:25 ` Eli Zaretskii
2004-05-20 16:34 ` Eli Zaretskii
2004-05-18 15:08 ` Eli Zaretskii
2004-05-18 15:18 ` Stefan Monnier
2004-05-18 15:09 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040518190821.72383.qmail@web60305.mail.yahoo.com \
--to=mmaug@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).