Bug 1102

Summary: AIX compile error in Xprint extension (redefined macro)
Product: xorg Reporter: Dan McNichol <mcnichol>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: high CC: kem, roland.mainz
Version: git   
Hardware: Other   
OS: AIX   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 351    

Description Dan McNichol 2004-08-16 14:32:56 UTC
Here is the error I am seeing:

        rm -f PsPixmap.o
        xlc -c -O -D__STR31__ -DNDEBUG    -I. -I../../cfb -I../../mi -
I../../mfb -I../../../../lib  -I../../../../exports/include/X11 -
I../../include -I.. -I../../../../include  -I../../../../include/extensions -
I../../../../include/fonts -I../../../../lib/font/include   -
I../../../../lib/font/FreeType  -I../../../.. -I../../../../exports/include   -
DSYSV -DAIXV3 -DAIXV4 -DAIXV5 -D_ALL_SOURCE -DSHAPE   -DXKB -DLBX -DXAPPGROUP -
DXCSECURITY -DTOGCUP      -DDPMSExtension   -DPIXPRIV      -DRENDER -DRANDR -
DXFIXES -DDAMAGE -DCOMPOSITE -DXEVIE -D_IBM_LFT -DNDEBUG    -DFUNCPROTO=15   -
UXFree86LOADER -DXP_PSTEXT -D_XP_PRINT_SERVER_     -DMITMISC -DXTEST -DXTRAP -
DXSYNC -DXCMISC -DXRECORD -DMITSHM -DBIGREQS      -DDBE -DDPMSExtension -
DEVI                                    -DXTESTEXT1   PsPixmap.c
"PsPixmap.c", line 82.9: 1506-213 (S) Macro name BitsPerPixel cannot be 
redefined.
"PsPixmap.c", line 82.9: 1506-358 (I) "BitsPerPixel" is defined on line 552 
of ../../include/servermd.h.
make: The error code from the last command is 1.


Stop.





And here is a very simple patch to fix it:

*** xc/programs/Xserver/Xprint/ps/PsPixmap.c.orig       Fri Apr 23 13:57:56 
2004
--- xc/programs/Xserver/Xprint/ps/PsPixmap.c    Mon Aug 16 10:37:28 2004
***************
*** 79,84 ****
--- 79,87 ----
  
  #include "Ps.h"
  
+ #ifdef BitsPerPixel
+ #undef BitsPerPixel
+ #endif
  #define BitsPerPixel(d) (\
    (1 << PixmapWidthPaddingInfo[d].padBytesLog2) * 8 / \
    (PixmapWidthPaddingInfo[d].padRoundUp+1))
Comment 1 Kevin E. Martin 2004-08-18 11:42:26 UTC
Redefining to _BitsPerPixel to avoid conflict with servermd.h
Patch checked in.
Closing.

Comment 2 Kevin E. Martin 2004-08-18 11:42:58 UTC
Actually closing it this time.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.