On Thursday 20 October 2005 15:01, Ian Romanick wrote:
> Adam Jackson wrote:
> > CVSROOT: /cvs/dri
> > Module name: drm
> > Repository: drm/libdrm/
> > Changes by: [EMAIL PROTECTED] 05/10/20 10:32:32
> >
> > Log message:
> >   Remove bogus Xlib dependency.
> >
> > Modified files:
> >       drm/libdrm/:
> >         xf86drm.c
> >
> >   Revision      Changes    Path
> >   1.52          +2 -3      drm/libdrm/xf86drm.c
>
> This change results in the following code segment.  Is that *really*
> what you intended?  It looks a little nutty to me.  I think xf86_ansic.h
> already wraps malloc and free, so do we even need _DRM_MALLOC and
> _DRM_FREE at all anymore?
>
> # ifdef DRM_USE_MALLOC
> #  define _DRM_MALLOC malloc
> #  define _DRM_FREE   free
> # else
> #  define _DRM_MALLOC malloc
> #  define _DRM_FREE   free
> # endif

Obviously, the more preprocessor statements involved, the better it works.

This was admittedly a five-second hack to eliminate a useless (and wrong!) 
dependency on Xlib.  But you're right, the libcwrapper does wrap malloc, so 
that code is totally useless.  Feel free to clean it up if I don't get to it 
first.

- ajax

Attachment: pgpbwdYc1CMmm.pgp
Description: PGP signature

Reply via email to