diff options
-rw-r--r-- | 386/include/u.h | 1 | ||||
-rw-r--r-- | 68000/include/u.h | 1 | ||||
-rw-r--r-- | 68020/include/u.h | 1 | ||||
-rw-r--r-- | alpha/include/u.h | 1 | ||||
-rw-r--r-- | amd64/include/u.h | 1 | ||||
-rw-r--r-- | arm/include/u.h | 1 | ||||
-rw-r--r-- | mips/include/u.h | 1 | ||||
-rw-r--r-- | power/include/u.h | 1 | ||||
-rw-r--r-- | power64/include/u.h | 1 | ||||
-rw-r--r-- | sparc/include/u.h | 1 | ||||
-rw-r--r-- | sparc64/include/u.h | 1 | ||||
-rw-r--r-- | spim/include/u.h | 1 | ||||
-rw-r--r-- | sys/include/libc.h | 8 | ||||
-rw-r--r-- | sys/src/9/port/lib.h | 8 | ||||
-rw-r--r-- | sys/src/cmd/cc/dpchk.c | 1 | ||||
-rw-r--r-- | sys/src/libc/fmt/dofmt.c | 5 | ||||
-rw-r--r-- | sys/src/libc/fmt/fmt.c | 1 |
17 files changed, 35 insertions, 0 deletions
diff --git a/386/include/u.h b/386/include/u.h index ebccf02e8..ec4e55161 100644 --- a/386/include/u.h +++ b/386/include/u.h @@ -6,6 +6,7 @@ typedef unsigned int uint; typedef signed char schar; typedef long long vlong; typedef unsigned long long uvlong; +typedef long intptr; typedef unsigned long uintptr; typedef unsigned long usize; typedef uint Rune; diff --git a/68000/include/u.h b/68000/include/u.h index 445edbfb4..fe9f79723 100644 --- a/68000/include/u.h +++ b/68000/include/u.h @@ -6,6 +6,7 @@ typedef unsigned int uint; typedef signed char schar; typedef long long vlong; typedef unsigned long long uvlong; +typedef long intptr; typedef unsigned long uintptr; typedef unsigned long usize; typedef uint Rune; diff --git a/68020/include/u.h b/68020/include/u.h index d4942b8fb..1eb2754db 100644 --- a/68020/include/u.h +++ b/68020/include/u.h @@ -6,6 +6,7 @@ typedef unsigned int uint; typedef signed char schar; typedef long long vlong; typedef unsigned long long uvlong; +typedef long intptr; typedef unsigned long uintptr; typedef unsigned long usize; typedef uint Rune; diff --git a/alpha/include/u.h b/alpha/include/u.h index 92fea5c7c..1be416584 100644 --- a/alpha/include/u.h +++ b/alpha/include/u.h @@ -6,6 +6,7 @@ typedef unsigned int uint; typedef signed char schar; typedef long long vlong; typedef unsigned long long uvlong; +typedef long intptr; typedef unsigned long uintptr; typedef unsigned long usize; typedef uint Rune; diff --git a/amd64/include/u.h b/amd64/include/u.h index 742de1035..3ca236942 100644 --- a/amd64/include/u.h +++ b/amd64/include/u.h @@ -6,6 +6,7 @@ typedef unsigned int uint; typedef signed char schar; typedef long long vlong; typedef unsigned long long uvlong; +typedef long long intptr; typedef unsigned long long uintptr; typedef unsigned long usize; typedef uint Rune; diff --git a/arm/include/u.h b/arm/include/u.h index 5a86e34d8..47d75a07a 100644 --- a/arm/include/u.h +++ b/arm/include/u.h @@ -7,6 +7,7 @@ typedef unsigned int uint; typedef signed char schar; typedef long long vlong; typedef unsigned long long uvlong; +typedef long intptr; typedef unsigned long uintptr; typedef unsigned long usize; typedef uint Rune; diff --git a/mips/include/u.h b/mips/include/u.h index c30ebd882..f4c28fcb4 100644 --- a/mips/include/u.h +++ b/mips/include/u.h @@ -6,6 +6,7 @@ typedef unsigned int uint; typedef signed char schar; typedef long long vlong; typedef unsigned long long uvlong; +typedef long intptr; typedef unsigned long uintptr; typedef unsigned long usize; typedef uint Rune; diff --git a/power/include/u.h b/power/include/u.h index 27a88d274..e2def0bc7 100644 --- a/power/include/u.h +++ b/power/include/u.h @@ -6,6 +6,7 @@ typedef unsigned int uint; typedef signed char schar; typedef long long vlong; typedef unsigned long long uvlong; +typedef long intptr; typedef unsigned long uintptr; typedef unsigned long usize; typedef uint Rune; diff --git a/power64/include/u.h b/power64/include/u.h index 7f4c22c96..0f059498b 100644 --- a/power64/include/u.h +++ b/power64/include/u.h @@ -6,6 +6,7 @@ typedef unsigned int uint; typedef signed char schar; typedef long long vlong; typedef unsigned long long uvlong; +typedef long long intptr; typedef unsigned long long uintptr; typedef unsigned long usize; typedef uint Rune; diff --git a/sparc/include/u.h b/sparc/include/u.h index fe9fbff2d..3fce8ec51 100644 --- a/sparc/include/u.h +++ b/sparc/include/u.h @@ -6,6 +6,7 @@ typedef unsigned int uint; typedef signed char schar; typedef long long vlong; typedef unsigned long long uvlong; +typedef long intptr; typedef unsigned long uintptr; typedef unsigned long usize; typedef uint Rune; diff --git a/sparc64/include/u.h b/sparc64/include/u.h index fe9fbff2d..3fce8ec51 100644 --- a/sparc64/include/u.h +++ b/sparc64/include/u.h @@ -6,6 +6,7 @@ typedef unsigned int uint; typedef signed char schar; typedef long long vlong; typedef unsigned long long uvlong; +typedef long intptr; typedef unsigned long uintptr; typedef unsigned long usize; typedef uint Rune; diff --git a/spim/include/u.h b/spim/include/u.h index c30ebd882..f4c28fcb4 100644 --- a/spim/include/u.h +++ b/spim/include/u.h @@ -6,6 +6,7 @@ typedef unsigned int uint; typedef signed char schar; typedef long long vlong; typedef unsigned long long uvlong; +typedef long intptr; typedef unsigned long uintptr; typedef unsigned long usize; typedef uint Rune; diff --git a/sys/include/libc.h b/sys/include/libc.h index bd273d8b8..095615ad7 100644 --- a/sys/include/libc.h +++ b/sys/include/libc.h @@ -194,6 +194,14 @@ extern Rune* runefmtstrflush(Fmt*); #pragma varargck type "lo" ulong #pragma varargck type "lx" ulong #pragma varargck type "lb" ulong +#pragma varargck type "zd" intptr +#pragma varargck type "zo" intptr +#pragma varargck type "zx" intptr +#pragma varargck type "zb" intptr +#pragma varargck type "zd" uintptr +#pragma varargck type "zo" uintptr +#pragma varargck type "zx" uintptr +#pragma varargck type "zb" uintptr #pragma varargck type "d" int #pragma varargck type "o" int #pragma varargck type "x" int diff --git a/sys/src/9/port/lib.h b/sys/src/9/port/lib.h index 67d08e502..1dbccbcc5 100644 --- a/sys/src/9/port/lib.h +++ b/sys/src/9/port/lib.h @@ -98,6 +98,14 @@ extern int sprint(char*, char*, ...); #pragma varargck type "lb" ulong #pragma varargck type "ld" ulong #pragma varargck type "lx" ulong +#pragma varargck type "zd" intptr +#pragma varargck type "zo" intptr +#pragma varargck type "zx" intptr +#pragma varargck type "zb" intptr +#pragma varargck type "zd" uintptr +#pragma varargck type "zo" uintptr +#pragma varargck type "zx" uintptr +#pragma varargck type "zb" uintptr #pragma varargck type "b" int #pragma varargck type "d" int #pragma varargck type "x" int diff --git a/sys/src/cmd/cc/dpchk.c b/sys/src/cmd/cc/dpchk.c index 217e005c3..a08dd6970 100644 --- a/sys/src/cmd/cc/dpchk.c +++ b/sys/src/cmd/cc/dpchk.c @@ -165,6 +165,7 @@ arginit(void) argflag('*', Fstar); argflag('l', Fl); + argflag('z', ewidth[TVLONG]==ewidth[TIND] ? Fvl : Fl); argflag('o', Fverb); flagbits['x'] = flagbits['o']; diff --git a/sys/src/libc/fmt/dofmt.c b/sys/src/libc/fmt/dofmt.c index 95852f5c2..bb6ee99a5 100644 --- a/sys/src/libc/fmt/dofmt.c +++ b/sys/src/libc/fmt/dofmt.c @@ -504,6 +504,11 @@ _flagfmt(Fmt *f) f->flags |= FmtVLong; f->flags |= FmtLong; break; + case 'z': + f->flags |= FmtLong; + if(sizeof(uintptr) == sizeof(uvlong)) + f->flags |= FmtVLong; + break; } return 1; } diff --git a/sys/src/libc/fmt/fmt.c b/sys/src/libc/fmt/fmt.c index a1dee68d5..84f4004b5 100644 --- a/sys/src/libc/fmt/fmt.c +++ b/sys/src/libc/fmt/fmt.c @@ -48,6 +48,7 @@ static Convfmt knownfmt[] = { 's', _strfmt, 'u', _flagfmt, 'x', _ifmt, + 'z', _flagfmt, 0, nil, }; |