Login | Register
My pages Projects Community openCollabNet

Discussions > dev > A couple of patches for SubCommander trunk for 13.May.2006

subcommander
Discussion topic

Back to topic list

A couple of patches for SubCommander trunk for 13.May.2006

Author Vesselin Atanasov <vesselin dot atanasov at gmail dot com>
Full name Vesselin Atanasov <vesselin dot atanasov at gmail dot com>
Date 2006-05-12 22:11:26 PDT
Message Hello.
I have downloaded the trunk version of subcommander from the SVN repository on
13.May.2006 and tried to compile it on my Fedora Core 5 system. However the
compile failed for several reasons. After fixing the problems I have prepared
a couple of patches, which I email you in a gzipped form.

1. subcommander.apr.patch fixes two problems with the apr and apr-util
packages on the FC5 system.

1a. Since FC5 uses apr-1.2.7, the subcommander "configure" script fails to
detect the apr and apr-util packages correctly. So the patch upgrades the
ac-macros/find_apr.m4 and ac-macros/find_apr.m4 scripts. I took the new ones
from Apache httpd 2.2.2 and they work correctly on my machine.

1b. On FC5 the new apr headers require that -D_LARGEFILE64_SOURCE is defined
when they are compiled, otherwise they fail because of an undefined off64_t
typedef. SO I added a new build variable APR_CPPFLAGS, which takes the
required defines from apr-1-config.

2. subcommander.nls.patch partially fixes a problem with libintl.h. This file
is always included into the project on FC5 so a conflict occurs because of
the following code in configure.ac:

#ifdef ENABLE_NLS
#include <libintl.h>
// libintl.h defines sprintf to libintl_sprintf. Unfortunately
// QCString has an sprintf method. Since sprintf is a define
// now the linker requires a QCString::libintl_sprintf symbol.
// To fix this we undef sprintf again.
#undef sprintf
#define _(x) dgettext(PACKAGE_NAME, x)
#define _q(x) QString::fromUtf8(dg​ettext(PACKAGE_NAME,​ x))
#define _s(x) sc::String(dgettext(​PACKAGE_NAME, x))
#else
#define _(x) (x)
#define _q(x) QString::fromUtf8(x)
#define _s(x) sc::String(x)
#define dgettext(domain,x) (x)
#endif

This code assumes that if NLS is disabled, it can safely redefine dgettext()
as an empty macro. However on FC5, #include <string> also includes libintl.h
so a conflict occurs.

I decided not to fix this issue but compile with --enable-nls. Another problem
occurred with a missing libintl library. On FC5 this library is not in a
separate file, but is inside glibc, the linking fails when gcc tries to find
libintl. Since this library file seems to be missing on all modern linuxes, I
just set the default not to include the library in the linker.

Regards,
Vesselin Atanasov
Attachments

« Previous message in topic | 1 of 5 | Next message in topic »

Messages

Show all messages in topic

A couple of patches for SubCommander trunk for 13.May.2006 Vesselin Atanasov <vesselin dot atanasov at gmail dot com> Vesselin Atanasov <vesselin dot atanasov at gmail dot com> 2006-05-12 22:11:26 PDT
     Re: A couple of patches for SubCommander trunk for 13.May.2006 hauner Martin Hauner 2006-05-14 11:03:21 PDT
         Re: A couple of patches for SubCommander trunk for 13.May.2006 Vesselin Atanasov <vesselin dot atanasov at gmail dot com> Vesselin Atanasov <vesselin dot atanasov at gmail dot com> 2006-05-14 12:18:19 PDT
             Re: A couple of patches for SubCommander trunk for 13.May.2006 hauner Martin Hauner 2006-05-15 01:36:36 PDT
                 re[1]: A couple of patches for SubCommander trunk for 13.May.2006 jdubery John Dubery 2006-05-15 16:07:52 PDT
Messages per page: