S60 Open C
Open C API Specification

Open C API Specification

Table of Contents

Limitations

 


Limitations

Some APIs of the standard C Library are not implemented because of the constraints or limitations of Symbian OS:

  • Open C does not support signals, because a Symbian thread cannot be made to spontaneously execute a "signal handler".
  • Because of the difference in the Symbian OS model (when compared to UNIX-like OS),fork and exec functions are not supported.
  • Since fork and exec are not supported, popen is not complete. It will just create a child process and open a pipe between a parent and a child process either in read or write mode. It neither copies the address space to a child nor copies all the open descriptors in the parent process to the child.
  • wait and waitpid behave differently from the standard.
  • int dup2(int oldfd, int newfd); The return value of dup2 can be different from the one the user expected it to be (newfd). So, the user of dup2 has to use the return value of dup2 as the new allocated fd rather than the one which is been passed to dup2 (newfd). According to the standard, newfd and return values are the same if dup2 is successful.
  • Since some Open C APIs assume that a cleanup stack is created and there is a top-level TRAP for the current thread, all the threads created using RThread::Create should create them explicitly.
  • In case of Open C, libc will have its own console object maintained and all threads console I/O will be routed to that. In case of a hybrid application, if the application also creates one more console, then switching between these consoles will be a problem. The developer will not be aware of this problem.
  • In case of an emulator, the developer can configure the window size dynamically. But the console maintained by Open C libc will remain the same. So, if the configuration is changed, data displayed on the console may not be aligned properly.
  • Even though some APIs like open, and fcntl take both 2 or 3 arguments, on Open C these APIs may not behave according to the standard when only 2 arguments are passed.
  • Since Symbian C++ does not support long double, math-related APIs that use long double might not have the desired precision.

libc

  • All threads created using RThread::Create should create a cleanup stack before calling MRT.
  • Libc has its own console object and all threads console I/O will be routed to that. In case of a hybrid application, if the application creates one more console, then switching between these consoles will be a problem.
  • Unable to create a file with write only permission (Symbian OS does not support it).
  • Unable to support creation and access time stamps for file entries.
  • Creating/deleting an entry within the file system does not alter the time stamp of the parent directory.
  • wchar works only with UTF8.
  • Character conversion is not affected by the LC_TYPE category of the current locale.

The following APIs (or functionality) are not supported by libc due to platform limitations:

int err = dup2(fd, newfd);
if (err < 0)
{
Perror(“dup2 fails.”);
Return;
}
else
    newfd = err;

libm

libpthread

  • pthread_attr_setscope supports only PTHREAD_SCOPE_SYSTEM.
  • pthread_attr_setschedpolicy supports only SCHED_RR.
  • pthread_join: Only one thread can join one specific target thread.
  • pthread_setschedparam supports only SCHED_RR policy.
  • sem_init: Semaphore can be used only within the process. Semaphore across the processes is not supported.

libz

  • Requires huge heap memory (> 100kB) to provide compression and decompression

libdl

  • Cannot support address lookup using names.
  • The limitation is due to the current behavior of the RLibrary API within Symbian

libcrypto

  • Unsupported algorithms due to IPR issues such as Rc5, IDEA, Blowfish, cast, ripemd, md4, mdc2, ecc, ecdh, ecdsa.
  • Certificates should be in .der format Usage of Symbian’s certstore to avoid duplication of certificates.

Click here to view the alphabetical index of non-implemented functions.

Give feedback of this article


©Nokia 2007

Back to top


This material, including documentation and any related computer programs, is protected by copyright controlled by Nokia. All rights are reserved. Copying, including reproducing, storing, adapting or translating, any or all of this material requires the prior written consent of Nokia. This material also contains confidential information, which may not be disclosed to others without the prior written consent of Nokia.

Nokia is a registered trademark of Nokia Corporation. S60 and logo is a trademark of Nokia Corporation. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. Other company and product names mentioned herein may be trademarks or tradenames of their respective owners.