This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/14988] Add ntohd(), ntohf(), ntohll(), htond(), htonf(), htonll() for sending/receiving IEEE 754-formatted floats/doubles/long-longs
- From: "majic.one at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 07 Mar 2013 04:52:25 +0000
- Subject: [Bug network/14988] Add ntohd(), ntohf(), ntohll(), htond(), htonf(), htonll() for sending/receiving IEEE 754-formatted floats/doubles/long-longs
- Auto-submitted: auto-generated
- References: <bug-14988-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=14988
--- Comment #2 from Majic <majic.one at gmail dot com> 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.