Re: Linux version code

Paul Rusty Russell (Paul.Russell@rustcorp.com.au)
Mon, 09 Mar 1998 12:18:36 +1100


In message <199803041700.SAA02494@manjak.knm.org.pl> you write:
> Sorry for the silly question, but how can I calculate LINUX_VERSION_CODE ?

Linus, please apply (2.1.x):

diff -u --recursive --new-file linux-2.1.88-raw/Makefile linux-2.1.88/Makefile
--- linux-2.1.88-raw/Makefile Sun Mar 8 13:55:03 1998
+++ linux-2.1.88/Makefile Fri Feb 27 10:56:50 1998
@@ -262,6 +262,7 @@
include/linux/version.h: ./Makefile
@echo \#define UTS_RELEASE \"$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)\" > .ver
@echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
+ @echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver
@mv -f .ver $@

init/version.o: init/version.c include/linux/compile.h

There is already code like this lying around in a couple of places; if
this patch gets accepted I'll send another to clean them up.

Rusty.

--
 .sig lost in the mail.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu