From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nozomu Ando Newsgroups: gmane.emacs.devel Subject: [Mac OS X] a patch for binary compatibility issue. Date: Sun, 08 May 2005 02:54:20 +0900 Message-ID: <86oebmdir7.fsf@almi.jk.homeunix.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1115488842 31282 80.91.229.2 (7 May 2005 18:00:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 7 May 2005 18:00:42 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 07 20:00:40 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DUTaH-0005c5-2X for ged-emacs-devel@m.gmane.org; Sat, 07 May 2005 19:59:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DUTiA-0006cl-Fx for ged-emacs-devel@m.gmane.org; Sat, 07 May 2005 14:07:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DUTgG-00062i-C5 for emacs-devel@gnu.org; Sat, 07 May 2005 14:05:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DUTgF-00062H-Fe for emacs-devel@gnu.org; Sat, 07 May 2005 14:05:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DUTf9-0005ff-EP for emacs-devel@gnu.org; Sat, 07 May 2005 14:04:27 -0400 Original-Received: from [17.250.248.45] (helo=smtpout.mac.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DUTb1-0000q6-6U for emacs-devel@gnu.org; Sat, 07 May 2005 14:00:11 -0400 Original-Received: from mac.com (smtpin07-en2 [10.13.10.152]) by smtpout.mac.com (Xserve/8.12.11/smtpout11/MantshX 4.0) with ESMTP id j47HsQTB016572 for ; Sat, 7 May 2005 10:54:26 -0700 (PDT) Original-Received: from almi.jk.homeunix.org (o254124.ppp.dion.ne.jp [211.134.254.124]) (authenticated bits=0) by mac.com (Xserve/smtpin07/MantshX 4.0) with ESMTP id j47HsKU4011710 for ; Sat, 7 May 2005 10:54:23 -0700 (PDT) Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:36819 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36819 --=-=-= Hello all, The binary of current emacs on Mac OS X depends on internal implementation of system library. On Mac OS X 10.3, we cannot invoke emacs which is unexec'ed on Mac OS X 10.2.8, because malloc_default_zone()->size returns incorrect value (in unexec_realloc()). The attached patch solves this problem. Moreover, emacs compiled on Mac OS X 10.3 works for me on Mac OS X 10.4. It assumes that return value of malloc() is multiple of 16 and assumes that emacs requires only it is multiple of 8 (even when USE_LSB_TAG). It also changes ptr_in_unexec_regions() for efficiency. --- 2005-05-08 Nozomu Ando * unexmacosx.c: Include assert.h. (MACOSX_MALLOC_MULT16): Define to 1 if not already defined. (unexec_malloc_header_t): Add typedef. (ptr_in_unexec_regions): Define if MACOSX_MALLOC_MULT16. (unexec_malloc): Add assert. Malloc with struct unexec_malloc_header and record size on it if !in_dumped_exec. (unexec_realloc): Add assert. Use recorded size if in_dumped_exec && old_ptr is malloc'ed before unexec. Record new_size if !in_dumped_exec. (unexec_free): Free with struct unexec_malloc_header. --- Best Regards, Nozomu Ando --- --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=diff.unexmacosx.c.txt.gz Content-Transfer-Encoding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izSPNA41ktOJ56mn3PXk/gjKIqGbksSNG+HA7I785Wub0+seO2YOugRoAqszyMVmpi3pw btVe8vaAb+ZTDj/ibWbBqZhOFZLM51EXdLM2j2u+DXb/YK3m124CnGEKrUPmFYdeMj2gU73wnj+A ZVkzc1N7XvYUwWvual2n87oqYkq6jt4TdVTTrPIwS/rvD8GnSfXCEdl4kAdccLBmNSazf0jqS9gY Ta3DbdfT6KPtfurJVu3ifO90kukZ8+m5CbXRdVFEN/N+ciAp5//zcdw7UZ9vK+BA7QqsRtWAbRe/ /xSbff4vnuRD/xcM8INt5NUfbI2IUVqdPnWh7emqWX9pbha/dlVb48cJYcHS5mQxBZeMvWE0vrWJ 6w3tYTCM7MloOLRD4p24k9HkOBwP5G2HNx3edvhNrm6718f1BCkUIV4X9ldGSjh1yQ4AAA== --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--