[gs-bugs] [Bug 691480] New: cygwin build fails with parse error on esp field in signal.h

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Mon Jul 19 13:28:42 UTC 2010


           Summary: cygwin build fails with parse error on esp field in
           Product: Ghostscript
           Version: 8.71
          Platform: PC
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P4
         Component: Build Process
        AssignedTo: hintak at ghostscript.com
        ReportedBy: williambader at hotmail.com
         QAContact: gs-bugs at ghostscript.com
   Estimated Hours: 0.0

Created an attachment (id=6512)
 --> (http://bugs.ghostscript.com/attachment.cgi?id=6512)
patches to ensure that esp in estack.h does not conflict with eps in signal.h

gs 8.71 fails to build on Windows under cygwin because "base/stat_.h" includes
<sys/stat.h> which includes <time.h> which includes <signal.h> which includes
<sys/signal.h> which includes <cygwin/signal.h> which defines struct ucontext
which has fields with the names of i386 registers including esp.
estack.h defines a macro esp as (e_stack.p).
If estack.h is included before stat_.h, the declaration of the esp field in
signal.h gets syntax errors.
For example,

#define esp abc.def
#include <sys/stat.h>

fails with

In file included from /usr/include/sys/signal.h:107,
                 from /usr/include/signal.h:5,
                 from /usr/include/time.h:140,
                 from /usr/include/sys/stat.h:9,
                 from test.c:2:
/usr/include/cygwin/signal.h:54: error: parse error before '.' token
/usr/include/cygwin/signal.h:58: error: parse error before '}' token

The attached patches fix the problem.

I had a later problem linking because configure found jbig but didn't link it
in.  I added a way to pass more libraries to Makefile.in so I could link with
-ljbig.  (Makefile.in already had LDFLAGS and XLDFLAGS, but setting them from
the command line caused more problems. I think that configure needs to control

The PC is running Windows Server 2003.
uname -a on cygwin returns
CYGWIN_NT-5.2 wtp 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin

williambader at hotmail.com

Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the gs-bugs mailing list