This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: run2.exe segfaults when GDI and X11 elements are present
Ken Brown wrote:
> Never mind. I figured out how to do it using cygport. But the build
> fails for me:
>
> libtool: compile: gcc -DHAVE_CONFIG_H -I.
> -I/usr/src/run2-0.3.2-2/src/run2/lib -I.. -I..
> -I/usr/src/run2-0.3.2-2/src/run2 -I/usr/include/libxml2 -O2 -pipe -c
> /usr/src/run2-0.3.2-2/src/run2/lib/env.c -o env.o >/dev/null 2>&1
> In file included from
> /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../include/w32api/windows.h:87,
> from /usr/src/run2-0.3.2-2/src/run2/lib/checkX.c:72:
> /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../include/w32api/winspool.h:255:
> error: two or more data types in declaration specifiers
> /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../include/w32api/winspool.h:270:
> error: two or more data types in declaration specifiers
> /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../include/w32api/winspool.h:291:
> error: two or more data types in declaration specifiers
> /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../include/w32api/winspool.h:316:
> error: two or more data types in declaration specifiers
> /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../include/w32api/winspool.h:571:
> error: two or more data types in declaration specifiers
> /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../include/w32api/winspool.h:594:
> error: two or more data types in declaration specifiers
> /usr/src/run2-0.3.2-2/src/run2/lib/checkX.c: In function ‘computeTimespec’:
> /usr/src/run2-0.3.2-2/src/run2/lib/checkX.c:304: warning: incompatible
> implicit declaration of built-in function ‘floor’
> /usr/src/run2-0.3.2-2/src/run2/lib/checkX.c: In function
> ‘try_with_timeout’:
> /usr/src/run2-0.3.2-2/src/run2/lib/checkX.c:322: warning: incompatible
> implicit declaration of built-in function ‘fabs’
>
> There's no need for you to respond unless this has a simple answer. I
> can wait until you're ready to release a new version.
I saw that too, after doing a complete clean & rebuild. It's due to
this, in <X11/Xlib.h> as of xorg 7.5:
#define Status int
But then in <windows.h>:
typedef struct _JOB_INFO_1A {
...
DWORD Status;
...
} JOB_INFO_1A,*PJOB_INFO_1A,*LPJOB_INFO_1A;
...and bang, you're dead. "Fixed" in my local version (not yet
committed to svn) as below. (Removing #include <X11/Xlib.h> is /not/
important, it's already included at line 54).
Index: lib/checkX.c
===================================================================
--- lib/checkX.c (revision 5)
+++ lib/checkX.c (working copy)
@@ -62,13 +62,11 @@
#if HAVE_MATH_H
# include <math.h>
#endif
-#if HAVE_X11_XLIB_H
-# include <X11/Xlib.h>
-#endif
#if HAVE_WINDOWS_H && HAVE_OPENCLIPBOARD
# define WIN32_LEAD_AND_MEAN
# define NOMINMAX
+# undef Status /* Xlib.h from xorg 7.5 is evil */
# include <windows.h>
#endif
--
Chuck
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple