|
From: | Bruno Haible |
Subject: | Re: Texinfo 7.0.94 on native Windows |
Date: | Sun, 15 Oct 2023 13:24:32 +0200 |
On mingw 5.0.3, there are no test failures any more. A big improvement, compared to 7.0.90 (see my earlier report at <https://lists.gnu.org/archive/html/bug-texinfo/2023-08/msg00030.html>). With MSVC 14 (64-bit) instead of mingw, though, there are compilation errors and warnings: C:\cygwin64\home\bruno\texinfo-7.0.94\info\man.c(439): warning C4047: '=': 'FILE *' differs in levels of indirection from 'int' C:\cygwin64\home\bruno\texinfo-7.0.94\info\man.c(491): error C2079: 'timeout' uses undefined struct 'timeval' C:\cygwin64\home\bruno\texinfo-7.0.94\info\tilde.c(45): warning C4312: 'type cast': conversion from 'int' to 'passwd *' of greater size C:\cygwin64\home\bruno\texinfo-7.0.94\info\tilde.c(47): error C2037: left of 'pw_dir' specifies undefined struct/union 'passwd' C:\cygwin64\home\bruno\texinfo-7.0.94\info\tilde.c(85): error C2037: left of 'pw_dir' specifies undefined struct/union 'passwd' C:\cygwin64\home\bruno\texinfo-7.0.94\info\tilde.c(85): error C2198: 'strlen': too few arguments for call C:\cygwin64\home\bruno\texinfo-7.0.94\info\tilde.c(87): error C2037: left of 'pw_dir' specifies undefined struct/union 'passwd' C:\cygwin64\home\bruno\texinfo-7.0.94\info\tilde.c(87): error C2198: 'strcpy': too few arguments for call C:\cygwin64\home\bruno\texinfo-7.0.94\info\filesys.c(416): warning C4047: '=': 'FILE *' differs in levels of indirection from 'int' install-info.obj : error LNK2019: unresolved external symbol popen referenced in function open_possibly_compressed_file install-info.obj : error LNK2019: unresolved external symbol pclose referenced in function readfile For 'popen' and 'pclose', one needs the gnulib modules 'popen' and 'pclose', respectively. For 'timeval', one needs the gnulib module 'sys_time'. Then, some link errors are seen: man.obj : error LNK2019: unresolved external symbol select_used_without_including_sys_select_h referenced in function read_from_fd session.obj : error LNK2001: unresolved external symbol select_used_without_including_sys_select_h session.obj : error LNK2019: unresolved external symbol ioctl referenced in function info_gather_typeahead To resolve this, one needs the gnulib module 'select'. Thus, I'm arriving at the following changes, that make texinfo work with MSVC, like it does with mingw: - "make check" passes. - The behaviour of the 'ginfo' program on MSVC is the same as on mingw, albeit not really useful currently: './info -f texinfo.info' spits out the entire manual to stdout at once. It looks like the device gets set to stdout, or there is no knowledge about the terminal window's height, or something like that. Note the preprocessor predefs: - __MINGW32__ is defined on mingw (both 32-bit and 64-bit Windows), - _WIN32 is defined on native Windows (i.e. Windows except Cygwin), also both 32-bit and 64-bit. That includes mingw. See <https://github.com/cpredef/predef>. I'm not saying that it's perfect. For example, the function pause_or_input has specific code for native Windows; thus the socket-able code with select() on stdin could probably be disabled? (This applies to both mingw and MSVC.) Note: I wouldn't push for these changes before the 7.1 release, since in particular the 'select' module can trigger behaviour changes. Rather, this is post-7.1 stuff IMO. Bruno
0001-MSVC-port-part-1-Ran-gnulib-tool-add-import-popen-pc.patch.gz
Description: application/gzip
0002-MSVC-port-part-2-Accommodate-the-added-gnulib-module.patch
Description: Text Data
0003-MSVC-port-part-3-Support-compilers-other-than-GCC.patch
Description: Text Data
0004-MSVC-port-part-4-Use-CR-LF-handling-like-with-mingw.patch
Description: Text Data
0005-MSVC-port-part-5-Home-directory-handling-like-with-m.patch
Description: Text Data
0006-MSVC-port-part-6-File-name-handling-like-with-mingw.patch
Description: Text Data
0007-MSVC-port-part-7-Screen-and-input-handling-like-with.patch
Description: Text Data
0008-MSVC-port-part-8-speech-friendly-option-like-with-mi.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |