bug-gnulib
[Top][All Lists]
Advanced

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

Re: Issues with posix functions on modern macOS/Xcode


From: Bruno Haible
Subject: Re: Issues with posix functions on modern macOS/Xcode
Date: Tue, 01 Dec 2020 19:58:07 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-193-generic; KDE/5.18.0; x86_64; ; )

Martin Storsjö wrote:
> This same bit does succeed on x86_64 though - it looks like 
> gnulib/lib/vma-iter.c has a macos specific arch check like this:
> 
> # if defined __ppc64__ || defined __x86_64__
> 
> This probably needs to be amended with "|| defined __aarch64__".

Done:


2020-12-01  Bruno Haible  <bruno@clisp.org>

        vma-iter: Add support for macOS11/arm64.
        Patch suggested by Hill Ma <maahiuzeon@gmail.com> in
        <https://gitlab.com/gnu-clisp/clisp/-/issues/27>
        and by Martin Storsjö <martin@martin.st> in
        <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
        * lib/vma-iter.c (vma_iterate): On arm64, use 64-bit type definitions.

diff --git a/lib/vma-iter.c b/lib/vma-iter.c
index 10ccda4..5e5acf8 100644
--- a/lib/vma-iter.c
+++ b/lib/vma-iter.c
@@ -1333,7 +1333,7 @@ vma_iterate (vma_iterate_callback_fn callback, void *data)
          In 64-bit processes, we could use vm_region_64 or mach_vm_region.
          I choose vm_region_64 because it uses the same types as vm_region,
          resulting in less conditional code.  */
-# if defined __ppc64__ || defined __x86_64__
+# if defined __aarch64__ || defined __ppc64__ || defined __x86_64__
       struct vm_region_basic_info_64 info;
       mach_msg_type_number_t info_count = VM_REGION_BASIC_INFO_COUNT_64;
 




reply via email to

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