History log of /freebsd-current/sys/sys/endian.h
Revision Date Author Comments
# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# 30e0d2a5 20-Jan-2023 Warner Losh <imp@FreeBSD.org>

linux: For better compatibility, provide compatible endian.h

Add endian.h. This includes sys/endian.h and then adds extra defines
that glibc defines with double underscores for our
_{BIG,BYTE,LITTLE,PDP}_ENDIAN macros. We also define __FLOAT_WORD_ORDER
to be the same as _BYTE_ENDIAN since FreeBSD doesn't currently define
this, and the default with glibc is exactly this for our platforms.
Move common parts of endian.h and sys/endian.h into sys/_endian.h
to limit namespace pollution from endian.h

All this gives us good compatibility with Linux. There may be one or two
upstreams that haven't integrated the patches I tried to send up.

There are some minor differences:
o The extra glibc macros are not defined. These are all
controlled with either __ at the start, or only defined
when glibc is being built. We also don't define macros
that are used internally in glibc that would pollute
the namespace.
o For complete compatibility, this change must also be
paired with providing a glibc-compatible byteswap.h.

Sponsored by: Netflix
Reviewed by: mhorne, markj, jhb
Differential Revision: https://reviews.freebsd.org/D31962


# 44fb3c69 20-Sep-2021 Warner Losh <imp@FreeBSD.org>

endian.h: Use the __bswap* versions

Make it possible to have all these macros work without bswap* being
defined. bswap* is part of the application namespace and applications
are free to redefine those functions.

Reviewed by: emaste,jhb,markj
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D31964


# f6e54eb3 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

sys: clean up empty lines in .c and .h files


# c4e20cad 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys/sys: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# f7ea97bd 20-May-2010 Poul-Henning Kamp <phk@FreeBSD.org>

Fix some way-past-brucification complaints from FlexeLint.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 14d19990 15-Oct-2003 David E. O'Brien <obrien@FreeBSD.org>

Quiet warnings about mis-matched pointer assignment.

Tested on: PowerPC


# 4a36c1fd 03-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Pointy hat commit:

Don't Cut&Paste from big endian to little endian function without subsequent
adjustments.


# 43e7e03a 03-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Use "unsigned char" instead of "u_char" to avoid trouble.


# 21ee4ab6 03-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Add inline functions {be,le}{16,32,64}{enc,dec}() for encoding decoding
into byte strings of unknown alignment.


# d75cd4de 29-Apr-2002 Mike Barcroft <mike@FreeBSD.org>

Make this header self-reliant with regard to the types it uses.


# a30d4b32 26-Apr-2002 Mike Barcroft <mike@FreeBSD.org>

Move the new byte order function prototypes from <sys/param.h> to
<sys/endian.h>. This puts us in line with NetBSD and OpenBSD.