Open niklauslee opened 7 years ago
@niklauslee We currently don't have plan to use tty.c
in iotjs for now. So we commented out tty.c
in option_unix_common.cmake.
Ok. I'll try to port myself.
One more question. I noticed that buffer size is allocated 64K in NuttX when reading from TTY and I found the related code in stream.c
as follow:
#if defined(__NUTTX__) || defined(__TIZENRT__)
stream->alloc_cb((uv_handle_t*)stream, 64 * 1024, &buf);
#else
stream->alloc_cb((uv_handle_t*)stream, 2 * 1024, &buf);
#endif
It try to alloc 64K for NuttX and 2K for other platforms. I think that it's reversed. Or, do you have any other intensions for this?
@niklauslee yes, it looks like those lines should be swapped.
Hello,
I'm developing JavaScript REPL with Jerryscript and libtuv on NuttX platform. However, It seems that TTY functions are not ported in libtuv.
I've tried to include the
tty.c
source file when building, but it fails to link to symbols:ttyname_r
,cfmakeraw
, anduv__dup2_cloexec
. (ttyname_r
andcfmakeraw
are not found in any source files in NuttX)Do you have any plans to support TTY?
Thanks.