[Top][All Lists]

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

Re: groff 1.23.0.rc4 on mingw

From: Bruno Haible
Subject: Re: groff 1.23.0.rc4 on mingw
Date: Sun, 16 Apr 2023 00:08:54 +0200

On mingw, I see a compilation error:

../src/preproc/html/pre-html.cpp: In function ‘int main(int, char**)’:
../src/preproc/html/pre-html.cpp:1807:28: error: ‘WEXITSTATUS’ was not declared 
in this scope
     if (WEXITSTATUS(wstatus) != 0)
make[1]: *** [Makefile:8179: src/preproc/html/pre-html.o] Error 1

The fix can be to use the 'sys_wait' module from Gnulib. See

Note 1: The comments in the file pre-html.cpp say
  "// Most MS-DOS and Win32 environments will be missing the 'fork'
   // capability (some, like Cygwin, have it, but it is better avoided).
However, because on Cygwin, neither of the macros __MSDOS__, _WIN32 is defined,
the code in pre-html.cpp *will* use fork() on Cygwin. Which works fine, but is
known to be slow. However, I don't know whether the native Windows code (_WIN32)
will work on Cygwin: many native Windows APIs don't work right from within
Cygwin, because the worlds inside and outside a Cygwin process are quite

Note 2: char_buffer::run_output_filter uses two different implementations
for spawning a child process, one for Unix, one for Windows.

This can be simplified to a single implementation for both, based on
posix_spawn. Gnulib implements posix_spawn also for native Windows; see .


reply via email to

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