From: "Martin Schaffner" <maschaffner@gmx.ch>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 2.4.23, 2.6.0-test11] avoid unportable "expr length"
Date: Wed, 10 Dec 2003 11:31:49 +0100 (MET) [thread overview]
Message-ID: <20645.1071052309@www2.gmx.net> (raw)
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
reply other threads:[~2003-12-10 10:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20645.1071052309@www2.gmx.net \
--to=maschaffner@gmx.ch \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®