Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 16AD51E34FD3 for ; Wed, 23 Nov 2011 07:07:21 -0400 (AST) Received: from mail-fx0-f46.google.com ([209.85.161.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RTAfh-0006y7-6u for pgsql-bugs@postgresql.org; Wed, 23 Nov 2011 11:07:22 +0000 Received: by faas1 with SMTP id s1so184895faa.19 for ; Wed, 23 Nov 2011 03:07:08 -0800 (PST) Received: by 10.180.106.104 with SMTP id gt8mr23584092wib.6.1322046428203; Wed, 23 Nov 2011 03:07:08 -0800 (PST) Received: from [192.168.1.40] (121-17.107-92.cust.bluewin.ch. [92.107.17.121]) by mx.google.com with ESMTPS id d17sm20169124wbh.19.2011.11.23.03.07.06 (version=SSLv3 cipher=OTHER); Wed, 23 Nov 2011 03:07:07 -0800 (PST) Message-ID: <4ECCD3D9.3040505@bernawebdesign.ch> Date: Wed, 23 Nov 2011 12:07:05 +0100 From: Marco Bernasocchi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111116 Thunderbird/9.0 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: libpq in android Content-Type: multipart/mixed; boundary="------------000005050203080205070401" X-Archive-Number: 201111/163 X-Sequence-Number: 31758 This is a multi-part message in MIME format. --------------000005050203080205070401 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi all, porting QGIS to android I ported libpq as well, I had to modify two files to successfully compile it without-readline. I attach the two needed minor patches. further informations can be found at android.qgis.org. Thanks for considering the patches. Marco Bernasocchi www.opengis.ch --------------000005050203080205070401 Content-Type: text/x-patch; name="android_support.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="android_support.patch" diff --git a/m4/libtool.m4 b/m4/libtool.m4 index a9e20cf..a5cc8eb 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -2642,8 +2642,17 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + case $host_os in + # This must be Linux Android ELF which has no support for versioned libs. + linux-android*) + library_names_spec='$libname${shared_ext}' + soname_spec='${libname}${shared_ext}' + ;; + *) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no --------------000005050203080205070401 Content-Type: text/x-patch; name="libpq.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="libpq.patch" diff --git a/src/port/crypt.c b/src/port/crypt.c index 85b98c5..416c509 100644 --- a/src/port/crypt.c +++ b/src/port/crypt.c @@ -87,7 +87,10 @@ static int des_cipher(const char *in, char *out, long salt, int num_iter); * define "B64" to be the declaration for a 64 bit integer. * XXX this feature is currently unused, see "endian" comment below. */ -#define B64 __int64 +//to avoid crypt.c:237: error: expected specifier-qualifier-list before '__int64' when cross compiling for android +#ifndef ANDROID + #define B64 __int64 +#endif /* * define "LARGEDATA" to get faster permutations, by using about 72 kilobytes --------------000005050203080205070401--