open-src/xserver/xorg/headers_64bit.patch
changeset 1124 7bc7e624f965
parent 1123 4678f8c1d429
child 1125 0776474068be
equal deleted inserted replaced
1123:4678f8c1d429 1124:7bc7e624f965
     1 From patchwork Thu Jan  6 22:29:01 2011
       
     2 Content-Type: text/plain; charset="utf-8"
       
     3 MIME-Version: 1.0
       
     4 Content-Transfer-Encoding: 7bit
       
     5 Subject: [3/3] xfree86: Fix the sdk headers to be multilib-safe
       
     6 Date: Fri, 07 Jan 2011 06:29:01 -0000
       
     7 From: Adam Jackson <[email protected]>
       
     8 X-Patchwork-Id: 3576
       
     9 Message-Id: <[email protected]>
       
    10 To: [email protected]
       
    11 
       
    12 Use _LP64 (verified on gcc and sun compilers) instead of _XSERVER64 in
       
    13 internal header usage, and always define _XSERVER64 for modules if _LP64
       
    14 is defined.  Prevents differing xorg-server.h between 32 and 64 bit
       
    15 packages.
       
    16 
       
    17 Signed-off-by: Adam Jackson <[email protected]>
       
    18 Reviewed-by: Alan Coopersmith <[email protected]>
       
    19 
       
    20 ---
       
    21 include/colormapst.h     |    4 ++--
       
    22  include/xorg-server.h.in |    7 ++++---
       
    23  2 files changed, 6 insertions(+), 5 deletions(-)
       
    24 
       
    25 diff --git a/include/colormapst.h b/include/colormapst.h
       
    26 index 0ba5bd0..b597e2c 100644
       
    27 --- a/include/colormapst.h
       
    28 +++ b/include/colormapst.h
       
    29 @@ -103,12 +103,12 @@ typedef struct _ColormapRec
       
    30  {
       
    31      VisualPtr	pVisual;
       
    32      short	class;		/* PseudoColor or DirectColor */
       
    33 -#if defined(_XSERVER64)
       
    34 +#if defined(_LP64)
       
    35      short	pad0;
       
    36      XID		pad1;
       
    37  #endif
       
    38      XID		mid;		/* client's name for colormap */
       
    39 -#if defined(_XSERVER64) && (X_BYTE_ORDER == X_LITTLE_ENDIAN)
       
    40 +#if defined(_LP64) && (X_BYTE_ORDER == X_LITTLE_ENDIAN)
       
    41      XID		pad2;
       
    42  #endif
       
    43      ScreenPtr	pScreen;	/* screen map is associated with */
       
    44 diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
       
    45 index 76cab16..b10b994 100644
       
    46 --- a/include/xorg-server.h.in
       
    47 +++ b/include/xorg-server.h.in
       
    48 @@ -157,9 +157,6 @@
       
    49  /* Name of X server */
       
    50  #undef __XSERVERNAME__
       
    51  
       
    52 -/* Define to 1 if unsigned long is 64 bits. */
       
    53 -#undef _XSERVER64
       
    54 -
       
    55  /* Building vgahw module */
       
    56  #undef WITH_VGAHW
       
    57  
       
    58 @@ -187,4 +184,8 @@
       
    59  /* X Access Control Extension */
       
    60  #undef XACE
       
    61  
       
    62 +#ifdef _LP64
       
    63 +#define _XSERVER64 1
       
    64 +#endif
       
    65 +
       
    66  #endif /* _XORG_SERVER_H_ */