aboutsummaryrefslogtreecommitdiff
path: root/src/lib9/utf/plan9.h
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-12-26 21:50:28 +0000
committerrsc <devnull@localhost>2004-12-26 21:50:28 +0000
commitbd36f714d22b1a6046b528649d5e962e038e4d13 (patch)
tree20bf33c900be431d2aecbd0133f81f165d7587c2 /src/lib9/utf/plan9.h
parente5aa96acbf9107cd78f2536364c36f9a15751313 (diff)
downloadplan9port-bd36f714d22b1a6046b528649d5e962e038e4d13.tar.gz
plan9port-bd36f714d22b1a6046b528649d5e962e038e4d13.tar.bz2
plan9port-bd36f714d22b1a6046b528649d5e962e038e4d13.zip
add for unix port
Diffstat (limited to 'src/lib9/utf/plan9.h')
-rw-r--r--src/lib9/utf/plan9.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/lib9/utf/plan9.h b/src/lib9/utf/plan9.h
new file mode 100644
index 00000000..e40e33eb
--- /dev/null
+++ b/src/lib9/utf/plan9.h
@@ -0,0 +1,29 @@
+/*
+ * compiler directive on Plan 9
+ */
+#ifndef USED
+#define USED(x) if(x);else
+#endif
+
+/*
+ * easiest way to make sure these are defined
+ */
+#define uchar _utfuchar
+#define ushort _utfushort
+#define uint _utfuint
+#define ulong _utfulong
+typedef unsigned char uchar;
+typedef unsigned short ushort;
+typedef unsigned int uint;
+typedef unsigned long ulong;
+
+/*
+ * nil cannot be ((void*)0) on ANSI C,
+ * because it is used for function pointers
+ */
+#undef nil
+#define nil 0
+
+#undef nelem
+#define nelem(x) (sizeof (x)/sizeof (x)[0])
+