xref: /illumos-gate/usr/src/lib/libc/i386/gen/endian.c (revision dcbf3bd6a1f1360fc1afcee9e22c6dcff7844bf2)
1 /*
2  * This file and its contents are supplied under the terms of the
3  * Common Development and Distribution License ("CDDL"), version 1.0.
4  * You may only use this file in accordance with the terms of version
5  * 1.0 of the CDDL.
6  *
7  * A full copy of the text of the CDDL should have accompanied this
8  * source.  A copy of the CDDL is also available via the Internet at
9  * http://www.illumos.org/license/CDDL.
10  */
11 
12 /*
13  * Copyright (c) 2015, Joyent, Inc.
14  */
15 
16 #include <sys/isa_defs.h>
17 #include <endian.h>
18 
19 /*
20  * General endian(3C) functions that are basically no-ops.
21  */
22 
23 uint16_t
24 letoh16(uint16_t in)
25 {
26 	return (in);
27 }
28 
29 uint16_t
30 le16toh(uint16_t in)
31 {
32 	return (in);
33 }
34 
35 uint32_t
36 letoh32(uint32_t in)
37 {
38 	return (in);
39 }
40 
41 uint32_t
42 le32toh(uint32_t in)
43 {
44 	return (in);
45 }
46 
47 uint16_t
48 htole16(uint16_t in)
49 {
50 	return (in);
51 }
52 
53 uint32_t
54 htole32(uint32_t in)
55 {
56 	return (in);
57 }
58