]> granicus.if.org Git - neomutt/commitdiff
If set, use -D_FILE_OFFSET_BITS=64 when checking for GPGMe (#829)
authorPietro Cerutti <gahr@gahr.ch>
Mon, 9 Oct 2017 18:37:52 +0000 (19:37 +0100)
committerGitHub <noreply@github.com>
Mon, 9 Oct 2017 18:37:52 +0000 (19:37 +0100)
* If set, use -D_FILE_OFFSET_BITS=64 when checking for GPGMe

Issue #826

* Let OFF_T_FMT be "%" PRId64 whenever LFS is there

Issue #826

auto.def

index 95bb5000a91156a7e0d1c8fd939165d6c10ba65e..47f80cdfca2532fb4bfbceee6b50ada796785360 100644 (file)
--- a/auto.def
+++ b/auto.def
@@ -225,14 +225,12 @@ if {1} {
   cc-with [list -cflags [get-define CFLAGS]]
 
   # Large file support
-  cc-with {-includes sys/types.h} {
-    if {[cc-check-sizeof off_t] eq {8}} {
-      define OFF_T_FMT {"%" PRId64}
-    } else {
-      define OFF_T_FMT {"%" PRId32}
-    }
-    define LOFF_T off_t
+  if {[cc-check-lfs]} {
+    define OFF_T_FMT {"%" PRId64}
+  } else {
+    define OFF_T_FMT {"%" PRId32}
   }
+  define LOFF_T off_t
 
   # Let's always use volatile for sig_atomic_t
   cc-check-includes signal.h
@@ -319,11 +317,17 @@ if {[get-define want-full-doc]} {define MAKEDOC_FULL}
 ###############################################################################
 # GPGME
 if {[get-define want-gpgme]} {
-  if {![check-inc-and-lib gpgme [opt-val with-gpgme $prefix] \
-                          gpgme.h gpgme_new gpgme]} {
-    user-error "Unable to find GPGME"
+  set gpgme_cflags {}
+  if {[is-defined _FILE_OFFSET_BITS]} {
+    set gpgme_cflags -D_FILE_OFFSET_BITS=[get-define _FILE_OFFSET_BITS]
+  }
+  cc-with [list -cflags $gpgme_cflags] {
+    if {![check-inc-and-lib gpgme [opt-val with-gpgme $prefix] \
+                            gpgme.h gpgme_new gpgme]} {
+      user-error "Unable to find GPGME"
+    }
+    cc-check-functions gpgme_op_export_keys
   }
-  cc-check-functions gpgme_op_export_keys
   define CRYPT_BACKEND_GPGME
 }