NetBSD Problem Report #41501

From www@NetBSD.org  Thu May 28 20:03:06 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 7DBCC63B8EA
	for <gnats-bugs@gnats.netbsd.org>; Thu, 28 May 2009 20:03:06 +0000 (UTC)
Message-Id: <20090528200306.4C89363B88A@www.NetBSD.org>
Date: Thu, 28 May 2009 20:03:06 +0000 (UTC)
From: kordex@gmail.com
Reply-To: kordex@gmail.com
To: gnats-bugs@NetBSD.org
Subject: x11/modular-xorg-server fails to compile on solaris 10
X-Send-Pr-Version: www-1.0

>Number:         41501
>Category:       pkg
>Synopsis:       x11/modular-xorg-server fails to compile on solaris 10
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    solaris-pkg-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 28 20:05:00 +0000 2009
>Closed-Date:    Mon Dec 26 03:13:04 +0000 2022
>Last-Modified:  Mon Dec 26 03:15:01 +0000 2022
>Originator:     Mikko Kortelainen
>Release:        none
>Organization:
home
>Environment:
SunOS flexnet 5.10 Generic sun4u sparc SUNW,Netra-T4

>Description:
 gcc -DHAVE_CONFIG_H -I. -I../../../../include -I../../../../hw/xfree86 -I../../../../hw/xfree86/include -I../../../../hw/xfree86/common -I../../../../hw/xfree86/os-support -I../../../../hw/xfree86/os-support/bus -I../../../../os -I/export/home/kordex/pkgsrc/x11/modular-xorg-server/work/.buildlink/include -I/export/home/kordex/pkgsrc/x11/modular-xorg-server/work/.buildlink/include/freetype2 -O -MT solaris-sparcv8plus.lo -MD -MP -MF .deps/solaris-sparcv8plus.Tpo -c solaris-sparcv8plus.S  -fPIC -DPIC -o .libs/solaris-sparcv8plus.o
solaris-sparcv8plus.S: Assembler messages:
solaris-sparcv8plus.S:54: Error: Architecture mismatch on "membar".
solaris-sparcv8plus.S:54:  (Requires v9|v9a|v9b; requested architecture is v8.)
solaris-sparcv8plus.S:59: Error: Architecture mismatch on "membar".
solaris-sparcv8plus.S:59:  (Requires v9|v9a|v9b; requested architecture is v8.)
solaris-sparcv8plus.S:64: Error: Architecture mismatch on "membar".
solaris-sparcv8plus.S:64:  (Requires v9|v9a|v9b; requested architecture is v8.)
solaris-sparcv8plus.S:101: Error: Architecture mismatch on "membar".
solaris-sparcv8plus.S:101:  (Requires v9|v9a|v9b; requested architecture is v8.)
solaris-sparcv8plus.S:106: Error: Architecture mismatch on "membar".
solaris-sparcv8plus.S:106:  (Requires v9|v9a|v9b; requested architecture is v8.)
solaris-sparcv8plus.S:111: Error: Architecture mismatch on "membar".
solaris-sparcv8plus.S:111:  (Requires v9|v9a|v9b; requested architecture is v8.)
solaris-sparcv8plus.S:116: Error: Architecture mismatch on "membar".
solaris-sparcv8plus.S:116:  (Requires v9|v9a|v9b; requested architecture is v8.)
solaris-sparcv8plus.S:121: Error: Architecture mismatch on "membar".
solaris-sparcv8plus.S:121:  (Requires v9|v9a|v9b; requested architecture is v8.)
gmake[5]: *** [solaris-sparcv8plus.lo] Error 1
gmake[5]: Leaving directory `/export/home/kordex/pkgsrc/x11/modular-xorg-server/work/xorg-server-1.4.2/hw/xfree86/os-support/solaris'
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory `/export/home/kordex/pkgsrc/x11/modular-xorg-server/work/xorg-server-1.4.2/hw/xfree86/os-support'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/export/home/kordex/pkgsrc/x11/modular-xorg-server/work/xorg-server-1.4.2/hw/xfree86'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/export/home/kordex/pkgsrc/x11/modular-xorg-server/work/xorg-server-1.4.2/hw/xfree86'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/export/home/kordex/pkgsrc/x11/modular-xorg-server/work/xorg-server-1.4.2/hw'
gmake: *** [all-recursive] Error 1
*** Error code 2

Stop.
bmake: stopped in /export/home/kordex/pkgsrc/x11/modular-xorg-server
*** Error code 1

Stop.
bmake: stopped in /export/home/kordex/pkgsrc/x11/modular-xorg-server

>How-To-Repeat:
cd /pkgsrc/x11/modular-xorg-server && bmake install clean
>Fix:
possible patches from tnn according to http://wiki.nanthrax.net/NanthraxWiki/Wiki.jsp?page=ModularXorgServerUsingPkgsrc

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Sat, 30 May 2009 13:07:48 +0000
Responsible-Changed-Why:
Problem on Solaris 10


State-Changed-From-To: open->feedback
State-Changed-By: asau@NetBSD.org
State-Changed-When: Sun, 14 Feb 2010 12:57:43 +0000
State-Changed-Why:
The package was updated at least twice since the report.
Does the problem persist?


From: kordex - <kordex@gmail.com>
To: gnats-bugs@netbsd.org
Cc: solaris-pkg-people@netbsd.org, pkgsrc-bugs@netbsd.org, 
	gnats-admin@netbsd.org, asau@netbsd.org
Subject: Re: pkg/41501 (x11/modular-xorg-server fails to compile on solaris 
	10)
Date: Sat, 20 Feb 2010 14:06:34 +0200

 libdrm fails to compile (pr: pkg/42852) and therefore prevents testing.

 2010/2/14  <asau@netbsd.org>:
 > Synopsis: x11/modular-xorg-server fails to compile on solaris 10
 >
 > State-Changed-From-To: open->feedback
 > State-Changed-By: asau@NetBSD.org
 > State-Changed-When: Sun, 14 Feb 2010 12:57:43 +0000
 > State-Changed-Why:
 > The package was updated at least twice since the report.
 > Does the problem persist?
 >
 >
 >
 >

State-Changed-From-To: feedback->open
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sat, 20 Feb 2010 12:40:57 +0000
State-Changed-Why:
Feedback supplied, blocked on 42852.


