Retro68
Retro68 copied to clipboard
Functions declared, but symbols missing
A lot of functions are declared in the header, but are actually missing, causing linking to fail, while compilation succeeds. Examples are gettimeofday(), sleep(), usleep() and fcntl(), to name just a few I found.
Since these are part of POSIX and not C99, it's perfectly fine to not have these - but they really shouldn't be declared in the headers then.
Well, it doesn't pay to modify the newlib-provided header files to provide only the exact subset of system calls currently provided by libretro.
The implementation of unix system calls is quite minimal at the moment. It's enough to allocate memory, and to do console output. File IO is not yet supported.
Contributions welcome.
There are also some decisions to be made; how much should be supported, and how much should be left optional to keep binary sizes down? (After all, it's bad enough that using iostreams pulls in all of listdc++'s locale support and fills half a floppy disk with unneeded code.)
Another idea would be to port/integrate GUSI: http://sourceforge.net/projects/gusi/
I agree that there's no real need to expose them, as they're only POSIX. I can see the argument of not wanting to introduce any diffs in newlib to make updating from upstream easier, as apparently, there's nothing to define to tell newlib what's not available. However, might this be something worth raising upstream for newlib? I know newlib is used for a lot of embedded stuff, including stuff that most certainly doesn't even have a real time clock or a file system ;).