~jrtc27

Recent activity

Re: [PATCH seatd] libseat: Allow library to be used from C++ 1 year, 11 months ago

From Jessica Clarke to ~kennylevinsen/seatd-devel

On 30 Nov 2022, at 19:51, Kenny Levinsen <kl@kl.wtf> wrote:
> 
> On Tue, Nov 22 2022 at 05:44:44 AM +00:00:00, ~jrtc27 <jrtc27@git.sr.ht> wrote:
>> +#ifdef __cplusplus
>> +extern "C" {
>> +#endif
> 
> So far I have done the same as we do in wlroots: libseat is a C library, and therefore doesn't have C++ compiler directives in it.
> 
> The reasoning is that it seems illogical to make C libraries carry C++ code/directives around, just like we don't carry Rust, Zig, D or any other language-specific code/directives. If the problem is that the needed C++ compiler directives are too ugly, then it makes even less sense that C libraries should be forced to carry around another language's ugly directives.
> 
> I know that the stance is slightly defiant to an otherwise relatively established (but somewhat odd) norm, but I'll stick to it for now. Sorry!

The trouble is if libseat.h includes anything then the extern “C” applies to that too, which may break things if they end up pulling in a header that makes use of C++ things when compiling for C++, whereas if you put it in libseat.h then you can ensure it only goes around the declarations there. Though ISO C++ seems to take the view that it’s ok to do, even if one should “strongly consider” editing the header instead[1][2], so maybe in practice it’s ok to do... just makes me feel less warm and fuzzy inside and feels more like a hack that could break in future.

Re: [PATCH seatd] drm: Support drm-subtree drivers on FreeBSD 1 year, 11 months ago

From Jessica Clarke to ~kennylevinsen/seatd-devel

On 30 Nov 2022, at 19:33, Kenny Levinsen <kl@kl.wtf> wrote:
> 
> Ah, is this something new or did I just completely miss it when working on FreeBSD?

The dam-subtree drivers are used for various Arm-based SoCs, though I think the Panfrost GPU driver might be the only one where you’d actually be able to do more than get a video console (what we’re using). Intel/AMD/Nvidia are still in drm-kmod and as far as I know haven’t changed behaviour.

> CI on mailing list patches was down for a moment, but here is a manual rerun on alpine: https://builds.sr.ht/~kennylevinsen/job/895142 - fails on check-format.

I see; is it better to separate out the two #defines so (presumably) it won’t enforce aligning them, or should I align them as suggested by the diff?

> On Wed, Nov 23 2022 at 02:12:42 AM +00:00:00, ~jrtc27 <jrtc27@git.sr.ht> wrote:
>> +#ifdef __FreeBSD__
>> +	/* Some drivers have /dev/dri/X symlinked to /dev/drm/X */
>> +	if (STR_HAS_PREFIX("/dev/drm/", path))