discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Win32 and gr-blocks/lib/stream_pdu_base.cc


From: Gisle Vanem
Subject: Re: [Discuss-gnuradio] Win32 and gr-blocks/lib/stream_pdu_base.cc
Date: Tue, 01 Sep 2015 14:31:20 +0200
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1

Josh Blum wrote:

On 10/05/2014 04:25 AM, Gisle Vanem wrote:
Since my previous message seems to be ignored, here is something simpler
for you to comment on.

In gr-blocks/lib/stream_pdu_base.cc, the read() and write() functions
are used on sockets. This doesn't work well on Windows as you're
probably aware. A simple fix is to has something like this at the top of
this file:

#ifdef WIN32
  #undef read
  #undef write
  #define read(sk,buf,len) ::recv (sk, (char*)(buf), len, 0)
  #define write(sk,buf,len) ::send (sk, (const char*)(buf), len, 0)
#endif

...

Ideally we could switch the code to call send/recv, and the tuntap would
continue working -- this needs testing.

Your patch is pretty good too, because it doesnt interfere with existing
functionality, and the tuntap is ifdefed out on windows.

Just a note on this (my almost 1 year old email). Seems there are no Windows
users of GnuRadio that needs to play with sockets.

I did a "git pull" just now and saw to my dismay that this issue (with using
read() + write() on sockets) is still present. According to github, the last
change of this (relevant to Winsock) file was on 5 March 2013!


--gv




reply via email to

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