From: Claes =?utf-8?B?TsOkc3TDqW4=?= <pekdon@gmail.com>
To: gnats-bugs <gnats-bugs@netbsd.org>
Cc: 
Subject: Re: pkg/41501: x11/modular-xorg-server fails to compile on solaris 10
Date: Sat, 12 Mar 2022 20:07:02 +0100

 At least I am not experiencing the reported issue on Solaris sparc.

 I do however experience a few other compile issues, which gets resolved
 by the following patches.

 $NetBSD$

 --- os/backtrace.c.orig	2021-12-15 19:01:24.000000000 +0000
 +++ os/backtrace.c
 @@ -227,6 +227,8 @@ xorg_backtrace_frame(uintptr_t pc, int s
  #endif                          /* HAVE_WALKCONTEXT */

  #ifdef HAVE_PSTACK
 +#include <unistd.h>
 +
  static int
  xorg_backtrace_pstack(void)
  {

 $NetBSD$

 --- hw/xfree86/os-support/solaris/sun_init.c.orig	2022-03-12 17:13:42.454602673 +0000
 +++ hw/xfree86/os-support/solaris/sun_init.c
 @@ -61,6 +61,7 @@ static char consoleDev[PATH_MAX] = "/dev
     Used by hw/xfree86/common/xf86AutoConfig.c for VIS_GETIDENTIFIER */
  _X_HIDDEN char xf86SolarisFbDev[PATH_MAX] = "/dev/fb";

 +#ifdef HAS_USL_VTS
  static void
  switch_to(int vt, const char *from)
  {
 @@ -76,6 +77,7 @@ switch_to(int vt, const char *from)
          xf86Msg(X_WARNING, "%s: VT_WAITACTIVE failed: %s\n",
                  from, strerror(errno));
  }
 +#endif

  void
  xf86OpenConsole(void)

 And updated patch-hw_xfree86_os-support_bus_Sbus.c:

 $NetBSD: patch-hw_xfree86_os-support_bus_Sbus.c,v 1.3 2016/11/16 10:14:37 wiz Exp $

 Merge most of netbsdSbus.c from xsrc.

 --- hw/xfree86/os-support/bus/Sbus.c.orig	2021-12-15 19:01:24.000000000 +0000
 +++ hw/xfree86/os-support/bus/Sbus.c
 @@ -34,6 +34,9 @@
  #ifdef __sun
  #include <sys/utsname.h>
  #endif
 +#if defined(__NetBSD__) && defined(__sparc__)
 +#include <dev/ofw/openfirmio.h>
 +#endif
  #include "xf86.h"
  #include "xf86Priv.h"
  #include "xf86_OSlib.h"
 @@ -50,7 +53,9 @@ static int promP1275 = -1;

  #define MAX_PROP	128
  #define MAX_VAL		(4096-128-4)
 +#ifdef __sun
  static struct openpromio *promOpio;
 +#endif

  sbusDevicePtr *xf86SbusInfo = NULL;

 @@ -68,17 +73,29 @@ struct sbus_devtable sbusDeviceTable[] =
      {SBUS_DEVICE_GT, FBTYPE_SUNGT, "gt", NULL, "Sun Graphics Tower"},
      {SBUS_DEVICE_MGX, -1, "mgx", NULL, "Quantum 3D MGXplus"},
      {SBUS_DEVICE_LEO, FBTYPE_SUNLEO, "leo", "sunleo", "Sun ZX or Turbo ZX"},
 -    {SBUS_DEVICE_TCX, FBTYPE_TCXCOLOR, "tcx", "suntcx", "Sun TCX"},
 +    {SBUS_DEVICE_TCX, FBTYPE_TCXCOLOR, "tcx", "suntcx", "Sun TCX or S24"},
      {SBUS_DEVICE_FFB, FBTYPE_CREATOR, "ffb", "sunffb", "Sun FFB"},
      {SBUS_DEVICE_FFB, FBTYPE_CREATOR, "afb", "sunffb", "Sun Elite3D"},
 +#ifdef FBTYPE_P9100
 +    {SBUS_DEVICE_P9100, FBTYPE_P9100, "pnozz", "pnozz", "Weitek P9100"},
 +#endif /* FBTYPE_P9100 */
 +#ifdef FBTYPE_AG10E
 +    {SBUS_DEVICE_AG10E, FBTYPE_AG10E, "ag10e", "ag10e", "Fujitsu AG-10e"},
 +#endif /* FBTYPE_AG10E */
      {0, 0, NULL}
  };

 +#ifndef __sun
 +static struct ofiocdesc ofio;
 +static char of_buf[256];
 +#endif
 +
  int
  promGetSibling(int node)
  {
 +#ifdef __sun
      promOpio->oprom_size = sizeof(int);
 -
 + 
      if (node == -1)
          return 0;
      *(int *) promOpio->oprom_array = node;
 @@ -86,13 +103,22 @@ promGetSibling(int node)
          return 0;
      promCurrentNode = *(int *) promOpio->oprom_array;
      return *(int *) promOpio->oprom_array;
 +#else
 +    if (node == -1)
 +        return 0;
 +    if (ioctl(promFd, OFIOCGETNEXT, &node) < 0)
 +        return 0;
 +    promCurrentNode = node;
 +    return node;
 +#endif
  }

  int
  promGetChild(int node)
  {
 +#ifdef __sun
      promOpio->oprom_size = sizeof(int);
 -
 + 
      if (!node || node == -1)
          return 0;
      *(int *) promOpio->oprom_array = node;
 @@ -100,26 +126,52 @@ promGetChild(int node)
          return 0;
      promCurrentNode = *(int *) promOpio->oprom_array;
      return *(int *) promOpio->oprom_array;
 +#else
 +    if (!node || node == -1)
 +        return 0;
 +    if (ioctl(promFd, OFIOCGETCHILD, &node) < 0)
 +        return 0;
 +    promCurrentNode = node;
 +    return node;
 +#endif
  }

  char *
  promGetProperty(const char *prop, int *lenp)
  {
 +#ifdef __sun
      promOpio->oprom_size = MAX_VAL;
 -
 + 
      strcpy(promOpio->oprom_array, prop);
      if (ioctl(promFd, OPROMGETPROP, promOpio) < 0)
          return 0;
 +
      if (lenp)
          *lenp = promOpio->oprom_size;
      return promOpio->oprom_array;
 +#else
 +    ofio.of_nodeid = promCurrentNode;
 +    ofio.of_name = (char *)prop;
 +    ofio.of_namelen = strlen(prop);
 +    ofio.of_buf = of_buf;
 +    ofio.of_buflen = sizeof(of_buf);
 +
 +    if (ioctl(promFd, OFIOCGET, &ofio) < 0)
 +        return 0;
 +
 +    of_buf[ofio.of_buflen] = '\0';
 +
 +    if (lenp)
 +        *lenp = ofio.of_buflen;
 +    return of_buf;
 +#endif
  }

  int
  promGetBool(const char *prop)
  {
 +#ifdef __sun
      promOpio->oprom_size = 0;
 -
      *(int *) promOpio->oprom_array = 0;
      for (;;) {
          promOpio->oprom_size = MAX_PROP;
 @@ -130,6 +182,19 @@ promGetBool(const char *prop)
          if (!strcmp(promOpio->oprom_array, prop))
              return 1;
      }
 +#else
 +    ofio.of_nodeid = promCurrentNode;
 +    ofio.of_name = (char *)prop;
 +    ofio.of_namelen = strlen(prop);
 +    ofio.of_buf = of_buf;
 +    ofio.of_buflen = sizeof(of_buf);
 +
 +    if (ioctl(promFd, OFIOCGET, &ofio) < 0)
 +        return 0;
 +    if (ofio.of_buflen < 0)
 +        return 0;
 +    return 1;
 +#endif
  }

  #define PROM_NODE_SIBLING 0x01
 @@ -180,8 +245,8 @@ promIsP1275(void)
          promP1275 = TRUE;
      else
          promP1275 = FALSE;
 -#elif defined(__FreeBSD__)
 -    promP1275 = TRUE;
 +#elif defined(__FreeBSD__) || defined(__NetBSD__)
 +     promP1275 = TRUE;
  #else
  #error Missing promIsP1275() function for this OS
  #endif
 @@ -198,8 +263,10 @@ sparcPromClose(void)
          close(promFd);
          promFd = -1;
      }
 +#ifdef __sun
      free(promOpio);
      promOpio = NULL;
 +#endif
      promOpenCount = 0;
  }

 @@ -213,11 +280,13 @@ sparcPromInit(void)
      promFd = open("/dev/openprom", O_RDONLY, 0);
      if (promFd == -1)
          return -1;
 +#ifdef __sun
      promOpio = (struct openpromio *) malloc(4096);
      if (!promOpio) {
          sparcPromClose();
          return -1;
      }
 +#endif
      promRootNode = promGetSibling(0);
      if (!promRootNode) {
          sparcPromClose();
 @@ -399,9 +468,9 @@ sparcPromAssignNodes(void)
           * were the types of the cards missed. */
          char buffer[64];
          int fbNum, devId;
 -        static struct {
 -            int devId;
 -            char *prefix;
 +        static const struct {
 +            const int devId;
 +            const char *prefix;
          } procFbPrefixes[] = {
              {SBUS_DEVICE_BW2, "BWtwo"},
              {SBUS_DEVICE_CG14, "CGfourteen"},

From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41501 CVS commit: pkgsrc/x11/modular-xorg-server
Date: Sun, 22 May 2022 21:29:59 +0000

 Module Name:	pkgsrc
 Committed By:	dholland
 Date:		Sun May 22 21:29:59 UTC 2022

 Modified Files:
 	pkgsrc/x11/modular-xorg-server: distinfo
 	pkgsrc/x11/modular-xorg-server/patches:
 	    patch-hw_xfree86_os-support_bus_Sbus.c
 Added Files:
 	pkgsrc/x11/modular-xorg-server/patches:
 	    patch-hw_xfree86_os-support_solaris_sun__init.c
 	    patch-os_backtrace.c

 Log Message:
 modular-xorg-server: apply changes in PR 41501 to fix Solaris sparc build.

 From Claes Nästén.


 To generate a diff of this commit:
 cvs rdiff -u -r1.116 -r1.117 pkgsrc/x11/modular-xorg-server/distinfo
 cvs rdiff -u -r1.3 -r1.4 \
     pkgsrc/x11/modular-xorg-server/patches/patch-hw_xfree86_os-support_bus_Sbus.c
 cvs rdiff -u -r0 -r1.1 \
     pkgsrc/x11/modular-xorg-server/patches/patch-hw_xfree86_os-support_solaris_sun__init.c
 cvs rdiff -u -r0 -r1.3 \
     pkgsrc/x11/modular-xorg-server/patches/patch-os_backtrace.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 22 May 2022 21:44:31 +0000
State-Changed-Why:
patches applied; had to wrangle some, please crosscheck.


From: kordex <kordex@gmail.com>
To: gnats-bugs@netbsd.org
Cc: solaris-pkg-people@netbsd.org, gnats-admin@netbsd.org, 
	pkgsrc-bugs@netbsd.org
Subject: Re: pkg/41501: x11/modular-xorg-server fails to compile on solaris 10
Date: Tue, 20 Dec 2022 10:37:53 +0200

 Hi,

 This bug was opened in 2010. I have no longer interest using Solaris
 after Oracle acquisition as open source was kind of cut off.

 Kind regards,
 Mikko


 On Sat, Mar 12, 2022 at 9:10 PM Claes N=C3=A4st=C3=A9n <pekdon@gmail.com> w=
 rote:
 >
 > The following reply was made to PR pkg/41501; it has been noted by GNATS.
 >
 > From: Claes =3D?utf-8?B?TsOkc3TDqW4=3D?=3D <pekdon@gmail.com>
 > To: gnats-bugs <gnats-bugs@netbsd.org>
 > Cc:
 > Subject: Re: pkg/41501: x11/modular-xorg-server fails to compile on solar=
 is 10
 > Date: Sat, 12 Mar 2022 20:07:02 +0100
 >
 >  At least I am not experiencing the reported issue on Solaris sparc.
 >
 >  I do however experience a few other compile issues, which gets resolved
 >  by the following patches.
 >
 >  $NetBSD$
 >
 >  --- os/backtrace.c.orig        2021-12-15 19:01:24.000000000 +0000
 >  +++ os/backtrace.c
 >  @@ -227,6 +227,8 @@ xorg_backtrace_frame(uintptr_t pc, int s
 >   #endif                          /* HAVE_WALKCONTEXT */
 >
 >   #ifdef HAVE_PSTACK
 >  +#include <unistd.h>
 >  +
 >   static int
 >   xorg_backtrace_pstack(void)
 >   {
 >
 >  $NetBSD$
 >
 >  --- hw/xfree86/os-support/solaris/sun_init.c.orig      2022-03-12 17:13:=
 42.454602673 +0000
 >  +++ hw/xfree86/os-support/solaris/sun_init.c
 >  @@ -61,6 +61,7 @@ static char consoleDev[PATH_MAX] =3D "/dev
 >      Used by hw/xfree86/common/xf86AutoConfig.c for VIS_GETIDENTIFIER */
 >   _X_HIDDEN char xf86SolarisFbDev[PATH_MAX] =3D "/dev/fb";
 >
 >  +#ifdef HAS_USL_VTS
 >   static void
 >   switch_to(int vt, const char *from)
 >   {
 >  @@ -76,6 +77,7 @@ switch_to(int vt, const char *from)
 >           xf86Msg(X_WARNING, "%s: VT_WAITACTIVE failed: %s\n",
 >                   from, strerror(errno));
 >   }
 >  +#endif
 >
 >   void
 >   xf86OpenConsole(void)
 >
 >  And updated patch-hw_xfree86_os-support_bus_Sbus.c:
 >
 >  $NetBSD: patch-hw_xfree86_os-support_bus_Sbus.c,v 1.3 2016/11/16 10:14:3=
 7 wiz Exp $
 >
 >  Merge most of netbsdSbus.c from xsrc.
 >
 >  --- hw/xfree86/os-support/bus/Sbus.c.orig      2021-12-15 19:01:24.00000=
 0000 +0000
 >  +++ hw/xfree86/os-support/bus/Sbus.c
 >  @@ -34,6 +34,9 @@
 >   #ifdef __sun
 >   #include <sys/utsname.h>
 >   #endif
 >  +#if defined(__NetBSD__) && defined(__sparc__)
 >  +#include <dev/ofw/openfirmio.h>
 >  +#endif
 >   #include "xf86.h"
 >   #include "xf86Priv.h"
 >   #include "xf86_OSlib.h"
 >  @@ -50,7 +53,9 @@ static int promP1275 =3D -1;
 >
 >   #define MAX_PROP      128
 >   #define MAX_VAL               (4096-128-4)
 >  +#ifdef __sun
 >   static struct openpromio *promOpio;
 >  +#endif
 >
 >   sbusDevicePtr *xf86SbusInfo =3D NULL;
 >
 >  @@ -68,17 +73,29 @@ struct sbus_devtable sbusDeviceTable[] =3D
 >       {SBUS_DEVICE_GT, FBTYPE_SUNGT, "gt", NULL, "Sun Graphics Tower"},
 >       {SBUS_DEVICE_MGX, -1, "mgx", NULL, "Quantum 3D MGXplus"},
 >       {SBUS_DEVICE_LEO, FBTYPE_SUNLEO, "leo", "sunleo", "Sun ZX or Turbo =
 ZX"},
 >  -    {SBUS_DEVICE_TCX, FBTYPE_TCXCOLOR, "tcx", "suntcx", "Sun TCX"},
 >  +    {SBUS_DEVICE_TCX, FBTYPE_TCXCOLOR, "tcx", "suntcx", "Sun TCX or S24=
 "},
 >       {SBUS_DEVICE_FFB, FBTYPE_CREATOR, "ffb", "sunffb", "Sun FFB"},
 >       {SBUS_DEVICE_FFB, FBTYPE_CREATOR, "afb", "sunffb", "Sun Elite3D"},
 >  +#ifdef FBTYPE_P9100
 >  +    {SBUS_DEVICE_P9100, FBTYPE_P9100, "pnozz", "pnozz", "Weitek P9100"}=
 ,
 >  +#endif /* FBTYPE_P9100 */
 >  +#ifdef FBTYPE_AG10E
 >  +    {SBUS_DEVICE_AG10E, FBTYPE_AG10E, "ag10e", "ag10e", "Fujitsu AG-10e=
 "},
 >  +#endif /* FBTYPE_AG10E */
 >       {0, 0, NULL}
 >   };
 >
 >  +#ifndef __sun
 >  +static struct ofiocdesc ofio;
 >  +static char of_buf[256];
 >  +#endif
 >  +
 >   int
 >   promGetSibling(int node)
 >   {
 >  +#ifdef __sun
 >       promOpio->oprom_size =3D sizeof(int);
 >  -
 >  +
 >       if (node =3D=3D -1)
 >           return 0;
 >       *(int *) promOpio->oprom_array =3D node;
 >  @@ -86,13 +103,22 @@ promGetSibling(int node)
 >           return 0;
 >       promCurrentNode =3D *(int *) promOpio->oprom_array;
 >       return *(int *) promOpio->oprom_array;
 >  +#else
 >  +    if (node =3D=3D -1)
 >  +        return 0;
 >  +    if (ioctl(promFd, OFIOCGETNEXT, &node) < 0)
 >  +        return 0;
 >  +    promCurrentNode =3D node;
 >  +    return node;
 >  +#endif
 >   }
 >
 >   int
 >   promGetChild(int node)
 >   {
 >  +#ifdef __sun
 >       promOpio->oprom_size =3D sizeof(int);
 >  -
 >  +
 >       if (!node || node =3D=3D -1)
 >           return 0;
 >       *(int *) promOpio->oprom_array =3D node;
 >  @@ -100,26 +126,52 @@ promGetChild(int node)
 >           return 0;
 >       promCurrentNode =3D *(int *) promOpio->oprom_array;
 >       return *(int *) promOpio->oprom_array;
 >  +#else
 >  +    if (!node || node =3D=3D -1)
 >  +        return 0;
 >  +    if (ioctl(promFd, OFIOCGETCHILD, &node) < 0)
 >  +        return 0;
 >  +    promCurrentNode =3D node;
 >  +    return node;
 >  +#endif
 >   }
 >
 >   char *
 >   promGetProperty(const char *prop, int *lenp)
 >   {
 >  +#ifdef __sun
 >       promOpio->oprom_size =3D MAX_VAL;
 >  -
 >  +
 >       strcpy(promOpio->oprom_array, prop);
 >       if (ioctl(promFd, OPROMGETPROP, promOpio) < 0)
 >           return 0;
 >  +
 >       if (lenp)
 >           *lenp =3D promOpio->oprom_size;
 >       return promOpio->oprom_array;
 >  +#else
 >  +    ofio.of_nodeid =3D promCurrentNode;
 >  +    ofio.of_name =3D (char *)prop;
 >  +    ofio.of_namelen =3D strlen(prop);
 >  +    ofio.of_buf =3D of_buf;
 >  +    ofio.of_buflen =3D sizeof(of_buf);
 >  +
 >  +    if (ioctl(promFd, OFIOCGET, &ofio) < 0)
 >  +        return 0;
 >  +
 >  +    of_buf[ofio.of_buflen] =3D '\0';
 >  +
 >  +    if (lenp)
 >  +        *lenp =3D ofio.of_buflen;
 >  +    return of_buf;
 >  +#endif
 >   }
 >
 >   int
 >   promGetBool(const char *prop)
 >   {
 >  +#ifdef __sun
 >       promOpio->oprom_size =3D 0;
 >  -
 >       *(int *) promOpio->oprom_array =3D 0;
 >       for (;;) {
 >           promOpio->oprom_size =3D MAX_PROP;
 >  @@ -130,6 +182,19 @@ promGetBool(const char *prop)
 >           if (!strcmp(promOpio->oprom_array, prop))
 >               return 1;
 >       }
 >  +#else
 >  +    ofio.of_nodeid =3D promCurrentNode;
 >  +    ofio.of_name =3D (char *)prop;
 >  +    ofio.of_namelen =3D strlen(prop);
 >  +    ofio.of_buf =3D of_buf;
 >  +    ofio.of_buflen =3D sizeof(of_buf);
 >  +
 >  +    if (ioctl(promFd, OFIOCGET, &ofio) < 0)
 >  +        return 0;
 >  +    if (ofio.of_buflen < 0)
 >  +        return 0;
 >  +    return 1;
 >  +#endif
 >   }
 >
 >   #define PROM_NODE_SIBLING 0x01
 >  @@ -180,8 +245,8 @@ promIsP1275(void)
 >           promP1275 =3D TRUE;
 >       else
 >           promP1275 =3D FALSE;
 >  -#elif defined(__FreeBSD__)
 >  -    promP1275 =3D TRUE;
 >  +#elif defined(__FreeBSD__) || defined(__NetBSD__)
 >  +     promP1275 =3D TRUE;
 >   #else
 >   #error Missing promIsP1275() function for this OS
 >   #endif
 >  @@ -198,8 +263,10 @@ sparcPromClose(void)
 >           close(promFd);
 >           promFd =3D -1;
 >       }
 >  +#ifdef __sun
 >       free(promOpio);
 >       promOpio =3D NULL;
 >  +#endif
 >       promOpenCount =3D 0;
 >   }
 >
 >  @@ -213,11 +280,13 @@ sparcPromInit(void)
 >       promFd =3D open("/dev/openprom", O_RDONLY, 0);
 >       if (promFd =3D=3D -1)
 >           return -1;
 >  +#ifdef __sun
 >       promOpio =3D (struct openpromio *) malloc(4096);
 >       if (!promOpio) {
 >           sparcPromClose();
 >           return -1;
 >       }
 >  +#endif
 >       promRootNode =3D promGetSibling(0);
 >       if (!promRootNode) {
 >           sparcPromClose();
 >  @@ -399,9 +468,9 @@ sparcPromAssignNodes(void)
 >            * were the types of the cards missed. */
 >           char buffer[64];
 >           int fbNum, devId;
 >  -        static struct {
 >  -            int devId;
 >  -            char *prefix;
 >  +        static const struct {
 >  +            const int devId;
 >  +            const char *prefix;
 >           } procFbPrefixes[] =3D {
 >               {SBUS_DEVICE_BW2, "BWtwo"},
 >               {SBUS_DEVICE_CG14, "CGfourteen"},
 >

State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 26 Dec 2022 03:13:04 +0000
State-Changed-Why:
Submitter cannot test, assume the patches are ok until proven otheriwe


From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: Claes =?us-ascii?B?PT91dGYtOD9CP1RzT2tjM1REcVc0PT89?= <pekdon@gmail.com>
Subject: Re: pkg/41501: x11/modular-xorg-server fails to compile on solaris 10
Date: Mon, 26 Dec 2022 03:12:36 +0000

 On Tue, Dec 20, 2022 at 08:40:01AM +0000, kordex wrote:
  >  This bug was opened in 2010. I have no longer interest using Solaris
  >  after Oracle acquisition as open source was kind of cut off.

 Will close.

 I think I didn't notice that the person who submitted patches wasn't
 the originator :-)  anyway I presumably meant to ask them to test.

 -- 
 David A. Holland
 dholland@netbsd.org

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.