Feature #6790
closedwant suite of endian(3C) functions
100%
Description
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.
Related issues
Updated by Robert Mustacchi over 7 years ago
- Related to Bug #1777: byteswap.h and endian.h could be provided added
Updated by Electric Monk over 7 years ago
- Status changed from New to Closed
- % Done changed from 90 to 100
git commit 7dc9a163b382daee1ce43b6588dd1b507363dae5
commit 7dc9a163b382daee1ce43b6588dd1b507363dae5 Author: Robert Mustacchi <rm@joyent.com> Date: 2016-05-19T14:45:53.000Z 6790 want suite of endian(3C) functions Reviewed by: Dan McDonald <danmcd@omniti.com> Reviewed by: Richard Lowe <richlowe@richlowe.net> Approved by: Garrett D'Amore <garrett@damore.org>
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.
found this: http://www.scs.stanford.edu/histar/src/pkg/uclibc/include/endian.h
Updated by Robert Mustacchi over 7 years ago
Can you please open a new bug about this?
Updated by Robert Mustacchi about 6 years ago
- Related to Bug #8706: libc lint library missing endian.h functions added