GNU bug report logs -
#25664
util.c of diffutils 3.5 fails to build on Windows
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hi,
Contrary to diffutils 3.3, src/util.c got an additional piece of code, that is quite UNIX centric. I've the following build errors when building util.c with Visual Studio's cl.exe:
- SIGSTOP, SIGTSTP, SIGALRM, SIGHUP, SIGPIPE, SIGQUIT not defined. Windows has a very limited set of signaling, see: https://msdn.microsoft.com/en-us/library/xdkz3x12.aspx
- The pseudo signals SIGKILL, SIGSTOP are not defined, similar to lib/sigaction.c.
- There is already special msvc code for signal handling, but is not used here.
- Even if the code compiles, the pr_program is UNIX centric too (PR_PROGRAM = /usr/bin/pr). I think the stuff behind paginate is solely UNIX. Can you add this behind platform specific ifdefs (#ifndef _WIN32)?
Even with using http://git.savannah.gnu.org/gitweb/?p=gperf.git;a=blob_plain;f=README.windows (step 2, native build for visual studio, using the ar-lib and compile helper scripts) (and making some minor fixes, see also https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25663) util.c did not compile.
The errors are:
util.c(227): error C2065: 'SIGSTOP': undeclared identifier
util.c(248): error C2065: 'SIGTSTP': undeclared identifier
util.c(251): error C2065: 'SIGALRM': undeclared identifier
util.c(251): error C2065: 'SIGHUP': undeclared identifier
util.c(251): error C2065: 'SIGPIPE': undeclared identifier
util.c(251): error C2065: 'SIGQUIT': undeclared identifier
util.c(301): error C2065: 'SIGTSTP': undeclared identifier
util.c(246): error C2099: initializer is not a constant
util.c(565): warning C4116: unnamed type definition in parentheses
util.c(896): warning C4047: '=': 'FILE *' differs in levels of indirection from 'int'
make[1]: *** [Makefile:1418: util.obj] Error 2
make[1]: Leaving directory '/cygdrive/d/temp/kees/downloads/diffutils-3.5/src'
make: *** [Makefile:1277: all] Error 2
I'm willing to try to make a fix, but I first like to hear your thoughts....
My idea is to remove references to the 'pr' tool on Windows/Visual Studio, as it is not available.
Regards,
Kees
[Message part 2 (text/html, inline)]
This bug report was last modified 8 years and 127 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.