bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Cc: "Martin Storsjö" <martin@martin.st>
Subject: Re: Issues with posix functions on modern macOS/Xcode
Date: Tue, 01 Dec 2020 19:58:07 +0100	[thread overview]
Message-ID: <2335880.Hj2sta0Lcv@omega> (raw)
In-Reply-To: <alpine.DEB.2.23.453.2012011509530.4295@cone.martin.st>

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;
 



  parent reply	other threads:[~2020-12-01 18:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01 13:14 Issues with posix functions on modern macOS/Xcode Martin Storsjö
2020-12-01 13:50 ` Martin Storsjö
2020-12-01 18:58 ` Bruno Haible [this message]
2020-12-02 18:56 ` Bruno Haible
2021-01-02 20:43   ` Bruno Haible
2021-03-21  2:57     ` Bruno Haible
2021-03-21 13:58       ` Bruno Haible
2020-12-02 21:52 ` strsignal on macOS Bruno Haible
2020-12-03 20:59 ` fprintf-posix " Bruno Haible
2020-12-04 23:24 ` utime " Bruno Haible
2021-01-02 16:03 ` renameatu: Fix test failures " Bruno Haible
2021-01-02 18:06 ` utimens: " Bruno Haible

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2335880.Hj2sta0Lcv@omega \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=martin@martin.st \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).