From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Windows 64 port Date: Mon, 20 Feb 2012 22:47:23 +0200 Message-ID: <83ty2ltep0.fsf@gnu.org> References: <20120219211800.0000558f@unknown> <834numv7js.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1329772854 5751 80.91.229.3 (20 Feb 2012 21:20:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 20 Feb 2012 21:20:54 +0000 (UTC) Cc: ajmr@ilovetortilladepatatas.com, emacs-devel@gnu.org To: Fabrice Popineau Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 20 22:20:52 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 1RzafD-0002Eg-O9 for ged-emacs-devel@m.gmane.org; Mon, 20 Feb 2012 22:20:51 +0100 Original-Received: from localhost ([::1]:53445 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzaNH-0002u7-KH for ged-emacs-devel@m.gmane.org; Mon, 20 Feb 2012 16:02:19 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:60072) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzaMh-0008Tr-Bc for emacs-devel@gnu.org; Mon, 20 Feb 2012 16:01:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RzaBR-0000Fj-8o for emacs-devel@gnu.org; Mon, 20 Feb 2012 15:50:07 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:52319) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzaBR-0000Dv-1m for emacs-devel@gnu.org; Mon, 20 Feb 2012 15:50:05 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LZP00J00LS3VB00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Mon, 20 Feb 2012 22:49:24 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.124.150.51]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LZP00JVILUBTA20@a-mtaout23.012.net.il>; Mon, 20 Feb 2012 22:49:24 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.175 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:148685 Archived-At: > From: Fabrice Popineau > Date: Sun, 19 Feb 2012 23:05:52 +0100 > Cc: AJMR , emacs-devel@gnu.org > > 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 a few questions about the patch (below). > the heap allocation scheme should probably be reworked Can you tell which parts of the current scheme need to be reworked, and why do you think so? > === modified file 'lib/strftime.c' > --- lib/strftime.c 2011-03-31 04:24:03 +0000 > +++ lib/strftime.c 2011-12-05 13:09:35 +0000 > @@ -36,9 +36,13 @@ > #include > #include > > +#ifdef _MSC_VER > +#define tzname _tzname > +#else > #if HAVE_TZNAME && !HAVE_DECL_TZNAME > extern char *tzname[]; > #endif > +#endif This seems to be unrelated to 64-bit hosts. Why is it needed, when s/ms-w32.h has the same #define (which your patch #ifdef's away)? What is the issue here? > === modified file 'src/editfns.c' > --- src/editfns.c 2012-01-19 07:21:25 +0000 > +++ src/editfns.c 2012-02-05 20:06:34 +0000 > @@ -82,6 +82,8 @@ > > #ifdef WINDOWSNT > extern Lisp_Object w32_get_internal_run_time (void); > + > +extern struct tm *localtime (const time_t *t); > #endif Why is this needed? It seems also unrelated to 64-bit Windows. > -internal_lisp_condition_case (volatile Lisp_Object var, Lisp_Object bodyform, > +internal_lisp_condition_case (/* volatile */ Lisp_Object var, Lisp_Object bodyform, Does MSVC have problems with the `volatile' qualifier? > --- src/frame.c 2012-01-19 07:21:25 +0000 > +++ src/frame.c 2012-02-05 20:06:34 +0000 > @@ -812,6 +812,7 @@ > #ifdef HAVE_WINDOW_SYSTEM > if (track && FRAME_WINDOW_P (XFRAME (frame))) > { > + extern Lisp_Object x_get_focus_frame(struct frame *); This should go into w32term.h (it is already in xterm.h and nsterm.h). > --- src/m/amdx86-64.h 2012-01-19 07:21:25 +0000 > +++ src/m/amdx86-64.h 2012-02-05 20:06:34 +0000 > @@ -17,7 +17,8 @@ > You should have received a copy of the GNU General Public License > along with GNU Emacs. If not, see . */ > > -#define BITS_PER_LONG 64 > +#define BITS_PER_LONG 32 Here Windows and Posix systems differ, so it's wrong to do this unconditionally. Does the 64-bit Windows define _LLP64 or some such somewhere on its headers? If so, perhaps we could condition the above on that macro, vs _LP64 on Posix hosts. > /* Define the type to use. */ > -#define EMACS_INT long > -#define pI "l" > -#define EMACS_UINT unsigned long > +#define EMACS_INT __int64 > +#define EMACS_UINT unsigned __int64 > +#define pI "ll" > +#define VIRT_ADDR_VARIES > +#define DATA_START get_data_start () Likewise here. Thanks.