OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-m68knommu/] [byteorder.h] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
#ifndef _M68K_BYTEORDER_H
2
#define _M68K_BYTEORDER_H
3
 
4
#ifndef __BIG_ENDIAN
5
#define __BIG_ENDIAN 4321
6
#endif
7
 
8
#ifndef __BIG_ENDIAN_BITFIELD
9
#define __BIG_ENDIAN_BITFIELD
10
#endif
11
 
12
#undef ntohl
13
#undef ntohs
14
#undef htonl
15
#undef htons
16
 
17
extern unsigned long int        ntohl(unsigned long int);
18
extern unsigned short int       ntohs(unsigned short int);
19
extern unsigned long int        htonl(unsigned long int);
20
extern unsigned short int       htons(unsigned short int);
21
 
22
extern __inline__ unsigned long int     __ntohl(unsigned long int);
23
extern __inline__ unsigned short int    __ntohs(unsigned short int);
24
 
25
extern __inline__ unsigned long int
26
__ntohl(unsigned long int x)
27
{
28
        return x;
29
}
30
 
31
extern __inline__ unsigned short int
32
__ntohs(unsigned short int x)
33
{
34
        return x;
35
}
36
 
37
#define __htonl(x) __ntohl(x)
38
#define __htons(x) __ntohs(x)
39
 
40
#define ntohl(x) __ntohl(x)
41
#define ntohs(x) __ntohs(x)
42
#define htonl(x) __htonl(x)
43
#define htons(x) __htons(x)
44
 
45
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.