From carlgay at gmail.com Wed Jul 2 12:04:48 2008 From: carlgay at gmail.com (Carl Gay) Date: Wed, 2 Jul 2008 06:04:48 -0400 Subject: [hackers] socket error patch Message-ID: Could someone look over the attached patch before I commit it? It just tries to give a better error than "socket error 13". Ultimately I think we want to create real high-level conditions for this sort of thing, but I figure this is a good start for now. In particular, did I get the C types right in linux-portability.dylan? Thanks. -Carl ps. I don't have access to BSD, so can someone volunteer to implement unix-strerror there? Should be simple. pps. I forgot to add unix-strerror to win32-portability.dylan (as odd as that sounds) so I'll do that now but you won't see it in the patch. -------------- next part -------------- A non-text attachment was scrubbed... Name: socket-error.patch Type: text/x-patch Size: 3842 bytes Desc: not available Url : http://www.opendylan.org/pipermail/hackers/attachments/20080702/c62ed59f/attachment.bin From andreas at andreas.org Wed Jul 2 13:18:15 2008 From: andreas at andreas.org (Andreas Bogk) Date: Wed, 02 Jul 2008 13:18:15 +0200 Subject: [hackers] socket error patch In-Reply-To: References: Message-ID: <486B63F7.5050900@andreas.org> Carl Gay schrieb: > Could someone look over the attached patch before I commit it? It The thing that's jumping to my attention is that strerror() is not thread-safe. You should use strerror_r() instead, which is reentrant. Andreas