Subject: pkg/24628: editors/abiword doesn't build on FreeBSD, fix included
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <dotz@irc.pl>
List: netbsd-bugs
Date: 03/01/2004 17:08:08
>Number: 24628
>Category: pkg
>Synopsis: editors/abiword doesn't build on FreeBSD, fix included
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Mar 01 17:09:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Michal Pasternak
>Release: N/A
>Organization:
>Environment:
FreeBSD 4.9
>Description:
Build chokes on VA_COPY variant selection in
src/af/util/xp/ut/string_class.cpp
>How-To-Repeat:
Obvious.
>Fix:
Please import the data below as patches/patch-ac.
This is consistent with FreeBSD Ports, see
http://www.freebsd.org/cgi/cvsweb.cgi/ports/editors/AbiWord2/files/patch-src_af_util_xp_ut_string_class.cpp?rev=1.1&content-type=text/x-cvsweb-markup
... but it is done in a portable manner.
Summary? #include <glib.h> and define VA_COPY as G_VA_COPY, only for FreeBSD.
After this, abiword builds & runs happily. Tested.
Index: patches/patch-ac
===================================================================
RCS file: patches/patch-ac
diff -N patches/patch-ac
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-ac 1 Mar 2004 17:06:27 -0000
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- src/af/util/xp/ut_string_class.cpp.orig Mon Mar 1 17:55:56 2004
++++ src/af/util/xp/ut_string_class.cpp
+@@ -346,7 +346,11 @@ UT_printf_string_upper_bound (const char
+ # elif defined (VA_COPY_AS_ARRAY)
+ # define VA_COPY(ap1, ap2) memmove ((ap1), (ap2), sizeof (va_list))
+ # elif defined (__GNUC__)
+-# define VA_COPY(ap1,ap2) __va_copy((ap1),(ap2))
++# if defined (__FreeBSD__)
++# define VA_COPY G_VA_COPY
++# else
++# define VA_COPY(ap1,ap2) __va_copy((ap1),(ap2))
++# endif
+ # else /* va_list is a pointer */
+ # define VA_COPY(ap1, ap2) ((ap1) = (ap2))
+ # endif /* va_list is a pointer */
>Release-Note:
>Audit-Trail:
>Unformatted: