From c6cc38f9a885ee6c8110b46f47597e2f94a281cb Mon Sep 17 00:00:00 2001 From: constantined Date: Wed, 3 Jan 2018 11:08:26 +0000 Subject: [PATCH 1/3] Define bindir, libdir and incdir after custom PREFIX was set --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index b3c6c19..f86e3ae 100644 --- a/configure +++ b/configure @@ -53,9 +53,6 @@ die_unknown(){ } PREFIX="/mingw" -bindir="${PREFIX}/bin" -libdir="${PREFIX}/lib" -incdir="${PREFIX}/include/sys" ar="ar" cc_default="gcc" ranlib="ranlib" @@ -111,6 +108,9 @@ for opt do esac done +bindir="${PREFIX}/bin" +libdir="${PREFIX}/lib" +incdir="${PREFIX}/include/sys" ar="${cross_prefix}${ar}" cc_default="${cross_prefix}${cc_default}" ranlib="${cross_prefix}${ranlib}" From 3874169327f32c31f5e7f54f0fb4791b6118e6e0 Mon Sep 17 00:00:00 2001 From: Roy Merkel Date: Sat, 2 Jun 2018 19:52:09 -0700 Subject: [PATCH 2/3] Added --bindir install option to configure so we can specify the bindir parameter. --- configure | 4 ++++ 1 file changed, 4 insertions(+) mode change 100644 => 100755 configure diff --git a/configure b/configure old mode 100644 new mode 100755 index b3c6c19..790ab03 --- a/configure +++ b/configure @@ -35,6 +35,7 @@ show_help(){ echo echo " --help print this message" echo " --prefix=PREFIX install in PREFIX [$PREFIX]" + echo " --bindir=DIR install binaries in DIR [$PREFIX/bin]" echo " --libdir=DIR install libs in DIR [$PREFIX/lib]" echo " --incdir=DIR install includes in DIR [$PREFIX/include]" echo " --enable-static build static libraries [yes]" @@ -88,6 +89,9 @@ for opt do --prefix=*) PREFIX="$optval" ;; + --bindir=*) + bindir="$optval" + ;; --libdir=*) libdir="$optval" ;; From 6556d4f5db89370c5f7e2722bfbfcb6cdc596dff Mon Sep 17 00:00:00 2001 From: Zachary Cook Date: Wed, 9 Oct 2019 12:30:50 -0400 Subject: [PATCH 3/3] Support MAP_FIXED using MapViewOfFileEx --- mman.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mman.c b/mman.c index 9a2df41..e71666c 100644 --- a/mman.c +++ b/mman.c @@ -87,8 +87,6 @@ void* mmap(void *addr, size_t len, int prot, int flags, int fildes, OffsetType o errno = 0; if (len == 0 - /* Unsupported flag combinations */ - || (flags & MAP_FIXED) != 0 /* Usupported protection combinations */ || prot == PROT_EXEC) { @@ -113,7 +111,14 @@ void* mmap(void *addr, size_t len, int prot, int flags, int fildes, OffsetType o return MAP_FAILED; } - map = MapViewOfFile(fm, desiredAccess, dwFileOffsetHigh, dwFileOffsetLow, len); + if ((flags & MAP_FIXED) == 0) + { + map = MapViewOfFile(fm, desiredAccess, dwFileOffsetHigh, dwFileOffsetLow, len); + } + else + { + map = MapViewOfFileEx(fm, desiredAccess, dwFileOffsetHigh, dwFileOffsetLow, len, addr); + } CloseHandle(fm);