From: vladimir.mezentsev@oracle.com
To: binutils@sourceware.org
Cc: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
Subject: [PATCH] gprofng: 30889 can't compile without large file support
Date: Thu, 11 Jan 2024 20:10:54 -0800 [thread overview]
Message-ID: <20240112041054.1836291-1-vladimir.mezentsev@oracle.com> (raw)
From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
gprofng/ChangeLog
2024-01-11 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
PR 30889
* configure.ac (O_LARGEFILE): Define to 0, if not defined.
* configure: Rebuild.
* common/config.h.in: Rebuild.
---
gprofng/common/config.h.in | 3 +++
gprofng/configure | 26 ++++++++++++++++++++++++++
gprofng/configure.ac | 11 +++++++++++
3 files changed, 40 insertions(+)
diff --git a/gprofng/common/config.h.in b/gprofng/common/config.h.in
index f8484f238fd..1e719b605dd 100644
--- a/gprofng/common/config.h.in
+++ b/gprofng/common/config.h.in
@@ -56,6 +56,9 @@
*/
#undef LT_OBJDIR
+/* Define if O_LARGEFILE is not in fcntl.h */
+#undef O_LARGEFILE
+
/* Name of package */
#undef PACKAGE
diff --git a/gprofng/configure b/gprofng/configure
index 1c6a99291be..48161190485 100755
--- a/gprofng/configure
+++ b/gprofng/configure
@@ -16648,6 +16648,32 @@ $as_echo "#define DEBUG 1" >>confdefs.h
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_LARGEFILE in fcntl.h" >&5
+$as_echo_n "checking for O_LARGEFILE in fcntl.h... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <fcntl.h>
+#ifndef O_LARGEFILE
+MACRO_UNDEFINED
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "MACRO_UNDEFINED" >/dev/null 2>&1; then :
+
+
+$as_echo "#define O_LARGEFILE 0" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: O_LARGEFILE is undefined" >&5
+$as_echo "O_LARGEFILE is undefined" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: O_LARGEFILE is defined" >&5
+$as_echo "O_LARGEFILE is defined" >&6; }
+fi
+rm -f conftest*
+
+
cat > "dummy.c" << EOF
#include <features.h>
#if defined(__UCLIBC__)
diff --git a/gprofng/configure.ac b/gprofng/configure.ac
index a7221d9eaf0..150deac5fa2 100644
--- a/gprofng/configure.ac
+++ b/gprofng/configure.ac
@@ -151,6 +151,17 @@ if test "${enable_gprofng_debug}" = yes; then
AC_DEFINE(DEBUG, 1, [Enable debugging output.])
fi
+AC_MSG_CHECKING(for O_LARGEFILE in fcntl.h)
+AC_EGREP_CPP([MACRO_UNDEFINED], [
+#include <fcntl.h>
+#ifndef O_LARGEFILE
+MACRO_UNDEFINED
+#endif
+ ],[
+ AC_DEFINE(O_LARGEFILE, 0, [Define if O_LARGEFILE is not in fcntl.h])
+ AC_MSG_RESULT(O_LARGEFILE is undefined) ],
+ AC_MSG_RESULT(O_LARGEFILE is defined))
+
cat > "dummy.c" << EOF
#include <features.h>
#if defined(__UCLIBC__)
--
2.31.1
next reply other threads:[~2024-01-12 4:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 4:10 vladimir.mezentsev [this message]
2024-01-12 9:20 ` Andreas Schwab
2024-01-12 19:49 ` Vladimir Mezentsev
-- strict thread matches above, loose matches on Subject: below --
2024-01-11 4:02 vladimir.mezentsev
2024-01-11 5:53 ` Mike Frysinger
2024-01-11 8:09 ` Vladimir Mezentsev
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240112041054.1836291-1-vladimir.mezentsev@oracle.com \
--to=vladimir.mezentsev@oracle.com \
--cc=binutils@sourceware.org \
/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).