RE: [PATCH 1/1] fport_print: handle ttyname ENODEV

Maxime Devos <[email protected]>
Newsgroups gmane.lisp.guile.devel
Message-ID <[email protected]>
>I suppose something like this might serve as a generalization: […]

I’ve seen do { body; } while (0) in some places (albeit not in SCM_SYSCALL), which you might want investigate and maybe copy (instead of the { body; }), but I don’t know what the purpose of that construct is.

Otherwise (with the errno=… change mentioned in your other e-mail), it seems good to me.

>  [...], Then we'd have:
>    SCM_LOCKED_SYSCALL(&scm_i_misc_mutex, global_name = ttyname (fd));

Even if that were the only use of SCM_LOCKED_SYSCALL, it seems clearer that way (and less asymmetry).

I don’t think it can be shortened: it’s for Guile (so a SCM_ prefix for namespacing), it’s for syscalls (so _SYSCALL suffix), and it’s a variant for locking/unlocking (so LOCKED in the middle). Nothing to remove there, I’d think.

Best Regards,
Maxime Devos
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.