From: Marcus Brinkmann Date: Tue, 5 May 2009 17:03:33 +0000 (+0000) Subject: 2009-05-05 Marcus Brinkmann X-Git-Tag: gpgme-1.2.0@1385~19 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c14018a3682b8c5b3322f563432a165182327cc6;p=gpgme.git 2009-05-05 Marcus Brinkmann * configure.ac: Add infrastructure for compile time check of _FILE_OFFSET_BITS. src/ 2009-05-05 Marcus Brinkmann * gpgme.h.in: Add compile time check for _FILE_OFFSET_BITS. --- diff --git a/trunk/ChangeLog b/trunk/ChangeLog index 14797c4..886249b 100644 --- a/trunk/ChangeLog +++ b/trunk/ChangeLog @@ -1,3 +1,8 @@ +2009-05-05 Marcus Brinkmann + + * configure.ac: Add infrastructure for compile time check of + _FILE_OFFSET_BITS. + 2009-04-19 Moritz * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Specify --with-gpg. diff --git a/trunk/configure.ac b/trunk/configure.ac index 5d49c08..f02ca8b 100644 --- a/trunk/configure.ac +++ b/trunk/configure.ac @@ -198,6 +198,18 @@ AC_CHECK_SIZEOF(unsigned int) AC_SYS_LARGEFILE AC_TYPE_OFF_T +# A simple compile time check in gpgme.h for GNU/Linux systems that +# prevents a file offset bits mismatch between gpgme and the application. +NEED__FILE_OFFSET_BITS=0 +case $ac_cv_sys_file_offset_bits in + no | unknown) ;; + *) + NEED__FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits + ;; +esac +AC_SUBST(NEED__FILE_OFFSET_BITS) + + # Checks for compiler features. if test "$GCC" = yes; then CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes" diff --git a/trunk/src/ChangeLog b/trunk/src/ChangeLog index 1dcdb21..e2ac143 100644 --- a/trunk/src/ChangeLog +++ b/trunk/src/ChangeLog @@ -1,3 +1,7 @@ +2009-05-05 Marcus Brinkmann + + * gpgme.h.in: Add compile time check for _FILE_OFFSET_BITS. + 2009-04-15 Marcus Brinkmann * posix-io.c (_gpgme_io_socket, _gpgme_io_connect): New functions. diff --git a/trunk/src/gpgme.h.in b/trunk/src/gpgme.h.in index 65823a6..474be73 100644 --- a/trunk/src/gpgme.h.in +++ b/trunk/src/gpgme.h.in @@ -74,6 +74,17 @@ extern "C" { library. */ #define GPGME_VERSION "@PACKAGE_VERSION@" +/* Check for a matching _FILE_OFFSET_BITS definition. */ +#if @NEED__FILE_OFFSET_BITS@ +#ifndef _FILE_OFFSET_BITS +#error GPGME was compiled with _FILE_OFFSET_BITS = @NEED__FILE_OFFSET_BITS@, please see the section "Largefile support (LFS)" in the GPGME manual. +#else +#if (_FILE_OFFSET_BITS) != (@NEED__FILE_OFFSET_BITS@) +#error GPGME was compiled with a different value for _FILE_OFFSET_BITS, namely @NEED__FILE_OFFSET_BITS@, please see the section "Largefile support (LFS)" in the GPGME manual. +#endif +#endif +#endif + /* Some opaque data types used by GPGME. */