pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/37672: x11/xf86-input-keyboard has function names clashes with xorg server



>Number:         37672
>Category:       pkg
>Synopsis:       x11/xf86-input-keyboard  has function names clashes with xorg 
>server
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 03 00:00:00 +0000 2008
>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 ---






Home | Main Index | Thread Index | Old Index