all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Andy Moreton <andrewjmoreton@gmail.com>
Cc: bug-gnulib@gnu.org, emacs-devel@gnu.org
Subject: Re: Emacs build fails on Windows mingw64
Date: Sat, 23 Oct 2021 23:45:04 -0400	[thread overview]
Message-ID: <0b467abe-dd50-6a0a-7d1f-37eb990900be@cs.ucla.edu> (raw)
In-Reply-To: <86v91nfp6e.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 391 bytes --]

On 10/23/21 4:42 PM, Andy Moreton wrote:
> Can this issue be addressed in gnulib so the emacs bug can be fixed ?

This appears to be an issue in Emacs not Gnulib, as a few of Emacs's 
MS-Windows-specific files don't include <config.h> first, which is a 
documented requirement for Gnulib-using apps. Proposed Emacs patch 
attached. I haven't tested or installed this, as I don't use MingW.


[-- Attachment #2: 0001-Include-config.h-first-in-MS-Windows-source.patch --]
[-- Type: text/x-patch, Size: 2575 bytes --]

From 7bb574b48c7c8be0eb1e941c6da048cfb509cdff Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sat, 23 Oct 2021 20:35:18 -0700
Subject: [PATCH] Include <config.h> first in MS-Windows source

---
 lib-src/ntlib.c | 2 ++
 nt/addpm.c      | 3 +++
 nt/cmdproxy.c   | 2 ++
 nt/ddeclient.c  | 2 ++
 nt/preprep.c    | 2 ++
 nt/runemacs.c   | 2 ++
 6 files changed, 13 insertions(+)

diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c
index bcbc006431..e011de5b91 100644
--- a/lib-src/ntlib.c
+++ b/lib-src/ntlib.c
@@ -20,6 +20,8 @@ Copyright (C) 1994, 2001-2021 Free Software Foundation, Inc.
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
+#include <config.h>
+
 #include <windows.h>
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/nt/addpm.c b/nt/addpm.c
index f54a6ea9f7..4ec372ccfe 100644
--- a/nt/addpm.c
+++ b/nt/addpm.c
@@ -34,6 +34,9 @@
    installed, then the DDE fallback for creating icons the Windows 3.1
    progman way will be used instead, but that is prone to lockups
    caused by other applications not servicing their message queues.  */
+
+#include <config.h>
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <malloc.h>
diff --git a/nt/cmdproxy.c b/nt/cmdproxy.c
index 224f68b1e8..505855318d 100644
--- a/nt/cmdproxy.c
+++ b/nt/cmdproxy.c
@@ -27,6 +27,8 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
+#include <config.h>
+
 #include <windows.h>
 
 #include <stdarg.h>  /* va_args */
diff --git a/nt/ddeclient.c b/nt/ddeclient.c
index c577bfcfa9..1390c334b7 100644
--- a/nt/ddeclient.c
+++ b/nt/ddeclient.c
@@ -16,6 +16,8 @@
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
+#include <config.h>
+
 #include <windows.h>
 #include <ddeml.h>
 #include <stdlib.h>
diff --git a/nt/preprep.c b/nt/preprep.c
index 78ed1c3238..b73d3bb9fa 100644
--- a/nt/preprep.c
+++ b/nt/preprep.c
@@ -21,6 +21,8 @@
      based on code from addsection.c
 */
 
+#include <config.h>
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <fcntl.h>
diff --git a/nt/runemacs.c b/nt/runemacs.c
index 308e856be2..f8f60b0665 100644
--- a/nt/runemacs.c
+++ b/nt/runemacs.c
@@ -40,6 +40,8 @@ Copyright (C) 2001-2021 Free Software Foundation, Inc.
 
 /* #define CHOOSE_NEWEST_EXE */
 
+#include <config.h>
+
 #include <windows.h>
 #include <string.h>
 #include <malloc.h>
-- 
2.31.1


       reply	other threads:[~2021-10-24  3:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <86v91nfp6e.fsf@gmail.com>
2021-10-24  3:45 ` Paul Eggert [this message]
2021-10-24  6:26   ` Emacs build fails on Windows mingw64 Eli Zaretskii
2021-10-24 10:50     ` Andy Moreton
2021-10-24 12:27       ` Paul Eggert
2021-10-24 12:25     ` Paul Eggert
2021-10-24 13:58       ` Eli Zaretskii
2021-10-24 17:05         ` Paul Eggert
2021-10-24 17:48           ` Eli Zaretskii
2021-10-24 17:57           ` Andy Moreton
2021-10-24 22:52             ` Bruno Haible
2021-10-25 11:52               ` Eli Zaretskii
2021-10-25 21:26               ` Andy Moreton
2021-10-24 18:01           ` Óscar Fuentes
2021-10-24 18:10             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0b467abe-dd50-6a0a-7d1f-37eb990900be@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=andrewjmoreton@gmail.com \
    --cc=bug-gnulib@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.