NetBSD Problem Report #37671
From anthony.mallet@useless-ficus.net Wed Jan 2 23:50:29 2008
Return-Path: <anthony.mallet@useless-ficus.net>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id C374963B852
for <gnats-bugs@gnats.netbsd.org>; Wed, 2 Jan 2008 23:50:28 +0000 (UTC)
Message-Id: <1199317825.29564@ficus>
Date: Thu, 3 Jan 2008 00:50:25 +0100
From: "Anthony Mallet" <anthony.mallet@useless-ficus.net>
To: "gnats bugs" <gnats-bugs@NetBSD.org>
Subject: x11/xf86-input-keyboard has function names clashes with xorg server
X-Send-Pr-Version: gtk-send-pr 0.4.9
X-GNATS-Notify:
>Number: 37671
>Category: pkg
>Synopsis: x11/xf86-input-keyboard has function names clashes with xorg server
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 02 23:55:00 +0000 2008
>Closed-Date: Tue Aug 06 14:55:32 +0000 2019
>Last-Modified: Tue Aug 06 14:55:32 +0000 2019
>Originator: Anthony Mallet
>Release: NetBSD 4.99.40 i386
>Organization:
>Environment:
System: NetBSD 4.99.40 (FICUS) #88: Wed Jan 2 22:13:55 CET 2008
troot@ficus:/usr/obj/sys/arch/i386/compile/FICUS
>Description:
I was playing with the usb keymap of the xorg kbd driver when I found that
the x11/xf86-input-keyboard package defines the two functions
KbdGetMapping() and xf86OSKbdPreInit(). These are also defined and compiled in the
xorg server (in hw/xfree86/os-support/bsd/).
When X loads the kbd driver, is resolves the two functions in its own code and not in
the package driver, and thus does not call the functions from the packaged driver.
I would like to modify and send-pr the KbdGetMapping() function of the kbd driver to
add some usb keycode (like AudioMute et al.), so could someone please commit the
attached patch in the meantime?
Thanks,
Anthony Mallet
>How-To-Repeat:
Try to modify and use a different version of the KbdGetMapping() function in the
xf86-input-keyboard package.
>Fix:
--- kbd-patch begins here ---
--- src/bsd_KbdMap.c~ 2008-01-02 23:11:40.000000000 +0100
+++ src/bsd_KbdMap.c 2008-01-03 00:32:06.000000000 +0100
@@ -830,7 +830,7 @@
*/
void
-KbdGetMapping (InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap)
+pkgKbdGetMapping (InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap)
{
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
KeySym *k;
--- src/kbd.c~ 2006-11-01 23:16:43.000000000 +0100
+++ src/kbd.c 2008-01-03 00:33:49.000000000 +0100
@@ -255,7 +255,7 @@
xf86LoaderReqSymLists(xkbSymbols, NULL);
- if (!xf86OSKbdPreInit(pInfo))
+ if (!pkgxf86OSKbdPreInit(pInfo))
return pInfo;
if (!pKbd->OpenKeyboard(pInfo)) {
--- src/bsd_kbd.c~ 2006-11-01 23:18:24.000000000 +0100
+++ src/bsd_kbd.c 2008-01-03 00:35:46.000000000 +0100
@@ -27,7 +27,7 @@
#include "xf86OSKbd.h"
#include "atKeynames.h"
-extern void KbdGetMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms,
+extern void pkgKbdGetMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms,
CARD8 *pModMap);
extern Bool VTSwitchEnabled;
@@ -497,7 +498,7 @@
}
_X_EXPORT Bool
-xf86OSKbdPreInit(InputInfoPtr pInfo)
+pkgxf86OSKbdPreInit(InputInfoPtr pInfo)
{
KbdDevPtr pKbd = pInfo->private;
@@ -508,7 +509,7 @@
pKbd->SetLeds = SetKbdLeds;
pKbd->GetLeds = GetKbdLeds;
pKbd->SetKbdRepeat = SetKbdRepeat;
- pKbd->KbdGetMapping = KbdGetMapping;
+ pKbd->KbdGetMapping = pkgKbdGetMapping;
pKbd->SpecialKey = SpecialKey;
pKbd->RemapScanCode = NULL;
--- kbd-patch ends here ---
>Release-Note:
>Audit-Trail:
From: "Jeremy C. Reed" <reed@reedmedia.net>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/37671: x11/xf86-input-keyboard has function names clashes
with xorg server
Date: Wed, 2 Jan 2008 18:11:49 -0600 (CST)
These types of things need to be reported to and fixed by the upstream,
X.org.
And what defines your pkgxf86OSKbdPreInit if hurd, lnx (linux), sco, or
sun are used instead of bsd?
From: Anthony Mallet <anthony.mallet@useless-ficus.net>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org, anthony.mallet@useless-ficus.net
Subject: Re: pkg/37671: x11/xf86-input-keyboard has function names clashes
with xorg server
Date: Thu, 3 Jan 2008 01:29:04 +0100
Jeremy C. Reed writes:
| These types of things need to be reported to and fixed by the upstream,
| X.org.
Of course, I just thought that you could be more efficient than me in
contacting the people from Xorg, because they probably trust you better
than me.
And also more efficient in fixing this in pkgsrc quickly.
And also this could benefit other pkgsrc users.
I am a pkgsrc user and as such, I am facing right now the problem with
pkgsrc. But I can understand that you are not interrested in such trivial
fixes.
| And what defines your pkgxf86OSKbdPreInit if hurd, lnx (linux), sco, or
| sun are used instead of bsd?
My patch is only a quick workaround for bsd. I don't know the right
solution, probably the (old?) function should be removed from xorg
itself.
But it's only a matter of function name, not code. The name is
conflicting with xorg one's, which is dandling there probably since
pre-modularization. That's true for hurd, lnx, sco and sun also.
Probably no-one tried to change these functions in the kbd modular driver
since xorg modularization?
From: "Jeremy C. Reed" <reed@reedmedia.net>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/37671: x11/xf86-input-keyboard has function names clashes
with xorg server
Date: Wed, 2 Jan 2008 18:55:30 -0600 (CST)
On Thu, 3 Jan 2008, Anthony Mallet wrote:
> My patch is only a quick workaround for bsd. I don't know the right
> solution, probably the (old?) function should be removed from xorg
> itself.
I just checked and both xf86OSKbdPreInit and KbdGetMapping have been
removed from xserver code (HEAD). (That doesn't help with the official
releases like xorg-server-1.3.0.0 though.)
> But it's only a matter of function name, not code. The name is
> conflicting with xorg one's, which is dandling there probably since
> pre-modularization. That's true for hurd, lnx, sco and sun also.
> Probably no-one tried to change these functions in the kbd modular driver
> since xorg modularization?
Jeremy C. Reed
State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Tue, 06 Aug 2019 14:55:32 +0000
State-Changed-Why:
the naming conflict no longer exists, as xorg-server removed the second occurrence of them. (as pointed out by reed in this bug report)
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.