Page 1 of 1
No pathconf implementation
Posted: Mon Apr 13, 2009 10:18 am
by pelago
Although devkitpro/devkitPPC/powerpc-gekko/include/sys/unistd.h has function prototypes for pathconf and fpathconf, I don't think any implementation is included. This means that porting code which uses pathconf will compile but not link. Looking at nm libc.a|grep pathconf I see no results.
Am I missing something?
Re: No pathconf implementation
Posted: Mon Apr 13, 2009 11:01 pm
by pelago
Some further research shows that the only implementations of pathconf.c in newlib are in the sys/linux folder, i.e. are linux-specific, so presumably don't apply to GC/Wii so weren't ported to devkitPPC.
Looking at the code I'm trying to port, it only tries to call pathconf if _PC_LINK_MAX is defined. For the time being, I have remove all the defines for _PC_ macros in unistd.h, as well as the prototypes for pathconf and fpathconf, and that at least allows the code I'm trying to port to compile. Maybe newlib 1.17.0 also does this.