Re: Building GS on Cygwin
"Igor V. Melichev" <[email protected]>
| Newsgroups | gmane.comp.printing.ghostscript.patches |
|---|---|
| Message-ID | <[email protected]> |
Please commit. Igor. ----- Original Message ----- From: "Alex Cherepanov" <[email protected]> To: "gs-code-review" <[email protected]> Sent: Sunday, August 17, 2003 1:10 AM Subject: [gs-code-review] Building GS on Cygwin > The following 2 fixes are required to build GS on Cygwin. > > Cygwin has no stdint.h but defines "MS types" in sys/types.h. > sys/types.h is included by many other standard headers. > Some MS types conflict with a standard type emulation provided > by config_types.h . So we have to define missing types via MS types. > > Cygwin requires X11 libraries in the order Xt SM ICE Xext X11 > but autoconf generated them in the order SM ICE Xt Xext X11 > > I don't know why does it is significant but pre-autoconf > scripts use Xt SM ICE Xext X11 order. > > > ---------------------------------------------------------------------------- ---- > Index: gs/src/configure.ac > =================================================================== > RCS file: /cvs/ghostscript/gs/src/configure.ac,v > retrieving revision 1.32 > diff -b -u -r1.32 configure.ac > --- gs/src/configure.ac 11 Jul 2003 15:18:10 -0000 1.32 > +++ gs/src/configure.ac 16 Aug 2003 20:45:12 -0000 > @@ -268,7 +268,7 @@ > # enable X11 output devices > X11DEVS='$(DD)x11.dev $(DD)x11alpha.dev $(DD)x11cmyk.dev $(DD)x11gray2.dev $(DD)x11gray4.dev $(DD)x11mono.dev' > # the makefile wants a list of just the library names in XLIBS > - for item in $X_PRE_LIBS -lXt -lXext -lX11 $X_EXTRA_LIBS; do > + for item in -lXt $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS; do > stripped=`echo "$item" | sed -e 's/-l//'` > if test "x$stripped" != "x$item"; then > XLIBS="$XLIBS $stripped" > ---------------------------------------------------------------------------- ---- > --- os_types.h 2003-06-14 05:40:04.000000000 -0400 > +++ D:\gs_cvs\gs\jbig2dec\os_types.h 2003-08-15 18:56:05.000000000 -0400 > @@ -24,12 +24,26 @@ > the build system doesn't pass them directly. > */ > > -#ifdef HAVE_CONFIG_H > -#include "config_types.h" > +#ifndef _OS_TYPES_H > +#define _OS_TYPES_H > + > +#ifdef __CYGWIN__ > +# include <sys/types.h> > + /* > + * Cygwin has no stdint.h but defines "MS types". Some of them conflict with > + * a standard type emulation provided by config_types.h . > + */ > + typedef u_int8_t uint8_t; > + typedef u_int16_t uint16_t; > + typedef u_int32_t uint32_t; > +#elif defined(HAVE_CONFIG_H) > +# include "config_types.h" > #elif defined(_WIN32) > -#include "config_win32.h" > +# include "config_win32.h" > #endif > > #if defined(HAVE_STDINT_H) || defined(__MACOS__) > #include <stdint.h> > #endif > + > +#endif /* _OS_TYPES_H */ >