From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?=E6=9D=8E=E4=B8=81?= Newsgroups: gmane.emacs.bugs Subject: bug#12878: 24.2; Compiling failed on Windows 7 with VC 11 Express: _WIN32_WINNT version too low Date: Mon, 19 Nov 2012 13:59:54 +0800 Message-ID: References: <83haotv4wf.fsf@gnu.org> <834nko2h2h.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d042f931e88aa2b04ced2d3e5 X-Trace: ger.gmane.org 1353304812 31226 80.91.229.3 (19 Nov 2012 06:00:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Nov 2012 06:00:12 +0000 (UTC) Cc: 12878@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 19 07:00:23 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1TaKP7-00011n-2T for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Nov 2012 07:00:21 +0100 Original-Received: from localhost ([::1]:39908 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaKOv-0006QY-F8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Nov 2012 01:00:09 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaKOq-0006N7-Pp for bug-gnu-emacs@gnu.org; Mon, 19 Nov 2012 01:00:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TaKOn-0001vr-L5 for bug-gnu-emacs@gnu.org; Mon, 19 Nov 2012 01:00:04 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaKOn-0001vd-II for bug-gnu-emacs@gnu.org; Mon, 19 Nov 2012 01:00:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TaKPn-0002lo-0B for bug-gnu-emacs@gnu.org; Mon, 19 Nov 2012 01:01:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=E6=9D=8E=E4=B8=81?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Nov 2012 06:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12878 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12878-submit@debbugs.gnu.org id=B12878.135330486010640 (code B ref 12878); Mon, 19 Nov 2012 06:01:02 +0000 Original-Received: (at 12878) by debbugs.gnu.org; 19 Nov 2012 06:01:00 +0000 Original-Received: from localhost ([127.0.0.1]:54028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TaKPj-0002lY-JL for submit@debbugs.gnu.org; Mon, 19 Nov 2012 01:01:00 -0500 Original-Received: from mail-pb0-f44.google.com ([209.85.160.44]:38428) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TaKPg-0002lP-Tc for 12878@debbugs.gnu.org; Mon, 19 Nov 2012 01:00:58 -0500 Original-Received: by mail-pb0-f44.google.com with SMTP id uo1so3105104pbc.3 for <12878@debbugs.gnu.org>; Sun, 18 Nov 2012 21:59:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=drSc7IjYBLaukUw4V2Y3RJ3kWnWhyMd9F+TthFDqHK4=; b=XwUX9MITH8K541ro8VLwcHkLxluVRKzwfiWJbYyh6f8HUilZhrL5jX6Veaf+L3XJvj iWBCjQ0n79gFP6GIOJCGHOT4rs0blOBgGPdn0iT1Yu2adW00tX1sS5kLwXhdkDuq4QMD TYqsW5q00KXCBFtzlQ6YyRpOktKCpo2UtlSatrhq+fsDXbup3xRlaNUI6V6N2rPaNVnd EQAdWkSUu9B9ZHN8tk9BZEWFYZt860nan9ZnNPjW5J/PD9mwz9/AYGiYWjjDWo/a6zAK Q2aT0o5OOT3PRA9Lhp55hyra9vxIn0ntbT/ImUg9OSVdMS3/+L2tpb6juTtZeZm26sMa tlOQ== Original-Received: by 10.66.74.65 with SMTP id r1mr32870546pav.75.1353304794245; Sun, 18 Nov 2012 21:59:54 -0800 (PST) Original-Received: by 10.68.79.134 with HTTP; Sun, 18 Nov 2012 21:59:54 -0800 (PST) In-Reply-To: <834nko2h2h.fsf@gnu.org> X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-Spam-Score: -2.6 (--) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:67154 Archived-At: --f46d042f931e88aa2b04ced2d3e5 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable Hi, Thank you for fixing the bug. I checked out the latest branch (r 110913), it seems that you miss a semicolon at line 761 in w32term.h. Previous problems are fixed, but I still can not compile the latest branch. There are more problems: 1. I need `nmake bootstrap' but in 24.2 release I can compile directly with `nmake' 2. In lisp.h it begins to define ARRAY_MARK_FLAG as PTRDIFF_MIN, however, definition of PTRDIFF_MIN is in stdint.h, which is not included. And even if included, in nt/inc/stdint.h, various *_MIN (including PTRDIFF_MIN) are not defined 3. In w32.c DeviceIoControl, it uses a FSCTL_GET_REPARSE_POINT that is only defined for _MSC_VER >=3D 0x0500 4. In xdisp.c, start_hourglass function, w32_note_current_window is declared (as extern) and used in the middle of the function, causing an error message. Move the declaration to the beginning of the function solved the problem. After fixing the above problems, finally I can make a temacs.exe, but while loading subr.el, temacs reported an error message saying `Invalid funtion: "DEAD"'. I do not know where the function `dead' comes from. Maybe you can close the previous bug, but for the latest branch, more fixes are needed. 2012/11/18 Eli Zaretskii > > Date: Wed, 14 Nov 2012 09:14:45 +0800 > > From: =C0=EE=B6=A1 > > Cc: 12878@debbugs.gnu.org > > > > Sure, adding a correct prototype is just like including the correct > > header file if Windows 9X really supports this function. But you > > should be careful checking compiler versions, in case that > > redefinition error occur. > > I added the prototype of EnumSystemLocales to one of the w32 headers. > Please try the latest emacs-24 branch (revision 110902 or later) and > see if you still have problems building it. > > > Actually, I encountered several redefinition problems during compilatio= n. > > For example in w32term.c: > > > > #ifndef GLYPHSET > > /* Pre Windows 2000, this was not available, but define it here so > > that Emacs compiled on such a platform will run on newer version= s. > > */ > > ... > > #endif > > > > VC 11.0 does not define GLYPHSET either (or not included), but it does > have > > the definitions, > > and above code leads to redefinition error. > > This is no longer in the development sources of the emacs-24 branch. > This code fragment is now guarded by "#if _WIN32_WINNT < 0x0500", > which I think should work for you, as long as you don't define > _WIN32_WINNT to a value higher than 0x0400. > > > And this in w32term.c too: > > > > /* Reportedly, MSVC does not have this in its headers. */ > > #ifdef _MSC_VER > > DECLARE_HANDLE(HMONITOR); > > #endif > > > > VC 11.0 does have HMONITOR, and another redefinition error. > > This is now guarded by "#if defined (_MSC_VER) && _WIN32_WINNT < 0x0500" > so again, I don't think that it should give you trouble with > _WIN32_WINNT set at 0x0400. > > Please try the latest emacs-24 branch, and if it works for you, I will > close the bug. > --f46d042f931e88aa2b04ced2d3e5 Content-Type: text/html; charset=GB2312 Content-Transfer-Encoding: quoted-printable Hi,
Thank you for fixing the bug.

I checked ou= t the latest branch (r 110913), it seems that you miss a semicolon at line = 761 in w32term.h.

Previous problems are fixed, but= I still can not compile the latest branch. There are more problems:

1. I need `nmake bootstrap' but in 24.2 release I c= an compile directly with `nmake'

2. In lisp.h = it begins to define ARRAY_MARK_FLAG as PTRDIFF_MIN, however,
    definition of PTRDIFF_MIN is in stdint.h, which is not includ= ed. And even if included, in nt/inc/stdint.h,
    vario= us *_MIN (including PTRDIFF_MIN) are not defined

3= . In w32.c DeviceIoControl, it uses a FSCTL_GET_REPARSE_POINT that is only = defined for _MSC_VER >=3D 0x0500

4. In xdisp.c, start_hourglass function, w32_note_curre= nt_window is declared (as extern) and used in the middle of
 = ;   the function, causing an error message. Move the declaration to th= e beginning of the function solved the problem.

After fixing the above problems, finally I can make a t= emacs.exe, but while loading subr.el, temacs reported an
error me= ssage saying `Invalid funtion: "DEAD"'. I do not know where t= he function `dead' comes from.

Maybe you can close the previous bug, but for the latest branch, more = fixes are needed.



2012/11/18 El= i Zaretskii <eliz@gnu.org>
> Date: Wed, 14 Nov 2012 09:14:45 +0800
> From: =C0=EE=B6=A1 <iamlidin= g@gmail.com>
> Cc: 12878@debbugs.gnu.org=
>
> Sure, adding a correct prototype is just like = including the correct
> header file if Windows 9X really supports this function. But you
> should be careful checking compiler versions, in case that
> redefinition error occur.

I added the prototype of EnumSystemLocales to one of the w32 headers.=
Please try the latest emacs-24 branch (revision 110902 or later) and
see if you still have problems building it.

> Actually, I encountered several redefinition problems during compilati= on.
> For example in w32term.c:
>
>     #ifndef GLYPHSET
>     /* Pre Windows 2000, this was not available, but define = it here so
>        that Emacs compiled on such a platform will= run on newer versions.
>  */
>     ...
>     #endif
>
> VC 11.0 does not define GLYPHSET either (or not included), but it does= have
> the definitions,
> and above code leads to redefinition error.

This is no longer in the development sources of the emacs-24 branch.<= br> This code fragment is now guarded by "#if _WIN32_WINNT < 0x0500&quo= t;,
which I think should work for you, as long as you don't define
_WIN32_WINNT to a value higher than 0x0400.

> And this in w32term.c too:
>
>     /* Reportedly, MSVC does not have this in its headers. &= nbsp;*/
>     #ifdef _MSC_VER
>     DECLARE_HANDLE(HMONITOR);
>     #endif
>
> VC 11.0 does have HMONITOR, and another redefinition error.

This is now guarded by "#if defined (_MSC_VER) && _WIN32= _WINNT < 0x0500"
so again, I don't think that it should give you trouble with
_WIN32_WINNT set at 0x0400.

Please try the latest emacs-24 branch, and if it works for you, I will
close the bug.

--f46d042f931e88aa2b04ced2d3e5--