From: Stefan E. <se...@us...> - 2003-11-17 20:19:29
|
Update of /cvsroot/blob/blob/src/lib In directory sc8-pr-cvs1:/tmp/cvs-serv25461/src/lib Modified Files: printf.c Log Message: do_div() included from linux/include/asm-arm/div64.h is no more or moved in linux 2.6.0-test9-rmk1. Remove that dependency and define the macro directly. Index: printf.c =================================================================== RCS file: /cvsroot/blob/blob/src/lib/printf.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- printf.c 8 Feb 2002 12:49:03 -0000 1.1 +++ printf.c 17 Nov 2003 20:19:06 -0000 1.2 @@ -41,9 +41,22 @@ #include <blob/types.h> #include <blob/util.h> #include <blob/serial.h> -#include <asm/div64.h> #include <stdarg.h> +/* From linux/include/asm-arm/div64.h. We dont want to be dependent from + * the linux kernel. + * + * Specially true if these headers vanish later (2.6.0-test9-rmk1) + */ + +/* We're not 64-bit, but... */ +#define do_div(n,base) \ +({ \ + int __res; \ + __res = ((unsigned long)n) % (unsigned int)base; \ + n = ((unsigned long)n) / (unsigned int)base; \ + __res; \ +}) |