--- /n/sources/plan9/sys/src/cmd/db/defs.h Sat Jan 10 10:00:05 2015 +++ /sys/src/cmd/db/defs.h Sun Jun 28 00:00:00 2026 @@ -10,13 +10,13 @@ #include -typedef ulong WORD; +typedef uvlong WORD; typedef uvlong ADDR; -#define HUGEINT 0x7fffffff /* enormous WORD */ +#define HUGEINT (~(WORD)0 >> 1) /* enormous WORD */ #define MAXOFF 0x1000000 -#define INCDIR "/usr/lib/adb" +#define INCDIR "/sys/lib/adb" #define DBNAME "db\n" #define CMD_VERBS "?/=>!$: \t" --- /n/sources/plan9/sys/src/cmd/db/expr.c Sat Jan 10 10:00:05 2015 +++ /sys/src/cmd/db/expr.c Sun Jun 28 00:00:00 2026 @@ -7,7 +7,7 @@ #include "defs.h" #include "fns.h" -static long round(long, long); +static uvlong round(uvlong, uvlong); extern ADDR ditto; uvlong expv; @@ -35,7 +35,7 @@ fpin(char *buf) { union { WORD w; - float f; + double f; } x; x.f = atof(buf); @@ -366,10 +366,10 @@ symchar(int dig) return(isalpha(lastc) || lastc>0x80 || lastc=='_' || dig && isdigit(lastc)); } -static long -round(long a, long b) +static uvlong +round(uvlong a, uvlong b) { - long w; + uvlong w; w = (a/b)*b; if (a!=w)