pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marco Bernasocchi <marco@bernawebdesign.ch>
To: pgsql-bugs@postgresql.org
Subject: libpq in android
Date: Wed, 23 Nov 2011 12:07:05 +0100
Message-ID: <4ECCD3D9.3040505@bernawebdesign.ch> (raw)

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

Attachments: download all (2 files, .tar.gz)

android_support.patch (text/x-patch, 1.0K) download 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
libpq.patch (text/x-patch, 626B) download 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

view thread (6+ messages)  latest in thread

Message-ID: <4ECCD3D9.3040505@bernawebdesign.ch>
Permalink:  ../4ECCD3D9.3040505@bernawebdesign.ch/
Also on:    postgresql.org/message-id/4ECCD3D9.3040505@bernawebdesign.ch

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: marco@bernawebdesign.ch
  Subject: Re: libpq in android
  In-Reply-To: <4ECCD3D9.3040505@bernawebdesign.ch>
  References: <4ECCD3D9.3040505@bernawebdesign.ch>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox