Rename __builtin_bswap32 -> bswap32
authorEddie Hung <eddie@fpgeh.com>
Tue, 9 Jul 2019 16:35:09 +0000 (09:35 -0700)
committerEddie Hung <eddie@fpgeh.com>
Tue, 9 Jul 2019 16:35:09 +0000 (09:35 -0700)
backends/aiger/xaiger.cc

index 869b741a6507e57684b68f431e880e102f264c35..69f63486c8605a39c0b971c7e5cf7f7d368487b4 100644 (file)
 // https://stackoverflow.com/a/46137633
 #ifdef _MSC_VER
 #include <stdlib.h>
-#define __builtin_bswap32 _byteswap_ulong
+#define bswap32 _byteswap_ulong
 #elif defined(__APPLE__)
 #include <libkern/OSByteOrder.h>
-#define __builtin_bswap32 OSSwapInt32
-#elif !defined(__GNUC__)
+#define bswap32 OSSwapInt32
+#elif defined(__GNUC__)
+#define bswap32 __builtin_bswap32
+#else
 #include <cstdint>
-inline uint32_t __builtin_bswap32(uint32_t x)
+inline static uint32_t bswap32(uint32_t x)
 {
        // https://stackoverflow.com/a/27796212
        register uint32_t value = number_to_be_reversed;