From 9ce241cd886772521f0ee12c453d7009bbb44786 Mon Sep 17 00:00:00 2001 From: Andreas Platschek Date: Tue, 7 Jun 2016 12:37:41 +0200 Subject: [PATCH 1/6] fix bench script -- arch does not support -k in Debian Since the -k parameter is not supported by arch on Debian (tested on Jessie and Squeeze), the pathname was not correct. Thus the -k is dropped as it returns (as seems to be expected) the architecture of the compiling machine. Signed-off-by: Andreas Platschek --- bench | 2 +- bench.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bench b/bench index b700704..eabbefa 100755 --- a/bench +++ b/bench @@ -65,7 +65,7 @@ mkdir -p $VDIR1 $VDIR2 touch $IFILE -ARCH=`arch -k` +ARCH=`arch` # produce benchmark header for easier comparisons diff --git a/bench.sh b/bench.sh index 7aba977..10f213e 100644 --- a/bench.sh +++ b/bench.sh @@ -65,7 +65,7 @@ mkdir -p $VDIR1 $VDIR2 touch $IFILE -ARCH=`arch -k` +ARCH=`arch` # produce benchmark header for easier comparisons From ac6c643d035f1d65cb21338aaebef7779721f35a Mon Sep 17 00:00:00 2001 From: Andreas Platschek Date: Thu, 7 Jul 2016 05:41:01 +0200 Subject: [PATCH 2/6] Make the arch fix for Debian conditional This is to insure that other platforms don't break. Signed-off-by: Andreas Platschek Signed-off-by: Andreas Gabriel-Platschek --- bench | 9 ++++++++- bench.sh | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/bench b/bench index eabbefa..9b0bfe4 100755 --- a/bench +++ b/bench @@ -65,7 +65,14 @@ mkdir -p $VDIR1 $VDIR2 touch $IFILE -ARCH=`arch` +DISTRO=$(cat /etc/issue | head -n +1 | awk '{print $1}') + +if [ "$DISTRO" = "Debian" ] +then + ARCH=`arch` +else + ARCH=`arch -k` +fi # produce benchmark header for easier comparisons diff --git a/bench.sh b/bench.sh index 10f213e..0972f03 100644 --- a/bench.sh +++ b/bench.sh @@ -65,7 +65,14 @@ mkdir -p $VDIR1 $VDIR2 touch $IFILE -ARCH=`arch` +DISTRO=$(cat /etc/issue | head -n +1 | awk '{print $1}') + +if [ "$DISTRO" = "Debian" ] +then + ARCH=`arch` +else + ARCH=`arch -k` +fi # produce benchmark header for easier comparisons From 8ff5a58afba612f99ccceb845af06d3ec0cae7eb Mon Sep 17 00:00:00 2001 From: Andreas Platschek Date: Thu, 7 Jul 2016 06:24:37 +0200 Subject: [PATCH 3/6] Extended the conditional in bench scripts to Ubuntu While testing this on Ubuntu 14.04.4 LTS I noticed that in Ubuntu arch does not support the -k option either. Signed-off-by: Andreas Platschek --- bench | 2 +- bench.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bench b/bench index 9b0bfe4..9513b84 100755 --- a/bench +++ b/bench @@ -67,7 +67,7 @@ touch $IFILE DISTRO=$(cat /etc/issue | head -n +1 | awk '{print $1}') -if [ "$DISTRO" = "Debian" ] +if [ "$DISTRO" = "Debian" -o "$DISTRO" = "Ubuntu" ] then ARCH=`arch` else diff --git a/bench.sh b/bench.sh index 0972f03..94f1527 100644 --- a/bench.sh +++ b/bench.sh @@ -67,7 +67,7 @@ touch $IFILE DISTRO=$(cat /etc/issue | head -n +1 | awk '{print $1}') -if [ "$DISTRO" = "Debian" ] +if [ "$DISTRO" = "Debian" -o "$DISTRO" = "Ubuntu" ] then ARCH=`arch` else From 65007c7ae77f1f5756f9acaaf2201c41852620ec Mon Sep 17 00:00:00 2001 From: Andreas Platschek Date: Tue, 23 Aug 2016 08:49:26 +0200 Subject: [PATCH 4/6] non-Debian users shall not be bothered -> dump error message to /dev/null Signed-off-by: Andreas Platschek --- bench | 2 +- bench.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bench b/bench index 9513b84..5faf882 100755 --- a/bench +++ b/bench @@ -65,7 +65,7 @@ mkdir -p $VDIR1 $VDIR2 touch $IFILE -DISTRO=$(cat /etc/issue | head -n +1 | awk '{print $1}') +DISTRO=$(cat /etc/issue 2> /dev/null | head -n +1 | awk '{print $1}') if [ "$DISTRO" = "Debian" -o "$DISTRO" = "Ubuntu" ] then diff --git a/bench.sh b/bench.sh index 94f1527..38145ae 100644 --- a/bench.sh +++ b/bench.sh @@ -65,7 +65,7 @@ mkdir -p $VDIR1 $VDIR2 touch $IFILE -DISTRO=$(cat /etc/issue | head -n +1 | awk '{print $1}') +DISTRO=$(cat /etc/issue 2> /dev/null | head -n +1 | awk '{print $1}') if [ "$DISTRO" = "Debian" -o "$DISTRO" = "Ubuntu" ] then From 3fab05b6071f521b61aaeebac1e571dfedb9a563 Mon Sep 17 00:00:00 2001 From: Andreas Gabriel-Platschek Date: Tue, 2 Dec 2025 09:49:07 +0100 Subject: [PATCH 5/6] cascade_flock: fix implicit declaration of flock() Signed-off-by: Andreas Gabriel-Platschek --- cascade_flock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cascade_flock.c b/cascade_flock.c index 27d95d1..33607d2 100644 --- a/cascade_flock.c +++ b/cascade_flock.c @@ -46,6 +46,7 @@ #include #include #include +#include #include "libmicro.h" From c5111564ea3c2187167c61e8fe7c19edde0c1f3e Mon Sep 17 00:00:00 2001 From: Andreas Gabriel-Platschek Date: Tue, 2 Dec 2025 09:50:59 +0100 Subject: [PATCH 6/6] stcmp(): fix implicit declaration in several places Signed-off-by: Andreas Gabriel-Platschek --- bench | 2 +- mmap.c | 2 +- mprotect.c | 2 +- munmap.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bench b/bench index 5faf882..38145ae 100755 --- a/bench +++ b/bench @@ -30,7 +30,7 @@ # Use is subject to license terms. # -bench_version=0.4.0 +bench_version=0.4.1 libmicro_version=`bin/tattle -V` case $libmicro_version in diff --git a/mmap.c b/mmap.c index 44b8b58..14123f5 100644 --- a/mmap.c +++ b/mmap.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include "libmicro.h" diff --git a/mprotect.c b/mprotect.c index 5d08b9e..f621ed2 100644 --- a/mprotect.c +++ b/mprotect.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include "libmicro.h" diff --git a/munmap.c b/munmap.c index 7979dbb..0a50f9d 100644 --- a/munmap.c +++ b/munmap.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include "libmicro.h"