From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Mauger Newsgroups: gmane.emacs.devel Subject: Re: USE_LSB_TAG and MS-DOS Date: Tue, 18 May 2004 12:08:21 -0700 (PDT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20040518190821.72383.qmail@web60305.mail.yahoo.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084909124 4867 80.91.224.253 (18 May 2004 19:38:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 18 May 2004 19:38:44 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue May 18 21:38:30 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BQAQ1-0001v1-00 for ; Tue, 18 May 2004 21:38:29 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BQAQ1-0002xz-00 for ; Tue, 18 May 2004 21:38:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BQA0P-0008OQ-JA for emacs-devel@quimby.gnus.org; Tue, 18 May 2004 15:12:01 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BQ9xQ-0007wO-8O for emacs-devel@gnu.org; Tue, 18 May 2004 15:08:56 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BQ9wt-0007pe-1U for emacs-devel@gnu.org; Tue, 18 May 2004 15:08:54 -0400 Original-Received: from [216.109.118.116] (helo=web60305.mail.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1BQ9ws-0007pP-LN for emacs-devel@gnu.org; Tue, 18 May 2004 15:08:22 -0400 Original-Received: from [158.171.31.11] by web60305.mail.yahoo.com via HTTP; Tue, 18 May 2004 12:08:21 PDT Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23652 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23652 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 * 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;