On Sun, 2006-11-05 at 12:38 +0100, Sven Panne wrote:
> Am Freitag, 3. November 2006 11:37 schrieb Ross Paterson:
> > Fri Nov  3 02:35:59 PST 2006  Ross Paterson <[EMAIL PROTECTED]>
> >   * fill in Image routines in X11 (#982 from Frederik Eaton)
> >
> >     M ./Graphics/X11/Types.hsc +12
> >     M ./Graphics/X11/Xlib/Misc.hsc -11 +7
> >     M ./Graphics/X11/Xlib/Types.hsc -1 +9
> >     M ./X11.cabal -1 +2
> > [...]
> 
> FYI: I've made this patch compile by telling the X11 headers to use normal 
> prototypes (not macros) for the image functions.

Good. Yeah, this issue of macros vs proper C functions is going to bite
us more if/when ghc moves away from compiling via C by default.

> In addition I have 3 remarks about the X11 package:
> 
>    * Strictly spoken, the majority of types are wrong: An Int is not a CInt, 
> and the binding will fail on platforms where the actual representation is 
> different. There should be a general code review of all the types in the 
> "foreign import"s.

Yes, this will fail on most 64 bit machines where CInt is 32bit but Int
is 64bit.

>    * The use of hsc2hs is not really needed, because the X11 prototypes and 
> #defines are fixed for all eternity because of ABI issues. This situation is 
> quite similar to OpenGL: There are different implementations, but they all 
> have to agree on a single ABI.

Are there no structures with offsets etc? Those change between arches.

Duncan

Reply via email to