Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Dec 1995 13:45:43 -0700
From:      Nate Williams <nate@rocky.sri.MT.net>
To:        Nate Williams <nate@rocky.sri.MT.net>
Cc:        Wolfram Schneider <wosch@cs.tu-berlin.de>, questions@freebsd.org
Subject:   Re: sup/ctm with Solaris 2.4? 
Message-ID:  <199512132045.NAA11774@rocky.sri.MT.net>
In-Reply-To: <199512131935.MAA11626@rocky.sri.MT.net>
References:  <199512131540.QAA09159@caramba.cs.tu-berlin.de> <199512131627.IAA28759@freefall.freebsd.org> <199512131709.SAA14468@caramba.cs.tu-berlin.de> <199512131935.MAA11626@rocky.sri.MT.net>

next in thread | previous in thread | raw e-mail | index | archive | help
>Does sup or ctm work with Solaris 2.4?

Yep, I can say that based on my (fairly minimal) testing it seems to
work.  I just downloaded some stuff from sup2.FreeBSD.org from a Solaris
2.4 box.

The main problems were:

1) Lack of vsnprintf().

Quick and dirty fix was to add these lines to any files which contained
calls to vsnprintf.  It's not a very good solution, but it works. :)

#ifdef SOLARIS
#define vsnprintf(a, b, c, d) \
        vsprintf(a, c, d)
#endif

2) Differentions in what the different wait macros expected.  The older
code expects a union wait structure, while the Solaris stuff wants an
int.  I defined the macro below (stolen from FreeBSD's <sys/wait.h>),
and then bracked all calls to the wait macros with this code.

#ifdef SOLARIS
#define UNION_2_INT(w)  (*(int *)&(w))  /* convert union wait to int */
#else
#define UNION_2_INT(w)  (w)
#endif

was:
    if (WIFEXITED(w) && w.w_retcode != 0) {
        notify ("SUP: Execute command returned failure status %#o\n",
                 w.w_retcode);
now:
    if (WIFEXITED(UNION_2_INT(w)) && w.w_retcode != 0) {
        notify ("SUP: Execute command returned failure status %#o\n",
                 w.w_retcode);

3) Getting a usable makefile.

Here is the resulting compile line spit out after munging the Makefile.

/usr/ucb/cc -UCMUCS -UCMU  -UMACH -DSOLARIS \
        -DRENAMELOG=\"/usr/local/etc/sup.moved\" -O -I.  -c  supcmeat.c

If you have any questions, let me know.  I'm not sure how demand there
is for a Solaris port of sup, but you should be able to build one after
this.

All of the above patches should be done *after* all of the FreeBSD
patches have been applied in the port.


Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512132045.NAA11774>