[PATCH] drm.h: Handle DragonFly like Linux

randyf at sibernet.com randyf at sibernet.com
Tue May 17 07:48:11 UTC 2016



On Tue, 17 May 2016, Francois Tigeot wrote:

> Hi Randy,
>
> randyf at sibernet.com wrote:
>>
>>    If you are interested in the primary Solaris source, you will really
>> want to looking at:
>> 
>> https://java.net/projects/solaris-x11/sources/x-s12-clone/show/open-src/kernel
>
> Thanks. This doesn't look like a git repository though.
> How can I clone it ?
>

   Yea, it's a mercurial repository.  However, it is also browsable in that 
link, if you were interested in specific files (drm.h - at least for now - 
is in sys/drm).

>>> They are divergent by design :-/
>>> Making the Linux headers public and removing the #else path in libdrm's
>>> drm.h could be the right thing to do. I'll keep thinking about it...
>>
>>    Removing the #else path will cause Solaris compiles to fail as it
>> does consume that side of the conditional (though, as we patch this file
>> and don't use it as is, it would be trivial to add it or any other
>> Solaris-specific requirements back in).
>
> I was only thinking about patching our libdrm package here, not changing the 
> upstream version.

   It is likely we will continue patching, but do want to limit how much we 
actually have to do (will likely be mostly limited to type conversions). 
At some time, though, I may look into suggesting some of the changes 
upstream (since there already is blocking for __linux__, it shouldn't be 
that bad to add __sun).

>
>>    From a Solaris perspective, I don't see how this file can ever -not-
>> have conditional compile statements or be patched to support Solaris, as
>> there are sufficient differences requiring at least minor changes.
>
> I'd still like to only use the Linux version by default, both in kernel and 
> userland.
> I guess at this point the only way to do that without breaking Solaris is to 
> either use local patches or change the logic of the #if directives to replace 
> the Linux check with a !Solaris one.

   For Solaris __linux__ implies !Solaris, so there is no difference.  At 
that specific point in the file, there are header inclusions which don't 
(and probably never will) have a Solaris equivilent.  So I either have to 
patch or add a Solaris conditional anyway (even with the Solaris wrapper, 
it won't be 100% compile compatible).

>>> I'm afraid there won't be many *BSD people around. This year, the XDC and
>>> EuroBSDCon conferences fall on the same week-end :-(
>>> I'm not sure which one I will be attending to at this point.
>>
>>    Not sure yet if I will be attending either.  But would happily
>> provide any input on this either in person (if I am there), or via email.
>
> Dri-devel seems to still be the best place for now :)
>

   Indeed (though as I mentioned previously, I'm pretty sparse here, mostly 
just trying to keep up).

> Cheers,

   Same!

 	---- Randy



More information about the dri-devel mailing list