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: Emacs win32 cleanup Date: Sun, 25 Mar 2012 13:47:15 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=000e0ce004b4e7cbb604bc0fd2af X-Trace: dough.gmane.org 1332676065 11258 80.91.229.3 (25 Mar 2012 11:47:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 25 Mar 2012 11:47:45 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 25 13:47:44 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SBlvD-0002Mx-S7 for ged-emacs-devel@m.gmane.org; Sun, 25 Mar 2012 13:47:43 +0200 Original-Received: from localhost ([::1]:45800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBlvD-00033Z-AJ for ged-emacs-devel@m.gmane.org; Sun, 25 Mar 2012 07:47:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBlvB-00033F-0j for emacs-devel@gnu.org; Sun, 25 Mar 2012 07:47:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SBlv9-0001PD-96 for emacs-devel@gnu.org; Sun, 25 Mar 2012 07:47:40 -0400 Original-Received: from mail-bk0-f41.google.com ([209.85.214.41]:62288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBlv8-0001NN-U8 for emacs-devel@gnu.org; Sun, 25 Mar 2012 07:47:39 -0400 Original-Received: by bkwq16 with SMTP id q16so4200158bkw.0 for ; Sun, 25 Mar 2012 04:47:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=VskRQYUHJGQMOyxPzxXFvxsJmMetnl0qtm5oGr6Hzuo=; b=bDD26o2+Jm7wVujYwLFzWjRceTfcD6b7FG7YmLYeX1wDF927D6WmybZpbTC7Nj7y01 xHWUJXOUrnARFdDYLqlyZjOSEZH5bRKbTVGbOUErPTxFROv+IS4T0nNU+IhDS3HHhXO7 TeoEcATnUaYPIUiPw13c8QYp7fO4UgWDM3B52SuTsStib1ALPzbC1JAbJokr0Yndr6ka i4dGxH7O4ZGIWwLK/d56rkZN3oBkDus2LOAt5+sx2j7v03B3QMT426aUGlJG9un9rW6g ZmhP3OqC2EQgpA7BduHNWk0tHRFBtZOmVM7XoemmMSJs1SRRuMKaX/O4b65XmoVL8js/ NHnQ== Original-Received: by 10.205.122.144 with SMTP id gg16mr7403243bkc.12.1332676055780; Sun, 25 Mar 2012 04:47:35 -0700 (PDT) Original-Received: by 10.204.179.143 with HTTP; Sun, 25 Mar 2012 04:47:15 -0700 (PDT) X-Google-Sender-Auth: ml1IQ2tQlw4WlUv96L68KfcYsK4 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.214.41 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:149212 Archived-At: --000e0ce004b4e7cbb604bc0fd2af Content-Type: text/plain; charset=ISO-8859-1 This part of w32heap.c is obsolete for quite a long time. It is not possible anymore to override heap_init() and heap_term() in libc. And it is of no use when compiling with the crt dll. --- src/w32heap.c 2012-02-28 15:34:44 +0000 +++ src/w32heap.c 2012-03-25 11:32:33 +0000 @@ -305,26 +305,3 @@ sbrk (need_to_alloc); } -#if (_MSC_VER >= 1000 && _MSC_VER < 1300 && !defined (USE_CRT_DLL)) - -/* MSVC 4.2 invokes these functions from mainCRTStartup to initialize - a heap via HeapCreate. They are normally defined by the runtime, - but we override them here so that the unnecessary HeapCreate call - is not performed. */ - -int __cdecl -_heap_init (void) -{ - /* Stepping through the assembly indicates that mainCRTStartup is - expecting a nonzero success return value. */ - return 1; -} - -void __cdecl -_heap_term (void) -{ - return; -} - -#endif - -- Fabrice --000e0ce004b4e7cbb604bc0fd2af Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
This part of w32heap.c is obsolete for quite a long time.
It= is not possible anymore to override heap_init() and heap_term() =A0in libc= .
And it is of no use when compiling with the crt dll.

--- src/w32heap.c =A0 =A0 =A0 2012-02-28 15:34:44 +0000=
+++ src/w32heap.c =A0 =A0 =A0 2012-03-25 11:32:33 +0000
@@ -305,26 +305,3 @@
=A0 =A0 =A0sbrk (need_to_alloc);
=A0}

-#if (_MSC_VER >=3D 1000 && _MSC_VER < 1300 &a= mp;& !defined (USE_CRT_DLL))
-
-/* MSVC 4.2 invokes= these functions from mainCRTStartup to initialize
- =A0 a heap v= ia HeapCreate. =A0They are normally defined by the runtime,
- =A0 but we override them here so that the unnecessary HeapCreate cal= l
- =A0 is not performed. =A0*/
-
-int __cdec= l
-_heap_init (void)
-{
- =A0/* Stepping thro= ugh the assembly indicates that mainCRTStartup is
- =A0 =A0 expecting a nonzero success return value. =A0*/
- = =A0return 1;
-}
-
-void __cdecl
-_h= eap_term (void)
-{
- =A0return;
-}
= -
-#endif
-

--
Fabrice

--000e0ce004b4e7cbb604bc0fd2af--