[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #35928] BSD sockets functions must set errno for POSIX
From: |
Mason |
Subject: |
[lwip-devel] [bug #35928] BSD sockets functions must set errno for POSIX-compliance |
Date: |
Wed, 21 Mar 2012 12:37:06 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Firefox/10.0.2 SeaMonkey/2.7.2 |
Follow-up Comment #2, bug #35928 (project lwip):
For the record, the only port that defines ERRNO is coldfire:
(I wonder how the unix port even works!)
$ grep -rn [^_]ERRNO contrib-1.4.0
contrib-1.4.0/ports/old/coldfire/include/arch/errno.h:39:#define ERRNO
Do you at least agree that if one defines LWIP_SOCKET, this means one
wants the BSD sockets compatibility layer, and it is very likely that
one expects the standard behavior from the BSD sockets functions?
(Which is to set errno, sorry if I seem insistent.)
As for why this code was introduced, perhaps you can ask David Haas
and Marc Boucher who wrote it 9 years ago.
http://git.savannah.gnu.org/cgit/lwip.git/commit/src/api/sockets.c?id=dd2fa15e8af974c1a624aa531eb96562878d6414
author davidhaas 2003-02-06 22:18:56 (GMT)
Perhaps it was an experimental feature at the time, and they didn't
feel confident about modifying errno? However, today the stack has
matured, and normal users (like me) expect the sockets compatibility
layer to behave in a standard way. (I wasted several hours debugging
libcurl/lwip code before finding what was wrong.)
In my private tree, I have already applied the proposed patch, but
I don't like maintaining out-of-tree patches.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?35928>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #35928] BSD sockets functions must set errno for POSIX-compliance, Mason, 2012/03/21
- [lwip-devel] [bug #35928] BSD sockets functions must set errno for POSIX-compliance, Kieran Mansley, 2012/03/21
- [lwip-devel] [bug #35928] BSD sockets functions must set errno for POSIX-compliance,
Mason <=
- [lwip-devel] [bug #35928] BSD sockets functions must set errno for POSIX-compliance, Simon Goldschmidt, 2012/03/21
- [lwip-devel] [bug #35928] BSD sockets functions must set errno for POSIX-compliance, Mason, 2012/03/21
- [lwip-devel] [bug #35928] BSD sockets functions must set errno for POSIX-compliance, Mason, 2012/03/21
- [lwip-devel] [bug #35928] BSD sockets functions must set errno for POSIX-compliance, Mason, 2012/03/21
- [lwip-devel] [bug #35928] BSD sockets functions must set errno for POSIX-compliance, Mason, 2012/03/26
- Re: [lwip-devel] [bug #35928] BSD sockets functions must set errno for POSIX-compliance, Mason, 2012/03/27
- [lwip-devel] [bug #35928] BSD sockets functions must set errno for POSIX-compliance, Simon Goldschmidt, 2012/03/27
- [lwip-devel] [bug #35928] BSD sockets functions must set errno for POSIX-compliance, Mason, 2012/03/28
- [lwip-devel] [bug #35928] BSD sockets functions must set errno for POSIX-compliance, Simon Goldschmidt, 2012/03/28
- [lwip-devel] [bug #35928] BSD sockets functions must set errno for POSIX-compliance, Mason, 2012/03/28