Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jp/fetch-cull-many-refs'
[gitweb.git]
/
compat
/
bswap.h
diff --git
a/compat/bswap.h
b/compat/bswap.h
index 5cc4acbfccef771769974b9f7cd8f6bca9321354..279e0b48b15e091fc0ca975c3efbd461ab02c149 100644
(file)
--- a/
compat/bswap.h
+++ b/
compat/bswap.h
@@
-28,6
+28,16
@@
static inline uint32_t default_swab32(uint32_t val)
} \
__res; })
+#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
+
+#include <stdlib.h>
+
+#define bswap32(x) _byteswap_ulong(x)
+
+#endif
+
+#ifdef bswap32
+
#undef ntohl
#undef htonl
#define ntohl(x) bswap32(x)