ghostpdl-8.70 ls-debug/ls-product build with CYGWIN (on a windows system) succeeds, but the ghostpdl-8.71 (from http://ghostscript.com/releases/ghostpdl-8.71.tar.bz2) ls-debug/ls-product build fails on zfapi.c (see result of build below): cc -DDEBUG -ggdb -g3 -O0 -Wall -Wundef -Wstrict-prototypes -Wmissing-declaration s -Wmissing-prototypes -Wpointer-arith -Wwrite-strings -Wno-strict-aliasing -fno -builtin -fno-common -DHAVE_STDINT_H -DHAVE_MKSTEMP -DHAVE_HYPOT -DGX_COLOR_INDE X_TYPE="unsigned long" -DPSI_INCLUDED -DPCL_INCLUDED -DPSI_INCLUDED -I../gs/psi -I./obj -I./obj -I../gs/base -o ./obj/zfapi.o -c ../gs/psi/zfapi.c In file included from /usr/include/sys/signal.h:104, from /usr/include/signal.h:5, from /usr/include/time.h:140, from /usr/include/sys/stat.h:9, from ../gs/base/stat_.h:27, from ../gs/base/gxiodev.h:21, from ../gs/base/stream.h:22, from ../gs/psi/zfapi.c:49: /usr/include/cygwin/signal.h:54: error: expected `)' before `->' token /usr/include/cygwin/signal.h:54: error: expected `)' before `.' token /usr/include/cygwin/signal.h:54: error: expected `)' before `.' token /usr/include/cygwin/signal.h:55: error: expected `;' before `unsigned' ../gs/psi/zfapi.c: In function `FAPI_FF_get_word': ../gs/psi/zfapi.c:504: warning: unused variable `name' ../gs/psi/zfapi.c: In function `FAPI_FF_get_float': ../gs/psi/zfapi.c:628: warning: unused variable `subarray_index' ../gs/psi/zfapi.c: In function `sfnt_get_glyph_offset': ../gs/psi/zfapi.c:786: warning: unused variable `off' ../gs/psi/zfapi.c:785: warning: unused variable `i' make[2]: *** [obj/zfapi.o] Error 1 make[2]: Leaving directory `/cygdrive/c/artifex/ghostpdl-8.71/language_switch' make[1]: *** [pdl-debug] Error 2 make[1]: Leaving directory `/cygdrive/c/artifex/ghostpdl-8.71/language_switch' make: *** [ls-debug] Error 2
I've been able to confirm with cygwin 1.7.1, though what's confusing the header wasn't immediately obvious.
Hmm, windows/cygwin doesn't support quite a few POSIX signals, and that particular part of cygwin definitely doesn't inter-op with mingw (i.e. no-cygwin) headers. FWIW, the language switch build can be built with microsoft Windows SDK express (the free version), if that helps. That also looks like FAPI change from Ken - I thought that's optional?
The build immediately fails with: cc1: unrecognized option `-Wno-strict-aliasing' fixing this, it fails with ../gs/base/stdint_.h:41:21: stdint.h: No such file or directory next, the build fails with ld: cannot find -ldl and this was the last bug. I cannot reproduce the errors in signal.h
I stumbled on this when trying to cmake-ify the ghostpdl (i.e. replace the *.mak with *.cmake so that it can be build with gcc/msvc/... (it fits better in our normal build-environment). Just one set of makefiles to maintain, i.s.o. all flavours now, and the bonus, cmake takes care of the dependencies. Normally I build with msvc, but I wanted to try gcc also, and on Windows that means CYGWIN for me.
Created attachment 5975 [details] patch Include stat_.h before estack.h, which defines esp macro. Prevent a spurious macro substitution in Cygwin version of signal.h. Backward compatibility problems with an ancient version of Cygwin are, probably, not worth fixing.
The patch has been committed as a rev. 10777. Regression testing shows no differences.
*** Bug 691480 has been marked as a duplicate of this bug. ***