Deleted Added
full compact
endian.h (156284) endian.h (186647)
1/*-
2 * Copyright (c) 2002 Thomas Moestl <tmm@FreeBSD.org>
3 * Copyright (c) 2005 Robert N. M. Watson
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 11 unchanged lines hidden (view full) ---

20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * Derived from FreeBSD src/sys/sys/endian.h:1.6.
1/*-
2 * Copyright (c) 2002 Thomas Moestl <tmm@FreeBSD.org>
3 * Copyright (c) 2005 Robert N. M. Watson
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 11 unchanged lines hidden (view full) ---

20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * Derived from FreeBSD src/sys/sys/endian.h:1.6.
28 * $P4: //depot/projects/trustedbsd/openbsm/compat/endian.h#7 $
28 * $P4: //depot/projects/trustedbsd/openbsm/compat/endian.h#8 $
29 */
30
31#ifndef _COMPAT_ENDIAN_H_
32#define _COMPAT_ENDIAN_H_
33
34/*
35 * Some systems will have the uint/int types defined here already, others
36 * will need stdint.h.
37 */
29 */
30
31#ifndef _COMPAT_ENDIAN_H_
32#define _COMPAT_ENDIAN_H_
33
34/*
35 * Some systems will have the uint/int types defined here already, others
36 * will need stdint.h.
37 */
38#ifdef HAVE_STDINT_H
38#include <stdint.h>
39#include <stdint.h>
40#endif
39
40/*
41 * Some operating systems do not yet have the more recent endian APIs that
42 * permit encoding to and decoding from byte streams. For those systems, we
43 * implement local non-optimized versions.
44 */
45
46static __inline uint16_t

--- 213 unchanged lines hidden ---
41
42/*
43 * Some operating systems do not yet have the more recent endian APIs that
44 * permit encoding to and decoding from byte streams. For those systems, we
45 * implement local non-optimized versions.
46 */
47
48static __inline uint16_t

--- 213 unchanged lines hidden ---