Jonimoose/libfxcg — pull request #34 by ComputerNerd (2014-11-27 01:08:29+00:00)
Title: Added headers, more functions, stubs and math library also minor improvements to existing functions.

This pull request was motivated primarily by the desire to compile mupdf for the casio prizm. I was successful but it runs out of heap.
This time I did make sure that any third party code came from BSD or compatible licensed code/headers.
So here is what this pull request improves upon
* Headers primarily from freebsd allow for many programs to compile that are just including it for a #define or whatnot. Even if the function is not implemented that is ok, the user will just a linker error which still puts us ahead of where we were before which the program will not even compile due to a lack of said header.
* A math library. This is based on fdlibm and pulled from newlib. Yes newlib does contain some gpl code but not this, the code is under the same license as fdlibm which is even more permissive than the 3 clause BSD license as that is what such code is derived from. Some code in the libm folder is also licensed with the 3 clause BSD license. That shows that the licenses must be compatible if such is a concern.
* Some minor improvements to some existed functions mainly a bugfix in sprintf where the string is not null terminated. Support (that is not enabled by default) for showing stderr using the same macro used in exit. Also if DEBUG is defined when compiling libc malloc will display an error message on screen and loop using GetKey and display how much memory is allocated using printf.
* More standard C functions and some stubs for some posix functions.