[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

conflicting types in windows-spawn

From: Markus Mützel
Subject: conflicting types in windows-spawn
Date: Thu, 6 May 2021 14:28:45 +0200

I tried to use the windows-spawn module in a project that defines UNICODE.

Compilation of gnulib failed with the following error:

libtool: compile:  x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. 
-I/home/osboxes/Octave/mxe-octave/tmp-default-octave/octave-7.0.0/libgnu -I.. 
-fvisibility=hidden -g -O2 -MT windows-spawn.lo -MD -MP -MF 
.deps/windows-spawn.Tpo -c 
  -DDLL_EXPORT -DPIC -o .libs/windows-spawn.o
 error: conflicting types for 'compose_handles_block'
  415 | compose_handles_block (const struct inheritable_handles *inh_handles,
      | ^~~~~~~~~~~~~~~~~~~~~
In file included from 
 note: previous declaration of 'compose_handles_block' was here
  118 | extern int compose_handles_block (const struct inheritable_handles 
      |            ^~~~~~~~~~~~~~~~~~~~~
make[5]: *** [Makefile:3299: windows-spawn.lo] Error 1

The following change fixes it for me:

* lib/windows-spawn.h: Use ANSI structure STARTUPINFOA.
 lib/windows-spawn.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/windows-spawn.h b/lib/windows-spawn.h
index 1c29d1b17..78f11893c 100644
--- a/lib/windows-spawn.h
+++ b/lib/windows-spawn.h
@@ -25,6 +25,9 @@
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>

+/* Don't assume that UNICODE is not defined.  */

 /* Prepares an argument vector before calling spawn().


reply via email to

[Prev in Thread] Current Thread [Next in Thread]