Summary: MSG_NOSIGNAL is not portable
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Thursday 26/11/09 at 00:00
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None
         Planned Release: None



dmarks mentioned running into "`MSG_NOSIGNAL' undeclared" errors on trunk/S_2
on freeciv-dev.

Looks like MSG_NOSIGNAL is a Linux thing, and isn't portable to (e.g.) Mac OS
X and various BSDs (see e.g. here
<http://daniel.haxx.se/projects/portability/>, here
<http://www.wlug.org.nz/MSG_NOSIGNAL>, here

I think this came in in the fix for bug #14607 on trunk/S2_2. In this case,
there doesn't seem to be any need to suppress SIGPIPE in fc_writesocket(), as
fc_init_network() already sets up to ignore SIGPIPE. So, I think it's OK to
just revert to write().

Attached a trivial patch against S2_2 which does that. However, I don't know
how exactly to reproduce the problem of bug #14607, so I can't say I've
thoroughly tested it.

If I'm wrong about my fix, the links above suggest how to do this on
different systems, so we'll probably need some horrid autoconf stuff.


File Attachments:

Date: Thursday 26/11/09 at 00:00  Name: msg_nosignal.diff  Size: 339B   By:
Avoid non-portable MSG_NOSIGNAL [S2_2]


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to