Hello,
Please let me know if I'm writing to the wrong folks. I found a bug
in
screen-4.0.2, and would like to share my correction by sending a
patch. I
wasn't able to find a bug database or better way to report this from
the
links on your webpages.
In screen-4.0.2, configure attempts to detect if it is being run on a
Solaris platform. This test fails, because it checks for a 'SVR4'
identifier
at buildtime. Compilers on Solaris consistently define '__sun' and
'__SVR4'
identifiers, so it's probably best to try to compile a small program
using
those. The configure script distributed with screen comes close, but
not
close enough (see attached patch).
A more important problem involves a call to 'setenv(3)' on platforms
which
the configure script has determined to have a 'setenv(3)' system call
available. Newer versions of Solaris (like Solaris 10) do have
setenv(3) and
configure thus detects it. Unfortunately setenv(3) will be called
with
two
parameters, although the setenv(3) distributed with Solaris 10
specifies
three parameters. My patch fixes this by checking for the presence of
Solaris before calling setenv(3), just as already done when checking
for the
presence of Linux.
Our entire patch is also available via CVS, by the way. Check out:
http://cvs.openpkg.org/rlog?f=openpkg-src/screen/screen.patch
Regards,
Michael, OpenPKG
http://www.openpkg.org/
Index: configure.in
--- configure.in.orig 2003-06-03 13:58:24.000000000 +0200
+++ configure.in 2004-05-27 12:43:38.909016000 +0200
@@ -206,7 +206,7 @@
AC_CHECKING(for Solaris 2.x)
AC_EGREP_CPP(yes,
-[#if defined(SVR4) && defined(sun)
+[#if defined(__SVR4) && defined(__sun)
yes
#endif
], LIBS="$LIBS -lsocket -lnsl -lkstat")
@@ -270,7 +270,7 @@
dnl multiuser screen sessions
AC_CHECKING(seteuid)
AC_TRY_LINK(,[
-#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) ||
defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) ||
defined(ISC) || defined(sony_news)
+#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) ||
defined(AUX) || defined(ultrix) || (defined(__sun) && defined
(__SVR4))
|| defined(ISC) || defined(sony_news)
seteuid_is_broken(0);
#else
seteuid(0);
@@ -815,7 +815,7 @@
AC_TRY_LINK([
#include <time.h> /* to get time_t on SCO */
#include <sys/types.h>
-#if defined(SVR4) && !defined(DGUX)
+#if defined(__SVR4) && !defined(DGUX)
#include <utmpx.h>
#define utmp utmpx
#else
@@ -832,7 +832,7 @@
AC_TRY_LINK([
#include <time.h>
#include <sys/types.h>
-#if defined(SVR4) && !defined(DGUX)
+#if defined(__SVR4) && !defined(DGUX)
#include <utmpx.h>
#define utmp utmpx
#else
@@ -848,7 +848,7 @@
AC_TRY_COMPILE([
#include <time.h>
#include <sys/types.h>
-#if defined(SVR4) && !defined(DGUX)
+#if defined(__SVR4) && !defined(DGUX)
#include <utmpx.h>
#define utmp utmpx
#else
@@ -979,7 +979,7 @@
#include <sys/types.h>
#include <sys/param.h>
],[
-#if !defined(LOADAV_GETLOADAVG) && ((defined(hp300) &&
!defined(__hpux)) || defined(sun) || (defined(ultrix) &&
defined(mips)) || defined(_SEQUENT_) || defined(sgi) || (defined
(SVR4)
&& !defined(__hpux)) || defined(sony_news) || (!defined(__osf__) &&
defined(__alpha)) || defined(_IBMR2) || defined(_AUX_SOURCE) ||
defined(AUX) || defined(m88k))
+#if !defined(LOADAV_GETLOADAVG) && ((defined(hp300) &&
!defined(__hpux)) || defined(__sun) || (defined(ultrix) &&
defined(mips)) || defined(_SEQUENT_) || defined(sgi) ||
(defined(__SVR4) && !defined(__hpux)) || defined(sony_news) ||
(!defined(__osf__) && defined(__alpha)) || defined(_IBMR2) ||
defined(_AUX_SOURCE) || defined(AUX) || defined(m88k))
loadtype=long
# if defined(apollo) || defined(_IBMR2) || defined(_AUX_SOURCE) ||
defined(AUX)
loadscale=65536
@@ -992,7 +992,7 @@
loadtype=int
loadscale=1024
# else
-# if defined(MIPS) || defined(SVR4) || defined(m88k)
+# if defined(MIPS) || defined(__SVR4) || defined(m88k)
loadscale=256
# else /* not MIPS */
loadscale=1000 /* our default value */
Index: configure
--- configure.orig 2003-12-05 14:46:53.000000000 +0100
+++ configure 2004-05-27 12:45:06.186001000 +0200
@@ -3911,7 +3911,7 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#if defined(SVR4) && defined(sun)
+#if defined(__SVR4) && defined(__sun)
yes
#endif
@@ -4042,7 +4042,7 @@
main ()
{
-#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) ||
defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) ||
defined(ISC) || defined(sony_news)
+#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) ||
defined(AUX) || defined(ultrix) || (defined(__sun) && defined
(__SVR4))
|| defined(ISC) || defined(sony_news)
seteuid_is_broken(0);
#else
seteuid(0);
@@ -5572,7 +5572,7 @@
#include <time.h> /* to get time_t on SCO */
#include <sys/types.h>
-#if defined(SVR4) && !defined(DGUX)
+#if defined(__SVR4) && !defined(DGUX)
#include <utmpx.h>
#define utmp utmpx
#else
@@ -5624,7 +5624,7 @@
#include <time.h>
#include <sys/types.h>
-#if defined(SVR4) && !defined(DGUX)
+#if defined(__SVR4) && !defined(DGUX)
#include <utmpx.h>
#define utmp utmpx
#else
@@ -5680,7 +5680,7 @@
#include <time.h>
#include <sys/types.h>
-#if defined(SVR4) && !defined(DGUX)
+#if defined(__SVR4) && !defined(DGUX)
#include <utmpx.h>
#define utmp utmpx
#else
@@ -6316,7 +6316,7 @@
_CUT_HERE_
-#if !defined(LOADAV_GETLOADAVG) && ((defined(hp300) &&
!defined(__hpux)) || defined(sun) || (defined(ultrix) &&
defined(mips)) || defined(_SEQUENT_) || defined(sgi) || (defined
(SVR4)
&& !defined(__hpux)) || defined(sony_news) || (!defined(__osf__) &&
defined(__alpha)) || defined(_IBMR2) || defined(_AUX_SOURCE) ||
defined(AUX) || defined(m88k))
+#if !defined(LOADAV_GETLOADAVG) && ((defined(hp300) &&
!defined(__hpux)) || defined(__sun) || (defined(ultrix) &&
defined(mips)) || defined(_SEQUENT_) || defined(sgi) ||
(defined(__SVR4) && !defined(__hpux)) || defined(sony_news) ||
(!defined(__osf__) && defined(__alpha)) || defined(_IBMR2) ||
defined(_AUX_SOURCE) || defined(AUX) || defined(m88k))
loadtype=long
# if defined(apollo) || defined(_IBMR2) || defined(_AUX_SOURCE) ||
defined(AUX)
loadscale=65536
@@ -6329,7 +6329,7 @@
loadtype=int
loadscale=1024
# else
-# if defined(MIPS) || defined(SVR4) || defined(m88k)
+# if defined(MIPS) || defined(__SVR4) || defined(m88k)
loadscale=256
# else /* not MIPS */
loadscale=1000 /* our default value */
Index: misc.c
--- misc.c.orig 2004-05-27 13:32:29.762001000 +0200
+++ misc.c 2004-05-27 13:39:40.883005000 +0200
@@ -613,7 +613,7 @@
*/
# endif /* NEEDSETENV */
#else /* USESETENV */
-# if defined(linux) || defined(__convex__) || (BSD >= 199103)
+# if defined(linux) || defined(__sun) || defined(__convex__) || (BSD
>= 199103)
setenv(var, value, 1);
# else
setenv(var, value);