Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
byteorder.h
Package: linux-2.4.20.tar.gz [view]
Upload User: jlfgdled
Upload Date: 2013-04-10
Package Size: 33168k
Code Size: 1k
Category:
Linux-Unix program
Development Platform:
Unix_Linux
- /* $Id: byteorder.h,v 1.1 2000/07/10 16:32:31 bjornw Exp $ */
- #ifndef _CRIS_BYTEORDER_H
- #define _CRIS_BYTEORDER_H
- #include <asm/types.h>
- #ifdef __GNUC__
- /* we just define these two (as we can do the swap in a single
- * asm instruction in CRIS) and the arch-independent files will put
- * them together into ntohl etc.
- */
- static __inline__ __const__ __u32 ___arch__swab32(__u32 x)
- {
- __asm__ ("swapwb %0" : "=r" (x) : "0" (x));
- return(x);
- }
- static __inline__ __const__ __u16 ___arch__swab16(__u16 x)
- {
- __asm__ ("swapb %0" : "=r" (x) : "0" (x));
- return(x);
- }
- /* defines are necessary because the other files detect the presence
- * of a defined __arch_swab32, not an inline
- */
- #define __arch__swab32(x) ___arch__swab32(x)
- #define __arch__swab16(x) ___arch__swab16(x)
- #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
- # define __BYTEORDER_HAS_U64__
- # define __SWAB_64_THRU_32__
- #endif
- #endif /* __GNUC__ */
- #include <linux/byteorder/little_endian.h>
- #endif