From 7e045d886e7a1e2738687b3c48fc66f9b519197e Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Tue, 12 Jan 2010 23:54:49 +0000 Subject: [PATCH] Fix check-build on platforms without sh's pushd/popd or grep's \<\>. --- msvc/config.h | 8 ++------ test/check-build | 7 +++---- test/functions.inc | 1 - 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/msvc/config.h b/msvc/config.h index c13b580..68a9c86 100644 --- a/msvc/config.h +++ b/msvc/config.h @@ -16,11 +16,7 @@ * config.h: MSVC-specific configuration file */ -#define ATTRIBUTE_PRINTF(x,y) - -#define FILE_BASE /* FIXME */ -#define FILE_CNT _cnt -#define FILE_PTR _ptr +#define ATTRIBUTE_PRINTF(x,y) /* */ #define FPOS_CAST(x) (x) #define HAVE_ACCEPT 1 /* #undef HAVE_AIO_H */ @@ -104,7 +100,7 @@ #define HAVE_WINDOWS_H 1 #define HAVE_WINSOCK2_H 1 /* #undef HAVE__IO_GETC */ -#define HAVE__PIPE +#define HAVE__PIPE 1 /* #undef HAVE___FILBUF */ /* #undef HAVE___FOPEN64 */ /* #undef HAVE___FREOPEN64 */ diff --git a/test/check-build b/test/check-build index 60c83fc..7a3e88b 100755 --- a/test/check-build +++ b/test/check-build @@ -23,7 +23,7 @@ msvc_config_h=$(dirname "$0")/../msvc/config.h failure=0 for key in $(sed -ne 's/.*#undef *\([A-Za-z0-9_]*\).*/\1/p' "$config_h_in"); do - if ! grep '[ef] \<'"$key"'\>' "$msvc_config_h" >/dev/null 2>&1; then + if ! grep "[ef] $key[ (]" "$msvc_config_h" >/dev/null 2>&1; then echo "error: $key missing from msvc/config.h" failure=1 fi @@ -39,7 +39,7 @@ fi # failure=0 for dir in src test; do - pushd ../$dir >/dev/null + (cd $(dirname "$0")/../$dir for x in $(make echo-sources); do if grep '[[:space:]]$' "$x" >/dev/null 2>&1; then echo "error: $dir/$x contains trailing spaces" @@ -49,8 +49,7 @@ for dir in src test; do echo "error: $dir/$x contains tabs" failure=1 fi - done - popd >/dev/null + done) done if test "$failure" != "0"; then ret=1 diff --git a/test/functions.inc b/test/functions.inc index 00e7d5b..dddba6b 100644 --- a/test/functions.inc +++ b/test/functions.inc @@ -76,6 +76,5 @@ stop_test() { exit 1 fi echo "*** all $TESTED tests OK ***" - echo "" }