提交 18135125 编写于 作者: R Rodolfo Giometti 提交者: Markus Klotzbuecher

Files include/linux/byteorder/{big,little}_endian.h define

__BIG_ENDIAN and __LITTLE_ENDIAN.
Signed-off-by: NRodolfo Giometti <giometti@linux.it>
上级 a81d1c0b
...@@ -381,12 +381,12 @@ static void str2wide (char *str, u16 * wide) ...@@ -381,12 +381,12 @@ static void str2wide (char *str, u16 * wide)
{ {
int i; int i;
for (i = 0; i < strlen (str) && str[i]; i++){ for (i = 0; i < strlen (str) && str[i]; i++){
#if defined(__LITTLE_ENDIAN__) #if defined(__LITTLE_ENDIAN)
wide[i] = (u16) str[i]; wide[i] = (u16) str[i];
#elif defined(__BIG_ENDIAN__) #elif defined(__BIG_ENDIAN)
wide[i] = ((u16)(str[i])<<8); wide[i] = ((u16)(str[i])<<8);
#else #else
#error "__LITTLE_ENDIAN__ or __BIG_ENDIAN__ undefined" #error "__LITTLE_ENDIAN or __BIG_ENDIAN undefined"
#endif #endif
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册