lkml.org 
[lkml]   [2003]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
Subject[PATCH 2.4.23, 2.6.0-test11] avoid unportable "expr length"
Hi,

This one-line patch makes it possible to compile the linux kernel on systems
without GNU expr.


patch for 2.6.0-test11

--- a/Makefile 2003-12-09 13:54:50.000000000 +0100
+++ b/Makefile 2003-12-09 13:56:39.000000000 +0100
@@ -640,7 +640,7 @@
uts_len := 64

define filechk_version.h
- if expr length "$(KERNELRELEASE)" \> $(uts_len) >/dev/null ; then \
+ if expr "$(KERNELRELEASE)" : '.*' \> $(uts_len) >/dev/null ; then \
echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \
exit 1; \
fi; \

patch for 2.4.23

--- a/Makefile 2003-12-09 14:27:56.000000000 +0100
+++ b/Makefile 2003-12-09 14:28:37.000000000 +0100
@@ -353,7 +353,7 @@
@rm -f .ver1

include/linux/version.h: ./Makefile
- @expr length "$(KERNELRELEASE)" \<= $(uts_len) > /dev/null || \
+ @expr "$(KERNELRELEASE)" : '.*' \<= $(uts_len) > /dev/null || \
(echo KERNELRELEASE \"$(KERNELRELEASE)\" exceeds $(uts_len)
characters >&2; false)
@echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver
@echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 +
$(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver

--
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.022 / U:4.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site