summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>2006-08-04 22:54:10 +0000
committerjb <jb@FreeBSD.org>2006-08-04 22:54:10 +0000
commit99c6b9a5861bb5285b27fa675f22eef908acce7b (patch)
tree2f9a2f053915cf4808e1d8c4db64427c5b95840f
parent7cec994cf03723a459008ffc18e88464888cb338 (diff)
downloadFreeBSD-src-99c6b9a5861bb5285b27fa675f22eef908acce7b.zip
FreeBSD-src-99c6b9a5861bb5285b27fa675f22eef908acce7b.tar.gz
Add some compatibility definitions for OpenSolaris source.
These are only defined if _SOLARIS_C_SOURCE is defined, so they don't polute the FreeBSD compile environment. They are used all over the OpenSolaris source, so defining them here removes the need to continually resolve differences in FreeBSD system haeder files from Solaris header files.
-rw-r--r--sys/sys/types.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/sys/sys/types.h b/sys/sys/types.h
index 51c02c8..6273f7c 100644
--- a/sys/sys/types.h
+++ b/sys/sys/types.h
@@ -297,6 +297,36 @@ typedef struct vm_page *vm_page_t;
#endif /* !_KERNEL */
/*
+ * Solaris compatibility definitions.
+ */
+#ifdef _SOLARIS_C_SOURCE
+typedef u_int uint_t;
+typedef u_char uchar_t;
+typedef u_short ushort_t;
+typedef u_long ulong_t;
+
+typedef long long longlong_t;
+typedef unsigned long long u_longlong_t;
+
+typedef off_t off64_t;
+
+typedef id_t taskid_t;
+typedef id_t projid_t;
+typedef id_t poolid_t;
+typedef id_t zoneid_t;
+typedef id_t ctid_t;
+
+#ifndef _KERNEL
+#if defined(__XOPEN_OR_POSIX)
+typedef enum { _B_FALSE, _B_TRUE } boolean_t;
+#else
+typedef enum { B_FALSE, B_TRUE } boolean_t;
+#endif /* defined(__XOPEN_OR_POSIX) */
+#endif
+
+#endif /* _SOLARIS_C_SOURCE */
+
+/*
* The following are all things that really shouldn't exist in this header,
* since its purpose is to provide typedefs, not miscellaneous doodads.
*/
OpenPOWER on IntegriCloud