unistd.h readlink prototype
Posted: Sun Apr 12, 2009 11:37 pm
I think the function prototype for readlink in unistd.h (specifically, devkitpro/devkitPPC/powerpc-gekko/include/sys/unistd.h) is out-of-date. It is currently:
but I think it should be:
I found this when trying to compile libiconv (http://www.gnu.org/software/libiconv/) which contains a wrapper around unistd.h which has size_t instead of int, and so compilation causes an "error: conflicting types for 'readlink'".
Changing either the source of libiconv or changing devkitpro/devkitPPC/powerpc-gekko/include/sys/unistd.h to match the other will work, but googling around it seems that size_t is more correct so the devkitPPC code is the one that should be changed.
Am I right in thinking this? I can post it as an issue on the sourceforge site if so.
Code: Select all
int _EXFUN(readlink, (const char *__path, char *__buf, int __buflen));
Code: Select all
int _EXFUN(readlink, (const char *__path, char *__buf, size_t __buflen));
Changing either the source of libiconv or changing devkitpro/devkitPPC/powerpc-gekko/include/sys/unistd.h to match the other will work, but googling around it seems that size_t is more correct so the devkitPPC code is the one that should be changed.
Am I right in thinking this? I can post it as an issue on the sourceforge site if so.