What P.I.P.S. is Not
P.I.P.S. is not a Unix application runtime environment on Symbian OS. You cannot run an
application you have compiled for your Unix desktop on Symbian with P.I.P.S.. You will, at the
very least, need to recompile your application using the Symbian OS toolchain.
P.I.P.S. attempts to comply with the POSIX.1 (core services) and POSIX.1c (thread extensions)
standards as far as possible. However, full compliance is not possible owing to constraints
imposed by the underlying architecture of Symbian OS. For example, Symbian OS does not
support the fork-and-exec paradigm as it does not duplicate the calling process when creating
a new one. There is no fork that returns ‘twice’ – once in the parent and once in the child – to
allow you to distinguish in the same source what code runs as parent and what as child.
Signals and system calls are not natively supported and can only be logically approximated.
Where possible, we have documented deviations from the standards and outlined
workarounds. You may find this information in documentation for the individual APIs or in
manuals such as this, available for download from
developer.symbian.com/P.I.P.S._wiki
.
P.I.P.S. does not, as yet, provide a mechanism to interact with the various phone peripherals
(for example, the camera, microphone, etc.) or UI. But you can always invoke relevant native
APIs to do this. We suggest that you isolate these operations into separate source files (as
these need to be in C++) and link them together with the rest of your P.I.P.S.-based code
(which can be in either C or C++) to create a ‘complete’ application.
For a practical example, see the whitepaper on porting a VNC Viewer to Symbian OS with
P.I.P.S., available at
developer.symbian.com/P.I.P.S._wiki
. There are additional code examples
and porting guides available at the Open C website,
www.forum.nokia.com/main/resources/technologies/open_c
.
estlib and P.I.P.S.
estlib is an old, partially-compliant, limited implementation of POSIX APIs on Symbian OS,
which is now deprecated. Initially written to support a JVM implementation on Symbian OS,
estlib does not support threading or IPC (inter-process communication), has limited process
creation support, is relatively inefficient and makes poor use of underlying operating system
features. P.I.P.S., on the other hand, is much more complete, up-to-date and standards-compliant.
Symbian recommends that you use P.I.P.S. instead of estlib, which will eventually be retired.
Please note that estlib and P.I.P.S. are not compatible with each other. This is, by far, the
most common cause of problems when working with P.I.P.S.. Mixing estlib’s include paths or
libraries with P.I.P.S. may lead to random build or runtime errors.
P.I.P.S. Libraries
P.I.P.S. provides the following standard libraries on Symbian OS:
libc - Standard C and POSIX APIs
• stdio, including printf(), scanf() and their variants
• file IO, both buffered and raw, including fopen, open, fread, read, etc.
• stdlib APIs, including environment variable support
7