From owner-freebsd-hackers Fri Apr 9 4:30:33 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from snowcrash.cymru.net (snowcrash.cymru.net [163.164.160.3]) by hub.freebsd.org (Postfix) with ESMTP id 5F02E14E61 for ; Fri, 9 Apr 1999 04:30:14 -0700 (PDT) (envelope-from alan@lxorguk.ukuu.org.uk) Received: from the-village.bc.nu (lightning.swansea.uk.linux.org [194.168.151.1]) by snowcrash.cymru.net (8.8.7/8.7.1) with SMTP id MAA19447; Fri, 9 Apr 1999 12:28:04 +0100 Received: by the-village.bc.nu (Smail3.1.29.1 #2) id m10VaHk-0007TvC; Fri, 9 Apr 99 13:21 BST Message-Id: From: alan@lxorguk.ukuu.org.uk (Alan Cox) Subject: Re: linux recvfrom differencies To: fygrave@tigerteam.net (CyberPsychotic) Date: Fri, 9 Apr 1999 13:21:24 +0100 (BST) Cc: linux-c-programming@tower.itis.com, linux-kernel@vger.rutgers.edu, freebsd-hackers@freebsd.org In-Reply-To: from "CyberPsychotic" at Apr 9, 99 09:22:14 am Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > back) linux returns -1 for next recvfrom with herrno(?) set to REFUSED, > while BSD/Solaris just ignore this. > > The question is: > is there any paper/RFC/FYI which puts a standard on such things, or this is > basically `the matter of taste' of OS developers, and thus just should being > watched carefully, while developing multi-platform applications? RFC1122 requires that icmp errors get back to the application. POSIX 1003.1g was written by people who didn't read the RFC. Now that 1003.1g is basically completed we finally have scope for a spec that means something. Linux quite intentionally has #ifdef SO_BSDCOMPAT int one=1; setsockopt(socket_fd, SOL_SOCKET, SO_BSDCOMPAT, &one, sizeof(one)); #endif so you can force the relevant BSDisms. Unfortunately despite repeated requests to the glibc team it appears this is _still_ not being set by glibc when you compile with -D__BSD_SOURCE. Alan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message