From 3bad61e1ac5244efb4fff6062763ea759e0aafec Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 24 Oct 2021 20:45:56 +0300 Subject: [PATCH] Fix compilation errors with MinGW64 GCC 11 * lib-src/ntlib.c (IS_DIRECTORY_SEP): Remove redundant macro. * lib-src/ntlib.c (DEFER_MS_W32_H): * nt/addpm.c (DEFER_MS_W32_H): * nt/cmdproxy.c (DEFER_MS_W32_H): * nt/ddeclient.c (DEFER_MS_W32_H): * nt/preprep.c (DEFER_MS_W32_H): * nt/runemacs.c (DEFER_MS_W32_H): Fix a typo. * nt/Makefile.in (BASE_CFLAGS): Add -I switches to pick up config.h and lib/attribute.h. --- lib-src/ntlib.c | 5 +---- nt/Makefile.in | 1 + nt/addpm.c | 2 +- nt/cmdproxy.c | 2 +- nt/ddeclient.c | 2 +- nt/preprep.c | 2 +- nt/runemacs.c | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c index f1c68cb1b2a..c8bcf742fea 100644 --- a/lib-src/ntlib.c +++ b/lib-src/ntlib.c @@ -20,7 +20,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -#define DEFER_MS_W3_H +#define DEFER_MS_W32_H #include #include @@ -290,9 +290,6 @@ is_exec (const char * name) stricmp (p, ".cmd") == 0)); } -/* FIXME? This is in configure.ac now - is this still needed? */ -#define IS_DIRECTORY_SEP(x) ((x) == '/' || (x) == '\\') - /* We need stat/fsfat below because nt/inc/sys/stat.h defines struct stat that is incompatible with the MS run-time libraries. */ int diff --git a/nt/Makefile.in b/nt/Makefile.in index 3274ff924f9..811680da851 100644 --- a/nt/Makefile.in +++ b/nt/Makefile.in @@ -144,6 +144,7 @@ LIBS_ADDPM = -lole32 -luuid ## Compilation and linking flags BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + -I../src -I${srcdir}/../src -I../lib -I${srcdir}/../lib \ -I. -I${srcdir} ALL_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS} diff --git a/nt/addpm.c b/nt/addpm.c index f07e4c2c5a6..4fbcf6c05ea 100644 --- a/nt/addpm.c +++ b/nt/addpm.c @@ -35,7 +35,7 @@ along with GNU Emacs. If not, see . */ progman way will be used instead, but that is prone to lockups caused by other applications not servicing their message queues. */ -#define DEFER_MS_W3_H +#define DEFER_MS_W32_H #include #include diff --git a/nt/cmdproxy.c b/nt/cmdproxy.c index 2bc03673d5a..f5a0550aa9d 100644 --- a/nt/cmdproxy.c +++ b/nt/cmdproxy.c @@ -27,7 +27,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -#define DEFER_MS_W3_H +#define DEFER_MS_W32_H #include #include diff --git a/nt/ddeclient.c b/nt/ddeclient.c index 1c1f7679ea1..0a44cbfd770 100644 --- a/nt/ddeclient.c +++ b/nt/ddeclient.c @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -#define DEFER_MS_W3_H +#define DEFER_MS_W32_H #include #include diff --git a/nt/preprep.c b/nt/preprep.c index 48c55ef2218..8b054b19a71 100644 --- a/nt/preprep.c +++ b/nt/preprep.c @@ -21,7 +21,7 @@ along with GNU Emacs. If not, see . based on code from addsection.c */ -#define DEFER_MS_W3_H +#define DEFER_MS_W32_H #include #include diff --git a/nt/runemacs.c b/nt/runemacs.c index cce4904d88d..b4ed9fb1564 100644 --- a/nt/runemacs.c +++ b/nt/runemacs.c @@ -40,7 +40,7 @@ along with GNU Emacs. If not, see . */ /* #define CHOOSE_NEWEST_EXE */ -#define DEFER_MS_W3_H +#define DEFER_MS_W32_H #include #include -- 2.39.5