* [Buildroot] [PATCH v1] postgresql: fix pgac_cv_snprintf_long_long_int_modifier
@ 2016-11-28 18:53 Peter Seiderer
2016-11-28 19:29 ` Baruch Siach
2016-11-28 20:40 ` Thomas Petazzoni
0 siblings, 2 replies; 5+ messages in thread
From: Peter Seiderer @ 2016-11-28 18:53 UTC (permalink / raw)
To: buildroot
Supplementary change the pgac_cv_snprintf_long_long_int_modifier from
complete format '%lld' to modifier 'll' version only (forgotten in commit
02c43157ab09f6fe4078fd1145fc9d403d66c089 ([1])).
Fixes Bug 9451 ([2]).
[1] https://git.buildroot.net/buildroot/commit/?id=02c43157ab09f6fe4078fd1145fc9d403d66c089
[2] https://bugs.busybox.net/show_bug.cgi?id=9451
Reported-by: Daniel <dde@innovaphone.com>
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
package/postgresql/postgresql.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
index d46e8c0..786ef48 100644
--- a/package/postgresql/postgresql.mk
+++ b/package/postgresql/postgresql.mk
@@ -13,7 +13,7 @@ POSTGRESQL_INSTALL_STAGING = YES
POSTGRESQL_CONFIG_SCRIPTS = pg_config
POSTGRESQL_CONF_ENV = \
ac_cv_type_struct_sockaddr_in6=yes \
- pgac_cv_snprintf_long_long_int_modifier="%lld" \
+ pgac_cv_snprintf_long_long_int_modifier="ll" \
pgac_cv_snprintf_size_t_support=yes
POSTGRESQL_CONF_OPTS = --disable-rpath
--
2.8.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v1] postgresql: fix pgac_cv_snprintf_long_long_int_modifier
2016-11-28 18:53 [Buildroot] [PATCH v1] postgresql: fix pgac_cv_snprintf_long_long_int_modifier Peter Seiderer
@ 2016-11-28 19:29 ` Baruch Siach
2016-11-28 20:17 ` Thomas Petazzoni
2016-11-28 20:40 ` Thomas Petazzoni
1 sibling, 1 reply; 5+ messages in thread
From: Baruch Siach @ 2016-11-28 19:29 UTC (permalink / raw)
To: buildroot
Hi Peter,
On Mon, Nov 28, 2016 at 07:53:51PM +0100, Peter Seiderer wrote:
> Supplementary change the pgac_cv_snprintf_long_long_int_modifier from
> complete format '%lld' to modifier 'll' version only (forgotten in commit
> 02c43157ab09f6fe4078fd1145fc9d403d66c089 ([1])).
The original commit that introduced pgac_cv_snprintf_long_long_int_format
caching (3d3f70b5677, postgresql: avoid AC_TRY_RUN when testing snprintf())
did so because of AC_TRY_RUN calls. These were removed in upstream commit
a2edb023d [1]. It is most likely safe to remove these cached values now.
[1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=a2edb023d08778c3346bbbf4ca82ef7f6e9283eb
> Fixes Bug 9451 ([2]).
>
> [1] https://git.buildroot.net/buildroot/commit/?id=02c43157ab09f6fe4078fd1145fc9d403d66c089
> [2] https://bugs.busybox.net/show_bug.cgi?id=9451
>
> Reported-by: Daniel <dde@innovaphone.com>
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
baruch
> ---
> package/postgresql/postgresql.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
> index d46e8c0..786ef48 100644
> --- a/package/postgresql/postgresql.mk
> +++ b/package/postgresql/postgresql.mk
> @@ -13,7 +13,7 @@ POSTGRESQL_INSTALL_STAGING = YES
> POSTGRESQL_CONFIG_SCRIPTS = pg_config
> POSTGRESQL_CONF_ENV = \
> ac_cv_type_struct_sockaddr_in6=yes \
> - pgac_cv_snprintf_long_long_int_modifier="%lld" \
> + pgac_cv_snprintf_long_long_int_modifier="ll" \
> pgac_cv_snprintf_size_t_support=yes
> POSTGRESQL_CONF_OPTS = --disable-rpath
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v1] postgresql: fix pgac_cv_snprintf_long_long_int_modifier
2016-11-28 19:29 ` Baruch Siach
@ 2016-11-28 20:17 ` Thomas Petazzoni
2016-11-28 20:27 ` Peter Seiderer
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2016-11-28 20:17 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 28 Nov 2016 21:29:01 +0200, Baruch Siach wrote:
> Hi Peter,
>
> On Mon, Nov 28, 2016 at 07:53:51PM +0100, Peter Seiderer wrote:
> > Supplementary change the pgac_cv_snprintf_long_long_int_modifier from
> > complete format '%lld' to modifier 'll' version only (forgotten in commit
> > 02c43157ab09f6fe4078fd1145fc9d403d66c089 ([1])).
>
> The original commit that introduced pgac_cv_snprintf_long_long_int_format
> caching (3d3f70b5677, postgresql: avoid AC_TRY_RUN when testing snprintf())
> did so because of AC_TRY_RUN calls. These were removed in upstream commit
> a2edb023d [1]. It is most likely safe to remove these cached values now.
>
> [1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=a2edb023d08778c3346bbbf4ca82ef7f6e9283eb
I don't see anything in this commit that removes the AC_TRY_RUN()
checks. It replaces the AC_TRY_RUN() checks by AC_RUN_IFELSE(), which
is doing exactly the same: a runtime test. What makes you think this
commit solves the problem?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v1] postgresql: fix pgac_cv_snprintf_long_long_int_modifier
2016-11-28 20:17 ` Thomas Petazzoni
@ 2016-11-28 20:27 ` Peter Seiderer
0 siblings, 0 replies; 5+ messages in thread
From: Peter Seiderer @ 2016-11-28 20:27 UTC (permalink / raw)
To: buildroot
Hello *,
On Mon, 28 Nov 2016 21:17:05 +0100, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Mon, 28 Nov 2016 21:29:01 +0200, Baruch Siach wrote:
> > Hi Peter,
> >
> > On Mon, Nov 28, 2016 at 07:53:51PM +0100, Peter Seiderer wrote:
> > > Supplementary change the pgac_cv_snprintf_long_long_int_modifier from
> > > complete format '%lld' to modifier 'll' version only (forgotten in commit
> > > 02c43157ab09f6fe4078fd1145fc9d403d66c089 ([1])).
> >
> > The original commit that introduced pgac_cv_snprintf_long_long_int_format
> > caching (3d3f70b5677, postgresql: avoid AC_TRY_RUN when testing snprintf())
> > did so because of AC_TRY_RUN calls. These were removed in upstream commit
> > a2edb023d [1]. It is most likely safe to remove these cached values now.
> >
> > [1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=a2edb023d08778c3346bbbf4ca82ef7f6e9283eb
>
> I don't see anything in this commit that removes the AC_TRY_RUN()
> checks. It replaces the AC_TRY_RUN() checks by AC_RUN_IFELSE(), which
> is doing exactly the same: a runtime test. What makes you think this
> commit solves the problem?
>
And the experimental test (the second one without 'pgac_cv_snprintf_long_long_int_modifier="ll"'):
$ diff -u build/postgresql-9.6.1_orig/config.log build/postgresql-9.6.1/config.log
[...]
configure:13741: checking snprintf length modifier for long long int
-configure:13792: result: ll
-configure:13822: checking whether snprintf supports the %z modifier
-configure:13865: result: yes
+configure:13790: result: cannot test (not on host machine)
configure:13891: checking size of void *
configure:13896: /home/seiderer/Work/zeiss/freescale-imx6/build_rpi3_002/build-002/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-gcc -c -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE conftest.c >&5
configure:13896: $? = 0
configure:13896: /home/seiderer/Work/zeiss/freescale-imx6/build_rpi3_002/build-002/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-gcc -c -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE conftest.c >&5
conftest.c: In function 'main':
-conftest.c:182:12: error: size of array 'test_array' is negative
+conftest.c:183:12: error: size of array 'test_array' is negative
static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= 0)];
^
configure:13896: $? = 1
@@ -8802,6 +8968,7 @@
| #define PG_INT64_TYPE long long int
| #define HAVE_LL_CONSTANTS 1
| #define INT64_MODIFIER "ll"
+| #define USE_REPL_SNPRINTF 1
| /* end confdefs.h. */
| #include <stdio.h>
| #ifdef HAVE_SYS_TYPES_H
@@ -8848,7 +9015,7 @@
| }
[...]
Without pre-given pgac_cv_snprintf_long_long_int_modifier the define 'USE_REPL_SNPRINTF' is used...
Regards,
Peter
> Thanks,
>
> Thomas
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v1] postgresql: fix pgac_cv_snprintf_long_long_int_modifier
2016-11-28 18:53 [Buildroot] [PATCH v1] postgresql: fix pgac_cv_snprintf_long_long_int_modifier Peter Seiderer
2016-11-28 19:29 ` Baruch Siach
@ 2016-11-28 20:40 ` Thomas Petazzoni
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2016-11-28 20:40 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 28 Nov 2016 19:53:51 +0100, Peter Seiderer wrote:
> Supplementary change the pgac_cv_snprintf_long_long_int_modifier from
> complete format '%lld' to modifier 'll' version only (forgotten in commit
> 02c43157ab09f6fe4078fd1145fc9d403d66c089 ([1])).
>
> Fixes Bug 9451 ([2]).
>
> [1] https://git.buildroot.net/buildroot/commit/?id=02c43157ab09f6fe4078fd1145fc9d403d66c089
> [2] https://bugs.busybox.net/show_bug.cgi?id=9451
>
> Reported-by: Daniel <dde@innovaphone.com>
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
> package/postgresql/postgresql.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-11-28 20:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-28 18:53 [Buildroot] [PATCH v1] postgresql: fix pgac_cv_snprintf_long_long_int_modifier Peter Seiderer
2016-11-28 19:29 ` Baruch Siach
2016-11-28 20:17 ` Thomas Petazzoni
2016-11-28 20:27 ` Peter Seiderer
2016-11-28 20:40 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox