Skip to contentSkip to conversation

Fix portability issues in configure script

PATCH In review Arthur Williams 3 participants 4 messages Apr 9, 2024 – Apr 26, 2024 io_uring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix portability issues in configure script

The configure script failed on my setup because of the invalid printf directive "%" and for use of the unportable "echo -e". These have been replaced with more portable options.

---
 configure | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
configure +3 -3
index 052920d..f6b590b 100755
@@ -519,9 +519,9 @@ print_config "CXX" "$cxx"
 # generate io_uring_version.h
 # Reset MAKEFLAGS
 MAKEFLAGS=
-MAKE_PRINT_VARS="include Makefile.common\nprint-%: ; @echo \$(\$*)\n"
-VERSION_MAJOR=$(env echo -e "$MAKE_PRINT_VARS" | make -s --no-print-directory -f - print-VERSION_MAJOR)
-VERSION_MINOR=$(env echo -e "$MAKE_PRINT_VARS" | make -s --no-print-directory -f - print-VERSION_MINOR)
+MAKE_PRINT_VARS="include Makefile.common\nprint-%%: ; @echo \$(\$*)\n"
+VERSION_MAJOR=$(printf "$MAKE_PRINT_VARS" | make -s --no-print-directory -f - print-VERSION_MAJOR)
+VERSION_MINOR=$(printf "$MAKE_PRINT_VARS" | make -s --no-print-directory -f - print-VERSION_MINOR)
 io_uring_version_h="src/include/liburing/io_uring_version.h"
 cat > $io_uring_version_h << EOF
 /* SPDX-License-Identifier: MIT */
Signature · 1 line
2.44.0
#1 lore raw
Quoted 6 lines · Arthur Williams

The configure script failed on my setup because of the invalid printf directive "%" and for use of the unportable "echo -e". These have been replaced with more portable options.

---
 configure | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

The patch is missing your Signed-off-by tag.

Signature · 1 line
Ammar Faizi
#2 lore raw

PATCH 1/1 Fix portability issues in configure script

The configure script failed on my setup because of the invalid printf directive "%" and for use of the unportable "echo -e". These have been replaced with more portable options.

---
 configure | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
configure +3 -3
index 052920d..f6b590b 100755
@@ -519,9 +519,9 @@ print_config "CXX" "$cxx"
 # generate io_uring_version.h
 # Reset MAKEFLAGS
 MAKEFLAGS=
-MAKE_PRINT_VARS="include Makefile.common\nprint-%: ; @echo \$(\$*)\n"
-VERSION_MAJOR=$(env echo -e "$MAKE_PRINT_VARS" | make -s --no-print-directory -f - print-VERSION_MAJOR)
-VERSION_MINOR=$(env echo -e "$MAKE_PRINT_VARS" | make -s --no-print-directory -f - print-VERSION_MINOR)
+MAKE_PRINT_VARS="include Makefile.common\nprint-%%: ; @echo \$(\$*)\n"
+VERSION_MAJOR=$(printf "$MAKE_PRINT_VARS" | make -s --no-print-directory -f - print-VERSION_MAJOR)
+VERSION_MINOR=$(printf "$MAKE_PRINT_VARS" | make -s --no-print-directory -f - print-VERSION_MINOR)
 io_uring_version_h="src/include/liburing/io_uring_version.h"
 cat > $io_uring_version_h << EOF
 /* SPDX-License-Identifier: MIT */
Signature · 1 line
2.44.0
maintainer Applied
#3 lore raw
Quoted 5 lines · Arthur Williams

The configure script failed on my setup because of the invalid printf directive "%" and for use of the unportable "echo -e". These have been replaced with more portable options.

Applied, thanks!

[1/1] Fix portability issues in configure script

      commit: 380d12d0f5d68be09ccc6151ccca3e15857b16fa

Best regards,

Signature · 1 line
Jens Axboe