want suite of endian(3C) functions
Quite a lot of software leverages endian.h and a series of related functions for endian conversations beyond the traditional byteorder (ntohs, etc.) functions. This change adds support for these by providing an endian.h header as well as a suite of related functions that match the diverging name sets that folks use.
Updated by Electric Monk almost 5 years ago
- Status changed from New to Closed
- % Done changed from 90 to 100
commit 7dc9a163b382daee1ce43b6588dd1b507363dae5 Author: Robert Mustacchi <email@example.com> Date: 2016-05-19T14:45:53.000Z 6790 want suite of endian(3C) functions Reviewed by: Dan McDonald <firstname.lastname@example.org> Reviewed by: Richard Lowe <email@example.com> Approved by: Garrett D'Amore <firstname.lastname@example.org>
Updated by Richard PALO almost 5 years ago
This breaks mozilla which expects <endian.h> to be able to do the following in jscpucfg.h:
#elif defined(JS_HAVE_ENDIAN_H) # include <endian.h> # if defined(__BYTE_ORDER) # if __BYTE_ORDER == __LITTLE_ENDIAN # define IS_LITTLE_ENDIAN 1 # undef IS_BIG_ENDIAN # elif __BYTE_ORDER == __BIG_ENDIAN # undef IS_LITTLE_ENDIAN # define IS_BIG_ENDIAN 1 # endif # else /* !defined(__BYTE_ORDER) */ # error "endian.h does not define __BYTE_ORDER. Cannot determine endianness." # endif
looks like the '__' prefixed form should perhaps be defined by default, and the standard
if ! defined STRICT_ANSI || defined EXTENSIONS whatnot be used for the defs without the prefix.