diff options
Diffstat (limited to 'main/common/endian.h')
-rw-r--r-- | main/common/endian.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/main/common/endian.h b/main/common/endian.h index 36dede7..9be9ceb 100644 --- a/main/common/endian.h +++ b/main/common/endian.h @@ -1,7 +1,7 @@ /************************************************************************** * * Copyright (c) 2013 Alcatel-Lucent - * + * * Alcatel Lucent licenses this file to You under the Apache License, * Version 2.0 (the "License"); you may not use this file except in * compliance with the License. A copy of the License is contained the @@ -35,27 +35,27 @@ #ifdef CPU_LE #define ecs(a) (((a & 0x00ff) << 8) | ((a & 0xff00) >> 8)) #define ecl(a) (((a & 0x000000ff) << 24) | ((a & 0x0000ff00) << 8) | \ - ((a & 0x00ff0000) >> 8) | ((a & 0xff000000) >> 24)) -#define self_ecs(a) (a = ecs(a)) -#define self_ecl(a) (a = ecl(a)) -#define ntohl ecl -#define ntohs ecs -#define htonl ecl -#define htons ecs + ((a & 0x00ff0000) >> 8) | ((a & 0xff000000) >> 24)) +#define self_ecs(a) (a = ecs(a)) +#define self_ecl(a) (a = ecl(a)) +#define ntohl ecl +#define ntohs ecs +#define htonl ecl +#define htons ecs #else #ifdef CPU_BE #define ecs(a) a #define ecl(a) a #define self_ecs(a) #define self_ecl(a) -#define ntohl(a) a -#define ntohs(a) a -#define htonl(a) a -#define htons(a) a +#define ntohl(a) a +#define ntohs(a) a +#define htonl(a) a +#define htons(a) a #else #error You need to define CPU_BE or CPU_LE in config.h! -#endif /* else ifdef CPU_BE */ -#endif /* ifdef CPU_LE */ +#endif /* else ifdef CPU_BE */ +#endif /* ifdef CPU_LE */ /* just to be safe... */ |