History log of /openbsd/sys/sys/_endian.h (Results 1 – 8 of 8)
Revision Date Author Comments
# 10ecf0c3 11-Jan-2018 dlg <dlg@openbsd.org>

cast the result of the ternary operators in __swapXX to the right type

ok kettenis@
let's try it deraadt@


# 5bd9646f 07-Jan-2018 kettenis <kettenis@openbsd.org>

Use __inline instead of inline as this header file might be included in a
"strict ansi" environment (even though it shouldn't be). Found out the hard
way by phessler@ with a port that uses gcc -ansi

Use __inline instead of inline as this header file might be included in a
"strict ansi" environment (even though it shouldn't be). Found out the hard
way by phessler@ with a port that uses gcc -ansi.

ok millert@, phessler@

show more ...


# 04144086 05-Jan-2018 deraadt <deraadt@openbsd.org>

backout, because it breaks builds in dev/microcode.
Always build the parts of the tree that use a file.


# 0e466aa1 05-Jan-2018 dlg <dlg@openbsd.org>

cast the result of the ternary ops in __swapXX to the relevant types.

it appears clang and guenther@ have a different way of interpreting
the c standards around type promotion and ternary operators

cast the result of the ternary ops in __swapXX to the relevant types.

it appears clang and guenther@ have a different way of interpreting
the c standards around type promotion and ternary operators compared
to gcc and me.

"no you do it" guenther@

show more ...


# 837da382 03-Jan-2018 dlg <dlg@openbsd.org>

rework __swapXX to avoid the use of __statement.

the primary motivation of this was to allow the use of things like
htons() and htole16() as case labels. previously gcc would vomit
with "expression

rework __swapXX to avoid the use of __statement.

the primary motivation of this was to allow the use of things like
htons() and htole16() as case labels. previously gcc would vomit
with "expression is not an integer constant expression" if you tried
that.

ok guenther@

show more ...


# 2f386cae 03-Jan-2018 dlg <dlg@openbsd.org>

remove __swap16_multi because endian.h provides swap16_multi without it

ok guenther@


# 7d47ff53 21-Apr-2017 millert <millert@openbsd.org>

Cast the result of the __swapXX macros to the proper type.
The ternary operator was causing the result to be promoted to
int for __swap16. Fixes warning with clang. OK guenther@


# 7c5b55ff 12-Jul-2014 guenther <guenther@openbsd.org>

Tackle the endian.h mess. Make it so that:
* you can #include <sys/endian.h> instead of <machine/endian.h>,
and ditto <endian.h> (fixes code that pulls in <sys/endian.h> first)

* those will a

Tackle the endian.h mess. Make it so that:
* you can #include <sys/endian.h> instead of <machine/endian.h>,
and ditto <endian.h> (fixes code that pulls in <sys/endian.h> first)

* those will always export the symbols that POSIX specified for
<endian.h>, including the new {be,le}{16,32,64}toh() set. c.f.
http://austingroupbugs.net/view.php?id=162

if __BSD_VISIBLE then you also get the symbols that our <machine/endian.h>
currently exports (ntohs, NTOHS, dlg's bemtoh*, etc)

* when doing POSIX compiles (not __BSD_VISIBLE), then <netinet/in.h> and
<arpa/inet.h> will *stop* exporting the extra symbols like BYTE_ORDER
and betoh*

ok deraadt@

show more ...