diff options
| author | rsc <devnull@localhost> | 2004-12-26 21:50:14 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2004-12-26 21:50:14 +0000 |
| commit | e5aa96acbf9107cd78f2536364c36f9a15751313 (patch) | |
| tree | 9c198bb62564c433c28d2de81a5fb6b782f39903 /src/lib9/utf/utfdef.h | |
| parent | 5c8a0421712a471a00dbf78f7ea054b366ba471b (diff) | |
| download | plan9port-e5aa96acbf9107cd78f2536364c36f9a15751313.tar.gz plan9port-e5aa96acbf9107cd78f2536364c36f9a15751313.zip | |
clean up for unix port
Diffstat (limited to 'src/lib9/utf/utfdef.h')
| -rw-r--r-- | src/lib9/utf/utfdef.h | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/src/lib9/utf/utfdef.h b/src/lib9/utf/utfdef.h index 4b58ae87..1ff41813 100644 --- a/src/lib9/utf/utfdef.h +++ b/src/lib9/utf/utfdef.h @@ -1,14 +1,33 @@ -#define uchar _utfuchar -#define ushort _utfushort -#define uint _utfuint -#define ulong _utfulong -#define vlong _utfvlong -#define uvlong _utfuvlong +/* + * compiler directive on Plan 9 + */ +#ifndef USED +#define USED(x) if(x);else +#endif +/* + * easiest way to make sure these are defined + */ +#define uchar _fmtuchar +#define ushort _fmtushort +#define uint _fmtuint +#define ulong _fmtulong +#define vlong _fmtvlong +#define uvlong _fmtuvlong typedef unsigned char uchar; typedef unsigned short ushort; typedef unsigned int uint; typedef unsigned long ulong; +typedef unsigned long long uvlong; +typedef long long vlong; + +/* + * nil cannot be ((void*)0) on ANSI C, + * because it is used for function pointers + */ +#undef nil +#define nil 0 + +#undef nelem +#define nelem ((void*)0) -#define nelem(x) (sizeof(x)/sizeof((x)[0])) -#define nil ((void*)0) |
