NetBSD Problem Report #43824

From mm_lists@pulsar-zone.net  Wed Sep  1 05:21:10 2010
Return-Path: <mm_lists@pulsar-zone.net>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 1F2FF63BBC7
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  1 Sep 2010 05:21:10 +0000 (UTC)
Message-Id: <201009010520.o815KjuA000369@ginseng.xisop>
Date: Wed, 1 Sep 2010 01:20:45 -0400
From: Matthew Mondor <mm_lists@pulsar-zone.net>
To: gnats-bugs@gnats.NetBSD.org
Subject: -current xsrc has a broken XShm.h header file

>Number:         43824
>Category:       xsrc
>Synopsis:       -current xsrc has a broken XShm.h header file
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    xsrc-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 01 05:25:00 +0000 2010
>Closed-Date:    Thu May 25 05:06:58 +0000 2017
>Last-Modified:  Thu May 25 05:06:58 +0000 2017
>Originator:     Matthew Mondor
>Release:        -current
>Organization:
>Environment:
>Description:

According to the XShm(3) manual page, and a practice which is common is
to include XShm.h and expect that it's enough for related function
prototypes to also be declared.  However, on -current this is not the
case and one must explicitely add an include for shmproto.h.

The fix simply makes XShm.h implicitely include the internal shmproto.h
header file.  This is what FreeBSD also did after their upgrade to XOrg
7.5.  This makes software using the MIT-SHM extension work again on
-current.

>How-To-Repeat:

Attempt to build a package making use of MIT-SHM on -current with
base-x11, such as emulators/vice (currently, vice has a patch to add
shmproto.h but this breaks the package on other releases than -current
and will probably be reverted).  This is how I became aware of the
issue.

>Fix:

--- xsrc/external/mit/libXext/dist/include/X11/extensions/XShm.h.orig	2010-06-15 23:05:43.000000000 -0400
+++ xsrc/external/mit/libXext/dist/include/X11/extensions/XShm.h	2010-09-01 01:06:48.000000000 -0400
@@ -34,6 +34,7 @@

 #include <X11/Xfuncproto.h>
 #include <X11/extensions/shm.h>
+#include <X11/extensions/shmproto.h>

 #ifndef _XSHM_SERVER_
 typedef unsigned long ShmSeg;

>Release-Note:

>Audit-Trail:
From: Bernd Ernesti <veego@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: xsrc/43824: -current xsrc has a broken XShm.h header file
Date: Wed, 1 Sep 2010 08:07:26 +0200

 On Wed, Sep 01, 2010 at 05:25:01AM +0000, Matthew Mondor wrote:
 [..]

 > >Fix:
 > 
 > --- xsrc/external/mit/libXext/dist/include/X11/extensions/XShm.h.orig	2010-06-15 23:05:43.000000000 -0400
 > +++ xsrc/external/mit/libXext/dist/include/X11/extensions/XShm.h	2010-09-01 01:06:48.000000000 -0400
 > @@ -34,6 +34,7 @@
 >  
 >  #include <X11/Xfuncproto.h>
 >  #include <X11/extensions/shm.h>
 > +#include <X11/extensions/shmproto.h>
 >  
 >  #ifndef _XSHM_SERVER_
 >  typedef unsigned long ShmSeg;

 I don't like that. Yes the behaviour change is broken but it doesn't mean
 we should maintain our own patches again forever.

 Bernd

From: Matthew Mondor <mm_lists@pulsar-zone.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: xsrc/43824: -current xsrc has a broken XShm.h header file
Date: Wed, 1 Sep 2010 02:30:21 -0400

 On Wed,  1 Sep 2010 06:10:05 +0000 (UTC)
 Bernd Ernesti <veego@NetBSD.org> wrote:

 >  I don't like that. Yes the behaviour change is broken but it doesn't mean
 >  we should maintain our own patches again forever.

 I understand, and also notified tech-x11 of this PR so that hopefully
 someone with a foot upstream can decide what to do.  IMO the change
 also should be made upstream (if it's not already), and I don't
 understand what the intention was if it was a deliberate interface
 change.

 Oh and I forgot to refer to the other related PR, here it is: pkg/43811

 Thanks,
 -- 
 Matt

From: Matthew Mondor <mm_lists@pulsar-zone.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: xsrc/43824: -current xsrc has a broken XShm.h header file
Date: Sat, 4 Sep 2010 01:02:02 -0400

 https://bugs.freedesktop.org/show_bug.cgi?id=30008

 Was filed.

State-Changed-From-To: open->feedback
State-Changed-By: prlw1@NetBSD.org
State-Changed-When: Thu, 02 Jun 2016 15:59:06 +0000
State-Changed-Why:
It seems that the upstream bug has been closed, and the related PR too.
Presumably 3rd parties have been working around this, and the header
stands as is. Do you agree?


State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 25 May 2017 05:06:58 +0000
State-Changed-Why:
Feedback timeout; and issue is pretty much a dead article by now
(as in, anything affected would have been patched years ago)


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.