| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: endian.h,v 1.26 2007/07/20 15:07:15 christos Exp $ */ | | 1 | /* $NetBSD: endian.h,v 1.27 2009/07/20 18:45:27 joerg Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1987, 1991, 1993 | | 4 | * Copyright (c) 1987, 1991, 1993 |
5 | * The Regents of the University of California. All rights reserved. | | 5 | * The Regents of the University of California. All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -55,30 +55,30 @@ | | | @@ -55,30 +55,30 @@ |
55 | #include <sys/types.h> | | 55 | #include <sys/types.h> |
56 | | | 56 | |
57 | #ifndef in_addr_t | | 57 | #ifndef in_addr_t |
58 | typedef __in_addr_t in_addr_t; | | 58 | typedef __in_addr_t in_addr_t; |
59 | #define in_addr_t __in_addr_t | | 59 | #define in_addr_t __in_addr_t |
60 | #endif | | 60 | #endif |
61 | | | 61 | |
62 | #ifndef in_port_t | | 62 | #ifndef in_port_t |
63 | typedef __in_port_t in_port_t; | | 63 | typedef __in_port_t in_port_t; |
64 | #define in_port_t __in_port_t | | 64 | #define in_port_t __in_port_t |
65 | #endif | | 65 | #endif |
66 | | | 66 | |
67 | __BEGIN_DECLS | | 67 | __BEGIN_DECLS |
68 | uint32_t htonl(uint32_t) __attribute__((__const__)); | | 68 | uint32_t htonl(uint32_t) __constfunc; |
69 | uint16_t htons(uint16_t) __attribute__((__const__)); | | 69 | uint16_t htons(uint16_t) __constfunc; |
70 | uint32_t ntohl(uint32_t) __attribute__((__const__)); | | 70 | uint32_t ntohl(uint32_t) __constfunc; |
71 | uint16_t ntohs(uint16_t) __attribute__((__const__)); | | 71 | uint16_t ntohs(uint16_t) __constfunc; |
72 | __END_DECLS | | 72 | __END_DECLS |
73 | | | 73 | |
74 | #endif /* !_LOCORE */ | | 74 | #endif /* !_LOCORE */ |
75 | #endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */ | | 75 | #endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */ |
76 | | | 76 | |
77 | | | 77 | |
78 | #include <machine/endian_machdep.h> | | 78 | #include <machine/endian_machdep.h> |
79 | | | 79 | |
80 | /* | | 80 | /* |
81 | * Define the order of 32-bit words in 64-bit words. | | 81 | * Define the order of 32-bit words in 64-bit words. |
82 | */ | | 82 | */ |
83 | #if _BYTE_ORDER == _LITTLE_ENDIAN | | 83 | #if _BYTE_ORDER == _LITTLE_ENDIAN |
84 | #define _QUAD_HIGHWORD 1 | | 84 | #define _QUAD_HIGHWORD 1 |