From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29190 invoked by alias); 7 Mar 2013 04:52:49 -0000 Received: (qmail 29155 invoked by uid 48); 7 Mar 2013 04:52:29 -0000 From: "majic.one at gmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug network/14988] Add ntohd(), ntohf(), ntohll(), htond(), htonf(), htonll() for sending/receiving IEEE 754-formatted floats/doubles/long-longs Date: Thu, 07 Mar 2013 04:52:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: network X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: majic.one at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: 2.19 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2013-03/txt/msg00030.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14988 --- Comment #2 from Majic 2013-03-07 04:52:25 UTC --- (In reply to comment #1) > Are these functions purely Microsoft-isms, or are they available on actual > implementations of the BSD sockets API? > > (I'm asking because we're not goint to add CreateFile etc., either. 8-) As far as I am aware, these are only found on Windows (8) atm. :> I have not seen them anywhere else. I would also not be interested in a CreateFile(), but I do feel like Microsoft has met a need here. Using snprintf() with its %a conversion specifier to go from a double to a hex string and then later converting it back is unnecessarily costly.. I hope this is not too presumptuous to say, but glibc (being a major player) could add these and encourage their acceptance into POSIX. Microsoft didn't exactly do anything strange extending beyond htons() with these. I know the focus of glibc isn't to set standards but to adhere to them. I just feel like in 2013 there should be at least a glibc-standard way of sending network floats (and receiving them). Again, I hope I'm not expecting too much :> -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.