cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re: Re: SIGPIPE

From: Giuseppe Attardi <attardi_at_di.unipi.it>
Date: Thu, 4 Dec 2003 12:31:17 +0100

Actually, since bits/socket.h uses a non standard feature
of the gnu preprocessor, for handling recursive macros and defines:

enum
  {
    ...
    MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */
#define MSG_NOSIGNAL MSG_NOSIGNAL
    ... };

a working solution is to add to setup.h:

#else /* !WIN32 */

#include <sys/socket.h>

#ifdef MSG_NOSIGNAL
#define HAVE_MSG_NOSIGNAL
#else
#define MSG_NOSIGNAL 0
#endif

#ifdef __BEOS__
...

and then in transfer.c use:

#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(HAVE_MSG_NOSIGNAL)

-- Beppe

-------------------------------------------------------
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
Received on 2003-12-04