| |||||||||||||||
Chapter 13 Preparing Code for Use with Reactis for CAlthough Reactis for C supports a very large subset of C language features and standard runtime library functions, not every C program can be immediately used with Reactis for C. Before using Reactis for C on a C program or program fragment, you must first ensure that the portion of the program to be used with Reactis for C does not depend on any unsupported features. The following is a quick summary of the requirements for using Reactis for C:
13.1 Basic type sizes and alignmentsThe sizes and alignments of the common built-in C types under Reactis for C are listed in Table 13.1. These match the behavior of GCC (GNU C Compiler) and most other x86 C compilers. Integers are stored using a little endian byte order (the least-significant byte is stored first).
13.2 Unsupported C FeaturesReactis for C supports a very large subset of the C99 standard. The following features, however, are not currently supported:
13.3 Supported C library functionsThe following C library functions are currently provided by Reactis for C. assert.h assert ctype.h isalnum isalpha isascii iscntrl iscsym iscsymf isdigit isxdigit isprint isgraph ispunct islower isupper isspace isblank toint tolower toupper errno.h strerror fcntl.h fileno fenv.h fegetround fesetround math.h acos acosf acosl asin asinf asinl atan atan2 atan2f atan2l atanf atanl cbrt cbrtf cbrtl ceil ceilf ceill copysign copysignf copysignl cos cosf cosh coshf coshl cosl exp exp2 exp2f exp2l expf expl fabs fabsf fabsl fdim fdimf fdiml floor floorf floorl fmax fmaxf fmaxl fmin fminf fminl fmod fmodf fmodl fpclassify frexp frexpf frexpl isfinite isgreater isgreaterequal isinf isless islessequal islessgreater isnan isnormal isunordered ldexp ldexpf ldexpl llrint llrintf llrintl ln lnf lnl log log2 log2f log2l log10 log10f log10l logf logl lrint lrintf lrintl lround lroundf lroundl modf modff modfl nan nanf nanl nextafter nextafterf nextafterl nexttoward nexttowardf nexttowardl pow powf powl remainder remainderf remainderl remquo remquof remquol round roundf roundl scalbln scalblnf scalblnl scalbn scalbnf scalbnl signbit sin sinf sinh sinhf sinhl sinl sqrt sqrtf sqrtl tan tanf tanh tanhf tanhl tanl trunc truncf truncl memory.h bcopy memccpy setjmp.h longjmp setjmp stdarg.h va_arg va_copy va_end va_start stddef.h offsetof stdint.h INT8_C INT16_C INT32_C INT64_C INTMAX_C UINT8_C UINT16_C UINT32_C UINT64_C UINTMAX_C stdio.h snprintf sprintf stdlib.h _Exit abort abs atof atoi atol atoll bsearch calloc div exit free getenv labs ldiv llabs lldiv malloc mblen mbstowcs mbtowc qsotr rand realloc srand strtod strtof strtol strtold strtoll strtoul strtoull wcstombs string.h memchr memcmp memcpy memmove memset strcat strchr strcmp strcoll strcpy strcspn strdup strlen strncat strncmp strncpy strndup strpbrk strrchr strspn strstr strtok strxfrm tgmath.h acos asin atan atan2 cbrt ceil copysign cos cosh erf erfc exp exp2 expm1 fabs fdim floor fma fmax fmin fmod frexp hypot ilogb ldexp lgamma ln log log1p log2 lrint lround modf nearbyint nextafter nexttoward pow remainder remquo rint round scalbn scalbnln sin sinh sqrt tan tanh tgamma trunc 13.4 Unsupported Library FunctionsThe following C runtime library functions are not supported: complex.h cabs cabsf cabsl cacos cacosf cacosh cacoshf cacoshl cacosl carg cargf cargl casin casinf casinh casinhf casinhl casinl catan catanf catanh catanhf catanhl catanl ccos ccosf ccosh ccoshf ccoshl ccosl cexp cexpf cexpl cimag cimagf cimagl clog clogf clogl conj conjf conjl cpow cpowf cpowl cproj cprojf cprojl creal crealf creall csin csinf csinh csinhf csinhl csinl csqrt csqrtf csqrtl ctan ctanf ctanh ctanhf ctanhl ctanl dlfcn.h dlclose dlerror dlopen dlsym errno.h perror fcntl.h creat fcntl open close read write lseek unlink locale.h localeconv setlocale math.h acosh acoshf acoshl asinh asinhf asinhl atanh atanhf atanhl erf erfc erfcf erfcl erff erfl expm1 expm1f expm1l fma fmal fmaf hypot hypotf hypotl ilogb ilogbf ilogbl lgamma lgammaf lgammal log1p log1pf log1pl rint rintf rintl tgamma tgammaf tgammal setjmp.h sigsetjmp siglongjmp signal.h raise stdio.h clearerr fclose feof ferror fflush fgetc fgetpos fgets fopen fprintf fputc fputs fread freopen fscanf fseek fsetpos ftell fwrite getc getchar gets printf putc putchar puts remove rename rewind scanf setbuf setvbuf tmpfile tmpname ungetc vfscanf vscanf vsscanf stdlib.h atexit bsearch execl execle execlp execv execve execvp qsort system tgmath.h carg cimag creal conj cproj unistd.h access alarm brk chdir chown chroot close confstr crypt ctermid cuserid dup dup2 encrypt fchdir fchown fdatasync fork fpathconf fsync ftruncate getcwd getdtablesize getegid geteuid getgid getgroups gethostid getlogin getlogin_r getpagesize getpass getpgid getpgrp getpid getppid getsid getuid getwd isatty lchown link lockf lseek nice pathconf pause pipe pread pthread_atfork pwrite read readlink rmdir sbrk setgid setpgid setpgrp setregid setreuid setsid setuid sleep swab symlink sync sysconf tcgetpgrp tcsetpgrp truncate ttyname ttyname_r ualarm unlink usleep vfork write utime.h utime wchar.h fgetwc fgetws fputwc fputws fwide fwprintf fwscanf getwc getwchar putwc putwchar swprintf swscanf ungetwc vfwprintf vfwscanf vswprintf vswscanf vwprintf vwscanf wcscat wcschr wcscmp wcscoll wcscpy wcscspn wcslen wcsncat wcsncmp wcsncpy wcspbrk wcsrchr wcsspn wcsstr wcstok wcsxfrm wmemchr wmemcmp wmemcpy wmemmove wmemset wprintf wscanf wctype.h btowc iswalnum iswalpha iswcntrl iswctype iswdigit iswgraph iswlower iswprint iswpunct iswspace iswupper iswxdigit mbrlen mbrtowc mbsinit towctrans towlower towupper wcrtomb wctob wctrans wctype time.h asctime clock ctime difftime gmtime localtime mktime time strftime | |||||||||||||||