aboutsummaryrefslogtreecommitdiff
path: root/lib/curl_endian.h
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2015-01-01 20:26:17 +0000
committerSteve Holme <steve_holme@hotmail.com>2015-01-01 20:45:29 +0000
commit4bb5a351b2335704c07e3b860a85612058e21e0e (patch)
tree0787cf8dceec370602050a1c5f042f429aac630c /lib/curl_endian.h
parent43792592cae9e380c317691904d0c8a7cec370d1 (diff)
endian: Added big endian read functions
Diffstat (limited to 'lib/curl_endian.h')
-rw-r--r--lib/curl_endian.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/curl_endian.h b/lib/curl_endian.h
index 47a7ae6b8..e384279fa 100644
--- a/lib/curl_endian.h
+++ b/lib/curl_endian.h
@@ -37,6 +37,21 @@ unsigned __int64 Curl_read64_le(unsigned char *buf);
#endif
#endif
+/* Converts a 16-bit integer from big endian */
+unsigned short Curl_read16_be(unsigned char *buf);
+
+/* Converts a 32-bit integer from big endian */
+unsigned int Curl_read32_be(unsigned char *buf);
+
+#if (CURL_SIZEOF_CURL_OFF_T > 4)
+/* Converts a 64-bit integer from big endian */
+#if defined(HAVE_LONGLONG)
+unsigned long long Curl_read64_be(unsigned char *buf);
+#else
+unsigned __int64 Curl_read64_be(unsigned char *buf);
+#endif
+#endif
+
/* Converts a 16-bit integer to little endian */
void Curl_write16_le(const short value, unsigned char *buffer);