PnetLib's OpenSystem.Platform 0.7.4
Author: Southern Storm Software
Copyright: (C) 2004 Southern Storm Software
License: GNU General Public License
Description:
An intermediary library to maintain the proper sizes of types which
may differ from platform to platform.
This software is redistributed from the pnetlib package as part of the Portal bindings. It is included for convenience only, and the code is not modified from it's original state. This instance of the library is fully compatible with that of the official source. The version included is from pnetlib-0.7.4.
Later releases of Portal.CLI will bundle later releases of the OpenSystem.Platform library.
Introduction
The OpenSystem.Platform library provides a mechanism to support unmanaged, platform-specific data types on UNIX-like systems. It provides a set of types, via CLR enumerations of properly-sized, signed/unsigned integer values which can be used for easier interoperation with unmanaged code.
Included Types
OpenSystem.Platform covers the standard C data types such as:
- [[un]signed] char
- [[un]signed] short
- [unsigned] int
- [unsigned] long
- [unsigned] long long
It also provides mappings for standard UNIX data types such as:
size_t, ssize_t, off_t, off64_t, time_t, ino_t, ino64_t,
uid_t, gid_t, pid_t, mode_t, dev_t, and nlink_t
Additionally, a set of types made available in libX11 are exposed:
XPixel, XID, XMask, XAtom, XVisualID, XTime, XWindow,
XDrawable, XFont, XPixmap, XCursor, XColormap, XGContext,
XAppGroup, XKeySym, XKeyCode, XBool, and XStatus
Autotools-free platform independence
Because Portal.CLI does not use the autotools build system, a new process of generating the platform dependent version of the Types.cs.in template was needed. The definitions used for each type are held in Types.def. The type-check program (source code in type-check.c) outputs a Types.def based on the compile- and run-time environment. The GenerateTypes.exe program (source code in GenerateTypes.cs) does the actual merging, and the process-types script rolls it all together to produce a Types.cs file.
