[xorg-bugzilla-noise] [Bug 1103] New: AIX compiler error in render extension (redefined macro)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Aug 16 14:43:16 PDT 2004


Please do not reply to this email: if you want to comment on the bug, go to          
the URL shown below and enter yourcomments there.   
 
https://freedesktop.org/bugzilla/show_bug.cgi?id=1103        
   
           Summary: AIX compiler error in render extension (redefined macro)
           Product: xorg
           Version: CVS_head
          Platform: Other
        OS/Version: AIX
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Server/general
        AssignedTo: xorg-bugzilla-noise at freedesktop.org
        ReportedBy: mcnichol at austin.ibm.com
                CC: kem at freedesktop.org


Here is the compile error I am hitting:

        rm -f renderedge.o
        xlc -c -O -D__STR31__ -DNDEBUG    -I. -I../include -I../mi -
I../../../include/fonts  -I../fb -I../hw/kdrive -I../../../include/extensions -
I../../../exports/include/X11  -I../../../include/fonts -I../Xext  -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      renderedge.c
"renderedge.c", line 47.9: 1506-213 (S) Macro name div cannot be redefined.
"renderedge.c", line 47.9: 1506-358 (I) "div" is defined on line 634 
of /usr/include/stdlib.h.
"renderedge.c", line 59.51: 1506-068 (S) Operation between types "struct 
div_t" and "long" is not allowed.
make: The error code from the last command is 1.


Stop.







And here is a simple patch to fix the problem:

*** xc/programs/Xserver/render/renderedge.c.orig        Fri Aug  6 18:42:10 
2004
--- xc/programs/Xserver/render/renderedge.c     Mon Aug 16 10:42:56 2004
***************
*** 44,49 ****
--- 44,52 ----
      return (i | f);
  }
  
+ #ifdef div
+ #undef div
+ #endif
  #define div(a,b)    ((a) >= 0 ? (a) / (b) : -((-(a) + (b) - 1) / (b)))
  
  /*        
   
   
--         
Configure bugmail: https://freedesktop.org/bugzilla/userprefs.cgi?tab=email       
   
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the xorg-bugzilla-noise mailing list