aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@free-electrons.com>2016-11-25 18:30:40 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2016-12-06 19:37:45 +0100
commitb2a9601cebb67db9e02ac7bbd927a21aa95f5ba3 (patch)
tree1f6315835a869e9027c55d71c0ceb0b660c1a0bf /configure.ac
parent15c21334b201dc54870cfd3e9697307c95f7e4dc (diff)
common: Fix PRI{x,d}off definitions for x86_64 platform
Compiling for x86_64 generates a lot of warning because the PRIxoff_t and PRIdoff_t are not properly defined, which comes from the missing SIZEOF_LONG definition. Use the autotools to generate a config.h header, include this header from common.h and ask autoheader to generate the SIZEOF_LONG and SIZEOF_LOFF_T definitions. Use these new definitions to assign the proper descriptors to PRIxoff_t and PRIdoff_t. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 2fdf49c..a783990 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,6 +4,7 @@ m4_define([RELEASE], 1.5.2)
AC_INIT([mtd-utils], [RELEASE], [linux-mtd@lists.infradead.org], mtd-utils)
+AC_CONFIG_HEADERS([include/config.h])
AC_ARG_ENABLE([unit-tests],
[AS_HELP_STRING([--enable-unit-tests], [Compile unit test programs])],
@@ -109,4 +110,8 @@ AM_COND_IF([WITHOUT_LZO], [], [
test "${have_lzo}" != "yes" && AC_MSG_ERROR([lzo missing])
])
+AC_CHECK_SIZEOF([long])
+
+AC_CHECK_SIZEOF([loff_t])
+
AC_OUTPUT([Makefile])