Bug 1102 - AIX compile error in Xprint extension (redefined macro)
Summary: AIX compile error in Xprint extension (redefined macro)
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: Other AIX
: high blocker
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 351
  Show dependency treegraph
 
Reported: 2004-08-16 14:32 UTC by Dan McNichol
Modified: 2004-08-28 22:42 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

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.