pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedlibpq in android
6+ messages / 3 participants
[nested] [flat]
* libpq in android
@ 2011-11-23 11:07 Marco Bernasocchi <marco@bernawebdesign.ch>
0 siblings, 2 replies; 6+ messages in thread
From: Marco Bernasocchi @ 2011-11-23 11:07 UTC (permalink / raw)
To: pgsql-bugs
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
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: libpq in android
@ 2011-11-24 20:31 Alvaro Herrera <alvherre@commandprompt.com>
parent: Marco Bernasocchi <marco@bernawebdesign.ch>
1 sibling, 0 replies; 6+ messages in thread
From: Alvaro Herrera @ 2011-11-24 20:31 UTC (permalink / raw)
To: Marco Bernasocchi <marco@bernawebdesign.ch>; +Cc: pgsql-bugs
Excerpts from Marco Bernasocchi's message of mié nov 23 08:07:05 -0300 2011:
> 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.
I have added this to the open commitfest:
https://commitfest.postgresql.org/action/commitfest_view?id=13
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: libpq in android
@ 2011-11-24 22:01 Peter Eisentraut <peter_e@gmx.net>
parent: Marco Bernasocchi <marco@bernawebdesign.ch>
1 sibling, 1 reply; 6+ messages in thread
From: Peter Eisentraut @ 2011-11-24 22:01 UTC (permalink / raw)
To: Marco Bernasocchi <marco@bernawebdesign.ch>; +Cc: pgsql-bugs
On ons, 2011-11-23 at 12:07 +0100, Marco Bernasocchi wrote:
> 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.
The PostgreSQL source tree does not contain any file m4/libtool.m4.
For the second patch, please try to find a feature-detection method of
addressing this problem (e.g., configure check), instead of
harding-coding #ifdef MYPLATFORM.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: libpq in android
@ 2011-11-25 00:43 Alvaro Herrera <alvherre@commandprompt.com>
parent: Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 6+ messages in thread
From: Alvaro Herrera @ 2011-11-25 00:43 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Marco Bernasocchi <marco@bernawebdesign.ch>; pgsql-bugs
Excerpts from Peter Eisentraut's message of jue nov 24 19:01:04 -0300 2011:
> On ons, 2011-11-23 at 12:07 +0100, Marco Bernasocchi wrote:
> > 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.
>
> The PostgreSQL source tree does not contain any file m4/libtool.m4.
>
> For the second patch, please try to find a feature-detection method of
> addressing this problem (e.g., configure check), instead of
> harding-coding #ifdef MYPLATFORM.
FWIW I think this can be done simply by replacing the B64 struct member
with int64.
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: libpq in android
@ 2011-11-29 14:29 Marco Bernasocchi <marco@bernawebdesign.ch>
parent: Alvaro Herrera <alvherre@commandprompt.com>
0 siblings, 1 reply; 6+ messages in thread
From: Marco Bernasocchi @ 2011-11-29 14:29 UTC (permalink / raw)
To: Alvaro Herrera <alvherre@commandprompt.com>; +Cc: Peter Eisentraut <peter_e@gmx.net>; pgsql-bugs
Hi do you need an input from me? i used ifdef to be less invading to the
code.
On 11/25/2011 01:43 AM, Alvaro Herrera wrote:
>
> Excerpts from Peter Eisentraut's message of jue nov 24 19:01:04 -0300 2011:
>> On ons, 2011-11-23 at 12:07 +0100, Marco Bernasocchi wrote:
>>> 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.
>>
>> The PostgreSQL source tree does not contain any file m4/libtool.m4.
>>
>> For the second patch, please try to find a feature-detection method of
>> addressing this problem (e.g., configure check), instead of
>> harding-coding #ifdef MYPLATFORM.
>
> FWIW I think this can be done simply by replacing the B64 struct member
> with int64.
>
--
Marco Bernasocchi
www.opengis.ch
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: libpq in android
@ 2011-11-29 14:51 Alvaro Herrera <alvherre@commandprompt.com>
parent: Marco Bernasocchi <marco@bernawebdesign.ch>
0 siblings, 0 replies; 6+ messages in thread
From: Alvaro Herrera @ 2011-11-29 14:51 UTC (permalink / raw)
To: Marco Bernasocchi <marco@bernawebdesign.ch>; +Cc: Peter Eisentraut <peter_e@gmx.net>; pgsql-bugs
Excerpts from Marco Bernasocchi's message of mar nov 29 11:29:44 -0300 2011:
>
> Hi do you need an input from me? i used ifdef to be less invading to the
> code.
Please try what I suggest and see if it works on your platform.
> On 11/25/2011 01:43 AM, Alvaro Herrera wrote:
> >
> > Excerpts from Peter Eisentraut's message of jue nov 24 19:01:04 -0300 2011:
> >> On ons, 2011-11-23 at 12:07 +0100, Marco Bernasocchi wrote:
> >>> 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.
> >>
> >> The PostgreSQL source tree does not contain any file m4/libtool.m4.
> >>
> >> For the second patch, please try to find a feature-detection method of
> >> addressing this problem (e.g., configure check), instead of
> >> harding-coding #ifdef MYPLATFORM.
> >
> > FWIW I think this can be done simply by replacing the B64 struct member
> > with int64.
> >
>
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2011-11-29 14:51 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-11-23 11:07 libpq in android Marco Bernasocchi <marco@bernawebdesign.ch>
2011-11-24 20:31 ` Alvaro Herrera <alvherre@commandprompt.com>
2011-11-24 22:01 ` Peter Eisentraut <peter_e@gmx.net>
2011-11-25 00:43 ` Alvaro Herrera <alvherre@commandprompt.com>
2011-11-29 14:29 ` Marco Bernasocchi <marco@bernawebdesign.ch>
2011-11-29 14:51 ` Alvaro Herrera <alvherre@commandprompt.com>
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