|
| From: | Paolo Bonzini |
| Subject: | Re: [Qemu-devel] [PATCH v4 08/47] socket shutdown |
| Date: | Sat, 04 Oct 2014 20:09:28 +0200 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 |
Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto:
> +#ifndef WIN32
> + if (rd) {
> + how = SHUT_RD;
> + }
> +
> + if (wr) {
> + how = rd ? SHUT_RDWR : SHUT_WR;
> + }
> +
> +#else
> + /* Untested */
> + if (rd) {
> + how = SD_RECEIVE;
> + }
> +
> + if (wr) {
> + how = rd ? SD_BOTH : SD_SEND;
> + }
> +
> +#endif
> +
These are the same on Windows and non-Windows actually. Just #define
SHUT_* to 0/1/2 and avoid the wrapper.
Paolo
| [Prev in Thread] | Current Thread | [Next in Thread] |