curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: make test: SHUT_RDWR, SHUT_RD, SHUT_WR not defined

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 20 Apr 2021 09:24:58 +0200 (CEST)

On Mon, 19 Apr 2021, Kevin R. Bulgrien via curl-library wrote:

> -#ifdef USE_WINSOCK
> +#if defined(USE_WINSOCK) || \
> + !defined(SHUT_RD) && (defined(HAVE_SOCKET_H) || defined(HAVE_SYS_SOCKET_H))
> # define SHUT_RD 0x00
> # define SHUT_WR 0x01
> # define SHUT_RDWR 0x02

Isn't it better to just do #ifndef for each define? Like this:

   https://github.com/curl/curl/pull/6925

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2021-04-20