emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master c5b4bd69faf: Expressly disable large file APIs on Android 4.4 and


From: Po Lu
Subject: master c5b4bd69faf: Expressly disable large file APIs on Android 4.4 and earlier
Date: Mon, 6 May 2024 09:00:24 -0400 (EDT)

branch: master
commit c5b4bd69faf9e9af9d95f7c995fffb80a7fc47c9
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Expressly disable large file APIs on Android 4.4 and earlier
    
    * configure.ac (CFLAGS): Add -D_FILE_OFFSET_BITS=32 on SDK 20
    and earlier that unserviceable functions may not be selected.
    Problem reported by Ruth Elburn <ruth@noreply.invalid>.
---
 configure.ac | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/configure.ac b/configure.ac
index d3effc0f4f3..69a8ba0a9f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,7 +40,13 @@ if test "$XCONFIGURE" = "android"; then
   CFLAGS="$ANDROID_CFLAGS -Werror=implicit-function-declaration"
   # Don't explicitly enable support for large files unless Emacs is
   # being built for API 21 or later.  Otherwise, mmap does not work.
+  #
+  # Moreover, 64-bit variants of file IO functions in the C library are
+  # liable to fail with ENOSYS or EINVAL on earlier API versions, and as
+  # such their definitions must be explicitly disabled on NDK releases
+  # that enable them by default.
   AS_IF([test "$ANDROID_SDK" -lt "21"], [
+    CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=32"
     enable_largefile=no
     enable_year2038=no])
 fi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]