Source-Changes-D archive

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

Re: CVS commit: xsrc/external/mit/libdrm/dist



In article <20140321225300.547D96055B%jupiter.mumble.net@localhost>,
Taylor R Campbell  <campbell+netbsd-source-changes-d%mumble.net@localhost> 
wrote:
>   Date: Fri, 21 Mar 2014 22:51:15 +0000 (UTC)
>   From: christos%astron.com@localhost (Christos Zoulas)
>
>   >+#ifdef __NetBSD__         /* XXX */
>
>   That ifdef could just be DRM_IOCTL_MMAP
>
>I guess so, but it's only on NetBSD that mmap actually doesn't work
>and you have to use DRM_IOCTL_MMAP.  It's also sleazy enough that I
>made us define our own ioctl; I don't want to tempt fate by pretending
>it's a general non-NetBSD API (yet).

If someone adopts it, then they'll have to change the code in many places
which is not worth it. Plus upstream probably likes fewer OS specific defines.

>   >+    static const struct drm_mmap zero_mmap_req;
>   >+    struct drm_mmap mmap_req = zero_mmap_req;
>
>           struct  drm_mmap  map_req = { 0 }; works just fine?
>
>In this case it does, but I got in the habit of the above pattern
>because `= { 0 }' doesn't work if the first member in the structure
>type is not an integer or pointer.  Would be nice if `= {}' worked,
>but it's not standard.

Yes, in this case it does, so do it :-)

christos



Home | Main Index | Thread Index | Old Index