{\pwd2\ansi{\*\pwdcomment ************************************************************************ * * Dies ist ein Microsoft Pocket Word-Dokument. * * Um dieses Pocket Word-Dokument in Microsoft Word anzuzeigen, brauchen * Sie den Pocket Word-Konverter für Microsoft Office. Weitere Informationen * finden Sie in der Microsoft Windows CE-Website: * * http://www.microsoft.com/mobile/hpc\r * ************************************************************************ }\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fmodern\fprq1\fcharset0 Courier New;}} {\colortbl ;\red0\green0\blue255;} \viewkind4\uc1\pard\f0\fs18 // ----------------------------------------------------------------------------\par // $Id$\par // ----------------------------------------------------------------------------\par // Public Domain C Library - \cf1\ul http://pdclib.sourceforge.net\cf0\ul0\par // This code is Public Domain. Use, modify, and redistribute at will.\par // ----------------------------------------------------------------------------\par // Description of the personality concept\par // ----------------------------------------------------------------------------\par \par The pdclib is aimed at providing a fully conforming implementation of the C99\par standard library, with a focus on adaptability to diverse environments.\par \par That means, an effort was made to make this library useful to you, no matter if\par you are looking for a replacement for the CLib provided by your system vendor,\par for a basic CLib to develop your own operating system on / with, or for a "bare\par bones" CLib to test your software against a strict "standard only" library.\par \par The traditional way of providing this kind of cross-platform support is the\par preprocessor directive '#ifdef'. However, careless use of this feature can make\par source code next to intelligible and hard to maintain. Hence, an effort was\par made to encapsule such platform dependencies, by the concept of "personality\par modules".\par \par A personality module consists of three parts: drop-ins, glue code, and the\par header file "__personality.h", in an appropriately named subdirectory of\par pdclib/personalities.\par \par // ----------------------------------------------------------------------------\par // DROP-INS\par \par The standard includes limits.h and stdint.h define various intrinsics of the\par integer types of a platform. The standard include float.h does the same for the\par floating point types. Throughout pdclib, these defines have been put to maximum\par use.\par \par Each personality module must provide those three include files, so that pdclib\par "knows" about the data type intrinsics of the platform in question. The files\par are simply "dropped" into the pdclib/includes subdirectory prior to building\par pdclib.\par \par // ----------------------------------------------------------------------------\par // GLUE CODE \par \par Most functions of pdclib could be implemented generically - i.e., any supported\par platform uses identical source code for them. Some functions, however, interact\par closely with the operating system at one point or another. pdclib implements\par the "top half" of those functions, where possible. The "bottom half" has to be\par provided by the operating system.\par \par If pdclib is used on a host OS, as replacement for a vendor-supplied CLib, the\par personality module should contain the "glue code" necessary to match the OS\par provided services to pdclib's top/bottom interface (see below).\par \par When a new operating system uses pdclib as "native" C standard library, the\par documentation of the top/bottom interfaces (see below) should help in bringing\par OS and pdclib together. In this case, no dedicated "glue code" is necessary.\par \par // ----------------------------------------------------------------------------\par // __PERSONALITY.H\par \par At some points within the library, information about the environment is needed\par which cannot be derived from the drop-ins. In those places, "__personality.h"\par is included; this file defines a couple of symbols specifying those environment\par options for the personality module. A template for __personality.h can be found\par in the pdclib/personalities directory.\par \par The symbols defined in personality.h are all named __PERSONALITY_*, with "*"\par being replaced with a service or feature provded or not provided. Never is the\par name of an OS, compiler, or hardware used in such symbols - later generations\par of either might provide a service that older ones did not, and it is also more\par self-explanatory if the symbol reads "__PERSONALITY_SUPPORTS_XYZ" instead of\par "__PERSONALITY_MyOS", which basically leaves the reader clueless as to what\par makes MyOS special in this case - information that might be outdated already\par without anyone being the wiser.\par \par If a new, exotic personality is added that requires a new symbol to be added to personality.h, that symbol is always worded in a way that the old personality\par modules need not be changed. The default goes without saying, so to speak.\par \par // ----------------------------------------------------------------------------\par // TOP/BOTTOM INTERFACE\par \par What follows is a documentation of the "bottom half" functions required by\par pdclib, with an exact description of interface, required functionality, etc.\par \par }