This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Improved error reporting in GNAT.Sockets


This change brings in two improvements to the error reporting circuitry in
GNAT.Sockets. A new literal Broken_Type has been added to enumeration type
Socket_Error_Type, corresponding to errno value EPIPE. Specific handling
has also been implemented for EAGAIN. On most platforms, this is the same
value as EWOULDBLOCK, which is mapped to Resource_Temporarily_Unavailable.
Uniform treatment is now provided also on platforms where EAGAIN and
EWOULDBLOCK are distinct values, and both are now resolved to
Resource_Temporarily_Unavailable.

No test (requires failing sockets operations).

Tested on x86_64-pc-linux-gnu, committed on trunk

2009-04-20  Thomas Quinot  <quinot@adacore.com>

	* s-oscons-tmplt.c, g-socket.adb, g-socket.ads
	(GNAT.Sockets.Resolve_Error): Add case of EPIPE
	Add case of EAGAIN for platforms where it is not equal to EWOULDBLOCK

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]