Here's a fix for screen dying on C-w etc on alpha.

The problem is that the autoconf test for vsprintf() erroneously
fails and the build falls back on an implementation included with
screen, which is miscompiled by gcc with optimization turned on.
:-/

The bandaid below helps the autoconf test.  I don't like it, but
gcc on alpha spews errors on both a simple

  vsprintf();

as well as

  vsprintf(0,0,0);

If anybody has a better idea... something that could go in upstream...

Index: Makefile
===================================================================
RCS file: /cvs/ports/misc/screen/Makefile,v
retrieving revision 1.56
diff -u -r1.56 Makefile
--- Makefile    25 Oct 2006 16:27:04 -0000      1.56
+++ Makefile    30 Oct 2006 17:01:58 -0000
@@ -4,6 +4,7 @@
 
 VERSION=       4.0.3
 DISTNAME=      screen-${VERSION}
+PKGNAME=       ${DISTNAME}p0
 CATEGORIES=    misc
 MASTER_SITES=  ftp://ftp.uni-erlangen.de/pub/utilities/screen/
 
Index: patches/patch-configure
===================================================================
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure     30 Oct 2006 17:01:58 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+--- configure.orig     Mon Oct 30 17:48:42 2006
++++ configure  Mon Oct 30 17:49:09 2006
+@@ -7186,10 +7186,12 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ 
++#include <stdarg.h>
+ int
+ main ()
+ {
+-vsprintf(0,0,0);
++va_list ap;
++vsprintf(0,0,ap);
+   ;
+   return 0;
+ }
-- 
Christian "naddy" Weisgerber                          [EMAIL PROTECTED]

Reply via email to