plan9.h (765B) download
1#include <inttypes.h>
2
3/*
4 * compiler directive on Plan 9
5 */
6#ifndef USED
7# define USED(x) (void) (x)
8#endif
9
10/*
11 * easiest way to make sure these are defined
12 */
13#define uchar _fmtuchar
14#define ushort _fmtushort
15#define uint _fmtuint
16#define ulong _fmtulong
17#define vlong _fmtvlong
18#define uvlong _fmtuvlong
19#define uintptr _fmtuintptr
20
21typedef unsigned char uchar;
22typedef unsigned short ushort;
23typedef unsigned int uint;
24typedef unsigned long ulong;
25typedef unsigned long long uvlong;
26typedef long long vlong;
27typedef uintptr_t uintptr;
28
29/*
30 * nil cannot be ((void*)0) on ANSI C,
31 * because it is used for function pointers
32 */
33#undef nil
34#define nil 0
35
36#undef nelem
37#define nelem(x) (sizeof(x) / sizeof(x)[0])