Guest User

Untitled

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