Xcalloc - X11/Xlibint.h and xorg/os.h
Jeremy Huddleston
jeremyhu at freedesktop.org
Mon Feb 18 17:26:59 PST 2008
bump... could someone please chime in on this? Am I missing
something? This seems like a bug to me, but I'm not sure what the
correct fix is...
On Feb 17, 2008, at 19:02, Jeremy Huddleston wrote:
> Is there some reason that Xcalloc is #defined in 11/Xlibint.h? And
> on top of that, it is inconsistent with org/os.h (2 args vs 1).
>
> I did some goolgling to look into this, and it seems to just turn up
> weird inconsistencies.
>
> $ grep Xcalloc /usr/X11/include/xorg/os.h /usr/X11/include/X11/
> Xlibint.h
>
> /usr/X11/include/xorg/os.h:#define xcalloc(_num, _size)
> Xcalloc((unsigned long)(_num)*(unsigned long)(_size))
> /usr/X11/include/xorg/os.h:extern pointer Xcalloc(unsigned long /
> *amount*/);
> /usr/X11/include/X11/Xlibint.h:# define Xcalloc(nelem, elsize)
> calloc(((nelem) == 0 ? 1 : (nelem)), (elsize))
> /usr/X11/include/X11/Xlibint.h:# define Xcalloc(nelem, elsize)
> calloc((nelem), (elsize))
>
>
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3040 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20080218/a420d29e/attachment.bin>
More information about the xorg
mailing list