libc: rename _zephyr_fputc to zephyr_fputc

For some reason we missed _zephyr_fputc in commit
4344e27c26.  Rename _zephyr_fputc to just
zephyr_fputc and fixup associated code to build.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2019-03-12 12:43:25 -05:00 committed by Kumar Gala
commit 276f766317
2 changed files with 5 additions and 5 deletions

View file

@ -30,7 +30,7 @@ __syscall int z_zephyr_write_stdout(const void *buf, int nbytes);
#else
/* Minimal libc */
__syscall int _zephyr_fputc(int c, FILE *stream);
__syscall int zephyr_fputc(int c, FILE * stream);
__syscall size_t zephyr_fwrite(const void *_MLIBC_RESTRICT ptr, size_t size,
size_t nitems, FILE *_MLIBC_RESTRICT stream);

View file

@ -25,21 +25,21 @@ void __stdout_hook_install(int (*hook)(int))
_stdout_hook = hook;
}
int z_impl__zephyr_fputc(int c, FILE *stream)
int z_impl_zephyr_fputc(int c, FILE *stream)
{
return (stdout == stream) ? _stdout_hook(c) : EOF;
}
#ifdef CONFIG_USERSPACE
Z_SYSCALL_HANDLER(_zephyr_fputc, c, stream)
Z_SYSCALL_HANDLER(zephyr_fputc, c, stream)
{
return z_impl__zephyr_fputc(c, (FILE *)stream);
return z_impl_zephyr_fputc(c, (FILE *)stream);
}
#endif
int fputc(int c, FILE *stream)
{
return _zephyr_fputc(c, stream);
return zephyr_fputc(c, stream);
}
int fputs(const char *_MLIBC_RESTRICT string, FILE *_MLIBC_RESTRICT stream)