Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libbacktrace
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
libbacktrace
Commits
14465a95
Commit
14465a95
authored
May 11, 2020
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libbacktrace: declare getpagesize if necessary
Fixes
https://gcc.gnu.org/PR95012
.
parent
7206f5bd
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
1 deletion
+23
-1
config.h.in
config.h.in
+4
-0
configure
configure
+10
-0
configure.ac
configure.ac
+1
-1
mmap.c
mmap.c
+4
-0
mmapio.c
mmapio.c
+4
-0
No files found.
config.h.in
View file @
14465a95
...
@@ -12,6 +12,10 @@
...
@@ -12,6 +12,10 @@
/* Define to 1 if you have the `clock_gettime' function. */
/* Define to 1 if you have the `clock_gettime' function. */
#undef HAVE_CLOCK_GETTIME
#undef HAVE_CLOCK_GETTIME
/* Define to 1 if you have the declaration of `getpagesize', and to 0 if you
don't. */
#undef HAVE_DECL_GETPAGESIZE
/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
don't. */
don't. */
#undef HAVE_DECL_STRNLEN
#undef HAVE_DECL_STRNLEN
...
...
configure
View file @
14465a95
...
@@ -12453,6 +12453,16 @@ fi
...
@@ -12453,6 +12453,16 @@ fi
cat
>>
confdefs.h
<<
_ACEOF
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_DECL_STRNLEN
$ac_have_decl
#define HAVE_DECL_STRNLEN
$ac_have_decl
_ACEOF
_ACEOF
ac_fn_c_check_decl
"
$LINENO
"
"getpagesize"
"ac_cv_have_decl_getpagesize"
"
$ac_includes_default
"
if
test
"x
$ac_cv_have_decl_getpagesize
"
=
xyes
;
then
:
ac_have_decl
=
1
else
ac_have_decl
=
0
fi
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_DECL_GETPAGESIZE
$ac_have_decl
_ACEOF
for
ac_func
in
lstat
readlink
for
ac_func
in
lstat
readlink
do
:
do
:
...
...
configure.ac
View file @
14465a95
...
@@ -383,7 +383,7 @@ if test "$have_fcntl" = "yes"; then
...
@@ -383,7 +383,7 @@ if test "$have_fcntl" = "yes"; then
[Define to 1 if you have the fcntl function])
[Define to 1 if you have the fcntl function])
fi
fi
AC_CHECK_DECLS(
strnlen
)
AC_CHECK_DECLS(
[strnlen, getpagesize]
)
AC_CHECK_FUNCS(lstat readlink)
AC_CHECK_FUNCS(lstat readlink)
# Check for getexecname function.
# Check for getexecname function.
...
...
mmap.c
View file @
14465a95
...
@@ -42,6 +42,10 @@ POSSIBILITY OF SUCH DAMAGE. */
...
@@ -42,6 +42,10 @@ POSSIBILITY OF SUCH DAMAGE. */
#include "backtrace.h"
#include "backtrace.h"
#include "internal.h"
#include "internal.h"
#ifndef HAVE_DECL_GETPAGESIZE
extern
int
getpagesize
(
void
);
#endif
/* Memory allocation on systems that provide anonymous mmap. This
/* Memory allocation on systems that provide anonymous mmap. This
permits the backtrace functions to be invoked from a signal
permits the backtrace functions to be invoked from a signal
handler, assuming that mmap is async-signal safe. */
handler, assuming that mmap is async-signal safe. */
...
...
mmapio.c
View file @
14465a95
...
@@ -40,6 +40,10 @@ POSSIBILITY OF SUCH DAMAGE. */
...
@@ -40,6 +40,10 @@ POSSIBILITY OF SUCH DAMAGE. */
#include "backtrace.h"
#include "backtrace.h"
#include "internal.h"
#include "internal.h"
#ifndef HAVE_DECL_GETPAGESIZE
extern
int
getpagesize
(
void
);
#endif
#ifndef MAP_FAILED
#ifndef MAP_FAILED
#define MAP_FAILED ((void *)-1)
#define MAP_FAILED ((void *)-1)
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment