htonl.c
来自「rtlinux-3.2源码」· C语言 代码 · 共 28 行
C
28 行
/* * Written by J.T. Conklin . * Public domain. * * CHANGELOG: this file has been modified by Sergio Perez Alca駃z <serpeal@upvnet.upv.es> * Departamento de Inform醫ica de Sistemas y Computadores * Universidad Polit閏nica de Valencia * Valencia (Spain) * Date: March 2003 * */#include <sys/types.h>#include <rtl_sched.h>#undef htonl/* *//* htonl */in_addr_t htonl(in_addr_t x){#if BYTE_ORDER == LITTLE_ENDIAN u_char *s = (u_char *)&x; return (in_addr_t)(s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3]);#else return x;#endif}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?