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.
This commit is contained in:
John Birrell 2006-08-04 22:54:10 +00:00
parent ffc48c2814
commit 1d70d6cb78

View file

@ -296,6 +296,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.