[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
https://www.gnu.org/software/gnulib/manual/html_node/sys_002fwait_002eh.html
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
different.
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
https://savannah.gnu.org/news/?id=10219 .
Bruno
- Re: groff 1.23.0.rc4 on AIX, (continued)
Re: groff 1.23.0.rc4 on Solaris 10, Bruno Haible, 2023/04/15
Re: groff 1.23.0.rc4 on mingw,
Bruno Haible <=
Re: groff 1.23.0.rc4 on Alpine Linux, Bruno Haible, 2023/04/15
Re: groff 1.23.0.rc4 on FreeBSD, Bruno Haible, 2023/04/15