poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/5] Improve portability (particularly for Woe32)


From: Jose E. Marchesi
Subject: Re: [PATCH 2/5] Improve portability (particularly for Woe32)
Date: Fri, 26 Mar 2021 12:43:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Friday, March 26, 2021 11:53 AM, Jose E. Marchesi <jemarch@gnu.org> wrote:
>
>>
>>
>> Hi Georgiy.
>>
>> Thanks for the patch. See some comments below.
>>
>> > diff --git a/configure.ac b/configure.ac
>> > index e40b3a4e..7ca26abb 100644
>> > --- a/configure.ac
>> > +++ b/configure.ac
>> > @@ -98,11 +98,20 @@ dnl emitted in case no proper AWK is present.
>> > AX_CHECK_AWK_GENSUB([RAS_AWK=$AWK], [RAS_AWK=:])
>> > AC_SUBST([RAS_AWK])
>> > +dnl REPL
>>
>> I would explain a bit better why we are checking for siglongjmp.
>> Something in the line "The poke REPL uses siglongjmp in order to handle
>> Ctrl-C and other events that result on signals in most platforms.".
>
> Sure.
>
>> > -
>> >
>> > +AC_CHECK_FUNCS([siglongjmp], break)
>> > +
>>
>> I don't think the `break' there is necessary?
>
> I may have misread the AC_CHECK_FUNCS docs; there was something about
> "use break if you don't want to continue checking" there.

Yes but I think that is only relevant if you specify more than one
function to check in AC_CHECK_FUNCS.

>
>> > diff --git a/poke/pk-hserver.c b/poke/pk-hserver.c
>> > index 873020f1..c1fca81f 100644
>> > --- a/poke/pk-hserver.c
>> > +++ b/poke/pk-hserver.c
>> > @@ -27,6 +27,7 @@
>> > #include <sys/time.h>
>> > #include <sys/types.h>
>> > #include <sys/socket.h>
>> > +#include <sys/select.h>
>> > #include <netinet/in.h>
>> > #include <arpa/inet.h>
>> > #include <netdb.h>
>> > diff --git a/poke/pk-mi.c b/poke/pk-mi.c
>> > index 64670f5c..81188d97 100644
>> > --- a/poke/pk-mi.c
>> > +++ b/poke/pk-mi.c
>> > @@ -26,6 +26,7 @@
>> > #include <assert.h>
>> > #include <fcntl.h>
>> > #include <errno.h>
>> > +#include <sys/select.h>
>> > #include "poke.h"
>> > @@ -167,6 +168,7 @@ pk_mi_send_frame_msg (const char payload)
>> > / Set fd to non-blocking and return old flags or -1 on
>> > error. */static int pk_mi_fd_set_nonblocking (int fd)
>> > {
>> > +#if defined HAVE_FCNTL
>> > int flags = fcntl (fd, F_GETFL, 0);
>> > if (flags >= 0 && (flags & O_NONBLOCK) == 0)
>> > @@ -179,16 +181,21 @@ static int pk_mi_fd_set_nonblocking (int fd)
>> > perror ("fcntl");
>> > return flags;
>> > +#else
>> >
>> > -   return 0;
>> >     +#endif
>> >     }
>> >
>>
>> There is a fcntl module in gnulib that seems to provide a sort of an
>> implementation for mingw. Maybe it is enough for us in windows?
>
> Unfortunately not. The module fixes many things, but not the ones we need.
>
> See https://www.gnu.org/software/gnulib/manual/html_node/fcntl.html

Oh well.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]