Sat Nov 25 13:56:28 CET 2006  Arie Middelkoop <ariem@cs.uu.nl>
  * Use intptr_t to avoid assumption that integers are 32 bit.
  
  Compiling wxHaskell on a 64bits platform fails, because there
  are some assumptions in the code that assume that integers are
  32bits. For example, there are a couple of assignments of a
  pointer to an int.
    
  This patch fixes these problems. Sometimes, after assigning a
  pointer to an integer, the int was used as a boolean value. In
  those cases, instead of returning a pointer p, I changed the
  code to return p != NULL. In two other cases, a pointer is stored
  inside the int and in these cases I changed the type of the
  int to intptr_t, of which it is guaranteed that a pointer can be
  assigned to it and recovered from it.
  
  Requires <inttypes.h>.
  
Wed Nov 15 13:10:06 CET 2006  Arie Middelkoop <ariem@cs.uu.nl>
  * Added the -fPIC compiler flag to CXX options in the makefile.
  
  Apparantly, my platform (gentoo x86_64 linux) required that .o files are "relocatable" when there 
  are linked into a dynamic library.
  
  (It might be an idea to use libtool to hide this kind of platform-specific details)
  
diff -rN old-wxhaskell/makefile new-wxhaskell/makefile
663c663
< WXC-CXXFLAGS	=$(WXWIN-CXXFLAGS) -I$(WXC-INCDIR)
---
> WXC-CXXFLAGS	=$(WXWIN-CXXFLAGS) -fPIC -I$(WXC-INCDIR)
diff -rN old-wxhaskell/wxc/include/ewxw/wxc_types.h new-wxhaskell/wxc/include/ewxw/wxc_types.h
102c102
< #define TArrayIntOut            int*
---
> #define TArrayIntOut            intptr_t*
diff -rN old-wxhaskell/wxc/include/wrapper.h new-wxhaskell/wxc/include/wrapper.h
6a7,9
> /* just to ensure that intptr_t exists */
> #include <inttypes.h>
> 
diff -rN old-wxhaskell/wxc/src/ewxw/eljcolour.cpp new-wxhaskell/wxc/src/ewxw/eljcolour.cpp
104c104
< 	return (int) wxTheColourDatabase->FindColour ((wxChar*)_name);
---
>   return (wxTheColourDatabase->FindColour ((wxChar*)_name)) != NULL;
diff -rN old-wxhaskell/wxc/src/ewxw/eljtoolbar.cpp new-wxhaskell/wxc/src/ewxw/eljtoolbar.cpp
18c18
< 	return (int)((wxToolBar*)_obj)->AddControl ((wxControl*)ctrl);
---
> 	return ((wxToolBar*)_obj)->AddControl ((wxControl*)ctrl) != NULL;
diff -rN old-wxhaskell/wxc/src/extra.cpp new-wxhaskell/wxc/src/extra.cpp
195c195
<   int  GetId();
---
>   intptr_t GetId();
222c222
< int wxInputSink::GetId()
---
> intptr_t wxInputSink::GetId()
224c224
<   return (int)m_input;
---
>   return (intptr_t)m_input;
diff -rN old-wxhaskell/wxc/src/treectrl.cpp new-wxhaskell/wxc/src/treectrl.cpp
299c299
< EWXWEXPORT(int, wxTreeCtrl_GetSelections)(void* _obj, int* selections)
---
> EWXWEXPORT(int, wxTreeCtrl_GetSelections)(void* _obj, intptr_t* selections)
312c312
<             selections[i] = (int)(((wxTreeItemId*)sel[i])->m_pItem);
---
>             selections[i] = (intptr_t)(((wxTreeItemId*)sel[i])->m_pItem);
314c314
< 	    selections[i] = (int)(sel[i].m_pItem);
---
> 	    selections[i] = (intptr_t)(sel[i].m_pItem);

