From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fabrice Popineau Newsgroups: gmane.emacs.devel Subject: Re: Windows 64 port Date: Sun, 19 Feb 2012 23:05:52 +0100 Message-ID: References: <20120219211800.0000558f@unknown> <834numv7js.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=0015175d009ed0f57e04b958628f X-Trace: dough.gmane.org 1329709631 15054 80.91.229.3 (20 Feb 2012 03:47:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 20 Feb 2012 03:47:11 +0000 (UTC) Cc: AJMR , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 20 04:47:10 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RzKDF-0002BR-SQ for ged-emacs-devel@m.gmane.org; Mon, 20 Feb 2012 04:47:09 +0100 Original-Received: from localhost ([::1]:56536 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzKDF-0003n3-3b for ged-emacs-devel@m.gmane.org; Sun, 19 Feb 2012 22:46:53 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:39248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzEte-0002GP-Bb for emacs-devel@gnu.org; Sun, 19 Feb 2012 17:06:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RzEtd-0002Qq-4J for emacs-devel@gnu.org; Sun, 19 Feb 2012 17:06:18 -0500 Original-Received: from mail-bk0-f41.google.com ([209.85.214.41]:43724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzEta-0002Q0-IQ; Sun, 19 Feb 2012 17:06:15 -0500 Original-Received: by bkty12 with SMTP id y12so4996486bkt.0 for ; Sun, 19 Feb 2012 14:06:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=YtwTY2WWpN11oroDx3YZYwDFjy2YmzprZNxlMr6pbpo=; b=uzbTLKFYXEg3m36ySKUaup3LWcszOWPXyatN+LHnD+BB0Cfi3SqQSokXxqUdlLw0jx tCUgio8jsjLXw24FPo8BFJ+aeTqBv4+u+csaz7lnJKhFlCO3LggNCcy6iE1x82VTCSJH nil3yrG+tBa43e5h+PcsqMnyOO48msY0bHeBQ= Original-Received: by 10.204.152.88 with SMTP id f24mr7735204bkw.31.1329689172964; Sun, 19 Feb 2012 14:06:12 -0800 (PST) Original-Received: by 10.204.231.142 with HTTP; Sun, 19 Feb 2012 14:05:52 -0800 (PST) In-Reply-To: <834numv7js.fsf@gnu.org> X-Google-Sender-Auth: 3mu_Sc5bMZ2pNdAOawlQCladXxI X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.214.41 X-Mailman-Approved-At: Sun, 19 Feb 2012 22:46:50 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:148672 Archived-At: --0015175d009ed0f57e04b958628f Content-Type: multipart/alternative; boundary=0015175d009ed0f56f04b958628d --0015175d009ed0f56f04b958628d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Eli, Here is my Windows 64 bits patch. It is quite crude and only attempts to make it possible to compile a 64bits emacs with the MS Sdk. I have sent the paperwork to the FSF last week, so this patch could be reviewed and maybe integrated soon. It is against emacs-24, current trunk. Not everything is taken cared of: the heap allocation scheme should probably be reworked. Anyway, I was able to run an emacs and make it allocate everything available on my Windows 64 machine (4Gb of Ram + around 10Gb of swap). It just did it without crashing. Best regards, Fabrice 2012/2/19 Eli Zaretskii > > Date: Sun, 19 Feb 2012 21:18:00 +0100 > > From: AJMR > > > > I would love to start to contribute to the GNU community and I thought > > that porting Emacs 23 to Windows 64, could be a good useful entry. > > Thanks, it will. > > > However, I have no idea on how to, or where, start. > > Start with bug #9960, where some of this was discussed. Maybe Fabrice > could post the patches he has till now. > --=20 Fabrice Popineau ----------------------------- SUPELEC D=E9partement Informatique 3, rue Joliot Curie 91192 Gif/Yvette Cedex Tel direct : +33 (0) 169851950 Standard : +33 (0) 169851212 ------------------------------ --0015175d009ed0f56f04b958628d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Eli,

Here is my Windows 64 bits patch. It is quite cr= ude and only attempts to make it possible to compile
a 64bits ema= cs with the MS Sdk.
I have sent the paperwork to the FSF last wee= k, so this patch could be reviewed and maybe integrated soon.
It is against emacs-24, current trunk.
Not everything is tak= en cared of: the heap allocation scheme should probably be reworked. Anyway= ,
I was able to run an emacs and make it allocate everything avai= lable on my Windows 64 machine=A0
(4Gb of Ram + around 10Gb of swap). It just did it without crashing.

Best regards,

Fabrice


2012/2/19 Eli Zaretskii <eliz@gnu.org>
> Date: Sun, 19 Feb 2012 21:18:00 +0100 > From: AJMR <ajmr= @ilovetortilladepatatas.com>
>
> I would love to start to contribute to the GNU community and I thought=
> that porting Emacs 23 to Windows 64, could be a good useful entry.

Thanks, it will.

> However, I have no idea on how to, or where, start.

Start with bug #9960, where some of this was discussed. =A0Maybe Fabrice could post the patches he has till now.



--
Fabrice Popi= neau
-----------------------------
SUPELEC
D=E9part= ement Informatique
3, rue Joliot Curie
91192 Gif/Yvette= Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212<= /div>
------------------------------


--0015175d009ed0f56f04b958628d-- --0015175d009ed0f57e04b958628f Content-Type: application/octet-stream; name="emacs-64bits.patch" Content-Disposition: attachment; filename="emacs-64bits.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gyumhvzq1 PT09IG1vZGlmaWVkIGZpbGUgJ2xpYi9zdHJmdGltZS5jJwotLS0gbGliL3N0cmZ0aW1lLmMJMjAx MS0wMy0zMSAwNDoyNDowMyArMDAwMAorKysgbGliL3N0cmZ0aW1lLmMJMjAxMS0xMi0wNSAxMzow OTozNSArMDAwMApAQCAtMzYsOSArMzYsMTMgQEAKICNpbmNsdWRlIDxjdHlwZS5oPgogI2luY2x1 ZGUgPHRpbWUuaD4KIAorI2lmZGVmIF9NU0NfVkVSCisjZGVmaW5lIHR6bmFtZSBfdHpuYW1lCisj ZWxzZQogI2lmIEhBVkVfVFpOQU1FICYmICFIQVZFX0RFQ0xfVFpOQU1FCiBleHRlcm4gY2hhciAq dHpuYW1lW107CiAjZW5kaWYKKyNlbmRpZgogCiAvKiBEbyBtdWx0aWJ5dGUgcHJvY2Vzc2luZyBp ZiBtdWx0aWJ5dGVzIGFyZSBzdXBwb3J0ZWQsIHVubGVzcwogICAgbXVsdGlieXRlIHNlcXVlbmNl cyBhcmUgc2FmZSBpbiBmb3JtYXRzLiAgTXVsdGlieXRlIHNlcXVlbmNlcyBhcmUKCj09PSBtb2Rp ZmllZCBmaWxlICdudC9hZGRzZWN0aW9uLmMnCi0tLSBudC9hZGRzZWN0aW9uLmMJMjAxMi0wMS0x OSAwNzoyMToyNSArMDAwMAorKysgbnQvYWRkc2VjdGlvbi5jCTIwMTItMDItMDUgMjA6MDY6MzQg KzAwMDAKQEAgLTM2LDkgKzM2LDkgQEAKIAogUElNQUdFX05UX0hFQURFUlMKIChfX3N0ZGNhbGwg KiBwZm5DaGVja1N1bU1hcHBlZEZpbGUpIChMUFZPSUQgQmFzZUFkZHJlc3MsCi0JCQkJICAgICBE V09SRCBGaWxlTGVuZ3RoLAotCQkJC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dJTkFQ SSByZWFkZXJfdGhyZWFkICh2b2lkICphcmcpOwogCiAvKiBGaW5kIGFuIHVudXNlZCBwcm9jZXNz IHNsb3QuICAqLwogY2hpbGRfcHJvY2VzcyAqCgo= --0015175d009ed0f57e04b958628f Content-Type: text/x-chdr; charset=US-ASCII; name="amdx86-64.h" Content-Disposition: attachment; filename="amdx86-64.h" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gyumi8gt2 LyogbWFjaGluZSBkZXNjcmlwdGlvbiBmaWxlIGZvciBBTUQgeDg2LTY0LgoKQ29weXJpZ2h0IChD KSAyMDAyLTIwMTIgIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLgoKVGhpcyBmaWxlIGlz IHBhcnQgb2YgR05VIEVtYWNzLgoKR05VIEVtYWNzIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4g cmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkKaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBH TlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkKdGhlIEZyZWUgU29mdHdh cmUgRm91bmRhdGlvbiwgZWl0aGVyIHZlcnNpb24gMyBvZiB0aGUgTGljZW5zZSwgb3IKKGF0IHlv dXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4KCkdOVSBFbWFjcyBpcyBkaXN0cmlidXRlZCBp biB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLApidXQgV0lUSE9VVCBBTlkgV0FSUkFO VFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZgpNRVJDSEFOVEFCSUxJVFkg b3IgRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuICBTZWUgdGhlCkdOVSBHZW5lcmFs IFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuCgpZb3Ugc2hvdWxk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