X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=include%2Fwimlib%2Fendianness.h;h=ed0b7ec443eb26cf679810a26820278306d6db25;hb=4a20aae0dd8469a352517a0b107416ffa99ccc55;hp=772724dfd6b88b54362ae079f60828db780a131a;hpb=6cf66357e5b64c1b7460b42d45740dd8eaeca36e;p=wimlib diff --git a/include/wimlib/endianness.h b/include/wimlib/endianness.h index 772724df..ed0b7ec4 100644 --- a/include/wimlib/endianness.h +++ b/include/wimlib/endianness.h @@ -1,13 +1,21 @@ /* - * endianness.h + * endianness.h - macros and inline functions for endianness conversion * - * Macros and inline functions for endianness conversion. + * The following copying information applies to this specific source code file: * - * Author: Eric Biggers - * Year: 2014, 2015 + * Written in 2014-2015 by Eric Biggers * - * The author dedicates this file to the public domain. - * You can do whatever you want with this file. + * To the extent possible under law, the author(s) have dedicated all copyright + * and related and neighboring rights to this software to the public domain + * worldwide via the Creative Commons Zero 1.0 Universal Public Domain + * Dedication (the "CC0"). + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the CC0 for more details. + * + * You should have received a copy of the CC0 along with this software; if not + * see . */ #ifndef _WIMLIB_ENDIANNESS_H @@ -39,7 +47,7 @@ (((u64)(n) & 0x00FF000000000000) >> 40) | \ (((u64)(n) & 0xFF00000000000000) >> 56)) -static inline u16 do_bswap16(u16 n) +static forceinline u16 do_bswap16(u16 n) { #ifdef compiler_bswap16 return compiler_bswap16(n); @@ -48,7 +56,7 @@ static inline u16 do_bswap16(u16 n) #endif } -static inline u32 do_bswap32(u32 n) +static forceinline u32 do_bswap32(u32 n) { #ifdef compiler_bswap32 return compiler_bswap32(n); @@ -57,7 +65,7 @@ static inline u32 do_bswap32(u32 n) #endif } -static inline u64 do_bswap64(u64 n) +static forceinline u64 do_bswap64(u64 n) { #ifdef compiler_bswap64 return compiler_bswap64(n);