pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/33781: devel/SDL Xlibint (xorg bug???) _XData32 Xlibint.[ch]



>Number:         33781
>Category:       pkg
>Synopsis:       devel/SDL Xlibint (xorg bug???) _XData32 Xlibint.[ch]
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 21 09:40:00 +0000 2006
>Originator:     Gilles Dauphin
>Release:        SunOS 5.10 i86pc
>Organization:
ENST 
>Environment:


System: SunOS bi.enst.fr 5.10 Generic_Patch_118844-30 i86pc


>Description:


 gcc -O -I/pkg/obj/devel/SDL/work/.buildlink/include -DGLX_GLXEXT_LEGACY 
-I./include -D_GNU_SOURC
E=1 -I/pkg/obj/devel/SDL/work/.x11-buildlink/include -DXTHREADS -D_REENTRANT -c 
./src/video/x11/S
DL_x11dyn.c  -fPIC -DPIC -o build/.libs/SDL_x11dyn.o
In file included from ./src/video/x11/SDL_x11dyn.c:93:
./src/video/x11/SDL_x11sym.h:165: error: conflicting types for '_XData32'
/pkg/obj/devel/SDL/work/.buildlink/include/X11/Xlibint.h:441: error: previous 
declaration of '_XD
ata32' was here
./src/video/x11/SDL_x11sym.h:165: error: conflicting types for '_XData32'
/pkg/obj/devel/SDL/work/.buildlink/include/X11/Xlibint.h:441: error: previous 
declaration of '_XD
ata32' was here
gmake: *** [build/SDL_x11dyn.lo] Error 1
*** Error code 2

Stop.
bmake: stopped in /usr/pkgsrc/devel/SDL



>How-To-Repeat:


bmake in SDL


>Fix:


Declaration of _XData32 is a little bit confuse:
Solaris Xlibint.h declare _XData32 for LONG64 as :
    extern void _XData32 (Display *dpy, long *data, unsigned long len);

But see the code fragment from Xorg Xlibint.c and Xlibint.h  :
Xlibint.h declare 'int _XData32(..)' but in Xlibint.c _XData32 return nothing.

I am working on a specific patch.

-----------------Xlibint.h------------
ifdef LONG64
#define Data32(dpy, data, len) _XData32(dpy, (long *)data, len)
extern int _XData32(
             Display *dpy,
             register long *data,
             unsigned len
);
extern void _XRead32(
             Display *dpy,
             register long *data,
             long len
);
#else
------------------Xlibint.c-----------------------------------------
#ifdef LONG64
_XData32 (dpy, data, len)
    Display *dpy;
    register long *data;
    unsigned len;
{
    register int *buf;
    register long i;

    while (len) {
        buf = (int *)dpy->bufptr;
        i = dpy->bufmax - (char *)buf;
        if (!i) {
            _XFlush(dpy);
            continue;
        }
        if (len < i)
            i = len;
        dpy->bufptr = (char *)buf + i;
        len -= i;
        i >>= 2;
        while (--i >= 0)
            *buf++ = *data++;
    }
}
#endif /* LONG64 */
-----------------------------------------------





Home | Main Index | Thread Index | Old Index