pspdev / newlib

A fork of newlib for the PSP.
GNU General Public License v2.0
8 stars 5 forks source link

Missing snprintf and vsnprintf #2

Closed glebm closed 2 years ago

glebm commented 3 years ago

Needed for DevilutionX (Diablo 1)

/cc @AJenbo @sajattack

glebm commented 3 years ago

Strange, I see it here in the 3.3.0 branch https://github.com/pspdev/newlib/blob/7b50ff4d76f58e26fb33f6a4ea5f3a067ffe95be/newlib/libc/sys/psp/xprintf.c#L705

glebm commented 3 years ago

And also in the 1.20 branch:

https://github.com/pspdev/newlib/blob/6dc26bb7f8bdc7dff72a811104e1d654d77f75d9/newlib/libc/sys/psp/xprintf.c#L705

sajattack commented 3 years ago

truncate is here too, not sure what these #ifdefs are about https://github.com/pspdev/newlib/blob/7b50ff4d76f58e26fb33f6a4ea5f3a067ffe95be/newlib/libc/sys/psp/libcglue.c#L697

sajattack commented 3 years ago

Did a quick check with ghidra and my libc.a contained these *printfs, not sure why the linker wasn't finding them.

frabert commented 3 years ago

Has anybody had any luck in solving this one? I too am having issues compiling stuff that uses pspDebugScreenPrintf because it references vsnprintf, even though I can definitely see it if I psp-readelf -s /usr/local/pspdev/psp/lib/libc.a | grep 'vsnprintf'

sajattack commented 3 years ago

Apparently @fjtrujy is on the case.

fjtrujy commented 2 years ago

Yes, it has been implemented, in the latest version 4.1.0, closing issue