URL:
<http://gna.org/bugs/?14840>
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
Release:
Discussion Lock: Any
Operating System: None
Planned Release: None
_______________________________________________________
Details:
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
<http://lists.apple.com/archives/macnetworkprog/2002/Dec/msg00091.html>).
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:
jtn
Avoid non-portable MSG_NOSIGNAL [S2_2]
<http://gna.org/bugs/download.php?file_id=7378>
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?14840>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev