Open ycsin opened 9 months ago
Is this not already in the minimal libc??
Hej @ycsin, @cfriedt, If this issue is not worked, I would like to take this. It would be helpful if you can guide and share some reference about this issue.
I would like to take this. It would be helpful if you can guide and share some reference about this issue.
Hi @00thirdeye00 - getc(FILE *stream)
shouldn't be too difficult.
From a very high level, it should be as simple as
stream
(and verify that it is valid)EOF
if there is an error.Do we still have zvfs_read()
or was that reverted? With that, it would be trivial to implement.
@cfriedt hej, thank you, since i am new to zephyr, it can be helpful if you can provide any references to files, implementation and flow
@00thirdeye00 -
lib/os/fdtable.c <-- ftdable and some ZVFS functions lib/c_lib/common/ <-- common libc components
This was originally added as a ticket under POSIX, but
getc()
is not a POSIX function. It is from C89.https://en.cppreference.com/w/c/io/getc
The expectation from the POSIX API is that this function is implemented as part of whatever C library is in use.