darcs patch: Turn off _SERVER64 and correct type of state field in ...

the Edward Blevins thedward at antejentacular.org
Thu Mar 29 18:27:29 EDT 2007


On Fri, Mar 30, 2007 at 07:40:37AM +1000, Chris Mears wrote:
> Fri Mar 30 07:14:05 EST 2007  Chris Mears <chris at cmears.id.au>
>   * Turn off _SERVER64 and correct type of state field in Event structs.
>   
>   _SERVER64 should be defined only for compiling X server code, so we
>   shouldn't use it here.
>   
>   Changed the type of the "state" member in the XKeyEvent,
>   XButtonEvent and XMotionEvent structures from Modifier to CUInt.
>   This now matches the type given in the X11 header files.

I'd like to suggest an alternate patch. It is a tiny bit shorter and
shouldn't require any changes to X11-Extras.

New patches:

[Turn off _SERVER64 and change Modifier to CUInt
thedward at antejentacular.org**20070329221748
 
 _SERVER64 should be defined only for compiling X server code,
 so we shouldn't use it here. (Thanks for the heads up, Chris)
 
 Changed Modifier to be a CUInt. 
 
 This shouldn't require any changes to X11-Extras.
 
]

-- 
the Edward Blevins   <thedward at barsoom.net>    (512) 796-6661
Today is Pungenday, the 15th day of Discord in the YOLD 3173
-------------- next part --------------

New patches:

[Turn off _SERVER64 and change Modifier to CUInt
thedward at antejentacular.org**20070329221748
 
 _SERVER64 should be defined only for compiling X server code,
 so we shouldn't use it here. (Thanks for the heads up, Chris)
 
 Changed Modifier to be a CUInt. 
 
 This shouldn't require any changes to X11-Extras.
 
] {
hunk ./Graphics/X11/Types.hsc 1269
-type Modifier		= Mask
+type Modifier		= CUInt
hunk ./X11.buildinfo.in 5
-cc-options: @X_CFLAGS@ @XSERVER64@
+cc-options: @X_CFLAGS@
hunk ./configure.ac 47
-
-  AC_CHECK_SIZEOF([unsigned long])
-  if test "$ac_cv_sizeof_unsigned_long" = 8; then
-	  AC_SUBST(XSERVER64,["-D_XSERVER64"])
-  fi
}

Context:

[(X11.Graphics) More Int -> CInt cleanup ; Will break existing programs.
thedward at antejentacular.org**20070329010533
 
 This patch takes care of the rest of the Int usages.
 
 These changes break API compatibility. Existing programs will likely
 require (minor[1]) changes to compile once these changes are applied.
 
 [1]Mostly just switching from Int to CInt or using fromIntegral as appropriate.
 
 
] 
[Changing Int to CInt and building with -D_XSERVER64 (when appropriate)
thedward at antejentacular.org**20070328062453
 
 I went through and weeded out all the Ints I could find, replacing them
 with CInts, adding fromIntegral calls as necessary.
 
 I modified configure.ac and X11.buildinfo.in to support detecting 64-bit
 systems. (inspired by the test in the xorg build).
 
 All these changes seem to make X11 much more useful on 64-bit systems.
 
 Most importantly, I've got xmonad up and running beautifully.
 
] 
[README about building from darcs
Ross Paterson <ross at soi.city.ac.uk>**20070218110201] 
[Warning police: Remove redundant export/import
sven.panne at aedion.de**20070106162533] 
[bump version to 1.2 (added thread-related functions)
Simon Marlow <simonmar at microsoft.com>**20070105153426] 
[XNextEvent should be *safe*, for correct behaviour with threads
Simon Marlow <simonmar at microsoft.com>**20070105152519] 
[add initThreads, lockDisplay, unlockDisplay (threads support)
Simon Marlow <simonmar at microsoft.com>**20070105152456] 
[also compile Graphics.X11 (it was missing)
Simon Marlow <simonmar at microsoft.com>**20070105151541] 
[make it work inplace
Simon Marlow <simonmar at microsoft.com>**20070105144721] 
[Extended the set of Xutil.h macros which should better be functions
sven.panne at aedion.de**20061124175235] 
[Try to get a prototype (and not a macro) with recent X11 headers
sven.panne at aedion.de**20061124174842] 
[undef XDestroyImage instead of defining XUTIL_DEFINE_FUNCTIONS
Ross Paterson <ross at soi.city.ac.uk>**20061108142602
 
 Comment in the file:
 Xutil.h overrides some functions with macros.
 In recent versions of X this can be turned off with
 
     #define XUTIL_DEFINE_FUNCTIONS
 
 before the #include, but this doesn't work with older versions.
 As a workaround, we undef the macros here.  Note that this is only
 safe for functions with return type int.
 
] 
[re-export Graphics.X11.Xlib.Image
Ross Paterson <ross at soi.city.ac.uk>**20061106085901] 
[haddock tweaks
Ross Paterson <ross at soi.city.ac.uk>**20061106085832] 
[Graphics.X11.Xlib.Image doesn't need hsc2hs or -fglasgow-exts
Ross Paterson <ross at soi.city.ac.uk>**20061106084512] 
[The X11 image functions should not be macros
sven.panne at aedion.de**20061105112751] 
[add Graphics/X11/Xlib/Image.hsc mistakenly omitted from last patch
Ross Paterson <ross at soi.city.ac.uk>**20061103143538] 
[fill in Image routines in X11 (#982 from Frederik Eaton)
Ross Paterson <ross at soi.city.ac.uk>**20061103103559] 
[note CPP extension
Ross Paterson <ross at soi.city.ac.uk>**20060908233707] 
[includes -> install-includes
Ross Paterson <ross at soi.city.ac.uk>**20060829123744] 
[exclude Setup.hs even if not building package
Ross Paterson <ross at soi.city.ac.uk>**20060825222701] 
[increment version number
Ross Paterson <ross at soi.city.ac.uk>**20060825162304] 
[exclude Setup.hs from build
Ross Paterson <ross at soi.city.ac.uk>**20060824183533] 
[add boilerplate Setup.hs
Ross Paterson <ross at soi.city.ac.uk>**20060824115019] 
[add --enable/disable-x11 flag to configure
Simon Marlow <simonmar at microsoft.com>**20060316162346
 submitted by Duncan Coutts.
] 
[TAG Initial conversion from CVS complete
John Goerzen <jgoerzen at complete.org>**20060112154138] 
Patch bundle hash:
5f8e908a606855ec7b540f8d574ac320086017c0


More information about the Libraries mailing list