endian.h

来自「Ibmstb02500 miniboot 源码」· C头文件 代码 · 共 65 行

H
65
字号
/* openbios/include/machine/endian.h, redbios, redbios_iii_1.0 3/23/98 11:41:30 *//*-----------------------------------------------------------------------------+||       This source code has been made available to you by IBM on an AS-IS|       basis.  Anyone receiving this source is licensed under IBM|       copyrights to use it in any way he or she deems fit, including|       copying it, modifying it, compiling it, and redistributing it either|       with or without modifications.  No license under IBM patents or|       patent applications is to be implied by the copyright license.||       Any user of this software should understand that IBM cannot provide|       technical support for this software and will not be responsible for|       any consequences resulting from the use of this software.||       Any person who transfers this source code or any derivative work|       must include the IBM copyright notice, this paragraph, and the|       preceding two paragraphs in the transferred software.||       COPYRIGHT   I B M   CORPORATION 1995|       LICENSED MATERIAL  -  PROGRAM PROPERTY OF I B M+-----------------------------------------------------------------------------*//*-----------------------------------------------------------------------------+||  File Name:   endian.h||  Function:    Machine dependent byte order defines.||  Author:      Maciej Tyrlik.||  Change Activity-||  Date        Description of Change                                       BY|  ---------   ---------------------                                       ---|  11-Jan-93   Created                                                     MPT|  26-May-94   1.00 first version after code review                        MPT|+-----------------------------------------------------------------------------*/#ifndef _machparam_endian_h_#define _machparam_endian_h_/*-----------------------------------------------------------------------------+| POWER architecture uses BIG_ENDIAN byte ordering.  Most significant byte| first.+-----------------------------------------------------------------------------*/#ifndef BIG_ENDIAN#define BIG_ENDIAN      4321#endif/*-----------------------------------------------------------------------------+| Network to host translation macros.+-----------------------------------------------------------------------------*/#if BYTE_ORDER == BIG_ENDIAN        #define ntohl(x)        (x)        #define ntohs(x)        (x)        #define htonl(x)        (x)        #define htons(x)        (x)        #define NTOHL(x)        (x)        #define NTOHS(x)        (x)        #define HTONL(x)        (x)        #define HTONS(x)        (x)#endif#endif /* _machparam_endian_h_ */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?