bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Kiyoshi KANAZAWA <yoi_no_myoujou@yahoo.co.jp>
Cc: bug-gnulib@gnu.org, Eric Blake <eblake@redhat.com>,
	"bug-m4@gnu.org" <bug-m4@gnu.org>
Subject: Re: [m4-1.4.19] make error on Solaris 11.3 x86
Date: Sat, 29 May 2021 10:22:30 -0700	[thread overview]
Message-ID: <bd458286-e33e-ca06-99da-5b2a57e5df31@cs.ucla.edu> (raw)
In-Reply-To: <20210529121409.spjharfsxkcjg3hq@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]

Thanks for reporting the bug. Please try the attached patch, which I 
installed into Gnulib.

stackvma.c says it contains simplified copies of code in vma-iter.c, 
which didn't have this bug. Bruno, am I right in guessing that there are 
two files mainly because libsigsegv was separate from Gnulib? Should we 
be working to unify the two files, so that fixes to one also fix the other?

[-- Attachment #2: 0001-sigsegv-Port-to-Solaris-11.patch --]
[-- Type: text/x-patch, Size: 1893 bytes --]

From 87981840ebe68c9239625e5133b9fb86495163ad Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sat, 29 May 2021 10:14:01 -0700
Subject: [PATCH] sigsegv: Port to Solaris 11

Problem reported by Kiyoshi KANAZAWA in:
https://lists.gnu.org/r/bug-m4/2021-05/msg00020.html
* lib/stackvma.c (_FILE_OFFSET_BITS): #undef on Solaris and Android.
---
 ChangeLog      |  7 +++++++
 lib/stackvma.c | 15 +++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 43056adcb..2f145fc02 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-05-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+	sigsegv: Port to Solaris 11
+	Problem reported by Kiyoshi KANAZAWA in:
+	https://lists.gnu.org/r/bug-m4/2021-05/msg00020.html
+	* lib/stackvma.c (_FILE_OFFSET_BITS): #undef on Solaris and Android.
+
 2021-05-24  Bruno Haible  <bruno@clisp.org>
 
 	c-stack: Document another restriction.
diff --git a/lib/stackvma.c b/lib/stackvma.c
index faa99238e..ba3c7d305 100644
--- a/lib/stackvma.c
+++ b/lib/stackvma.c
@@ -17,6 +17,21 @@
 
 #include <config.h>
 
+/* On Solaris in 32-bit mode, when gnulib module 'largefile' is in use,
+   prevent a compilation error
+     "Cannot use procfs in the large file compilation environment"
+   On Android, when targeting Android 4.4 or older with a GCC toolchain,
+   prevent a compilation error
+     "error: call to 'mmap' declared with attribute error: mmap is not
+      available with _FILE_OFFSET_BITS=64 when using GCC until android-21.
+      Either raise your minSdkVersion, disable _FILE_OFFSET_BITS=64, or
+      switch to Clang."
+   The files that we access in this compilation unit are less than 2 GB
+   large.  */
+#if defined __sun || defined __ANDROID__
+# undef _FILE_OFFSET_BITS
+#endif
+
 /* Specification.  */
 #include "stackvma.h"
 
-- 
2.27.0


  reply	other threads:[~2021-05-29 17:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <293579489.1062338.1622244788446.JavaMail.yahoo.ref@mail.yahoo.co.jp>
     [not found] ` <293579489.1062338.1622244788446.JavaMail.yahoo@mail.yahoo.co.jp>
2021-05-29 12:14   ` [m4-1.4.19] make error on Solaris 11.3 x86 Eric Blake
2021-05-29 17:22     ` Paul Eggert [this message]
2021-05-29 22:20       ` Kiyoshi KANAZAWA
2021-05-29 22:43         ` Paul Eggert
2021-05-29 22:36       ` Bruno Haible
2021-05-29 22:53       ` stackvma.c vs. vma-iter.c 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=bd458286-e33e-ca06-99da-5b2a57e5df31@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=bug-gnulib@gnu.org \
    --cc=bug-m4@gnu.org \
    --cc=eblake@redhat.com \
    --cc=yoi_no_myoujou@yahoo.co.jp \
    /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).