Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Removed all the posix library support, it only existed during development for testing. This is an ANSI C library only,
- POSIX support will be a future prospect.
- Cleaned up a lot of portability issues with headers supporting various configurations,
- instead ccaprice offers architecture and operating system specific headers inclusion via the build system. In addition to
- header portability fixes various code was refactored as well.
- The system call interface has been redesigned from the ground up
- to make porting less error prone. It's encapsulated so it only needs to be modified in one single
- centeralized spot (makes porting a sinch).
- The following functions/types were implemented:
- atol, atoll, labs, llabs, abs, div, ldiv, lldiv,
- div_t, ldiv_t, lldiv_t, sig_atomic_t, vfprintf, fprintf,
- stderr, fseek, putchar, rename, rewind, sin(i386), sinf(i386),
- cos(i386), cosf(i386), cosl(i386), ftell, fgetc, clearerr, fgetpos,
- fread, wcschr, wcsrchr, wcslen, wcscpy,
- As well as some compiler-runtime for i386:
- __ashldi3, __ashrdi3, __divdi3
- As well as some compiler-runtime for ARM:
- __aeabi_d2iz, __aeabi_dmul, __aeabi_fdiv,
- __aeabi_fmul, __aeabi_uidiv, __aeabi_uidivmod
- As well as some compiler-runtime for x86_64
- __floatundidf, __floatundisf, __floatundixf
- The following functions were rewrote to be standard conformant/faster/better/smaller
- atoi(conformant), acos(i386, faster), assert(conformant), rand(fixed allignment issues on i386),
- abort(conformant), longjmp(arm, faster), setjmp(arm, faster)
- Removed unrequired include in some files by providing external function definitions in-place instead.
- This greatly improved the compilation speed of the library.
- Implemented perliminary support for ARMv6 (linux only).
- The runtime now has support for static constructors and destructors via .init and .fini sections
- as specified in the ELF ABI.
- Added more tests to the testsuite and fixed some various bugs with floating point constants in the test
- suite. The test suite also padds output to look nicer by accepting some input about terminal column width.
- Testsuite is agnostic (meaning it will compile with any libc now).
- Makefile now checks for various applications required during build and will error if said application is missing,
- also cleaned up the Makefile to be easier on the eyes. Added some new targets like install/uninstall/nuke and
- compare (used to compare ccaprice library size against the system library) As well as config, a neat command-line
- utility for building applications linked against ccaprice; works much like pkg-config or *-config. e.g of use:
- gcc foo.c `ccaprice-config --cflags --libs` -o foo
- ccaprice core-runtime is now threadsafe, thanks to the help of fast user-space mutexs (futex) and atomic operations
- (works on linux x86_64 and i386 (no offical ARM support yet)). In addition to the core-runtime various other library
- functions were made threadsafe such as (some may not be threadsafe directly, i.e putchar calls fputc, fputc is threadsafe
- thus so is putchar):
- malloc, calloc, realloc, free
- clearerr, fclose, fflush, fgetc,
- fopen, fputc, fputs, fread, fseek,
- ftell, fwrite, putchar, rewind
- Rewrote entire <stdio.h> mostly standard conformant now. Various things have been improved and made faster as a result
- a supreme rewrite.
- Made all headers C++ safe by respecting C++ external linkage and namespaces and some conflict fixing in respect to
- illegal identifiers (illegal in C++ and C)
- Of course the big one, SUPPORT for WIN32! Via kernel32.dll base address finding, linking, patching and
- various other hackery. Via emulated system calls.
- Also implemented a smart batch-script named Makefile.bat for windows which will obtain a suitable build-enviroment from
- the internet (only once) to build and compile ccaprice for windows (since visual studio isn't supported). It embeds a rather
- smart visual basic script to perform most of the work.
- Also implemented version stamping in ccaprice which will be used for future backwards compatability. Once ccaprice becomes
- standard conformant, and feature compleat. In the meantime it's used for sugar.
- Redesigned <signal.h> (now conformant (as far as I know)): was redesigned after the win32 port since signal handling in windows
- requires the help of SEH and some other things which was too hard to implement based on how raise/signal were implemented.
- Ccaprice now implements both win32 and posix versions of signal.h in a rather portable manner which should simplify porting for other
- OS's in the future.
- Various assembly was made more portable for different toolchains that specify additional underscores as prefixes in functions reserved
- for the implementation. This made C/assembly interfacing hard so a generic assembly macro was made to combat this. Lots of assembler
- files were changed to take advantage of this helper macro.
Add Comment
Please, Sign In to add comment