dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: Jonathan Gray <jsg@jsg.id.au>
Cc: ML dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH libdrm] xf86drm: correct the OpenBSD DRM_MAJOR define
Date: Mon, 20 Jul 2015 17:26:03 +0100	[thread overview]
Message-ID: <CACvgo509Ydb_3XNcnzbDY-ZLg4H8wy1Uqr7OQ5b0-fm3CuROhw@mail.gmail.com> (raw)
In-Reply-To: <20150720161505.GA30632@carla.jsg.id.au>

On 20 July 2015 at 17:15, Jonathan Gray <jsg@jsg.id.au> wrote:
> On Mon, Jul 20, 2015 at 05:06:09PM +0100, Emil Velikov wrote:
>> On 18 July 2015 at 22:20, Jonathan Gray <jsg@jsg.id.au> wrote:
>> > As far as I can tell no OpenBSD platform ever used 81
>> > for a drm major.  While the value was added to libdrm in 2003
>> > or earlier drm didn't appear in OpenBSD till 2007.
>> >
>> > Of the OpenBSD platforms that support drm amd64/macppc/sparc64
>> > use a major of 87, i386 uses 88.
>> >
>> > Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
>> > ---
>> >  xf86drm.c | 8 +++++---
>> >  1 file changed, 5 insertions(+), 3 deletions(-)
>> >
>> > diff --git a/xf86drm.c b/xf86drm.c
>> > index 7d7f9c7..a2c549c 100644
>> > --- a/xf86drm.c
>> > +++ b/xf86drm.c
>> > @@ -72,9 +72,11 @@
>> >  #define DRM_MAJOR 34
>> >  #endif
>> >
>> > -# ifdef __OpenBSD__
>> > -#  define DRM_MAJOR 81
>> > -# endif
>> > +#if defined(__OpenBSD__) && defined(__i386__)
>> > +#define DRM_MAJOR 88
>> > +#elif defined(__OpenBSD__)
>> > +#define DRM_MAJOR 87
>> > +#endif
>> >
>> Bikeshed: any objections if we cascade the ifdef statements ?
>
> Do you mean indent the defines or have the entire block
> undef ifdef __OpenBSD__?  Either way would be fine with me.

Cascade seems like the wrong term here - here is what I meant:

 #ifdef __OpenBSD__
+#ifdef __i386__
+#define DRM_MAJOR 88
+#else
+#define DRM_MAJOR 87
 #endif
+#endif /* __OpenBSD__ */

-Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-07-20 16:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-18 21:20 [PATCH libdrm] xf86drm: correct the OpenBSD DRM_MAJOR define Jonathan Gray
2015-07-20 16:06 ` Emil Velikov
2015-07-20 16:15   ` Jonathan Gray
2015-07-20 16:26     ` Emil Velikov [this message]
2015-07-20 17:12   ` [PATCH libdrm v2] " Jonathan Gray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACvgo509Ydb_3XNcnzbDY-ZLg4H8wy1Uqr7OQ5b0-fm3CuROhw@mail.gmail.com \
    --to=emil.l.velikov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jsg@jsg.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).