Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jan 2006 12:40:08 GMT
From:      Dejan Lesjak <dejan.lesjak@ijs.si>
To:        freebsd-x11@FreeBSD.org
Subject:   Re: ports/92136: x11/xorg-clients: make fails on 4.x
Message-ID:  <200601271240.k0RCe8ic012141@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/92136; it has been noted by GNATS.

From: Dejan Lesjak <dejan.lesjak@ijs.si>
To: bug-followup@freebsd.org,
 yasu@utahime.org
Cc: Sven Berkvens-Matthijsse <sven@ilse.net>
Subject: Re: ports/92136: x11/xorg-clients: make fails on 4.x
Date: Fri, 27 Jan 2006 13:38:22 +0100

 --Boundary-00=_ARh2DLxUl5J5Ax4
 Content-Type: text/plain;
   charset="us-ascii"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 Can you try the attached patch with system compiler. This reverts usage of 
 va_copy but only for FreeBSD versions where xorg was not default.
 
 --Boundary-00=_ARh2DLxUl5J5Ax4
 Content-Type: text/x-diff;
   charset="us-ascii";
   name="xo-clients-4xcompile.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename="xo-clients-4xcompile.patch"
 
 Index: Makefile
 ===================================================================
 RCS file: /usr/local/repos/freebsd/ports/x11/xorg-clients/Makefile,v
 retrieving revision 1.21
 diff -u -r1.21 Makefile
 --- Makefile	21 Jan 2006 18:55:03 -0000	1.21
 +++ Makefile	27 Jan 2006 12:31:02 -0000
 @@ -84,6 +84,10 @@
  .include "${.CURDIR}/../../x11-servers/xorg-server/Makefile.inc"
  .include <bsd.port.pre.mk>
  
 +.if ${OSVERSION} < 502123
 +EXTRA_PATCHES+=	${FILESDIR}/extra-patch-4x
 +.endif
 +
  .if ${X_WINDOW_SYSTEM:L} != xorg
  IGNORE=	is part of X.Org and you have ${X_WINDOW_SYSTEM} set for X11\
  	distribution. See The X Window System and Virtual Consoles chapter\
 Index: files/extra-patch-4x
 ===================================================================
 RCS file: files/extra-patch-4x
 diff -N files/extra-patch-4x
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/extra-patch-4x	27 Jan 2006 12:23:17 -0000
 @@ -0,0 +1,79 @@
 +--- programs/xedit/util.c.orig	Fri Jan 27 13:07:57 2006
 ++++ programs/xedit/util.c	Fri Jan 27 13:10:58 2006
 +@@ -58,43 +58,14 @@
 + extern Widget vpanes[2], labels[3], texts[3], forms[3];
 + extern XawTextWrapMode wrapmodes[3];
 + 
 +-#ifndef va_copy
 +-# ifdef __va_copy
 +-#  define va_copy __va_copy
 +-# else
 +-#  error "no working va_copy was found"
 +-# endif
 +-#endif
 +-    
 + /*
 +  * Implementation
 +  */
 + void
 +-XeditPrintf(const char *format, ...)
 ++XeditPrintf(char *str)
 + {
 +-    char         *str;
 +-    size_t        size;
 +-    va_list       va,
 +-                  va2;
 +-    XawTextBlock  text;
 +-    XawTextPosition pos;
 +-    
 +-    va_start(va, format);
 +-
 +-    va_copy(va2, va);
 +-    size = vsnprintf(NULL, 0, format, va2);
 +-    va_end(va2);
 +-
 +-    str = (char *)malloc(size + 1);
 +-    if (str == NULL)
 +-        return;
 +-
 +-    vsnprintf(str, size + 1, format, va);
 +-    str[size] = 0;
 +-    
 +-    va_end(va);
 +-    
 +-    pos = XawTextSourceScan(XawTextGetSource(messwidget),
 ++    XawTextBlock text;
 ++    XawTextPosition pos = XawTextSourceScan(XawTextGetSource(messwidget),
 + 					    0, XawstAll, XawsdRight, 1, True);
 + 
 +     text.length = strlen(str);
 +@@ -106,7 +77,6 @@
 + 
 +     XawTextSetInsertionPoint(messwidget, pos + text.length);
 +     
 +-    free(str);
 + }
 + 
 + Widget
 +--- programs/xedit/xedit.h.orig	Fri Jan 27 13:11:42 2006
 ++++ programs/xedit/xedit.h	Fri Jan 27 13:12:55 2006
 +@@ -106,7 +106,7 @@
 + void Feep(void);
 + 
 + /*	externals in util.c 	*/
 +-void XeditPrintf(const char *format, ...);
 ++void XeditPrintf(char*);
 + Widget MakeCommandButton(Widget, char*, XtCallbackProc);
 + Widget MakeStringBox(Widget, String, String);
 + String GetString(Widget);
 +--- programs/xmore/print.h.orig	Fri Jan 27 13:21:05 2006
 ++++ programs/xmore/print.h	Fri Jan 27 13:22:53 2006
 +@@ -38,7 +38,7 @@
 + #if defined(XMORE)
 + #define PrintMsg(x) { printf("xmore: "); printf x ; }
 + #elif defined(XEDIT)
 +-#define PrintMsg(x) { XeditPrintf x ; }
 ++#define PrintMsg(x) { printf("xedit: "); printf x ; }
 + #else
 + #error unknown application
 + #endif 
 
 --Boundary-00=_ARh2DLxUl5J5Ax4--



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