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 over 7 years ago
- Status changed from New to Closed
- % Done changed from 90 to 100
commit 7dc9a163b382daee1ce43b6588dd1b507363dae5 Author: Robert Mustacchi <firstname.lastname@example.org> Date: 2016-05-19T14:45:53.000Z 6790 want suite of endian(3C) functions Reviewed by: Dan McDonald <email@example.com> Reviewed by: Richard Lowe <firstname.lastname@example.org> Approved by: Garrett D'Amore <email@example.com>
Updated by Richard PALO over 7 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.