APPROVE COMMIT
NOTE: This patch has been committed
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1511420627 0
# Thu Nov 23 07:03:47 2017 +0000
# Node ID 6168ead6994890afd2c42099741024d6b0f88f24
# Parent e02d10a9c9c805b9d5253f0cef5301927fb01c0f
Don't redefine MAP_ANONYMOUS on Linux.
ChangeLog addition;
2017-11-23 Aidan Kehoe <kehoea(a)parhasard.net>
* configure.ac (XE_COMPLEX_ARG):
[...]
Be careful not to redefine an existing definition for MAP_ANONYMOUS
src/ChangeLog addition:
2017-11-23 Aidan Kehoe <kehoea(a)parhasard.net>
* ralloc.c:
[...]
Be careful not to redefine an existing definition for MAP_ANONYMOUS
diff -r e02d10a9c9c8 -r 6168ead69948 ChangeLog
--- a/ChangeLog Thu Nov 23 06:27:49 2017 +0000
+++ b/ChangeLog Thu Nov 23 07:03:47 2017 +0000
@@ -6,6 +6,7 @@
systems.
Accept MAP_ANON, a BSDism, as an alias for MAP_ANONYMOUS here.
+ Be careful not to redefine an existing definition for MAP_ANONYMOUS
Remove a caddr_t variable, this type is long obsolete and the
variable was unused.
* configure: Regenerate.
diff -r e02d10a9c9c8 -r 6168ead69948 configure
--- a/configure Thu Nov 23 06:27:49 2017 +0000
+++ b/configure Thu Nov 23 07:03:47 2017 +0000
@@ -19126,7 +19126,7 @@
int main (int argc, char **argv)
{
int fd = -1;
-#ifdef MAP_ANON
+#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
#define MAP_ANONYMOUS MAP_ANON
#endif
#ifndef MAP_ANONYMOUS
diff -r e02d10a9c9c8 -r 6168ead69948 configure.ac
--- a/configure.ac Thu Nov 23 06:27:49 2017 +0000
+++ b/configure.ac Thu Nov 23 07:03:47 2017 +0000
@@ -4831,7 +4831,7 @@
int main (int argc, char **argv)
{
int fd = -1;
-#ifdef MAP_ANON
+#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
#define MAP_ANONYMOUS MAP_ANON
#endif
#ifndef MAP_ANONYMOUS
diff -r e02d10a9c9c8 -r 6168ead69948 src/ChangeLog
--- a/src/ChangeLog Thu Nov 23 06:27:49 2017 +0000
+++ b/src/ChangeLog Thu Nov 23 07:03:47 2017 +0000
@@ -18,6 +18,7 @@
caddr_t is long deprecated, use void * instead when calling
mmap().
Accept MAP_ANON, an old BSDism, as an alias for MAP_ANONYMOUS.
+ Be careful not to redefine an existing definition for MAP_ANONYMOUS
2017-11-23 Aidan Kehoe <kehoea(a)parhasard.net>
diff -r e02d10a9c9c8 -r 6168ead69948 src/ralloc.c
--- a/src/ralloc.c Thu Nov 23 06:27:49 2017 +0000
+++ b/src/ralloc.c Thu Nov 23 07:03:47 2017 +0000
@@ -1248,7 +1248,7 @@
# define MAP_ADDRCHOICE_FLAG 0
#endif /* MAP_ADDRCHOICE_FLAG */
-#ifdef MAP_ANON
+#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
#define MAP_ANONYMOUS MAP_ANON
#endif
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)